¿ªÔÆÌåÓý

Difference between finding DC point before AC, and pure DC simulation


 

Hello!
Question is simple, I have a circuit (I can't upload it here due to company restrictions unfortunately), and it perfectly converges in DC analysis,
even if I start it not from the zero voltages point, but AC analysis with .step command to get capacitance curve failed at DC solution.
Transient analysis also works perfectly, so the point is - what is the difference between DC analysis and DC solution before AC analysis?
As I understand, to simulate AC, program exclude capacitances and inductances, finds DC solution, and the does phasor analysis with C and L included, so I don't see any difference between conventional DC analysis and this step before AC.
Thank you in advance.


 

This is something that has puzzled me too, for years, but I did not figure out how.? Also there are cases where the initial operating point solution needed for .TRAN differs.??I think the algorithms are essentially the same, but with subtle difference in some settings.? (Maybe some of the .options, ITLn for example.)? Also, a .DC sweep likely starts from a different initial DC value, and then sweeps through the point that you're using for the .AC simulation, which gives .DC an advantage.? If your circuit has trouble converging on the operating point, it matters where it is coming from, and what were the initial guesses.

When SPICE finds the operating point, whether it's for .OP or .DC or .AC or .TRAN or .NOISE, I believe all the capacitors are removed and all inductors replaced by shorts (but accounting for their parasitics).? It's the "finds DC solution" step that you need to worry about.

Andy


 

Over the years I've noticed all versions of SPICE appear to use different algorithms to solve the DC bias point for .dc, .ac, and .tran analyses.

The use of the .savebias and .loadbias commands can be useful, especially for circuits that take a long time to converge to a DC solution. Often times the .tran command finds the DC solution faster than the .DC - in this case the .savebias time=xyz is useful. I seem to recall needing to make sure the options in the simulator are set to save all node voltages and currents if using subcircuits.


 

I have also observed this. The reason is probably that any possible inaccuracies in the DC solution of a .tran analysis will usually disappear during the first few timesteps. For a .ac analysis, on the other hand, there is no such self-correction and depending on the circuit, the results might be very sensitive to its DC bias point. So I would guess that the accuracy settings for the DC solution of a .ac analysis are more strict than for a .tran analysis. This matches with your observation that the .tran analysis often finds the DC solution faster.