Learning Certified Control using Contraction Metric

Abstract: In this paper, we solve the problem of finding a certified control policy that drives a robot from any given initial state and under any bounded disturbance to the desired reference trajectory, with guarantees on the convergence or bounds on the tracking error. Such a controller is crucial in safe motion planning. We leverage the advanced theory in Control Contraction Metric and design a learning framework based on neural networks to co-synthesize the contraction metric and the controller for control-affine systems. We further provide methods to validate the convergence and bounded error guarantees. We demonstrate the performance of our method using a suite of challenging robotic models, including models with learned dynamics as neural networks. We compare our approach with leading methods using sum-of-squares programming, reinforcement learning, and model predictive control. Results show that our methods indeed can handle a broader class of systems with less tracking error and faster execution speed. Code is available at https://github.com/sundw2014/C3M. The paper is available at https://arxiv.org/abs/2011.12569.

Problem definition

Formally, given a control-affine system x˙=f(x)+B(x)u, we want to find a feedback controller u(,,), so that for any reference (x(t),u(t)) solving the ODE, the closed-loop system perturbed by d x˙=f(x(t))+B(x(t))u(x(t),x(t),u(t))+d(t) satisfies that the tracking error |x(t)x(t)| is upper bounded, for all |d(t)|ϵ and all initial condition x(0)X.

Contraction analysis

Contraction analysis can be viewed as a differential version of Lyapunov’s theory. It analyzes the incremental stability by considering the evolution of the distance between two neighboring trajectories of the system. Lyapunov’s theory considers whether the trajectories will finally converge to a point (equilibrium), while contraction theory considers whether all the trajectories converge to a common trajectory. Control contraction metric (CCM) theory extends the analysis to cases with control input, which enables tracking controller synthesis.

Consider a system x˙=f(x)+B(x)u, its virtual displacement δx between any pair of arbitrarily close neighboring trajectories evolves as δ˙x=A(x,u)δx+B(x)δu, where A(x,u):=fx+i=1muibix.

We say M:XSn0 is a CCM if there exists a controller u(x,x,u) s.t. x,x,uX×X×U, δxTxX, ddt(δxM(x)δx)λδxM(x)δx, which implies δxM:=δxM(x)δx converges to zero exponentially at rate λ. Such a closed-loop system is referred to be contracting (under metric M), which implies good tracking performance.

ddt(δxM(x)δx)λδxM(x)δx,δx,x,x,u, δ˙x=A(x,u)δx+B(x)δu, is equivalent to x,x,u, M˙+sym(M(A+BK))+2λM0,     () where K:=ux and sym(A)=A+A.

Learning a controller with a controller

The learning framework.

The loss function is designed as follows.

LM,u(θM,θu):=Ex,x,uUnif[LNSD(M˙+sym(M(A+BK))+2λM)], where LNSD:Rn×nR and LNSD(A)=0 iff. matrix A is negative semi-definite.

Obviously, by assuming the LHS of () is continuous, LM,u=0        () holds x,x,uX×X×U.

Experimental results

The above figures show the tracking error of the proposed method and several others. The proposed method outperforms all the others. It is worth mentioning that Quadrotor is a 9-dimensional system, and part of the dynamics of Neural Lander is represented as an NN.

Leave a Reply