System parameters and control gains.

## Abstract

2D Ballbot is an actual under-actuated system with second-order nonholonomic velocity constraints and input coupling case where only control input is employed to control two outputs of the system. Controlling such a system is not easy because it faces many changelings including nonlinearities, external disturbances, and uncertainties. This study proposed a robust control system for a Ballbot mobile robot. The proposed control scheme is constructed using the hierarchical sliding mode control technique. The kinematics and dynamics of the Ballbot are derived. A Lyapunov function is used to prove the stability of the closed-loop control system. The stabilizing and transferring problems are investigated through several simulations and experiments by using the actual Ballbot platform.

### Keywords

- sliding mode control
- Ballbot
- under-actuated system
- Lyapunov analysis
- stabilizing and transferring

## 1. Introduction

Ballbot has a body that balances on a single spherical wheel (ball). The robot uses a drive mechanism consisting of three omnidirectional wheels (OWs) for a ball [1] to ensure both stabilizing and transferring. The Ballbot can free travel in any direction on plat plane, even if the robot is crowded with people in a common human-coexisting environment.

An inherent property of the Ballbot system is a naturally nonlinear underactuated multi-input multi-output system, in which the number of the control input signal is less than the number of output signals. This property introduces the challenge related to Ballbot control design. Several control designs were accomplished using a simplified model (linear model) to overcome the complexities of the mathematical equations. The linear model is the first way to deal with the complexity of the mathematical equation of the Ballbot system. Reference [2] designed a control system based on a state feedback controller to control stabilizing and transferring. The experimental results showed the ability to stabilize and travel with loads in any direction. However, it can be led only to small external disturbances. Studies in [3, 4] employed a double-loop linear control system to stabilize a Ballbot. Their control system had two controllers: a PI inner-loop controller and a linear quadratic regulator (LQR) outer-loop controller. Kantor et al. [5] proposed a double-loop control system. Both inner-loop and outer-loop controllers were PID controllers. Sukvichai and Parnichkun [6] used a linear controller based on an LQR control scheme for a double-level Ballbot.

The second way to deal with the complexity of the mathematical equation of the Ballbot system is to use nonlinear and intelligent controls such as partial feedback linearization control (FLC), sliding mode control (SMC), or fuzzy control. Lotfiani et al. [7] employed an SMC controller along fuzzy trajectory planning to control a Ballbot to track the desired trajectory. Moreover, a collocated PFL method [8] was introduced for a Ballbot. The open-loop trajectory generation with the collocated PFL controller was simulated which showed a low position error.

Some researchers have studied intelligent control techniques. Reference [9] suggested an intelligent tracking control system combined with a dual Mamdani-type fuzzy control strategy and supervisory control technique for an omnidirectional spherical mobile platform. The experiment results showed the position tracking response of the robot. A fuzzy wavelet cerebellar-model-articulation controller [10] was proposed for a team of multiple Ballbots.

SMC is a well-known and robust nonlinear control scheme. To enhance robustness for both actuated [11] and under-actuated [12, 13, 14, 15, 16, 17, 18, 19] systems, several controllers have been employed the SMC control method. The application of SMC for Ballbot control can be found in several previous studies. Ching-Wen et al. [20] introduced a hierarchical SMC based on backstepping to control stabilizing and agile trajectory tracking of a Ballbot with exogenous disturbance. Reference [21] enhanced Ching-Wen’s backstepping SMC using interval type 2 fuzzy neural networks for motion control of a Ballbot with a four-motor inverse mouse ball-diving mechanism. However, these studies only presented numerical simulations.

As mentioned, the Ballbot is naturally an under-actuated system in which the number of the control inputs is less than the number of the outputs. The Ballbot system is nonlinear. Moreover, the control design problem also faces uncertainties, un-modeling, and disturbances. Thus, the SMC control scheme is a suitable approach for the Ballbot system.

In this study, we designed a robust controller to control a Ballbot. The proposed control scheme is a basis of the hierarchical SMC technique to execute two main tasks including stabilizing the body on the top of the ball and maneuvering the ball on the floor.

## 2. System model

### 2.1 Kinematic model

The general kinematics of the Ballbot is a relationship between * x*-

*plane and each driving axis is sloped downward by*y

*.*α

The main assumptions for simplification of the system are:

Body and floor are absolute solids.

No slippage occurs on the surfaces of the ball-floor and the ball-OW.

The points of contact of the ball-ground and the OWs-ball are points of contact.

The non-slip condition of the surface of the ball-OWs is met by requiring that the projection of velocities of the ball at all contact points in the actuation direction of the OW be the same and expressed mathematically as

where * i* between the ball and the

*th OW in the body frame as indicated in Figure 1,*i

*th OW contact point velocities in the actuation directions, and*i

Therefore, the angular velocities of the OWs are expressed as

As shown in Figure 1, the position vector of the contact point

Furthermore, the direction cosine vectors that provide the corresponding direction of the speed at the contact point between the OWs and the ball are defined by

Substituting (3a), (3b), (4a) and (4b) into (2) yields

where

The Jacobian matrix (6) represents the effect of the zenith angle on the motion relationship between the ball and three single-row OWs.

### 2.2 Dynamic model

Figure 2 presents the planar model of the Ballbot. The system of the Ballbot is modeled as a rigid cuboid on top of a ball to get a simple calculation of the system parameters. The ball mass * x*- and

*-axes. The control input is the resultant moment of the three actuators, whose*y

The Ballbot system dynamics are described by obtaining the kinetic and potential of the ball, body, and OWs. For the ball,

where

The OWs are attached to the body of the Ballbot. Thus, only the rotational motion of the OWs has to be calculated, that is,

where

For the body,

where * x*-axis,

In the * y*-

*plane, the generalized coordinates of the Ballbot system are defined as*z

where * y*-

*plane, respectively.*z

The Lagrangian function * L* is expressed as

_{x}

The Euler-Lagrange equation that describes the motion of the Ballbot is

From (12), the dynamic equations on the * y*-

*plane are expressed as follows:*z

where * x*-axis,

Then, (13) and (14) can be rewritten as follows:

where

In the * x*-

*plane, the mathematical equations describe the Ballbot system dynamics as follows:*z

where * y*-axis,

In the * x*-

*plane, minimal coordinates of the Ballbot system denotes*z

where

## 3. Control system design

### 3.1 Hierarchical sliding mode control design

It can be assumed that all state variables are measurable. To design this controller in the * y*-

*plane, first we introduce a suitable pair of SMSs*z

where

where * x*-axis of the body.

When the Ballbot balances, it means that the desired tilt angle

Let

The hierarchical SMC law is deduced as follows. The first layer SMS is defined as

and

where

Let

where

The first layer SMC law can be deduced from Eqs. (26) and (27), that is,

The second layer SMS is constructed based on the first layer SMS

where

For the second layer SMS, the SMC law and the Lyapunov function are defined as

and

where

Differentiating * t* yields

Let

where

The total control law of the presented hierarchical SMC can be deduced as follows:

Similarly, the total control law of the hierarchical SMC in the * x*-

*plane also given as*z

### 3.2 Stability analysis

* Theorem 1*: If considering the total control law (36) and the SMSs (23) and (31) for the system dynamics (15) and (16), then SMSs,

* Proof*: Integrating both sides (34) with respect to time obtains

Then

It can be found that

Therefore, it can be achieved that

By using Barbalat’s lemma [23], we can obtain that if

By applying Barbalat’s lemma, we can get

Thus, both

* Theorem 2*: If considering the control law (36) and the SMSs of (23) for the system dynamics (15) and (16), then SMSs,

* Proof*: From Theorem 1, the SMS of the ball subsystem dynamics is asymptotically stable.

Now, we will prove that the SMS of the body subsystem dynamics is asymptotically stable. Limiting of both sides of (31) obtains

The result of (41) shows

* Theorem 3*: If considering total control law (36) and the SMSs (23) for the system dynamics (15) and (16), assuming that all the state variables are equivalent infinitesimal, then the parameter boundary of the SMS is

* Proof*: By solving

The eigenvalue of (42) should be negative for meeting the system stability. Thus, the lower boundary of

The upper boundary of

Therefore,

Further, it can be got

When the state of the subsystem keeps sliding on its SMS and converges to the neighborhood of the control objective, the system can be treated as an autonomous one. Thus,

The block diagram of the control system is shown in Figure 4. With the real motor torques * x*- and

*-axes,*y

The corresponding simulation and experiment results will be given in the subsequent sections.

## 4. Simulation result

A numerical simulation investigates the stabilize, robustness, and transfer of the proposed controller for the Ballbot. The decoupled dynamics (15) and (16), and (19) and (20) with the proposed control schemes (36) and (37) are modeled in Matlab/Simulink real-time environment with ODE45 and a sampling time of 0.01 seconds.

The parameters of the Ballbot for both simulation and experiment are shown in Table 1. For the numerical simulation, the control parameters are tuned by the trial-and-error method and then selected as in Table 1.

System parameters | Control gains |
---|---|

Various simulations are conducted by considering the stabilizing controls with an initial nonzero tilt angle and with external disturbances and tracking control.

### 4.1 Stabilizing control with nonzero initial tilt angles

In this simulation, the tilt angles about * x*- and

*-axes are initialized as 6.3° and −6.5°, respectively for checking the behavior. Simulation results are shown in Figure 5. The tilt angles responses and the angular velocities are depicted in Figure 5(a) and (b), respectively. The position of the ball is shown in Figure 5(c). Figure 5(d) shows the curves of the control inputs.*y

These numerical results demonstrate that the proposed robust controller enables to maintain stabilizing of the Ballbot.

### 4.2 Stabilizing control with external disturbances

In the second simulation, the stabilizing control of the Ballbot is investigated under an external disturbance. An external force of 300 N is applied to the Ballbot system at the sixth second while the Ballbot is stabilizing on the floor. As the results, the body tilt angles and angular tilt angles are depicted in Figure 6(a) and (b), respectively. Under the external disturbance, The Ballbot cannot maintain its original position of

### 4.3 Tracking control

In the third simulation, the Ballbot is commanded to track a rectangular trajectory with a dimension of 75 cm × 90 cm in 40 s. The system responses of the tilt angles of the body are shown in Figure 7(b). As indicated in Figure 7(a), the proposed control system performs well in tracking desired rectangular trajectory.

## 5. Experiment result

In this section, several experiments on the actual Ballbot platform (Figure 8) are implemented to further verify the performance of the proposed control system. Especially, experiment for the robustness of the controller is executed under external disturbances.

The robot control algorithm is programmed with multithread tasks so that the control period is set to 15 ms. The program also consists of the torque conversion and kinematic model [1] to estimate the position and velocity of the ball.

An inertial measurement unit (IMU) is utilized to measure the orientation and angular rates of the Ballbot. The IMU includes an accelerometer and a gyro sensor. Three encoders with a resolution of 4000 counts/rev are also utilized to obtain the position of the ball. Full state variables of the Ballbot system can be obtained based on the kinematics and the sensor fusion.

The drive mechanism is equipped with brushless DC actuators with a continuous torque of 0.28 Nm and gearboxes with a ratio of 1:4 for driving the ball. Two 48 V lithium battery packs supply power for the actuators and other devices with a working time of several hours.

### 5.1 Stabilizing control with an initial nonzero tilt angle

This experiment investigates the stabilizing performance of the proposed hierarchical SMC with an actual Ballbot on the flat floor.

The initial position of the Ballbot is set as the origin point and the robot is set at 6.3° in roll angle and − 6.5° in pitch angle. The stabilizing responses of the control system are shown in Figure 9. The tilt angles of the body are presented in Figure 9(a) in which the steady-state is 1.5 seconds and the steady-state errors of the roll and pitch are 0.4° and 0.5°, respectively. While the angular rates of the body are shown in Figure 9(b). The proposed control system successfully controls the movement of the ball from an origin point to the new point of (* x*,

_{k}

*) = (−14 cm, 2 cm) as shown in Figure 9(c). The control input of the proposed control scheme is shown in Figure 9(d).*y

_{k}

### 5.2 Stabilizing control under an external disturbance

The robustness performance of the proposed hierarchical SMC is evaluated by applying the external disturbances to the robot. The experimental scenario is set as: at the beginning, the robot is stabilizing at the origin position. Then the Ballbot is kicked. The amount of the kick is about 300 N.

The tilt angles and angular rate of the body are shown in Figure 10(a) and (b). Figure 10(c) shows the ball response along the * x*- and

*-axes. Under the kick, the robot moves from the origin position of (*y

*,*x

_{k}

*) = (0, 0) to the new position of (*y

_{k}

*,*x

_{k}

*) = (−0.92 cm, 1.65 cm) and then stabilizes at the new position. Torque control input responses are also shown in Figure 10(d) to keep the stabilizing of the Ballbot.*y

_{k}

### 5.3 Tracking control

In this experiment, the Ballbot is commanded to track the desired rectangular trajectory with a dimension of 75 cm × 90 cm within 40 seconds. The system response is presented in Figure 11. Figure 11(a) shows the trajectory of the ball on the floor. There is some error while the robot tries to track the rectangular desired trajectory. The position error occurs due to uncertainties, an un-modeling system.

The results demonstrate hierarchical SMC behaviors in stabilizing and transferring control of the Ballbot.

## 6. Conclusions

In this study, a 2D model of the Ballbot is obtained using the Euler-Lagrange equation and the decoupling method. A robust nonlinear controller based on the hierarchical SMC technique is designed for the Ballbot to control stabilizing and transferring. The capability of the closed-loop system with the hierarchical SMC is achieved using the Lyapunov function. The performance and robustness of the hierarchical SMC are examined under several tests in both simulation and experiment. The simulation and experimental results demonstrate the capabilities of the proposed controller for stabilizing and trajectory tracking.

## References

- 1.
Ba PD, Lee SG, Back S, Kim J, Lee MK. Balancing and translation control of a ball Segway that a human can ride. In: 2016 16th International Conference on Control, Automation and Systems (ICCAS). 2016. pp. 477-480 - 2.
Kumaga M, Ochiai T. Development of a robot balanced on a ball—Application of passive motion to transport. In: 2009 IEEE International Conference on Robotics and Automation (ICRA’09). 2009. pp. 4106-4111 - 3.
Lauwers TB, Kantor GA, Hollis RL. A dynamically stable single-wheeled mobile robot with inverse mouse-ball drive. In: Proceedings 2006 IEEE International Conference on Robotics and Automation, 2006 (ICRA 2006). 2006. pp. 2884-2889 - 4.
Ching-Chih T, Ming-Han J, Cheng-Kai C, Ching-Wen L, Siang-Jyun C. Self-balancing and position control using multi-loop approach for ball robots. In: 2010 International Conference on System Science and Engineering (ICSSE). 2010. pp. 251-256 - 5.
Kantor G, Hollis H, Nagarajan U. The Ballbot: An omnidirectional balancing mobile robot. The International Journal of Robotics Research. 2014; 33 (6):917-930 - 6.
Sukvichai K, Parnichkun M. Double-level ball-riding robot balancing: From system design, modeling, controller synthesis, to performance evaluation. Mechatronics. 2014; 24 (5):519-532 - 7.
Lotfiani A, Keshmiri M, Danesh M. Dynamic analysis and control synthesis of a spherical wheeled robot (Ballbot). In: 2013 First RSI/ISM International Conference on Robotics and Mechatronics (ICRoM). 2013. pp. 481-486 - 8.
Zabihi H, Talebi HA, Suratgar AA. Open-loop trajectory planning and nonlinear control for underactuated spherical wheel mobile robot (Ballbot). In: 2016 24th Iranian Conference on Electrical Engineering (ICEE). 2016. pp. 549-554 - 9.
Chih-Hui C, Wen-Ru T. Design and implementation of an omnidirectional spherical mobile platform. IEEE Transactions on Industrial Electronics. 2015; 62 (3):1619-1628 - 10.
Ching-Chih T, Chang Hsuan C, Feng-Chun T, Kao-Shing H. Adaptive RFWCMAC cooperative formation control for multiple Ballbots incorporated with coupling dynamics. In: 2015 International Conference on Informative and Cybernetics for Computational Social Systems (ICCSS). 2015. pp. 59-65 - 11.
Denker A, Ohnishi K. Robust tracking control of mechatronic arms. IEEE/ASME Transactions on Mechatronics. 1996; 1 (2):181-188 - 12.
Wang W, Yi J, Zhao D, Liu D. Design of a stable sliding-mode controller for a class of second-order underactuated systems. IEE Proceedings - Control Theory and Applications. 2004; 151 (6):683-690 - 13.
Yan M-X, Jing Y-W, He Y-G, Sun P. Adaptive sliding mode controller for a class of second-order underactuated systems. In: 2009 Chinese Control and Decision Conference (CCDC’09). 2009. pp. 2782-2786 - 14.
Tuan LA, Lee S-GL, Moo S-C. Partial feedback linearization and sliding mode techniques for 2D crane control. Transactions of the Institute of Measurement and Control. 2014; 36 (I):78-87 - 15.
Tuan LA, Lee S-G, Nho LC, Kim DH. Model reference adaptive sliding mode control for three dimensional overhead cranes. International Journal of Precision Engineering and Manufacturing. 2013; 14 (8):1329-1338 - 16.
Tuan LA, Kim J-J, Lee S-G, Lim T-G, Nho LC. Second-order sliding mode control of a 3D overhead crane with uncertain system parameters. International Journal of Precision Engineering and Manufacturing. 2014; 15 (5):811-819 - 17.
Tuan LA, Lee S-G. Sliding mode controls of double-pendulum crane systems. Journal of Mechanical Science and Technology. 2013; 27 (6):1863-1873 - 18.
Karkoub MA, Zribi M. Robust control schemes for an overhead crane. Journal of Vibration and Control. 2001; 7 (3):395-416 - 19.
Almutairi NB, Zribi M. Sliding mode control of a three-dimensional overhead crane. Journal of Vibration and Control. 2009; 15 (11):1679-1730 - 20.
Ching-Wen L, Ching-Chih T, Yi Yu L, Cheng-Kai C. Dynamic modeling and sliding-mode control of a Ball robot with inverse mouse-ball drive. In: SICE Annual Conference 2008. 2008. pp. 2951-2955 - 21.
Cheng-Kai C, Ching-Chih T. Intelligent backstepping sliding-mode control using recurrent interval type 2 fuzzy neural networks for a ball robot with a four-motor inverse-mouse ball drive. In: 2012 Proceedings of SICE Annual Conference (SICE). 2012. pp. 1281-1286 - 22.
Weiss A, Langlois RG, Hayes MJD. The effects of dual row omnidirectional wheels on the kinematics of the Atlas spherical motion platform. Mechanism and Machine Theory. 2009; 44 (2):349-358 - 23.
Slotine JJE, Li W. Applied Nonlinear Control. The United States of America: Prentice-Hall, Inc.; 1991. p. 461 - 24.
van der Blonk K. Modeling and control of a ball-balancing robot [internship & master thesis]. Electrical Engineering, Mathematics and Computer Science, University of Twente, Alten; 2014