Docsity

PID Control Laboratory: Understanding Feedback Systems with Water Tank Process, Exams of Information Technology Management

Toggle sidebar
bg1
LAB-1: PID control
1 Introduction
The main objective of this laboratory is to get a basic understanding for how feedback
control can be used to modify the behavior of a dynamic system. In particular, we will
consider PID-control of a simple process consisting of two water tanks. The letters PID
here stand for Proportional,Integral and Derivative control, respectively. PID controllers
are by far the most common type of controllers used in industrial systems, mainly because
they are relatively simple and still often able to provide good performance. The laboratory
experiments will hopefully confirm this.
In addition to establish an understanding for the fundamental principles of feedback con-
trol, the laboratory will provide some experience of manually tuning PID-controllers.
The process to be controlled consists of two water tanks and a pump. See the picture below.
Water is pumped from a reservoir to the upper tank, from which it flows through a restric-
tion to the lower tank. From the lower tank the water flows through a second restriction
back to the reservoir. The upper tank also has a tap from which, when opened, water is
allowed to flow directly to the reservoir. The water levels in both tanks are measured using
pressure sensors. The process and equipment are manufactured by Quanser Consulting in
Canada.
The control system is implemented in Matlab on a PC, using the toolboxes Realtime
Workshop and Realtime Target. The user interface is for the most part self-instructive, but
a brief manual is included in Appendix.
The material is partly based on material from the Department of Automatic Control, Lund
Institute of Technology, Sweden. This version of the manual was translated and revised by
Jonas Wijk in 2001.
Coupled tanks with pump.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download PID Control Laboratory: Understanding Feedback Systems with Water Tank Process and more Exams Information Technology Management in PDF only on Docsity!

LAB-1: PID control

1 Introduction

The main objective of this laboratory is to get a basic understanding for how feedback control can be used to modify the behavior of a dynamic system. In particular, we will consider PID-control of a simple process consisting of two water tanks. The letters PID here stand for Proportional, Integral and Derivative control, respectively. PID controllers are by far the most common type of controllers used in industrial systems, mainly because they are relatively simple and still often able to provide good performance. The laboratory experiments will hopefully confirm this.

In addition to establish an understanding for the fundamental principles of feedback con- trol, the laboratory will provide some experience of manually tuning PID-controllers.

The process to be controlled consists of two water tanks and a pump. See the picture below. Water is pumped from a reservoir to the upper tank, from which it flows through a restric- tion to the lower tank. From the lower tank the water flows through a second restriction back to the reservoir. The upper tank also has a tap from which, when opened, water is allowed to flow directly to the reservoir. The water levels in both tanks are measured using pressure sensors. The process and equipment are manufactured by Quanser Consulting in Canada.

The control system is implemented in Matlab on a PC, using the toolboxes Realtime Workshop and Realtime Target. The user interface is for the most part self-instructive, but a brief manual is included in Appendix.

The material is partly based on material from the Department of Automatic Control, Lund Institute of Technology, Sweden. This version of the manual was translated and revised by Jonas Wijk in 2001.

Coupled tanks with pump.

2 Preparations

2.1 Concepts and Notation

The block-diagram of a feedback control system is shown in the figure below.

Σ F G

r e u y

Here G is the system to be controlled and F the feedback controller. With reference to the block-diagram, briefly explain the following concepts:

Open-loop system:

Closed-loop system:

Output:

Reference value, or setpoint:

Static error:

3 Manual control

In this exercise you are supposed to control the water levels manually by observing the levels and adjusting the pump voltage accordingly. The aim is to investigate if the process is linear and to gain a feeling for how difficult it is to control the process.

How to start

  1. Click twice on the Matlab icon on the desktop.
  2. Wait until the Graphical User Interface is loaded.
  3. Hit the START 1 button to start the real time calculations. The STOP button is used to terminate the real time calculations and shut off the pump.

The pump voltage can be changed with the manual input on the screen or by clicking on the box manual and entering the input signal. Fine adjustments are best achieved in the latter way.

NOTE: All signals are scaled from 0 to 100. An input signal of 0 gives 0V and 100 gives 15V. For the levels, a signal of 0 corresponds to 0 cm and 100 to 25 cm.

Task 3.

  • Change the level in the upper tank to approximately 80 by adjusting the pump voltage. Let the system settle in a steady-state, i.e., constant levels. Write down the tank level and the corresponding input signal in the table below. Then change the level to approximately 40, let the system settle in steady-state and write down the level and input signal. Plot both steady-states in the diagram below.

Measurement: Tank level: Input signal:

  1. 0 0

(^00 10 20 30 40 50 60 70 )

10

20

30

40

50

60

70

80

90

100

Tank level:

Input signal:

Is the process linear? Motivate!

.........................................................................................

(^1) A box around a word refers to a function on the screen, i.e., a button or menu item.

  • Experiment around the level 40, one person demanding new desired levels in moderate pace and another trying to achieve them manually as fast as possible. For example: - Decrease the level by 10! - Increase the level by 5!
  • Try to keep the level constant when somebody disturbs the system by pouring cups of water into the upper tank and/or by opening the tap. Try to come back to the desired level as fast as possible when the disturbances are stopped.
  • Change the popup-menu Tank from Upper tank to Lower tank. Repeat the above investigation, now operating around the level 40 in the lower tank. Is this case more difficult? Motivate!

Task 4.

  • Choose PID-control of the upper tank with parameters K = 2, TI =Inf (∞) and TD = 0. (Note: You should now see the upper tank signal (dark blue) in the scope and NOT the lower tank signal (light blue)).
  • Set the reference value to r=50. Read the final level y = ...... and the corresponding control signal u..... Calculate the static error e=r-y=..... and verify that the result agrees with the controller equation above, i.e., that u = Ke.
  • Increase the reference value to 70. Does the static error change? Motivate!
  • Open the tank tap. Does the error change? Motivate!
  • Close the tank tap and try to find a reasonable K-value fulfilling the following criteria:
    1. The static error should be as small as possible.
    2. The rise time and the settling time should be as short as possible.
    3. The control signal must not reach either limit value (0 or 100) for a change in the reference value from 40 to 45.

Contemplate what each of these criteria imply for the choice of K. Also note how the control signal becomes “noisy” for large values of K.

An appropriate value of the controller gain is K = ..........

Why does the tank level never reach the reference value with the P-controller? (Hint: what is the control signal if the control error is zero? )

Task 4.

Switch to the lower tank. Click on Reset scope and change the time scale to 300 s. Try to find a reasonable value for K in the interval 2≤K≤ 10. The criteria are the same as for the upper one. (Do not spend more than 15 minutes on this task).

.........................................................................................

Task 4.

Conclusions:

  • Is P-control satisfactory for the upper tank? Motivate!
  • Is P-control satisfactory for the lower tank? Motivate!
  • What do you consider to be the main disadvantage with P-control?
  • What imposes the upper limit for the controller gain K when controlling the level in the upper tank?
  • What imposes the upper limit for K when controlling the level in the lower tank?

5 PI-control

With a PI-controller, the relationship between the control error e(t) = r(t) − y(t) and the control signal u(t) is

u(t) = K[e(t) +

TI

∫ (^) t

0

e(τ )dτ ]

The parameters K and TI can be changed on the computer screen.

The integral part, K TI

∫ (^) t

0

e(τ )dτ

can be set to zero with the function Reset I-part on the screen.

Task 5.

Perform experiments with PI-control of the level in the upper tank. Select P-part and

I-part in Displayed signals. Choose K = 10, TI = 20 and set the reference value to 40. Verify that the tank level reaches the reference value, i.e., that the static error becomes zero. Then open the tank tap and verify that the static error becomes zero again.

What are the sizes of the “P-part” and the “I-part” respectively, when the error has become zero?

.........................................................................................

Before continuing, we shall first consider a particular problem that can arise when inte- gral control is combined with control inputs that can saturate, i.e., reach a maximum or minimum limit.

If you find it difficult to understand this task you should contact an assistant to get it explained. You should not spend more than 20 minutes on this task.

Task 5.

Close the tank tap. Choose K = 3, TI = 3 and set the reference value to 40. Wait until the level is constant. Then change the reference value to 50. Determine the overshoot ...... and settling time .......

Change the Max voltage to pump from 15V to 7.5V, and repeat the experiment above. Determine the overshoot ...... and settling time ....... How does the limitation in the control signal affect the step response?

In the last experiment above you could note that the pump voltage stayed at its upper limit of 7.5V even after the level had reached its setpoint. This may seem counterintuitive, and is due to a phenomena known as integral windup. This phenomena is caused by the real input being limited, while the control algorithm is unaware of this and therefore continues to increase the control signal even further to reduce the control error. In particular, the integral part continues to grow while the real input is constrained and therefore the computed control input can be very large even after the error becomes zero.

In order to understand the phenomena of integral windup, consider the figures below. The upper figure shows the reference and the output, while the lower figure shows the computed and implemented control input. The computed control signal is a sum of the P-part and the I-part, i.e., u(t)=uP (t)+uI (t).

(^2045 47 50 56 60 65 )

30

40

50

60

70

80

90

Reference

Output

45 47 50 56 60 65 80

40

60

80

100

120

140

160

180

Real input

Computed input

t=47: Here the reference value and the level are equal and constant.

t=50: When the reference step occurs the error suddenly becomes e = 70 − 30 = 40. The P-part of the controller makes the computed input change immediately to u = 160, while the implemented input is constrained to 100.

Task 5.

Close the tank tap. Choose K = 1, TI = 30 and keep the reference value at 40. Repeat the experiment in the previous task, but now for the lower tank. Also write down the minimum and maximum levels for the lower tank.

Ti: Minimum/Maximum level: Time: 30 20 15 7

What TI corresponds to the shortest settling time? ..... What TI corresponds to the smallest deviation from 40? .....

Qualitatively, how does the response time depend on TI?

......................................................................................... .........................................................................................

If any of the assistants are available, then this is a good opportunity for partial reporting of the investigation. Otherwise, continue working and report later.

Partial report accepted by:

6 PD-controller

For a PD-controller the relationship between the control error and control input is

u(t) = K

[

e(t) + TD

d dt

e(t)

]

The corresponding parameters K and TD can be chosen on the computer screen.

Differentiation of the reference signal is normally avoided. Instead the relation

u(t) = K

[

e(t) − TD

d dt

y(t)

]

is used. Since e(t)=r(t)-y(t) this makes no difference when the reference signal is constant. On the other hand, if the reference signal varies rapidly from one level to another, then the latter relation yields a less aggressive behavior in the control input.

Task 6.

Make experiments with PD-control of the lower tank, which was difficult to control with pure P-control.

  1. Remove the I-part by setting TI =Inf (∞).
  2. Activate the function Reset I-part.
  3. Select P-part and D-part in Displayed signals.
    • Choose K = 10 and TD = 2, and change the reference from 40 to 45. Then increase TD to 5, and repeat the experiment. Does differentiation improve the behavior? (Compare with the pure P-control in Task 4.2).

7 PID-control

A PID-controller is obtained by introducing both integral and differential effects

u(t) = K[e(t) +

TI

∫ (^) t

0

e(τ )dτ + TD

d dt

e(t)]

We shall now consider how different parameter choices in a PID-controller affects the closed-loop behavior. In order to make a comparison between different combinations of PID-parameters, it is important that the initial process state always is the same when a step response experiment is started. However, since it is time consuming to wait until both levels are constant we will here instead first consider manual tuning on a simulated two-tank system. Thereafter we will consider a method for automatic tuning on the real process.

Task 7.

  1. Click on Simulated system to obtain a simulation interface.
  2. Choose PID-control of the lower tank.

The simulation is now ready to start. The simulation speed can be changed with the slider Simulation speed.

Study reference value changes from 40 to 45. Start with K = 6, TI = 80 and TD = 20 and write down the results in the table below. Change the PID-parameters and try to make the settling time TS as small as possible with an overshoot M that is less than 5%. Write down the result when you find it satisfactory.

K TI TD M TS 6 80 20

8 Summary

Task 8.

Try to answer the following questions with the recently achieved experience of PID- controllers. Use the simulation tool if necessary.

  • Increasing the gain K for a P-controller typically has the effects
  • Decreasing TI (increasing 1/TI ) for a PI-controller typically has the effects
  • Increasing TD for a PD-controller typically has the effects
  • Are the conclusions above valid for a PID-controller as well? Motivate!