Electronics IAP: Self-Balancing Robot Design and Implementation
VerifiedAdded on 2022/11/14
|53
|15165
|281
Project
AI Summary
This project focuses on the design and implementation of a self-balancing robot capable of following a line. The robot utilizes an IMU sensor (MPU6050) to measure tilt angles, employing a complementary filter to correct sensor errors from the gyroscope and accelerometer. A PID controller is implemented to maintain the robot's balance by controlling motor movements based on the tilt angle. The design includes the hardware components like the chassis, motors, and the IMU sensor, along with the software algorithms for sensor data processing and motor control. The methodology involves literature review, hardware selection, software development, and implementation of control systems, including a block diagram and risk assessment. The project aims to create a stable, autonomous robot that can balance itself and follow a predefined line, with potential future improvements such as obstacle avoidance and enhanced controller designs.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.

Electronics
IAP – Thesis
Line Following Self – Balancing Robot
Student Name –
Student ID –
1
IAP – Thesis
Line Following Self – Balancing Robot
Student Name –
Student ID –
1
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Contents
Abstract.................................................................................................................................................3
1.Introduction........................................................................................................................................3
1.1 Introduction.................................................................................................................................3
1.2 Motivation...................................................................................................................................3
1.3 Aim and Objectives......................................................................................................................4
1.4 Methodology...............................................................................................................................4
2. Literature Review..............................................................................................................................7
2.1 Introduction.................................................................................................................................7
2.2 Inverted Pendulum......................................................................................................................8
3. Hardware.........................................................................................................................................17
3.1 Complementary filter.................................................................................................................21
3.2 Gyroscope..................................................................................................................................22
3.3 Accelerometer:..........................................................................................................................22
3.4 Software:...................................................................................................................................22
4. Implementation...............................................................................................................................23
4.1 Gantt chart:................................................................................................................................23
4.2 Risk:...........................................................................................................................................24
4.3 Block Diagram:...........................................................................................................................25
5. Designing.........................................................................................................................................27
5.1 Control System :........................................................................................................................27
5.2 PID Controller............................................................................................................................28
5.3 Design of Complementary filter.................................................................................................32
5.4 Design of PID Controller.............................................................................................................33
6. Results.............................................................................................................................................36
6.1 Conclusion.................................................................................................................................36
6.2 Future Work :.............................................................................................................................36
References...........................................................................................................................................37
2
Abstract.................................................................................................................................................3
1.Introduction........................................................................................................................................3
1.1 Introduction.................................................................................................................................3
1.2 Motivation...................................................................................................................................3
1.3 Aim and Objectives......................................................................................................................4
1.4 Methodology...............................................................................................................................4
2. Literature Review..............................................................................................................................7
2.1 Introduction.................................................................................................................................7
2.2 Inverted Pendulum......................................................................................................................8
3. Hardware.........................................................................................................................................17
3.1 Complementary filter.................................................................................................................21
3.2 Gyroscope..................................................................................................................................22
3.3 Accelerometer:..........................................................................................................................22
3.4 Software:...................................................................................................................................22
4. Implementation...............................................................................................................................23
4.1 Gantt chart:................................................................................................................................23
4.2 Risk:...........................................................................................................................................24
4.3 Block Diagram:...........................................................................................................................25
5. Designing.........................................................................................................................................27
5.1 Control System :........................................................................................................................27
5.2 PID Controller............................................................................................................................28
5.3 Design of Complementary filter.................................................................................................32
5.4 Design of PID Controller.............................................................................................................33
6. Results.............................................................................................................................................36
6.1 Conclusion.................................................................................................................................36
6.2 Future Work :.............................................................................................................................36
References...........................................................................................................................................37
2

Abstract
The project consists of design of a self – balancing robot. A 2 wheel robot can be compared
to an inverted pendulum. It is normally an unstable system which needs to be stabilised. The
tilt angle needs to be measured continuously and then maintained at a stabilised reference
value. For the measurement of the angle value, the sensors used are gyroscope and the
accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values need to be corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
3
The project consists of design of a self – balancing robot. A 2 wheel robot can be compared
to an inverted pendulum. It is normally an unstable system which needs to be stabilised. The
tilt angle needs to be measured continuously and then maintained at a stabilised reference
value. For the measurement of the angle value, the sensors used are gyroscope and the
accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values need to be corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
3

1.Introduction
1.1 Introduction
Students are very curious about self balancing robots these days. Naturally, the robot is an
unstable system. A design has been developed to convert the system into a stable system, so
that it can balance itself. The tilt angle plays a major role in keeping the robot in upright
position. The main application of self balancing robot is for the human transportation.
1.2 Motivation
The aim of the project is designing, constructing and then programming a self balanced robot
using a complementary filter which is developed and implemented by self. The various steps
involved are : The literature review of complementary filter and then implementation on
MATLAB software is done. A mathematical model is then developed for the various sensors
used. The complementary filter is implemented and then tuned with the microcontroller. A
test rig is designed. The tuning is done in such a way that best performance is obtained. The
robot chassis is then designed and assembled. The software program is developed which
reads the data from the sensors and then controls the working of the actuators. Then, a PID
controller is implemented so that the robot stays in the upright position.
1.3 Aim and Objectives
The project consists of a line following self – balancing robot. In order to balance the robot,
an IMU sensor is used. MPU 6050 is used for getting the position from the sensors. It has
good reliability , accuracy, performance as well as less cost. It consists of 2 sensors – the
gyroscope and the accelerometer. It provides a total of 6 output values , as it is 6 DOF. The 3
4
1.1 Introduction
Students are very curious about self balancing robots these days. Naturally, the robot is an
unstable system. A design has been developed to convert the system into a stable system, so
that it can balance itself. The tilt angle plays a major role in keeping the robot in upright
position. The main application of self balancing robot is for the human transportation.
1.2 Motivation
The aim of the project is designing, constructing and then programming a self balanced robot
using a complementary filter which is developed and implemented by self. The various steps
involved are : The literature review of complementary filter and then implementation on
MATLAB software is done. A mathematical model is then developed for the various sensors
used. The complementary filter is implemented and then tuned with the microcontroller. A
test rig is designed. The tuning is done in such a way that best performance is obtained. The
robot chassis is then designed and assembled. The software program is developed which
reads the data from the sensors and then controls the working of the actuators. Then, a PID
controller is implemented so that the robot stays in the upright position.
1.3 Aim and Objectives
The project consists of a line following self – balancing robot. In order to balance the robot,
an IMU sensor is used. MPU 6050 is used for getting the position from the sensors. It has
good reliability , accuracy, performance as well as less cost. It consists of 2 sensors – the
gyroscope and the accelerometer. It provides a total of 6 output values , as it is 6 DOF. The 3
4
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

output values are obtained from the accelerometer and the rest 3 are obtained from the
gyroscope.
The project consists of design of a self – balancing robot. A 2 wheel robot can be compared
to an inverted pendulum. It is normally an unstable system which needs to be stabilised. The
tilt angle needs to be measured continuously and then maintained at a stabilised reference
value. For the measurement of the angle value, the sensors used are gyroscope and the
accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values need to be corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
The design can be further improved by relocation of the COM ( center of mass ) and the
complementary filter can be made more efficient by rejection of translational movement
noise also. A remote control for various types of movements of the robot can be provided.
Some other sensors ( like IR sensors, ultrasonic sensors, GPS, camera, digital compass ) can
be used to avoid any obstacles and to allow the robot to follow a perimeter. Another
improvement can be the use of PI-PD controller. It provides more stability than PID
controller. PI-PD controller also provides the compensation for the C.G. misaligning. It will
help in bringing the robot back to his initial state or position. In order to avoid any kind of
obstacles, the vision system can be added using a camera. Also, better speeds can still be
achieved.
5
gyroscope.
The project consists of design of a self – balancing robot. A 2 wheel robot can be compared
to an inverted pendulum. It is normally an unstable system which needs to be stabilised. The
tilt angle needs to be measured continuously and then maintained at a stabilised reference
value. For the measurement of the angle value, the sensors used are gyroscope and the
accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values need to be corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
The design can be further improved by relocation of the COM ( center of mass ) and the
complementary filter can be made more efficient by rejection of translational movement
noise also. A remote control for various types of movements of the robot can be provided.
Some other sensors ( like IR sensors, ultrasonic sensors, GPS, camera, digital compass ) can
be used to avoid any obstacles and to allow the robot to follow a perimeter. Another
improvement can be the use of PI-PD controller. It provides more stability than PID
controller. PI-PD controller also provides the compensation for the C.G. misaligning. It will
help in bringing the robot back to his initial state or position. In order to avoid any kind of
obstacles, the vision system can be added using a camera. Also, better speeds can still be
achieved.
5

The magician Chassis kit has been used. It is a robot platform which is versatile and has 2
gear motors having 65 mm wheels and a rear caster for a differential drive. The plates of
chassis have many cuts as well as holes in order to mount the sensors, microcontrollers or
other hardware. The batteries and other components can be placed in the space between the 2
plates. The kit consists of 2 wheels and also 1 castor wheel. In this project, only 2 wheels are
used and the castor wheel is not used. It consists of motors and a plastic chassis. A voltage of
3.3 V is needed by the IMU sensor for running.
1.4 Methodology
The robot which is designed is capable of balancing itself on 2 wheels and also following a
line. The major parts used are the microcontroller, gyroscope and an accelerometer. The
values read by the accelerometer and the gyroscope are sent to the microcontroller. The
complimentary filter present reads these values and makes a decision. As per the decision, the
motors are energised that maintains the robot in a balanced condition. For maintaining the
robot on the line, IR sensors are used.
The block diagram of the complete system has been shown in figure 1. If the reference value
of tilt angle is taken as 0 radian. The accelerometer and the gyroscope reading values are fed
to the complementary filter. The filter generates an angle. This angle value is compared with
the reference value. If there is a difference, this value is provided to the PID controller. The
output of the PID controller is fed to the left or right motor based on the control signal. The
6
gear motors having 65 mm wheels and a rear caster for a differential drive. The plates of
chassis have many cuts as well as holes in order to mount the sensors, microcontrollers or
other hardware. The batteries and other components can be placed in the space between the 2
plates. The kit consists of 2 wheels and also 1 castor wheel. In this project, only 2 wheels are
used and the castor wheel is not used. It consists of motors and a plastic chassis. A voltage of
3.3 V is needed by the IMU sensor for running.
1.4 Methodology
The robot which is designed is capable of balancing itself on 2 wheels and also following a
line. The major parts used are the microcontroller, gyroscope and an accelerometer. The
values read by the accelerometer and the gyroscope are sent to the microcontroller. The
complimentary filter present reads these values and makes a decision. As per the decision, the
motors are energised that maintains the robot in a balanced condition. For maintaining the
robot on the line, IR sensors are used.
The block diagram of the complete system has been shown in figure 1. If the reference value
of tilt angle is taken as 0 radian. The accelerometer and the gyroscope reading values are fed
to the complementary filter. The filter generates an angle. This angle value is compared with
the reference value. If there is a difference, this value is provided to the PID controller. The
output of the PID controller is fed to the left or right motor based on the control signal. The
6

left and right motors control the movement of wheels. This helps to maintain the robot in the
balanced position.
The figure 1 shows the block diagram of the complete system. The reference value which is
assumed to be 0 radian in this case is given to an adder block. The accelerometer and the
gyroscope reading is provided to the complementary filter which helps to produce the value
of the tilt angle. This is also given to the adder block. The output of the adder block may not
be in the controlled form. Hence, a PID controller is used with suitable parameters to provide
controlled output. The output of the PID controller is given to one of the motors based on the
control direction chosen. If the tilt angle is positive then forward direction is chosen and if the
tilt angle is negative, then the backward direction is chosen. Accordingly right motor or left
motor is activated. These motors help to provide motion to the wheels which help to rectify
the tilt angle which finally gives the upright position with the angle becoming equal to the
reference angle. When the tilt angle becomes equal to the reference angle, then the robot is in
the upright position which is the very purpose of the self – balancing robot.
Figure 1
7
balanced position.
The figure 1 shows the block diagram of the complete system. The reference value which is
assumed to be 0 radian in this case is given to an adder block. The accelerometer and the
gyroscope reading is provided to the complementary filter which helps to produce the value
of the tilt angle. This is also given to the adder block. The output of the adder block may not
be in the controlled form. Hence, a PID controller is used with suitable parameters to provide
controlled output. The output of the PID controller is given to one of the motors based on the
control direction chosen. If the tilt angle is positive then forward direction is chosen and if the
tilt angle is negative, then the backward direction is chosen. Accordingly right motor or left
motor is activated. These motors help to provide motion to the wheels which help to rectify
the tilt angle which finally gives the upright position with the angle becoming equal to the
reference angle. When the tilt angle becomes equal to the reference angle, then the robot is in
the upright position which is the very purpose of the self – balancing robot.
Figure 1
7
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 2 . IMU sensor ( MPU 6050 )
An IMU sensor is shown in the Figure 2. The IMU sensor used here is MPU 6050. MPU
6050 is used as IMU sensor. The chip is having a 3 axis accelerometer and a 3 – axis
gyroscope. So, 6 degrees of freedom are present. The MPU – 6050 is a 3.3 V I.C. . The
working range of the voltage is 2.375 V – 3.46 V ( as per the data sheet ). It consists of a
regulator inside it. So it can be powered using 5 V from Arduino microcontroller. A 16 – bit
ADC ( Analog to digital converter ) is also present for every channel. A DMP ( Digital
Motion Processor ) input also exists which helps in combining the sensor data and doing
calculations for minimization of the error.
An auto – calibrator is also present in it. It can itself perform the calculations. The gyroscope
can measure the angular velocity with respect to the axis . On integration, it can provide the
tilt angle or angular displacement. Angle of the robot can be found using the accelerometer
reading. The output of both the sensors is provided to a filter. It processes this information to
provide a stable state.
8
An IMU sensor is shown in the Figure 2. The IMU sensor used here is MPU 6050. MPU
6050 is used as IMU sensor. The chip is having a 3 axis accelerometer and a 3 – axis
gyroscope. So, 6 degrees of freedom are present. The MPU – 6050 is a 3.3 V I.C. . The
working range of the voltage is 2.375 V – 3.46 V ( as per the data sheet ). It consists of a
regulator inside it. So it can be powered using 5 V from Arduino microcontroller. A 16 – bit
ADC ( Analog to digital converter ) is also present for every channel. A DMP ( Digital
Motion Processor ) input also exists which helps in combining the sensor data and doing
calculations for minimization of the error.
An auto – calibrator is also present in it. It can itself perform the calculations. The gyroscope
can measure the angular velocity with respect to the axis . On integration, it can provide the
tilt angle or angular displacement. Angle of the robot can be found using the accelerometer
reading. The output of both the sensors is provided to a filter. It processes this information to
provide a stable state.
8

Figure 3 . MPU Chassis
The Figure 3 shows the MPU Chassis used for the design of the project. It is very spacious
and consists of vast space to place various components. The magician Chassis kit has been
used. It is a robot platform which is versatile and has 2 gear motors having 65 mm wheels
and a rear caster for a differential drive. The plates of chassis have many cuts as well as holes
in order to mount the sensors, microcontrollers or other hardware. The batteries and other
components can be placed in the space between the 2 plates. The kit consists of 2 wheels and
also 1 castor wheel. In this project, only 2 wheels are used and the castor wheel is not used.
It consists of motors and a plastic chassis. A voltage of 3.3 V is needed by the IMU sensor for
running.
9
The Figure 3 shows the MPU Chassis used for the design of the project. It is very spacious
and consists of vast space to place various components. The magician Chassis kit has been
used. It is a robot platform which is versatile and has 2 gear motors having 65 mm wheels
and a rear caster for a differential drive. The plates of chassis have many cuts as well as holes
in order to mount the sensors, microcontrollers or other hardware. The batteries and other
components can be placed in the space between the 2 plates. The kit consists of 2 wheels and
also 1 castor wheel. In this project, only 2 wheels are used and the castor wheel is not used.
It consists of motors and a plastic chassis. A voltage of 3.3 V is needed by the IMU sensor for
running.
9

Figure 4 . Robot
The Figure 4 shows the complete design of the self – balancing robot. It consists of two
wheels only as seen from the figure.
2. Literature Review
2.1 Introduction
The SBR ( Self Balancing Robot ) is based on the concept of an inverted pendulum. An
inverted pendulum has a cart which is being driven dynamically using 2 DC motors. The
purpose is controlling the position of the pendulum which is trying to rotate with respect to a
fixed point ( on cart ) [ 1 ]. It is an example of an unstable system which is non-linear [ 2 ].
10
The Figure 4 shows the complete design of the self – balancing robot. It consists of two
wheels only as seen from the figure.
2. Literature Review
2.1 Introduction
The SBR ( Self Balancing Robot ) is based on the concept of an inverted pendulum. An
inverted pendulum has a cart which is being driven dynamically using 2 DC motors. The
purpose is controlling the position of the pendulum which is trying to rotate with respect to a
fixed point ( on cart ) [ 1 ]. It is an example of an unstable system which is non-linear [ 2 ].
10
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

The angle which the pendulum makes with the vertical axis is measured. The angle has to be
maintained at a fixed point with the help of DC motors ( forward or backward drive ) for an
inverted pendulum. The Segway System is a similar one [ 13 ].
The sensor used for the measurement of angle is MPU-6050, IMU ( inertial measurement unit
). The measurement of angle is done by using an accelerometer. It helps to find the angle
between the various forces acting on the inverted pendulum. A gyroscope can be used to
measure the angular velocity which can be integrated to obtain the value of angle of the
pendulum.
The data obtained using the accelerometer and the gyroscope is not error free. This is because
the accelerometer may take into account various other forces which act on the system ( like
frictional force, any vibration due to DC motor ). The error will slowly reduce as the
vibrations slow down. The gyroscope reading has minimum error in the initial time. But as
time passes, then due to integration, error may be seen [ 3 ].
A filter is thus needed to remove these errors. The readings obtained from both the
accelerometer and the gyroscope are combined. A Kalman filter makes use of the 2 readings
and gives an output which does not contain any error [ 4 ]. But the analysis is very tough
[ 14 ]. The integration of the Kalman filter with 8-bit microcontrollers is very difficult. A
solution for this is the use of a complementary filter. It is simple and contains a low pass filter
as well as a high pass filter. It helps to provide angle value which does not contain error. The
various coefficients need to be determined. A PID ( Proportional – Integral – Derivative )
controller is used to obtain Stabilised position of angle [ 5 , 6 , 15 ].
2.2 Inverted Pendulum
The Inverted Pendulum can be modelled to obtain the transfer function as [ 6 ] :
11
maintained at a fixed point with the help of DC motors ( forward or backward drive ) for an
inverted pendulum. The Segway System is a similar one [ 13 ].
The sensor used for the measurement of angle is MPU-6050, IMU ( inertial measurement unit
). The measurement of angle is done by using an accelerometer. It helps to find the angle
between the various forces acting on the inverted pendulum. A gyroscope can be used to
measure the angular velocity which can be integrated to obtain the value of angle of the
pendulum.
The data obtained using the accelerometer and the gyroscope is not error free. This is because
the accelerometer may take into account various other forces which act on the system ( like
frictional force, any vibration due to DC motor ). The error will slowly reduce as the
vibrations slow down. The gyroscope reading has minimum error in the initial time. But as
time passes, then due to integration, error may be seen [ 3 ].
A filter is thus needed to remove these errors. The readings obtained from both the
accelerometer and the gyroscope are combined. A Kalman filter makes use of the 2 readings
and gives an output which does not contain any error [ 4 ]. But the analysis is very tough
[ 14 ]. The integration of the Kalman filter with 8-bit microcontrollers is very difficult. A
solution for this is the use of a complementary filter. It is simple and contains a low pass filter
as well as a high pass filter. It helps to provide angle value which does not contain error. The
various coefficients need to be determined. A PID ( Proportional – Integral – Derivative )
controller is used to obtain Stabilised position of angle [ 5 , 6 , 15 ].
2.2 Inverted Pendulum
The Inverted Pendulum can be modelled to obtain the transfer function as [ 6 ] :
11

. θ ( s ) / X ( s ) = - s2 / l s2 – g
In Laplace Transform form
. θ = Angle of pendulum with vertical axis
l = Length of pendulum
g = acceleration due to gravity
There are 2 platforms available in the robot. There are 4 bolts for supporting them. The
lithium-ion battery ( used for driving the motor ) is placed on upper part and motor driver
circuit is placed on lower part. The Arduino uno microcontroller ( 8 – bit ) , IMU Sensor and
2 DC motors ( 60 rpm ) are fixed on bottom side of the platform. The IMU Sensor needs to
be made immune to any type of vibrations. Hence, it is fixed on bottom side. Generic wheels
are used in the system.
Components:
Arduino Uno Microcontroller- The sensors can be easily interfaced using this
microcontroller. Programming is very easy and cost is less.
IMU Sensor- The IMU sensor based on MEMS technology used here is MPU-6050. It is
given by Inven Sense technologies. It is a 6 Degree of freedom ( DOF ) sensor which
contains 3 gyroscopes as well as 3 accelerometers. The sensor needs a 3.3 V voltage and it
communicates to the microcontroller using the I2C protocol. The motor driver L293 can be
used for driving the motors. The enable pins for both channels are provided with PWM input
obtained by the Arduino microcontroller. The DC motor is used for countering the rotational
12
In Laplace Transform form
. θ = Angle of pendulum with vertical axis
l = Length of pendulum
g = acceleration due to gravity
There are 2 platforms available in the robot. There are 4 bolts for supporting them. The
lithium-ion battery ( used for driving the motor ) is placed on upper part and motor driver
circuit is placed on lower part. The Arduino uno microcontroller ( 8 – bit ) , IMU Sensor and
2 DC motors ( 60 rpm ) are fixed on bottom side of the platform. The IMU Sensor needs to
be made immune to any type of vibrations. Hence, it is fixed on bottom side. Generic wheels
are used in the system.
Components:
Arduino Uno Microcontroller- The sensors can be easily interfaced using this
microcontroller. Programming is very easy and cost is less.
IMU Sensor- The IMU sensor based on MEMS technology used here is MPU-6050. It is
given by Inven Sense technologies. It is a 6 Degree of freedom ( DOF ) sensor which
contains 3 gyroscopes as well as 3 accelerometers. The sensor needs a 3.3 V voltage and it
communicates to the microcontroller using the I2C protocol. The motor driver L293 can be
used for driving the motors. The enable pins for both channels are provided with PWM input
obtained by the Arduino microcontroller. The DC motor is used for countering the rotational
12

torque of robot with maximum torque being 1.2 kg-cm. The speed is 100 rpm. The lithium
ion battery is used for powering the system. It can provide 11.1 V ( at 1000 mAh ).
The reference angle is taken as 180 degree ( ideal ). But practically reference angle is taken as
177 degree ( due to dead zone ).
The angles obtained from the accelerometer and gyroscope are filtered and given to the
summer. This gives the angle of tilt with respect to the vertical axis. The controller is
provided the difference between the real angle and the output angle. The angle of robot is
taken with the help of IMU sensor. The output of PID controller is given to motor which is a
PWM signal. The PID controller is very easy to implement and gives accurate results also.
The various parts of SBR can be explained as follows: The output of the accelerometer and
the gyroscope sensors is provided to a complementary filter which generates an output angle.
The difference of the reference angle and the output angle is taken and provided to a PID
controller. The PID controller provides its output to the left and the right motor. If the real
time angle is greater than the reference ( or stable ) angle , then movement is in forward
direction and if the real time angle is lesser than the reference ( or stable ) angle , then
movement is in backward direction.
A push button is provided on the robot which can be triggered for moving the robot in the
forward direction. The set point of the robot is taken to be more than the reference ( or
stable ) angle as 178.5 degree. Hence, initially as the real time angle is more than the stable
angle, the robot moves in the forward direction. If the robot has to be moved in the backward
direction, then the angle can be set as 176.2 degree . After the forward or backward direction
movement, the stable position is obtained.
13
ion battery is used for powering the system. It can provide 11.1 V ( at 1000 mAh ).
The reference angle is taken as 180 degree ( ideal ). But practically reference angle is taken as
177 degree ( due to dead zone ).
The angles obtained from the accelerometer and gyroscope are filtered and given to the
summer. This gives the angle of tilt with respect to the vertical axis. The controller is
provided the difference between the real angle and the output angle. The angle of robot is
taken with the help of IMU sensor. The output of PID controller is given to motor which is a
PWM signal. The PID controller is very easy to implement and gives accurate results also.
The various parts of SBR can be explained as follows: The output of the accelerometer and
the gyroscope sensors is provided to a complementary filter which generates an output angle.
The difference of the reference angle and the output angle is taken and provided to a PID
controller. The PID controller provides its output to the left and the right motor. If the real
time angle is greater than the reference ( or stable ) angle , then movement is in forward
direction and if the real time angle is lesser than the reference ( or stable ) angle , then
movement is in backward direction.
A push button is provided on the robot which can be triggered for moving the robot in the
forward direction. The set point of the robot is taken to be more than the reference ( or
stable ) angle as 178.5 degree. Hence, initially as the real time angle is more than the stable
angle, the robot moves in the forward direction. If the robot has to be moved in the backward
direction, then the angle can be set as 176.2 degree . After the forward or backward direction
movement, the stable position is obtained.
13
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Complementary filter : If Kalman filter is used, then the process is very difficult for an 8-bit
microcontroller. However, a complementary filter solves this problem because it is simple to
implement as it consists of first order low pass filter and high pass filter. A filter will help in
the removal of any noise present in the input signal. Hence, it helps to find a stable angle by
using various sources which contain data with errors and which contains noise as different
frequency components [ 8 ]. The complementary filter is a filter in the frequency domain. It
consists of 2 or more transfer functions . These transfer functions are complementary to one
another . If one sensor has a transfer function G ( s ), then the other sensor’s transfer function
is given by I – G ( s ), where I refers to the identity matrix [ 8 ]. The complementary filter can
be used if the high frequency noise of one sensor is the complement of the low frequency
noise of the other sensor. The signal can be made to pass through the high pass filter as well
as the low pass filter for removing the noise. Finally, the reconstruction process takes place.
The Kalman filter does not work in frequency domain as the complementary filter. The
Kalman filter and the complementary filter do not have much difference in their practical
implementation. A complementary filter can be easily implemented using the digital low pass
filter and high pass filter. There are 2 filter coefficients which can be used to describe the
filter.
The analysis has been done for c = 0.98 and c = 0.94.
Conclusion : The system has been designed at a low cost. The use of complementary filter
also helped in reducing the computations .In future some image processing features can be
added to the system to enhance its capabilities.
14
microcontroller. However, a complementary filter solves this problem because it is simple to
implement as it consists of first order low pass filter and high pass filter. A filter will help in
the removal of any noise present in the input signal. Hence, it helps to find a stable angle by
using various sources which contain data with errors and which contains noise as different
frequency components [ 8 ]. The complementary filter is a filter in the frequency domain. It
consists of 2 or more transfer functions . These transfer functions are complementary to one
another . If one sensor has a transfer function G ( s ), then the other sensor’s transfer function
is given by I – G ( s ), where I refers to the identity matrix [ 8 ]. The complementary filter can
be used if the high frequency noise of one sensor is the complement of the low frequency
noise of the other sensor. The signal can be made to pass through the high pass filter as well
as the low pass filter for removing the noise. Finally, the reconstruction process takes place.
The Kalman filter does not work in frequency domain as the complementary filter. The
Kalman filter and the complementary filter do not have much difference in their practical
implementation. A complementary filter can be easily implemented using the digital low pass
filter and high pass filter. There are 2 filter coefficients which can be used to describe the
filter.
The analysis has been done for c = 0.98 and c = 0.94.
Conclusion : The system has been designed at a low cost. The use of complementary filter
also helped in reducing the computations .In future some image processing features can be
added to the system to enhance its capabilities.
14

Self- Balancing Robot ( SBR ) containing 2 wheels can be designed as well as controlled by
using Arduino Microcontroller. The complete system can be designed using DC motors, an
Arduino microcontroller, gyroscope and accelerometer. Any type of gyro drifts can be
compensated using complementary filter. The PID controller helps to maintain it in an
upright position. The various electrical as well as kinematic parameters can be used for
writing down the design equations. There are several applications of robots. They can be used
in industries, military purposes, schools, homes, hospitals etc. In 2 wheel robot, the main part
is to keep it upright. The system is analogous to the inverted pendulum system [ 21 , 22 ].
This is a very interesting field of research. Arduino is preferred as the microcontroller as it is
available as open source. Its programming is very simple and easy. It can be easily interfaced
to various sensors [ 33 ]. It can be used in the field of education [ 34 ], robotics [ 35 ], process
controlling [ 37 , 38 ] as well as network controlling [ 39 ]. Another important part used is the
complementary filter [ 40 ]. Linear form of equations of motion is used in designing. The
errors can be modelled using these equations and the robot can be made to stay upright using
PID control for any tilt angles.
The self balancing robot system can be divided into 3 sections. These are the sensors, the
development board as well as the motor and its controlling circuit [ 24 , 25 ]. The sensors can
be used in measuring the acceleration, the tilt angle of robot and the distance travelled by the
robot [ 41 ]. The development board used here is the Arduino development board. For
balancing the robot, 2 types of information are required. They are the angular velocity and the
tilt angle of the robot [ 42 ]. This information can be obtained from various MEMS sensors
like gyroscope, accelerometer or encoders for wheel angle [ 43 ]. This information can be
used to design a control system to balance the overall system.
Gyroscope-Angular velocity of the robot can be measured using a sensor called gyroscope
[ 44 ]. This data is then sent to the development board. An example of Gyroscope is parallax
15
using Arduino Microcontroller. The complete system can be designed using DC motors, an
Arduino microcontroller, gyroscope and accelerometer. Any type of gyro drifts can be
compensated using complementary filter. The PID controller helps to maintain it in an
upright position. The various electrical as well as kinematic parameters can be used for
writing down the design equations. There are several applications of robots. They can be used
in industries, military purposes, schools, homes, hospitals etc. In 2 wheel robot, the main part
is to keep it upright. The system is analogous to the inverted pendulum system [ 21 , 22 ].
This is a very interesting field of research. Arduino is preferred as the microcontroller as it is
available as open source. Its programming is very simple and easy. It can be easily interfaced
to various sensors [ 33 ]. It can be used in the field of education [ 34 ], robotics [ 35 ], process
controlling [ 37 , 38 ] as well as network controlling [ 39 ]. Another important part used is the
complementary filter [ 40 ]. Linear form of equations of motion is used in designing. The
errors can be modelled using these equations and the robot can be made to stay upright using
PID control for any tilt angles.
The self balancing robot system can be divided into 3 sections. These are the sensors, the
development board as well as the motor and its controlling circuit [ 24 , 25 ]. The sensors can
be used in measuring the acceleration, the tilt angle of robot and the distance travelled by the
robot [ 41 ]. The development board used here is the Arduino development board. For
balancing the robot, 2 types of information are required. They are the angular velocity and the
tilt angle of the robot [ 42 ]. This information can be obtained from various MEMS sensors
like gyroscope, accelerometer or encoders for wheel angle [ 43 ]. This information can be
used to design a control system to balance the overall system.
Gyroscope-Angular velocity of the robot can be measured using a sensor called gyroscope
[ 44 ]. This data is then sent to the development board. An example of Gyroscope is parallax
15

L3G4200D MEMS Gyroscope [ 45 ]. It sends the data to the development board using the
serial communication[ 46 ]. It can measure data for 3-axis. Its cost is low and it consumes
low power. If the angular velocity is integrated, then the value of angle is obtained [ 47 ] .
The process of integration also leads to integration of the noise in measuring using gyroscope
[ 48 ]. This results to a change in value of actual angle. This can be taken into account using a
complementary filter [ 49 ].
Accelerometer- For measuring the total external acceleration of the robot, an accelerometer is
used [ 50 ]. It measures the acceleration due to gravity as well as due to motion [ 51 ]. An
example is Lilypad ADXL330. It measures data for 3-axis and has low cost. The direction
cosine method can be used to find the tilt angle ( θ ) using the acceleration data for X and Z
axis. The value contains noise value also [ 52 ].
Encoder- An encoder can convert the value of angle into a digital signal which can be
accepted by the microcontroller [ 53 ]. Even the distance travelled by the robot can be
calculated using the radius of the wheel and the gear ratio. An example is – Pololu hall effect
encoder ( 64 cycle per revolution ) [ 54 ]. It has a resolution value of 64 counts per
revolution.
Motor- The focus while selecting the motor is torque and not the velocity ( as proper torque is
needed for rotational motion to obtain the balanced state ).
Arduino Development Board
The microcontroller used for the self balancing robot must have a very good speed as real
time data for the tilt angle is needed to keep the robot in the balanced position [ 55 ]. The
sampling time required must be less than 50 ms [ 56 ]. The Arduino ATmega 2560 processor
has a clock rate which has a maximum value of frequency as 16 MHz [ 57 ]. The sampling
16
serial communication[ 46 ]. It can measure data for 3-axis. Its cost is low and it consumes
low power. If the angular velocity is integrated, then the value of angle is obtained [ 47 ] .
The process of integration also leads to integration of the noise in measuring using gyroscope
[ 48 ]. This results to a change in value of actual angle. This can be taken into account using a
complementary filter [ 49 ].
Accelerometer- For measuring the total external acceleration of the robot, an accelerometer is
used [ 50 ]. It measures the acceleration due to gravity as well as due to motion [ 51 ]. An
example is Lilypad ADXL330. It measures data for 3-axis and has low cost. The direction
cosine method can be used to find the tilt angle ( θ ) using the acceleration data for X and Z
axis. The value contains noise value also [ 52 ].
Encoder- An encoder can convert the value of angle into a digital signal which can be
accepted by the microcontroller [ 53 ]. Even the distance travelled by the robot can be
calculated using the radius of the wheel and the gear ratio. An example is – Pololu hall effect
encoder ( 64 cycle per revolution ) [ 54 ]. It has a resolution value of 64 counts per
revolution.
Motor- The focus while selecting the motor is torque and not the velocity ( as proper torque is
needed for rotational motion to obtain the balanced state ).
Arduino Development Board
The microcontroller used for the self balancing robot must have a very good speed as real
time data for the tilt angle is needed to keep the robot in the balanced position [ 55 ]. The
sampling time required must be less than 50 ms [ 56 ]. The Arduino ATmega 2560 processor
has a clock rate which has a maximum value of frequency as 16 MHz [ 57 ]. The sampling
16
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

time is 10 ms which is acceptable. As per our requirement Arduino microcontroller provides
sufficient number of digital input/output (I/O) pins [ 58 ]. The I2P and SPI serial
communication is also supported [ 59 ]. Analog input pins are also available for use. It has 54
digital input/output pins and 15 pins provide PWM output [ 60 ]. The Arduino IDE makes the
programming very easy [ 61 ]. It uses C language. It is open source software [ 62 ]. So,
students can easily use it in their projects.
The cost of Arduino based board is very less. Also, many sensors and devices can be easily
interfaced to the Arduino microcontroller [ 63 ]. Hence, it can be easily used by students in
their projects due to the low cost and enhanced functionality [ 64 ].
The power supply voltage needed for the motors is 12 V – 16 V. The Arduino development
board requires a power supply of 5 V – 15 V. Hence, 2 batteries can be used. A Lithium
battery of 14.8 V and a Ni - MH battery ( 4 x 1.5 V ) can be used.
The architecture of the SBR ( self balancing robot ) consists of a forward loop and a feedback
loop [ 65 ]. In the forward loop, the elements present are the robot and the controller
( sending signals for controlling the motor ) [ 66 ]. In the feedback loop, a complementary
filter is used [ 67 ]. This helps in estimating the tilt angle of the robot by using the readings
from the accelerometer and the gyroscope [ 68 ].
Complementary Filter:
The complementary filter helps to determine the tilt angle. The Gyroscope helps in the
measurement of the robot’s angular velocity [ 69 ]. The accelerometer helps in the
measurement of Y - and Z - components of the acceleration ( gravitational ) [ 70 ]. Using the
control for balancing, the tilt angle correction can be done for maintaining the robot in
upright position using the movement of wheels [ 71 ]. Hence, an accurate value of θ ( tilt
17
sufficient number of digital input/output (I/O) pins [ 58 ]. The I2P and SPI serial
communication is also supported [ 59 ]. Analog input pins are also available for use. It has 54
digital input/output pins and 15 pins provide PWM output [ 60 ]. The Arduino IDE makes the
programming very easy [ 61 ]. It uses C language. It is open source software [ 62 ]. So,
students can easily use it in their projects.
The cost of Arduino based board is very less. Also, many sensors and devices can be easily
interfaced to the Arduino microcontroller [ 63 ]. Hence, it can be easily used by students in
their projects due to the low cost and enhanced functionality [ 64 ].
The power supply voltage needed for the motors is 12 V – 16 V. The Arduino development
board requires a power supply of 5 V – 15 V. Hence, 2 batteries can be used. A Lithium
battery of 14.8 V and a Ni - MH battery ( 4 x 1.5 V ) can be used.
The architecture of the SBR ( self balancing robot ) consists of a forward loop and a feedback
loop [ 65 ]. In the forward loop, the elements present are the robot and the controller
( sending signals for controlling the motor ) [ 66 ]. In the feedback loop, a complementary
filter is used [ 67 ]. This helps in estimating the tilt angle of the robot by using the readings
from the accelerometer and the gyroscope [ 68 ].
Complementary Filter:
The complementary filter helps to determine the tilt angle. The Gyroscope helps in the
measurement of the robot’s angular velocity [ 69 ]. The accelerometer helps in the
measurement of Y - and Z - components of the acceleration ( gravitational ) [ 70 ]. Using the
control for balancing, the tilt angle correction can be done for maintaining the robot in
upright position using the movement of wheels [ 71 ]. Hence, an accurate value of θ ( tilt
17

angle ) is required. The gyroscope is used to determine the angle. Gyroscope measures the
angular velocity which can be integrated to give the angle value. But the reading contains
noise also. So, the noise value also gets integrated along with the angular velocity [ 72 ]. So,
the result of integration will not give the correct angle. A second method is the direction
cosine method which can be applied to the accelerometer readings [ 73 ]. But the readings of
accelerometer also contain noise due to accelerating motion of robot and the readings contain
components other than the gravity components of acceleration[ 74 ]. The solution of this
problem lies in using a complementary filter [ 75 ]. Let the reading of accelerometer be ‘ θ ’
and that of gyroscope be θ’.
Let the estimated bias of the gyroscope be ‘ b ’. The estimated angular velocity , w = θ’ - b .
The integration of the value of ‘ w ’ gives the value of estimated angle ( θ ).
Once the filter is tuned, the performance of the filter can be tested with noise using
simulations [ 76 ]. The value of ‘ θ ’ can be determined using 3 methods: Integration of the
angular velocity ( divergent results ), the direction cosine method ( stable results ) and by
using complementary filter [ 77 ]. The last method gives the best results.
Dynamic Model; For the design of a controller for balancing the robot, a dynamic model is
designed. On the basis of non-linear models available, linearized models have been found
[ 23 , 24 , 25 ].
A PID controller can be used here ( proportional – integral - Differential )
It is generally used in modern applications of the industry. The complementary filter
generates the estimated values of w ( angular velocity ) and θ ( angle ). Using PID controller,
the amplification of noise present in the value is avoided. The value of ‘w’ is multiplied by
18
angular velocity which can be integrated to give the angle value. But the reading contains
noise also. So, the noise value also gets integrated along with the angular velocity [ 72 ]. So,
the result of integration will not give the correct angle. A second method is the direction
cosine method which can be applied to the accelerometer readings [ 73 ]. But the readings of
accelerometer also contain noise due to accelerating motion of robot and the readings contain
components other than the gravity components of acceleration[ 74 ]. The solution of this
problem lies in using a complementary filter [ 75 ]. Let the reading of accelerometer be ‘ θ ’
and that of gyroscope be θ’.
Let the estimated bias of the gyroscope be ‘ b ’. The estimated angular velocity , w = θ’ - b .
The integration of the value of ‘ w ’ gives the value of estimated angle ( θ ).
Once the filter is tuned, the performance of the filter can be tested with noise using
simulations [ 76 ]. The value of ‘ θ ’ can be determined using 3 methods: Integration of the
angular velocity ( divergent results ), the direction cosine method ( stable results ) and by
using complementary filter [ 77 ]. The last method gives the best results.
Dynamic Model; For the design of a controller for balancing the robot, a dynamic model is
designed. On the basis of non-linear models available, linearized models have been found
[ 23 , 24 , 25 ].
A PID controller can be used here ( proportional – integral - Differential )
It is generally used in modern applications of the industry. The complementary filter
generates the estimated values of w ( angular velocity ) and θ ( angle ). Using PID controller,
the amplification of noise present in the value is avoided. The value of ‘w’ is multiplied by
18

Kd (differential gain). The value of θ is multiplied by Kp ( proportional gain ). The
integration of θ and multiplication by Ki ( integral gain ) is done by 3rd part.
PID Controller Tuning :
In the process of tuning, the parameters of a PID controller ( Kp = proportional gain, Kd =
derivative gain and Ki = integral gain ) are changed to get the desired results. The value of
Kp ( proportional gain constant ) varies directly with respect to the error value. So, a change
in the value of Kp changes error value [ 76 ]. A small value of Kp will not allow the
minimisation of the error and give a slow response [ 77 ]. A large value of Kp will make the
system unstable and give oscillations [ 78 ]. The integral gain constant ( Ki ) takes the past
values of the error into account and then integrates it to give the integrated term taking into
consideration all the past errors and gives next Ki value based on past error values [ 79 ]. If
Ki is large, then higher value of accumulated error is obtained [ 80 ]. The derivative gain
constant Kd helps to predict the future value of the error on the basis of rate of error change
[ 81 ]. Due to this , stability is improved due to damping of the system. If a small change in
Ki occurs, the system also shows the change [ 82 ]. The values of Kp, Kd and Ki can be
changed manually to obtain stability [ 83 ]. At the initial stage, the values of Kp, Kd and Ki
are set at zero value. The value of Kp is initially ‘ 0 ’and then slowly increased until the
system starts oscillating about the mean position. As the value of Kp increases, the system
response also increases slowly [ 84 ]. Now, this value of ‘ Kp ’ is maintained and the value of
‘ Ki ’ is increased from the initial value of ‘0’. The value of ‘ Ki ’ is increased until a stage is
reached when the system is inclined at a small angle in a direction, it provides an acceleration
to the system in that direction [ 85 ]. Once the values of ‘ Kp ’ and ‘ Ki ’ are set, the value of
‘ Kd ’ is then increased. This helps to reduce the acceleration [ 86 ]. The ‘ Kd ’ parameter
helps to reduce the oscillations and overshoots. Finally, the system is fine tuned. The above
19
integration of θ and multiplication by Ki ( integral gain ) is done by 3rd part.
PID Controller Tuning :
In the process of tuning, the parameters of a PID controller ( Kp = proportional gain, Kd =
derivative gain and Ki = integral gain ) are changed to get the desired results. The value of
Kp ( proportional gain constant ) varies directly with respect to the error value. So, a change
in the value of Kp changes error value [ 76 ]. A small value of Kp will not allow the
minimisation of the error and give a slow response [ 77 ]. A large value of Kp will make the
system unstable and give oscillations [ 78 ]. The integral gain constant ( Ki ) takes the past
values of the error into account and then integrates it to give the integrated term taking into
consideration all the past errors and gives next Ki value based on past error values [ 79 ]. If
Ki is large, then higher value of accumulated error is obtained [ 80 ]. The derivative gain
constant Kd helps to predict the future value of the error on the basis of rate of error change
[ 81 ]. Due to this , stability is improved due to damping of the system. If a small change in
Ki occurs, the system also shows the change [ 82 ]. The values of Kp, Kd and Ki can be
changed manually to obtain stability [ 83 ]. At the initial stage, the values of Kp, Kd and Ki
are set at zero value. The value of Kp is initially ‘ 0 ’and then slowly increased until the
system starts oscillating about the mean position. As the value of Kp increases, the system
response also increases slowly [ 84 ]. Now, this value of ‘ Kp ’ is maintained and the value of
‘ Ki ’ is increased from the initial value of ‘0’. The value of ‘ Ki ’ is increased until a stage is
reached when the system is inclined at a small angle in a direction, it provides an acceleration
to the system in that direction [ 85 ]. Once the values of ‘ Kp ’ and ‘ Ki ’ are set, the value of
‘ Kd ’ is then increased. This helps to reduce the acceleration [ 86 ]. The ‘ Kd ’ parameter
helps to reduce the oscillations and overshoots. Finally, the system is fine tuned. The above
19
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

mentioned steps can be repeated many times to give the best possible values of gains Kp, Kd
and Ki.
In the complimentary filter, 2 types of filters are present. The low pass filter helps in the
reduction of noise as well as any vibrations from the accelerometer [ 87 ]. The high pass filter
allows the filtration of any drift due to the gyroscope [ 88 ].
An example of the possible values of gains are : Kp = 23, Ki = 38 and Kd = 1.5. If these
values are selected for the parameters , then complete control is obtained on the robot. The
offset values can also be found in order to control the 2 wheel SBR ( self balancing robot ) by
a PID controller by the calibration of MPU 6050. The robot has been balanced using the
calibration of MPU 6050 as well as tuning the PID controller. The calibration of MPU 6050
is done with respect to the ground plane for getting 6 values of offset parameters ( of
accelerometer or gyroscope ). The trial and error method is used to tune the PID controller by
keeping the robot at a position of rest [ 89 ]. Finally, a steady state is obtained using PID
algorithm.
3. Hardware
The hardware required for the project consists of : Microcontroller ( Arduino Uno ),
Gyroscope, Accelerometer, Motor Driver ( H – Bridge ), Battery, Chassis, IR Sensor and
motors.
The motors are directly connected to 5 V batteries or to 5 V pin of the Arduino
microcontroller. Each motor requires 3 wires – 5 V, Gnd and PWM. The PWM is used for the
detection of speed as well as the direction of the motor .
A 4 – bit IR line tracking sensor is used for the line following process.
20
and Ki.
In the complimentary filter, 2 types of filters are present. The low pass filter helps in the
reduction of noise as well as any vibrations from the accelerometer [ 87 ]. The high pass filter
allows the filtration of any drift due to the gyroscope [ 88 ].
An example of the possible values of gains are : Kp = 23, Ki = 38 and Kd = 1.5. If these
values are selected for the parameters , then complete control is obtained on the robot. The
offset values can also be found in order to control the 2 wheel SBR ( self balancing robot ) by
a PID controller by the calibration of MPU 6050. The robot has been balanced using the
calibration of MPU 6050 as well as tuning the PID controller. The calibration of MPU 6050
is done with respect to the ground plane for getting 6 values of offset parameters ( of
accelerometer or gyroscope ). The trial and error method is used to tune the PID controller by
keeping the robot at a position of rest [ 89 ]. Finally, a steady state is obtained using PID
algorithm.
3. Hardware
The hardware required for the project consists of : Microcontroller ( Arduino Uno ),
Gyroscope, Accelerometer, Motor Driver ( H – Bridge ), Battery, Chassis, IR Sensor and
motors.
The motors are directly connected to 5 V batteries or to 5 V pin of the Arduino
microcontroller. Each motor requires 3 wires – 5 V, Gnd and PWM. The PWM is used for the
detection of speed as well as the direction of the motor .
A 4 – bit IR line tracking sensor is used for the line following process.
20

In this project, a line following self - balancing robot has been designed and implemented.
Now a days, There is much interest seen in the field of self - balancing robots. It is not a
stable system naturally. In this task, an autonomous self-balancing robot has been developed.
The robot has to be maintained in the upright position. The tilt angle has to be estimated for
this purpose. For maintaining the stability in the steady state as well as in continuous
position, some automatic devices are required. The examples of such systems are the camera
maintenance for a mobile system, the platform for the mobile guiding system needs to be
stabilized. The use of a relevant gyroscope as well as MEMS accelerometers is helpful in this
case. They can be used in small size models as well as toys. For the maintenance of stability
the gyroscope as well as accelerometer sensors are employed. It can scan 1, 2 or 3 DOF. The
accelerometer and the gyroscope combination can be used for more than 3 DOF scanning.
These sensors provide strong signals. These sensors are changed due to any changes in speed
of response, accuracy or inertia. If there is any fluctuation the output is changed. This helps in
maintaining the platform balanced. For maintaining the robot in desired line, the IR ( infra
red ) sensor is used.
There are various applications of platforms which can stabilize themselves like - automotive,
aerospace or marine industries. The programming can be done by the help of Arduino
software.
The aim in this project is the designing , building and scheduling of a self-balanced robot. A
self developed filter can be used for this purpose. The major purpose is to balance an unstable
robot platform ( using 2 wheels ). The various steps in which the complete project is broken
are explained here. A literature review is done on the complimentary filters. A mathematical
model is developed for the sensor fusion. The complementary filter is implemented and then
it is tuned with the microcontroller.
21
Now a days, There is much interest seen in the field of self - balancing robots. It is not a
stable system naturally. In this task, an autonomous self-balancing robot has been developed.
The robot has to be maintained in the upright position. The tilt angle has to be estimated for
this purpose. For maintaining the stability in the steady state as well as in continuous
position, some automatic devices are required. The examples of such systems are the camera
maintenance for a mobile system, the platform for the mobile guiding system needs to be
stabilized. The use of a relevant gyroscope as well as MEMS accelerometers is helpful in this
case. They can be used in small size models as well as toys. For the maintenance of stability
the gyroscope as well as accelerometer sensors are employed. It can scan 1, 2 or 3 DOF. The
accelerometer and the gyroscope combination can be used for more than 3 DOF scanning.
These sensors provide strong signals. These sensors are changed due to any changes in speed
of response, accuracy or inertia. If there is any fluctuation the output is changed. This helps in
maintaining the platform balanced. For maintaining the robot in desired line, the IR ( infra
red ) sensor is used.
There are various applications of platforms which can stabilize themselves like - automotive,
aerospace or marine industries. The programming can be done by the help of Arduino
software.
The aim in this project is the designing , building and scheduling of a self-balanced robot. A
self developed filter can be used for this purpose. The major purpose is to balance an unstable
robot platform ( using 2 wheels ). The various steps in which the complete project is broken
are explained here. A literature review is done on the complimentary filters. A mathematical
model is developed for the sensor fusion. The complementary filter is implemented and then
it is tuned with the microcontroller.
21

A test rig is designed for the complementary filter. The tuning of filter is done for enhancing
its performance. The chassis for the robot is designed and then accumulated. The code is
designed in the software for reading the data from the sensors and sending outputs to the
actuators. A PID controller is designed for keeping the robot upright. The final step moves
the self - stabilizing robot on the desired line.
The project designs a system which has various applications in industry like in transportation,
medical field or textile industry.
The robot has to be maintained in equilibrium. There are many techniques available for the
same. Small robots can be built using the mathematical filters, accelerometers as well as
gyroscope. If a signal read by the sensor has to be integrated, differentiated or any other
operation has to be performed, then such a system can be useful. The problem encountered
with the gyroscope is that it gives the current value and after some time the values provided
are not correct. The problem with the accelerometer is that it provides real value but it can
provide incorrect angle values due to any vibrations.
An important feature seen in the inverted pendulum system is the existence of zeros ( non –
minimum phase ). This is because an inverted pendulum is an unstable system which tries to
stabilize itself by the help of feedback element. This gives the non – minimum phase zeros.
The step response of such a system shows an under shoot initially. A controller has to be used
to control this. A zero in the right half in the pole – zero plot is the non – minimum phase
zero. The direction will be reversed if the number of zeros given by the transfer function has
to be an odd number. The poles are also lying on right hand side of the pole zero plot. This
makes the system unstable. A system which contains odd number of right hand side real poles
lying to the right of the non – minimum poles, then even a stable controller cannot control the
system. This is seen in inverted pendulum’s transfer function ( linearized ). Due to the
22
its performance. The chassis for the robot is designed and then accumulated. The code is
designed in the software for reading the data from the sensors and sending outputs to the
actuators. A PID controller is designed for keeping the robot upright. The final step moves
the self - stabilizing robot on the desired line.
The project designs a system which has various applications in industry like in transportation,
medical field or textile industry.
The robot has to be maintained in equilibrium. There are many techniques available for the
same. Small robots can be built using the mathematical filters, accelerometers as well as
gyroscope. If a signal read by the sensor has to be integrated, differentiated or any other
operation has to be performed, then such a system can be useful. The problem encountered
with the gyroscope is that it gives the current value and after some time the values provided
are not correct. The problem with the accelerometer is that it provides real value but it can
provide incorrect angle values due to any vibrations.
An important feature seen in the inverted pendulum system is the existence of zeros ( non –
minimum phase ). This is because an inverted pendulum is an unstable system which tries to
stabilize itself by the help of feedback element. This gives the non – minimum phase zeros.
The step response of such a system shows an under shoot initially. A controller has to be used
to control this. A zero in the right half in the pole – zero plot is the non – minimum phase
zero. The direction will be reversed if the number of zeros given by the transfer function has
to be an odd number. The poles are also lying on right hand side of the pole zero plot. This
makes the system unstable. A system which contains odd number of right hand side real poles
lying to the right of the non – minimum poles, then even a stable controller cannot control the
system. This is seen in inverted pendulum’s transfer function ( linearized ). Due to the
22
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

presence of non – minimum phase zeros , the closed loop performance of the system is
constrained. The bandwidth is reduced and the gain margin gets limited. It does not make the
system robust. Cancellation of the non – minimum phase zeros is not possible because a
change of poles and zeros will make the system unstable.
Nowadays, IMUs ( Inertial Measurement Units ) can be used which have algorithms which
lead to fusion of the data. Some examples of IMUs are MPU 6050 ( Inven Sense’s) ,BNO055
( Bosch ). They have in – built sensors that provide accurate orientation to the robot. This
helps to reduce the complexity of the robot. This helps to reduce the complexity of the
microcontroller program. Initially , the system is studied in detail and relevant information is
collected and compiled. The robot is assumed to be in the equilibrium position when it is
upright. Another case can be considered which assures that the centre of mass of the robot
lies above the pivot point. It is also seen that the closed loop system gives a non – minimum
phase response. The PID controller is used for control purpose. It is very easy to implement.
It does not have a need for the state space model. It can be applied to SISO ( Single Input,
Single Output ) systems. A complementary filter is then used which is also very easy in its
implementation. But it has a drawback that noise can easily affect it. The devices used for the
measurement data – the gyroscope and the accelerometer show a bias in the measured values
which is due to temperature as well as the white noise.
The gyroscope is capable of measuring the angular velocity in the unit of radian ( or degree )
per second. The tilt angle can be found using the integration of the angular velocity. The
readings of the gyroscope are taken at discrete intervals of time. Hence, Euler’s method can
be used for the numerical integration. Let the sensor be at ‘0’ degree in the initial position.
Then,
Angle ( t ) = Angle ( t - 1 ) + Angular velocity * dt
23
constrained. The bandwidth is reduced and the gain margin gets limited. It does not make the
system robust. Cancellation of the non – minimum phase zeros is not possible because a
change of poles and zeros will make the system unstable.
Nowadays, IMUs ( Inertial Measurement Units ) can be used which have algorithms which
lead to fusion of the data. Some examples of IMUs are MPU 6050 ( Inven Sense’s) ,BNO055
( Bosch ). They have in – built sensors that provide accurate orientation to the robot. This
helps to reduce the complexity of the robot. This helps to reduce the complexity of the
microcontroller program. Initially , the system is studied in detail and relevant information is
collected and compiled. The robot is assumed to be in the equilibrium position when it is
upright. Another case can be considered which assures that the centre of mass of the robot
lies above the pivot point. It is also seen that the closed loop system gives a non – minimum
phase response. The PID controller is used for control purpose. It is very easy to implement.
It does not have a need for the state space model. It can be applied to SISO ( Single Input,
Single Output ) systems. A complementary filter is then used which is also very easy in its
implementation. But it has a drawback that noise can easily affect it. The devices used for the
measurement data – the gyroscope and the accelerometer show a bias in the measured values
which is due to temperature as well as the white noise.
The gyroscope is capable of measuring the angular velocity in the unit of radian ( or degree )
per second. The tilt angle can be found using the integration of the angular velocity. The
readings of the gyroscope are taken at discrete intervals of time. Hence, Euler’s method can
be used for the numerical integration. Let the sensor be at ‘0’ degree in the initial position.
Then,
Angle ( t ) = Angle ( t - 1 ) + Angular velocity * dt
23

If the initial angle is non – zero , then its initial value has to be considered. As integration is
done , in every iteration the systematic error gets added.
As integration is done, then at each and every iteration the systematic error gets added. Even
if the gyroscope does not move, still the value of angle rises. As the time increases, the bias
size also increases.
The accelerometer is capable of measuring the acceleration with respect to the free fall
acceleration. In order to find the accelerometer’s orientation, it can be assumed that the object
experiences only the gravitational force. Let the 3 components of the force acting be Fx , Fy
and Fz.
The value of angle with respect to the z axis can be given by tan -1 ( y / z ).
The complementary filter can be used to determine the tilt angle. The reading of the
accelerometer is provided to a low pass filter ( LPF ). The reading of the gyroscope is
provided to an integrator and the integrated output is provided to a high pass filter ( HPF ).
The outputs of both the low pass filter ( LPF ) and the high pass filter ( HPF ) are provided to
a summer or adder which gives the value of tilt angle.
A complimentary filter helps to solve this problem. A complimentary filter is a mathematical
filter which is used for mixing and combining 2 values to get the correct result. It is optimal
in nature as it helps to reduce errors in real value of signal obtained. This filter helps to find
out the error in the readings.
3.1 Complementary filter
Complementary filters are widely used in the field of robotics. It is even better than the
Kalman filter. The complementary filter is called so because it consists of both the low pass
filter and the high pass filter. The low frequency signals are generated by the gyroscope and
24
done , in every iteration the systematic error gets added.
As integration is done, then at each and every iteration the systematic error gets added. Even
if the gyroscope does not move, still the value of angle rises. As the time increases, the bias
size also increases.
The accelerometer is capable of measuring the acceleration with respect to the free fall
acceleration. In order to find the accelerometer’s orientation, it can be assumed that the object
experiences only the gravitational force. Let the 3 components of the force acting be Fx , Fy
and Fz.
The value of angle with respect to the z axis can be given by tan -1 ( y / z ).
The complementary filter can be used to determine the tilt angle. The reading of the
accelerometer is provided to a low pass filter ( LPF ). The reading of the gyroscope is
provided to an integrator and the integrated output is provided to a high pass filter ( HPF ).
The outputs of both the low pass filter ( LPF ) and the high pass filter ( HPF ) are provided to
a summer or adder which gives the value of tilt angle.
A complimentary filter helps to solve this problem. A complimentary filter is a mathematical
filter which is used for mixing and combining 2 values to get the correct result. It is optimal
in nature as it helps to reduce errors in real value of signal obtained. This filter helps to find
out the error in the readings.
3.1 Complementary filter
Complementary filters are widely used in the field of robotics. It is even better than the
Kalman filter. The complementary filter is called so because it consists of both the low pass
filter and the high pass filter. The low frequency signals are generated by the gyroscope and
24

the high frequency signals are generated due to any type of vibration in the accelerometer. As
both types of filters are present, the low frequency as well as the high frequency signal
components get filtered out.
Figure 5
A complementary filter is used which is shown in the Figure 5 as it is very easy in its
implementation. But it has a drawback that noise can easily affect it. The devices used for the
measurement data – the gyroscope and the accelerometer show a bias in the measured values
which is due to temperature as well as the white noise.
The gyroscope is capable of measuring the angular velocity in the unit of radian ( or degree )
per second. The tilt angle can be found using the integration of the angular velocity. The
readings of the gyroscope are taken at discrete intervals of time. Hence, Euler’s method can
be used for the numerical integration. Let the sensor be at ‘0’ degree in the initial position.
Then,
Angle ( t ) = Angle ( t - 1 ) + Angular velocity * dt
If the initial angle is non – zero , then its initial value has to be considered. As integration is
done , in every iteration the systematic error gets added.
25
both types of filters are present, the low frequency as well as the high frequency signal
components get filtered out.
Figure 5
A complementary filter is used which is shown in the Figure 5 as it is very easy in its
implementation. But it has a drawback that noise can easily affect it. The devices used for the
measurement data – the gyroscope and the accelerometer show a bias in the measured values
which is due to temperature as well as the white noise.
The gyroscope is capable of measuring the angular velocity in the unit of radian ( or degree )
per second. The tilt angle can be found using the integration of the angular velocity. The
readings of the gyroscope are taken at discrete intervals of time. Hence, Euler’s method can
be used for the numerical integration. Let the sensor be at ‘0’ degree in the initial position.
Then,
Angle ( t ) = Angle ( t - 1 ) + Angular velocity * dt
If the initial angle is non – zero , then its initial value has to be considered. As integration is
done , in every iteration the systematic error gets added.
25
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

As integration is done, then at each and every iteration the systematic error gets added. Even
if the gyroscope does not move, still the value of angle rises. As the time increases, the bias
size also increases.
The accelerometer is capable of measuring the acceleration with respect to the free fall
acceleration. In order to find the accelerometer’s orientation, it can be assumed that the object
experiences only the gravitational force. Let the 3 components of the force acting be Fx , Fy
and Fz.
The value of angle with respect to the z axis can be given by tan -1 ( y / z ).
The complementary filter can be used to determine the tilt angle. The reading of the
accelerometer is provided to a low pass filter ( LPF ). The reading of the gyroscope is
provided to an integrator and the integrated output is provided to a high pass filter ( HPF ).
The outputs of both the low pass filter ( LPF ) and the high pass filter ( HPF ) are provided to
a summer or adder which gives the value of tilt angle.
A complimentary filter helps to solve this problem. A complimentary filter is a mathematical
filter which is used for mixing and combining 2 values to get the correct result. It is optimal
in nature as it helps to reduce errors in real value of signal obtained. This filter helps to find
out the error in the readings.
3.2 Gyroscope
A gyroscope is used for the measurement of the angle of rotation with respect to one or more
than one axes. They are capable of measuring any type of complex movement in free space
with accuracy. A motion sensor is needed for tracking the exact position as well as any
rotational motion in a body.
26
if the gyroscope does not move, still the value of angle rises. As the time increases, the bias
size also increases.
The accelerometer is capable of measuring the acceleration with respect to the free fall
acceleration. In order to find the accelerometer’s orientation, it can be assumed that the object
experiences only the gravitational force. Let the 3 components of the force acting be Fx , Fy
and Fz.
The value of angle with respect to the z axis can be given by tan -1 ( y / z ).
The complementary filter can be used to determine the tilt angle. The reading of the
accelerometer is provided to a low pass filter ( LPF ). The reading of the gyroscope is
provided to an integrator and the integrated output is provided to a high pass filter ( HPF ).
The outputs of both the low pass filter ( LPF ) and the high pass filter ( HPF ) are provided to
a summer or adder which gives the value of tilt angle.
A complimentary filter helps to solve this problem. A complimentary filter is a mathematical
filter which is used for mixing and combining 2 values to get the correct result. It is optimal
in nature as it helps to reduce errors in real value of signal obtained. This filter helps to find
out the error in the readings.
3.2 Gyroscope
A gyroscope is used for the measurement of the angle of rotation with respect to one or more
than one axes. They are capable of measuring any type of complex movement in free space
with accuracy. A motion sensor is needed for tracking the exact position as well as any
rotational motion in a body.
26

Gyroscope provides the angular velocity θ’ which is integrated to give the angle value and the
accelerometer reading gives the value of θ. These are used to find the bias in the angular
velocity measured by gyroscope.
. θ’ – b’’ = w’’ = angular velocity estimated
Integrate ( w’’ ) = θ’’ = angle estimated
3.3 Accelerometer:
An accelerometer can be used for the measurement of linear acceleration as well as the
inclination angle. The magnitude as well as the direction of acceleration ( linear and
gravitational ) can be found using single as well as multi axle devices. The limited movement
can also be sensed using it.
3.4 Software:
The software used for generating the program is Arduino which can be used with the Arduino
uno microcontroller. The language used is the C language. The complete code can be divided
into 4 sections-main code, motors ( connection by H-Bridge ) , PID Controller
( complementary filter ) and sensor ( gyroscope , Accelerometer , IR Sensor ). The sequence
of events followed are as follows: Initially, the previous literature is read thoroughly. Then,
out of the available methods, we select our methodology. The design is then implemented on
both hardware as well as the software. The project is then tested and finalised.
27
accelerometer reading gives the value of θ. These are used to find the bias in the angular
velocity measured by gyroscope.
. θ’ – b’’ = w’’ = angular velocity estimated
Integrate ( w’’ ) = θ’’ = angle estimated
3.3 Accelerometer:
An accelerometer can be used for the measurement of linear acceleration as well as the
inclination angle. The magnitude as well as the direction of acceleration ( linear and
gravitational ) can be found using single as well as multi axle devices. The limited movement
can also be sensed using it.
3.4 Software:
The software used for generating the program is Arduino which can be used with the Arduino
uno microcontroller. The language used is the C language. The complete code can be divided
into 4 sections-main code, motors ( connection by H-Bridge ) , PID Controller
( complementary filter ) and sensor ( gyroscope , Accelerometer , IR Sensor ). The sequence
of events followed are as follows: Initially, the previous literature is read thoroughly. Then,
out of the available methods, we select our methodology. The design is then implemented on
both hardware as well as the software. The project is then tested and finalised.
27

Figure 6
The Figure 6 shows the implementation of a PID controller. A adder is used which subtracts
the value of feedback signal from the desired state. It is desired that the difference must be
minimum. The PID controller consists of 3 elements connected in parallel – Proportional,
Integral and Differential part. The control signal generated by the PID controller is then fed to
the next stage. The controller does not allow the output to go beyond a certain limit and
avoids any instability in the system.
4. Implementation
A proper planning is necessary in implementing any type of project. This project also consists
of various stages. If the complete project is divided into small stages, parts or activities and
time frame provided for their completion, then this helps in completing the project on time
with good quality. There are various ways in which the project can be planned properly.
28
The Figure 6 shows the implementation of a PID controller. A adder is used which subtracts
the value of feedback signal from the desired state. It is desired that the difference must be
minimum. The PID controller consists of 3 elements connected in parallel – Proportional,
Integral and Differential part. The control signal generated by the PID controller is then fed to
the next stage. The controller does not allow the output to go beyond a certain limit and
avoids any instability in the system.
4. Implementation
A proper planning is necessary in implementing any type of project. This project also consists
of various stages. If the complete project is divided into small stages, parts or activities and
time frame provided for their completion, then this helps in completing the project on time
with good quality. There are various ways in which the project can be planned properly.
28
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Some of the ways have been discussed here. The Gantt chart is the best method as it helps to
represent the data or flow of work pictorially and is really a helpful tool.
4.1 Gantt chart:
The Gantt chart has been prepared for line following self balancing robot. The timeline has
been shown in the Gantt Chart. It helps to divide the complete project into small tasks.
Certain time is specified as start date and end date for each task. This gives an idea as to how
much time is spent on each task. Initially, the literature review is done. Next, the purpose and
research papers are studied thoroughly. The hardware components are then selected as per the
specifications needed and then purchased. The proper software is selected for program
generation. The program is then written using C language. Next, the program is tested and
simulated. The hardware and the software parts are then combined. The complementary filter
is implemented. The final product is then tested. The complete process takes around 80 days.
Figure 7
29
represent the data or flow of work pictorially and is really a helpful tool.
4.1 Gantt chart:
The Gantt chart has been prepared for line following self balancing robot. The timeline has
been shown in the Gantt Chart. It helps to divide the complete project into small tasks.
Certain time is specified as start date and end date for each task. This gives an idea as to how
much time is spent on each task. Initially, the literature review is done. Next, the purpose and
research papers are studied thoroughly. The hardware components are then selected as per the
specifications needed and then purchased. The proper software is selected for program
generation. The program is then written using C language. Next, the program is tested and
simulated. The hardware and the software parts are then combined. The complementary filter
is implemented. The final product is then tested. The complete process takes around 80 days.
Figure 7
29

The Gantt chart for the project under consideration is shown in the figure 7. The various
stages included in it are : Literature review for the self – balancing robot , study of purpose of
the project by the help of previous research papers, the selection of components for designing
the hardware, purchase of the components used in the hardware, selection of the software for
coding and programming the system, testing of the system using simulation, combining the
hardware and the software part to give the complete system, implementing a complementary
filter and finally the product is tested. Adequate time is provided to each stage to ensure
timely project completion.
4.2 Risk:
The risk assessment has also been done for the various stages involved in the project. Several
risks have been identified related to various steps in the project. A risk assessment matrix has
been created. The first risk may due to any high voltage which can burn the equipment
involved. So, care must be taken while using the mains supply. The circuit must be properly
checked to avoid any short circuit when the power is turned on. Any type of short circuit may
lead to the failure of equipment. The various components must be placed rightly ( neat and
tidy ) to avoid fall or slip to avoid any physical harm. Any type of risk in using the equipment
must be well known. Any hot material must be kept safely to avoid burning incidents.
A self balancing robot consisting of 2 wheels can be made to adjust itself in case of any
change in position or weight. Its balanced model can be designed using a system consisting of
a gyroscope and an accelerometer. A microcontroller can be used for creating the controller
like PID controller. This controller can be used to find any change in the position. The motors
present in the system are controlled in such a manner that the overall system stays in a state
of equilibrium. A self balancing robot consisting of 2 wheels can be compared to the system
containing an inverted pendulum. For balancing as well as maneuvering purpose, a dynamic
balancing system can be used. The system is very robust and efficient, has a small size and
30
stages included in it are : Literature review for the self – balancing robot , study of purpose of
the project by the help of previous research papers, the selection of components for designing
the hardware, purchase of the components used in the hardware, selection of the software for
coding and programming the system, testing of the system using simulation, combining the
hardware and the software part to give the complete system, implementing a complementary
filter and finally the product is tested. Adequate time is provided to each stage to ensure
timely project completion.
4.2 Risk:
The risk assessment has also been done for the various stages involved in the project. Several
risks have been identified related to various steps in the project. A risk assessment matrix has
been created. The first risk may due to any high voltage which can burn the equipment
involved. So, care must be taken while using the mains supply. The circuit must be properly
checked to avoid any short circuit when the power is turned on. Any type of short circuit may
lead to the failure of equipment. The various components must be placed rightly ( neat and
tidy ) to avoid fall or slip to avoid any physical harm. Any type of risk in using the equipment
must be well known. Any hot material must be kept safely to avoid burning incidents.
A self balancing robot consisting of 2 wheels can be made to adjust itself in case of any
change in position or weight. Its balanced model can be designed using a system consisting of
a gyroscope and an accelerometer. A microcontroller can be used for creating the controller
like PID controller. This controller can be used to find any change in the position. The motors
present in the system are controlled in such a manner that the overall system stays in a state
of equilibrium. A self balancing robot consisting of 2 wheels can be compared to the system
containing an inverted pendulum. For balancing as well as maneuvering purpose, a dynamic
balancing system can be used. The system is very robust and efficient, has a small size and
30

requires lesser power. The system can be used in surveillance activities and for transporting.
The electro-mechanical system as well as the proper algorithm for controlling the robot is
essential as the parameters may change dynamically. The main principle behind balancing the
robot is as follows : If the bot is tilted through an angle, then a pseudo force is experienced by
its centre of mass. This helps in the application of a torque in a direction which is opposite to
the direction of tilt of the bot. For self balancing, a PID controller can be used. The complete
system can be designed using mobile robot kit as well as motors, a PID controller and a
microcontroller. The Arduino microcontroller can be used. Other devices needed are the
gyroscope and an accelerometer. The platform can be controlled using a combination of the
above mentioned components. An initial angle is selected as reference for the platform. The
controller is designed in such a manner that in case the bot gets tilted, it maintains the
platform at initial angle chosen. The various parameters related to the PID controller are Kp,
Ki and Kd. These values are provided to the Arduino microcontroller also. The accelerometer
provides the data in digital format. The program written in the software must convert this data
into the magnitude of acceleration. It can be compared with the chosen value initially. This
helps to determine platform’s angle of tilt. As per the angle of tilt, the motors are made to
work to provide an angle of rotation.
4.3 Block Diagram:
31
The electro-mechanical system as well as the proper algorithm for controlling the robot is
essential as the parameters may change dynamically. The main principle behind balancing the
robot is as follows : If the bot is tilted through an angle, then a pseudo force is experienced by
its centre of mass. This helps in the application of a torque in a direction which is opposite to
the direction of tilt of the bot. For self balancing, a PID controller can be used. The complete
system can be designed using mobile robot kit as well as motors, a PID controller and a
microcontroller. The Arduino microcontroller can be used. Other devices needed are the
gyroscope and an accelerometer. The platform can be controlled using a combination of the
above mentioned components. An initial angle is selected as reference for the platform. The
controller is designed in such a manner that in case the bot gets tilted, it maintains the
platform at initial angle chosen. The various parameters related to the PID controller are Kp,
Ki and Kd. These values are provided to the Arduino microcontroller also. The accelerometer
provides the data in digital format. The program written in the software must convert this data
into the magnitude of acceleration. It can be compared with the chosen value initially. This
helps to determine platform’s angle of tilt. As per the angle of tilt, the motors are made to
work to provide an angle of rotation.
4.3 Block Diagram:
31
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 8 . Complementary filter – Block diagram
The block diagram shown in Figure 8 consists of various blocks like PID controller, motors,
motor drivers, accelerometer, gyroscope and a filter. The complete bot needs to be balanced
using only 2 wheels. To provide the necessary friction, grip must be maintained. The robot
must remain in the vertical position. The inclination angle needs to be monitored
continuously and the motors must be capable of moving it in the forward as well as the
backward direction at an angle of 0 degree. The accelerometer is capable of sensing both the
static forces ( like gravitational force ) as well as the dynamic forces ( like vibrational force
or motion ). A gyroscope is capable of measuring the angular velocity. The angle can be
obtained upon integration of the angular velocity. A filter can be used to process the sensor’s
outputs. Let the reference value be ‘ r ’ and the value measured by the sensor be ‘ m ’ . So,
the error value is produced as ‘ r – m ’. The PID controller is given an input value of this
error. The PID controller provides an output such that this error reduces to a value of ‘ 0 ’ .
This helps to maintain the balance.
The figure 8 shows the block diagram of the complete system. The reference value which is
assumed to be 0 radian in this case is given to an adder block. The accelerometer and the
gyroscope reading is provided to the complementary filter which helps to produce the value
of the tilt angle. This is also given to the adder block. The output of the adder block may not
32
The block diagram shown in Figure 8 consists of various blocks like PID controller, motors,
motor drivers, accelerometer, gyroscope and a filter. The complete bot needs to be balanced
using only 2 wheels. To provide the necessary friction, grip must be maintained. The robot
must remain in the vertical position. The inclination angle needs to be monitored
continuously and the motors must be capable of moving it in the forward as well as the
backward direction at an angle of 0 degree. The accelerometer is capable of sensing both the
static forces ( like gravitational force ) as well as the dynamic forces ( like vibrational force
or motion ). A gyroscope is capable of measuring the angular velocity. The angle can be
obtained upon integration of the angular velocity. A filter can be used to process the sensor’s
outputs. Let the reference value be ‘ r ’ and the value measured by the sensor be ‘ m ’ . So,
the error value is produced as ‘ r – m ’. The PID controller is given an input value of this
error. The PID controller provides an output such that this error reduces to a value of ‘ 0 ’ .
This helps to maintain the balance.
The figure 8 shows the block diagram of the complete system. The reference value which is
assumed to be 0 radian in this case is given to an adder block. The accelerometer and the
gyroscope reading is provided to the complementary filter which helps to produce the value
of the tilt angle. This is also given to the adder block. The output of the adder block may not
32

be in the controlled form. Hence, a PID controller is used with suitable parameters to provide
controlled output. The output of the PID controller is given to one of the motors based on the
control direction chosen. If the tilt angle is positive then forward direction is chosen and if the
tilt angle is negative, then the backward direction is chosen. Accordingly right motor or left
motor is activated. These motors help to provide motion to the wheels which help to rectify
the tilt angle which finally gives the upright position with the angle becoming equal to the
reference angle. When the tilt angle becomes equal to the reference angle, then the robot is in
the upright position which is the very purpose of the self – balancing robot.
IMU sensor - An IMU sensor is a device which can accept the angular velocity as a well as
the linear acceleration as input. It then sends it to the microcontroller. It consists of 2 sensors
- an accelerometer and a gyroscope . The accelerometer provides the acceleration as per 3
axes. It provides 3 different analog signals. The gyroscope also provides 3 analog signals
which give the angular velocities about 3 axis of sensor. The microcontroller takes the data
from this sensor. For this purpose, serial communication ( UART – RS 422 ) is used at 10 Hz.
Also, the analog signals are converted into the digital signals. The IMU sensor may not be
placed at the centre of mass of the vehicle.
MPU 6050 is used as IMU sensor. The chip is having a 3 axis accelerometer and a 3 – axis
gyroscope. So, 6 degrees of freedom are present. The MPU – 6050 is a 3.3 V I.C. . The
working range of the voltage is 2.375 V – 3.46 V ( as per the data sheet ). It consists of a
regulator inside it. So it can be powered using 5 V from Arduino microcontroller. A 16 – bit
ADC ( Analog to digital converter ) is also present for every channel. A DMP ( Digital
Motion Processor ) input also exists which helps in combining the sensor data and doing
calculations for minimization of the error.
33
controlled output. The output of the PID controller is given to one of the motors based on the
control direction chosen. If the tilt angle is positive then forward direction is chosen and if the
tilt angle is negative, then the backward direction is chosen. Accordingly right motor or left
motor is activated. These motors help to provide motion to the wheels which help to rectify
the tilt angle which finally gives the upright position with the angle becoming equal to the
reference angle. When the tilt angle becomes equal to the reference angle, then the robot is in
the upright position which is the very purpose of the self – balancing robot.
IMU sensor - An IMU sensor is a device which can accept the angular velocity as a well as
the linear acceleration as input. It then sends it to the microcontroller. It consists of 2 sensors
- an accelerometer and a gyroscope . The accelerometer provides the acceleration as per 3
axes. It provides 3 different analog signals. The gyroscope also provides 3 analog signals
which give the angular velocities about 3 axis of sensor. The microcontroller takes the data
from this sensor. For this purpose, serial communication ( UART – RS 422 ) is used at 10 Hz.
Also, the analog signals are converted into the digital signals. The IMU sensor may not be
placed at the centre of mass of the vehicle.
MPU 6050 is used as IMU sensor. The chip is having a 3 axis accelerometer and a 3 – axis
gyroscope. So, 6 degrees of freedom are present. The MPU – 6050 is a 3.3 V I.C. . The
working range of the voltage is 2.375 V – 3.46 V ( as per the data sheet ). It consists of a
regulator inside it. So it can be powered using 5 V from Arduino microcontroller. A 16 – bit
ADC ( Analog to digital converter ) is also present for every channel. A DMP ( Digital
Motion Processor ) input also exists which helps in combining the sensor data and doing
calculations for minimization of the error.
33

An auto – caliberator is also present in it. It can itself perform the calculations. The gyroscope
can measure the angular velocity with respect to the axis . On integration, it can provide the
tilt angle or angular displacement. Angle of the robot can be found using the accelerometer
reading. The output of both the sensors is provided to a filter. It processes this information to
provide a stable state.
5. Designing
5.1 Control System :
The control system helps in maintaining the balance of the robot. Here, a PID ( Proportional ,
Integral and Derivative ) controller is used. It consists of 3 terms. The error is provided as an
input to the PID controller. Also Kp = proportional constant , Ki = Integral constant and Kd =
Derivative constant. The term Ki helps to reduce the steady state error ( and move the robot
to mean position faster ) and Kd helps in handling the overshoot ( avoid sudden change or
deviation). The value of error is found by the difference of the reference value and the current
accelerometer and gyrometer reading. The term Kp helps in increasing the motor power ( if
system is leaning ) and in decreasing the motor power ( if system is upright ).
The PID controller provides an output which helps to balance the system. The PWM signal is
provided to the motor which consists of 3 terms – Proportional term, Integral term and the
differential term.
Initially, Ki = Kd = 0 and Kp is increased slowly till oscillations start in the system. Then , Ki
is increased slowly till oscillations start again and then Kd is increased slowly till system
stops oscillations and becomes stable.
The motor PWM output equation is :
Error in motor’s speed = Set point of the motor – Present reading of speed in motor
34
can measure the angular velocity with respect to the axis . On integration, it can provide the
tilt angle or angular displacement. Angle of the robot can be found using the accelerometer
reading. The output of both the sensors is provided to a filter. It processes this information to
provide a stable state.
5. Designing
5.1 Control System :
The control system helps in maintaining the balance of the robot. Here, a PID ( Proportional ,
Integral and Derivative ) controller is used. It consists of 3 terms. The error is provided as an
input to the PID controller. Also Kp = proportional constant , Ki = Integral constant and Kd =
Derivative constant. The term Ki helps to reduce the steady state error ( and move the robot
to mean position faster ) and Kd helps in handling the overshoot ( avoid sudden change or
deviation). The value of error is found by the difference of the reference value and the current
accelerometer and gyrometer reading. The term Kp helps in increasing the motor power ( if
system is leaning ) and in decreasing the motor power ( if system is upright ).
The PID controller provides an output which helps to balance the system. The PWM signal is
provided to the motor which consists of 3 terms – Proportional term, Integral term and the
differential term.
Initially, Ki = Kd = 0 and Kp is increased slowly till oscillations start in the system. Then , Ki
is increased slowly till oscillations start again and then Kd is increased slowly till system
stops oscillations and becomes stable.
The motor PWM output equation is :
Error in motor’s speed = Set point of the motor – Present reading of speed in motor
34
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Output proportional term = Kp * Error in motor speed
Output integral term = Ki * Sum of Error in motor speed
Output Differential term = Kd * ( Error in motor speed – Last error )
The concept behind a self balancing robot is that of an inverted pendulum. The inverted
pendulum has to be maintained in upright position when it is placed in a cart ( the cart can
make a movement on horizontal axis ). This type of system is unstable. A gyroscope and an
accelerometer can be used to measure the angle. But both of them do not give error free
results. Hence, a filter is required for refining the results. A filter like Kalman filter can be
used in this case. But it is very tiring and long process. The implementation is tough even for
8-bit microcontroller. Another filter which can be used is the complementary filter.
5.2 PID Controller
Let us assume that the linearized model [ 90 ] gives the transfer function as :
.θ ( s ) / Va ( s ) = G ( s ) = 6.304s / (s3 + 23.68 s2 – 135.7 s – 2162)
Here , θ is the tilt angle
Va = Input voltage of motor.
The Transfer function of PID controller can be given as: Kp + Kd . s + Ki / s
The root locus diagram can be designed for the PID controller.
35
Output integral term = Ki * Sum of Error in motor speed
Output Differential term = Kd * ( Error in motor speed – Last error )
The concept behind a self balancing robot is that of an inverted pendulum. The inverted
pendulum has to be maintained in upright position when it is placed in a cart ( the cart can
make a movement on horizontal axis ). This type of system is unstable. A gyroscope and an
accelerometer can be used to measure the angle. But both of them do not give error free
results. Hence, a filter is required for refining the results. A filter like Kalman filter can be
used in this case. But it is very tiring and long process. The implementation is tough even for
8-bit microcontroller. Another filter which can be used is the complementary filter.
5.2 PID Controller
Let us assume that the linearized model [ 90 ] gives the transfer function as :
.θ ( s ) / Va ( s ) = G ( s ) = 6.304s / (s3 + 23.68 s2 – 135.7 s – 2162)
Here , θ is the tilt angle
Va = Input voltage of motor.
The Transfer function of PID controller can be given as: Kp + Kd . s + Ki / s
The root locus diagram can be designed for the PID controller.
35

Figure 9
The Figure 9 shows the pole zero plot for the transfer function. It shows a real right hand pole
and 2 real left hand poles. There are also 2 imaginary left hand zeros seen in the diagram.
Figure 10
When the filter designed is tuned, then with the noise considered, the angle value with respect
to time is shown in figure 10. The value of angle is obtained using 3 methods—one is
estimation of θ ( blue colour ), other is the integration of the angular velocity measured ( red
36
The Figure 9 shows the pole zero plot for the transfer function. It shows a real right hand pole
and 2 real left hand poles. There are also 2 imaginary left hand zeros seen in the diagram.
Figure 10
When the filter designed is tuned, then with the noise considered, the angle value with respect
to time is shown in figure 10. The value of angle is obtained using 3 methods—one is
estimation of θ ( blue colour ), other is the integration of the angular velocity measured ( red
36

colour - it shows divergent results ) and third is the direction cosine matrix method ( green
colour ). The third method gives stable results by the effect of noise is very large.
Figure 11
Once the controller is used, the output becomes controlled as shown in the figure 11.
Figure 12
If the tilt angle value obtained is plotted with respect to time then the graph is obtained as
shown in the Figure 12 using a complementary filter. It can be seen that the oscillations are
observed till 25 seconds time.
37
colour ). The third method gives stable results by the effect of noise is very large.
Figure 11
Once the controller is used, the output becomes controlled as shown in the figure 11.
Figure 12
If the tilt angle value obtained is plotted with respect to time then the graph is obtained as
shown in the Figure 12 using a complementary filter. It can be seen that the oscillations are
observed till 25 seconds time.
37
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Figure 13. PWM for High pass filter coefficient h = 0.98
The Figure 13 shows the PWM output for the value of high pass filter coefficient is taken as
0.98.
38
The Figure 13 shows the PWM output for the value of high pass filter coefficient is taken as
0.98.
38

Figure 14 PWM for High pass filter coefficient, h = 0.94
The Figure 14 shows the PWM output for the value of high pass filter coefficient is taken as
0.94.
Figure 15
The value of Tilt angle with respect to time as obtained finally is shown in figure 15. It gives
almost a constant value of the angle as desired by the system.
5.3 Design of Complementary filter.
If θ = angle measured using accelerometer.
. θ’ = angular velocity measured using gyroscope.
. θ’’ = estimated angle for the balancing robot
e = estimated error between θ and θ’’ measured
b = gyro bias estimated
w’’ = angular velocity estimated
Kp = proportional gain
39
The Figure 14 shows the PWM output for the value of high pass filter coefficient is taken as
0.94.
Figure 15
The value of Tilt angle with respect to time as obtained finally is shown in figure 15. It gives
almost a constant value of the angle as desired by the system.
5.3 Design of Complementary filter.
If θ = angle measured using accelerometer.
. θ’ = angular velocity measured using gyroscope.
. θ’’ = estimated angle for the balancing robot
e = estimated error between θ and θ’’ measured
b = gyro bias estimated
w’’ = angular velocity estimated
Kp = proportional gain
39

Ki = integral gain
Gyroscope provides the angular velocity θ’ which is integrated to give the angle value and the
accelerometer reading gives the value of θ. These are used to find the bias in the angular
velocity measured by gyroscope.
. θ’ – b’’ = w’’ = angular velocity estimated
Integrate ( w’’ ) = θ’’ = angle estimated
When the filter designed is tuned, then with the noise considered, the angle value with respect
to time is shown in figure. The value of angle is obtained using 3 methods—one is estimation
of θ ( blue colour ), other is the integration of the angular velocity measured ( red colour - it
shows divergent results ) and third is the direction cosine matrix method ( green colour ). The
third method gives stable results by the effect of noise is very large.
In the block diagram, ‘ 1 / s ’ helps to integrate the expression. The best results have been
obtained by using the complementary filter to estimate the angle.
5.4 Design of PID Controller.
A self balancing robot can be balanced in an easier way in case the position of the centre of
mass is above the axis of the wheel. If the centre of mass is at a higher position , then the
moment of inertia increases due to which the angular acceleration decreases. Using the PID
controller, the error ( difference between the input and output ) can be reduced to a minimum
value by altering the output value. This helps to keep the robot in an upright position. The 2
40
Gyroscope provides the angular velocity θ’ which is integrated to give the angle value and the
accelerometer reading gives the value of θ. These are used to find the bias in the angular
velocity measured by gyroscope.
. θ’ – b’’ = w’’ = angular velocity estimated
Integrate ( w’’ ) = θ’’ = angle estimated
When the filter designed is tuned, then with the noise considered, the angle value with respect
to time is shown in figure. The value of angle is obtained using 3 methods—one is estimation
of θ ( blue colour ), other is the integration of the angular velocity measured ( red colour - it
shows divergent results ) and third is the direction cosine matrix method ( green colour ). The
third method gives stable results by the effect of noise is very large.
In the block diagram, ‘ 1 / s ’ helps to integrate the expression. The best results have been
obtained by using the complementary filter to estimate the angle.
5.4 Design of PID Controller.
A self balancing robot can be balanced in an easier way in case the position of the centre of
mass is above the axis of the wheel. If the centre of mass is at a higher position , then the
moment of inertia increases due to which the angular acceleration decreases. Using the PID
controller, the error ( difference between the input and output ) can be reduced to a minimum
value by altering the output value. This helps to keep the robot in an upright position. The 2
40
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

wheel balancing robot system can be compared to an inverted pendulum. This is because the
system is not capable of keeping itself balanced. It tries to go away from the vertical axis.
The output of the complementary filter is provided to a PID controller. It helps to design the
balancing control system. The PID controller is very easy for implementation as well as
learning. The estimated value of the angular velocity w as well as angle θ is generated by the
complementary filter. This is not differentiated directly to avoid any amplification of noise. w
is multiplied with the value of Kd ( differential gain ). θ is multiplied with the value of Kp
( proportional gain ). Also, the integrated value of θ is multiplied with the value of Ki
( integral gain ). A combination of all the 3 systems gives the PID controller. The root locus
plot of the transfer function ( closed loop ) is shown in the figure.
The figure shown above represents the tilt angle ( θ, in degrees ) plotted with respect to time (
seconds ). It can be seen that after 25 s, the oscillations are not contained ( as the torque limit
for the motors is exceeded by the angular oscillations ). The position of the robot may also
drift due to the C.G. misaligning .
The complementary filter can be easily implemented using Arduino. It uses 2 filters - digital
high pass filter and digital low pass filter. For the design, 2 coefficients are needed.
The output obtained is in the form of PWM wave using PID controller. The angle value can
be obtained using serial window monitor of Arduino IDE.
F = h * ( F + G * dt ) + ( 1 – h ) * A
F = Final angle ( filtered )
. h = coefficient of high pass filter
G = angle reading provided by gyroscope
41
system is not capable of keeping itself balanced. It tries to go away from the vertical axis.
The output of the complementary filter is provided to a PID controller. It helps to design the
balancing control system. The PID controller is very easy for implementation as well as
learning. The estimated value of the angular velocity w as well as angle θ is generated by the
complementary filter. This is not differentiated directly to avoid any amplification of noise. w
is multiplied with the value of Kd ( differential gain ). θ is multiplied with the value of Kp
( proportional gain ). Also, the integrated value of θ is multiplied with the value of Ki
( integral gain ). A combination of all the 3 systems gives the PID controller. The root locus
plot of the transfer function ( closed loop ) is shown in the figure.
The figure shown above represents the tilt angle ( θ, in degrees ) plotted with respect to time (
seconds ). It can be seen that after 25 s, the oscillations are not contained ( as the torque limit
for the motors is exceeded by the angular oscillations ). The position of the robot may also
drift due to the C.G. misaligning .
The complementary filter can be easily implemented using Arduino. It uses 2 filters - digital
high pass filter and digital low pass filter. For the design, 2 coefficients are needed.
The output obtained is in the form of PWM wave using PID controller. The angle value can
be obtained using serial window monitor of Arduino IDE.
F = h * ( F + G * dt ) + ( 1 – h ) * A
F = Final angle ( filtered )
. h = coefficient of high pass filter
G = angle reading provided by gyroscope
41

A = angle reading provided by accelerometer
. dt = The loop time since the last iteration .
The code length is small for the complementary filter and fit for 8-bit microcontroller.
The code can be given by:
. h = 0.98
a X = value
a Y = value
aZ = value
aXang = ( atan2 ( aY , aZ ) + pi ) * radtodeg ;
aYang = ( atan2 ( aX , aZ ) + pi ) * radtodeg ;
double gXrate = ( double ) g X / 131.0 ;
double gYrate = ( double ) gY / 131.0 ;
gXang + = gXrate * ( double ) ( micros ( ) – timer ) / 1000000 ;
gYang + = gYrate * ( double ) ( micros ( ) – timer ) / 1000000 ;
angle = h* ( angle + gXrate * dt ) + ( 1 – h ) * ( aXangle ) ;
The DSO ( Digital Oscilloscope ) can be used to obtain PWM signal from the angle values.
42
. dt = The loop time since the last iteration .
The code length is small for the complementary filter and fit for 8-bit microcontroller.
The code can be given by:
. h = 0.98
a X = value
a Y = value
aZ = value
aXang = ( atan2 ( aY , aZ ) + pi ) * radtodeg ;
aYang = ( atan2 ( aX , aZ ) + pi ) * radtodeg ;
double gXrate = ( double ) g X / 131.0 ;
double gYrate = ( double ) gY / 131.0 ;
gXang + = gXrate * ( double ) ( micros ( ) – timer ) / 1000000 ;
gYang + = gYrate * ( double ) ( micros ( ) – timer ) / 1000000 ;
angle = h* ( angle + gXrate * dt ) + ( 1 – h ) * ( aXangle ) ;
The DSO ( Digital Oscilloscope ) can be used to obtain PWM signal from the angle values.
42

The PWM output for f = 0.98 and f = 0.94 have been shown in figure. The real time
simulation for the self balancing robot’s angle has also been shown in Fig. for f = 0.98 and f
= 0.94. The value of angle for f = 0.98 is 178.49 – 178.54 degree. The value of angle for f =
0.94 is 178.53 to 178.61 degree.
6. Results
6.1 Conclusion
The project consisted of design of a self – balancing robot. A 2 wheel robot has been
compared to an inverted pendulum. It is normally an unstable system which needs to be
43
simulation for the self balancing robot’s angle has also been shown in Fig. for f = 0.98 and f
= 0.94. The value of angle for f = 0.98 is 178.49 – 178.54 degree. The value of angle for f =
0.94 is 178.53 to 178.61 degree.
6. Results
6.1 Conclusion
The project consisted of design of a self – balancing robot. A 2 wheel robot has been
compared to an inverted pendulum. It is normally an unstable system which needs to be
43
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

stabilised. The tilt angle has been measured continuously and then maintained at a stabilised
reference value. For the measurement of the angle value, the sensors used are gyroscope and
the accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values are then corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
The dynamic analysis is becoming significant in the field of robotics to enhance the
performance. Self balancing robot is able to stabilise itself using simple circuitry. An
important limitation is to sense the balance conditions in this system. When a load is placed ,
the stabilised position is obtained in some time . The project involves the various fields like
mechanics, programming, control systems as well as in electronics. The system can be made
more stable by using gearbox with small gear backlash.
A two wheel SBR ( self balancing robot ) has been designed at a very low cost. It has been
done by estimating the accurate value of tilt angle and then balancing the movement using
PID controller so that the robot stays in upright motion.
6.2 Future Work :
The design can be further improved by relocation of the COM ( center of mass ) and the
complementary filter can be made more efficient by rejection of translational movement
44
reference value. For the measurement of the angle value, the sensors used are gyroscope and
the accelerometer. The readings provided by them consist of various errors due to bias and
temperature. These values are then corrected by the help of a filter. In this project, a
complementary filter has been used. The controller used to control to output in a stable limit,
a PID controller has been used. This provides a value of tilt angle. This value is processed
using a microcontroller. The value of tilt angle has to be maintained at a reference value. The
motors are driven accordingly so as to provide forward or backward movement to the robot
for maintain the required upright position. This helps to design a self – balancing robot. The
robot can balance itself on its own using this system.
The dynamic analysis is becoming significant in the field of robotics to enhance the
performance. Self balancing robot is able to stabilise itself using simple circuitry. An
important limitation is to sense the balance conditions in this system. When a load is placed ,
the stabilised position is obtained in some time . The project involves the various fields like
mechanics, programming, control systems as well as in electronics. The system can be made
more stable by using gearbox with small gear backlash.
A two wheel SBR ( self balancing robot ) has been designed at a very low cost. It has been
done by estimating the accurate value of tilt angle and then balancing the movement using
PID controller so that the robot stays in upright motion.
6.2 Future Work :
The design can be further improved by relocation of the COM ( center of mass ) and the
complementary filter can be made more efficient by rejection of translational movement
44

noise also. A remote control for various types of movements of the robot can be provided.
Some other sensors ( like IR sensors, ultrasonic sensors, GPS, camera, digital compass ) can
be used to avoid any obstacles and to allow the robot to follow a perimeter. Another
improvement can be the use of PI-PD controller. It provides more stability than PID
controller. PI-PD controller also provides the compensation for the C.G. misaligning. It will
help in bringing the robot back to his initial state or position. In order to avoid any kind of
obstacles, the vision system can be added using a camera. Also, better speeds can still be
achieved.
References
[1] James K. Roberge. The mechanical seal. Bachelor’s thesis, Massachusetts Institute of Technology,
May 1960.
[2] Katsuhiko Ogata. Modern Control Engineering, pages 277–279. Prentice-Hall, Englewood Cliffs,
New Jersey, 1970.
[3] Hau-Shiue Juang and Kai-Yew Lum, “Design and Control of a Two-Wheel Self Balancing Robot
using the Arduino Microcontroller Board”, 2013 10th IEEE International Conference on Control and
Automation (ICCA),June 12- 14,2013.
[4] J. Alberto Bonales Valencia, J. Juan Rinc´on Pasaye and Renato Gonzalez Bernal,
“Instrumentation and Wireless Control for the Self-Balancing Mobile robots on Two Wheels”, IEEE
online journal,2014.
[5] Liang Sun and Jiafei Gan , “Researching Of Two-Wheeled Self- Balancing Robot Base On LQR
Combined With PID”, IEEE online journal,2010
[6] Tim Wescott,” PID without a PhD”, Embedded Systems Programming, 2000, 86-108.
45
Some other sensors ( like IR sensors, ultrasonic sensors, GPS, camera, digital compass ) can
be used to avoid any obstacles and to allow the robot to follow a perimeter. Another
improvement can be the use of PI-PD controller. It provides more stability than PID
controller. PI-PD controller also provides the compensation for the C.G. misaligning. It will
help in bringing the robot back to his initial state or position. In order to avoid any kind of
obstacles, the vision system can be added using a camera. Also, better speeds can still be
achieved.
References
[1] James K. Roberge. The mechanical seal. Bachelor’s thesis, Massachusetts Institute of Technology,
May 1960.
[2] Katsuhiko Ogata. Modern Control Engineering, pages 277–279. Prentice-Hall, Englewood Cliffs,
New Jersey, 1970.
[3] Hau-Shiue Juang and Kai-Yew Lum, “Design and Control of a Two-Wheel Self Balancing Robot
using the Arduino Microcontroller Board”, 2013 10th IEEE International Conference on Control and
Automation (ICCA),June 12- 14,2013.
[4] J. Alberto Bonales Valencia, J. Juan Rinc´on Pasaye and Renato Gonzalez Bernal,
“Instrumentation and Wireless Control for the Self-Balancing Mobile robots on Two Wheels”, IEEE
online journal,2014.
[5] Liang Sun and Jiafei Gan , “Researching Of Two-Wheeled Self- Balancing Robot Base On LQR
Combined With PID”, IEEE online journal,2010
[6] Tim Wescott,” PID without a PhD”, Embedded Systems Programming, 2000, 86-108.
45

[7] William McC. Siebert. Circuits, Signals, and Systems, pages 177–182. MIT Press, Cambridge,
Massachusetts, 1986.
[8] Walter T Higgins,JR, “A Comparison of Complementary and Kalman Filtering”, IEEE
Transactions on Aerospace and Electronic Systems, Vol. AES- 11, No.3 , 1975
[9] Hyung Gi Min and Eun Tae Jeung, “ Complementary Filter Design for Angle Estimation using
MEMS Accelerometer and Gyroscope”
[10] Brisilla R.M, Sankaranarayan V. “Nonlinear control of mobile inverted pendulum”, Robotics and
Autonomous Systems Elsevier,Volume 70, August 2015, Pages 145-155
[11] Fast PWM on Arduino - Arduino Playground
[12] InvenSense, MPU-6050 Datasheet, Nov. 2010 [Revised Sept 2013]
[13] Segway Inc, [http://www.segway.com]
[14] Fengxin Sun, Zhen Yu, Haijiao Yang, “ A Design for Two- Wheeled Self-Balancing Robot
Based on Kalman Filter and LQR” , International Conference on Mechatronics and Control, July 2014
[15] Yulei Gong, Xiao Wu, Huijaio Ma, “Research on Control Stratergy of Two-Wheeled Self-
Balancing Robot”, International Conference on Computer Science and Mechanical Automation, 2015
[16] Madhira, Kartik, Ammar Gandhi, and Aneesha Gujral. "Self balancing robot using
complementary filter: implementation and analysis of complementary filter on SBR." 2016
International Conference on Electrical, Electronics, and Optimization Techniques (ICEEOT). IEEE,
2016.
[17] Juang, Hau-Shiue, and Kai-Yew Lurrr. "Design and control of a two-wheel self-balancing robot
using the arduino microcontroller board." 2013 10th IEEE International Conference on Control and
Automation (ICCA). IEEE, 2013.
[18] Lee, G. H., and Seul Jung. "Line tracking control of a two-wheeled mobile robot using visual
feedback." International Journal of Advanced Robotic Systems 10.3 (2013): 177.
[19] Kim, P. K., and S. Jung. "Experimental studies of neural network control for one-wheel mobile
robot." Journal of Control Science and Engineering 2012 (2012): 3.
46
Massachusetts, 1986.
[8] Walter T Higgins,JR, “A Comparison of Complementary and Kalman Filtering”, IEEE
Transactions on Aerospace and Electronic Systems, Vol. AES- 11, No.3 , 1975
[9] Hyung Gi Min and Eun Tae Jeung, “ Complementary Filter Design for Angle Estimation using
MEMS Accelerometer and Gyroscope”
[10] Brisilla R.M, Sankaranarayan V. “Nonlinear control of mobile inverted pendulum”, Robotics and
Autonomous Systems Elsevier,Volume 70, August 2015, Pages 145-155
[11] Fast PWM on Arduino - Arduino Playground
[12] InvenSense, MPU-6050 Datasheet, Nov. 2010 [Revised Sept 2013]
[13] Segway Inc, [http://www.segway.com]
[14] Fengxin Sun, Zhen Yu, Haijiao Yang, “ A Design for Two- Wheeled Self-Balancing Robot
Based on Kalman Filter and LQR” , International Conference on Mechatronics and Control, July 2014
[15] Yulei Gong, Xiao Wu, Huijaio Ma, “Research on Control Stratergy of Two-Wheeled Self-
Balancing Robot”, International Conference on Computer Science and Mechanical Automation, 2015
[16] Madhira, Kartik, Ammar Gandhi, and Aneesha Gujral. "Self balancing robot using
complementary filter: implementation and analysis of complementary filter on SBR." 2016
International Conference on Electrical, Electronics, and Optimization Techniques (ICEEOT). IEEE,
2016.
[17] Juang, Hau-Shiue, and Kai-Yew Lurrr. "Design and control of a two-wheel self-balancing robot
using the arduino microcontroller board." 2013 10th IEEE International Conference on Control and
Automation (ICCA). IEEE, 2013.
[18] Lee, G. H., and Seul Jung. "Line tracking control of a two-wheeled mobile robot using visual
feedback." International Journal of Advanced Robotic Systems 10.3 (2013): 177.
[19] Kim, P. K., and S. Jung. "Experimental studies of neural network control for one-wheel mobile
robot." Journal of Control Science and Engineering 2012 (2012): 3.
46
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

[20] Binugroho, Eko Henfri, et al. "Control for balancing line follower robot using discrete cascaded
PID algorithm on ADROIT V1 education robot." 2015 International Electronics Symposium (IES).
IEEE, 2015.
[21] R. Fierro, F. Lewis, and A. Lowe, “Hybrid control for a class of underactuated mechanical
systems,” IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, vol.
29, no. 6, pp. 649–4, nov 1999.
[22] K. Xu and X.-D. Duan, “Comparative study of control methods of single-rotational inverted
pendulum,” in Proceedings of the First International Conference on Machine Learning and
Cybernetics, vol. 2, 2002, pp. 776–8.
[23] F. Grasser, A. D’Arrrigo, S. Colombi, and A. C. Rufer, “JOE: A mobile, inverted pendulum,”
IEEE Transactions on Industrial Electronics, vol. 49, no. 1, pp. 107–14, 2002.
[24] D. P. Anderson. (2003, Aug.) nBot balancing robot. Online. [Online]. Available:
http://www.geology.smu.edu/ dpa-www/robo/nbot
[25] R. C. Ooi, “Balancing a two-wheeled autonomous robot,” Final Year Thesis, The University of
Western Australia, School of Mechanical Engineering, 2003.
[26] N. M. A. Ghani, F. Naim, and P. Y. Tan, “Two wheels balancing robot with line following
capability,” World Academy of Science, Engineering and Technology, vol. 55, pp. 634–8, 2011.
[27] X. Ruan, J. Liu, H. Di, and X. Li, “Design and LQ control of a two-wheeled self-balancing
robot,” in Control Conference, 2008. CCC 2008. 27th Chinese, july 2008, pp. 275 –279.
[28] T. Nomura, Y. Kitsuka, H. Suemistu, and T. Matsuo, “Adaptive backstepping control for a two-
wheeled autonomous robot,” in ICROSSICE International Joint Conference, Aug. 2009, pp. 4687–92.
[29] G. M. T. Nguyen, H. N. Duong, and H. P. Ngyuen, “A PID backstepping controller for two-
wheeled self-balancing robot,” in Proceedings fo the 2010 IFOST, 2010.
47
PID algorithm on ADROIT V1 education robot." 2015 International Electronics Symposium (IES).
IEEE, 2015.
[21] R. Fierro, F. Lewis, and A. Lowe, “Hybrid control for a class of underactuated mechanical
systems,” IEEE Transactions on Systems, Man and Cybernetics, Part A: Systems and Humans, vol.
29, no. 6, pp. 649–4, nov 1999.
[22] K. Xu and X.-D. Duan, “Comparative study of control methods of single-rotational inverted
pendulum,” in Proceedings of the First International Conference on Machine Learning and
Cybernetics, vol. 2, 2002, pp. 776–8.
[23] F. Grasser, A. D’Arrrigo, S. Colombi, and A. C. Rufer, “JOE: A mobile, inverted pendulum,”
IEEE Transactions on Industrial Electronics, vol. 49, no. 1, pp. 107–14, 2002.
[24] D. P. Anderson. (2003, Aug.) nBot balancing robot. Online. [Online]. Available:
http://www.geology.smu.edu/ dpa-www/robo/nbot
[25] R. C. Ooi, “Balancing a two-wheeled autonomous robot,” Final Year Thesis, The University of
Western Australia, School of Mechanical Engineering, 2003.
[26] N. M. A. Ghani, F. Naim, and P. Y. Tan, “Two wheels balancing robot with line following
capability,” World Academy of Science, Engineering and Technology, vol. 55, pp. 634–8, 2011.
[27] X. Ruan, J. Liu, H. Di, and X. Li, “Design and LQ control of a two-wheeled self-balancing
robot,” in Control Conference, 2008. CCC 2008. 27th Chinese, july 2008, pp. 275 –279.
[28] T. Nomura, Y. Kitsuka, H. Suemistu, and T. Matsuo, “Adaptive backstepping control for a two-
wheeled autonomous robot,” in ICROSSICE International Joint Conference, Aug. 2009, pp. 4687–92.
[29] G. M. T. Nguyen, H. N. Duong, and H. P. Ngyuen, “A PID backstepping controller for two-
wheeled self-balancing robot,” in Proceedings fo the 2010 IFOST, 2010.
47

[30] K.-H. Su and Y.-Y. Chen, “Balance control for two-wheeled robot via neural-fuzzy technique,”
in SICE Annual Conference 2010, Proceedings of, aug. 2010, pp. 2838 –2842.
[31] X. Ruan and J. Cai, “Fuzzy backstepping controller for two-wheeled self-balancing robot,” in
International Asia Conference on Informatics in Control, Automation and Robotics, 2009, pp. 166–9.
[32] D. Arndt, J. E. Bobrow, S. Peters, K. Iagnemma, and S. Bubowsky, “Two-wheel self-balancing
of a four-wheeled vehicle,” IEEE Control Systems Magazine, vol. 31, no. 2, pp. 29–37, April 2011.
[33] Arduino. [Online]. Available: http://arduino.cc/
[34] J. Sarik and I. Kymissis, “Lab kits using the Arduino prototyping platform,” in IEEE Frontiers in
Education Conference, 2010, pp. T3C– 1–5.
[35] G. Guo and W. Yue, “Autonomous platoon control allowing rangelimited sensors,” IEEE Trans.
on Vehicular Technology, vol. 61, no. 7, pp. 2901–2912, 2012.
[36] P. A. Vignesh and G. Vignesh, “Relocating vehicles to avoid traffic collision through wireless
sensor networks,” in 4th International Conference on Computational Intelligence, Communication
Systems and Networks. IEEE, 2012.
[37] M. J. A. Arizaga, J. de la Calleja, R. Hernandez, and A. Benitez, “Automatic control for
laboratory sterilization process rsd on Arduino hardware,” in 22nd International Conference on
Electrical Communications and Computers, 130-3, Ed., 2012.
[38] S. Krivic, M. Hujdur, A. Mrzic, and S. Konjicija, “Design and implementation of fuzzy controller
on embedded computer for water level control,” in MIPRO, Opatija, Croatia, May 21–25 2012, pp.
1747–51.
[39] V. Georgitzikis and I. Akribopoulos, O.and Chatzigiannakis, “Controlling physical objects via
the internet using the Arduino platform over 802.15.4 networks,” IEEE Latin America Transactions,
vol. 10, no. 3, pp. 1686–9, 2012.
[40] 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.
48
in SICE Annual Conference 2010, Proceedings of, aug. 2010, pp. 2838 –2842.
[31] X. Ruan and J. Cai, “Fuzzy backstepping controller for two-wheeled self-balancing robot,” in
International Asia Conference on Informatics in Control, Automation and Robotics, 2009, pp. 166–9.
[32] D. Arndt, J. E. Bobrow, S. Peters, K. Iagnemma, and S. Bubowsky, “Two-wheel self-balancing
of a four-wheeled vehicle,” IEEE Control Systems Magazine, vol. 31, no. 2, pp. 29–37, April 2011.
[33] Arduino. [Online]. Available: http://arduino.cc/
[34] J. Sarik and I. Kymissis, “Lab kits using the Arduino prototyping platform,” in IEEE Frontiers in
Education Conference, 2010, pp. T3C– 1–5.
[35] G. Guo and W. Yue, “Autonomous platoon control allowing rangelimited sensors,” IEEE Trans.
on Vehicular Technology, vol. 61, no. 7, pp. 2901–2912, 2012.
[36] P. A. Vignesh and G. Vignesh, “Relocating vehicles to avoid traffic collision through wireless
sensor networks,” in 4th International Conference on Computational Intelligence, Communication
Systems and Networks. IEEE, 2012.
[37] M. J. A. Arizaga, J. de la Calleja, R. Hernandez, and A. Benitez, “Automatic control for
laboratory sterilization process rsd on Arduino hardware,” in 22nd International Conference on
Electrical Communications and Computers, 130-3, Ed., 2012.
[38] S. Krivic, M. Hujdur, A. Mrzic, and S. Konjicija, “Design and implementation of fuzzy controller
on embedded computer for water level control,” in MIPRO, Opatija, Croatia, May 21–25 2012, pp.
1747–51.
[39] V. Georgitzikis and I. Akribopoulos, O.and Chatzigiannakis, “Controlling physical objects via
the internet using the Arduino platform over 802.15.4 networks,” IEEE Latin America Transactions,
vol. 10, no. 3, pp. 1686–9, 2012.
[40] 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.
48

[41] Nawawi, S. W., Ahmad, M. N. and Osman, J. H. S (2008) "Real-Time Control of Two-Wheeled
Inverted Pendulum Mobile Robot" World Academy of Science, Engineering and Technology 29, 214
- 220.
[42] Lei Guo , Hong Wang , “PID controller design for output PDFs of stochastic systems using linear
matrix inequalities”, IEEE Transactions on Systems, Man, and Cybernetics, Part B 01/2005; 35:65-
71,pp.65-71.
[43] K. Loffler, M. Gienger, F. Pfeiffer, and H. Ulbrich, “Sensors and control concept of a biped
robot,” IEEE Trans. Ind. Electron., vol. 51, no.5, pp.972–980.
[44] R.S.Meena,Vikas Kumawat(2011) .Controller Design For Servo Motor Using MATLAB .In
Proceeding of National Conferences on Advances & Research in Electrical System Technology
( AREST 2011).
[45] Popescu, Cristina; Paraschiv, Nicolae; Cangea, Otilia.(2011) Comparison Between PID And
Fuzzy Controllers Used In Mobile Robot Control annals of daaam & proceedings,jan2011, pp223.
[46] A. Warnasch, and A. Killen, Low cost, high G, micro electro-mechanical systems (MEMS),
inertial measurements unit (IMU) program, IEEE Position Location and Navigation Symposium,
2002, pp. 299-305.
[47] Andrea Demetlika, Tomislav Tomašić, Mladen Crneković (2012),Self balancing Mobile Robot
Tilter.FAMENA issue 3, volume 36.
[48] Young Soo Suh.(2003) .Attitude Estimation Using Low Cost Accelerometer And Gyroscope
Proceedings KORUS 2003. The 7th Korea-Russia International Symposium on Volume: 2, Page(s):
423 - 427.
[49] D. Simon, Kalman Filtering With State Constraints: A Survey Of Linear And Nonlinear
Algorithms, IET Proceediings in Control Theory & Applications,Volume 4, no. 8, pp. 1303-1318.
[50] D. Caulley, N. Nehoran and S. Zaho, “Self-balancing robot,” 2015. [Online]. Available:
https://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/f2015/dc686_nn233_hz263/
final_project_webpage_v2/dc686_nn233_hz263/. [Accessed 02 April 2017].
[51] C. Sundin and F. Thorstensson, “Autonomous Balancing Robot,” 2012.
[52] R. C. Ooi, “Balancing a Two-Wheeled Autonomous Robot,” The University of Western
Australia, 2003.
[53] O. Boubaker, “The inverted pendulum: A fundamental benchmark in control theory and
49
Inverted Pendulum Mobile Robot" World Academy of Science, Engineering and Technology 29, 214
- 220.
[42] Lei Guo , Hong Wang , “PID controller design for output PDFs of stochastic systems using linear
matrix inequalities”, IEEE Transactions on Systems, Man, and Cybernetics, Part B 01/2005; 35:65-
71,pp.65-71.
[43] K. Loffler, M. Gienger, F. Pfeiffer, and H. Ulbrich, “Sensors and control concept of a biped
robot,” IEEE Trans. Ind. Electron., vol. 51, no.5, pp.972–980.
[44] R.S.Meena,Vikas Kumawat(2011) .Controller Design For Servo Motor Using MATLAB .In
Proceeding of National Conferences on Advances & Research in Electrical System Technology
( AREST 2011).
[45] Popescu, Cristina; Paraschiv, Nicolae; Cangea, Otilia.(2011) Comparison Between PID And
Fuzzy Controllers Used In Mobile Robot Control annals of daaam & proceedings,jan2011, pp223.
[46] A. Warnasch, and A. Killen, Low cost, high G, micro electro-mechanical systems (MEMS),
inertial measurements unit (IMU) program, IEEE Position Location and Navigation Symposium,
2002, pp. 299-305.
[47] Andrea Demetlika, Tomislav Tomašić, Mladen Crneković (2012),Self balancing Mobile Robot
Tilter.FAMENA issue 3, volume 36.
[48] Young Soo Suh.(2003) .Attitude Estimation Using Low Cost Accelerometer And Gyroscope
Proceedings KORUS 2003. The 7th Korea-Russia International Symposium on Volume: 2, Page(s):
423 - 427.
[49] D. Simon, Kalman Filtering With State Constraints: A Survey Of Linear And Nonlinear
Algorithms, IET Proceediings in Control Theory & Applications,Volume 4, no. 8, pp. 1303-1318.
[50] D. Caulley, N. Nehoran and S. Zaho, “Self-balancing robot,” 2015. [Online]. Available:
https://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/f2015/dc686_nn233_hz263/
final_project_webpage_v2/dc686_nn233_hz263/. [Accessed 02 April 2017].
[51] C. Sundin and F. Thorstensson, “Autonomous Balancing Robot,” 2012.
[52] R. C. Ooi, “Balancing a Two-Wheeled Autonomous Robot,” The University of Western
Australia, 2003.
[53] O. Boubaker, “The inverted pendulum: A fundamental benchmark in control theory and
49
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

robotics,” IEEE, 2012.
[54] D. Goldman, N. Gravish, S. Sharpe and H. Li, “Nonlinear Dynamics of Human Locomotion,”
Georgia Institute of Technology, Shanghai Jiao Tong University, 2012.
[55] F. R, “Understanding the Basis of the Kalman Filter Via a Simple and Intuitive Derivation,”
IEEE SIGNAL PROCESSING MAGAZINE, 2012.
[56] C. J, Interviewee, 5 Lines of Code to Land on the Moon. [Interview]. 2016.
[57] SainSmart, “SainSmart InstaBots Upright Rover Kit V2.0 Updated 2-Wheel Self-Balancing
Robot Kit,” [Online]. Available: https://www.sainsmart.com/sainsmart-balancing-robot-kit-v2.html.
[Accessed 02 April 2017].
[58] Kansas State University, “Wireless Inverted Pendulum Cart,” [Online]. Available:
http://www.mne.k-state.edu/static/nlc/tiki-index.php?page=S_H_WirelessInvertedPendulumCart.
[Accessed 02 April 2017].
[59] Quanser, “Linear Flexible Joint with Inverted Pendulum,” [Online]. Available:
http://www.quanser.com/products/linear_flexible_joint_pendulum. [Accessed 02 April 2017].
[60] P. A. Song, “Engineering Analysis,” The University of Manchester, 2016.
[61] J. Hoagg and D. Bernstein, “Nonminimum-Phase Zeros,” IEEE Control Systems Magazine,
2007.
[62] S. A. B. Junoh, “Two-Wheeled Balancing Robot Controlled Designed Using PID,” Universiti
Tun Hussein Onn Malaysia, 2015.
[63] B. Bonafilia, N. Gustafsson, P. Nyman and S. Nilson, “Self-Balancing two-wheeled robot,”
Chalmers University of Technology.
S. Balasubramanian and M. N. Lathiff, “Self Balancing Robot,” The University of British Columbia,
2011.
[ 64] K. Gornicki, “Autonomous Self Stabilizing Robot,” The University of Manchester, 2015.
[65] L. Jodensvi, V. Johansson, C. Lanfelt and S. Lofstrom, “One Robot to Roll Them All,” Chalmers
University of Technology, Gotenborg, 2015.
[66] V. VanDoren, “PID:Still the One,” Control Engineering, 2003.
50
[54] D. Goldman, N. Gravish, S. Sharpe and H. Li, “Nonlinear Dynamics of Human Locomotion,”
Georgia Institute of Technology, Shanghai Jiao Tong University, 2012.
[55] F. R, “Understanding the Basis of the Kalman Filter Via a Simple and Intuitive Derivation,”
IEEE SIGNAL PROCESSING MAGAZINE, 2012.
[56] C. J, Interviewee, 5 Lines of Code to Land on the Moon. [Interview]. 2016.
[57] SainSmart, “SainSmart InstaBots Upright Rover Kit V2.0 Updated 2-Wheel Self-Balancing
Robot Kit,” [Online]. Available: https://www.sainsmart.com/sainsmart-balancing-robot-kit-v2.html.
[Accessed 02 April 2017].
[58] Kansas State University, “Wireless Inverted Pendulum Cart,” [Online]. Available:
http://www.mne.k-state.edu/static/nlc/tiki-index.php?page=S_H_WirelessInvertedPendulumCart.
[Accessed 02 April 2017].
[59] Quanser, “Linear Flexible Joint with Inverted Pendulum,” [Online]. Available:
http://www.quanser.com/products/linear_flexible_joint_pendulum. [Accessed 02 April 2017].
[60] P. A. Song, “Engineering Analysis,” The University of Manchester, 2016.
[61] J. Hoagg and D. Bernstein, “Nonminimum-Phase Zeros,” IEEE Control Systems Magazine,
2007.
[62] S. A. B. Junoh, “Two-Wheeled Balancing Robot Controlled Designed Using PID,” Universiti
Tun Hussein Onn Malaysia, 2015.
[63] B. Bonafilia, N. Gustafsson, P. Nyman and S. Nilson, “Self-Balancing two-wheeled robot,”
Chalmers University of Technology.
S. Balasubramanian and M. N. Lathiff, “Self Balancing Robot,” The University of British Columbia,
2011.
[ 64] K. Gornicki, “Autonomous Self Stabilizing Robot,” The University of Manchester, 2015.
[65] L. Jodensvi, V. Johansson, C. Lanfelt and S. Lofstrom, “One Robot to Roll Them All,” Chalmers
University of Technology, Gotenborg, 2015.
[66] V. VanDoren, “PID:Still the One,” Control Engineering, 2003.
50

[67] Z. Ding, Control Systems II (EEEN30041), The University of Mancehster, 2017.
[68] W. An and Y. Li, “Simulation and Control of a Two-wheeled Self-balancing Robot,” in IEEE
Internation Conference on Rotics and Biometrics, Shenzen, 2013.
[69] G. Welch and G. Bishop, “An Introduction to the Kalman Filter,” 2001. [Online]. Available:
http://www.cs.unc.edu/~tracker/media/pdf/SIGGRAPH2001_CoursePack_08.pdf. [Accessed 01 April
2017].
[70] STMicroelectronics, “Solutions for MEMS sensor fusion,” Mouser Electronics, July 2011.
[Online]. Available: http://www.mouser.co.uk/applications/sensor_solutions_mems/. [Accessed 2017
April 02].
[71] Bosch, “Bosch Sensortec - BNO055,” [Online]. Available:
https://www.bosch-sensortec.com/bst/products/all_products/bno055. [Accessed 13 April 2017].
[72] InvenSense, “MPU-6050,” [Online]. Available: https://www.invensense.com/products/motion-
tracking/6-axis/mpu-6050/. [Accessed 02 April 2017].
[73] O. J. Woodman, “An introduction to inertial navigation,” August 2007. [Online]. Available:
https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.pdf. [Accessed 02 April 2017].
[74] North Carolina State University, “Using the MPU-6050,” [Online]. Available:
www.cs.unca.edu/~bruce/Fall13/360/IMU_Wk8.pptx. [Accessed 02 April 2017].
[75] Q. a. Rotations, “Jernej Barbic,” [Online]. Available:
http://run.usc.edu/cs520-s12/quaternions/quaternions-cs520.pdf. [Accessed 02 April 2017].
[76] Freescale Semiconductor, Inc., “Tilt Sensing Using a Three-Axis,” March 2013. [Online].
Available: http://www.nxp.com/assets/documents/data/en/application-notes/AN3461.pdf. [Accessed
02 April 2017].
[77] Rutgers School of Arts and Sciences, “Sensing your orientation: how to use an
accelerometer,” [Online]. Available:
http://physics.rutgers.edu/~aatish/teach/srr/workshop3.pdf. [Accessed 02 April 2017].
[78] R. Faragher, “Understanding the Basis of the Kalman Filter Via a Simple and Intuitive
51
[68] W. An and Y. Li, “Simulation and Control of a Two-wheeled Self-balancing Robot,” in IEEE
Internation Conference on Rotics and Biometrics, Shenzen, 2013.
[69] G. Welch and G. Bishop, “An Introduction to the Kalman Filter,” 2001. [Online]. Available:
http://www.cs.unc.edu/~tracker/media/pdf/SIGGRAPH2001_CoursePack_08.pdf. [Accessed 01 April
2017].
[70] STMicroelectronics, “Solutions for MEMS sensor fusion,” Mouser Electronics, July 2011.
[Online]. Available: http://www.mouser.co.uk/applications/sensor_solutions_mems/. [Accessed 2017
April 02].
[71] Bosch, “Bosch Sensortec - BNO055,” [Online]. Available:
https://www.bosch-sensortec.com/bst/products/all_products/bno055. [Accessed 13 April 2017].
[72] InvenSense, “MPU-6050,” [Online]. Available: https://www.invensense.com/products/motion-
tracking/6-axis/mpu-6050/. [Accessed 02 April 2017].
[73] O. J. Woodman, “An introduction to inertial navigation,” August 2007. [Online]. Available:
https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-696.pdf. [Accessed 02 April 2017].
[74] North Carolina State University, “Using the MPU-6050,” [Online]. Available:
www.cs.unca.edu/~bruce/Fall13/360/IMU_Wk8.pptx. [Accessed 02 April 2017].
[75] Q. a. Rotations, “Jernej Barbic,” [Online]. Available:
http://run.usc.edu/cs520-s12/quaternions/quaternions-cs520.pdf. [Accessed 02 April 2017].
[76] Freescale Semiconductor, Inc., “Tilt Sensing Using a Three-Axis,” March 2013. [Online].
Available: http://www.nxp.com/assets/documents/data/en/application-notes/AN3461.pdf. [Accessed
02 April 2017].
[77] Rutgers School of Arts and Sciences, “Sensing your orientation: how to use an
accelerometer,” [Online]. Available:
http://physics.rutgers.edu/~aatish/teach/srr/workshop3.pdf. [Accessed 02 April 2017].
[78] R. Faragher, “Understanding the Basis of the Kalman Filter Via a Simple and Intuitive
51

Derivation,” IEEE Signal Processing Magazine, no. September, pp. 128-132, 2012.
[79] S. Watson and J. C. Gomez, Mobile Robots and Autonomous Systems Part II:
Estimation for Localisation and Mapping, The University of Manchester, 2017.
[80] J. C. Gomez, Interviewee, Weekly Tutorials. [Interview]. 20 February 2017.
[82] MathWorks, “Covariance,” [Online]. Available:
https://uk.mathworks.com/help/matlab/ref/cov.html#bumju45-6. [Accessed 03 April 2017].
[83] A. Gafar, “Self Balancing Robot: Progress Report,” The University of Manchester,
2016.
[84] D. A. Russel, “The Simple Pendulum,” [Online]. Available:
http://www.acs.psu.edu/drussell/Demos/Pendulum/Pendula.html. [Accessed 23 April 2017].
[85] Arduino, “Arduino Uno & Genuino Uno,” [Online]. Available:
https://www.arduino.cc/en/main/arduinoBoardUno. [Accessed 22 April 2017].
[86] InvenSense, “MPU-6000 and MPU-6050 Product Specification Revision 3.4,” 08
August 2013. [Online]. Available:
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf.
[Accessed 02 April 2017].
[87] STMicroelectronics, “L6201 - L6202 - L6203 - DMOS FULL BRIDGE DRIVER,”
[Online]. Available: http://www.st.com/content/ccc/resource/technical/document/datasheet/
03/af/9d/d5/a2/56/46/f6/CD00000089.pdf/files/CD00000089.pdf/jcr:content/translations/
en.CD00000089.pdf. [Accessed 17 April 2017].
[88] InvenSense, “MPU-6000 and MPU-6050 Register Map and Descriptions Revision 4.2,”
19 08 2013. [Online]. Available:
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf.
[Accessed 07 April 2017].
[89] Hyper Physics, “Moment of Inertia: Cylinder,” [Online]. Available:
52
[79] S. Watson and J. C. Gomez, Mobile Robots and Autonomous Systems Part II:
Estimation for Localisation and Mapping, The University of Manchester, 2017.
[80] J. C. Gomez, Interviewee, Weekly Tutorials. [Interview]. 20 February 2017.
[82] MathWorks, “Covariance,” [Online]. Available:
https://uk.mathworks.com/help/matlab/ref/cov.html#bumju45-6. [Accessed 03 April 2017].
[83] A. Gafar, “Self Balancing Robot: Progress Report,” The University of Manchester,
2016.
[84] D. A. Russel, “The Simple Pendulum,” [Online]. Available:
http://www.acs.psu.edu/drussell/Demos/Pendulum/Pendula.html. [Accessed 23 April 2017].
[85] Arduino, “Arduino Uno & Genuino Uno,” [Online]. Available:
https://www.arduino.cc/en/main/arduinoBoardUno. [Accessed 22 April 2017].
[86] InvenSense, “MPU-6000 and MPU-6050 Product Specification Revision 3.4,” 08
August 2013. [Online]. Available:
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf.
[Accessed 02 April 2017].
[87] STMicroelectronics, “L6201 - L6202 - L6203 - DMOS FULL BRIDGE DRIVER,”
[Online]. Available: http://www.st.com/content/ccc/resource/technical/document/datasheet/
03/af/9d/d5/a2/56/46/f6/CD00000089.pdf/files/CD00000089.pdf/jcr:content/translations/
en.CD00000089.pdf. [Accessed 17 April 2017].
[88] InvenSense, “MPU-6000 and MPU-6050 Register Map and Descriptions Revision 4.2,”
19 08 2013. [Online]. Available:
https://www.invensense.com/wp-content/uploads/2015/02/MPU-6000-Register-Map1.pdf.
[Accessed 07 April 2017].
[89] Hyper Physics, “Moment of Inertia: Cylinder,” [Online]. Available:
52
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

http://hyperphysics.phy-astr.gsu.edu/hbase/icyl.html. [Accessed 2017 April 22].
[ 90 ] S. Durovic, Mechatronic Analysis and Design, Manchester: The University of
Manchester, 2016.
53
[ 90 ] S. Durovic, Mechatronic Analysis and Design, Manchester: The University of
Manchester, 2016.
53
1 out of 53

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.