5 Car

5.1 Dynamics
- Parameters
- \(L\): distance between the wheels [m]
- state space \(\mathcal{X}\)
- action space \(\mathcal{U}\)
- State: \(\mathbf{x}= \begin{pmatrix}x, y, \theta\end{pmatrix}^\top \in \mathcal{X}\) [m, m, rad] (position and orientation of the robot in the world frame)
- Action: \(\mathbf{u}= \begin{pmatrix} v, \phi \end{pmatrix}^\top \in \mathcal{U}\) [m/s, rad] (speed and front wheel angle, respectively)
- Dynamics: \[ \begin{aligned} \dot x &= v \cos \theta\\ \dot y &= v \sin \theta\\ \dot \theta &= \frac{v}{L} \tan \phi \end{aligned} \]
5.2 Differential Flatness
Pick flat outputs \(\mathbf{z}(t) = (x(t), y(t))^\top\), i.e., the position of the unicycle. Then we can compute all necessary variables if \(\mathbf{z}(t)\) is at least C2-continuous. \[ \begin{aligned} \mathbf{x}(t) &= g_x(\mathbf{z}, \dot{\mathbf{z}}) = \left(x, y, \arctan \left(\frac{\dot y}{\dot x}\right)\right)\\ \mathbf{u}(t) &= g_u(\dot{\mathbf{z}}, \ddot{\mathbf{z}}) = \left({\color{red} \pm}\sqrt{\dot y^2 + \dot x^2}, \arctan \frac{L(\dot x \ddot y - \dot y \ddot x)}{(\dot x^2 + \dot y^2)^{3/2}} \right) \end{aligned} \]
Divide y and x-part of the dynamics, yields \(\theta\): \[ \begin{aligned} \frac{\dot y}{\dot x} &= \frac{v \sin \theta}{v \cos \theta}\\ \frac{\dot y}{\dot x} &= \tan \theta\\ \theta &= \arctan \left(\frac{\dot y}{\dot x}\right) \end{aligned} \]
Using the x-part, rearranging for \(v\) and substituting the expression for \(\theta\), yields \(v\): \[ \begin{aligned} v &= \frac{\dot x}{\cos \theta}\\ &= \frac{\dot x}{\cos \left(\arctan \left(\frac{\dot y}{\dot x}\right)\right)}\\ &= \dot x \sqrt{\frac{\dot y^2}{\dot x^2} + 1} = \dot x \sqrt{\frac{\dot y^2}{\dot x^2} + \frac{\dot x^2}{\dot x^2}}\\ &= {\color{red} \pm}\sqrt{\dot y^2 + \dot x^2} \end{aligned} \]
Taking the time-derivative of the expression for \(\theta\) yields \(\dot \theta\) \[ \begin{aligned} \dot \theta &= \frac{d}{dt} \arctan \left(\frac{\dot y}{\dot x}\right)\\ &= \frac{\dot x \ddot y - \dot y \ddot x}{\dot x^2 + \dot y^2} \end{aligned} \]
\[ \begin{aligned} \phi &= \arctan \frac{L \dot \theta}{v}\\ &= \arctan \frac{L(\dot x \ddot y - \dot y \ddot x)}{(\dot x^2 + \dot y^2)^{3/2}} \end{aligned} \]
5.3 Invariance
The dynamics are translation-invariant.
5.4 Controllers
5.5 Useful Parameters
5.5.1 car1_v0
A basic version proposed at (Hönig, Ortiz-Haro, and Toussaint (2022); Ortiz-Haro et al. (2024)) \[ \begin{aligned} L &= 0.25 m\\ \mathcal{U}&= [-0.1, 0.5] m/s \times [-\pi/3, \pi/3] rad \end{aligned} \]