None Notebook

This notebook contains material from CBE30338; content is available on Github.

< 7.5 First Order System in Pyomo | Contents | Tag Index | 7.7 Transient Heat Transfer in Various Geometries >

Open in Colab

Download

7.6 Path Planning for a Simple Car

7.6.1 Required Installations

If run on Google Colab, it is necessary to install any needed solvers for each Colab session. The following cell tests if the notebook is run on Google Colab, then installs Pyomo and Ipopt if not already installed.

7.6.2 Kinematic Model

The following equations describe a simple model of a car

\begin{align} \frac{dx}{dt} & = v \cos(\theta) \\ \frac{dy}{dt} & = v \sin(\theta) \\ \frac{d\theta}{dt} & = \frac{v}{L}\tan(\phi) \\ \end{align}

where $x$ and $y$ denote the position of the center of the rear axle, $\theta$ is the angle of the car axis to the horizontal, $v$ is velocity, and $\phi$ is the angle of the front steering wheels to the car axis. The length $L$ is the distance from the center of the rear axle to the center of the front axle.

The velocity $v$ is controlled by acceleration of the car, the position of the wheels is controlled by the rate limited steering input $v$.

\begin{align} \frac{dv}{dt} & = a \\ \frac{d\phi}{dt} & = u \end{align}

The state of the car is determined by the value of the five state variables $x$, $y$, $\theta$, $v$, and $\phi$.

The path planning problem is to find find values of the manipulable variables $a(t)$ and $u(t)$ on a time interval $0 \leq t \leq t_f$ to drive the car from an initial condition $\left[x(0), y(0), \theta(0), v(0), \phi(0)\right]$ to a specified final condition $\left[x(t_f), y(t_f), \theta(t_f), v(t_f), \phi(t_f)\right]$ that minimizes an objective function:

\begin{align} J = \min \int_0^{t_f} \left( \phi(t)^2 + \alpha a(t)^2 + \beta u(t)^2\right)\,dt \end{align}

and which satisfy operational constraints

\begin{align*} | u | & \leq u_{max} \end{align*}

7.6.3 Pyomo Model

7.6.4 Accessing Solution Data

7.6.5 Visualizing Car Path

< 7.5 First Order System in Pyomo | Contents | Tag Index | 7.7 Transient Heat Transfer in Various Geometries >

Open in Colab

Download