Power supply simulation using Vorperian's switch model * * Reference: "Simplified Analysis of PWM Converters using Model of * PWM Switch", IEEE Transactions on Aerospace and * Electronic Systems. May 1990 * * A transient and AC analysis is performed on the circuit and * the information obtained is documented below. * Select which ac source to activate depending on which characteric of * the power supply you want to examine. .probe .nodeset v(10)=1.78396829; aid biaspoint calculation .ac dec 10 10 100k VIN 1 0 20 ac 0 ; with ac set to 1 and the ac analysis sweep done * vdb(5)-vdb(12) ----> audio suceptibility vinAC 55 5 0 ac 1 ; with ac set to 1 and the ac analysis sweep done * vdb(5)-vdb(55) ----> loop gain * vp(5)-vp(55) ----> loop phase * vdb(5)-vdb(12) ----> control to output transfer function gain * vp(5)-vp(12) ----> control to output transfer function phase Iout 5 0 0 ac 0 ; with ac set to 1 and the ac analysis sweep done * v(5) ----> output impedance * * The tran statement will simulate 4ms during which the supply experiences * a one amp step load. * .tran 1ns 4ms 0 20us vref 51 0 4.9 iload 5 0 pulse(0 1 1ms 1us 1us 25ms 50ms) rdamp 2 3 3 lf 3 5 500uh rc1 6 0 .0002 cf 5 6 4840uf rl 5 0 5 x1 1 0 2 12 pwm x2 51 55 10 erramp * compensation network CCOMP 78 0 100N RCOMP 10 78 18k *modulator gain emod 12 0 table {(v(10)-1)/2} = (0,0) (1,1) * vorperians switch model .subckt pwm A P C D gap a x value {v(d)*i(vc)} ecp x p value={v(d)*v(a,p)} vc x c 0 rconv d 0 1g .ends * amp * + - o .SUBCKT erramp 1 2 5 VT 10 0 4.3 VB 20 0 .7 RIN1 1 0 1e10 RIN2 2 0 1e10 DT 5 10 DX DB 20 5 DX *G1 0 5 TABLE {.0062*EXP((V(1)-V(2))/.0256) *(V(1)-V(2)) } (-100U -100U) (100U 100U) G1 0 5 TABLE {.0045 *(V(1)-V(2)) } (-200U -200U) (200U 200U) ROUT 5 0 2meg CPOLE 5 0 .2N .MODEL DX D(IS=1E-19 RS=.01) .ENDS .END