Skip to main content

Section 4.4 Analysis of diode circuits

Subsection 4.4.1 Analytic circuit treatment

How do we analyze circuits containing diodes? The simplest way is to use the cartoonish behavior demonstrated in Figure 4.2.2. Given this diode behavior, one can occasionally determine by inspection the conditions under which the diode is on or off.For example, let’s analyze the circuit in Figure 4.4.1.
Figure 4.4.1.
In this circuit,
\begin{align*} \tilde{V}_\text{out} \amp =\tilde{V}_\text{in}-V_F \amp \text{(Diode on)} \\ \tilde{V}_\text{out} \amp = 0 \amp \text{(Diode off)} \end{align*}
which is plotted in Figure 4.4.2.
Figure 4.4.2.
With experience, the approach above may eventually be enough for you to solve some relatively simple diode circuits. When one is first learning to analyze diode circuits, or when analyzing more complicated circuits, the above method may not work. In such a case, one continues to use the cartoon diode behavior and guesses at whether each diode is off or on for a given instantaneous value of the input voltage. The remaining circuit elements are then analyzed under the assumption that the initial guesses are correct. In order to determine the veracity of the initial guesses, one looks for inconsistencies or impossibilities that arise from the rest of the circuit analysis. If an impossible situation occurs, then one knows that the initial assumptions were incorrect. In this scenario, one adjusts the initial guesses and re-analyzes the circuit, repeating until no inconsistencies occur. Stated differently, the steps to follow are:
  1. Check the conditions in the circuit and see if it is possible to achieve a forward voltage drop \(V_F\) across the diode. If it is completely impossible, then the diode will be off and you can treat it as a circuit break. If it is possible that the diode may be forward biased, then continue on to the next steps.
  2. For each diode in your circuit, guess whether the diode is on or off. For each diode that is on, let the voltage drop \(\left(\Delta V\right)_D=V_F\) be locked. For each diode that is off, treat the diode as a circuit break meaning no current can pass through it.
  3. Analyze the rest of the circuit elements and search for inconsistencies.
  4. If any results of your analysis conflict with your guesses about diodes that are on/off, then go back and change your guesses until there are no inconsistencies.
Let’s use this procedure for Figure 4.4.1. If we assume that the diode is on when \(\tilde{V}_\text{in}=-1.0\)V, then \(\tilde{V}_\text{out}=-0.4\)V. But, this would require a current directed counterclockwise around the circuit which is not allowed by the diode. This inconsistency indicates that our assumption about the diode being on is incorrect in this case. If we change our assumption and instead state that the diode is off when \(\tilde{V}_\text{in}=-1.0\)V, then \(\tilde{V}_\text{out}=0\)V since no current passes through the output resistor.

Example 4.4.3. Diode example #2.

Figure 4.4.4. Diode example #2.
Find the voltage \(V_B\) in Figure 4.4.4 assuming \(V_F=0.6\)V.
Answer.
\begin{equation*} V_B=0 \end{equation*}
Solution.
Let’s examine this case-by-case.
  • Case 1: Both diodes are off. Then, \(I_2=I_3=0\) so that \(I_1=0\) as well. So, \(V_A=+5\)V. This is inconsistent with our assumption, since this results in a bias that is both large enough and in the correct direction to turn on diode \(D2\text{.}\) Thus, the assumptions in this case cannot be true.
  • Case 2: Both diodes are on. Then, \(V_A=+0.6\)V. Using Ohm’s law, \(I_1=0.88\)mA. Also, we’d see that \(V=0\) due to the diode drop from point A to point B. Given this information, Ohm’s law can again be applied to tell us that \(I_3=0.5\)mA. The KCL is then used to determine that \(I_2=I_1-I_3=0.38\)mA. There is no inconsistency here, meaning that we were correct in our assumptions and \(V_B=0\text{.}\) Though it is unnecessary (there can be only one correct answer!), we will examine the remaining cases.
  • Case 3: Diode 2 is off while diode 3 is on. In this case, our circuit acts as a voltage divider, with \(10.0\text{V}-0.6\text{V}=9.4\)V across the two resistors. So,
    \begin{equation*} V_A=-5.0\text{V} + \frac{2}{3}(9.4\text{V}) + 0.6\text{V}=1.87\text{V} \end{equation*}
    which is more than enough to turn on diode two. Thus, this case cannot be valid.
  • Case 4: Diode 2 is on while diode 3 is off. In this case, \(V_A=0.7\)V. This is identical to \(V_A\) in case 2 meaning that diode 3 should activate. This conflicts with our assumption that diode 3 is off. Thus, this case cannot be valid.

Example 4.4.5. Diode example #3.

Figure 4.4.6. Diode example #3.
Find the voltage \(V_B\) in Figure 4.4.6 assuming \(V_F=0.6\)V. Note that this is identical to the previous problem except that the two resistors have been swapped.
Answer.
\begin{equation*} V_B=-1.87\text{V} \end{equation*}
Solution.
Let’s examine this case-by-case.
  • Case 1: Both diodes are off. Then, \(I_2=I_3=0\) so that \(I_1=0\) as well. So, \(V_A=+5\)V. This is inconsistent with our assumption, since this results in a bias that is both large enough and in the correct direction to turn on diode \(D2\text{.}\) Thus, the assumptions in this case cannot be true.
  • Case 2: Both diodes are on. Then, \(V_A=+0.6\)V. Using Ohm’s law, \(I_1=0.44\)mA. Also, we’d see that \(V=0\) due to the diode drop from point A to point B. Given this information, Ohm’s law can again be applied to tell us that \(I_3=1.0\)mA. The KCL is then used to determine that \(I_2=I_1-I_3=-0.56\)mA. This is impossible since we’ve assumed ideal diodes which do not allow current to pass in the reverse direction.
  • Case 3: Diode 2 is off while diode 3 is on. In this case, our circuit acts as a voltage divider, with \(10.0\text{V}-0.6\text{V}=9.4\)V across the two resistors. So,
    \begin{equation*} V_B=-5.0\text{V} + \frac{1}{3}(9.4\text{V}) + 0.6\text{V}=-1.87\text{V} \end{equation*}
    and \(V_A = V_B + 0.6\text{V}=-1.27\text{V}\) which would not turn on \(D_2\text{.}\) Thus, everything is consistent and this must be the valid scenario.
  • Case 4: Diode 2 is on while diode 3 is off. In this case, \(V_A=0.7\)V. This is identical to \(V_A\) in case 2 meaning that diode 3 should activate. This conflicts with our assumption that diode 3 is off. Thus, this case cannot be valid.

Subsection 4.4.2 Python circuit treatment

Let’s revisit the circuit in Figure 4.4.1. This time, we will use an improved mathematical representation of diode behavior from (4.2.1), reproduced here as
\begin{equation*} I_D = I_0\left(e^{V_D/nV_T} - 1\right)\text{.} \end{equation*}
Assuming we’re using a silicon-based diode, we can assume \(I_0\approx 3\times 10^{12}\)A, \(V_T = k_B T/e\text{,}\) room temperature is \(T\approx 293\)K, and \(n\approx 1\text{.}\) The KVL can be used to write
\begin{equation*} \tilde{V}_\text{in} - V_D - I_0 R \left(e^{V_D/nV_T}-1\right)=0\text{.} \end{equation*}
This is a nonlinear equation that cannot easily be solved analytically for \(V_D\text{,}\) so we’ll use computational methods to estimate \(V_D\text{.}\) Specifically, we’ll use Newton’s Method which is described in Section A.1. In order to use this method, we’ll let
\begin{equation*} f(V_D) = \tilde{V}_\text{in} - V_D - I_0 R \left(e^{V_D/nV_T}-1\right) \end{equation*}
and then calculate the first derivative
\begin{equation*} f'(V_D) = -1-\frac{I_0 R}{V_T} e^{V_D/V_T}\text{.} \end{equation*}
Using these equations, we implement Newton’s Method (Section A.1) using the following code:

Example 4.4.7. Diode Example #4.

Examine the circuit in Figure 4.4.8. Plot the time behavior of \(I_1(t)\text{,}\) \(I_2(t)\text{,}\) \(I_3(t)\text{,}\) \(V_\text{in}(t)\text{,}\) \(V_\text{out}(t)\text{,}\) and the voltage across the diode \(V_D(t)\text{.}\)
Figure 4.4.8.
Solution.
We can write down an equation for KCL
\begin{equation*} I_3 = I_1 + I_2\text{.} \end{equation*}
Using Ohm’s law,
\begin{align*} I_1 =\amp I_D \\ I_2 =\amp \frac{V_\text{in}-V_2}{R_2} \\ I_3 =\amp \frac{V_2}{R_3} \end{align*}
where \(V_2\) is the voltage at the top side of \(V_\text{out}\) (at the junction between \(R_2\text{,}\) \(R_3\text{,}\) and \(D_1\)). Combining these equations, we find
\begin{equation*} I_D + \frac{V_\text{in}-V_2}{R_2} - \frac{V_2}{R_3} = 0\text{.} \end{equation*}
We also get an additional equation by examining the circuit branch containing the diode:
\begin{equation*} V_2 = V_\text{in}-I_D R_1 - V_D\text{.} \end{equation*}
Plugging into the previous equation, we thus find that
\begin{equation*} I_D + \frac{I_D R_1+V_D}{R_2} - \frac{V_\text{in}-I_D R_1 - V_D}{R_3} = 0\text{.} \end{equation*}
If we now group all of the \(I_D\) terms, we find
\begin{equation*} \left(1+\frac{R_1}{R_2} + \frac{R_1}{R_3}\right)I_D + \left(\frac{1}{R_2} + \frac{1}{R_3}\right)V_D - \frac{V_\text{in}}{R_3} = 0\text{.} \end{equation*}
We can then use Newton’s method to solve for the currents letting
\begin{align*} f(V_D) =\amp \left(1+\frac{R_1}{R_2} + \frac{R_1}{R_3}\right)I_0\left(e^{V_D/V_T}-1\right) + \left(\frac{1}{R_2} + \frac{1}{R_3}\right)V_D - \frac{V_\text{in}}{R_3}\\ f'(V_D) =\amp \left(1+\frac{R_1}{R_2} + \frac{R_1}{R_3}\right)\frac{I_0}{V_T}e^{V_D/V_T} + \left(\frac{1}{R_2} + \frac{1}{R_3}\right) \end{align*}