Transient Analysis gives wrong results for my switching power supply circuit. Why?
Working with switchers is one of the trickiest things to do with Spice. A good book may help (see link to Basso’s website on the Links page for one possibility). Here are three common problems. the risetime surprise (sooner or later it will bite you. 5Spice prevents most cases.) People often use Spice’s Pulse waveform generator to get the switching waveform/clock for their circuit (in 5Spice this is in the Signal Source component). For the Pulse, Squarewave and Exponential waveform generators, Spice uses the TimeStep value for rise or fall times if you don’t enter a value for them or enter zero. In this case, a large TimeStep relative to the pulse’s width will give dramatically slow rise or fall times, affecting the turn on/off times or duty cycle in your circuit. A further surprise occurs if you also don’t specify the TimeStep value. Spice defaults to TimeStep = simulation run time / 50. Now when you change the simulation run time, the TimeStep varies and therefore the risetimes also