## Abstract

Bikebot (i.e., bicycle-based robot) is a class of underactuated balance robotic systems that require simultaneous trajectory tracking and balance control tasks. We present a tracking and balance control design of an autonomous bikebot. The external-internal convertible structure of the bikebot dynamics is used to design a causal feedback control to achieve both the tracking and balance tasks. A balance equilibrium manifold is used to define and capture the platform balance profiles and coupled interaction with the trajectory tracking performance. To achieve fully autonomous navigation, a gyrobalancer actuation is integrated with the steering and velocity control for stationary platform balance and stationary-moving switching. Stability and convergence analyses are presented to guarantee the control performance. Extensive experiments are presented to validate and demonstrate the autonomous control design. We also compare the autonomous control performance with human riding experiments and similar action strategies are found between them.

## 1 Introduction

Bicycle-based robot, here called bikebot, is a representative example of underactuated balance robot. Motion control of underactuated balance robots includes simultaneous trajectory tracking and platform balance. Considering planar motion, a bikebot has three degrees-of-freedom (DOFs), that is, the planar position and the roll motion of the body frame, while the available two control inputs include steering and velocity actuation. One major challenge of control of underactuated balance robots lies in the nonminimum phase, unstable internal subsystem, and its coupled dynamics with trajectory tracking of the external subsystem [1].

Modeling and control of single-track bikebots attracts extensive attention in past decades [2–6] and several autonomous bikebots have been developed [7–10]. With limited steering control capability, trajectory tracking and platform balancing are two competing tasks. To deal with the coupled dynamics, an external and internal convertible (EIC) structure of the bikebot dynamics was proposed in Refs. [4] and [6]. Under the EIC-based control, the target profiles of the internal subsystem are captured by the balance equilibrium manifold (BEM). The trajectory tracking control is first designed for the external subsystem, and the designed tracking control input is updated by enforcing the roll motion onto the BEM [11]. The work in Ref. [12] presented the calculation of the feasible motorcycle motion trajectory for aggressive, high-performance maneuvers. The motorcycle dynamics models were used to estimate the maximum velocity profiles for high-performance maneuvers. In Refs. [13] and [14], dynamics model-based motion control was developed for motorcycle aggressive maneuvers. Tire-road interactions play an important role for the motion planning and velocity profile estimation for aggressive maneuvers.

When the bikebot stays stationary or moves at a low speed, the steering-induced balance torque is limited, and it becomes extremely difficult to balance the platform [15,16]. To assist the balance control, various actuation devices have been added and installed on the bicycle platform. Those devices include gyroscopic balancer [3,11,17], reaction wheel [9,18,19], inverted pendulum balancer [20,21], and movable counterweight [5,22], etc. Most of the above-mentioned control designs focus on the platform balance while the trajectory tracking is not among the main tasks. The work in Ref. [19] uses the interconnection and damping assignment passivity-based control method for an autonomous bikebot with an assistive flywheel. In Ref. [23], a backstepping technique and an optimal control method were used for the tracking and balance control of external and internal subsystems, respectively. Simulation results were included to demonstrate the autonomous bicycles.

In this paper, we present a motion and balance control systems design for the autonomous bikebot. The planar motion of the bikebot is built on the kinematics model (with the nonholonomic constraint), while the roll motion is based on the dynamics model. The focus of the control design covers both the bikebot navigation for given trajectories and stationary or low-speed balance tasks. For bikebot navigation, steering and velocity control is the main actuation, while at stationary, a gyrobalancer is primarily used to provide balance actuation. Instead of regulating roll motion to one (upright) position, we present an energy shaping-based orbital stabilization approach for stationary balance control using the gyrobalancer. The main advantage of using the energy-shaping technique [24,25] lies in reduction of the magnitude of the needed gyroscopic balance torque and also relaxed gyrobalancer design constraints [17]. A coordination between the steering/velocity and gyrobalancer controls is also presented. The trajectory tracking control design is mainly built on the EIC structure of the bikebot dynamics and the stability and convergence analyses are presented. Extensive experiments are conducted to demonstrate the performance of the integrated control systems. Although the presented work mainly focuses on the autonomous bikebot, it is of interests to compare the motion control performance by the autonomous controller with the human rider control (e.g., Refs. [26] and [27]). Therefore, we include and discuss experimental comparison of the autonomous bikebot with the human riding performance.

The main contribution of this work lies in the extended EIC-based trajectory tracking and balance control of autonomous bikebots with experimental demonstration. To our best knowledge, few experimental demonstrations have been reported for the control of single-track mobile robots with only steering and velocity control. The experiments in Refs. [7] and [8] showed only the platform balance and trajectory tracking was not among the control tasks. The tracking experiments in Refs. [18–22] required assistive devices. Moreover, the comparison between the autonomous design and the rider control confirms similar strategies with the used BEM concept. The autonomous controller design of the bikebot navigation complements the human rider control strategies that were studied in Refs. [26–29]. Compared with the previous conference presentation [11,30,31], this work presents a more comprehensive design of bikebot system for both trajectory tracking and stationary balance control. We present a systemic way for stationary control and stationary-moving switching control. Convergence and stability are also guaranteed with additional experiments.

The rest of the paper is organized as follows. We present the bikebot-rider dynamics and introduce the EIC-based control in Sec. 2. Section 3 presents the gyrobalancer-enhanced tracking control, stationary balance, and stationary-to-moving switching. Experimental results and discussion are presented in Sec. 4. Finally, we summarize the concluding remarks in Sec. 5.

## 2 Bikebot-Rider Dynamics and Control

### 2.1 System Dynamics.

Figure 1(a) shows the prototype of the autonomous bikebot, and Fig. 1(b) shows the human riding experiment setup. Although the main focus of this work is riderless bikebot control, we present a bikebot-rider dynamic model for human riding performance comparison purpose. Figure 1(c) shows the kinematic configuration of the bikebot and a rider's trunk. When human subjects riding the bikebot, their hands hold the handlebar, and the pitch motion of the human trunk is negligible. Therefore, we only consider the roll motion of the rider trunk.

A ground-fixed frame $N(X,Y,Z)$ (with the *Z*-axis downward) and a bikebot body frame $B(x,y,z)$ are used. The roll and yaw angles of the bikebot are denoted as $\phi b$ and *ψ*, respectively. We denote the front and rear wheel contact points as *C*_{1} and *C*_{2}, respectively. The origin of $B$ is located at *C*_{2}, and frame $B$ is obtained from $N$ first by rotating around the *Z*-axis by *ψ* and then by rotating around the *X*-axis by $\phi b$. The human trunk is modeled as a point mass *H* on a massless rod that is pinned at seat position *S*. The distance from *H* to *S* is denoted as *h _{h}*, and the trunk roll angle is denoted as $\phi h$. The mass center

*G*of the bikebot and point

*S*are located at $[lb\u20090\u2212hb]T$ and $[ls\u20090\u2212hs]T$ in $B$, respectively. The bikebot wheelbase length, caster angle, bikebot and human trunk mass are denoted as

*l*,

*ε*,

*m*, and

_{b}*m*, respectively.

_{h}*l*is the steering trail. The mass moment of inertia of the bikebot along the

_{t}*x*-axis passing through

*G*is denoted as

*J*.

_{b}*C*

_{2}as

*v*and with the nonholonomic constraint at

_{r}*C*

_{2}, we calculate the yaw rate as [27]

*ε*and other angles. The ground is assumed to be flat and the pitch motion of the platform is neglected. Denoting the planar position of

*C*

_{2}as $rC2=[X\u2009Y]T$ in $N$, we obtain the kinematics model of the bikebot motion as

where $rC2(m)$ denotes the *m*-th order derivative of $rC2,\u2009m\u2208\mathbb{N}$, and the same notation is used for other variables, input $u=[ur\u2009u\psi ]T,\u2009ur=v\xa8r$ and $u\psi =\psi \xa8$. The reason for taking the third derivative in Eq. (2) is to incorporate balance torque by the yaw angular acceleration.

*τ*is the torque that is applied by the rider along the roll motion direction; see Fig. 1(c). Matrices $M(q),C(q,q\u02d9)$, and $G(q)$ denote the moment of inertia, Coriolis and gravitational effects, respectively. $B(q)$ is the input matrix. The explicit form of these matrices are given in Eq. (4) on the top of the next page with $Mh=mbhb+mhhs,\u2009Ja=Jb+mbhb2+mh(hs2+hh2)+2mhhshhc\phi h,\u2009Jm=mbhb2+mhhs2$, and

_{h}*g*=

*9.8 m/s*

^{2}is the gravitational constant.

*Remark 1*. *The input*$ur=v\xa8r$*is the controlled linear jerk (*i.e., *the derivative of acceleration*$v\u02d9r$*). In experimental implementation, the designed input u _{r} is integrated twice to obtain the velocity v_{r} that is the control command for the driving motor. The other input*$u\psi =\psi \xa8$

*is the controlled yaw acceleration of the bikebot. The input*$u\psi $

*is first integrated to obtain the controlled yaw angular rate*$\psi \u02d9$

*. Then, by relationship (1) between*$\psi \u02d9$

*and*$\varphi $

*, we obtain the controlled steering angle command*$\varphi =tan\u22121(\psi \u02d9lc\phi bc\epsilon vr)$

*. Therefore, control input*

*u**is implemented by the driving and steering actuation in experiments.*

### 2.2 Balance Equilibrium Manifold and Bikebot-Rider Control.

*i*=

*0, 1, 2 are chosen such that polynomial $s3+b2s2+b1s+b0$ is Hurwitz. By Eq. (6), the control input is designed as*

*b*) under control (7). We define an implicit function of

**as $F(q,u,\tau )=B(q)u+\tau \u2212C(q,0)\u2212G(q)$ and let $qe=qe(u,\tau )$ be the solution of the algebraic equation $F(qe,u,\tau )=0$ for given $u$ and**

*q**τ*. The BEM under $uext$ and $\tau $, denoted by $E(uext,\tau )$, is defined as

where $x=[rC2T\u2009r\u02d9C2T\u2009r\xa8C2T]T$ and $\alpha =[qT\u2009q\u02d9T]T$. The BEM $E(uext,\tau )$ is viewed as a time-dependent graph of $\Sigma ext$ that is evolved with $Next$ under $uext$ and $\tau $. The value of $qe(uext,\tau )$ in $E(uext,\tau )$ also depends on ** x** implicitly through control $uext$.

*i*th row and

*j*th column, $i,j=1,2$. Note that

*u*does not appear in the above equation because the first column in $B(q)$ is zero. From the above equation, the balance control of $\Sigma int$ is

_{r}where ** K** denotes a collection term of the derivative of $G,C,B,\tau $ with respective to variables other than $qe$, and $uN,X$ and $uN,Y$ denotes the components of control $uNext$ in

*X*and

*Y*dimension. The form of $L\xafNext2qe$ is obtained similarly. The overall control of the bikebot-rider system by Eq. (5) combines the controllers in Eqs. (7) and (10) as $ur=urext$ and $u\psi =u\psi int$, where $u\psi int$ is the first element of $u\xafint$ in Eq. (10).

*Remark 2*. *Although the above-developed control includes the human trunk motion and actuation, the design can be simplified for riderless autonomous control by reducing the roll motion and setting*$\tau =0$*in**Eq.*(5*b*)*. In the following section, we will use the above developments to present the riderless autonomous control to further illustrate the design.*

Figure 2 illustrates and summarizes the above EIC-based control scheme. For a given trajectory $T$, the control system is first to specify the external systems controller $uext=[urext\u2009u\psi ext]T$ that is given by Eq. (7). Then, we compute the external vector field $Next$ by Eq. (8) and the BEM by Eq. (9). The final controller is updated by roll stabilization by Eq. (10) and given as $ur=urext$ and $u\psi =u\psi int$. In Sec. 3, we will discuss the gyrobalancer-enhanced control design.

## 3 Gyro-Balancer Enhanced Control

In this section, we mainly present the gyrobalancer control of bikebot and then discuss how to use the gyrobalancer to assist the stationary bikebot. Finally, the switching strategy between stationary balance and tracking control is briefly discussed.

### 3.1 Bikebot Model With the Gyro-Balancer.

*ω*, and the flywheel's pivoting angle is denoted as $\phi w$. The gyroscopic torque along the roll motion is calculated as

_{s}where *I _{z}* is the mass moment of inertia of the flywheel about its rotating center.

### 3.2 Enhanced Tracking Control With the Gyro-Balancer.

*u*= 0. The control design follows the discussion in Sec. 2.2. Under $uext$ in Eq. (7), the balance equilibrium angle $\phi be$ in Eq. (9) satisfies the following relationship

_{w}*Remark 3*. *Under controller*$C$*in Eq. (15), both the position tracking error*$ep$*and roll motion error*$e\phi b$*are shown to exponentially converge to neighborhoods around zero simultaneously. The stability and convergence proofs are obtained by using the EIC properties and a technical assumption about the BEM approximation error in the closed-loop dynamics [*4 *]. A similar proof is given in**Ref. [*26 *]**and we omit here.*

*u*and steering control $u\xaf\psi int$ to further improve the trajectory tracking performance. By the EIC-based design, under $uext$, the bikebot position converges to the desired trajectory $T$ exponentially. For the balance task, the steering input $u\psi int$ is different from $u\psi ext$ and thus introduces tracking errors $ep$. On the other hand, $u\psi int$ has to drive $\phi b$ to $\phi be$. The goal of the gyrobalancer control

_{w}*u*is to help balance the platform under $u\xaf\psi int$. Under

_{w}*u*and $u\xaf\psi int$, the balancing capability is assumed to be the same as $u\psi int$ with

_{w}*u*= 0, namely, the right-hand sides of Eq. (12) are the same and thus, we obtain

_{w}where $d\xaf0=\u2212g\psi \u22121(\phi b)f(\phi b)+g\psi \u22121(\phi be)f(\phi be)+g\psi \u22121(\phi b)Jtv\psi int\u2212g\psi \u22121(\phi b)gw(\phi b)uw$. From Eq. (20), if $u\xaf\psi int=u\psi ext$, then $d\xafp=0$ and errors $ep$ converge by Eq. (17). However, given Eq. (16) and the restrictive pivoting motion, the magnitude of $u\xaf\psi int$ cannot be arbitrarily chosen.

*u*and $u\xaf\psi int$ by considering the physical constraints of the gyrobalancer actuation, namely,

_{w}*u*, that is, $fwc\u2212(\phi w)\u2264uw\u2264fwc+(\phi w)$, where

_{w}Lemma 1. *The error disturbance*$d\xafp$*under controller*$C\xaf$*is not greater than that of*$dp$*under controller*$C$.

*Proof* . See Appendix A.▪

where $k0,k1,k\xaf0,k\xaf1>0$ are constants. Given the result in Lemma 1, we assume that $k\xaf0\u2264k0,\u2009k\xaf1\u2264k1$. We have the following results about errors $ep$ and $e\xafp$.

Theorem 1. *Under controllers*$C$*and*$C\xaf,\u2009ep(t)$*and*$e\xafp(t)$*exponentially converge to regions near the origin. Moreover, denoting the error bounds*$epb(t)$*and*$e\xafpb(t)$, i.e., $||ep(t)||\u2264epb(t)$*and*$||e\xafp(t)||\u2264e\xafpb(t)$*, we obtain*$e\xafpb(t)\u2264epb(t)$*for*$t\u22650$.

*Proof* . See Appendix B.▪

where $d\phi b=\phi \xa8be\u2212L\xafNext2\phi be+a1(\phi \u02d9be\u2212L\xafNext\phi be)$, which is bounded by the norms of the desired trajectory [4]. Because of the unchanged internal error dynamics by Eq. (27) under $C$ and $C\xaf$, the stability and tracking performance for the BEM is the same.

### 3.3 Stationary Balance With Gyro-Balancer Control.

*v*= 0 and $u\psi =0$ and we consider balancing the bikebot by using the gyrobalancer. One constraint of the gyrobalancer is the lack of continuously supplied, large balance torque due to its working principle, that is, a constant pivoting rate

_{r}*u*is needed but an increased pivoting angle would reduce the output torque. Therefore, instead of regulating the roll angle at the upright position, we stabilize the platform at a designed orbit to further help avoid saturation of the output balance torque. We define the state variables as $\xi =[\xi 1\u2009\xi 2\u2009\xi 3]T=[\phi b\u2009\phi \u02d9b\u2009s\phi w]T$. From Eq. (12), the roll motion dynamics reduces to

_{w}where *b *>* *0 is constant. Plugging Eqs. (30) into (29), we have $\xi \u02d93=\u2212(b+g)mbhb2Iz\omega sb\xi \u02d92=\u2212L\xi \u02d92$, where $L=(g+b)mbhb2Izb\omega s$. The corresponding orbital trajectory for *ξ*_{3} is given by $Og:\u2009\xi 3=\u2212L\xi 2$.

where $\gamma =gbIz\omega s>0$, and $\kappa 1,\kappa 2>0$. We have the following result.

Lemma 2. *Under control (31), the system by Eq. (28) converges to the invariant set*$S(\xi )={\xi \u2009|vg(\xi )=0}$*asymptotically, and the closed-loop trajectories of*$\xi $*are on orbits*$Ob$*and*$Og$*simultaneously.*

*Proof* . See Appendix C.▪

### 3.4 Stationary-Moving Control Switch Strategy.

Noting that $|\phi \u02d9b|\u226a\omega s$ and $|Ix\phi \u02d9bs\phi w|\u226aIz\omega s$, the gyroscopic balance torque (11) is simplified as $\tau g=\u2212Iz\omega sug$. The maximum instantaneous gyroscopic balance torque is then estimated as $\tau gmax=Iz\omega suwmax$. We compare the above gyroscopic balance torque with the steering-induced balance torque. Using the condition $\phi b\u22480$ and at constant $\varphi $, we simplify Eq. (12) and collect all terms related with the steering angle. The steering-induced balance torque is $\tau s=mbhbc\phi bvr\psi \u02d9\u2212mbgltlb\u2009tan\u2009\varphi c\epsilon c\phi bl=mbc\epsilon ltan\u2009\varphi (hbvr2\u2212gltlb)$. It is clear that with increasing steering angle $\varphi $ and velocity *v _{r}*,

*τ*value grows. It is however difficult to analyze and directly compare the magnitudes of

_{s}*τ*and

_{s}*τ*from the above calculations. We here illustrate the comparison numerically. Using the bikebot prototype parameters, Fig. 4 illustrates the balance torque

_{g}*τ*as varying velocity and steering angle. When velocity

_{s}*v*is small, the value of

_{r}*τ*is small. In this case, it is extremely challenging to only use steering actuation to balance the platform.

_{s}From the above discussion, for the stationary platform or at low-velocity motion, the bikebot balance is maintained by the gyrobalancer control only, while at large velocity, steering control is mainly used. Therefore, a switching strategy is needed between the gyrobalancer and steering controls. Stability under the switched control follows the design that the state under the current controller is within the region of attraction of the switched target controller. By doing so, the stability of the switched control is guaranteed. For simplicity, velocity magnitude is chosen as the switching condition. The controlled torque is $\tau \psi =g\psi (\phi b)u\psi =mhblbc\epsilon l[vr(\u2009sec\varphi 2\varphi \u02d9+\phi \u02d9b\u2009tan\u2009\varphi \u2009tan\u2009\phi b)+v\u02d9r\u2009tan\u2009\varphi ]$. Clearly, to achieve effective steering control, the velocity needs to reach a certain value $v1*$, at which the bikebot roll motion state is within the region of attraction of the steering control. Similarly, when switching back to stationary balance control the by gyrobalancer, the effective design is to reduce the velocity below $v2*$ at which the steering effect is negligible and the gyrobalancer can safely take over the balance task to stop the bikebot.

## 4 Experimental Results

### 4.1 Experimental System.

The bikebot prototype shown in Fig. 1(a) was modified from a mountain bicycle with a set of sensors and actuators. A high-resolution inertial measurement unit (IMU) (model 801; Motion Sense, Inc.) was used to obtain the roll angle $\phi b$ and yaw angle *ψ* and their rates. Optical encoders were used to measure the velocity (from the rear wheel) and steering angle. A real-time kinematic (RTK) GPS unit (Novatel, Inc.) was used to obtain the bikebot position. The gyrobalancer was mounted on the rear rack. The flywheel and pivoting motion were each driven by a DC motor with encoders for feedback control; see Fig. 3(a). The steering actuation was driven by a DC motor (with an encoder for position feedback) and the bikebot velocity was driven by the hub motor at the rear wheel. A real-time embedded system (cRIO model 9082; National Instruments, Inc.) was used to collect all measurements and compute the control inputs at a frequency of 100 Hz. The positioning information from the GPS unit was updated at around 20 Hz. Table 1 lists the values of the physical parameters of the bikebot system. The following control gains and parameters were used in implementation: $a0=25,\u2009a1=180,\u2009b0=3,\u2009b1=6,b2=10$ for the EIC controller; *b *=* *1 for the orbital stabilization controller. The gyrobalancer physical constraints were given as: $\phi wmax=\pi 2$ rad, $uwmax=6$ rad/s, $\epsilon d=2$ rad/s^{2}, and $\gamma wmax=6$ rad/s^{2}.

We conducted human-riding experiments to compare with the autonomous control. As shown in Fig. 1(b), the rider operated the bikebot similar to a regular bicycle with manual steering and regulating the velocity. Trajectory lines were marked on the ground so that the human subjects rode the bikebot to follow the trajectory as closely as possible. A 6DOF force/torque sensor (JR3, Inc.) was installed underneath the bikebot seat to obtain the rider's trunk torque *τ _{h}*. An IMU (model 605; Motion Sense, Inc.) was mounted on the human trunk to obtain the rider trunk roll angle. The embedded system was used to collect and store the motion data at a frequency of 100 Hz. The subjects were experienced bicycle riders, and they rode the bikebot for about 10 min before experiments were recorded. An informed consent form was signed by human subjects and the testing protocol was approved by the Institutional Review Board (IRB) at Rutgers University.

### 4.2 Experimental Results.

We first present the validation results for the bikebot-rider model by Eq. (3) using human riding experiments. Figure 5(a) shows the trajectory of the bikebot following an “8”-shape trajectory (with a radius of 3 m). The subject rodes the bikebot with a velocity of around 2 to 2.5 m/s. Figure 5(b) illustrates the validation of the two equations in Eq. (3). The plots compare the calculations of term $G(q)$, and the rest of the other terms in the dynamics equation is neglected. We chose this comparison method because the magnitude of $G(q)$ dominates the values of other terms. These results clearly show a close match between the model prediction and the experiments. Figures 5(c) and 5(d) show the bikebot and rider trunk roll angles, respectively. Using the steering angle, human trunk driving torque, and velocity measurements, we computed and plotted the BEM (i.e., $\phi he$ and $\phi be$). The actual angles followed closely with these equilibria. We also computed the EIC-based control design, and Figs. 5(e) and 5(f) show these control inputs (i.e., steering angle $\varphi $ and velocity *v _{r}*) together with the actual human inputs. The velocities labeled “EIC” in Figs. 5(e) and 5(f) were calculated using the system model, and the difference with the rider experiments is due to the modeling errors and variations of human riding behavior.

To demonstrate the influence of the moving velocity on trajectory tracking performance, we ran experiments by first regulating velocity *v _{r}* at a constant value and using only the steering control. Five sets of experiments were conducted: the straight-line, circular, and “8”-shape trajectories (radii 4 and 6 m) under velocity $vr=1.7,2.1$, and 2.6 m/s. Figure 6 shows an example of tracking results of the straight-line, circular, and “8”- shape (with radius 6 m) trajectories at $vr=2.1$ m/s. As shown in Fig. 6(a), the position tracking errors are less than 0.15 m for the straight-line tracking. For both the circular (Fig. 6(b)) and “8”-shape (Fig. 6(c)) trajectory tracking, the position errors are less than 0.8 m. Figures 6(d)–6(f) show the roll angle tracking results of these three trajectories. The roll angle errors for the straight-line tracking control are plotted over the horizontal position, while for circular and “8”-shape trajectories, they are plotted over the arc-length. It is clear that roll motion followed the calculated BEM closely.

We computed the mean and standard deviation values of the tracking errors under different trajectories and velocities setups. Under each set of those conditions, we repeated four testing runs similar to those shown in Fig. 6 to calculate the statistics. Figure 7 shows the calculated means and standard deviations of the tracking errors (i.e., $||ep||$−$|e\phi b|$). Under the same velocity, the straight-line tracking always has the smallest position errors and roll angle errors, while the errors under the circular tracking are smaller than those under the “8”-shape trajectory. The roll angle reference (i.e., BEM) displays a sudden change when the robot turning direction changes; see Figs. 6(c) and 6(f). This motion requirement can bring a larger tracking error for the “8”-shape trajectory than the circular trajectory. It is clear that the tracking errors for the large-radius trajectory are smaller than those of the small-radius trajectory. With large velocity, both the position and roll motion errors increase. The position tracking error and roll motion error are related to each other, that is, both errors change in the same trend under velocity and trajectory radius variations.

We further implemented controllers $C$ and $C\xaf$ for straight-line and circular trajectories. Figures 8(a) and 8(b) show the position trajectory and the tracking errors, respectively. Figure 8(c) shows the roll angle profiles. Under both controllers, the bikebot successfully followed the straight line. Under $C\xaf$, the bikebot reached the desired trajectory in a smoother fashion and with smaller errors than those under $C$. This is clearly reflected by the control inputs in Figs. 8(e) and 8(d). Without using the gyrobalancer, after crossing the desired trajectory, the bikebot continued to turn (at 86 s in Fig. 8(d)). In contrast, the gyrobalancer helped to generate additional torques to assist balance tasks (e.g., at *t *=* *103 s in Fig. 8(e)). Figure 9 shows the results for tracking a circular trajectory. Compared with trajectory under $C\xaf$ in Fig. 9(a), a larger steering effect is shown in Fig. 9(b) right after the bikebot entered the circular trajectory (around *t *=* *82 s). This sharp turn is also observed from the roll angle in Fig. 9(c). The steering effort to balance the platform was reduced and smoothed by the gyrobalancer. The magnitude of tracking error $||e\xafp||$ (Fig. 9(d)) is smaller than $||ep||$ (Fig. 9(c)). The control inputs under $C\xaf$ and $C$ are illustrated in Figs. 9(e) and 9(f), respectively.

We now demonstrate the stationary balance results. Figure 10 shows the phase portraits of the bikebot roll angle (Fig. 10(a)) and the pivoting angle (Fig. 10(b)) when the bikebot was stationary. The bikebot was released at $\phi b(0)=\u22121.2$ deg and $\phi \u02d9b(0)=0$ deg/s with $\phi w(0)=0$ deg. From the figure, the desired roll angle orbit reached ±2 deg and roll angular rate to ±5 deg/s. From Fig. 10(a), after several periods, the bikebot roll angle was controlled to near the desired rolling orbit around ±2 deg. Once the roll motion reached the desired orbit, the flywheel pivoting motion was also near the pivoting orbit within the range of ±50 deg as shown in Fig. 10(b).

Figure 11 shows the results under the stationary-moving switch control. The bikebot was controlled from stationary to moving and back to stationary again to track a straight-line trajectory. As shown in the figure, the stationary stages were from *t *=* *66.2 to 81.6 s and from *t *=* *104.7 to 118.5 s. The switching velocities were set as $v1*=1.2$ m/s and $v2*=1.9$ m/s. Figures 11(a) and 11(b) show the roll angle $\phi b$, velocity *v _{r}*, and steering angle $\varphi $ and flywheel pivoting angle $\phi w$, respectively. Figure 11(c) shows the bikebot planar position, and the position errors are held within 0.4 m. The bikebot was first released at a small $\phi b$, and under the gyrobalancer orbital regulation control, the roll motion was within the range of ±1 deg. After $vr>v1*$, the bikebot moved around

*v*= 2 m/s, and $\phi w$ was set to zero, and the platform was stabilized by steering control. From

_{r}*t*=

*104.7 s (i.e., $vr<v2*$), the bikebot moved into the stationary phase under the gyrobalancer control. After a 5 s transition duration, the roll angle followed a periodical motion, and the steering angle was set to zero.*

We further compare the autonomous control results with human riding experiments. The results under controller $C$ (i.e., without using the gyrobalancer) are compared with these under the human steering control. Figure 12 shows comparison results of tracking an “8”-shape trajectory (radius of 6 m) with velocity $vr=2.1$ m/s. From Fig. 12(a), the control performance under the human rider and the autonomous control is in general similar though the former maintains smaller tracking errors than the latter. Figure 12(b) shows the steering and roll angles under the two types of controllers. It is clear that under autonomous control, the roll motion experienced less oscillation than that under the rider control. The high-frequent steering actuation by the rider might result in small position errors. Figure 13(a) further shows the position comparison of tracking a smaller “8”-shape trajectory (with a radius of 3 m). The motion velocity was selected at a value under which emergency protection can be provided by a human operator immediately to avoid any damage in experiments. Figure 13(b) shows the comparison of velocity and the steering angle profiles under the human riding and controller $C$. In this case, the tracking errors under $C$ are in general smaller than those under human control. The human balance motor control might be similar to those under $C$. This observation can be found in the velocity and steering angle comparison plots in Figs. 13(b) and 13(c). The overall velocity and steering actuation trends under human control and $C$ are also similar. Indeed, the results in Ref. [32] have shown that the EIC-based control by Eq. (10) has the same mathematical structure as the human neuro-controller that was empirically built on the human riding experiments.

### 4.3 Discussion.

In this work, the planar motion of the bikebot is built on the kinematics model (with the nonholonomic constraint), while the roll motion is based on the dynamics model. This paper mainly extends the EIC-based trajectory tracking and balance control of autonomous bikebots with given desired trajectories. The motion control only uses the steering and velocity actuation as the basic design. With an additional gyrobalancer assistive device, the motion is extended to include the stationary balance. The influence of the steering on bikebot dynamics was developed through the balance torque as explained in Ref. [33]. A similar model has been used to analyze and demonstrate that bikebot riders would prefer to use steering actuation than the upper-body leaning motion to overcome any perturbations [26]. For most experimental examples in this work, the bikebot speeds were mild (e.g., 1–3 m/s), and the steering-induced balance torque was not significant compared with these in the high-speed cases.

As we explained previously, the work in Refs. [12] and [13] considered a dynamic model for the motorcycle planar motion, and tire-road interactions are among the important part of the model for aggressive velocity planning. Compared to the dynamic model for planar motion, the kinematic model used in this paper is simple and maintains critical properties such as nonholonomic constraints for relatively mild velocity navigation. The trajectory planning and aggressive maneuvers are not among the main design goals of this work. This is the main difference with the work in Ref. [12]. In order to plan the motion trajectory and maximum velocity profile, we do need to know the tire-road interactions properties (e.g., friction circles, etc.) This would bring complex dynamic model for the bikebot planar motion, such as those in Refs. [12–14]. It would be helpful to incorporate the motion planning as part of an extension for future development.

Following the above discussion, the existence of the BEM by Eq. (9) is based on the assumption that the bikebot roll motion can be realized. That implies that the algebraic equation $F(q,uext,\tau )=B(q)uext+\tau \u2212C(q,0)\u2212G(q)=0$ has a feasible solution that satisfies the roll motion dynamics under given $uext$ and $\tau $. The solution of this equation depends on the external controller $uext$. If for a given trajectory, such as a sharp turn, under the designed $uext$, there is no feasible roll motion and then a revised trajectory-tracking controller or replanning the trajectory is needed. Since the demonstrated experiments took smooth trajectories and reasonable velocity profiles, the control design always found the equilibrium solution of Eq. (9). For a given desired trajectory, we can also design a path-following controller, instead of trajectory tracking control as shown in this paper, by taking a time suspension technique to tune the bikebot velocity with the path-following errors [34]. This approach would help design a feasible velocity profile to follow a given path for the bikebot control.

## 5 Conclusion

We presented a set of gyroscopic balancer-enhanced control strategies for the autonomous bikebot for simultaneous trajectory tracking and platform balance. The control design was built on the EIC structure of the bikebot dynamics. The balance equilibrium manifold played a critical role to build the interconnection of the trajectory tracking and the balance roll motion profiles. When the platform was stationary, the gyrobalancer mainly provided the balancing torque. A switching strategy between the velocity and steering control laws was proposed to interconnect to the trajectory tracking controller. We presented extensive experiments to validate and demonstrate the autonomous control performance and also compared them with the human riding experiments. It was confirmed that the human riding and autonomous control strategies shared a similar steering and velocity actuation for tracking trajectory and maintaining balance. As an ongoing future work direction, incorporating the bikebot dynamics model and tire-road interactions into the trajectory planning would help design motion controllers for high-performance agile maneuvers.

## Funding Data

Directorate for Engineering (Award No. 1334389; Funder ID: 10.13039/100000084).

National Science Foundation (Award No. 1932370; Funder ID: 10.13039/100000001).

### Proof of Lemma 1

From the sign and amplitude definition of *u _{w}*, we conclude the following relationships: $sign(d0)=sign(g\psi \u22121(\phi b)gw(\phi b)uw)$ and $|g\psi \u22121(\phi b)gw(\phi b)uw|\u2264|d0|\u2212\epsilon d<|d0|$. Thus, we take the absolute value of Eq. (A1) without changing the form and obtain $|d0|\u2212|d\xaf0|=|g\psi \u22121(\phi b)gw(\phi b)uw|>0$. This completes the proof.

### Proof of Theorem 1

*n*×

*n*identity matrix, and

**, respectively. Defining $W=V$, we write Eq. (B1) as**

*P*where $\upsilon \xaf=12(1\lambda 2\u2212k\xaf12\lambda 2\lambda 1)>0$ and $k\xaf1<\lambda 12\lambda 22$. From Eqs. (B3) and (B4), it is straightforward to obtain that both errors exponentially converge to the regions near the origin with bounds $2\lambda r2k0\upsilon $ and $2\lambda r2k\xaf0\upsilon \xaf$, respectively. Given $||ex(0)||=||e\xafx(0)||$ and $\upsilon \xaf\u2265\upsilon ,\u2009e\u2212\upsilon \xaft\u2264e\u2212\upsilon t$ for any *t* and $k\xaf0\upsilon \xaf\u2264k0\upsilon $, and thus $e\xafpb(t)\u2264epb(t)$ for $t\u22650$ given $k\xaf0\u2264k0,k\xaf1\u2264k1$. This completes the proof. ▪

### Proof of Lemma 2

*V*

_{1}and using Eq. (31), we obtain

By LaSalle theory [35], the system states converge to the invariant set $S(\xi )$ asymptotically. In $S(x),\u2009vg(\xi )=0$ and then control input $ug=Lbhbs\xi 1$. Plugging the above *u _{g}* into system dynamics in Eq. (29), we obtain that the closed-loop dynamics for $\xi $ are on orbit $Ob$ and $Og$. This completes the proof.