Input Signal from state space model
20 ビュー (過去 30 日間)
古いコメントを表示
im just wondering how can i plot the input signal of a state space model? and also how do i include a step reference signal for my input channel?
A = [ 0 0 0 1.0000 0 0
0 0 0 0 1.0000 0
0 0 0 0 0 1.0000
0 6.5000 -10.0000 -17.5000 0 0
-21.1185 18.1040 5.1540 -3.6920 -2.8128 0.3159
5.0000 -3.6000 0 0 0 -10.9545];
B =[ 0 0
0 0
0 0
26.5000 11.2000
5.5907 -1.6525
40.0000 57.3000];
C = [1 0 0 0 0 0
0 1 0 0 0 0
0 0 1 0 0 0];
D = 0;
0 件のコメント
回答 (1 件)
Sam Chak
2022 年 11 月 12 日
Hi @Justin
You can try using the lsim() function. Search Google/Documentation for details. Example is shown below:
A = [ 0 0 0 1.0000 0 0;
0 0 0 0 1.0000 0;
0 0 0 0 0 1.0000;
0 6.5000 -10.0000 -17.5000 0 0;
-21.1185 18.1040 5.1540 -3.6920 -2.8128 0.3159;
5.0000 -3.6000 0 0 0 -10.9545];
B = [ 0 0;
0 0;
0 0;
26.5000 11.2000;
5.5907 -1.6525;
40.0000 57.3000];
C = [1 0 0 0 0 0;
0 1 0 0 0 0;
0 0 1 0 0 0];
D = 0;
sys = ss(A, B, C, D);
Tp = 1; % 1 cycle period
Tf = 1; % final time simulation
Ts = 1e-4; % sample time
[u, t] = gensig('sine', Tp, Tf, Ts);
lsim(sys, [heaviside(t - 0.25), -2*u], t) % 1st input is step, 2nd input is sine
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Dynamic System Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!