* Z:\home\khalils\Downloads\files\data\raw_asc\1af6b7ed30b1_TransconErrorAmp.asc
* Generated by LTspice 26.0.1 for Windows.
G1 0 Vc ref_Av N002 { Gain }
V1 ref_Av 0 {Vref}
C1 Vc 0 {C_comp2}
C2 N003 0 {C_comp}
R1 Vc N003 {R_comp}
B1 Vc 0 I= if( V(Vc) > {Pos}, {alpha} * ( V(Vc) - {Pos} ), 0 )
B2 0 Vc I= if( V(Vc) < {Neg}, {alpha} * ( {Neg} - V(Vc) ), 0 )
R2 Vc 0 1000Meg
C3 N002 0 1p
R3 N002 N001 10k
E1 N001 0 Vi_lim 0 1
B3 Vi_lim 0 V= limit( V(Vi), {Neg}, {Pos} )
R4 Vi 0 10Meg
.param alpha = 5m
.param R_comp =1k
.param C_comp = 1n
.param C_comp2 = 1p
* B1
* B2
* Drawn : Mark Dimattina
* Title : Transconductance Error Amp
* Rev: 0.04
* Date: 25/07/2017
* M.J.Dimattina@ieee.org
.param Pos = 4
.param Neg = 0
.param Vref = 2.5
.param Gain = 135u
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 1752 1300
WIRE -560 192 -608 192
WIRE -336 192 -416 192
WIRE -224 192 -336 192
WIRE -96 192 -176 192
WIRE 48 192 -16 192
WIRE 208 192 48 192
WIRE 48 208 48 192
WIRE -560 224 -560 192
WIRE -176 224 -176 192
WIRE -416 240 -416 192
WIRE -224 240 -224 192
WIRE 256 304 256 256
WIRE -224 320 -224 288
WIRE -176 320 -176 304
WIRE 48 320 48 272
WIRE 208 320 208 192
WIRE -560 336 -560 304
WIRE -416 352 -416 320
WIRE 128 368 48 368
WIRE 208 368 128 368
WIRE 576 384 576 368
WIRE 48 432 48 368
WIRE 256 512 256 384
WIRE 320 512 256 512
WIRE 464 512 320 512
WIRE 576 512 576 464
WIRE 576 512 464 512
WIRE 640 512 576 512
WIRE 736 512 640 512
WIRE 320 544 320 512
WIRE 640 544 640 512
WIRE 48 560 48 512
WIRE 256 560 256 512
WIRE 464 560 464 512
WIRE 320 640 320 624
WIRE 640 640 640 624
WIRE 464 704 464 640
WIRE 256 736 256 624
WIRE 320 736 320 704
FLAG 48 560 0
FLAG 256 256 0
FLAG 256 736 0
FLAG 320 736 0
FLAG 128 368 ref_Av
FLAG -608 192 Vi
IOPIN -608 192 In
FLAG 736 512 Vc
IOPIN 736 512 Out
FLAG 640 640 0
FLAG 576 368 0
FLAG 464 704 0
FLAG -176 320 0
FLAG -224 320 0
FLAG 48 320 0
FLAG -416 352 0
FLAG -336 192 Vi_lim
FLAG -560 336 0
SYMBOL g 256 400 M180
WINDOW 3 42 63 Left 2
SYMATTR Value { Gain }
SYMATTR InstName G1
SYMBOL voltage 48 416 R0
SYMATTR InstName V1
SYMATTR Value {Vref}
SYMBOL cap 240 560 R0
WINDOW 3 -129 37 Left 2
WINDOW 0 -119 8 Left 2
SYMATTR Value {C_comp2}
SYMATTR InstName C1
SYMBOL cap 304 640 R0
SYMATTR InstName C2
SYMATTR Value {C_comp}
SYMBOL res 304 528 R0
SYMATTR InstName R1
SYMATTR Value {R_comp}
SYMBOL bi 640 544 R0
WINDOW 3 -927 -480 Left 2
WINDOW 0 45 44 Left 2
SYMATTR Value I= if( V(Vc)  > {Pos}, {alpha} * ( V(Vc) -  {Pos} ), 0 )
SYMATTR InstName B1
SYMBOL bi 576 384 R0
WINDOW 0 -68 36 Left 2
WINDOW 3 -862 -352 Left 2
SYMATTR InstName B2
SYMATTR Value I= if( V(Vc)  < {Neg}, {alpha} * (  {Neg} - V(Vc)  ), 0 )
SYMBOL res 448 544 R0
SYMATTR InstName R2
SYMATTR Value 1000Meg
SYMBOL cap 32 208 R0
SYMATTR InstName C3
SYMATTR Value 1p
SYMBOL res 0 176 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R3
SYMATTR Value 10k
SYMBOL e -176 208 R0
SYMATTR InstName E1
SYMATTR Value 1
SYMBOL bv -416 224 R0
WINDOW 3 -30 181 Left 2
SYMATTR Value V= limit(  V(Vi), {Neg}, {Pos}  )
SYMATTR InstName B3
SYMBOL res -576 208 R0
SYMATTR InstName R4
SYMATTR Value 10Meg
TEXT -328 -8 Left 2 !.param alpha = 5m
TEXT 816 240 Left 2 !.param R_comp =1k
TEXT 816 208 Left 2 !.param C_comp = 1n
TEXT 816 176 Left 2 !.param C_comp2 = 1p
TEXT -328 64 Left 2 ;B1
TEXT -328 32 Left 2 ;B2
TEXT 808 1112 Left 2 ;Drawn : Mark Dimattina
TEXT 808 1064 Left 4 ;Title : Transconductance Error Amp
TEXT 808 1176 Left 2 ;Rev: 0.04
TEXT 808 1144 Left 2 ;Date: 25/07/2017
TEXT 808 1208 Left 2 ;M.J.Dimattina@ieee.org
TEXT 816 80 Left 2 !.param Pos = 4
TEXT 816 112 Left 2 !.param Neg = 0
TEXT 816 48 Left 2 !.param Vref = 2.5
TEXT 816 144 Left 2 !.param Gain = 135u
RECTANGLE Normal 1504 1296 -768 -144 2