## Abstract

A mathematical model of a unicycle and rider, with a uniquely realistic tyre force and moment representation, is set up with the aid of multibody modelling software. The rider’s upper body is joined to the lower body through a spherical joint, so that wheel, yaw, pitch and roll torques are available for control. The rider’s bandwidth is restricted by low-pass filters. The linear equations describing small perturbations from a straight-running state are shown, which equations derive from a parallel derivation yielding the same eigenvalues as obtained from the first method. A nonlinear simulation model and the linear model for small perturbations from a general trim (or dynamic equilibrium) state are constructed. The linear model is used to reveal the stability properties for the uncontrolled machine and rider near to straight running, and for the derivation of optimal controls. These controls minimize a cost function made up of tracking errors and control efforts. Optimal controls for near-straight-running conditions, with left/right symmetry, and more complex ones for cornering trims are included. Frequency responses of some closed-loop systems, from the former class, demonstrate excellent path-tracking qualities within bandwidth and amplitude limits. Controls are installed for path-following trials. Lane-change and clothoid manoeuvres are simulated, demonstrating good-quality tracking of longitudinal and lateral demands. Pitch torque control is little used by the rider, while yaw and roll torques are complementary, with the former being more useful in transients, while the latter has value also in steady states. Wheel torque is influential on lateral control in turning. Adaptive control by gain switching is used to enable clothoid tracking up to lateral accelerations greater than 1 m s^{−2}. General control of the motions of a virtual or robotic unicycle will be possible through the addition of more comprehensive adaptation to the control scheme described.

## 1. Introduction

A unicycle has one wheel and direct drive to that wheel by the rider. Typical contemporary machines can be seen at http://www.jugglingstore.com/. The wheel is usually quite small, with the saddle conveniently located just above the wheel. The rider provides most of the mass of the man–machine system and it is evident that the uncontrolled system is unstable in both longitudinal and lateral directions. The stability of the combination depends on the control skills of the rider. A monocycle is dynamically similar to a unicycle but, in this case, the rider sits inside a wheel of sufficiently large diameter and a motor is fitted (Cardini 2006). Carvallo (1899) showed, using a very simple analysis, that a monocycle is longitudinally stable if the rider assembly mass centre lies below the wheel centre. In both cases, lateral symmetry of the straight-running state implies that longitudinal and lateral problems are decoupled at first-order level near to straight running (Meijaard *et al.* 2007; Sharp 2008).

Skilled riding of unicycles can be observed at many Internet sites, for example http://www.unicyclist.com/. Much of the riding typically displayed is trick-riding, involving much jumping from object to object, balancing when stationary, riding backwards and so on, but the present concern is with accurate control of the path of the unicycle when the ground is flat and level. It can be seen that expert riders can follow a narrow path, along the top of a wall, for example, even tracking along a horizontal tree trunk of diameter, perhaps, 0.3 m. When they do this, they typically extend both arms and use vigorous arm movements in yaw and roll for control purposes. It is also apparent that the lean angle of the unicycle frame is invariably no more than a few degrees in these trials, implying that control is sufficiently challenging that the tyre is unlikely to be exercised very far from its free rolling state.

Most of what is currently known about the stability and control of the unicycle comes from a doctoral study by Vos (1992) and Vos & Von Flotow (1990), a paper by Naveh *et al.* (1999) and a short paper by Zenkov *et al.* (1999). Each of these studies was motivated mainly by interest in control systems design, with the unicycle providing a challenging plant, making effective control far from easy. The present study is more concerned with the means by which real riders stabilize and guide their machines to follow desired paths. Any implications for robotic unicycles resulting are somewhat coincidental.

Vos built an autonomous unicycle and was able to demonstrate its rather tentative stable running along a straight path at very low speed (see http://www.rockwellcollins.com/athena/demos/unicycle/). His unicycle was fitted with two servo-motor actuators, one to drive the road wheel and the other to rotate an inertia-wheel in yaw, and his model includes only such actuation. The mathematical model used for control system design assumed pure rolling longitudinally, which constitutes a non-holonomic constraint on the motion, and a yawing moment linearly dependent on side-slip and on yaw rate up to a maximum, friction-saturation level. In the author’s view, this modelling is seriously flawed; there is neither experimental nor theoretical support for such a representation of the tyre force and moment system, so that all the findings must be viewed with some suspicion. In particular, it is well known that the rolling contact between an elastic tyre and a rigid ground involves a finite contact length and, for low force levels, features primarily non-sliding contact between tread rubber and ground, with elastic deformation of the tyre carcass to accommodate slip (departures from pure-rolling kinematics) (Clark 1981; Pacejka & Sharp 1991; Pacejka 2002; Gent & Walter 2005). The consequences of such elastic deformation are that the small-slip, rolling tyre generates a longitudinal force in proportion to longitudinal slip ratio, a lateral force linearly dependent on lateral-slip ratio, turn-slip ratio and camber angle, and a yawing moment proportional to lateral-slip, turn-slip and camber angle. Also, to represent the migration of the contact patch around the tyre cross section as the camber angle changes, a rolling moment proportional to the camber angle can be incorporated (Pacejka 2002; Sharp 2008).

Nevertheless, Vos was able to point out correctly that the lateral dynamics of the unicycle are strongly influenced by travel speed and considered it necessary to employ gain scheduling over a number of basically linear controllers with speed as a scheduling parameter, to deal with such sensitivity. Naveh *et al.* inherited the mechanical modelling and no-longitudinal-slip assumptions of Vos but employed an even stranger lateral tyre force description. They argued that linear controllers miss some essential ingredients of the real problem and that nonlinear control terms are essential.

Zenkov *et al.* assumed point contact between tyre and ground and pure rolling of the tyre over the surface but their ‘actuator’ acted in roll, like a lateral pendulum. Zenkov’s output-feedback controller is linear but the stability of the closed-loop, nonlinear system was checked by the Liapunov–Malkin theorem.

None of these previous studies included preview of the path in the controller design but a large body of research, certainly stretching back to Bender (1968) and Tomizuka & Whitney (1975), indicates the enormous advantages that can be gained from using preview information for control, if the future desired path of the plant is known in advance. This is very much the case in steering a free-ranging vehicle along a path that the driver can see or knows by some other means.

Over the last several years, linear optimal preview control theory has been applied to car driving and to motorcycle and bicycle riding (Sharp & Valtetsiotis 2001; Sharp 2005, 2006, 2007*a*–*e*, 2008; Thommyppillai *et al.*2009*a*,*b*) and this article is about the application of the theory to the longitudinal and lateral unicycle stabilization and path-following-control problem. The strategy for dealing with varying speed and higher amplitude nonlinear motion is to design linear preview controllers that are optimal for the locality, in a state-space sense, of a trim state and to schedule, using suitable indicators of the appropriate neighbouring trim states, over the gain sets and trim states, such that the current control is always well matched to the present operating conditions. Also, the path points demanded will be close to the trim values, such that tracking errors remain small.

The work is motivated by an interest in how humans control difficult machines, so that the modelling is more elaborate than has been attempted before. The notional rider is able to yaw, pitch and roll his/her upper body, relative to the unicycle frame. Low-pass filter properties are also built in to these ‘actuators’ to represent the bandwidth limitations of human controllers. Tyre force and moment descriptions are consistent with conventional wisdom from vehicle dynamics and tyre mechanics research. Consequently, automated multibody mechanics software is almost essential to the model-building task and the full nonlinear equations of motion are too lengthy and complex to show. However, the linear equations for small perturbations from a straight-running trim are manageable and provide some insight into the system dynamics.

In the next section, the unicycle and rider model is set up. Following that, there is a brief review of the relevant linear-optimal-preview-control theory and a description of how it is applied to a vehicle-driving problem. Control design and closed-loop system results are then shown and interpreted and some path-tracking simulations are discussed. Conclusions are drawn at the end.

## 2. Mathematical model of unicycle and rider

The mathematical model of the unicycle and rider is built using the multibody-modelling software VehicleSim, formerly called AutoSim (Mousseau *et al.* 1992; Sayers 1999; Sharp *et al.* 2005; also see http://www.carsim.com). The package has been employed to develop the widely used commercial models TRUCKSIM, CARSIM and BIKESIM. VEHICLESIM capabilities are described in Thommyppillai *et al.* (2009*b*) and in the electronic supplementary material, appendix A. To check the model building and to obtain the linear equations of motion for small perturbations from straight running at a given speed, the equations of motion are also derived using Lagrange’s energy method for quasi-coordinates (Pacejka 2002) and symbolic Matlab eigenvalues from the two approaches prove to be identical.

The equations of motion generated by VehicleSIM, the system parameter values and desired outputs can be written automatically into a simulation code, with the aid of a ‘C’ or ‘Fortran’ compiler, or they can be linearized for small perturbations about a general trim state and written into a Matlab ‘M’-file. Typically, for linear analysis, the nonlinear simulation program is used to find trim states and the equilibrium values of states and inputs are passed to Matlab to set up the numerical state-space form of the linear system equations. If the uncontrolled system is unstable, some form of stabilizing controller must be incorporated in the simulation model to find trim states. An alternative that has not been explored here is to solve the cornering equilibrium equations using a Newton–Raphson process, say.

Unicycle and rider are represented as follows. The main component of the system is the rigid frame, which includes the lower body of the rider. The freedoms of the frame are defined as follows: a massless body, the yawframe, has freedom to translate along *x*- and *y*-axes, in the road plane and to yaw about the vertical *z*-axis. A massless rollframe has only a roll degree of freedom relative to its parent body, the yawframe, with a common point between the two frames at ground level, that is, at the notional contact point. The axisymmetric wheel has spin freedom relative to the rollframe and it makes point contact with the flat and level ground. The unicycle frame pitches with respect to the rollframe, with a common point at the wheel spindle. The tyre can slip longitudinally and laterally. The frame rotations comprise yaw, *ψ*_{f}; roll, *ϕ*_{f}; and pitch, *θ*_{f}, so that the tyre camber angle relative to the ground is *ϕ*_{f}. The tyre generates longitudinal and lateral forces, an aligning moment in response to slip and camber and an overturning moment in response to camber, according to conventional wisdom for small slip ratios and camber angles (Clark 1981; Pacejka & Sharp 1991; Pacejka 2002; Sharp 2007*d*, 2008). The rider’s upper body is joined to the frame by a spherical joint, so that this body has yaw, *ψ*_{r}; pitch, *θ*_{r}; and roll, *ϕ*_{r}, freedoms relative to the frame. Fairly weak springs and parallel dampers act between upper and lower bodies of the rider, representing the rider’s structure in a simple way. The mechanical model is supported by figures 1 and 2.

For the description of the tyre longitudinal-, lateral- and turn-slips and, through them, shear forces and steering moment, the rolling velocity is needed (Pacejka & Sharp 1991; Pacejka 2002; Sharp 2008). This is the forward velocity of the point on the unicycle frame that coincides with the contact centre, *u*_{r}, say. The longitudinal slip ratio is the forward velocity of the theoretical ground-contact point P (figure 1; P being a material point on the tyre periphery), *u*_{p}, divided by *u*_{r}, the lateral slip ratio is the lateral velocity of P, *v*_{p}, divided by *u*_{r}, while the turn-slip ratio is the yaw rate of the frame, *r*_{f}, divided by *u*_{r}. Tyre shear forces and moments are specified by

The tyre forces and moments are linear functions of the slips and camber, naturally limiting the range in which they describe the real tyre accurately. It turns out that losing control is likely to occur well before tyre effects show signs of saturating, so that, within the context of this study, the linear tyre is considered adequate. Tyre data specifically for unicycle tyres is thought not to exist, so that numerical values have to be estimated based on knowledge of bicycle tyres (Sharp 2008), accounting for the load carried.

The rider can exert four control torques. The first is the wheel torque, *τ*_{w}, which acts between the frame and wheel. The other three are yawing, *τ*_{ψ}; pitching, *τ*_{θ}; and rolling, *τ*_{ϕ}, torques acting on the frame and reacted by the rider’s upper body. Each of the four ‘actuators’ that applies a control torque has a second-order Butterworth low-pass filter associated with it, to represent the response-time limitations of real riders. Each filter equation is of the form
where *τ* is the actuator torque, *τ*_{dem} is the torque demand and *ω*_{n} is the filter bandwidth. The system is holonomic, smooth and differentiable and has nine velocity states, nine displacement states and eight auxiliary states associated with the low-pass filters. The ignorable coordinate for the spin angle of the road wheel does not appear in the equations of motion, so that the (25×1) state vector is
in which the angular velocities *r*_{f}, *p*_{f}, *q*_{f}, *r*_{r}, *q*_{r} and *p*_{r} are related to the corresponding displacements as shown below.

The linear equations of motion for small perturbations from straight running, derived from the symbolic Matlab approach and omitting the rider low-pass filters, using *m*_{t}=*m*_{f}+*m*_{w}+*m*_{r}, *h*_{fw}=*h*_{f}−*r*_{w}, *h*_{rw}=*h*_{r}−*r*_{w}, *h*_{rj}=*h*_{r}−*h*_{j}, *m*_{th}=*m*_{f}*h*_{f}+*m*_{w}*r*_{w}+*m*_{r}*h*_{r}, , , *I*_{rxe}=*I*_{rx}+*m*_{r}*h*_{r}*h*_{rj} and *I*_{rye}=*I*_{ry}+*m*_{r}*h*_{rj}*h*_{rw}, with *u*_{0} and *q*_{w0} the trim speed and the trim wheel-spin speed respectively, are

Kinematically, .

The nonlinear simulation model outputs all the states, since one of its functions is to find equilibrium running (trim) conditions, while the linear model used for control system design only outputs those quantities that appear in the cost function, namely *x* and *y*, the absolute position coordinates of the unicycle’s reference point. Parameter definitions and values, representing a typical unicycle and rider, are collected in table 1. Most of these parameters are non-critical to the study, since it is in the nature of the optimal preview control theory to be applied that the inverse dynamics of the plant are represented in the controls. If the plant is altered within reason, then the controls change to compensate. However, it turns out that care has to be taken with the value of *C*_{rz}, the coefficient relating the tyre aligning moment to the turn-slip, as will be explained subsequently.

If the trim state for the linearized model involves straight running, the system has left/right symmetry and only the forward speed and the wheel-spin velocity are non-zero. The wheel-spin velocity is the speed divided by the wheel radius, since no slip is necessary in the absence of aerodynamic drag and tyre rolling resistance. The normal modes consist of one set for longitudinal motions and another set for lateral motions. A segment of a corresponding root-locus plot for the uncontrolled system with speed varying in the range of 0.1–10 m s^{−1} is shown in figure 3. Outside the plot space, there are two numerically large negative eigenvalues. The lateral modes vary with speed, as noted by Vos (1992), while the longitudinal modes represented by real eigenvalues at −8.20 s^{−1}, −4.719 s^{−1}, 2.372 s^{−1} and 5.789 s^{−1} are hardly affected by speed variations. The longitudinal divergence with eigenvalue 5.789 s^{−1} shows the difficulty associated with the stabilization by a human rider. A uniform rod of length 0.439 m balancing on its point has a similar time constant. From this viewpoint, stabilizing the lateral motions is less onerous and it gets a little easier as the speed rises.

A parameter set describing a typical monocycle and its root-locus through a somewhat extended speed range is given in the electronic supplementary material, appendix B. The root-locus corresponding to that above for the unicycle but under the assumption that the tyre constrains the motion by rolling perfectly without slip is shown in the electronic supplementary material, appendix C. The longitudinal modes are almost exactly the same as above but the lateral modes are significantly different.

## 3. Optimal linear preview control theory

### (a) General observations

Riding a unicycle can be viewed as a problem in optimal control, with optimization by reinforcement learning (Gurney 1997; Sutton & Barto 1998). Restricting attention to mild manoeuvring, it is a problem in linear-optimal control. More vigorous motions can be treated by gain-scheduling over several linear control schemes, each designed for the neighbourhood of a trim state. The problem involves preview of the path ahead as an essential feature and it involves time delays. Solutions for the control of systems that include time delays tend to be easier in discrete time, and that is the approach preferred here. Appropriate theory for optimal-linear-preview control exists (Tomizuka & Whitney 1975; Tomizuka 1976; Tomizuka & Rosenthal 1979; Louam *et al.*1988, 1992; Prokop & Sharp 1995), which has been applied to steering and speed control of various road vehicles (Sharp & Valtetsiotis 2001; Sharp 2005, 2006, 2007*a*,*c*,*d*,*e*, 2008; Thommyppillai *et al.*2009*a*,*b*). The detailed theory required is included in Thommyppillai *et al.* (2009*b*) and it is replicated here as the electronic supplementary material, appendix D. It is now reviewed briefly and then applied to longitudinal and lateral control of the unicycle.

### (b) Optimal linear preview control theory background

First, the nonlinear unicycle model is linearized for small perturbations about an equilibrium running, or trim, condition. The absolute longitudinal and lateral displacements of a reference point, the tyre–ground contact point, are outputs from the model. Then the relevant linear unicycle equations, with state-vector ** z**, input

**and output vector**

*u***are expressed in state-space form. The problem is converted to discrete-time form after selection of the sampling interval,**

*y**T*

_{s}. A parallel discrete dynamic system, describing the target motions in (

*x*,

*y*,

*t*) form, is joined to the unicycle description. Sample values of the longitudinal and lateral displacement demands through time, at intervals

*T*

_{s}, are each moved through a shift-register with the passage of a time interval. The oldest samples depart the problem, all the register contents move one step closer to the unicycle and the two samples, which were previously the input to the system, enter the registers. New (

*x*,

*y*) samples, previously just outside the problem compass, provide the new input to the problem.

With the conjoining of the dynamics of the unicycle to those of the displacement demands, the full state vector contains the appropriate unicycle states for the former and 2*n* preview values for the latter, where *n* is the number of preview points to be used. The first pair of preview samples in the problem at any time instant are the *x*- and *y*-displacements that the unicycle should have at this particular time and the cost function to be minimized in the optimal control calculations contains the sum of the squares of the differences between the demand and the actual at this instant. The cost includes a summation over infinite future time of this sum of squares. Control power also has to be included in the cost, with weighting coefficients defining the relative importance of tracking errors and control efforts. Implicit in the optimal control theory, the *x*- and *y*-demands are regarded as consisting of sample values from independent white noise processes but it is known that the optimal controls continue to be optimal if the white noise is low-pass filtered and sufficient preview of the disturbance is available (Tomizuka & Whitney 1975; Sharp 2005). The problem structure and optimal controls are illustrated in figure 4.

The optimal controls are conveniently found through Hazell’s Matlab toolbox (Hazell 2008). The toolbox requires only the setting up of the standard state-space (A, B, C, D) matrices, the setting of weights on tracking errors and control efforts, the discrete-time step and the number of preview points, for the optimal preview controls to be computed (see http://code.google.com/p/preview-control-toolbox/). The preview gains *K*_{2} fall to zero as the preview distance increases, corresponding to the fact that preview information can be too far ahead of the current situation to be useful. Therefore, the number of preview points included can be chosen, by trials, so that the full benefit available is effectively obtained. This is referred to as ‘full’ preview. With less than full preview, the control is suboptimal and is not of much interest, so that only full preview control will be used here.

## 4. Optimal controls

Examples of optimal controls are shown in this section. Each set of controls to be generated requires choices of: (i) the time step to be used in the problem discretization and the number of preview points to be used, chosen here always to give full preview, (ii) the trim state from which small perturbations are considered to occur, and (iii) *x*- and *y*-tracking error and control power weights relating to wheel, yaw, pitch and roll torque demands.

When the trim state of the unicycle involves straight running, the only non-zero trim values are those for forward speed and wheel spin velocity, but, when the trim involves turning, a control sufficient to stabilize the turning motion is needed to enable simulation of the condition, to determine the trim. The simplest solution is obtained by first designing controls for straight running and then using them to simulate turning. If the turning becomes too vigorous, of course the control will break, so the ambition must be curtailed. If the turning motion is only quasi-steady, the first control derived will be only approximate. Then, a steady turn defining a perfect trim state can be obtained either (i) by running the simulation model under feedback-control only or (ii) by tracking a circular arc of the required radius (with preview), with linearization for small perturbations from such a state allowing new locally optimal controls to be found. Further simulations in the same vein enable optimal controls to be determined for turns of increasing vigour. Straight running will be illustrated here and more optimal controls for both straight running and turning will be shown in the electronic supplementary material, appendix E.

For straight running, take *T*_{s}=0.01 s and ** R**=

*diag*[1,10,10,10], the latter to represent the idea that wheel torque control is relatively easy for the rider to provide, while yaw, pitch and roll torques rank the same as each other but are harder to provide than wheel torque. Then, we choose 10 s preview and use trial and error to determine a set of weights on tracking errors to give ‘full’ preview, yielding

**=**

*q**diag*[5

*e*2,1

*e*4]. Feedback gains obtained in discrete time are asymptotic to the corresponding continuous-time LQR-optimal gains as the time step is reduced, so that continuous-time gains are shown in table 2 and preview gains in figure 5. These results show that the speed of the unicycle has hardly any influence on the optimal longitudinal controls for straight running. Tighter controls designed for preview times of 5 s and 2 s with

**=**

*q**diag*[2.5

*e*3,2

*e*5] and

**=**

*q**diag*[1

*e*5,1

*e*7], respectively, are shown in a similar fashion in the electronic supplementary material, appendix E.

With a set of optimal controls installed, the unicycle becomes stable by virtue of the state feedback and autonomous, being capable of tracking a desired path, using the preview control. The frequency responses of the closed-loop system (Sharp 2007*c*,*d*,*e*, 2008; Thommyppillai *et al.*2009*a*,*b*) show the path-tracking capability to be perfect within amplitude and bandwidth limits, which depend on the tightness employed in the control design (figures 6 and 7). Figure 6 gives the longitudinal response to an *x*-displacement demand, while figure 7 shows the lateral response to a *y*-displacement demand. Results are represented in Bode diagram form, showing gain and phase against circular frequency. The input in these trials is at the furthest extent of the preview from the unicycle. That is, it is at the preview horizon. The unicycle is required to track what the rider can see at the horizon and it will take some time to arrive there. The system contains a transport lag, indicated by the plot symbols. Perfect tracking requires a gain of unity and a phase lag corresponding to the transport delay. This phase lag amounts to 180*nT*_{s}*ω*/*π* degrees, where *n* is the number of preview points, *T*_{s} the discrete time step and *ω* the circular frequency of the perturbation. Results are given only for perturbations from a straight-running trim state with speed of 2 m s^{−1} but four different levels of control tightness are illustrated. Corresponding weights are ** q**=diag[5e2, 1e4], diag[5e3, 1e5], diag[5e4, 1e6] and diag[5e5, 1e7], with

**=diag[1, 10, 10, 10] in each case.**

*R*With respect to each direction, the system phase lag matches the transport lag closely up to a circular frequency just above 3 rad s^{−1}. The lack of phase precision for higher frequencies implies worsening tracking performance whatever the control tightness. With loose control, gain attenuation sets the limit for good tracking at lower frequencies than this but, if the disturbance-input frequency is low enough in relation to the control tightness, the tracking capability is excellent.

Two cornering trim states, involving frame roll angles of 3.19^{°} and 6.58^{°} and the optimal controls corresponding to them, now cross-coupled, are discussed in the electronic supplementary material, appendix E.

## 5. Path-tracking simulations

Each tracking simulation run starts with the definition of the path to be followed in the form of (*x*,*y*,*t*) points, with *t* values conveniently separated by *T*_{s}, the sampling interval. The trim state and the initial conditions define the course of the unicycle if only the trim controls are utilized, so that differences between the (*x*,*y*) positions implied by the trim and those demanded by the path are used, together with the optimal gains, to derive the control perturbations necessary to track the path. The optimal controls are obtained in a fixed frame of reference, owing to the simplicity of the road model in such a reference system, but general path-tracking is feasible only if the controls are applied in a local, rider’s view, reference frame (Sharp & Valtetsiotis 2001; Sharp 2005, 2006, 2007*a*,*b*,*d*). At each time step, *T*_{s}, therefore, the position and orientation of the unicycle are used to transform the road data belonging to the current time up to the preview horizon, *nT*_{s} ahead, into the local frame of the rider. The reference axes are shifted to coincide with the unicycle, so that there is no problem in tracking paths which turn through large angles. Figure 8 illustrates the situation. Relationships between the feedback gains for longitudinal, lateral- and attitude-angle position errors and summations over the preview gains ensure invariance of the controls when the reference axes are moved (Sharp & Valtetsiotis 2001).

First, a lane-change manoeuvre is performed with trim state, straight running at 2 m s^{−1}, and controls described in table 2 and figure 5. In the path description, the *x*-points are separated in the *x*-direction by a constant 0.02 m, so that modest speed variations are called for. Results are shown in figures 9–11, where it can be seen that the tracking errors are generally less than 0.2 m, being similar in longitudinal and lateral senses. Corner-cutting is in evidence and the main errors derive from that. Tighter control could be used to reduce the errors but there would be an increased risk of loss-of-control occurring in the absence of adaptation (Thommyppillai *et al.* 2009*a*). Control torques used are very modest, with the pitch torque small, and yaw and roll torques of similar sizes in this case. It should be clear that the yaw torque control is more useful under transient than steady-state conditions, since it operates through the inertia of the rider’s upper body but there is no such limitation with respect to the roll-torque control. If only one of these controls were allowed (Vos & Von Flotow 1990; Vos 1992; Naveh *et al.* 1999; Zenkov *et al.* 1999), it is likely that performance would be prejudiced substantially.

Secondly, a clothoid manoeuvre is set up to demonstrate tracking capability up to a lateral acceleration of about 1.17 m s^{−2} through the use of gain-switching control. The clothoid has curvature increasing in proportion to the distance travelled along the track (Bronshtein & Semendyayev 1971). The speed demand is a constant 2 m s^{−1}. At the start, the same straight-line controls as used for the lane change are installed. Then, after every 40 s interval, new controls designed for the path curvature now current are installed, and the manoeuvre is continued. The total distance covered is 720 m, with duration 360 s. Excellent tracking is evident in figure 12. *x*- and *y*-tracking errors are given in figure 13, where it can be seen that the errors grow as the manoeuvre becomes more demanding. The largest errors are of the order of 0.2 m both longitudinally and laterally. The switching points are clear in the control plots (figure 14). Interpolating between the controls (Thommyppillai *et al.*2009*a*,*b*) would avoid these discontinuous actions but the results would be less interesting in such a case. Frame roll and pitch angles and the rider upper body relative angles are shown in figure 15, where the consequences of control switching can also be seen.

The clothoid path was chosen partly to enable the determination of trim states through simulation. The rate of change of curvature is low with the parameters selected. The unicycle and rider therefore pass through near-equilibrium states in the (virtual) tracking experiment. The tyre aligning moment must be near zero and the tyre side-force must account for the lateral acceleration at any time. The aligning moment has contributions from side-slip, turn-slip and camber. The path curvature and speed define a turn-slip, governing this contribution to the aligning moment and more or less determining the tyre side-slip required, since the camber contribution is small. The side-slip, in turn, determines the relevant contribution to the tyre side-force and the remaining force required mainly derives from camber. This sets the wheel camber angle. Then, for proper balance in roll, the rider upper body angle follows. In the development of the results shown, the parameter *C*_{rz}, the coefficient relating turn-slip to aligning moment, has been varied widely and, through the mechanism described above, its value has been found to have a strong influence on the relationship between the rider upper body lean and the frame lean angles. The value chosen (table 1), gives nice behaviour with respect to both steady turning and controllability. It would be of interest to determine *C*_{rz} experimentally for unicycle tyres, or alternatively to study the lean angles adopted by unicycles and riders in steady turns of various sorts. Nice behaviour is characterized by very small side-slips in steady turning. Then, the camber angle is such that the tyre develops the necessary side-force for turning and the rider’s body needs to lean with the frame, implying that *ϕ*_{r} will be small in steady state.

## 6. Conclusions

A uniquely representative mathematical model of a unicycle and rider has been constructed and tested through simulation. The tyre force and moment model, in particular, is descriptive of real tyres operating at modest slip ratios and camber angles. A full set of possibilities for actuation by the rider is included, with bandwidth limitations representative of real riders. The symbolic equations of motion, for small perturbations from straight running, have been presented. Representative sets of parameter values have allowed descriptions of a unicycle and a monocycle and root-locus results have been provided for each one. Care has to be exercised in choosing a model and parameter values yielding feasible steady turning behaviour.

Identical eigenvalues have been obtained through more or less independent processes for generating the equations of motion, one involving automated multibody software based on Kane’s equations, the other using Lagrange’s energy method and symbolic Matlab. The assumption that the tyres roll without slip, providing constraints on the motion as opposed to developing forces and moments, has been examined in root-locus form.

Linear optimal preview control theory developed in the context of car driving and motorcycle and bicycle riding has been shown to apply straightforwardly to the unicycle, in the form of the above model. Longitudinally and laterally decoupled controls for small perturbations from straight-running trim states and cross-coupled controls appropriate to cornering trims have been demonstrated. Rider-controlled tracking capabilities have been shown for varying levels of control tightness by means of frequency-response calculations. Path-tracking has been illustrated and simulation results shown for lane-change and clothoid manoeuvres. The lane change demonstrates a transient capability while the clothoid case involves very slow changes of path curvature but extends to a lateral acceleration of nearly 1.2 m s^{−2}. Gain switching to give a rudimentary adaptation of the controls to the running conditions has been illustrated for the clothoid.

A new appreciation of the way in which unicycle riders control their machines comes from the results obtained. The first step in learning to ride a unicycle concerns coping with the rather rapid divergence in pitch of the uncontrolled system, mainly by pedalling. The second step concerns the cross-coupling of the longitudinal wheel-torque control to the lateral motions when cornering. Yaw torque and roll torque controls are both useful for manoeuvring, with the former having more of a transient value and the latter being more useful in steady-state conditions. Pitch torque control is of lesser value.

The theory and results described provide a predictive capability for robotic unicycles, which can be used to guide the design of such machines. It appears essential to include wheel actuation and desirable to include both yaw and roll actuators. Linear optimal preview control with gain scheduling to cover speed and both longitudinal and lateral acceleration ranges provides an excellent basis for control design.

## Footnotes

- Received October 21, 2009.
- Accepted December 16, 2009.

- © 2010 The Royal Society