C514 of 57
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C5 · Lesson 14 · Diode circuit lab

Solving diode circuits exactly with Newton's method

Every circuit simulator, including the one in these lessons, solves nonlinear circuits the same way: guess the node voltages, replace each diode by the straight line that touches its curve at the guess, solve that linear circuit, and repeat. That's Newton's method (A6), and near the answer it doubles the number of correct digits on every step. In this lab you'll write it for one diode, then for a network of two, and then use exact analysis to find out how good the rectifier ripple formula of lesson 7 really is.

  • A half-wave rectifier, solved by the simulator's Newton iteration at every time step.
  • The simple estimate for its ripple is VpT/RC. Read the ripple off the scope and compare: at large ripple the estimate is noticeably high.
  • Raise C until the ripple is small: the estimate and the scope agree better and better.

Predict

Newton's method solves a diode-resistor circuit to 0.01 mV. Starting from 0.7 V, how many steps does it typically need?

Name it

Newton's method for one diode

Kirchhoff's current law at the diode's anode, with the supply Vs through R:

f(V)=Vs−VR−IS(eV/nVT−1)=0

Newton's step is V←V−f(V)/f′(V) with

f′(V)=−1R−ISnVTeV/nVT

In circuit terms, −f′(V) is the total conductance at the node: the resistor's 1/R plus the diode's small-signal conductance at the guess. Start at 0.7 V and stop when the step is below, say, 10−12 V.

Several nodes

For node voltages 𝐯, KCL at every node gives a vector 𝐟(𝐯)=0. Newton's step solves the linear system

JΔ𝐯=−𝐟Jij=∂fi∂vj

and J is exactly the nodal conductance matrix of the circuit with each diode replaced by its conductance at the guess. Simulators add limiting so that one step can't raise a diode's voltage by much more than a few thermal voltages.

Exact rectifier ripple

With an ideal diode and input Vpcos⁡ωt, the diode stops conducting just after the peak, at tan⁡ωtoff=1ωRC, when the input starts falling faster than the capacitor can discharge. The capacitor then decays as Vpcos⁡(ωtoff)e−(t−toff)/RC until the next cycle's input rises to meet it at t1, between 34T and T, where

cos⁡ωt1=cos⁡(ωtoff)e−(t1−toff)/RC

Solving that by bisection gives the exact ripple, Vp−V(t1).

Worked example

Do one Newton step by hand for 5 V, 1 kΩ, IS=10−14 A, starting from 0.7 V.

Show the solution
  1. Diode current at 0.7 V. 10−14e0.7/0.025852A=5.75mA
  2. The function to zero. f=4.30−5.75=−1.45mA
  3. Its slope. The diode's conductance is 5.75mA25.85mV=0.222S so f′=−0.223 S.
  4. Newton step. ΔV=−ff′=−1.45mA0.223S=−6.5mV which gives 0.6935 V.
  5. Compare. The answer is 0.6925 V; the next step lands within 0.02 mV.

Answer one Newton step takes the guess from 0.7 V to 0.6935 V, against an answer of 0.6925 V.

Worked example

Compare the estimate with the exact ripple for Vp = 10 V, 50 Hz, 1 kΩ and 100 µF.

Show the solution
  1. Estimate. ΔV=1050×103×10−4=2.0V
  2. Exact. The exact analysis gives 1.65 V.
  3. Why it's smaller. The capacitor's decay is exponential, so it falls a little less than a straight line, and the input meets it about 9% of a period early.

Answer the estimate gives 2.0 V of ripple, and the exact ripple is 1.65 V.

Check

A diode with IS = 1 fA is guessed at 0.6 V. What small-signal conductance does Newton's method use for it?

Write units the way you normally would: 1.5 S, 1500 mS and 0.0015 kS are the same answer.

Check

Take one Newton step from 0.7 V for a diode (IS=10−14 A) in series with 1 kΩ across 5 V. Where does it land?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A half-wave rectifier at 60 Hz has RC of 0.1 kΩ × 1000 µF. How long after the peak does its ideal diode stop conducting?

Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.

Check

Write solve_diode(Vs, R, IS=1e-14, n=1) returning (V, I) for a diode in series with R across Vs, by Newton's method from 0.7 V. Use VT = 0.025852 V.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

A supply Vs feeds R1 to node 1, which has diode D1 to ground and R2 on to node 2; node 2 has diode D2 to ground. Write solve_network(Vs, R1, R2) returning (V1, V2) by Newton's method on both nodes at once (both diodes have IS=10−14 A, n = 1).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Write exact_ripple(Vp, f, R, C): the steady-state peak-to-peak ripple of a half-wave rectifier with an ideal diode, input Vpcos⁡ωt, found by bisection as in the explanation above.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Explain why

Why is the Jacobian in Newton's method the same as the conductance matrix of a linear circuit?

Practice

Keep practicing

6 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.