1 Basic Principles: 1.1 Ohm's Law
1 Basic Principles: 1.1 Ohm's Law
1 Basic Principles: 1.1 Ohm's Law
1 Basic Principles
In electromagnetism, voltage is a unit of either electrical potential or EMF. In electronics, including the text, the term voltage" refers to the physical quantity of either potential or EMF. Note that we will use SI units, as does the text. As usual, the sign convention for current I = dq=dt is that I is positive in the direction which positive electrical charge moves. We will begin by considering DC i.e. constant in time voltages and currents to introduce Ohm's Law and Kircho 's Laws. We will soon see, however, that these generalize to AC.
For a resistor R, as in the Fig. 1 below, the voltage drop from point a to b, V = Vab = Va , Vb is given by V = IR.
I a R b
Figure 1: Voltage drop across a resistor. A device e.g. a resistor which obeys Ohm's Law is said to be ohmic. The power dissipated by the resistor is P = V I = I 2R = V 2=R.
Consider an electrical circuit, that is a closed conductive path for example a battery connected to a resistor via conductive wire, or a network of interconnected paths. 1. For any node of the circuit Pin I = Pout I . Note that the choice of in" or out" for any circuit segment is arbitrary, but it must remain consistent. So for the example of Fig. 2 we have I1 = I2 + I3. 2. For any closed circuit, the sum of the circuit EMFs e.g. batteries, generators is equal P P to the sum of the circuit voltage drops: E = V . Three simple, but important, applications of these laws" follow.
I3
I1
I2
Two resistors, R1 and R2, connected in series have voltage drop V = I R1 + R2. That is, they have a combined resistance Rs given by their sum:
Rs = R1 + R2
This generalizes for n series resistors to Rs = Pn i=1 Ri .
Two resistors, R1 and R2, connected in parallel have voltage drop V = IRp, where
Rp = 1=R1 + 1=R2 ,1
This generalizes for n parallel resistors to 1=Rp =
n X i=1
1=Ri
The circuit of Fig. 3 is called a voltage divider. It is one of the most useful and important circuit elements we will encounter. The relationship between Vin = Vac and Vout = Vbc is given by R 2 Vout = Vin R + R
1 2
A voltage source delivers a constant voltage regardless of the current it produces. It is an idealization. For example a battery can be thought of as a voltage source in series with a small resistor the internal resistance" of the battery. When we indicate a voltage V input to a circuit, this is to be considered a voltage source unless otherwise stated. A current source delivers a constant current regardless of the output voltage. Again, this is an idealization, which can be a good approximation in practice over a certain range of output current, which is referred to as the compliance range. 2
R1 Vin
R2
Vout
Thevenin's theorem states that any circuit consisting of resistors and EMFs has an equivalent circuit consisting of a single voltage source VTH in series with a single resistor RTH . The concept of load" is useful at this point. Consider a partial circuit with two output points held at potential di erence Vout which are not connected to anything. A resistor RL placed across the output will complete the circuit, allowing current to ow through RL. The resistor RL is often said to be the load" for the circuit. A load connected to the output of our voltage divider circuit is shown in Fig. 4 The prescription for nding the Thevenin equivalent quantities VTH and RTH is as follows: For an open circuit" RL ! 1, then VTH = Vout . For a short circuit" RL ! 0, then RTH = VTH =Ishort. An example of this using the voltage divider circuit follows. We wish to nd the Thevenin equivalent circuit for the voltage divider.
R1 Vin
R2
Vout
RL
The goal is to deduce VTH and RTH to yield the equivalent circuit shown in Fig. 5.
R TH
V TH
Figure 5: The Thevenin equivalent circuit. To get VTH we are supposed to evaluate Vout when RL is not connected. This is just our voltage divider result: 2 VTH = Vin R R +R
2 Vin = IshortR1. 1 1
Note that this is the equivalent parallel resistance of R1 and R2. This concept turns out to be very useful, especially when di erent circuits are connected together, and is very closely related to the concepts of input and output impedance or resistance, as we shall see.
Now, the short circuit gives, by Ohm's Law, Solving for Ishort and combining with the VTH result gives R2 RTH = VTH =Ishort = RR1 +R
2
Recall that the Thevenin Theorem states that any collection of resistors and EMFs is equivalent to a circuit of the form shown within the box labelled Circuit A" in the gure below. As before, the load resistor RL is not part of the Thevenin circuit. The Thevenin idea, however, is most useful when one considers two circuits or circuit elements, with the rst circuit's output providing the input for the second circuit. In Fig. 6, the output of the rst circuit A, consisitng of VTH and RTH , is fed to the second circuit element B , which consists simply of a load resistance RL to ground. This simple con guration represents, in a general way, a very broad range of analog electronics.
Circuit A Circuit B
R TH
V TH
Vout
VTH is a voltage source. In the limit that RTH ! 0 the output voltage delivered to the load RL remains at constant voltage. For nite RTH , the output voltage is reduced from VTH by an amount IRTH, where I is the current of the complete circuit, which depends upon the value of the load resistance RL: I = VTH =RTH + RL . Therefore, RTH determines to what extent the output of the rst circuit behaves as an ideal voltage source. An approximately ideal behavior turns out to be quite desirable in most cases, as Vout can be considered constant, independent of what load is connected. Since our combined equivalent circuit A + B forms a simple voltage divider, we can easily see what the requirement for RTH can be found from the following: R VTH L Vout = VTH R + R = 1 + R TH L TH =RL
5
Thus, we should try to keep the ratio RTH =RL small in order to approximate ideal behavior and avoid loading the circuit". A maximum ratio of 1=10 is often used as a design rule of thumb. A good power supply will have a very small RTH , typically much less than an ohm. For a battery this is referred to as its internal resistance. The dimming of one's car headlights when the starter is engaged is a measure of the internal resistance of the car battery.
Our simple example can also be used to illustrate the important concepts of input and output resistance. Shortly, we will generalize our discussion and substitute the term impedance" for resistance. We can get a head start by using the common terms input impedance" and output impedance" at this point. The output impedance of circuit A is simply its Thevenin equivalent resistance RTH . The output impedance is sometimes called source impedance". The input impedance of circuit B is its resistance to ground from the circuit input. In this case it is simply RL. It is generally possible to reduce two complicated circuits, which are connected to each other as an input output pair, to an equivalent circuit like our example. The input and output impedances can then be measured using the simple voltage divider equations.
C = Q=VC
Capacitance is a purely geometric quantity. For example, for two planar parallel electrodes each of area A and separated by a vacuum gap d, the capacitance is ignoring fringe elds C = 0A=d, where 0 is the permittivity of vacuum. If a dielectric having dielectric constant is placed in the gap, then 0 ! 0 . The SI unit of capacitance is the Farad. Typical laboratory capacitors range from 1pF to 1F. For DC voltages, no current passes through a capacitor. It blocks DC". When a time varying potential is applied, we can di erentiate our de ning expression above to get C 1 I = C dV dt for the current passing through the capacitor.
Vin
Vout
The homogeneous solution is V = Ae,t=RC , where A is a constant, and a particular solution is V = Vin. The initial condition V 0 = 0 determines A, and we nd the solution
Consider the basic RC circuit in Fig. 7. We will start by assuming that Vin is a DC voltage source e.g. a battery and the time variation is introduced by the closing of a switch at time t = 0. We wish to solve for Vout as a function of time. Applying Ohm's Law across R gives Vin , Vout = IR. The same current I passes through the capacitor according to I = C dV=dt. Substituting and rearranging gives let V VC = Vout: dV + 1 V = 1 V 2 dt RC RC in
3
This is the usual capacitor charge up" solution. Similarly, a capacitor with a voltage Vi across it which is discharged through a resistor to ground starting at t = 0 for example by closing a switch can in similar fashion be found to obey V t = Vie,t=RC In both cases above, the rate of charge discharge is determined by the product RC which has the dimensions of time. This can be measured in the lab as the time during charge-up or discharge that the voltage comes to within 1=e of its asymptotic value. So in our charge-up example, Equation 3, this would correspond to the time required for Vout to rise from zero to 63 of Vin.
2.0.6 RC Integrator
Vin then the solution to our RC circuit becomes Z 1 4 Vout = RC Vintdt
7
Note that in this case Vin can be any function of time. Also note from our solution Eqn. 3 that the limit Vout Vin corresponds roughly to t RC . Within this approximation, we see clearly from Eqn. 4 why the circuit above is sometimes called an integrator".
2.0.7 RC Di erentiator
Vin
Vout
Figure 8: RC circuit | di erentiator. Applying Kircho 's second Law, we have Vin = VC + VR, where we identify VR = Vout. By Ohm's Law, VR = IR, where I = C dVC =dt by Eqn. 1. Putting this together gives d V , V Vout = RC dt in out In the limit Vin Vout, we have a di erentiator: in Vout = RC dV dt By a similar analysis to that of Section 2.0.6, we would see the limit of validity is the opposite of the integrator, i.e. t RC .
~V ~ = h 2V ~ + =2V ~ i1=2 V= V where denotes complex conjugation. The operation of determining the amplitude of a complex quantity is called taking the modulus. The phase is h i ~ = V ~ = tan,1 =V So for a numerical example, let have a real part of 5 volts and an imaginary part pa voltage ,1 3=5 tan ~ of 3 volts. Then V = 5 + 3 = 34e . ~ , formed by taking its modulus, simply as V . It is Note that we write the amplitude of V ~ j. We will also use this notation if there might be confusion in some context. often written jV Since the amplitude will in general be frequency dependent, it will also be written as V !. We will most often be interested in results expressed as amplitudes, although we will also look at the phase. Our technique is essentially that of the Fourier transform, although we will not need to actually invoke that formalism. Therefore, we will analyze our circuits using a single Fourier frequency component, ! = 2f . This is perfectly general, of course, as we can add or integrate over frequencies if need be to recover a result in time domain. Let our complex ~ = V e !t+ 1 and I ~ = Ie !t+ 2. Fourier components of voltage and current be written as V ~ =I ~Z ~, where Z ~ is the Now, we wish to generalize Ohm's Law by replacing V = IR by V complex impedance of a circuit element. Let's see if this can work. We already know that a resistor R takes this form. What about capacitors and inductors? Our expression for the current through a capacitor, I = C dV=dt becomes ~ = C d V e !t+ 1 = !C V ~ I dt 9
~ be the complex representation of V . Then we can write Let V ~ = V ~ + =V ~ = V e = V cos + sin V p where = ,1. V is the real amplitude:
q
~ =I ~Z ~C for the impedance of a capacitor, Z ~C , if Thus, we have an expression of the form V ~ we make the identi cation ZC = 1= !C . For an inductor of self-inductance L, the voltage drop across the inductor is given by Lenz's Law: V = LdI=dt. Note that the voltage drop has the opposite sign of the induced EMF, which is usually how Lenz's Law is expressed. Our complex generalization leads to ~ = L d Ie !t+ 2 = !LI ~ ~ =LdI V dt dt ~L = !L. So again the form of Ohm's Law is satis ed if we make the identi cation Z ~ =I ~Z ~ can be used to To summarize our results, Ohm's Law in the complex form V analyze circuits which include resistors, capacitors, and inductors if we use the following: ~R = R resistor of resistance R: Z ~C = 1= !C = , =!C capacitor of capacitance C : Z ~L = !L inductor of self-inductance L: Z
It is signi cant to point out that because the algebraic form of Ohm's Law is preserved, impedances follow the same rules for combination in series and parallel as we obtained for resistors previously. So, for example, two capacitors in parallel would have an equivalent ~p = 1=Z ~1 +1=Z ~2 . Using our de nition Z ~C = , =!C , we then recover impedance given by 1=Z the familiar expression Cp = C1 + C2. So we have for any two impedances in series clearly generalizing to more than two: ~s = Z ~1 + Z ~2 Z And for two impedances in parallel: ~1Z ~2 ~p = h1=Z ~1 + 1=Z ~2 i,1 = Z Z ~1 + Z ~2 Z And, accordingly, our result for a voltage divider generalizes see Fig. 9 to " ~2 Z ~ ~ 5 Vout = Vin ~ ~ Z1 + Z2 Now we are ready to apply this technique to some examples.
The con guration we wish to analyze is shown in Fig. 10. Note that it is the same as Fig. 7 ~int = Vine !t+ . of the notes. However, this time we apply a voltage which is sinusoidal: V As an example of another common variation in notation, the gure indicates that the input is sinusoidal AC" by using the symbol shown for the input. Note also that the input and output voltages are represented in the gure only by their amplitudes Vin and Vout, which also is common. This is ne, since the method we are using to analyze the circuit complex impedances shouldn't necessarily enter into how we describe the physical circuit. 10
Z ~ Vin Z
~ V out
Vin
Vout
Figure 10: A high-pass lter. We see that we have a generalized voltage divider of the form discussed in the previous ~1 = Z ~C = section. Therefore, from Eqn. 5 we can write down the result if we substitute Z ~2 = Z ~R = R: , =!C and Z " R ~ ~ Vout = Vin R , =!C
At this point our result is general, and includes both amplitude and phase information. ~in on both sides and nd Often, we are only interested in amplitudes. We can divide by V the amplitude of this ratio by multiplying by the complex conjugate then taking the square root. The result is often referred to as the transfer function of the circuit, which we can designate by T !. ~ !RC out = 6 T ! jV~outj = V jVinj Vin 1 + !RC 2 1=2 Examine the behavior of this function. Its maximum value is one and minimum is zero. You should convince yourself that this circuit attenuates low frequencies and passes" transmits with little attenuation high frequencies, hence the term high-pass lter. The cuto between high and low frequencies is conventionally described as the frequency at p which the transfer function is 1= 2. This is approximately equal to an attenuation of 3 decibels, which p is a description often used in engineering see below. From Eqn. 6 we see that T = 1= 2 occurs at a frequency 2f3db = !3db = 1=RC 11 7
The decibel scale works as follows: db= 20 log10A1=A2, where A1 and A2 represent any real quantity, but usually p are amplitudes. So a ratio of 10 corresponds to 20 db, a ratio of 2 corresponds to 6 db, 2 is approximately 3 db, etc.
An analogy with the analysis above, we can analyze a low-pass lter, as shown in Fig. 11.
R
Vin
Vout
Figure 11: A low-pass lter. You should nd the following result for the transfer function: ~ 1 out T ! jV~outj = V = 8 jVinj Vin 1 + !RC 2 1=2 You should verify that this indeed exhibits low pass" behavior. And that the 3 db frequency is the same as we found for the high-pass lter: 2f3db = !3db = 1=RC 9 We note that the two circuits above are equivalent to the circuits we called di erentiator" and integrator" in Section 2. However, the concept of high-pass and low-pass lters is much more general, as it does not rely on an approximation. An aside. One can compare our results for the RC circuit using the complex impedance technique with what one would obtain by starting with the di erential equation in time for an RC circuit we obtained in Section 2, taking the Fourier transform of that equation, then solving algebraically for the transform of Vout. It should be the same as our result for the amplitude Vout using impedances. After all, that is what the impedance technique is doing: transforming our time-domain formuation to one in frequency domain, which, because of the possibility of analysis using a single Fourier frequency component, is particularly simple. This is discussed in more detail in the next notes.
12
Before we look at some more examples using our technique of complex impedance, let's look at some related general concepts.
First, just a rede ntion of what we already have learned. The term reactance is often used in place of impedance for capacitors and inductors. Reviewing our de nitions of impedances ~C to just be equal to its impedance: from Section 3.2 we de ne the reactance of a capacitor X ~C , =!C . Similarly, for an inductor X ~L !L. This is the notation used in the text. X However, an alternative but common useage is to de ne the reactances as real quantities. This is done simply by dropping the from the de nitions above. The various reactances present in a circuit can by combined to form a single quantity X , which is then equal to the imaginary part of the impedance. So, for example a circuit with R, L, and C in series would have total impedance ~ = R + X = R + XL + XC = R + !L , 1 Z !C A circuit which is reactive" is one for which X is non-negligible compared with R.
As stated before, our technique involves solving for a single Fourier frequency component ~ = V e !t+ . You may wonder how our results generalize to other frequencies and such as V to input waveforms other than pure sine waves. The answer in words is that we Fourier decompose the input and then use these decomposition amplitudes to weight the output we found for a single frequency, Vout. We can formalize this within the context of the Fourier transform, whch will also allow us to see how our time-domain di erential equation became transformed to an algebraic equation in frequency domain. Consider the example of the RC low-pass lter, or integrator, circuit of Fig. 7. We obtained the di erential equation given by Eq. 2. We wish to take the Fourier transform of this equation. De ne the Fourier transform of V t as Z +1 1 dte, !tV t 10 v! FfV tg = p 2 ,1 Recall that FfdV=dtg = !FfV g. Therefore our di erential equation becomes
11 12
The general solution is then the real part of the inverse Fourier transform: Z +1 1 , 1 ~ 13 V t = F fv!g = p ,1 d!0e !0tv!0 2 In the speci c case we have considered so far of a single Fourier component of frequency ~in = Vie !t, then FfV ~intg = p2 ! , !0, and we recover our previous result for !, i.e. V the transfer function: 1 ~=V ~ =V ~in = T 14 1 + !RC For an arbitrary functional form for Vint, one could use Eqns. 12 and 13. Note that one would go through the same steps if Vint were written as a Fourier series rather than a Fourier integral. Note also that the procedure carried out to give Eqn. 11 is formally equivalent to our use of the complex impedances: In both cases the di erential equation is converted to an algebraic equation.
We now need to discuss nding the phase of our solution. To do this, we proceed as previously, for example like the high-pass lter, but this time we preserve the phase information ~out. The input to a circuit has the form V ~in = Vine !t+ 1, by not taking the modulus of V ~out = Voute !t+ 2. We are usually only interested in the phase di erence and the output V 2 , 1 between input and output, so, for convenience, we can choose 1 = 0 and set the phase shift to be 2 . Physically, we must choose the real or imaginary part of these expressions. Conventionally, the real part is used. So we have: ~in = Vin! cos!t Vint = V ~out = Vout! cos!t + Voutt = V Let's return to our example of the high-pass lter to see how to calculate the phase shift. We rewrite the expression from Section 3.3 and then multiply numerator and denominator by the complex conjugate of the denominator: " R !t 1 + =!RC ~out = V ~in V = V ine R , =!C 1 + 1=!RC 2 By recalling the general form a + b = a2 + b2 e , where = tan,1b=a, we can write 1
2 1 + =!RC = 1 + !RC allowing us to read o the phase shift: = tan,1 1=!RC ~out is then Our solution for V
" 1=2
and
e
15
~outj as we found before in Eqn. 6 of Section 3.3. But now This, of course, yields the same jV we also have included the phase information. The real" time-dependent solution is then just the real part of this: ~out = Vout cos!t + Voutt = V where is given by Eqn. 15.
Recall that for DC voltages and currents the power associated with a circuit element carrying current I with voltage change V is just P = V I . Now, for time-varying voltages and currents we have to be more careful. We could still de ne an instantaneous power as the product V tI t. However, it is generally more useful to average the power over time. Since we are considering Fourier components, we will average the results over one period T = 1=f = 2=!. Therefore, the time-averaged power is ZT 1 P = T V tI tdt 0 where the brackets indicate the time average. Let the voltage and current be out of phase by an arbitrary phase angle . So we have V t = V0 cos!t and I t = I0 cos!t + . We can plug these into the expression Rfor P and simplify using the following: R T 2 cos!t + T =R cos!t cos , sin!t sin ; 0 sin!t cos!tdt = 0; and 1=T 0 sin !tdt = 1=T 0T cos2!tdt = 1=2. This yields 1 V I cos = V I cos 16 P =2 0 0 RMS RMS In the latter expression we have used the root mean squared", or RMS, amplitudes. Using voltage as an example, the RMS and standard amplitudes are related by
ZT 1 VRMS T 0 V 2tdt " 1=2 ZT 1 = T 0 V02 cos2!tdt " 1=2
= V0 = 2
17
~ and I ~. Equivalent to above, we Our results above can be simply expressed in terms of V !t !t + ~ t = V0e and I ~t = I0e start with V . By noting that ~ I ~ = V0I0cos + sin = V0I0 cos V we identify an expression for average power which is equivalent to Eqn. 16 : 1 V ~ I ~ ~ ~ = 1 V P =2 2 I 15 18
Vin
Vout
Figure 12: A RLC circuit. Several lter types are possible depending upon how Vout is chosen. In the case shown, the circuit gives a resonant output.
We can apply our technique of impedance to increasingly more intricate examples, with no more e ort than a commensurate increase in the amount of algebra. The RLC circuit of Fig. 12 exempli es some new qualitative behavior. We can again calculate the output using our generalized voltage divider result of Eqn. 5. ~1 consists of the inductor and capacitor in series, and Z ~2 is simply R. So, In this case, the Z
2 ~1 = !L , =!C = L !2 , !0 Z ! p where we have de ned the LC resonant frequency !0 1= LC . We then obtain for the transfer function: ~ T ! jV~outj = R ~ = 2 2 !2 2 2 1=2 jVinj jR + Z1j ! + ! , !0 where R=L is the R-L frequency". T ! indeed exhibits a resonance at ! = !0. The quality factor Q, de ned as the ratio of !0 to the width of the resonance is given by Q !0=2 for !0. Such circuits have many applications. For example, a high-Q circuit, where Vint is the signal on an antenna, can be used as a receiver. As was shown in class, we achieve di erent behavior if we choose to place the output across the capacitor or inductor, rather than across the resistor, as above. Rather than a resonant circuit, choosing Vout = VC yields a low-pass lter of the form 2 j = !0 T ! = j , =!C ~1j 2 2 1=2 jR + Z !2 2 + !2 , !0 The cuto frequency is !0, and for ! !0 then T !,2 12 db per octave", which more closely approaches ideal step function-like behavior than the RC low pass lter, for which T !,1 for ! !0 6 db per octave". As you might suspect, choosing Vout = VL provides a high-pass lter with cuto at !0 and T !,2 for ! !0. 16
Filter circuits can be combined to produce new lters with modi ed functionality. An example is the homework problem 6 of page 59 of the text, where a high-pass and a low-pass lter are combined to form a band-pass" lter. As discussed at length in Section 1.5, it is important to design a sti " circuit, in which the next circuit element does not load the previous one, by requiring that the output impedance of the rst be much smaller than the input impedance of the second. We can standardize this inequality by using a factor of 10 ~inj=jZ ~outj. for the ratio jZ This technique of cascading lter elements to produce a better lter is discussed in detail in Chapter 5 of the text. In general, the transfer functions of such lters take the form for the low-pass case: h i,1=2 T ! = 1 + n f=fc 2n where fc is the 3 db frequency, n is a coe cient depending upon the type of lter, and n is the lter order," often equal to the number of ltering capacitors.
Filters involving LC circuits are very good, better than the simple RC lters, as discussed above. Unfortunately, inductors are, in practice, not ideal lumped circuit elements and are di cult to fabricate. In addition, lters made entirely from passive elements tend to have a lot of attenuation. For these reasons active lters are most commonly used where good ltering is required. These typically use operational ampli ers which we will discuss later, which can be con gured to behave like inductors, and can have provide arbitrary voltage gain. Again, this is discussed in some detail in Chapter 5. When we discuss op amps later, we will look at some examples of very simple active lters. At high frequencies for example RF, op amps fail, and one most fall back on inductors.
4 Diode Circuits
The gure below is from Lab 2, which gives the circuit symbol for a diode and a drawing of a diode from the lab. Diodes are quite common and useful devices. One can think of a diode as a device which allows current to ow in only one direction. This is an over-simpli cation, but a good approximation.
IF
A diode is fabricated from a pn junction. Semi-conductors such as silicon or germanium can be doped" with small concentrations of speci c impurities to yield a material which conducts electricity via electron transport n-type or via holes p-type. When these are brounght together to form a pn junction, electrons holes migrate away from the n-type p-type side, as shown in Fig. 14. This redistribution of charge gives rise to a potential gap V across the junction, as depicted in the gure. This gap is V 0:7 V for silicon and 0:3 V for germanium.
- - -
++ ++ +
V V
Figure 14: A pn junction, forming a voltage gap across the junction. When a diode is now connected to an external voltage, this can e ectively increase or decrease the potential gap. This gives rise to very di erent behavior, depending upon the polarity of this external voltage, as shown by the typical V -I plot of Fig. 15. When the diode is reverse biased," as depicted in the gure, the gap increases, and very little current ows across the junction until eventually at 100 V eld breakdown occurs. Conversely, a forward biased" con guration decreases the gap, approaching zero for an external voltage equal to the gap, and current can ow easily. An analysis of the physics gives the form
I = IS eeV=kT , 1
where IS is a constant, V is the applied voltage, and kT=e = 26 mV at room temperature. Thus, when reverse biased, the diode behaves much like an open switch; and when forward biased, for currents of about 10 mA or greater, the diode gives a nearly constant voltage drop of 0:6 V.
18
I Forward Biased + 10 mA
19
Below we have the basic connection de nitions for bipolar transistors as taken from the text. As indicated in the gure, and as you determined in lab, the base-emitter and base-collector pairs behave somewhat like diodes. Do not take this too literally. In particular, for the basecollector pair this description is far o the mark. We will refer to the transistor connections as C , B , and E .
Let's start by stating what needs to be done to a transistor to make it operate as a transistor. Suppose we have the following: 1. VC VE , by at least a few 0:1 V. 2. VB VE 3. VC VB 4. We do not exceed maximum ratings for voltage di erences or currents. When these conditions are not met, then approximately no current ows in or out of the transistor. When these conditions are met, then current can ow into the collector and out the emitter in proportion to the current owing into the base: IC = hFEIB = IB 19 where hFE = is the current gain. We will use the notation in these notes. The value of the current gain varies from transistor type to type, and within each type, too. However, typically 100. Unless otherwise speci ed, we will assume = 100 when we need a number. From Figure 17 below and Kircho 's rst law, we have the following relationship among the currents: IE = IB + IC = IB + IB = + 1IB IC 20 As we will see below, the transistor will try" to achieve its nominal . This will not always be possible, in which case the transistor will still be on, but IC IB . In this case, the transistor is said to be saturated".
IC
IB
IE
Figure 17: Transistor currents. Because 1, the main utility of the transistor becomes evident: We are able to control a large current IC IE with a small current IB. The simplest such control is in the form of a switch. Note that in our second condition above we require that the base-emitter diode" be forward biased, i.e. that VBE VB , VE be positive. In fact, the base-emitter pair does behave much like a diode. So when it is forward biased, current can easily ow, and the voltage drop quickly reaches its asymptotic value of 0:6 V. Unless otherwise noted, we will generally assume that, when the transistor is in operation, we have VBE VB , VE 0:6Volts 21 21
From the preceding discussion, the most straightforward way to turn the transistor on" or o " is by controlling VBE. This is illustrated by the circuit below which was introduced in Lab 2. We will follow the lab steps again here.
+5 V
33
LED R 2N2222A
Figure 18: A transistor switch. First, let R = 10 k . When the switch is open, IC = IB = 0, of course. When the switch is closed, then VBE becomes positive and VB = VE + 0:6 = 0:6 V. IB = 5 , 0:6=104 = 0:44 mA. Hence, IC = IB = 44 mA. Then, assuming negligible voltage drop across the LED, VC = 5 , 33 0:044 = 3:5 V. So, VCE 0 and VCB 0. So this should work just ne. Substituting R = 1 k gives IB = 4:4 mA and IB = 440 mA. Setting this equal to IC would give VC = ,9:5 V. This is not possible. In order to stay in operation VCE must be positive, and depending upon the transistor species, usually can only go as low as 0:2 V. Appendix K of the text, pages 1066-1067, gives data for a typical model. Hence, IC is limited to a maximum value of IC = 5 , 0:2=33 150 mA. So, e ectively, the current gain has been reduced to = IC =IB = 150=4:4 = 34. In this mode of operation, the transistor is said to be saturated. It turns out that for high-speed switching applications, for example in computers, the transistors are generally operated in a partially saturated mode, for reasons discussed in Section 2.02 of the text.
5.2 Notation
We will now look at some other typical transistor con gurations, including the emitter follower, the current source, and the common-emitter ampli er. But rst we need to set some notation. We will often be considering voltages or currents which consist of a time varying signal superposed with a constant DC value. That is, V t = V0 + vt ; I t = IO + it where V0 and I0 are the DC quantities, and v or i represent time-varying signals. Hence, V = v ; I = i 22
Typically, we can consider v or i to be sinusoidal functions, e.g. vt = vo cos!t + , and their amplitudes vo and io sometimes also written as v or i when their is no confusion are small compared with V0 or I0, respectively.
The basic emitter follower con guration is shown below in Figure 19. An input is fed to the base. The collector is held by a voltage source to a constant DC voltage, VCC . The emitter connects to a resistor to ground and an output. As we shall see, the most useful characteristic of this circuit is a large input impedance and a small output impedance.
Vcc
Vin Vout R
Figure 19: Basic emitter follower. For an operating transistor we have Vout = VE = VB , 0:6. Hence, vout = vE = vB . From this, we can determine the voltage gain G, equivalent to the transfer function, for the emitter follower: G vout=vin = vE =vB = 1 22 From Eqn. 20, IE = +1IB iE = +1iB . Therefore, we see that the follower exhibits current gain" of output to input equal to + 1. Assuming the output connection draws negligible current, we have by Ohm's Law iE = vE =R. Using this in the previous expression and solving for iB gives iB = iE = + 1 = vB =R= + 1. Now we can de ne the input impedance of the follower: Zin = vin=iin = vB =iB = R + 1 23 By applying the Thevenin de nition for equivalent impedance, we can also determine the output impedance of the follower: vin = Zsource 24 Zout = vin=iE = + 1i +1 where Zsource is the source i.e. output impedance of the circuit which gave rise to vin. Hence, the emitter follower e ectively increases input impedance compared to R by a factor + 1 100 and reduces output impedance, relative to that of the source impedance of the previous circuit element, by a factor + 1 100. We will return to this point next time. 23
B
Following our discussion last time of the basic transistor switch and emitter follower, we will likewise introduce the basic relations for two other transistor circuit con gurations: the current source and the common-emitter ampli er. We will then return to the issue of input and output impedance so that we can build realistic circuits using these con gurations.
Figure 20 illustrates the basic con guration for a single-transistor current source. VCC is a constant positive voltage from a DC power supply. Hence, the base voltage VB is also a constant, with VB = VCC R2=R1 + R2. RL represents a load which we intend to power with a current which is approximately independent of the speci c value of RL.
Vcc
R1 IB VB
RL
IL
R2
RE
IE
Figure 20: Basic transistor current source. When the transistor is on, we have IE = +1IB . In addition, we have VE = VB ,0:6; and VE = IE RE = + 1IB RE . Solving for IB in this last equation gives IB = VE = + 1RE . We can combine these to solve for the current which passes through RL: VE = VB , 0:6 VB , 0:6 IL = IC = IB = + 25 1RE + 1 RE RE Hence, we see that indeed IL is independent of RL. Of course, there are limitations to the range of RL for which the current source behavior is reasonable. Recall that the transistor will shut down if VB VE or if VCE is less than 0:2 V. These criteria determine the compliance of the current source, that is its useful operating range. So, for example, if we have VCC = 15 V and VB = 5 V in our circuit above, then VE = 5 , 0:6 = 4:4 V, and the range of compliance for the collector voltage VC will be approximately 4:6 V to 15 V. 24
Figure 21 represents the basic con guration of the common-emitter ampli er. To determine the output for this circuit, we assume at this point that the input is a sum of a DC o set voltage V0 and a time-varying signal vin, as discussed last time. In the next section we will discuss how to achieve these. V0 provides the transistor bias", so that VB VE , and the signal of interest is vin.
Vcc
RC Vout Vin
RE
Figure 21: Basic common-emitter ampli er. The incoming signal shows up on the emitter: vin = VE + 0:6 = VE vE . And by Ohm's Law, iE = vE =RE = vB =RE . As we found previously, iE = iC + iB iC . Now, the voltage at the output is Vout = VC = VCC , IC RC . And therefore, Vout vout = ,iC RC . Putting all of this together, vout = ,iC RC ,iE RC = ,vB =RE RC , giving the voltage gain G: G vout=vin = ,RC =RE 26
Now we need to gure out how to provide inputs to our basic circuits. In Fig. 22 below we show the input network for a common-emitter ampli er. The same considerations we apply here apply equally to the input of an emitter follower. The idea is that the voltage divider R1 and R2 provide the DC bias voltage V0 in our discussion above, and the time varying signal is input through the capacitor which blocks the DC. We need to gure out what design criteria should be applied to this design. We need to make sure that our input circuit does not load the ampli er, C is chosen to give a reasonable RC cuto , and that the gain of the ampli er is what we want. We will start by designing the DC component of the input network, that is choosing R1 and R2. It is helpful when designing the input network to consider the equivalent circuit shown in Fig. 23. The diode and resistor labelled Zin represent the transistor input: the voltage drop across the base-emitter diode" and the input impedance from Eqn. 23. RTH is the Thenenin equivalent resistance for the DC input network. So our design procedure can be as follows: 25
Vcc
R1 C Vin
RC Vout
R2
RE
R TH VB IB Z in
VTH
Figure 23: Equivalent circuit for design of DC input network. 1. 2. 3. 4. Choose RTH Zin = RE + 1. Determine R1 and R2 based on the equivalent circuit. Choose C to provide a proper high-pass cuto frequency. Choose the ampli er gain, if need be.
26
Di erential ampli ers are in general very useful. They consist of two inputs and one output, as indicated by the generic symbol in Fig. 24. The output is proportional to the di erence between the two inputs, where the proportionality constant is the gain. One can think of this as one of the two inputs labelled ," being inverted and then added to the other non-inverting input labelled +". Operational ampli ers op amps", which we will soon study, are fancy di erential ampli ers, and are represented by the same symbol as that of Fig. 24.
in1 in2
+
out
Figure 24: Symbol for a di erential ampli er or op amp. This technique is commonly used to mitigate noise pickup. For example, a signal which is to be transmitted and subject to noise pickup can rst be replicated and inverted. This di erential pair" is then transmitted and then received by a di erential ampli er. Any noise pickup will be approximately equal for the two inputs, and hence will not appear in the output of the di erential amplifer. This common mode" noise is rejected. This is often quanti ed by the common-mode rejection ratio CMRR which is the ratio of di erential gain to common-mode gain. Clearly, a large CMRR is good.
The circuit shown in Fig. 25 represents a di erential ampli er design. It looks like two common-emitter ampli ers whose emitters are tied together at point A. In fact, the circuit does behave in this way. It is simplest to analyze its output if one writes each input as the sum of two terms, a sum and a di erence. Consider two signals v1 and v2. In general, we can rewrite these as v1 = v +v=2 and v2 = v ,v=2, where v = v1 + v2=2 is the average and v = v1 , v2 is the di erence. Therefore, we can break down the response of the circuit to be due to the response to a common-mode input v and a di erence v input. Let's analyze the di erence signal rst. Therefore, consider two inputs v1 = v=2 and v2 = ,v=2. The signals at the emitters then follow the inputs, as usual, so that at point A we have vA = vE1 + vE2 = v1 + v2 = 0. Following the common-emitter ampli er derivation, we have vout1 = ,iC RC , where iC iE = vE =RE = vin1=RE . Hence, vout1 = ,RC =RE v1 and vout2 = ,RC =RE v2. We de ne the di erential gain Gdi as the ratio of the output to the input di erence. So
VCC
RC Out1
RC Out2
In
In 1 RE A RE
R EE V EE
Gdi 2 vout2=v = ,RC =RE v2=,2v2 = RC =2RE Generally, only one of the two ouputs is used. Referring back to Fig. 24, we see that if we were to choose our one output to be the one labelled out2 ", then in1" would correspond to +" non-inverting input and in2" would correspond to ," inverting input. Keeping in mind these results for the relative signs, it is usual to write the di erential gain as a positive quantity: C 27 Gdi = 2R RE where the sign depends upon which is used. Now consider the common mode part of the inputs: v1 = v2 = v . We have the following relations: iEE = iE1 + iE2 = 2iE ; VA = VEE + IEE REE vA = iEE REE = 2iE REE ; , vA = vin , 2iE REE iE = vER RE E Solving for iE in the last equation gives:
1 iE = vin R + 2R E EE Again following the derivation for the the common-emitter ampli e, we have vout = ,iC RC ,iE RC . So each output has the same common-mode gain: RC Gcom vvout = , R + 28 in E 2REE
28
where for a typical design REE RE . Building on what we learned, we can easily improve our di erential ampli er design by adding an emitter-follower stage to the output and a replacing the resistor REE with a current source. This is discussed brie y in the next two sections.
The ratio of the di erential to common-mode gain ignoring the sign then gives the CMRR: + 2REE REE 29 CMRR = RE 2 R R
E E
The output impedance of the common-emitter con guration, as used in the di erential amplifer, Zout RC , is not always as small as one would like. This can be easily improved by adding an emitter follower to the output. Hence, the input of the follower would be connected to the output of the di erential ampli er. As discussed before, the follower then produces an output impedance which is + 1 times smaller than the preceding stage. Hence, in this case, we would have Zout RC = . The follower's emitter resistor call it R0E , of course, has to be consistent with our impedance non-loading criteria, in this case R0E RC .
In our expression for CMRR above, we see that a large REE improves performance. However, this can also signi cantly load the voltage source of VEE , producing non-ideal behavior. Hence, REE is limited in practice. A solution to this which is commonly used is to replace REE by the output of a current source. In other words, point A" in Fig. 25 would be connected to the collector of a current source such as that of Fig. 20. This can be justi ed by noting that the dynamic impedance provided by REE is given by vA=iEE . By limiting variations in iEE , as provided by a current source, one e ectively achieves a large dynamic impedance. To implement this one has to decide what quiescent current is required for the current source and what the quiescent voltage of the collector should be. The latter is given by the quiescent voltage at the inputs of the di erential ampli er. For example, if the inputs are DC ground, then point A" will be at approximately ,0:6 V, depending upon any voltage drop across RE .
One variation of the above is to remove the emitter resistor. In this case one replaces RE in the expressions above with the intrinsic emitter resistance discussed in Section 5.8.1 below:
RE ! re = 25mV=IC
To be exact, one should replace RE in our equations with the series resistance of RE and re: RE ! RE + re . However, in most practical situations RE re .
29
For convenience, the basic common-emitter ampli er is reproduced below. The calculation of the input impedance does not di er from that we used for the emitter follower in Section 5.3. That is, the input impedance is Zin = RE + 1. The output impedance is quite di erent from that of the emitter follower, however. Consider our de nition of output impedance in terms of the Thevenin equivalent circuit: Zout = iRvout ! 0
L
The numerator is just the usual vout we calculated in Eqn. 26. Hence, vout = vinRC =RE . The short current is just iC , and since iC = = + 1iE iE = vin=RE , then we have our result Zin = + 1RE ; Zout RC 30 Note that these results apply equally well to the di erential ampli er con guration, which is, as we said before, essentially two coupled common-emitter ampli ers. 30
Vcc
RC Vout Vin
RE
We already discussed in class the fact that for a con guration like that of the input network of Fig. 22, that the input time-varying signal vin is not a ected by the DC o sets of the resistor connections. In other words, R1 and R2 appear, for a time-varying signal, to be both connected to ground. Hence, when designing the cuto frequency for the input high-pass lter, the e ective resistance is just the usual parallel resistance of R1, R2, and the transistor input impedance RE + 1. With the exception of saturation e ects and a mention of the intrinsic emitter resistance re, we have so far considered transistors in a reather idealized manner. To understand many of the most important aspects of transistor circuits, this approach is reasonable. For example, we have treated the current gain of a non-saturated transistor to be independent of currents, temperature, etc. In reality, this is not the case. One of the ner points of circuit design is to take care to eliminate a strong dependence of the circuit behavior on such complications. We start with the Ebers-Moll equation, which gives a foundation for understanding one class of complications.
Our simple relationship for collector current for an operating transistor, IC = IB is an idealization. We can see from the plots of Appendix K cf pg. 1076-7 that indeed does depend on various parameters. A more precise description is via the Ebers-Moll equation: h i IC = IS eVBE=VT , 1 IS eVBE=VT 31 where VT kT=e = 25:3 mVT=298 K, IS = IS T is the saturation current, and VBE VB , VE , as usual. Since typically VBE 600mV VT , then the exponential term is much larger than 1, and IS IC . Since IB is also a function of VBE , then we see that = IC =IB can be thought of as a good approximation for a rather complicated situation, and in fact is itself a function of IC or VBE, as well as of temperature. 31
We see that IC is not intrinsically a function of IB , but rather is controlled by VBE . For this reason, and others, it is often stated that transistor gain is really a transconductance gain. This means that it takes a voltage input and converts it to a current output. So we write, in general, gm = iout=vin as the transconductance gain. We then recover voltage gain by multiplying gm by the resistor at the output which converts the output current to a voltage. For example, for the commonemitter ampli er we have iout = ,vin=RE and G = gm RC = ,RC =RE as before. The base-emitter diode" implies a relationship between IB and VBE of the form VBE = V0 lnIB =I0, where V0 0:6 V and I0 is a constant. If this form for VBE is plugged into Eqn. 31, we recover our previous relationship IC = IB, where the current gain is a combination of the various factors which are slowly-varying functions of temperature and currents. Another consequence of Ebers-Moll equation is that we see where the intrinsic emitter resistance re, which we introduced last time, comes from. By de nition, dIC : 1=re = iE =vBE iC =vBE = dV BE From Eqn. 31, the derivative is simply IC =VT . So we have re = VT =IC 32 where VT is again as above.
Figure 28 shows a very commonly used current source circuit known as the current mirror. Understanding its principle of operation requires the Ebers-Moll equation. The programming current" IP de nes the collector current of the left-hand transistor. The base currents should be negligibly small. From the Ebers-Moll equation, this collector current then uniquely determines VBE. The collector-base connection transfers this well-de ned base voltage to the collector, thus maintaining the voltage drop across the programming resistor. The right-hand transistor is matched" to the left-hand one. That is, the pair were manufactured together to have nearly identical properties. So this right-hand transistor assumes a nearly identical collector current to that which is programmed. Thus the load current becomes IL = IP . Besides transferring the program current to a load at another point of the circuit, the current mirror also has the advantage of having a larger range of compliance than the standard single-transistor current source we studied earlier.
The following represent some of the important departures from ideal transistor behavior: VBE = VBET . As discussed above, the base-emitter diode" includes a Boltzmann factor temperature dependence. This can be linearized, as given in the text, to yield approximately VBE ,2:1 10,3 V= C T 32
Vcc I IL
RP
Variation in gain. The may be quite di erent from transistor to transistor, even of the same model. Therefore circuit designs should not rely on a speci c gain, other than to assume that 1. To illustrate this last point, consider our earlier one transistor current source. We determined that the load current can be written ! B , VBE IL = + 1 VR 33 E + re where the intrinsic emitter resistance re has been included. Therefore, the variation in IL induced by variation in is ! IL = 1 dIL = 1 IL IL d +1 33
Hence, variations in are attenuated by the factor + 1. So this represents a good design. The variation in the output of this current source resulting from the Early e ect can be evaluated similarly: IL = 1 dIL V = , VBE = 1 10,4 V IL IL dVBE BE VB , VBE VB , VBE CE which can be evaluated using the compliance range for VCE . Temperature dependence can now be estimated, as well. Using our current source, again, to exemplify this point, we see that temperature dependence can show up both in VBE and . The former e ect can be evaluated using the chain rule and the result from the previous paragraph: dIL = dIL dVBE 2:1 mV= C dT dV dT R
BE
Therefore, we see that temperature dependence is 1=RE . As before, RE is in general replaced by the sum RE + re . In the case where the external resistor is omitted, then the typically small re values can induce a large temperature dependence cf problem 7 at the end of Chapter 2 of the text. Similarly, using previous results, we can estimate the e ect of allowing = T : ! dIL = dIL d = IL 1 d dT d dT + 1 dT where the term in parentheses, the fractional gain temperature dependence, is often a known parameter cf problem 2d at the end of Chapter 2 of the text.
34
6 Op-Amp Basics
The operational ampli er is one of the most useful and important components of analog electronics. They are widely used in popular electronics. Their primary limitation is that they are not especially fast: The typical performance degrades rapidly for frequencies greater than about 1 MHz, although some models are designed speci cally to handle higher frequencies. The primary use of op-amps in ampli er and related circuits is closely connected to the concept of negative feedback. Feedback represents a vast and interesting topic in itself. We will discuss it in rudimentary terms a bit later. However, it is possible to get a feeling for the two primary types of ampli er circuits, inverting and non-inverting, by simply postulating a few simple rules the golden rules". We will start in this way, and then go back to understand their origin in terms of feedback. The op-amp is in essence a di erential amplifer of the type we discussed in Section 5.7 with the re nements we discussed current source load, follower output stage, plus more, all nicely debugged, characterized, and packaged for use. Examples are the 741 and 411 models which we use in lab. These two di er most signi cantly in that the 411 uses JFET transistors at the inputs in order to achieve a very large input impedance Zin 109 , whereas the 741 is an all-bipolar design Zin 106 . The other important fact about op-amps is that their open-loop gain is huge. This is the gain that would be measured from a con guration like Fig. 29, in which there is no feedback loop from output back to input. A typical open-loop voltage gain is 104 105 . By using negative feedback, we throw most of that away! We will soon discuss why, however, this might actually be a smart thing to do.
in1 in2
+
out
Figure 29: Operational ampli er. The golden rules are idealizations of op-amp behavior, but are nevertheless very useful for describing overall performance. They are applicable whenever op-amps are con gured with negative feedback, as in the two ampli er circuits discussed below. These rules consist of the following two statements: 1. The voltage di erence between the inputs, V+ , V, , is zero. Negative feedback will ensure that this is the case. 35
2. The inputs draw no current. This is true in the approximation that the Zin of the op-amp is much larger than any other current path available to the inputs. When we assume ideal op-amp behavior, it means that we consider the golden rules to be exact. We now use these rules to analyze the two most common op-amp con gurations.
The inverting ampli er con guration is shown in Fig. 30. It is inverting" because our signal input comes to the ," input, and therefore has the opposite sign to the output. The negative feedback is provided by the resistor R2 connecting output to input.
R2
R1 VIN
VOUT
Figure 30: Inverting ampli er con guration. We can use our rules to analyze this circuit. Since input + is connected to ground, then by rule 1, input , is also at ground. For this reason, the input , is said to be at virtual ground. Therefore, the voltage drop across R1 is vin , v, = vin, and the voltage drop across R2 is vout , v, = vout. So, applying Kircho 's rst law to the node at input ,, we have, using golden rule 2: i, = 0 = iin + iout = vin=R1 + vout=R2 or G = vout=vin = ,R2=R1 34 The input impedance, as always, is the impedance to ground for an input signal. Since the , input is at virtual ground, then the input impedance is simply R1: Zin = R1 35 The output impedance is very small 1 , and we will discuss this again soon. This con guration is given in Fig. 31. Again, its basic properties are easy to analyze in terms of the golden rules. R 1 vin = v+ = v, = vout R + R 1 2 36
where the last expression is from our voltage divider result. Therefore, rearranging gives + R2 = 1 + R2 36 G = vout=vin = R1 R R1 1 The input impedance in this case is given by the intrinsic op-amp input impedance. As mentioned above, this is very large, and is typically in the following range:
37
VIN
+
VOUT
R2
R1
It is no surprise that the golden rules are not exact. On the other hand, they generally describe most, if not all, observed op-amp behavior. Here are some departures from ideal performance.
O set voltage, VOS. Recall that the input of the op-amp is a di erential pair. If the two transistors are not perfectly matched, an o set will show up as a non-zero DC o set at the output. As you found in Lab 4, this can be zeroed externally. This o set adjustment amounts to changing the ratio of currents coming from the emitters of the two input transistors. Bias current, Ibias. The transistor inputs actually do draw some current, regardless of golden rule 2. Those which use bipolar input transistors e.g. the 741 draw more current than those which use FETs e.g. the 411. The bias current is de ned to be the average of the currents of the two inputs. O set current, IOS. This is the di erence between the input bias currents. Each bias current, after passing through an input resitive network, will e ectively o er a voltage to the op-amp input. Therefore, an o set of the two currents will show up as a voltage o set at the output.
37
Perhaps the best way to beat these efects, if they are a problem for a particular application, is to choose op-amps which have good speci cations. For example, IOS can be a problem for bi-polar designs, in which case choosing a design with FET inputs will usually solve the problem. However, if one has to deal with this, it is good to know what to do. Figure 32 shows how this might be accomplished. Without the 10 k resistors, this represents a non-inverting ampli er with voltage gain of 1 + 105=102 1000. The modi ed design in the gure gives a DC path from ground to the op-amp inputs which are aproximately equal in resistance 10 k , while maintaining the same gain.
IN 10k 10k 100k
+
OUT
100
Figure 32: Non-inverting ampli er designed to minimize e ect of IOS. Similarly, the inverting ampli er con guration can be modi ed to mitigate o set currents. In this case one would put a resistance from the , input to ground which is balanced by the R1 and R2 in parallel see Fig. 30. It is important to note that, just as we found for transistor circuits, one shpould always provide a DC path to ground for op-amp inputs. Otherwise, charge will build up on the e ective capacitance of the inputs and the large gain will convert this voltage = Q=C into a large and uncontrolled output voltage o set. However, our modi ed designs to ght IOS have made our op-amp designs worse in a general sense. For the non-inverting design, we have turned the very large input impedance into a not very spectacular 10 k . In the inverting case, we have made the virtual ground into an approximation. One way around this, if one is concerned only with AC signals, is to place a capacitor in the feedback loop. For the non-inverting ampli er, this would go in series with the resistor R1 to ground. Therefore, as stated before, it is best, where important, to simply choose better op-amps!
Below are examples of simple integrator and di erentiator circuits which result from making the feedback path have frequency dependence, in these cases single-capacitor RC lters. It is also possible to modify non-inverting con gurations in a similar way. For example, problem 3 on page 251 of the text asks about adding a rollo " capacitor in this way. Again, one would simply modify our derivations of the basic inverting and non-inverting gain formulae by the replacements R ! Z , as necessary. 38
Using the golden rules for the circuit of Fig. 33, we have vin , v, = vin = i = i = ,C dvout , v, = ,C dvout R R in out dt dt So, solving for the output gives Z 1 38 vout = , RC vindt And for a single Fourier component !, this gives for the gain 1 G! = , !RC 39 Therefore, to the extent that the golden rules hold, this circuit represents an ideal integrator and a low-pass lter. Because of the presence of the op-amp, this is an example of an active lter. In practice, one may need to supply a resistor in parallel with the capacitor to give a DC path for the feedback.
C
6.5.1 Integrator
R IN
OUT
The circuit of Fig. 34 can be analyzed in analogy to the integrator. We nd the following: in vout = ,RC dv 40 dt G! = ,!RC 41 So this ideally represents a perfect di erentiator and an active high-pass lter. In practice, one may need to provide a capacitor in parallel with the feedback resistor. The gain cannot really increase with frequency inde nitely!
6.5.2 Di erentiator
As we mentioned above, the rst of our Golden Rules for op-amps required the use of negative feedback. We illustrated this with the two basic negative feedback con gurations: the inverting and the non-inverting con gurations. In this section we will discuss negative feedback in a very general way, followed by some examples illustrating how negative feedback can be used to improve performance. 39
R C IN
OUT
Consider the rather abstract schematic of a negative feedback ampli er system shown in Fig. 35. The symbol is meant to indicate that negative feedback is being added to the input. The op-amp device itself has intrinsic gain A. This is called the op-amp's open-loop gain since this is the gain the op-amp would have in the absence of the feedback loop. The quantity B is the fraction of the output which is fed back to the input. For example, for the non-inverting ampli er this is simply given by the feedback voltage divider: B = R1=R1 + R2. The gain of the device is, as usual, G = vout=vin. G is often called the closed-loop gain. To complete the terminology, the product AB is called the loop gain.
v in
+
6.6.1 Gain
a A -
v out
Figure 35: General negative feedback con guration. As a result of the negative feedback, the voltage at the point labelled a" in the gure is va = vin , Bvout The ampli er then applies its open-loop gain to this voltage to produce vout: vout = Ava = Avin , ABvout Now we can solve for the closed-loop gain: 42 vout=vin G = 1 +A AB Note that there is nothing in our derivation which precludes having B or A be a function of frequency. 40
We can now also calculate the e ect that the closed-loop con guration has on the input and output impedance. The gure below is meant to clearly show the relationship between the de nitions of input and output impedances and the other quantities of the circuit. The quantity Ri represents the open-loop input impedance of the op-amp, that is, the impedance the hardware had in the absence of any negative feedback loop. Similarly, Ro represents the Thevenin source output impedance of the open-loop device.
v
in b
Ri
Ro v out
Figure 36: Schematic to illustrate the input and output impedance of a negative feedback con guration. We start the calculation of Zin with the de nition Zin = vin=iin. Let us calculate the current passing through Ri: , vb = vin , Bvout iin = vinR Ri i Substituting the result of Eqn. 42 gives 1 A iin = R vin , Bvin 1 + AB i Rearanging allows one to obtain Zin = vin=iin = Ri 1 + AB 43 A similar procedure allows the calculation of Zout vopen=ishort. We have vopen = vout and the shorted current is what gets when the load has zero input impedance. This means that all of the current from the ampli er goes into the load, leaving none for the feedback loop. Hence, B = 0 and Av 1 + AB Av vout 1 + AB out out ishort = A vin , Bvout =Ro = Avin=Ro = R G = R = A Ro o o This gives our result Ro Zout = vopen=ishort = 1 + 44 AB 41
Therefore, the efect of the closed loop circuit is to improve both input and output impedances by the identical loop-gain factor 1 + AB AB . So for a typical op-amp like a 741 with A = 103, Ri = 1 M , and Ro = 100 , then if we have a loop with B = 0:1 we get Zin = 100 M and Zout = 1 . We just demonstrated that the input and output impedance of a device employing negative feedback are both improved by a factor 1 + AB AB , the device loop gain. Now we give a simple example of the gain equation Eqn. 42 in action. An op-amp may typically have an open-loop gain A which varies by at least an order of magnitude over a useful range of frequency. Let Amax = 104 and Amin = 103, and let B = 0:1. We then calculate for the corresponding closed-loop gain extremes: 104 101 , 10,3 Gmax = 1 + 103 103 101 , 10,2 Gmin = 1 + 102 Hence, the factor of 10 open-loop gain variation has been reduced to a 1 variation. This is typical of negative feedback. It attenuates errors which appear within the feedback loop, either internal or external to the op-amp proper. In general, the bene ts of negative feedback go as the loop gain factor AB . For most op-amps, A is very large, starting at 105 for f 100 Hz. A large gain G can be achieved with large A and relatively small B , at the expense of somewhat poorer performance relative to a smaller gain, large B choice, which will tend to very good stability and error compensation properties. An extreme example of the latter choice is the op-amp follower" circuit, consisting of a non-inverting ampli er see Fig. 31 with R2 = 0 and R1 removed. In this case, B = 1, giving G = A=1 + A 1. Another interesting feature of negative feedback is one we discussed brie y in class. The qualitative statement is that any signal irregularity which is put into the feedback loop will, in the limit B ! 1, be taken out of the output. This reasoning is as follows. Imagine a small, steady signal vs which is added within the feedback loop. This is returned to the output with the opposite sign after passing through the feedback loop. In the limit B = 1 the output and feedback are identical G = 1 and the cancellation of vs is complete. An example of this is that of placing a push-pull" output stage to the op-amp output in order to boost output current. See text Section 2:15. The push-pull circuits, while boosting current, also exhibit cross-over distortion", as we discussed in class and in the text. However, when the stage is placed within the op-amp negative feedback loop, this distortion can essentially be removed, at least when the loop gain AB is large.
Recall that an RC lter introduces a phase shift between 0 and =2. If one cascades these lters, the phase shifts can accumulate, producing at some frequency ! the possibility of a phase shift of . This is dangerous for op-amp circuits employing negative feedback, as a phase shift of converts negative feedback to positive feedback. This in turn tends to 42
compound circuit instabilities and can lead to oscillating circuits as we do on purpose for the RC relaxation oscillator. So it is perhaps easy to simply not include such phase shifts in the feedback loop. However, at high frequencies f 1 MHz or more, unintended stray capacitances can become signi cant. In fact, within the op-amp circuits themselves, this is almost impossible to eliminate. Most manufacturers of op-amps confront this issue by intentionally reducing the open-loop gain at high frequency. This is called compensation. It is carried out by bypassing one of the internal ampli er stages with a high-pass lter. The e ect of this is illustrated in Fig. 37. It is a so-called Bode plot", log10A vs log10f , showing how the intrinsic gain of a compensated op-amp like the 741 or 411 decreases with frequency much sooner than one without compensation. The goal is to achieve A 1 at ! , which is typically at frequencies of 5 to 10 MHz. One other piece of terminology: The frequency at which the op-amp open-loop gain, A, is unity, is called fT , and gives a good indication of how fast the op-amp is. Compensation accounts for why op-amps are not very fast devices: The contribution of the higher frequency Fourier terms are intentionally attenuated. However, for comparators, which we turn to next, negative feedback is not used. Hence, their speed is typically much greater.
Log 10 G 5 3 Uncompensated 1 Log 1 3 5 7 10 f
Compensated
43
7 Comparator Circuits
7.1 Simple Comparator
A comparator can be thought of as a fast, high-gain op-amp which is not used with negative feedback. This basic idea is shown in Fig. 38. The comparator has large open-loop gain A. The function of a comparator is to decide which of the two inputs has larger voltage. We have in the limit of very large A
+ A
v out -
Figure 38: Comparator model. We have shown explicitly in Fig. 38 the output stage consisting of a transistor with collector connected to the comparator output. This is the open collector output, and is typical. It is used in the 311 comparators we use in lab. We are obliged to complete the circuit by providing a pull-up" resistor R. The transistor emitter is also available as an external connection. It should be connected to whatever is the lower of the two output voltage states we require. This is chosen to be ground in the gure. The high-gain di erential ampli er of the comparator has output connected to the base of this transistor. When that 44
is low it will, after passing through an inverter, turn the transistor on. In this case, current sill pass through R and to the emitter connection. This current produces a voltage drop across R which pulls the output voltage very close to the emitter voltage ground in our example. Typically R 1 k . When the comparator inputs are in the complementary inequality, the transistor is switched o and the output voltage goes to the voltage held by R, which is +5 V in our example. Using outputs of 0 and +5 V are typical, since these voltages correspond roughly to the TTL convention of digital electronics. A typical circuit using a comparator is shown in Fig. 39. The output goes to one of its two possible states depending upon whether the input v, is greater than or less than the threshold" determined by v+. Positive feedback is used to help reinforce the chosen output state. In this con guration, called the Schmitt trigger, two thresholds can be set, depending upon which state the output is in. The way this works is illustrated in Fig. 40. Vh and Vl refer to threshold voltages which are set up at the comparator + input by the resistor divider chain. As long as R3 R4, the output states will still be determined by the pull-up resistor R4. For the circuit in the gure, these states are 0 and +5 V. The resistor divider, then sets V+ at di erent values, depending upon which state the ouput is in. Whether the connection to +V1 and R1 is required or not depends upon whether a positive threshold is required when Vout = 0.
+V1 R 1 +5
in
R4
v out +
R3 2
Figure 39: Schmitt trigger. Referring to Fig. 40, we start with Vin = V, V+ . The output is in the +5 V state. In this case the threshold produced by the voltage divider, Vh , is the larger value due to the contribution of Vout. When the input crosses the threshold, the output changes to the other state, 0 V. The divider then gives a lower threshold Vl. Having two thresholds provides comparator stability and noise immunity. Any noise which is Vh , Vl will not a ect the operation of the comparator. 45
in
Vh Vl t Vout +5
Figure 40: Examples of Schmitt trigger signals versus time. Top: vin; the dashed lines indicate the two thresholds set up at the + input of the comparator. Bottom: vout. Note that the resistor R1 is not necessary if Vl = 0. Also, a negative threshold could be set in two ways. The resistor chain forming the threshold could be connected to negative voltage, rather than ground, or the emitter of the output transistor could be connected to negative voltage, thus producing an output with low state at this negative voltage. The circuit of Fig. 41 uses both positive and negative feedback. It is called an RC relaxation oscillator. Note that the positive feedback is a Schmitt con guration. So we expect to have two thresholds. The output voltages are set up to be either +5 V pull up or ,5 V emitter connection. Analysis of the voltage divider reveals that the corresponding two threshold at V+ will be 1 V. When the output is +5 V, the capacitor C is charged up through the resistor R. The RC part of the circuit is shown in Fig. 42. As we found in class, the voltage across the capacitor, and hence the , input to the comparator, is given after applying initial conditions by V0 et1,t=RC Vct = V0 , 32 where t1 is the time at which the comparator output is rst at V0 = +5 V. Hence, the charge up curve will eventually cross the +1 V threshold, forcing the comparator to the ,5 V state, and thereby starting a ramp-down of the capacitor voltage given by 0 t2,t=RC Vct = ,V0 + 3V 2 e where t2 is the time at which the output switched to ,5 V. This ramp down will cross the ,1 V threshold, and the whole process will therefore repeat inde nitely. The output will be a square wave, whereas Vc resembles a triangle wave. This is a common technique for building an oscillator. 46
20K
100K
Vin
10nF
Vout
Figure 42: RC circuit with Vin from the comparator output and Vout going to the , comparator input of previous gure.
47
8 Radio Basics
In this section we will discuss some basic concepts concerning signal modulation, generation, receiving, and demodulation. Some of these concepts are quite general and see applications in many areas. However, the most familiar perhaps is that of broadcast radio generation and receiving, hence the title of the section. We will begin with a simpli ed discussion of amplitude modulation AM. From this, we can see how to carry over many of the concepts to other forms of signal modulation and reception of signals.
Consider the familiar example of radio signals which carry audio information. The audio itself has a typical frequency range of 20Hz faudio 20kHz Hence, audio has an e ective bandwidth of about 20 kHz. Even if it were possible to broadcast signals of such low frequency in the electromagnetic spectrum, there would be a multitude of confusion resulting from the interference between competing broadcasts. On the other hand, electromagnetic signals in the radio-frequency RF range, have frequencies roughly from several hundred kHz to several hundred MHz. An audio signal which modulates an RF carrier" of, say, 20 Mhz, uses only the range 20:00 0:02 MHz. Another broadcast channel" with a carrier frequency only 100 kHz removed will have give interference with its own signal at 20:10 0:02 MHz. Hence, with a carrier at much higher frequency than the signal, many channels can co-exist with little or no interference. We will look at several techniques for signal modulation, beginning with amplitude modulation. It is important to remember that the signals do not have to be audio, that is only a familiar example. The signals could be any form of information which can be converted to an electromagnetic signal. Another familiar example is the modulation of computer-generated signals for transmission over telephone lines.
Figure 43 gives the general scheme. Each frequency, !m = 2fm, which represents information is mixed" with the high-frequency carrier, !c = 2fc, to produce an output signal of the form Vs t = A 1 + m cos !mt cos !c t 45 where A is a constant and the constant m 1 is known as the modulation index. We see that the carrier amplitude A cos!c t is modulated by the factor 1+ m cos!m t, where m = 0 represents the limit of no modulation and m = 1 is a miximally modulated signal. By using the identity 1 cosx + y + cosx , y cos x cos y = 2 48
+ +
Vs
fm
Figure 43: Schematic of modulation. we can do a poor man's" Fourier transform of Vs : 1 Am cos ! + ! t + cos ! , ! t Vst = A cos !c t + 2 46 c m c m So we have a central carrier frequency plus two side-bands at fc fm . One simple way to achieve an amplitude modulated signal is to use an ampli er for which the input is the carrier signal and the ampli er power itself is modulated by the signal, e.g. VCC , VEE = V0 + V1 cos !mt, where V0 is the DC o set amd we identify m V1=V0.
8.3 Detection of AM
We rst consider the simple, but subtle, radio receiver shown in Fig. 44. A real receiver might include at the input an antenna followed by an LC bandpass lter, with tunable capacitor. The lter p is a resonant circuit with a sharp peak at the carrier frequency of the broadcast !c = 1= LC . The Q of the lter is set so that the width of the peak of the transfer function matches the bandwidth ! of the modulating signal, roughly from !c , !m to !c + !m . With this addition, and without the ampli ed output, the passive crystal" radio receiver looks like this.
a IN R G C OUT
Figure 44: Simple AM receiver. The resistor R and capacitor clearly form a low-pass lter. The cuto frequency would be set between !m and !c in order to keep the information encoded by the low-frequency modulations, and remove the carrier. However, without the diode, the e ect would be to throw away all of the information, too, since as we saw from Eqn. 46, all of the frequencies 49
of interest are actually in a narrow band centered about the carrier frequency. Without the diode, the system is linear, and no signal will be present at the output. The diode is non-linear; recall its V -I curve. In order to illustrate how this works, we assume a speci c form for the response of a forward-biased diode as I = bV 2, where b is a constant. A resistor r is inserted between point a and ground Fig. 44 in order to convert this diode current to a voltage to be presented to the low-pass lter. Now let V be the linear combination of two signals: V = V1 cos !1t + V2 cos !2t. This then gives rise to an output current I = bV12 cos2 !1 t + bV22 cos2 !2t + 2bV1 V2 cos !1t cos !2t Again using trigonometric identities to form the poor man's Fourier transform, this becomes 2I=b = V12 + V22 + V12 cos 2!1t + V22 cos 2!2t + 2V1V2 cos!1 + !2t + cos!1 , !2t Therefore, from the original two frequencies, the diode has produced harmonics twice the original, as well as the sum and di erence. In the case of our simpli ed AM broadcast signal of Eqn. 46, where three frequencies are originally present !c and !c !m , the e ect of the diode is easily generalized from the steps above using the substitutions !1 = !c and !2 = !c + !m or !2 = !c , !m . We nd that the output of the diode will include DC, the rst harmonics of all three frequecies, as well as the six possible sum and di erence frequencies. Of particular interest for our receiver is the di erence frequency between the carrier and the modulated carrier. For example, !c , !c , !m = !m Therefore, we do in fact recover a Fourier component corresponding to our original modulating signal. This can then be separated from the higher frequencies using the low-pass lter and ampli er. This represents a simple example of so-called heterodyne detection, in which di erent frequencies are combined in order to extract a di erence frequency. As an aside, we note that with our example I = bV 2, we have squared the input. When we examine this in frequency domain Fourier transform and low-pass lter the result averaging, we have e ectively formed the so-called power spectrum of the input, also called the spectral power density.
Note that we intentionally introduced a non-linear element the diode to our system. An unintentional non-linearity in a circuit, for example in an audio ampli er circuit, can introduce additional frequencies as demonstrated above. In particular, our diode with the I = bV 2 behavior introduced rst harmonics of the original frequencies at twice the original. In general, a non-linearity may include any number of higher-order terms: I = b1V + b2V 2 + b3V 3 + , where each additional power can generate the next higher harmonic. For example, a nonzero b3 will generate a 2nd harmonic of the original ! at 3!. The introduction of harmonics of the input signal is called harmonic distortion. Since the pattern of harmonics is what distinguishes musical instrument types to the ear, the introduction of non-linearities should be avoided in high- delity audio ampli ers.
An example of this technique is given in the text, pages 653 and 889. It uses a phase-locked loop PLL circuit at the input of the receiver. Recall that the PLL circuit is designed 50
to produce an output which is proportional to shifts in phase of the input. Since one can consider the modulation of the carrier to be a phase shift by amount !m t, the output of the PLL can then produce a voltage signal proportional to these phase shifts, which in turn is used to provide active recti cation of the input at the frequency of the modulation. The essential non-linear behavior of the diode discussed above is provided in this case by an active voltage multiplier. This type of PLL circuit is actually more relevant to FM detection, which is discussed below.
This technique is illustrated in the text, pages 895-6. It is essentially a fancy version of our simple heterodyne detector above. In this case, the simple passive LC bandpass lter at the input is replaced by a local oscillator and mixer. An example is given in Figure 13:41 of the text. Consider an input carrier of frequency 10 MHz which has amplitude modulated at some much lower frequency. This signal is mixed with a local oscillator of xed frequency greater than the carrier. In the example of the text, the local oscillator has frequency tuned to be fLO = 10:455 MHz, exactly 455 kHz greater than the carrier. As with our earlier diode example, the mixed signal includes the di erence frequency, in this case 455 kHz, which in turn has nearby sideband frequencies which di er from 455 kHz by the audio modulation frequencies. From this point on, the detection is carried out as in the simple heterodyne example. One advantage here is that a relatively high-frequency carrier, which in general will be di cult to condition using conventional electronics is e ectively reduced to a more manageable frequency, in the example from 10 MHz to 455 kHz. The other advantage is that the band-pass tuning which follows the mixer is always centered at a constant 455 kHz. So the tuning is accomplished by adjusting the oscillator, rather than the lter. Recall from Eqn. 45 that for AM the amplitude is modulated by varying the frequency !m. However, to preserve the information, the generation and receipt of the amplitude must be linear. In addition, most noise sources will naturally appear as voltages, and hence will add to the AM signal. On the other hand, phase and frequency modulation FM do not su er from these complications. Hence, where delity is important, these schemes have intrinsic advantages. Radio broadcast by FM also has the additional advantage, by dint of historical accident, of occupying a higher frequency band, thus allowing easy accomodation of a full audio bandwidth. However, unlike the AM radio band, the FM band signals do not re ect from the ionosphere, and therefore can not be transmitted over very large distances at night.
A carrier of frequency !c is phase modulated if the resulting signal has the form V t = V0 cos!ct + Ap cos !m t
47
where V0 and Ap are constants and !m is the modulating frequency, as before. This can be expanded, and for Ap 1 can also be simpli ed:
As for AM, two new sidebands have appeared, but now they are 90 out of phase with respect to the carrier. The phase of a sinusoidal function, when frequency is a function of time, can in general be expressed as Z = !dt Now suppose the frequency is modulated by a frequency ! about some central carrier frequency ! = !c + Af cos !mt where Af is a constant. Then the phase becomes Af sin ! t = !c t + ! m m Here, Af is called the frequency deviation and Af =!m is the modulation index for FM. Carrying out steps analogous to those for Eqn. 48 gives the following expression for the FM signal: f V t=V0 = cos = cos !c t + 2A 49 ! cos!c + !m t , cos!c , !m t So again the Fourier spectrum is similar to what we found for AM, except now one of the two sidebands has amplitude of opposite sign.
m
48
In the AM detection schemes discussed above, the diode or other non-linear element is used to extract an output signal proportional to cos !m t, and hence provide a reproduction of the original modulation, for example in the form of an audio signal. For FM detection we need to replace the diode with something which can provide a voltage output proportional to the input frequency modulated signal. We explored such a technique in Lab 5 in the form of the phase-locked loop circuit. The PLL scheme is reproduced in Fig. 45. For this application, the counter is omitted. Recall that the signal before the VCO, labelled Vout, is proportional to input phase shifts. This is exactly what we need to detect the phase shift introduced by FM. All that is left is to feed Vout to a low-pass lter and ampli er, as before. An apparent practical limitation of this technique for FM radio reception is that PLLs do not operate at these high frequencies 100 MHz. This is overcome by using the technique discussed above at the front-end of the superheterodyne receiver. The input is mixed using a local oscillator and the resulting lower frequency 455 kHz in our example modulated signal is then input to the PLL. Another technique, called quadrature detection is brie y discusses in the text, page 652. 52
8.5 FM Detection
in
Phase Detector
Low-pass Filter
out
V out
53