Skip to content

hardikparwana/Safe-Learning-DASC

Repository files navigation

Safe-Learning-DASC

This repository implements our ICRA 2022 submission on

Recursive Feasibility Guided Optimal Parameter Adaptation of Differential Convex Optimization Policies for Safety-Critical Systems

https://ieeexplore.ieee.org/abstract/document/9812398

Authors: Hardik Parwana and Dimitra Panagou, University of Michigan

An arxiv version can be found at https://arxiv.org/abs/2109.10949

Note: this repo is under development. While all the relevant code is present, we will work on making it more readable and customizable soon! Stay Tuned!

Description

We pose the question:

What is the best we can do given a parametric controller? How to adapt their parameters in face of different external conditions? And what if the controller is an optimization problem itself? Can we maintain feasibility over a horizon if we change the parameter? In other words, how do we relate (optimization based) state-feedback controllers(that depend on current state only) to their long-term performance.

qp_controller

We propose a novel combination of backpropagation for dynamical systems and use FSQP algorithms to update parameters of QP so that:

  1. Performance is improved with guarantees of feasible trajectory over the same time horizon.
  2. The horizon over which the QP controller remains feasible is increased compared to its previous value.

Dependencies

The code was run on Ubuntu 20 with Python 3.6 and following packages

  • cvxpy==1.1.14
  • cvxpylayers==0.1.5
  • torch==1.9.0
  • matplotlib==3.3.4
  • numpy==1.19.5

In addition to above dependencies, run source export_setup.sh from main folder to set the paths required to access submodules.

1D Autonomous Car

To examine how the car behaves with different values of parameters, see our notebook example car_example.ipynb.

For running our algorithm to increase horizon for feasibility of QP controller, run the following code where you should be able to see improvement of time at which QP fails.

python QPpolicy/QPpolicyTorchCar.py 

Following figures show how parameters change with each step of proposed GD

a = 2.5, b=4.5 a = 1.0, b = 3.0 a = 3.0, b = 1.0
param1 param2 param3

paper_car

Unicycle Follower

Run the following code

python QPpolicy/QPpolicy.py
Adaptive Parameters (proposed) Constant Parameter Reward Plot

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published