Skip to content

Latest commit

 

History

History
352 lines (265 loc) · 20.6 KB

README.md

File metadata and controls

352 lines (265 loc) · 20.6 KB

Quadruple-Tank Setup
⚗️ Reproducible Low-cost Flexible Quadruple-Tank Process Experimental Setup for Control Educators, Practitioners, and Researchers

License: CC BY-NC 4.0 DOI:10.1016/j.jprocont.2022.08.010

CAD model Physical implementation

🎯 Features

  • 💻 User-friendly dedicated MATLAB/Simulink interface with a personal computer
  • 📈 Seamless shift between a numeric simulation and the interface with the real experimental plant
  • 💰 Inexpensive materials and fast assembly
  • 🔓 Open-source
    • CAD models
    • Technical drawings
    • Wiring schematics
    • PCB design
    • MATLAB/Simulink interface
    • Assembly tutorials
  • ⛳️ Several application examples
  • 👩‍🔬 Suitable for control education in
    • System identification
    • Frequency/time response
    • State feedback (e.g root locus)
    • P, PI, and PID controllers
    • Ziegler-Nichols tuning procedure
    • Disturbance rejection
    • Multivariate control (e.g. LQR)
    • Effect of the position and direction of zeros (e.g. non-minimum phase zeros)
    • Nonlinear control
    • Decentralized control

🚀 Index


💡 Description

The major hurdle in accessing laboratory experimentation is the cost of acquiring experimental scientific equipment, which is unbearable for many institutions. This repository provides the community of control educators, practitioners, and researchers with an open-source low-cost experimental setup and dedicated interface, which is flexible and very easily reproducible.

The Quadruple-Tank Setup is thoroughly described in

L. Pedroso, P. Batista, Reproducible low-cost flexible quadruple-tank process experimental setup for control educators, practitioners, and researchers, Journal of Process Control. 118 (2022) 82–94. | [Download PDF]

If you use this repository, please reference the publication above.

The community is encouraged to contribute with application examples and suggest improvements.


✍🏼 Authors

Leonardo Pedroso1 ORCID iD icon ORCID iD icon
Pedro Batista1 ORCID iD icon

1Institute for Systems and Robotics, Instituto Superior Técnico, Universidade de Lisboa, Portugal


📞 Contact

This repository is currently maintained by Leonardo Pedroso (leonardo.pedroso@tecnico.ulisboa.pt).


📚 Manual

The simulink block for interfacing with the quadruple-tank process experimental network is shown below. The inputs and outputs are thoroughly described in (Pedroso and Batista, 2022).

To create a new model to control the quadruple-tank experimental setup, follow these steps:

  • Copy and paste the interface block in a new Simulink model;
  • Copy and paste, in the directory of the new Simulink model, the file:
    • quadrupleLoadParameters.m, which is executed on the initialization callback of the interface block, that loads the physical parameters of the setup, defines the sampling period, and defines the covariance matrices of the process and sensor noise for numerical simulation;
    • quadrupleSimObj.m, a MATLAB System Object that numerically simulates the quadruple-tank process in discrete-time;
  • Create a directory identification to contain the .mat data files generated in the identification procedure;
  • Generate and connect to the interface block a clock signal CLK, whose period equals the sampling period defined in quadrupleLoadParameters.m;
  • Setup the Simulink solver to:
    • Fixed-step;
    • Discrete; and
    • Set the "Fixed-step size" parameter to half the period of the CLK signal;
  • Set the Simulink simulation mode to "Accelerator";
  • Enable the display of the "Sorted Execution Order" of Simulink to ensure the first step of the feedback loop is the water level measurement and the last is the update of the input to the pumps. Most of the time this is ensured, due to the default priorities of the inner blocks of the interface block, otherwise set the priorities of the feedback loop blocks appropriately.

🧐 Identification

The proposed identification procedures are detailled in what follows. For the detailled equations and physical principles used to estimate the parameters of the experimental setup making use of data gathered during these procedures see (Pedroso and Batista, 2022).

Note

MATLAB live scripts detailing the identification procedure as well as the post-processing of the data to estimate the model parameters are avialable at simulink/identification

1. Section area of each tank

The proposed procedure is the following:

  • measure the weight of the empty tank, $w_1$ (one may want to add a little of water at the beginning for the water level to reach the scale at a water level $h_1$)
  • pour water in each tank until almost full
  • measure the weight of the tank with the water, $w_2$;
  • measure the corresponding water level, $h_2$;
  • then compute $A = (w_2-w_1)/\left(\rho(h_2-h_1)\right)$, where $\rho$ is the water density.

The MATLAB live script identification_1_A.mlx corresponding to this identification procedure is available at simulink/identification.

2. Characteristic slope of the water level sensors

The proposed procedure to determine $dh/dr$ is the following:

  • open identification_sl.slx

and for each tank:

  1. block the outlet of tank;
  2. pour some water to the tanks with the pumps using the sliders in the Simulink model;
  3. measure $r$ in the Simulink scope and the water level in the sensor ruler $h^{\star}$;
  4. repeat 2. and 3. increasing the water level and measuring the pairs $(r,h^{\star})$, until enough samples are taken;
  5. compute an estimate of $dh/dr$ performing a linear regression of the samples taken.

The plot of the data points and linear regression for an illustrative identification procedure is depicted in (Pedroso and Batista, 2022).

The MATLAB live script identification_2_dh_dr.mlx corresponding to this identification procedure is available at simulink/identification.

3. Response of the pumps and the fraction of the flow that is diverted on the three way valves

The following procedure is proposed:

  • open identification_sl.slx

and for each pump (the following steps are exemplified for pump 1):

  1. block the outlets of the lower tanks;
  2. send a constant PWM input to pump 1;
  3. wait until tank 1 is almost full, then turn off the pump;
  4. let tank 4 pour all the water into tank 2, whose outlet should still be blocked;
  5. measure the height of the tanks 1 and 2 and, in the scope, measure the interval of time the pump was on;
  6. repeat 2., 3., 4., and 5. for various PWM values.

Warning:

The pumps are more sensitive to low PWM values, so a greater sample density in this region is beneficial.

From each sample taken:

  • one can compute the total volume of water that was pumped, $q = h_1A_1+h_2A_2$;
  • the fraction of the flow that was directed to the lower tank, $\gamma = h_1A_1/(h_1A_1+h_2A_2)$.

It is then possible to estimate $c_1,c_2,c_3,$ and $k$ from a nonlinear least squares regression, for instance, of model (3) in (Pedroso and Batista, 2022).

Note

Although this procedure is similar for the disturbance pumps, it is necessary to keep in mind that their identification depends on the height of the disturbance flow outlet.

The plot of the data points and linear regression for an illustrative identification procedure is depicted in (Pedroso and Batista, 2022).

The MATLAB live script identification_3_pump.mlx corresponding to this identification procedure is available at simulink/identification.

4. Outlet area $a$ and datum height $h_0$ of the tanks

The proposed procedure to determine $a$ and $h_0$ is the following:

  • open identification_sl.slx

and for each tank:

  • measure the steady-state resistor ratio value $r$ for various constant input actions $u$;
  • estimate $\alpha$ and $\beta$ from the linear regression of the samples $(r,u^2)$;
  • compute $a$ and $h_0$ making use of (6) in (Pedroso and Batista, 2022).

The MATLAB live script identification_4_a.mlx corresponding to this identification procedure is available at simulink/identification.


⛳️ Examples

The source files of the applications described in (Pedroso and Batista, 2022) are available in this repository. Their execution is shown for a prototype in the videos linked below. Access the full playlist here.

Description Video
Promotional video
PI Control Example
Frequency Response Example
LQR Control Example
Decentralized LQR Control Example
3D Printed Valve Assembly Tutorial

⚙️ Parts list

The full parts list is availble in spreadsheet format in bill-of-materials/bill-of-materials.xlsx.

Below the parts are listed among categories, with correponding cost as of 2021. The total cost is under 650€.

💎 Acrylic

Part Technical drawing Quantity Total cost
Reservoir bottom_tank.pdf 1 39€
Cylindrical tank with base tank_small.pdf / tank_large.pdf 4 133€
Slab #1 slab_1.pdf 1 8€
Slab #2 slab_2.pdf 1 8€
Slab #3 slab_3.pdf 1 8€
Slab #4 slab_4.pdf 1 8€
Slab #5 slab_5.pdf 1 8€
Cylindrical tube for sensor support sensor_tube.pdf 4 11€

🔩 Structural

Part Quantity Total cost
Zinc-plated threaded steel rod M8 x 1000mm 5 5€
ISO 4034 - M8 Hexagon Nut 60 2€
ISO 7093 - 8 Washer 45 9€
ISO 7091 - 8 Washer 15 2€
ISO 4015 - M4 x 20mm Hexagon Head bolt 32 3€
ISO 4035 - M4 Hexagon thin nuts chamfered 32 2€
ISO 7092 - 4 Washer 64 3€
M3 x 15mm Hex Spacer Female-Female 12 3€
ISO 7045 - M3 x 14mm bolt 12 2€
ISO 7045 - M3 x 6mm bolt 12 2€
Transparent flexible tubing 8mm x 11mm x 5000mm 1 6€
Transparent flexible tubing 12mm x 16mm x 5000mm 1 10€
Suction cup 2 2€
Rubber Washer 8mm x 14mm x 2mm 2 0.5€
Rubber Washer 9mm x 14mm x 2mm 4 1€
Rubber Washer 8mm x 12mm x 2mm 4 1€
Teflon tape 12 m 2 1€

🖨️ 3D printed

Part Solid Edge part file Quantity Total cost
Rod support rod_base.par 5 1.5€
Nut (Three-way valve) nut_diverting.par 2 0.5€
Pin (Three-way valve) regulator_pin_diverting.par 2 0.5€
Body (Three-way valve) body_diverting.par 2 1€
Nut (Upper/lower tank outlet valve) nutStraight.par 4 0.5€
Pin (Upper/lower tank outlet valve) regulator_pin3_straight.par 4 0.5€
Body (Upper tank outlet valve) body3_straight.par 2 0.5€
Body (Lower tank outlet valve) body3_straight_bottom.par 2 0.5€
Upper tank cap cap_tank_small.par 2 2€
Lower tank cap cap_tank_large.par 2 2€
Sensor mount sensor_support.par 8 2€
Flexible tube spacer D8 tube_support.par 4 0.5€
Flexible tube spacer D12 tube_support_large.par 1 0.5€

🔌 Connectors

Part Quantity Total cost
USB 2.0 A - mini USB B cable 1 2€
Multifilar 0.5mm$^2$ black wire - 5m 1 7€
Multifilar 0.5mm$^2$ red wire - 5m 1 7€
Multifilar 0.14mm$^2$ black wire - 5m 1 3€
Multifilar 0.14mm$^2$ red wire - 5m 1 3€
Multifilar 0.14mm$^2$ white wire - 5m 1 3€
5.5/2.1mm male DC plug 1 0.5€
5.5/2.1/14mm female DC plug 4 1€
NS25-G3 NINIGI plug 2 0.5€
NS25-G4 NINIGI plug 8 1€
NS25-G6 NINIGI plug 3 0.5€
NS25-T NINIGI contact 56 3€
NS25-W3P NINIGI socket 2 0.5€
NS25-W4P NINIGI socket 4 1€
NS25-W6P NINIGI socket 3 1€
NSR-06 NINIGI plug 2 0.5€
NDR-T NINIGI contact 12 1.5€
10-pin 2.54mm single row female pin header 2 0.5€
15-pin 2.54mm single row female pin header 2 1€

⚡ Electronics

Part Quantity Total cost
Arduino Nano 1 7€
Continuous Fluid Level Sensor PN-12110215TC-12 4 136€
VMA421 water pump 4 72€
100uF 25V electrolytic capacitor 4 0.5€
L298N Dual H-Bridge Driver 2 9€
ADS 1115 ADC 2 20€
14VDC 2.5A 35W power supply 1 21€
Bi-stable emergency button 1 12€
L7805ACP voltage regulator 1 3€
Custom PCB with connectors 1 35€

✨ Contributing

The community is encouraged to contribute with

  • Suggestions
  • Application examples

To contribute


📄 License

This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International Public License.


💥 References

L. Pedroso, P. Batista, Reproducible low-cost flexible quadruple-tank process experimental setup for control educators, practitioners, and researchers, Journal of Process Control. 118 (2022) 82–94. | [Download PDF]

@article{LPedrosoPBatista2022,
	title = {Reproducible low-cost flexible quadruple-tank process experimental setup for control educators, practitioners, and researchers},
	journal = {Journal of Process Control},
	volume = {118},
	pages = {82-94},
	year = {2022},
	issn = {0959-1524},
	doi = {https://doi.org/10.1016/j.jprocont.2022.08.010},
	author = {Leonardo Pedroso and Pedro Batista}
}