Current mode PWM - Relational Operator did not behave as expected
조회 수: 1(최근 30일)
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?
Joel Van Sickel 2022년 5월 18일
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. https://www.mathworks.com/help/simulink/ug/zero-crossing-detection.html
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?