Buck-boost converter: switching circuit * example of Section B.1.4 Vg 1 0 15V Sq1 1 2 5 0 switch D1 3 2 diode RL 2 4 0.1 L1 4 0 15uH ic=0 C1 3 0 50uF ic=0 R 3 0 20 Vc 5 0 pulse +(0 10V 0us 100ns 100ns 7.9us 10us) .model switch vswitch +(Ron=0.05 Roff=10meg Von=6V Voff=4V) .model diode d (Is=1e-12) .tran 1u 1.2m 0m uic .probe .end