I'm having trouble with the following problem:

$$\begin{array}{ll} \text{minimize} & J := \displaystyle\int_{t_0}^{t_f} 1 \,\mathrm{d}t\\ \text{subject to} & \dot{v}(t)=-9.8\sin(\theta)+u(t)-\frac{1}{m}F_a(t)\end{array}$$


  • $\theta$ is the terrain inclination.

  • $F_a$ is the aerodynamic drag, given by

\begin{equation*}F_a(t)=\frac{1}{2} \rho A C_d \big( v(t)-v_{\text{wind}}(t) \big)^2\end{equation*}

  • $\rho$ is the air density.

  • $A$ is the frontal area of the vehicle.

  • $C_d$ is the drag coefficient.

  • $v_{\text{wind}}$ is the wind velocity.

  • $m$ is the mass of the car.

  • $u(t)$ is the acceleration due to the accelerator or deceleration due to the brake system. The acceleration satisfies $-\beta \le u(t)\le \alpha$, where $\alpha > 0$ is the maximum acceleration which depends on the capability of the engine and $\beta>0$ is the maximum deceleration which is limited by the braking system parameters.

Further, if $t_0$ is the time leaving from point A, and $t_f$ is the time of the arrival at point B, then


and the speed limit on the road is $40km/h$.

  1. I think that the Hamiltonian function is \begin{equation}H=1+\lambda [-9.8\sin(\theta)+u(t)-\frac{1}{2m}\rho AC_d(v(t)-v_{\text{wind}}(t))^2]\end{equation}
  2. How is the optimal control function $u^*(t)$ expressed?
  3. How is the optimal velocity $v^*(t)$ expressed?
  • $\begingroup$ add the physics tag $\endgroup$ – T.D. Jun 17 '18 at 17:43
  • 1
    $\begingroup$ If the ODE is nonlinear (quadratic in $v$), why are you trying to use a linear state-space model? $\endgroup$ – Rodrigo de Azevedo Jun 17 '18 at 19:27
  • $\begingroup$ Wouldn't the solution just be bang-bang, so first maximum acceleration and a jet unknown time which to maximum deceleration. $\endgroup$ – Kwin van der Veen Jun 17 '18 at 21:55
  • $\begingroup$ @KwinvanderVeen The optimal control is $u^*(t)=-\beta$ if $t_0≤t<T$ and $u^*(t)=\alpha$ if $ T≤t≤t_f$ $\endgroup$ – VarúAnselmo Sui Jun 18 '18 at 1:31


$$ H =1+\lambda(t) \left(-g\sin(\theta)+u(t)-\frac{1}{2m}\rho AC_d(v(t)-v_{\text{wind}}(t))^2\right) $$

we need a control $u^*$ such that $H(v,u^*,\lambda) = 0$ or

$$ u^*(t) = \frac{A C \rho _d(v(t)-v_w(t))^2}{2 m}+g \sin (\theta )-\frac{1}{\lambda(t) } $$

and then knowing that

$$ \dot\lambda = -\frac{\partial H}{\partial v}\\ \dot v = \frac{\partial H}{\partial \lambda} $$

we have

$$ \dot\lambda(t) = \frac{A C_d \rho \lambda (t) (v(t)-v_w(t))}{m}\\ \dot v(t) = -\frac{1}{\lambda(t)} $$

we didn't consider the state restriction $v \le v_{max}$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.