CSTR Optimal Control with Quasilinearization Method

版本 1.0.7 (244.0 KB) 作者: Alireza Esmailnezhad
Implementation of optimal control for a CSTR system using QL method to maintain temperature & concentration close to steady state values.
16.0 次下载
更新时间 2025/1/10

查看许可证

The Continuous Stirred-Tank Reactor (CSTR) is a key system in chemical engineering, used to model reactions and control processes in various industries. This project demonstrates the application of Optimal Control techniques using the Quasilinearization Method to manage and optimize the temperature and concentration states of the reactor. The implementation is based on Example 6.4-3 from the textbook "Optimal Control Theory: An Introduction" by Donald E. Kirk.
State Equations:
The system's dynamics are modeled by the following state equations, describing the deviations in temperature and concentration:
Where:
  • x1(t) = T(t): Deviation of temperature from steady-state.
  • x2(t) = C(t): Deviation of concentration from steady-state.
  • u(t): Normalized coolant flow control input.
Initial Conditions:
The initial conditions for the system are:
Performance Measure:
The control objective is to minimize the following performance measure J, which penalizes deviations in the states and the control effort:
Where:
  • R=0.1: Control weight parameter.
Control Objective:
The goal is to design an optimal control law to minimize J over a fixed-time t ∈ [0, 0.78] while ensuring that the system's states are efficiently regulated. The solution employs quasi-linearization techniques to iteratively refine the control and trajectory.
Quasi-linearization (QL):
It is an iterative numerical optimization method used to solve nonlinear optimal control problems. Here's how it works:
  1. Linearization: The nonlinear system dynamics and costate equations are linearized around an initial guess for the state and costate trajectories.
  2. Solve Linear Equations: The linearized system is split into homogeneous and non-homogeneous parts. Homogeneous solutions are computed first, followed by particular solutions.
  3. Superposition Principle: The overall solution is constructed as a combination of the homogeneous solutions, scaled by coefficients (determined using boundary conditions), and the particular solution.
  4. Update Trajectories: The new trajectories for state and costate variables are calculated and used to update the previous guess.
  5. Convergence Check: The norm of the difference between successive trajectories is evaluated. If the difference is below a specified threshold (e.g., γ), the algorithm converges.
  6. Iteration: If not converged, the process repeats by linearizing around the updated trajectories.
The figure below shows result of optimal trajectories for stare and costate and optimal control effort with predefined conditions and γ=0.001:

引用格式

Alireza Esmailnezhad (2025). CSTR Optimal Control with Quasilinearization Method (https://www.mathworks.com/matlabcentral/fileexchange/178884-cstr-optimal-control-with-quasilinearization-method), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2024a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.7

edit description

1.0.6

edit description

1.0.5

edit description

1.0.4

edit description

1.0.3

edit description

1.0.2

edit description

1.0.1

update description

1.0.0