Anda di halaman 1dari 7

Auto-Balanced Robotic Bicycle (ABRB)

ECE-492/3 Senior Design Project


Spring 2009
Electrical and Computer Engineering Department
Volgenau School of Engineering
George Mason University
Fairfax, VA

Team members:
Aamer Almujahed, Jason Deweese, Linh Duong, and Joel Potter
Faculty Supervisor: Dr. Gerald Cook

Abstract:
Most robots require a wide wheel base and a minimum of three points in contact with the ground to maintain
stability. However, by using physical concepts such as torque, inertia, conservation, and acceleration, we can
manipulate the forces acting on a robot in much the same way that a tightrope walker uses a balance pole. These
forces can be used to offset the effects of gravity or other external disturbances in order to balance a robot.
Following this concept, the goal of this project was to build a two-inline-wheel robot capable of balancing itself
using a reaction wheel. This robotic bicycle is able to drive and also come to a complete stop without losing its
balance. In order to maintain stability, the robot reads sensor input to detect tilt angle and correctly reacts to
maintain a steady vertical position. Sensor data is fed into a control system which outputs a stabilizing torque to a
motor spinning the reaction wheel.
1. Problem statement
Autonomous vehicles have long been an area of expansion and ground breaking research. Breakthroughs are
constantly being made in sensor technology and automation that enable the creation of more useful robots.
However, one major limitation of automated vehicles is in the area of stability. Most robots require a wide wheel
base and a minimum of three points in contact with the ground to maintain stability. Increasing the number of
wheels on a robot reduces the efficiency of the drive system by adding weight, increasing friction or drag, and
increasing power draining components. The Auto-Balanced Robotic Bicycle (ABRB) offers a new way to
circumvent these limitations. By using only two in-line wheels, the ABRB reduces both weight and width without
sacrificing stability.
2. Approach
The law of conservation of momentum states that if no external torque is exerted on an object or system, the net
angular momentum of that object will be conserved. Satellites use this concept for attitude control by the use of
reaction wheels. If the satellite needs to adjust its attitude, it applies a torque on the reaction wheel causing it to

accelerate. The reaction wheel in turn, applies an equal amount of torque on the satellite in the opposite
direction. The torque that the reaction wheel applies, spins the satellite and adjusts its attitude. Similarly, to a
satellite, our robotic bicycle contains a reaction wheel and uses it to maintain its balance. A motor exerts a torque
on the reaction wheel, which in turn exerts an equal amount of torque back on the bicycle. By careful control, this
action-reaction combination can balance the bicycle. A control system accepts the robots tilt angle as feedback
and outputs a torque on the reaction wheel to drive the entire system to a vertical position. Because of the
importance of detecting the tilt angle in the balancing control algorithm, an accurate and precise method is
required to measure the angle.
The ABRB consist of two primary subsystems. The first subsystem is responsible for maintaining the balance of
the vehicle, whereas the second subsystem controls the mobility (Figure 1).

Figure 1: Top-level system decomposition


2.1 Mechanical Design
The design of the ABRB closely resembles a low riding scooter. The goal was to optimize space for electronics,
while maintaining rigidity in the entire frame as shown in Figure 2. The front wheel was intentionally fixed so the
robot could drive through only a straight line, and rely only on a control mechanism to balance itself. The wheels
of the vehicle were 12-inch bicycle wheels and the drive train was implemented with two pulleys and a timing
belt. The reaction wheel was the most important component of the mechanical design. A careful balance of mass
vs. moment of inertia was also very critical. In order to attain a high moment of inertia while minimizing the
overall mass, the wheel needed to have the majority of its mass concentrated at the outer edge. The final
reaction wheel we selected was custom machined of steel with a diameter of 8 inches and mounted
perpendicularly in the middle of the bicycle.
2.2 System Model
The control for the balance system of the ABRB is modeled as an inertia wheel pendulum (Figure 3).

Figure 2: Bicycles mechanical frame design

q2

m2, I2

l1
m1, I1

lc1
q1

H: "Home" pivot point.


m1: Mass of the pendulum including motor.
m2: Mass of the reaction wheel.
l 1:
Length of the pendulum.
l2:
Distance to the center of mass.
I1:
Moment of inertia of the pendulum.
I2:
Moment of inertia of the wheel.
q1: Angle of the pendulum.
q2: Angel of reaction wheel.
:
Torque applied by motor on the wheel.

Figure 3: Inverted pendulum model


The total kinetic energy of this system is written as:
The total potential energy of this system is written as:
Using the Euler-Lagrangian equations, the following two equations are derived:

The torque provided by the motor is a function of the applied voltage and the angular velocity of the motor shaft.
Therefore:
where: V - voltage provided by an external power source, R A - motor's armature resistance, and K E q 2 - reverse
emf from the motor. Combining these equations results in the following plant model:
V

KT
-----RA

+
-

1
-----I2

..
q1

A
-----I2

..
q2

+
..
q2
Bg
-----s2 I2

KE

.
q2

1
-----s

A and B are constants calculated from the following equations and allow to simplify the system as follows:

..
q1

1
-----s2

In the above diagram:

q1

1
-----s

..
q2

Where C and D are defined as:

With the plant model, we combine our control system and transfer function as depicted in Figure 4.
q1 ref

Kp1
-

+
-

..
q1

.
q2

KD2 + sKDD2

1
-----s2

q1

G
-----s

sKD1

Figure 4: Complete system and transfer function including feedback


The gains of the system were found using classic control system analysis. We found that K DD2 was unnecessary
and could be fixed to zero. The values empirically found for the other three gains were K p1 = 3, K D1 = 30, K D2 = 32.
However, these values can vary depending on how the bike is to be balanced (smooth, etc.).
2.3 Gyroscopic Drift Compensation
Accurately obtaining the feedback signals in the control system is key to successfully balancing the ABRB. A
gyroscope offers a very fast angular velocity reading, however, the round-off errors from digital integration can
cause the position output to "drift" over time. To compensate for this drift, the error between the raw tilt form
the gyroscope and the absolute tilt from the inclinometer was used. The compensated tilt output is shown in
Figure 5. In this system, the gains K G and K I are used to adjust both the gyroscope and inclinometer to the same
base units. By empirically testing the outputs from both sensors at the same angle of tilt, the ratio of gyroscope
and inclinometer outputs can be determined. For the system described herein, the ratio was found to be
approximately 10/17. By setting K G to 1.7, the absolute tilt and the raw tilt can be summed. K E represents the
dependence of the compensated angle on the gyroscope and should be a value between 0 and 1. A smaller value
of K E causes the compensated tilt to rely more on the gyroscope than on the inclinometer. In the system
described here, a K E of 1/25 provided smooth and reliable operation.

Gyroscope

KG

Raw Tilt

_
+

KE

_
Inclinometer

KI

Absolute Tilt

Figure 5: Gyroscopic drift compensation

Compensated
Tilt

3. Integrated system
There are six components and assemblies mounted in separate locations on the chassis of the ABRB. The primary
controller is mounted above the battery rack. The inclinometer for reading the absolute tilt is mounted on the
floor of the bicycle beneath the reaction wheel. The MD03 motor driver which controls the power and direction of
the balancing motor is also mounted onto the floor of the vehicle, beneath the drive motor.

Figure 6: Controller, motor driver, and gyroscope boards


The balancing motor was securely attached to the ABRBs upright mast just high enough for the reaction wheel to
clear the deck. Because this is a very heavy component, it was desirable to mount it as low as possible. The
balance system also incorporated several readouts for human operation. These different displays and controls
are assembled on the easily accessible top deck. The overall balancing system circuitry is shown in Figure 7.

Figure 7: Balancing system circuit


The design includes: a Motorola's M68HC11 microcontroller, a Pittman 14604 30.3 V DC motor with an
incremental optical encoder (E30) and planetary gearbox (G42) with a 24:1 gear ratio. The E30 incremental optical
encoder provides a 2-channel quadrature output. To convert this quadrature output to a number usable by the
microcontroller, a 24-bit dual-axis quadrature counter with digital filtering of the input clocks and programmable

count modes (LS7266R1) was implemented. Because of the constantly changing direction of the motor during
balancing, an H-bridge with a high voltage tolerance was required to handle the back emf. This was found in the
MD03: a 20 A, 24 V DC motor driver from Devantech. The ADIS16209 inclinometer was used to detect ABRB
vertical misalignments. In order to get a fast angular velocity reading, the team chose the ADXRS401. This
gyroscope offers high vibration rejection over wide frequency and absolute rate output for precision applications.
Additionally, an NHD-0420DZ LCD display was essential for debugging and viewing system outputs.
The drive system of the ABRB uses a simple on-off controller. The inputs from the ultrasonic range finders alert
the control system to the presence of an obstruction, to which the control system responds by simply turning off,
or braking the motor. The vehicle also boasts two ultrasonic sensors. One is located at the front of the vehicle,
and one at the back. These sensors output an analog signal roughly proportional to the distance of the closest
object in range. The drive system is controlled remotely via an IR LED mounted on a hand-held controller. An IR
receiver counts the rising edges observed in a 50 ms period and based on the frequency of the signal (the number
of edges counted) sends a forward or reverse command to the drive motor. When the number of signals is below
the minimum expected number, the drive motor stops.
The drive system features a board mounted above the balancing motor (Figure 8). The drive motor is mounted
above the balance system H-bridge just in front of the rear wheel. The drive linkage consists of a 14-tooth pulley
and a 48-tooth pulley attached via a 220-tooth timing belt. This linkage increases the gear ratio of the drive train
from 10:1 to 480:14 or 34.29:1.

Figure 8: Drive system schematics, circuit board and motor

The drive system required two microcontrollers: 1) the AVR ATmega32 from Atmel for the more complex driving
control logic and 2) an AVR ATtiny25 also from Atmel to create and send the control signals from the hand-held
remote control. The drive motor was a Pittman 8712 brushed DC motor with a 10:1 spur gear box (G35) and an
optical encoder (E22). The gear ratio was further stepped up to 34.29:1 with two pulleys and a timing belt. An
MCP1404 high-speed power driver from Microchip was selected as a motor driver. Other major components
included: LV-MaxSonar-EZ3 ultrasonic sensors, TSAL6200 IR transmitter and TSOP85338 IR receiver.
4. Conclusions
The ABRB has been successfully completed and tested. We found it performing very well through a number of
tests where small disturbances in vertical alignment were introduced. It can drive forward, backwards, and stop
on a command while maintaining its vertical position. The robot was given to the ECE Department for Open House
demonstrations.

Anda mungkin juga menyukai