DC-DC Buck Converter

Model a DC-to-DC buck converter from input voltage level vi to desired lower output voltage level vd using a pulse-width modulated feedback control q[t].

Use Kirchhoff's laws to get a model for the circuit:
The control signal q[t] will switch the transistor on for a fraction vd/vi of each period :
Buck from a higher voltage vi=24 to a lower voltage vd=16: