* Z:\home\khalils\Downloads\files\data\raw_asc\3e66c4803c28_IdealBoost.asc
* Generated by LTspice 26.0.1 for Windows.
* TransconErrorAmp
* Drawn : Mark Dimattina
* Title : IdealBoost
* Rev: 0.04
* Date: 25/07/2017
* M.J.Dimattina@ieee.org
A1 set trip_reset 0 0 0 q_bar q 0 SRFLOP
A2 0 reset 0 trip2 0 0 trip_reset 0 OR
H2 N002 0 V5 1
V6 On_time_ramp 0 PULSE(0 {1} 0 {Period - 2*Trise_fall} {Trise_fall} {Trise_fall} {Period})
B6 On_time 0 V=if( V(q) > 0.5, V(On_time_ramp), 0 )
R2 N004 p R=V(Rdiode)
C7 I_out 0 10n
C2 I_sense 0 100p
H1 N001 0 V1 1
B4 Rdiode 0 V= if( V(Sw) > V(p), 10m, 100k )
V3 reset 0 PULSE(0 1 {Ton_max} {Trise_fall} {Trise_fall} {Trise_fall} {Period} )
B3 FET_R 0 V=if( V(q) > 0.5, {Rfet}, 1meg )
R10 I_out N003 1000
R8 N003 N002 100
V1 c Sw 0
V4 ramp 0 PULSE(0 {slopeAmp} 0 {Period - 2*Trise_fall} {Trise_fall} {Trise_fall} {Period})
R11 trip N005 100
B5 trip2 0 V= V(trip) - V(set)
B2 N005 0 V=if( V(sense_slope) > V(Vc), 1, 0)
B1 sense_slope 0 V={Ri}*V(I_sense) + V(ramp)
C8 trip 0 10p
C5 N003 0 100n
R5 I_sense N001 100
V5 Sw N004 0
R1 Sw a R = V(FET_R)
V2 set 0 PULSE(0 1 0 {Trise_fall} {Trise_fall} {Ton_min} {Period})
.param Period = {1/Fs}
.param Trise_fall = 1n
.param Ton_min = {D_min * Period }
.param Ton_max = {D_max * Period}
.param Rfet = 1m
.param Fs = 100k
.param D_max = 90
.param D_min = 5
.param slopeAmp = 0.8
.param Ri = 0.25
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 972 680
WIRE -912 -1456 -1040 -1456
WIRE -2064 -1408 -2096 -1408
WIRE -2032 -1408 -2064 -1408
WIRE -1632 -1408 -1696 -1408
WIRE -1552 -1408 -1632 -1408
WIRE -1488 -1408 -1552 -1408
WIRE -1328 -1408 -1408 -1408
WIRE -2096 -1392 -2096 -1408
WIRE -1328 -1392 -1328 -1408
WIRE -1552 -1376 -1552 -1408
WIRE -2096 -1296 -2096 -1312
WIRE -1552 -1280 -1552 -1312
WIRE -1328 -1280 -1328 -1312
WIRE -608 -1216 -672 -1216
WIRE -496 -1216 -528 -1216
WIRE -400 -1216 -496 -1216
WIRE -240 -1216 -320 -1216
WIRE -192 -1216 -240 -1216
WIRE -112 -1216 -192 -1216
WIRE -1680 -1200 -1808 -1200
WIRE -1584 -1200 -1680 -1200
WIRE -912 -1200 -912 -1456
WIRE -672 -1200 -672 -1216
WIRE -496 -1200 -496 -1216
WIRE -240 -1200 -240 -1216
WIRE -2160 -1184 -2304 -1184
WIRE -1808 -1168 -1808 -1200
WIRE -672 -1104 -672 -1120
WIRE -496 -1104 -496 -1136
WIRE -240 -1104 -240 -1136
WIRE -1808 -1072 -1808 -1088
WIRE -912 -1008 -912 -1120
WIRE -880 -1008 -912 -1008
WIRE -848 -1008 -880 -1008
WIRE -576 -1008 -768 -1008
WIRE -96 -1008 -496 -1008
WIRE -2048 -992 -2336 -992
WIRE -1872 -992 -1968 -992
WIRE -1840 -992 -1872 -992
WIRE -1840 -976 -1840 -992
WIRE -2336 -960 -2336 -992
WIRE -1840 -880 -1840 -912
WIRE -368 -880 -432 -880
WIRE -320 -880 -368 -880
WIRE -2336 -864 -2336 -880
WIRE -432 -864 -432 -880
WIRE -912 -848 -912 -1008
WIRE -1120 -832 -1168 -832
WIRE -1088 -832 -1120 -832
WIRE -1760 -800 -1808 -800
WIRE -1712 -800 -1760 -800
WIRE -1168 -800 -1168 -832
WIRE -1808 -768 -2032 -768
WIRE -1712 -768 -1808 -768
WIRE -1584 -768 -1648 -768
WIRE -1504 -768 -1584 -768
WIRE -1360 -768 -1392 -768
WIRE -1328 -768 -1360 -768
WIRE -432 -768 -432 -784
WIRE -2240 -752 -2336 -752
WIRE -2176 -752 -2240 -752
WIRE -2336 -736 -2336 -752
WIRE -1808 -720 -1872 -720
WIRE -1504 -720 -1808 -720
WIRE -1376 -720 -1408 -720
WIRE -1328 -720 -1376 -720
WIRE -2032 -704 -2032 -768
WIRE -1872 -704 -1872 -720
WIRE -1168 -688 -1168 -720
WIRE -2336 -624 -2336 -656
WIRE -2032 -608 -2032 -624
WIRE -1872 -608 -1872 -624
WIRE -912 -608 -912 -768
WIRE -880 -608 -912 -608
WIRE -2352 16 -2464 16
WIRE -2208 16 -2352 16
WIRE -2464 32 -2464 16
WIRE -2000 96 -2112 96
WIRE -1856 96 -2000 96
WIRE -2112 112 -2112 96
WIRE -2464 128 -2464 112
WIRE -2112 208 -2112 192
IOPIN -1040 -1456 BiDir
IOPIN -96 -1008 BiDir
IOPIN -880 -608 BiDir
IOPIN -2304 -1184 In
LINE Normal -1216 -1344 -1296 -1344 2
LINE Normal -960 -1184 -1216 -1344 2
LINE Normal -976 -1184 -976 -1184 2
LINE Normal -704 -1120 -768 -1056 2
LINE Normal -1840 -1312 -1840 -1168 2
LINE Normal -1712 -1408 -1840 -1312 2
LINE Normal -1984 -1360 -2048 -1360 2
LINE Normal -1840 -1152 -1984 -1360 2
RECTANGLE Normal 560 -128 -2736 -2080 2
SYMBOL res -928 -864 R0
SYMATTR InstName R1
SYMATTR Value R = V(FET_R)
SYMBOL cap -512 -1200 R0
WINDOW 0 47 20 Left 2
WINDOW 3 43 49 Left 2
SYMATTR InstName C5
SYMATTR Value 100n
SYMBOL voltage -2096 -1408 R0
WINDOW 3 -14 -85 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 -87 52 Left 2
SYMATTR Value PULSE(0 {slopeAmp} 0 {Period - 2*Trise_fall} {Trise_fall} {Trise_fall} {Period})
SYMATTR InstName V4
SYMBOL res -512 -1232 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R8
SYMATTR Value 100
SYMBOL voltage -912 -1216 R0
SYMATTR InstName V1
SYMATTR Value 0
SYMBOL voltage -1872 -720 M0
WINDOW 3 -35 80 Right 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 -72 52 Left 2
SYMATTR Value PULSE(0 1 0 {Trise_fall} {Trise_fall} {Ton_min} {Period})
SYMATTR InstName V2
SYMBOL res -304 -1232 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 1000
SYMBOL res -592 -992 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R2
SYMATTR Value R=V(Rdiode)
SYMBOL voltage -2464 16 R0
WINDOW 3 -14 -85 Left 2
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 0 -87 52 Left 2
SYMATTR Value PULSE(0 {1} 0 {Period - 2*Trise_fall} {Trise_fall} {Trise_fall} {Period})
SYMATTR InstName V6
SYMBOL bv -432 -880 R0
WINDOW 0 -69 50 Left 2
WINDOW 3 43 56 Left 2
SYMATTR InstName B4
SYMATTR Value V= if( V(Sw) > V(p), 10m, 100k )
SYMBOL h -672 -1216 R0
WINDOW 123 -77 84 Left 2
WINDOW 0 -80 30 Left 2
WINDOW 3 -78 57 Left 2
SYMATTR Value2 1
SYMATTR InstName H2
SYMATTR Value V5
SYMBOL cap -256 -1200 R0
WINDOW 0 43 22 Left 2
WINDOW 3 42 52 Left 2
SYMATTR InstName C7
SYMATTR Value 10n
SYMBOL bv -1168 -816 R0
WINDOW 0 -83 71 Left 2
WINDOW 3 -125 385 Left 2
SYMATTR InstName B3
SYMATTR Value V=if( V(q) > 0.5, {Rfet}, 1meg )
SYMBOL voltage -864 -1008 R270
WINDOW 0 32 56 VTop 2
WINDOW 3 -32 56 VBottom 2
SYMATTR InstName V5
SYMATTR Value 0
SYMBOL srflop -1456 -672 M180
WINDOW 0 35 1 Left 2
SYMATTR InstName A1
SYMBOL bv -2112 96 R0
WINDOW 0 -83 71 Left 2
WINDOW 3 58 61 Left 2
SYMATTR InstName B6
SYMATTR Value V=if( V(q) > 0.5, V(On_time_ramp), 0 )
SYMBOL Digital\\or -1680 -720 M180
WINDOW 0 -8 110 Left 2
SYMATTR InstName A2
SYMBOL bv -2336 -976 R0
WINDOW 0 -83 71 Left 2
WINDOW 3 58 61 Left 2
SYMATTR InstName B2
SYMATTR Value V=if( V(sense_slope) > V(Vc), 1, 0)
SYMBOL cap -1536 -1376 M0
SYMATTR InstName C2
SYMATTR Value 100p
SYMBOL bv -2336 -752 R0
SYMATTR InstName B5
SYMATTR Value V=  V(trip) - V(set)
SYMBOL res -1952 -1008 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 100
SYMBOL cap -1856 -976 R0
SYMATTR InstName C8
SYMATTR Value 10p
SYMBOL h -1328 -1408 R0
WINDOW 123 32 126 Left 2
SYMATTR Value2 1
SYMATTR InstName H1
SYMATTR Value V1
SYMBOL bv -1808 -1184 R0
WINDOW 0 -93 51 Left 2
WINDOW 3 41 49 Left 2
SYMATTR InstName B1
SYMATTR Value V={Ri}*V(I_sense) + V(ramp)
SYMBOL voltage -2032 -720 R0
WINDOW 123 0 0 Left 2
WINDOW 39 0 0 Left 2
WINDOW 3 -13 169 Left 2
WINDOW 0 40 59 Left 2
SYMATTR Value PULSE(0 1 {Ton_max} {Trise_fall} {Trise_fall} {Trise_fall} {Period} )
SYMATTR InstName V3
SYMBOL res -1504 -1424 M90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R5
SYMATTR Value 100
FLAG -1040 -1456 c
FLAG -1328 -1280 0
FLAG -1632 -1408 I_sense
FLAG -1552 -1280 0
FLAG -1872 -608 0
FLAG -2032 -608 0
FLAG -1808 -768 reset
FLAG -1808 -720 set
FLAG -1584 -768 trip_reset
FLAG -96 -1008 p
FLAG -1376 -720 q
FLAG -672 -1104 0
FLAG -496 -1104 0
FLAG -880 -608 a
FLAG -880 -1008 Sw
FLAG -1680 -1200 sense_slope
FLAG -192 -1216 I_out
FLAG -240 -1104 0
FLAG -2304 -1184 Vc
FLAG -1360 -768 q_bar
FLAG -2336 -864 0
FLAG -1840 -880 0
FLAG -1872 -992 trip
FLAG -1760 -800 trip2
FLAG -1168 -688 0
FLAG -2096 -1296 0
FLAG -2064 -1408 ramp
FLAG -1808 -1072 0
FLAG -432 -768 0
FLAG -368 -880 Rdiode
FLAG -2336 -624 0
FLAG -2240 -752 trip2
FLAG -2464 128 0
FLAG -2352 16 On_time_ramp
FLAG -2112 208 0
FLAG -2000 96 On_time
FLAG -1120 -832 FET_R
TEXT -2096 -1096 Left 2 ;TransconErrorAmp
TEXT -560 -1712 Left 2 !.param Period = {1/Fs}
TEXT -560 -1624 Left 2 !.param Trise_fall = 1n
TEXT -560 -1688 Left 2 !.param Ton_min = {D_min * Period }
TEXT -560 -1664 Left 2 !.param Ton_max = {D_max * Period}
TEXT -560 -1600 Left 2 !.param Rfet = 1m
TEXT -560 -1856 Left 2 !.param Fs = 100k
TEXT -560 -1784 Left 2 !.param D_max = 90
TEXT -560 -1760 Left 2 !.param D_min = 5
TEXT -560 -1808 Left 2 !.param slopeAmp = 0.8
TEXT -560 -1832 Left 2 !.param Ri = 0.25
TEXT 112 -280 Left 2 ;Drawn : Mark Dimattina
TEXT 112 -328 Left 4 ;Title : IdealBoost
TEXT 112 -216 Left 2 ;Rev: 0.04
TEXT 112 -248 Left 2 ;Date: 25/07/2017
TEXT 112 -184 Left 2 ;M.J.Dimattina@ieee.org