%Example 7.8  Robust performance problem
%
w=logspace(-2,2,51);
ru=0.5;
L1=nd2sys(0.5,[1 0]);
L2=nd2sys([-1 1],[1 1 0],0.5);
Wp=nd2sys([0.25 0.1],[1 0]);
Wu=nd2sys([1 0],[1 1],ru);
S1=minv(madd(1,L1));
S2=minv(madd(1,L2));
RP=minv(madd(abs(frsp(Wp,w)),abs(frsp(Wu,w))));
S1f=frsp(S1,w);
S2f=frsp(S2,w);
%Figure 7.19
clf;
vplot('liv,lm',S1f,S2f,RP,'--',1,'w:');
xlabel('Frequency');ylabel('Magnitude');
text(0.4,0.4,'S1');
text(0.7,3.5,'S2');
text(10,2,'1/(Wp+Wu)');
