フィルターのクリア

State space modeling of LTI

3 ビュー (過去 30 日間)
Muhammad Atif
Muhammad Atif 2020 年 4 月 8 日
コメント済み: Ameer Hamza 2020 年 4 月 20 日
I have a LTI system is given in the attached picture. For which I have A=[0 1;1 2] B=[1;1], C=[3,4], D=0.1 and L=[0 1]. I need to find z(t) over an interval [0,20] and initial condition is assumed as x0=[1;-1] with an input w=0.5sin(2pi)t and v=t, how can I make a code for this??

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 8 日
編集済み: Ameer Hamza 2020 年 4 月 8 日
Such LTI system can be solved using lsim
C=[3,4];
D=0.1;
L=[0 1];
sys = ss(A,B,C,D);
t = linspace(0,20,1000)';
x0 = [1; -1];
[t,x] = ode45(@odeFun, t, x0);
v = t;
y = C*x' + D*v';
z = L*x';
plot(t,z)
function dxdt = odeFun(t, x)
A=[0 1;1 2];
B=[1;1];
w = 0.5*sin(2*pi*t);
dxdt = A*x+B*w;
end
However, the system is unstable and the output diverges to infinity.
  19 件のコメント
Muhammad Atif
Muhammad Atif 2020 年 4 月 20 日
That's it, finally I got the results. Thank you very much for your help
Ameer Hamza
Ameer Hamza 2020 年 4 月 20 日
I am glad to be of help.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by