Having Trouble with enable/delay etc in Simulink
Ältere Kommentare anzeigen
Hi Everyone,
I'll try to explain my problem as clear as I can: when you use an enabled subsystem that contains only a ramp function, the ramp will continue to develop with time even though the output signal of the subsystem will be held at a constant value while the subsystem is disabled. So the next time it is enabled, for instance if your initial value is 0 and you started disabled for 2 seconds leading to an enable situation at t=2, the output of the subsystem will be = 2 instead of 0 that I need. I imagined that changing the states when enabling in enable block to reset would solve my problem but I didn't see any difference. I thought I would need to use delays but the problem is that the enabled and disabled periods are variable and I can't wrap my head around this delay stuff and how to register time for it anyways.
My question is, is there any easier way to do this? any simple block that I don't know about and does the thing I want?
Thanks for your time,
Mike
4 Kommentare
TAB
am 7 Aug. 2012
Sorry mike, but don't think I got your question. This complete line is confusing
if your initial value is 0 and you started disabled for 2 seconds leading to an enable situation at t=2, the output of the subsystem will be = 2 instead of 0
Please simply explain what you are getting currently and what you expect.
shripad
am 16 Okt. 2014
hi mike,
have also faced same problem ( based on what i understood from your question) , the solution might work for you - In enable subsystem block there is input port & Output port. Double click on output port, there are options available to hold or reset the state on output when enable subsystem signal is not correct.(i.e when condition does'nt meet)
Hope this will work for you
Regards, Shripad
Preeti Sar
am 8 Jul. 2017
Use flip flop to hold the state that enters the enabled subsystem.
Akzeptierte Antwort
Weitere Antworten (1)
Les Beckham
am 8 Jul. 2017
0 Stimmen
It sounds like you just need an Integrator with your 'enable' signal as the input instead of a Ramp block. When 'enable' is one, the integrator output will be a ramp. When 'enable' is zero, the integrator output will stop at its current value.
Kategorien
Mehr zu Schedule Model Components finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!