GPC control of a two-tank system

To illustrate how to control a nonlinear plant using GPC based on a locally linearized model

You are now following this Submission

This Simulink model is to illustrate the GPC control of a nonlinear plant based on a locally linearized model around the equilibrium point.
The nonlinear plant is a two-tank system described in the paper "Constrained Pole Assignment Control of a Two Tank System", 2014 15th International Carpathian Control Conference (ICCC), pp.52-57. The output is the level of tank 2. The level of tank 1 is not observed.

It consists of the following files:

TwoTank.mdl : the Simulink model
T2Tank.m : S-function of the plant
T2TankControl.m : S-function of the controller
GPCcoef.m : a function to compute the GPC coefficients based on
my paper "A novel DMC-like implementation of GPC"
radical.m : a simple function to compute sign(x)sqrt(|x|)

Users can try to modify the final value of the step function serving as the reference signal here (be sure not to deviate very much from the equilibrium, since we only use a local model here), start simulation, and see the output of the plant.

Copyright (c) 2014, Yiping Cheng, ypcheng@bjtu.edu.cn

Cite As

Yiping Cheng (2026). GPC control of a two-tank system (https://www.mathworks.com/matlabcentral/fileexchange/48471-gpc-control-of-a-two-tank-system), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Model Predictive Control Toolbox in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0