How to generate a ramp up and ramp down sequence using Matlab Function in Simulink?

조회 수: 29 (최근 30일)
In the code i want to accelerate from 300rad/s to 302rad/s from t=5 to t=5.3. Then stay at 302 from t=5.3 to t=6.3. And then decelerate to 300rad/s from t=6.3 to 6.6.
However, I think my code is not right because I have another change in speed before i reached 302. Likewise during the deceleration.
  댓글 수: 1
Kiran Isapure
Kiran Isapure 2022년 9월 13일
Hi Amadou,
I am also trying to fast ramp up to 300 deg/sec and hold that speed to sometime and then slow ramp down.
Can you help me how to go ahead with this ?
Thanks

댓글을 달려면 로그인하십시오.

채택된 답변

Srijith Kasaragod
Srijith Kasaragod 2021년 12월 3일
Hi Amadou,
I understand the issue you are facing is that there are two slopes generated in the ramp up and ramp down sections of the signal. One possible workaround is to specify the 'Max step size' option in Solver Configuration Parameters. Specifying a value of 0.1 enables the solver to track the signal changes effectively and only a single slope is obtained as intended. The solver might be missing significant behaviour from the default time step values, so changing the time step value could prevent the solver from taking too large a step.
Regards.
  댓글 수: 1
Amadou Bah
Amadou Bah 2021년 12월 6일
Hi @Srijith Kasaragod, you're right the solver setting was the problem. I reduced the step size, but I also had to switch from variable-step to fixed-step solver, then the problem is solved.
Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fluid Dynamics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by