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. Let’s use this behavior to analyze the circuit in Figure 4.4.1.
Figure 4.4.1.
As the input voltage varies, it is not immediately obvious under what conditions the diode is on or off. Thus, our analysis will consist of us guessing at the diode state, analyzing the circuit, and looking for self-consistent solutions (indicating we guessed correctly) or contradictory statements (indicating we guessed incorrectly).
Let’s start out guessing that the diode is off, requiring that the diode current \(I_D=0\text{.}\) It follows from Ohm’s law that there is no voltage change across the resistor \(R\text{,}\) thus \(V_\text{out} = 0\text{.}\) Kirchhoff’s Voltage law requires \(V_D=V_{in}\) which is a self-consistent solution for all times when \(V_D \lt V_F\text{.}\) For any times when \(V_D \gt V_F\text{,}\) we have a statement that contradicts our known diode behavior which states that \(V_D=V_F\) when the diode is on.
For time periods where \(V_D \gt V_F\) in the above analysis, we will instead assume that the diode is on meaning that the voltage change across the diode will lock at \(V_D=V_F\text{.}\) Under this condition, Kirchhoff’s loop law requires that \(V_\text{out}=V_\text{in}-V_F\text{.}\) These results are not contradictory to any other circuit behaviors so must be correct. The final result of our circuit analysis for all times is found by splicing together the time intervals for the diode’s off and on behaviors as demonstrated in the following code and is plotted in Figure 4.4.2.
Figure 4.4.2.
To summarize, the method of analysis above makes use of the cartoon diode behavior and requires 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.

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_B=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_B=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 B.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 B.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*}