Current mode PWM - Relational Operator did not behave as expected

1 view (last 30 days)
I want to ask what I'm doing wrong. I tried to build this simple corrent mode PWM driver converter to test regulation on it in the future.
But it did behave veirdly. Can I use Relational Operator - Greater than to compare MOSFET current and constant/control signal or do I need different block?
I just want to create R signal when currrent is higher than Constaant but it is all over the place as in this output. What is wrong?

Answers (1)

Joel Van Sickel
Joel Van Sickel on 18 May 2022
It looks like the issue might be the solver is not detecting the zero crossing that should be caused when the current goes above 1.1.
There are a few potential ways to fix this. Make sure zero crossing detection is enabled on the relational operatoer. Go to the solver configuraiton and turn on adadative zero crossing.
One way to try and force it to be better would be to put in a small minimum step size. Check your solver and make sure it is ode23tb. You could also try using the inductor measured current instead of the mosfet. If you can't get it to work, can you share the model?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by