IWP reduced-order model

30 October 2010

We start by defining a new state vector, x, as the variables we want to control

x = \left[\begin{matrix} x_1 \\ x_2 \\ x_3 \end{matrix} \right] = \left[\begin{matrix} \theta_1 \\ \dot{\theta_1 } \\ \dot{\theta_2 } \end{matrix} \right].

By substituting x into the EL equation and rearranging in terms of \dot{x}, the reduced order system can be expressed as

\begin{array} {lcl} \dot{x_1} & = & x_2 \\ \dot{x_2} & = & \frac{-I_{WC}\tau + I_{WC} b g \sin{x_1}}{aI_{WC}} = -\frac{\tau }{a} + \frac{bg\sin{x_1 }}{a}  \\ \dot{x_3} & = & \frac{(a+I_{WC})\tau -I_{WC}bg\sin{x_1}}{aI_{WC}} = \frac{(a+I_{WC})\tau }{aI_{WC}} - \frac{bg\sin{x_1}}{a} \end{array}.

We can reformat this into vector field notation

\dot{x} = f(x) + g(x)\tau,

which gives us
f(x) = \left[\begin{matrix} x_2 \\ \frac{bg\sin{x_1}}{a} \\ -\frac{bg\sin{x_1}}{a} \end{matrix} \right],
and
g(x) = \left[\begin{matrix} 0 \\ -\frac{1}{a} \\ \frac{a+I_{WC}}{aI_{WC}} \end{matrix} \right].

That’s it! Next post: do something useful with it 😉

Following on from this post, the Euler-Lagrange (EL) equation is defined

\frac{d}{dt}\left[\frac{\partial L}{\partial \dot{\theta } }\right] - \frac{\partial L}{\partial \theta } = F_{\theta},

where F_{\theta} is a forcing term introduced to control the IWP. In a passive system this term would be zero, but if we define

\theta = \left[\begin{matrix} \theta_1 \\ \theta_2 \end{matrix} \right],

we can define the forcing term as

F_{\theta } = \left[ \begin{matrix} 0 \\ \tau \end{matrix} \right],

where \tau is torque applied by the motor to spin the wheel.

The computation of the EL equation is simple. We can start with the term in the brackets

\frac{\partial L}{\partial \dot{\theta }} = \left[\begin{matrix} \frac{\partial L}{\dot{\theta_1 }} \\ \frac{\partial L}{\dot{\theta_2 }} \end{matrix} \right] = \left[\begin{matrix} a\dot{\theta_1 } + I_{WC}(\dot{\theta_1 } + \dot{\theta_2 }) \\ I_{WC}(\dot{\theta_1 } + \dot{\theta_2 }) \ \end{matrix} \right]. (1)

Now taking the derivative of (1) with respect to time gives

\frac{\partial }{\partial t} \left[\frac{\partial L}{\partial \dot{\theta }}\right] = \left[\begin{matrix} a\ddot{\theta_1 } + I_{WC}(\ddot{\theta_1 } + \ddot{\theta_2 }) \\ I_{WC}(\ddot{\theta_1 } + \ddot{\theta_2 }) \end{matrix} \right], (2)

and computing the remaining term of the equation gives

\frac{\partial L}{\partial \theta } = \left[\begin{matrix} \frac{\partial L}{\partial \theta_1 } \\ \frac{\partial L}{\partial \theta_2 } \end{matrix} \right] = \left[\begin{matrix} bg\sin{\theta_1 } \\ 0 \end{matrix} \right] . (3)

By substituting (1), (2), and (3) into the EL equation, we arrive at

\left[\begin{matrix} (a+I_{WC}) & I_{WC} \\ I_{WC} & I_{WC} \end{matrix}\right] \left[\begin{matrix} \ddot{\theta_1 } \\ \ddot{\theta_2 } \end{matrix}\right] - \left[\begin{matrix} bg\sin{\theta_1 } \\ 0 \end{matrix}\right] = \left[\begin{matrix} 0 \\ \tau \end{matrix}\right]. (4)

The equations of motion for the IWP model are now fully described by (4). This is an important milestone in taking this approach to designing a controller for the IWP because we now have a virtual representation of the device to simulate our yet-to-be-designed controller with.

You might have noticed that \theta_2 does not appear in (4) because, as mentioned previously, this is a cyclic variable which does not influence the balancing of the IWP. This variable would become redundant information when designing a feedback controller, so by reducing the order of the model beforehand, we can simplify the design of the controller.

Hmm, I think that’s enough \LaTeX blogging for a Saturday afternoon…