|
||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
|
|
PID ControllersSome Further Discussion Ray Zeune, a Senior Staff Engineer with Delta Design,
wrote to say that he wanted to use a microcontroller evaluation board to get a better feel for PID controllers. He asks
if there is any software available. After searching for several hours, the pickings were slim in the public-domain arena.
There is a ton of expensive commercial software available. Just go to Google.
Enter "software" in the all box and "PID control" in the exact phrase box. Then set the domain filter to
don't and .edu. That will bring up the commercial software. You can also find a lot of code that is "public
domain," but requires the purchase of other software.
Since the question was asked, we should take the opportunity to explore PID controllers a bit further. We can look at
the software that is available and bring out some additional information that will extend the
discussion we had the last time we got together.
PID Routines for MC68HC11K4 and MC68HC11N4 Microcontrollers
From Motorola Semiconductor, written by James W. Gray,
this technical note provides full working code. "While an expensive DSP-class processor is the correct choice for the most
demanding applications, several members of the M68HC11 family have the speed and resources to control multiple channels.
This note provides two working examples of PID control-loop software. The first example, written primarily in C, shows a PID
algorithm in a straightforward way using floating-point math. Key features of the C environment are covered for readers who
are more used to assembly language. The second example implements a PID algorithm in assembly language. It uses the MC68HC11N4
on-chip math coprocessor to speed up arithmetic operations. Both examples are complete and ready to run on a Motorola M68HC11EVS
evaluation board. External interfacing is identical for both examplesan 8-bit analog to digital converter is used for
input, and an 8-bit PWM waveform is output. Because the code in both examples carries more than 16 bits of precision, and
because both processors support 16-bit PWM, only minor changes are needed to increase precision." This is the only public-domain
software I could find. If others find additional code, we can post links here during a follow-up.
According to the posting, "Author David St. Clair retired after 40 years of practice in the field of instrumentation and
control in the process industries (8 years with Eastman Kodak and 32 years with DuPont). He took, in 1947, what he understood
to be the first college course offered in the theory of feedback control, a chance event at MIT that started his career in the
field. He arguably has applied the scientific method to solving control problems in the process industries longer than anyone,
or at least that was probably true when he retired in 1987. He had been explaining the concepts to the non-specialist for most
of that time. He relishes this opportunity to spread the word to a larger audience. His booklet was originally issued in 1983
as an internal report in the DuPont Company to help engineers and technicians, who have no special training in feedback control,
understand the basic considerations and limitations. It handily broke all records at the DuPont Company for number of requested
copies (over 1200) when issued. That report was released to the public and published in 1990. It subsequently sold almost 17,000
copies. In 1992 it was expanded for DuPont to about twice the size. This report also broke distribution records in the Company,
with over 2500 copies requested when issued. The part unique to DuPont was deleted and more was added to make the current Second
Edition." Considering the software (no
source) that comes with the book, and the experience of the author, the $US30 price is a pittance.
The PID Control AlgorithmHow it Works and How to Tune It
From this booklet's author, John Shaw, of Process Control
Solutions, we hear that "Proper understanding of controller tuning requires understanding of the PID algorithm. The PID algorithm
comprises three types of responses: Proportional, Integral, and Derivative. The first part of this book will examine the PID control
algorithm, as typically implemented in industry. Each of the three elements will be discussed in detail. The book will then discuss
common process responses, including dead time, process lags, and their combinations. The amount that each of these elements contribute
to the control must be adjusted to correspond to the process being controlled. This adjustment is known as "tuning" the control loop.
An incorrectly tuned loop will not function correctly, providing less than the desired performance. We will first look at how to
determine if a loop is properly tuned and then cover some of the typical methods of tuning loops." He also makes available an
Excel workbook that simulates PID controllers.
Together, the booklet and simulator sell for $US55. Quite a reasonable price. He also posts a
code fragment that illustrates the basic idea of PID
controllers and links to tutorial material.
Comparison of PID Control Algorithms
ExperTune posts considerable
information on controllers in general. One article
had a rather disturbing introduction: "In practice, manufacturers of controllers don't adhere to any industry-wide standards for PID
algorithms. Different manufacturers and vendors use different PID algorithms and sometimes have several algorithms available within
their own product lines. Just as there are no industry standards for PID controllers that companies adhere to, nomenclature and action
for similar modes varies. Some manufacturers call the Proportional Band the Proportional Gain. Manufacturers interchange names and units
for integral or reset action. In this article, integral action is defined in time/repeat and reset in repeat/time. One is the reciprocal
of the other. The action of either reset or integral can be reversed depending on the manufacturer's units." Last week we mentioned that
there are subtle variations in how PID is implemented. This article will open your eyes further to that reality. Be sure to peruse the
other material on this site and sign up for their free training disk. You can spend many good learning hours here.
Writing for CircuitCellar, George Martin answers the question "If I have a pressure control
(PD), and it continuously hunts for the setpoint, would adding some integral (reset) fix this problem? What parameters would work?"
He recommends the PID controller as a potential solution. "The Proportional component of the PID loop gets you to the goal, the integral
component takes out any offsets, and the derivative component helps control the overshoot and ringing."
Also for CircuitCellar, George Martin responds to a question on getting an accurate reading from a fuel-level sensor in spite of splashing
in the tank. He casts this problem for PID controllers. It is a good read.
From Plant Data to Process Control
Here is a commercial book written by Liuping Wang and William Cluett, and published by Taylor & Francis. Of all the large-press offerings,
this one appears to be the least theoretical while taking aim at practical applications. "This is a professional-level book aimed at process
engineers in industry and researchers into systems and control engineering. It looks at theoretical advances in the area of process engineering
and a wide variety of implementations. It also introduces new ideas, techniques, and algorithms to the areas of process identification and process
control. Theoretical advances in these areas and a wide variety of applications are examined."
Flying Robotic Insect Slated to Explore Mars
If you want to read about a far-out control problem, read this EE Times
article by R. Colin Johnson. "Motivated by the notion that the Mars landscape may prove easier to navigate by air than with ground-based
rovers, NASA is backing a research project to build toy-sized flying robots, modeled on the entomology of insects, that can hover like
helicopters. Patented as 'entomopters,' the robots are on the drawing board of University
of Missouri professor Kakkattukuzhy Isaac."
Guides and Experts Analog
Avenue EDA
Tools PLD DSP EDA Embedded
Systems Power Test
|
|||||||||||||||||||||||||||||||||||
|
Copyright © 2003 ChipCenter-QuestLink About ChipCenter-Questlink |
||||||||||||||||||||||||||||||||||||