Loading [MathJax]/jax/output/HTML-CSS/jax.js

Problem Statement

This problem serves as an example of bang-bang control which often arise when the control input u(t) appears linearly in the cost function. We consider a single double integrator moving in one dimension which has two control inputs with end-point constraints. minJ=tf0u(t)dts.t.˙x(t)=v(t)˙v(t)=Gv(t)+u(t)b(t)0u(t)umax0b(t)bmaxx(0)=x0,x(tf)=xfv(0)=0,v(tf)=0 In words, x(t) is the position, v(t) is the velocity, u(t) is the forward force while b(t) is the braking force. We assume that x0<xf. The vehicle starts at some position x0 at rest and arrives at its destination, xf, and stops.

Solution

As usual, we write the Hamiltonian of the optimal control problem. H=u(t)+λx(t)v(t)Gλv(t)v(t)+λv(t)u(t)λv(t)b(t)+μu(t)u(t)+μb(t)b(t) We first write the stationarity conditions, Hu=1+λv(t)+μu(t)=0μu(t)=1λv(t) and Hb=λv(t)+μb(t)=0μb(t)=λv(t) The complementarity condition determines when we are accelerating or braking or neither. μu(t){0,u(t)=0=0,0<u(t)<umax0,u(t)=umax and μb(t){0,b(t)=0=0,0<b(t)<bmax0,b(t)=bmax The co-position is governed by the dynamics, ˙λx(t)=Hx=0λx(t)=λx(tf) which is constant and the co-velocity state is governed by the dynamics, ˙λv(t)=Hv=λx(t)+Gλv(t)λv(t)=eG(tft)λv(tf)+tfteG(tτ)λx(tf)dτ=eG(tft)λv(tf)+λx(tf)G[1eG(ttf)] Note that λv(t) is an exponential function, that is, there does not exist a finite time interval over which λv(t)=0. This means that μu(t)=0 and μb(t)=0 only for single values of t. From the complementarity conditions, this quick switching implies jumps between the minimum input and maximum input. The switching structure we hypothesize is the following:

  1. For tI1=[0,t1), we are fully accelerating, i.e., u(t)=umax, while we are not braking, that is, b(t)=0.
  2. For tI2=(t1,t2), we are coasting, that is, u(t)=b(t)=0.
  3. Finally, for tI3, we are fully braking, that is, b(t)=bmax and u(t)=0.
With this switching structure in mind, we can compute the optimal velocity from the following expressions for the optimal controls. u(t)=(1H(t,t1))umax and b(t)=H(t,t2)bmax where H(t,ˉt) is the Heaviside step function which is equal to zero when t<ˉt and is equal to one when tˉt. v(t)=t0eG(tτ)u(τ)dτ+t0eG(tτ)b(τ) These integrals can be solved in terms of the three intervals. v(t)={umaxG(1eGt),tI1umaxGeGt(eGt11),tI2umaxGeGt(eGt11)bmaxG(1eG(t2t)),tI3 In a similar fashion, we can determine the optimal position velocity by integrating the velocity. x(t)=t0v(τ)dτ+x0={umaxG2[eGt1+Gt],tI1umaxG2[Gt1+eG(t1t)+eGt],tI2umaxG2[Gt1+eG(t1t2)+eGt2]+umaxG2[(eGt11)(eGt2eGt)]bmaxG2(tt2)(1eG(t2t)),tI3