1. First diode circuit
Circuit of Solving nonlinear equations^, but don’t distribute the handout yet.
Vs — R — D
-
Set up the circuit equations symbolically, two ways:
-
#1 — KCL at the anode’s node, which is nodal analysis.
This gives a voltage (vD here) for its solution. -
#2 — KVL around the single loop, AKA mesh current analysis.
Yielding a current (Ix) as the solution.
-
Which is better to solve for, voltage or current?
…
It doesn’t matter! Having one and wanting the other is merely a substitution with one of your original equations.
Sometimes, it is less work one way; do that. Sometimes, you don’t know or have enough experience with that particular form of problem to see which will be easier until you’ve already started. Such is life.
1.1. Load line
A load line analysis is a graphical method to help solve a circuit problem. It is common in analog, especially with amplifiers and for nonlinear circuits.
You’ll notice that the first example in these references is always the [Vsource — resistor — diode] series circuit. Because it’s a great example of the technique.
generate two equations, involving the same two variables, and plot them on two axes, the curves' intersection is the circuit’s solution.
1.2. Guess and iterate method
See: Solving nonlinear equations webpage or handout.
-
Learn about it by reading,
-
then see the calculator trick demonstration (plus a setting for your TI calculator that will change your life).
-
Practice by using the technique to solve a diode circuit with numbers.
2. Diode circuit simulation
2.1. CircuitLab
All ECE students[1] have access to the full version of CircuitLab. It is great for drawing circuits that look nice (including SVG export!), but the simulation engine and ploting features are so-so. Every simulator has things to like and things to dislike, so we learn several.
-
Draw the V—R—D circuit in CircuitLab.
Add a GND
symbol to designate which node in the circuit is declared to be at zero volts.
Essentially all circuit simulators use “modified nodal analysis”, and therefore they all require the user to declare one node as the zero node before the software can solve the circuit.
Once you’ve drawn the circuit in CircuitLab and connected the GND
symbol to a node, check the far lower-right corner for a green circle 🟢.
The color indicates whether it has computed the DC solution for the circuit.
If so, then just hover your mouse over various nodes and devices to see the DC values as a tooltip.
When the circle is red 🔴, then there is some error that prevents the simulator from finding a valid solution.
This is super handy!
-
Write down the values of the loop current Ix and the diode’s voltage vD.
2.2. LTspice
LTspice is from Analog Devices (ADI). It was developed by the company Linear Technology Corporation, hence the prefix, and kept the name after ADI acquired LTC in 2017.
The simulation engine in LTspice is also based on the original Berkeley SPICE 3f5. What makes it one of my favorites is that it is fast and accurate especially for transient (time-domain) simulations. It actually generates custom assembly code for solving the circuit’s MNA matrix after you Run the simulation. See the article SPICE Differentiation by Mike Engelhardt (author of LTspice) for more information.
-
LTspice is installed on the ECE lab computers.
-
See the demo on how to run LTspice.
-
-
The full version is free and has no “student version” limits that are unlocked with $$$.
-
Draw the V—R—D circuit in LTspice. Select the
1N4148
diode. -
Perform a DC op pnt, DC operating point, or
.op
simulation.
If successful, the simulator will pop up a window with the node voltages and device currents. Afterwards, you can hover over devices and nodes and see the DC solution’s values in the grey status bar at the bottom.
-
Write down the values of the loop current Ix and the diode’s voltage vD.
2.3. Other simulators?
Do the same in Pspice, if you dare.
There are other simulators that operate in a web browser.
SIMetrix/SIMPLIS Elements was my first favorite simulator. Its simulation engine is also great.
Micro-Cap was a well-regarded commercial simulator that is now free, though no longer being developed. https://www.spectrum-soft.com/download/download.shtm
NL5 Circuit Simulator is not based on SPICE and therefore doesn’t suffer from that family’s limitations.
The maker of NL5 also offers idealCircuit (free) that can simulate … ideal circuits. The problem of solving nonlinear circuits (and equations) is wide and varied, so there is space for alternative (non-SPICE) approaches. Very interesting!