Hold and Ramp Down function in Simulink

6 vues (au cours des 30 derniers jours)
Phil_I
Phil_I le 11 Mai 2015
Commenté : KL le 12 Mai 2015
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

Réponses (1)

KL
KL le 11 Mai 2015
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 commentaires
Phil_I
Phil_I le 11 Mai 2015
Thanks. How about the hold for a set amount of time before ramping down?
KL
KL le 12 Mai 2015
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by