bugGNU Octave - Bugs: bug #40960, control package: mixsyn delivers...

 
 

bug #40960: control package: mixsyn delivers lower bandwidth controller than matlab/scilab

Submitter:  None
Submitted:  Wed 18 Dec 2013 06:16:51 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Saul Mtakula Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 03 Feb 2014 10:06:51 AM UTC, comment #7: 

The new release 2.6.2 of the control package solves this issue. mixsyn and hinfsyn compute now an optimal instead of a suboptimal controller by default.

Lukas Reichlin <paramaniac>
Fri 20 Dec 2013 09:12:33 PM UTC, comment #6: 

If you download and un-tar the control package, you'll find slicot.tar.gz in the "src" folder. Or you can get it from the Mercurial repository:

http://sourceforge.net/p/octave/control/ci/default/tree/src/slicot.tar.gz



Lukas Reichlin <paramaniac>
Fri 20 Dec 2013 04:50:46 PM UTC, comment #5: 

I will try that routine (if I can get hold of SLICOT since it looks like its gone commercial). I don't know how many people use the toolbox but I suspect there would be a requirement for gamma iteration as a wishlist for some time in the future.

Anonymous
Thu 19 Dec 2013 06:29:07 PM UTC, comment #4: 

You could try out SLICOT Routine SB10AD. It does the gamma iteration for continuous-time systems.

Lukas Reichlin <paramaniac>
Thu 19 Dec 2013 04:53:07 PM UTC, comment #3: 

Is there a function to calculate the minimal infinity norm so it can be passed as an argument to  the mixsyn function?

Anonymous
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

Lukas Reichlin <paramaniac>
Thu 19 Dec 2013 01:53:45 AM UTC, comment #1: 

One more for the control package maintainer, adding CC.

Mike Miller <mtmiller>
Group Member
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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #30036:  sensi_matlab.png added by None (9KiB - image/png)
file #30037:  sensi_scilab.png added by None (10KiB - image/png)
file #30038:  sensi_octave.png added by None (35KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by paramaniac (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by mtmiller
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-02-03 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
        Release3.6.4 other
    2013-12-19 mtmiller Summarymixsyn (control tbox) delivers lower bandwidth controller than matlab/scilab control package: mixsyn delivers lower bandwidth controller than matlab/scilab
        Carbon-Copy- Added paramaniac
    2013-12-18 None Attached File- Added sensi_matlab.png, #30036
        Attached File- Added sensi_scilab.png, #30037
        Attached File- Added sensi_octave.png, #30038

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code