I’ve used the same gain for SIMULINK and PLECS model. The SIMULINK model works perfectly but PLECS model is not. The controller action is not taking place. Whatever I provide input to buck converter, I get same output. I’ve attached the model for reference and also screenshot of my MATLAB model with output.
The issue is with the ‘Output values’ setting of the Symmetrical PWM block. While you used the default settings, these are configured for if you are then using comparison logic of greater than and less than zero to determine the conduction state of upper and lower switches. However, the actual MOSFET turns on when a non-zero value is applied to the gate input, and off for a value of zero. Since the PWM has output settings for [-1 1] for off and on, respectively, the MOSFET is actually always on in your model. If you change the output setting to [0 1] this should fix your issue. Separately, I noticed you had included thermal descriptions for the MOSFET and diode, but are you aware that you will also need to add a heatsink on top of these two components to enable the calculation of losses?