How to tune PID controllers: open / closed loop control systems--part 1



Home | Forum | DAQ Fundamentals | DAQ Hardware | DAQ Software

Input Devices
| Data Loggers + Recorders | Books | Links + Resources


AMAZON multi-meters discounts AMAZON oscilloscope discounts


Goals

• Apply the procedures for open and closed loop tuning

• Calculate the tuning constants according to Ziegler and Nichols and according to Pessen

• Demonstrate how to perform fine tuning of closed loop control systems.

Goals of tuning

There are often many and sometimes contradictory objectives, when tuning a controller in a closed loop control system. The following list contains the most important objectives for tuning a controller:

• Minimization of the integral of the error: The objective here is to keep the area enclosed by the two curves, the SP and PV trends, to a minimum. This is the aim of tuning, using the methods developed by Ziegler and Nichols.

• Minimization of the integral of the error squared: As shown, it’s possible to have a small area of error but an unacceptable deviation of PV from SP for a start time. In such cases special weight must be given to the magnitude of the deviation of PV from SP. Since the weight given is proportional to the magnitude of the deviation, the weight is multiplied by the error. This gives us error squared (error squared = error × weight). Many modern controllers with automatic and continuous tuning work on this basis.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


+=+=+=+ Integral on error -- Area of error : SP, PV; Area of error

+=+=+=+ Integral on error square

• Fast control: In most cases fast control is a principle requirement from an operational point of view; however, this is principally achieved by operating the controller with a high gain, quite often resulting in instability or prolonged settling times from the effects of process disturbances. Careful balances need to be obtained between the proportional or KC function and the settings of the integral and particularly the derivative time constants TINT and TDER respectively.

• Minimum wear and tear of controlled equipment: A valve or servo system for instance should not be moved unnecessarily frequently, fast or into extreme positions. In particular, the effects of noise, excessive process disturbances and unrealistically fast controls have to be considered here. Continual 'hunting' of the PV against the SP can result in a proportion of this, the magnitude depending on the controller gain, appearing on the controller's output. This, in many cases, can cause the driven actuator to 'vibrate' and this is quite often misconstrued as being caused by 'noise' when in fact it’s caused by the gain of the controller, and as such the entire loop, being set too high in an attempt to 'speed-up' the response to the process.

• No overshoot at start-up: The most critical time for overshoot is the time of start-up of a system. If we control an open tank, we don’t want the tank to overflow as a result of overshoot of the level. More dramatically, if we have a closed tank, we don’t want the tank to burst. Similar considerations exist everywhere, where danger of some sort exists. A situation of a tank having a maximum permissible pressure that may not be exceeded under any circumstances is an example here.

Note: Start-up is not the equivalent of a change of setpoint.

• Minimizing the effect of known disturbances: If we can measure disturbances, we may have a chance to control these before the effect of them becomes apparent. See feedforward control for an example of an approach to this problem.


AMAZON multi-meters discounts AMAZON oscilloscope discounts


Reaction curve method (Ziegler-Nichols)

The reaction curve method of tuning relies on making a step change to the output of a controller and recording the process response. This method can be considered as an open loop approach, as the controller is not used in any way except for changing the OP value (in manual mode) to give the process the required step change to the MV. The criteria we need to record are:

• The effective LAG or how long after the step change is made does a noticeable change occur in the PV

• The process reaction time or the maximum rate of change that occurs as represented by change in the PV value

• The time taken for the PV to reach 63.2% of its maximum value.

There are many variances of this tuning method, all utilizing the results from this reaction curve record. Three of the most common are discussed following the next section on how to generate a record of a systems reaction time.

The procedure to obtain an open loop reaction curve:

Recording the PV response--Connect some form of recorder to the input (PV) signal to the controller. The recorder should ideally be capable of displaying two channels of information, the PV from the system into the controller, and the SP movement of the controller. The record has to be plotted against a 0-100% PV vertical scale and a reasonably fast horizontal scale calibrated in minutes and fractions of minutes (not seconds). The vertical scale should be adjustable if using a paper strip recorder, so that the resultant change of the PV value covers a big a span as possible across the chart, this being required for measurement accuracy.

Controller mode: Place the controller in manual mode. This will ensure that we have an open loop in which the controller's action has no influence whatsoever when the PV value moves. This is because we are not interested in the controller's behavior, but only in the process's reaction characteristics.

Changing the process--When we make a step change to the output value of the controller, an appropriate reaction from the process will occur, appearing as a change in time of the PV value. This is the reaction characteristic of the process. We must have enough process knowledge to know by how much we can change the output value of the controller without danger to the process itself.

Obtaining and analyzing the reaction curve--Observe the record of the reaction of the process. The plot we require is shown, where we can observe and measure the indicated parameters that are required to enable calculation of the P, I and D components of the controller, these being some or all of the ones listed below depending on, which analysis method you select to use.

• The point in time when the SP value was changed (the amount of this change is not important, it should be as large as possible as long as the process is not adversely effected by magnitude of the change).

• The time (in minutes and fractions of minutes) that elapses before a noticeable change is seen in the PV, this being measured as L or effective lag.

• The point of inflection (POI) on the PV curve.

• The point where the PV has changed by 63.2% (which is not necessarily the POI) to enable calculation of the LTC (loop time constant).

+=+=+=+ Ziegler-Nichols reaction curve -- Controller output; Loop deadtime or L = Effective lag; N = max. slope of PV

We cannot calculate the tuning constants before we have analyzed the curve using a few common sense considerations. The effective lag time (L) will be the principle effect and component of the integral time (TINT) value. The slope, or rate of change of the process (N), will be the major factor influencing the controller gain setting, KC, as it represents the gain or sensitivity of the process itself.

This leaves the derivative time constant to be determined (TDER) and as this is introduced to correct the destabilizing effect of the integral action, a relationship between TDER and TINT must exist.

Ziegler and Nichols have derived formulas for optimum tuning, that takes into account, and relates the P, I and D values to each other. The optimum tuning obtained with these formulae is aimed at minimizing the integral of the error term (minimum area of error). It does not take into account the magnitude of the error. Optimum tuning constants are invariably based on processes with a small deadtime and a first order lag.

As mentioned at the beginning of this section, there are three variations to this tuning method, describe each of these in detail.

Ziegler-Nichols open loop tuning method

From +=+=+=+ 4, we have to derive a value for the effective lag (L), the time taken in decimal minutes until a noticeable rate of change is observed, and a value of N (the slope of the PV at the point of maximum rate of change). From these two values we can calculate the tuning constants for P, PI and PID controllers according to the following Ziegler-Nichols formulae.

+=+=+=+ Ziegler-Nichols open loop tuning method (1) using rate of change (N) and effective lag (L) values. OP output of controller PV - Reaction curve N - Slope of PV L - Effective lag

Ziegler-Nichols P control algorithm:

Note that we obtain different tuning constants with the different combinations of control modes, and that a relationship exists between them that is echoed through the different modes are shown here.

C; OP% P control = % min

Ziegler-Nichols PI control algorithm:

If we need to have integral action, the gain of the controller is reduced by 10% and the integral time constant, introduced to help eliminate the 'offset' value between the SP and PV in the ERR term, is set at three times the lag period (L in min). As the Integral output is summed with the proportional output contained within the controller gain, KC can be reduced slightly, making the loop more stable. The loss in output resulting from this is gradually made up, in the integral time TINT, by the integral action.

OP% PI control = 0.9 % min = 3 (min)

Ziegler-Nichols PID control algorithm:

Next, if we need to introduce some help in stabilizing the loop, we should introduce the derivative control. In doing this we see that the controller gain is increased by 20%. The integral time is made 33% faster (or shorter) and the derivative time constant is four times faster, or shorter, than the integral time. Put another way, the relationship between TINT and TDER is 4:1.

Examples of Ziegler-Nichols P, I and D open loop control algorithms:

If we substitute the following values:

• OP% = DOP = 12.5%

• N = 35% per minute

• L = 0.65 min.

The settings for P, I and D can be summarized as follows: [..]

Ziegler-Nichols open loop method using POI

This version or method of deriving the gain, integral and derivative times uses the same response curve but which is made in a slightly different manner to the previous example.

It’s used where the process is controlled by a valve. To obtain the process curve, the following procedure is used:

• Bring the process to a desired setpoint on MANUAL control.

• Change the valve position a small amount, V ? (%). The change should be large enough to produce a measurable response in the process, but not large enough to drive the process beyond normal operating range. A 5% valve change is a good starting point.

• Measure C ? (%) and L on the process response curve.

The POI (point of inflection) is determined on the PV curve (point of maximum rate of change) and a tangential line is drawn through this, down through the horizontal axis and on until it crosses the vertical axis (the time when the SP value was changed).

===

Tangent line (draw thru POI) PGU = 2 (?V )

?C TU =4L Valve output %

Change valve here; Calculate:

Process %

?C (%)

?V (%) Process curve (recorder plot) Point of inflection (POI, max. rate of change) L (in minutes)

+=+=+=+ Zeigler-Nichols open loop tuning method (2) using POI on the PV curve From this can be calculated the following constants PGU and TU :

===

Controller: Proportional Only; Proportional Integral; Proportional Derivative; Proportional Integral Derivative; Gain KC 0.5PGU 0.45PGU 0.71PGU 0.6PGU Integral time TINT 0.83TU 0.5TU Derivative time TDER 0.51TU 0.125TU

Table 1 PID controller tuning parameter settings for open loop using Zeigler Nichols method

===

Note: The settings for a PD controller don’t originate from the original Ziegler- Nichols paper.

It should be noted that a similar relationship of gain and integral/derivative times exists between this method and the previous one.

That is:

• The gain KC in P mode = 0.5, in PI mode = 0.45 and PID = 0.6 or the gain ratios relate as 1 to 0.9 to 1.2

• In PID mode the ratio of TINT to TDER is again 4:1 (0.5 : 0.125). Using this method, the slope or rate of change is quite often much easier to evaluate from a recorded chart.


NEXT: How to tune PID controllers: open / closed loop control systems--part 2
PREV: Real and ideal PID controllers

All related articles   Top of Page   Home



Updated: Wednesday, March 27, 2013 20:43 PST