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!