Robust Control: dksyn example
Show older comments
Hi everybody,
currently I try to get familiar with the robust control toolbox. I tried to understand the dksyn command example:
if true
%Uncertain plant Gpert
G = tf(1,[1 -1]);
Wu = 0.25*tf([1/2 1],[1/32 1]);
InputUnc = ultidyn('InputUnc',[1 1]);
Gpert = G*(1+InputUnc*Wu);
%Performance Weight
Wp = tf([1/4 0.6],[1 0.006]);
%Plant P/Pi
P = [Wp; 1 ]*[1 Gpert];
P2=[Wp,Wp*Gpert;
1,Gpert];
[K,clp,bnd] = dksyn(P,1,1);
[K2,clp2,bnd2] = dksyn(P2,1,1);
end
I don't understand, why the dksyn command is able to calculate a controller for P, but not for P2?! P and P2 are equal, are'nt they? Help is really appreciated. Thank you very much!
best regards
Martin
Answers (2)
Huajing Zhao
on 8 May 2017
0 votes
Well, the ss matrices created for P and P2 are actually different in dimensions... I tested it with matlab, and it appears that P.A is 6*6 while P2.A is 3*3. For B, C, D they are also different
I believe the issue here is that:
the plant is unstable,
the construction of P2 duplicates all of the states in the generalized plant,
the duplicated unstable state is not stabilizable, not detectable, or both,
and therefore the very first step of the DK iteration in musyn (which has replaced dksyn), which I believe is a call to hinfsyn, will fail.
Define the system elements
G = tf(1,[1 -1]);
Wu = 0.25*tf([1/2 1],[1/32 1]);
InputUnc = ultidyn('InputUnc',[1 1]);
Gpert = G*(1+InputUnc*Wu);
%Performance Weight
Wp = tf([1/4 0.6],[1 0.006]);
%Plant P/Pi
Construct the generalized plant with the recommended approach using block connections. P1 has only 3 states (one each from the plant, the uncertainty scaling, and the performance scaling) and 1 occurence of the uncertain parameter.
P1 = [Wp; 1 ]*[1 Gpert]
The generalized plant poles are as expected
pole(P1)
and musyn converges.
[K1,clp1,bnd1] = musyn(P1,1,1);
Constructing P2 in the not-recommended way results in a generalized plant with 6 states, and a twice-repeated occurrence of the uncertain parameter (see Preventing State Duplication in System Interconnections - MATLAB & Simulink Example)
P2=[Wp,Wp*Gpert;
1,Gpert]
All of the poles of P1 are duplicated in P2
pole(P2)
and musyn fails (it would be nice if there was a message explaining why it fails)
[K2,clp2,bnd2] = musyn(P2,1,1);
hinfsyn also fails (perhaps it could give a hint as to why)
K = hinfsyn(P2,1,1)
Unlike musyn, hinfsyn does list requirements on the system. We saw that P2 has a repeated, unstable pole at s = 1.
The pair (M.A,M.B2) is not controllable
M = lftdata(P2);
rank(ctrb(M.A,M.B(:,4)))
and that one of the poles at s = 1 is immovable under state feedback, hence not stabilizable, which I believe is why hinfsyn fails on step 1 of musyn.
rng(100)
eig(M.A-M.B(:,4)*rand(1,6))
A reasonable question is if P2 can be manipulated into the form of P1. We can try simplify
simplify(P2,'full')
P3 = simplify(minreal(P2),'full')
eliminates 2 states and reduces the uncertainty to one occurence. So we're close to P1, but not quite.
Show that P1, P2, and P3 have the same I/O responses.
figure
rng(100); P1s = usample(P1,20);
rng(100); P2s = usample(P2,20);
rng(100); P3s = usample(P3,20);
bode(P1s,P2s,P3s)
Unfortunately, simplify() did not eliminate the unstable pole at s = 1
pole(P3)
and musyn fails again.
[K3,clp3,bnd3] = musyn(P3,1,1);
I don't know why simplify can't eliminate that additional pole at s = 1 (or if doing so is even feasible based on how P2 was constructed).
If the plant is stable and we construct the generalized plant using the not-recommended method
G = tf(1,[1 1]);
Gpert = G*(1+InputUnc*Wu);
P4=[Wp,Wp*Gpert;
1,Gpert]
muysn converges, though the optimization doesn't work as well as one might hope with that final Peak MU of 5.38.
[K4,clp4,bnd4] = musyn(P4,1,1);
Interestingly enough, if we minreal and simplify
P5 = simplify(minreal(P4),'full');
then musyn works much better, even though P5 and P4 conceptually represent the same, uncertain system.
[K5,clp5,bnd5] = musyn(P5,1,1);
Constructing the generalized plant using the recommended approach
P6 = [Wp; 1 ]*[1 Gpert];
yields a similar optimization as measured by the peak MU
[K6,clp6,bnd6] = musyn(P6,1,1);
K5 and K6 yield very similar closed-loop responses.
figure
rng(100);CL5 = usample(lft(P5,K5),20);
rng(100);CL6 = usample(lft(P6,K6),20);
figure
bode(CL5,CL6);
Summary: Use model connection functions to construct the MIMO system directly instead of constructing each element of the MIMO system as individual SISO systems and then combining those.
Categories
Find more on Mu Synthesis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
