Negative Feedback
--------------------------
                 created 12/06
Go to homepage

Wikipedia links
            Bode diagrams   --- http://en.wikipedia.org/wiki/Bode_plot
           Hendrik Bode --- http://en.wikipedia.org/wiki/Hendrik_Wade_Bode

        When writing a technical essay, I often know most of the facts before I start and just need to do a little research to check numbers and fill in details. In other cases I start off knowing relatively little, maybe because the subject is new like bio-fuels, and I want to know more. But this essay it's different, negative feedback is in my my bones. I used nearly every day as a working electrical engineer, even lectured on it to other engineers.

Key engineering concept
        A key engineering concept --- sounds pretty boring, right?  Well, negative feedback is so powerful it's almost quasi-miraculous. Negative feedback is a control concept.  It's a little secret of the engineer. Aeronical engineers use it to control how their planes fly, but mostly its used by electrical engineers. Electrical engineers always need to control voltages, currents, and sometimes motors. It's all done with negative feedback. It's either built into the circuitry of the design or in digital control systems built into the code.

Simple concept
        The key idea is this ---- The best way to control a parameter (like voltage, current, torque, speed, or position) is to continually look at its actual value and compare it with its desired value. The system is then forced to minimize the error between actual and desired values.

        More specifically, the the actual value is subtracted from the desired value to form an error signal, and then you force the system using a highly amplified version of the error signal. This forms a loop. The output is forced by an amplified fraction of itself that is fed back. If it's done right, meaning the loop is stable (it can easily be unstable!),  then the high gain in the loop drives the error signal toward zero, which means the actual value of the output is continually tracking its desired or commanded value. Here's the classic negative feedback loop block diagram using the standard notation of G for the forward path and H for the feedback path.

Radio example ---  no feedback
        A radio must amplify the tiny signal picked up by its antenna by a  million or so (few microvolts to a few volts). In the early days of radio this was done without (overall) feedback by putting several, usually identical, tube stages in a row. If each tube could amplify by, say, 100, then three tubes in a row (in cascade) were needed because 100 x 100 x 100 = 1 million. The gain of each tube stage was somewhat unpredictable and variable changing with temperature and as the tube aged. I don't know a whole lot about tubes, but I'm guessing that in the early days the gain of each tube stage might have been uncertain by 10%, in other words the gain of each stage would be between 90 and 110 (100 +/- 10%).

        But if you pull out your scientific calculator you'll see the variation in the total gain of the three tube cascade is more than +/-10% in fact it's (about) +/- 30%, since (0.9 ^ 3 = 0.729) and (1.1 ^3 = 1.331). This is pretty bad, almost a 2:1 range in output voltage due to gain variations alone.

Radio example ---  with feedback
           Suppose in our radio example an extra (identical) tube stage is added to the cascade, so now there are four stages each with gain of 100 for a total gain of (10^2)^4 =10^8 or 100 million with a total variation of about +/- 40%. We  now have 'extra' gain, or gain margin, of 100,  because we only need a gain of 1 million. If we 'wrap' a negative feedback loop around the whole four tube cascade, what we can do is drop the gain from 100 million to the desired 1 million, and (here is the great part) this will also reduce the variation in gain from +/- 40% to +/- 0.4%.. In terms of the block diagram above

                                        G     =  four tube amplifier       (w/nominal gain of 100 million )
                                        H     =  1/(1 million)               (typically a resistor divider)
                                       1/H   =  1 million

        Notice that if the forward path gain (G) is large (relative to the desired gain), the gain of the amplifier depends (mostly) on H, equal to (1/H). In fact we can consider (1/H) to be the gain of the ideal negative feedback circuit. To set the overall gain in our example to 1 million, H should divide the output voltage by 1 million. In practice H is little more than a pair of precision resistors ratioed by 1 million, say 100 ohm and 100 million ohm.  With negative feedback the gain drift of the tubes due to temperature and age still occurs, but it has little impact on the gain and performance of the overall amplifier.

Performance advantage of negative feedback
        Our radio amplifier example shows that negative feedback can provide a huge advantage in performance for a cost (in this case) of a modest number of extra parts to provide some excess (forward) gain.  Our four tube radio amplifier with negative feedback has the same nominal overall gain as the three tube amplifier, but is nearly 100 times more stable. It works like an idealized  version of the original three tube radio amplifier.

Negative feedback is ubiquitous
        In our tube example there was a price to pay for the improved performance, we had to add an extra tube with its support circuitry. But with integrated circuits getting the 'extra' gain we need to make negative feedback work costs practically nothing, so as a consequence negative feedback is used everywhere.

        The workhorse of linear circuits is the operational amplifier (op amp). In today's world even if you need to amplify only by 1 (a buffer circuit),  you nearly always use an op amp that has a forward gain (open loop gain) of 1 million or more, at least at low frequencies. Tons of extra gain in today's IC circuits is translated, via negative feedback, into high levels of performance.

        Feedback is used not only in local circuits that might be cascaded into larger feedback loops, but negative feeedback loops are also used inside of feedback loops. For example, position control of a motor typically uses three nested feedback loops. The inner, and fastest, loop controls the motor current for good torque control, the next, medium speed loop controls the velocity of the motor, and the slowest and most outside loop controls the position of the motor.

Different type of negative feedback
        The thermostat that controls the temperature in your house is part of negative feedback loop too, but it's different than the loop shown above. The feedback loop shown above is a linear feedback loop. Each block is (sort of) like an amplifier, meaning its output is linearly dependent on its input. Double the input amplitude and the output amplitude doubles. In contrast, room temperature control uses a non-linear, negative control technique called bang-bang control.

        The output of the wall thermostat to the furnace is the command on or off. The thermostat is essentially a switch not an amplifier, but it's a switch with a twist. When the temperature falls a  little (degree of two) below the thermostat setting, the thermostat switches the furnace on and holds it on until the temperature rises a little above the thermostat setting. The fact that the thermostat switches the furnace on/off a degree or two above and below its setting is not an error in the thermostat (not a sign of a cheap thermostat), it's carefully engineered into the thermostat. When the thermostat is regulating temperature, if you look closely and plot it you will see that the temperature continually oscillates, with a roughly triangular shape, about its set point.

        All bang-bang control loops work pretty much like thermostatic temperature control.  The outputs of all bang-bang control loops oscillate a little. This explains the name bang-bang --- the output continually bangs between the upper and lower switch points. In contrast, linear feedback loops, if properly designed (compensated), are free of such oscillations, which makes them higher performance and more generally useful.

Feedback in stars
       Mother nature is full of negative feedback loops. A good example of a linear feedback loop in nature is the control of the hydrogen burning (fusion) inside stars. How come the energy output of the sun barely changes from minute to minute, day to day, year to year, for billions of years?  Since the 1950's we have known (for a fact) that fusion reactions tend to quickly accelerate and explode. Why is the sun not a fusion bomb?

        The answer is that the rate of fusion burning depends on pressure in the core. More inward pressure and the fusion reaction speeds up. But more fusion means more outward pressure as heat and photons push out. The result is a feedback loop, a balance between inward gravity pressure on the core and output thermal pressure.

 Cepheid variables ---  In most stars the feedback loop is stable, but there is a class of large stars (5 to 20 solar masses) where it's not fully stable. The size (and intensity) of cepheid variable stars slowly oscillates in and out over days, weeks, or months.  The bigger and brighter the cepheid the  more slowly it oscillates. It turns out there is a (nominal) linear relationship a cepheid's brightness and its period of oscillation.

        This linear relationship between period and brightness, and the fact that all cepheids are bright stars, made them very important historically. If you measure the period of a distant cepheid, then you know the star is like a near-by cepheid with the same period. Since apparent brightness goes as the square of distance, the ratio of the distance of the distant cepheid to the nearby cepheid goes as the square root of their apparent brightness.

        In 1923 the new 100 inch Mt Wilson telescope was able to resolve a few cepheids in the nebula/galaxy Andromeda, which looked like a fuzzy smudge. Andromeda galaxy, the nearest big spiral galaxy to the Milky Way, is 2 million light years away vs the dia of the Milky Way of 100k light years. The cepheid's distance confirmed that Andromeda was far outside the Milky Way, and therefore Andromeda was very likely a galaxy in its own right. This was the first confirmation that the universe was larger than the Milky Way.