IWP parameter quantification
9 January 2011
Hmm, it’s been a while. Now that the holiday period is over and I’ve settled into a new home, I’ll hopefully have more time for my hobby projects!
Getting back to the IWP…
So far we have a symbolic model which shows how different system parameters affect the dynamic response of the system. For this particular model, designing and/or measuring system parameters should be relatively painless, but requires close attention to the model and how its parameters are defined.
A given parameter might be quantified by experiment, calculation from first principles, or by a numerical model depending on the complexity of the respective approach. A simpler approach might mean a less accurate result, so it becomes important to identify and meet a reasonable level of accuracy.
Relative accuracies may be obvious: For pendulum dynamics, the mass at the “plum-bob” end needs to be known more accurately than the mass at the point of rotation. For absolute accuracies or less obvious cases, my rule of thumb is to take two approaches, where possible, and aim to cross verify the results to at least 2 significant figures. Odds are that the error stack-up of the model and its parameters will represent the actual system dynamics pretty well.
So what did I do? I used a mechanical CAD package, Solidworks, to do the work for me:
I verified the masses (wheel and pendulum) by weight scale and calculated the rotational inertia of the wheel to good agreement with Solidworks. Subsequently, I would’ve inferred the pendulum chassis inertia to be in the right ball park as well.
IWP reduced-order model
30 October 2010
We start by defining a new state vector, , as the variables we want to control
.
By substituting into the EL equation and rearranging in terms of
, the reduced order system can be expressed as
.
We can reformat this into vector field notation
,
which gives us
,
and
.
That’s it! Next post: do something useful with it 😉
IWP Euler-Lagrange Equation
9 October 2010
Following on from this post, the Euler-Lagrange (EL) equation is defined
where is a forcing term introduced to control the IWP. In a passive system this term would be zero, but if we define
we can define the forcing term as
where 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
.
(1)
Now taking the derivative of (1) with respect to time gives
,
(2)
and computing the remaining term of the equation gives
.
(3)
By substituting (1), (2), and (3) into the EL equation, we arrive at
.
(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 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 blogging for a Saturday afternoon…
While on the topic of inverted pendulums…
28 September 2010
IWP Lagrangian
26 September 2010
One of many methods of controller design starts off by modeling the dynamics of the physical system. This helps understand the system, check for controllability and observability, choose the control topology, specify and optimize the controller response, check for stability, and simulate the system under different conditions.
A nice and intuitive approach is to find the equations of motion; a mathematical description for the behavior of the system as a function of time. The Euler-Lagrange equation provides a convenient description of the equations of motion because the Lagrangian approach allows the direct use of generalized coordinates. Solving this equation for local minima or maxima means finding the stationary points of the model. For the IWP, this means controlling to , while
is a cyclic coordinate whose steady state value plays no role in the stability of the IWP, so can be left uncontrolled.
The Lagrangian is what must be derived and substituted into the Euler-Lagrange equation to give the equations of motion. The Lagrangian, , is defined as the total kinetic energy,
, minus the total potential energy,
:
.
With the chosen coordinate system, we can calculate the above knowing that:
rotational kinetic energy =
potential energy =
and rotational inertia about a point, of a point-mass at radius, r =
Here goes…
Kinetic energy of the wheel caused by and its total angular velocity,
, is
(1)
while kinetic energy of the wheel caused by at point
and its angular velocity,
, about
is
(2)
Kinetic energy of the pendulum caused by and its angular velocity,
, about
is
(3)
while kinetic energy of the pendulum caused by at point
and its angular velocity,
, about
is
(4)
Since the angular velocities of the pendulum about and
are equal, equations (3) and (4) can be simplified to one term describing the total kinetic energy contribution of the pendulum due to the inertia of the pendulum about
, and its angular velocity,
, about
(5)
Combining (1), (2), and (5) gives total kinetic energy of the system
(6)
The potential energy of the wheel due to gravity, , is
(7)
and the potential energy of the pendulum due to gravity, , is
(8)
Combining (7) and (8) gives total potential energy of the system
(9)
We can now summarize the system dynamics by substituting (6) and (9) into the Lagrangian. By absorbing some constants for the sake of brevity, we arrive at
where
More to come in the next post 😉
IWP parameters
23 September 2010
Starting off the second of a series of posts about my IWP project, I discover that wordpress.com have support for . Woot! This means that I’ll be able to present my equations in the format they were intended. It also means I have no excuse not to start off with some maths 😉
To keep things consistent, I will stick to the parameters defined below:
Where:
Assumptions: The pendulum, reduced to a line representation in the above illustration, will in actuality comprise of the chassis plus all rigidly attached masses, which might include the motor enclosure, printed circuit boards and/or batteries etc. Accordingly, the center of mass and the moments of inertia of the pendulum should be calculated with this in mind. The same thing applies to the wheel, which might include the rotor mass and inertia.
I will dedicate the next post to calculating the system Lagrangian using the parameters above. Until then, goodbye..
Inertia Wheel Pendulum
22 September 2010
The Inertia Wheel Pendulum (IWP) is an underactuated mechanical system, meaning it has fewer actuators than degrees of freedom. The number of degrees of freedom is defined by the number of independent generalized coordinates of the system. For the IWP, it is convenient to use polar coordinates to represent the angle and rate of the pendulum about the pendulum base, and the angle and rate of the inertia wheel about the centre of the wheel.
The wheel is actuated by a motor, while the pendulum coordinates remain underactuated, however, the pendulum can be controlled by the action of the wheel through dynamic coupling. In the case of the IWP, this means the single motor can be used to control the angular position and rate of the pendulum as well as that of the wheel.
A simple model of the IWP has two equilibrium points, assuming the base of the pendulum to be anchored at a point that enables it to rotate, unconstrained, through 360°. The downward pointing position is the passively stable equilibrium point; the “relaxed” state the system would settle at if no power was applied to the motor. The upward pointing position is passively unstable but can be stabilized by closed-loop regulation of the motor torque and generalized coordinates.
While getting an IWP to point down is easy, thanking gravity, getting one to balance upright is a little more challenging. This ex post facto series of blog entries will touch on some of the theory behind the IWP and the steps I took to design and construct a working prototype. Stay tuned for more!