How to simulate a simple spring using Simscape
이전 댓글 표시
Hello Everyone,
I am using simscape to simulate a simple spring driven by a step input.
I am giving a step input (force) to a spring and then, I want to monitor the Oscillations in spring. I am giving a step input = 1N to the spring (K = 1N/m. Intial deformation =0m). I was expecting the spring to extend to a maximum length of 1m and hold constant there, instead I am seeing Oscillations in the spring extension. I have attached my Simscape file here. Can you help me here?

답변 (1개)
SYED IMTIAZ ALI SHAH
2019년 8월 2일
편집: SYED IMTIAZ ALI SHAH
2019년 8월 2일
You don't have any damper in your system, I tried this mathematically and gives me the same result (Oscillation). You must add damper if you want your system to stay at a specific position.
Here is the mathematical model for your system with and without damper.
>> n = [1] ;
>> d = [1 0 1];
>> fn = tf(n,d)
fn =
1
-------
s^2 + 1
Continuous-time transfer function.
>> t = 0:0.1:10;
>> wref = zeros(1,length(t));
>> wref(1:length(t)) = 1;
>> [y,t] = lsim(wref,fn,t);
>> plot(t,y)

After adding damper
d = [1 1 1]; % rest of the code remain the same

Here is the modified Simscape model (Damper value is kept 1,rest of the parameters are exactly the same as provided by you)

카테고리
도움말 센터 및 File Exchange에서 Assembly에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!