Why Doesn't SPICE Converge?
The mathematical meaning hidden in "Timestep too small".
The divergence mechanism of Newton's method and the moment the simulator gives up.
1. The Dreaded "Timestep too small"
When running circuit simulations, you may encounter the simulation suddenly stopping with the following error message:
! Error: Timestep too small; time = 1.2345e-06, timestep = 1.25e-19: trouble with node "vout"
This does not mean "ran out of time." It means "the equations to determine the voltage for the next instant could not be solved no matter what." Why can't the computer find the answer?
2. The Engine: Newton-Raphson Method
To solve nonlinear equations $f(v) = 0$ involving diodes and transistors, SPICE uses an iterative method called the Newton-Raphson Method.
Let $v_n$ be the current estimate. The next estimate $v_{n+1}$ is found using the tangent line:
$$ v_{n+1} = v_n - \frac{f(v_n)}{f'(v_n)} $$
Here, $f'(v_n)$ corresponds to the conductance (slope) at that operating point. This calculation repeats until the update amount falls below the tolerance (ABSTOL/RELTOL), at which point it is considered "converged."
This method is powerful and typically converges to the true value in a few iterations. However, if the "initial guess $v_0$ is too far from the true value" or if the "function $f(v)$ has a poor shape (inflection points or discontinuities)," it can oscillate or diverge to infinity.
3. Why Timestep Gets Smaller?
In Transient Analysis, SPICE uses the solution at the "current time $t$" to predict the initial guess for the "next time $t + \Delta t$".
If Newton's method fails to converge, SPICE decides that "the prediction was off because we advanced time too much." It then halves the timestep $\Delta t$ (taking smaller steps) and tries to calculate again closer to the previous solution.
However, if the circuit model contains ideal switches or sharp discontinuities (non-differentiable points), no matter how fine the time steps are, a smooth tangent cannot be drawn, and convergence fails.
Eventually, when $\Delta t$ becomes smaller than the floating-point limit (or the configured `TMIN`), SPICE admits defeat. This is the true nature of "Timestep too small".
4. Dr.WataWata's Insight
90% of convergence errors are not simulator bugs but "model deficiencies." In particular, "overly ideal models" that are physically impossible are often the culprit.
Switches that toggle instantly (in zero time) or wires with zero parasitic capacitance do not exist in nature. For SPICE, functions without guaranteed continuity are a nightmare.
When you face errors, before tweaking options (like `GMIN` stepping), review your circuit. Add a slight $R_{on}$ to switches, or attach a few pF of $C$ to sharp nodes. Adding "physical reality (imperfection)" saves mathematical convergence.