Spring mass damper system shows position of mass only to be on positive side

2 ビュー (過去 30 日間)
Udhaya K
Udhaya K 2021 年 2 月 20 日
コメント済み: Paul 2021 年 2 月 21 日
Hi,
I have been out of touch with simulink and wanted to restart with a simple spring mass damper system. Here is the model I used:
Here is the script that contains inputs and plot commands:
sim_Time=150;
k=.5;
b=.2;
m=4.5;
F=2;
sim('MassSpringDamper_Trial.slx');
plot(Position.data)
legend('Position of mass')
hold all
plot(Force.data)
legend('Position of mass','Force')
And I got the output, close and not exactly, what I would like to see:
There are two things that concern me:
  1. Why are the 'Position of mass' plot values always on the positive side? The spring mass system vibrates between both the negative and positive limits from its neutral position, doesn't it?
  2. The step input force is set with an initial value 0 and final value 'F'. So I was thinking the 'Position of mass' to have a non zero value right from time t = 0. But almost till t=8, I see the 'Position of mass' to be zero.
Can someone explain the reason(s) pl.? Thanks already!

回答 (1 件)

Paul
Paul 2021 年 2 月 20 日
The transfer function from Force to Position has dc gain of 2. The input F has a value of 2, so the steady state of the output should be 4, as shown.
However, the rest of the results look suspect. The period if the oscilations should be ~18 secs. Note that
plot(Position.Data)
is just plotting points vs an index. Shouldn't that command either be
plot(Position)
or
plot(Position.Time,Position.Data)
Let's see what one of those plots look like.
Also, what is the value of the Step Time parameter in the Force block?
  4 件のコメント
Udhaya K
Udhaya K 2021 年 2 月 21 日
Thanks a lot for explaining the details, Paul. But, no offense meant, I have a poor understanding on transfer functions and hence couldn't follow your reply. Is it possible by changing any parameter in the model that I get the neutral displacement as 0 without changing the amplitudes and frequency?
//The position plot looks correct but a bit jagged (i.e., with clear vertices), I don't see that using the default solver parameters or the default parameters in the ToWorkspace blocks. Did you change those?//
Honestly speaking, I don't even know that there are possibilitiesto change the parameters. Here is what it looks like when I double-clicked it:
Thank you so much again for helping me!
Paul
Paul 2021 年 2 月 21 日
One way to obtain oscilations around 0 position is to set F to 0 and set the Initial Condtion on the integrator (from xdot to x) to a non-zero value.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGain Scheduling についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by