148 CHAPTER 4. DEMONSTRATION EXAMPLES
comment gsim mu nom "nominal closed loop sys: mu ctrl"
comment gsim hinf nom "nominal closed loop sys: hinf ctrl"
comment gsim lp nom "nominal closed loop sys: klp ctrl"
A step disturbance is introduced into the first channel.
time = 0:2:0.01
u = gstep(time) # a unit step is the default
u = [u;0*u] # put zero into the other channel
comment u "simulation input"
ymu nom = gsimmu nom*u
yhinf nom = gsimhinf nom*u
ylp nom = gsimlp nom*u
comment y mu nom "nominal response: mu ctrl"
comment y hinf nom "nominal response: hinf ctrl"
comment y lp nom "nominal response: klp ctrl"
All controllers perform well on the nominal system. This can be seenby plotting the
time histories of each.
gph7 = plot(ymu nom,{rows=3,row=1,grid,...
title="Kmu step dist. response (nominal)",...
xlab="time",y max=1.5,y min=-1});
gph7 = plot(yhinf nom,gph7,{row=2,grid,...
title="Kinf step dist. response (nominal)",...
xlab="time",y max=1.5,y min=-1});
gph7 = plot(ylp nom,gph7,{row=3,grid,...
title="Klp step dist. response: (nominal)",...
xlab="time",y max=1.5,y min=-1})?