0% found this document useful (0 votes)
46 views10 pages

Only. This File Is Illegal.: Research On Two-Wheeled Self-Balancing Robot Control Strategy Based On LQR-Fuzzy Algorithm

Image enhancement is a process of transforming an image and enhancing its quality in order to take out some important information from it. The image enhancement process can be done by an optimization technique like Particle Swarm Optimization method, which is a search technique used to find the best solutions out of several possible ones. The PSO technique can be efficiently used by taking the objective function for image enhancement as the fitness value for every particle. This paper presents the techniques used for image enhancement using Particle Swarm Optimization.

Uploaded by

adeq_con
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views10 pages

Only. This File Is Illegal.: Research On Two-Wheeled Self-Balancing Robot Control Strategy Based On LQR-Fuzzy Algorithm

Image enhancement is a process of transforming an image and enhancing its quality in order to take out some important information from it. The image enhancement process can be done by an optimization technique like Particle Swarm Optimization method, which is a search technique used to find the best solutions out of several possible ones. The PSO technique can be efficiently used by taking the objective function for image enhancement as the fitness value for every particle. This paper presents the techniques used for image enhancement using Particle Swarm Optimization.

Uploaded by

adeq_con
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

International Journal of Control and Automation

Vol.9, No.2 (2016), pp.31-40


http://dx.doi.org/10.14257/ijca.2016.9.2.04

Research on Two-Wheeled Self-Balancing Robot Control


Strategy Based on LQR-Fuzzy Algorithm

Junfeng Wu1, 2, Xiaohan Wang2 and Haiying Wang2


1. Heilongjiang University of Science and Technology, Harbin, China
2. Harbin University of Science and Technology, Harbin, China
E-mail: [email protected]

L.
Abstract
In this paper, we take two-wheeled self-balancing robot as the experimental object,

A
designing an advanced controller which not only solves the defect of the over-reliance

EG
on precise mathematical model for modern control theory, but also solves the problem of

s I ly.
complex handling issues of the fuzzy controller under multi input and multi output
situation. The designing idea is: firstly, a fusion function is gained through the feedback

ei n
LL
matrix by LQR method; the fusion function is adopted to reduce the input dimensions of
fil O
the fuzzy controller, thus to control the system. Secondly, due to the quantization factor
and proportional factor of fuzzy control are mainly obtained by experience, we use
is on
particle swarm algorithm to optimize the quantization factor and scaling factor of fuzzy
controller in order to get an ideal control effect. Thirdly, constructing two fusion
th si

functions to fuse the six dimensional input variables from the robot, which solve the
y er

existence error between the designed decoupler from theoretical calculation and the
actual situation of the system, also solve the difficulties through decouper designing.
eb eV

Finally, proving the validity of the control strategy through the simulation and real-time
control, it shares a good theoretical and practical significance.
ad in

Keywords: self-balancing robot; fusion function; particle swarm optimization;


m Onl

decoupler; LQR-Fuzzy controller

1. Introduction
Nowadays, the role of robots in the society has become more and more obvious; its
product has been widely used. Due to the vulnerability of the robots and the likely
influence of some uncertain factors from external environment, it belongs to a complex
nonlinear system; therefore the design of its controller becomes a tough issue. Two-
ok

wheeled self-balancing robot has simple structure, and it is easy to analyze, it also shares
the characteristics of nonlinearity, multivariate, instability and high coupling like other
Bo

robots [1]. Hence the research of two-wheeled self-balancing robot has great significance
to the field of robot controller designing; meanwhile it is also an ideal platform for
testing various control algorithms [2]. The two-wheeled self-balancing robot is chosen as
the experimental object in this paper, in order to solve the problem of over-reliance on
precise mathematical models and the problem of complex handling issues of the fuzzy
controller under multi input and multi output situation [3]. The controller is designed.

2. System Description and Modeling of the System


2.1 Mathematical Model of the System
In order to design the robot controller, the force analysis of the system is conducted
and dynamic mathematical models is established, a three degrees of freedom mechanical
system can be expressed by six state variables [4-5]. The horizontal direction is taken as

ISSN: 2005-4297 IJCA


Copyright ⓒ 2016 SERSC
International Journal of Control and Automation
Vol.9, No.2 (2016)

the X axis, the vertical direction is taken as the Y axis, and the line between two wheels
centers is taken as Z axis, the two center point between two wheels is the origin of the
coordinate system, the coordinate system is shown in figure 1.

yp
y xp
y
XL  CG  x
CL Mg

L.
HL
L y

A
VL XR

EG
s I ly.
D CR
2

ei n
LL
fil O HR VR
Figure 1. Self-Balancing Robot Force Analysis Diagram
is on
th si

2.2 The Dynamic Model Based On Newtonian Mechanics


y er

Force analysis for the robot left wheel:


eb eV

mxl  fl  H l (1)
ad in

J
xl  Cl  f l R (2)
R
m Onl

Force analysis for the robot right wheel:


mxr  f r  H r (3)

J
xr  Cr  f r R (4)
R
ok

Force analysis for the robot body:


Bo

Mx p  Hl  H r (5)

J p  (Vl  Vr ) L sin   ( Hl  H r ) L cos   (Cl  Cr ) (6)

My p  Vl  Vr  Mg (7)

D
J   (Hl  H r ) (8)
2
Among them,
x p  x  L sin  (9)

32 Copyright ⓒ 2016 SERSC


International Journal of Control and Automation
Vol.9, No.2 (2016)

y p  L cos  (10)

From the above formulas a nonlinear mathematical model of the robot can be gained:
2 J 1
x ( M  2m  2
)  ML( cos    2 sin  )  (Cl  Cr ) (11)
R R

J p  MgL sin   ML2 sin 2   ML2 2 sin  cos  


L cos  J (12)
(1  )(Cl  Cr )  2 L(m  2 ) cos   x
R R

L.
2 J  DJ  1
( Dm   2 )  (Cl  Cr ) (13)

A
D R R

EG
s I ly.
The self balancing linearized state equation of rob of can be gained through the
system model linear processing near the equilibrium point:

ei n
LL
 x  0 1
fil O 0 0 0 0  x   0 0 
   23.7097 0 0 0   x   1.8332 1.8332 
   
 x  0 0
is on
  0 0 0 1 0 0     0 0   Cl 
    
83.7742 0 0 0     4.9798 4.9798 Cr 
(14)
  0
th si

0
  0 0 0 1     0 0 
y er

0 0
      
  0 0 0 0     5.1915 5.1915
eb eV

0 0
ad in

3. The Design of LQR-Fuzzy Controller


m Onl

3.1 The Design of Controller


Due to the direct fusion characteristic of the output information within linear system,
the fusion function is constructed, and changes the multiple state variables into
comprehensive errors E and EC. The output value of fusion function after dimensionality
reduction can be regarded as the input value of a two dimensional Mamdani fuzzy
controller [6], both the input and the output of fuzzy controller adopt the triangle
ok

membership function, and each variable uses 7 fuzzy subsets of [NB NM NS ZE PS PM


PB] for description [7-8].
Bo

The output equation of fusion function is:


 kr k 
 K 0 0 
K
x  Gx   x (15)
 kr k 
 0 0 
 K K 

The fuzzy rule of fuzzy controller is set up in accordance with reasoning synthesis
method. Here, the optimum quadratic is adopted to gain the required input and output [9].
Therefore, the simulation diagram is shown in figure 2.

Copyright ⓒ 2016 SERSC 33


International Journal of Control and Automation
Vol.9, No.2 (2016)

L.
A
Figure 2. The Optimal the Two Times Simulation Structure Diagram

EG
s I ly.
3.2 Robot Real-Time Control Test

ei n
LL
The above LQR-fuzzy control strategy is applied into the three degrees of freedom
fil O
robot system to observe and to verify the real-time control effect of algorithm. And then
save the data between 10 to 20 seconds of the robot, and plot it. The effect of real-time
is on
control is shown in figure 3 as follows.
th si
y er
eb eV
ad in
m Onl
ok

Figure 3. The Inclination Graph of LQR-Fuzzy Real-Time Control


Bo

4. Particle Swarm Optimization LQR-Fuzzy Controller


4.1 The Selection of Optimal Objective Function
This paper selects the ITAE criterion as the objective function [10-11]. ITAE criterion
is integration of the absolute value between times multiplied by error. It is a more
effective objective function on describing comprehensively the system dynamic
performance currently. It is easy to realize the rules on the computer, and for the
optimum parameter combination scheme which is gained from it can make the system
with characters like good stability, less overshoot and a faster response time, etc.

4.2 The Realization of LQR-Fuzzy Control Parameter Optimization


First of all, write programs based on the idea of particle swarm optimization. Then,
compile the fitness function [12]. Finally, run the program within the m file, and obtain

34 Copyright ⓒ 2016 SERSC


International Journal of Control and Automation
Vol.9, No.2 (2016)

the optimal parameter values. This is a repeated alternative simulation and optimization
process. Running time will be relatively longer.
Take a set of data by experience before optimizing, taking two quantitative factors and
a scale factor which are 16, 10, and 28 respectively. After the simulation, the data group
the fitness value is found to be 0.562. Then, running the particle swarm program, the
optimized parameters are 22.7653, 20.7528 and 24.6127 respectively, the fitness value
turns into 0.421. Obviously the better fitness value can be obtained after optimization.
The simulation diagrams before and after optimization are shown in figure 4 and 5.

L.
A
EG
s I ly.
ei n
LL
fil O
is on
Figure 4. System Simulation Diagram Before Optimization
th si
y er
eb eV
ad in
m Onl

Figure 5. System Simulation Diagram after Optimization

From the above simulation diagrams can be seen that, parameters after particle swarm
ok

optimization will not only decrease the adaptive value of the system, meanwhile, we can
also obviously witness the optimized system overshoot volume being significantly
Bo

reduced from the simulation curve, and also speed up the convergence speed. Therefore,
the particle swarm algorithm indeed plays an optimizing effect.

5. Dual Fusion of LQR-Fuzzy Controller Designing


5.1 The Construction of Fusion Function
The system state feedback matrix is firstly obtained according to the optimal control
theory:

 K   7.0711 8.0072 40.7360 5.7149 7.0711 1.1671 


K   1   
 K 2   7.0711 8.0072 40.7360 5.7149 7.0711 1.1671
(16)

Copyright ⓒ 2016 SERSC 35


International Journal of Control and Automation
Vol.9, No.2 (2016)

The two LQR-fuzzy controllers are designed, namely, on the basis of K1 and K 2 ,
constructing two fusion functions G1 and G2 . The constructions of two fusion functions
methods are basically the same [13], so only take the construction of G1 as an example.
Recording K1 vector norm as K1 , K1  kr1 2  kr1 2  k1 2  k 2  k1 2  k 2 .
1 1

Therefore:
 kr1 k1 k1 
 0 0 0 
K1 K1 K1
G1    (17)
 kr1 k1 k1 
 0 

L.
0 0
 K1 K1 K1 

A
So the input and output of the integration function is as follows:

EG
s I ly.
 kr1 k1 k1 
 0 0 0 

ei n
LL
K1 K1 K1
x1   x

fil O
kr1 k1 k1 
(18)
 0 0 0 
is on
 K1 K1 K1 
th si
y er

5.2 The Confirmation of Fuzzy Rules


eb eV

Control strategies adopted the synthesis reasoning method with two fuzzy controllers,
firstly, extract the data, and then use the fuzzy synthesis reasoning to derive the fuzzy
rules on the basis of data. By using the optimal quadratic form to obtain the input and
ad in

output data [14]. Then generate he control rules of fuzzy controller 1 and the controller 2,
based on the ideas of fuzzy reasoning synthesis such as table 1 and table 2.
m Onl

Table 1. Fuzzy Controller-Rule List

Ec NB NM NS ZE PS PM PB
E
NB NB NB NB NM NM NM NS
ok

NM NB NB NM NM NS NS ZO
NS NB NM NM NS NS ZO PS
Bo

ZE NM NS NS ZO PS PS PM
PS NM NS ZO ZO ZO PS PM
PM NS ZO PS PS PM PM PB
PB ZO ZO PS PS PM PB PB

Table 2. Fuzzy Controller-Rule List

Ec NB NM NS ZE PS PM PB
E
NB NB NM NM NS NS ZO ZO
NM NM NM NS NS NS ZO ZO
NS NM NM NS NS ZO ZO PS
ZE NM NS NS ZO PS PM PM
PS NS NS ZO ZO PS PS PM

36 Copyright ⓒ 2016 SERSC


International Journal of Control and Automation
Vol.9, No.2 (2016)

PM NS ZO ZO PS PS PM PB
PB ZO PS PS PM PM PM PB

5.3 Robot Real-Time Control Test


The dual fusion LQR-Fuzzy control method is applied to the practical system, and
test the practical and real-time performance of dual fusion LQR-Fuzzy control algorithm.
The real-time control module is shown in the figure 6.

L.
A
EG
s I ly.
ei n
LL
fil O
is on
th si

Figure 6. Simulink Model of LQR-Fuzzy Real-Time Control


y er

The above LQR-Fuzzy control algorithms are applied to three degree freedom
eb eV

robot system to verify and check the practical real-time control effect of the
algorithm, save the data of robots between 10 second to 20 second. The real-time
ad in

effect diagram is shown in figure 7.


m Onl
ok
Bo

Figure 7. The Inclination Graph of Dual Fusion LQR-Fuzzy Real-Time


Control

From the real time response curve of double fusion LQR-fuzzy control, it can be seen
that during the process of control, the dip angle basically fluctuate within the range of [-
0.05, 0.05], and the range of variation is very small. Therefore, we can say that in some
cases, no decoupling to the system also can achieve the expected effect of control. The
robot real time control effect is shown in figure 8.

Copyright ⓒ 2016 SERSC 37


International Journal of Control and Automation
Vol.9, No.2 (2016)

Figure 8. Robot Real-Time Control Effect

L.
6. Conclusion

A
This paper takes two-wheeled self-balancing robot as the experimental object,
firstly, the Newton's mechanics equation is adopted to establish the system

EG
s I ly.
mathematical model and conduct the linear process. Then design a LQR-fuzzy
controller, the LQR is adopted to generate the system feedback matrix, in order to

ei n
construct the fusion function and then to reduce the fuzzy controller input dimension,

LL
fil O
lastly using the fuzzy controller to control the whole system. During the design of the
above controller, the obtaining of fuzzy controller quantization factor and scaling factor
is on
are mainly relied on experience and test methods. In order to get a better control effect,
using particle swarm optimization algorithm to optimize the fuzzy controller of
th si

quantization factor and scaling factor in order to get the ideal factor values. There is a
certain difference between the decoupler that is designed based on actual system and the
y er

under actual system. The decoupler has also been a problem in control system designing.
eb eV

Therefore, this paper tries to construct two blending function to the overall integration,
for the six dimensional input variables of the robot, using the fuzzy controller itself
decoupling function instead of decoupler within the original system. Finally, the
ad in

algorithm was verified through SIMULINK and proved to obtain a good simulation
effect which has a wide range of application perspective.
m Onl

Acknowledgements
Harbin application technology research and development projects (Outstanding
subject leaders) No.2014RFXYJ051

References
ok

[1] Googol Technology, “Self-Balancing Robot GBOT1001 User Manual”, (2007), pp. 4-16.
[2] J. Wu and W. Zhang, “Design of fuzzy logic controller for two-wheeled self-balancing Robot”, The
Bo

6th International Forum on Strategic Technology, Harbin, China, (2011), pp. 1266-1270.
[3] Z. Li, “Research on LQR-Fuzzy control algorithm of two-wheeled self-balancing robot”, Harbin:
Harbin university of technology (master's degree thesis), vol. 32, (2014).
[4] L. Xiao, “Two-wheel self-balancing robot modeling and intelligent control”, Harbin: Harbin university
of technology (master's degree thesis), (2011), pp. 60-61.
[5] J. Wu and S. Wang, “Application of fuzzy control in double inverted pendulum”, Journal of Harbin
University of Science and Technology, vol. 4, no. 18, (2013).
[6] W. Zhang, “Two rounds of self-balancing robot fuzzy PD control method research”, Harbin: Harbin
university of technology (master's degree thesis), (2012), pp. 18-24.
[7] J. Qu, W. Wu and J. Sun, “Triple inverted pendulum system fuzzy controller design and simulation
[J]”, Journal of system simulation, vol. 3, no.16, (2004).
[8] S. Jia, “Research and application of two-wheeled self-balancing robot control strategy based on
adaptive neural-fuzzy algorithm”, Harbin: Harbin university of technology (master's degree thesis),
(2012), pp. 38-40.
[9] J. Wu and S. Jia, “T-S adaptive neural network fuzzy control applied in two-wheeled self-balancing
robot”, The 6th International Forum on Strategic Technology, Harbin, China, 1023-1026, August,
(2011), pp. 22-24.

38 Copyright ⓒ 2016 SERSC


International Journal of Control and Automation
Vol.9, No.2 (2016)

[10] Z. Li, “Study on the fuzzy control of inverted pendulum system”, Xi'an: xi'an university of science and
technology building (a master's degree thesis), 42-54, (2007)
[11] S. Chen, “Using SIMULINK and the optimization toolbox for PID parameter optimization”, Journal of
modern electronic technology, vol. 9, no. 11 (2002)
[12] J. Wu, “Yuxin Liang. Research on the control method of two-wheeled self-balancing robot system
based on variable structure control”, Journal of ICIC Express Letters, Part B: Applications, vol. 3, no.
5, (2012), pp. 1185-1192.
[13] X. Xu, C. Liu, Z. Song and X. Song, “Fuzzy decoupling controller design and application”, Journal of
hebei industrial science and technology, vol. 1, no. 25, (2008).
[14] J. Wu, W. Zhang and S. Wang, “Two-wheeled self-balancing robot with the fuzzy PD control method”,
Mathematical Problems in Engineering, (2012), pp. 112-125.

L.
A
EG
s I ly.
ei n
LL
fil O
is on
th si
y er
eb eV
ad in
m Onl
ok
Bo

Copyright ⓒ 2016 SERSC 39


International Journal of Control and Automation
Vol.9, No.2 (2016)

L.
A
EG
s I ly.
ei n
LL
fil O
is on
th si
y er
eb eV
ad in
m Onl
ok
Bo

40 Copyright ⓒ 2016 SERSC

You might also like