Using LSTM with GEKKO MPC

399 views Asked by At

After using GEKKO to model a ARX MPC based on process data for multi-stage evaporation station, I wanted to see how the prediction model stand up to an LSTM prediction control, however I have trouble connecting the LSTM model (saved as .h5) to the GEKKO MPC.

Hence my 2 questions

  1. Is it possible to use an LSTM with GEKKO?
  2. Do there exist literature or cases where this have been done?
1

There are 1 answers

0
John Hedengren On BEST ANSWER

Gekko doesn’t allow models from other packages such as the h5 model but it could probably be created if you have the drive to translate the model. Here are two options:

  1. Convert the RNN model to Gekko format. There is an example of a Keras neural network model and Gekko neural network model. Gekko allows additional activation functions beyond the typical and uses a different strategy (nonlinear programming solvers) for regression.

Keras Neural Network

  1. Use a shooting method for MPC with an optimizer like scipy.optimize.minimize(). There is an example of this approach at the bottom.

MPC Python