# I'm trying to build an inverter circuit in LTspice using voltage controlled switches

I'm trying to build a H-bridge inverter circuit on LTspice, but I'm having trouble with getting a correct waveform. The upper and lower switches do not appear to be in sync (i'm not getting a complete square wave as there is an intermediate voltage level that the circuit stops at for a short period of time). There also appears to be no current flowing through the diode (Id1 through in the picture), which is placed in the circuit to allow for the discharge of the inductor to take place.

For the voltage controlled switch, I'm doing a basic pulsed switch operation with a voltage supply that varies between 0V and 1V, with a Ton of 0.5 and period of 1.

Not too sure what went wrong with my model. Any help or design advice will be greatly appreciated! Thank you

• You have set 0 for the rise and fall times. LTspice will default to 10% of the Ton or 10% of Tperiod-Ton, whichever is smaller, so 50 milliseconds. May 13 '20 at 6:15
• See this. May 13 '20 at 7:26

First, your diode $$\D_1\$$ seems to be short circuited (double check its connection).