jackyleerush

10 Reputation

One Badge

0 years, 177 days

MaplePrimes Activity


These are questions asked by jackyleerush

Hey there guys, was wondering if I could get some help with this - I'm pretty new to maple. 

I'm trying to take a collection of coupled ODEs I have and get maple put them in state-space form for me. I've tried a few different approaches and messed around with a few different commands but havent managed to quite make it work. At the moment I'm trying to make a DiffEquation object and then use StateSpace to get the state space representation, but I keep getting this "diff-eq is not a polynomial" line as a warning when I run the DiffEquation command and as an error when I try to conver to state space.

Could anyone tell me why I'm getting this and what the best/correct way to go about this is?

Cheers

Triple Cart derivation

with(DynamicSystems)

 

cart1eom := `m__1 `*(diff(v__1(t), t, t))+c__1*(diff(v__1(t), t))+k*(v__1(t)-v__2(t)) = F

`m__1 `*(diff(diff(v__1(t), t), t))+c__1*(diff(v__1(t), t))+k*(v__1(t)-v__2(t)) = F

(1)

cart2eom := m__2*(diff(v__2(t), t, t))+c__2*(diff(v__2(t), t))+k(v__2(t)-v__3(t)) = k*(v__1-v__2(t))

m__2*(diff(diff(v__2(t), t), t))+c__2*(diff(v__2(t), t))+k(v__2(t)-v__3(t)) = k*(v__1-v__2(t))

(2)

cart3eom := m__3*(diff(v__3(t), t, t))+c__3*(diff(v__3(t), t)) = k*(v__2-v__3(t))

m__3*(diff(diff(v__3(t), t), t))+c__3*(diff(v__3(t), t)) = k*(v__2-v__3(t))

(3)

F := alpha*k__m*k__g*V(t)/(R*r)-k__m^2*k__g^2*(diff(v__1(t), t))/(R*r^2)``

expand(cart1eom)

`m__1 `*(diff(diff(v__1(t), t), t))+c__1*(diff(v__1(t), t))+k*v__1(t)-k*v__2(t) = alpha*k__m*k__g*V(t)/(R*r)-k__m^2*k__g^2*(diff(v__1(t), t))/(R*r^2)

(4)

"(->)"

`m__1 `*(diff(diff(v__1(t), t), t))+c__1*(diff(v__1(t), t))+k*v__1(t)-k*v__2(t)-alpha*k__m*k__g*V(t)/(R*r)+k__m^2*k__g^2*(diff(v__1(t), t))/(R*r^2) = 0

(5)

collect(`m__1 `*(diff(diff(v__1(t), t), t))+c__1*(diff(v__1(t), t))+k*v__1(t)-k*v__2(t)-alpha*k__m*k__g*V(t)/(R*r)+k__m^2*k__g^2*(diff(v__1(t), t))/(R*r^2) = 0, [v__1(t), v__2, diff(v__1(t), t, t), diff(v__1(t), t)])

k*v__1(t)-k*v__2(t)+`m__1 `*(diff(diff(v__1(t), t), t))+(c__1+k__m^2*k__g^2/(R*r^2))*(diff(v__1(t), t))-alpha*k__m*k__g*V(t)/(R*r) = 0

(6)

"(->)"

cart1eom``

(7)

eoms := [cart1eom, cart2eom, cart3eom]

[`m__1 `*(diff(diff(v__1(t), t), t))+c__1*(diff(v__1(t), t))+k*(v__1(t)-v__2(t)) = alpha*k__m*k__g*V(t)/(R*r)-k__m^2*k__g^2*(diff(v__1(t), t))/(R*r^2), m__2*(diff(diff(v__2(t), t), t))+c__2*(diff(v__2(t), t))+k(v__2(t)-v__3(t)) = k*(v__1-v__2(t)), m__3*(diff(diff(v__3(t), t), t))+c__3*(diff(v__3(t), t)) = k*(v__2-v__3(t))]

(8)

NULL

sys_1 := DiffEquation(eoms, [V], [v__3], statevariable = [v__1, v__2, v__3])

_m2358947700544

(9)

StateSpace(sys_1)

_m2358947252000

(10)

NULL

Download 403TripleCart.mw

Page 1 of 1