Engineers Gallery

Human Instruction follower Drone

Human Instruction follower Drone

Here New Electronics Project by our Follower. His name is Akash Madhukar Patil persuing M.Tech in Embedded system at VIT University,Vellore.

drone
drone
 [nextpage title=”Abstract” ]

what is drone technology

Abstract- Robots are important now days because they make work easy and quick with perfection .Robots which are on ground has certain limitation like they can’t reach certain place and can do limited work. If we will consider an unmanned aerial vehicle (UAV) instead of robots running on ground then they can perform far better than these robots. This paper gives a brief description about the quadcopter which is also known as quad-rotor.So our aim is to prepare such a drone (unmanned aerial vehicle) which can help a visitor who is unknown to certain place and follow visitors instruction to reach his destination .Our project aims at doing autonomous navigation using GPS(Global positioning system) by giving waypoints to quadcopter and quadcopter will follow waypoint to reach its destination and will come back again to its original position. Latitude and longitude of the destination will be given as input to drone.

Keywords— Quad-Copter, PID, GY-86,GPS, Pitch,Roll, Yaw, aero quad configurator

[/nextpage]

[nextpage title=”INTRODUCTION” ]

Quadcopter is looking like as multicopter which is lifted and propelled by four rotors and for controlling purpose flight control algorithms are used. So our aim is to build such a quadcopter which provides a path to unknown visitor to reach its destination and come back to its origin place. For providing the path from origin place to destination place, GPS is used.For finding location from one place to another place, we are providing latitude and longitude information of the origin and destination to the quadcopter. So we can also called this quadcopter as a drone because there is no user interface to find the appropriate location, and after reaching destination it has to come back at its origin.

For this project we have decided to choose the quad copter frame in a simpler way having four arms in ‘’+ or ‘x’ configuration consist with four BLDC motors with propellers on its every arm. For selection of frame, there is a one parameter which we have to consider that is center of gravity. Because we know that there is not at all any support provide from the surface of the earth. So for making it fly in the air, the frame should be balanced. Here we are using already prepared frame that ST 360 which are easily available in the market and also these frames are fully balanced. So we don’t have faced any problem regarding center of gravity. For rotor purpose we are using brushless dc motor(BLDC) of 1000Kv. All the motors should be same Rpm. If any one of motor has different Rpm then the quadcopter will take some amount of drift and goes towards in that motor direction. Now for driving and controlling the speed of BLDC motors we have to require Electronic Speed Controller(ESC). Esc works on PWM signals which contain pulse width of 1ms to 2ms. In this project we are using Quattro 20Ax4, that contains4 speed controllers in 1 board. We are not using any flight control board for controlling the quadcopter. We are using only Arduino mega 2560 for controlling the quadcopter using control algorithms which are written in programming language. [1]

[sam id=”4″ codes=”true”]

Movement and controlling operations of the quadcopter in the air are controlled through inertia measurement unit. We are using GY-86 for controlling pitch, roll and yaw parameter of the quadcopter. It is the world first 10-axis motion tracking device used for low power and high performance applications.it provides the data for angle changed from its origin position for the entire three axes and also provide the data for direction. For moving origin place to destination place we are using GPS. It provides the latitude and longitude data to the quadcopter. So the GPS looking like as navigator which provides a path to the quadcopter and quadcopter follow that path to reach from origin to destination.

After selection of all the components, we have to interface the entire component to each other so they can do their work successfully. For this we are using Aero Quad Configurator which provides all the details about calibration, mission planner, sensor data and transmitter data. In the current scenario, autonomy is popularly observed in many certain areas. Drones are designed to be low cost so as to minimize loss in the case of failed recovery. Hence, cost effectiveness is an important factor in many UAV system acquisition studies.

[/nextpage]

[nextpage title=”MECHANISM OFFRAME SELECTION” ]

First, there are many advantages in quadcopter when we compare with traditional helicopters. In traditional helicopters is the fixed propulsion mode. Whereas in quadcopter, we can change the roll, pitch and yaw by giving different throttle to different motors. Quadcopter contains four rotors. They are aligned in such a way that 1,3 others which are opposite end to each other will rotate in clockwise directions. Whereas 2,4 rotors rotates in opposite direction. there are two configurations in quadcopters. One of them is X-configuration. It has advantages of high stability when we compare it with other + configuration. So we opted X-configuration for the quadcopter [2].

 

Figure 1: Different Configurations of Quadcopter

[sam id=”4″ codes=”true”]

To achieve movement across the roll axis motor speed of 2, 4 increased compared to the motor speed of 1,3. So, it will bend to left.  Similarly, reverse of the above action will bend the quadcopter in the right direction.  To achieve pitch control motor speed of 1,2 is increased compared to the motor speed of 3,4. So, it will pitch in forward direction. By reversing the action of the above procedure copter will pitch in backward direction. To achieve yaw control motor speed of 2,4 is increased compared to the motor speed of 1,3. So, it will rotate in left direction.  By reversing the action of the above procedure copter will rotate in right direction.

 

Figure 2: Different motor actions of Quadcopter

[/nextpage]

[nextpage title=”COMPONENT SELECTION AND BLOCK DIAGRAM” ]

We are designing the Human Follower Instruction Drone using Arduino mega 2560 as a flight control board for the stabilizing quadcopter. For getting the data about axis movement and angular rotation, IMU GY-86 is used. It is a 10 axis motion tracking device used for low power and, high performance. For knowing the destination from the origin place, GPS L80-M39is used. It provides the latitude and longitude information of each place. Four dc brushless motors ST2210 with maximum thrust of 600 grams is used. Q-brain ESC (Electronic Speed Controller) with power rating of 4 x 20 amps and LIPO battery of capacity 2300 m Amps is used.

[sam id=”4″ codes=”true”]

Figure 3: Block Diagram of Quadcopter

[/nextpage]

[nextpage title=”PERFORMANCE OF COMPONENTS” ]

A. Inertia measurement unit

This section describes the sensors used in quadcopter and function of each sensor part. The main part of sensor in our quadcopter is accelerometer and gyroscope and the common name of this unit IMU GY-86. These sensors are used to calculate the pitch, roll and yaw parameter from quadcopter with respect to surface. The accelerometer provides the proper acceleration for flight stabilization of the quadcopter with respect to the surface in terms of g-force. But the accelerometer is very sensible for smallest fluctuations. The accelerometer can’t detect the rotation and provide the data according to assumption that the surface is not moving. The gyroscope is used to measure rotational parameter according to the different axis.  The data of these parameters is given to the application processor through I2C protocol.

Figure 4: Communication between MPU sensor and Micro-Controller

 

We will use both the accelerometer and gyroscope reading to obtain the angular position of the object. But the sensor readings are not good enough for the stabilization of the quad copter. Because every small forces working on the object will disturb our readings. Our accelerometer readings are better only for the long term. Gyroscope is used to measure the angular position of the object. But the gyroscope readings are better only for the short term. This method for used to combine the accelerometer, gyroscope and magnetometer readings into a clean and stable angle, so we can use the complementary filter. Basically the complementary filter is efficient for both the horizontal acceleration and long term gyro drift.

Figure 5: Sensor Data

 

B.       Complementary Filter

Complementary filter consists of low pass filter, integral and high pass filter. The acceleration data is provided at low pass filter and the gyroscope data is provided at integral and high pass filter. After it two filtered signals are summed together and provide single angle which is the best part of the sensors readings. the mathematical formula of complementary filter is given below

Angle=0.98*(angle+ gyro reading*dt) +0.02*(acc reading)

Figure 6: Complementary Filter

 

After applying the complementary filter, the sensors data is available in very precise and stable manner. This can be seen by the graph which is shown here. In the graph the variation of the accelerometer and gyroscope parameter are very fluctuated .but after applying the complementary filter these parameters provides stable variation in data. Now we can apply these data to the PID control structure for calculating required thrust for BLDC motors.

C.      Center Of  Gravity

Basically center of gravity of any system is related to the geometric property. The center of gravity is related to the average location of the weight of any system. The motion of the system is describe in two terms which is translation and rotation. Translation related to its center of gravity of system from one place to another and rotation related to its center of the gravity of system if it is free to rotate. For the flying object, center of gravity is the measure factor for rotation and flying. The center of gravity is not easy to calculate because it depends on mass of the system and mass of the system may not be uniformly distributed. We can find out the center of gravity by these equations.

Cg * w = s * dw

Where w is the total weight of the system and s*dw is the integration of the function with related to the weight.If we have a mass distribution equation if functional form than we can apply this equation for cg

Where SSS shows the triple integration with dx dy and dz.

D.       ESC Programming

Motors are controlled through electronic speed controller. Basically esc works on PWM signals which is contains pulse width between 1ms or 2ms. 1ms means off and 2ms is on. So first we have to calibrate esc. Esc contains lots of parameter with default setting but these setting can be change according to our system requirement.We have to set throttle range setting by providing appropriate throttle to the esc. After completion of throttle detection the next target is normal startup procedure. In this procedure we have to set Brake mode, Battery type, Cut off mode, Cut off threshold, Startup mode and Timing. After completion of both the procedure, Esc provides different types of tone for the confirmation. Now we can check motors speed by providing throttle respectively low and high.

E.      PID Controller

Basically PID controller is a control dominated system which is based closed loop that gives the correct result which is closer to the desired result by doing changes in the appropriate input values. Quadcopter use pi controller to achieve the stability.There is 3 parameters in PID controller which are P, I and D respectively. P depends on the present error, I depend on the accumulation of previous errors and D depends on the prediction of future errors, based on rate changes. These parameters are used in the code of the program. [3]

 

Figure7: PID controller

Here we are using the unity feedback system which provides the output of the closed loop controller (PID) which is equal to the desired input to the quadcopter in the time domain equation

Here the value of (e) parameter tells the present error which is difference between predict input and current output. After it the difference signal is provided to the controller where the controller determines both derivative and integral of this  given signal and provides control signal .this control signal is applied to the quadcopter system and the new output is given by the system. This output again goes back through the feedback and again compare to the desired input. The transfer function of controller is obtained by applying Laplace transform of time domain equation

Kp= Proportional gain Ki = integral gain Kd = derivative gain

F.      GPS

Basically our quadcopter is based on autonomous navigation system and here is no intervention provided from the human side.sofor this we have to use GPS L80-M39 .GPS is known as global positioning system and it is based on satellite navigation system which provides the information about the location and time. And for our quadcopter we have to require the latitude and longitude information of destination from its origin position. For operating GSM module we have to provide the value between 1600-1800 using AUX channel of RC transmitter. For this we are using mission planner which is provided configurator and we have to provide all the information of origin parameter and destination parameter.

G.       RC Transmitter

[sam id=”4″ codes=”true”]

For operating the quadcopter from its initial state we have to use RC Transmitter for providing the appropriate throttle. So at first we have to calibrate the gyro by using throttle values of transmitter and then we have to provide appropriate throttle to the quadcopter. In that transmitter, it consists few parameters that are throttle, pitch, yaw, roll, and aux. these parameters are used to control the quadcopter when it is in flying mode. It’s also consist sub trimming parameter which are also used to control the quadcopter when it’s getting some drift. The drift may be comes due to lots of parameter like as center of gravity and motor Rpm. Before using transmitter first we have to set all the calibration of every parameter and set it in required mode. So we can easily handle the quadcopter by use these appropriate setting in the future.

H.      System Analysis And Simulation

After interfacing of every component we have to done proper calibration. So that we are using aero quad configurator and it is just as like simulator where we can observed that the interfaced component data and also correct the data by choosing appropriate parameter. At first we have to connect our Arduino mega board which is working as flight controller board to the quad configurator by using Arduino cable. Now we have to load the aero quad flight software to the board.

Now we move towards the calibration of sensor which consist accelerometer, magnetometer, gyroscope and barometer. For this we have rotate the quadcopter in different axis according to the requirements. After completion of sensor calibration we have to move on the transmitter part calibration.

It that part we have to set the range of throttle, pitch, yaw and roll by moving the stick of transmitter in appropriate in direction. And also we have to one ESC calibration by providing minimum and maximum throttle to set high and low speed of motors.

Now the next part is vehicle status, in that part it’s consist two modes are rate mode and altitude mode. At first we have to observe the response of the motors in the rate mode by moving the quadcopterand us to perform same in the altitude mode. PID parameter of rate mode and altitude mode are also given from this configurator. For making it fully stable we have to choose appropriate values of P, I and D in both the modes. So this is all about aero quad configurator.

 

 

Figure 8: Aero Quad Configurator


[/nextpage]

 [nextpage title=”WORKING PRINCIPLE” ]

Quadcopter is basically controlled by two sensors they are Gyroscope and Accelerometer. Our quadcopter has two modes of operation, first is rate mode and second is Attitude mode. Rate mode uses only Gyroscope to stabilize quadcopter whereas Attitude mode uses both Gyroscope and accelerometer to stabilize quadcopter. Illustration of both modes is as follows

Figure 9: Per axis PID structure

 

 

  1. Rate Mode

Rate mode also termed as Acrobatic mode. This mode uses RC(Remote control) sticks to control angular velocity of copter. Below shown is structure of control algorithm which we have implemented in rate mode.

In order to fly properly in this mode we tuned PID controller so as to achieve stability. We tuned our quadcopter in this mode by tying one axis to rope and applied PWM pulses to motors which were on other axis.

Proportional parameter: controls the rotation rate for the roll and pitch axis. Higher values lead to higher rotation rates, lower to slower rotation rates. This parameter actually adds power to motor so as to restrict copter to lean on any axis.

Integral parameter: Integral parameter provides variable amount of corrective force based on angle given by Gyroscope. But in our case we kept I parameter 0 since copter when kept on ground will have no error in its angle and so no correction is required but as integral parameter is having property of accumulating error so on ground also because of certain imbalances there will be few errors  and these errors will be accumulated and lead to imbalance of copter.

Derivative parameter: This parameter moderates speed at which copter returns to its original position. Whenever copter will make sudden changes in its pitch and roll then to return back to its original position this parameter should be tuned. We tuned this parameter and kept it near to 0 but negative so as to not make copter more aggressive for sudden maneuvers.

 

  1. Altitude mode

This mode uses both accelerometer and Gyroscope for making copter stable. Accelerometer gives tilt angle on three axis in our case pitch(X-axis),Roll(Y-axis) and Yaw(Z-axis). This mode is considered to be more comfortable for flying and is most stable. User has to first tune rate mode properly and then move towards attitude mode.

Above diagram shows structure of algorithm that we have implemented on our copter. This structure is implemented for each axis which are pitch, roll and yaw. First of all stabilize PID takes input from accelerometer and user input i.e remote control stick input and appropriate output is fed to rate PID so that to set rotational rate of rate pid. If actual angle on pitch or roll is 30 degrees and desired is 0 degrees so error will be desired – actual = error i.e 0 – 30 = -30 degrees. So now desired rotational angle is -30 and to achieve this rate pid will take this error after tuning through stab pid and other input as actual angle from gyro and will give smoothed output to motors so that motors will react to correct the angle and make copter stable. Actually in this case motor will try to achieve speed of 30 degrees per second to get stable and so as error goes on increasing speed will also increase.

[sam id=”4″ codes=”true”]

  1. GPS Navigation and GPS Position Hold

Our main aim is to do autonomous navigation of our copter to location which will be set inside code in the form of latitude and longitude and GPS unit on copter will track its location and compare it with desired location and navigate towards that location. GPS position hold maintains level flight of quadcopter at one location with accuracy of 1-2 meters.

GPS Data string: The input from GPS sensor is in GPGGA format which is specified by NMEA protocol. GPGGA format is as shown below [4]

$GPGGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx

hhmmss.ss = UTC of position

llll.ll = latitude of position

a = N or S

yyyyy.yy = Longitude of position

a = E or W

x = GPS Quality indicator (0=no fix, 1=GPS fix, 2=Dif. GPS fix)

xx = number of satellites in use

x.x = horizontal dilution of precision

x.x = Antenna altitude above mean-sea-level

M = units of antenna altitude, meters

x.x = Geoidal separation

M = units of geoidal separation, meters

x.x = Age of Differential GPS data (seconds)

xxxx = Differential reference station ID

Navigation Algorithms:Distance between two points is given by:

Dist = 2sin-1(√cos(lata).cos(latb).(sin((lona-lonb)/2))2 + (sin(lata-latb))2)

GPS bearing degree:

Bearing = cos-1(sin(lata)-sin(latb).cos(dist))/sin(dist).cos(lata)

Where, lata= latitude at point a

latb= latitude at point b

lona = longitude at point a

lonb = longitude at point b

Bearing shows amount of angle that quadcopter can bear in order to reach its destination. This bearing  angles denotes amount of drift copter has made with respect to its desired destination. Offset bearing can be calculated by using following formula:

Bearingoff = bearingtowp − bearingcurrent   for   disttowp ≤ dist_tobp

Bearingtowp  −  bearingcurrent     for disttowp >dist_tobp

 

Figure 10: Navigation Flow

In our case we are using GPS with accuracy of 2 meters and so waypoint completion can be considered by diameter of 4 meters around desired destination. The distance to active waypoint is divided by 20 meters.The initial distance which is to be achieved is then divided by this number and it givesdistance between  biasing point(distance given while setting GPS position)  close to 20 meters.In this way GPS helps quadcopter to get to its desired destination.

[/nextpage]

[nextpage title=”PROBLEMS FACED” ]While designing Quadcopter, the problems faced and the methods to solve those problems are listed below.

A.    Vibrations produced by the propellers

By balancing the propellers on each motors, we recovered from the problem of vibration.

B.    Programming of ESC and Duty cycle

Due to different types of flight controller having different throttle, so first we have to calibrate the throttle range .which is done by the creating a pwm signal and apply 2ms pulse for full throttle and 1ms pulse for zero throttle.

[sam id=”4″ codes=”true”]

C.    Improper readings of MPU sensor due to vibrations and noise

By implementing the complementary filter we recovered from the problem of noise. And by adding foam pad and plastic fiber plate, we removed the vibrations that are disturbing the sensor readings.

[/nextpage]

[nextpage title=”RESULT” ]

[sam id=”4″ codes=”true”]

Having integrated all the above components nicely into our project, we have completed the sensor part and interface it through application processor also our PID part is over. Now our quadcopter is fully stabilized and we have successfully launched it and tested its altitude hold at height of approximately 20 meters from ground level. Coding part of navigation using GPS is over and we are testing for GPS navigation and its accuracy to track path towards waypoint.

[/nextpage]

[nextpage title=”CONCLUSION” ][sam id=”4″ codes=”true”]In this paper, we have discussed about how to build a drone from its scratch and what problems are faced by us during stabilization. Our main focus was on the PID algorithm and autonomous navigation. The main challenging point during theproject is to stabilize the quadcopter using cheap hardware. We have developed this technique by the use of Arduino mega 2560 and IMU sensor unit. And the other part is autonomous navigation which is performed using GPS unit .So we can conclude that quadcopter applications are not limited to certain areas. It can be extended to many fields and are helpful in path finding for visitors from unknown location to known location.[/nextpage]
[nextpage title=”REFERENCES” ][sam id=”4″ codes=”true”][1]           Nemati, A. and Kumar, M, “modeling and control of a single axis tilting quadcopters”, published in American control conference (ACC), 2014.[2]           Chen, M.Y, Wilson, S.H and garner, G.T, “designing a spatially aware and autonomous quad copter” published in Systems and Information Engineering Design Symposium (SIEDS), 2013 IEEE.

[3]           Mustapa, Zaki and Abas, Norafizah, “Altitude controller design for multicopter UAV”, published in Computer, Communications, and Control Technology (I4CT), 2014 International Conference on sept.2014.

[4]           S Grzonka, G Grisetti, W Burgard, “Towards a navigation system for autonomous indoor flying”,  IEEE International Conference on Robotics and Automation, pp.- 2878 – 2883, May 2009

[5]           C. Bills, J. Chen, and A. Saxena, “Autonomous MAV flight in indoor environments using single image perspective cues,” in IEEE International Conference on Robotics and Automation, May 2011

[/nextpage]

Exit mobile version