A Pendulum on Cart¶
A pendulum is fixed on a cart, which can move in the horizontal direction. The cart has a mass . The friction between the cart and the surface causes a frictional force , in opposite direction to the movement of the cart. The pendulum has a mass , a moment of intertia , a length and an angle of deflection . The friction in the joint where the pendulum is mounted on the cart causes a frictional torque , in opposite direction to the rotational speed of the pendululm. The system is illustrated in Fig. 2.
The task is to control the position of the cart and to stabilize the pendulum in its downside position. The possibility of stabilizing the pendulum in its upside position is not implemented in this tutorial. Actuating variable is the force .
With the state vector
the model equations are given by
The cart’s position
is chosen as output of the system. With this model given, the next step is to implement a class containing these equations.