Control Experiments in Python.
The PVTOL with Pole is a planar simplification of the problem of balancing a pole on top of a quadrotor, as demonstrated by Raffaello d’Andrea in his 2013 TED talk.
The following figure describes the variables and parameters of the model:
We will start by deriving a dynamic model for the PVTOL with pole system.
It can be seen that the vector can be used a generalized coordinates as it uniquely describes the configuration of the system.
Assumingt that the pole is constrained to pivot at the center of the PVTOL, the position of the center of mass of the pole is then given by:
Computing the time derivative of the above equation, we get the velocity of the pole’s center of mass as:
Noting and , the relationship between the pvtol and pole centers of mass velocities is expressed as:
Kinetic Energy | Potential Energy | |
---|---|---|
pvtol | $$ T_v = \frac{1}{2} Mv^2 + \frac{1}{2} J \dot{\theta}^2$$ | $$ V_v = Mgz$$ |
pole | $$ T_p = \frac{1}{2} mv_p^2 + \frac{1}{2} j \dot{\phi}^2$$ | $$ V_p = mgz_p$$ |
Expanding with state variables, we get:
Partial derivatives of the Lagrangian with respect to the state vector components are:
*
*
*
*
We have now obtained 4 coupled ODEs that needs to be uncoupled to obtain a SSR.
The above can be matricially rewritten as a linear system:
The system has full rank ( ).
The dynamic model for the pvtol pole is available in the file pvtol_pole.py. A openai gym compatible environment is avaible in the file pvtol_pole_env.py.
Figure (3) shows a simulation of the model under the authority of a linear regulator, obtained with this code.