Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
03/31/2015
Share
forward prediction can estimate the control output closely, the PID
algorithm, whose job it is to minimize the error between the current
state of the system and the desired state, will need to do less to
correct the error. This reduces the error faster or keeps the error
smaller than relying on the PID algorithm alone. Feed forward control
outputs usually are calculated using the setpoint value and its
derivatives (based on target velocity and acceleration values) and
multiplying each one by a gain. In closed loop motion control
applications it is common to multiply the target speed and target
acceleration by the velocity and acceleration feed forwards to
generate the feed forward's contribution to the control output. (Figure
1 contains a typical control loop diagram with feed forward terms
added to the conventional P, I, and D terms.)
Motor PID example
As a simple example, consider a motor that will move 1 in. per
second if 1 V is applied, 2 in. per second when 2 V are applied and
so on, such that applying 10 V will result in a speed of 10 in. per
second. In this case the feed forward value would be proportional to
the velocity: the velocity feed forward value is 1 volt per inch per
second. This means that if the setpoint (that is, the target velocity of
the system) is 8 in. per second, the output from the velocity feed
forward term would be 8 V.
In a motion control application the velocity setpoint is ramped up to
the final setpoint smoothly so the feed forward term ramps up
smoothly to avoid sudden changes in the control output that would
shock the system.
Feed forward gains are actually the inverse of the plant model (a
mathematical model of the operation or process being controlled). If
the plant model was some function Gp(s), the feed forwards would be
FF(s) = 1/Gp(s). This fact is useful because when controlling a
system, the process variable [PV(s), the measured state of the
process] should be equal to the setpoint SP(s). In math terms, feed
forward control is:
SP(s)*FF(s)*Gp(s)=PV(s)
Since the feed forwards are the inverse of the plant, Gp(s)*FF(s) = 1,
so the equation above simplifies to
SP(s)=PV(s)
The process variable is the same as the setpoint, so there is no error.
This is the desired goal. As mentioned above, the only problem is
that typically the plant designers neglect to provide a plant model, so
the feed forward gains must be tuned manually. This isn't as hard as
it seems if the person doing the tuning has access to the integrator's
gain contribution to the control output.
It is best if the integrator's gain contribution can be plotted on a trend
or captured in a plot. The reason for this is that if there is an error in
the feed forward gains, the integrator gain will try to compensate for
the error (see Figure 2a).
3 tuning plot figures
Figures 2a, 2b, and 2c show three tuning plots. The yellow plot line in
each represents the integrator term. Red and light blue are actual
and target position. Blue and magenta are actual velocity and target
velocity, and green is the control output to the valve. The goal is for
the actual and target axis positions to precisely overlap at every point
in time (horizontal axis).
Acceleration, deceleration
Assuming the velocity feed forward is now correct, there should be
very little, if any, error while the system is traveling at constant
velocity (see Figure 2b). However, there will most likely be some
error during acceleration and deceleration. During acceleration the
integrator output will tend to increase a bit to keep the actual velocity
from lagging the target velocity. Since the target acceleration also
can be plotted, the amount of integrator wind-up during acceleration
can be divided by the peak acceleration to get a good estimate of the
acceleration feed forward gain. This should reduce the following error
during the acceleration phase and when deceleration goes to zero.
...where:
K is the gain of the motor with load
is the time constant of the motor with load
s is the Laplace operator
1/K is the velocity feed forward term
s/K is the acceleration feed forward term
[Reminder: Laplace transform is a mathematical device used to
make a round trip from the time to the frequency-dependent complex
variable(s) domain and back. A Laplace operator is a differential
operator given by a function's gradient.]
Hydraulic cylinder model
A linearized model for a hydraulic cylinder and load is more
complicated. The cylinder and load can be modeled as a mass
between two springs, so it is an underdamped two-pole system. A
linear model is: