how to solve 4 state equation ?
2 次查看(过去 30 天)
显示 更早的评论
A_a=[0 0 0 1/(C1);0 -1/(R*C) 0 0;0 0 -R1/(L1) 0;-1/(L2) 0 0 0]
B_a=[0;0;(1/L1);0]
u=12
dx/dt=(A_a)*x+B*u
% dx/dt is differential of x
% of course R1,C1,C,R,L1,L2 are constants
how do i solve this equation?
0 个评论
回答(2 个)
Birdman
2017-10-23
This system has a transfer function of
X(s)/U(s)=B/sI-A;
This means that this differential equation's solutions will be the root of the following equation.
sI-A=0;
In this situation, you can easily find the solution for this differential equation by typing
eig(A)
The code will be as follows:
syms C1 R C R1 L1 L2
A=[0 0 0 1/(C1);0 -1/(R*C) 0 0;0 0 -R1/(L1) 0;-1/(L2) 0 0 0];
B=[0;0;(1/L1);0];
u=12;
eig(A)
You will have four solutions depending on the values of C1, R, C, R1, L1 and L2. Hope this helps.
2 个评论
Birdman
2017-10-24
编辑:Birdman
2017-10-24
syms C1 R C R1 L1 L2 t
x1=sym('x1(t)');x2=sym('x2(t)');x3=sym('x3(t)');x4=sym('x4(t)');
x=[x1;x2;x3;x4];clc;
A=[0 0 0 1/C1;0 -1/(R*C) 0 0;0 0 -R1/L1 0;-1/L2 0 0 0];
B=[0;0;1/L1;0];
u=12;
eqn=diff(x,t)==A*x+B*u;
sol=dsolve(eqn);
disp(sol.x1)
disp(sol.x2)
disp(sol.x3)
disp(sol.x4)
x=[sol.x1;sol.x2;sol.x3;sol.x4]
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!