How to model PWM with dynamic delay in simulink?
9 次查看(过去 30 天)
显示 更早的评论
The delay is dynamic which is the feedback from the system. The new delay should be added only after the cycle is completed with the old delay. In the picture, the above graph is pulse without delay. The below one is the pulses with variable delay. It is seen from the second graph that when the delay changes, there is a small pulse which is unwanted. This is happening due to the new delay has occurred before the cycle is complete. How to model this in simulink without getting these unwanted pulses when there is change in the delay?
0 个评论
回答(2 个)
Joe Murphy
2017-8-16
Hello Vamsinag,
There are a few different ways this could be implemented, but in this situation I would suggest using a Triggered Subsystem with a Trigger type of 'rising'. This kind of Triggered Subsystem would only execute when the PWM signal being fed into its Trigger Input Port is rising from 0 to 1, which would mark the end of its previous cycle -- if you alternatively define a cycle ending when the signal falls from 1 to 0, you can use the Trigger type of 'falling'. You can read more about this subsystem in the following documentation page: https://www.mathworks.com/help/simulink/ug/triggered-subsystems.html
Without knowing how your PWM signal is being generated and dynamically changed by feedback, it is difficult to suggest exactly where this Triggered Subsystem should be implemented in your model. You will need to send the PWM signal to the Trigger Input Port after the feedback conditions for a delay change have been met, which may be done using a Switch block depending on what kind of feedback this is. Afterwards, you can add internal components to the Triggered Subsystem or use its output signal to finally change the delay of the PWM signal, which again would depend on how that PWM signal is being generated.
If you are still unsure as to how this kind of implementation will work in your model, please provide your model (or a reduced example version) as an attachment and I will be able to make more specific suggestions.
Joe
Karan Goyal
2017-11-20
Thanks for your help Mr. Murphy, I will try using the triggered system. I was thinking of using switch command as delays are random.
Regards, KG
0 个评论
社区
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!