Documente Academic
Documente Profesional
Documente Cultură
Faculty of Engineering
Course :
Automatic control
Project:
Instructor:
Dr. Yousefi-Koma
By:
Morteza shafiee
Hassan Ghiamatyoun
Summer 2010
Tehran
Introduction
PID controllers
The three terms of a PID controller fulfill three common requirements of most control problems.
The integral term yields zero steady-state error in tracking a constant set point, a result
commonly explained in terms of the internal model principle and demonstrated using the final
value theorem .In this projects , the goal is to find a PID controller (if one exists) that allows the
loop transfer function to achieve gain and phase specifications over finite frequency intervals.
The PID framework solves many control problems and is sufficiently flexible to incorporate
additional capabilities. We can thus expect that this technique will continue to play an important
role in control practice.
The PID controller calculation (algorithm) involves three separate parameters, and is accordingly
sometimes called three-term control: the proportional, the integral and derivative values, denoted
P, I, and D. The proportional value determines the reaction to the current error, the integral value
determines the reaction based on the sum of recent errors, and the derivative value determines
the reaction based on the rate at which the error has been changing. The weighted sum of these
three actions is used to adjust the process via a control element such as the position of a control
valve or the power supply of a heating element. Heuristically, these values can be interpreted in
terms of time: P depends on the present error, I on the accumulation of past errors, and D is a
prediction of future errors, based on current rate of change. By tuning the three constants in the
PID controller algorithm, the controller can provide control action designed for specific process
requirements. As you see in figure-1 we show a sample diagram of PID controller .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. Note
that the use of the PID algorithm for control does not guarantee optimal control of the system or
system stability .Some applications may require using only one or two modes to provide the
appropriate system control. This is achieved by setting the gain of undesired control outputs to
zero. A PID controller will be called a PI, PD, P or I controller in the absence of the respective
control actions. PI controllers are fairly common, since derivative action is sensitive to
measurement noise, whereas the absence of an integral value may prevent the system from
reaching its target value due to the control action.
2.1.1.Proportional term:
The proportional term (sometimes called gain) makes a change to the output that is proportional
to the current error value. The proportional response can be adjusted by multiplying the error by
a constant Kp , called the proportional gain. A high proportional gain results in a large change in
the output for a given change in the error. If the proportional gain is too high, the system can
become unstable (see the section on loop tuning). In contrast, a small gain results in a small
output response to a large input error, and a less responsive (or sensitive) controller. If the
proportional gain is too low, the control action may be too small when responding to system
disturbances.
2.1.2.Integral term:
The contribution from the integral term (sometimes called reset) is proportional to both the
magnitude of the error and the duration of the error. Summing the instantaneous error over time
(integrating the error) gives the accumulated offset that should have been corrected previously.
The accumulated error is then multiplied by the integral gain and added to the controller output.
The magnitude of the contribution of the integral term to the overall control action is determined
by the integral gain, Ki.
The integral term (when added to the proportional term) accelerates the movement of the process
towards set point and eliminates the residual steady-state error that occurs with a proportional
only controller. However, since the integral term is responding to accumulated errors from the
past, it can cause the present value to overshoot the set point value (cross over the set point and
then create a deviation in the other direction).
2.1.3.Derivative term :
The rate of change of the process error is calculated by determining the slope of the error over
time (i.e., its first derivative with respect to time) and multiplying this rate of change by the
derivative gain Kd. The magnitude of the contribution of the derivative term (sometimes called
rate) to the overall control action is termed the derivative gain, K d .
The derivative term slows the rate of change of the controller output and this effect is most
noticeable close to the controller set point. Hence, derivative control is used to reduce the
magnitude of the overshoot produced by the integral component and improve the combined
controller-process stability. However, differentiation of a signal amplifies noise and thus this
2.2.Effects
Effects of increasing a parameter independently :
There is a table that show the effects of in
increasing
creasing a parameter independently. In next section we
examine these effect and discuss on theme.
Decrease
Ki Decrease Increase Increase significantly Degrade
2.3.Crank Slider:
As you see in figure-2 and figure-4 we simulate a slider lag in Matlab Simulink
C= [15 5 0] CG1 C
CG1= [5 5 0]
Figure-2:
Figure Crank Slider
Figure
Figure-3: Block diagram of system.
The best controller
comparing controllers
3.1.1.Proportional
Proportional controller(P):
First we apply proportional controller to control the system .as you see in figure 3.1 controller is
optimized to desired responses and the optimized gain is:
p = 1525.2
Figure
Figure-3.1:iteration for optimized responses .
We have a steady state error about 0.0006 cm because the gain of integral is zero
Figure-3.3:torque signal.
as you see in figure 3.4 controller is optimized to desired responses and the optimized gain is:
p = 1545.3
d = 10.43
Figure
Figure-3.4:iteration for optimized responses .
Again we have a steady state error about 0.0006 cm because the gain of integral is zero and there is very
small effect on system in variety of d(derivative gain).
Figure-3.6:torque signal.
14 | Design a PID Controller For Crank Slider
3.1.3.Proportional – Integral controller
controller(PI):
as you see in figure 3.7 controller is optimized to desired responses and the optimized gain is:
i = 52.5881
p = 919.2763
Figure
Figure-3.7:iteration for optimized responses .
If you see carefully Figure-3.8 you understand that we don’t have steady state error because we apply
integral term in our controller.
Figure-3.9:torque signal.
d = 1.0000e-005
i = 52.6060
p = 918.9681
Figure
Figure-3.10:iteration for optimized responses .
Again we don’t have steady state error because we apply integral term in our controller.
Figure-3.12:torque signal.
The best an certain controller in our view point is PID because it is very adaptive with condition
in comparison with other controller although there is not difference between PID and PI
controller because effect of D is not very visible .
Controller testing
Results
for each controller we determine range of input .you can see below results and diagrams
4.1.1.Proportional controller(P):
All of controller work correctly in determined region. If the PID controller parameters (the
gains of the proportional, integral and derivative terms) are chosen incorrectly, the controlled
process input can be unstable, i.e. its output diverges, with or without oscillation, and is limited
only by saturation or mechanical breakage. In this project we see that the best controller is PID
controller.
Appendix
References
[2] http://lorien.ncl.ac.uk
[3] http://www.wikipedia.org