www.gusucode.com > robust 案例源码程序 matlab代码 > robust/NominalValueOfUncertainModelsExample.m
%% Nominal Value of Uncertain Models % Create a model of a mass-spring-damper system in which the mass, spring % constant, and damping constant are all uncertain. m = ureal('m',3,'percent',40); k = ureal('k',2,'percent',30); c = ureal('c',1,'percent',20); G = tf(1,[m,c,k]) %% % |G| is a |uss| model. Extract its nominal value. Gnom = getNominal(G); %% % Because |G| has only uncertain control design blocks, |Gnom| is a numeric state-space % (|ss|) model. %% % Combine |G| with a tunable PID controller. C = tunablePID('C','pid'); T = feedback(G*C,1) %% % |T| is a generalized state-space (|genss|) model that has both tunable and % uncertain blocks. Extract the nominal value of |T|. Tnom = getNominal(T) %% % Extracting the nominal value of |T| preserves the tunable control design % block, resulting in another |genss| model.