15.07.2013 Views

Modelling and Control of Dynamic Systems PID Controllers

Modelling and Control of Dynamic Systems PID Controllers

Modelling and Control of Dynamic Systems PID Controllers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Modelling</strong> <strong>and</strong> <strong>Control</strong> <strong>of</strong> <strong>Dynamic</strong><br />

<strong>Systems</strong><br />

<strong>PID</strong> <strong>Control</strong>lers<br />

Sven Laur<br />

University <strong>of</strong> Tartu


[k]<br />

Basic structure <strong>of</strong> a <strong>PID</strong> controller<br />

+<br />

e[k]<br />

P<br />

I<br />

D<br />

+<br />

u[k]<br />

-1<br />

System<br />

ˆg[z]<br />

y[k]<br />

<strong>PID</strong> controllers are unity feedback controllers with three components:<br />

⊲ a proportional term P with an output up[k] = Kp · e[k];<br />

⊲ an integral term I with an output ui[k] = Ki · k<br />

ek;<br />

⊲ a derivative term D with an output ud[k] = Kd · (e[k] − e[k − 1]).<br />

i=1<br />

1


<strong>PID</strong> controller is a linear controller<br />

Note that all parts <strong>of</strong> the <strong>PID</strong> controllers are linear systems<br />

⊲ The transfer function <strong>of</strong> the proportional part is g1[z] = Kp.<br />

⊲ The transfer function <strong>of</strong> the integral part is g2[z] = K i<br />

z−1<br />

⊲ The transfer function <strong>of</strong> the differential part is g3[z] = K d(1−z)<br />

z<br />

As a result, we can represent <strong>PID</strong> controller in an RST form<br />

r[k]<br />

T(z)<br />

+<br />

1<br />

R(z)<br />

u[k] System<br />

ˆg[z]<br />

-1 S(z)<br />

y[k]<br />

2


Gentle Introduction


The basic assumption<br />

In the following, we assume that the dependency between the control signal<br />

<strong>and</strong> the output signal is monotone throughout the entire operating regime.<br />

⊲ Let Xop ⊆ R n be the set <strong>of</strong> plausible states for the system.<br />

⊲ Let Uop ⊆ R be the set <strong>of</strong> plausible inputs for the system.<br />

⊲ Let yi[k + 1] denote the output corresponding to x[k] <strong>and</strong> ui[k]<br />

A system has a monotone response if for any x[k] ∈ Xop, u1, u2 ∈ Uop<br />

u1[k] ≤ u2[k] =⇒ y1[k + 1] ≤ y2[k + 1] .<br />

If the output is differentiable then the condition can be rewritten as<br />

∂y(k + 1, x, u)<br />

∂u<br />

≥ 0 for x ∈ Xop, u ∈ Uop .<br />

3


Proportional controllers<br />

If the system has monotone response then the error signal e[k] = r[k] −y[k]<br />

indicates in which direction the input signal should be changed.<br />

⊲ If e[k] > 0 then we should increase the control signal.<br />

⊲ If e[k] < 0 then we should decrease the control signal.<br />

Example<br />

ˆg[z] = 1<br />

z−1.1<br />

The original zero-input response<br />

Kp is too small to stabilize<br />

Kp creates a constant bias<br />

Kp is too big<br />

4


Drawbacks <strong>of</strong> proportional controllers<br />

Proportional controller has too few degrees <strong>of</strong> freedom in the design.<br />

⊲ Too large gain Kp creates oscillations<br />

⊲ Too small gain Kp slows down the response <strong>and</strong> introduces bias.<br />

0.0 0.5 1.0 1.5 2.0<br />

Kp = 1<br />

Kp = 1.8<br />

0 50 100 150<br />

We need an additional term that would eliminate constant bias.<br />

5


Integral correction term<br />

For obvious reasons, the output <strong>of</strong> an integral term I = e[1] + · · · + e[k] is<br />

initially small <strong>and</strong> then continuously increases if the bias is not eliminated.<br />

Secondly, note that the integral term I cannot go to zero unless the error<br />

signal changes a sign—overshoot becomes unavoidable.<br />

0.0 0.5 1.0 1.5 2.0<br />

0 50 100 150<br />

Kp = 1 Ki = 0.3<br />

Kp = 1.8 Ki = 0.3<br />

As a result, the time needed to stabilise the output increases.<br />

6


2.0 1.0 0.0 0.5<br />

1.5 1.0 0.5 0.0 0.5<br />

Anatomy <strong>of</strong> a PI response<br />

Proportional <strong>and</strong> integral components<br />

0 20 40 60 80<br />

<strong>Control</strong> signal<br />

Kp = 1.0<br />

Ki = 0.3<br />

0 20 40 60 80<br />

7


Differential correction term<br />

An integral correction term creates the necessary change in the control<br />

signal to removes the bias but it cannot detect changes in the error term.<br />

0.0 0.2 0.4 0.6 0.8 1.0<br />

P = 0.6<br />

I = 14.9<br />

0 5 10 15 20<br />

<br />

0.0 0.2 0.4 0.6 0.8 1.0<br />

P = 0.6<br />

I = 14.9<br />

0 5 10 15 20<br />

As a result, an introduction to differential term can significantly improve<br />

the behaviour <strong>of</strong> the controller <strong>and</strong> reduce the stabilisation time.<br />

<br />

8


The effect <strong>of</strong> differential correction<br />

Sudden changes activate the differential correction term. If a PI controller<br />

already overshoots then setting Kd > 0 only increases the overshoot.<br />

0.0 0.5 1.0 1.5 2.0<br />

0.0 0.5 1.0 1.5 2.0<br />

Kp = 1.0, Ki = 0.3, Kd = 0.4<br />

0 50 100 150<br />

Kp = 0.3, Ki = 0.3, Kd = 0.4<br />

0 50 100 150<br />

Kp = 1.8, Ki = 0.3, Kd = 0.05<br />

0.0 0.5 1.0 1.5 2.0<br />

0.0 0.5 1.0 1.5 2.0<br />

0 50 100 150<br />

Kp = 0.9, Ki = 0.3, Kd = 0.2<br />

0 50 100 150<br />

A positive differential correction works if a slow rising speed winds up the<br />

integral part <strong>and</strong> thus it must be discharged through oscillations.<br />

9


Anatomy <strong>of</strong> an optimal <strong>PID</strong> response<br />

0.0 0.5 1.0 1.5<br />

The differential term<br />

must dominate<br />

Uncharging <strong>of</strong><br />

the integral term<br />

0 20 40 60 80 100 120<br />

The relation between coefficients Kp <strong>and</strong> Ki determines the controllers<br />

behaviour when the output is near the reference signal.<br />

⊲ They must be chosen so that the integral part is quickly discharged.<br />

The size <strong>of</strong> coefficients Kp <strong>and</strong> Kd determine the initial rise speed.<br />

⊲ They must be chosen so that the integral term does not grow too big.<br />

10


Methods for Parameter Tuning


Ziegler-Nichols closed-loop method<br />

1. Set gains Ki = 0 <strong>and</strong> Kd = 0.<br />

2. Gradually increase Kp until the system starts to continuously oscillate.<br />

3. Let K ∗ p be the corresponding gain <strong>and</strong> T ∗ the corresponding period.<br />

4. Start fine-tuning with the initial parameters from the following table<br />

<strong>Control</strong>ler Type Kp Ki Kd<br />

P controller<br />

PI controller<br />

<strong>PID</strong> controller<br />

K ∗ p<br />

2 – –<br />

K ∗ p<br />

2.2<br />

K ∗ p<br />

1.7<br />

T ∗<br />

1.2<br />

T ∗<br />

2<br />

–<br />

T ∗<br />

8<br />

11


Other tuning methods<br />

There are many other tuning methods for <strong>PID</strong> parameters.<br />

⊲ Cohen-Coon method for processes with high inertia<br />

⊲ Chien-Hrones-Reswick open-loop method.<br />

⊲ Ziegler-Nichols open-loop method.<br />

A <strong>PID</strong> controller can be used as a starting point in further research.<br />

1. Stabilise the system with an initial <strong>PID</strong> controller.<br />

2. Find a linear model that provides the fit to the experimental data.<br />

3. Compute the corresponding transfer function.<br />

4. Design the corresponding linear controller.<br />

5. If one is not satisfied then she can build a non-linear model <strong>and</strong> controller.<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!