Controlling a Mosfet in a buck converter.
In this tutorial we will create a model where the mosfet is controlled from the block diagram. Select the Mosfet and Diode from Components/Circuit/Semiconductors Create a circuit as shown below:
The gate of the Mosfet is a block diagram node. This is indicated by the square node. We will control the gate of the Mosfet by using a SIGNAL block. The block SIGNAL is used to create wave forms like square waves, sinusoidal and triangular waveforms. Select the block TIME and SIGNAL from Components/Blocks/Source
Please note that in most cases the first input has to be connected to the block Time. The DC value of the source is set to 0 and the AC value is set to 1. The frequency of the square wave form is set to 200kHz with a phase-shift of 0 rad. The duty cycle is the last parameter of the block SIGNAL and is set to 0.5.
The gate of the Mosfet is connected to the output of the block SIGNAL. The simulation is shown below.