This repo contains code for performing nonlinear model predictive control (NMPC) that weights information gain to aid parameter estimation and improve system peformance. Information gain is measured using Fisher information of uncertain system parameters and appropriately weighting this information gain in the NMPC cost function. Full details can be found in the paper [Albee and Ekal, 2019].
The documentation for this repo is a work in progress. Code files are fairly densely commented for explanation--NMPC_6DoF_main.m
is a good starting point.
- Install the ACADO Toolkit, following the instructions here. Be sure to add ACADO to your path, which can be done in
NMPC_6DoF_main.m
. - Run
generate_NMPC_solver_6DoF.m
in the ACADO_generator/ folder. - Run
generate_simulator_6DoF.m
in the ACADO_generator/ folder. - Run
NMPC_6DoF_main.m
.
-
NMPC_6DoF_main
- main file, which runs a simulation of the system dynamics, information-weighted NMPC, and an estimator -
Run_UKF
_ - unscented Kalman filter class, called by the main file -
plot_results_general_no_estimates
- a custom plotting script, called by the main file -
ACADO_generator/
- contains two MATLAB scripts that create the NMPC and dynamics simulation, respectively -
ACADO_generator/generate_NMPC_solver_6DoF
- handles creating a weighting matrix, state vector, Fisher information terms, and interfacing with the ACADO NMPC API -
ACADO_generator/generate_simulator_6DoF
- handles the 6DoF rigid body dynamics and interfacing with the ACADO API to generate a fast solver
Here is an animation of the results:
- When Fisher information weighting and on-the-fly updates of the estimated parameters are used
- Without information weighting and estimator updates, i.e, the controller uses uncertain parameters