* Z:\home\khalils\Downloads\files\data\raw_asc\5d420687c7e5_TYPE2_gm.asc
* Generated by LTspice 26.0.1 for Windows.
* Type 2 Compensator, Gm amp base
* target gain at fz1\nzero frequency(Hz)\npole frequency(Hz)\nmax ouput voltage(V)\nmin output voltage(V)\nopen loop gain
* 2025-08-31
* <Revision History>\n2025-08-31: Initial version
* feedback
* reference
* * TYPE2_gm is a Gm-amp based version of TYPE2.\n* Unlike the op-amp based TYPE2, it offers high input impedance at ref/fb\n* and is better suited for dynamic reference applications (e.g. soft-start,\n* motor speed control). Both models are kept for flexibility.
R2 ve 0 {avol}
B1 0 ve I=(limit(V(ref)-V(fb),{-Ilim},{Ilim}))
R1 ve N001 {Rz1}
C1 N001 0 {Cz1}
V2 -V 0 {vl}
V1 +V 0 {vh}
C2 ve 0 {Co1}
D2 ve +V myD
D1 -V ve myD
.model D D
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.dio
.param g=1
.param fz1=1k
.param fp1=20k
.param vh=5
.param vl=0
.param avol=100k
.param Rz1={(g*avol)/(avol-g)}
.param Cz1={1/(2*PI*fz1*Rz1)}
.param Co1={1/(2*PI*fp1*Rz1)}
.ic V(ve)=0
.MODEL myD D(RON=1u ROFF=1G Vfwd=10n)
.param Ilim=1000
.backanno
.end

* LTspice schematic (.asc):
Version 4.1
SHEET 1 1136 680
WIRE 432 -144 432 -160
WIRE 544 -144 544 -160
WIRE 432 -48 432 -64
WIRE 544 -48 544 -64
WIRE -128 144 -128 112
WIRE 416 144 416 96
WIRE -336 176 -368 176
WIRE -336 256 -368 256
WIRE -128 272 -128 224
WIRE -128 272 -240 272
WIRE 0 272 -128 272
WIRE 416 272 416 208
WIRE 416 272 0 272
WIRE 640 272 416 272
WIRE -128 304 -128 272
WIRE -240 336 -240 272
WIRE 0 336 0 272
WIRE 416 352 416 272
WIRE -128 416 -128 384
WIRE 416 448 416 416
WIRE -240 496 -240 416
WIRE -128 496 -128 480
WIRE 0 496 0 400
IOPIN 640 272 Out
IOPIN -368 176 In
IOPIN -368 256 In
RECTANGLE Normal 992 -208 368 -304 2
SYMBOL cap -16 336 R0
SYMATTR InstName C2
SYMATTR Value {Co1}
SYMBOL diode 432 416 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D1
SYMATTR Value myD
SYMBOL voltage 432 -160 R0
SYMATTR InstName V1
SYMATTR Value {vh}
SYMBOL diode 432 208 R180
WINDOW 0 24 64 Left 2
WINDOW 3 24 0 Left 2
SYMATTR InstName D2
SYMATTR Value myD
SYMBOL bi -128 144 R0
SYMATTR InstName B1
SYMATTR Value I=(limit(V(ref)-V(fb),{-Ilim},{Ilim}))
SYMBOL cap -144 416 R0
SYMATTR InstName C1
SYMATTR Value {Cz1}
SYMBOL res -144 288 R0
SYMATTR InstName R1
SYMATTR Value {Rz1}
SYMBOL voltage 544 -160 R0
WINDOW 123 0 0 Left 0
WINDOW 39 24 44 Left 2
SYMATTR InstName V2
SYMATTR Value {vl}
SYMBOL res -256 320 R0
SYMATTR InstName R2
SYMATTR Value {avol}
FLAG 640 272 ve
FLAG -128 496 0
FLAG -240 496 0
FLAG 0 496 0
FLAG -128 112 0
FLAG 544 -48 0
FLAG 432 -48 0
FLAG 432 -160 +V
FLAG 544 -160 -V
FLAG 416 448 -V
FLAG 416 96 +V
FLAG -368 176 fb
FLAG -368 256 ref
TEXT -336 -224 Left 2 !.param g=1\n.param fz1=1k\n.param fp1=20k\n.param vh=5\n.param vl=0\n.param avol=100k
TEXT -352 -288 Left 4 ;Type 2 Compensator, Gm amp base
TEXT -104 -224 Left 2 ;target gain at fz1\nzero frequency(Hz)\npole frequency(Hz)\nmax ouput voltage(V)\nmin output voltage(V)\nopen loop gain
TEXT 808 -328 Left 2 ;2025-08-31
TEXT -56 24 Left 2 !.param Rz1={(g*avol)/(avol-g)}\n.param Cz1={1/(2*PI*fz1*Rz1)}\n.param Co1={1/(2*PI*fp1*Rz1)}
TEXT 488 312 Left 2 !.ic V(ve)=0
TEXT 480 440 Left 2 !.MODEL myD D(RON=1u ROFF=1G Vfwd=10n)
TEXT -88 184 Left 2 !.param Ilim=1000
TEXT 672 -184 Left 2 ;<Revision History>\n2025-08-31: Initial version
TEXT -416 144 Left 2 ;feedback
TEXT -416 216 Left 2 ;reference
TEXT 384 -288 Left 1 ;* TYPE2_gm is a Gm-amp based version of TYPE2.\n* Unlike the op-amp based TYPE2, it offers high input impedance at ref/fb\n* and is better suited for dynamic reference applications (e.g. soft-start,\n* motor speed control). Both models are kept for flexibility.