Lecture 1: Feedback and Gain/Bandwidth Prof. Ali M. Niknejad Department of EECS University of California, Berkeley EE 105 Fall 2016 Prof. A. M. Niknejad Feedback Control l Feedback is a universal way to design systems – – – l Speed control example: – – – – – 2 Thermostat in your house Cruise control / keep-in-lane technology (driver assist) Walking / standing in humans Set desired speed of car: vdes Measure the current speed of car: vcar Find the difference: vdiff = vdes – vcar (this is also called the error signal) Proportional scheme: Adjust car speed (accelerate) based on Kp vdiff PID control with dynamics: Use proportional, integral, and derivative of vcar to control speed EE 105 Fall 2016 Prof. A. M. Niknejad Negative Feedback Block Diagram l To find the transfer function, note that the error signal is a function of the input and output: s = s − f ⋅sout err in 3 sout = G ⋅serr = G ⋅(sin − fsout ) EE 105 Fall 2016 Prof. A. M. Niknejad Closed-Loop Transfer Function l Solve : l For very large gain G, such that Gf >>1, we have sout (1+ Gf ) = G ⋅sin sout G Gclosed = = sin 1+ Gf Gclosed 4 G 1 ≈ = Gf f EE 105 Fall 2016 Prof. A. M. Niknejad Electronic Feedback l l We have already seen electronic feedback in op-amps Example: Non-inverting amplifier – – – l Resistor divider samples output voltage Error signal formed at input of op-amp Op-amp output is a gained version of the error signal Strangeness: – – Op-amp gain is very large (ideally infinity) Error signal is driven to zero l 5 All practical op-amps have finite gain, so error signal is nearly zero EE 105 Fall 2016 Prof. A. M. Niknejad History l l l 6 Invention of electronic negative feedback Inventor Harold Black was on a ferry ride to Bell Labs (1927) thinking about how to increase the gain and improve linearity of of vacuum tube amplifiers. Realized that positive feedback can be used to boost the gain and negative feedback could improve the linearity… EE 105 Fall 2016 Prof. A. M. Niknejad Precision Analog l Feedback allows us to use a really “crappy” open-loop op-amp and get good performance – – 7 When gain is sufficiently high, the gain is determined by the feedback network, not the open-loop gain Open loop gain can vary over temperature, process, it can age, it can be highly non-linear ... In the end, if it’s high enough, it does not play a role ! EE 105 Fall 2016 Prof. A. M. Niknejad Benefits of Feedback l Closed-loop gain depends on passive feedback network – l Linearization – l l 8 Can set gain precisely Op-amp transfer function is almost perfectly linear, despite using a very nonlinear core amplifier Bandwidth enhancement (see next section) Interference rejection (loop can correct for unwanted signals that are injected into the signal path) EE 105 Fall 2016 Prof. A. M. Niknejad Loop Gain l Recall that the closed-loop transfer function is given by G G Gclosed = = 1+ Gf 1+T l For a precise transfer function, the key to feedback is to realize sufficiently high loop gain T = Gf ≫ 1 9 EE 105 Fall 2016 Prof. A. M. Niknejad Noise Rejection l Another benefit of high loop gain is interference rejection. Imagine an unwanted signal couples into the loop as show s = Gserr + snoise = G(sin − fsout )+ snoise out l 10 The noise is rejected like 1/(1+T). Any unwanted signal, including distortion, is rejected by the loop sout G 1 = sin + snoise 1+T 1+T EE 105 Fall 2016 Prof. A. M. Niknejad Positive Feedback l l l 11 Up to now we have been considering a negative feedback system whereby the output is subtracted from the input If we were to add the output to the input, the system would be a positive feedback system, which is also useful but not what we intended. Positive feedback systems tend to “rail out”, in other words they are regenerative EE 105 Fall 2016 Prof. A. M. Niknejad Stability l l l 12 Any real amplifier will introduce some phase shift when the input frequency 1 increases. For example, a single-pole G( jω ) = 1+ jωτ system has the following form As the frequency increases, the phase of the output signal lags the input, asymptotically up to 90°. ∠[G( jω )]= −arctan( jωτ ) When the system has more poles, the phase shift can reach 180°. What happens to the negative feedback system? EE 105 Fall 2016 Prof. A. M. Niknejad Instability l If the loop gain has a phase shift of 180°, then our negative feedback system appears like a positive feedback system at frequency T = G( jω x ) f = −1 l l l 13 Since there is always noise and disturbances in the system at this frequency in the system, this noise is regenerated and potentially can cause problems if |T| > 1. The condition for stability is then to ensure that when loop gain is unity, the phase of T should be less than 180° The phase margin is a measure of stability. A good design should have 60° phase margin or more. EE 105 Fall 2016 Prof. A. M. Niknejad Oscillation l l l The condition T(jω) = -1 is in fact how we build oscillators, which are inherently unstable If the circuit has T = -1 at a particular frequency, then the gain at that frequency is theoretically infinite Any noise or disturbance can leads to a strong oscillation at this particular frequency – 14 Take EECS 142 to understand this in more detail EE 105 Fall 2016 Prof. A. M. Niknejad Feedback Types: Series-Shunt l l So far we have looked at feedback from the perspective of ideal signals. In a real circuit, the feedback signals can be currents and/or voltages A system that samples the output voltage and feeds back an input voltage is known as series-shunt feedback – – 15 A shunt connection is used to sample the output voltage A series connection is used to subtract or add the input voltage EE 105 Fall 2016 Prof. A. M. Niknejad Shunt-Series Feedback l A system that samples the output current and feeds back an input current is known as shunt-series feedback – – 16 A series connection is used to sample the output current A shunt connection is used to subtract or add the input current EE 105 Fall 2016 Prof. A. M. Niknejad Series Feedback l A system that samples the output current and feeds back an input voltage is known as series-series feedback, or simply series feedback – – 17 A series connection is used to sample the output current A series connection is used to subtract or add the input voltage EE 105 Fall 2016 Prof. A. M. Niknejad Shunt Feedback l A system that samples the output voltage and feeds back an input current is known as shunt-shunt feedback, or simply shunt feedback – – 18 A shunt connection is used to sample the output voltage A shunt connection is used to subtract or add the input current EE 105 Fall 2016 Prof. A. M. Niknejad Effect on Input Impedance: Series at Input l l If there is series negative feedback at the input, the action of the feedback tends to raise the input impedance. Note that error signal is very small if the loop gain is large verr = vin − fvout ⎛ fG ⎞ = vin ⎜ 1 ⎝ 1+ Gf ⎟⎠ verr l l 19 vin = 1+ T This reduces the input current by (1+T), or effectively increases the input impedance by the same amount For a shunt connection at the input, the opposite is true, the input impedance drops by (1+T) EE 105 Fall 2016 Prof. A. M. Niknejad Effect on Output Impedance: Shunt at Output l l l l l 20 Without feedback the output resistance is given by Ro When there’s shunt feedback at the output, the current flowing the input of the amplifier through the feedback resistance “loads” the output because the action of the feedback activates the amplifier which then draws a large current, making the output impedance much small than Ro We can show the output impedance actually drops by (1+T) This means that a relatively high output impedance amplifier (such as an OTA) can be used to drive a voltage if sufficient loop gain is used For a series connection at the output, the opposite is true, the output impedance increases by (1+T) EE 105 Fall 2016 Prof. A. M. Niknejad Gain/Bandwidth Trade-off 21 EE 105 Fall 2016 Prof. A. M. Niknejad Bandwidth Extension l Suppose the core amplifier is single pole with bandwidth: G0 G( jω ) = 1+ jωτ 22 l When used feedback, the overall transfer function is given by l The bandwidth has expanded by (1 + T) G0 G( jω ) 1+ jωτ G fb ( jω ) = = 1+ G( jω ) f 1+ G0 f 1+ jωτ G0 G fb ( jω ) = 1+ jωτ + G0 f G0 Gclosed−loop (0) 1+ G0 f G fb (s) = = τ τ 1+ jω 1+ jω 1+ G0 f 1+ T EE 105 Fall 2016 Prof. A. M. Niknejad Circuit Model l 23 Here’s the equivalent circuit for an amplifier with feedback EE 105 Fall 2016 Prof. A. M. Niknejad Circuit Interpretation l 24 Here we see the action of the feedback is to lower the impedance seen by the Gm by the loop gain, which expands the bandwidth by the same factor EE 105 Fall 2016 Prof. A. M. Niknejad Gain / Bandwidth Product in Feedback l l Even though the bandwidth expanded by (1+T), the gain drops by the same factor. So overall the gain-bandwidth (GBW) product is constant The GBW product depends only the the Gm of the op-amp and the Cx internal capacitance (or load in the case of an OTA) G0 1 GBW = G × BW = × (1+ T ) 1+ T RoC x 1 GBW = G0 × RoC x = Gm Ro × RoC x Gm GBW = Cx 25 EE 105 Fall 2016 Prof. A. M. Niknejad Unity Gain Frequency l l The GBW product is also known as the unity gain frequency. To see this, consider the frequency at which the gain drops to unity G0 | G |= =1 1+ jω uτ G02 = 1+ ω u2τ 2 G0 1+ ω τ 2 u =1 ω u2 = (G02 − 1) / τ 2 ≈ G02 / τ 2 Gm Ro Gm ω u = G0 / τ = = C x Ro C x 26 2 EE 105 Fall 2016 Prof. A. M. Niknejad Unity Gain Feedback Amplifier l 27 An amplifier that has a feedback factor f=1, such as a unity gain buffer, has the full GBW product frequency range EE 105 Fall 2016 Prof. A. M. Niknejad Non-Dominant Poles l l l 28 As we have seen, poles in the system tend to make an amplifier less stable. A single pole cannot do harm since it has a maximum phase shift of 90° A second pole in the system is not affected by feedback (prove this) and it will add phase shift as the frequency approaches this second pole For this reason, non-dominant poles should be at a much higher frequency than the unity-gain frequency EE 105 Fall 2016 Prof. A. M. Niknejad Positive Feedback l l l l Positive Feedback is also useful We can create a comparator circuit with hysteresis Also, as long as T < 1, we can get stable gain … instead of reducing the gain (negative feedback), positive feedback enhances the gain. In theory we can boost the gain to any desired level simply by making T close to unity: T = 1− ε l ε is a very small number – – 29 In practice if the gain varies over process / temperature / voltage, then the circuit can go stable and oscillate Positive feedback also has a narrow-banding effect