Message Boards Message Boards

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

Collect variables from nonlinear System

Posted 10 years ago

Hi! I've a very big eight dimensional nonlinear system and I want to transform it into a Matrix xdot = F(x)+B(x)*U On a little example:

xdot1 = x^3+u^2*(x+3x^2)+ bx 
xdot2 = x^2+u*x^2 + b*x
F1(x) = x^3; B1(x) = {x+3x^2   ,   x }; U = {u,b}   // First column
F2(x) = x^2; B2(x) =  {x^2, x}                              // Second column

I have tried with:

F1 = xdot1/.b-> 0 /. u -> 0
B11 = xdot1-fx /.b-> 0
B12 = xdot1-F1/.u->0

but for proving this i made F1+B11u+B12b - xdot1 but the result is nonzero. Command Collect[] did not worked too...

Thanks!

POSTED BY: Kurt Alber
2 Replies
Posted 10 years ago

I think you want to do something like this example: http://wolfram.com/xid/0bsw81boyzl1mwhqd5-w61bwh. If so, directly give your ODE to AffineStateSpaceModel.

POSTED BY: Suba Thomas

Hi,

Take a look at CoefficientList[] and MonomialList[] documentation. Here is an example:

z = MonomialList[#, {x, y}] & /@ {a1 + b1 x + c1 y, a2 + b2 x + c2 y } 
F = Last[#] & /@ z
B = Most[#] & /@ z /. {x -> 1, y -> 1}
F + B.{x, y}

I.M.

POSTED BY: Ivan Morozov
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