The guess-and-iterate method

1. Forward-biased diode circuit

v r diode
Figure 1. Simplest circuit with a diode

Your first diode circuit problem! Find \(I_x\).

  • Write down a value for R:

  • Write down a value for Vs:

Do a little bit of (symbolic) circuit analysis:

\[\label{ir} I_x = \dfrac{V_s - v_D}{R}\]
\[\label{id} I_x = i_D = I_S \exp \left( \dfrac{v_D}{V_T} \right)\]

Ohm’s law, KCL, and “diode’s law” relating current and voltage in a diode are all we need, so we end up with one equation with one unknown:

\[\label{irid} \dfrac{V_s - v_D}{R} = I_S \exp \left( \dfrac{v_D}{V_T} \right)\]

Easy enough to crank the algebra handle and solve for \(v_D = \cdots\)

Except you find you can’t do it. Ever.

This equation is transcendental and does not have an analytical (symbolic) solution. Build this circuit in the lab and you will prove that the circuit does indeed have a solution — because you can measure it. Despite having no symbolic solution, it is possible to find a numerical solution by searching. Mathematics folk call these techniques numerical methods. My personal favorite is bisection because the idea even works as a solid troubleshooting strategy.

Before we get to the calculator-only technique, first consider the two device equations: resistor \(\eqref{ir}\) and diode \(\eqref{id}\). Draw the \(I_x\) vs. \(v_D\) plot for each equation separately and recognize that the location where they intersect has precisely the same meaning as the solution to equation \(\eqref{irid}\).

load line grid
Figure 2. Load line plot, resistor and diode currents.

2. Guess and iterate technique

2.1. Setup

Begin this technique by finding two separate equations which include the same two unknowns.. In this example, we have \(\eqref{ir}\) and \(\eqref{id}\) which:

  • are equal to each other by KCL and

  • both depend on the same parameter \(v_D\).

Next, algebra[1] the equations to solve one for the first variable and the other for the second variable. For the example, keep equation \(\eqref{ir}\) as-is and solve \(\eqref{id}\) for \(v_D\):

\[\label{log} v_D = V_T \ln \left( \dfrac{I_x}{I_S} \right)\]

2.2. Guess

Choose a starting value for one of the variables by guessing, engineering style.[2] For example, it should be obvious from the schematic that \(I_x\) can’t be negative, nor can it be larger than the value if the diode was a short-circuit: \(I_x \in \left[0, \frac{V_s}{R}\right]\). So, choose a number in the middle.

Don’t think so hard! Just choose the middle value of the \(I_x\) range and proceed.

2.3. Iterate

Take this \(I_x\) and plug into equation \(\eqref{log}\) to get a value for \(v_D\). Take this value of \(v_D\), plug into equation (1) to get an updated value for \(I_x\). Plug this new \(I_x\) back into equation \(\eqref{log}\).

Continue substituting one result into the other equation until you obtain enough stable digits for your required precision. It is common to only need 3 digits of precision, which represents less than 1% difference between the true value; if using this number in another calculation, use 4 digits instead.

3. Practice

For Figure 1, use 3.3 V, 470 Ω, and a diode with VT=26 mV, η=1.75, and IS=1 nA. Use the guess-and-iterate method to find the circuit solution for \(v_D\) and \(I_x\).

See the in-class calculator demonstration for how to reduce the work of computing each step of the iteration.

Step vD IX

1

2

3

4

5

6

7

4. Reference

https://agnd.net/valpo/340/notes_guess-iterate.html has even more notes on this fast method, including animations.


1. the verb form
2. Scientific wild-ass guess, Estimating Software Projects: The art of the SWAG is also good.