Symmetries in the wheeled inverted pendulum mechanism
Abstract
The purpose of this article is to illustrate the role of connections and symmetries in the Wheeled Inverted Pendulum (WIP) mechanism  an underactuated system with rolling constraints  popularized commercially as the Segway, and thereby arrive at a set of simpler dynamical equations that could serve as the starting point for more complex feedback control designs. The first part of the article views the nonholonomic constraints enforced by the rolling assumption as defining an Ehresmann connection on a fiber bundle. The resulting equations are the reduced Euler Lagrange equations, which are identical to the Lagrange d’Alembert equations of motion. In the second part we explore conserved quantities, in particular, nonholonomic momenta. To do so, we first introduce the notion of a symmetry group, whose action leaves both the Lagrangian and distribution invariant. We examine two symmetry groups  and . The first group leads to the purely kinematic case while the second gives rise to nonholonomic momentum equations.
Keywords:
Lie group symmetry Robotics Nonholonomic systems∎
1 Introduction
The class of nonholonomic systems forms a large and interesting subset of mechanical control systems. Applications include robotics, rolling and locomotive mechanisms. A better understanding of the system’s intrinsic structure and properties, at times, simplifies control synthesis. Though the classical approaches, like Lagranged’Alembert’s principle, yield the equations of motion, geometric approaches exploit underlying properties like symmetry and help understand the structure and intrinsic properties of nonholonomic mechanical systems. bloch2003 () is a comprehensive introduction to these notions. In this article we study the geometric features of one such system, the Wheeled Inverted Pendulum, using tools of geometric mechanics. A miniaturized and compact version of the WIP (see Figure (1)) has been designed and developed in the Institute of Automatic Control, TUM. This prototype is currently being used as an experimental test bed for candidate control algorithms.
The Wheeled Inverted Pendulum (WIP) consists of a vertical body with two coaxial driven wheels. Typical applications of the WIP include baggage transportation, commuting and navigation Segway2014 (). The WIP has gained interest in the past several years due to its maneuverability and simple construction (see e.g. Grasser2002 (), chan2013review ()). Other robotic systems based on the WIP are becoming popular as well in the robotic community for human assistance or transportation as can be seen in the works of Li2012 (), Nasrallah2006 (), Nasrallah2007 (), Baloh2003 (), and a commercially available model for human transportation Segway2014 (). The stabilization and tracking control for the WIP is challenging since the system belongs to a class of underactuated mechanical systems (the control inputs are less than the number of configuration variables) and has nonholonomic constraints as well, that arise due to rolling without slipping assumptions on the wheels. Several control laws have been applied to the WIP, mostly using linearized models as can be seen in blankespoor2004experimental (), salerno2004control (), kim2005dynamic (), Li2012 (). In salerno2003nonlinear (), controllability of the dynamics involving the rotation of the wheels and the pitch of the vertical body (pendulum) were presented and in salerno2004control () a linear controller was designed for stabilization. In kim2005dynamic (), the authors presented the exact dynamics of WIP and derived the linear controller. In pathak2005velocity () and gans2006visual (), the authors propose a the controller based on partial feedback linearization. Nasrallah2007 () develops a model based on the EulerRodrigues parameters and analyzes the controllability of the WIP moving on an inclined plane. However, the geometric structure of the WIP and the consequent aid to feedback design is yet to be completely exploited. In delgado2015reduced (), the authors adopt a geometric approach to derive the dynamic model. The aim of this article is to present geometric facets, various group symmetries of the dynamics of this system, in particular the nonholonomic momentum, and finally arrive at a model which would considerably aid in control design.
In mechanical systems with nonholonomic constraints, the configuration space is a finite dimensional smooth manifold, the tangent bundle is the velocity phase space, the Lagrangian is a map and a smooth distribution determines the nonholonomic constraints. Typically, is the kinetic energy minus the potential energy. So, at a given point of the configuration space, the distribution characterizes the allowable velocity directions of the system. The Lagranged’Alembert principle, then, yields the equations of motion of the system. The constraints form the horizontal space of the tangent space in a direct sum of two subspaces  termed horizontal and vertical, and this horizontal space is realized through an Ehresmann connection. The dynamics then appear in the reduced EulerLagrange form with the constraint forcing terms dependant on the curvature of the connection. More scholarly exposition on this is found in BKMM (), bloch2003 (), unicycle (). Often, nonholonomic systems admit a symmetry group, and the action of this group usually makes analysis simpler. The configuration space is then identified “locally” as the product space of a group and a shape space, with the group being the symmetry group. This modifies the Ehresmann connection to a new connection which is associated with this symmetry. This new connection, which is a principal connection, is termed as a and the dynamics is studied on a reduced space or shape space. Hence, using group symmetry one performs Lagrangian reduction and obtains reduced dynamics with a reconstruction equation combined with constraints. The nonholonomic connection, in turn, is realized through two types of connections, one due to the constraints  the  and the second, arising due to the kinetic energy metric, termed as the . So, the holds information about both the constraints and the dynamics. The general references on reduction theory with constraints are marsden1993reduced (), marsden2000reduction (), c2 (), bloch2003 (), BKMM (), ostrowski_thesis (), CHMR (), CMR (). There are three cases to be noticed while computing this principal connection. If the distribution forms the horizontal space, then the principal connection is realized as a kinematic connection and hence we have fiber (vertical) symmetry which yields the standard momentum conservation in both spatial and body frames koiller1992reduction (). If the distribution forms the horizontal symmetry, that is, the distribution lies in the fiber space, then the equation of motion is in the EulerPoincaré form and the momentum is conserved in the spatial frame, for example in the vertical coin bloch2003 (). And the third one is a general case where the distribution partially lies both in the horizontal and the vertical spaces. This general case gives rise to a generalized momentum equation wherein the momentum is not necessarily conserved. In BKMM (), ostrowski1995mechanics () authors illustrates the Snakeboard example where nonconservation of momentum plays an important role in locomotion. The WIP falls under the category of the general case where the forward motion of the wheels and yaw motion are given by the generalized momentum.
The objective of this paper is to illustrate the symmetries and conserved quantities inherent in the dynamics of the Wheeled Inverted Pendulum (WIP). The first part of the article uses the Ehresmann connection and formulates the dynamics in the form of the Lagranged’Alembert equation with the EulerLagrange equation in the base variables with curvature form. The nonholonomic constraint distribution forms the horizontal subspace for the Ehresmann connection. In the literature this is called as the kinematic connection. The second formulation uses the notion of a nonholonomic system with symmetry. Here, a symmetry group acts on the WIP configuration space and renders the Lagrangian and distribution invariant. Two types of Lie group symmetries are considered. A connection termed as nonholonomic connection is introduced, which synthesizes the mechanical connection and kinematic connection. This analysis gives rise to momentum equation for group variables and reduced EulerLagrange equation for shape variables.
2 System description
The WIP consists of a body of mass (center of mass at a distance from the wheels rotation axes) mounted on two wheels of radius . Let be the mass of the wheels and be the distance between the wheels. The wheels are directly mounted on the body and are able to rotate independently. Since the wheels are actuated by motors sitting on the body, a tilting motion automatically rotates the wheels through the tilting angle. The body needs to be stabilized in the upper position through a back and forth motion of the system similar to the inverted pendulum on a cart. The set of generalized coordinates describing the WIP are:

Coordinates of the origin of the bodyfixed coordinate system in the horizontal plane ()

Heading angle around the axis ()

Tilting angle around the axis ()

Relative rotation angle of each of the wheels with respect to the body around the axis, which coincides with the axis ( and )
The configuration space of the system is thus with .
Assuming the wheels roll without slipping, the system has nonholonomic constraints given by:
(1) 
With , , and these are equivalent to
(2)  
(3)  
(4) 
Equations (2) and (3) are treated as nonintegrable constraints, that is, the translational velocity of the body (chassis) in both and directions are completely determined by the angular velocities of the wheels and the body yaw angle. Equation (4) is, in fact, a holonomic constraint, which relates the yaw angle with the roll angle of the wheels.. Consider coordinates ) for , and a set of velocities at point , that defines the tangent space . Let be a distribution that describes the kinematic constraints as above. So, at a given point , the distribution characterizes the allowable velocity direction of the system, i.e, is a collection of linear subspaces , . The nonholonomic constraint can be expressed as , where , and
(5) 
The above constraints have a geometric interpretation. Consider a bundle map which is a submersion and is termed the , then is a derivative map (onto) at each and kernel of at any point forms a vertical space . This vertical subbundle (of ) is also referred as the fiber distribution, and is defined as
(6) 
Definition 1
An Ehresmann connection is defined as a vectorvalued one form which splits the tangent space at every point into a vertical and a horizontal space, satisfying: 1) and, 2) is a projection, for all . For , implying .
We choose the Ehresmann connection such that the constraint distribution forms the horizontal space. For , we then have the horizontal part of the vector field as . In bundle coordinates, , the connection which is a vectorvalued one form can be expressed in local coordinates as . Therefore, the vertical component is and the horizontal component .
The Lagrangian for the WIP is taken to be the total kinetic energy minus the potential energy and is given by
(7) 
where,
Given and a smooth distribution that represents the constraints, the Lagranged’Alembert principle that yields the equations of motion states that the motion of the system occurs along trajectories that satisfy Hamilton’s variational principle where the variations of are taken along curves which satisfy , and are assumed to vanish at the endpoints. We now define the constrained Lagrangian by substituting the constraints (2)(4) into the Lagrangian as
yielding as
where
Following BKMM (), the equations of motion in terms of the constrained Lagrangian , termed as reduced EulerLagrange equations, are given by
(8)  
(9)  
(10) 
where the curvature is
(11) 
where are the coordinate expression of the Ehresmann connection on the tangent bundle defined by the constraints. The Ehresmann connection in coordinates is
(12) 
and the coefficients are given by
The equations of motion, calculated from (8)(10) are
(13) 
where and are the respective torques on the two wheels. These equations of motion are identical to the one given in delgado2015reduced (). In section 3, we show that using symmetry yields a principal kinematic case and, the principal connection in such a case is equivalent to the Ehresmann connection defined above. For a completeness of exposition, the preliminary notions of a nonholonomic system with symmetry as developed in bloch2003 (), BKMM () are presented in the Appendix. We now illustrate these tools on the WIP system.
3 Symmetries in the WIP mechanism
We make two choices for the group action:

(the position on the plane and the yaw angle) and

(the position on the plane and the yaw angle, and the roll of the wheels) .
In the first case we illustrate that the principal connection is equivalent to the Ehersmann connection and the equations of motion are given by the reduced EulerLagrange equations. In the second case we first identify the configuration variable as and then choose the group action of on this .
This choice of comes from the fact that instead of the absolute wheel angles and we take the difference which represent the yaw angle, and the sum which permits us to calculate the forward distance traversed as . This modified choice also comes from the ultimate control synthesis objective where one wants to control the forward and yaw velocity of the WIP.
In this case we illustrate the nonholonomic momentum and derive the reduced nonholonomic Lagranged’Alembert equations.
Case I: Consider the Lie group and the symmetry in variables of the system. The action by the group element is given by
The tangent space to the group orbit is given by
(14) 
The Lagrangian (7) and constraints (1) are invariant under the action of . The vector fields that are the local generators for the constrained distribution and are given by
therefore,
(15) 
The intersection of the tangent space to the orbit with the constrained distribution and the components of curvature are independent of and . This is the principal kinematic case, in which there is a principal connection whose horizontal space is spanned by the distribution . The projection on the vertical space defines the Ehresmann connection and since the distribution is invariant under the group action, the principal connection related to the Ehresmann connection as , given in (2). The system is reduced from to by the group action. Substituting the constraint from (2)(4), the reduced equations of motion are obtained on . The reduced constrained Lagrangian is
There is no momentum equation and correspondingly no body velocity. The equation of motion is the reduced EulerLagrange equation given in (13) with the reconstruction equation being .
Case II: Consider the group action on . The
group here denotes the position, heading angle and sum of wheel angles. Let be sum of wheel velocity results in the forward velocity of the cart. With this let the configuration space is now identify as with configuration variables as . Then the left action of on is given as
where and . The left action of on the tangentlifted coordinates of the manifold is
The Lagrangian of the system is,
(16) 
and the nonholonomic constraint is
(17) 
It is easily proved that the Lagrangian and distribution are invariant under the action of the group .
Substituting the constraints in the Lagrangian (16), the constrained Lagrangian is determined as
(18) 
The tangent space to the orbit is
(19) 
and the constraint distribution is given by . with
The constraint fiber distribution is calculated as
(20) 
For obtaining the corresponding momentum equation, we consider the bundle whose fibers span the tangent vectors in and choose a section of this bundle. Consider the Lie algebra of . The generators corresponding to the Lie algebra elements can be represented in standard basis in as
where the first two components represent translations, the third is the yawing motion and the fourth being the rolling motion. Therefore, to obtain the section of given by vector fields
(21) 
and the corresponding Lie algebra elements are
(22) 
We have two the nonholonomic momenta corresponding to the two infinitesimal generators in . The nonholonomic momentum in the body representation are calculated from (54) and (6.1) as
(23) 
which yields
(24) 
and
(25) 
From the nonholonomic momenta calculated in (24) and (25), the nonholonomic momentum equations are evaluated as
(26) 
(27) 
Eliminating and using equations (24) and (25), the momentum dynamics are expressed as
(28)  
(29) 
with
and
(30) 
This completes the momentum equations computation for the group variables corresponding to . Now we calculate the the dynamic equation governing the shape variable given in (59).
3.1 Shape dynamics of the WIP under action
To explicitly express the shape dynamics, the reduced Lagrangian and the constrained reduced Lagrangian are computed as follows.
3.1.1 Reduced Lagrangian and constrained reduced Lagrangian
The rolling constraint (17) is now expressed in the body coordinate frame as
(31) 
where is the (leftinvariant) body angular velocity, expressed by
(32) 
Theorem 3.1
With and as the group action, the constrained reduced Lagrangian is
(33) 
Proof: When the Lagrangian and the distribution are invariant under the action of a group , the system is reduced to the quotient space . From a system(, ) on , a reduced Lagrangian is calculated as
where . The constraint reads and (this eliminates two variables of the Lie algebra.) The constrained reduced Lagrangian is