Symbolic SPICE Symbolic SPICE TM Circuit Analyzer and Approximator Application Note AN-006: Magnetic Microphone Amplifier by Gregory M. Wierzba Rev 072010
A) Introduction The schematic shown below in Fig. 1 is a common-emitter amplifier with feedback biasing [1] that was used as a magnetic microphone preamp in [2,3]. A PSpice input file, MicAmp.cir, is given in Table 1. The same file is also accepted by Symbolic SPICE TM. Figure 1. Magnetic microphone amplifier Table 1. PSpice/Symbolic SPICE input file Magnetic Microphone Amplifier VCC 5 0 9 R1 5 4 5.6K R2 3 4 1.2MEG RS 1 2 40 RL 6 0 3.9K C1 2 3 2U C2 4 6 2U VS 1 0 AC 1 Q1 4 3 0 Q2N3904.model Q2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 + Bf=416.4 Ne=1.259 Ise=6.734f Ikf=66.78m Xtb=1.5 + Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 + Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 + Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10.AC DEC 25 1 100MEG.OP.PROBE.END 2
B) Numerical Program Results Running PSpice, we have the following numerical results for V out /V in = V 6 /V 2 : Figure 2. Magnitude of the voltage gain versus frequency Figure 3. Phase angle of the voltage gain versus frequency 3
Likewise, we can find the input impedance Z in = V in /I in = V 2 /I(R S ): Figure 4. Magnitude of the input impedance versus frequency Figure 5. Phase angle of the input impedance versus frequency 4
C) Mid-Band Analysis Symbolic SPICE has four different AC models for a BJT [4]. These are a Simple BJT, Simple BJT with Beta, Low Frequency BJT and High Frequency BJT. For audio mid-band frequencies, the capacitances of the BJT are very high impedances and will have little effect on transfer functions. So using the High Frequency BJT model isn t necessary. The Low Frequency BJT model shown in Fig. 6 is the same as the High Frequency BJT model shown in Fig.7 but without the transistor capacitances. Figure 6. Low frequency BJT model invoked by using QL[name] Figure 7. High freqeuncy BJT model invoked by using QB[name] For AC analysis, an AC model is inserted for every element [5]. A DC power supply has no change in voltage for a change in current. Thus it appears to be a short for AC and we replace all DC voltage sources with short circuits for AC analysis. Symbolic SPICE does the same for any element invoked with V[name] and not including the symbols AC. At audio mid-band frequencies, the large coupling capacitors of Fig. 1 and Table 1 are very low impedances and these too are treated as short circuits. Likewise Symbolic SPICE has a short circuit Coupling Capacitor element [4] which is invoked with an @ symbol. This is shown in Fig. 8. 5
Figure 8. Coupling capacitor invoked by using C@[name] Using the Low Frequency BJT model of Fig. 6 for Q 1 requires changing the name of Q 1 in Table 1 to Q L1. Using the Coupling Capacitor model of Fig. 8 for C 1 and C 2 requires that we add an @ symbol after the C in Table 1. This modified Symbolic SPICE input file, MicAmp_mid.cir, is given in Table 2. Table 2. Modified Symbolic SPICE input file for mid-band analysis Magnetic Microphone Amplifier VCC 5 0 9 R1 5 4 5.6K R2 3 4 1.2MEG RS 1 2 40 RL 6 0 3.9K C@1 2 3 2U C@2 4 6 2U VS 1 0 AC 1 QL1 4 3 0 Q2N3904.model Q2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 + Bf=416.4 Ne=1.259 Ise=6.734f Ikf=66.78m Xtb=1.5 + Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 + Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 + Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10.AC DEC 25 1 100MEG.OP.PROBE.END D) Symbolic SPICE s Approximator Option A numerical program can give you a very precise answer. Likewise Symbolic SPICE can give you the exact symbolic answer but in most cases it is useless for design purposes because it has so many terms. A good circuit designer can make approximations based on values of components. For example, a 100k S resistor in parallel with a 1k S resistor is approximately 1k S. Symbolic SPICE too has the ability to approximate an answer if you can provide estimated values for your circuit components. To analyze and approximate the response of our magnetic microphone amplifier, we need to know the values of r B1, r o1 and g m1 for our Low Frequency BJT model. This information is available if you use the operating point (.OP) option in your PSpice input file. The results are found in the output file. For the input file of Table 1, the operating point parameters are listed in Table 3. 6
Table 3. Operating point information found in PSpice s MicAmp.out **** BIPOLAR JUNCTION TRANSISTORS NAME MODEL IB IC VBE VBC VCE BETADC GM RPI RX RO CBE CBC CJS BETAAC CBX/CBX2 FT/FT2 Q1 Q2N3904 4.31E-06 5.63E-04 6.49E-01-5.18E+00 5.82E+00 1.30E+02 2.16E-02 7.01E+03 1.00E+01 1.41E+05 1.29E-11 1.92E-12 0.00E+00 1.51E+02 0.00E+00 2.32E+08 Running the input file shown in Table 2, the following are the prompts. Note that with C 2 shorted V 6 = V 4. The user responses are shown in bold: Symbolic SPICE - Circuit Analyzer and Approximator Demo Version 3.1 (C) Copyright 2010 by Willow Electronics, Inc. INPUT FILE NAME [.cir] : MicAmp_mid Warning! Ignoring: + Bf=416.4 Ne=1.259 Ise=6.734f Ikf=66.78m Xtb=1.5 + Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 + Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 + Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10 OUTPUT FILENAME [MicAmp_mid.det] : (hit enter) Determinant string sorted according to orders of some variable? (y/n) : n Numerical evaluation of the results? (y/n) : y Discard terms if their magnitude falls below a threshold? (y/n) : n Check and solve for second order filter functions? (y/n) : n What is the numerical value of RPI1? 7.01k What is the numerical value of GM1? 21.6m What is the numerical value of RO1? 141k Solve for a variable or expression? (y/n) : y 7
Available Unknowns: V1 V2 V4 *Ignore nodes 7 and higher if present. They are used for internal numbering. Valid Operators: +, -, *, /, ( ), { }, [ ] Equation: v4/v2 Solve for another variable or expression? (y/n) : y Equation: v2/((v1-v2)*gs) Solve for another variable or expression? (y/n) : n E) Symbolic SPICE Determinant Output The output file MicAmp_mid.det listed in Table 4 is the matrix written by Symbolic SPICE and the transfer functions requested. Note that this is the full symbolic solution with no approximations. Magnetic Microphone Amplifier Table 4. Symbolic SPICE Output File MicAmp_mid.det [0 ] [-GS GS+GPI1+G2 -G2 ][V1 ] [0 ]=[0 GM1-G2 GO1+GL+G2+G1 ][V2 ] [1 ] [1 0 0 ][V4 ] *Ignore nodes 7 and higher if present. They are used for internal numbering. Numerator of: v4/v2 - GM1 + G2-0.0215992 * s**0 Denominator of: v4/v2 + GO1 + GL + G2 + G1 + 0.000442907 * s**0 8
Numerator of: v2/((v1-v2)*gs) + GO1 + GL + G2 + G1 + 0.000442907 * s**0 Denominator of: v2/((v1-v2)*gs) + GPI1*GO1 + GPI1*GL + GPI1*G2 + GPI1*G1 + GO1*G2 + GM1*G2 + GL*G2 + G2*G1 + 8.15505e-008 * s**0 Symbolic SPICE s format is a collection of strings of symbols sorted by the (default) Laplace operator s. This is usually not how most people view equations, so you may need to do some minor editing. Vout V6 V4 gm1 + G2 = = = V V V G + G + G + G in 2 2 O1 L 2 1 We can check the numerically evaluated results of Symbolic SPICE with our numeric only results of PSpice. Vout V6 V4 0.0215992 = = = = 48.766897 V V V 0.000442907 in 2 2 This gain has a magnitude of 33.7625 db and an angle of -180. This is a difference in db gain magnitude of.061 % with that of Fig. 2 at mid-band frequencies. 9
For the input impedance, V V G + G + G + G I ( V V ) G G ( G G G G ) G ( G g G G ) in 2 O1 L 2 1 = Zin = = in 1 2 S π1 O1 + L + 2 + 1 + 2 O1 + m1 + L + 1 Checking the numerically evaluated results of Symbolic SPICE with our numeric only results of PSpice. V V 0.000442907 = = = = 5.431076k Ω I V V G in 2 Zin -8 in ( 1 2) S 8.15505e This has a magnitude of 5.431076k and an angle of 0. This is a difference in impedance magnitude of.1365 % with that of Fig. 4 at mid-band frequencies. Both these results fall within the default accuracy of PSpice. F) Using the Approximator Running the input file shown in Table 2 again, but this time allowing an approximation of 10 %, the following are the prompts. The user responses are shown in bold: Symbolic SPICE - Circuit Analyzer and Approximator Demo Version 3.1 (C) Copyright 2010 by Willow Electronics, Inc. INPUT FILE NAME [.cir] : MicAmp_mid Warning! Ignoring: + Bf=416.4 Ne=1.259 Ise=6.734f Ikf=66.78m Xtb=1.5 + Br=.7371 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=3.638p Mjc=.3085 + Vjc=.75 Fc=.5 Cje=4.493p Mje=.2593 Vje=.75 + Tr=239.5n Tf=301.2p Itf=.4 Vtf=4 Xtf=2 Rb=10 OUTPUT FILENAME [MicAmp_mid.det] : (hit enter) Determinant string sorted according to orders of some variable? (y/n) : n Numerical evaluation of the results? (y/n) : y Discard terms if their magnitude falls below a threshold? (y/n) : y Enter the threshold factor (between 0 and 1) :.1 Check and solve for second order filter functions? (y/n) : n What is the numerical value of RPI1? 7.01k What is the numerical value of GM1? 21.6m What is the numerical value of RO1? 141k Solve for a variable or expression? (y/n) : y Available Unknowns: 10
V1 V2 V4 *Ignore nodes 7 and higher if present. They are used for internal numbering. Valid Operators: +, -, *, /, ( ), { }, [ ] Equation: v4/v2 Solve for another variable or expression? (y/n) : y Equation: v2/((v1-v2)*gs) Solve for another variable or expression? (y/n) : n G) Approximated Symbolic SPICE Output The new output file MicAmp_mid.det listed in Table 5 is the matrix written by Symbolic SPICE and the transfer functions requested with a threshold approximation of 0.1 or 10 %. For each power of s, Symbolic SPICE finds the largest magnitude term and multiplies this by the user specified threshold magnitude. It then discards any terms for that power of s which are below this value. Magnetic Microphone Amplifier Table 5. Symbolic SPICE Output File MicAmp_mid.det [0 ] [-GS GS+GPI1+G2 -G2 ][V1 ] [0 ]=[0 GM1-G2 GO1+GL+G2+G1 ][V2 ] [1 ] [1 0 0 ][V4 ] *Ignore nodes 7 and higher if present. They are used for internal numbering. RESULTS APPROXIMATED USING A THRESHOLD MAGNITUDE OF: 0.10 Numerator of: v4/v2 - GM1-0.0216 * s**0 Denominator of: v4/v2 + GL + G1 11
+ 0.000434981 * s**0 Numerator of: v2/((v1-v2)*gs) + GL + G1 + 0.000434981 * s**0 Denominator of: v2/((v1-v2)*gs) + GPI1*GL + GPI1*G1 + GM1*G2 + 8.00515e-008 * s**0 This time we have Vout V6 V4 gm1 0.0216 = = = gm1( RL R1) = = 49.65734 V V V G + G 0.000434981 in 2 2 L 1 This is a simplification of our previous formula and is about a 1.8 % change in numerical results. Likewise for Z in, V V G + G G + G = = = = I V V G G G G G g G G G G g G G in 2 L 1 L 1 Zin in ( 1 2) S π1 L + π1 1 + m1 2 π1( L + 1) + m1 2 π1-4 R2 rπ 1-8 m1 2 1 m1( L 1) m1( L 1) 8.005156e 1 1 4.34981e = = = = 5.434k Ω g G g R R + + g R R ( G + G ) r R L 1 π1 2 12
This is a significant simplification of our previous formula and is about a 0.049 % change in numerical results. Also note that the resistance R 2 is effectively reduced by the gain of the amplifier. This is known as the Miller Effect [6]. H) Redesign for Increased Gain The overall voltage gain magnitude of 48.65 (or 33.742 db) of Fig. 1 may not be enough gain for some low volume sounds. Suppose that we try to double the gain. From our approximate formula we see that the gain is proportional to g m1 and this is proportional to the DC base current [7]. So if we double g m we would need to double the DC base current, I B. Since the approximated gain is independent of R 2 we could calculate the value of this resistor to get the desired I B. From Table 3, we find that V BE(ON) = 0.649 V, I B = 4.31: A and $ DC = 130. So doubling I B would give us a value of 8.62: A and therefore I C = $ DC I B = 130 (8.62:) = 1.121m A. For DC, the capacitors are open circuits in Fig. 1 and we can label the things we know about the voltages and currents on the drawing. This is shown in Fig. 9. Figure 9. DC analysis I R1 = 8.62: + 1.121m =1.12862m A and this produces a V R1 = 6.32 V. Solving for R 2 R 2 ( 6.32 + 9) (0.649) = = 235.6k Ω 8.62µ Using the nearest standard resistor value of 220k S and re-running the PSpice of Table 1, we find the mid-band gain magnitude to be 96.01 (or 39.65 db). This is close to our target gain of 2(48.65) = 97.3 (or 39.76 db). I) Conclusion Symbolic SPICE can be used to find the mid-band gain and input impedance of a transistor amplifier using a built in low frequency model for the BJT. Although this is the exact symbolic answer, it is almost useless for design purposes because it has so many terms. Symbolic SPICE s Approximator option can estimate these formulas if approximate values of components are known. 13
J) References [1] R. Marston, Bipolar Transistor Cookbook - Part 3, Nuts and Volts, Sept. 2003, pp. 70-74. [2] R. Marston, Audio Amplifiers, Electronics Now, March 1994, pp. 75-80. [3] G. M. Wierzba, ECE 302: Electronic Circuits Class Notes, Ch.10: Supplemental Problems and Solutions, pp. 17-25. This e-book is available at http://stores.lulu.com/willowepublishing [4] G. M. Wierzba, Symbolic SPICE User Manual. This e-book is available at http://stores.lulu.com/willowepublishing [5] G. M. Wierzba, ECE 302: Electronic Circuits Class Notes, Ch.5, pp. 1-7. [6] J. M. Miller, "Dependence of the Input Impedance of a Three-electrode Vacuum Tube Upon the Load in the Plate Circuit," Scientific Papers of the Bureau of Standards, vol.15, no. 351, 1920, pp. 367-385. [7] G. M. Wierzba, ECE 302: Electronic Circuits Class Notes, Ch.10, pp. 19-21. 14