Automated Control Resumen Unidd IV
Automated Control Resumen Unidd IV
Automated Control Resumen Unidd IV
Chapters
Fundamentals of automatic process control
Representation and Modeling of physical systems
Stability of control systems
Process control
Digital Control
PARTE 1
Introduction
This introduction will show you the characteristics of the each of proportional
(P), the integral (I), and the derivative (D) controls, and how to use them to
obtain a desired response.
Controller: Provides the excitation for the plant; Designed to control the overall
system behavior.
The signal [U(s)] just past the controller is now equal to the proportional gain
(Kp) times the magnitude of the error plus the integral gain (Ki) times the
integral of the error plus the derivative gain (Kd) times the derivative of the
error.
This signal (u) will be sent to the plant, and the new output will be obtained. This
new output will be sent back to the sensor again to find the new error signal (e).
The controller takes this new error signal and computes its derivative and its
integral again.
A proportional controller (Kp) will have the effect of reducing the rise time
and Will reduce ,but never eliminate, the steady-state error.
An integral control (Ki) will have the effect of eliminating the steady-state
error, but it may make the transient response worse.
A derivative control (Kd) will have the effect of increasing the stability of
the system, reducing the overshoot, and improving the transient
response.
Running this m-file in the Matlab command window should gives you the
following plot.
We have reduced the proportional gain (Kp) because the integral controller also
reduces the rise time and increases the overshoot as the proportional controller
does (double effect). The above response shows that the integral controller
eliminated the steady-state error.
Running this m-file in the Matlab command window should gives you the
following plot.
Now, we have obtained the system with no overshoot, fast rise time, and no
steady- state error.
5) Adjust each of Kp, Ki, and Kd until you obtain a desired overall response.
PARTE 2
In this configuration, the control signal u(t) is the sum of three terms. Each of
these terms is a function of the tracking error e(t).The term Kp indicates that this
term is proportional to the error. The term Ki/s is an integral term, and the term
Kds is a derivative term. Each of the terms Works “independently” of the other.
u t = Ki e τ dτt0
• The addition of this integral makes the open-loop forward path of Type I. Thus,
the system, if stable, is guaranteed to have zero steady-state error to a step
input. This canal so be viewed as an application of the internal model principle.
If e(t) is non-zero for any length of time (for example, positive), the control signal
gets larger and large as time goes on.
It thus forces the plant to react in the event that the plant output starts to drift.
We can think of the integral term as an accumulation of the past values of the
error. It is not uncommon for the integral gain to be related to the proportional
gain by
Ki =Kp/τi
• Where τi is the integral time. Generally, by itself, the I term is not used. It is
more commonly used with the P term to give a PI control.. The I term tends to
slow the system reactions down. In order to speed up the system responses,
we add the derivative term.
• Assuming now that Kp=Ki=0,we have
u t = Kdde(t)dt
• that is that the control is based on the rate of change of the error. The more
quickly the error responds, the larger the control effort. This changing of the
error indicates where the error is going. We can thus think of the derivative term
as being a function of the future values of the error. In general, a true
differentiator is not available.
This is because true differentiation is a “wide-band” process, i.e., the gain of this
term increases linearly with frequency. It is a non-causal process. It tends to
amplify high-frequency noises. In addition, if the error undergoes a sharp
transition, for example, when a step input is applied, the derivative skyrockets,
requiring an unreasonably large control effort. Generally, the control signal will
saturate all amplifiers etc.
Setpoint Weighting
It is common for the closed-loop system to track a constant reference input. In
this case, the input is called a setpoint. This being the case, it is often
advantageous to consider an alteration of the overall control law for the sake of
this problem. We noted, for instance, that it is not particularly good to
differentiate step changes in the error signal.
Changingthe configuration will give basically the same behavior, without having
to do such things.The setpoin weighted PID is thus a generalization of the PID,
and has
u t = Kpep t + Ki ei τ dτ + Kd ded(t)dtt0
• Where
ep = apr t − y t , ei t = r t − y t , ed t = adr t − y(t)
• where constants ap and ad are as yet undetermined. Each of the terms thus
has a different “error” associated with it. Note that when ap=ad=1,that we have
the original PID design. Note also that when r(t) is a piecewise constant signal
(only step changes), then for all time (except at the actual step locations), r
(t)=0,and thus,
ded(t) dt=d dt adr t − y t = −y (t)
• which is independent of r(t) and ad.In general, since y is the output of the
plant, it will be a smooth function and thus y will ̇ be bounded. It is thus not
uncommon to let ad=0.This eliminates spikes in the term Kd(ded(t)/dt),without
substantially affecting the overall control performance.
A block diagram for this is shown. As it appears, it seems much more
complicated.However, it is actually not much more complicated.
Overall Usage
• The PID controller performs especially well when the system has first order
dynamics(a single pole). Actually, in this case, the P controller is a state-
feedback control! In general, for the system with first-order dynamics the PI
control is sufficient, and the D is not needed. For the system with essentially
second-order dynamics, the PD control corresponds to state feedback. The PID
control generally works well for these systems.
• In general, these require the use of more sophisticated methods of control.
– Tight control of higher order process
– Systems with long delay times. In this case, the derivative term is not helpful.
A “Smith predictor” is often used in this case.
– Systems with lightly damped oscillatory modes
– Systems with large uncertainties or variations.
– Systems with harmonic disturbances
– Highly coupled multi-input, multi-output systems—especially where
coordination is important.
PARTE 3
Example
Where
We thus obtain the plot shown. This plot compares the open-loop response with
thatof the PID controlled response. For the open-loop, we simply scaled the
step input sothat the overall system output settled out to 1.
We see that the PID controlled system performs much better than the open
loop. Itis often advantageous to make a comparison with the open-loop system,
since that shows what would happen using the simplest kind of control. Indeed,
the open loop requires no sensors and is thus much less costly to build and
maintain than the PID system. If the PID system did not perform so much better,
it might not be worthwhile.
Plant Modeling
In general, the more we know about a system, the better we will be able to
control it. If we know nothing about a system, we better not be trying to control
it. A logical question, then, is how much (or little) do we need to know, and how
will we obtain that data?
Information required
• The more information available about the system, the better it can be
controlled.
• Many processes to be controlled are either difficult to model or else it is
difficult to obtain the parameters for the model. For example, the dynamic
inductance of a dc motor is very difficult to obtain. Generally, to obtain a model,
it is necessary to perform some experiments to obtain actual parameter values.
The type of experiments will determine what data is obtained.
• Here, we consider three types of experiments. Each will give a different type of
information.
which doesn’t match the steady-state characteristics very well, but does match
the transient portion in a linear fashion. A model that approximates the system’s
steady-state behavior is given by
Note that even though the integral is all the way to ∞, actually the integral may
be approximated for a shorter time since the difference |yss−y(t)|becomes small
after acertain point. The approximation Ga2 generally doesn’tmatch the
transient portion extremely well, but is a goodfirst-order approximation. It has
been observed that the quantity.
is a measure of the difficulty of control. Generally 0 ≤ κ1 ≤ 1,and the closer κ1 is
to 1,the more difficult the system is to control using the PID. Still another
approximation is given by
Where:
is called the apparent time constant. This is the better of the three
approximations. Generally speaking, τat is less susceptible to noise in the step
response.
Parte 4
Frequency Response Information
• Another type of experiment that actually provides more useful (in terms of
designing the PID controller) information is a frequency response test.
Here, we do a simple test.
• Again, we assume that the system is stable. We also let r (t) = ε, a very small
value.
There are two variations on the Frequency response tests. Both yield
essentially the same information. The first test, illustrated in Figure 6(a) is that
of a P controller. Here, the gain Kp is increased from zero until the system
begins to oscillate. When Kp is set such that there is a constant oscillation
(neither increasing nor decreasing), that value is called the ultimate gain and is
denoted Ku. The oscillation will generally be periodic with some period Tu.
This approach is generally risky since the plant is operated near instability. Also,
generally, it is difficult to keep the control amplitude bounded (important for
safety!).
• Thus, in general, this method is difficult to automate.
The second variation is based on the diagram in Figure 6(b). Here, a relay is
employed, giving the control signal.
This control, for most systems of interest, will result in an oscillation. Eventually
the control input will be a square wave of amplitude , and have a period
approximately equal to Tu from the previous versión of the test. The output of
the system will settle out to be a sinusoid of amplitude α. In this case, we may
obtain the ultimate gain from the formula...
This Ku and Tu are close to the actual values of Ku and Tu found in the
previous variation, the previous values being actually more accurate.
• Thus, regardless of which variation we choose, we end up with Tu and Ku.
The nice thing about this test is that the control signal is bounded for all time.
The threat of instability is also reduced.
System Identification is a method of obtaining a transfer function by applying a
known test signal to a system, observing the output, and comparing it with the
input to determine the transfer function of the system. This test is generally
quite a bit more involved than either the step response test or the frequency
response test. It yields, however, an actual transfer function, rather than just a
few values of an approximate transfer function.
• Because of the complexity, this topic will not be considered here
example
We use the following SIMULINK model to perform the step response
experiment. Note that in this setup, we have blocks added to help compute the
necessary constants. Performing the simulation once, we obtain
EXAMPLE
In addition, looking at Scope2, we can find the time at which the maximum
slope occurs. Zooming in, we obtain
Parte 5
PID tuning
Having obtained a basic system information, from either of the tests, we are
now in a position to perform some designs on the system. These designs are
based upon the data obtained by the above experiments.
• This is the earliest design method for the PID controller. It was originally
developed in 1942, so its not exactly state-of-the-art. It does, however, work
effectively for many systems. This method is based on the approximate model
Ga1 (s) . Once this model has been determined by the step response test, we
may design controllers according to the following table. Note that only y0 and t0
are used.
These formulae are heuristic rules based upon the response of many different
systems.
• The design criteria was to ensure that the amplitude of closed-loop oscillation
decay at a rate of 1/4. This is actually often too lightly damped. It is also often
too sensitive.
From the Frequency Response Test (or Relay Test), we obtained the ultimate
gain Ku and Tu. From these values, we obtain the following table.
• We note that in this case as in the previous case,
This appears to be common in PID tuning. Both methods also often give too
high a Kp, which is related to the designed decay ratio. The ZNSR method
generally gives a higher Kp than the ZNFR method.
Chein-Hrones-Reswick Method
A modification of the Ziegler- Nichols method is the Chein- Hrones-Reswick
(CHR) method.
• This is based more on a setpoint response. This is a step-response method
and uses y0, τ 0 and τat. In this case, we have the following table.
Example
• Consider the example given in the previous section. Here, we consider only
PID controllers.
• There, we obtained the values y0 = 0.1076, τ0 = 0.1622, τat = 1. 0978, Tu ≈
0.64, and Ku ≈ 24.16. We thus obtain the controller designs.
Example
PARTE 6
Integrator Windup
• In general, the actuator for any system is limited, i.e., there is a maximum
exertion that the actuator can accomplish. If the actuator is a power amplifier, it
generally has “rails.”
• Thus, the design for a linear system is not sufficient since the real system is
not linear, but has a nonlinear saturation term. A controller designed for a linear
system will often not work on a nonlinear system. This configuration is
illustrated below. Here, a disturbance input is also added.
When the actuator saturates, the loop is effectively open. In particular, if the
control is such that a long period of saturation exists, it is possible for the
integral
term to keep integrating even when it is not reasonable to do so. the integrator
itself is open-loop unstable, and the integrator output will drift higher. This is
called
integrator windup. In order for the integrator to “unwind,” the error signal must
actually change sign before the output of the integrator will start to return to
zero.
Thus, the actuator remains saturated even after error changes sign since the
controller’s output stays high until theintegrator resets.
• This is difficult to visualize, so we give our example next.
Example
• Consider the problem of the previous example, using the ZNSR method.
Suppose we have a saturation limit where we may have = 1, 1.5,2 or 5.
Suppose also that the disturbance w (t) is a negative unit step input that turns
on at time t = 15. A plot of this is shown below, and is compared with the open-
loop system. Note that the open-loop system goes to zero after the disturbance
enters because the disturbance “cancels” the reference signal.
When = 1, the control signal quickly saturates and thus the system behaves
essentially as the open-loop system. We have shown the control signal u (t) and
the actuation signal v (t) for = 1.5 in the bottom graph. Here, the input
immediately saturates, but finally resets at around t = 3, in which case the
system begins to act like a linear system.
The idea of an anti-windup technique is to mitigate the effects of the integrator
continuing to integrate due to the nonlinear saturation effect. In the Back-
Calculation method, when the actuator output saturates, the integral is
recomputed such that its output keeps the control at the saturation limit. This is
actually done through a filter so that anti-windup is not initiated by short periods
of saturation such as those induced by noise.
For = 1.5, we also have a comparable disturbance response to that above. This
is due to the fact that the combination of the setpoint and the disturbance are
past the saturation limit. We note, however, two beneficial aspects of the back-
calculation. The first is that the response to the initial setpoint change is
significantly better than when the back-calculation is not used. We have virtually
no overshoot, and a much faster settling time. This is because the back-
calculation resists the tendency of the controller to initially saturate. The second
benefit is that when the disturbance hits, the control signal u (t) does not head
off to infinity, but remains bounded.
For ≥ 2, we see a comparable disturbance rejection to that of the original
problem.
• However, as with the = 1.5 case, we see a significantly improved transient
response to the setpoint change. Overall, the back-calculation has improved the
performance of the system.
Using this function on the previous example, in place of the Back-Calculation
method, we obtain essentially the same plots. One difference, however, is that
unlike the Back-Calculation method, this method may have a larger control
value when the system is saturated and the anti-windup method doesn’t do as
much to control this.
Conclusion
• PID controllers can work surprisingly well, especially considering how little
information is provided for the design. Several methods for tuning the
controllers have been presented. There can be vast differences in the results
produced by different tuning procedures. The quality of the tuning is very much
dependent on the compatibility of the tuning method with the plant
behavior and the performance goals.