One thing that anyone new to SPICE often misses is that in a transient simulation (.tran), the solver needs to first resolve the DC solution (.op). All voltages and currents at t=0s depend on the DC solution. For power electronics circuits (switching circuits), this can be tricky. Power electronics engineers always assume all voltages and currents start from 0V/0A, but this is not the case in general.
There are multiple ways to handle startup conditions:
- Power stage starts with Vin=0V: Change V1 from 18V to
PWL 0 0 20u 18so Vin ramps from 0V at t=0s. - Power stage starts with 0V/0A output: Add
.ic V(vout)=0 I(L1)=0to ensure the power stage initializes with zero output voltage and current at t=0s. - Skip DC operation point and start with incorrect dc condition: Change
.tran 5mto.tran 5m UIC. While not a recommended practice, it is frequently used as because not understand what UIC actually does. (Timestep too small solved by .tran uic? - #5 by Engelhardt)
