this is meant as a supressor, see how the very fast spike is easily killed off and made into a gentle sine wave of much less amplitude by the filrer, the diode shorts out the negative side of this and I'll be adding a zener and TVS after the filter to totaly cut out anything over 18 V, the odea of the above simulation is to show the effect of an LC low pass filter on a fast impulse.
The output will remain as PWM although I'll be adding a resistor in paralel with the control mosfet to keep some current flowing, this may be in the form of the original resistor in the regulator