A proportional–integral–derivative controller also known as a PID
controller is a basic control loop response mechanism/controller which
is extensively used in industrial control systems. A PID controller is
used for calculating "error" values as the difference between a measured
process variable and a desired set point. By adjusting the process
control inputs, the controller attempts to reduce the error. Parameters
of a PID controller used in the calculations must be tuned according to
the nature of the system.
Three separate parameters are involved with PID controller calculations which are; the proportional, the integral and derivative values. Proportional values determine the reaction to the current error, while integral values determine the reaction based on the sum of recent errors, and derivative values determine the reaction based on the rate at which the error has been changing. The weighted sum of the proportional, integral, and derivative actions are used to adjust the process by means of a control element such as the position of a control valve or the power supply of a heating element. Consequently, the PID controller can be illustrated as a controller that takes into account the present, the past, and the future of the error.
Tuning the three constants in the PID controller algorithm, will allow
the controller can provide control action designed for detailed process
requirements. The response of the controller can be described in terms
of the responsiveness of the controller to an error, the degree to which
the controller overshoots the set point and the degree of system
oscillation. Also, note that the use of the PID algorithm for control
does not guarantee optimal control of the system or system stability.
Control Loop Summary
A basic explanation of a control loop is the simple act of adjusting
hot and cold faucet valves to preserve the faucet water at the preferred
temperature. Usually by mixing of the two streams, the hot and cold
water, the desired temperature can be obtained. When the person touches
the water to measure its temperature the sense of feel tells them if the
stream of water has met the desired temperature. From this point the
person will either adjust the hot and cold water valves until the
preferred temperature is met and stabilized or do nothing because the
desired temperature has already been met. Sensing the water temperature
is equivalent to taking a measurement of the process value or process
variable (PV). The desired set-point (SP) is the temperature in which the
person is trying to obtain. Additionally, the water valve position
which can be called the input to the process is known as the manipulated
variable (MV), which basically means that one can change the values of
this variable. Moreover, in this example the difference between the
desired set-point and the temperature measurement is known to be the
error (e). The error will quantify if the water is too hot or cold and
by how much.
After measuring the process variable (PV) or in this case the
temperature, then calculating the error, the controller determines when
to change the manipulated variable (MV) or tap position and by how much.
Once the controller turns on the water, they might turn the hot valve
slightly if warm water is preferred, or they may turn it all the way.
This is an example of the proportional control. To speed up the process
so that the water becomes hot faster, the controller may open the valve
more and more as the time elapse, this is an simple example of an
integral control. By using both the proportional and integral control
methods, the water temperature has the potential to oscillate between
hot and cold. This is due to the fact that the controller is
over-compensating and overshooting the desired set-point at a rapid rate.
If the controller wanted to achieve the desired temperature on a more gradual convergence, the controller can damp the anticipated future oscillations. In other words the controller may elect to temper their adjustments; this can be referred as a derivative control method.
PID Controller Theory
As stated in the previous sections the PID control scheme is named
after its three correcting terms, whose sum constitutes the manipulated
variable (MV). Which presents the equation:
Pout is the proportional termIout is the integral termDout is the derivative term
Proportional term
The proportional term which can also be referred to as gain, makes a change to the output that is proportional to the current error value. By multiplying the error by a constant Kp , which is known as the proportional gain, the proportional response can be adjusted.
The proportional term is given by:
Pout : Proportional term of outputKp : Proportional gain, a tuning parametere : Error = SP - PVt : Time or instantaneous time (the present)
When the proportional gain has a value it results in a large change
in the output in the given change in the error. As a result of the
proportional gain being out of range or too high, the system can
eventually become unstable. On the other hand, if the proportional gain
is very small it will result in an output response to a large error in
the input which will also make the responsive controller lessen.
Additional having a proportional gain that is too low may cause the t
control action to be too small when it tries to respond to the system.
Integral Term
The integral term which can also be called the reset, its
contribution is proportional to the magnitude and duration of the error.
By the summation of the instantaneous error over the time, which is
basically the integration of the error, gives the accumulated offset
that should have been corrected previously. This accumulated error is
multiplied by the integral gain then added to the controller output.
Additionally, the integral gain, Ki , determines just how much the integral term will contribute to the total control action.
The integral term is given by:
(3)
Iout : Integral term of outputKi : Integral gain, a tuning parametere : Error = SP - PVt : Time or instantaneous time (the present)τ : a dummy integration variable
When added to the proportional term, the integral term accelerates
the movement of the process towards the desired set-point which will
eliminate the residual steady state error which occurs with the
proportional controller. The one drawback from the integral term is the
simple fact that it responds to an accumulated error from the past which
can cause the present values to overshoot the desired set-point value.
Derivative Term
By determining the slope of the error over time and multiplying that rate of change, which is done by the derivative gain Kd ,
the rate of change of the process error is calculated. From here, the
magnitude of the contribution of the derivative term which is also known
as the rate, to the overall control action is called the derivative
gain, Kd .
The derivative term is given by:
Dout : Derivative term outputKd : Derivative gain, a tuning parametere : Error = SP - PVt : Time or instantaneous time (the present)
A noticeable slow down in the rate of change close to the controller
set point is done by the derivative term. Therefore, the derivative
control helps reduce the magnitude of the overshoot which is the result
of the integral component while also improving the combined
controller-process stability.
Summing the Terms
Thus, these three terms are then added up to produce the output for the PID controller. The final form of the PID algorithm is:Reference
Bibliography
1. http://en.wikipedia.org/wiki/PID_controller (1-28-10)
2. http://www.engin.umich.edu/group/ctm/PID/PID.html (1-28-10)
3. http://www.jashaw.com/pid/tutorial (1-28-10)
I need PIC4553 USB motor controller sample circuit with code.
ReplyDelete