AU DIY-Unicycle Balancing and Riding System ( AU DIY-UBRS )

This paper presents and discusses the Assumption University unicycle (hereafter referred to as AU unicycle). The AU unicycle was built on campus, and it can work in two modes: balancing control and riding control. A gyroscope and an accelerometer sensor are used as sensors to sense the balancing position of the unicycle. A DC motor equipped with a gear set, sprockets, and a chain acts as an actuator to operate the wheel of the unicycle system. The main contribution and the objective of this paper are to demonstrate the implementation methodology and the balancing and riding control methods of the AU unicycle. The experiments on the AU unicycle show good results for both the balancing control method and the riding control method.


Introduction
The AU DIY-Unicycle Balancing and Riding System (AU DIY-UBRS) was designed and made based on a one-wheeled motorcycle, which must be able to balance itself for safe riding.It is important that a unicycle provides a rider with a safe ride.It was reported by Wang [1] that in the United States, an estimate of 3360 people were injured from unicycle riding from 1991 to 2010.
The RYNO (Ride Your New Opportunity) was invented by Tony Ozrelic in 2008, and it was equipped with a 6 axis gyroscope and an accelerometer working as sensors to balance the system.The RYNO has a leaning angle of approximately 15 degrees forward and backward, and it can travel with a speed of about 10 mph.
In September 2010, Solowheel, invented by Shane Chen, was presented in Las Vegas Bike Expo.Solowheel employed a gyroscope and an accelerometer as sensors to balance itself.Solowheel can move with a speed of around 12 mph.
Using a unicycle would be a good choice where parking space is limited [2].
Several research works on balancing systems have been done in the Vincent Mary School of Engineering at Assumption University, such as the Autonomous AU Bicycle: Self-Balancing and Tracking Control (AUSB2), [3].The AUSB2 has used a gyroscope and an encoder as sensors for the system.Another work done by Aphiratsakun et al., [4] is on the implementation of the AU Balancing BallBot (AuB3).A gyroscope has been used as a sensor for the AuB3.This paper presents the implementation methodology and the balancing and riding control methods of the AU DIY-UBRS made by engineers of the Vincent Mary School of Engineering at Assumption University.The system is in the form of a single-wheeled motorcycle.The AU DIY-UBRS has two modes: balancing mode and riding mode.The balancing mode is without a rider on the system while the riding mode is with a human as a rider.
The paper is structured as follows.Section 2 discusses the AU DIY-UBRS design including the design of mechanical parts and electronic components.The details of the control methods are explained in Section 3. The experiments are carried out in Section 4. Section 5 provides the results and discussions.The conclusions are discussed in Section 6..

AU DIY-UNICYCLE balancing and riding system
This section presents the AU-DIY-UBRS design for both mechanical parts and electronics components.

Mechanical design
The AU DIY-UBRS was designed by using SolidWorks.The design was based on a one wheel motorcycle.A 24V DC gear motor is used as a main actuator.The CAD design is shown in Fig. 1.
The original prototype AU DIY-UBRS is shown in Fig. 2. All of the equipment items can be obtained from the local market.

Electronics design
In this section, the controller, the sensor, and the actuator used in the AU unicycle are discussed.

Controller
An Arduino UNO R3 was chosen to be used as a controller for the AU DIY-UBRS.The Arduino UNO R3 is based on the ATmega328P 16 MHz quartz crystal, with 14 digital input/output pins, 6 analog inputs.The Arduino UNO R3 is shown in Fig. 3.

Sensor
Fig. 4 shows an MPU6050 gyroscope and an accelerometer sensor, which are used to sense the position of the system.The MPU6050 is composed of a 3-axis gyroscope and a 3-axis accelerometer on a digital motion processor that is capable of processing complex 6-axis motion fusion algorithms and is known as an inertial measurement unit.The Arduino UNO R3 controller communicates with the MPU6050 through I2C function.Table 1 shows the specifications of the MPU6050.

Actuator
A 24V 350W DC Motor (MY1016YZ3) is used as an actuator for the AU DIY-UBRS.This motor has a speed and a rated torque of approximately 330 RPM and 9.47 Nm respectively.The motor is attached to a transmission gear of 9.8:1 ratio.The motor and the transmission gear are shown in Fig. 5.The motor-gear set is furnished with a motor driver (SE-HB-100).This motor driver works on the PWM concept.Table 2 shows the specifications, and Fig. 6 shows the motor driver (SE-HB-100).

Control methods
Different control approaches have been taken to improve the performance, stability, and safety of unicycles.Many works on control developments of unicycles have been done.For example, Zenkov et al., [5] presented an approach to stabilizing the unicycle with a rider by imposing a feedback control force on the rider's limb.Buccieri et al., [6] proposed and implemented a control technique that uses a higher-dimensional state extension that can reject a disturbance on the unicycle.Franke et al., [7] used the motion planning and feedback control of a unicycle model.Jin et al., [8] proposed and verified a dynamics-based posture-balancing controller for a onewheel pendulum robot.A fuzzy logic controller for a unicycle was designed by Xu et al., [9].Do et al., [10] designed path tracking controllers for controlling unicycle-type mobile robots.Han et al., [11] employed a dynamic-model-based control method for the balancing and velocity control of a unicycle robot.An integral linear quadratic regulator and sliding mode controller on a unicycle robot was implemented by Moham et al., [12].In this work, PID controllers are used to balance and stabilize the AU DIY-UBRS for both the balancing mode and the riding mode.

Balancing mode
A classical PID controller is implemented as a control method to balance the AU DIY-UBRS.In this mode, no rider is on the unicycle.The block diagram for the balancing control is illustrated in Fig. 7.The PID controller equations, as in Nise (2015), are shown in Equations ( 1), ( 2), (3), and (4) where Kp, Ki and Kd are a proportional gain, an integral gain and a derivative gain respectively.ERR is an error between a desired set point which is the balancing position and an actual tilt angle from the system.

Riding mode
For the riding mode, a classical PID controller is also used as a controller for a person to ride on the AU DIY-UBRS.In this mode, a rider is on the system.The block diagram for the riding control is presented in Fig. 8.The human load acts as another input to the plant.This input is considered as a disturbance to the system.Equations ( 1), ( 2), (3), and ( 4) are still applied to the system.There is a reverse riding direction for this mode.Equation (5) shows that the AU DIY-UBRS will either go forward or stop for this mode.If a rider leans forward, the AU DIY-UBRS will go forward with a speed applied to the PWM function.If a rider leans backward, the AU DIY-UBRS will stop.This is also applied to the PWM function.The total PWM applied to the system is given in equation ( 6). (5)

Experiments
This section presents the experiments of the AU unicycle for both the balancing mode and the riding mode.

Balancing mode
In the experiment of the balancing mode, the experiment is carried out with PID gains tuned to Kp =10.5, Ki =0.8, Kd =8.55.There is no rider for the experiment.The setpoint is set to a horizontal balancing position.

Riding mode
In the experiment of the riding mode, the experiment is carried out with PID gains tuned to Kp =18.0, Ki =0.5, Kd =0.01.There is a rider for the experiment.The setpoint is set to a horizontal balancing position.

Results and discussions
This section reports the experiment results and provides the discussions on the experiment results.

Balancing mode
From the experiments, the plots of the angle (degree), error (degree), PWM (%), and direction versus time (second) are shown in Fig. 9 for the balancing mode.
It is shown in Fig. 9 that the response is very good, and the AU DIY-UBRS can balance itself for a very long period of time without falling.

Riding mode
From the experiments, the plots of the angle (degree), error (degree), PWM (%), and direction versus time (second) are shown in Fig. 10 for the riding mode.
In the riding mode, a rider acts as a disturbance to the system.It is shown in Fig. 10 that the response is very good and the AU DIY-UBRS can be ridden and moved forward if a rider leans forward, and it stops if a rider leans backward.

Conclusions
The AU DIY-Unicycle Balancing and Riding System (AU DIY-UBRS) was built, implemented, and tested successfully.
In the experiments, the balancing mode and the riding mode were carried out.In the balancing mode, PID gains were tuned to Kp =10.5, Ki =0.8, Kd =8.55.The response was very good, and the AU DIY-UBRS can balance itself for a very long period of time without falling.In the riding mode, a rider acts as a disturbance to the system.In the riding mode, PID gains were tuned to Kp =18.0, Ki =0.5, Kd =0.01.The AU DIY-UBRS can go forward if a rider leans forward, and it stops if a rider leans backward.
The AU DIY-UBRS was tested several times, and it could perform well for both modes.For the future work, an incremental encoder should be added to the system in order to sense the direction and the velocity of the system.