Based on work done by Eka Suwartadi: Implementation of path-following algorithm for LICQ case study. Eka's work was utilised throughout this project to create an equivalent but more generic algorithm in Python. If desired, users can utilise the path-following algorithm for other systems if they simply use their own model and create a structure similar to that for the CSTR+Distillation column system used here.
To use the code the following elements are required to be installed:
This code implements economic NMPC using a path-following algorithm.
The scripts work as follows:
- Steady state optimization
- Edit
params.py
to have desired column and CSTR parameters - Run
Col_CSTR_SS.py
- Requires the following scripts:
params.py
nlp_solve.py
- Creates files used later for dynamic optimization:
CstrDistXinit.mat
- contains steady state optimal input
LambdaCstrDist.mat
- contains steady state optimal Lagrange multipliers
Qmax.mat
- Greshgorin convexification objective function weights
- Requires the following scripts:
- Run
noise.py
- Creates noise to be used later in dynamic optimisation
noise1pct.mat
- 1 percent Gaussian distributed measurement noise that is added to the states
- Creates noise to be used later in dynamic optimisation
- Edit
- Dynamic Optimization
- Main file:
process_main.py
- Select whether to run Ideal Nonlinear Model Predictive Control (iNMPC) or Path Following Nonlinear Model Predictive Control (pfNMPC)
- Main file:
The distillation column model used was developed by Sigurd Skogestad and is referred to as "Column A".
Details of the model and the original files can be found on his website.
Simple first order reaction A ->B