Self Balancing Two-Wheel Locomotive
Self Balancing Two-Wheel Locomotive
LOCOMOTIVE
Chapter 1
Introduction
1.1 Background
In the past decade, mobile robots have stepped out of the military and industrial settings,
and entered civilian and personal spaces such as hospitals, schools and ordinary homes. Many
of these robots for civil applications are mechanically stable, such as AIBO, the Sony robotic
dog, or four-wheel vacuum cleaners. Segway personal transport is a self-balancing two [1]
wheel vehicle. This vehicle has been deployed for law-enforcement, tourism, etc. Without the
sensory capability and intelligent control that accompany Segway [2], the Segway can never
stay upright.
While Segway may has been a well-known commercial product, research into the control of
such a mechanical system has been diverse. A two-wheel self-balancing robot is very similar
to the inverted pendulum [3], which is an important testbed in control education and research.
The design, construction and control of a two-wheel self-balancing robot is implemented. The
robot is driven by two Stepper motors, and is equipped with an Arduino Nano board which is
based on the ATmega328 processor, a 3-axis gyroscope and a 3-axis accelerometer for angle
determination. To compensate for gyro drifts common in Commercial off-the-shelf (COTS)
sensors, a complementary filter is implemented [4]; for a single-axis problem such as this
balancing robot, the complementary filter approach is significantly simpler than the Kalman
[5] filter. Two control designs based on the linearized equations of motion is adopted a
2
proportional-integral- differential (PID) [6] control, and a proportional-integral proportional-
differential control based on linear-quadratic regulator (LQR) [7] design.
Mobile robots are increasingly implemented today and are used in a variety of different
applications, including exploration, search and rescue, materials handling in hazardous area
and entertainment. While legged robots are able to step over obstacles, they are more complex
to design and control due to the greater number of degrees of freedom. Wheeled robots are
more energy efficient, tend to have a simpler mechanical structure, as well as simpler dynamics
compared to that required by legged robots to make contact with the ground and provide a
driving force. Robots with at least three wheels can achieve static stability, further simplifying
dynamics. The inverted pendulum system is naturally unstable. Therefore, a suitable control
system technique and method needs to be investigated to control the system. The two-wheel
balancing robot is an application of the inverted pendulum that requires a controller to maintain
its upright position. To achieve this, a controller needs to be designed and implemented such
as to balance the inverted pendulum.
3
1.4 Methodology of the project
To carry out the project the following methodology has been implemented
4
Chapter 2
Literature Survey
The two-wheel automobile is inherently unstable. It is similar to classical control
system problem of inverted pendulum. A lot of work has been carried out on the topic of self-
balancing robots. The system depends on the structure of the bot and hence a variety of problem
cases arise from the different combinations.
Hau-Shiue Juang and Kai-Yew Lum [2013]: This paper reports [9] the design, construction
and control of a two-wheel self-balancing robot. The system architecture comprises a pair of
DC motor and an Arduino microcontroller board; a single-axis gyroscope and a 2-axis
accelerometer are employed for attitude determination. In addition, a complementary filter is
implemented to compensate for gyro drifts. Electrical and kinematic parameters are determined
experimentally; PID and LQR-based PI-PD control designs, respectively, are performed on the
linearized equations of motion. Experimental results show that self-balancing can be achieved
with PI-PD control in the vicinity of the upright position.
5
inaccuracy modelling because of system linearization based on LQR, and also has the self-
turning mechanism without great computation load which the NN method brings.
Experiments show that the balance controller based on LQR-NN has better balancing control
to the robot and also improved the system’s robustness significantly.
Koos van der Blonk[2014]: Traditional wheeled mobile robots are equipped with two
independent driving wheels. Since these robots have two degrees of freedom (DOFs), they can
rotate about any point, but cannot perform immediate motion in every direction. To overcome
this type of motion limitation, omnidirectional mobile robots were proposed. They can move
in an arbitrary direction without changing the direction of the wheels, because they can achieve
three DOF-motion on a two-dimensional plane. A special kind of such a robot is a Ball-
Balancing Robot (BBR) [10]. This system is inherently unstable, as it will immediately fall
down when no active control is applied to the wheels on the ball.
6
Chapter 3
GYROSCOPE
The gyroscope [13] is the sensor which can measure the angular velocity of the
balancing robot, and send the data to the development board. Theoretically, integrating the
angular velocity will yield the angle θ directly; however, this process will also integrate noise
in the gyroscope measurement. As a result, the value of θ will diverge.
ω = dθ / dt …(3.1)
θ = ∫ ω𝑑𝑡 …(3.2)
7
θ = ∫ 𝑠𝑐𝑎𝑙𝑒𝑑 𝑔𝑦𝑟𝑜 𝑑𝑎𝑡𝑎 𝑑𝑡 …(3.3)
Angle of rotation = ω (scaled gyro data) *dt (in sec) + angle of rotation
ACCELEROMETER
The accelerometer [14] measures the total external acceleration of the balancing robot,
which includes the gravitational and motion accelerations. Following the direction cosine
method, one can use the X- and Z-axis gravitational acceleration measurements to calculate the
tilt angle θ. Although this method gives θ quickly, it can be easily influenced by external forces
and noise. Ax, Ay, Az are accelerations in x, y, z directions respectively.
𝑨𝒙𝟏
Pitch = α = arctan ( 𝟐 ) … (3.4)
(𝑨𝒚𝟏 ) +(𝑨𝒛𝟏 )𝟐
8
3.3 Angle Estimation and Balancing
The system architecture of the self-balancing robot comprises of the forward loop, the
robot, a balancing controller which delivers a motor-control Signal. Feedback is provided
through a complementary filter whose function is to provide an estimate of the robot tilt angle
from gyroscope and accelerometer measurements. In the following sections, the working
complementary filter and the balancing controller is explained.
9
3.3.2 Need to use complementary filter
The gyroscope and accelerometer have their own strengths and weaknesses. The
calculated tilt angle from the accelerometer data has slow response time, while the integrated
tilt angle from the gyro data is subjected to drift over a period of time. In other words, the
accelerometer data is useful for long term while the gyro data is useful for short term. One of
the simplest ways to combine the data from the gyro and the accelerometer is by using the
complementary filter. Complementary filter is designed in such a way that the strength of one
sensor will be used to overcome the weakness of the other sensor which are complementary to
each other.
1. make use of the integrated angle from the gyro over a short period
2. The low pass filtered data from the accelerometer to correct the drift of the angle over
a long period of time.
This will result in a drift free and fast responding estimated tilt angle.
Where,
T = time constant
Δt = Sampling rate
10
3.4 Proportional Integral and Derivative Theory
3.4.1 Responses
PROPORTIONAL RESPONSE
The proportional [6] component depends only on the difference between the set point
and the process variable. This difference is referred to as the error term. The proportional aim
(Kc) determines the ratio of output response to the error signal. For instance, if the error term
has a magnitude of 10, a proportional gain of 5 would produce a proportional response of 50.
In general, increasing the proportional gain will increase the speed of the control system
response. However, if the proportional gain is too large, the process variable will begin to
oscillate. If Kc is increased further, the oscillations will become larger and the system will
become unstable and may even oscillate out of control.
INTEGRAL RESPONSE
The integral component sums the error term over time. The result is that even a small
error term will cause the integral component to increase slowly. The integral response will
continually increase over time unless the error is zero, so the effect is to drive the Steady-State
error to zero. Steady-State error is the final difference between the process variable and set
point. A phenomenon called integral windup results when integral action saturates a controller
without the controller driving the error signal toward zero.
DERIVATIVE RESPONSE
The derivative component causes the output to decrease if the process variable is
increasing rapidly. The derivative response is proportional to the rate of change of the process
variable. Increasing the derivative time (Td ) parameter will cause the control system to react
more strongly to changes in the error term and will increase the speed of the overall control
system response. Most practical control systems use very small derivative time (T d ), because
the Derivative Response is highly sensitive to noise in the process variable signal. If the sensor
feedback signal is noisy or if the control loop rate is too slow, the derivative response can make
the control system unstable.
11
Figure 2: PID Block Diagram
The process of setting the optimal gains for P, I and D to get an ideal response from a
control system is called tuning [6]. There are different methods of tuning of which the “guess
and check” method and the Ziegler Nichols method or the root locus method
The gains of a PID controller can be obtained by trial and error method. Once an engineer
understands the significance of each gain parameter, this method becomes relatively easy. In
this method, the I and D terms are set to zero first and the proportional gain is increased until
the output of the loop oscillates. As one increases the proportional gain, the system becomes
faster, but care must be taken not make the system unstable. Once P has been set to obtain a
desired fast response, the integral term is increased to stop the oscillations. The integral term
reduces the steady state error, but increases overshoot. Some amount of overshoot is always
necessary for a fast system so that it could respond to changes immediately. The integral term
is tweaked to achieve a minimal steady state error. Once the P and I have been set to get the
desired fast control system with minimal steady state error, the derivative term is increased
until the loop is acceptably quick to its set point. Increasing derivative term decreases overshoot
and yields higher gain with stability but would cause the system to be highly sensitive to noise.
Often times, engineers need to trade-off one characteristic of a control system for another to
better meet their requirements.
The Ziegler-Nichols method is another popular method of tuning a PID controller. It is very
similar to the trial and error method wherein I and D are set to zero and P is increased until the
12
loop starts to oscillate. Once oscillation starts, the critical gain Kc and the period of oscillations
Pc are noted. The P, I and D are then adjusted as per the tabular column shown below.
Control Kp Ki Kd
P 0.5Kc - -
PI 0.45Kc Pc/1.2 -
13
3.6 WORKING OF I2C BUS PROTOCOL
First, the Microcontroller (MCU) will issue a START condition. This acts as an
‘Attention’ signal to all of the connected devices. All ICs on the bus will listen to the bus for
incoming data. Then the MCU sends the ADDRESS of the device it wants to access, along
with an indication whether the access is a Read or Write operation. Having received the
address, all ICs will compare it with their own address. If it doesn't match, they simply wait
until the bus is released by the stop condition. If the address matches, however, the chip will
produce a response called the ACKNOWLEDGE signal. Once the MCU receives
acknowledge, it can start transmitting or receiving DATA. In our case, the MCU will transmit
data. When all is done, the MCU will issue the STOP condition. This is a signal that the bus
has been released and that the connected ICs may expect another transmission to start any
moment. There are several states on the bus in our example: START, ADDRESS,
ACKNOWLEDGE, DATA, STOP. These are all unique conditions on the bus.
14
Chapter 4
This breakout board for TI’s DRV8825 micro stepping bipolar stepper motor driver
features adjustable current limiting, overcurrent and over-temperature protection, and six micro
step resolutions (down to 1/32-step). It operates from 8.2 V to 45 V and can deliver up to
approximately 1.5 A per phase without a heat sink or forced air flow (rated for up to 2.2 A per
coil with sufficient additional cooling). It can be used as a higher-performance drop-in
replacement for those boards in many applications.
15
It has the following features:
Simple step and direction control interface
Six different step resolutions: full-step, half-step, 1/4-step, 1/8-step, 1/16-step, and
1/32-step.
Adjustable current control lets you set the maximum current output with a
potentiometer, which lets you use voltages above your stepper motor’s rated voltage to
achieve higher step rates.
Intelligent chopping control that automatically selects the correct current decay mode
(fast decay or slow decay)
45 V maximum supply voltage
Built-in regulator (no external logic voltage supply needed)
Can interface directly with 3.3 V and 5 V systems
Over-temperature thermal shutdown, over-current shutdown, and under-voltage
lockout
Short-to- ground and shorted-load protection
4-layer, 2 oz. copper PCB for improved heat dissipation
Exposed solder-able ground pad below the driver IC on the bottom of the PCB
16
Power : The Arduino Nano[2] can be powered via the Mini-B USB connection, 6-20V
unregulated external power supply (pin 30), or 5V regulated external power supply (pin
27).The power source is automatically selected to the highest voltage source. The FTDI
FT232RL chip on the Nano is only powered if the board is being powered over USB.
As a result, when running on external (non-USB) power, the 3.3V output (which is
supplied by the FTDI chip) is not available and the RX and TX LEDs will flicker if
digital pins 0 or 1 are high.
Memory: The ATmega168 has 16 KB of flash memory for storing code (of which 2
KB is used for the bootloader); the ATmega328 has 32 KB, (also with 2 KB used for
the bootloader). The ATmega168 has 1 KB of SRAM and 512 bytes of EEPROM
(which can be read and written with the EEPROM library); the ATmega328 has 2 KB
of SRAM and 1 KB of EEPROM.
Input and Output: Each of the 14 digital pins on the Nano can be used as an input or
output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5
volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-
up resistor (disconnected by default) of 20-50 kilo Ohms. In addition, some pins have
specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
These pins are connected to the corresponding pins of the FTDI USB-to- TTL Serial
chip. External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value. See the attachInterrupt()
function for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite()
function.
17
The Nano has 8 analog inputs, each of which provide 10 bits of resolution (i.e. 1024
different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the analog Reference() function.
AREF: Reference voltage for the analog inputs. Used with analogReference().
Reset: Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
18
4.1.3 Voltage Regulator
A voltage regulator generates a fixed output voltage of a pre-set magnitude that remains
constant regardless of changes to its input voltage or load conditions. There are two types of
voltage regulators. IC 7805 is selected as the requirement of the project. 7805 is a step down
regulator IC. It converts a given input voltage to a stable 5 Volts supply.
Digital-output X-, Y-, and Z-Axis angular rate sensors (gyroscopes) with a user-
programmable full-scale range of ±250, ±500, ±1000, and ±2000°/sec
External sync signal connected to the FSYNC pin supports image, video and GPS
synchronization
Integrated 16-bit ADCs enable simultaneous sampling of gyros
19
Enhanced bias and sensitivity temperature stability reduces the need for user
calibration
Improved low-frequency noise performance
Digitally-programmable low-pass filter
Gyroscope operating current: 3.6mA
Standby current: 5µA
Factory calibrated sensitivity scale factor
User self-test
Specifications
Weight: 140 g
Voltage rating: 10 V
Lead length: 30 cm
21
4.2 Printed Circuit Board design
22
PCB layout
23
4.3 Frame parts
The frame of the self-Balancing robot is made up of wood. A 2.5 mm plywood for
constructing the side part and the centre part of the body 1.5 cm thick wood was used. The
thicker wood at the centre provides strength to the robot chassis also forms a platform for
embedding the PCB board on the robot. The stepper motors are attached to the 2.5 mm plywood
using screws.
24
4.3.2 Side View of Robot
25
Chapter 5
Mathematical Model
Let,
m = mass of body part
mW = mass of wheel
R = Radius of the wheel
L = Length between COM and centre of wheel
τ0 = applied torque
I = Inertia of the body part
IW = Inertia of wheel part
xc horizontal position of the COM of the body part relative to a defined origin
zc vertical position of the COM of the body part from the ground
26
Clockwise rotation angle of the wheel from the horizontal axis at t=0
x = RΦ ... (5.1)
xc = RΦ + Lsinθ ...(5.3)
zc = R + Lcosθ ...(5.5)
dx dΦ
dt = R dt ... (5.2)
dxc dΦ dθ
dt = R dt + L dt cosθ ... (5.4)
dzc dθ
dt = -L dt sinθ ... (5.6)
Lagrange's Method [Energy] to derive the dynamic equations has been used.
2 dΦ dΦ dθ 1 2 dθ
2 2
1
ξ = 2 (Iw + mwR + mR ) dt + mRLcosθ dt dt +2 (I + mL ) dt - mgL(cosθ -1) …(5.12)
2
27
Therefore the dynamic equations for Φ coordinate and θ coordinate
(i) θ coordinate
∂ξ dΦ 2 dθ
dθ = mRLcosθ dt + (I + mL ) dt ...(5.13)
∂ dt
∂ξ dΦ dθ
∂θ = -mRLsinθ dt dt + mgLsinθ ...(5.14)
d ∂ξ ∂ξ d2θ d2Φ
χ = dt ( ∂θ ) - ∂θ = (I + mL2) dt + mRLcosθ dt - mRLsinθ ...(5.15)
(ii) Φ coordinate
∂ξ 2 dΦ dθ
dt cosθ
2
= (Iw + mwR + mR ) + mRL ...(5.16)
∂Φ dt
∂ξ
=0 ...(5.17)
∂Φ
d ∂ξ ∂ξ d2Φ d2θ dθ2
μ = dt ( ∂Φ ) - ∂Φ = (Iw + mwR2 + mR2) dt + mRLcosθ dt - mRLsinθ dt ...(5.18)
d 2 d
I + (m𝑤 + m)R 2
mRLcosθ dt 0 −mRLsinθdθ dt 0 μ
[𝑤 ] +[ dt ] d + [−mgLsinθ] = [χ ]
mRLcosθ I + mL2 d 2
0 0
dt dt
...(5.19)
and
τfloor (the torque dissipated between the ground and the wheel)
dΦ dθ dΦ
μ = τ0 - βm ( dt - dt ) -βy dt ...(5.21)
28
dΦ dθ
χ = -τ0 + τhinge = - τ0 + βm ( dt - dt ) ...(5.22)
d
μ 1 βy + βm −βm dt
[ χ ] = [ ] τ0 - [ ]
βm d
...(5.23)
−1 −βm
dt
5.2 Linearization
Since, the control objective for the system is to stand vertically, there is a need to linearize the
system. With a small range of motion from the upright position,
θ=0
cosθ ≌ 1
Approximation around → [Φ = 0] →
sinθ ≌ θ
Φ=0
d 2 d
I𝑤 + (m𝑤 + m)R2 mRL dt βy + βm −βm dt 0 1
2 2
[ ] +[ ] +[ ] θ = [ ] τ0 ...(5.24)
mRL I + mL d −βm βm d −mgL −1
dt dt
d 2 d
dt
E dt2 +F d + G [θ] = Hτ0 ...(5.25)
d
dt dt
dx
dt = Ax + Bu ...(5.26)
y = Cx + D ...(5.27)
Φ , θ , Φ , θ are stale variables, the input [U] is τ0, the output is horizontal direction movement
x, and rotational angle of the body part θ [no slipping is assumed].
29
0 0 1 0 0
d 0 0 0 1 d 0
dt = + τ0 ...(5.28)
dt 0 E G E F
1 1
dt
d 0 d 1
dt dt E 1t
R 0 0 0 d
y= ...(5.29)
0 1 0 0 dt
d
dt
30
Chapter 6
31
6.2 Wire Library
This library allows to communicate with I2C devices On the Arduino boards. Since
I2C communication protocol has been used between theangle measurement sensor and
microcontroller there is need to study the various functions from wire library[23].
Wire.begin()
This command prepares a few buffers for storing streams of data, and runs a function
from twi.c called twi_init(), which is the Two Wire Interface Initialization routine. twi_init()
sets a series of very specific configurations in the ATMEGA328P including the speed at which
the I2C bus will communicate and prepares the interrupts necessary for it. This command has
to exist in the code somewhere in order for I2C to work, and generally it’s placed in the setup
portion of the code.
Wire.begin(intAddress)
This function joins Arduino to the I2C bus, however it connects it as a slave component,
rather than as a bus master. The intAddress variable is the 7-bit I2C address assigned to the
Arduino. It can be any 7-bit address, provided it doesn’t conflict with any other on the bus.
Wire.beginTransmission(intAddress)
This function loads the slave address that is needed to communicate with, intAddress,
into a behind-the-scenes variable and specifies that the communication will be a WRITE action,
meaning the Arduino is going to follow up the address and R/W flag with some quantity of
data for the slave component.
Wire.write()
To send data to the slave component, use Wire.write() to load an internal buffer with the data
that to be received by slave. beginTransmission prepares the R/W flag with a W, and this is the
data that is actually Written. There are various options for the data that is to be transmitted, all
I2C communications are a single byte (8-bits) in length (not including ACK/NACK). The
Arduino code will accept an integer value, a string to send as a bunch of bytes, or, a sequence
32
of non-string data bytes followed by an integer indicating the amount of bytes in the sequence.
There is a limitation of 32 bytes of data per transmission burst. To write more, the stop
condition needs to be entered and then send the next batch. This is a limitation of the buffers
created in the libraries, not the I2C protocol.
Wire.endTransmission(boolStop)
With the Wire.endTransmission function, the function causes the I2C bus to chirp
something out. Specifically, the twi.c library assembles all the bits of data that are provided in
beginTransmission() and write(), then send it all out. It combines the 7-bit address with the
R/W flag, it sends out the data, manages listening for ACKs as necessary and creates the
repeated start or stop condition.
This function crafts the transmission of the request by structuring the address,
intAddress, with a READ bit in the R/W flag position. The amount of data in bytes is specified
with intLength, and that tells the Arduino how big of a buffer it should expect to fill with ones
and zeros. As with endTransmission(), the boolean Stop exists to allow user to exit to a Stop
Condition after transmission, or enter maintain control of the bus with a repeated start
condition. The Wire.requestFrom() function executes the read request, but it does using a single
command, whereas minimum three commands are needed to write data to an I2C slave.
Wire.read()
This function iterates its way through the buffer byte by byte allowing user to shift and
move the data into appropriate variables and arrays as necessary. If user never calls read(), then
user will never get the data that was pulled with requestFrom().
Wire.onRequest(FunctionName)
If user wants the Arduino, that is acting as the slave component, to perform a specific
action when the master component wants to read data from the slave, user must define that
using Wire.onRequest().The function would be called to generate and prepare the data when
the slave component receives the request in the form of an incoming address+R from the
master.
33
Wire.onReceive(FunctionName)
If user wants the Arduino acting as the slave component to perform a specific action
when the master component wants to write data to it, user must define the function
Wire.onReceive().The function would be called to execute against the data received after the
request is sent in the form of an incoming address+W from the master.
Wire.available()
This final function of the Wire library returns the amount of bytes that have been
transmitted to an Arduino acting as a slave component. If 5 bytes were transmitted,
Wire.available() would return the value 5. That would provide user with the value required to
start an iteration loop to cycle through the individual bytes that had been transmitted. All three
of the slave oriented functions only act on internal code, so no signal traces occur during their
execution. All signalling is initiated by the master, so it follows that the scope would be blank
during these functions.
34
6.3 Flowcharts
The PID algorithm is depicted using a flowchart. The second flowchart explains the
main program.
35
36
Chapter 7
Results
7.1 Simulation on MATLAB
Modelling a system requires its transfer function. In the previous section state space
model of the Self-Balancing two-wheel locomotive is derived. The computational ability of
MATLAB software is used obtain a transfer function of the system from the state space model.
37
Figure 17: Derived Transfer Functions
38
7.1.1 Impulse response
It is observed that the system output reaches infinity in finite amount of time, this means
the system is inherently unstable.
39
7.1.2 Step response
40
Figure 20: Root Locus
x˙ = (A − BK)x + BKxdesired
xdesired represents the vector of desired states, and serves as the external input to the
closed loop system. The “A-matrix” of the closed loop system is (A − BK), and the “B-
matrix “of the closed-loop system is BK. The closed-loop system has exactly as many
outputs as inputs: n. the column dimension of B equals the number of channels available
in u, and must match the row dimension of K. Pole-placement is the process of placing
the poles of (A − BK) in stable, suitably-damped locations in the complex plane.
41
Figure 21: LQR Output
42
7.2 Hardware Results
The output of the sensor is displayed. The microcontroller by using a
complementary filter is able to measure the tilt angle accurately. The first column of the
given picture is angle measured by the accelerometer. The second column is the angle
measured by the gyroscope. The third column is the combination of the accelerometer
angle and gyroscope angle with the help of complementary filter.
43
Figure 23: Accelerometer Measured Tilt Angle
44
Figure 25: Filtered angle
The self–Balancing Bot is able to balance itself for a certain period of time. If angle
from the vertical axis becomes more than 20 degrees that is the pitch measured by the
MPU6050 is more than 20 degrees the PID controller is not able to provide enough correction
to keep the Balance Bot standing. It is observed that if the bot maintains its vertical position
between +5 degrees and -5 degrees the bot is able to balance itself.
45
Figure 26: Self-Balancing Bot
46
References
[1] Hanu-Shiue Juang and Kai-Yew Lum[2013]: Design and Control of a Two- Wheel
Self- Balancing Robot using the Arduino Microcontroller Board.10th IEEE International
Conference on Control and Automation (ICCA) Hangzhou, China, June 12-14, 2013
[2] http://www.segway.com/about/our-story
[3] Control and Decision Conference (CCDC), 2015 27th Chinese Qingdao, China
[4] Nahid Hasan, Li Ling, Yuan De-Cheng Department of Information
Engineering, Shenyang University of Chemical Technology, Shenyang 110142, China
[5] A.-J. Baerveldt and R. Klang, “A low-cost and low-weight attitude estimation system
For an autonomous helicopter,” in IEEE International Conference on Intelligent
Engineering Systems, sep 1997, pp. 391–5
[6] Ye Ding, Joshua Gafford, Mie Kunio , Modelling, Simulation and Fabrication of a
Balancing Robot Harvard University, Massachusetts Institute of Technology
[7] National InstrumentsTM http://www.ni.com/white-paper/3782/en/
[8] Sabatini,“Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic
[9] Sensors: Observability Analysis and Performance Evaluation” Sensors, 2011
[10] Chenxi Sun, Tao Lu, and Kui Yuan, Balance Control of Two-wheeled Self balancing
Robot Based on Linear Quadratic Regulator and Neural Network 2013 Fourth
International Conference on Intelligent Control and Information Processing (ICICIP) June
9 – 11, 2013, Beijing, China
[11] Hanu-Shiue Juang and Kai-Yew Lum[2013]: Design and Control of a Two- Wheel Self-
Balancing Robot using the Arduino Microcontroller Board.10th IEEE International
Conference on Control and Automation (ICCA) Hangzhou, China, June 12-14, 2013
[12] Internship & Master thesis Faculty of Electrical Engineering, Mathematics and
Computer Science (EEMCS) Modelling and Control of a Ball-Balancing Robot
[13] Sabatini,“Kalman-Filter-Based Orientation Determination Using Inertial/Magnetic
Sensors: Observability Analysis and Performance Evaluation” Sensors, 2011
[14] https://www.mems-exchange.org/MEMS/what-is.html
[15] https://www.siliconsensing.com/technology/mems-gyroscopes
[16] http://www.sensorwiki.org/doku.php/sensors/accelerometer
[17] http://www.esacademy.com/en/library/technical-articles-and
documents/miscellaneous/i2c-bus/general-introduction/i2c-bus-protocol.html
47
[18] https://create.arduino.cc/
[19] https://learn.sparkfun.com/tutorials/pocket-avr-programmer-hookup-guide/using avrdude
[20] https://www.arduino.cc/en/Reference/Wire
[21] https://rheingoldheavy.com/arduino-wire-library/
48
Appendix
MPU 6050 Register Map.
49
MPU 6050 Register Map.
50
MPU 6050 Register Map.
51
DRV 8825 Datasheet.
Absolute Maximum Ratings.
Electrical Characteristics.
52
Electrical Characteristics.
53
IC7805.
Operating Conditions.
54
Stepper Motor.
55