Message Boards Message Boards

0
|
6392 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Extract matrices from the descriptor state space model?

Posted 5 years ago

Hello all, I am very new to Mathematica and my question might seem mundane. So, please bear with me. I am trying to extract the descriptor state-space model matrices from a set of state space equations. I have already done this.

M = StateSpaceModel[stateequations, states, vin[t], outputequations, 
  t]

We know that the descriptor state space is of the form:

kx'[t]=ax[t]+bu[t]*

y[t]=cx[t]+du[t]

I am trying to extract the matrices k, a, b, c, d.

I have tried

A=M[[1]]
B=M[[2]]

and so on and have been unsuccessful and have no idea how to do it.

Can anyone help me with this? Thanks in advance!

2 Replies

Kartikeya,

Use Normal[] to get the matrices.

For example,

{aa,bb,cc,dd}=Normal[M]

or

{aa,bb,cc,dd,ee}=Normal[M]

for a descriptor system.

Although I recommend avoiding variables starting with capital letters (such as M) because these are used internally by Mathematica. (Especially single letter names like E,I,C,D plus others)

Regards,

Neil

POSTED BY: Neil Singer

Mr. Neil Singer,

That worked like a charm! Thank you very much!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract