Professional Documents
Culture Documents
ISBN: 978-1-60595-561-2
Abstract. In this paper, a cubic self-balancing robot is designed. Taking a prototype of a cubic robot
that has been designed as a specific research object. For the attitude control of this institution. Using
Lagrangian Method to establish a mathematical model of cubic robot. For its attitude control method.
Fuzzy PID control method was proposed. Establishing simulation models in Matlab/Simulink
environment. The simulation experiments using conventional PID control and fuzzy PID control were
performed for comparison. The results show that the adoption of fuzzy PID control has faster
response speed and smaller overshoot than traditional PID control and has better control effect.
Introduction
The cubic self-balancing robot is shown in Figure 1. Its mechanical structure is: The shape is a cube
shape, and three reaction wheels are mounted on three surfaces that are orthogonal to each other. Each
reaction wheel is controlled by a brushless DC motor to control the rotation speed. The attitude angle
of the cube is sent to the STM32 master chip through the sensor. The STM32 controls the rotation
speed of the motor according to the attitude angle of the cube and acts on the rotation of the reaction
wheels. The forward or reverse driving torque of the entire mechanism, thus realizing the balance of
the mechanism with the edge as the fulcrum or the angle as the fulcrum[6,7], is a typical non-linear,
unstable multi-freedom spatial inverted pendulum system.
The fuzzy PID control method occupies a very important position in the modern control theory .Its
biggest advantage is that it does not need to know the exact mathematical model of the controlled
object, but also can adopt fuzzy control technology, and can make the control system have very good
robustness. Therefore, based on the different characteristics of PID control and fuzzy control, the
design of fuzzy PID controller will help to further improve the performance of the synchronous
control system[2].
Aiming at the self-balanced control problem of cubic robot with its corner point as the fulcrum, this
paper takes the designed cubic robot prototype as the specific research object. Firstly, the dynamic
model of the cubic robot is established by the Lagrangian method and gives a specific kinetic
equation. The inertial wheel reaction torque characteristics based on cubic robot. The fuzzy PID
controller and the conventional PID controller were designed based on the inertia torque wheel's
reaction torque characteristics of the cubic robot. The simulation experiment was performed and the
relevant conclusions of the research were given.
Mechanical Design
The cubic robot designed in this paper is shown in Figure 1. Specifically, it consists of a cuboidal box
and reaction wheels arranged on three sides of the box orthogonally[1]. The reaction wheel rotates to
produce positive or negative action on the box. The drive torque to control the attitude of the cubic
robot. So that the cubic robot balances at the corners.
180
Figure 1. Cubic robot prototype. Figure 2. Coordinates system definition of cubic robot.
Dynamics Modeling
The cubic robot consists of four rigid bodies. The cube and reaction wheel are mounted on three sides
of the cube that are orthogonal to each other. The definition of the coordinate system of a
three-dimensional robot is shown in Figure 2.
Where o-xyz denotes the inertial reference frame fixed in space, o-x b yb zb the body frame whose
origin is located at corner of the cube, c-x f y f z f the reaction wheels coordinate frame that attaches at
the center of the cube, and whose axes coincide with the rotation axis of reaction wheels[1].
Defining by α , β and γ the deflection angle from body coordinate frame to space coordinate frame
in axes respectively; by θA , θB and θC the angle velocities of reaction wheels respectively[3]. The
main model parameters of the cubic robot prototype are listed in table 1.
Table 1. Main model parameters of the cubic robot.
Iz 0.0116 [kg·m2 ] - -
m: Total mass of the cubic robot. l: The distance from the centroid point c of the cubic robot to the
corner point o. Ix, Iy, Iz: The total moment of inertia of the system near the corner point in the body's
fixed coordinate system. Iw: Inertia moment of the reaction wheel around the rotation axis in reaction
wheels coordinate frame. Kt: Moment constant of motor. Kb: Back electromotive force constant of
motor. Rm: Armature resistance of motor. g: Gravitational acceleration
Deducing the dynamic model of a cubic robot using the Lagrangian modeling method requires that
the kinetic energy and potential energy of the rigid body be expressed as a function of the generalized
coordinates[3]. The Lagrangian is defined by
L = T −V (1)
181
where T, V denote the kinetic and potential energies. The kinetic energy of the system is composed
of translational kinetic energy of the cube and rotational kinetic energy of wheels. The kinetic energy
can be written as
τ α θA
τ β = − I w ⋅ Tbf ⋅ θB
τ γ θC
, (5)
The rotation torques impacted on the reaction wheels are denoted by τθ , τ θ and τθ , that is
A B C
τ θ τ A α
A
T
τ θ B
= τ B − I w ⋅ Tbf ⋅ β
τ τ γ
θ C C
, (6)
Due to control of reaction wheel motors by voltage control method base on pulse-width
modulation[4], the differential equation of the armature electric circuit is
di
v j = Rm i + Lm + K bθ j
, dt (7)
As the armature inductance is neglected ( Lm ≈ 0 ), the input torques are derived as
Kt Kt2
τj = vj − θj
Rm Rm
. (8)
Denote six generalized coordinates of the system as
q1 =α q2 =β q3 =γ q4 =θ A q5 =θ B q6 =θC
, , , , , , (9)
The above Lagrangian becomes a function of the generalized coordinates. The Lagrangian equation
of motion is given by
d ∂L ∂L
( )− = τi , (i = 1 ~ 6)
dt ∂qi ∂qi , (10)
182
Now, the dynamic model of system can be derived by substituting formula (1)-(9) into (10) and
solving qi 13. That is
+
3 I w ( I w − I y )( I w − I z ) Rm
θ = K [ K + K (v − K θ ) + K (v − K θ )]
B 1 2 4 b t B 5 c t C
183
NS, Z, PS, PM, PB} and they are mapped to the domain [-6, 6]. The membership functions of e and ec
are shown in Figure 4. The output of the fuzzy controller ∆kp, ∆ki, ∆kd are the input values of the
correction values of the proportional, integral, and derivative parameters of the conventional PID
controller, respectively, and the fuzzy subsets are defined as {NB, NM, NS, Z, PS, PM, PB}. The
domain of their mapping is [-3, 3], [-0.08, 0.08] and [-1, 1]. In the fuzzy PID controller, the specific
setting of the proportional ∆kp controller is shown in Figure 5. The specific settings of the integral ∆ki
controller and differential ∆kd controller are similar to the proportional ∆kp controller.
184
Table 3. Fuzzy control rules of ∆ki.
EC
∆Ki
NB NM NS Z PS PM PB
NB NB NB NM NM NS Z Z
NM NB NB NM NS NS Z Z
NS NB NM NS NS Z PS PS
E Z NM NM NS Z PS PM PM
PS NM NS Z PS PS PM PB
PM Z Z PS PS PM PB PB
PB Z Z PS PM PM PB PB
Table 4. Fuzzy control rules of ∆kd.
EC
∆Kd
NB NM NS Z PS PM PB
NB PS NS NB NB NB NM PS
NM PS NS NB NM NM NS Z
NS Z NS NM NM NS NS Z
E Z Z NS NS NS NS NS Z
PS Z Z Z Z Z Z Z
PM PB NS PS PS PS PS PB
PB PB PM PM PM PS PS PB
Defuzzification
Through fuzzy inference, a fuzzy set can be output. In actual control use, a certain value must be used
to control the actuator. This requires de-fuzzification. This article uses the "center of gravity method"
and the mathematical expression is[3]:
7
∑µ
1
i ⋅µ( µi )
µ = 7
∑ µ( µ ) i
1 (12)
) α
(/
°
β
, γ
α β γ
,
θ θ θ (r/min)
θA
θB
C
θC
,B
,A
Time(s)
185
) α
(
°
/ β
, γ
α β γ
,
θ θ θ (r/min)
θA
θB
C
θC
,B
,A
Time(s)
Time(s)
α
As shown in Figure 14. The attitude angle has faster response speed and smaller overshoot under
fuzzy controller control. And the results show that the cubic robot have better performance under the
control of fuzzy PID with higher presision.
186
Conclusion
The cubic robot is a multivariable, strongly coupled, nonlinear, and time-varying complex system. Its
characteristics and calculations are much more complicated than that of a DC motor. The fuzzy PID
controller proposed in this paper combines fuzzy control and PID control. It not only has the
advantages of flexible control and strong adaptability, but also has the characteristics of high
precision of PID control. The fuzzy PID controller can effectively deal with the nonlinearity and
uncertainty of the system through on-line self-tuning control parameters, which not only improves the
control performance of the system, but also makes it have good anti-interference ability and
robustness. At the same time, the model is easy to adjust, improve, greatly shorten the development
cycle, making it can be used to achieve online control of different industrial processes, has a good
promotion and application value.
Acknowledgement
We acknowledge support from National Natural Science Foundation of China (No. 61773027); Key
Project (No. KZ201610005010) of S&T Plan of Beijing Municipal Commission of Education
References
[1] Muehlebach M, Gajamohan M, D’Andrea R. Nonlinear analysis and control of a reaction
wheel-based 3d inverted pendulum. In: Proceedings of the conference on decision and control[J];
2013
[2] Weilong Hou. Research on Fuzzy PID Speed Control System of Walker Aid Robot[J]. Computer
Measurement & Control. 2017, 54-57.
[3] Xinying zhang, Fajun Yu, Cong Liu.Design of Four-Rotor UAV Based on Fuzzy PID
Control[J].Research and exploration in laboratory. 2017, (36), 56-59.
[4] Zhigang Chen, Xiaogang Ruan, Yuan Li. Balancing Control of a Cubical Robot Balancing on Its
Corner [C], The 15th International Workshop on Advanced Motion Control (AMC2018).
[5] Zhengli Zhao, Huijun Yu, Faming Zhang. DC Motor Speed Control System Based on Fuzzy PID
Control[J]. Journal of Hunan University of Technology.2015, (25), 38-42.
[6] Zhigang Chen, Xiaogang Ruan, Yuan Li. Dynamic Modeling of a Cubical Robot Balancing on Its
,
Corner [C], 2017 3rd International Conference on Mechanical Electronic and Information
Technology Engineering
[7] M. Gajamohan, M. Merz, I. Thommen, and R. D’Andrea. The cubli: A cube that can jump up and
balance[J]. In IEEE/RSJ Int. Conf. on Intelligent Robots & Systems, pages 3722–3727. IEEE, 2012.
187