Design Solution For Flight Control of A Quadcopter

DOI : 10.17577/IJERTV3IS052080

Download Full-Text PDF Cite this Publication

Text Only Version

Design Solution For Flight Control of A Quadcopter

Arjun M. Nair1, Manoj A.Talreja2, Prithvi Bhaskar3, Student, Department of Telecommunication, Dayananda Sagar College of Engineering, Shavige Malleshwara Hills, Kumaraswamy Layout, Bangalore-560078, Karnataka

Kiran Kumar T4 Asst. Professor, Department of Telecommunication, Dayananda Sagar College of Engineering, Shavige Malleshwara Hills, Kumaraswamy Layout, Bangalore-560078, Karnataka

Abstract–This paper covers the principles of the control systems designed for regulating flight and motion of the quadcopter. The driving circuit of the motors is explained in detail and the algorithm governing their control is discussed. Besides this the paper also discusses the control unit involved in providing stability to the quadcopter. Furthermore the paper covers an intelligent system designed for a quadcopter to enable automatic collision avoidance. The collision avoidance system is based on the application of infrared light to detect objects in the vicinity of the quadcopter.

Keywordsquadcopter; flight; stability; obstacle; avoidance; BLDC

  1. INTRODUCTION

    A quadcopter is a multicopter that is lifted and propelled by four rotors. The lift in quadcopter is generated by a set of revolving narrow-chord aerofoils. Quadcopter use 2 sets of identical fixed pitched propellers: 2 clockwise and 2 counter-clockwise. These use variation of RPM to control lift/torque. Control of vehicle motion is achieved by altering the rotation rate of one or more rotor discs, thereby changing its torque load and thrust/lift characteristics.

    A typical hardware consists of four motors and the

  2. HARDWARE DESIGN

    There are three segments of the system where hardware design must be considered BLDC motor control unit, obstacle avoidance module and the accelerometer unit.

    1. BLDC motor control unit

      The design of the BLDC motor control unit is based on sensorless feedback control [2]. Four of the motor controllers are used for the four motors of the Quadcopter. Each unit controls a single motor.Fig. 1 shows the circuit schematic of a motorcontroller unit. A PIC16F886 [3] is used to control the commutation of the motor and measure the feedback.

      The TC4469 [4] is used to drive the mosfets according to the logic level from the microcontroller.

      The feedback is taken through a voltage divider to pin number 18 of the microcontroller. The values of the voltage divider are selected such that the voltage read by the microcontroller is always below the ADC (Analog to Digital Converter) reference voltage. From the datasheet of PIC16F886 [3], the reference voltage is configured as 5V. When input is 12V,

      electronic control system. The motors under consideration are BLDC (Brush-Less Direct Current) motors. These have better torque to weight ratio compared to brushed motors.

      1

      =

      × 1

      1 + 2

      (1)

      The electronic control unit is required to interface various peripheral modules to a central hub and also for intercommunication between modules.

      Various software algorithms are required to control and maintain stable flight. The system must be able to stabilise itself with minimum manual effort and it must also respond to manual commands.

      In this paper, we present a method to implement the control mechanism of a quadcopter with methods for self- stabilisation and obstacle avoidance.

      The design considerations required for a typical hardware is discussed first and the software design and algorithms follow.

      1 = 2.977 (2)

      This is below the reference voltage and hence it can be used for feedback.

      Fig. 1. Circuit diagram for motor control unit

      Fig. 2 depicts the driver circuit used to run each BLDC motor. The fundamental principle of operation of the circuit is that of a switch. Thecircuit is required to drive the high current as required by the BLDC motor. The microcontroller (PIC16F886) firmware regulates the switching operation of the MOSFETs in order to supply current to the motors in the desired sequence.

      2 = 5 1.4 0.2 (10)

      0.02

      2 = 170 (11)

      Approximating to the closest standard value,

      2 150 (12)

      The collector current at saturation due to the design is determined as follows:

      = 1

      2

      (13)

      = 5 1.4 0.2 (14)

      150

      = 22.67 (15)

      Fig. 2. MOSFET driver circuit

      The design of R1 depends on the minimum base current required to saturate the transistor Q1.

    2. Obstacle avoidance module

      Each module of the obstacle avoidance system can be

      (16)

      subdivided into two independent circuits. One part of the circuit controls the IR LED (Infra-Red Light Emitting Diode), and the other part biases the photodiode.

      =

      22.67 × 103

      250

      (17)

      Fig. 3 shows the circuit diagram of a single obstacle avoidance module.

      The following assumptions are made before designing

      = 9.067 × 105 (18)

      Applying Kirchhoffs law at base-emitter loop of Q1, the value of R1 can be obtained.

      this module.

      = 5 (3)

      1 = 250 (4)

      1 =

      min

      1 = 5 0.6

      9.067 × 105

      (19)

      (20)

      Fig. 3. Circuit diagram of obstacle avoidance module

      1 = 0.2 (5)

      1 = 0.6 (6)

      = 5 = (7)

      1 = 1.4V (8)

      IC, IE and IB are collector current, emitter current and base current of Q1 respectively.

      The expected current through the IR LED is 20 mA. The design of R2 is as follows:

      1 = 48,529 (21)

      1 47 (22)

      In a photodiode, the reverse bias resistance is inversely proportional to the light intensity [1]. The photodiode is used in reverse bias. It forms a voltage divider with R3. From Fig. 4, a value of 100 K is selected for R3 to provide a readable voltage from the voltage divider formed by the photodiode and R3.

      Fig. 4. Reverse current vs the lumens/m2 of photodiode

    3. Accelerometer unit

    2 =

    1

    (9)

    An analog accelerometer derives an output voltage for

    the force of acceleration exerted on the chip on each axis. A

    three axis accelerometer will have three analog output pins. Each analog pin has high output impedance. Fig. 6 depicts

    the interfacing unit required to read the analog value from the accelerometer.

    Fig. 6. Interfacing to analog accelerometer

    The capacitor C1 is required to limit the bandwidth of the data. C1 forms a low pass filter along with the internal resistance of the analog output. The low pass filter reduces the noise levels of the signal. The noise levels are inversely related to the bandwidth.

    A voltage follower using an op-amp can be used to provide a low impedance input for the analog to digital converter.

    Referring tothe characteristics of Analog Devices ADXL335 [5], it is observed that the output impedance is 32 K on the analog output pins. The capacitor value required for bandwidth of 50 Hz can be calculatedby using the equation for 3 dB frequency of the low pass filter.

    Each one of the sequence must be applied one after another after a certain delay. The delay controls the rate of commutation and hence the speed of rotation. The value of delay depends on the commutation rate which locks the speed of rotation.

    Phase

    CH

    CL

    /td>

    BH

    BL

    AH

    AL

    1

    On

    Off

    Off

    Off

    Off

    On

    2

    On

    Off

    Off

    On

    Off

    Off

    3

    Off

    Off

    Off

    On

    On

    Off

    4

    Off

    On

    Off

    Off

    On

    Off

    5

    Off

    On

    On

    Off

    Off

    Off

    6

    Off

    Off

    On

    Off

    Off

    On

    CH: C High, BH: BHigh, AH: AHigh CL: C Low, BL: B Low, AL: A Low

    Fig. 7. Commutation sequence of BLDC motor

    3

    = 1

    2 × (,,)

    (23)

    Fig. 8 is a flowchart for the algorithm to check if the commutation is locked at the correct rate. Corrections are

    50 Hz = 1

    2 32 K × (,,)

    (24)

    made when the rate is found to be wrong.

    During each commutation the algorithm checks whether

    (,,) = 0.1µF (25)

    Hence, a 0.1 µF capacitor is added in parallel to get a bandwidth of 50 Hz.

    the drive is on at the pin where feedback is taken. If drive is on, the reference voltage can be retrieved. The reference voltage is the half of supply voltage. The drive voltage is read and halved to get the reference voltage.

  3. SOFTWARE DESIGN

    The software plays an important role in the intelligent

    =

    2

    (26)

    management of the system hardware. At the core level there are algorithms to control the basic rotation of the motor and management of the input and output interfaces of the sensors. At a higher level, the data from the sensors are used to manipulate the speed of the motors at all levels of control.

    Software is used to control the commutation rate and commutation sequence for the BLDC motor, to control and read data from the obstacle avoidance module, to interface to the accelerometer and to attain integrated functionality of all systems.

    1. BLDC Commutation

      The feedback from BLDC motors without hall effect sensors is taken from the BEMF (Back Electro Motive Force) produced at the stator windings. The value of the BEMF is read through an ADC.

      The commutation of BLDC motor is done in 6 phases. Fig. 7 shows the sequence for commutating through each phase. The reverse sequence is used when the direction of rotation has to be changed.

      The next action is performed when the drive is floating. The BEMF is read at half and three quarter time of that commutation. These values are compared to the reference values to determine the correct commutation rate. If BEMF1 and BEMF2 are greater than the reference voltage, the commutation rate is decreased; if BEMF1 and BEMF2 are lesser than the reference voltage, the commutation rate is increased.

      External speed control of the motor can be done by using PWM signals to switch the driver circuits. It is mandatory that the PWM signal remains high when feedback is taken.

      Start

      Start

      Turn off transmitter

      Yes Is drive No on?

      eve Yes Is ly/2

      Floating?

      Retrieve BEMF1 at ½ commutation and BEMF2 at

      ¾

      commutation.

      Correct the commutation rate.

      No

      Retri Vsupp

      Fig. 8. Locking speed with commutation rate

      Ignore

      Obstacle

      detected

      Yes

      Yes

      Read Intensity(I)

      I >

      Brightness threshold

      No

      Turn on transmitter

      Read Intensity

      (I)

      I >

      Obstacle

      threshold

    2. Accelerometer interface

      The accelerometer interface reads the analog values from the three axis of the accelerometer and stores it in general purpose memory locations of the microcontroller. The rate at which the values are retrieved must be lesser than the bandwidth of the accelerometer.

    3. Obstacle avoidance interface

    The obstacle avoidance modules use the intensity of the reflected light to determine if obstacles are located in the vicinity.

    Each one of the transmitter and receiver pair has two thresholds associated with it the brightness threshold and the obstacle threshold. The brightness threshold determines the level of allowed external interference. If the external interference exceeds the brightness threshold, the readings from the module are ignored. To confirm an obstacle, the retrieved value must exceed the obstacle threshold.

    The sequence of operations required to detect the obstacle are demonstrated in the flowchart in Fig. 9. The transmitter is first switch of and the intensity value is read

    No

    No Obstacle detected

    Fig. 9. Obstacle detection algorithm

  4. INTEGRATED SYSTEM

    The complete system integrates all the sensors and the motor control unit. The data from the sensors are processed to determine the speed of the motors. Code words from the remote controller determine the direction of motion.

    1. Basic stability control

      The first stage of flight control involved stability and achieving basic flight. The accelerometer values are read and processed for this function. The three stages of basic flight are taking off, static flight and landing.

      Fig. 10 shows the logic used for taking off. The motors are kept switched off initially. The value of acceleration is measured from the values obtained from all three axes of the accelerometer.

      from the photodiode to determine the level of interference in the module. If the external interference is over the threshold,

      = 2 2 + 2 + 2

      (27)

      the module is ignored in that cycle. Otherwise, the transmitter is turned on and the intensity is measured from the photodiode. The intensity value is then compared to a threshold to determine if an obstacle exists.

      Assuming that positive X is forward, and positive Y is right and positive Z is upwards, motor speed is manipulated for takeoff. The front side motor speed is increased if X values are higher than 0 and the backside motors increase their speed if the value is lesser. Similarly the right side motors increase their speed if Y is greater than 0 and the left

      side motors increase their speeds otherwise. This goes on till X and Y reaches a value of 0. Then the value of Z is compared to the calculated value of g. All the four motors reduce or increase the speed to stabilize the value of Z to g.

      The next stage is to maintain steady flight. The values of X, Y and Z are constantly monitored to maintain a steady value of 0, 0 and g respectively.

      For landing, the quadcopter is required to be in steady flight. The motors are gradually spun down to maintain a lower value than g at Z and also the value 0 is maintained at both X and Y axis.

    2. Direction control

      The direction of flight is controlled by maintaining a steady value of acceleration in a particular direction. If the quadcopter has to move to the right, the motors on the right are gradually spun down while monitoring the accelerometer value from all axes. There should be a 0.02g increase in the value from the Y axis. The value of Z axis and X axis is maintained at g and 0 respectively.

      The motion towards a direction is halted and reversed with an acceleration of 0.01 in the opposite direction when the obstacle avoidance module detects an obstacle in the direction of flight.

    3. Manual Control

    The manual control of the quadcopter is done by transmitting code words to the control unit. The control nit interprets the code word for thedirection of motion and performs the required function for flight in that direction.

  5. CONCLUSION

    The hardware and the software algorithms form the basis of controlling a quadcopter. Various hardware sensors along

    Correct corresponding motor speed

    Correct corresponding motor speed

    Start

    Read Accelerometer X, Y, Z

    Calculate gravity value (g)

    Start motors at lowest speed

    No Is X,Y = 0

    Yes

    No Is Z = g

    Yes Finish

    with control algorithms ensure a steady flight of the quadcopter. Obstacle avoidance systems are useful to avoid errors during manual control and also avoid unforeseen disturbances. The presented methods will be a reliable platform to design and develop a quadcopter.

    Fig. 10. Take off Flowchart

  6. REFERENCES

  1. James F. Cox (26 June 2001). Fundamentals of linear electronics: integrated and discrete. Cengage Learning. pp. 91. ISBN 978-0- 7668-3018-9. Retrieved 20 August 2011.

  2. Ward Brown, "Brushless DC Motor Control Made Easy" Application Note AN857 by Microchip Technology Inc, 5 Dec., 2011. Available: http://ww1.microchip.com/downloads/en/AppNotes/00857B.pdf.

  3. Microchip Technology Inc, "PIC16F882/883/884/886/887 Data Sheet".

  4. Microchip Technology Inc, "Logic-Input CMOS Quad Drivers", TC4469 Datasheet.

  5. Analog Devices, Inc. "Small, Low Power, 3-Axis ±3 g Accelerometer", ADXL Datasheet, Rev A..

Leave a Reply