how to solve 4 state equation ?

조회 수: 2 (최근 30일)
tomer polsky
tomer polsky 2017년 10월 23일
편집: Birdman 2017년 10월 24일
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?

답변 (2개)

Birdman
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
tomer polsky
tomer polsky 2017년 10월 24일
this is not what i am asking for , u are telling me how to find the roots . i dont need the roots i need to find vector x
Birdman
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]

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2017년 10월 24일
편집: Torsten 2017년 10월 24일
syms a(t) b(t) c(t) d(t) C1 R C R1 L1 L2 u
eqns = [diff(a,t)==d/C1 , diff(b,t)=-b/(R*C) , diff(c,t)=-R1*c/L1+u/L1 , diff(d,t)=-a/L2];
[asol(t) bsol(t) csol(t) dsol(t)] = dsolve(eqns)
Best wishes
Torsten.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by