www.gusucode.com > robust 案例源码程序 matlab代码 > robust/StabilizingControllerForMIMOPlantExample.m
%% Stabilizing Controller for MIMO Plant % Stabilize a 4-by-5 unstable plant with three states, two measurement % signals, and one control signal. %% % In practice, P is an augmented plant that you have constructed by % combining a model of the system to control with appropriate H2 weighting % functions. For this example, use a randomly-generated model. % Copyright 2015 The MathWorks, Inc. rng(0,'twister'); P = rss(3,4,5)'; %% % This command creates a 4-output, 5-input stable model and then takes its % Hermitian conjugate. This operation yields a 5-output, 4-input unstable % model. For this example, assume that one of the inputs is a control % signal and two of the outputs are measurements. % % Confirm that P is unstable. All the poles are in the right half-plane. pole(P) %% % Design the stabilizing controller, assuming NMEAS = 2 and NCON = 1. [K,CL,GAM] = h2syn(P,2,1); %% % Examine the closed-loop system to confirm that the plant is stabilized. pole(CL)