Experiment # 5 5. Coupled Water Tanks

Similar documents
YTÜ Mechanical Engineering Department

YTÜ Mechanical Engineering Department

SRV02-Series Rotary Experiment # 1. Position Control. Student Handout

Double Inverted Pendulum (DBIP)

Quanser NI-ELVIS Trainer (QNET) Series: QNET Experiment #02: DC Motor Position Control. DC Motor Control Trainer (DCMCT) Student Manual

Rotary Motion Servo Plant: SRV02. Rotary Experiment #11: 1-DOF Torsion. 1-DOF Torsion Position Control using QuaRC. Student Manual

Lab 3: Quanser Hardware and Proportional Control

Rotary Motion Servo Plant: SRV02. Rotary Experiment #01: Modeling. SRV02 Modeling using QuaRC. Student Manual

Linear Experiment #11: LQR Control. Linear Flexible Joint Cart Plus Single Inverted Pendulum (LFJC+SIP) Student Handout

Linear Motion Servo Plant: IP02. Linear Experiment #4: Pole Placement. Single Pendulum Gantry (SPG) Student Handout

SRV02-Series Rotary Experiment # 7. Rotary Inverted Pendulum. Student Handout

STUDENT Workbook IP02 Base Unit Experiment for MATLAB /Simulink Users

Flexible Pendulum (FLEXPEN)

QNET Experiment #05: HVAC System Identification. Heating, Ventilation, and Air Conditioning Trainer (HVACT) Student Manual

Feedback Control of Linear SISO systems. Process Dynamics and Control

Laboratory 11 Control Systems Laboratory ECE3557. State Feedback Controller for Position Control of a Flexible Joint

State Feedback Controller for Position Control of a Flexible Link

2.004 Dynamics and Control II Spring 2008

EE 4443/5329. LAB 3: Control of Industrial Systems. Simulation and Hardware Control (PID Design) The Torsion Disks. (ECP Systems-Model: 205)

Rotary Flexible Joint

Department of Electrical and Computer Engineering. EE461: Digital Control - Lab Manual

Rotary Flexible Link. Workbook FLEXGAGE. Student Version

Multivariable Control Laboratory experiment 2 The Quadruple Tank 1

QNET DC Motor Control

PID Control. Objectives

Video 5.1 Vijay Kumar and Ani Hsieh

CHAPTER 7 MODELING AND CONTROL OF SPHERICAL TANK LEVEL PROCESS 7.1 INTRODUCTION

EE 474 Lab Part 2: Open-Loop and Closed-Loop Control (Velocity Servo)

(Refer Slide Time: 1:42)

Lecture 14 - Using the MATLAB Control System Toolbox and Simulink Friday, February 8, 2013

Feedback Control part 2

EL2450: Hybrid and Embedded Control Systems: Homework 1

sc Control Systems Design Q.1, Sem.1, Ac. Yr. 2010/11

Old Dominion University Physics 112N/227N/232N Lab Manual, 13 th Edition

1 An Overview and Brief History of Feedback Control 1. 2 Dynamic Models 23. Contents. Preface. xiii

QNET Experiment #04: Inverted Pendulum Control. Rotary Pendulum (ROTPEN) Inverted Pendulum Trainer. Instructor Manual

Laboratory Exercise 1 DC servo

Lab 6a: Pole Placement for the Inverted Pendulum

Experimental Study of Fractional Order Proportional Integral (FOPI) Controller for Water Level Control

ACKNOWLEDGEMENTS Quanser Inc., All rights reserved.

Lab 5a: Pole Placement for the Inverted Pendulum

Lab 6d: Self-Erecting Inverted Pendulum (SEIP)

EE 422G - Signals and Systems Laboratory

Sudden Expansion Exercise

Index. Index. More information. in this web service Cambridge University Press

ES205 Analysis and Design of Engineering Systems: Lab 1: An Introductory Tutorial: Getting Started with SIMULINK

Experiment 81 - Design of a Feedback Control System

ECE3510 Lab #5 PID Control

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

IMPROVED TECHNIQUE OF MULTI-STAGE COMPENSATION. K. M. Yanev A. Obok Opok

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

CM 3310 Process Control, Spring Lecture 21

Chapter 7 Control. Part Classical Control. Mobile Robotics - Prof Alonzo Kelly, CMU RI

REDUCING PROCESS VARIABLITY BY USING FASTER RESPONDING FLOWMETERS IN FLOW CONTROL

7.2 Controller tuning from specified characteristic polynomial

Remote Display Unit. Installers Handbook Copyright 2001 AirSense Technology Ltd. LM Remote Display Unit Installers Handbook Issue 1.

Dynamic simulation of DH house stations

Innovative Solutions from the Process Control Professionals

Experiment P43: RC Circuit (Power Amplifier, Voltage Sensor)

B1-1. Closed-loop control. Chapter 1. Fundamentals of closed-loop control technology. Festo Didactic Process Control System

Subject: Introduction to Process Control. Week 01, Lectures 01 02, Spring Content

FEEDBACK CONTROL SYSTEMS

Process Control and Instrumentation Prof. A. K. Jana Department of Chemical Engineering Indian Institute of Technology, Kharagpur

Exercise 2-4. Titration of a Buffer Solution EXERCISE OBJECTIVES

Switched Mode Power Conversion Prof. L. Umanand Department of Electronics Systems Engineering Indian Institute of Science, Bangalore

Mo de ling, Ide nti cat ion, and Control of a DC-Servomotor

Digital Control Semester Project

Analysis and Synthesis of Single-Input Single-Output Control Systems

Integrator Windup

Manufacturing Equipment Control

Simple circuits - 3 hr

Linear Control Systems

10/8/2015. Control Design. Pole-placement by state-space methods. Process to be controlled. State controller

Simulation Study on Pressure Control using Nonlinear Input/Output Linearization Method and Classical PID Approach

Index. INDEX_p /15/02 3:08 PM Page 765

Operating instructions Magnetic-inductive flow sensor SM6004 SM7004 SM / / 2014

RC Circuit (Power amplifier, Voltage Sensor)

Position Control Experiment MAE171a

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Hands-on Lab 3. System Identification with Experimentally Acquired Data

JUSTIFICATION OF INPUT AND OUTPUT CONSTRAINTS INCORPORATION INTO PREDICTIVE CONTROL DESIGN

Exercise 2-2. Titration of a Strong Acid EXERCISE OBJECTIVES

Process Modelling, Identification, and Control

Iterative Controller Tuning Using Bode s Integrals

The output voltage is given by,

Controlling the Inverted Pendulum

Design and Comparative Analysis of Controller for Non Linear Tank System

DC-motor PID control

CONTROL SYSTEMS ENGINEERING Sixth Edition International Student Version

Inverted Pendulum System

CYBER EXPLORATION LABORATORY EXPERIMENTS

Bangladesh University of Engineering and Technology. EEE 402: Control System I Laboratory

Lab 1: Dynamic Simulation Using Simulink and Matlab

Computer Aided Control Design

CHV Series Vector Control Inverter Options. Operating Instructions for Tension Control Card

CHAPTER 4 STATE FEEDBACK AND OUTPUT FEEDBACK CONTROLLERS

SOTM LAB: P16 OHM S LAW I. TEACHER NOTES & GUIDELINES TITLE OF LAB: Ohm s Law DEVELOPERS OF LAB:

WILEY. Differential Equations with MATLAB (Third Edition) Brian R. Hunt Ronald L. Lipsman John E. Osborn Jonathan M. Rosenberg

Design via Root Locus

Design via Root Locus

Transcription:

Experiment # 5 5. Coupled Water Tanks 5.. Objectives The Coupled-Tank plant is a Two-Tank module consisting of a pump with a water basin and two tanks. The two tanks are mounted on the front plate such that flow from the first (i.e. upper) tank can flow, through an outlet orifice located at the bottom of the tank, into the second (i.e. lower) tank. Flow from the second tank flows into the main water reservoir. The pump thrusts water vertically to two quick-connect orifices Out and Out. The two system variables are directly measured on the Coupled-Tank rig by pressure sensors and available for feedback. They are namely the water levels in tank and. To name a few, industrial applications of such Coupled-Tank configurations can be found in the processing system of petro-chemical, paper making, and/or water treatment plants. During the course of this experiment, you will become familiar with the design and pole placement tuning of Proportional-plus-Integral-plus-Feedforward-based water level controllers. This laboratory requires the student to design, though pole placement, controllers to regulate the water level in multiple coupled-tank systems and track that water level to a desired trajectory. First with the coupled-tank system in configuration #, a Proportionalplus-Integral (PI) scheme with feedforward action is used to control the water level in the top tank (i.e. tank#) from the power amplifier voltage. Then with the coupled-tank system in configuration #, another Proportional-plus-Integral (PI) scheme with feedforward action is used to control the water level in the bottom tank (i.e. tank#) from the water flow coming out of tank #, located above it. At the end of this session, you should know the following: How to mathematically model the Coupled-Tank plant from principles in order to obtain the two open-loop transfer functions characterizing the system, in the Laplace domain. An understanding of the different tuning parameters in the controller. How to linearize the obtained non-linear equation of motion about the quiescent point of operation. How to design, through pole placement, a Proportional-plus-Integral-plus- Feedforward-based controller for the Coupled-Tank system in order for it to meet the required design specifications for each configuration. How to implement each configuration controller(s) in real-time and evaluate its/their actual performance. 5.. System Requirements & Components To complete this lab, the following hardware is required: Quanser VoltPAQ Power Module or equivalent. Quanser Q-USB, Q8-USB, Q-PID, or equivalent. Quanser Coupled Tanks, as represented in Figure 5.. PC equipped with the required software as stated in the Quarc user manual. 5.

Figure 5.. Coupled-Tank Plant Front and Back View Figure 5.. Base of the Coupled-Tank Plant 5.

Figure 5.3. Quick-Connect Out and Out Coupling Table 5.. Coupled-Tank Component Nomenclature The system's basic operating principle is as follows: The water in the reservoir at the bottom of the system is transferred to Tank with the help of pumps and hoses located above the engine. The water transferred to Tank is transferred indirectly to Tank due to the hole at the bottom of the Tank. Depending on the configuration used herein, the water level in Tank or Tank is used to maintain the reference value. For this purpose, in both water tanks pressure sensors that determine the water level and used as feedback signal are used. At the same time, to make the reference tracking problem little more difficult there is one disruptive tap connected to the Tank. In necessity this tap is opened and disturbance from the outside state simulation is performed. 5.3

The control of the system is provided by adjusting the voltage supplies to the water pump and taking the amount of the water to the tanks of the pump presses as control signal. By using different sized seals which provides the water inlet and outlet system parameters can be changed and also during the experiment how these parameter changes affect the system response can be observed. 5.3. System Configuration 5.3.. Configuration # This section of the lab should be read over and completely understood before attending the lab. It is encouraged for the student to work through the derivations as well as to get a thorough understanding of the underlying mechanics. For a complete listing of the symbols used in this derivation as well as the model, refer to Appendix 5.A - Nomenclature at the last page of this handout. Water pump fills the Tank; Tank is not used in this configuration. In this study, to control the level of the water in Tank or to have a desired water level a controller design is done and applied to the system. By using different sized input-output seals mechanism can be used for different designs. Figure 5.4 Configuration # 5.4

Tank # Level Specification: In configuration #, a single-tank system, consisting of the top tank (i.e. tank ) is considered. The designed closed-loop system is to control the water level (or height) inside tank via the commanded pump voltage. It is based on a Proportional-plus-Integral-plus- Feedforward scheme. In response, to a desired ± cm square wave level set point from tank operating level position, the water height behaviour should satisfy the following design performance requirements: The operating level (a.k.a equilibrium height), L 0, in tank should be as follows: L0 5[ cm] The percent overshoot should be: PO.0["%"] The % Settling Time should be less than 5 seconds, i.e.: ts_ l 5.0[ s] The response should have no steady-state error. Figure 5.5. Tank Level Loop: PI-plus-Feedforward Controller 5.5

Figure 5.6. Interface to the Actual Coupled-Tank System 5.3... Tank # Level Modelling Non-linear Equation of Motion The outflow rate from Tank F can be expressed by: ol F A v (5.) o o o As a remark, the cross-section area of Tank outlet hole can be calculated by: Ao Do (5.) 4 Assignment # Find the outflow rate and then obtain the first-order differential equation in L by using the mass balance principle (HINT #) for Tank. Use all the hints given. HINT #: Applying Bernoulli s equation for small orifices, the outflow velocity from tank, v o, can be expressed by the following relationship: v gl (5.3) o HINT #: Mass balance principle for Tank can be expressed in verbal way like; INFLOW = OUTFLOW + ACCUMULATION In here accumulation can be expressed as: At L t (5.4) 5.6

HINT #3: The volumetric inflow rate to tank is assumed to be directly proportional to the applied pump voltage, such that: F V (5.5) il p p Assignment # Due to the square root function applied to L, the first-order differential equation is nonlinear. Solve the differential equation for the voltage at the equilibrium point. And find the Vp0 equation in terms of L 0 and p. HINT # At equilibrium, all the time derivative terms equate zero. Using the system s specifications and the design requirement results to be: Vp0 9.6[ V] 5.3... Tank # Level Modelling Equation of Motion (EOM) Linearization and Transfer Function Applying the taylor s series approximation about ( L0, V p0 ) the L expression can be t linearized as represented below: V A gl A gl V L t A gl A A p p0 o 0 o p p t 0 t t Substituting V p0 in Equation [5.6] with its expression (that you found in Assignment #) results to the following linearized EOM for the Tank water level system: L t A gl o gl A 0 t V p A Applying the Laplace transform to Equation [5.7] and rearranging yields the desired openloop transfer function for the Coupled-Tank s Tank system, such that: t p (5.6) (5.7) with: dc _ G () s s (5.8) gl p 0 dc _ and Ao g gl A 0 t A g o Such a system is stable since its unique pole (system of order one) is located on the lefthand-side of the s-plane. By not having any pole at the origin of the s-plane, G () s is of type zero. 5.7

Evaluating dc _ and, accordingly to the system s parameters and the desired design requirements, gives: V dc _ 3.[ ] and 5.[ s] cm 5.3..3. Tank # Level Controller Design : Pole Placement By definition, at the static equilibrium point ( L0, V p0 ): ( L Lr _) L0 and ( Vp Vp _ ff ) Vp0 Using equation found in Assignment #, the voltage feedforward gain results to be: Evaluating Equation [5.9] with the system s parameters leads to: A g o ff _ (5.9) p V ff _.39[ ] (5.0) cm Neglecting the feedforward action and carrying out block diagram reduction, Tank normalized characteristic polynomial results to be: s ( ) s dc _ p _ dc _ i _ 0 (5.) Solving for the two unknowns p _and i _ the set of two equations resulting from identifying the coefficients of the second-order standard form: n p _ (5.) dc _ i _ n (5.3) The minimum damping ratio to meet the maximum overshoot requirement, PO, can be obtained. The following relationship results: dc _ ln PO 00 ln PO 00 The system natural frequency, n, can be calculated from Equation [] as follows: (5.4) 4 n (5.5) Evaluating first Equations [5.4] and [5.5] accordingly to the desired design requirements, then carrying out the numerical application of Equations [5.] and [5.3] lead to the following PI controller gains: 5.8 t s _

Assignment #3 p _ 7. V cm V i _ 9. s cm By using the given transfer functions of system and the given requirements (for damping ratio and maximum overshoot) calculate the PI controller gains. 5.3.. Configuration # Water pump fills Tank. Due to the hole under the Tank, it also fills Tank indirectly. Controller is designed to do level control of water in Tank. By using the different sized input-output seals, mechanism can be used for different designs. Figure 5.7. Configuration # Tank # Level Specifications: In configuration #, the pump feeds tank and tank feeds tank. The designed closedloop system is to control the water level in tank (i.e. the bottom tank) from the water flow coming out of tank, located above it. Similarly to configuration #, the control scheme is based on a Proportional-plus-Integral-plus-Feedforward law. In response,to a desired ± cm square wave level setpoint from tank operating level position, the water height behaviour should satisfy the following design performance requirements: The operating level (a.k.a equilibrium height), L 0, in tank should be as follows: 5.9

L0 5[ cm] The percent overshoot should be: PO.0["%"] The % Settling Time should be less than 5 seconds, i.e.: ts _ 5.0[ s] The response should have no steady-state error. Figure 5.8. Tank Level Loop: PI-plus-Feedforward Controllers Figure 5.9. Tank Actual PI-plus-Feedforward Controller 5.0

5.3... Tank # Level Modelling Non-linear Equation of Motion The outflow rate from tank can be expressed by: Fo Ao vo (5.6) As a remark, the cross-section area of the tank outlet hole can be calculated by: Ao Do (5.7) 4 Using Equation [5.7], the outflow rate from tank given in Equation [5.6] becomes: F A gl (5.8) o o Using Equation [5.] and Equation [5.3], the inflow rate to tank is as follows: F A gl (5.9) i ol Assignment # Find the outflow rate and then obtain the first-order differential equation in L by using the mass balance principle (HINT #) for Tank. Use all the hints given. HINT #: Applying Bernoulli s equation for small orifices, the outflow velocity from tank, v o, can be expressed by the following relationship: gl (5.0) vo Inflow rate to tank can be expressed as: F A gl (5.) i ol HINT #: Mass balance principle for Tank can be expressed in verbal way like; INFLOW = OUTFLOW + ACCUMULATION In here accumulation can be expressed as: At L t (5.) Assignment # Due to the square root function applied to L and L, the first-order differential equation is non-linear. Solve the differential equation for L 0 gives the tank water level at equilibrium. L 0 results to be a function of L 0. HINT # At equilibrium, all the time derivative terms equate zero. Using the system s specifications and the design requirement must results to be: L0 5[ cm] 5.

5.3... Tank # Level Modelling Equation of Motion (EOM) Linearization and Transfer Function Applying the Taylor s series approximation about ( L0, L 0 ): A gl A gl A gl A gl L t A gl A gl A o ol o o t 0 t 0 t (5.3) Simplifying Equation [5.8] with Equation [5.9] results in the following linearized EOM for the tank water level system: A gl A gl L t gl A gl A o o 0 t 0 t (5.4) Applying the Laplace transform to Equation [5.4] and rearranging yields the desired openloop transfer function for the Coupled-Tank s tank system, such that: with: dc _ G () s s (5.5) A L o 0 dc _ and A L o 0 A gl t 0 A g o Such a system is stable since its unique pole (i.e. system of order one) is located on the lefthand-side of the s-plane. By not having any pole at the origin of the s-plane, G () s is of type zero. Evaluating dc _ and, accordingly to the system s parameters and the desired design requirements, gives: dc _.0[" cm / cm"] and 5.[ s] 5.3..3. Tank # Level Controller Design: Pole Placement By definition, at the static equilibrium point ( L0, L 0) : ( L L ) L and ( L ( Lr _ Lff _)) L0 r _ 0 Using the L 0 expression that you found in Assignment #, the level feedforward gain results to be: A (5.6) o ff _ Ao Evaluating Equation [5.6] with the system s parameters leads to: 5.

ff _.0[" cm / cm"] Carrying out block diagram reduction, tank normalized characteristic polynomial results to be: ( dc _ p _ ) s dc _ i _ s 0 (5.7) The system s desired characteristic equation is expressed by Equation [5.]. Solving for the two unknowns p _ and i _ the set of two equations resulting from identifying the coefficients of Equation [5.] with those of Equation [5.30], the PI controller gains can be expressed as follows: n p _ and dc _ i _ n (5.8) dc _ The minimum damping ratio to meet the maximum overshoot requirement, PO, can be obtained by solving Equation [5.3] for ae. The following relationship results: The system natural frequency, u ` n ln PO 00 ln PO 00, can be calculated from Equation [5.7] as follows: (5.9) n 4 (5.30) t s _ Evaluating first Equations [5.3] and [5.33] accordingly to the desired design requirements, then carrying out the numericak application of Equation [5.3] leads to the following PI controller gains: Assignment #3 p _ 5.[" cm / cm"] and i _.7[ ] s By using the given transfer functions of system and the given requirements (for damping ratio and maximum overshoot) calculate the PI controller gains. 5.4. Lab Procedure 5.4.. Wiring and Connections This section described the standard wiring procedure for the Coupled-Tank specialty plant. The following hardware, accompanying the Coupled-Tanks, is assumed. 5.3

Power Amplifier: Quanser VoltPAQ or equivalent. Data Acquisition Card: Quanser Q-USB, Q8-USB, Q-PID, or equivalent. Table 5., below, provides a description of the standard cables used in the wiring of the Coupled-Tank system. Cable Designation Description This cable connects an analog output of the data acquisition terminal board to the power module for proper power amplification. xrca to xrca From Digital-To-Analog Cable 4-pin-DIN to 6-pin-DIN This cable connects the output of the power module, after amplification, to the desired actuator (e.g. gear pump). To Load Cable From Analog Sensors Cable 6-pin-mini-DIN to 6-pinmini-DIN 5-pin-DIN-to4xRCA This cable carries analog signals from one or two plant sensors (e.g. pressure sensors) to the amplifier, where the signals can be either monitored and/or used by an analog controller. The cable also carries a ±VDC line from the amplifier in order to power a sensor and/or signal conditioning circuitry. This cable carries the analog signals, previously taken from the plant sensors (e.g. pressure sensors), unchanged, from the amplifier to the Digital-To- Analog input channels on the data acquisition terminal board. 5.4

To-Analog-To-Digital Cable Figure 5.0. Coupled Tank Wiring Diagram Figure 5.. Coupled Tank Wiring # 5.5

Figure 5.. Coupled Tank Wiring # Figure 5.3. Coupled Tank Wiring #3 5.6

5.4.. Real Time Implementation 5.4... Configuration #: Tank PI-plus-Feedforward Level Control Loop Please follow the steps described below: Step. Load Matlab and set the Current Directory to your folder with the Coupled Tanks lab files. Step. Open the q_tanks.mdl Simulink model file shown in Figure 0, below. The model implements the system s actual Proportional-plus-Integral (PI) closed-loop with feedforward action. Step 3. In order to use your actual coupled-tank system, the controller diagram directly interfaces with your system hardware in the Coupled-Tank: Actual Plant block, as shown in Figure. Figure 5.4. Real-Time Implementation of the Tank Level Control Loop: Configuration # 5.7

Figure 5.5. Interface Subsystem to the Actual Coupled-Tank Plant Using the Q8 Card To familiarize yourself with the diagram, it is suggested that you open the model subsystems to get a better idea of their composing blocks as well as take note of the I/O connections. You should also check that the signal generator block properties are properly set to output a square wave signal, of amplitude and of frequency 0.05 Hz. The total level set point for tank should result to be a square wave of ± cm around the desired equilibrium level. It should be noted that a simple low-pass filter of cut-off frequency.5 Hz (set by tau_t ) is added to the output signal of the tank level pressure sensor. This filter is necessary to attenuate the high-frequency noise content of the level measurement. Such a measurement noise is mostly created by the sensor s environment consisting of turbulent flow and circulating air bubbles. Although introducing a short delay in the signals, low-pass filtering allows for higher controller gains in the closed-loop system, and therefore for higher performance. Moreover, as safety watchdog, the real-time controller will stop if the water level in either tank or tank goes beyond 30 cm (set by L_MAX ) or 5 cm (set by L_MAX ), respectively. This is implemented in Figure through the Dead Zone and Stop With Error blocks. Step 4. In the Coupled-Tanks: Actual Plant subsystem, click on the HIL Initialize block and set the Board type field to the data-acquisition board that is connected to the Coupled-Tank system, e.g. Q4 HIL device. Step 5. Before being able to run the actual control loop, the PI-plus-feedforward controller gains must be initialized in the Matlab workspace, since they are to be used by the Simulink controller diagram. Start by running the Matlab script called setup_lab_tanks.m. However, ensure beforehand that the CONTROLLER_TYPE flag is set to MANUAL. This file initializes all the Coupled-Tank model parameters and user-defined configuration variables needed by Simulink diagram. The quiescent voltage feedforward term V p _ ff, is added to Vp _ to compensate for the known water withdrawal bias from the bottom of the tank as well as 5.8

to help bringing the water level, L, to its operating position. You can now initialize in the Matlab workspace the controller and feedforward gains which you have calculated before. Step 6. Build the real-time code corresponding to your diagram, by using the QUARC Build option from the Simulink menu bar. Step 7. Clicking on QUARC Start should start the gear pump thrusting water filling tank up to its operating level. Then after a 5-second settling delay (in order to stabilize the system at its operating point), the water level in tank should start tracking the desired ± cm square wave set point around the desired operating level L 0. As a remark, the initial settling time for the system to reach its operating point is defined in Matlab by the parameter TS. Step 8. In order to observe the system s responses from the actual system, double-click on the following scopes in the Simulink model: L Resp. (cm) and Vp(V). You should now be able to monitor, as the water flows through the Coupled-Tank system, the actual water level in tank as it track its reference input. The corresponding commanded pump voltage, which is proportional to the control effort spent, is sent to the power amplifier and can also be monitored and plotted on-line. Step 9. Assess the actual performance of the level response and compare it to the design requirements. Measure your response actual percent overshoot and settling time. Are the design specifications satisfied? Explain. If your level response does not meet the desired design specifications of Section Controller Design Specifications given before, review your PIplus-Feedforward gain calculations and/or alter the closed-loop pole locations (i.e. PO and t s _ ) until they do. Step 0. Specifically discuss in your lab report the following points: How does you actual tank level compare to the simulated response? Is there a discrepancy in the results? If so, discuss some of the possible reasons. From the plot of the actual level response, measure your system t s _ and PO. Are the values in agreement with the design specifications? If not exactly, find some of the possible reasons. Step. Once your results are as closely as possible in agreement with the closed-loop requirements of configuration #, your tank level response should look similar to the one displayed in Figure, below. Step. Include in your lab report your final values for p _, i _ and ff _ as well as the resulting response plot of the actual and theoretical L versus L r _. Also include from the same run corresponding plot ofv. Ensure to properly document all your results and p observations before moving on the next section. Step 3. You can now proceed the next section, which deals with the actual implementation in real-time of your PI- plus-feedforward level controller for tank of the Coupled-Tank system in configuration #. 5.9

Figure 5.6. Actual and Theoretical Tank Level Tracking Response: Configuration # 5.4... Configuration #: Tank PI-plus-Feedforward Level Control Loop Please follow the steps described below: Step. Load Matlab and set the Current Directory to your folder with the Coupled Tanks lab files. Step. Open the q_tanks.mdl Simulink model file shown in Figure 5.7, below. The model implements a Proportional-plus-Integral (PI) closed-loop. As mentioned before, the tank water level control loop is based on top of tank level controller, as developed and tuned in the previous sections. The nested actual tank level control scheme is depicted in Figure 5.8, below. Similarly, the level controller diagram for Coupled-Tank in configuration # also interfaces directly with your Coupled-Tank hardware, as shown in Figure 5.5. 5.0

Figure 5.7. Real-Time Implementation of the Tank Level Control Loop: Configuration # To familiarize yourself with the diagram, it is suggested that you open the model subsystems to get a better idea of their composing blocks as well as take note of the I/O connections. You should also check that the signal generetor block properties are properly set to output a square wave signal, of amplitute and of frequency 0.08 Hz. The total level setpoint for tank should result to be a square wave of ± cm around the desired 3 equilibrium level L 0. Also, your model sampling time should be set to ms, i.e. T s 0 s and the solver type to ode4 (Runge-utta). It should be noted that a simple low-pass filter of cut-off frequency.5 Hz (set by tau_t ) and 0.33 Hz (set by tau_t ) are added to the output signal of the tank and tank level pressure sensors, respectively. These filters are necessary to attenuate the high-frequency noise content of the level measurements. Such a measurement noise is mostly created by the sensor s environment consisting of turbulent flow and circulating air bubbles. Although introducing a short delay in the signals, low-pass filtering allows for higher controller gains in the closed-loop system, and therefore for higher performance. Moreover, as safety watchdog, the real-time controller will stop if the water level in either tank or tank goes beyond 30 cm (set by L_MAX ) or 5 cm (set by L_MAX ), respectively. This is implemented in Figure through the Dead Zone and Stop With Error blocks. 5.

Figure 5.8. Real-Time Implementation of the Nested Tank Level Control Loop: Configuration # Step 3. In the Coupled-Tanks: Actual Plant subsystem, click on the HIL Initialize block and set the Board type field to the data-acquisition board that is connected to the Coupled-Tank system, e.g. Q4 HIL device. Step 4. Before being able to run the actual control loop, the PI-plus-feedforward controller gains for tank must also be initialized in the Matlab workspace, since they are to be used by the Simulink controller diagram. However, keep in the Matlab workspace the PI-plusfeedforward controller gains for tank of the Coupled-Tank system in configuration #, as previously implemented. The quiescent level feedforward term L ff _, is added to L to compensate for the known water withdrawal bias from the bottom of the tank as well as to help bringing the water level, L, to its operating position. You can now initialize in the Matlab workspace the controller and feedforward gains which you have calculated before. Step 5. Build the real-time code corresponding to your diagram, by using the QUARC Build option from the Simulink menu bar. Step 6. Clicking on QUARC Start should start the gear pump thrusting water filling up both tank and tank up to their operating levels L0 and L 0, respectively. Then after a 35- second settling delay (in order to stabilize the system at its operating point), the water level in tank should start tracking the desired ± cm square wave setpoint around the desired operating level L 0. As a remark, the initial settling time for the system to reach its operating point is defined in Matlab by the parameter TS. Step 7. In order to observe the system s responses from the actual system, double-click on the following scopes in the Simulink model: L Resp. (cm), L Resp. (cm) and Vp(V). You should now be able to monitor, as the water flows through the Coupled-Tank system, the actual water levels in tanks and as they track their reference inputs. The corresponding commanded pump voltage, which is proportional to the control effort spent, is sent to the power amplifier and can also be monitored and plotted on-line. 5.

Step 8. Assess the actual performance of the level response in tank and compare it to the design requirements. Measure your response actual percent overshoot and settling time. Are the design specifications satisfied? Explain. If your level response does not meet the desired design specifications of Section Controller Design Specifications given before, review your PI-plus-Feedforward gain calculations and/or alter the closed-loop pole locations (i.e. PO and t s _) until they do. Step 9. Specifically discuss in your lab report the following points: How does you actual tank level compare to the simulated response? Is there a discrepancy in the results? If so, discuss some of the possible reasons. From the plot of the actual level response, measure your system ts _and PO. Are the values in agreement with the design specifications? If not exactly, find some of the possible reasons. Step 0. Once your results are as closely as possible in agreement with the closed-loop requirements of configuration #, your tank level response should look similar to the one displayed in Figure 5.9, below. Figure 5.9. Actual and Theoretical Tank Level Tracking Response: Configuration # 5.3

Step. From the same run, the corresponding water level in tank is displayed in Figure 5.9, below. Figure 5.9. Actual Tank Level Tracking Response: Configuration # Step. Include in your lab report your final values for p _, i _ and ff _ as well as the resulting response plot of the actual and theoretical L versus L r _. Also include from the same run corresponding plots of L andv p. Ensure to properly document all your results and observations before leaving the laboratory. 5.4.3. Post Lab Questions After successfully completing your laboratory section, you should now begin to document your report. This report should include: I. Your solutions to the pre-lab assignments for both configurations. II. Your designed controller gains to meet the system specifications and your steps at calculating the results (also for both configurations). III. After simulating your controller with your calculated gains, did the response match what you had expected? Comment the results for both configurations. IV. Did the actual systems (for config. and config.) responses match your simulated results? If not, what reasons could you conclude were responsible for the discrepancies? V. You also need to present a plot of your final system responses with the actual, simulated and setpoint signals for both configurations. 5.4

5.4.3.. Post Lab Questions. During the course of this lab, were there any problems or limitations encountered? If so, what were they and how were you able to overcome them?. After completion of this lab, you should be confident in tuning this type of controller to achieve a desired response. Do you feel this controller can meet any arbitrary system requirement? Explain. 5.5. References. Coupled Tanks User Manual, Quanser Inc.. Coupled Tanks Instructor Manual, Quanser Inc. 3. QUARC Help (type doc QUARC to access). 4. QUARC Installation Guide. 5. Coupled Water Tanks Specialty Experiment: PI-plus-Feedforward Control. 5.5

Appendix 5.A. Nomenclature and System Parameters Table 5.3, below, provides a complete listing of the symbols and notations used in the Coupled-Tank system mathematical modelling, as presented in this laboratory. 5.6

Table 5.3. Coupled-Tank System Model Nomenclature Table 5.4, below, provides a complete listing of the symbols and notations used in the design of both control loops (i.e. the PI-plus-Feedforward loops for the water levels in tank and tank ), as presented in this laboratory. Table 5.5 provides values of system parameters. 5.7

Table 5.4. Coupled-Tank System Control Loops Nomenclature Table 5.5. Coupled-Tank System Parameters 5.8