* Z:\home\khalils\Downloads\files\data\raw_asc\b3e51a842b60_LoopGain3.asc
* Generated by LTspice 26.0.1 for Windows.
* This example schematic is supplied for informational/educational purposes only.
* [1] Michael Tian, V. Visvanathan, Jeffrey Hantgan, and Kenneth Kundert,\n "Striving for Small-Signal Stability", IEEE Circuits and Devices Magazine,\n vol. 17, no. 1, pp. 31-41, January 2001.
* Probe elements added to inject\nsignals to measure the open loop\nresponse from the closed loop system
* This example is based on posts contributed by Frank Wiedmann to the independent users' group at http://groups.yahoo.com/group/LTspice
* Simple Method to calculate Open Loop Gain from Closed Loop System\n \nIf your circuit has a point with a high input impedance at all frequencies of interest\nThen you can add an AC source before that point to inject a disturbance.\n \nMost Op amp inputs will do or perhaps the input to voltage scaling resistors \nin the feedback path of a power supply.\n \nI include the Tian method as explained in the file Loopgain2.asc for comparison.\nThe Tian method compensates for any input impedance effects but in the example below the\nsimple approach is accurate up to 40MHz because of the high input impedance of the op amp.\n \nTo run the comparison execute the simulation and plot:\nV(Out)/V(In) \nfor the simple method\nand\n1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2)) \nfor the Tian method
* Library below included based on ModelFile attribute of instance XU1, XU2 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1001.asy)
V1 +V 0 15
Ii 0 x AC {u(prb)}
XU1 0 N002 +V -V N003 LT1001 ;pnba In+)In-)V+)V-)OUT
V5 -V 0 -15
C2 N001 Out 3p
R3 x N002 1K
XU2 0 In +V -V N001 LT1001 ;pnba In+)In-)V+)V-)OUT
R6 N001 Out 1K
C1 x N002 3p
R5 Out 0 1K
V2 In Out AC 1
R1 x 0 100
R4 N001 0 100
R2 N002 0 1K
Vi x N003 AC {u(-prb)}
.ac dec 30 .1 100Meg
.step param prb list -1 1 ; set prb=0 to turn off probe
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2168 1348
WIRE -64 1168 -64 1152
WIRE -64 1264 -64 1248
WIRE 48 1168 48 1152
WIRE 48 1264 48 1248
WIRE 80 1104 80 912
WIRE 96 688 96 496
WIRE 128 912 80 912
WIRE 128 928 128 912
WIRE 128 1024 128 1008
WIRE 144 496 96 496
WIRE 144 512 144 496
WIRE 144 608 144 592
WIRE 160 496 144 496
WIRE 176 496 160 496
WIRE 256 496 240 496
WIRE 256 1104 80 1104
WIRE 256 1104 256 1024
WIRE 272 496 256 496
WIRE 272 688 96 688
WIRE 272 688 272 608
WIRE 272 912 128 912
WIRE 272 944 240 944
WIRE 288 496 272 496
WIRE 288 528 256 528
WIRE 288 1104 256 1104
WIRE 304 688 272 688
WIRE 304 896 304 880
WIRE 304 976 304 960
WIRE 320 480 320 464
WIRE 320 560 320 544
WIRE 352 1024 256 1024
WIRE 368 608 272 608
WIRE 448 1024 416 1024
WIRE 448 1104 368 1104
WIRE 448 1104 448 1024
WIRE 464 608 432 608
WIRE 464 688 384 688
WIRE 464 688 464 608
WIRE 544 928 336 928
WIRE 832 928 624 928
WIRE 832 944 832 928
WIRE 832 1040 832 1024
WIRE 1104 928 832 928
WIRE 1104 976 1104 928
WIRE 1104 1104 448 1104
WIRE 1104 1104 1104 976
WIRE 1120 512 352 512
WIRE 1120 560 1120 512
WIRE 1120 688 464 688
WIRE 1120 688 1120 560
WIRE 1168 976 1104 976
WIRE 1168 992 1168 976
WIRE 1168 1088 1168 1072
WIRE 1184 560 1120 560
WIRE 1184 576 1184 560
WIRE 1184 672 1184 656
RECTANGLE Normal 1072 1072 496 800
SYMBOL res 384 1088 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R3
SYMATTR Value 1K
SYMBOL voltage 272 496 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 VBottom 0
WINDOW 123 -52 56 VBottom 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value ""
SYMATTR Value2 AC 1
SYMBOL voltage 640 928 M270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 VBottom 0
WINDOW 123 -32 56 VBottom 0
WINDOW 39 -32 56 VBottom 0
SYMATTR InstName Vi
SYMATTR Value ""
SYMATTR Value2 AC {u(-prb)}
SYMBOL res 1152 976 R0
SYMATTR InstName R1
SYMATTR Value 100
SYMBOL Opamps\\LT1001 304 864 R0
WINDOW 0 27 42 Left 0
WINDOW 3 25 87 Left 0
SYMATTR InstName U1
SYMBOL Opamps\\LT1001 320 448 R0
WINDOW 0 27 42 Left 0
WINDOW 3 25 87 Left 0
SYMATTR InstName U2
SYMBOL res 128 496 R0
SYMATTR InstName R5
SYMATTR Value 1K
SYMBOL cap 432 592 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C2
SYMATTR Value 3p
SYMBOL current 832 1024 M180
WINDOW 0 24 77 Left 0
WINDOW 3 24 0 Left 0
WINDOW 123 37 33 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName Ii
SYMATTR Value ""
SYMATTR Value2 AC {u(prb)}
SYMBOL res 1168 560 R0
SYMATTR InstName R4
SYMATTR Value 100
SYMBOL res 400 672 R90
WINDOW 0 0 56 VBottom 0
WINDOW 3 32 56 VTop 0
SYMATTR InstName R6
SYMATTR Value 1K
SYMBOL voltage 48 1152 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 15
SYMBOL res 112 912 R0
SYMATTR InstName R2
SYMATTR Value 1K
SYMBOL cap 416 1008 R90
WINDOW 0 0 32 VBottom 0
WINDOW 3 32 32 VTop 0
SYMATTR InstName C1
SYMATTR Value 3p
SYMBOL voltage -64 1152 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V5
SYMATTR Value -15
FLAG 48 1264 0
FLAG 240 944 0
FLAG 128 1024 0
FLAG 1168 1088 0
FLAG 304 880 +V
FLAG 48 1152 +V
FLAG -64 1264 0
FLAG -64 1152 -V
FLAG 304 976 -V
FLAG 832 1040 0
FLAG 832 928 x
FLAG 256 528 0
FLAG 144 608 0
FLAG 1184 672 0
FLAG 320 464 +V
FLAG 320 560 -V
FLAG 272 496 In
FLAG 160 496 Out
TEXT 518 1166 Left 0 !.ac dec 30 .1 100Meg
TEXT -168 1336 Left 0 ;This example schematic is supplied for informational/educational purposes only.
TEXT 152 1208 Left 0 ;[1] Michael Tian, V. Visvanathan, Jeffrey Hantgan, and Kenneth Kundert,\n    "Striving for Small-Signal Stability", IEEE Circuits and Devices Magazine,\n     vol. 17, no. 1, pp. 31-41, January 2001.
TEXT 520 1136 Left 0 !.step param prb list -1 1 ; set prb=0 to turn off probe
TEXT 616 824 Left 0 ;Probe elements added to  inject\nsignals to measure the open loop\nresponse from the closed loop system
TEXT -168 1312 Left 0 ;This example is based on posts contributed by Frank Wiedmann to the independent users' group at http://groups.yahoo.com/group/LTspice
TEXT 96 72 Left 0 ;Simple Method to calculate Open Loop Gain from Closed Loop System\n \nIf your circuit has a point with a high input impedance at all frequencies of interest\nThen you can add an AC source before that point to inject a disturbance.\n \nMost Op amp inputs will do or perhaps the input to voltage scaling resistors \nin the feedback path of a power supply.\n \nI include the Tian method as explained in the file Loopgain2.asc for comparison.\nThe Tian method compensates for any input impedance effects but in the example below the\nsimple approach is accurate up to 40MHz because of the high input impedance of the op amp.\n \nTo run the comparison execute the simulation and plot:\nV(Out)/V(In)       \nfor the simple method\nand\n1/(1-1/(2*(I(Vi)@1*V(x)@2-V(x)@1*I(Vi)@2)+V(x)@1+I(Vi)@2))    \nfor the Tian method