BALANCED ROBOTICS
BALLBOT
Prototype Design Review
Brian Kosoris, Jeroen Waning, Yuriy Psarev, and Bahati Gitego
10/11/2011
1
Table of Contents
EXECUTIVE
SUMMARY
................................
................................
................................
.......................
2
INTRODUCTION
................................
................................
................................
................................
.
3
SYSTEM OVERVIEW
................................
................................
................................
................................
...
3
MAJOR DEVELOPM
ENTS
................................
................................
................................
...........................
3
MECHANICAL DESIGN
................................
................................
................................
.........................
5
CONCEPTUAL DESIGN AND MODEL
................................
................................
................................
..........
5
SPECIFICATIONS, DIMENSIONS, AND FABRICATION
................................
................................
.................
6
ELECTRICAL DESIGN
................................
................................
................................
...........................
8
COMPON
ENT INTEGRATION
................................
................................
................................
.....................
8
TRADE STUDY
................................
................................
................................
................................
..........
10
CONTROL SYTEM AND MATHEMATICAL MODEL
................................
................................
...............
13
CONTROL SYSTEM THEORY
................................
................................
................................
.....................
15
MATLAB UTILIZATION
................................
................................
................
Error! Bookmark not defined.
ROBOTICS SYNTHESIS
................................
................................
................................
..............................
13
DESIGN REQUIREMENTS
................................
................................
................................
...................
24
PROJECT SCHEDULE
................................
................................
................................
................................
24
BUDGET AND R
ESOURCES
................................
................................
................................
.......................
25
MINIMUM SUCCESS CRITERIA
................................
................................
................................
................
24
CONCLUSION
................................
................................
................................
................................
...
27
REFERENCES
................................
................................
................................
................................
....
28
2
EXECUTIVE SUMMARY
The fundamental principles underlying the concept of the BallBot are similar to that of an
inverted spherical pendulum. The BallBot will consist of a vertical structure mounted to a wheel base
that rests on a ball. The sensors relay information to the moto
rs to drive the wheels in the
corresponding direction with the appropriate amount of acceleration to counterbalance any movement
of the robot’s center of mass.
The concept of the ball

balancing robot is not unique in its general principles. However, once
the minimum success criteria of stability, with minimal external kinematic influence, have been met, the
concept will be extended to a variety of tasks. Possibilities for challenges in improving the function of
the BallBot may include the BallBot’s extende
d planar motion so that it may drive to a designated area
and navigate certain obstacles.
The design and construction of the BallBot will
require a holistic approach of Mechatronics
Engineering. The BallBot is simple and elegant, yet challenging, in its
mechanical and electrical design,
and highly sophisticated in its autonomy. The mathematical approach to the problem solving aspect of
the design requires a moderate amount of intricate control systems theory, programming, and general
physics.
In the Prototype Design Review (PDR) phase, many of the practical hurdles, not recognized in
the System Concept Review (SCR) phase, have led to innovative solutions and a cohesive and unified
effort.
3
INTRODUCTION
SYSTEM OVERVIEW
The BallBot design cons
ists of three major aspects of Mechatronics Engineering.
The design and
fabrication of the overall structure does not require the highest precision and mathematical application,
but the design of the wheel base and axels requires computer aided design (CAD
), geometry,
trigonometry, precise measurements, and mechanical engineering innovation. The manner in which the
wheels control the ball heavily relies on the rigid, well

defined mechanical assembly.
The electronic components are relatively few and simple.
The general concept involves
actuators influenced by inertial and orientation sensors through a sophisticated control system. An
onboard computer communicates with a microcontroller to receive sensory input and translate that into
a forced output to susta
in balance in the opposition to the force of gravity.
The most complex and theoretical component of the BallBot involves the control system and
computational algorithm to interpret the sensory input and calculate an accurate forced response.
The
mathemati
cal approach to the control system design is derived from the technique known as
S
tate

space
V
ariable
M
odeling (SVM).
An alternate mathematical representation of the robots orientation in
3D space is robotics synthesis and analysis. Both revolve around mat
rix manipulation.
MAJOR DEVELOPMENTS
The PDR phase has involved the acquisition of new components and innovative problem solving
techniques. The utilization of an onboard computer, that does the high

level mathematical processing, is
a new idea that emerg
ed in the PDR phase.
4
The idea of an alternate mathematical representation of the robot with rotational matrices is an
innovative solution that also occurred during the PDR phase.
Certain electrical components have been integrated with much success, while
others produced
new concerns, such as the motor performance in relation to the response time.
The mechanical design of the wheel base also required more resources than initially assumed.
As a result, new resources were discovered to manage the requiremen
ts for precision and small
tolerances.
A trade study on one of the key electrical components was conducted in order to become more
familiar with its performance and how it could be manipulated for optimal integration with the BallBot.
5
MECHANICAL DESIGN
CONCE
PTUAL DESIGN AND
MODEL
Fig. 1
–
(a)
Wheel Base
,
(b) compound wheel position
, and (c) wheel housing and motor configuration
The mechanical design involved two pairs of perpendicular motors that drive omni

directional
wheels. The wheels are
required to be at a 45
° angle to the vertical axis of the ball for the control
algorithm to function properly.
As seen in
Fig. 1
, the movement of a coordinated pair of
compound
wheels will determine the direction and acceleration of the ball to oppose any
imbalance.
Fig. 2
–
Vertical structure
As seen in
Fig. 2
, the vertical aluminum structure will consist of a modular design. The five
octagonal plateaus will be adjustable for testing of the sensory integration.
The electronic components
6
will be housed
in this vertical aluminum structure, and the accurate placement of them will be critical.
Hence, the design incorporate
s
modularity.
Fig. 1
also displays four arm

like mechanisms that vertically run down the side of the wheelbase.
This represents the pos
sible addition of landing gear, which will serve as a fail

safe design. It will be
automatically engaged with a worm

screw actuator that is triggered when the BallBot has tiled past a
certain angle (point of no return) where the center of mass has shifted
so much that the system
response can never be adequate to regain stability.
SPECIFICATIONS
, DIMENSIONS,
AND FABRICATION
The structure of the BallBot will be 9x9x24” and will be supported by the wheelbase. The
diameter of the ball is approximately 9.3” an
d thus puts the robot at approximately 28.65” tall.
The span
of the motors will also not be much greater than the 9.3” ball (
+
1.5”), thus the BallBot will have a
compact profile.
The selection of the materials was based off of the required specifications
as follows:
•
Fasteners
–
Aluminum Alloy ¼” D, 3/8” L, Dome head, Mil

spec Rivets
•
Structural 6061 T6 Aluminum
–
Available Locally
–
Very strong for its weight
–
Easy to work with and machin
e

able
–
Available in beams, channels, angles, square and rectangular beams,
pipes, etc
–
U
ltimate tensile strength of at least 42,000 psi (290 MPa)
–
yield strength of at least 35,000 psi (241 MPa)
7
The fabrication process is moving along quite well, and the mechanical build is right on
schedule.
The jig

saw of individual pieces of aluminum for the structure have been cut to specifications,
as seen in
Fig. 3
, and the majority of them have been riveted together with an aircraft grade riveting tool
for strength, rigidity, precision, and aesthetics.
Fig. 3
–
Fabrication progress
The assembly of all the mechanical pieces will be finished soon and represents an
important milestone of the BallBot construction. Once the mechanical structure is finished, it will be
ready to accept the electronic comp
onents, and preliminary testing can be conducted. The preliminary
testing phase is vital to streamlining the remainder of the assembly and optimization of the BallBot
because then many of the problems/revisions will be realized. The earlier the testing pha
se can begin,
the higher chance of success and time for optimization and improvements.
8
ELECTRICAL DESIGN
COMPONENT INTEGRATION
During the PDR phase, some n
ew
electrical c
omponents
have been acquired
and assembled
to
make the BallBot more efficient and 10
0% self

sufficient:
•
Micro ITX gigabyte board
•
High

level CPU to run MatLab
•
Processes integer data from IMU board
•
Runs control algorithm to digest sensor data
•
Provides output to motor controllers
•
A321 batteries x 30 for onboard power supply
•
Provides 12

16.5
V (3

5A) to motors
•
Provides 5V for digital logic (IMU board and CPU)
•
Inertial Measurement Unit (IMU)
•
Arduino ATmega2560
•
IDG500 Gyro
•
ADXL345 Accelerometer
Fig. 4
–
(a) Onboard computer (CPU) and (b) Inertial Measurement Unit (IMU)
9
The next critical task is to enable communication between the CPU and the IMU. The IMU will
work on a low level to receive sensory input data and transmit the pulse

width modulation (PWM) signal
to the motor controllers. The IMU data will be relayed to the
CPU, which will process the data in a
control system algorithm in MatLab, and then the CPU will relay the output data back to the IMU board
to control the motor controllers. The motor controllers will be directly
coupled to the A321 battery pack
for power
and also the IMU board for the PWM signal.
Fig. 5
illustrates the signal/power

management
hierarchy.
Fig. 5
–
Data/power

management hierarchy
One concern that arose during the PDR phase was the performance of the motors. The motors
obtained are high

q
uality geared motors and are very powerful. The fact that they are geared down may
present a problem during the preliminary testing phase. The datasheet of the motor specifies a max
10
5500 RPM (no load), but the internal gears have scaled this angular veloci
ty down to a measured 86
RPM (consuming the recommended 12V).
The gear ratio provides an extremely high torque, and thus
the motors are more designed for robotic manipulator arms and not for rapid acceleration and high

speed. The perfect balance between to
rque and angular velocity can be calculated when the mass of the
robot is determined, but only the preliminary testing phase will truly tell.
Another component of the electrical design that required more research was the ADXL345
accelerometer. The BallBot
will require a fast rate of data processing for it to balance vertically without
restraint like the inverted spherical pendulum model (discussed
in the section ‘Control System and
Mathematical Model’).
This concern thus leads
to the following trade study
.
TRADE STUDY
Fig. 6
–
IMU schematic
Fig. 6
depicts the composition of the sensory components of the IMU board, and it can be seen
that the accelerometer is a crucial component.
The ADXL345 accelerometer will provide inertial data as
the BallBot sways like a 3D pendulum in
regards
to
the Earth’s
gravity.
The acceleration of Earth’s gravity
is approximately 9.81 N/m
2
and the BallBot must process its orientation many times very seco
nd to
avoid toppling over.
11
The datasheet of the ADXL345 indicated a method of varying the bandwidth (and data
resolution) by introducing a capacitive
band

limiting
filter. The filter will reduce noise (anomalous data
readings) and decide the amount of dat
a readings taken every second by the ADXL345.
The ADXL345 has
a variety of pins where three are the X,
Y, and Z axis.
When a capacitor is added to each of these output
pins, the output signal bandwidth is altered.
The maximum bandwidth for the X and Y outp
ut pins is
1650 Hz (or 1650 data readings/second), and 550 Hz for the Z pin.
The equation for determining the appropriate capacitive element is as follows:
•
Eq. 1
Eq. 1
can be approximated to:
•
Eq. 2
As a result of the calculations for each capacitor to yield the desired 1650 Hz and 550 Hz, the values for
the capacitors will need to be:
•
Cx = Cy = 0.00303
μ
F
•
Cz = 0.0091
μ
F
They will be soldered to the ADXL345 to resemble the schematic
in
Fig. 7
(which is
Fig. 10
in the
ADXL345 datasheet)
.
Fig. 7
–
ADXL345 capacitor
band

limiting
filter arrangement
12
Another critical aspect of the IMU that was determined from the trade study is how it will need
to be oriented in the BallBot. The Z

pin o
n the ADXL345 will yield the lowest bandwidth
(data reading
frequency). The axis of the BallBot that will be least affected by fluctuations in gravity and experience
the least amount of angular momentum/velocity is the axis that runs vertically from the ba
ll to the top
of the BallBot (which has been defined to be the Z

axis of the BallBot).
The datasheet of the ADXL345 has provided a large amount of critical information to prevent
many problems that may have occurred in the future. For example, the sensit
ivity of the ADXL345 is
proportionally related to the supply voltage:
•
V
S
= 3.6 V

output sensitivity = 360 mV/g
•
V
S
= 2 V

output sensitivity =195 mV/g
With the Arduino
ATmega2560’s 3v3 pin supplying 3.3V, it is estimated that the output sensitivity will be
somewhere within the range of 320 mV/g and 340 mV/g (most likely 330 mV/g).
The ADXL345 can withstand up to 10,000g before being damaged, and hopefully it will not b
e of
any concern!
Fig. 8
–
Output sensitivity of each axis (V/g vs. % population)
13
CONTROL SYTEM AND MATHEMATICAL MODEL
ROBOTICS SYNTHESIS
The method used to control the BallBot’s
orientation in 3D space will most likely be derived
from controlled system theory; more specifically, we will use State

space Variable Modeling (SVM
–
discussed in the next section), but an alternate approach to modeling the system mathematically and
mani
pulate the sensor data is to throw it into a rotational matrix. The rotational matrix corresponds to
the dot products of the position vectors of the robot. The position of the BallBot in equilibrium is
represented as [0, 0, 1]
T
which indicates that the Z a
xis runs from the center of the ball (axes of rotation)
to the top of the BallBot. The position vector that will be compared to this equilibrium position can be
derived by the following 3x1 matrix:
[
∫
∫
∫
]
Eq. 3
The
angular velocities
ω
ψ
, ω
ϕ
, ω
θ
of the BallBot are derived from the Euler angles
θ, ψ,
ϕ
and
represent the angles of rotation about the respective X, Y,
and Z axes. In order to visualize this concept,
Fig
. 9
illustrates
the possible orientation changes of the BallBot in 3D.
The Euler angles represent the
orientation difference between the reference frame (
frame 0) 0
0
X
0
Y
0
Z
0
and the frame that is constantly
changing due to the BallBot’s swaying
motion
(frame 1) 0
1
X
1
Y
1
Z
1
.
14
Fig. 9
–
Relationship between Frame 0 and Frame 1
with
respect to their corresponding Euler angles
The position vectors are input into a rotational
matrix and the dot products of the vectors’
components make up the elements of the matrix.
The rotational matrix will be composed of these dot
products as follows:
Eq. 4
15
CONTROL
SYSTEM THEORY
In the following section, a mathematical model of a spherical inverted pendulum will be modeled. The
modeling process will
rely on the Euler

Langrange method. The Lagrange method model the motion of
the inverted spherical pendulum by relying on the energy property of mechanical systems. Before
describing the energy equation, the reference position is defined as well as the re
ference velocity with
respect to a generalized coordinate system, as depicted in
Fig. 11
. The initial assumption is that the
angle the spherical inverted pendulum model makes with the z

axis is small and the inverted pendulum
is closer to the stability con
dition. With this assumption, the inverted pendulum can be decoupled into
two single degree of freedom spherical inverted pendulums. With the aforementioned approach, two
identical mathematical models for the inverted pendulum motion are designed in the XZ
, and ZY plane
respectively. The mathematical model will also take into account the interaction between the driving
motor and the spherical ball to achieve stability of the whole model
Fig. 12
. Now for the derivation of
our mathematical model, it is assume
d that the angle
θ
between the spherical ball and the define z axis
is zero at time
t
= 0
s. (
Fig. 11
) With the assumption that the angle
θ
= 0, position vector is defined as
follows:
Fig
1
0

Projection of an inverted
spherical wheel pendulum into a single
plane
16
θ
Eq.
5
(
̇
̇
)
(
θ
̇
)
Eq. 6
Eq. 7
(
̇
̇
)
θ
̇
Eq.
8
x = position on the z axis at any given time.
z = position on the z axis at any given time.
Xsw = x position of the center of the
spherical wheel with respect to the XZ axis.
Zsw = z position of the center of the spherical wheel with respect to the XZ axis .
Zb = verticle distantace from the X referance coordinate to the mass of the body.
Rsw = Radius of the spherical Wheel.
L = l
ength of the body from spherical mass center to body mass center.
θ
= angle between a plane parallel to the Z

axis and a define position on the spherical ball.
ϕ
= angle between the inclination of the body at center mass Mb with the z axis.
With the posit
ion and velocity vector defined; the next step will be deriving and defining the kinetic and
potential energy of the system. To define the energy equation, the energy will be divided into three
components, translational kinetic energy T1, rotational kinet
ic energy T2, and potential energy U.
The translational, rotational and potential energy of the system are defined as follow:
17
(
)
(
(
̇
̇
)
(
)
(
̇
̇
)
)
Eq.
9
(
)
θ
̇
(
)
̇
(
)
θ
̇
(
)
θ
̇
Eq. 10
(
)
θ
̇
(
)
̇
(
)
(
)
(
θ
̇
̇
)
Eq. 11
Eq.
12
From
Eq.
9

12
:
= mass of the spherical wheel.
= mass of the body
Inertial moment of the spherical wheel
= inertial moment of the body (pitch) wit
h respect to the body center of mass
= inertial moment of the wheels.
Eq. 9
describes the translational kinetic energy of the spherical inverted pendulum system
.
I
n the
equation, the translational kinetic energy of the
ball and the body
are given with t
his equation.
Eq
.
10

11
describe the rotational kinetic energy of the spherical ball, the body pitch angle, and finally the
rotational kinetic energy of the wheel connected to the motors is also provided into the model.
18
Knowing that the wheel and the spherical ball shares the same velocity at the point of contact leads to
the following simple relationship
θ
̇
θ
̇
. From this simple equation, it can be shown
that
θ
̇
θ
̇
. Further substitution c
ould be applied to
Eq. 11
by replacing
θ
̇
θ
̇
̇
, and applying the described substitution in t
he
Eq.
10
result in
Eq.
11
.
Now that the Energy equation has been derived, the LaGrange function L will be defined.
The
Lagrangian L is defined as follow:
The radial angle θ and
ϕ
are the generalized coordinates. The Lagrange equation can be expressed as
follow:
(
θ
̇
)
(
θ
)
θ
Eq
.
13
Fig. 11

Projection of Inverted
Spherical Pendulum into
respective Plane
19
(
̇
)
(
)
Eq. 14
By computing Lagrange equation depicted in
E
q
.
13
and
Eq. 14
, the following results are obtained.
[
]
θ
̈
[
]
̈
̇
θ
Eq
.
15
[
]
θ
̈
[
]
̈
Eq. 16
With k being equals too
.
Considering the dc motor torque and viscous friction, the following force equation can be derived:
θ
̇
θ
̇
θ
Eq. 17
θ
̇
Eq. 18
Eq. 17
and
Eq. 18
states
that the force in the generali
zed coordinate systems is equal
to the induced
torque in the dc motor minus the frictional forces.
Fig. 12

Spherical Wheel and DC Motor
20
= represent torque constant
θ
̇
= the angular velocity of the dc motor. Can also be expressed as follow
s:
θ
̇
θ
̇
̇
= dc motor current
= internal friction of a dc motor
= frictional force between the ball and the motor.
Eq. 17
and
Eq. 18
express
torques as a function of cu
rrent.
T
his cannot be appl
ied
to motor control
directly because this motor is
control by pulse

width modulation
(PWM)
.
T
o account for this,
an
attempt
is made
to represent the torque as a function of voltage by drawing upon the dc motor equivalent
circuit.
The dc motor can be expressed as follow
s
:
θ
̇
= dc motor in
ternal inductance
= dc motor back emf constant
Assuming the motor inductance to be negligible and approximately zero
,
the current could be
approximated as follow
s
:
(
θ
̇
̇
)
Eq. 19
The generalized forces in Equation 13 and Equation 14 can be
express directly with voltage components
by substituting Equation 15 for each current component in both equations. The final equation takes on
the following form:
21
θ
̇
̇
θ
Eq. 20
θ
̇
̇
Eq. 21
(
)
Now that most of the factor
s
have been accounted for in
the mathematical model
,
the
next step will be
expressing the
forces equation in state space notation. To accomplish this feat, motion equation
is
linearized
at a balance position
.
F
irst, the l
imit as
is considered.
A
lso the
second order terms like
̇
are neglected
.
Applying the stated method to
Eq. 15
and
Eq. 16
the following
is obtained
:
[
]
θ
̈
[
]
̈
θ
Eq. 24
[
]
θ
̈
[
]
̈
Eq. 25
Equation 20 and Equation 21 can further be expressed in the following notation:
[
θ
̈
̈
]
[
θ
̇
̇
]
[
θ
]
Eq. 26
[
]
[
]
[
]
[
]
22
Next step in the state space modeling process will be defining
X
as a state, and
U
as the input
. Next
,
X
and
U
are expressed
as follow
s
:
[
θ
θ
̇
̇
]
Eq. 27
Usin
g
Eq. 26
,
state equations
are derived
as follow
s
:
̇
Eq. 28
[
]
,
[
]
[
]
Eq. 29
[
]
23
[
]
[
]
[
]
[
]
[
]
24
DESIGN REQUIREMENTS
PROJECT SCHEDULE
The major milestones that will be required during the next phase of the design are as follows:
•
The mechanical structure
must be completed by October 20
th
, 2011
•
Electronics can then be integrated into assembly (October 27
th
)
•
Arduino and MatLab communication algorithm (November 2
nd
)
•
Begin preliminary testing (October 27
th
–
November 10
th
)
•
Finalize complete algorithm (November
16
th
)
•
Optimization, aesthetics, minor revisions (November 27
th
)
MINIMUM SUCCESS CRITERIA
To start, the minimum success criteria will be for the BallBot to maintain equilibrium. What is
meant by this is that the BallBot must remain in a balanced, stable,
and vertical position by acquiring
inertial input and providing the required forced response to the motors.
If these minimum success criteria are met, there are limitless avenues for improvements and
optimization. The BallBot may be able to eventually na
vigate obstacles and head for a certain area. The
BallBot may perhaps drive over bumps and ramps to demonstrate stability in the Z

axis. There are
unlimited task possibilities for the BallBot as long as the minimum success criteria are met first.
25
BUDGET
AND RESOURCES
Table 1
breaks down the components and materials required by the build.
Table 1
–
Bill of Materials
Item
Quantity
Price/Item
Item
SubTotal
ADXL345 Digital Accel
2
$12.11
$24.22
Johnson DC Motors
6
$30.00
$180.00
1660 Tip Point
Solderless
Board
1
$17.95
$17.95
IDG 500
1
$29.99
$29.99
Logic Level Converter
4
$10.60
$42.40
A123 18650 1AH LiFePO4
battery
30
$2.60
$78.00
Gigabyte motherboard
1
$119.99
$119.99
WD 250 GB HD
1
$39.99
$39.99
DDR3 4GB Memory
1
$19.99
$19.99
20"
monitor for testing
1
$79.99
$79.99
500w AC power supply
1
$25.58
$25.58
160w DC

DC ATX PSU
1
$58.91
$58.91
Arduino ATmega2560
1
$36.84
$36.84
Omni wheels
4
$17.22
$68.88
Aluminum stock
1
$70.00
$70.00
Riveting Tool
1
$75.00
$75.00
mITX Enclosure
1
$51.77
$51.77
Total:
$1,019.50
Fig. 13
shows some extraneous facilities to be used for a variety of machining tasks. One example of
parts that will be required to be machined there are the wheel axles. They require the precision of a
computerized lathe, which was available in this workshop.
26
Fig. 13
–
Additional facilities
27
CONCLUSION
The PDR phase has yielded significant productivity. Many problems arose during the fabrication
and extensive design process, but through innovation and collaboration, creative solutions were
formulated. Ma
ny new items were acquired during the PDR phase as well and will improve the
performance of the BallBot. The trade study that was conducted yielded useful information that lead to
the discovery of how to optimize a certain aspect of the design.
The mechanical design is well on its way but needs to be finished within the next two weeks.
When the mechanical design is finished, the electrical components can be integrated, and the BallBot
can begin to be fully assembled. When the BallBot assembly is
complete, the preliminary testing phase
can begin and many problems with the control system and balancing algorithm can be detected early.
With the significant productivity during the PDR phase, the project is so far on schedule and ready to go
into the CD
R phase.
28
REFERENCES
•
Arduino
–
microcontroller (libraries/tutorials)
•
www.arduino.cc
•
SparkFun
–
sensors/electronics (datasheets)
•
www.sparkfun.com
•
MatLab resource (control s
ystem toolbox, etc.)
•
http://www.mathworks.com/matlabcentral/fileexchange/23931
•
SolidWorks helpfile
•
http://help.solidworks.com/2012/English/SolidWorks/sldworks/r_welcome_sw
_online_help.htm
•
Robot Modeling and Control (textbook)
•
Control Systems Engineering (textbook)
Comments 0
Log in to post a comment