Thu 19 Dec 2013 09:33:40 AM UTC, comment #2:
I discussed the reported issue with Thomas Vasileiou, below is our conversation. In one sentence, Octave's hinfsyn/mixsyn calculates a suboptimal controller and Matlab an optimal one, neither of them is "wrong".
Hi Thomas,
I've just received this bug report:
http://savannah.gnu.org/bugs/?40960
What do you think? Is Octave's controller "wrong" at all? Do you have any ideas what causes this? Could it be related to the fact that my mixsyn calculates a suboptimal instead of an optimal controller? Frankly I have no idea …
Best regards,
Lukas
Hi Lukas,
Hope things go well for you.
I know about this problem, it has to do with the implementation of hinfsyn. The controller octave gives is not "wrong", is just suboptimal, because octave is asked to do so.
If you want to recover Matlab solution, you have to add the expected minimal infinity norm in the calculations. Just change the lines for the controller calculation to:
[K1,mu]=mixsyn(Gss,Wp1,Wu,Wt,2.8);
[K2,mu,info2]=mixsyn(Gss,Wp2,Wu,Wt,3.2);
Then the results for me are equivalent (maybe octave is a little better, but I did the optimization by hand). Before passing to octave the values 2.8 and 3.2, the resulting automatically assigned norms were 4.5 and 5.3. Try to go a little lower with the values, and the problem is either unsolvable (you will get a ricatti equation error, or the controller is unstable).
If you want to have the Matlab behavior, you have try to minimize the norm in the hinfsyn implementation (I think that is what matlab also is doing).
best Regards,
Thomas
|
Wed 18 Dec 2013 06:16:51 PM UTC, original submission:
The code below generates an h infinity controller for the stacked problem. The same code run on Matlab and Octave results in controllers with lower bandwidth from Octave. The plots for the respective sensitivity functions from Octave and Matlab (as well as Scilab) are attached.
clear()
g11num=[1];
g12num=[1];
g21num=[2 1];
g22num=[2];
gden=[0.2 1.2 1];
Gnum={g11num g12num; g21num g22num};
Gden={gden gden; gden gden};
G=tf(Gnum,Gden);
Gss=ss(G);
Gss=prescale(Gss);
A=1.e-4;
M1=1.5;
M2=1.5;
wb1=0.25;
wb2=25;
wp1num=[1/M1 wb1];
wp1den=[1 wb1*A];
wp1=tf(wp1num,wp1den);
wp2num=[1/M2 wb2];
wp2den=[1 wb2*A];
wp2=tf(wp2num,wp2den);
Wp1=blkdiag(wp1,wp1);
Wp2=blkdiag(wp1,wp2);
Wu=eye(2,2);
Wt=[]
[K1,mu]=mixsyn(Gss,Wp1,Wu,Wt);
L1=series(Gss,K1);
L1=minreal(L1);
T1=feedback(L1,eye(2,2));
S1=inv(eye(size(Gss))+L1);
S1=minreal(S1);
S1=tf(S1);
T1=minreal(T1);
[K2,mu]=mixsyn(Gss,Wp2,Wu,Wt);
L2=series(Gss,K2);
S2=inv(eye(size(Gss))+L2);
S2=sminreal(S2);
S2=tf(S2);
L2=minreal(L2);
T2=feedback(L2,eye(2,2));
T2=minreal(T2);
figure(1)
sigma(S1,S2);
grid
figure(2)
step(T1,T2)
grid
|