The Acrobot is a two-link planar robot composed of two pendulums joined at their tip, with a motor applying a torque in clockwise or counterclockwise directions on the joint between the two links. The position of the system is defined by the angles of both pendulums θ1 and θ2, whose behaviour is defined by the following system of differential equations:4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\begin{array}{rcl}{\ddot{\theta }}_{1} & = & -({d}_{2}{\ddot{\theta }}_{2}+{\varphi }_{1})/{d}_{1}\\ {\ddot{\theta }}_{2} & = & {({m}_{2}{l}_{c2}^{2}+{I}_{2}-\frac{{d}_{2}^{2}}{{d}_{1}})}^{-1}(\tau +\frac{{d}_{2}}{{d}_{1}}{\varphi }_{1}-{\varphi }_{2})\\ {d}_{1} & = & {m}_{1}{l}_{c1}^{2}+{m}_{2}({l}_{1}^{2}+{l}_{c2}^{2}+2{l}_{1}{l}_{c2}\,\cos \,({\theta }_{2}))+{I}_{1}+{I}_{2}\\ {d}_{2} & = & {m}_{2}({l}_{c2}^{2}+{l}_{1}{l}_{c2}\,\cos \,({\theta }_{2}))+{I}_{2}\\ {\varphi }_{2} & = & {m}_{2}{l}_{c2}g\,\cos \,({\theta }_{1}+{\theta }_{2}-\pi /2)\\ {\varphi }_{1} & = & -{m}_{2}{l}_{1}{l}_{c2}{\dot{\theta }}_{2}^{2}\,\sin \,({\theta }_{2})-2{m}_{2}{l}_{1}{l}_{c2}{\dot{\theta }}_{2}{\dot{\theta }}_{1}\,\sin \,({\theta }_{2})\\ & & +({m}_{1}{l}_{c1}+{m}_{2}{l}_{1})g\,\cos \,({\theta }_{1}-\pi /2)+{\varphi }_{2}\end{array}$$\end{document}θ¨1=−(d2θ¨2+φ1)/d1θ¨2=(m2lc22+I2−d22d1)−1(τ+d2d1φ1−φ2)d1=m1lc12+m2(l12+lc22+2l1lc2cos(θ2))+I1+I2d2=m2(lc22+l1lc2cos(θ2))+I2φ2=m2lc2gcos(θ1+θ2−π/2)φ1=−m2l1lc2θ˙22sin(θ2)−2m2l1lc2θ˙2θ˙1sin(θ2)+(m1lc1+m2l1)gcos(θ1−π/2)+φ2where τ is the torque applied to the system which can be either −1, 0, 1, m1 = m2 = m is the mass of the links, l1 = l2 = 1 is the length of the links and lc1 = lc2 = 0.5 are the lengths to the center of mass of the links, I1 = I2 = 1 are the moments of inertia of the links and g = 9.8 is the gravity. As well, variables d1 and d2 are the total moments of inertia of each link, and ϕ1 and ϕ2 are linked to the potential energy of the system.