bugGNU Octave - Bugs: bug #40973, control package: lsim fails to run

 
 

bug #40973: control package: lsim fails to run

Submitted by:  None
Submitted on:  Thu 19 Dec 2013 06:49:44 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: Saul MtakulaOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.4
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 29 Jan 2014 05:50:37 PM UTC, comment #5:

Yes, I think so.

Lukas Reichlin <paramaniac>
Wed 29 Jan 2014 05:47:48 PM UTC, comment #4:

Can we close this bug report as "Invalid"?

Andreas Weber <andy1978>
Project Member
Fri 20 Dec 2013 04:45:13 PM UTC, comment #3:

Thanks for the clarification. I should have read the documentation better. A statement to say time vector should have length(t) rows should help clarify matters further.

Anonymous
Fri 20 Dec 2013 07:03:30 AM UTC, comment #2:

Try

For MIMO systems, U requires as many columns as there are inputs and as many rows as there are time steps. Does lsim's help string need some clarifications?

HTH
Lukas

Lukas Reichlin <paramaniac>
Fri 20 Dec 2013 02:20:17 AM UTC, comment #1:

One more for the control package maintainer, adding CC.

Mike Miller <mtmiller>
Project Administrator
Thu 19 Dec 2013 06:49:44 PM UTC, original submission:

Code below refers; the lsim function reports the following error.

error: lsim: input vector u must have 151 rows
error: called from:
error: C:\Software\Octave-3.6.4\share\octave\packages\control-2.4.2\lsim.m at line 245, column 5
error: C:\Software\Octave-3.6.4\share\octave\packages\control-2.4.2\lsim.m at line 126, column 14
error: C:\Software\Octave-3.6.4\mfiles\skoge_p96.m at line 73, column 1

clear()
pkg load control

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);
figure(2)
step(T1,T2)

t=0:.1:15;
u=ones(size(t));
U=[u;u];
figure(3)
lsim(T1,U,t)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 29 Jan 2014 05:53:27 PM UTCandy1978StatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 20 Dec 2013 02:20:17 AM UTCmtmillerSummarylsim (control package) fails to run=>control package: lsim fails to run
      Carbon-Copy-=>Added paramaniac

    Back to the top


    Powered by Savane 3.1-cleanup1