American Scientist the Magazine of Sigma Xi, the Scientific Research Society
Total Page:16
File Type:pdf, Size:1020Kb
A reprint from American Scientist the magazine of Sigma Xi, The Scientific Research Society This reprint is provided for personal and noncommercial use. For any other use, please send a request Brian Hayes by electronic mail to [email protected]. Computing Science Everything Is Under Control Brian Hayes n 1949, faculty and students at The basic idea in Keynesian econom- I the London School of Economics Can control theory ic policy is to counteract any oscillatory gathered to observe a demonstration. tendencies. When an economy over- At the front of the room was a seven- heats, with business activity growing foot-tall contraption assembled out of save the economy at an unsustainable pace, the central plastic pipes, tanks, valves and other bank raises interest rates and thereby plumbing hardware. The device, later from going restricts the money supply. At the same dubbed the MONIAC, was a hydraulic time, governments raise taxes or reduce analog computer for modeling the flow down the tubes? spending, which also cools the econo- of money through a national economy. my. Conversely, when business slumps, When the machine was powered up, the aim is to spur growth by lowering colored water gurgled through the worth revisiting, especially at a time interest rates and by letting the govern- transparent tubes and sloshed into res- when real economies are leaking liq- ment run a deficit, spending more than ervoirs. Various streams represented uid assets at an alarming rate. it takes in through taxes. consumption, investment, taxes, sav- Keynes has gone in and out of fash- ings, imports and exports. Crank- Engineering the Economy ion, but even many of his detractors now wheels and adjustable cams allowed The principal architect (and plumber) accept the idea that controlling wild ex- the water levels and flows to be regu- of the MONIAC was A. W. H. Phillips, cursions of the business cycle is an ap- lated—the hydraulic equivalent of set- a New Zealander who had been an propriate policy goal. In the current eco- ting interest rates or tax policies. This electrical engineer before he turned to nomic downturn, it is taken for granted was real trickle-down economics! economics. It’s easy to see the influ- that governments will do their best to The MONIAC attracted much atten- ence of his engineering background. A speed recovery and mitigate damage. tion, and it lives on in folklore. Later hydraulic simulation of the economy In the U.S., both the recently departed generations of students called it the makes sense only if you believe that the Republican administration and the new “pink lemonade national income ma- circulation of money through a soci- Democratic one have enacted huge chine.” Punch magazine tried to satirize ety obeys definite, mathematical laws, “stimulus” plans, and the Federal Re- the device, but their cartoon was really like those that govern real fluids and serve has cut interest rates to near zero. no more outlandish than the construc- other physical systems. And the crank- Everyone waits anxiously to see how tion drawings for the machine itself. wheels and cams on the MONIAC im- well these measures will work. There are tales of leaks; according to ply that the behavior of an economy is The economics profession, naturally, one source, the machine couldn’t cope not only predictable but also controlla- has much to say about these matters, with inflation, which caused red fluid ble. If we twiddle the knobs and nudge but there is another intellectual tradition to squirt out through a hole in one of the levers in just the right way, all the that may also offer useful counsel: con- the cylinders. And then there’s the streams will flow smoothly and the trol theory, the branch of applied math- story about the Chancellor of the Ex- various basins where wealth accumu- ematics and engineering that deals with chequer and the Governor of the Bank lates will never run dry or overflow. feedback systems. Devising a scheme of England; when they were given a This notion of engineering an econ- to suppress oscillations, like those seen turn at the controls, the results showed omy was and is controversial. Adam in the business cycle, is a common task “why the U.K. economy was in the Smith and other classical economists for control theorists. The theory also state it was.” had argued that markets are self- identifies certain unfortunate situations This is all good fun, but the correcting; meddling with them can where attempts to impose control can MONIAC was not just a toy or a joke. only impair their efficiency. By the actually make matters worse, destabi- It embodied a style of thinking about 1930s, however, the British economist lizing a system that might otherwise economic problems that may still be John Maynard Keynes was making a have found its own equilibrium. case for a specific kind of intervention Brian Hayes is senior writer for American Scien- by governments and central banks: Control Freaks tist. Additional material related to the “Computing They could and should act to stabi- On first acquaintance, the idea of feed- Science” column appears in Hayes’s blog at http:// lize economies, he said—to smooth out back control seems straightforward bit-player.org. Address: 211 Dacian Avenue, Dur- cycles of boom and bust. Phillips was enough. Consider the design of a cruise- ham, NC 27701. Internet: [email protected] one of Keynes’s many followers. control system for an automobile. A © 2009 Brian Hayes. Reproduction with permission only. 186 American Scientist, Volume 97 Contact [email protected]. minimal version measures the current speed of the car, compares it with the desired speed, then adjusts the throttle by an amount proportional to the dif- ference. If the car slows somewhat— perhaps on an upgrade—the controller senses the discrepancy and opens the throttle wider, so that the car regains some of the lost speed. But there is more to control theory than this simple proportional-feedback mechanism. A drawback of pure pro- portional control is that the car never quite attains the requested speed; as the error diminishes, so does the feed- back signal, and the system settles into a state with some nonzero offset from the correct velocity. The offset can be eliminated by another form of feedback, based not on the error itself but on the integral of the error with respect to time. In effect, the integral measures the cu- mulative error, which keeps growing if the speed differs even slightly from the set point. Thus integral control ensures that over the long term the net error approaches zero and the average speed converges on the set-point speed. Yet integral control has drawbacks of its own. Suppose the car cannot main- tain a commanded speed of 60 on an upgrade; an integral controller might compensate by going 80 on the other side of the hill, which could get you a speeding ticket. More generally, integral control has a tendency to overshoot and oscillate around the set point. A remedy is to add still another form of feedback, based on the time derivative of the er- ror signal. Derivative feedback opposes rapid changes in speed and thus tends to damp out oscillations. Running Hot and Cold Proportional, integral and derivative Colored water in transparent plastic pipes control (together known as PID) are ba- modeled the flow of money through an econ- omy in a hydraulic computer built in 1949 sic tools of control theory. In designing cam a control system, an engineer sets the by the British economist A. W. H. Phillips. “gain” of each type of feedback—the Fluid pumped to the top of the main circuit represented income; it streamed back down valve amount of correction applied for a giv- as consumption, with amounts diverted into en error magnitude. High gains yield taxes and savings. The flows were regulated a sensitive controller that promptly by feedback devices, such as the one depicted detects and corrects any disturbance. in the diagram at right: A float in a reservoir But a controller that responds too vig- operated a valve, which controlled the rate at orously risks destabilizing the system, which the reservoir filled. The drawing above, float magnifying departures from the set which shows an Americanized version of the point rather than suppressing them. Phillips computer, is in the James Meade Ar- reservoir The hazard of controller-induced chive of the London School of Economics. instability is most acute when there are delays, or time lags, built into the the water is too cool, so you twist the little more. When the hot water finally feedback circuit. The nature of this temperature-control valve counter- makes its way to the shower head, you problem is familiar in everyday life. clockwise. Nothing happens for a few find you’ve gone too far. You dial the You step into the shower and find that seconds, and so you turn the valve a valve back a little, but the water con- © 2009 Brian Hayes. Reproduction with permission only. www.americanscientist.org 2009 May–June 187 Contact [email protected]. tinues to get hotter, so you turn the might need to regulate temperature, control law that comes closest to satis- control further clockwise. Soon, you’re pressure and several flow rates. Again, fying a given criterion. shivering. The temperature oscillations the variables cannot be considered A number of further variations have can keep growing until the shower is separately; turning up the heat alters grown out of optimal control. Robust alternately emitting the hottest and the pressures and flows. control finds laws that deliver reason- coldest water available.