Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

How to modify the "Sub-cycle average "model to a Mosfet with diode?

0 votes
835 views
I need control a Mosfet with a diode in Rt-box . But when i use a PWM capture component ,

 there is a error "If the control signal comes from a PWM Capture, consider replacing this switch with a suitable Power Module in "Sub-cycle average" mode."
asked Dec 8, 2020 by JX_LIU (14 points)

1 Answer

0 votes

There is not a sub-cycle average implementation for a single MOSFET with diode nor for your specific topology.  You can eliminate the error message by using the Data Type block from the PLECS library and convert the sensed switch input signal, whether from the PWM Capture or Digital In, to the MOSFET input. 

The model fidelity in this case will be very sensitive to the discretization step size and the PWM input frequency.  You can use the CodeGen mode to evaluate this.  Review the RT Box tutorials on timing and step-size selection if you are unfamiliar. You should also change to a variable step step solver.

I should note that the buck input stage to your converter lends itself to a sub-cycle average implementation.  Use the Chopper (High-Side Switch) and the PWM Capture block.

answered Dec 9, 2020 by Bryan Lieblick (1,853 points)
...