* Z:\home\khalils\Downloads\files\data\raw_asc\1b7e4204a5d9_CompMod.asc
* Generated by LTspice 26.0.1 for Windows.
* Small-Signal Model
* Nonlinear\nAveraged Model
* bjs
* slope comp
;tran 1m uic
;op
Ry cmn2 0 {Ry}
V2 act 0 {Vin}
V6 act2 0 {Vin}
B3 0 cmn I=V(vc)/Rs - (V(act)-V(0))*V(duty)*(1-V(duty))*Ts/(2*L)
Rx cmn2 0 {Rx}
B44 0 cmn2 I=v(vc1)/Rs
B6 duty3 duty2 V=-v(act2)*Vout/(Vin*Vin)
L1 N003 N004 {L} Rser=0
V8 test2 0 {Ry}
B7 act2 0 I=i(v1)*D
V5 N002 0 {Vout}
V4 vc1 0 {Vc} AC 1
B9 X 0 V=v(cmn2)/Vin-v(act2)*Vout/(Vin*Vin)
V1 cmn2 N001 0
V7 test1 0 {Icmn2}
L2 N001 N002 {L} Rser=0
B11 Y 0 V=(V(cmn)-V(0))/(V(act)-V(0))
B2 act 0 I=i(v9)*v(duty)
B4 duty2 0 V=v(cmn2)/Vin
B1 duty 0 V=(V(cmn)-V(0))/(V(act)-V(0)+1u)
B10 0 cmn2 I=(gm1+gm2)*v(act2)
V9 cmn N003 0
B5 vc1 vc V=Vramp*v(duty)
V3 N004 0 {Vout}
B8 act2 0 I=v(duty3)*Icmn2
.param Rs=0.1 L=1.5u Ts=5u
.nodeset v(cmn)=2.5
.ac dec 25 1 10meg
.param Vin=10 Vout=2.5 Vramp=1u D=Vout/Vin
.param Vc=0.5
.param Rx=1/((1-2*Vout/Vin)*Ts/(2*L))
.param Ry=Rs*Vin/Vramp
.param gm1=-D*D*Ts/(2*L)
.param gm2=Vout*Vramp/(Vin*Vin*Rs)
.param Icmn2=Vc/Rs - Vout*(1-Vout/Vin)*Ts/(2*L) - Vramp*D/Rs
.step param Vin list 10 8 6 4
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3060 1048
WIRE 96 -208 96 -240
WIRE 96 -48 96 -128
WIRE 96 128 96 80
WIRE 96 272 96 208
WIRE 128 448 128 400
WIRE 128 592 128 528
WIRE 176 400 128 400
WIRE 208 -48 96 -48
WIRE 208 -16 208 -48
WIRE 208 272 96 272
WIRE 208 304 208 272
WIRE 240 400 176 400
WIRE 272 -240 96 -240
WIRE 272 -176 272 -240
WIRE 272 -48 208 -48
WIRE 272 -48 272 -96
WIRE 288 272 208 272
WIRE 336 80 96 80
WIRE 352 80 336 80
WIRE 352 128 352 80
WIRE 352 272 288 272
WIRE 352 272 352 208
WIRE 368 -240 272 -240
WIRE 384 400 320 400
WIRE 416 -240 368 -240
WIRE 416 -208 416 -240
WIRE 416 -48 272 -48
WIRE 416 -48 416 -128
WIRE 416 400 384 400
WIRE 464 464 464 416
WIRE 464 608 464 544
WIRE 560 -208 560 -240
WIRE 560 -48 416 -48
WIRE 560 -48 560 -128
WIRE 560 128 560 80
WIRE 560 272 352 272
WIRE 560 272 560 208
WIRE 608 80 560 80
WIRE 624 464 624 416
WIRE 624 608 624 544
WIRE 688 -240 560 -240
WIRE 768 -240 688 -240
WIRE 768 -192 768 -240
WIRE 768 -48 560 -48
WIRE 768 -48 768 -112
WIRE 784 80 608 80
WIRE 800 464 800 416
WIRE 800 608 800 544
WIRE 864 416 800 416
WIRE 880 -240 768 -240
WIRE 880 -192 880 -240
WIRE 880 -48 768 -48
WIRE 880 -48 880 -112
WIRE 944 80 864 80
WIRE 992 416 864 416
WIRE 992 608 992 416
WIRE 1008 -240 880 -240
WIRE 1008 -192 1008 -240
WIRE 1008 -48 880 -48
WIRE 1008 -48 1008 -112
WIRE 1056 464 1056 416
WIRE 1056 608 992 608
WIRE 1056 608 1056 544
WIRE 1072 -240 1008 -240
WIRE 1120 416 1056 416
WIRE 1168 416 1120 416
WIRE 1216 -240 1152 -240
WIRE 1248 80 1024 80
WIRE 1248 128 1248 80
WIRE 1248 272 560 272
WIRE 1248 272 1248 208
WIRE 1312 464 1312 416
WIRE 1312 608 1312 544
WIRE 1360 -240 1296 -240
WIRE 1360 -192 1360 -240
WIRE 1360 -48 1008 -48
WIRE 1360 -48 1360 -112
WIRE 1376 416 1312 416
WIRE 1392 96 1392 48
WIRE 1392 240 1392 176
WIRE 1424 416 1376 416
WIRE 1440 48 1392 48
WIRE 1472 48 1440 48
WIRE 1568 96 1568 48
WIRE 1568 240 1568 176
WIRE 1616 48 1568 48
WIRE 1648 48 1616 48
SYMBOL voltage 128 432 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR Value2 AC 1
SYMATTR InstName V4
SYMATTR Value {Vc}
SYMBOL voltage 1056 -240 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 VBottom 0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL battery 96 -224 R0
WINDOW 123 21 130 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V6
SYMATTR Value {Vin}
SYMBOL ind 1200 -224 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L2
SYMATTR Value {L}
SYMATTR SpiceLine Rser=0
SYMBOL battery 1392 80 R0
SYMATTR InstName V7
SYMATTR Value {Icmn2}
SYMBOL battery 96 112 R0
WINDOW 123 24 132 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value {Vin}
SYMBOL bv 624 448 R0
WINDOW 3 93 -155 VRight 0
SYMATTR InstName B11
SYMATTR Value V=(v(cmn)-v(pas))/(v(act)-v(pas))
SYMBOL res 752 -208 R0
SYMATTR InstName Rx
SYMATTR Value {Rx}
SYMBOL bv 800 448 R0
WINDOW 3 16 108 Left 0
SYMATTR InstName B4
SYMATTR Value V=v(cmn2)/Vin
SYMBOL bv 1056 448 R0
WINDOW 3 140 -55 VRight 0
SYMATTR InstName B6
SYMATTR Value V=-v(act2)*Vout/(Vin*Vin)
SYMBOL bi 416 -208 R0
SYMATTR InstName B7
SYMATTR Value I=i(v1)*D
SYMBOL bi 272 -176 R0
SYMATTR InstName B8
SYMATTR Value I=v(duty3)*Icmn2
SYMBOL battery 1248 112 R0
SYMATTR InstName V3
SYMATTR Value {Vout}
SYMBOL bv 1312 448 R0
WINDOW 3 159 -166 VRight 0
SYMATTR InstName B1
SYMATTR Value V=(v(cmn)-v(pas))/(v(act)-v(pas)+1u)
SYMBOL bi2 1008 -192 R0
SYMATTR InstName B10
SYMATTR Value I=(gm1+gm2)*v(act2)
SYMBOL bi 352 128 R0
SYMATTR InstName B2
SYMATTR Value I=i(v9)*v(duty)
SYMBOL res 864 -208 R0
SYMATTR InstName Ry
SYMATTR Value {Ry}
SYMBOL bv 224 400 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 VBottom 0
SYMATTR InstName B5
SYMATTR Value V=Vramp*v(duty)
SYMBOL bi2 560 -208 R0
SYMATTR InstName B44
SYMATTR Value I=v(vc1)/Rs
SYMBOL bv 464 448 R0
WINDOW 3 74 -168 VRight 0
SYMATTR InstName B9
SYMATTR Value V=v(cmn2)/Vin-v(act2)*Vout/(Vin*Vin)
SYMBOL voltage 768 80 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 -32 56 VBottom 0
SYMATTR InstName V9
SYMATTR Value 0
SYMBOL battery 1568 80 R0
SYMATTR InstName V8
SYMATTR Value {Ry}
SYMBOL ind 928 96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 5 56 VBottom 0
SYMATTR InstName L1
SYMATTR Value {L}
SYMATTR SpiceLine Rser=0
SYMBOL battery 1360 -208 R0
SYMATTR InstName V5
SYMATTR Value {Vout}
SYMBOL bi2 560 128 R0
SYMATTR InstName B3
SYMATTR Value I=v(vc)/Rs - (v(act)-v(pas))*v(duty)*(1-v(duty))*Ts/(2*L)
FLAG 336 80 act
FLAG 608 80 cmn
FLAG 288 272 pas
FLAG 1312 608 0
FLAG 1376 416 duty
FLAG 208 304 0
FLAG 128 592 0
FLAG 384 400 vc
FLAG 688 -240 cmn2
FLAG 176 400 vc1
FLAG 208 -16 0
FLAG 800 608 0
FLAG 864 416 duty2
FLAG 1120 416 duty3
FLAG 368 -240 act2
FLAG 1392 240 0
FLAG 1440 48 test1
FLAG 1568 240 0
FLAG 1616 48 test2
FLAG 464 608 0
FLAG 464 416 X
FLAG 624 608 0
FLAG 624 416 Y
TEXT 88 -432 Left 0 !.param Rs=0.1 L=1.5u Ts=5u
TEXT 798 -420 Left 0 !;tran 1m uic
TEXT 800 -392 Left 0 !;op
TEXT 792 -368 Left 0 !.nodeset v(cmn)=2.5
TEXT 792 -344 Left 0 !.ac dec 25 1 10meg
TEXT 88 -264 Left 0 ;Small-Signal Model
TEXT 96 32 Left 0 ;Nonlinear\nAveraged Model
TEXT 88 -456 Left 0 !.param Vin=10 Vout=2.5 Vramp=1u D=Vout/Vin
TEXT 88 -408 Left 0 !.param Vc=0.5
TEXT 88 -384 Left 0 !.param Rx=1/((1-2*Vout/Vin)*Ts/(2*L))
TEXT 1224 408 Left 0 ;bjs
TEXT 88 -360 Left 0 !.param Ry=Rs*Vin/Vramp
TEXT 232 480 Left 0 ;slope comp
TEXT 88 -336 Left 0 !.param gm1=-D*D*Ts/(2*L)
TEXT 88 -312 Left 0 !.param gm2=Vout*Vramp/(Vin*Vin*Rs)
TEXT 88 -288 Left 0 !.param Icmn2=Vc/Rs - Vout*(1-Vout/Vin)*Ts/(2*L) - Vramp*D/Rs
TEXT 792 -320 Left 0 !.step param Vin list 10 8 6 4