
AMAZING ARTICLES #24: THE AMAZING
PID CONTROL
INERTIA


COROLLARY THEOREMS:
"reality is never what it appears to be."

Up to this point we wrote
Amazing Articles after
Amazing Articles, though we are certain
that most readers take them as just
"extensions" of our SF books. That is not true, dear friends; our intention is to discuss in these articles about
science, only. Sure, there are a few similarities to the SF literature, but that is only because
very advanced
science, or knowledge, will always appear to be Science Fiction (like).

Imagine that you go back in time 10 000 years ago, and you try
to explain electricity to a group of fine Neanderthal gentlemen.
Naturally, they will not believe you.
Regardless of your efforts, they will
consider that a sharp, smart rock, or a sturdy, "scientifically"spiked club are way
more efficient in delivering fresh meat for their next meal.


In A20 we started presenting a few alternative options
to the fossil oil produced energy, and we mentioned 2 particular situations in which
routine takes over science.
The first one was, cooling hot iron (Fe) in water may lead to
horrible
accidents, because Fe will separate/reduce the oxygen atom from the water molecule, and it will release hydrogen. This type
of accidents happened before, and we noticed that people couldn't explain them: they have labeled those particular
accidents as "unexplained".
The second one is a common, continuing firefighters' practice: using water
to put out very strong fires will feed, in fact, the fire with hydrogen, because redhot carbon is again capable
of separating/reducing the oxygen atoms, therefore it will release
hydrogen from the water vapors. Both instances are well known chemical
reactions to (a few) chemists, but it seems that little or no corrective
actions are taken. The best substances to put out difficult fires are
dirtdust, and sand.
We could present many particular instances of malpractice in the industry, and in our day to day life but
. . .
Fact is, the trend today is to hire people in management positions based on experience,
therefore the result is only one:
we continue
repeating the mistakes of the past.
During the peak of intelligence (around 1974) in USA, it was a well known
fact that it takes people with a large range of qualifications to work on a particular new design/technology/project. In other words, when
designing an electrical product, or a software program for example, a complex team of professionals is needed,
and their qualifications must be as diverse technically as possible. That practice was abandoned in
time, though things do not work very well today.

Anyway, we intend to present one practical example of routine practice which complicates unnecessarily our engineering activity, and our
sociallife. Now, everybody is aware that most
countries spend enormous amounts of money on military research technology. One of the toughest issue is the "interceptor
missiles" which are supposed to destroy incoming enemy missiles. Many billion dollars were (and are) spent on
perfecting the PID control routines needed for that technology to work properly.
[Please discover on the
Internet the history of the PATRIOT missiles project, and many similar
ones.]
Now, what is this PID? PID stands for Proportional, Integral, Derivative closedloop control systems, and all
engineers know it very well because they work a lot with it. The PID control method is applied in almost all
automatic control processes, and the theory behind it is no joke. In fact, a good PID control system is almost a
military secret due to its complex implementation. However, the entire PID control
technology is a mistake which people persist on
repeating, because the psychological drive behind this control method is too strong to overcome.


The above figure represents the main hardware modules of a closedloop control system, and we are certain that all engineers are well familiar with it. The
only place where some interesting action happens is in the PID/FUZZY Controller.
To start, we shall discuss first the PID controller.
What people use to do is, they work with
a
formula in continuoustime domain inside the processor (or within the
hardware electronic circuits) of the PID
Controller—here it is:
Continuoustime
domain PID closedloop control formula
CV = K_{p}*Er + K_{i}∫Erdt + K_{d}*(Er/dt)
In the
above formula, in the right member, there are three terms, and each deals with one type of
a control: proportional,
integral, and derivative. Now, the formula is in a continuoustime domain,
therefore we cannot work with it directly
because the PID System has a cyclic, discretetime mode of operation. For example, the PID system reads the
Process Variable (PV), then it calculates a new Control Variable (CV) at discrete time intervals.

That is the first major complication, therefore people use to transform
the continuoustime PID control formula into a discretetime one,
like this:
Discretetime
PID closedloop control formula
CV_{n} = CV_{n1} + K_{p}*(Er_{n} +Er_{n1}) + K_{p}*K_{i}*ΔT*Er_{n}
 (K_{p}*K_{d}/ΔT)*(PV_{n} 2PV_{n1} + PV_{n2})
We should
explain the terms in the above formula, though we are not going to do it. As always, the
most important thing is
the Global
Picture, not the details. After transforming the continuoustime formula into a discretetime
one, people are able to obtain a
practical value for the Control Variable (CV_{n}).
Now, the discretetime formula presented above is a
particular case, despite the fact it has the most general format; note
that there are many other implementations
possible. In order to obtain the right discretetime formula, people work with
a few "transfer functions"
named Laplace Transforms. The mathematical theory behind this process is well documented in many books
having thousands of pages, and it is very difficult to master.

Anyway, once we do come up with a decent discretetime formula, similar to the one presented above, comes the
second, practical, difficult problem: finding the right values for K_{p}, K_{i}, and K_{d}
constants. It is such a difficult issue to discover the right constants for each specific implementation, that new
books having other thousands of pages have been written specifically for that.
The most known method of
"tuning" the PID constants is named ZieglerNicholas. However, working manually with that method
is a true nightmare. Sure, we do have the option to spend a few more thousand (or million) dollars
on purchasing a
software program specially designed to discover the right constants for any specific application.
Now, suppose we have found the right constants, and we are able to start our automatic PID Control System. Despite all
efforts, the PID System may not work correctly in all possible situations! Even worse, the accuracy of the control itself
is fairly poor, therefore people have to spend more money and way more time to further "finetune" the PID
system—it is a real pain!
As you can see, designing automatic systems to behave intelligently is not easy. The point to note is, all those
troubles come when there is little intelligence behind the initial decision to implement a PID Control System. As
mentioned, people are selected for managerial/design jobs based on experience. Their experience says:
we
have worked successfully with PID since the electronic control circuits were analog,
therefore we cannot implement anything
better.
Today all controls circuits are digital, therefore working with the continuoustime PID
closedloop control formula is just a worthless
dinosaur from the forgotten past.

The plain and incredibly simple alternative is the
Fuzzy Logic method of closedloop automatic control. Its implementation is
thousand to million times cheaper in value; hundred times less timeconsuming to implement; and it is way more
efficient than any PID control system because it is a digital method designed to work with digital
systems.
Unfortunately, people do not understand the theory behind both methods, and we suspect it is the name
of the last method that bothers that much: "FUZZY LOGIC"! Due to that improper naming used, people think the logic
behind this particular control method is also fuzzy. No, Sir. In fact, the proper name for this method should be:
DiscreteTime, Logic, ClosedLoop Control.
The second psychological aspect is, Fuzzy Logic is way too simple compared to thousands of pages
describing the PID theory. People consider that the more complex the theory
behind a practical application is, then it is bound to be
better! Well, not so, dear friends.

We have designed and tested many control systems using Fuzzy Logic
discretetime
closedloop control systems, therefore we are able to
confess: it takes 1 (one) programmer only a few workdays to implement and finetune Fuzzy Logic without
any major efforts. Fact is, it is even fun to work with any
FuzzyLogic application.
Practical results depend, naturally, on the intelligence of the programmer, but we can assure everybody
that FuzzyLogic is
far more
efficient from all points of view than PID is, and it allows for further finetuning beyond your wildest dreams.
Think only of a Statistical Trend Routine (this is a learning algorithm): it takes only one day to
implement it in firmware!
The theory behind Fuzzy Logic spans on maximum 1 (one) page, compared to tons of PID formulas, graphs, and tables.
The way it works is this: in one processor loop PV is read, then CV is updated, based on
the error (calculated as "Set Value/Point" minus PV), and a
on simple table of data. That is all!
Now, the true beauty is: Fuzzy
Logic works in all situations, it is way more efficient
than PID, and it is incredibly cheap. The possibilities of finetuning Fuzzy Logic method of
closedloop control
systems are simply limitless, and we have total control over it! The control table we have mentioned could be very
simple, or quite complex, depending on the accuracy needed—note that this is
a relative complexity, because Fuzzy Logic will
forever be thousand times less complex to implement than any PID. Now, because we do have total control over Fuzzy
Logic, we can even change the control table at runtime, the way it pleases us most!

Methods like Fuzzy Logic require a certain amount of customization for each application,
plus a good logic method
of implementation. Although it contains no control algorithms, we do encourage the readers to study
LEARN HARDWARE FIRMWARE AND SOFTWARE DESIGN because it is an excellent example of
a logic design. In addition, you can discover in our book many simple alternatives, similar to the Fuzzy Logic method
presented here.


We shall continue referring to this topic in future
Amazing Articles because the socialpsychology implications described
here are very important. Even more, we feel tempted to present you a
second practical example in one of the following Amazing Article . . . Who knows, it
may help.
***
First published on August 02, 2005
© SC COMPLEMENT CONTROL SRL. All rights reserved. 
» BACK TO TOP 
