* SPICE netlist
Ia N002 0 SINE(0 550u 1.5meg)
Ib N006 0 SINE(0 575u 1.5meg)
C1 N002 0 470p
R2 Va N001 16.9k
R3 N001 N002 453
R4 Vb N005 16.9k
R5 N005 N006 453
R6 N003 Va 2k
R7 N004 Vb 2k
R8 Vpos N003 4.53k
R9 0 N004 4.53k
C2 Va N001 330p
C3 0 N006 470p
C4 N005 Vb 330p
C5 N003 Vpos 1.2n
C6 N004 0 1.2n
C7 N009 N008 10n
XU3 0 N001 Vp Vm Va LT1013 ;pnba In+)In-)V+)V-)OUT
V1 Vp 0 15
V2 Vm 0 -15
XU1 0 N005 Vp Vm Vb LT1013 ;pnba In+)In-)V+)V-)OUT
XU2 N004 N003 Vp Vm Vpos LT1013 ;pnba In+)In-)V+)V-)OUT
XU5 0 N008 Vp Vm N009 LT1013 ;pnba In+)In-)V+)V-)OUT
R10 Vp10 N011 {(1-R13set)*R13}
R11 N011 Vm10 {R13set*R13}
R12 N008 N011 49.9k
R13 Va N008 10k
R14 N007 N008 200k
R15 Vb N007 {(1-R77set)*R77}
R16 N007 Va {R77set*R77}
R17 Vb N008 10k
R18 N008 Vm10 5.49k
D1 N008 N009 1N4148
Q1 Vp N009 N010 0 2N5769
R19 N010 AGC_out 10
V3 Vp10 0 10
V4 Vm10 0 -10
R20 N010 N009 150
.param R13=20k
.param R13set=0.5
.param R77=10k
.param R77set=0.5

* LTspice schematic (.asc)
Version 4
SHEET 1 1488 1792
WIRE -488 -864 -488 -896
WIRE -376 -864 -376 -896
WIRE -696 -848 -696 -880
WIRE -584 -848 -584 -880
WIRE -488 -752 -488 -784
WIRE -424 -752 -488 -752
WIRE -376 -752 -376 -784
WIRE -376 -752 -424 -752
WIRE -696 -736 -696 -768
WIRE -632 -736 -696 -736
WIRE -584 -736 -584 -768
WIRE -584 -736 -632 -736
WIRE -424 -736 -424 -752
WIRE -632 -720 -632 -736
WIRE -120 -688 -152 -688
WIRE 24 -688 -56 -688
WIRE -152 -608 -152 -688
WIRE -120 -608 -152 -608
WIRE 24 -608 24 -688
WIRE 24 -608 -40 -608
WIRE -88 -512 -88 -528
WIRE -296 -496 -360 -496
WIRE -264 -496 -296 -496
WIRE -152 -496 -152 -608
WIRE -152 -496 -184 -496
WIRE -120 -496 -152 -496
WIRE 488 -496 408 -496
WIRE 680 -496 552 -496
WIRE 24 -480 24 -608
WIRE 24 -480 -56 -480
WIRE 136 -480 24 -480
WIRE 264 -480 136 -480
WIRE 280 -480 264 -480
WIRE -120 -464 -136 -464
WIRE -296 -448 -296 -496
WIRE -136 -432 -136 -464
WIRE -88 -432 -88 -448
WIRE 408 -416 408 -496
WIRE 488 -416 408 -416
WIRE 680 -416 680 -496
WIRE 680 -416 568 -416
WIRE -296 -352 -296 -384
WIRE 136 -320 136 -480
WIRE 232 -320 136 -320
WIRE 408 -320 408 -416
WIRE 408 -320 312 -320
WIRE 536 -304 536 -320
WIRE 408 -288 408 -320
WIRE 504 -288 408 -288
WIRE 680 -272 680 -416
WIRE 680 -272 568 -272
WIRE 728 -272 680 -272
WIRE 744 -272 728 -272
WIRE 472 -256 408 -256
WIRE 504 -256 472 -256
WIRE -136 -240 -168 -240
WIRE 24 -240 -72 -240
WIRE 248 -224 136 -224
WIRE 408 -224 408 -256
WIRE 408 -224 328 -224
WIRE 536 -224 536 -240
WIRE 472 -192 472 -256
WIRE 408 -176 408 -224
WIRE -168 -144 -168 -240
WIRE -136 -144 -168 -144
WIRE 24 -144 24 -240
WIRE 24 -144 -56 -144
WIRE 408 -64 408 -112
WIRE 472 -64 472 -112
WIRE -88 -48 -88 -64
WIRE -424 -32 -440 -32
WIRE -280 -32 -344 -32
WIRE -264 -32 -280 -32
WIRE -168 -32 -168 -144
WIRE -168 -32 -184 -32
WIRE -120 -32 -168 -32
WIRE 24 -16 24 -144
WIRE 24 -16 -56 -16
WIRE 136 -16 136 -224
WIRE 136 -16 24 -16
WIRE 264 -16 136 -16
WIRE 280 -16 264 -16
WIRE -120 0 -136 0
WIRE -280 16 -280 -32
WIRE -136 32 -136 0
WIRE -88 32 -88 16
WIRE -280 112 -280 80
WIRE -424 304 -424 208
WIRE -360 304 -424 304
WIRE -248 304 -280 304
WIRE -216 304 -248 304
WIRE -72 304 -72 208
WIRE -72 304 -136 304
WIRE 152 304 40 304
WIRE 264 304 216 304
WIRE -424 368 -424 304
WIRE -248 368 -248 304
WIRE -72 368 -72 304
WIRE 40 384 40 304
WIRE 152 384 40 384
WIRE 264 384 264 304
WIRE 264 384 216 384
WIRE 376 464 376 384
WIRE 152 480 152 464
WIRE -424 496 -424 448
WIRE -248 496 -248 448
WIRE -248 496 -424 496
WIRE -72 496 -72 448
WIRE -72 496 -248 496
WIRE 40 496 40 384
WIRE 40 496 -72 496
WIRE 120 496 40 496
WIRE 232 512 184 512
WIRE 264 512 264 384
WIRE 264 512 232 512
WIRE 312 512 264 512
WIRE -568 528 -568 496
WIRE -72 528 -72 496
WIRE 120 528 88 528
WIRE -424 544 -424 496
WIRE 152 560 152 544
WIRE 88 576 88 528
WIRE 232 624 232 512
WIRE 248 624 232 624
WIRE 376 624 376 560
WIRE 376 624 328 624
WIRE -568 640 -568 608
WIRE -424 640 -424 624
WIRE -424 640 -568 640
WIRE -568 656 -568 640
WIRE -72 672 -72 608
WIRE -568 768 -568 736
WIRE -728 896 -744 896
WIRE -40 896 -728 896
WIRE 376 896 376 624
WIRE 376 896 40 896
FLAG -440 -496 0
FLAG -296 -352 0
FLAG -424 -736 0
FLAG -376 -896 Vm
FLAG -488 -896 Vp
FLAG -88 -528 Vp
FLAG -88 -432 Vm
FLAG -88 -64 Vp
FLAG -88 32 Vm
FLAG 536 -320 Vp
FLAG 536 -224 Vm
FLAG 152 464 Vp
FLAG 152 560 Vm
FLAG -136 -432 0
FLAG -136 32 0
FLAG 472 -64 0
FLAG 408 -64 0
FLAG -280 112 0
FLAG -440 -32 0
FLAG 264 -16 Vb
FLAG 264 -480 Va
FLAG -632 -720 0
FLAG -584 -880 Vm10
FLAG -696 -880 Vp10
FLAG -568 496 Vp10
FLAG -568 768 Vm10
FLAG -72 672 Vm10
FLAG 376 384 Vp
FLAG 88 576 0
FLAG -424 208 Va
FLAG -72 208 Vb
FLAG -728 896 AGC_out
FLAG 728 -272 Vpos
SYMBOL current -360 -496 R90
SYMATTR InstName Ia
SYMATTR Value SINE(0 550u 1.5meg)
SYMBOL current -344 -32 R90
SYMATTR InstName Ib
SYMATTR Value SINE(0 575u 1.5meg)
SYMBOL cap -312 -448 R0
SYMATTR InstName C1
SYMATTR Value 470p
SYMBOL res -24 -624 R90
SYMATTR InstName R2
SYMATTR Value 16.9k
SYMBOL res -168 -512 R90
SYMATTR InstName R3
SYMATTR Value 453
SYMBOL res -40 -160 R90
SYMATTR InstName R4
SYMATTR Value 16.9k
SYMBOL res -168 -48 R90
SYMATTR InstName R5
SYMATTR Value 453
SYMBOL res 328 -336 R90
SYMATTR InstName R6
SYMATTR Value 2k
SYMBOL res 344 -240 R90
SYMATTR InstName R7
SYMATTR Value 2k
SYMBOL res 584 -432 R90
SYMATTR InstName R8
SYMATTR Value 4.53k
SYMBOL res 456 -96 M180
SYMATTR InstName R9
SYMATTR Value 4.53k
SYMBOL cap -56 -704 R90
SYMATTR InstName C2
SYMATTR Value 330p
SYMBOL cap -264 80 R180
SYMATTR InstName C3
SYMATTR Value 470p
SYMBOL cap -136 -224 R270
SYMATTR InstName C4
SYMATTR Value 330p
SYMBOL cap 488 -480 R270
SYMATTR InstName C5
SYMATTR Value 1.2n
SYMBOL cap 392 -176 R0
SYMATTR InstName C6
SYMATTR Value 1.2n
SYMBOL cap 216 368 R90
SYMATTR InstName C7
SYMATTR Value 10n
SYMBOL Opamps\\LT1014 -88 -544 R0
SYMATTR InstName U3
SYMBOL voltage -488 -880 R0
SYMATTR InstName V1
SYMATTR Value 15
SYMBOL voltage -376 -880 R0
SYMATTR InstName V2
SYMATTR Value -15
SYMBOL Opamps\\LT1014 -88 -80 R0
SYMATTR InstName U1
SYMBOL Opamps\\LT1014 536 -336 R0
SYMATTR InstName U2
SYMBOL Opamps\\LT1014 152 448 R0
SYMATTR InstName U5
SYMBOL res -552 512 M0
SYMATTR InstName R10
SYMATTR Value {(1-R13set)*R13}
SYMBOL res -552 640 M0
SYMATTR InstName R11
SYMATTR Value {R13set*R13}
SYMBOL res -440 528 R0
SYMATTR InstName R12
SYMATTR Value 49.9k
SYMBOL res -440 352 R0
SYMATTR InstName R13
SYMATTR Value 10k
SYMBOL res -264 352 R0
SYMATTR InstName R14
SYMATTR Value 200k
SYMBOL res -120 320 M270
SYMATTR InstName R15
SYMATTR Value {(1-R77set)*R77}
SYMBOL res -264 320 M270
SYMATTR InstName R16
SYMATTR Value {R77set*R77}
SYMBOL res -88 352 R0
SYMATTR InstName R17
SYMATTR Value 10k
SYMBOL res -88 512 R0
SYMATTR InstName R18
SYMATTR Value 5.49k
SYMBOL diode 152 320 R270
SYMATTR InstName D1
SYMATTR Value 1N4148
SYMBOL npn 312 464 R0
SYMATTR InstName Q1
SYMATTR Value 2N5769
SYMBOL res 56 880 R90
SYMATTR InstName R19
SYMATTR Value 10
SYMBOL voltage -696 -864 R0
SYMATTR InstName V3
SYMATTR Value 10
SYMBOL voltage -584 -864 R0
SYMATTR InstName V4
SYMATTR Value -10
SYMBOL res 344 608 R90
SYMATTR InstName R20
SYMATTR Value 150