8 Demonstration examples (downloadable)

In order to illustrate some numerical methods implemented in the HJB Solver some elementary control problems are given below. For each example a Graphical User’s Interface is proposed. It allows to define the parameters of the model, the numerical method chosen to solve it. For time optimal control problems it is possible to compute the optimal trajectories for different initial conditions.

The graphical interfaces are developed with MATLAB (2015) and require a MATLAB licence to run.

8.1 Dubin’s car example

Go to Download links


We consider the navigation problem for a ground vehicle that has the objective to reach a target before some given time T . The state of the system is characterized by the state vector (x,y,θ) where (x,y) are the 2D-coordinates of the center of mass of the vehicle in a given reference frame, and θ is the angle between the velocity vector and the x-axis (the direction of the vehicle) The state space is therefore

ℝ × ℝ ×  [0,2 π].
\relax \special {t4ht=

The motion of the vehicle obeys the following dynamics:

({  x′ = u cos(θ)
    ′
(  y′ = u sin(θ)
   θ =  ω
\relax \special {t4ht=

(26)

where u, the modulus of the velocity, is assumed constant, and w, the control input, is the angular speed and satisfies ω [ωminmax] with adjustable parameters ωminmax. It is possible to fix the time horizon, T , the vehicle’s velocity u, the position and the shape of the target set (disc or rectangle). On can also choose up to 4 obstacles that the vehicle has to avoid during its trajectory to reach the target. These obstacles are considered as state constraints on the variables (x,y).


pict
(a) Example of reachable set
pict
(b) Some optimal trajectories
Figure 1: Examples of outputs for Dubin’s car model


The first step of the simulation computes and plots the reachable set corresponding to the fixed parameters, as in Figure 1-(a). After the computation of the reachable set it is possible to reconstruct optimal minimum time trajectories by choosing different initial conditions (see Figure 1-(b)).

A demonstrative GUI is available for different OS.

8.2 Zermelo’s navigation example

Go to Download links


In this example, we consider a ship moving with contant relative velocity in a river of a given width. We assume also that the current’s velocity is known, and the state of the system is the position (x,y) of the ship. The motion is given by a nonlinear system in 2 controlled by the steering direction θ [0, 2π]. The evolution of the swimmer is governed by the control system

   ({  x′ = c - ay2 + ucos(θ)
       ′
F :(  y =  u sin(θ)
\relax \special {t4ht=

(27)

The ship aims to join an island (disc of radius R, where the parameter R can be chosen by the user).


pict

Figure 2: Graphical interface for Zermelo’s navigation model


Figure 2 shows the interface for this model. It is possible to fix the time horizon, T , the ship’s velocity, u, and the position of the target set (disc). The user can also choose up to 2 obstacles in the environnement. In this example, the first step of the simulation computes and plots the backward reachable set within time T , as on the figure 3 (left). After the computation of the reachable set it is possible to reconstruct optimal minimum time trajectories by choosing different initial conditions (see Figure 3 (right)).


pict

pict

Figure 3: Backward reachable set for Zermelo’s navigation problem (left). Optimal trajectories (right)


A demo is available corresponding to different OS.

8.3 Advection example

Go to Download links


This interface allows to compare four numerical methods for solving a linear HJ-equation (Advection-rotation example):

∂v-+ H (x, ∇ ) = 0,   with v (x, 0) = v (x),
∂t          x                        0
\relax \special {t4ht=

with the Hamiltonian defined by:

H (x,∇xv ) = (- f(x1,x2)) ⋅ ∇xv
\relax \special {t4ht=

and f : 2 2 is a rotational dynamics:

            (         )
f (x1,x2) =   - 2πx2    .
               2πx1
\relax \special {t4ht=

In this example, different numerical methods can be compared:


pict

Figure 4: Graphical interface for the Advection model


Figure 4 shows the interface for this problem. It is possible to fix the time horizon, T , the radius of the target set (disc). During the simulation, some local error estimates (in L, L1, and L2) are printed on the Matlab workspace.

A demo is available corresponding to different OS.