A Virtual Process Control Experiment

Animation of the PID control experiment of a nonlinear process using MATLAB and Simulink simultaneously.
139 Downloads
Updated 15 Jan 2022

View License

Process description:
The process consists of two tanks connected in series via a long pipe. A water inlet, which acts as a disturbance, is connnected to the first tank, which has two outlets. One of the other outlets is adjusted via a pump, which acts as the manipulated variable. The other outlet is the inlet to the second tank due to gravity through a long pipe, through which friction is included to increase the nonlinearity and order of the process. The outlet of the second tank is through a constant valve opening. The aim of the process is to control the liquid height of the second tank (controlled variable).
Animation:
Unlike most simulations, the simulation results are not only given as time-trajectories on 2-d figures, but also as animations of the liquid flows, heights, and outlets demostrated on the tanks. Animations hopefully give students a more thorough view of concept of feedback control and appreciate concepts like process order, time lag, time delay, disturabance, etc.
Code:
There are three groups of codes: 1. openloop (simOL.m, openloop.slxc) simulation, 2. closedloop simulation (simCL.m, closedloop.slxc), 3. Nonlinear models of the tanks, required for both simulations (gravityflowsim.m, gravityflowsim2.m). You may directly type help simOL, or help simCL on MATLAB to see how a number of simple example runs. For instance
>> simOL([0 0 0], 100)
animates the process for 100 s, starting from a water height of 0 cm of both tanks. You may also change the process architecture in the simulink codes.
Notes:
I hope to give a detailed description of the code, but unitl then you may email me at burak.alakent@boun.edu.tr for more details.

Cite As

Burak Alakent (2024). A Virtual Process Control Experiment (https://www.mathworks.com/matlabcentral/fileexchange/104175-a-virtual-process-control-experiment), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.2.0.2

A few spelling mistakes corrected

1.2.0.1

Description has been changed.

1.2.0.0

Simultaneous Simulink simulation-MATLAB animation performed.

1.0.0