Version 4
SHEET 1 3036 680
WIRE 2960 -128 2560 -128
WIRE 1280 -96 1184 -96
WIRE 1376 -96 1280 -96
WIRE 1840 -96 1456 -96
WIRE 2960 -48 2960 -128
WIRE 2560 -32 2560 -128
WIRE 1840 -16 1840 -96
WIRE 1184 16 1184 -96
WIRE 752 96 128 96
WIRE 800 96 752 96
WIRE 2560 96 2560 48
WIRE 2960 96 2960 32
WIRE 128 128 128 96
WIRE 800 128 800 96
WIRE 1840 144 1840 64
WIRE 128 240 128 208
WIRE 800 240 800 208
WIRE 1184 240 1184 96
FLAG 128 240 0
FLAG 800 240 0
FLAG 752 96 Vpulse
FLAG 1184 240 0
FLAG 1840 144 0
FLAG 1840 -96 Vs
FLAG 1280 -96 Vo
FLAG 2560 96 0
FLAG 2960 96 0
FLAG 2960 -128 vs_energy
SYMBOL res 784 112 R0
SYMATTR InstName R2
SYMATTR Value 1k
SYMBOL res 1472 -112 R90
WINDOW 0 0 56 VBottom 2
WINDOW 3 32 56 VTop 2
SYMATTR InstName Ri
SYMATTR Value {Ri_val}
SYMBOL res 1824 -32 R0
SYMATTR InstName RL
SYMATTR Value {RL_val}
SYMBOL ISO16750-2 128 128 R0
SYMATTR InstName U2
SYMATTR SpiceModel 4-6-4_24V_LoadDumpWithoutSuppressionTestA
SYMBOL bv 1184 0 R0
SYMATTR InstName B2
SYMATTR Value V=(V(Vpulse)-27.998253)/(196.775-27.998253)*US
SYMBOL bv 2560 -48 R0
SYMATTR InstName B1
SYMATTR Value V={idt(V(Vs)*I(RL))}
SYMBOL res 2944 -64 R0
SYMATTR InstName R1
SYMATTR Value 1
TEXT 1112 -472 Left 2 !.tran 0 2 0.99 1m
TEXT 320 80 Left 2 !;.meas vraw_max MIN v(Vpulse)
TEXT 904 -136 Left 2 !;.meas vsurge_max MIN v(Vo)
TEXT 1928 -104 Left 2 !.meas total_energy INTEG (V(Vs)*I(RL))
TEXT 1928 -40 Left 2 !.meas maximum_power MAX (V(Vs)*I(RL))
TEXT 1928 -72 Left 2 !.meas avg_power INTEG (V(Vs)*I(RL))/60
TEXT 1112 -352 Left 2 !.param RL_val=table(scenario, 0, 2, 1, 10, 2, 50, 3, 2)
TEXT 1112 -416 Left 2 !;.step param scenario 0 3 1
TEXT 1120 -280 Left 2 !.meas RL_value MAX RL_val
TEXT 1112 -384 Left 2 !.param Ri_val=table(scenario, 0, 0.5, 1, 0.5, 2, 0.5, 3, 2)
TEXT 1112 -320 Left 2 !;.param US=table(scenario, 0, 220, 1, 220, 2, 220, 3, 220)
TEXT 1496 -160 Left 2 !.meas vload_max MAX ABS(v(Vs))
TEXT 1536 -496 Left 2 !.param scenario=0
TEXT 1856 -312 Left 2 !.param US=200
