Specifications

5 Designing and Testing Controllers in Simulink
5-2
Design Controller in Simulink
This example shows how to design a model predictive controller in Simulink.
Suppose you have built a nonlinear plant model in Simulink. You want to design an MPC
controller at a specific equilibrium operating point. This example shows that model-based
design workflow. You linearize the plant at the desired operating point, design the MPC
controller and validate it with nonlinear simulation.
Continuous Stirred Tank-Reactor Model
The Simulink model, CSTR_ClosedLoop, models a continuous stirred tank-reactor
(CSTR) plant. A model predictive controller regulates the CSTR plant.
open_system('CSTR_ClosedLoop');
CSTR Plant
The CSTR block, which models the nonlinear plant, has three inputs:
Feed Concentration (CAi inport) — Concentration of the limiting reactant in the
CSTR feed stream.
Feed Temperature (Ti inport) — Temperature of the limiting reactant in the CSTR
feed stream.
Coolant Temperature (Tc inport) — Temperature of the CSTR coolant. The MPC
controller (MPC Controller block) treats this plant input as a manipulated variable.
The CSTR block has two states: the temperature and concentration of the limiting
reactant in the reactor. These states are measured and displayed by the following blocks: