Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MECHENG 724: Multivariable Control Systems

Assignment 1 2022

Assignment 1:  3-Tank Water Level Control, 15%

Due: 5pm Fri 26 Aug

1.  Introduction

In this assignment, you will design and test a controller that will regulate the water level in the 3- Tank System shown in Figure 1. The analysis and controller design will be performed in MATLAB and implemented in Simulink. You will design a linear reference tracking controller, and quantify performance via simulation and testing on the physical system. 

2.  System Hardware in MDLS Lab 405-536

The 3-Tank System consists of the tanks, shown in Figure 1, the electronic control unit, Figure 2, and a PC with a data acquisition card. Water is pumped into tanks 1 and 3 via pumps 1 and 2 respectively. Water can flow between the tanks via cross-flow valves. Water is returned to the reservoir via the 3 outflow valves. For this lab project, the system should be configured with both crossflow valves open, outflow valve 3 open, and all other outflow valves closed.

Figure 1. Actual 3-Tank System.

 

The electronic control unit (ECU), shown in Figure 2, consists of two servo amplifiers for the pumps, a power supply unit with an integrated signal conversion unit, and a module for measuring the water level via the pressure sensors located at the bottom of each tank. The ECU can be operated either automatically via a PC or manually using the pump output dials. The mode of operation can be controlled using the mode switches. The power switch for the ECU is located on the back panel.

Main Power

Switch at back

 

Mode

Switches

Pump Output

Dials

Figure 2. The 3-Tank electronic control unit (ECU).

There are six 3-Tank Systems in the lab, room 405-536, labelled Systems A-H, K. Small differences in valve coefficients, sensor characteristics, and pump characteristics exist between the systems.

3.  Simulink Model

A derivation of the water level dynamics results in three coupled nonlinear differential equations:

h.1  = u1 − ac h1 − h2   sgn(h1 − h2 ) ,                                              (1)

h.2  = ac  h1  − h2   sgn(h1  − h2 ) + ac  h3  − h2   sgn(h3  − h2 ) ,                         (2)

h.3  = u2  − ac h3 − h2   sgn(h3 − h2 ) − a0  − b0 ,                                 (3)

here h1 , h2 , h3   are the fluid level heights in tanks 1, 2 and 3, respectively, u1   and u2   are the input flows in tanks 1 and 3, respectively, ac , a0   and b0   are the system coefficients. These equations have been implemented inside the ‘Nonlinear 3-Tank Model with noise subsystem block of the Simulink model    ThreeTankSIM.slx  shown   in   Figure   3.   An   initialisation   file   for   the   model (Initialise_MiniThreetank_Sim.m) contains the system parameters (valve coefficients, etc).

 

height1 [mm]

 

Saturation

Heights [mm]

with noise

Figure 3. Simulink model for simulation (ThreeTankSIM.slx).

4. Real-Time Software

You will be using Simulink to implement your linear control system. External signals for actuators and sensors are interfaced through a data acquisition card installed in the PC. The software is used commercially for Rapid Control Prototyping and Hardware-in-the-Loop testing.

A basic  Simulink Desktop Real-Time model  (distinct  from the  simulation  Simulink model)  is provided, ThreeTankRT.slx, shown in Figure 4. You should not change any parameters/Simulink blocks inside the Actual 3-tank System” block.

Figure 4. Simulink model for real-time control (ThreeTankRT.slx).

Procedure for running a model:

1.  Run the  initialisation  file  Initialise_MiniThreetank_System_*.m,  * stands  for the system identifier (A-H, K)

2.   Ensure the ECU is switched on. Switch the pump servo amplifier to Automatic.

3.  Start the real-time process by either selecting Run from the Simulation menu or using the shortcut on the toolbar.

The Simulink model now acts like a GUI. Any Scopes or Displays in your model will now show the real-time signals and you will be able to edit any constant blocks, e.g. the Pump 1 Flowrate’ block to change the pump flowrate.

4.   Stop the real-time process and look at the results. Either open the scopes for a quick view or plot results from the MATLAB Command Window.

The heights’, ‘pumps’, and tout blocks in the Simulink model are To Workspace’ blocks. They store samples of tank heights (in mm), pump flow rates (in mm/s), and time (in sec) respectively in MATLAB arrays of the same name (heights, pumps, and tout).

To create a new model:

Modify the provided model, ThreeTankRT.slx, by deleting and adding the blocks that you need. Do not create a blank Simulink model and copy over the blocks because you will be missing some of the real-time parameters that are set up as Configuration Parameters (not in blocks) and part of the file.

The lab PCs are running MATLAB version R2021b. If you save your modified model outside the lab in a different MATLAB version, it may or may not run in the lab.

5. Project Scope

Tasks:

1.         Design a linear reference tracking controller using full-state feedback to fill tanks 1 and 2 from empty to any arbitrary heights at or below 200mm (that are physically possible) without steady- state error. Tune gains in simulation such that for reference heights of h1 = 150mm and h2 = 100mm, the system has a 3% settling time less than 200s. Tank 3 water height does not have to be regulated. To minimise the amplification of sensor noise, also ensure that the maximum standard deviation of pump flow rate at steady-state (σu) is below 0.15mm/s.

(a) Simulate the performance of the linear tracking controller with the nonlinear plant. (b) Test the same controller on the actual system.

2.         Compare simulation performances of the controller for different reference heights. At least 3 additional reference heights with at least 25mm difference.

Getting Started:

•   Get familiar with the supplied plant model ThreeTankSIM.slx via open-loop simulation. Can you achieve the target water heights by trial-and-error of pump inputs?

•   A linearized state-space model is provided for the systems in LinearModel.mat as variables A, B, C, and D, along with the equilibrium point variables x0, u0, and y0.

•   Test and tune all controller designs in simulation before testing in the lab.

•   You may modify your controller as you wish to improve performance as long as all control objectives are achieved. Calculate gains via the pole-placement method or LQR.

•   To calculate the settling time and standard deviation of pump flow rates, you may use the   supplied script calc_settle.m. The code assumes that steady-state has been reachedfor the last 50 seconds. You may wish to modify this code to suit your needs. 

•   You may face the integral windup problem when implementing your linear controller. To resolve it you may need to impose saturation limits on the integral term in the controller or use other anti-windup strategy.

•   First time in the lab, get familiar with the supplied open-loop model ThreeTankRT.slx as you did for the simulation model. Note: the pressure sensors may not be accurate below a water height of ~40 mm and the tank height calibrations are not perfect.

Assessment:

You must work individually and submit a report.

Format:

•   A coversheet (from provided template) stating: your name and ID#, also include which tank system you have used.

•   Strictly no more than 2 pages (printed sides) with no smaller than 12-point font for the body of the report. Use no more than 5 pages total including the coversheet and Appendix. Include page numbers.

Content:

•   An explanation/justification for your choice of controller gains and tuning required (if any) for the linear reference tracking controller.

•   A table of settling times and pump standard deviations you achieve in simulation for your controller,  for  different  reference  heights.  Also  include  experimental  results  for  tested reference heights.

•   A  comparison  of  simulation  and  experimental  results  for  the  controller.  Explain  any differences. Plot simulation and experimental results (heights and actuator usage) on common

axes.

•   Explain what causes performance degradation of the controller. Suggest ways to improve performance of the controller.

•   Simulink block diagram you’ve  created, clearly  displaying block contents  (if values not default). MATLAB code you’ve written should be included in an Appendix.

The marks will be distributed as follows:

Report presentation and completeness Objectives achieved

Demonstration of understanding

3

6

6

15

Booking time in the lab:

To book time with a 3-tank system in the lab (405-536) for testing during weeks 5 and 6, please use these links to doodle polls. Make sure that you use the same system throughout experimental work.

System D.https://doodle.com/meeting/participate/id/dNx3yj8a

System E.https://doodle.com/meeting/participate/id/bk5qLPKe

System F.https://doodle.com/meeting/participate/id/bWn309oa

System G.https://doodle.com/meeting/participate/id/b8qQNyjd

System H.https://doodle.com/meeting/participate/id/dJZ3xpJd

System K.https://doodle.com/meeting/participate/id/elOrg3gd

It will take around 1 hour of lab time to test your controller. Please book no more than two 1-hour sessions for testing.

Important! When testing your controllers on the real systems, you need to have all Hilink files in the same folder as your Simulink files.