musynfit 301
P = 1/makepoly([1,0,-0.01],"s")
W = makepoly([1,20],"s")/makepoly([1,200],"s")
# Set up an unweighted interconnection structure
# for unity gain negative feedback. We include
# the perturbation too.
nms = ["P";"W"]
inp = ["delt";"ref";"noise";"control"]
outp = ["W" ;"ref- delt - P";"control";"ref-delt-P-noise"]
cnx = ["control";"P"]
ic = sysic(nms,inp,outp,cnx,P,W)
# Now include some weights for performance:
Wperf = makepoly([0.01,1],"s")/makepoly([1,0.01],"s")
Wact = 0.1* makepoly([1,1],"s")/makepoly([0.05,1],"s")
Wnoise = 0.01
Wref = makepoly([0.005,1],"s")/makepoly([0.05,1],"s")
# Apply weights to error signals and unknown
# inputs.
wghtic = daug(1,Wperf,Wact,1)*ic*daug(1,Wref,Wnoise,1)
# Perform an H
infinity design.
nmeas = 1 # number of measurements
ncntrls = 1 # number of controls
gmin = 0
gmax = 10
Kinf = hinfsyn(wghtic,nmeas,ncntrls,[gmin;gmax])
Test bounds: 0.0000 < gamma <= 10.0000
gamma Hx
eig X eig Hy eig Y eig nrho xy p/f
10.000 7.1e-01 7.7e-04 9.9e-03 -3.8e-19 0.0049 p
5.000 7.1e-01 7.7e-04 9.8e-03 -1.5e-19 0.0207 p
2.500 7.0e-01 7.8e-04 9.2e-03 0.0e+00 0.1061 p
1.250 6.5e-01 -5.6e+02 6.0e-03 0.0e+00 2.3572 f
1.875 6.9e-01 7.9e-04 8.5e-03 -1.1e-18 0.2681 p