Application Report SBAA146A – December 2006 – Revised May 2015 Topology and Noise Using Multiplying DAC Jim Noxon ................................................ High-Performance Analog, Precision Digital-to-Analog Converters ABSTRACT This paper explores the noise issues that are inherent in the design of programmable gain amplifiers when multiplying digital-to-analog converters (DACs) are used as the programmable gain element. In particular, the effects of circuit topology on these noise issues are highlighted. This document also develops several methods for generalized noise analysis, emphasizing an analytical, structured approach. 1 2 3 4 5 6 7 8 9 Contents Introduction ................................................................................................................... 2 Noise Calculation for the Amplifier ........................................................................................ 3 Modeling the DAC as a Variable Impedance ............................................................................ 7 Determination of Component Values ...................................................................................... 9 Gain Scaling and Comparison ............................................................................................ 11 Heuristic Reasoning........................................................................................................ 14 Additional Comments ...................................................................................................... 15 Conclusion .................................................................................................................. 16 References .................................................................................................................. 16 1 Typical Variable Gain Amplifier Using a Multiplying DAC .............................................................. 2 2 Variable Gain Amplifier with a Multiplying DAC in Feedback Path .................................................... 2 3 Simple Inverting Amplifier Circuit .......................................................................................... 3 4 Amplifier Circuit with Noise Sources Included ........................................................................... 6 5 R-2R DAC Ladder Network with Switches 6 Inverting Amplifier with Generalized Variable Impedance on Input ................................................... 8 7 Inverting Amplifier with Generalized Variable Impedance on Feedback ............................................. 8 8 Noise vs Gain (OP27) List of Figures 9 ............................................................................... ..................................................................................................... Noise Source Connected to Load ........................................................................................ 7 13 14 List of Tables SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 1 Introduction 1 www.ti.com Introduction This application report analyzes two topologies of variable gain amplifiers using multiplying digital-toanalog converters (DACs). The first topology (see Figure 1) is the most popular, and is generally given in product specifications as a typical usage. Rf Vi Vref Iout+ Vo Rb Iout- n Figure 1. Typical Variable Gain Amplifier Using a Multiplying DAC An alternative topology that is not generally considered places the DAC in the circuit feedback path, as shown in Figure 2. IoutIout+ Vref n Ri Vi Vo Rb Figure 2. Variable Gain Amplifier with a Multiplying DAC in Feedback Path There are advantages and disadvantages to both circuits; this document investigates these differences, particularly in the area of how the topology of the circuit affects the overall noise present at the output of the circuit. One assumption made throughout this document is that the DAC and amplifier selected for a given design are the same for both types of circuits. This constraint, combined with the maximum and minimum gain required by the amplifier circuits, dictates other impedances within the circuit. Further, the gain as a function of DAC codeword input is different for both topologies. As a result of these assumptions and differences, mechanisms will be realized that allow one to properly compare the two topologies. To start, we provide the reader with a short overview for calculating noise in a sample amplifier circuit, followed by a discussion on generalizing the DAC into a variable resistance element for the circuit. Next, we analyze a method for calculating other circuit elements based on a chosen DAC parameter. Given that the circuit types have different gain characteristics, a normalization of one circuit with respect to the other is worked out that allows comparison of the noise within the two topologies. Finally, a discussion of the different forms of the gain functions is undertaken. 2 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Noise Calculation for the Amplifier www.ti.com 2 Noise Calculation for the Amplifier Figure 3 shows a simple inverting amplifier circuit from which a noise model will be created. Rf Ri Vi Rb Vo Figure 3. Simple Inverting Amplifier Circuit The amplifier has voltage and current noise density sources generated by the internal amplifier circuitry. To simplify working with these noise sources, they are combined into a voltage noise source and two current noise sources. This simplification allows them to be considered separately from the amplifier itself, presenting the amplifier as ideal and making the noise sources appear as separate components attached at the amplifier input nodes. These combined set of noise sources are termed input-referred noise sources. The amplifier specification gives these noise sources as a voltage noise density in V/√Hz, and inverting and noninverting input current noise densities in A/√Hz. The reason for identifying two different current noise sources is that there are differences in the way each input node is connected to external circuitry; in other words, the load on the noise source is different for each type of current noise. Many voltage feedback amplifiers may only specify one current noise density value. In these situations, both inverting and noninverting input current noise sources are assumed to be the same as the one specification. The components attached to the amplifier also contribute noise to the system. A significant part of this secondary noise results from the random motion of electrons within the components themselves caused by thermal energy. Generally, reactive components are considered to be ideal and contribute no noise to the system; however, they can modify the response of the noise within the system, so we must not ignore them. Resistive elements within the system exhibit a voltage noise density that is directly proportional to the square root of the resistor value—a Thevenin form—and a current noise density that is inversely proportional to the square root of the resistor value—a Norton form. The Thevenin form is given as a voltage source, where: V (R) + Ǹ4kTR n Given that T is temperature measured in degrees Kelvin (K) and k is Boltzmann’s constant of 1.38 × 10–23 [m2kg/s2/K], the Norton form is given as a current source: I n(R) + Ǹ4kT R Note that these two sources are defined in units of V/√Hz and A/√Hz, respectively. These units are used because they are proportional to the total noise energy seen by the circuit, which happens to be the same for all resistors. The statement of noise energy being constant for any resistive element may seem hard to accept, but the following set of equations provide a rudimentary proof of this concept. Recognize that squaring both sides of Equation 1 results in Equation 2: V V = 4kTR Vn Hz Hz (1) [ ] ƪ ƫ [ ] ƪ ƫ 2 2 2 V n V + 4kTR V Hz Hz (2) SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 3 Noise Calculation for the Amplifier www.ti.com Dividing both sides of Equation 2 by the resistance R generates Equation 3: ȱǒVW Ǔȳ Wƫ ȧ Hz ȧ+ 4kTƪHz Ȳ ȴ 2 2 Vn R (3) 2 V +W Noting that: W Since ȱǒVW Ǔȳ ȱǒJsǓȳ ȧ Hz ȧ+ 4kTȧs ȧ+ 4kT[J] Ȳ ȴ Ȳ ȴ 2 Vn R W + Js −1 and Hz + s , substituting these terms gives us Equation 4: 2 −1 (4) It is important to note that Equation 4 does not show that every resistor contains 4kT Joules of energy; indeed, this formula says nothing about the total amount of thermal energy contained within the resistor. What it does say is that connecting the resistor in the circuit allows an average of 4kT Joules of energy fluctuation to be seen by the circuit, manifested as either voltage or current (or both). In other words, every resistor added to the topology on average both injects and dissipates 4kT Joules of electrical energy, regardless of the value of the resistor. Being a random variable whose expected value is 4kT Joules, it both delivers and absorbs energy; thus, over time the total energy delivered to the circuit is zero, which makes sense since a resistor is not a power source. However, sampling the energy at any point in time will (with some probability) show a slight deviation from the nominal, indicating some energy transfer has occurred. Another noteworthy item about noise units is how they are described in per Hertz units. This convention is used because noise units are a density function in the frequency domain. One question that arises from units such as these is, "Don’t you get infinite noise at 0Hz or DC?" The answer is no. When units show up in the denominator, they typically reference a difference between two values of the same unit. V ǸHz upper limit*Hzlower limit For example, the voltage noise density could be written as or V/√ΔHz, which is typically reduced to V/√Hz because the difference is contained within the coefficient multiplying the units. Therefore, a difference of 0Hz is useless, because integrating this density function over zero range would yield a zero value. It is important for the reader to understand that these noise sources are characterized in Root Mean Square (RMS) terms; that is, they represent the average magnitude of a random variable. In the case of the amplifier, it is a statistical combination of several random variables within the circuit that is then mathematically referred to the inputs. Further, these random variables are assumed to be uncorrelated in time; this assumption means that any cross-coupling of the variables during circuit analysis would average to zero, causing all cross-coupled terms to cancel each other out. To clarify, consider the definition of an RMS calculation for a given random variable defined as: RMS(X) = X 2 , where the notation X indicates the mean (or expected value) of the random variable X. Note also the standard deviation σ of a random variable is given as: s+ Ǹ(X*m) 2 , 2 with (X*m) being the variance of X, given that m is the mean of X. If μ = 0—that is, there is no DC offset, which is assumed to be valid for all noise sources within the circuit—then: s + ǸX 2 + RMS(X) In other words, the standard deviation of a noise source is the same as the RMS value of the noise source if and only if the mean value of the noise source is zero. 4 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Noise Calculation for the Amplifier www.ti.com It was noted earlier that there are multiple noise sources within the circuit being analyzed. Therefore, it is understood that the output voltage will be some linear combination of these individual noise sources. To acknowledge this effect, a two-variable example will be developed that the reader should recognize can be readily expanded to any number of variables. Realizing the variance of X is given as: 2 (X*m) + ǒX*XǓ 2 where X + m the variance of two random variables X and Y can then be written as Equation 5. var(X)Y) + s 2 + ǒX)Y*X)Y Ǔ 2 (5) Since expected value is a linear operation, X + Y = X + Y, and Equation 5 becomes Equation 6: var(X)Y) + ǒX)Y*X*Y Ǔ 2 (6) Knowing that X = 0 and Y = 0 because the mean of our noise sources is zero, Equation 6 yields Equation 7: 2 var(X)Y) + (X)Y) + X2)Y 2)2XY (7) Again, distribute the expected value operation in Equation 7, producing Equation 8: var(X)Y) + X 2)Y2)2 X Y (8) By definition, two random variables are independent if XY = X • Y. Conversely, knowing that X and Y are independent random variables allows Equation 8 to become Equation 9: var(X)Y) + X 2 ) Y 2 ) 2 @ X @ Y (9) Keeping in mind that X = 0 and Y = 0 eliminates the cross-coupled term and reduces Equation 9 to Equation 10: var(X)Y) + X 2)Y2 + s 2 X)s2 Y (10) Equation 10, in turn, reveals Equation 11: var(X)Y) + s 2X)Y + s 2 X)s2 Y (11) Ǹ 2 and, by the definition of RMS(X) + s X + sx , Equation 11 becomes Equation 12: RMS (X)Y) + s X)Y + Ǹs2 X)s 2Y (12) again, assuming the mean of the noise sources is zero. It should be easy to see how Equation 12 could be extended to more than two random variables because the RMS result of adding two random variables is simply the square root of the sum of the variances when the random variables are independent and have a mean value of zero. Furthermore, note how superposition holds for adding the variances under the radical. The persistence of this property allows the output noise from each noise source to be calculated independently; then sum the variances to obtain the final result. Once one has the method for calculating the total output noise of the system (by extension of Equation 12), it is necessary to revisit the circuit in Figure 3 and insert the noise sources to begin the analysis. Figure 4 shows this modification using Norton form noise sources across the resistive elements. SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 5 Noise Calculation for the Amplifier www.ti.com In, Rf In, Ri Rf Ri Vn,i Vn,amp V Vn,o In-,amp In, Rb Rb In+,amp Figure 4. Amplifier Circuit with Noise Sources Included The analysis for noise begins the same as any circuit analysis. This procedure may seem invalid as a result of the foregoing discussion for addition of RMS sources; keep in mind, though, that the independence of each source is not compromised when multiplying them by scalar coefficients that themselves do not depend on the sources. That is, αX = αX and α2 X 2 = (αX)2. This point will become clear after completing the first step of the analysis. In the analysis, the amplifier is considered ideal with infinite gain, thus forcing the two input nodes to the same voltage. Labeling the input node voltage as v and summing the currents at the two input nodes results in Equation 13 and Equation 14: v*V n, o v*V n, i ) ) I n, R ) I n, R ) I n−, amp + 0 i f Rf Ri (13) v*V n, amp ) I n, R ) I n), amp + 0 b Rb (14) Solving Equation 13 and Equation 14 simultaneously for Vn,o and eliminating v leaves an equation that defines the random variable Vn,o as a sum of multiple independent random variables multiplied by scalar coefficients, as shown in Equation 15: V n, o + I n, R Rf ) I n, R R f ) I n−, ampR f * V n, i i f Ǔ ǒ Ǔ ǒ ǒ R R R Rf ) Vn, amp 1) f *I n, R R b 1) f *I n), ampR b 1) f b Ri Ri Ri Ri Ǔ (15) Equation 15 represents the instantaneous output noise voltage Vn,o as the sources are sampled. Recognizing again that αX = αX and α2 X 2 = (αX)2, then, each term in Equation 15 is identified as an independent random variable. Therefore, the RMS value of Vn,o is the square root of the expected value of the sum of these random variables, and, by extension of Equation 12, yields Equation 16: RMSǒV n, oǓ + Ǹ ǒI 2 Ǔ ǒ Ǔ 2 2 ǒ ǒ Ǔ n, R R f ) I n, R R f ) I n−, ampR f ) * V n, i i f Rf Ri 2 Ǔ )ǒV ƪ1) RR ƫ Ǔ )ǒ* I 2 f n, amp i n, R b ƪ 2 R b 1) Rf Ri ƫ Ǔ )ǒ* I ƪ n), ampR b 1) Rf Ri ƫǓ 2 (16) Simplifying, Equation 16 then becomes Equation 17: RMSǒV n, oǓ + Ǹ I 2 n, R 2 i Rf ) I 2 n, R 2 f R f )I 2 n−, amp 2 R f )V 2 n, i Rf Ri 2 2 )V 2 n, amp ǒ R 1) f Ri 2 Ǔ )I 2 n, R b Rb 2 ǒ R 1) f Ri 2 Ǔ )I 2 n), amp Rb 2 ǒ R 1) f Ri Ǔ 2 (17) in which all the negated terms have become positive because of the squaring operation. 6 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Modeling the DAC as a Variable Impedance www.ti.com Since the following analysis is only concerned with the noise generated due to the circuit topology itself, the term containing V2 n, i can be removed, yielding an equation for the RMS value of Vn,o as a function of only the noise sources in the circuit, producing Equation 18: RMSǒV n, oǓ + Ǹ I 2 n, R 2 i Rf ) I I n(R) + 2 n, R 2 f R f )I 2 n−, amp 2 R f )V 2 n, amp ǒ R 1) f Ri 2 Ǔ )I 2 n,R b Rb 2 ǒ R 1) f Ri 2 Ǔ )I 2 n), amp Rb 2 ǒ1) RR Ǔ f i (18) Ǹ4kT R Substitution of for the noise sources associated with the resistors and simplifying, Equation 18 has the final form of Equation 19: RMSǒV n, oǓ + Ǹ R R 4kT ǒR ǒ1) Ǔ)R ǒ1) Ǔ Ǔ)ǒV R R 2 f f b f 2 2 n,amp i i )I 2 n),amp Rb 2 Ǔǒ1) RR Ǔ )I f 2 n−,amp Rf 2 i (19) Equation 19 thus represents the RMS noise voltage that will be seen at the output of the amplifier. Notice how the thermal noise term of the resistors has been combined into a single generalized noise term. This calculation completes the noise analysis of the circuit in Figure 4. Before we can move any further, it is necessary to model the DAC being used as a variable resistor to replace variables in Equation 19. Therefore, we will revisit Equation 19 in Section 5. 3 Modeling the DAC as a Variable Impedance A typical multiplying DAC is constructed with an R-2R ladder and switches that are used to steer current between a noninverting output node, Iout+ , and an inverting output node, Iout–. Figure 5 shows the structure of a typical R-2R DAC circuit. Rref R R R R R R Vref 2R Bd-1 0 2R Bd-2 1 0 2R Bd-3 1 0 2R B2 1 0 2R B1 1 2R 2R B0 0 1 0 1 IoutIout+ Rout+ Figure 5. R-2R DAC Ladder Network with Switches The current out of the noninverting node is defined as Equation 20: V I out) + ref @ n Rref N (20) where Rref is the impedance looking into the Vref node. Inherently, by design of the R-2R ladder network, this impedance is always constant regardless of the code word applied to the DAC, assuming both the Iout+ and Iout– nodes are at the same voltage potential. In generalized DAC usage, the Vref node is the DAC reference voltage; when used in a multiplying form, however, it is fed the input signal, Vin . Thus, for the purposes of this discussion, Vin is henceforth synonymous with Vref. N is a constant that is 1 greater than the maximum allowed codeword the DAC can accept, and n is the codeword applied to the DAC, ranging as 0 ≤ n ≤ N – 1, which can be seen by recognizing Equation 21: d*1 n+ ȍb2 , N + 2 i d i (21) i+0 and d is the number of binary digits in the code word. SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 7 Modeling the DAC as a Variable Impedance www.ti.com Even though the impedance looking into the Vref node is constant, the impedance looking into the current output node is not constant, because the current out is a function of the code word applied. The impedance Rout+, looking into the Iout+ node, can be identified by recognizing that it is equal to the ratio of Vref / Iout+. Rearranging the terms of Equation 20 generates Equation 22, identifying this impedance in terms of the parameters specific to the DAC. V R out) + ref + R ref N n I out) (22) It is important to note here that n < N holds true for all values of n; this leads to the knowledge of N / n > 1 at all times. By inspection of Equation 22, one can see the output impedance will always be greater than the input impedance seen at the DAC Vref node; that is, Rout+ > Rref is always true. The reason for recognizing this will become evident later on. Referring to Equation 22, one can see that as the value of n gets smaller, the value of Rout+ gets larger until n = 0, at which time Rout+ approaches infinity. The converse is also true: as the value of n gets larger the value of Rout+ gets smaller. Recalling that both n < N and Rout+ > Rref are always true, then as n gets larger, the value of Rout+ approaches that of Rref. Since the maximum value of n is N – 1, Equation 23 gives the minimum value of Rout+, denoted by R'out+: RȀ out) + Rref N N*1 (23) At this time it is beneficial to generalize the output impedance Rout+ (from Equation 22) to a form that depends on the minimum and maximum gain required by the circuit. The generalization is accomplished by introducing two additional terms, gmin and gmax. These terms identify the minimum gain and maximum gain of the system, respectively. Further, the variable η will represent a normalized code word to range from 0 ≤ η ≤ 1, where η = 0 represents the minimum gain of the system (gmin) and η = 1 represents the maximum gain of the system (gmax). This representation merely scales the DAC codeword (possibly with a negative correlation to the original DAC codeword n), simplifying some of the equations; more importantly, however, it is considered to be a continuous variable, or effectively a DAC with an infinite number of bits, but still limited to a minimum Rout+ of R'out+. Having a continuous variable allows us to set the gain of both topologies to the same value, providing a means to compare them fairly. Lastly, a subscript of i or f will be used to indicate if η is varying the input (ηi) or feedback (ηf) impedance. As indicated above, it is required to set the gains of each system equal to each other for comparison, but doing so does not necessarily mean the gain control variable η has the same value for both forms. From these generalizations, the circuits of Figure 1 and Figure 2 can be drawn as Figure 6 and Figure 7, respectively. Rf Ri(hi) Vi Vo Rb Figure 6. Inverting Amplifier with Generalized Variable Impedance on Input Rf(hf) Ri Vi Rb Vo Figure 7. Inverting Amplifier with Generalized Variable Impedance on Feedback 8 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Determination of Component Values www.ti.com Looking at the two topologies shown in Figure 6 and Figure 7, and recognizing Equation 24: the variable impedances : ąąą ąR iǒhiǓ and R fǒhfǓ ąąą vary as : ą ąR ref N v Rxǒh xǓ v R (N*1) (24) We now note the following observations: • the gain of Figure 6 varies from 0 to Rf / R'out+; and • the gain of Figure 7 varies from R'out+ / Ri to ∞ Because one topology is limited by a maximum gain, and the other topology is limited by a minimum gain, a comparison of these systems must be limited to the range of gain overlapped by both topologies. As will be seen in Section 4, as long as gmin > 0 and gmax < ∞, virtually any gain range (within reason) can be realized for both topologies. 4 Determination of Component Values At this time, the reader is reminded that we need to determine the RMS noise with respect to the gain of the system. However, the gain of the system depends on the impedance seen at the output of the DAC, which in turn depends on the code word applied to the DAC. It is necessary to determine the inverse; that is, we need to calculate the output impedance of the DAC when a given gain value is requested. The remainder of this section is devoted to developing equations of this nature, one for each of the competing topologies. To begin with, we will calculate the component values for the topology illustrated in Figure 6. The gain function for this circuit is Rf / Ri. The variable resistor Ri represents the DAC, and Rf is simply a fixed value impedance. From the gain function, we recognize that because Rf does not change, Ri must be at its minimum when the gain is at its maximum. Our earlier discussion revealed that R'out+ is the minimum resistance visible looking into the Iout+ node of the DAC. Therefore, since maximum gain is achieved when Ri is at its minimum value: R i must be + RȀ out) when : Rf + gmax Ri This conclusion leads to the following realization when gain is at the maximum (gmax) for the circuit of Figure 6. Rf Rf + + g max å R f + gmax RȀ out) RȀ out) Ri (25) As explained earlier, the actual impedance of Ri is going to be a function of the value of ηi as it ranges from 0 to 1. A simple definition of Ri can be defined as Ri = fi(ηi) R'out+. Knowing that Ri ≥ R'out+ implies that fi(ηi) ≥ 1 must also be true. This definition of Ri, along with the results of Equation 25, allows us to write a gain function, gi(ηi), of the variable gain amplifier illustrated in Figure 6 as Equation 26: R g max RȀ out) gmax g i ǒhiǓ + f + + Ri f i ǒh iǓRȀ out) f i ǒh iǓ (26) Recall that gain is maximal when ηi = 1; Equation 26 allows writing the mathematical statement of Equation 27: g max gmax g max + å f i (1) + g + 1 max f i (1) SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated (27) 9 Determination of Component Values www.ti.com Further, again by definition, gain is minimal when ηi = 0. Equation 26 again provides the result, in Equation 28: gmax gmax g min + å f i ǒ0 Ǔ + g ǒ Ǔ min fi 0 (28) Assuming gmin < gmax (a reasonable assumption), it can be seen from Equation 28 that fi(0) > 1 as it should be, since the impedance of the DAC can only increase from R'out+. A simple mechanism for fi(ηi) can now be defined by weighting the maximum and minimum gain forms found in Equation 27 and Equation 28 as ηi ranges from 0 to 1. The result is Equation 29: g g g fi (hi ) = hi fi (1) + (1 - hi )fi (0) = hi g max + (1 - hi ) gmax = hi + (1 - hi ) gmax max min min (29) Substituting Equation 29 back into Equation 26 provides the final form of the gain function in terms of ηi as Equation 30: gmax gmax g min g max g i ǒhiǓ + + g max + ǒ Ǔ ǒ Ǔ f i hi h i gmin)ǒ1*h iǓ g max hi) 1*h i g (30) min It can easily be verified that when ηi = 0, gi(0) = gmin; and when ηi = 1, gi(1) = gmax. Although the function in Equation 30 is not linear, it does vary monotonically from gmin to gmax. Remembering that the gain function of Figure 6 is Rf / Ri allows Equation 31: Rf g min gmax + Ri hi g min)ǒ1*h iǓ gmax (31) Replacing Rf with the representation revealed in Equation 25 and solving for Ri results in Equation 32: hi g min)ǒ1*h iǓ gmax gmax RȀ out) g min g max Rf + + å Ri + RȀ out) g min Ri Ri h i gmin)ǒ1*h iǓ g max (32) Having definitions of Rf and Ri represented by Equation 25 and Equation 32, respectively, provides a model of the programmable gain amplifier circuit of Figure 6, in which the components are defined by the minimum impedance looking into the DAC of R'out+, the minimum gain of the circuit gmin, and the maximum gain of the circuit, gmax. In a similar manner, the values for the topology of Figure 7 are determined. In this case, Rf represents the DAC, implying that Ri is fixed in value. In this configuration, minimum gain is achieved when Rf is also at a minimum value, thereby allowing the definition of Equation 33: RȀ RȀ Rf + out) + g min å R i + g out) Ri min Ri (33) Representing Rf as a function of ηf, the gain function of the system in Figure 7 can be written as Equation 34: RȀ out) f f ǒhfǓ R g f ǒhfǓ + f + + g min f f ǒhfǓ RȀ out Ri gmin (34) Since gain is maximal when ηf = 1, we then find Equation 35: g max g max + gmin f f (1) å f f (1) + g min (35) Further, gain is minimal when ηf = 0, providing Equation 36: g g min + gmin f f ǒ0 Ǔ å f f ǒ0 Ǔ + g min + 1 min (36) Continuing the assumption that gmin ≤ gmax, Equation 35 and Equation 36 show also that ff(ηf) > 1 for ηf > 0, which agrees with the requirement of Rf ≥ R'out+. (Of course, this is only looking into the Iout+ node of the DAC.) In a similar fashion for generating Equation 29, the following function for ff(ηf) can be achieved with a simple weighting mechanism as shown in Equation 37: g g g ff (hf ) = hf ff (1) + (1 - hf )ff (0) = hf g max + (1 - hf ) gmin = hf gmax + 1 - hf min min min (37) 10 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Gain Scaling and Comparison www.ti.com Substituting Equation 37 back into Equation 34 provides the final form of the gain function for the topology of Figure 7 in terms of ηf, as demonstrated by Equation 38: gmax g f ǒhf Ǔ + gmin f f ǒh f Ǔ + g min hf g )1*h f + h f gmax)ǒ1*h f Ǔ g min min (38) ǒ Ǔ Validating Equation 38 at the limits of ηf shows that when ηf = 0, gf(0) = gmin, and when ηf = 1, gf(1) = gmax. Since the gain function of Figure 7 is also Rf / Ri, the implication of Equation 39 arises: Rf + hf g max)ǒ1*h f Ǔ gmin Ri (39) Substituting in for the representation in Equation 33 and solving for Rf results in Equation 40: h f g max)ǒ1*hf Ǔ gmin R Rf + RȀ f + hf gmax)ǒ1*h f Ǔ g min å Rf + RȀ out) g min Ri out) gmin (40) Equation 25, Equation 32, Equation 33, and Equation 40 provide the necessary information to complete the two competing circuit topologies, except for the bias resistor, Rb. The usual choice for Rb is to set its value equal to the parallel combination of Rf and Ri. The reason for choosing this value is to provide the same Thevenin impedance for both the inverting and noninverting nodes of the amplifier input stage. Doing so minimizes offset bias because of the finite impedance of the amplifier inputs. Unfortunately, since one of the impedances must change for variable gain to exist, the bias resistor Rb must also change, which would then require a second DAC solely for bias impedance adjustment. This second DAC would create additional costs for what is generally considered an insignificant gain in performance for this type of circuit; therefore, the resistor is chosen as a fixed value for a gain that statistically would be used most prevalently. For the purposes of this discussion, Rb will be set equal to R'out+, which is roughly comparable to a midscale gain value. 5 Gain Scaling and Comparison As mentioned previously, a proper comparison of the two topologies must take place when the gain for each circuit is the same. Otherwise, the delta in gain between the two circuits skews the comparison results. It would be particularly convenient if the same independent variable could be used for both gain functions such that the same gain for both topologies would be achieved for a given input. To accomplish this, choose one of the independent variables to represent the other, set the two gain functions equal to each other and solve for one of the independent variables in terms of the other, as shown in Equation 41: h f gmax g min g max + h f gmax)ǒ1*h fǓ g min å hi + h f g max)ǒ1*hf Ǔgmin h i gmin)ǒ1*h i Ǔ g max (41) Substitution of Equation 41 back into Equation 32 makes the function for the input impedance Ri, when using ηf as the independent variable, look like Equation 42: gmax Ri + RȀ out) hf g max)ǒ1*h f Ǔ g min (42) At this point, the gain variable ηf is now common to both sets of equations, so the subscript f will be dropped, leaving only η, so the reader does not continue to associate it with the feedback topology only. Substituting the results of Equation 25 and Equation 42 into Equation 19 generates Equation 43: 2 RMS(Vn, o ) = i 4kTgmaxR´out+ [ 1 + hgmax + (1 - h)gmin ] + 4kTRb[ 1 + hgmax + (1 - h)gmin ] 2 2 2 2 2 2 + Vn,amp [ 1 + hgmax + (1 - h)gmin ] + In+,amp Rb [ 1 + hgmax + (1 -h)gmin ] + In-,amp (gmaxR´out+) 2 (43) SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 11 Gain Scaling and Comparison www.ti.com Equation 43 has its terms broken down to show the contribution due to the variances of the thermal noise from Rf and Ri, the thermal noise arising from the bias resistor Rb, the input-referred voltage noise Vn,amp, the input-referred, noninverting current noise In+,amp, and the input-referred, inverting current noise In–,amp. Substituting Equation 33 and Equation 40 into Equation 19 generates Equation 44: R´out+ 2 4kT g (gmin + hgmax - hgmin)(1 + hgmax + gmin - hgmin) + 4kTRb [ 1 + hgmax + (1 - h)gmin ] min RMS(Vn, o ) = f 2 2 + Vn,amp [ 1 + hgmax + (1 - h)gmin ] + 2 2 In+,amp Rb 2 [ 1 + hgmax + (1 - h)gmin ] + 2 2 In-,amp R´out+ 2 hgmax + (1 - h)gmin gmin (44) At this point, we can compare Equation 43 and Equation 44 to see how the output noise value varies over gain for both of them. This comparison is rather difficult to do mathematically because the ratio of Equation 43 to Equation 44 does not simplify much further. However, one can compare each individual term (or variance) under the radical to get a feeling of where any change in noise is coming from. Taking the ratio of the variance term Vn,amp from Equation 43 with respect to the variance term Vn,amp from Equation 44 gives Equation 45: V 2n,ampƪ1)hgmax)ǒ1*h Ǔ gmin ƫ 2 V 2n,ampƪ1)hgmax)ǒ1*h Ǔ gmin ƫ 2 +1 (45) Similarly, the variance terms In+,amp show Equation 46: 2 2 I n),amp R b ƪ1)hg max)ǒ1*h Ǔ g min ƫ 2 2 2 I n),amp R b ƪ1)hg max)ǒ1*h Ǔ g min ƫ 2 +1 (46) In the same way, as well, the thermal noise associated with Rb variance terms yields Equation 47: 4kTR b ƪ1)hg max)ǒ1*h Ǔ g min ƫ 2 4kTR b ƪ1)hg max)ǒ1*h Ǔ g min ƫ 2 +1 (47) So far, the news is not too eventful. According to Equation 45, Equation 46, and Equation 47, the noise arising from the input-referred noise sources Vn,amp, In+,amp and the thermal noise associated with the bias resistor Rb are the same in both topologies, regardless of the gain of the circuit. Now compare the inverting input-referred current noise source In–,amp variances to get Equation 48: 2 I n−,amp ǒgmax RȀ out)Ǔ 2 ǒ I n−,amp RȀ out) 2 h gmax)ǒ1*h Ǔ g min gmin Ǔ + 2 g min 2 gmax 2 ƪhg max)ǒ1*h Ǔ g min ƫ 2 (48) And the comparison of the thermal source of Rf and Ri together indicates the results of Equation 49: 4kTg max RȀ out) ƪ1)hg max)ǒ1*h Ǔ gminƫ gmin g max + RȀ out) ǒ Ǔ hg max ) 1*h g min ǒg min)hgmax*h gmin Ǔǒ1)h gmax)g min*hg min Ǔ 4kT g min (49) Note that: g min gmax hg max )ǒ1*h Ǔ g min is merely a negatively-weighted gain function—that is, gain is at maximum when η = 0 and gain is at minimum when η = 1. Recognizing also that Equation 48 and Equation 49 are terms under the radical, one can say from Equation 48 that putting the DAC on the input causes the noise from the input-referred current noise source In–,amp to change proportionately to gain with respect to a circuit where the DAC is placed in the feedback path. 12 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Gain Scaling and Comparison www.ti.com Similarly, Equation 49 indicates the thermal noise from the Rf and Ri impedances when the DAC is on the input changes at the square root of gain when compared to a circuit where the DAC is placed in the feedback path. Since Equation 48 and Equation 49 are negatively-weighted gain functions, the noise ratio increases at lower gains and decreases at higher gains. For example, using an OP27 for the amplifier, set the bias resistor to be equal to R'out+, Rref to be 5kΩ, In,amp is 1 • 10-12 A/√Hz, Vn,amp is 3 • 10-9 V/√Hz, and set the gain to range from gmin = 1 to gmax = 100. Further, recognizing that Equation 43 and Equation 44 are voltage noise density functions, they are multiplied by the square root of the bandwidth of interest, which for this example will be √20kHz. Using these values, Equation 43 and Equation 44 generate the plots shown in Figure 8. -75 Noise (dB) -80 -85 -90 BW = 20kHz OP27 Rref = 5kW gmin = 1 gmax = 100 DAC on Input DAC in Feedback -95 -100 -105 1 10 Gain 100 Figure 8. Noise vs Gain (OP27) Figure 8 clearly shows how placing the DAC in the feedback path provides less overall noise for the given system. For the current example, this represents around 25dB less noise at low gains. Notice how in the above example, the two noise levels are the same at maximum gain. In general, this is not forced by the equations. To see this effect, set Equation 43 equal to Equation 44 and solve for η to get Equation 50: g min ǒgmax*1 Ǔ h + g *g max min (50) Figure 8 implies putting the DAC in the feedback path of the amplifier is always the best option for noise. In general this is true but one needs to look at some of the curiosities of Equation 50. For example, setting η = 1 (maximal gain) and simplifying generates Equation 51 from Equation 50: g min ǒgmax*1 Ǔ 1 + g *g å g min + 1 max min (51) Therefore, if gmin = 1, then the noise of the system will be the same at maximal gain. However, setting η = 0 and simplifying yields Equation 52: g min ǒgmax*1 Ǔ 0 + g *g å g max + 1 max min (52) Indicating that gmax = 1 (meaning the system is always attenuating) implies that the DAC on the input is a better choice for noise. This is usually not the case since one does not require an amplifier for pure attenuation. However, it is possible the gain range may attenuate at minimal gain and provide a gain greater than one at maximal gain. In this situation, Equation 50 can indicate where the two noise functions cross allowing the designer to determine which is more important, noise at lower gains or at higher gains. SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 13 Heuristic Reasoning www.ti.com Finally, if gmin > 1, Equation 50 shows the result given in Equation 53: g min ǒgmax*1 Ǔ hgmax h + g *g å g min + max h*1)g min max ą ąąąąąąąąĂå 1 t hg max h*1)gmax ą ąąąąąąąąĂå 1 t h (53) Since, by definition, 0 ≤ η ≤ 1, Equation 53 implies that if gmin > 1, then over the range of gain defined by gmin and gmax, the noise is always better using the DAC in the feedback path; that is, the two noise functions cross beyond the maximum defined gain, when gmax > gmin > 1 and 0 ≤ η ≤ 1. 6 Heuristic Reasoning Equation 48 and Equation 49 show there is a real difference in the amount of noise generated from each of the competing topologies. Further, Equation 51, Equation 52, and Equation 53 indicate the ability to manage which topology has the most noise by adjusting the minimum and maximum gains in the system. In Section 2, the notion of noise energy being constant was briefly discussed, which may have led one to believe the results of this investigation should have indicated no difference as a result of topology. The questions of Why is there a difference? and Does it make sense that there is a difference? are yet to be answered. The problem with answering these questions is they are not necessarily just analytic issues. We need to see the results not just as equations, but also as making sense in the world in which we live. For example, water running downhill makes sense because we see it all the time; it's just normal. Noise, however, is something we put up with all the time; but managing it is not something we visualize regularly. This section attempts to provide some heuristic justification to the analytic results previously obtained. To begin with, take a look at a simple noise source and the load (the rest of the circuit) attached to it (see Figure 9). + In = 4kT R R ZL V IR IL - Figure 9. Noise Source Connected to Load It is easy to see in Figure 9 that the noise current In is equal to the sum of the current in the resistor IR and the current in the load impedance IL. Note that some of the current from the noise source is dissipated within the resistor that defines it. Even though 4kT Joules of RMS energy are being injected into the system, only part of it is being dissipated by the load; that is, the rest of the circuit only dissipates part of the noise energy. Further, from communication theory and Figure 9, one should recognize that maximum noise power will be transferred to the load when ZL = R. As the ratio of ZL : R deviates from unity, the power transferred will drop off logarithmically towards zero. If ZL is allowed to approach infinity, then there is no power transferred to the load, but the maximum noise voltage is seen across the load. Even though we are seeing noise voltage across the infinite load, all of the noise power is being dissipated in the resistor. The noise voltage can be calculated as: I nR + R Ǹ4kT + Ǹ4kTR R which is the same as if we had used a Thevenin form of the noise source instead of a Norton form. 14 Topology and Noise Using Multiplying DACs SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated Additional Comments www.ti.com At this point, we have an answer to the first question: Why is there a difference? Because even though the noise power in a resistor is the same regardless of the resistor value, the amount of noise seen by the system is due to the ratio of the value of the resistor generating the noise and the impedance of the rest of the circuit. In the circuit of Figure 3, the noise resistor of Figure 9 can be represented by the parallel combination of the feedback and input resistors Rf and Ri, respectively. The load impedance is represented by the inverting amplifier input impedance. Since the amplifier input node represents a very high impedance load, infinite in the ideal case, the voltage noise developed across the parallel resistor combination will be amplified accordingly even though no noise power is delivered to the amplifier. Equation 25 and Equation 33 define the values of the other resistors in the network from the reference input impedance of the DAC. Looking at the actual values used in the example—where gain ranged from 1 to 100—the resistor values were Ri = R'out+ for the DAC in the feedback path, and Rf = 100 • R'out+ for the DAC being in the input path. Since the impedance of the DAC is always at least R'out+, the parallel combination of impedance for the DAC in the feedback path is much lower than when the DAC is in the input path. Now we can answer the other question: Does it make sense that there is a difference? The answer is yes. It makes sense because the parallel combination of impedances between the two competing topologies is not the same. The topology with the DAC in the feedback path has much lower parallel impedance, making the noise voltage seen at the inverting input of the amplifier much lower as well. Further, one should recognize that where the noise plots intersect is the point where the parallel impedance of both topologies is the same. 7 Additional Comments • • • • It is noted, for the topology where the DAC is on the input (Figure 6), the gain as a function of DAC code word n is a linear function; thus, gain scales proportionately to the codeword. Conversely, for the topology where the DAC is in the feedback path (Figure 7), the gain is inversely proportional to the DAC code word. This observation provides a nonlinear response to the codeword applied, but the resulting gain function is still monotonic. This effect will need to be taken into account if the gain value is determined by some other linear mechanism. Further, the gain function resolution is worse at high gains. So, a higher resolution DAC may be required to achieve the necessary resolution for the design. The noise discussion only considered the thermal noise of the system. It did not consider the 1/f noise that can dominate at low frequencies. The circuit analysis will be the same with the addition of a second set of frequency-dependent noise sources for the amplifier in parallel with the ones defined in the analysis. For the OP27 amplifier used in the example noise calculations here, this corner frequency is at approximately 2.7Hz. Consequently, this form of noise can be considered negligible for frequencies above 30Hz or so. The reader should also keep in mind that the OP27 amplifier is a lownoise amplifier; this assumption may not hold for other amplifiers. The noise generated by the use of Rb in the circuit can be eliminated by setting Rb = 0. This configuration can have some deleterious effects on the circuit depending on the amplifier used; in general, this approach is not recommended without due diligence given to proper analysis. Another method of minimizing this noise is to place a large decoupling capacitor, Cb, in parallel with Rb. This capacitance causes the noise arising from Rb and the input-referred, noninverting current noise to be frequency-dependent and minimizes these noise sources at higher frequencies. It is noted that adding this capacitance will not affect the comparison described in this report, since the noise will behave the same way in both topologies. This principle can be easily understood if one allows: Z b + Rb ø C b Substituting Zb for Rb and replicating the above analysis provides similar results. Section 6 may have helped us to believe that our analysis is correct, but it also eludes the the fact that noise management is accomplished by managing energy as a whole, not simply the voltage or current manifested from this energy. Engineers generally learn early on that maximum power transfer is a good thing; in minimizing noise, though, it is just the opposite, because we want to transfer as little noise power as possible. The discussion of placing a capacitor across the Rb resistor as a means to reduce noise is a direct application of minimizing power transfer as it shorts the source terminals at higher frequencies. Learning to look at components as power sources and visualizing where that power will be transferred are critical to successful noise reduction. SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Topology and Noise Using Multiplying DACs Copyright © 2006–2015, Texas Instruments Incorporated 15 Conclusion www.ti.com The above discussion has taken the reader through a definition of noise based on the units of noise given in the specifications of most amplifiers. A method for analysis of this noise was also derived. These mechanisms should provide an engineer with the necessary tools to apply noise analysis to more generalized circuitry. The development of a method to replace an R-2R multiplying DAC with a generalized impedance that allows comparison of multiple topologies was then undertaken. This lengthy procedure is typical of the steps required to make fair comparisons. Whether or not this portion of the discussion provides the reader with useful tools beyond the narrow scope of this paper is not known; however, at the very least, several lessons were imparted for deriving fair comparisons. 8 Conclusion The results derived in Section 5 clearly show the differences in RMS noise between the two competing topologies. Further, the topology with the DAC in the feedback path is better overall when the minimum gain is at least one. Should the range of gain include the value of one, then the two topologies will have a common SNR point, given by Equation 50, for which gain values above this point indicate the DAC on the input signal path will provide lower noise relative to the other topology. In Section 6, it was shown that the reason for one topology having lower noise with respect to the other is due to the different impedances seen by the inverting amplifier node in each configuration. As always, it is up to the designer of any circuit to determine what is necessary to accomplish the overall performance goal. 9 References • • • • • Steffes, M. (2005). Noise analysis for high-speed op amps. Texas Instruments application report (SBOA66A). Available for download at www.ti.com. Razavi, B. (2001). Design of analog CMOS integrated circuits. Boston, MA: McGraw-Hill. Ross, S.M. (1997). Introduction to probability models. (6th edition). San Diego, CA: Academic Press Soclof, S. (1991). Design and applications of analog integrated circuits. Englewood Cliffs, NJ: PrenticeHall. Tsividis, Y. (1999). Operation and modeling of the MOS transistor. (2nd edition). New York: McGrawHill. Revision History Changes from Original (December 2006) to A Revision ................................................................................................ Page • Changed format to current TI application report template. .......................................................................... 1 NOTE: Page numbers for previous revisions may differ from page numbers in the current version. 16 Revision History SBAA146A – December 2006 – Revised May 2015 Submit Documentation Feedback Copyright © 2006–2015, Texas Instruments Incorporated IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed. TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in safety-critical applications. In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. Nonetheless, such components are subject to these terms. No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties have executed a special agreement specifically governing such use. Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of non-designated products, TI will not be responsible for any failure to meet ISO/TS16949. Products Applications Audio www.ti.com/audio Automotive and Transportation www.ti.com/automotive Amplifiers amplifier.ti.com Communications and Telecom www.ti.com/communications Data Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computers DLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-apps DSP dsp.ti.com Energy and Lighting www.ti.com/energy Clocks and Timers www.ti.com/clocks Industrial www.ti.com/industrial Interface interface.ti.com Medical www.ti.com/medical Logic logic.ti.com Security www.ti.com/security Power Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defense Microcontrollers microcontroller.ti.com Video and Imaging www.ti.com/video RFID www.ti-rfid.com OMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.com Wireless Connectivity www.ti.com/wirelessconnectivity Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2015, Texas Instruments Incorporated