









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










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.
The block-diagram of a feedback control system is shown in the figure below.
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:
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.
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.
Measurement: Tank level: Input signal:
(^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.
Task 4.
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:
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) +
∫ (^) 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:
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.
A PID-controller is obtained by introducing both integral and differential effects
u(t) = K[e(t) +
∫ (^) 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.
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
Task 8.
Try to answer the following questions with the recently achieved experience of PID- controllers. Use the simulation tool if necessary.