You are on page 1of 7

3.

1: Introduction:

PID controllers are extensively used in industry due to their feasibility, easy implementation and
robustness to external disturbances. In this chapter the tuning of a PID controller is investigated,
and the GA defined in the previous chapter is used to tackle the optimization problem[1]. The
method is tested to the AVR system for which the obtained controller achieves high performances.

3.2: PID controller:


The PID controller has two inputs as it is shown below:

Set point (SP): is the operating point or the value that we want the process to be. This
value is set by the user.

Process Variable (PV): is the actual value of the output which is fed back to the PID
through a sensor.

PID controller

Set point (SP)

Controller output

Process variable(PV)

Figure 01: PID input and output.

The PID controller looks at the set point and compares it with the actual value of the Process
Variable (PV). If the SP and the PV are the same then the controller doesnt have to do anything
then it will set its output to zero. However, if there is a disparity between the SP and the PV we
have an error and corrective action is needed.
We define the error e(t) as follow: e(t)=SP-PV .
The controller output c(t) is defined in time domain by the following equation: ,c(t)=K-p.e(t)+,Ki.,0-t-e(t)dt +,K-d..,,.-. ...(1)
In frequency domain, the PID controller equation is given by the following equation:
C(s) = ,(K-p.+,,K-i.-.+,K-d.)() (2)
It is clear from the above two equations that the PID is mainly composed of three controllers:

Proportional controller.

Integral controller.

Derivative controller.

/
Figure 02: Block diagram of the PID controller.

3.2.1: Proportional controller:


In a proportional controller, steady state error tends to depend inversely upon the proportional
gain (i.e: if the gain is made larger the error goes down). The proportional response can be
adjusted by multiplying the error by a constant Kp, called the proportional gain.
The proportional term is given by: =,-..() .

If the proportional gain is very high, the system can become unstable but if Kp is very small
the control action may be slower when responding to system disturbances. Hence Kp will have
the effect of reducing the rise time and reducing but never eliminating steady state error.

3.2.2: Integral controller:


An Integral controller (IC) is proportional to both the magnitude and duration of the error .
The integral in a PID controller is the sum of the instantaneous error over time which gives
the accumulated offset that should have been corrected previously. Consequently, an integral
control Ki will have the effect of eliminating the steady-state error, but it may make the
transient response worse.
Consequently, an integral control Ki will have the effect of eliminating the steady-state
error, but it may make the transient response worse.
The integral term is given by: =,- .,--( ) . .

3.2.3: Derivative controller:


The derivative of the process error is calculated by determining the slope of the error over
time and multiplying this rate of change by the derivative gain Kd. The derivative term slows
the rate of change of the controller output. A derivative control Kd will have the effect of
increasing the stability of the system, reducing the overshoot and improving the transient
response.
The derivative term is given by: =,-., ()-. .

3.3: why we need tuning?


If it was possible to, we would like to obtain both of the following for the control system:

Fast responses.

Good stability.

Unfortunately, for practical systems these two wishes can not be achieved simultaneously. In
other words, the faster response, the worse stability and good stability results in slower response.

We use tuning in order to look for compromising between stability and system response to get
acceptable stability and medium fastness of response.

3.4: The ZieglerNichols tuning method:


This method was introduced by John G. Ziegler and Nathaniel B. Nichols in the 1940s. The
Ziegler-Nichols closed loop method is based on experiments executed on an established
control loop (a real system or a simulated system).
For acceptable stability, Ziegler and Nichols stated that after tuning the PID using their own
method,we must get the following amplitude ratio:

,,-2.-,-1..,1-4. .
The figure below illustrates this rule:

/
Figure 03: Ziegler-Nichols stability condition.

The tuning procedure can be summarized in the following steps:


1. Turn the PID controller into a P controller by setting set Ki= 0 and Kd = 0.
2. Increase Kp until you see sustained oscillations in the signal of the control system .
3. Find the ultimate gain value Ku which is the the value of the gain Kp that caused these
nearly equal amplitude oscillation.
4. Find the ultimate period Tu as shown in the figure below:

/
Figure 04: measure of the ultimate period.

5. Calculate Ki and Kd using the following table:


Control type

Kp

Ki

Kd

PID

0.6Ku

2Kp/Tu

0.125.Tu.Kp

Table01: Z-N method for gain parameters calculation


Simulation results:
The ultimate gain or the value for which the system oscillates is: Ku=1.65.
The corresponding ultimate time is: Tu=1.023 s

,-.=0.61.65 =>,-.=0.99 (1)


,-.=,20.99-1.023. => ,-.=1.9355 ...(2)
,-.=0.1251.0230.99 => ,-.=0.1266 (3)
After replacing with the values gotten from expression 1,2 and 3 into the PID gains we get the
following figure:

/
Figure 05: AVR step response using Ziegler-Nichols tuning method.

The AVR step response information are gathered in the table below:

performances

results

PO

Ts

Tr

58.3%

4.13s

0.207s

Advantages:
1. Very little knowledge of the plants is required.

2. Simple formulas are given for controller parameter settings.

Disadvantages:
1. It may be time consuming if several trials are required and the system

dynamics are slow.


2. It pushes the system into stability limits because of the high overshoot.
3. The long experimental tests may result in reduced product quality.

Effects of PID gains on the system performance:


The effect of increasing the PID gains can be well explained using the following
table:
Parameter

Kp

Ki

Kd

Rise time

Decrease

Decrease

Small change

Overshoot

Increase

Increase

Decrease

Settling time

Small change

Increase

Decrease

Steady state error

Decrease

Increase

Not affected

Stability

Degrade

Degrade

Improved

From the above table, we remark that if we increase Kd we will reduce both
overshoot and system settling time without affecting the system stability.

In order to illustrate this fact ,we consider the previous PID gains gotten using
Ziegler Nichols tuning method and we manually change Kd in the aim of getting
better step response.

You might also like