TUNED AMPLIFIER AS A SPICE EXAMPLE * WITH COMMENTS * * Few changes Sept 26 to correct model, add .PROBE * No Devices found? Edit this file directly from within PSPICE, * then save as a .cir file. Do *NOT* edit with Notepad or other * editor. (Comment added Sept 25,2003) * COMMENTS (START LINE WITH *) CAN BE PUT ANYWHERE IN THE * SPICE DECK FIRST LINE IS ALWAYS THE TITLE (A COMMON ERROR IS * TO START THE CIRCUIT ON THE FIRST LINE AND HAVE IT TREATED * AS THE TITLE) .OPTIONS NOMOD LIMPTS=1000 * SOMETIMES NUMBER OF POINTS IS LIMITED TO 200 BY DEFAULT * Q1 3 2 1 QN3904 * C B E MODEL VCC 4 0 DC 15V * VOLTAGE SOURCE CALLED VCC CONNECTED FROM NODE 4 TO * GROUND (NODE 0) L1 4 3 159.0UH * First Character specifies component * ind, cap, res, bipolar tran, MOS tran, v src, I SRC, subcircuit, vcvs, vccs * L, C, R, Q M V I X E G * * Next numbers specify nodes to which the component is connected * Then component size or model name * units: femto pico, micro, milli, kilo, meg, gig * F P U M K MEG G * further letters behind units (eg V,A,H,F, OHMS) are ignored, but * be careful, 3F is not 3 FARADS but 3 FEMTO FARADS, * 1.5A is not 1.5 AMPERES but 1.5 ATTO (10^-18!!!). C1 4 3 159PF * No spaces between number and unit, else unit is ignored. RL 4 3 3.00K R1 2 0 5KOHMS R2 4 2 10K RE 1 0 5K CE 1 0 100N CIN 5 2 100N * Matching components set close to 0 LMATCH 6 5 0.0001U CMTCH1 5 0 0.0001P CMTCH2 6 0 0.0001P RIN 7 6 50 *V7 7 0 SIN(0 0.05 1.0MEG) * SIN Source needed for transient analysis, here commented out V7 7 0 DC 0 AC 1 * AC source needed for freq domain (freq resp, zin, zout, noise) * This analysis is done on the equivalent linear model, so 1V is * specified at the input to result in voltage gain. For SIN source * full nonlinear model is used, so 1V in could be too large. * .MODEL QN3904 NPN + ISS = 0. XTF = 1.00000 NS = 1.00000 + CJS = 0. VJS = 0.50000 PTF = 0. + MJS = 0. EG = 1.10000 AF = 1.00000 + ITF = 0.50000 VTF = 1.00000 BF = 280.92203 + BR = 20.00000 IS = 2.3673e-15 VAF = 130.20848 + VAR = 11.07004 IKF = 0.23419 ISE = 3.0707e-16 + NE = 1.19409 IKR = 7.80101 ISC = 3.5223e-12 + NC = 1.33867 IRB = 1.8864e-04 NF = 0.97302 + NR = 0.97623 RBM = 1.0000e-02 RB = 69.94226 + RC = 3.0000e-02 RE = 0.25690 MJE = 0.36064 + MJC = 0.29228 VJE = 0.81795 VJC = 0.45460 + TF = 5e-10 TR = 6.2636e-09 CJE = 6.7441e-12 + CJC = 3.4247e-12 FC = 0.95000 XCJC = 0.95425 * + SUBS = 1 .PROBE .OP * * Note changes made to correct model, add .PROBE, .OP (gives operating point info) * *.AC DEC 10 100K 10MEG * AC analysis control line. Decade sweep 10 points per decade start at 100 kHz, * end at 10 MHz, total is 2 decades, result is 41 points. .AC LIN 41 600K 1.40MEG * Linear sweep 600K to 1.4 MEG, total of 41 points. In 800k range, is 1 point/40k. * result: no point at 900k .NOISE V(3) V7 10 * Noise analyis V(3) is output noise summing node, V7 is input source * every 10th point will cause a summary printout. Make sure this will give * you a print out at your desired frequency *.TRAN 20.N 5U * point every 20 ns up to 5 u seconds. * Transient sweep * If your transient plot doesn't seem to be using the right steps, * you can force it by using the "step ceiling value" as follows: *.TRAN [no-print value * [step ceiling value]][SKIPBP] * Note - Need step ceiling value otherwise default step time too large *.TRAN 10n 100u 0 10n .PRINT AC VDB(6) VP(6) VDB(3) VP(3) .PRINT AC VM(6) VM(3) IR(V7) II(V7) * VDB(6) voltage in dB on node 6, requires AC source somewhere * VP is phase, VM magnitude, IM(V7) current magnitue through source V7 * VR real part of voltage, VI imaginary part, .PRINT NOISE ONOISE INOISE * ONOISE is output noise in volts per sqrt(Hz) * INOISE is input referred noise in volts per sqrt(Hz) .END