7 Acrobot
7.1 Dynamics
Parameters
- \(\mathcal{X}\): state space
- \(\mathcal{U}\): action space
- \(l_1\): length of first link [m]
- \(m_1\): mass of first link [kg]
- \(I_1\): inertia of first link [kg m^2]
- \(l_{c1}\): length to first pivot point [m]
- \(l_2\): length of second link [m]
- \(m_2\): mass of second link [kg]
- \(I_2\): inertia of second link [kg m^2]
- \(l_{c2}\): length to second pivot point [m]
- \(g\): gravity constant [m/s^2]
State: \(\mathbf{x}= \begin{pmatrix}\theta_1, \theta_2, \dot \theta_1, \dot \theta_2 \end{pmatrix}^\top \in \mathcal{X}\subset \mathbb R^4\)
- joint angles \((\theta_1, \theta_2)^\top\) [rad]
- angular velocity \((\dot \theta_1, \dot \theta_2)^\top\) [rad/s]
Action: \(\mathbf{u}= (\tau) \in \mathcal{U}\)
- Torque \(\tau\) [Nm]
Dynamics:
In standard manipulator equation form: \[ \mathbf{M}(\ddot \theta_1, \ddot \theta_2)^\top + \mathbf{C}(\dot \theta_1, \dot \theta_2)^\top = \tau_g + \mathbf{B}\mathbf{u} \]
\[\begin{aligned} \mathbf{M}&= \left[\begin{matrix}I_{1} + I_{2} + l_{1}^{2} m_{2} + 2 l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)} & I_{2} + l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)}\\I_{2} + l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)} & I_{2}\end{matrix}\right]\\ \mathbf{C}&= \left[\begin{matrix}- 2 \dot\theta_{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} & - \dot\theta_{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)}\\\dot\theta_{1} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} & 0\end{matrix}\right]\\ \tau_g &= \left[\begin{matrix}- g l_{c1} m_{1} \sin{\left(\theta_{1} \right)} - g m_{2} \left(l_{1} \sin{\left(\theta_{1} \right)} + l_{c2} \sin{\left(\theta_{1} + \theta_{2} \right)}\right)\\- g l_{c2} m_{2} \sin{\left(\theta_{1} + \theta_{2} \right)}\end{matrix}\right]\\ \mathbf{B}&= \left[\begin{matrix}0\\1\end{matrix}\right]\\ \end{aligned}\]Explicit expressions for \(\ddot \theta_1, \ddot \theta_2\) are:
\[ (\ddot \theta_1, \ddot \theta_2)^\top = \left[\begin{matrix}\frac{I_{2} \left(2 \dot\theta_{1} \dot\theta_{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} + \dot\theta_{2}^{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} - g l_{c1} m_{1} \sin{\left(\theta_{1} \right)} - g m_{2} \left(l_{1} \sin{\left(\theta_{1} \right)} + l_{c2} \sin{\left(\theta_{1} + \theta_{2} \right)}\right)\right) + \left(I_{2} + l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)}\right) \left(\dot\theta_{1}^{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} + g l_{c2} m_{2} \sin{\left(\theta_{1} + \theta_{2} \right)} - \tau\right)}{I_{1} I_{2} + I_{2} l_{1}^{2} m_{2} - l_{1}^{2} l_{c2}^{2} m_{2}^{2} \cos^{2}{\left(\theta_{2} \right)}}\\\frac{- \left(I_{2} + l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)}\right) \left(2 \dot\theta_{1} \dot\theta_{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} + \dot\theta_{2}^{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} - g l_{c1} m_{1} \sin{\left(\theta_{1} \right)} - g m_{2} \left(l_{1} \sin{\left(\theta_{1} \right)} + l_{c2} \sin{\left(\theta_{1} + \theta_{2} \right)}\right)\right) - \left(\dot\theta_{1}^{2} l_{1} l_{c2} m_{2} \sin{\left(\theta_{2} \right)} + g l_{c2} m_{2} \sin{\left(\theta_{1} + \theta_{2} \right)} - \tau\right) \left(I_{1} + I_{2} + l_{1}^{2} m_{2} + 2 l_{1} l_{c2} m_{2} \cos{\left(\theta_{2} \right)}\right)}{I_{1} I_{2} + I_{2} l_{1}^{2} m_{2} - l_{1}^{2} l_{c2}^{2} m_{2}^{2} \cos^{2}{\left(\theta_{2} \right)}}\end{matrix}\right] \]
7.2 Differential Flatness
7.3 Invariance
7.4 Controllers
7.4.1 Geometric Controller
7.4.2 Action Mixing
7.5 Useful Parameters
7.5.1 acrobot_v0
A basic version based on (Tedrake 2024) proposed at (Ortiz-Haro et al. (2024)) \[ \begin{aligned} l_1 &= 1\\ m_1 &= 1\\ I_1 &= 0.33333\\ l_{c1} &= 0.5\\ l_2 &= 1\\ m_2 &= 1\\ I_2 &= 0.33333\\ l_{c2} &= 0.5\\ g &= 9.81\\ \dot \theta_1 &\in [-8, 8]\\ \dot \theta_2 &\in [-8, 8]\\ \mathcal{U}&\in [-10, 10] \end{aligned} \]