CONTROLLER DESIGN OF UNICYCLE MOBILE ROBOT

The ability of unicycle mobile robot to stand and move around using one wheel has attracted a lot of researchers to conduct studies about the system, particularly in the design of the system mechanisms and the control strategies. This paper reports the investigation done on the design of the controller of the unicycle mobile robot system to maintain its stability in both longitudinal and lateral directions. The controller proposed is a Linear Quadratic Controller (LQR) type which is based on the linearized model of the system. Thorough simulation studies have been carried out to find out the performance of the LQR controller. The best controller gain, K acquired through the simulation is selected to be implemented and tested in the experimental hardware. Finally, the results obtained from the experimental study are compared to the simulation results to study the controller efficacy. The analysis reveals that the proposed controller design is able to stabilize the unicycle mobile robot. ABSTRAK: Kemampuan robot satu roda untuk berdiri dan bergerak di sekitar telah menarik minat ramai penyelidik untuk mengkaji sistem robot terutamanya didalam bidang rangka mekanikal dan strategi kawalan robot. Kertas kajian ini melaporkan hasil penyelidikan ke atas strategi kawalan robot bagi memastikan sistem robot satu roda dapat distabilkan dari arah sisi dan hadapan. Strategi kawalan yang dicadang, menggunakan teknik kawalan kuadratik sejajar (Linear Quadratic Control) yang berdasarkan model robot yang telah dipermudahkan. Kajian simulasi secara terperinci telah dijalankan bagi mengkaji prestasi strategi kawalan yang dicadangkan. Dari kajian simulasi sistem robot, pemilihan faktor konstan, K yang sesuai di dalam strategi kawalan telah dibuat, agar dapat dilaksanakan ke atas sistem robot yang dibangunkan. Keputusan dari kajian simulasi dan tindak balas oleh sistem robot yang dibangunkan akhirnya dibandingkan bagi melihat kesesuaian faktor kostan, K yang dipilih. Analisa menunjukkan dengan menggunakan strategi kawalan yang dicadangkan dapat menstabilkan robot satu roda.


INTRODUCTION
Unicycle mobile robot is a robot that can move and maneuver around using a single wheel.The advantage of the robot is its mechanism to stand upright without falling down either in the longitudinal or lateral directions within a small space has attracted many researchers to conduct studies on the system.The studies cover from the modeling of the system, designing and prototyping the mechanism, and the controller design.
The way a human rides a unicycle has inspired many researchers.The rider of unicycle could stabilize his position by moving his two arms, wrist and body in unison.Meanwhile, the pitch angle is stabilized by pedalling the unicycle by using the two legs back and forth, in order to control the speed and the position of the wheel.Besides that, the yawing angle of the unicycle is stabilized by rotating the left and the right hands synchronously.As a result from this, the researchers have proposed different models of unicycle mobile robot based on their assumptions on the way human rides a unicycle.Along with that, they have also proposed a few types of mechanisms and controllers to stabilize unicycle mobile robot.
From the exploratory and intensive research conducted by other researchers earlier, different mechanisms of unicycle mobile robot have been proposed.Basically, in this paper, the proposed unicycle mobile robot system consists of a wheel, a frame and a rotating disc as mentioned in [1].The three-dimensional (3D) unicycle robot system can be characterized by the three tilt angles namely the roll, the pitch and the yaw angles.This robot can reach longitudinal stability through appropriate control of the wheel (i.e. the control of pitch angle).It also can reach the lateral stability via applying appropriate torque generated by the rotating disc (i.e. the control of roll angle).
The main problem of the research is to control the unicycle mobile robot especially when the posture of the robot needs to be stabilized upright, both whenever the robot is moving or when it is in the still mode.The posture of the robot can be characterized by three tilt angles namely the roll angle that is the lateral tilt angle which is perpendicular to direction of motion, the pitch angle or known as longitudinal tilt angle which is parallel to the direction of motion and lastly the yaw angle.
Thus, the problem in the research work can be stated as to develop a unicycle mobile robot that can be stabilized by using proper controller based on the operation of the inverted pendulum system autonomously.This is to ensure the unicycle system can stay uprights without falling down longitudinally or laterally.A specific mathematical model of the system developed could lead to multiple ways to construct the robotic platform.On top of that, the system controller is designed and simulated as well as implemented in the real system hardware.
In the following, an overview of works done in this field is mentioned in section-2.The dynamic modeling of the unicycle mobile robot is addressed in section-3.Section-4 elaborates the controller design.The simulations and the experimental results are reported in section-5.Finally a conclusion is drawn in section-6.

System Classification
Over the last few decades, many researches and studies have been conducted on inverted pendulum system.Inverted pendulum can be defined as a system with a mass attached to a rod which can rotate about a pivot point [2].
According to [3], an inverted pendulum attached to a cart is called a cart-pole system.The pole with mass is pointing upward, while the cart can move back and forth in horizontal plane to make the pole stays upright.Another type of system related to inverted pendulum is called inertia wheel pendulum or better known as reaction wheel pendulum mentioned by [4] in their research.Reaction wheel pendulum consists of a symmetric disc attached to the end of rod which is freely rotated about an axis, parallel to the axis of rotation of the pendulum.The reaction disc can be actively controlled by coupling torque generated by angular acceleration actuated through a DC motor.In the research done by [5], the author classified the system into two classes; class 1 and class 2. Reaction wheel pendulum is considered as class 1 system while cart pole system is a class 2 system.
From the above mentioned definition, unicycle mobile robot can be composed of class 1 and class 2 systems.The rotating disc and frame (i.e. with fixed wheel) of the robot can be considered as class 1 while combination of robot's wheel and frame (i.e.fixed rotating disc) can be classified as class 2 system.Furthermore, unicycle mobile robot is an under-actuated system because it possesses fewer control inputs compared to degree of freedoms [5].Unicycle mobile robot has two motors to control its position and orientation.Besides, unicycle mobile robot is a nonholonomic system because it has dynamic non-holonomic constraint mentioned by [6].It is considered as non-holonomic since the wheel of unicycle is maintained at a contact point on a planar plane, the wheel is impossible to move transversally and wheel displacement along the plane is equal to the wheel arc [7].In the next section, the studies done by previous researchers related to the controller to control various unicycle's mechanism are explored.

Controller Design
In the research by [8], the author used Linear Quadratic Gaussian (LQG) controller to control the lateral and longitudinal stability of the unicycle mobile robot.The robot developed by this author is in the form of system that mimicked a human riding a unicycle which consists of a wheel, a frame which acted as the rider's body and rotary turntable as the human arms.During simulation study, the lateral stability could be achieved at nonzero wheel speed by twisting the turntable and the wheel moved forward and backward.
The author in [9] had proposed a new modified LQG method to control longitudinal stability of the unicycle robot which previously developed by [8].However, the control strategy using the same method applied for lateral stability was not mentioned in the paper.The author then used gain scheduled lateral controller to control the lateral stability of the system.The author mentioned that friction effects in forward and yawing direction was contributed by wheel surface friction while drive train friction was considered as pitch and yawing friction.The author had used bang-bang controller to deal with the friction effects on the system.The author in [10] had proposed the unicycle movement based on the design by [8] and assumed that, when the robot moved in longitudinal plane, there is no lateral and yawing effect occurs on it.It was assumed that the linearized model behaved like an inverted spherical pendulum with a base that is free to move in the surface plane.The author proposed Linear Quadratic Regulator (LQR) controller to stabilize the system.The controller however was implemented in the simulation stage only.
The author in [11] had proposed to use PD controller to control the lateral stability the unicycle mobile robot which had asymmetric turntable rotor rotated by a geared motor on the top of the system to control the roll angle while the wheel was driven by linkages that were connected to two motors.The linkages were assumed to replace human's thigh and foot when they were riding the unicycle.From the author point of view, the experimental results conducted depend on initial posture of robot and ground unevenness.In another paper [11], the same author had proposed a new controller by using fuzzy gain schedule PD control technique.Experimental results shown that both of the robot's longitudinal and lateral postures could be successfully stabilized.By comparing the experimental results with PD and D controllers, it was found that the lateral and the pitch controls with two fuzzy gain schedule PD controllers produced better results.
Another controller proposed by [12] and [13] developed a system namely as Gyrover which was a single wheel vehicle equipped with an internal gyroscope.This internal gyroscope was aligned with the wheel and spinning in the direction of forward motion.Angular momentum from the gyro contributed to the lateral stability when the wheel stopped or moved slowly.A tilt device tilted the gyro's axis about roll axis with respect to the wheel.Because the gyro acts as inertial reference, the effect of tilt action caused the wheel to lean left and right and then caused the wheel to steer.
The author in [14] had used LQR optimal control to control the robot whose design is slightly similar as the one in [12] and [13].The author [14] had considered the motion about roll axis only and neglected the pitch and yaw controls.
In the study done by [15], the researchers had used feedback control technique to stabilize the roll and pitch angles of the unicycle system.The system was equipped with two gyros which were used to detect angular velocities around the rolling and the pitching axes.Another gyro was applied to detect an angular velocity around yawing axis which was used to find the heading direction.The same control strategy was also applied to control the mechanism discussed in the research done by [12] and [13].In the paper produced by, [16], a controller had been designed to control the yaw angle of unicycle by applying time phase difference on the roll and pitch angles.However, the study had been conducted only at simulation level.
Further studied carried out by [17] had proposed a new fuzzy logic controller (FLC) to control the unicycle robot in two dimensional system.In the FLC design, the author had leveraged the linear quadratic regulator (LQR) and the gain-scheduling technique to obtain the FLC parameters.In addition by further comparing the FLC with the LQR which was designed around an operating point, the FLC coefficients could be easily tuned.However, the controller could only be applied to control the pitch angle of the system dynamics.
Moreover, in another paper done by [18], the author had used linear controller to stabilize their design.The design done by [18] was based on inverse mouse roller ball.The controller had two loops; the proportional-integration (PI) controller as the inner loop and LQR as the outer loop.The study carried out by [19] had used an adaptive nonlinear control together with Radial Basis Function Neural Networks (RBFNN) which was based on adaptive back-stepping control technique to stabilize the system design.However, the author only provided the simulated results and no comparison was done between simulated results and experimental results.
Another method proposed by [20] had used gain scheduling with linear parameter varying technique to control the unicycle robot.The system developed was composed of two gyroscopes acting as actuator for lateral stabilization and a wheel as actuator for longitudinal stabilization.The experimental results for lateral and longitudinal control were very good even though small oscillations still could be observed.
Research by [21] had used the pole-placement and LQR to control the unicycle robot in longitudinal direction only.The system analysis and estimation of system-coefficients were completed on the simulated stage.

DYNAMIC MODELING OF THE UNICYCLE MOBILE ROBOT
Based on [1] and [22], the model of the unicycle mobile robot for this research can be described in the form of non-linear model: where: ܺ1 ൌ ‫݄݈ܽܽ‬ ݈ܽ݊݃݁ ሺߙሻ where α is the roll angle.
τ2= the torque applied to the wheel to control the pitch angle. and ) (2) as mentioned by [1] and [22] can be linearized so that the linear controller can be used.This equation is linearized with respect to the desired operating point and it can be described as: and the operating point for the system is

B
The input to the system, ‫ݑ‬ is given as:

CONTROLLER DESIGN
In order to control the unicycle mobile robot, a linear controller has been designed.The controller is known as Linear Quadratic Controller (LQR) and designed to control the roll (α) and pitch angles (β) of the unicycle robot system shown in Figure 1 for both the simulation and the experimental study at the operating point.The performance of controller is then compared.The advantage of using the LQR controller in this system is, it can regulate the system output, x to zero while stabilizing the closed loop.In other words, it is strictly intended to stabilize the system and to make the time response faster as mentioned in [23].
By considering the unicycle mobile robot model in the Eqn.(2), a full state feedback regulator for the system is designed based on [24] by using control input vector as in the Eqn.(5).
‫ݑ‬ ൌ െ‫ݔܭ‬ሺ‫ݐ‬ሻ The target of the designed controller is to obtain the gain K so that u in Eqn.( 5) can be included into quadratic objective function expressed in Eqn.(6).
Where, ‫݂ݐ‬ is the final time, and ‫ݐ‬ is the initial time.
In this system, we are interested in the steady state behaviour of the unicycle mobile robot system.As such the control period for the system will be infinite.Thus, t f in Eqn. ( 6) will be approaching infinity, ∞ and the quadratic objective function then become J ∞ .J ∞ can be considered as the energy function.When J ∞ is small, the energy of the closed loop system is also small.Since x and u in Eqn. ( 6) governed by J ∞ , neither x nor u is large.When J ∞ is minimized, x becomes zero as t f goes to ∞ and it guarantees that the system is stable.
In order to minimize J ∞ , the matrix Q and matrix R need to be selected.Matrix Q is defined as in Eqn. ( 7) while matrix R can be defined in Eqn.(8).
Where, matrix Q must be n x n symmetric positive definite matrix, and matrix R should be m x m symmetric positive definite as well.
The criteria for selecting matrix Q and R is by following the Bryson's rule as the guidelines as mentioned in [25] and these criteria are elucidated in Eqn.(9) and Eqn.(10) where the diagonal Q and R can be: where i=1,2,3,4…n where j=1,2,3,4…n Even though the matrix Q and R are bounded by Eqn.(9) and Eqn.(10), the matrix Q and matrix R still need to be found and tested through trial and error to find the optimized performance and the fast response can be obtained if the q 11 is quite large compared to q 22 ,q 33 .After selecting matrix Q and matrix R, the control input u can be defined as: From Eqn. (11), it is observed that, matrix P is required to solve for the control input u.Matrix P is a symmetric and positive semi-definite which can be found by solving an algebraic Ricatti equation which is shown in the Eqn.(12).
After obtaining gain value for K, then, the stability of matrix A-BK is tested by finding eigen-values of A-BK.As mentioned previously, if the eigen-values of A-BK are all negatives, then the system is considered as stable system.

RESULT AND DISCUSSION
By employing Eqn.( 5)-Eqn (11), the values of Q and R are shown in the Table 1.Based on Table 1 and Eqn.(11), the gain K can be acquired.The gain, K obtained can be divided into two segments where K1 is used to control roll angle and K2 is used to control pitch angle.The simulation and the experimental performance of the controller are done on different set of gains.The different sets of gains are listed in the Table 2.

Simulation Results
The gain K obtained from all the cases are applied into the simulation block diagram in the SIMULINK/MATLAB environment as shown in Fig. 2. Figure 2 shows that the model of the plant is set as state space and the errors of the system are regulated by gain K founded in the previous.The input of the system is set to be zero so that the system can be stabilized at zero position which is the upright position of the system.By using gain K obtained, behavior of the unicycle mobile robot is analyzed.The performance of the controller based on gain K for every case, Case A, Case B, Case C and Case D are elucidated in Fig. 3 -Fig.12.The data of interest for roll and pitch angles versus time are captured.The simulation result for roll angle and disc rotation by using gain K derived from case A is shown in Fig. 3 while the simulation result for pitch angle and wheel rotation is depicted in Fig. 4. The initial condition set for the unicycle system in roll direction is at where roll angle, α= 0.1rad or 6 deg and disc angle, η =0.1rad=0.016rev.For the initial condition in pitch direction, the posture of the robot is set as where pitch angle, β= 0.1rad or 6 deg and wheel angle, ω =0.1rad=0.016rev.
From Fig. 3 and Fig. 4, it is observed that when the robot is released at positive direction, the reaction disc will rotate in the opposite direction to bring the robot to stabilization point.However, when the robot moves to negative direction, the reaction disc will rotate in the positive direction.From the behavior of the system, it is shown that the force from the reaction disc is imposed in the negative and positive direction in order to compensate the roll angle's error of unicycle robot.The same behavior also applied to the pitch angle of the robot.When the pitch angle is little bit deviates from the stabilization point, the robot's wheel will move forward to catch the unicycle robot.The simulation in Fig. 3 and Fig. 4 shows that the unicycle system reaches the settling time at t = 2s in the roll direction while it's settling time in pitch direction is in t = 1.5s.In another case, the roll angle and disc rotation which uses gain value K derived from case B is plotted in Fig. 5 while the pitch and wheel rotation from the same case is plotted in the simulated Fig. 6.When the robot is released at α = +6 deg, the reaction disc will rotate opposite to the movement of the robot in order to bring the robot to its stabilization point.Figure 5 shows that unicycle robot has responded and stabilized faster compared to previous figure (Fig. 3).The unicycle robot has swung more and reaches settling time at t = 1.5s in the roll direction.The simulated Case 3(a) and simulated Case 3(b) as shown in Fig. 7 and Fig. 8 are used to simulate the performance of LQR controller on the unicycle robot which uses the gain K value derived from Case C previously. Figure 7 shows the behavior of the robot when it is released from positive roll direction and the response of the controller can be seen through the response of the reaction disc.The robot has swung more and took longer time to stabilize compared to the previous Fig. 3 and Fig. 5.The settling time for the robot under this case is at t = 3s.The performance of the controller for the Case D can be observed in Fig. 9 and Fig. 10.By using the same initial condition as the previous cases, the robot requires more time and it swings left and right while the reaction disc rotates in the direction vice versa.The robot achieves the stabilization in roll direction in t = 4 s.The robot's movement in the pitch direction as shown in Figure 10 shows that the robot also requires more time to stabilize.The robot's wheel rotates clockwise and counters clockwise to ensure the robot stabilizes.The robot achieved postural stabilization in pitch direction more than 1.5 s.
In order to test the behavior of the robot when it is subjected to the disturbance, two cases have been plotted as shown in Fig. 11 and Fig. 12.The gain value K from case D is selected as the case study.The purpose of selecting Case D as a case study is to see the behavior of the robot (response and settling time) when it is subjected to disturbance when it is already stabilized.Figure 11 illustrates the action of the robot in the roll direction when it deals with the pulse disturbance at time, t = 8s.The robot slants back to the stabilization position after the pulse signal applied to it since it is pushed back by reaction disc.The robot going back to the stabilization position either it is subjected to disturbance in roll or pitch direction as shown in Fig. 11 and Fig. 12.
In Fig. 12, wheel response increasing because it is quite not so stable.As a result, Fig. 12 (the gain K from case D) is not selected to be implemented in the real hardware system.

Experimental Results
In order to validate the simulation results, a few numbers of postures of unicycle mobile robot system were inspected experimentally and compared with the results acquired previously.In order to accomplish the experimental study, the posture of the robot in the roll and pitch angle were studied independently.Based on the previous simulation results, gain value K obtained through case B was selected to be implemented in the controller to control the system hardware.Even though the gain K from case B was used, the value was tuned within the range ±2 in the controller program to improve the performance of the system.The experimental results showed the estimated measurement between gyroscopes and accelerometers from Inertial Measurement Unit (IMU) attached to the robot.
Figure 13 shows the study of the robot's posture under influence of controller in the roll direction.The robot was released at initial condition, roll angle, α=+6° or 0.1 radian.From the figure, it is observed that when the robot is released, the reaction disc responded in the opposite direction to bring back the unicycle to nearly its stabilization point.This behaviour can be seen clearly from t = 0 s to t = 1 s.The stabilization range for the unicycle mobile robot is between α = -20 ο and +20 ο .The robot swung back and forth between this range and the reaction disc swung in the opposite direction.It was hard to make the unicycle robot to move to α = 0 ο due to the dynamic behaviour of the robot.However, the result is acceptable and matches with the result shown in Fig. 5.In another experiment conducted, the unicycle robot was released in the pitch direction at β = +6deg.When the robot was released at this position, the robot's wheel tried to catch up the position and made the robot stable.From Fig. 14, the stabilization range for the unicycle robot in the pitch direction is between -15 ο to +15 ο .The result from Fig. 14 can be said comparable to Fig. 6.In Fig. 15 the unicycle robot is released at roll position, α = -6 ο .In the result shown in the figure, when the range of unicycle robot in roll direction is between -10 ο to +10 ο , the reaction disc movement is between -2 rev to +2rev only.
In Fig. 16, the unicycle robot is released at position β=-6deg.The pitch angle of the robot is still between range -20 ο to +20 ο .The wheel angle rotates from the initial position

CONCLUSION
This paper discusses the controller design which is based on the system linearized model.The simulation results, the experimental results and the comparison between both are presented and discussed thoroughly.The LQR control scheme is used as the system controller to stabilize the unicycle mobile robot in roll and pitch directions.The simulation studies are carried out to investigate the performance of the controller.The best controller parameters are then selected and implemented on the real system controller where the performance is analyzed based on the response recorded.Overall, the experimental results show acceptable match with the simulation results.

Fig. 3 :
Fig. 3: Simulated Case 1(a): Result for roll angle and disc rotation by using gain K derived from case A.

Fig. 4 :
Fig. 4: Simulated Case 1(b): Result for pitch angle and wheel rotation by using gain K derived from case A.

Fig. 5 :
Fig. 5: Simulated Case 2(a): Result for roll angle and disc rotation by using gain K derived from case B.

Figure 6 :
Figure 6: Simulated Case 2(b): Result for pitch angle and wheel rotation by using gain K derived from case B.

Fig. 7 :Fig. 8 :
Fig. 7: Simulated Case 3(a): Result for roll angle and disc rotation by using gain K derived from case C.

Fig. 9 :
Fig. 9: Simulated Case 4(a): Result for roll angle and disc rotation by using gain K derived from case D.

Fig. 10 :
Fig. 10: Simulated Case 4(b): Result for pitch angle and wheel rotation by using gain K derived from case D.

Fig. 12 :
Fig. 12: Simulated Case 5(b): Result for pitch angle and wheel rotation subjected to disturbance (i.e K derived from case D).

Table 1 :
List of Diagonal Q and R.

Table 2 :
List of Controller Gain.