ss error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ss error

sborsarelli@gmail.com
Hi!

I'm an octave new user so I don't understand a message from compiler:

octave:2> A=[0 1 0 0;-1000 -980 1000 980;0 0 0 1;28.57 28 -28.57 -28]
A =

   0.0000e+00   1.0000e+00   0.0000e+00   0.0000e+00
  -1.0000e+03  -9.8000e+02   1.0000e+03   9.8000e+02
   0.0000e+00   0.0000e+00   0.0000e+00   1.0000e+00
   2.8570e+01   2.8000e+01  -2.8570e+01  -2.8000e+01

octave:3> B=[0 50000 0 0]
B =

       0   50000       0       0

octave:4> C=[0 0 1 0]
C =

   0   0   1   0

octave:5> J=0
J = 0
octave:6> sys=ss(A,B,C,J)
warning: abcddim: a(4x4) and b(1x4) are not compatible
error: a(4x4), b(1x4), c(1x4), d(1x1); incompatible
error: called from:
error:   /usr/share/octave/packages/3.2/control-1.0.11/ss.m at line 210, column 5

I believe an dimension error in my 4x4 system. Is that? there is another function to solve 4x4 state variable form?

thank

Reply | Threaded
Open this post in threaded view
|

Re: ss error

Doug Stewart-4
On Sun, Nov 21, 2010 at 11:46 AM, [hidden email]
<[hidden email]> wrote:

>
> Hi!
>
> I'm an octave new user so I don't understand a message from compiler:
>
> octave:2> A=[0 1 0 0;-1000 -980 1000 980;0 0 0 1;28.57 28 -28.57 -28]
> A =
>
>   0.0000e+00   1.0000e+00   0.0000e+00   0.0000e+00
>  -1.0000e+03  -9.8000e+02   1.0000e+03   9.8000e+02
>   0.0000e+00   0.0000e+00   0.0000e+00   1.0000e+00
>   2.8570e+01   2.8000e+01  -2.8570e+01  -2.8000e+01
>
> octave:3> B=[0 50000 0 0]
> B =
>
>       0   50000       0       0
>
> octave:4> C=[0 0 1 0]
> C =
>
>   0   0   1   0
>
> octave:5> J=0
> J = 0
> octave:6> sys=ss(A,B,C,J)
> warning: abcddim: a(4x4) and b(1x4) are not compatible
> error: a(4x4), b(1x4), c(1x4), d(1x1); incompatible
> error: called from:
> error:   /usr/share/octave/packages/3.2/control-1.0.11/ss.m at line 210,
> column 5
>
> I believe an dimension error in my 4x4 system. Is that? there is another
> function to solve 4x4 state variable form?
>
> thank
>
>
>

Try:

 sys=ss(A,B',C',J)

this will change B and C to column vectors from row vectors

_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: ss error

sborsarelli@gmail.com
sorry .....this is the result....
octave:5> sys=ss(A,B',C',J)
warning: abcddim: a(4x4) and c(4x1) are not compatible
error: a(4x4), b(4x1), c(4x1), d(1x1); incompatible
error: called from:
error:   /usr/share/octave/packages/3.2/control-1.0.11/ss.m at line 210, column 5

why?!?
Reply | Threaded
Open this post in threaded view
|

Re: ss error

John W. Eaton
Administrator
On 21-Nov-2010, [hidden email] wrote:

| sorry .....this is the result....
| octave:5> sys=ss(A,B',C',J)
| warning: abcddim: a(4x4) and c(4x1) are not compatible
| error: a(4x4), b(4x1), c(4x1), d(1x1); incompatible
| error: called from:
| error:   /usr/share/octave/packages/3.2/control-1.0.11/ss.m at line 210,
| column 5
|
| why?!?

For a state space system

  xdot = Ax + Bu
     y = Cx + Du

the normal dimensions are

   x(Nx1)  u(Mx1)  y(Px1)

   A(NxN)  B(NxM)  C(PxN)  D(PxM)

You apparently have N = 4 states, M = 1 inputs, and P = 1 outputs, so
the dimensions of your system need to be

  A(4x4)  B(4x1)  C(1x4)  D(1x1)

jwe
_______________________________________________
Help-octave mailing list
[hidden email]
https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: ss error

sborsarelli@gmail.com
thank! now run
bye

2010/11/22 John W. Eaton [via Octave] <[hidden email]>
On 21-Nov-2010, [hidden email] wrote:

| sorry .....this is the result....
| octave:5> sys=ss(A,B',C',J)
| warning: abcddim: a(4x4) and c(4x1) are not compatible
| error: a(4x4), b(4x1), c(4x1), d(1x1); incompatible
| error: called from:
| error:   /usr/share/octave/packages/3.2/control-1.0.11/ss.m at line 210,
| column 5
|
| why?!?

For a state space system

  xdot = Ax + Bu
     y = Cx + Du

the normal dimensions are

   x(Nx1)  u(Mx1)  y(Px1)

   A(NxN)  B(NxM)  C(PxN)  D(PxM)

You apparently have N = 4 states, M = 1 inputs, and P = 1 outputs, so
the dimensions of your system need to be

  A(4x4)  B(4x1)  C(1x4)  D(1x1)

jwe
_______________________________________________
Help-octave mailing list
[hidden email]




--
cordiali saluti
stefano borsarelli