how to model this algorithm in simulink?
Afficher commentaires plus anciens
I have a model which uses an integrator. I want this integrator to be initialized to a value at start of simulation. During the course of simulation, I am resetting the integrator upon a condition. I want the integrator to be reset to zero and not with the initial value. How to model this in simulink? ie.. to have two different values at start and during the run time
Réponses (1)
Paul
le 8 Avr 2023
0 votes
In the integrator block, set the "Initial Condition Source" to external. Then, connect that source to whatever logic you need to set the initial value at t = 0 or to the reset value if t > 0. Maybe feed a Clock into Compare to Zero, and use the ouput of that to drive a Switch that selects either the initial value or the reset value. The output of the Switch is the external IC into the integrator.
Catégories
En savoir plus sur Modeling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!