LAB-1: PID control. 1 Introduction

Similar documents
A simple method to determine control valve performance and its impacts on control loop performance

PID Control. Proportional Integral Derivative (PID) Control. Matrix Multimedia 2011 MX009 - PID Control. by Ben Rowland, April 2011

PID Control. Chapter 10

DCMS DC MOTOR SYSTEM User Manual

Introduction to LabVIEW for Control Design & Simulation Ricardo Dunia (NI), Eric Dean (NI), and Dr. Thomas Edgar (UT)

Process Control Primer

ε: Voltage output of Signal Generator (also called the Source voltage or Applied

PID control - Simple tuning methods

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

FREE FALL. Introduction. Reference Young and Freedman, University Physics, 12 th Edition: Chapter 2, section 2.5

Guided Study Program in System Dynamics System Dynamics in Education Project System Dynamics Group MIT Sloan School of Management 1

Dr. Yeffry Handoko Putra, S.T., M.T

PC BASED PID TEMPERATURE CONTROLLER

Confidence Intervals for One Standard Deviation Using Standard Deviation

Introduction. Chapter The Motivation

QNET Experiment #06: HVAC Proportional- Integral (PI) Temperature Control Heating, Ventilation, and Air Conditioning Trainer (HVACT)

Controller Design using the Maple Professional Math Toolbox for LabVIEW

INTERFERENCE OF SOUND WAVES

Module 2 Introduction to SIMULINK

Chapter 10. Control Design: Intuition or Analysis?

The purposes of this experiment are to test Faraday's Law qualitatively and to test Lenz's Law.

EECE 460 : Control System Design

Experiment 5 ~ Friction

Operational Overview and Controls Guide

INTERFERENCE OF SOUND WAVES

A Determination of g, the Acceleration Due to Gravity, from Newton's Laws of Motion

A Design of a PID Self-Tuning Controller Using LabVIEW

HITACHI INVERTER SJ/L100/300 SERIES PID CONTROL USERS GUIDE

E x p e r i m e n t 5 DC Motor Speed Control

Experiment #11: LRC Circuit (Power Amplifier, Voltage Sensor)

1 Error in Euler s Method

Experiment 7 ~ Conservation of Linear Momentum

Weather Direct Displays show Lost Forecast (blank boxes in the picture icons)

Lambda Tuning the Universal Method for PID Controllers in Process Control

Acceleration of Gravity Lab Basic Version

Users Guide. By Dr. Don J. Wood Dr. Srinivasa Lingireddy. Featuring the Surge Wizard

Time Response Analysis of DC Motor using Armature Control Method and Its Performance Improvement using PID Controller

EXPERIMENT NUMBER 8 CAPACITOR CURRENT-VOLTAGE RELATIONSHIP

School of Engineering Department of Electrical and Computer Engineering

OPTIMAL DISPATCH OF POWER GENERATION SOFTWARE PACKAGE USING MATLAB

Contents Installing the ucal Software on your PC/Laptop ucal Programmer Version Connecting the ucal Programmer to your PC/Laptop

GENERAL SCIENCE LABORATORY 1110L Lab Experiment 6: Ohm s Law

Frequency Response of Filters

Implementation of Fuzzy and PID Controller to Water Level System using LabView

Imaging Systems Laboratory II. Laboratory 4: Basic Lens Design in OSLO April 2 & 4, 2002

Fuel Cell Characterization Lab

Prelab Exercises: Hooke's Law and the Behavior of Springs

Waves: Recording Sound Waves and Sound Wave Interference (Teacher s Guide)

INTERACTIVE LEARNING MODULES FOR PID CONTROL

Measuring, Controlling and Regulating with labworldsoft

Signal to Noise Instrumental Excel Assignment

Measuring Electric Phenomena: the Ammeter and Voltmeter

Lab 1: Simulation of Resting Membrane Potential and Action Potential

Industrial Steam System Process Control Schemes

TEACHING AUTOMATIC CONTROL IN NON-SPECIALIST ENGINEERING SCHOOLS

LABORATORY. 14 Disk Scheduling OBJECTIVE REFERENCES. Watch how the operating system schedules the reading or writing of disk tracks.

SAMPLE CHAPTERS UNESCO EOLSS PID CONTROL. Araki M. Kyoto University, Japan

CCNA Discovery Networking for Homes and Small Businesses Student Packet Tracer Lab Manual

3.2. Solving quadratic equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Experiment 4 ~ Newton s Second Law: The Atwood Machine

The Time Constant of an RC Circuit

2.6. In-Laboratory Session QICii Modelling Module. Modelling Module Description

Dealing with Data in Excel 2010

Motor Modeling and Position Control Lab Week 3: Closed Loop Control

Chapter 2 Printing Printing Procedure...2-1

Experiment: Static and Kinetic Friction

Experiment 6 ~ Joule Heating of a Resistor

MATLAB Control System Toolbox Root Locus Design GUI

Linear Programming. Solving LP Models Using MS Excel, 18

INTRUSION PREVENTION AND EXPERT SYSTEMS

(Refer Slide Time: 2:03)

Analysis of PID Control Design Methods for a Heated Airow Process

The fairy tale Hansel and Gretel tells the story of a brother and sister who

Controller Design in Frequency Domain

MAGICAR M871A. Car alarm with two-way remote User s guide

LAB 6 - GRAVITATIONAL AND PASSIVE FORCES

The Sensor Readings Gadget for Window 7. Version

Microcontroller-based experiments for a control systems course in electrical engineering technology

Second Order Linear Nonhomogeneous Differential Equations; Method of Undetermined Coefficients. y + p(t) y + q(t) y = g(t), g(t) 0.

MATH 140 Lab 4: Probability and the Standard Normal Distribution

Terminology and Symbols in Control Engineering

c. Given your answer in part (b), what do you anticipate will happen in this market in the long-run?

Chapter 4 Online Appendix: The Mathematics of Utility Functions

Using the T&D Thermo App with TR-7wf Data Loggers

Electronic WorkBench tutorial

Measuring Resistance Using Digital I/O

Lab 3: Introduction to Data Acquisition Cards

Operational Amplifier - IC 741

1 One Dimensional Horizontal Motion Position vs. time Velocity vs. time

Math 132. Population Growth: the World

Hands On ECG. Sean Hubber and Crystal Lu

Lab Experience 17. Programming Language Translation

Computer Networks I Laboratory Exercise 1

EDEXCEL NATIONAL CERTIFICATE/DIPLOMA UNIT 5 - ELECTRICAL AND ELECTRONIC PRINCIPLES NQF LEVEL 3 OUTCOME 4 - ALTERNATING CURRENT

PID Control. 6.1 Introduction

Control of an industrial process using PID control blocks in automation controller

Switch Mode Power Supply Topologies

Chapter 7 Direct-Current Circuits

Workshop 7 PC Software - Tracker

Determination of g using a spring

Transcription:

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 control, 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 restriction 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

2 Preparations 2.1 Concepts and Notation The block-diagram of a feedback control system is shown in the figure below. r Σ e F u G y 1 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:..... 2

2.2 Step Response Characteristics In order to describe the performance of a control system, it is often useful to consider the step response of the system, i.e., the response of the system output to a step in some input signal, such as the reference. Parameters that describe the step response are rise time, overshoot and settling time. Determine these quantities for the step responses below. 1.8 1.7 1.6 1.5 1.4 1.3 Step Response Tank level 1.2 1.1 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 5 10 15 20 25 30 35 Time (sec.) Settling time: Rise time: Overshoot: 46 Step Response 45.5 45 44.5 Tank level 44 43.5 43 42.5 42 41.5 41 40.5 40 0 3 6 9 12 15 18 Time (sec.) Settling time: Rise time: Overshoot: 3

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.1 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. 100 90 80 Measurement: Tank level: Input signal: 1. 0 0 2. 3. Tank level: 70 60 50 40 30 20 10 0 0 10 20 30 40 50 60 70 80 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. 4

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! 5

4 Proportional control Above the process was controlled by manually adjusting the pump voltage. Through observations of the deviation from the desired level you decided to increase or decrease the voltage. A controller makes such decisions automatically. We shall in this laboratory consider PID-controllers, and start with the special case of pure proportional control, also known as P-control. PID-controllers are determined by the three parameters K, T I and T D. The values of these parameters will affect the behavior of the closed-loop system. At startup the parameters should be K = 2, T I =Inf ( ) and T D =0, which corresponds to a P-controller with K = 2. For pure P-control the relation between the input u(t), reference r(t) and output y(t) is where e(t) is called the control error. u(t) = K[r(t) y(t)] = Ke(t) Reference signal Control signal r(t) e(t) u(t) y(t) Output signal Σ PID System -1 Level control with PID-controller How to operate the PID-controller and change the settings 1. Start the controller by clicking on the popup-menu Control and choose PIDcontroller. Choose which tank that is to be controlled with the popup-menu Tank. 2. To change a controller parameter, click on the box containing the parameter value and enter the new value. 6

Task 4.1 Choose PID-control of the upper tank with parameters K = 2, T I =Inf ( ) and T D = 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?) 7

Task 4.2 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.3 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? 8

Task 4.4 Draw a block diagram for the closed-loop system for the case when the level in the lower tank is the controlled output. Represent each tank by a separate block, and indicate the variables control input, level tank 1 and 2, as well as the disturbance represented by opening the tap. 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: 9

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) + 1 t e(τ)dτ] T I The parameters K and T I can be changed on the computer screen. The integral part, K T I t 0 0 e(τ)dτ can be set to zero with the function Reset I-part on the screen. Task 5.1 Perform experiments with PI-control of the level in the upper tank. Select P-part and I-part in Displayed signals. Choose K = 10, T I = 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 integral 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.2 Close the tank tap. Choose K = 3, T I = 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?.......... 10

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)=u P (t)+u I (t). 90 Output 80 Reference 70 60 50 40 30 20 45 47 50 56 60 65 80 180 160 140 Computed input 120 100 80 60 Real input 40 45 47 50 56 60 65 80 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. 11

t=52: The computed input continues to increase due to the integral part of the controller. However, the implemented input is still constrained at 100. t=56: Now the level has reached the reference value but the computed input is still above 100 due to a large integral part. However, now the integral part starts to decrease due to a negative error. t=59: Finally the integral part has decreased sufficiently to yield a computed input of less than 100, and hence the real input moves away from the constraint. A solution to the problem of integral windup is to prevent the integral part from growing when the control signal is saturated. Introduce this function by setting the popup-menu Anti-Windup to on. Then repeat the experiment in task 5.2 and check that the integral growth protection works. In the following the Anti-Windup shall be activated all the time. Task 5.3 Change the Max voltage to pump from 7.5V to 15V. Choose K = 8, T I = 20 and set the reference value to 40. Wait until the level is steady. Then open the tap and measure the response time until the disturbance has been accounted for, which in this case is considered to occur when the level stays within the interval from 39 to 41. Write down the time in the table below. Repeat the experiment with integral time T I = 10, 5 and 2 and write down the results in the table. T i : 20 10 5 2 Time: What T I corresponds to the shortest settling time?... Qualitatively, how does the response time depend on T I?.......... 12

Task 5.4 Close the tank tap. Choose K = 1, T I = 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. T i : Minimum/Maximum level: Time: 30 20 15 7 What T I corresponds to the shortest settling time?... What T I corresponds to the smallest deviation from 40?... Qualitatively, how does the response time depend on T I?.......... 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: 13

6 PD-controller For a PD-controller the relationship between the control error and control input is [ ] d u(t) = K e(t) + T D dt e(t) The corresponding parameters K and T D can be chosen on the computer screen. Differentiation of the reference signal is normally avoided. Instead the relation [ ] d u(t) = K e(t) T 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.1 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 T I =Inf ( ). 2. Activate the function Reset I-part. 3. Select P-part and D-part in Displayed signals. Choose K = 10 and T D = 2, and change the reference from 40 to 45. Then increase T D to 5, and repeat the experiment. Does differentiation improve the behavior? (Compare with the pure P-control in Task 4.2). 14

Try to explain how the D-part works. What happens with the control signal for large T D? Can you explain this? 15

7 PID-control A PID-controller is obtained by introducing both integral and differential effects u(t) = K[e(t) + 1 T I t 0 e(τ)dτ + T D 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 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, T I = 80 and T D = 20 and write down the results in the table below. Change the PID-parameters and try to make the settling time T S as small as possible with an overshoot M that is less than 5%. Write down the result when you find it satisfactory. K T I T D M T S 6 80 20 16

8 Summary Task 8.1 Try to answer the following questions with the recently achieved experience of PIDcontrollers. Use the simulation tool if necessary. Increasing the gain K for a P-controller typically has the effects Decreasing T I (increasing 1/T I ) for a PI-controller typically has the effects Increasing T D for a PD-controller typically has the effects Are the conclusions above valid for a PID-controller as well? Motivate! 17