Version 4 SHEET 1 1756 680 WIRE -64 208 -64 144 WIRE -64 336 -64 288 WIRE -16 144 -64 144 WIRE 160 144 64 144 WIRE 288 144 224 144 WIRE 288 192 288 144 WIRE 288 336 288 256 WIRE 384 144 288 144 WIRE 384 192 384 144 WIRE 384 336 384 272 FLAG -64 336 0 FLAG 288 336 0 FLAG 384 336 0 FLAG 384 144 out SYMBOL diode 160 160 R270 WINDOW 0 32 32 VTop 0 WINDOW 3 0 32 VBottom 0 SYMATTR InstName D1 SYMBOL voltage -64 192 R0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value SINE(0 14 50) SYMBOL res -32 160 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R1 SYMATTR Value 1 SYMBOL cap 272 192 R0 SYMATTR InstName C1 SYMATTR Value {CAP} SYMBOL res 368 176 R0 SYMATTR InstName R2 SYMATTR Value 10 TEXT -64 0 Left 0 !.tran 0 500m 400m 0.1m TEXT -64 40 Left 0 !.options plotwinsize=0 TEXT -64 -56 Left 0 !.step param CAP list 5m 10m 20m TEXT 536 -120 Left 0 !.MEASURE TRAN iavg AVG I(V1) from 60m to 80m TEXT 544 40 Left 0 !.MEASURE TRAN ipeak1 MAX -I(V1) from 60m to 80m TEXT 536 -88 Left 0 !.MEASURE TRAN irms RMS I(V1) from 60m to 80m TEXT 544 200 Left 0 !.MEASURE TRAN vpp PP V(out) from 60m to 80m TEXT 544 240 Left 0 !.MEASURE TRAN vrms RMS V(out) from 60m to 80m TEXT -64 -400 Left 0 ;Some Useful Measurements With The .MEASURE Commands \nVersion: 1.03\n \nThe results of the .MEASURE commands are in the SPICE Error Log file\n \nView -> SPICE Error Log\n \nThe .MEASURE commands can be also interactively loaded\nfrom a file when the output window is the active window.\n \nFile -> Execute MEAS script TEXT 544 128 Left 0 !.MEASURE TRAN ipeak_d MAX I(D1) from 60m to 80m TEXT 544 -32 Left 0 ;The current of a voltage source is defined \nto be negative if it sources current. TEXT 544 80 Left 0 !.MEASURE TRAN ipeak2 MIN I(V1) from 60m to 80m TEXT 552 504 Left 0 ;.MEASURE TRAN avg AVG V(out) from 60m to 80m\n.MEASURE TRAN integ2 INTEG (V(out)-avg)*(V(out)-avg)/20m from 60m to 80m\n.MEASURE tran acrms PARAM sqrt(integ2) TEXT 552 320 Left 0 ;AC-RMS\nHint: Place the two commands in one text block to make\nsure that the lines exactly appear in this order in the netlist. TEXT 552 424 Left 0 !.MEASURE TRAN avg AVG V(out) from 60m to 80m\n.MEASURE TRAN acrms RMS V(out)-avg from 60m to 80m