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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by