You are on page 1of 7

# e-Yantra Robotics Competition - 2018

## Task 3C: Theme and Implementation Analysis

116
Team leader name P. Shravan Nayak
College Indian Institute of Technology(B.H.U.),Varanasi
Email pshravan.nayak.ece17@itbhu.ac.in
Date 02/01/2019

## Scope and Preparing the Arena

Q1 a. State the scope of the theme assigned to you. (2)
In this theme we have to use machine learning to identify the animals and their habitat. After
that we have to place the animals in their given habitat using the firebird 5 robot. The robot has
to do line following to complete the task. We have learnt how to use machine learning to
predict different animals and habitats. -

## b. Attach the Final Arena Images. (3)

Building Modules
Q2. Identify the major components required for designing the robotic system for the solution
of the theme assigned to you. (3)
1. Electronic Systems –
 Sharp Sensors – These sensors will help to detect the presence of blocks representing
animals. These sensors will help the robot to stop in front of the blocks.
 White Line Sensors – These sensors will help the robot to follow the lines. With the help
of these sensors the robot will traverse the arena by following the black lines.
 Position Encoders – Encoders will help in keeping track of the distance travelled by the
robot.
2. Mechanical Systems-
 Servo Motor – Help to make grabbing mechanism. These would enable the grabbing
mechanism to work.
Design Analysis
Q3. Teams have to design an arm mechanism for deposition of the Animals in their respective
Habitats.
a) Choose an option to position this mechanism on the robot and why? (2)
1. Front 2. Back 3. Right/Left
By putting the grabbing mechanism in back. The geometrical center of the robot will come
very near to the wheels. These would help in better turning without hitting the blocks in the
process. If the mechanism is placed in the front then there are higher chances of hitting the
blocks.

b) Explain the design of the mechanism and how it is mounted on the robot. Also explain
what challenge/s do you expect to face and how you will overcome them? (6)
We plan to place the grabber on the back of the robot. This would be helpful to provide
easy turning. The hands of the robot will extend downwards to grab the blocks properly.
These hands would be screwed to the servo motors. Servoes will be glued and taped at the
top of firebird 5 robot.There will be two servoes from which 2 hands will be attached. There
are many challenges that are expected:
1. Height of blocks is 6 cm, so the grabbers must be placed accordingly.
2. Difficulty in turning with the grabbing mechanism. We plan to place the grabber at
the back of the robot so as to prevent any difficulty in turning
3. Distance from which grabbing would be done has to be fixed for block to completely
fit in the grabber. To ensure this we plan to use sharp sensor to measure distance
from block, so that robot can stop at a fixed distance from block.
4. To increase the grip of the grabber we plan to apply rubber on the hands of grabber.

c) Choose the actuator/s you will use to design the mechanism. (2)
1. DC-Motor 2. Servo Motor 3. Stepper Motor 4. Others
Servo Motor is very precise and handy. It has the ability to give higher precision than DC-
Motors as we can control the angle of rotation. The servo motors are also very compact in
comparison to Stepper Motors. We only need to lift thermacol blocks which are not very
heavy. Hence, the servo motors fulfil all the requirements to be the actuator of choice for
our grabbing mechanism.
Environment Sensing
Q4. Explain how you will use the provided sensors to implement the theme. (2)
1. Sharp Sensors: We need one sharp sensor at the front of robot. This sensor would help
the robot to detect the blocks and stop in front of the blocks.
2. White Line Sensor: We would place 3 sensors in front and 3 on the back of the bot.
These sensors would help our robot to follow the black lines properly.
3. Position Encoder: This are placed each on both the wheels. These sensors would help in
keeping track of the distance travelled by the robot. The number of nodes travelled can
be determined using the readings of these encoders.
Testing your knowledge (theme analysis and rulebook-related)
Q5. What is the purpose of “activation function” in a Neural Network? How do different type
of activation functions affect the network? (5)
Activation functions are really important for a Artificial Neural Network to learn and make sense of
something really complicated and Non-linear complex functional mappings between the inputs and
response variable.They introduce non-linear properties to our Network.Their main purpose is to convert
a input signal of a node in a neural network to an output signal. That output signal now is used as a input
in the next layer in the stack.If we do not apply a Activation function then the output signal would
simply be a simple linear function.A linear function is just a polynomial of one degree. Now, a linear
equation is easy to solve but they are limited in their complexity and have less power to learn complex
functional mappings from data. We want our Neural Network to not just learn and compute a linear
function but something more complicated than that. Also without activation function our Neural
network would not be able to learn and model other complicated kinds of data such as images.Hence
we need to apply a Activation function f(x) so as to make the network more powerfull and add ability to
it to learn something complex and complicated form data and represent non-linear complex arbitrary
functional mappings between inputs and outputs.
1. Sigmoid-
It is a activation function of form f(x) = 1 / 1 + exp(-x) . Its Range is between 0 and 1.It is easy to
understand and apply but it has major reasons which have made it fall out of popularity -
 Secondly , its output isn’t zero centered. It makes the gradient updates go too far in different
directions. 0 < output < 1, and it makes optimization harder.
 Sigmoids saturate and kill gradients.
 Sigmoids have slow convergence.

## 2. Hyperbolic Tangent function- Tanh:

It’s mathamatical formula is f(x) = 1 — exp(-2x) / 1 + exp(-2x). Now it’s output is zero centered because
its range in between -1 to 1 i.e -1 < output < 1 . Hence optimization is easier in this method hence in
practice it is always preferred over Sigmoid function . But still it suffers from Vanishing gradient
problem.
3. ReLu- Rectified Linear units
It was recently proved that it had 6 times improvement in convergence from Tanh function. It’s just R(x)
= max(0,x) i.e if x < 0 , R(x) = 0 and if x >= 0 , R(x) = x. Hence as seeing the mathamatical form of this
function we can see that it is very simple and efficinent .It avoids and rectifies vanishing gradient
problem . Almost all deep learning Models use ReLu nowadays.Another problem with ReLu is that some
gradients can be fragile during training and can die. It can cause a weight update which will makes it
never activate on any data point again. Simply saying that ReLu could result in Dead Neurons.
To fix this problem another modification was introduced called Leaky ReLu to fix the problem of dying
neurons. It introduces a small slope to keep the updates alive.

Q6. What are the different hyper-parameters in a CNN that affect its performance? Explain
the different parameters and their effects (in bulleted form). (5)
 Learning rate-
Learning rate controls how much to update the weight in the optimization algorithm. We can
use fixed learning rate, gradually decreasing learning rate, momentum based methods or
 Number of epochs-
Number of epochs is the the number of times the entire training set pass through the neural
network. We should increase the number of epochs until we see a small gap between the test
error and the training error.
 Batch size-
Mini-batch is usually preferable in the learning process of convnet. A range of 16 to 128 is a
good choice to test with. We should note that convnet is sensitive to batch size.
 Activation function-
Activation funtion introduces non-linearity to the model. Usually, rectifier works well with
convnet. Other alternatives are sigmoid, tanh and other activation functions depening on the
 Number of hidden layers and units-
It is usually good to add more layers until the test error no longer improves. The trade off is that
it is computationally expensive to train the network. Having a small amount of units may lead to
underfitting while having more units are usually not harmful with appropriate regularization.
 Weight initialization
We should initialize the weights with small random numbers to prevent dead neurons, but not
too small to avoid zero gradient. Uniform distribution usually works well.
 Dropout for regularization
Dropout is a preferable regularization technique to avoid overfitting in deep neural networks.
The method simply drops out units in neural network according to the desired probability. A
default value of 0.5 is a good choice to test with.

Q7. Why are the first few layers of a CNN hard to train? (3)
First few layers learn features like edges ,encode direction and colour. These direction and colours filter
then get combined into basic grid and spot textures. Hence, to generalise a lot of data is required which
is usually not available. Hence, it is difficult to train the first few layers of CNN.

Algorithm Analysis
Q8. Draw a flowchart illustrating the algorithm you propose to use for theme
implementation.
(12)
< The flowchart should elaborate on every possible function that you will be using for
completing all the tasks in the assigned theme.
Follow the standard pictorial representation used to draw the flowchart. >

Challenges
Q9. What are the major challenges that you can anticipate in addressing this theme and how
do you propose to tackle them? (5)

The major challenges that we anticipate in addressing in this theme are as follows :-
1. Grabbing Mechanism – Grabbing mechanism is a very integral part of this theme. It has
a very important role to play as we have to hold the animal blocks and place them into
their respective habitat. To properly grab the blocks, caution has to be taken as all the
measurements have to be precise enough for the grabber to work. The height and the
width of the grabber has to be marked with caution. There must also be proper material
for the hands of the grabber to provide enough friction. For this we plan to put a rubber
pad on the grabbing hand. Also the robot must be at a fixed distance from the blocks to
ensure proper grabbing. So to ensure this we have used the sharp sensors to keep the
track of distance from the block.
2. Problem in differentiating similar types of Habitats – Some habitats closely resemble
each other. Some are having similar features to another which creates difficulties for the
machine learning algorithm to predict them.