Choosing our generalized coordinates as the horizontal ...

Pendulum angular position (() and cart position (x) are measured using two mechanical encoders mounted at the pendulum joint and motor shaft. Both encoders have 4000 counts per revolution. Considering the setup and gearing, this gives a resolution of 63 (m in cart position x and 1.57(10-3 rad or 0.09( in pendulum angle (. ................
................