Recurrent Neural Network (RNN) model with difference-of-convex-functions (DC) structure.
Learn dynamical systems from data using Recurrent Neural Network (RNN) models with a special
difference-of-convex-functions (DC) structure. The so-called DC-RNN model approximates the
system trajectories by a DC input-output map between the control input sequence and state trajectory.
The DC-RNN model is leveraged in this example to predict the trajectory of the
coupled tank
dynamical system.
- Python 3
- Keras
You need to install the following:
- numpy
- matplotlib
- tensorflow / keras
Run the following command to install all modules at once
pip3 install numpy matplotlib tensorflow
-
Clone the repository
git clone https://github.com/martindoff/DC-RNN.git
-
Go to directory
cd DC-RNN
-
(Optional) Generate data from the dynamical system
python3 generate_data.py
The data are stored in two files:
input.npy
andoutput.npy
-
Run the program
python3 DC_RNN_model.py
- To load an existing model, set the
load
variable inDC_RNN_model.py
toTrue
load = True
Set the variable to False
if the model has to be (re)trained.
Such model have applications, e.g. in the framework of robust tube MPC for systems representable as a difference of convex functions (see paper on DC-TMPC) The DC-RNN model allows one to learn the dynamics in DC form and then apply the DC-TMPC algorithm.
Martin Doff-Sotta - martin.doff-sotta@eng.ox.ac.uk
Linkedin: https://www.linkedin.com/in/mdoffsotta/