Implement MOSFET model
The metal-oxide semiconductor field-effect transistor (MOSFET) is a semiconductor device controllable by the gate signal (g > 0). The MOSFET device is connected in parallel with an internal diode that turns on when the MOSFET device is reverse biased (Vds < 0) and no gate signal is applied (g=0). The model is simulated by an ideal switch controlled by a logical signal (g > 0 or g = 0), with a diode connected in parallel.
The MOSFET device turns on when a positive signal is applied at the gate input (g > 0) whether the drain-source voltage is positive or negative. If no signal is applied at the gate input (g=0), only the internal diode conducts when voltage exceeds its forward voltage Vf.
With a positive or negative current flowing through the device, the MOSFET turns off when the gate input becomes 0. If the current I is negative and flowing in the internal diode (no gate signal or g = 0), the switch turns off when the current I becomes 0.
The on state voltage Vds varies
Vds = Ron*I when a positive signal is applied at the gate input.
Vds = Rd*I-Vf +Lon*dI/dt when the antiparallel diode is conducting (no gate signal).
The Lon diode inductance is available only with the continuous model. For most applications, Lon should be set to zero for both continuous and discrete models.
The MOSFET block also contains a series Rs-Cs snubber circuit that can be connected in parallel with the MOSFET (between nodes d and s).
The internal resistance Ron, in ohms (Ω). The Resistance Ron parameter cannot be set to 0 when the Inductance Lon parameter is set to 0.
The internal inductance Lon, in henries (H). The Inductance Lon parameter is normally set to 0 except when the Resistance Ron parameter is set to 0.
The internal resistance of the internal diode, in ohms (Ω).
The forward voltage of the internal diode, in volts (V).
You can specify an initial current flowing in the MOSFET device. It is usually set to 0 in order to start the simulation with the device blocked.
If the Initial current IC parameter is set to a value greater than 0, the steady-state calculation considers the initial status of the MOSFET as closed. Initializing all states of a power electronic converter is a complex task. Therefore, this option is useful only with simple circuits.
The snubber resistance, in ohms (Ω). Set the Snubber resistance Rs parameter to inf to eliminate the snubber from the model.
The snubber capacitance, in farads (F). Set the Snubber capacitance Cs parameter to 0 to eliminate the snubber, or to inf to get a resistive snubber.
If selected, add a Simulink® output to the block returning the MOSFET current and voltage.
The MOSFET block implements a macro model of the real MOSFET device. It does not take into account either the geometry of the device or the complex physical processes .
Depending on the value of the inductance Lon, the MOSFET is modeled either as a current source (Lon > 0) or as a variable topology circuit (Lon = 0). The MOSFET block cannot be connected in series with an inductor, a current source, or an open circuit, unless its snubber circuit is in use.
Use the Powergui block to specify either continuous simulation or discretization of your electrical circuit containing MOSFET blocks. When using a continuous model, the ode23tb solver with a relative tolerance of 1e-4 is recommended for best accuracy and simulation speed.
The inductance Lon is forced to 0 if you choose to discretize your circuit.
The power_mosconvpower_mosconv example illustrates the use of the MOSFET block in a zero-current quasi-resonant switch converter. In such a converter, the current produced by the Lr-Cr resonant circuit flows through the MOSFET and internal diode. The negative current flows through the internal diode that turns off at 0 current . The switching frequency is 2 MHz and the pulse width is 72 degrees (duty cycle: 20%).
Run the simulation and observe the gate pulse signal, the MOSFET current, the capacitor voltage, and the diode current on the four-trace Scope block.
 Mohan, N., T.M. Undeland, and W.P. Robbins, Power Electronics: Converters, Applications, and Design, John Wiley & Sons, Inc., New York, 1995.