How to simulate a simple spring using Simscape

3 visualizaciones (últimos 30 días)
Anand Chandrasekhar
Anand Chandrasekhar el 1 de Ag. de 2019
Editada: SYED IMTIAZ ALI SHAH el 2 de Ag. de 2019
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?

Respuestas (1)

SYED IMTIAZ ALI SHAH
SYED IMTIAZ ALI SHAH el 2 de Ag. de 2019
Editada: SYED IMTIAZ ALI SHAH el 2 de Ag. de 2019
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)
Capture.PNG

Categorías

Más información sobre Simscape Electrical en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by