How to update value when different value is 0 in simulink?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone,
I am creating a Simulink model to control an asynchronous motor with a current source inverter. I want to simulate a ramp-up by changing the frequency from an initial value to the rated value using a rate limiter. The issue is that I want to update the reference frequency value only when the counter (for selecting switches) reaches 0.
I have tried using the Signal Sample and Hold block as well as a combination of switches and memory blocks, but it is not working. The counter should always change from 0 to 180, but it is not behaving as expected.
Can anyone help with this?
0 comentarios
Respuestas (2)
Divyanshu
el 6 de Ag. de 2024
Editada: Divyanshu
el 6 de Ag. de 2024
You can try using triggered subsystems. Add your entire model inside the triggered subsystem block and use the counter as a control signal for triggered subsystem.
When the value of counter changes from 0 to 180 then it will trigger a 'rising' edge and the triggered subsystem would be enabled. Make sure to keep the 'Trigger Type' as 'rising' in the block parameters of 'Trigger' block.
You can refer the following documentation link for more detail on 'Triggered Subsystem':
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!