PAK402-Cct-PP-CC-wingspread LTspice .asc code

Version 4
SHEET 1 4584 1152
WIRE 560 -336 144 -336
WIRE 144 -320 144 -336
WIRE 560 -320 560 -336
WIRE 80 -272 -64 -272
WIRE -64 -256 -64 -272
WIRE -1152 -224 -1184 -224
WIRE -1040 -224 -1072 -224
WIRE -912 -224 -976 -224
WIRE -784 -224 -832 -224
WIRE -752 -224 -784 -224
WIRE 208 -224 144 -224
WIRE 352 -224 288 -224
WIRE 368 -224 352 -224
WIRE -528 -208 -544 -208
WIRE -544 -192 -544 -208
WIRE -64 -176 -112 -176
WIRE 352 -176 352 -224
WIRE 432 -176 352 -176
WIRE 560 -176 560 -240
WIRE 560 -176 512 -176
WIRE 608 -176 560 -176
WIRE -1184 -160 -1184 -224
WIRE -1184 -160 -1200 -160
WIRE -784 -160 -784 -224
WIRE -768 -160 -784 -160
WIRE 608 -160 608 -176
WIRE 208 -128 144 -128
WIRE 352 -128 352 -176
WIRE 352 -128 288 -128
WIRE 560 -112 560 -176
WIRE -1184 -96 -1184 -160
WIRE -1152 -96 -1184 -96
WIRE -1040 -96 -1072 -96
WIRE -912 -96 -976 -96
WIRE -784 -96 -784 -160
WIRE -784 -96 -832 -96
WIRE -544 -96 -544 -112
WIRE -64 -80 -64 -96
WIRE 80 -80 -64 -80
WIRE 144 -16 144 -32
WIRE 560 -16 560 -32
WIRE 560 -16 144 -16
WIRE -112 400 -1216 400
WIRE -272 592 -352 592
WIRE -96 592 -272 592
WIRE -352 608 -352 592
WIRE -272 608 -272 592
WIRE -1232 880 -1232 416
WIRE -112 896 -1216 896
WIRE -1232 1024 -1232 912
WIRE -96 1040 -1216 1040
FLAG -688 -160 0
FLAG -1200 -160 in
IOPIN -1200 -160 In
FLAG 608 -160 0
FLAG -112 -176 in
IOPIN -112 -176 In
FLAG -544 -96 0
FLAG -528 -208 in
IOPIN -528 -208 Out
FLAG -1232 912 0
FLAG -1216 400 0
FLAG -1232 416 0
FLAG -112 896 0
FLAG -1232 1024 0
FLAG -1232 880 0
FLAG -1216 1040 0
FLAG -96 1040 0
FLAG -1216 896 0
FLAG -1184 544 0
FLAG -1184 464 0
FLAG -1136 592 0
FLAG -1136 512 0
FLAG -1088 640 0
FLAG -1088 560 0
FLAG -1040 688 0
FLAG -1040 608 0
FLAG -992 736 0
FLAG -992 656 0
FLAG -944 784 0
FLAG -944 704 0
FLAG -896 832 0
FLAG -896 752 0
FLAG -112 400 0
FLAG -496 544 0
FLAG -496 464 0
FLAG -448 592 0
FLAG -448 512 0
FLAG -400 640 0
FLAG -400 560 0
FLAG -352 688 0
FLAG 368 -224 out1
IOPIN 368 -224 Out
FLAG -752 -224 out2
IOPIN -752 -224 Out
FLAG -96 592 out3
IOPIN -96 592 Out
FLAG -272 688 0
FLAG -848 880 0
FLAG -848 800 0
SYMBOL res -816 -112 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName Rs2
SYMATTR Value {Re2}
SYMBOL diode -1040 -240 M90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D1
SYMATTR Value Dn
SYMBOL voltage -1056 -224 M270
WINDOW 0 45 72 VLeft 2
WINDOW 3 -45 42 VCenter 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName V1
SYMATTR Value {VbD1}
SYMBOL voltage -1168 -96 R270
WINDOW 3 -43 59 VCenter 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 47 43 VRight 2
SYMATTR Value {VbD2}
SYMATTR InstName V2
SYMBOL diode -976 -80 M270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D2
SYMATTR Value Dp
SYMBOL res -928 -208 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName Rs1
SYMATTR Value {Re1}
SYMBOL res 304 -144 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName Re2
SYMATTR Value {Re2}
SYMBOL res 192 -208 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName Re1
SYMATTR Value {Re1}
SYMBOL res 416 -160 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName RL1
SYMATTR Value {RL}
SYMBOL pnp2 80 -32 M180
WINDOW 0 69 32 Left 2
WINDOW 3 65 66 Left 2
SYMATTR InstName Q2
SYMBOL npn2 80 -320 R0
SYMATTR InstName Q1
SYMBOL voltage 560 -336 R0
SYMATTR InstName V13
SYMATTR Value {Vrail}
SYMBOL voltage 560 -128 R0
SYMATTR InstName V14
SYMATTR Value {Vrail}
SYMBOL voltage -64 -272 R0
WINDOW 0 32 37 Left 2
WINDOW 3 29 75 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
SYMATTR InstName Vb1
SYMATTR Value {VbQ1}
SYMBOL voltage -64 -192 R0
WINDOW 3 34 73 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 34 35 Left 2
SYMATTR Value {VbQ2}
SYMATTR InstName Vb2
SYMBOL voltage -544 -208 R0
WINDOW 3 27 94 Left 2
WINDOW 123 -58 -191 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 31 40 Left 2
SYMATTR Value PULSE({-Vin} {Vin} 0 {2*Vin} 1u)
SYMATTR InstName Vin1
SYMBOL bi -1184 464 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=Wex((V(in,out2)+VbD1-VkQ1)/Vt)
SYMATTR InstName B1
SYMBOL bi -1136 512 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=Wex((-V(in,out2)+VbD2-VkQ2)/Vt)
SYMATTR InstName B2
SYMBOL bi -1088 560 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=1/Re1*I(B1)/(1+I(B1)) ;GmQ1
SYMATTR InstName B3
SYMBOL bi -1040 608 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=1/Re2*I(B2)/(1+I(B2)) ;GmQ2
SYMATTR InstName B4
SYMBOL bi -992 656 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=I(B3)+I(B4) ;Tot GmOL
SYMATTR InstName B5
SYMBOL bi -944 704 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=I(B5)/(1+I(B5)*RL) ;GmCL
SYMATTR InstName B6
SYMBOL bi -896 752 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=VbQ1 ;VkQ1 ;Vt ;spare
SYMATTR InstName B7
SYMBOL bi -496 464 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=Vt/Re1*I(B1)  ;Ie1
SYMATTR InstName B11
SYMBOL bi -448 512 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=Vt/Re2*I(B2)  ;Ie2
SYMATTR InstName B12
SYMBOL bi -400 560 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=I(B11)-I(B12)  ;IL3
SYMATTR InstName B13
SYMBOL res -784 -144 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName RL2
SYMATTR Value {RL}
SYMBOL bv -352 592 R0
WINDOW 0 22 19 Left 2
WINDOW 3 98 18 Left 2
SYMATTR InstName B14
SYMATTR Value V=I(B13)*RL
SYMBOL res -288 592 R0
WINDOW 0 32 52 Left 2
SYMATTR InstName RL3
SYMATTR Value 1G
SYMBOL bi -848 800 R0
WINDOW 3 81 -1 Left 2
SYMATTR Value I=((V(in,out2)+VbD1-VkQ1)/Vt) ;Arg1
SYMATTR InstName B8
TEXT 40 -536 Right 1 ;(c) Ian Hegglun Feb 2024
TEXT 0 -568 Center 4 ;PAK402 Push-Pull CC Follower
TEXT -560 176 Left 2 !.model NPN NPN Is={ISn} BF={BetaN} ;VAF=0 VAR=0 ISE=0 Rb=0 Ikf=0 Re=0
TEXT -1248 -584 Left 2 !.options plotwinsize=0
TEXT -1248 -488 Left 2 !.param Re1=0.22  Re2=0.22
TEXT -1248 -552 Left 2 !;tran 0 {2*Vin} 0 {1m*Vin}
TEXT -1248 -456 Left 2 !.param Vin=20   Vrail=50    RL=8
TEXT -1248 -344 Left 2 !.param Kb= -0.188
TEXT -1248 176 Left 2 !.param VbD1=VkD1+Kb*Vt
TEXT -1248 -424 Left 2 !.param ISn=5e-12  ISp=5e-12
TEXT -1248 144 Left 2 !.param VkD2=Vt*Ln(Vt/(Isp*ISpTF*Req2)) -ISp*ISpTF*Req2
TEXT -1072 -160 Left 2 ;Diode equivalent circuit
TEXT -1248 48 Left 2 !.param  Req1=Re1 *BetaN/(BetaN+1)
TEXT -1208 880 Left 2 ;User Defined Functions
TEXT -616 424 Center 2 ;Equation for Ie1,Ie2 & Gm1,Gm2 and IL using (Vin-Vout) from SPICE
TEXT -992 -344 Left 2 !.Step param Kb List -8 -5 -3 -1 -0.18 1 3 5 8
TEXT -520 -48 Left 2 ;PULSE({-Vin} {Vin} 0 {2*Vin} 1u)
TEXT -520 -80 Left 2 ;SINE(0 {Vin} {freq})
TEXT -736 -584 Left 2 !.options numdgt=7 ;double precision
TEXT -736 -552 Left 2 !.param freq=1k
TEXT -736 -520 Left 2 ;.Four {freq} V(out2) V(out1)
TEXT -1248 -392 Left 2 !.param BetaN=10  BetaP=BetaN
TEXT -1248 112 Left 2 !.param VkD1=Vt*Ln(Vt/(ISn*ISnTF*Req1)) -ISn*ISnTF*Req1
TEXT -560 112 Left 2 !.model Dn D (IS={ISn*ISnTF} Rs=0 N=1 Tnom=Temp)\n.model Dp D (IS={ISp*ISpTF} Rs=0 N=1 Tnom=Temp)
TEXT -1240 240 Left 2 ;Cordell models
TEXT -560 208 Left 2 !.model PNP PNP Is={ISp}  BF={BetaP} ;VAF=0 VAR=0 ISE=0 Rb=0 Ikf=0 Re=0
TEXT -1248 272 Left 2 !.MODEL MJL3281Cordel npn IS=5e-12 BF=158 VAF=1000 IKF=50 ISE=2e-21 NE=1.5 NF=1 RB=3 RC=.1 CJE=11e-9 MJE=.35 VJE=.5 RE=0 CJC=1.2e-9 MJC=.5 VJC=.6 FC=.1 TF=2.7e-9\n+  XTF=7500 VTF=3  ITF=750 TR=100e-9 BR=5 VAR=4.3 NR=1.1 EG=1.1 XCJC=1 XTB=.12 XTI=1 NC=4 ISC=.3e-12 IKR=4.4 CJS=0 VJS=0.75 MJS=.5 PTF=0 KF=0 AF=1 mfg=CA041611
TEXT -1240 328 Left 2 !.MODEL MJL1302Cordel pnp IS=7e-12 BF=114 VAF=550 IKF=30 ISE=1e-7 NE=5 NF=1 RB=3.3 RC=.1 CJE=16e-9 MJE=.45 VJE=.8 RE=0 CJC=2.3e-9 MJC=.4 VJC=.3 FC=.1 TF=3e-9\n+ XTF=1000 VTF=2 ITF=150 TR=100e-9 BR=5 VAR=4.3 NR=1.1 EG=1.1 XCJC=1 XTB=.1 XTI=1 NC=4 ISC=.3e-12 IKR=4.5 CJS=0 VJS=.75 MJS=.5 PTF=0 KF=0 AF=1 mfg=CA041611
TEXT -1248 80 Left 2 !.param  Req2=Re2 *BetaP/(BetaP+1)
TEXT -1248 208 Left 2 !.param VbD2=VkD1+Kb*Vt
TEXT -736 -448 Left 2 !.Temp 27
TEXT -736 -416 Left 2 ;.Step Temp list 27 77
TEXT -736 -488 Left 2 ;.param Vt=0.0258642 ;at 27C
TEXT -560 16 Left 2 !.param Tnom=27  XTI=1.0  Eg=1.1
TEXT -560 48 Left 2 !.param ISnTF=((Temp+Tab)/(Tnom+Tab))**XTI *exp(Eg/Koq*(1/(Tnom+Tab)-1/(Temp+Tab))) ;Is(Temp) scale factor
TEXT -560 80 Left 2 !.param ISpTF=((Temp+Tab)/(Tnom+Tab))**XTI *exp(Eg/Koq*(1/(Tnom+Tab)-1/(Temp+Tab))) ;Is(Temp) scale factor
TEXT -1248 -16 Left 2 !.param Tab=273.15  Koq=8.6171e-5  ;Boltz/q
TEXT -1248 16 Left 2 !.param Vt=Koq*(Temp+Tab)
TEXT -1208 928 Left 2 !.function Le(X) { If(U(X-450), X, Ln(1+Exp(X))) } ;Unlimited Ln(1+e^X)
TEXT -1208 960 Left 2 !.function We1(X) {Le(X)*(1-ln(1+Le(X))/(2+Le(X)) )}  ;Unlimited W(e^X)) 2%
TEXT -1208 992 Left 2 !.function We2(X) {If(U(X+30), We1(X -Ln(1+We1(X)+ln(We1(X)) -X)), We1(X))} ;Unlimited 0.05%
TEXT -1208 1024 Left 2 !.function W1(X) {If(U(X+0.6),Ln(1+X)*(1-ln(1+Ln(1+X))/(2+Ln(1+X)) ),-1)} ;Unlimited W(x) 2%
TEXT -1208 1056 Left 2 !.function We(X) {(Le(X)*(1-ln(1+1.25*Le((X-1)/1.25))/(1.15+Le(X))))} ;New We1
TEXT -1208 1120 Left 2 !.function W(X) {If(U(X+0.6),Ln(1+X)*(1-ln(1+1.25*Ln(1+0.45*X**0.8))/(1.15+Ln(1+X))),-1)} ;New W(x)
TEXT -1208 1088 Left 2 !.function Wex(X) {If(U(X+30),We(X-Ln(1+We(X)+ln(We(X))-X)),We1(X))} ;New We2
TEXT -1248 -520 Left 2 !.dc Vin1 {-Vin} {Vin} {1m*Vin}
TEXT -880 -384 Left 2 ;.Step param BetaN List 1 10 100 10k
TEXT -288 -480 Left 2 !.param VkQ1=Vt*Ln(Vt/(ISn*ISnTF*Re1)) -ISn*ISnTF*Re1
TEXT -288 -448 Left 2 !.param VkQ2=Vt*Ln(Vt/(Isp*ISpTF*Re2)) -ISp*ISpTF*Re2
TEXT -288 -416 Left 2 !.param VbQ1=VkQ1+Kb*Vt
TEXT -288 -384 Left 2 !.param VbQ2=VkQ2+Kb*Vt
LINE Normal 304 -208 304 -208 2
RECTANGLE Normal -1024 -320 -1248 -368 2