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!