How to model PWM with dynamic delay in simulink?
4 views (last 30 days)
Show older comments
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 Comments
Answers (2)
Joe Murphy
on 16 Aug 2017
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
on 20 Nov 2017
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 Comments
Communities
More Answers in the Power Electronics Control
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!