adaptive pid controller full report
Active In SP
Joined: Mar 2010
16-03-2010, 06:33 AM
adaptive pid controller1.doc (Size: 898 KB / Downloads: 246)
In spite of developed modern control techniques like fuzzy logic controllers or neural networks controllers, PID controllers constitute an important part at industrial control systems so any improvement in PID design and implementation methodology has a serious potential to be used at industrial engineering applications. At industrial applications the PID controllers are preferred widespread due to its robust characteristics against changes at the system model. From the other side at industry the exact plant models can not be obtained due to too much nonlinear parts and uncertainties so at practice engineers usually find an appropriate model for the dynamic system. For example, when a thermal system is taken into consideration, the systemâ„¢s overall gain changes from season to season. Changes in dynamic system parameters and unknown system variables directly affect the performance of the system. So for obtaining a better performance the controller parameters have to be renewed in some time interval.
A lot of methods have been developed over the last forty years for setting the parameters of a PID controller. Some of these methods are based on characterizing the dynamic response of the dynamic system to be controlled with a first-order model or second-order model with a time delay . All general methods for control design can be applied to PID control. A number of special methods that are tailor made for PID control have also been developed, these methods are often called tuning methods. The most well known tuning methods are those that are stated by Ziegler and Nichols. These methods do not need any mathematical calculation to find PID parameters. The Ziegler-Nichols Oscillation Method, Ziegler-Nichol Process Reaction Method and Frequency Response method, and Cohen-Coon Reaction Curve Method are basic Self-Tuning methods. Oscillation method is based on system gain, in other words, system gain is redounded until the system makes oscillation, then PID parameters can be found from system response graphic. Practically, this method is useless for too many sort of real systems, because oscillation at the output of the system can easily damage the system. Frequency response uses frequency domain rules to find PID parameters. Cohen-Coon method uses system step response for an open loop system to find PID parameters. Also Ziegler and Nichols proposed PID parameters for a group of system due to its system parameter values . In this seminar and presentation paper, Ziegler-Nichols process reaction method (PRM) is used to determine PID controller parameters; Kc, Ti and Td.
The Ziegler-Nichols process reaction method works well in a large variety of industrial systems. However, this method rarely can find insufficient PID parameters, and system response makes high overshoots or oscillations before entering in steady state. Because of this, an adaptive controller algorithm is also given to work with Ziegler-Nichols methodâ„¢s parameters more effectively.
Industrial systems are controlled by microcontroller based systems in recent years and widely used microcontroller based systems are programmable logic controllers (PLCs). These controllers are more capable than the other micro controller based ones at the design phase of automation systems so the time consumption over the project and implimentation decreases. Also the elasticity at hardware level and software level let the modifications be done very easily. At the other side nowadays most of PLCs support the popular communication protocols like Profibus, Modbus, Industrial Ethernet, etc. Within this, the integration to SCADA systems gets easy. In this seminar and presentation paper, an adaptive PID controller is given using Ziegler Nicholas based self-tuning methodâ„¢s parameters as initial parameters for programmable logic controllers.
3. Adaptive Control:
In everyday language, to adapt means to change a behavior to conform to new circumstances. Intuitively, an adaptive controller is thus a controller that can modify its behavior in response to changes in the dynamics of the process and the character of the disturbances.
Adaptive control involves modifying the control law used by a controller to cope with the fact that the parameters of the system being controlled are slowly time-varying or uncertain. For example, as an aircraft flies, its mass will slowly decrease as a result of fuel consumption; we need a control law that adapts itself to such changing conditions. Adaptive control is different from robust control in the sense that it does not need a priori information about the bounds on these uncertain or time-varying parameters; robust control guarantees that if the changes are within given bounds the control law need not be changed, while adaptive control is precisely concerned with control law changes.
When designing adaptive control systems, special consideration is necessary of convergence and robustness issues.
Typical applications of adaptive control are (in general):
Â¢ Self-tuning of subsequently fixed linear controllers during the implementation phase for one operating point;
Â¢ Self-tuning of subsequently fixed robust controllers during the implementation phase for whole range of operating points;
Â¢ Self-tuning of fixed controllers on request if the process behavior changes due to ageing, drift, wear etc;
Â¢ Adaptive control of linear controllers for nonlinear or time-varying processes;
Â¢ Adaptive control or self-tuning control of nonlinear controllers for nonlinear processes;
Â¢ Adaptive control or self-tuning control of multivariable controllers for multivariable processes (MIMO systems);
Usually these methods adapt the controllers to both the process statics and dynamics. In special cases the adaptation can be limited to the static behavior alone, leading to adaptive control based on characteristic curves for the steady-states or to extreme value control, optimizing the steady state. Hence, there are several ways to apply adaptive control algorithms.
The Ziegler Nichols process reaction method gave three constant parameters of PID controller; Kc, Ti and Td. However, some system responses can be unpredictable, and these PID parameters can not work efficiently. Also, adaptive control can help deliver both stability and good response. The approach changes the control algorithm coefficients in real time to compensate for variations in the system itself. In general, the controller periodically monitors the system transfer function and then modifies the control algorithm. It does so by simultaneously learning about the process while controlling its behavior.
4. PID Controller:
A Proportional-Integral-Derivative controller or PID controller is a common used controller in industrial control applications. The controller compares the measured process output value (y) with the reference set point ® value. The difference or error signal (e) is then processed to calculate the control signal for the manipulated process inputs so the system output reaches the desired reference value. Unlike simpler control algorithms, the PID controller can adjust process inputs based on the history and rate of change of the error signal, which gives more accurate and stable control. The PID controller calculation (algorithm) involves three separate parameters; the Proportional, the Integral and Derivative values. 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.
By "tuning" the three constants in the PID controller algorithm, the controller can provide control action designed for specific 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. Note that the use of the PID algorithm for control does not guarantee optimal control of the system or system stability. In this report, a different structure of a PID controller is used.
4.1The Structure of the PID Controller:
Figure 1 Structure of PID Controller
As known, the derivative can be computed or obtained if the error varying slowly. Since the response of the derivative to high-frequency inputs is much higher than its response to slowly varying signals. So the derivative output in Figure 1 is smoothened for high-frequency noises by using first order filter, and it uses output of the system (y). The derivative which uses error signal can form high derivative output when the error signal has high frequency components. Thus, in this report the derivative input uses the filtered output of the system. Here the filter smoothens the signal and suppresses the high-frequency noise due to filter time (Tf) constant (Figure 2). In application, the Tf should be bigger than Ts sampling period (6).
Figure 1: Smoothen of System Output Response (PLC Simulation)
In figure 1, the integral signal is formed by the error multiplied by gain (K) and divided by integral time, and saturation difference divided by integral time. PID controller is a robust controller and this structure puts forward a more robust controller. The saturation component is necessary for discrete time controllers (8). As said before, this structure is used in a programmable logic controller, and this controller has maximum and minimum borders. The saturation component supplies not to reach any other point except the limit of maximum and minimum borders. Thus, the control signal (u) is limited.
4.2 PID controller theory:
This section describes the parallel or non-interacting form of the PID controller. For other forms please see the Section "Alternative notation and PID forms".The PID control scheme is named after its three correcting terms, whose sum constitutes the manipulated variable (MV). Hence:
MV (t) =POUT+IOUT+DOUT
Where POUT, IOUT, and DOUT are the contributions to the output from the PID controller from each of the three terms, as defined below.
4.3 Mathematics of PID Controller:
A commercial PID controller discrete time equation can be given like in (1). Although this type of PID structure is using in many industrial applications, it is sensitive to disturbances and system uncertainties.
More robust PID parameters can be given separate to use in figure 1 like in (2). This z-domain equation is obtained form s-domain equation with Tustin transform and trapezoid integral approach for integral term (7).
Discrete time equations of PID can be given to use in Figure 1 like in (3). In these equations, Ts is sampling period, and it can be chosen form 30 times of band width frequency, that is;
These equations are directly adapted to Figure 1 and it can be used in a microcontroller or PLC .
5 .Tuning methods:
5.1 Loop tuning
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. Tuning a control loop is the adjustment of its control parameters (gain/proportional band, integral gain/reset, derivative gain/rate) to the optimum values for the desired control response.
The optimum behavior on a process change or set point change varies depending on the application. Some processes must not allow an overshoot of the process variable beyond the set point if, for example, this would be unsafe. Other processes must minimize the energy expended in reaching a new set point. Generally, stability of response (the reverse of instability) is required and the process must not oscillate for any combination of process conditions and set points. Some processes have a degree of non-linearity and so parameters that work well at full-load conditions don't work when the process is starting up from no-load. This section describes some traditional manual methods for loop tuning.
There are several methods for tuning a PID loop. The most effective methods generally involve the development of some form of process model, then choosing P, I, and D based on the dynamic model parameters. Manual tuning methods can be relatively inefficient.
The choice of method will depend largely on whether or not the loop can be taken "offline" for tuning, and the response time of the system. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring the output as a function of time, and using this response to determine the control parameters.
Choosing a Tuning Method
Method Advantages Disadvantages
Manual Tuning No math required. Online method. Requires experienced personnel.
Zieglerâ€œNichols Proven Method. Online method. Process upset, some trial-and-error, very aggressive tuning.
Software Tools Consistent tuning. Online or offline method. May include valve and sensor analysis. Allow simulation before downloading. Some cost and training involved.
Cohen-Coon Good process models. Some math. Offline method. Only good for first-order processes.
5.2 Manual tuning:
If the system must remain online, one tuning method is to first set the I and D values to zero. Increase the P until the output of the loop oscillates, then the P should be left set to be approximately half of that value for a "quarter amplitude decay" type response. Then increase I until any offset is correct in sufficient time for the process. However, too much I will cause instability. Finally, increase D, if required, until the loop is acceptably quick to reach its reference after a load disturbance. However, too much D will cause excessive response and overshoot. A fast PID loop tuning usually overshoots slightly to reach the set point more quickly; however, some systems cannot accept overshoot, in which case an "over-damped" closed-loop system is required, which will require a P setting significantly less than half that of the P setting causing oscillation.
Effects of increasing parameters
Parameter Rise Time Overshoot Settling Time S.S. Error
Kp Decrease Increase Small Change Decrease
Ki Decrease Increase Increase Eliminate
Kd Small Decrease Decrease Decrease None
Another tuning method is formally known as the Zieglerâ€œNichols method, introduced by John G. Ziegler and Nathaniel B. Nichols. As in the method above, the I and D gains are first set to zero. The "P" gain is increased until it reaches the "critical gain" Kc at which the output of the loop starts to oscillate. Kc and the oscillation period Pc are used to set the gains as shown:
Control Type Kp Ki Kd
P 0.5Â¢Kc - -
PI 0.45Â¢Kc 1.2Kp / Pc -
PID 0.6Â¢Kc 2Kp / Pc KpPc / 8
7. Ziegler-Nichols Process Reaction Method:
Process reaction method is an experimental open-loop tuning method and is only applicable to open-loop stable systems. This method presented by Ziegler and Nichols is based on process information in the form of the open loop step response obtained from a bump test. This method can be viewed as a traditional method based on modeling and control. The Ziegler-Nichols tuning rules were developed to give closed loop systems with good attenuation of load disturbances. The design criterion was quarter amplitude decay ratio, which means that the amplitude of an oscillation should be reduced by a factor of four over a whole period. This corresponds to closed loop poles with a relative damping of about = 02, which is too small (1).
Figure 2: Ziegler-Nichols PRM
7.1 Calculations of PID Parameters Using Ziegler-Nichols Process .Reaction Method:
This method firstly characterizes the plant by two parameters Nmax and L for first and second order dead time systems and then calculates PID parameters in equation (4). In this report, Nmax and L are calculated by a PLC algorithm as seen in Figure 5. Here N max is the point of maximum slope and L is the dead time (Figure 3).
First a step signal is applied to the system and program starts to search the dead time. The dead time is the time when system gives no response to reference signal. In program, a tolerance is given for measuring the dead time (Figure 4), because there are always some high frequencies measuring noises at system output. As shown in Figure 4, these signals and distributions change in an interval defined tolerance. After the dynamic system starts to follow reference and reaches outside the tolerance border, dead time is calculated by PLC program.
Figure 3: Tolerance Limit
If the dead time is finished or calculated, the program starts to search maximum slope. It collects all slopes and after collecting them, it selects the biggest slope. Every slope is calculated with equation.
It memorizes the output value of previous period and takes the output value of the recent period and divides their difference by sampling period (3), (5). Then the program constitutes data of all slopes and selects the biggest slope. When the maximum slope is calculated, the program waits steady state because the parameters of system are stable in steady state. Finally, the program calculates PID parameters.
To sum up, to calculate PID parameters using Ziegler-Nichols PRM; first gather data from open-loop plant response to unit step input, then examine data set to find the maximum slope (Figure 3), after then determine the parameters needed for Ziegler Nichols PRM, finally, use tuning relations to generate PID constants. The diagram of this process is given in Figure 5.
Figure 4: Calculation of PID Parameters
8. Robustness of Ziegler-Nichols Method:
A good PID controller design should exhibit robustness with respect to small perturbations in the controller coefficients. Thus, the range of values that ensures robustness was determined for Ziegler-Nichols PRM in (6), where is systemâ„¢s time constant (without controller) for first order dead time systems (FODS), and is settling time (without controller) for second order dead time systems (SODS) (3).
Figure 5: Simulation Results of FODSs to the Step Response
As seen in equations in (7) and figure 6, system is a more robust system than do and systems due to ratio. When ratio increases from , system settling time is decreasing and when ratio decreases from system makes overshoot like a second order system, and when ratio is approximately zero, systems make oscillation .
In equations in (8) and Figure 7, system is a more robust system than do and systems due to ratio. As resembling to figure 6, system has a good performance due to ratio is approximately .
Figure 6: Simulation Results of SODSs to the Step Response
From figures 6 and 7, Ziegler-Nichols process reaction method (PRM) always provides a responsible proportional gain for PID controller. This method not only gives good performance but also is robust with respect to controller parameter perturbations.
9. Self-Tuning using Ziegler Nichols Process Reaction Method:
PID parameters must be determined from dynamic system. As said before, system parameters change because of various reasons. If PID controller parameters remain the same for a long time, the dynamic system could not be controlled by PID efficiently. Root locus method, bode-frequency analysis method and some methods like this can be used for this calculation. But these methods have complex mathematical calculations, and also system feedback and systemâ„¢s distributions can not be measured momentary without any error. In addition, system parameters (like system gain) change due to environmental change. For these reasons, a self-tuning PID controller is a necessity because this type of a controller can be used in different type of systems and environmental situations. Moreover, a self-tuning PID is a robust controller for systemsâ„¢ uncertain parts. Also for changing at system dynamics the controller adopts itself. Thus, using a self-tuning PID is reasonable rather than using any other PID controller which has constant parameters (6).
Program algorithm for PLCs is given in Figure 8. The algorithm consists of two start options: one is working with recent parameters which are calculated before; other option is working with new parameters. In this option, program finds new PID parameters for system. Because of Ziegler-Nichols method is applicable for open-loop systems, program first cancels system feedback and waits the system response to settle. When the system output is reset, program records systemâ„¢s momentary input and Then program applies a step signal to system input. It should be said that this step signal is at least 10% bigger than the systems current input (reference) value. If the step signal smaller than 10%, system parameters can not be determined reasonable. After applying the step signal, program waits until the system output to settle at the output value. When the system output is stable, program calculates PID parameters using Ziegler-Nichols process reaction method and sends them to PID parameter input. When PID parameters are loaded, program attaches system feedback and PID controller. Thus, system starts to work with PID controller.
To clarify, necessary steps are given in a sequence below:
- Run the system in open-loop mode
- Wait until the system output becomes stable
- Record system input and output
- Apply a step input to system (larger than %10 of recent input)
- Wait until the system output becomes stable
- Calculate PID parameters and work with PID controller.
Figure 7: Self-Tuning Program
10. Adaptive Algorithm for Proportional (Kc) and Integral (Ti) Â¦Â¦..parameters of the PID:
The gain (proportional) and integral terms of PID is directly effect system response. In other words, the integral term is closely related with systemâ„¢s error which is the difference between system reference and system output; and the gain term is directly effect systemâ„¢s time constant and overshoot. Of course derivative term is important, but in this paper Ziegler-Nicholsâ„¢ derivative term is directly used in PID controller. Because it is adequate for most industrial systems. On the other hand, gain and integral terms used in PID is adaptive. Because of this, the PID controller becomes, PI-Adaptive Self Tune Based and D-Self Tune Based Controller; PI-D. The algorithm for PI terms is given in figure 9, and the equation is given in equation (9).
Figure 9 Adaptive Algorithm
In figure 9, initial Kc (gain) and initial Ti (integral time) is the coefficients which found in Ziegler-Nichols process reaction method. a coefficient is related with integralâ„¢s upper border and b coefficient is related with gainâ„¢s lower border. It is clear to say that a is bigger than 1 and b is between 1 and 0. System response symbolizes system output (voltage, degrees, speed, moment etc.). For example, when the system response is speed for a motor, lower adaption response is lower adaption speed in rpm and upper adaption response is upper adaption speed in rpm. The algorithm works between upper and lower adaption borders.
In the lower adaption border, the algorithm starts to work with increasing integral and decreasing gain. The reason to increase integral is to make error smaller and smaller before reaching the steady state, and the reason to decrease gain is not to make overshoot or not to make higher overshoot in the response of the system.
11. Adjusting Adaptive Algorithm to the Self-Tuning Program:
Self â€œ Tune parameters, Adaptive algorithm and PID controller are related with each other like in figure 10. As said before, derivative parameter directly goes to PID controller, gain and integral terms firstly go adaptive algorithm and then PID controller.
Figure 10 Complete Controller Algorithm
12. Simulation of Adaptive Self-Tuning PI-D Controller in a Â¦..Programmable Logic Controller:
Siemens S7-400 CPU 412-2 DP PLC is used for testing this algorithm, within the program Semitic Manager Professional a simulation toolbox is given. This simulation toolbox is good for testing algorithm. Also a data collection program is written for S7-400 CPU 412-2 DP which collects dataâ„¢s and transfers them to Microsoft Excel. In addition, the Figures 2, 6 and 7 are obtained from this data collection program. The simulation is realized in to different kinds of second order systems. First system has 0.23 ratio and second system has 1.03 ratio. These ratios are not near to , and as said before these type of systems have problems (section 3).
12.1 Simulation 1: Second Order System with 0.4 sec Dead Time, 32% OS, and 8.2 sec Settling Time:
First simulation result is given in figure 11. First response (1) in figure represents the response with only self-tuning PID and second response (2) represents response with adaptive self-tuning PI-D response. Second order systems original settling time is 7.4 second and overshoot is 32%, first curveâ„¢s settling time is 6.2 second and 9.2% overshoot, and second adaptive curveâ„¢s settling time is 6.0 seconds and this controlled system has no overshoot. The best response is the Adaptive PI-D controlled response. As said before, ratio of this system is 0.23 and it is not as robust as other systems which has 0.5 ratio. However PI-D controller increases systems robustness and makes system insensitive to changes.
Figure 11 Simulation Result 1
12.2 Simulation 2: Second Order System with 0.7 sec Dead Time, 85% OS, and 2.4 sec Settling Time:
Second simulation is applied to a second order system which has a very high overshoot and approximately fast settling time. But the important point is system has 1.03 ratio. This system is near the non-robustness border which is 1.07 . Because of this self-tuning is not very efficient to this system, and self-tuning methodâ„¢s response is given in figure 12, in curve (1). This response does not have a good response, but the 85% overshoot is decreased to 6.5% overshoot. Settling time for this answer is 7.1 seconds.Second curve in figure 12 represents the response with Adaptive PI-D controller. This response has no overshoot, 2.9 seconds of settling time, and is robust more than curve 1.
Figure 12 Simulation Result 2
The goal using adaptive PID controller to this system is to make the controller robust to a point where the performance of the complete system is as insensitive as possible to modeling errors and changes in the environment. Simulation results shows that adaptive PID controller obtains this specialties.
In this report Adaptive PID controller - using Ziegler Nichols based Self Tuning methodâ„¢s parameters- is presented and its application on a programmable logic controller is given. For this purpose first of all at the implementation part industrial PID algorithm is used where PIDâ„¢s derivative input is taken from system output and filtered, so high-frequency signalsâ„¢ effect is minimized. Then, integral term is confirmed to obtain a more robust PID structure and finally the output of PID is limited due to PLCâ„¢s maximum and minimum range. Secondly, Ziegler-Nichols method is given and together within robustness definition is defined. It can be seen that most industrial systems are in the group of this robustness limit. Adjusting adaptive algorithm to Self-Tuning PID Controller in section 4, the robustness limit is increased. For implementing the developed algorithm a Siemens S7-400 CPU 412-2 DP PLC is selected as a controller due to its good performance and its developed structure. Afterwards the developed PLC algorithm is simulated on two second order systems. The results showed that Adaptive PI-D controller has a good performance on a large scale of ratio of industrial systems. As a result in this work, PID application and system simulation blocks are obtained for a general use in other industrial systems.
Use Search at http://topicideas.net/search.php wisely To Get Information About Project Topic and Seminar ideas with report/source code along pdf and ppt presenaion
Active In SP
Joined: Sep 2010
28-12-2010, 12:34 PM
SUBMITTED BYIPTIRANJAN SATAPATHY
pid controller.ppt (Size: 1.74 MB / Downloads: 122)
INTRODUCTION TO P CONTROLLER
The proportional controller output uses a ‘proportion’ of the system error to control the system. However, this introduces an off set error into the system.
Pterm= Kp* ERROR
INTRODUCTION TO I CONTROLLER
The integral controller output is proportional to the amount of time there is an error present in the system. The integral action removes the offset introduced by the proportional control but introduces a phase lag into the system.
INTRODUCTION TO D CONTROLLER
With derivative action, the controller output is proportional to the rate of change of the measurement or error. The controller output is calculated by the rate of change of the measurement with time.
Where m is the measurement at time t.
CHARACTERISTIC OF PID CONTROLLER
A proportional controller (Kp) will have the effect of reducing the rise time.
An integral control (Ki) will have the effect of eliminating the steady-state error.
A derivative control (Kd) will have the effect of increasing the stability of the system, reducing the overshoot, and improving the transient response.
USEFULNES OF PID CONTROLLER
Most useful when a mathematical model of the plant is not available.
Many different PID tuning rules available.
It reduces both the transient error & steady state error.
It reduces the overshoot time & settling time.
Hence the control signal produced by the PID controller minimize the deviation of the input and the desired out put to zero.
It produces noiseless signal.
TIPS FOR DESIGNING A PID CONTROLLER
Obtain an open loop response and determine what needs to be improved.
Add a proportional control to improve the rise time.
Add a derivative control to improve the over shoot.
Add a integral control to eliminate the steady state error.
Adjust each of Kp,Ki,Kd until you obtain a desired overall response.
-PID control---most widely used control strategy today .
-Over 90% of control loops employ PID control, often the derivative gain set to zero (PI control).
-The three terms are intuitive---a non-specialist can grasp the essentials of the PID controller’s action. It does not require the operator to be familiar with advanced math to use PID controllers.
-Engineers prefer PID controls over untested solutions.