* Z:\home\khalils\Downloads\files\data\raw_asc\0509baf8f5b5_Draft16.asc
* Generated by LTspice 26.0.1 for Windows.
* 4W-HI
* voltage feedback must be inverted.\nbecause it is now upside down.
* and we can add the VSET voltage the same.
* x20. works
* OK. suddenly made a lot better with C1. to LO.
* MUST BE VSENSE!!!
* With increasing load. what works is increase emitter degenerators.\n100R -> 10k.\n1k -> 100k load.\n---\ncan also increase size of integrator resistor to slow response. to make stable.\nbut it's mostly the degenerators.\n--\neg. local feedback to reduce gain of cascaode which means oscillation/fast swing.\ncould be done with optocouplers and series resistance.\nBUT see if can feedback to integrator direcly.. \n---
* Library below included based on ModelFile attribute of instance XU1, XU2, XU3, XU4 (C:\users\khalils\AppData\Local\LTspice\lib\sym\OpAmps\LT1358.asy)
XU2 N018 N014 FVCC FVEE N014 LT1357 ;pnba In+)In-)V+)V-)OUT
D9 N007 N006 D
C8 N009 N008 1n
M2 N006 N004 FVCC FVCC IRFP240
VIN1 N013 FCOM PULSE(2 -5 0 100n 100n 0.2ms 0.4ms 7)
V1 N001 0 200
R16 N020 N017 25k
R10 N016 N014 25k
R18 N008 ERR 20k
C3 FCOM N010 100n
Q2 N010 N019 N022 0 2N3904
Q3 N003 N002 N001 0 2N3906
D2 N010 FCOM Z19V
R6 N001 N002 800R
M4 N011 N010 FVEE FVEE IRFP9240
D1 FCOM N004 Z19V
V3 0 N012 36
R22 N021 VSENSE 25k
R9 N018 0 19k
D13 N015 N011 D
R8 N003 N019 500k
R3 P001 FCOM 1k
Q4 N019 N022 N024 0 2N3904
R1 N022 N024 800R
R5 FCOM P002 1k
XU1 FCOM N008 FVCC FVEE N009 LT1357 ;pnba In+)In-)V+)V-)OUT
R11 N017 N016 25k
D5 FCOM FVCC D
R2 VSENSE 0 1Meg
D11 N006 N005 D
D7 FVCC N004 D
D8 N010 FVEE D
C2 N004 FCOM 100n
D6 FVEE FCOM D
V2 N007 0 36
V4 0 N024 200
C1 0 NC_01 10n
Q6 FVEE N009 P002 0 2SA1943
R12 VSENSE FCOM 100R
R15 N013 N020 25k
C9 FCOM FVEE 100n
R7 FCOM N009 500R
D12 N004 N005 D
R13 N023 FCOM 25k
M1 N001 N005 N006 N006 IRFP240
C7 FVCC FCOM 100n
R4 VSENSE N018 1k
R21 FCOM N021 25k
Q1 N004 N003 N002 0 2N3906
R14 ERR N023 25k
Q5 FVCC N009 P001 0 2SC5200
M3 N024 N015 N011 N011 IRFP9240
XU4 N020 N023 FVCC FVEE ERR LT1357 ;pnba In+)In-)V+)V-)OUT
D14 N015 N010 D
D10 N011 N012 D
XU3 N021 N016 FVCC FVEE N017 LT1357 ;pnba In+)In-)V+)V-)OUT
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.model NPN NPN
.model PNP PNP
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.bjt
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.tran 3ms
.include my.lib
.model Z19V ako: BZX84C33VL bv=19
.include standard.bjt
.lib LTC.lib
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 3524 1344
WIRE 624 -544 448 -544
WIRE 1232 -544 624 -544
WIRE 1328 -544 1232 -544
WIRE 448 -512 448 -544
WIRE 624 -464 512 -464
WIRE 560 -416 448 -416
WIRE 1232 -416 1232 -544
WIRE 624 -336 624 -368
WIRE 1008 -336 624 -336
WIRE 1184 -336 1072 -336
WIRE 1232 -272 1232 -320
WIRE 1232 -272 1184 -272
WIRE 1232 -208 1232 -272
WIRE 1328 -208 1296 -208
WIRE 1232 -160 1232 -208
WIRE 624 -80 624 -336
WIRE 1184 -80 624 -80
WIRE 1680 -80 1536 -80
WIRE 1744 -80 1680 -80
WIRE 448 -16 448 -416
WIRE 1232 -16 1232 -64
WIRE 1232 -16 1184 -16
WIRE 1232 16 1232 -16
WIRE 1328 16 1232 16
WIRE 1232 48 1232 16
WIRE 928 80 880 80
WIRE 1040 80 992 80
WIRE 1168 96 1088 96
WIRE 624 176 624 -80
WIRE 672 176 624 176
WIRE 880 208 880 80
WIRE 896 208 880 208
WIRE 1040 224 1040 80
WIRE 1040 224 960 224
WIRE 1072 224 1040 224
WIRE 1088 224 1088 96
WIRE 1088 224 1072 224
WIRE 1104 224 1088 224
WIRE 1232 224 1184 224
WIRE 1408 224 1232 224
WIRE 1424 224 1408 224
WIRE 1504 224 1424 224
WIRE 1568 224 1504 224
WIRE 1712 224 1648 224
WIRE 1728 224 1712 224
WIRE 336 240 160 240
WIRE 624 240 336 240
WIRE 672 240 624 240
WIRE 688 240 672 240
WIRE 896 240 688 240
WIRE 688 304 624 304
WIRE 1072 352 1072 224
WIRE 1168 352 1072 352
WIRE 1232 432 1232 400
WIRE 1328 432 1232 432
WIRE 1232 448 1232 432
WIRE 1232 448 1184 448
WIRE 1232 496 1232 448
WIRE 1744 496 1696 496
WIRE 624 512 624 304
WIRE 1184 512 624 512
WIRE 1232 640 1232 592
WIRE 1344 640 1296 640
WIRE 2912 656 2800 656
WIRE 1232 704 1232 640
WIRE 1232 704 1184 704
WIRE 2160 704 2064 704
WIRE 1232 752 1232 704
WIRE 2064 752 2064 704
WIRE 2080 752 2064 752
WIRE 624 768 624 512
WIRE 1056 768 624 768
WIRE 1184 768 1120 768
WIRE 2160 768 2160 704
WIRE 2160 768 2144 768
WIRE 2272 768 2160 768
WIRE 2368 768 2352 768
WIRE 2448 768 2432 768
WIRE 2080 784 1904 784
WIRE 2448 784 2448 768
WIRE 2640 784 2448 784
WIRE 2800 784 2800 656
WIRE 624 816 624 768
WIRE 448 864 448 64
WIRE 560 864 448 864
WIRE 2352 864 2352 768
WIRE 2368 864 2352 864
WIRE 2448 880 2448 784
WIRE 2448 880 2432 880
WIRE 2720 880 2720 784
WIRE 2736 880 2720 880
WIRE 2368 896 2352 896
WIRE 2816 896 2800 896
WIRE 2928 896 2816 896
WIRE 2960 896 2960 880
WIRE 2960 896 2928 896
WIRE 624 912 512 912
WIRE 2736 912 2720 912
WIRE 448 992 448 960
WIRE 624 992 448 992
WIRE 1232 992 1232 848
WIRE 1232 992 624 992
WIRE 1344 992 1232 992
WIRE 2272 992 1952 992
WIRE 2352 992 2352 896
WIRE 2720 1008 2720 912
WIRE 2736 1008 2720 1008
WIRE 2816 1008 2816 896
WIRE 2816 1008 2800 1008
SYMBOL cap 1520 -144 R0
SYMATTR InstName C7
SYMATTR Value 100n
SYMBOL voltage 2912 640 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 -129 -58 Left 2
SYMATTR Value PULSE(2 -5 0 100n 100n 0.2ms 0.4ms 7)
SYMATTR InstName VIN1
SYMBOL diode 1440 288 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D6
SYMBOL res 896 64 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R18
SYMATTR Value 20k
SYMBOL OpAmps\\LT1358 928 160 R0
SYMATTR InstName U1
SYMBOL cap 1520 -80 R0
SYMATTR InstName C9
SYMATTR Value 100n
SYMBOL npn 1168 48 R0
SYMATTR InstName Q5
SYMATTR Value 2SC5200
SYMBOL pnp 1168 400 M180
WINDOW 3 85 0 Left 2
SYMATTR Value 2SA1943
SYMATTR InstName Q6
SYMBOL cap 672 240 R0
SYMATTR InstName C3
SYMATTR Value 100n
SYMBOL voltage 1344 544 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 36
SYMATTR InstName V3
SYMBOL res 2816 1024 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R14
SYMATTR Value 25k
SYMBOL diode 1200 -272 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D11
SYMBOL pmos 1184 592 M180
SYMATTR InstName M4
SYMATTR Value IRFP9240
SYMBOL nmos 1184 -416 R0
SYMATTR InstName M1
SYMATTR Value IRFP240
SYMBOL zener 640 304 R180
WINDOW 0 24 64 Left 2
WINDOW 3 54 30 Left 2
SYMATTR InstName D2
SYMATTR Value Z19V
SYMBOL res 1888 688 R0
SYMATTR InstName R4
SYMATTR Value 1k
SYMBOL cap 992 64 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 -59 31 VTop 2
SYMATTR InstName C8
SYMATTR Value 1n
SYMBOL nmos 1184 -160 R0
SYMATTR InstName M2
SYMATTR Value IRFP240
SYMBOL res 2368 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R22
SYMATTR Value 25k
SYMBOL res 1216 208 R0
SYMATTR InstName R5
SYMATTR Value 1k
SYMBOL res 2816 800 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R15
SYMATTR Value 25k
SYMBOL voltage 1328 -560 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 200
SYMATTR InstName V1
SYMBOL npn 560 816 R0
SYMATTR InstName Q2
SYMATTR Value 2N3904
SYMBOL OpAmps\\LT1358 2768 960 M180
SYMATTR InstName U4
SYMBOL res 608 896 R0
SYMATTR InstName R1
SYMATTR Value 800R
SYMBOL diode 1232 656 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D10
SYMBOL voltage 1344 896 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 0 36 39 Left 2
SYMATTR InstName V4
SYMATTR Value 200
SYMBOL diode 1008 -320 R270
WINDOW 0 32 32 VTop 2
WINDOW 3 0 32 VBottom 2
SYMATTR InstName D12
SYMBOL res 2368 752 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R10
SYMATTR Value 25k
SYMBOL cap 848 352 R180
WINDOW 0 24 56 Left 2
WINDOW 3 24 8 Left 2
SYMATTR InstName C1
SYMATTR Value 10n
SYMBOL zener 640 240 R180
WINDOW 0 24 64 Left 2
WINDOW 3 56 35 Left 2
SYMATTR InstName D1
SYMATTR Value Z19V
SYMBOL res 1216 128 R0
SYMATTR InstName R3
SYMATTR Value 1k
SYMBOL res 1664 208 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R12
SYMATTR Value 100R
SYMBOL res 432 -32 R0
SYMATTR InstName R8
SYMATTR Value 500k
SYMBOL diode 1120 752 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D14
SYMBOL res 608 -560 R0
SYMATTR InstName R6
SYMATTR Value 800R
SYMBOL diode 1296 -224 R90
WINDOW 0 0 32 VBottom 2
WINDOW 3 32 32 VTop 2
SYMATTR InstName D9
SYMBOL voltage 1328 -224 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 42 41 Left 2
SYMATTR Value 36
SYMATTR InstName V2
SYMBOL pmos 1184 848 M180
SYMATTR InstName M3
SYMATTR Value IRFP9240
SYMBOL diode 1200 512 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D8
SYMBOL OpAmps\\LT1358 2112 704 R0
SYMATTR InstName U2
SYMBOL res 2448 752 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R11
SYMATTR Value 25k
SYMBOL cap 656 176 R0
SYMATTR InstName C2
SYMATTR Value 100n
SYMBOL OpAmps\\LT1358 2400 816 R0
SYMATTR InstName U3
SYMBOL res 1712 208 R0
SYMATTR InstName R2
SYMATTR Value 1Meg
SYMBOL diode 1200 -16 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D7
SYMBOL res 1200 208 R90
WINDOW 0 81 66 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R7
SYMATTR Value 500R
SYMBOL diode 1424 224 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D5
SYMBOL res 2736 800 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R16
SYMATTR Value 25k
SYMBOL npn 512 864 M0
SYMATTR InstName Q4
SYMATTR Value 2N3904
SYMBOL res 1888 768 R0
SYMATTR InstName R9
SYMATTR Value 19k
SYMBOL res 2448 976 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName R21
SYMATTR Value 25k
SYMBOL res 2736 1024 M270
WINDOW 0 32 56 VTop 2
WINDOW 3 0 56 VBottom 2
SYMATTR InstName R13
SYMATTR Value 25k
SYMBOL pnp 512 -416 R180
SYMATTR InstName Q3
SYMATTR Value 2N3906
SYMBOL pnp 560 -368 M180
SYMATTR InstName Q1
SYMATTR Value 2N3906
SYMBOL diode 1200 768 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D13
FLAG 1328 16 FVCC
FLAG 1328 432 FVEE
FLAG 1536 -144 FVCC
FLAG 1536 -16 FVEE
FLAG 1408 160 FVCC
FLAG 1424 288 FVEE
FLAG 928 192 FVCC
FLAG 928 256 FVEE
FLAG 1504 224 FCOM
FLAG 2112 736 FVCC
FLAG 2112 800 FVEE
FLAG 1680 -80 FCOM
FLAG 2400 848 FVCC
FLAG 2400 912 FVEE
FLAG 2432 992 FCOM
FLAG 336 240 FCOM
FLAG 2928 896 ERR
FLAG 800 80 ERR
FLAG 2912 736 FCOM
FLAG 1712 224 VSENSE
FLAG 1904 704 VSENSE
FLAG 1344 912 LO
FLAG 1344 560 LO
FLAG 1328 -128 LO
FLAG 1328 -464 LO
FLAG 1904 864 LO
FLAG 1696 496 0
FLAG 1728 304 LO
FLAG 1744 576 FCOM
FLAG 1744 496 LO
FLAG 832 352 LO
FLAG 2768 928 FVCC
FLAG 2768 864 FVEE
FLAG 2640 1008 FCOM
FLAG 1952 992 VSENSE
TEXT -104 -288 Left 2 !.tran 3ms
TEXT -136 -176 Left 2 !.include my.lib
TEXT -192 -88 Left 2 !.model Z19V ako:  BZX84C33VL bv=19
TEXT -136 -144 Left 2 !.include standard.bjt
TEXT 1504 744 Left 2 ;4W-HI
TEXT 2216 1136 Left 2 ;voltage feedback must be inverted.\nbecause it is now upside down.
TEXT 2200 1232 Left 2 ;and we can add the VSET voltage the same.
TEXT 1632 872 Left 2 ;x20. works
TEXT 1888 -168 Left 2 ;OK. suddenly made a lot better with C1. to LO.
TEXT 1960 968 Left 2 ;MUST BE VSENSE!!!
TEXT 1824 40 Left 2 ;With increasing load. what works is increase emitter degenerators.\n100R -> 10k.\n1k ->    100k load.\n---\ncan also increase size of integrator resistor to slow response. to make stable.\nbut it's mostly the degenerators.\n--\neg. local feedback to reduce gain of cascaode which means oscillation/fast swing.\ncould be done with optocouplers and series resistance.\nBUT see if can feedback to integrator direcly.. \n---