Hold and Ramp Down function in Simulink

조회 수: 6 (최근 30일)
Phil_I
Phil_I 2015년 5월 11일
댓글: KL 2015년 5월 12일
I have a PID controller in Simulink which is operating within an enabled subsystem. When the subsystem is disabled, outside of the subsystem I would like to hold the last value calculated whilst the subsystem was active for a parameterisable amount of time, then ramp down to 0 over a parameterisable amount of time.
It's easy to hold the last value from the subsystem using output port settings, but i'm struggling with the hold and subsequent ramp. Any suggestions? Cheers, Phil

답변 (1개)

KL
KL 2015년 5월 11일
Take a negative constant (your slope) and then connect it to a discrete integrator with an external reset. This will produce a negative ramp, add this signal to your held signal, so it will ramp down. When it reaches zero reset your integrator. Activate this part only when your signal is held.
  댓글 수: 2
Phil_I
Phil_I 2015년 5월 11일
Thanks. How about the hold for a set amount of time before ramping down?
KL
KL 2015년 5월 12일
Lets say, you successfully manage to hold your signal. Now multiply it with a step input whose initial value is 1. Set the end time as the step time here and make the step go to zero. so the result will be zero after this time. At the end of the path use some switching logic to route the proper signal after our multiplied signal reaches zero.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by