How to update value when different value is 0 in simulink?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
Divyanshu
2024-8-6
编辑:Divyanshu
2024-8-6
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!