9 Multirotor (2D)
9.1 Dynamics
- Parameters
- state space \(\mathcal{X}\in \mathbb R^4 \times SO(2) \times \mathbb R\)
- action space \(\mathcal{U}\in \mathbb R^2\)
- mass \(m \in \mathbb R^+\) [kg]
- Arm length \(l \in \mathbb R^+\) [m]
- inertia \(\mathbf J_{yy} \in \mathbb R^+\) [\(kg\cdot m^2\)]
- gravity \(g \in \mathbb R\) [\(m/s^2\)]
- State: \(\mathbf{x}= \begin{pmatrix}x, \dot x, z, \dot z, \theta, \dot \theta\end{pmatrix}^\top \in \mathcal{X}\)
- position \(x \in \mathbb R\) [m]
- height \(z \in \mathbb R\) [m]
- velocities \(\dot x \in \mathbb R\), \(\dot z \in \mathbb R\) [m/s]
- rotation around \(x\)-axis \(\theta \in SO(2)\) [rad]
- angular velocity \(\dot \theta \in \mathbb R\) [rad/s]
- Action: \(\mathbf{u}= \begin{pmatrix} f_1, f_2 \end{pmatrix}^\top \in \mathcal{U}\)
- thrust left \(f_1 \in \mathbb R^+\) [N]
- thrust right \(f_2 \in \mathbb R^+\) [N]
- Dynamics: \[ \begin{aligned} \mathbf{\dot x} = f(\mathbf x, \mathbf u) = \begin{pmatrix} \dot x\\ \frac{-(f_1 + f_2) \sin \theta}{m}\\ \dot z\\ \frac{(f_1 + f_2) \cos \theta}{m} - g\\ \dot \theta\\ \frac{(f_2 - f_1) l}{\mathbf J_{yy}} \end{pmatrix} \end{aligned} \]
9.2 Differential Flatness
Pick flat outputs \(\mathbf{z}(t) = (x(t), z(t))^\top\), i.e., the position of the robot. Then we can compute all necessary variables if \(\mathbf{z}(t)\) is at least C4-continuous. \[ \begin{aligned} \mathbf{x}(t) &= g_x(\mathbf{z}, \dot{\mathbf{z}}, \ddot{\mathbf{z}}, \dddot{\mathbf{z}}) = \ldots\\ \mathbf{u}(t) &= g_u(\ddot{\mathbf{z}}, \dddot{\mathbf{z}}, \ddddot{\mathbf{z}}) = \ldots, \end{aligned} \] See derivation below for the exact expressions needed.
\(\theta\)
From the dynamics we have: \[ \ddot{x} = \frac{\left(- f_{1} - f_{2}\right) \sin{\left(\theta \right)}}{m} \]
\[ \ddot{z} = - g + \frac{\left(f_{1} + f_{2}\right) \cos{\left(\theta \right)}}{m} \]
Solving for sum of forces and rearranging: \[ - \frac{m \ddot{x}}{\sin{\left(\theta \right)}} = \frac{m \left(g + \ddot{z}\right)}{\cos{\left(\theta \right)}} \]
Dividing and solving for \(\theta\): \[ \theta = - \operatorname{atan}{\left(\frac{\ddot{x}}{h_{1}} \right)} \]
where: \[ h_{1} = g + \ddot{z} \]
\(\dot \theta\)
Take time derivative of \(\theta\) from step 1 to obtain: \[ \dot{\theta} = \frac{- h_{1} \dddot{x} + \dot{h_{1}} \ddot{x}}{h_{1}^{2} + \ddot{x}^{2}} \]
\(f_1, f_2\)
Take time derivative of \(\dot \theta\) from step 2 to obtain: \[ \ddot{\theta} = \frac{2 \left(h_{1} \dddot{x} - \dot{h_{1}} \ddot{x}\right)^{2} \ddot{x} + \left(2 \dot{h_{1}} \dddot{x} + \ddot{h_{1}} \ddot{x}\right) h_{1} h_{2} - h_{1}^{2} h_{2} \ddddot{x} - 2 h_{2} \dot{h_{1}}^{2} \ddot{x}}{h_{1} h_{2}^{2}} \]
where \[ h_{2} = h_{1}^{2} + \ddot{x}^{2} \]
\[ \dot{h_{1}} = \dddot{z} \]
\[ \ddot{h_{1}} = \ddddot{z} \]
From the dynamics we have: \[ \ddot{x} = \frac{\left(- f_{1} - f_{2}\right) \sin{\left(\theta \right)}}{m} \]
\[ f_{1} + f_{2} = - \frac{m \ddot{x}}{\sin{\left(\theta \right)}} \]
Substituting \(\theta\) from step 1 \[ h_{3} = m \sqrt{1 + \frac{\ddot{x}^{2}}{h_{1}^{2}}} h_{1} \]
From the dynamics we have: \[ \ddot{\theta} = \frac{l \left(- f_{1} + f_{2}\right)}{J_{yy}} \]
\[ - f_{1} + f_{2} = \frac{J_{yy} \ddot{\theta}}{l} \]
Adding the two \[ f_{2} = \frac{J_{yy} \ddot{\theta}}{2 l} + \frac{h_{3}}{2} \]
\[ f_{1} = - f_{2} + h_{3} \]
9.3 Invariance
9.4 Controllers
9.5 Useful Parameters
9.5.1 quad2d_v0
A basic version proposed at (Ortiz-Haro et al. (2024)) \[ \begin{aligned} m &= 0.034\\ l &= 0.1\\ \mathbf J_{yy} &= 1e-4\\ g &= 9.81\\ \dot x &\in [-4, 4]\\ \dot z &\in [-4, 4]\\ \omega &\in [-8, 8]\\ \mathcal{U}&= [0, 1.3]^2 \end{aligned} \]