This demo models show how to design inverted pendulum controller with "QUBE - Servo 2" of Quanser. And they also show the workflow of plant modeling, control design, code generation, verification, and ...
\ddot{\theta_1} = \frac{m_2 L_1 \dot{\theta_1}^2 \sin(\Delta) \cos(\Delta) + m_2 g \sin(\theta_2) \cos(\Delta) + m_2 L_2 \dot{\theta_2}^2 \sin(\Delta) - (m_1 + m_2) g ...