second order to first order
3 views (last 30 days)
Show older comments
Cesar Cardenas
on 23 Aug 2022
Answered: Cesar Cardenas
on 24 Aug 2022
Hello, I'm trying to convert this system to as described here:
This is my attempt but not sure...any help will be greatly appreciated. Thanks
syms x(t)
eqn = diff(x,2) + diff(x,t)*x == u;
V = odeToVectorField(eqn)
0 Comments
Accepted Answer
Sam Chak
on 24 Aug 2022
I suspect that your 2nd-order ODE was incorrectly written. Please check. If it is a linear damped spring system, then the equation should be:
and it can be converted to the state-space form as shown below:
omega = 2;
zeta = sqrt(3)/4;
sympref('AbbreviateOutput', false);
syms x(t) y(t) u
eqn = diff(x, 2) + 2*zeta*omega*diff(x) + (omega^2)*x == (omega^2)*u;
[V, S] = odeToVectorField(eqn)
From the result, and , and so, the state-space model can be constructed accordingly:
A = [0 1; -4 -sqrt(3)];
B = [0; 4];
C = [1 0];
D = 0;
sys = ss(A, B, C, D)
0 Comments
More Answers (1)
See Also
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!