Filter löschen
Filter löschen

Type of output using the 'lsim' command

2 Ansichten (letzte 30 Tage)
Kaustubh Surdi
Kaustubh Surdi am 23 Jul. 2011
[EDIT: 20110723 20:32 CDT - reformat - WDR]
Hi guys,
I built a simple 6DOF spring-mass-damper system in Matlab and using the state space solver built a LTI model and used 'tf' get a transfer function for the model. I used the 'lsim' command to get the system response to arbitrary inputs.
I wanted to know what the output units on response vector would be. Does it output velocity or acceleration? If its velocity, then would simple differentiation be ok to convert it to acceleration?
Below is my code for it. Thanks in advance.
%%%%%%%%
m=[10 7 9 9 5 5];
k=[10,10,10,10,0,0,5,1,5,1];
M=diag(m);
K=10000*[26 -10 0 0 -5 -1
-10 35 -10 -10 0 -5
0 -10 18 0 0 0
0 -10 0 22 0 0
-5 0 0 0 6 -1
-1 -5 0 0 -1 7];
C=.0001*K;
% define State Space Matrices
A=[zeros(size(M)) eye(size(M));-inv(M)*K -inv(M)*C];
B=[zeros(size(M)); inv(M)];
C=[zeros(size(M)) eye(size(M))];
D=[zeros(size(M))];
sys1=ss(A,B,C,D);
H=tf(sys1);
% Define Forcing Function
time=linspace(0,15,10000)';
F=0*time;
F(find(time<.5))=20+F(find(time<.5)); % 20N step 0 to .5 seconds
% Apply force to DOF 1
u=inv(M)*[1,0,0,0,0,0]'*F';
x=lsim(H,u,time);

Antworten (0)

Kategorien

Mehr zu Linear Model Identification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by