Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 2.9 KB

README.md

File metadata and controls

42 lines (28 loc) · 2.9 KB

Project 4: Machine Learning for PID Control

This repository contains the supporting files for our CSCE 635 project submission. This includes:

  • MATLAB, Python, and C++ code
  • Simulink models
  • Simulation data
  • Jupyter notebooks for data analysis
  • Report in LaTeX

p-v-gpid

The souce code was developed for implementation into EMILY's existing platform. The GPID class is a stand alone class that can be utilized for multiple applications. The GPID class can be simply used by generating an object, and then calling the propagate_net method each loop with error and measurement as inputs, respectively. The GPID class utilizes the gpid_setup.txt file to initialize the starting weights, and toggle learning mode on/off. The gpid_setup file is a TAB delimited file, and is structured as [training_bool P_neuron_weight I_neuron_weight D_neuron_weight].

The Control class is an adaptation from the existing Control class to implement the GPID and LOS control algorithms.

The simulations were executed with a proof-of-concept implementation of the GPID algorithm in Python, which can be found in the module gradient_tuning.py. The two models sim_GPID_LOS.slx and sim_P_LOS.slx contain the simulation dynamics and must be executed by running exec_sim_main.m.

The simulations require the following MATLAB m-files:

  • init.m, which initializes the Python network and trainer objects.
  • intertrial.m, which clears the network memory between trials
  • structures.m or structures_random.m, which intializes environment variables and parameters for the trials
  • update_wrap.m which updates the Python network trainer object and logs the states
  • param.mat, contains EMILY's physical parameters

The simulations also require the Simulink library emily.slx, which contains the definitions of the dynamic model and LOS controllers.

The jupyter notebooks serve to document the analysis and the results in a single framework. The following notebooks are included:

The report and .tex file and supporting figures.