Electronics ELECTRONICS DENNIS DUNN UNIT 2/PH/SK Summer Term 2000 Lectures ~16 hours Workshops ~8 hours Laboratories ~6 hours Reference Text Book: "Electronics" by D I Crecroft, D A Gorham & J J Sparkes (Published by Chapman & Hall) 1 Electronics SYLLABUS Analogue Electronics Circuit Laws: Kirchhoff's current and voltage laws Linear Circuits: Linearity; time-invariance Special properties of linear, time-invariant systems Concepts of Fourier analysis Complex Representation of Sinusoidal Signals Review of complex numbers and functions Complex form of sinusoidal functions Complex impedances Sinusoidal Properties of Linear Circuits Thevenin and Norton equivalent circuits for sinusoidal signals Input and output impedances and their significance Frequency response function; relation to gain and phase Bode plots for simple systems Simple RC and LCR Circuits First-order RC circuits Second-order LCR circuits; resonance, decay, Q-factor Operational Amplifiers The ideal operational amplifier Non-ideal properties: input impedance, output impedance, input bias currents, input offset voltage, output current and voltage limits, slew-rate limit Operational Amplifier Circuits Feedback Infinite-gain approximation Inverting and non-inverting mode circuits Filters Sum and difference amplifiers Beyond the infinite-gain approximation; gain-bandwidth product Digital Electronics Digital Signals: Digital devices; truth-tables; combinational circuits Noise immunity; advantages (and disadvantages) of digital systems Boolean Algebra Rules of Boolean algebra derived from the device properties Correspondence between algebraic expressions and digital circuits Use of algebra to produce simpler circuit designs Design Procedures Design procedures for combinational digital circuits using NAND or NOR gates Bistable Systems NOR and NAND bistables; property of memory Clocked Digital Devices Properties of D and JK flip-flops; memory systems; counters 2 Electronics Practical Electronics Two design projects: · Operational amplifier band-pass filter design. · Combinational digital circuit design. 3 Electronics Aims To introduce students to principles and methods of analogue and digital electronics; and to reinforce the priciples by means of practical work. Learning Outcomes After the analogue part unit each student should be able to: · state Kirchhoff's circuit laws and apply these to simple circuits; · describe the concepts (but not the techniques) of Fourier Analysis; · perform a sinusoidal analysis of simple linear systems using the complex representation and determine the frequency response function, gain and phase; · sketch a Bode plot of the gain of first and second-order systems; · analyse first and second-order RC and LCR circuits; · state the ideal properties of an operational amplifier and describe how real operational amplifiers deviate from the ideal; · design simple filter circuits using operational amplifiers. After the digital part unit each student should be able to: · state the advantages in using digital electronics; · specify the truth tables for NOT, AND, OR, NAND and NOR gates; · state the rules of Boolean algebra and how these rules relate to the properties of the basic gates; · use the rules to simplify algebraic expressions and decsribe the significance of the simplification; · use design procedures for systems of NAND or NOR gates to design combinational circuits; · describe the properties of NOR and NAND bistables; · describe the properties of clocked D- and JK-flip-flops; · show how D- and JK-flip-flops can be used in simple memory and counter systems. Student should be able to apply the above skills to the practical design and construction of simple analogue and digital circuits. Unit Prerequisites Basic skills in calculus as in 1/PH/H Mathematical Physics. Use of complex numbers and the complex representation of waves as in 1/PH/L1 Waves and Optics Term(s): Summer Size of unit: 1 Unit Code: 2/PH/SK Modules: PH312 Department: Physics Pre-requisites: A-level Mathematics and/or Physics (or near equivalents) Co-requisites: None Excluded units: None Required for: Some Part 2 Laboratory units Convener: Dr D Dunn Teaching and learning methods: Lectures, workshops, and practical laboratory sessions. Contact hours: 4 Lectures 16 Workshops 8 Practical Laboratories 6 Electronics Assessment Weight Continuous assessment: Assigned problems 10% Design projects 20% Formal University Examination (One hour, April) Requirement for pass: An average of at least 40% Re-assessment: 1-hour examination in September 70% 28 February 2000 5 Electronics Mathematical Background The mathematics needed in this unit can be revised from the following FLAP modules: · M1.1Arithmetic and algebra · M1.2 Numbers, units etc · M1.3Functions & graphs · M1.5 Exponential and logarithm functions · M1.6 Trigonometric functions · M1.7 Series expansions · M4.1 Introducing differentiation · M4.2 Basic differentiation · M4.3 Further differentiation · M4.4 Stationary points & graph sketching · M4.5 Taylor expansions · M3.1 Introducing complex numbers · M3.2 Polar representation of complex numbers · M3.3 Demoivre’s theorem and complex algebra There may be other topics but these will be introduced as they are needed. Summaries of the FLAP mathematics units can be obtained directly from our Web page: http://www.physics.reading.ac.uk/flap/maths.html Preliminary Exercises 1. The quantity A is given by A= 1 æ 1 2ö ç + ÷ èa bø . Which of the following 3 expressions is also equal to A ? b 2 ab (ii ) b + 2a 1 2 (iii ) + a b (i ) a + 2. 6 Provide numerical examples to demonstrate the inequality: 1 1 1 + ¹ a b a+b Electronics 3. Provide numerical examples to show that (in most cases) a 2 + b2 ¹ a + b Give an example when the two sides are equal. 4. Differentiate the following functions with respect to t: i. f 1 (t ) = sin(M t + a) ii. f 2 (t ) = exp(at 2 + bt ) iii. f 3 (t ) = 2t 1 +t2 In each case show that df/dt is different from f/t 4. Evaluate each of the following expressions (no calculators !) 1 ; a = -1 , b = -2 1 1 a b 2 1 a ;a = ,b = 9 3 b i. ii. 1 iii. a+ 5. 1 b ;a = 1 4 ,b = 4 3 Solve the following equation for x: y2 = 6. f ( x ) = f (0) + xf ¢(0) + Use the Taylor series 1+ x 1-x x2 f ¢¢(0) + ... to determine the first 3 terms in the 2 power series expansion of each of the following: 7. i. g(t ) = sin(M t ) ii. h(t ) = sin(M t + B ) {An} represents a sequence of numbers A0, A1, A2, … etc. Are the following quantities the same or different: 10 å Ak ; k =1 10 åA s s =1 7 Electronics 8. f(x) is a real function defined by f (x) = 1 x + a2 2 Are the following quantities the same or different: 2 i. I1 = ò f (x)dx 1 2 ii. I2 = ò f (z)dz 1 2 iii. I3 = ò f (q + 1)dq 1 3 iv. 9. I4 = ò f (z - 1)dz 2 Using the same function as in 8, write out the expression for the following integral (do not try to evaluate it) t I (t ) = ò f (t - t ¢) dt ¢ 0 10. In a particular class 10 students have black shoes; 10 students have black trousers; and 5 students have black shoes and black trousers. How many students have black shoes or black trousers ? 11. Solve the following equations for x and y ( in terms of a, b, c, d, e and f): ax + by = c dx + ey = f 8 Electronics ANALOGUE ELECTRONICS CHAPTER 1: CIRCUIT LAWS 1.1 THE BASIC CONSTITUENTS Electric Current i(t) This is the rate of flow of electrical charge (usually electrons) across a surface. The "t" is included to emphasize that the current is a function of time. The "surface" is the cross-sectional area of the medium which is conducting the charge. The unit of current is the Amp (A) and 1 Amp is the flow of 6.24 ´1018 electrons per second across a surface, that is 1 Coulomb per second. If the total charge which has crossed a surface from time 0 to time t is q(t) then the current at time t is i(t) = dq(t) dt and not q(t)/t ! Voltage and Voltage Difference v(t) The voltage difference between two points A and B is the work done by the applied electric field in moving one Coulomb of charge from A to B. This is B vAB (t) = ò Ea ( r , t) · dr= v A (t)-v B (t) A Ea(r,t) is the applied electric field. I distinguish between voltage difference v(t) and potential difference f(t): The potential difference is B B AB (t) = ò E( r ,t) ·dr = B A (t) - B B (t) A where E is the total electric field in the conducting medium This is the sum of the applied electric field and any electric field which exists within the medium when no current is flowing. The applied electric field, and hence voltage difference, is the cause of the current. Note that these expressions are merely to show the relationship to electromagnetism: In electronics we work directly with the voltage differences: There is no need, in this unit, to evaluate line integrals ! The direction of the current is from the high voltage end to the low voltage end. The unit of voltage difference is the Volt (V). The voltage at a particular point in a circuit can be defined by choosing a reference point O as the voltage origin. This origin is assigned a voltage 0. The voltage at any other point A is the voltage difference between A and O. 9 Electronics Voltage Source This is the energy source for an electrical system. If the voltage source is vs(t) then this is the energy gained by one Coulomb of charge as it passes through the source. The primary source of the (static or time-dependent) voltage is usually some chemical process: Electrolytic process in a battery; burning coal or oil at a power station. Power p(t) The instantaneous power in a conductor is p(t) = i(t)v(t) where i(t) is the current flowing in the conductor and v(t) is the voltage difference across the conductor. This is the amount of work done per second in forcing the current through the conductor (and is usually emitted as heat). The unit of power is the Watt (W). Resistor This is a component in which the current i(t) passing through it is proportional to the voltage difference v(t) across it. R i(t) v(t) = Ri(t) ; i(t) = Gv(t) v(t) R is the resistance and its unit is Ohms (W); G is the conductance and its unit is Siemens (S=W-1). The direction of the current within the resistor is from the high voltage end towards the low voltage end. The resistance R is usually temperature dependent: In a metal the resistance increases with increasing temperature; in a semiconductor the opposite is usually (but not always) the case. In circuits resistors usually have resistance in the range 1W - 10MW. C i(t) v(t) i(t) L v(t) Capacitor This is a component which stores a charge q(t) proportional to the voltage v(t) across it. q(t) = Cv(t) This relation can be expressed in terms of the current flowing i(t): i(t) = C dv(t) dt This is the more useful relation because it is much easier to measure current than it is to measure charge. A capacitor essentially consists of two parallel metal plates separated by a dielectric material and, strictly speaking, it stores a charge q(t) on one plate and a charge -q(t) on the other. The unit of capacitance is the Farad (F) and in circuits capacitors typically have capacitances in the range 100pF 10mF. In normal commercial capacitors the metal plates are rolled in the form of a "swiss roll". Inductor This is a component in which the voltage difference across it is proportional to the rate of change of the current: 10 Electronics v(t) = L di(t) dt L is the inductance and its unit is the Henry (H). An inductor consists of wire wound onto a cylindrical core made of magnetic material (usually ferrite). Inductors used in circuits usually have inductances in the range 1mH 100mH. However real inductors are far from ideal -- they always have some resistance -- and it is better to avoid their use. Voltage Differences You should notice that in all the above component formulas it is the voltage difference which occurs; not the voltage at one end of the device. 1.2 NODES AND LOOPS N1 N2 N3 N4 A node is a point in a circuit at which two or more circuit elements are connected: For example points N1, ... N8 in the diagram. N8 N7 N6 A loop is any closed path in a circuit: For example N2-N3-N6N7-N2 in the diagram. N5 Nodes & Loops Often nodes which only connect two circuit components, such as N1, N4, N5, and N8, need not be considered since these can be dealt with trivially. The circle denotes a voltage source that may be static or time-varying. 1.3 KIRCHHOFF'S CIRCUIT LAWS Kirchhoff's Current Law The algebraic sum of the currents entering any node is zero. å i (t) = 0 k k Kirchhoff's Voltage Law The algebraic sum of voltage differences and voltage sources around any circuit loop is zero. åv (t) k = 0 k Notes 11 Electronics (i) It is very important to take proper account of the directions of the currents and the sense of the voltages in the application of these laws. (ii) These laws apply at all times and are not restricted to static (i.e. time-independent) currents and voltages. (iii) Strictly Kirchhoff's voltage law should include any induced voltage due to time-dependent magnetic fields (Faraday-Lenz law of electromagnetism). However the effect of this can be reduced by careful circuit layout. The induced voltage in any circuit loop is vind (t) = - d ò B( r , t) ×dS dt where the integral is over the surface area of the loop and B(r,t) is the external time-varying magnetic field. Such magnetic fields can originate from nearby mains cables or from local radio signals. The effect of such induced voltages can be reduced by ensuring that the surface area enclosed by such loops is as small as possible. Strictly for Kirchhoff's current law to apply the current i(t) has to include Maxwell's displacement current: i(t) ® i(t)+ d D( r ,t) × d S dt ò where D(r,t) is the electric displacement field (usually proportional to the electric field) and the integral is over the cross-sectional area of the conductor through which the current is flowing. In normal copper conductors D is very small and may be neglected. The complications of notes (iii) & (iv) will be ignored for the rest of this unit: They will reappear if you study the physics of semiconductor devices in Part III. 1.4 METHOD OF WORKING Here are some guidelines for a method of analysing problems in electronics (and the much of the rest of physics). (i) Assign algebraic symbols to all the physical quantities in the problem, even to those quantities whose values are known. (ii) Choose easily identifiable symbols. For example, R1, R2, ... for resistors, C1, C2, ... for capacitors, L1, L2, ... for inductors. (iii) In the algebraic process make sure that you add or subtract only those quantities which have the same units. It makes no physical sense to add quantities that have different units. (iv) Insert any known values only at the end of the analysis. Using algebraic symbols makes it very easy to change the component values: only the very last step of the calculation needs to be changed. Error Detection Checking that quantities being added have the same units is a very simple but powerful method of detecting errors in a calculation. For example if the term (R1 + R2R3) appears anywhere in your analysis then you have made an error: R1 has unit W whereas R2R3 has unit W2. If the numerical values of R1, R2 and R3 had been used, rather than algebraic symbols, it would have been impossible to detect such an error. 12 Electronics The units of resistors, capacitors and inductors are related: H = Ws; F = sW-1; H = s2F-1; F = s2H-1. Particularly useful combinations to remember are: [RC] = s = [L/R], where [RC] means the unit of RC. That is, the unit of resistance ´ capacitance is the second as is the unit of inductance divided by resistance. Exercise 1.1 The following terms exist as part of a calculation, where R's, L's and C's indicate resistors, inductors and capacitors and t is time. Indicate those which must be wrong: (i) R1 + (iii) R2 + R3 ; R2 R3 R2 R3 ; R2 + R3 (ii) R1 + R1C2 + R2 L1 ; (iv) R1C2 + (v) exp( - R1C2 t ) ; (vi) exp( -R1t ) ; (vii) sin( L2 t) ; R1 (viii) cos( L1 R2 R2 t) . C1 Example 1.1 Applying Kirchhoff's current at node N1: i1(t) i2(t) i 3 (t) = i1 (t) - i 2 (t) . In each case the arrow denotes the direction which has been designated as 'positive'. So, for example, when i1(t) is positive the current is moving to the right and when i1(t) is negative it is moving to the left. i3(t) 13 Electronics Example 1.2 v1(t) vs (t) = (v1 (t) + v2 (t) + v3 (t)) In each case the voltage difference is taken as that at the arrow head minus that at the arrow tail. v2(t) vs(t) This means, for example, that if v1(t) is positive then the current flowing through the device is from left to right. v3(t) 1.5 COMBINATIONS OF RESISTORS AND CAPACITORS Applying Kirchhoff's voltage and current laws we get the equations: i1(t) i s (t) = i1 (t) = i 2 (t); vs (t) = v1 (t) + v2 (t). R1 R2 v1(t) v2(t) i2(t) From the definitions of resistance we have: vs(t) v1 (t) = R1 i1 (t) v2 (t) = R2 i 2 (t) is(t) Hence the relationship between is(t) and vs(t) is: vs (t) = (R1 + R2 ) i s (t). This means that if we were to replace the two resistors by one then to have the same current-voltage relationship this single resistor would be R = R1 + R 2 That is two resistors R1 and R2 in series are equivalent to a single resistance (R1 + R2). Exercise 1.2 Using Kirchhoff's current and voltage laws derive (i) the equivalent resistance to two resistors in parallel; (ii) the equivalent capacitance for two capacitors in series and (iii) the equivalent capacitance for two capacitors in parallel. 14 Electronics 1.6 INTERNAL RESISTANCE All practical voltage sources have internal resistance. This means that a practical voltage source can be considered as an ideal voltage source vs in series with a resistor Rs. This resistor is not an added component but is an integral part of the voltage source (e.g. battery) Rs vs(t) Internal Resistance Exercise 1.3 A 1.5V battery has an internal resistance of 0.75W. Calculate what is the output voltage when the current taken from the battery is (i) 0 (ii) 200 mA. What is the load resistor in case (ii) ? Note: ‘Load’ is electronics jargon for something attached to the output terminals of a circuit. 1.7 VOLTAGE DIVIDER A voltage source vs(t) can be divided down by using the circuit shown. R2 Exercise 1.4 Prove, using the circuit laws, the relation shown in the figure. This voltage divider will be used many times in many different guises throughout the course: make sure that you understand it. Exercise 1.5 vs(t) R1 vo(t) R1 vo(t) = ----------------- vs(t) R1 + R2 This problem should show that care is needed in the use of the voltage divider. Suppose a 12V static voltage source has been divided down to 6V using two 100 W resistors. This is then applied to a 100 W load resistor. Find the voltage across the load resistor. 15 Electronics 1.8 NODAL ANALYSIS A general method of circuit analysis is : (i) Choose one of the circuit nodes as the reference node -- usually one of the terminals of a voltage source. This is assigned a voltage 0 and denoted by an inverted triangle. (ii) Give each node voltage (relative to the reference node) a symbolic name v1, v2, ... et cetera. (iii) Some nodes may have their voltages determined directly by voltage sources -- label these accordingly. (iv) If there are n unknown voltages then apply Kirchhoff's current law at the n nodes corresponding to these unknowns. Example: Note that this is quite a difficult problem! Consider the circuit in the diagram. The output vo is taken across the terminals labelled v2 and v2+vo. The voltage at the one node is labelled v2+vo rather than, say v3 because the required output voltage is the difference between this voltage and v2. v1 is equal to the input voltage vs and so there are two unknown voltages v2, which we do not want, and vo the output voltage. We apply Kirchhoff's current law at the nodes with voltages v2 and (v2+vo): v2 : vs - v2 ( v2 + vo ): R2 + vo R3 - ( v1 - v 2 - vo ) R1 - vo R3 v2 R5 - v1 R2 R1 v2 v0+v2 vs(t) R3 R4 R5 = 0 ( v2 + v0 ) R4 = 0 Each of the terms on the left-hand-side of these equations is the current through one of the resistors. These equations are easier to manipulate if we use the conductances (G = 1/R) instead of the resistances. If we use the first of these to determine v2 and then substitute this into the second we obtain: vo = G1 G 5 - G 2 G 4 vs ( G2 + G5 )( G1 + G4 + G3 ) + G3 ( G1 + G4 ) This is called a bridge circuit and a typical use is with a strain gauge. A strain is the change in length divided by the original length for any object. A strain gauge is essentially a metal resistor whose resistance varies with the strain (i.e. squashing or stretching) applied to it. In a typical application, if R1 is the variable strain gauge resistor, R2, R4 and R5 would be chosen to be equal to the unstrained value of R1 and hence the output voltage would be zero for zero strain. For small strains and hence small changes in R1 the output voltage would be proportional to the strain. Exercise 1.6 In the above example suppose that R1 = R + DR where DR is proportional to the strain and that the other four resistors are equal to R. Determine the output voltage. 16 Electronics CHAPTER 2: LINEAR, TIME-INVARIANT SYSTEMS We are now going to consider a particular class of systems – linear, time-invariant systems – which are important in physics (of which electronics is but a small part). We first have to say what we mean by these terms. Consider a physical system with one input at which we apply some time-dependent signal x(t) and one output at which is produced the resulting signal y(t). Input Output x(t) y(t) In electrical circuits x(t) and y(t) are usually input and output voltages or currents. However in other areas of physics x(t) and y(t) could be the intensities of incident and reflected light beams; the stress and strain on a solid body; the force applied to and the displacement of some object and so on. General System Basically x(t) is the 'cause' of some effect and y(t) is the resulting 'effect'. Linearity Suppose that if a signal x1(t) is applied at the input this gives rise to an output y1(t) and that if a different signal x2(t) were to be applied to the input this would give rise to an output y2(t). The system is said to be linear if, and only if: (i) Linear Scaling -- input [c x1(t)] gives rise to output [c y1(t)] for any number c (including negative numbers) and for any input function x1(t); and (ii) Linear Superposition -- input (x1(t)+x2(t)) gives rise to output (y1(t)+y2(t)) for any input functions x1(t) and x2(t). These two conditions are equivalent; that is, either one implies the other. (This is not obvious and I shall not prove it ! ) In order to prove that a system is linear it is sufficient to prove either that (i) Linear Scaling or (ii) Linear Superposition applies. Time-Invariance Suppose, as before, that input x1(t) gives rise to output y1(t). A system is said to be time-invariant if, and only if, input x1(t-t0) gives rise to output y1(t-t0) for any t0 and x1(t). 17 Electronics Note that the function x1(t-t0) has the same shape as function x1(t) except that is shifted in time by amount t0. So in a time-invariant system shifting the input in time by t0 simply produces a time-shift of the output by the same amount. The concept of linearity can be extended to systems with more than one input and with more than one output. In such a system linearity implies that we can deal with the inputs one at a time. That is we first put all but one of the inputs to zero and analyse the system; then move on to the next input and so on and finally add all the various contributions to the output(s). It is important to realise the linearity does NOT simply mean that y(t) = a x(t) !! Example: Linear, Time-Invariant Systems The following input-output relations all represent linear, time-invariant (LTI) systems. ( i) y (t) = a x (t) ( ii) y (t) = d x (t) dt t ( iii) y ( t) = c ò x ( t ¢) d t ¢ -¥ Example: Linear but Non-Time-Invariant systems (i) y(t) = acos(wt)x(t) dx(t) (ii) y(t) = bsin(wt) dt t (iii) y(t) = ò sin(wt ¢)x(t ¢)dt ¢ -¥ Example: Non-Linear but Time-Invariant systems (i) y(t) = a x 2 (t) dx(t) (ii) y(t) = bx(t) dt t (iii) y(t) = c ò x 3 (t ¢)dt ¢ -¥ Example: Non-Linear and Non-Time-Invariant Systems (i) y(t) = acos(wt) x 2 (t) (ii) y(t) = bsin(wt)x(t) dx(t) dt t (iii) y(t) = c ò sin(wt ¢) x 2 (t ¢)d ¢t -¥ You should ensure that you can demonstrate that each of the above examples has the stated properties. 18 Electronics Worked example Consider one of the example systems quoted above. In particular consider a system in which the input x(t) and output y(t) are related by: y(t) = b sin(wt) dx(t) dt Linearity How do we test for linearity ? First consider an input x1(t). (Note: x1(t) is just a name we choose for this input.) Using the above formula the corresponding output, let’s call this y1(t), is y1(t)=b sin (w t) dx1 (t) dt . Now consider another input x2(t) which is just cx1(t) where c is a constant. Again using the above formula the corresponding output, let’s call this y2(t), is y2(t)=b sin (w t) dx 2(t) dt =b sin (w t) d(cx1(t)) dt . Now we ask the question : Is y2(t) equal to cy1(t) ? Since c is a constant it can be brought outside the derivative in the above equation. We then clearly see that y2(t) is indeed equal to cy1(t) and hence the system is linear. Time-Invariance How do we test for time-invariance ? We start with input and corresponding output, x1(t) and y1(t), where the output is given as before by y1 (t) = bsin(wt) dx 1 (t) dt Next we consider another input x3(t) which is a time-shifted version of x1(t): x 3 ( t ) = x1 ( t - t 0 ) . The output corresponding to x3(t), which we call y3(t), is obtained by inserting the function x3(t) into the general formula y 3 (t) = bsin(wt) dx 3 (t) dt = bsin(wt) d(x 1 (t - t0 )) dt . Now we ask the question: Is y3(t) equal to y1(t-t0) ? y1(t-t0) can be obtained by taking the above formula for y1(t) dx 1 (t - t ) 0 and replacing t by t-t0. y1 (t - t ) = b sin(w (t - t )) . This is Not the same as y3(t) because in one 0 0 dt case we have sin(wt) and in the other sin(w(t-t0)). Hence the system is not time-invariant. Exercise 2.1 Determine whether or not the following relations between input x(t) and output y(t) represent linear, timeinvariant systems: (i) y(t) = ax(t) + b (ii) y(t) = f(t)x(t) (iii) y(t) = a|x(t)| t (iv) y(t) = ò sin( w0 (t - t ¢))x(t ¢)d ¢t -¥ where a, b and w0 are constants and f(t) is an arbitrary function of time. 19 Electronics 2.1 LINEAR, TIME-INVARIANT SYSTEMS AND SINUSOIDAL INPUTS It is important to realise that, in general, even for a linear time-invariant system, the output function y(t) does not have the same shape as the input function x(t). In order to emphasise that the input and output, in general have different shapes, we consider the simple RC circuit shown in the figure. This circuit is typically used where we do want to change the shape in order to remove 'noise' from electrical signals: The output is a 'smoothed' version of the input. R vs(t) C Exercise 2.2 vo(t) R-C Circuit Using the circuit laws, derive the relation between the input voltage vs(t) and the output voltage vo(t) and show that the system is linear and time-invariant. In this case if the input voltage is a step function (that is, the voltage is switched on at time 0 ) vs (t) = V s , t ³ 0 = 0, t< 0 then the output voltage is v0 (t) = V s (1 - exp(= 0, t )), t ³ 0 RC t <0 This clearly does not have the same shape as the input. This has demonstrated that, in general, there is no simple relationship between the shapes of the input and output signals. Sinusoidal Inputs A sinusoidal function is a sine or cosine function or a linear combination of sine and cosine functions: sin(wt) cos(wt) a sin(wt) + bcos(wt) Sinusoidal inputs have very special properties for LTI systems: If the input x(t) is a sinusoidal function with angular frequency w then so is the output. That is the input and output have the same shape. The only modifications are a change in amplitude and a shift along the time axis. If the input x(t) to a LTI system is 20 Electronics x(t) = X0 cos(wt) then the output function y(t) has to be in the form y(t) = X0 G(w) cos(wt + j(w)) . w is the angular frequency of the sinusoid; the normal frequency is f = w/2p. G(w) is called the gain (even if it less than one) and j(w) is called the phase shift. These are, in general, functions of angular frequency. Note that the gain G(w) is a positive number and that the phase shift j(w) is in radians and is restricted to the range (-p.,p.). If we consider the input to be a combination of sinusoids at different frequencies wn then, because of the linear property, the output is the same combination of the corresponding output sinusoids. input: x(t) = å A n cos(M n t) n output : y(t) = å A n G(M n )cos( M n t +B (M n )) n The individual terms in the summations are called the Fourier (or frequency ) components of x(t) or y(t). Non-Linear Systems There are many types of non-linear systems. In the type which occurs most often if a sinusoidal signal X0 cos(Wt) is applied to the input then the output contains combinations of sinusoids of frequency W, 2W, 3W, 4W, ...etc. In other non-linear systems, called chaotic, an input X0 cos(Wt) can give rise, if X0 is large enough, to an output which contains a continuum of frequencies. 2.2 FOURIER ANALYSIS The above property of sinusoidal inputs to LTI systems would be interesting but not very important if it were not for the concepts involved in Fourier Analysis. The essential concept is that (almost) any function can be constructed using sinusoids as the building blocks. There are two forms of construction: A periodic function x(t) can be written in the form x(t) = åX n n cos( wn t + ? (w n )) and if this is applied to the input of a LTI system the corresponding output function y(t) occurs in the form. y(t) = å X n G( wn )cos( wn t + ? ( wn ) + B ( wn ) ) n For a general, non-periodic, input the sums over wn are replaced by integrals over w. ¥ x(t) = ò X( M )cos( M t + ? (M )) dM -¥ 21 Electronics ¥ y(t) = ò X( M ) G(M )cos( M t + ? (M ) + B (M )) dM -¥ The details of Fourier Analysis are not important at this stage in your course but the concepts are. These concepts provide a method of analysing any LTI system. What we want to know about such a system is: If we apply a particular input x(t) what will be the output y(t) ? If we know how the system responds to sinusoidal inputs then we can answer this question however complicated the required input x(t) may be. The method which enables us to do this is: (i) Determine, either by calculation or experiment, the response of your LTI system to sinusoidal inputs. That is determine the gain G(w) and phase f(w) as a function of angular frequency w (or frequency f = w/2p). (ii) Obtain a Fourier Representation of the required input x(t). That is, express x(t) as a sum (or integral) of sinusoidal terms. You will learn how to do this in detail later in the Physics course. (iii) The output function y(t) can then be constructed: Each Fourier Component of x(t) is multiplied by G(wn) and is phase shifted by f(wn). The existence of this method explains why we put so much emphasis on determining the response of LTI systems to a sinusoidal input even if such an input would not normally be applied to the system. Consider for example an amplifier designed to be used with a microphone. This would normally be used to amplify the electrical signals produced from speech or music. Such signals are much more complicated than simple sine waves and it would be very unusual if a simple sine wave were ever to be applied to the input in its normal usage. Yet in designing and testing the amplifier we would concentrate on its response to sinusoidal signals. You should make sure that you understand this apparent paradox. Example: An RC Circuit Consider the RC circuit used in Exercise 2.2 and suppose that the input vs(t) is vs(t) = Vs cos(Mt). According to the theory the output vo(t) must be in the form vo(t) = Vs G(M)cos(M t + B (M)). If we insert these forms into the equation which you should have derived in Exercise 2.2 we get, after dividing both sides by Vs and multiplying by RC, -RCwG(w)sin(wt + B (w)) + G(w)cos(wt + B (w)) = cos(wt) In order to identify G(w) and f(w) we have to expand the sin and cos functions on the left-hand-side and then identify the coefficients of cos(wt) and sin(wt). 22 Electronics Exercise 2.3 Perform these expansions, determine the resulting equations and solve them for G(w) and f(w) . The solution you should have obtained is : G(w) = 1 1 + (wRC )2 B (w) = - arctan(wRC) This method of determining the sinusoidal response is extremely unwieldy and we next look at a much better method. Exercise 2.4 (i) Explain why, in the design or analysis of a LTI system, we concentrate on the way the system responds to sinusoidal inputs even if in its ‘normal life’ it may never see such an input. (ii) Invent a function f(t) and plot this over a range 0 < t < 10. On the same graph plot f(t-1) and f(t+1). Comment on the results. 23 Electronics CHAPTER 3: COMPLEX REPRESENTATION OF SINUSOIDS Suppose that the input x(t) = X0 cos(wt) to a LTI system produces an output y(t) = X0 G(M) cos(M t + B (M)) then the input x(t) = X0 sin(wt) would produce the output y(t) = X0 G(M) sin(M t + B (M)) with the same G and j(w) because the sine function is simply a shifted version of the cosine function. Exercise 3.1 Prove that the above statement is true. Hint: express sin in terms of cos As a mathematical trick, we can consider the possibility of using complex input functions. Consider the input function x(t) = A cos(Mt) + j A sin(Mt) where j = Ö(-1). (Note: j rather than i because i is used for current.) Because of linearity we can immediately write down the output which corresponds to this complex input: y(t) = A G(M) cos(M t + B (M)) + j A G(M) sin(M t + B (M)) . These can be expressed more concisely using exponential functions: The complex input x(t) = A exp(jM t) produces the complex output y(t) = A G(M) exp[j(M t + B (M))]. We can still extract the real physical responses of the system: The real part of the output is that produced by the real part of the input and the imaginary part of the output is that produced by the imaginary part of the input. We can make the above relations appear even simpler. We define a complex quantity H(M) = G(M) exp(jB (M)) and call this the frequency response function of the LTI system. In terms of this function we have 24 Electronics input x(t) = A exp(jM t) gives output y(t) = A H(M) exp(jM t) . The significance of using H(w) is that it is very easy to determine: It is much easier to find the complex quantity H(w) than to find the real quantities G(w) and f(w). The normal method is to first find H(w) and then to work out G(w) and f(w) from H(w). The reason for this is as follows: If the input has time-dependence exp(jwt) then so does every current and voltage in the system. This effectively means that time can be eliminated from the problem. It also means that capacitors and inductors can be treated just as easily as resistors. Consider first a circuit consisting of a single capacitor C. The relationship between the voltage vc(t) across the capacitor and the current ic(t) flowing to and from it is i c (t) = C dvc (t) dt If these two quantities both have complex exponential time-dependence i c (t) = I c (w)exp(jwt) , vc (t) = V c (w)exp(jwt) then the capacitor equation becomes I c (w)exp(jwt) = jwC V c (w)exp(jwt) The exponential time factor occurs on both sides and can be cancelled out. This means that that there is a simple relationship between the complex amplitudes of the voltage and current which is independent of time: V c (w ) = 1 I c (w) jwC Compare this with what we would have had if we had used real sinusoidal signals: one side would have had a sin(wt) term and the other would have had a cos(wt) term which, of course, could not be cancelled. Because of the cancellation of the complex exponential time factors the capacitor equation can be written entirely in terms of the complex amplitudes. If we do this, in exactly the same way, for a simple resistor we get VR (w) = R IR (w): These relations have the same form except that the capacitor has a complex resistance 1/(jwC). We call such a complex resistance an impedance. So if we use a complex representation for the sinusoidal currents and voltages we do not need to explicitly involve time: We can simply deal with the complex amplitudes and components such as capacitors and inductors can be treated in the same way as resistors. Exercise 3.2 Show that the impedance of an inductor L is jwL 3.1 METHOD OF ANALYSIS The response of LTI systems to sinusoidal voltages (or currents) can be analysed as follows: 25 Electronics (i) Work with the complex amplitudes V1(w), V2(w),.., I1(w), I2(w).. of the voltages and currents. Do not include the complex exponential time-dependent factors exp(jMt) at this stage . (ii) Use the appropriate complex impedances for the circuit elements: R for a resistor, jwL for an inductor and 1/(jwC) for a capacitor. (iii) The analysis then proceeds exactly as for static voltages and currents, using Kirchhoff's current and voltage laws. (iv) The ratio of the complex output voltage amplitude to the complex input voltage amplitude is H(w) the frequency response function. (v) The gain G(w) and the phase shift f(w) can then be determined from H(w) by G(w) = ½H(w)½, f(w) = ph(H(w)). ph(Z) denotes the phase angle of the complex number Z. (vi) At the end of the calculation multiply the input and output voltage (or current) amplitudes by exp(jwt) and take the real part of each to get the real sinusoidal responses. Example: An RC Circuit Consider (yet again !) the RC circuit as we have looked at before. If we use complex exponential voltages and currents then we only need to deal with the complex amplitudes: The time-dependent factor need not be included. In this case the circuit consists of two impedances, R and (1/jwC), in series and the analysis is exactly the same as for the voltage divider treated earlier. The frequency response function is simply the complex output voltage amplitude over the complex input voltage amplitude: H(M ) = 1 (1 + jM RC) The ease with which this result was obtained should be compared with the previous analysis using real sinusoidal functions. The complex amplitude of the output voltage is V o (w) = V i (w) (1 + jwRC) where Vi(w) is the complex amplitude of the input voltage. The gain and phase are simply |Vo (M )| = |Vi (M )| 1 + (M RC ) 2 ph(Vo (M )) = ph(Vi (M )) - arctan(M RC) and hence the final real input and output voltages are vi (t) = V i (w) cos(wt + B i ) vo (t) = where fi is ph(Vi(6)). 26 |V i (w)| 1 + (wRC ) 2 cos(wt + B i - arctan(wRC)) Electronics 3.2 MAGNITUDE AND PHASE OF A COMPLEX NUMBER It is common to obtain the frequency response function H(6) as a product of complex terms. We are then faced with the problem of determining the magnitude and phase of this complex product. Suppose we have a complex number Z given by Z = ( Z 1 Z 2 .... ) ( Z a Z b ... ) The conventional method of dealing with this as taught, for example, in A-Level mathematics is: Explicitly multiply the terms in numerator; multiply the terms in denominator; rationalize the resulting complex fraction and when the result is finally in the form (X + jY), determine the magnitude as Ö(X2+Y2) and the phase as ph(X+jY). Do not use the conventional method: It is very prone to errors and almost always leads to very complicated expressions which are much harder to analyse than the original expression. A much better method is to determine the magnitude and phase as: |Z| = |Z 1||Z 2|... |Z a||Z b|... ph(Z) = (ph( Z 1 ) + ph( Z 2 ) + ... ) - (ph( Z a ) + ph( Z b ) + ... ) In the case of the phase, enough (2p)'s should be added or subtracted to put the result into the range (-p,p). You should be aware that determining the phase of (X + jY) as arctan(Y/X) sometimes gives the wrong answers. For example the phase angle of (-1 - j) is clearly -3p/4 (draw it !) yet arctan(Y/X) gives p/4. The arctan method gives the correct result only if X > 0: If X < 0 and Y < 0 use arctan and then subtract p; if X < 0 and Y > 0 use arctan then add p. Worked example (5 + 7 j ) 3 ( 6 + 2 j ) 2 Consider a complex number Z given by Z = . How do we work out the magnitude & (7 + 5 j ) 3 (2 + 6 j) 2 phase ? We can work on each term separately. (5 + 7j): 5 + 7 j = 52 + 7 2 = 74 ; ph(5 + 7 j ) = arctan(7 / 5) 3 5+ 7 j = [ 52 + 7 2 ] = [ 74 ] ; ph[ (5 + 7 j) ] = 3arctan(7 / 5) 3 3 3 7 + 5 j = 7 2 + 5 2 = 74; ph(7 + 5 j ) = arctan(5 / 7 ) (7+5j) : (6+2j) : 7+5j 3 3 = é 7 2 + 52 ù = êë úû [ 74 ] ; ph[(7 + 5 j ) ] = 3 arctan(5 / 7) 3 3 6 + 2 j = 62 + 2 2 = 40 ; ph(6 + 2 j ) = arctan(2 / 6) 2 6+2j = [ 62 + 2 2 ] = [ 40 ] 2 2 ; ph[(6 + 2 j ) 2 ] = 2 arctan(2 / 6) 27 Electronics (2+6j) : 2 + 6 j = 2 2 + 62 = 40 ; ph(2 + 6 j ) = arctan(6 / 2) 2 2+6j = [ 2 2 + 62 ] = [ 40 ] 2 2 ; ph[(2 + 6 j ) 2 ] = 2 arctan(6 / 2) Putting these together we get: ph( Z ) = [3 arctan(7 / 5) + 2 arctan(2 / 6)] - [3 arctan(5 / 7) + 2 arctan(6 / 2)] . = 3 ´ 0.951 + 2 ´ 0.322 - 3 ´ 0.620 - 2 ´ 1249 = -3.429 This phase, although correct, is outside the normal -p to +p range. To get into this range we add or subtract an appropriate number of 2p. The resulting phase is -0.287 (in degrees this is -16.45°) If you do not believe that this method is easier, repeat this Exercise using the conventional method! Exercise 3.3 Determine the magnitude and phase of the complex numbers: 3 (1 + j ) 3 (1 - j ) 1 (ii) Z = (1 + j)(1 + 2j) (i) Z = (iii) Z = (2 + j)(3 + 4j) (1 + 2j)(4 + 3j) Exercise 3.4 Determine the complex impedance of a resistor R and a capacitor C in parallel. Hence determine the frequency response function H(w) for the circuit in the diagram. Hint: Regard this as a voltage divider. 28 R1 R2 C2 Electronics 3.3 THEVENIN AND NORTON EQUIVALENT CIRCUITS Suppose we have an electronic instrument with two output terminals. This may involve a complicated circuit with many hundreds of components. It is perhaps surprising that no matter how complicated this instrument we can describe its output properties in terms of just two functions. The methods that enable us to do this are known as equivalent circuits. Imagine a circuit which is subject to a complex sinusoidal input and hence in which all the voltages and currents have the same complex exponential time-dependent factor. If we consider any pair of terminals, then the circuit looked at from these terminals is equivalent to: A Z A VT B A B (i) a voltage source VT(w) in series with an impedance Z(w), Z IN B or (ii) a current source IN(w) in parallel with an impedance Z(w). The first of these is called the Thevenin equivalent and the second the Norton equivalent. VT(w) is the complex amplitude of the open-circuit voltage across these pair of terminals. That is the voltage measured with no external components connected across the terminals. IN(w) is the complex amplitude of the short-circuit current measured at these terminals. That is the current which flows when the terminals are connected by zero resistance --that is shorted-circuited. Z(w) is the impedance seen at those terminals, defined by Z(w) = VT(w)/IN(w) Exercise 3.5 Determine the Thevenin equivalent at the output terminals of the circuit in Exercise 3.4 . These equivalent circuits mean that at a given pair of terminals the properties of a circuit, however complicated, can be described by just two functions – either VT(M) and Z(M) or IN(M) and Z(M) Using this equivalent circuit it is very easy to determine the changes that occur when if we connect some extra impedance across the particular pair of terminals. If a load impedance ZL is connected across the pair of terminals we are considering the complex amplitudes of the current through and the voltage across R are ZL (M ) ZL (M ) + Z(M ) Z(M ) I L (M ) = I N (M ) ZL (M ) + Z(M ) VL (M ) = VT (M ) These results can be derived by applying the voltage divider result. These equations can be used to measure the equivalent output impedance Z(w) of a pair of terminals of a circuit. 29 Electronics A method is to use a load resistance (ZL = R) and to measure the amplitude of the output voltage (or current) as a function of R and from these results deduce Z(w). This is not particularly easy ! In order to avoid damage to the circuit it is better to start with a large resistance, say of magnitude 1 MW: A small impedance may draw too much current from the circuit. If the impedance is written as Z(w) = X(w) + jY(w), where X and Y are real, then for large values of R |VL (M )| X ® 1, R ® ¥ and so X(w) can be identified (at the particular frequency we are using). |VT (M )| R As the resistance is reduced |VL (M )| ® |VT (M )| R X2 + Y2 , R ® 0 which can be used to identify Y2 and hence the magnitude (but not the sign) of Y. In simple cases where the output impedance is real then this can be measured very easily: Start from a large load resistor and gradually reduce this until the voltage across the load is just a half of the open circuit voltage. At this point the load resistor is equal to the (real) output impedance. The equivalent output impedance of a pair of terminals can be calculated from the circuit diagram by determining the impedance between the two terminals when all independent voltage and current sources have been replaced by their internal impedances. For an ideal voltage source the internal impedance is zero and for an ideal current source the internal impedance is infinite. So we replace an ideal voltage source by a short-circuit and an ideal current source by an open-circuit. 30 Electronics 3.4 INPUT AND OUTPUT EQUIVALENTS What do we need to know about a circuit ? There are three essential pieces of information: · The relationship between the input voltage and (open-circuit) output voltage; · The way the output voltage changes when we connect some load impedance across the output terminals; · The current that is required at the input to the circuit We can use the Thevenin equivalent circuits to provide all this information. For a simple LTI system with one pair of input terminals and one pair of output terminals we can construct the following equivalent circuit: Zs Zo Zi Vs Zload V out This shows a LTI system (denoted by the double-lined box) to which is applied a voltage source with complex amplitude Vs(w) and source impedance Zs(w) and which has a load impedance ZL(w) connected across its outputs. Zin(w) is the input impedance: This is the ratio of the complex input voltage amplitude to the complex input current amplitude. It is the Thevenin equivalent impedance at the input terminals (in the absence of any voltage source). At the output terminals the Thevenin equivalent voltage source is H(w)Vi(w) where Vi(w) is the complex voltage amplitude at the input terminals and H(w) is the frequency response function. Zo(w) is the output impedance and is the Thevenin equivalent impedance. Notice, in general, that Vi(w) ¹ Vs(w) and that Vo(w) ¹ H(w)Vi(w) : These quantities have to be determined using the impedance values and the general expressions are V i (M ) = V o (M ) = Z i (M ) V s (M ) Z i (M ) + Z s (M ) ZL (M ) H(M ) V i (M ) Z L (M ) + Z o (M ) Ideal Circuits For most purposes the ideal LTI circuit has infinite input impedance and has zero output impedance. So in the ideal LTI circuit no current is taken at the input, which means that the input voltage is independent of the source impedance, and the output voltage does not change when we attach a load impedance. For such an ideal system we have V i(M ) = V s (M ) V o (M ) = H(M ) V i (M ) 31 Electronics In practice we try to achieve these ideals by making the input impedance as large as possible and the output impedance as low as possible. Exercise 3.6 Consider the linear systems shown in the figure. R1 C2 C1 R2 Suppose that a voltage source with complex voltage amplitude Vs(w) and with internal impedance Zs(w) is applied to the input of the RC circuit. Determine the open-circuit output voltage and the output impedance. Suppose next that the input of the second circuit (R2-C2) is connected to the output of the first. Find the output voltage and output impedance of the combined circuit. 3.5 FREQUENCY RESPONSE FUNCTIONS In simple electronic systems the frequency response function must occur in the form b0 + b1 jw ... + b m (jw )m H(w) = n a0 + a1 jw ... + an (jw ) That is, H(w) is one polynomial in (jw) divided by another polynomial in (jw). The order n of the denominator polynomial is called the order of the system. This is a useful classification and it is also a guide to the likely complexity of the resulting circuit: The larger n the more complicated is the circuit. The order of numerator is usually less or equal to the order of the denominator: m £ n. Note that frequency response functions for general physical systems can be much more complicated ! First-Order Systems There are two simple first order systems: H 0 w0 w0 + jw jw H0 (ii) H(w) = w0 + jw (i) H(w) = The first is a low-pass filter and the second is a high-pass filter. The term filter is applied to a circuit that can be used to remove unwanted components from an electrical signal. Exercise 3.7 Determine the gain and phase for these two frequency response functions. What is the significance of the names? 32 Electronics Bode Plots A useful way of presenting the gain of a system is via a Bode plot. This is simply a log-log plot of the gain G(w) versus angular frequency w or the gain versus the frequency f (=w/2p). This is usually done by plotting gain versus f on log-log paper rather than plotting log(gain) versus log(f) on linear paper. These two ways of plotting are equivalent but the first method is much easier and this is the method I shall use. A Bode plot of a first-order system with H0=1000 and f0(=w0/2p)=1000 Hz is shown in the figure: FIRST-ORDER LOW-PASS FILTER: GAIN 1.00E+04 1.00E+03 Gain The two straight lines are a good approximation to the actual curve. One of the straight lines -- the constant -- gives the low frequency gain; the other, which gives the high frequency gain 'slope' on the log-log plot of -1. A 'slope' of -1 on the loglog plot means that if f increases by a factor the gain decreases by the same factor. 1.00E+02 1.00E+01 1.00E+00 1.0E+01 1.0E+02 1.0E+03 1.0E+04 1.0E+05 f Hz Exercise 3.8 Draw the Bode plot for a high-pass filter with H0=100 and f0 ( = w0/2p) = 100Hz. FIRST-ORDER LOW-PASS FILTER: PHASE 1.0E+01 1.0E+02 1.0E+03 1.0E+04 1.0E+05 0.0E+00 -2.0E-01 -4.0E-01 Phase -6.0E-01 -8.0E-01 -1.0E+00 -1.2E+00 -1.4E+00 -1.6E+00 f Hz In the case of phase it is conventional to plot the actual phase (not the logarithm because the phase may be negative) against the logarithm of the frequency or, equivalently, to plot the phase verus frequency on linear-log paper. The figure above shows the variation of phase with frequency for the first-order low-pass filter considered above. Notice that the phase starts at zero for low frequencies, tends to -p/2 for high frequencies and is equal to -p/4 at w=w0. 33 Electronics Exercise 3.9 Sketch the variation of the phase versus log-frequency for a first-order high-pass filter with H0=100 and f0=w0/2p=100Hz. Second-Order Systems Second-order systems have frequency response function with denominators that are quadratic in (jw). It is conventional to write this denominator in the form 2 (jM ) + jM M 0 + M 20 Q w0 is called the characteristic angular frequency and Q is called the Q-factor. The most common second systems are: (i) Low-Pass Filter H(M ) = H 0 M 20 M M0 - M2 M 20 + j Q The significance of the various parameters can be seen by considering the high and low frequency limits, and the value at w=w0 : H(M ) » H0 , M « M 0 M2 H(M ) » - H0 2 0 , M » M 0 M H(M 0) = H0 Q Notice that the high frequency components are reduced. The shape of the function H(w) for w»w0 is controlled by the value of Q. For small values of Q, Q<1/Ö2, the gain varies smoothly with w; for large values of Q, Q>1/Ö2, the gain has a peak at M = M0 1 and the height of this peak is H0 Q 1 1 2 4Q 34 1 2 2Q Electronics SECOND-ORDER LOW-PASS FILTER: GAIN 1.0E+04 Gain 1.0E+03 1.0E+02 1.0E+01 1.0E+00 1.0E+01 1.0E+02 1.0E+03 1.0E+04 1.0E+05 f Hz The figure shows examples of this second-order low-pass filter with H0=1000, f0=w0/2p=1kHz and for four values of Q: Q = 1/2, 1/Ö2 , 2.and 5 The case Q=1/Ö2 is special: This is known as a Butterworth filter and it has the flattest low frequency region. Notice that on this Bode plot the high frequency regions have a 'slope' of -2. The phase function for this filter is as shown below S E C O N D - O R D E R L O W - P A S S F IL T E R : P H A S E 1 .0 E + 0 1 0 .0 E + 0 0 1 .0 E + 0 2 1 .0 E + 0 3 1 .0 E + 0 4 1 .0 E + 0 5 - 5 .0 E - 0 1 - 1 .0 E + 0 0 Phase - 1 .5 E + 0 0 - 2 .0 E + 0 0 - 2 .5 E + 0 0 - 3 .0 E + 0 0 - 3 .5 E + 0 0 f Hz (ii) Band-Pass Filter H( M ) = H 0 (jMM 0 ) M M0 M 02 - M 2 + j Q This is a filter which allows a band of frequencies around w=w0 to pass through. 35 Electronics The gain, in this case, has a maximum at w = w0 and its maximum value is H0Q. The width of the peak is controlled by the value of Q and is approximately w0/Q. The phenomenon where a particular quantity has a sharp peak in the magnitude of its frequency response is known as resonance and occurs in a wide range of physical properties (as well as in electrical circuits). The limiting values of H(w) at high and low frequencies are: jM 0 , M « M0 M jM , M » M0 H( M ) » H 0 M0 H( M ) » - H 0 SECOND-ORDER BAND-PASS FILTER: GAIN 1.0E+04 Gain 1.0E+03 1.0E+02 1.0E+01 1.0E+00 1.0E+01 1.0E+02 1.0E+03 1.0E+04 1.0E+05 1.0E+06 f Hz The figure shows the gain as a function of frequency (f = w/2p) for a band-pass filter with H0= 1000, f0=w0/2p=1000 Hz and for four values of Q: Q = 1/2, 1/Ö2, 2 and 5. The larger Q the sharper is the resonance peak. (iii) High-Pass Filter H( M ) = - H0 M 2 M 02 - M 2 + j M M0 Q At w=w0 the frequency response function becomes jH0Q and the high and low frequency limits are: H(M ) » H 0 , M « M 0 M 20 H(M ) » - H 0 2 , M » M 0 M (iv) Notch Filter H0 (M 20 - M 2) H(M ) = M M0 M 20 - M 2 + j Q This is a filter which removes frequencies in a narrow band around w=w0. The width of this band is approximately w0/Q. At both high and low frequencies H(w) tends to H0. 36 Electronics SECOND-ORDER NOTCH FILTER: GAIN Gain 1.0E+03 1.0E+02 1.0E+01 1.0E+02 1.0E+03 1.0E+04 f Hz The figure shows the gain as a function of frequency (f = w/2p) for a notch filter with H0= 1000, f0=w0/2p=1000 Hz and for four values of Q: Q = 1/2, 1/Ö2, 2 and 5. The larger Q the sharper is the ‘notch’. LCR Circuits These second-order filters can all be made using a resistor R, an inductor L and a capacitor C in series. In each case the characteristic angular frequency is w0=1/Ö(LC) and the Q-factor is Q = 1 L . R C In the low-pass filter the output is taken across the capacitor; in the band-pass filter the output is taken across the resistor; in the high-pass across the inductor; and in the notch filter it is taken across the capacitor and the inductor. Exercise 3.10 Derive the frequency response functions for these four circuits. Exercise 3.11 Design a notch filter with f0=w0/2p=16kHz and Q=1/Ö2. 37 Electronics CHAPTER 4: THE OPERATIONAL AMPLIFIER 4.1 THE IDEAL OPERATIONAL AMPLIFIER V2 V+ 3 V ps+ 7 6 Vo 4 V ps- An operational amplifier is an active electronic device. This means that it requires a separate power supply in order to operate. In fact it requires a two-sided power supply +Vps-0-(-Vps) as shown in the diagram. The positive terminal of the power supply +Vps should be connected to pin 7 and the negative terminal -Vps should be connected to pin 4. The centre terminal of the two-sided power supply is used as the common reference node of any operational amplifier circuit and must be connected to the circuit board. The numbers shown on the diagram are the pin numbers for an 8-pin operational amplifier. Pins 1, 5 and 8 are not shown. There are two signal inputs labelled V- (pin 2) and V+ (pin 3) and these are called the inverting and non-inverting input terminals respectively. The signal output V0 is on pin 6. In an ideal operational amplifier the input-output relation, using complex amplitudes for the input and output voltages, is V 0 ( M ) = A( M )(V + ( M ) - V - ( M )) A0 M 0 A( M ) = M 0 + jM In this input-output relation all the voltages are measured relative to the reference node (i.e. the centre terminal of the power supply). A(w) is called the open-loop frequency response function of the operational amplifier. A(w) has a first-order lowpass form: A0 is the low-frequency gain and is very large, typically 200,000; w0 is the lower cut-off angular frequency and is typically 5´2p rads/sec. The products A0w0 and A0f0 (=A0w0/2p) have special significance: They are the angular frequency and normal frequency respectively at which the gain becomes (approximately) 1. The product A0f0 is called the gain-bandwidth product. For all but very low frequencies the open-loop frequency response can be approximated by 38 Electronics A( M ) » A0 M 0 A0 f 0 » jM jf The corresponding gain is, on a Bode plot, a straight line with slope -1 that goes through the point (w0, 1). The ideal operational amplifier has infinite input impedance at its two signal input terminals and zero output impedance at its signal output terminal. This means that no current enters the input terminals and that the voltage at the output terminal is not affected when some load impedance is connected. It is very rare for an operational amplifier to be used directly as an amplifier with frequency response A(w). One reason for this is that the parameters A0 and w0 of the open-loop frequency response are not specified precisely in that they can vary by as much as a factor 2 one device to another (of the same type). The normal way to use an operational amplifier is to employ negative feedback. This means that some connection is made from the output of the operational amplifier back to the inverting signal input. The frequency response of the complete circuit is then largely determined by the external components -- resistors and capacitors -- rather than by the values of A0 and w0 . There are two distinct forms of operational amplifier circuits: The inverting mode and the non-inverting mode. 4.1 INVERTING MODE CIRCUIT The operational amplifier circuit shown in the diagram is an inverting mode circuit. The negative feedback is provided by the impedance Z2(w) and goes from the operational amplifier output back to the inverting input. Z1 Z2 + Exercise 4.1 Using Kirchhoff's current law at the inverting input of the operational amplifier and the above input-output relation, show that the frequency response function for the inverting mode circuit is H( M ) = - Z2 Z1 1 (1 + ( Z 2 + Z1 )) Z 1 A( M ) For those frequencies at which | A( M )| « |(1 + Z2 (M ) )| Z1(M ) the expression for the frequency response function simplifies to H(M ) » - Z2 (M ) Z1 (M ) and so depends only on the external components Z2(w) and Z1(w). 39 Electronics Remember that at low frequencies the magnitude of A(w) is very large so that the above inequality is likely to be valid over a wide frequency range. Exercise 4.2 Show that the input impedance of the inverting mode circuit is + (1 + Z 2 Z 1 ) AZ1 Z in = Z 1 1 (1 + ) A For those frequencies at which the magnitude of A(w) is large compared with the magnitude of (Z1+Z2)/Z1, the input impedance is approximately Z1. 4.2 NON-INVERTING MODE CIRCUIT In the non-inverting mode the circuit input is connected directly to the noninverting input of the operational amplifier. Z1 - In this case the expression for the æ Z ö çç 1 + 2 ÷÷ Z1 ø è H( M ) = é æ Z2+ Z1 ö ù ÷÷ ú ê1 + çç ë è Z 1 A( M ) ø û Z2 + input I will leave this as an exercise to derive this. The input impedance to the circuit is just that of the operational amplifier itself ie almost infinite. For those frequencies at which | A( M )| « |(1 + Z2 (M ) )| Z1(M ) the expression for the frequency response function simplifies to (M ) H(M ) » 1 + Z 2 Z1 (M ) and so depends only on the external components Z2(w) and Z1(w). The 1 in this expression for H(w) is a nuisance: We often want the expression to get very small for either low or high (or sometimes both) frequencies. The 1 prevents this. A more versatile version of the non-inverting mode circuit, which involves two more impedances is shown in the next figure. 40 output Electronics The frequency response function in this case is Z1 Z2 - æ Z ö çç 1 + 2 ÷÷ Z4 Z1 ø è H( M ) = Z 3 + Z 4 é æç Z 2 + Z 1 ö÷ ù ê1 + ç ÷ú ë è Z 1 A( M ) ø û Z3 + input output Z4 and for those frequencies at which | A( M )| « |(1 + Z2 (M ) )| Z1(M ) the expression for the frequency response function simplifies to H(M ) = Z4 æ Z ö çç 1 + 2 ÷÷ Z 3 + Z 4 è Z 1 ø 4.3 INFINITE-GAIN APPROXIMATION The approximation made above 1 ®0 A(M ) is called the infinite-gain approximation. Applying this approximation to V 0 ( M ) = A( M )( V + ( M ) - V - ( M )) yields the main result of the infinite gain approximation: V + (M ) = V - (M ) That is the large gain forces the voltages at the inverting and non-inverting inputs to be zero. This is the usual first step in the design of operational amplifier circuits. The reason for this is that A(w) is not usually specified precisely so that we would like to make the design depend on A(w) as little as possible. 4.4 IMPEDANCES Suitable values for the impedances are COMPONENT IMPEDANCE Z Resistance R Capacitance 1/(jwC) Resistance & Capacitance in Series R + 1/(jwC) Resistance & Capacitance in Parallel R/(1+ jwRC) 4.5 AN INVERTING BAND-PASS CIRCUIT A very useful circuit is the inverting band-pass circuit: This removes low and high frequencies and amplifies frequencies in the mid-band region. 41 Electronics In this case the mid-band gain is R2/R1; the lower cutoff frequency (in Hz) is 1/(2pR1C1) ; and the upper cutoff frequency (in Hz) is 1/(2pR2C2). The lower cutoff frequency is the frequency below which the circuit starts to remove the low frequencies; C1 C2 R1 R2 input The upper cutoff frequency is the frequency above which the circuit starts to remove the high frequencies; + output 4.6 A NON-INVERTING BAND-PASS CIRCUIT A similar circuit with the same usage is the non-inverting band-pass circuit: This removes low and high frequencies and amplifies frequencies in the midband region. In this example Z1=R1; Z2 =R2/(1+jwR2C2) that is R2 in parallel with C2 ; C2 Z3= 1/ jwC3 Z4 = R4 . For this circuit the mid-band gain is (R1+R2)/R1; the lower cutoff frequency (in Hz) is 1/(2pR3C4) ; and the upper cutoff frequency (in Hz) is 1/(2pR2C2). R1 - This circuit is not as efficient as the corresponding inverting mode circuit at removing very high frequencies. Above a frequency R1 + R2 1 2FR2 C 2 R2 the reduction in the high frequency components stops The Bode plot for this circuit is of the form: 42 R2 C3 + input R4 output Electronics gain 1+R2/R1 1 1/2piR1C1 1/2piR2C2 The frequency at which the gain becomes 1 is f R1 + R2 1 R2 2FR2 C 2 EFFECT OF THE FINITE GAIN At the end of the design procedure, for the inverting or non-inverting circuits, using the infinite-gain approximation we must check that the approximation is valid over the required frequency range. This is done by checking | A( M )| « |(1 + Z2 (M ) )| Z1(M ) If we use the fact that, except at very low frequency, A( M ) » A0 M 0 A0 f 0 » jM jf then the infinite-gain approximation is valid if f max 1 + Z2 Z1 < A0 f 0 max The product A0f0 is known as the gain-bandwidth product. So the required criterion is that the product of the maximum frequency and the maximum gain must be less than the gain-bandwidth product. A typical value for this gain-bandwidth product is 1MHz. The remedy if this condition is not satisfied is either · use an operational amplifier with a larger gain-bandwidth product; or · split the circuit into two parts with each part having one opamp and a smaller maximum gain. This checking can be done graphically. The method is: · Draw the Bode plot of the gain worked out using IGA. · On the same plot include the opamp gain. Except at very low frequencies this is simply a straight line of slope -1 passing through the point (1, A0f0). · The opamp line effectively cuts off the gain of the circuit. So where the opamp gain is to the right of the calculated circuit gain the IGA calculation is valid. Consider two examples shown below. In circuit 1 the components are: 43 Electronics · Circuit 1: R1=1 kW; R1=10 kW; C2=1nF; C3=1mF; R4=10 kW; A0f0=3 MHz Using the IGA the mid-bandband gain is 11; the lower and upper cut-off frequencies are 16Hz and 16kHz; and the frequency at which the gain becomes one is 176kHz. The figure below shows this. The figure includes IGA gain, the ‘straight-line approximation’ to the IGA gain; the opamp gain and the exact gain of the circuit. In this case the IGA is valid up to about 3 MHz N o n -In v e rtin g B a n d p a s s filte r1 1 .0 E +0 2 Gain 1 .0 E +0 1 1 .0 E +0 0 1 .0 E -0 1 1 .0 E +0 0 1 .0 E + 0 1 1 .0 E + 0 2 1 .0 E +0 3 1 .0 E +0 4 1 .0 E + 0 5 1 .0 E + 0 6 1 .0 E +0 7 f · Circuit 1: R1=100W; R1=100 kW; C2=100 pF; C3=1mF; R4=10 kW; A0f0=3 MHz Using the IGA the mid-bandband gain is 1000; the lower and upper cut-off frequencies are 16Hz and 16kHz; and the frequency at which the gain becomes one is 176kHz. The figure below shows this. The figure includes IGA gain, the ‘straight-line approximation’ to the IGA gain; the opamp gain and the exact gain of the circuit. In this case the IGA is only valid up to about 3 kHz Non-Inverting BandPass Filter 2 1.0E+06 1.0E+05 1.0E+04 Gain 1.0E+03 1.0E+02 1.0E+01 1.0E+00 1.0E-01 1.0E+00 1.0E+01 1.0E+02 1.0E+03 1.0E+04 f 44 1.0E+05 1.0E+06 1.0E+07 Electronics 4.7 UNITY GAIN BUFFER A very useful circuit, or more correctly sub-circuit, is the unity gain buffer: In this case the output voltage is (within the infinite-gain approximation) equal to the input voltage. The special properties are that the input impedance is (almost) infinite and the output impedance is (almost) zero. This means that it can be used to join two sub-circuits without affecting their properties. So if it is used to join a circuits with frequency response functions H1 and H2 then the combined circuit has frequency response function H1 H2. + input output 4.8 NON-IDEAL PROPERTIES I have been assuming ideal operational amplifiers up to now. How do real operational amplifers differ from the ideal. · Output impedance A typical output impedance for an operational amplifier is of magnitude 100W. Thus we can still assume the ideal output properties if all impedances connected to the opamp output are much larger than this value . · Input impedance There are two types of operational amplifier input, one based on bipolar transistors (for example 741 opamp) and one based on field-effect transistors (for example 071 opamps). For the bipolar input op-amps a typical input impedance is 1MW in parallel with 5pF. For the bipolar input op-amps a typical input impedance is 1012 W in parallel with 5pF. · Output Voltage Limits The output voltage is bounded by max min Vout and Vout . These two values are almost the same as the upper and lower values of the power supply. This has the effect of truncating the output waveform. · Output Current Limit The output current is limited in magnitude by IL. A typical value for this maximum is 20mA. So opamps cannot deliver much current! · Slew-Rate Limit (SRL) This rather strange name refers to the maximum rate of change of the output voltage: dvo (t ) < SRL dt A typical value for SRL is 106 V s-1 (or 1V per microsecond). In practice for each design each of these limitations needs to be checked to see if it presents a problem. 45