フィルターのクリア

Simulink: apply constant velocity to model

7 ビュー (過去 30 日間)
Hana
Hana 2012 年 9 月 4 日
編集済み: Markus M. 2022 年 12 月 23 日
i want to model a spring-damper-mass system and apply a constant velocity on it during the whole simulation. how can it be done? i tried by adding a constant, but it only will be added to the system at the beginning. also a step block couldn't solve my problem either.
i would appreciate your help!

回答 (1 件)

Ryan G
Ryan G 2012 年 9 月 4 日
To do this you can put an external reset on the integrator set to 'level' and use a step/pulse to activate it. The integrator will now follow whatever is coming in for the initial condition.
  2 件のコメント
ly
ly 2016 年 8 月 8 日
Did you simulate in Simulink?
How to define a constant velocity during a limited time (=1s) in Simulink?
Markus M.
Markus M. 2022 年 12 月 23 日
編集済み: Markus M. 2022 年 12 月 23 日
This is done easily in simulink like @Ryan G mentioned.
The mass damper system with constant velocity is shown below (mass=1 for convenience).
First you have to create a level signal for the integrator, which defines when the integrator should hold the initial condition. Call it z. Connect it with the external reset signal from the v-integrator.
Next, the integrator needs to know which value to reset to. Unfortunately we cannot simply input a value here, because the integrator also resets to this value at . This can be fixed however with a simple logic switch logic. (the integrator reset value) is , when z is 0. Else, when z is 1 (active), is .
A plot is shown below:
Constants used here:
%define values for v
v0=0.5; % = v(t=0)
vconst=2; % = v(z=1)
%spring-damper constants
k=1; % spring constant
d=1; % damper constant
%Step times
T1=1;
T2=3;

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

カテゴリ

Help Center および File ExchangeGeneral Applications についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by