| Title | Convexified contextual optimization for on-the-fly control of smooth systems |
|---|---|
| Authors | Abraham P. Vinod, Arie Israel, and Ufuk Topcu |
| Conference | American Control Conference, 2020 |
This repository provides codes to reproduce the figures of the paper.
- Correct-by-construction approximation bounds under smoothness, convexity, and monotonicity
- Empirical comparison of the proposed approach,
C2Opt, withSINDYc,CGP-LCB, and the true one-step optimal trajectory
Use $ conda env create -f conda_env_for_acc2020.yml to get the exact
environment used for developing and testing this code. Please perform step 4
below to install coveropt.
- Create conda environment
$ conda create -n acc2020_c2opt python=3.7 scipy matplotlib jupyter tqdm pandas
- (optional) Install
gurobi$ conda install -c gurobi gurobi- Availability of
gurobiprovides for a faster computation. However, its use requires a license (see https://www.gurobi.com/ for more details).
- Install
cvxpyandgpyopt$ pip install cvxpy gpyopt==1.2.5- Free software alternative to
gurobi(See www.cvxpy.org for more details)
- Install
coveropt(v0.1)$ cd coveropt && pip install -e . && cd ..
- Run
$ jupyter notebookand then open the desired notebook.
Approximation bounds via side information.ipynborApproximation bounds via side information.pygenerates Figures 1 and 2BoundsWithSideInfo.pyprovides the class that usescoveropt/coveropt/classes/LipSmoothFun.pyto implement the correct-by-construction bounds
One-step control of unicycle.ipynborOne-step control of unicycle.pygenerates Figures 3 and 4MyopicDataDrivenControl.pyprovides the base class for one-step control of unknown dynamicsMyopicDataDrivenControlSINDYc.pyimplements the SINDYc method via LASSO- See Kaiser, Eurika, J. Nathan Kutz, and Steven L. Brunton. "Sparse identification of nonlinear dynamics for model predictive control in the low-data limit." Proceedings of the Royal Society A 474.2219 (2018): 20180335 for more details
MyopicDataDrivenControlContextGP.pyimplements the approach utilizing Contextual Gaussian Process optimized via lower confidence bound. This method utilizesgpyopt.- See Krause, Andreas, and Cheng S. Ong. "Contextual gaussian process bandit optimization." Advances in neural information processing systems. 2011 and https://github.com/SheffieldML/GPyOpt for more details
MyopicDataDrivenControlTrue.pyprovides a benchmark solution --- the optimal one-step trajectory under the knowledge of the dynamics. It usesscipy.optimizeto solve the one-step receding horizon control problem.coveropt/coveropt/classes/applications/C2Opt/implements the proposedC2Optmethod.
Please contact Abraham Vinod (aby.vinod@gmail.com) for bugs or questions regarding this code.