simulating vehicle velocity using ramp block

I want to simulate a vehicle moving at 10 m/s which starts to slow down after 5 seconds and stops at 7 seconds. I used ramp block to get velocity vs time graph. Parameters can be seen in picture uploaded. When I run the simulation for 10 seconds, it goes below 0 after 7 seconds and I do not want that. I want my graph to start at 10 m/s till 5 seconds then ramp down to 0 m/s till 7 seconds and then stay 0 m/s till 10 seconds. I suppose I have to add another block between but do not know which. Any help is greatly appreciated. I am sorry if it doesnt make sense. I am self learning Matlab and doesnt have enough to go with.

3 件のコメント

Alex Alex
Alex Alex 2021 年 12 月 6 日
block Saturation with Upper Limit 10, Lower Limit 0, for example.
Vivek Rajivkumar Patel
Vivek Rajivkumar Patel 2021 年 12 月 6 日
Thank you Alex, it worked out perfectly. Exactly what I wanted.
Rik
Rik 2021 年 12 月 6 日
@Alex Alex Please post your comment as an answer so Vivek can accept it.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

製品

リリース

R2021b

質問済み:

2021 年 12 月 5 日

コメント済み:

Rik
2021 年 12 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by