Azzera filtri
Azzera filtri

Could someone explain the meaning of this step function for me

1 visualizzazione (ultimi 30 giorni)
Hi, I have obtained a code for simulating car suspension system using a LTI system x' = Ax + Bu, y = Cx+Du
m1 = 10;
m2 = 350;
kw = 500000;
ks = 10000;
Bb = [1000, 2000, 3000, 4000];
t = 0:0.1:2;
for i = 1:4
b = Bb(i);
A = [0 1 0 0; -(ks/m1+kw/m1) -b/m1 ks/m1 b/m1; 0 0 0 1; ks/m2 b/m2 -ks/m2 -b/m2];
B = [ 0; kw/m1; 0; 0];
C = [1 0 0 0; 0 0 1 0];
D = 0;
y = step(A,B,C,D,1,t); %Why is 1,t added?
subplot(2,2,i);
plot(t,y(:,1), ':', t, y(:,2), '-');
legend('Wheel', 'Car');
ttl = sprintf('Response with b = %4.1f' ,b);
title(ttl);
end
Can someone quickly explain to me why the step function is written in the way it is? Especially the part about the inclusion of 1 and t indices.

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 16 Set 2012
Modificato: Azzi Abdelmalek il 16 Set 2012
y = step(A,B,C,D,iu,t)
If your system has more then one imput, you can specify which one will be the step function, the others will be nuls.
In our case there is one input, then iu=1
t is a time vector
if you use
model=ss(A,B,C,D)
y = step(model,t); %t is time vector
you will have the step response to the first input stored in y(:,:,1) and the responses to the second input in y(:,:,2)

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by