User Tools

Site Tools


computing:ltspice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:ltspice [2026/05/04 16:39] oscarcomputing: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: 
- 
- 
-\\ \\ 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 "Advanced" tab of the component properties. 
-  - 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"** command to perform frequency analysis. 
-  - Plot Loop Gain: After running, plot V(fb)/V(in). 
-    - Magnitude: db(V(fb)/V(in)) 
-    - Phase: ph(V(fb)/V(in)) 
-  - 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://www.omicron-lab.com/fileadmin/assets/Bode_100/Articles_UseCases/Jan_Petrik/OpampSpiceModel.pdf|Omicron Lab Spice Model]] 
computing/ltspice.1777912767.txt.gz · Last modified: by oscar