You are on page 1of 8

Flexible Two-wheeled Self-Balancing Mobile Robot

ZHAO Jian-wei*, RUAN Xiao-gang*


*Institute of Artificial Intelligence and Robots, Beijing University of Technology, 10002,
Beijing, China (Tel: 010-67394227; e-mail: zhaojianwei@emails.bjut.edu.cn)
Abstract: The dynamic model of flexible two-wheeled self-balancing robot is obtained on the Lagrange equation
and dynamics mechanics theory. Use springs to imitate human lumbar spine. The linear model can be got, state-space
equations are established yet and the robot is controlled easily and effectively. Validity and rationality of the system
model and the designed controller are verified through the performance experiments of the prototype too then the real
robot has been done. The improved Boltzmann machine is used for controlling robots posture based on study.
Keywords: flexible robot, dynamic modeling, improved Boltzmann machine, lumbar spine.

1. INTRODUCTION
With the development of robots and flexible automatic
technology, all kinds of joint robots have been applied widely.
Research on flexible robot, which has been a hot point of
research all over the world, extends application fields of
robots and makes mechanism properties of robot accord with
human being. Due to the fact that flexible robots have
flexible units, it is easy to produce bend deformed during
movement and brings many difficulties for the dynamic
model building and controlling of flexible robots. While the
establishing of accurate and practical dynamic model is the
premise to design the controller with high performance.
Recent years many scholars all over the world study the
problem of building the dynamic model of flexible robots and
have gained achievements mostly in research about flexible
arms, such as Low and Vidyasagar, Kan reveals the
phenomenon of heat strengthen dynamics, also the
documents research on flexible arms.

be quickly and adapt to the study in order to achieve the


dynamic obstacle avoidance in JIANG.

To sum up, about two-wheeled upright robot, and its structure


are rigid structures. No two-wheeled flexible about robot
research reports, and its dynamic model and control methods
are not the flexible system yet. The paper uses springs
imitating human lumbar spine, and designed the real flexible
robot. The paper considers the lumbar spine bend of flexible
robots, which has an actual length without an approximate
point. The paper uses analyses systems of flexible hinges in
the spring part of lumbar spine, and studied the problems of
dynamic model for flexible two-wheeled
self-balancing
robots with targeting on flexible joints and steel body
structures. Also sets up dynamic model of flexible twowheeled self-balancing robots applying Lagrange and the
principle of dynamics. The paper thinks about the effects of
gravitational energy and energy of motion, etc. During the
processes the dynamic model equations are gained finally,
which is a group of ordinary differential equations owning
Many researchers all over the world has done a lot of standardized forms and simple structurecharacteristic. Now
research on the mobile wheeled inverted pendulum model no one will Hopfield network and Boltzmann machine
and the balance control technology of two wheels mobile, applied to the robot balance control and also did use the
appeared many robots just like Quasimoro and Joe etc. For balance control in the flexible robot. In this paper, the
the robots form is very agile, and this kind of robots improved Boltzmann machine with successful delivery of the
behaviour is great similar to flying rocket and moving robot balance control in the robot, the robots balance control is a
with two legs, therefore, the research on mobile robots very important part is necessary like human being balance
control and theory is so active field that it has been paid control and balance control study with biological
attention both at home and abroad. However, there is not characteristics, self-organizing, and adaptive characteristics.
researching the flexible problems of two-wheeled self- With the study of function, self-organizing and adaptive, the
balancing robots.
robot can be called truly intelligent robot. The paper provides
a theoretical basis for the control research of flexible twoHopfield network has biological nervous system structure
wheeled self-balancing robot, which will be a meaningful and
features and functional characteristics, has aroused the value of scientific research platform. As a complex nonattention of scholars States and formed a large number of balancing system, the two-wheeled self-balancing flexible
artificial neural network research teams. Many scholars used
robot provides an object for research robot system in
the Hopfield network widely in the robot field, mainly in
kinematics and dynamics analysis, at same time, also
robot path planning at present such as Fan and Sadati, about
provides a good experimental subject for studying the control
the robot navigation problem such as Jun and Lendaris. Draw
research, especially self-organizing balance control methods
on different neural network Hopfield associative memory and techniques. The research supplied theoretic instructions
model on a sample of memory capacity and reinforcement for developing dynamic control system in flexible twolearning to solve the problem to make autonomous robot can

wheeled self-balancing robots too. It has great significance


for the design and research of robots.
2. THE SYSTEM STRUCTURE ANALYSIS of FLEXIBLE
ROBOT

Fig. 1. The system structure analysis graphs of flexible robot


The flexible Robot consists of three sections: feeling organs,
nervous systems and bone-muscles executing systems. Its
topological structure is shown in Fig. 1(a). The system has
many characteristics of modular, expanding and stability etc.
The human body is a complex organism. The function of
organ system is related to each other without isolated. Human
being consists of sense organs, limbs and brain in physiology.
The motion controlling system of human being is a
complicated network, including feeling organs, nervous
systems and bone-muscles executing systems.
1) Nervous systems are divided into two parts: central
nervous systems and peripheral nerves systems.
(1) The central nervous systems embrace brain that is
located in cranial cavity and spring that is located in
spinal canal. The brain is the most critical part in the
whole central nervous systems.
(2) The brain is divided into two parts: cerebrum and
cerebellum. (a) The single-board computer is cerebrum of
the robot, which is used for calculating motion strategy
and the controlling of artificial intelligence aspects.
Communication relies on USB interface and lines
between cerebrum and cerebellum. (b) The spine is a key
transmission pathway, playing a bridge role. It is similar
to USB emulator, USB lines, series lines and all kinds of
lines in the robot.
(3) The peripheral nerves systems are made up of senseaction nerves. The sensory nerves in the robot are vision
processor (including in camera), microcontroller

(including in sonar), USB emulator, and series lines.


2) Feeling organs of the robot are micro silicon powders, tilt
sensors, camera, sonar, and some input /output devices such
as LCD screen, remote controller, mouse and keyboard.
3) Bone-muscle executing systems in the robot content body
platform, two high precision Direct Current (DC) servo
motors with photoelectric encoders and two wheels.
According to neurophysiology, human or animal cerebella
control of movement, including body posture and balance
control. The nerve tissue of cerebella motion control is called
Sensor motor System. Sensor motor System is a combination
of receptor function and motor nerve function of neural tissue
and also is a sensory-motor control system. In fact, Cerebella
sensory-motor system is not a simple nerve tissue, in which,
in addition to cerebella cortex, the also contains a sensory
organ. If the campaign is also regarded as a sensory-motor
organ system, in that case, sensory-motor system constitutes
a reflex arc shown in the figure 1(b), that is the most basic of
the nervous system of neural structures. The feeling drives
neural structure contains five parts and corresponds with
robot motion.
(1)Sensory organs: The body's sensory organs (eyes, ears,
nose, tongue, body), which corresponds to the robot's sensors
or detection devices.
(2)Afferent: Transmission of sensory signals of the neural
cells, which corresponds to the signal input lines of robot's
sensor and A/D converter.
(3)Center Nervous: Regulate the function of specific nerve
cells, which corresponds to the robot controller.
(4)Efferent: Effect of signal transmission groups of nerve
cells, which corresponds to the signal output lines of effect of
robot and D/A converter.
(5)Effectors: Sports organs (bone and muscle), which
corresponds to the driver of robot or motors.
3. BUILDING MODEL of FLEXIBLE ROBOT

m2

m3

m1

1
M

Fig. 2. The real flexible robot and the side view of bending
flexible robot
3.1 Kinematics of flexible robot
The flexible robot researched in this paper has two dimension
gyroscopes, which is driven by two motors on horizontal
surface and shown in Fig. 2. m1 is the quality of the robots
base. M is the quality of motors and wheels. m3 is the quality
of the lumbar spine. The quality of the upper body of flexible

robot is m 2 . The distance is l 1 from the centroid of robots


base part to the central of rotational axis (the quality of
robots base can be specified as uniform distribution). The
distance is l 3 from the centroid of lumbar spine to the top of
robot base part (the quality of the lumbar spine can be
considered as uniform distribution). The distance is l 2 from
the centroid of upper body to the top of lumbar spine (the
quality of lumbar spine is inhomogeneous distribution, the
centroid can be considered as in the 1/3 dot position of upper
body).

..

. 2
1
3K (1 2 )
sec(1 2 )(
3((2l1 l3 )(l 2 l3 ) sin(1 2 ) 1 (l 2
3(2l1 l3 )(l2 l3 )
m2

l3 ) g sin 2 ) (9 cos 2 (((1 / 3)((7l 2 6l 2l3 3l3 ) m2 (l3 ( m2 m3 ) l1 (m1 2( m2 m3 )))


2

cos 1 (2l1 l3 )(l2 l3 ) 2 m2 cos(1 2 ) cos 2 )((2l1 l3 )(l2 l3 )m2 cos(1 2 )( K (1


2

. 2

2 ) g (l3 (m2 m3 ) l1 (m1 2(m2 m3 ))) sin 1 ( 2l1 l3 )(l2 l3 )m2 sin(1 2 ) 2 )
2

7l1 m1
(2l1 l3 ) 2 (m2 m3 ))( K ( 1 2 ) 1 (2l1 l3 )(l 2 l3 )m2 sin(1 2 ) (l2
3
2
1
7l m
2
2
l3 )m2 g sin 2 )) ( (7l 2 6l2 l3 3l3 )m2 ( 1 1 ( 2l1 l3 ) 2 (m2 m3 )) (2l1 l3 ) 2
3
3
. 2

. 2

(l2 l3 ) 2 m2 cos 2 (1 2 ))((2l1 l3 )(l 2 l3 ) m2 cos(1 2 )( F 1 (l3 ( m2 m3 ) l1 (m1


2

. 2

2(m2 m3 ))) sin 1 2 (l2 l3 )m2 sin 2 ) (l3 ( m2 m3 ) l1 (m1 2( m2 m3 ))) cos1
. 2

( K (1 2 ) 1 ( 2l1 l3 )(l2 l3 )m2 sin(1 2 ) (l2 l3 ) m2 g sin 2 )))) /(m2 (m2 (7l2

The robot is a coupled rigid-flexible construction in this


paper. The upper body and robots base are rigid, which does
not occurred distortion during the motion. The lumbar spine
is flexible part, so it must take place distortion in movement.
Selecting generalized coordinate of system as Fig. 2. X is the
displacement of the robots motors and wheelsaxis. The
rotation angle of robots base is 1 . The rotation angle of
robots upper body part is 2 .

7l1 m1
(2l1 l3 ) 2 (m2 m3 )) 3(2l1 l3 ) 2 (l 2 l3 ) 2 m2 cos 2 (1 2 ))((2l1
3
l3 )( M m1 m2 m3 ) cos(1 2 ) (l3 ( m2 m3 ) l1 (m1 2( m2 m3 ))) cos 1 cos 2 )
6l2l3 3l3 )(
2

3( ( 2l1 l3 )(l3 (m2 m3 ) l1 ( m1 2(m2 m3 ))) cos1 cos(1 2 ) (

7l1 m1
( 2l1 l3
3

1
2
2
) 2 (m2 m3 )) cos 2 )( (7l 2 6l 2l3 3l3 ) m2 (l3 ( m2 m3 ) l1 (m1 2( m2 m3 ))) cos1
3
2
2
2
( 2l1 l3 )(l2 l3 ) 2 m2 cos(1 2 ) cos 2 ))) ((7l2 6l2l3 3l3 )((2l1 l3 )(l2 l3 ) m2 cos
. 2

. 2

(1 2 )( F 1 (l3 (m2 m3 ) l1 ( m1 2(m2 m3 ))) sin 1 2 (l2 l3 )m2 sin 2 ) (l3


. 2

( m2 m3 ) l1 (m1 2( m2 m3 ))) cos 1 ( K (1 2 ) 1 ( 2l1 l3 )(l2 l3 )m2 sin(1 2 )


(l 2 l3 ) m2 g sin 2 ) (3((2l1 l3 )( M m1 m2 m3 ) cos(1 2 ) (l3 (m2 m3 ) l1 (

3.2 The dynamic model of flexible robot

1
2
2
m1 2(m2 m3 ))) cos 1 cos 2 )(( (7l2 6l2l3 3l3 )m2 (l3 ( m2 m3 ) l1 (m1 2( m2 m3
3
2
2
))) cos1 ( 2l1 l3 )(l2 l3 ) m2 cos(1 2 ) cos 2 )((2l1 l3 )(l 2 l3 ) m2 cos(1 2 )( K (

Deducing the dynamic equations based on the Lagrange


equation. The Lagrange equation is:
.

1 2 ) g (l3 (m2 m3 ) l1 ( m1 2(m2 m3 ))) sin 1 ( 2l1 l3 )(l2 l3 )m2 sin(1 2 )

L( q, q ) T ( q, q ) V ( q, q )
(1)
In which: L Lagrange operator; q generalized
coordinate of system; T total kinetic energy of system;
V general potential energy of system.
1) The total kinetic energy of flexible robot:
. 2
. 2
.
.
. 2
1
1
7
2
T M x m1 x m1 x l1 1 cos 1 m1l1 1
2
2
6
. 2
.
.
.
1
m2 ( x 2 x((2l1 l 3 ) 1 cos 1 (l 2 l 3 ) 2 cos 2 ))
2
. 2
.
.
1
(2)
m 2 ((2l1 l 3 ) 2 1 2(2l1 l 3 )(l 2 l 3 ) 1 2
2
. 2
1
1
2
2
cos( 2 1 )) m 2 (7l 2 3l 3 6l 2 l 3 ) 2 m3
6
2
. 2
.
.
. 2
1
x m3 x(2l1 l 3 ) 1 cos 1 m3 (2l1 l 3 ) 2 1
2
2) The general potential energy of flexible robot:
V m1 gl1 cos 1 m 3 g (2l1 l 3 ) cos 1
(3)
m 2 g ((2l1 l 3 ) cos 1 (l 2 l 3 ) cos 2 )
3) The general dissipated energy of flexible robot:
k
U ( 2 1 ) 2
(4)
2
In which: U is the dissipated energy of springs. The stiffness
coefficient of springs is k .
By a series of complex derivation and arrangement to the
formulas and then solving algebraic equations can receive the
dynamic equations of flexible robot finally. The formulas (5),
(6) and (7) are the dynamic model of the flexible twowheeled self-balancing robot. Those are a group of highly
nonlinear and coupled of constant differential equations.

. 2
7l1 m1
(2l1 l3 ) 2 (m2 m3 ))( K ( 1 2 ) 1 (2l1 l3 )(l 2 l3 ) m2 sin(1 2 )
3
2
1
7l m
2
2
(l 2 l3 ) m2 g sin 2 )) ( (7l 2 6l 2l3 3l3 ) m2 ( 1 1 ( 2l1 l3 ) 2 ( m2 m3 )) (2l1
3
3
. 2

2 ) (

. 2

l3 ) 2 (l 2 l3 ) 2 m2 cos 2 (1 2 ))((2l1 l3 )(l2 l3 )m2 cos(1 2 )( F 1 (l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 )

(6)

..

x (3( ((1 / 3)(7l2 6l2l3 3l3 )m2 (l3 (m2 m3 ) l1 ( m1 2(m2 m3 ))) cos 1 (2l1 l3 )
2

(l2 l3 ) 2 m2 cos(1 2 ) cos 2 )((2l1 l3 )(l2 l3 )m2 cos(1 2 )( K (1 2 ) g (l3 (m2


2

. 2

m3 ) l1 (m1 2(m2 m3 ))) sin 1 ( 2l1 l3 )(l2 l3 )m2 sin(1 2 ) 2 ) ((7 / 3)l1 m1
2

. 2

(2l1 l3 ) 2 (m2 m3 ))( K (1 2 ) 1 (2l1 l3 )(l2 l3 )m2 sin(1 2 ) (l2 l3 )m2 g

(7)

sin 2 )) ((1 / 3)(7l2 6l2l3 3l3 )m2 ((7 / 3)l1 m1 (2l1 l3 ) 2 (m2 m3 )) (2l1 l3 ) 2
2

. 2

(l2 l3 ) 2 m2 cos 2 (1 2 ))((2l1 l3 )(l2 l3 )m2 cos(1 2 )( F 1 (l3 (m2 m3 ) l1


2

general potential energy of body is dissipated by springs and


others is obtained by the robots base, for those factors have
influences on springs and flexible joint etc. So it can be seen
that the angle of robots base decreases in the Fig. 3(the
general potential energy of base decreases also).
5. LINEARIZED MODEL

. 2

(m1 2( m2 m3 ))) sin 1 2 (l2 l3 )m2 sin 2 ) (l3 (m2 m3 ) l1 ( m1 2(m2 m3 )))
. 2

cos 1 ( K (1 2 ) 1 (2l1 l3 )(l2 l3 ) m2 sin(1 2 ) (l2 l3 )m2 g sin 2 )))) /((l2


l3 )m2 (m2 (7l2 6l2l3 3l3 )((7 / 3)l1 m1 (2l1 l3 ) 2 ( m2 m3 )) 3(2l1 l3 ) 2 (l2 l3 ) 2
2

m2 cos 2 (1 2 ))((2l1 l3 )( M m1 m2 m3 ) cos(1 2 ) (l3 (m2 m3 ) l1 ( m1 2


(m2 m3 ))) cos 1 cos 2 ) 3((2l1 l3 )(l3 ( m2 m3 ) l1 (m1 2( m2 m3 ))) cos 1 cos(1
2 ) ((7 / 3)l1 m1 ( 2l1 l3 ) 2 (m2 m3 )) cos 2 )((1 / 3)(7l2 6l2 l3 3l3 ) m2 (l3 ( m2
2

m3 ) l1 (m1 2(m2 m3 ))) cos 1 ( 2l1 l3 )(l2 l3 ) m2 cos(1 2 ) cos 2 )))


2

4. SIMULATION EXPERIMENT of THE MODEL


In the practical system, m1 is 2 kg . M is 5 kg . m3 is 1 kg .
m 2 is 10 kg . l 1 is 0.1 m . l 3 is 0.05 m . l 2 is
0.3 m .Simulation experiment: the initial state of flexible
robot is given an initial angle for robots base and an
initial angle 2.0rad for robots body. The stiffness coefficient
of spring k is 10. The time of experiment is 120 second and
no external force.
1(rad)

4.5

2(rad)
4

angle(rad)

3.5

2.5

x

1
x 1 0 0 0 0 0 0
2
y 1 0 1 0 0 0 0 . 0 F
(9)
x.
2 0 0 1 0 0 0 0

.1
2
The formulas (8) and (9) are the state-space equations of the
flexible two-wheeled self-balancing robot. Those are a group
of linear equations. The linear model is easy and convenient
to control and realize using linearization control.. All K12 , K13 ,
K17 , K 22 , K 23 , K 27 , K 32 , K 33 , K 37 are constant function
about m1 , M, m3 , m 2 , l 1 , l 3 , l 2 .
6. OPTIAONAL CONTROLLER LQR

1.5

The state-space equations of the system are obtained by a


series of complex operating and verities.
x.
0 1 0 0 x 0
. 0 0

1
0 0
0 0 1 0 1 0

.
0 0 0 1 2 0
2 0 0
(8)

. F
..

0 K 32 K 33 0 0 0 x K 37

x
.
..

1 0 K12 K13 0 0 0 1 K17


.
.. 0 K
K 23 0 0 0 2 K 27
22

20

40

60
t(s)

80

100

120

Fig. 3. The curve of flexible robots angle simulation


Experiment analysis: the initial state of flexible robot is given
an initial angle for robots base and an initial angle 2.0rad
for robots body in Fig. 3(likes a moving inverted pendulum
that have two different angles in base and body). The angle of
robot base 1 is affected by the robots body through the
flexible joints. Because of no friction force on ground and the
some influences to such as inertia etc, the angle of base
decreases gradually and does oscillation moving in . The
angle of robot body 2 moves from 2.0rad to in the
internal and does oscillation moving in . The angle of body
decreases gradually and gets the same angle with the robots
base finally. The robots base with body does the undamped
oscillation moving, because their angle acceleration is equal
and oscillating is also synchronous, when the angle of body
gets the same angle with the robots base. Due to the equal
angles, the springs does not occurred deformation, so there
are not energy consumption and they do oscillation moving.
Analyzing the angle change from energy view, one part of the

6.1 The Controller LQR( linear quadratic regulator)Design


According to rank criterion methods of the system
controllability: rank ( A AB A 2 B A3 B A 4 B A 5 B) 6 , and rank
criterion
methods
of
observability
2
3
4
5
rank (C CA C A C A C A C A) 6 , knowing that the
approximate linearization system is controllability and
observability. The system meets the usage condition of
optimal control.
In the practical system, m1 is 2 kg , M is 5 kg , m3 is 1 kg ,
m 2 is 10 kg , l 1 is 0.05 m , l 3 is 0.05 m , l 2 is 0.3 m .
In this paper, selects: Q= [1 0 0 0 0 0; 0 100 0 0 0 0; 0 0 100
0 0 0; 0 0 0 100 0 0; 0 0 0 0 1 0; 0 0 0 0 0 1], R= [1]. Using
MATLAB order LQR (A, B, Q, R) to receive feedback of
system K=[-1.0000 43.1254 371.4855 -12.1908 10.9222
97.6889] (the stiffness coefficients k is 20).
6.2 Simulation experiment of flexible robot controlling

Simulation experiment: the initial state of flexible robot is


given a same initial angle 0.1rad for robots body and robots
base. The stiffness coefficient of spring k is changed.
0.3

0.1

robot angle1(rad)

0.06

0.15

0.04

0.1

0.02

0.05

-0.02

-0.05

robot angle2(rad)

0.08

0.2

10

-0.04

(a) k is 10

0.1

10

(b) k is 50

robot angle1(rad)

0.1

robot angle 1(rad)

robot angle2(rad)

0.08

0.08

0.06

0.04
0.04

0.02
0.02

-0.02

-0.04

-0.02

(c) k is 100

10

Fig. 5. The state graph of motion debugged

robot angle 2(rad)

0.06

The stiffness coefficient of springs k is 749 n / m .

robot angle1(rad)

robot angle2(rad)

0.25

The parameters of real robot, m1 is 8 kg , M is 5 kg , m3 is


1.5 kg , m 2 is 12 kg , l 1 is 0.11 m , l 3 is 0.05 m , l 2 is 0.26 m .

10

(d) k is 10000

Fig. 4. Changing stiffness coefficient of spring k

Fig. 4 shows the base and body of robot adjust smooth and
quickly, their phases are same basically, however their angles
of adjusting have larger difference, when the flexible joint
has effect, but the springs has no effect. Also the flexible of
spring is very larger ( k is very little). With the stiffness
coefficient of spring k increases gradually and the effects of
spring become stronger, it can be seen the adjusting times is
more, their angles of adjusting have larger difference,
however their phases is same basically from Fig. 4. (a) and
(b). With the stiffness coefficient of spring k increasing
gradually and the effects of spring become more stronger, it
can be seen the adjusting times is little and the overshoot also
is very little, the curves of 2 coincides with the curves of 1
from Fig. 4. (c) and (d).
This paper has done many simulation experiments then the
maximum initial angle is 14.66o (if the initial angle over
14.66o, the experiment will fail). The initial state of flexible
robot is given an initial angle approximate 5.7 o and the robot
can go back to the upright self-balancing condition in
approximate 6 s . When the initial state of flexible robot is
given an initial angle within a range of less than 14.66 o, the
flexible robot can adjust to the balance condition by itself in
the simulation experiments. Validity and rationality of the
system model and the design controller are verified through
the performance simulation experiments of the prototype.
7. THE EXPERIMENT of REAL ROBOT

The six parameters K (1.0e+011[0.0039 -1.7288 0.0014


0.0432 -0.3723 0.0008]) of optical stable point are obtained
after plenty of real on-line experiments, robot has good
robust and self-adjusting ability in this point. Fig. 5 shows
that there is a little delay when robot suffers a great
disturbance and the robot has a great opposite speed in order
to adjust its balance. The speed curve of the robot very
steeply at the beginning, after that it becomes smoothly, at
last, the robot goes to the balance position basically in little
time. Due to the larger stiffness coefficient of springs, the
shake of base and body is little so the speed decreases
gradually. There is a little different in the speed graph of the
right wheel and left wheel, because it is impossible that
having the right and left two wheels with absolute same
parameters in fact. In the figure, the speed of robot does not
arrive at zero absolutely, however it has a little speed, the
reason is that the centroid of robot does not standing on the
central axis line of robot, so there is a little speed in the
centroid departure distance, for this problem, it can be solved
by using programme or add to the weight part.
8. THE IMPROVED BOLTZMANN MACHINE of
FLEXIBLE ROBOT REARLIZING
Many practical optimization problems are non-convex
objective function, thus there are many local optimal solution.
With the increased scale optimization problems especially, a
number of local optimal solutions will be rapidly increasing.
So it is a difficult problem all long that the global optimal
solution of non-convex objective function is solved
effectively. The common Boltzmann machine of Simulated
Annealing Algorithm in order to ensure optimal results can
be achieved, the value of the parameters is changed very slow
to decay. This makes it the perfect theory rather difficult to
have a widely accepted practical. The shortcomings almost
covers up the major advantages of its. So improve its
convergence rate has become a very important issue.
Consider the energy functions of the Boltzmann machine and
the Hopfield network are same, by the energy functions into
the performances index are also same. The analysis based on
Simulated Annealing Algorithm. The Boltzmann machine
and the Hopfield network are integrated effectively. Make
full use of the computing speed of the Hopfield network and

the characteristics that the Boltzmann machine of Simulated


Annealing Algorithm can effectively avoid the local
minimum value. A highly effectively improved algorithm is
put forward.
In the practical system, m1 is 7 kg , m3 is 1 kg , M is 5 kg ,
m 2 is 10 kg , l 1 is 0.1 m , l 3 is 0.05 m , l 2 is 0.3 m , Q=[1 0 0
0 0 0; 0 100 0 0 0 0; 0 0 100 0 0 0; 0 0 0 100 0 0; 0 0 0 0 1 0;
0 0 0 0 0 1], R=[1]. Using MATLAB order LQR (), the
controllability rank criterion and the observability rank
criterion: rank ( B AB A 2 B A 3 B A 4 B A 5 B) 6 and

rank (C CA C A C A C A C A) 6 , so the system is


completely controllable and observable and meet the
conditions of optimal control. The performance index of
system is equivalent to the energy function of Hopfield neural
network and the Boltzmann machine. It is obvious weight
matrices are symmetric and diagonal elements equal to zero
and also not negative, so the stability conditions of DHNN
(Discrete Hopfield Neural Network) and the Boltzmann
machine is satisfied. The flexible two-wheeled self-balancing
robot based on and the improved Boltzmann machine is
stable. The attitude control problem of flexible robot can be
solved through the improved Boltzmann machine.
M is 64, the control value u (k ) used 64 neurons state to
2

L
is
express
it
in
k
moment.
Since
384( L r * N * M 1 * 6 * 64 384 ), so there are 384
neurons in the network. DHNN and the Boltzmann machine a
384-order network are a 384 neurons of DHNN and the
Boltzmann machine composed of the six-tuple:
(N )
ncm DHN
VG , AG , IF , OF ,WA, OA
and
(N )
ncmBLT
VG , AG , IF , OF ,WA, OA .

through

formulas

Wii 0(i, j 1,2,...,384)

D1
D 2

Di ( Di1, Di 2, , Di * 64) R 1*384
D3
(2 1 ,2 2 , ,2 64 ) R 1*64 (1 i, j 64)
D
Dij

D 4
01*64 i ji j

D5

D6
Step2; Integration: Calculating the integrated input of
N

neuron u j (t 1)

D (t ) I
ij

(v j VG( t ) ) , also is the

i 1

state of inside u i .
Step3; Excitation:

Update

the

state

of

neuron

j (t )
v j V

j (t 1) 1 v j VG( t ) and u j (t ) I j
)
1 v V ( t ) and u (t ) I
j
G
j
j

T
(t ) (1 (t ), 2 (t ),..., N (t )) . The output state of other
neurons
remains
unchanged
(
X j (t 1) X j (t )
(t )
G

determines the subset of working VG(t ) Vi i 1,2,...,384. Wij

W Dij 384*384 and I can be obtained through formulas

W diag ( D T FD ) D T FD
( Wii 0(i, j 1,2,...,384) )

I DT D

D1
D 2

Di ( Di1, Di 2, , Di * 64) R 1*384
D3
(2 1 ,2 2 , ,2 64 ) R 1*64 (1 i, j 64) .
D
Dij

D

01*64 i ji j

D5

D6
Step2; Choose Integration---Excitation unit; Choose BLT
neuron in random v j VG , ( j 1,2,..., N ) .
Step3; Integration: Calculating the integrated input of
N

u j (t )

neuron

W (t ) I
ij

i 1

(t ) ( 1 (t ), 2 (t ),..., N (t )) T , also is the state of inside u i .


Step4; Excitation: Update the state of neuron v j is 1
in p j (t ) (1 exp( j (t ) / T )) . The update Probability
is p j ( j (t 1) 1) (1 exp( j (t ) / T )) .

The running steps of the Hopfield network algorithm:


Step1; Initialization: Let t is zero and determines the subset
of working VG(t ) Vi i 1,2,...,384 . Wij and I can be
obtained

( j 1,2,...,384; j i ) ). Then select another neuron from the


384 neurons to update its state.
(N)
Step4: Conditions stop: if ncm DHNN
is stable and stop work.
Step5: Unconditional transfer: Let t t 1 , determines the
new subset of working VG(t ) and transfer the Step2.
The running steps of the Boltzmann machine algorithm:
Step1; Initialization: T (k ) T0 . Let t and k is zero and

The

method

of

update

network:

If u j (t 1) 0 ,

then j (t 1) 1 . Other if u j (t 1) 0 , then the random


number N R generated uniformly distributed in the interval [0,
0.5], if p j ( j (t 1) 1) N R , then j (t 1) 1 ; else v j is
the original state, also j (t 1) j (t ) .
The output state of others except neuron v j
unchanged,

when

update

the

state

of

remains

neuron v j .

(N )
j (t 1) j (t ) ( j 1,2,...,384; j i ) . The state of ncm BLT
is

(t 1) after exciting.
Step5: Cycle: Replacement of a neuron from 384 neurons to
update its state to repeat the Step1
(N )
Step6: Until the ncm BLT
reaches thermal equilibrium in T (k ) .
Step7: Cooling Metropolis cycle: Choose T (k ) T (k 1) , and
then turn the step2.
(N)
Step8: Conditions stop: if T (k ) is low enough ncm DHNN
or
less acceptable to the state of adequate, output the optimal
solution (TFinal )(TFinal T (k )) and stop work.
The running steps of the improved Boltzmann machine of
Simulated Annealing Algorithm:
Step1; Initialization: Initialize the network weights and given
a random initial value of network neuron V0 .

Step2; Run the Hopfield network, and to search the vicinity


minimum v .
Step3; Compute the energy function of v .
Step4; Run the Boltzmann machine with initial value v .
Step5: Update the state of neuron and Compute the energy
function V .
Step6: Compare the energy function V to the energy function
of v . If the energy function V is small, and let V equal to V0
then turn the step2.
Step7: If the energy function V is great and equal, and
continue to run the Boltzmann machine and so on until the
end.
Step8: v is the State of the global optimum.
Given the same conditions as the Boltzmann machine and
operator, when system reached the stability, then calculated
the state variables and control values.

V = [1 -1 1 1 -1 -1 1 1 -1 -1 1 1 -1 -1 -1 1 1 1 -1 -1 -1 -1 -1 1
1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 1 -1 -1 -1 -1 1 1 -1 -1 1 1
-1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 -1 1 1 1 -1 1 -1 1 -1 -1 -1 1 1
-1 1 -1 1 1 1 1 -1 1 1 -1 -1 1 -1 1 -1 -1 1 1 -1 -1 1 1 1 1 1 -1 1
-1 -1 -1 -1 -1 -1 -1 1 -1 -1 1 -1 -1 1 1 1 1 -1 1 -1 1 -1 -1 1 -1 1
-1 -1 1 1 1 -1 -1 1 1 1 1 -1 -1 1 1 -1 1 -1 -1 -1 1 -1 -1 1 1 -1 1
1 1 1 1 -1 -1 -1 1 -1 -1 1 -1 1 -1 1 1 1 1 1 -1 1 1 1 -1 -1 -1 -1
-1 1 1 -1 1 -1 1 1 1 1 1 -1 -1 1 1 1 1 1 -1 -1 -1 1 1 1 1 1 1 -1 1
1 -1 -1 -1 -1 -1 1 -1 1 1 1 -1 -1 -1 -1 1 -1 -1 -1 1 1 -1 1 -1 1 -1
-1 -1 1 1 -1 -1 -1 -1 1 1 -1 1 -1 1 -1 -1 -1 1 -1 1 1 1 1 1 1 -1 -1
1 1 -1 -1 1 -1 1 -1 1 -1 -1 -1 -1-1 -1 -1 -1 -1 1 -1 -1 1 -1 1 -1
-1 -1 1 1 -1 1 -1 1 1 -1 1 -1 1 -1 1 -1 -1 -1 -1 1 1 1 1 1 1 -1
-1 -1 -1 1 1 1 1 -1 1 1 -1 -1 1 1 1 1 1 -1 1 -1 -1 -1 -1 -1 1 1 1
-1 1 1 -1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 -1 -1 -1 1 -1 -1
1 1 1 -1 1 1 1 -1 1 1 -1 1 -1 1 1]

Table 1 State variables and control values of flexible robot


state

x1

x2

x3

x4

x5

x6

variable
.

x
.

1
.

2
..

x
..

1
..

1.0e-015 *
(0.0001)
1.0e-015 *
(-0.0006)
1.0e-015 *
(-0.0001)
1.0e-015 *
(-0.1111)
1.0e-015 *
(0.0001)
1.0e-015 *
(-0.0001)

1.0e-019 *
(0.0000)
1.0e-019 *
(0.0000)
1.0e-019 *
(0.0000)
1.0e-019 *
(0.0911)
1.0e-019 *
(0.6213)
1.0e-019 *
(-0.0030)

1.0e-018 *
(0.0091)
1.0e-018 *
(0.0621)
1.0e-018 *
(-0.0003)
1.0e-018 *
(-0.1002)
1.0e-018 *
(-0.6834)
1.0e-018 *
(0.0033)

1.0e-016 *
(-0.0010)
1.0e-016 *
(-0.0068)
1.0e-016 *
(0.0000)
1.0e-016 *
(-0.0162)
1.0e-016 *
(-0.1412)
1.0e-016 *
(0.0124)

1.0e-016 *
(-0.0162)
1.0e-016 *
(-0.1412)
1.0e-016 *
(0.0124)
1.0e-016 *
(-0.0099)
1.0e-016 *
(0.2736)
1.0e-016 *
(-0.1297)

1.0e-014 *
(-0.0001)
1.0e-014 *
(0.0027)
1.0e-014 *
(-0.0013)
1.0e-014 *
(0.0418)
1.0e-014 *
(0.3694)
1.0e-014 *
(-0.0305)

1.0e-013 *
(0.0042)
1.0e-013 *
(0.0369)
1.0e-013 *
(-0.0030)
1.0e-013 *
(-0.0129)
1.0e-013 *
(-0.1166)
1.0e-013 *
(0.0081)

In which: U is the control value of robot. xi ( i 1,2,...,6 ) is the state volume of the i step of the robots final six steps (the
infinite time domain is divided into six steps numerous limited time domain). The energy value of network
is E 3.3263e 009 , the performance index is J 1.8367e 028 .
The control values U is the order of magnitude on e-013
from the above table, have a very small amount of control
exist too. As the balance control of biological and people is a
continuous adjustment and maintain process. Instead of
standing motionless, but kept control the balance. Therefore
the control variables of the robot are not completely zero,
there should be a very small control variable.
The upper body angle, upper body angle speed, base angle,
base angle speed, speed and acceleration of robot are the
order of magnitude on e-013 from the above table, have a
very small amount of control exist too, the robot is in the
balance. As the balance control of biological the control
balance of robot is a dynamic process. If all of the variables
were completely zero and standing motionless, it is
inconsistent with the practical and biological characteristics.
So there should be very small variables with the ideal. Since
the other variables are the ideal, the control variables of the
robot are not completely zero. The robots balancing is a
continuous adjustment and maintain process. Because the
robots balancing is a dynamic process not a static point, the

state values of each group neurons are different. Since the


state variables are different, the performance indexes are
also different and relative to the state variables of six steps.
Updating the state variables of neurons to find the stable
variables from the state variables of different neurons finally,
the robots stability is dynamic. The network is the process
from initial state to the steady-state. The improved
Boltzmann machine is used for controlling robots posture
based on study. The speed of network convergence is
increased greatly. So the improved Boltzmann machine not
only improves the speed of network convergence, but also
the accuracy of finding the global optimum.
9. CONCLUSIONS
The paper researches and analyzes the flexible two-wheeled
self-balancing robot in physiology. Considering the lumbar
spine of flexible robot, this paper has realized really flexible
robot. The flexible two-wheeled self-balancing robot is a
complex dynamics system and has highly nonlinear and
coupled characteristics etc. The system dynamic model of
flexible two-wheeled self-balancing robot is built up using

Lagrange and the principle of dynamics. The linear


dynamics model is got and its state-space equations are
established. Make the robot to be controlled easily and
effectively. This paper controls it with LQR algorithm and
analyzes the conclusion of experiment in detail. The stability
of system is proved by the experimental results. Validity and
rationality of the system model is verified through the
performance experiments of the prototype and then the real
robot was done. The improved Boltzmann machine with
successful delivery of the balance control in the robot, the
robot like human being balance control and balance control
study with biological characteristics, self-organizing, and
adaptive characteristics. Simulation experiments show the
effectiveness of the method and proved the stability of
system. The paper provides a theoretical basis for the control
research of flexible two-wheeled self-balancing robot, which
will be a meaningful and value of scientific research
platform. As a complex non-balancing system, the flexible
two-wheeled self-balancing robot provides an object for
research robot system kinematics and dynamics analysis, at
same time, also provides a good experimental subject for
studying the control of research, especially self-organizing
balance control methods and techniques. The research also
supplies theoretic instructions for developing dynamic
control system with flexible two-wheeled self-balancing
robot. It has great significance to design and research for the
flexible robot.
REFERENCES
A arts E H L, Korst J H M. (1989). Simulated annealing and
Boltzmann machine. Chichester: John Wiley and Sons.
Ackley D H, Hinton G E, Sejnow skii T J. (1985). A
learning algorithm for boltzmann machines. Cognitive
Science, p: 147-169.
A. Salerno and J. Angeles. (2003). On the nonlinear
controllability of a quasiholonomic mobile robot. In
Proc. IEEE ICRA, Taiwan, pp. 33793384.
Basher, Hasanul. A. (2007). Modeling and simulation of
flexible robot manipulator with a prismatic joint, In
Conference Proceedings-IEEE SOUTHEASTCON,
IEEE Southeast Con, pp. 255-260
CHEN Ke, XIE Shouzhen, ZHAO Han. (2004). Research on
Optimization Design of Mechanism Based on
Boltzmann Machine [J], Transactions of the Chinese
Society for Agricultural Machinery, Vol.35 No.3
CHEN Wei, YU Yueqing, ZHANG Xuping, et al. (2006).
Dynamic modeling and coupling of underactuated
flexible robot [J]. Chinese Journal of Mechanical
Engineering, vol. 42(6):16-23.
CHEN Wei, YU Yueqing, ZHANG Xuping, et al. (2006).
Dynamic modeling and simulation of underactuated
flexible robot [J]. China Mechanical Engineering, vol.
17(9):931-936.
F. Grasser, A. DArrigo, S. Colombi, and A. Rufer, (2002).
Joe: A mobile, inverted pendulum,IEEE Trans. Ind.
Electron, vol. 49, no.1, pp.107114
Fan Chang-Hong; Chen Wei-Dong; Xi Yu-Geng. (2004). A
neural networks-based approach to safe path planning of
mobile robot in unknown environment: Acta
Automatica Sinica[J], v 30, n 6, Nov, p 816-23

Guan yi-sheng, An yong-chen. (1992). A New Method of


Dynamics of Flexible Robot Manipulators Based on
Kane's Method and Model Analysis [J], Robot, vol,
14(1), p: 45-51
Hinton G E, Sejnow skii T J, A ckley D H. (1984).
Boltzmann machine: constraint satisfaction network s
that learn. CMU-CS-842119, Carnegie-Mellon
University
Jun Tani. (1997). Visual attention and learning of a
cognitive robot, Artificial Neural Networks-ICANN '97,
7th International Conference Proceedings, p: 697-702
JIANG Hui-lan, SUN Ya-ming. Hetero Associative Memory
Hopfield NN Model, Learning Algorithms and
Performance[J], Systems Engineering-theory & Practice.
Vol. 05, 2005, p 101-107
Kane T R, Ryan R R, Banerjee A K. (1987). Dynamic of a
cantilever beam attached to moving base [J]. Journal of
Guidance, Control and Dynamics, vol. 0(2):139-150.
K H Low, M.A Vidyasagar. (1988). Lagrangian formulation
of the dynamic model for flexible manipulator systems
[J].ASMEJ, Dynamic System Modeling and Control,
vol. 110(2), p:175-181
K. Pathak, J. Franch, K. Agrawal. (2005). Velocity and
Position Control of a Wheeled Inverted Pendulum by
Partial Feedback Linearization,, IEEE Transactions on
Robotics, vol. 21, no.3, pp. 505-513.
Kalyoncu, M. (2008). Mathematical modeling and dynamic
response of a multi-straight-line path tracing flexible
robot manipulator with rotating-prismatic joint[J].
Applied Mathematical Modeling, v 32, n 6, p 1087-98
Lendaris, G.G. Mathia, K, Saeks, R. (1999). Linear Hopfield
networks and constrained optimization: IEEE
Transactions on Systems, Man and Cybernetics, Part B
(Cybernetics) [J], v 29, n 1, p 114-18
Li Ming-Ai, Ruan Xiao-Gang. (2003). Optimal control with
continuous Hopfield neural network, Proceedings, 2003
IEEE International Conference on Robotics, Intelligent
Systems and Signal Processing (IEEE Cat.
No.03EX707), vol.2, p: 758-62
Loudini, M. Boukhetala, D. Tadjine, M. (2007).
Comprehensive
mathematical
modeling of a
transversely vibrating flexible link robot manipulator
carrying a tip payload[J]. International Journal of
Applied Mechanics and Engineering, v 12, n 1, p: 67-83
Sadati N, Taheri J. (2002). Solving robot motion planning
problem using Hopfield Neural Network in a fuzzified
environment, PROCEEDINGS OF THE 2002 IEEE
INTERNATIONAL CONFERENCE ON FUZZY
SYSTEMS, VOL 1 & 2 P: 1144-1149
YU Jian-jun, RUAN Xiao-gang. (2005). Linear quadratic
dynamic optimization with Boltzmann machine for
discrete-time system, JOURNAL OF BEIJING
UNIVERSITY OF TECHNOLOGY, Vol.31 No.5
Zou Jian-qi, Su Xin, Zhang Jing-jun. (2007). Dynamic
equation of distributed-parameter of a flexible robotic
arm and its discreteness [J], Journal of Jilin University
(Science Edition), v 45, n 3, p 353-57

You might also like