Skip to content

Wenlong-Codes/ExplicitML-MPC

Repository files navigation

Explicit Machine Learning-based Model Predictive Control of Nonlinear Processes via Multi-parametric Programming

1. Continuous Stirred Tank Reactor (CSTR) Example

  • Let us consider a second-order irreversible exothermic reaction A >> B:
 Figure: Schematic diagram of a CSTR
  • The first-principles equations (i.e., energy and material balance equations) for this system are given as follows:

  • Where,

    • 𝐶𝐴: Concentration of reactant A (kmol/m3)
    • 𝑇: Temperature of the reactor (K)
    • 𝐶𝐴0: Concentration of reactant A in the feed
    • 𝑄 : Heat input rate (kJ/h)
    • F: feed volumetric flow rate (m3/h)
    • 𝑇0: Inlet temperature (K)

The full description of the process parameters can be found at here

  • The State and Manipulated variables for this system are:

    • States variables: 𝐱=[𝐶A−𝐶As, 𝑇−𝑇s]
    • Control / Manipulated variables: 𝐮=[𝐶A0−𝐶A0s, 𝑄−𝑄s]

2. Develop Explicit ML-MPC for the CSTR

  • Step 1: Perform extensive open-loop simulations to obtain sufficient data for model training.

    Please refer to the files under the "Open-loop Simulation" folder

  • Step 2: Build a ML model to capture the nonlinear system dynamics of the CSTR.

    Please refer to the files under the "Train_Model" folder

  • Step 3: Approximate the nonlinear behavior of the trained ML model using piecewise linear affine functions.

    Please refer to the files under the "Space_discretization" folder

  • Step 4: Generate the solution maps for the discretized state-space via multi-parametric programming.

    Please refer to the file "GetExplicitML-MPC_Sols.py"

  • Step 5: Carry out closed-loop simulations to test the effectiveness of the Explicit ML-MPC.

    Please refer to the file "ExplicitML-MPC.py"

3. Citation

You can find our paper here

@article{wang2024explicit, title={Explicit machine learning-based model predictive control of nonlinear processes via multi-parametric programming}, author={Wang, Wenlong and Wang, Yujia and Tian, Yuhe and Wu, Zhe}, journal={Computers & Chemical Engineering}, pages={108689}, year={2024}, publisher={Elsevier} }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published