computing:ltspice
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computing:ltspice [2026/05/04 16:45] – oscar | computing:ltspice [2026/08/01 12:06] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== LTSpice ====== | ||
| - | ---- | ||
| - | To measure the loop gain (T = Aβ) of an op-amp in LTspice, insert an AC source in series with the feedback loop, usually using an LC circuit to maintain DC bias. The loop gain is the ratio of the feedback signal V(fb) to the injected stimulus V(in) simulated using an .ac command to analyze stability and phase margin. | ||
| - | |||
| - | ===== LTspice Loop Gain Simulation Steps ===== | ||
| - | We can use LTSpice to simulate these things and check the result. We can plot the loop gain in several ways, but the easiest is to break the loop at the inverting input, and plot the difference between the nodes on either side of the break. This method is not completely fool proof, because it relies on there being a high impedance node on one side of the break, however with the input to an op amp on one side of the break, its hard to go wrong. Here’s what the circuit looks like with the loop broken and an AC source added to drive signals around the loop: | ||
| - | {{ : | ||
| - | What we are essentially doing here, is to try to plot vout/vin for the loop itself (i.e, the classic gain equation). we have to keep the loop connected though, since otherwise the feedback network wont do its job, and the circuit wont resemble the normal operating conditions. so our zero volt voltage source allows us to inject a signal into the loop without compromising the DC operating points because the feedback network is still connected to the inverting input of the op-amp. | ||
| - | |||
| - | Another way to plot the loop gain involves adding an inductor so huge it looks open circuit at anything above DC, then injecting a signal into the feedback node via a huge capacitor. essentially setting up a different circuit for the DC operating point analysis. | ||
| - | |||
| - | Steps: | ||
| - | - Open the Loop: Insert a 0V voltage source in the feedback path. A good technique is to insert it between the output and the feedback network to avoid changing the DC operating point. | ||
| - | - Add Stimulus: Configure the inserted voltage source with an AC amplitude of 1 in the " | ||
| - | - Ensure Proper Biasing: Use a large capacitor (e.g.1kF) in series with a large inductor (e.g. 1kH)to inject the AC signal while allowing DC feedback, | ||
| - | - Run Simulation: Add a **".ac dec 10 1 10meg" | ||
| - | - Plot Loop Gain: After running, plot V(fb)/ | ||
| - | - Magnitude: db(V(fb)/ | ||
| - | - Phase: ph(V(fb)/ | ||
| - | - Analyze Phase Margin: The point where the gain is 0dB (magnitude is 1) reveals the phase margin (**180° - |phase|**) | ||
| - | |||
| - | ===== Key Considerations ===== | ||
| - | * **DC Operating Point:** The DC loop must remain closed. If the feedback is opened, the high open-loop gain will cause the output to rail. | ||
| - | * **Frequency Range:** Sweep from low (e.g., 1Hz) to high (e.g., 100MHz) frequencies to capture the full gain bandwidth. | ||
| - | |||
| - | ===== Links ===== | ||
| - | * Unordered List Item[[https:// | ||
computing/ltspice.1777913149.txt.gz · Last modified: by oscar
