Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Design and Implementation of GPS Based Quadcopter Control System Dlnya Abdulahad Aziz, Sameer Saadoon Algburi, Sameer Alani, Sarmad Nozad Mahmood {dilnea89@gmail.com, sameer.algburi@uoalkitab.edu.iq, itsamhus@gmail.com,sarmadnmahmood@gmail.com} Department of Computer Technical Engineering, Alkitab University, Iraq Abstract. The signal coverage area is considered a controversial point that is solved and discussed wisely in this paper. The designers usually concentrate only on satisfying the controllability of the quadcopter module without discussing the coverage range between the transmitter and the receiver. This paper shows a smart design method of a low-cost quadcopter device controlled by a GPS. Moreover, the modern control system was designed to control the plane by creating an integration between the control unit and the PID system, which allowed the system to reach stability very fast and the peak overshoot was eliminated. The control system of the quadcopter calibrates the Pitch, Roll, Twist, which located on x,y,z axes respectively depending on the altitude sensor. Under the GPS act, the entire frame will be allocated in the covered area which was specified by 500 meters. This specification keeps the quadcopter in the required range and the tipping down accidents will be unexpected. Finally, this work was completed based on the Arduino IDE C++ compiler and Matlab program that emphasizes the theoretical results. Keywords: PID Controller, Quadcopter Control System, GPS System, Modern Control System. 1. Introduction The design complications of the control systems were reduced recently due to the progress and the development allowed by the robotic systems and mechatronics engineering [1, 2]. Such fields prepare all the requirements for the experts to simplify the sophisticated control systems based on various strategies. Learning and implementing electronic components separately violates the fulfillment of the working methodology in robotic system areas. This means that dealing with the components as a whole plant gives more opportunities to choose the desired specification. Quadcopter stability is considered a great challenge that can be satisfied depending on the modern control models especially GPS based controllers. Modern control and robotic systems were discussed in this paper to present the effect of unique control system designs on the stability analysis of any critically damped unit. The GPS tracks the satellites concerning the location and the range and manages the signals that are forwarded via the satellites between the ground station and the space to discover the position of the object on the earth. The integration performed between the quadcopter controller and the GPS module satisfied the stability analysis. As a background, the quadcopter is the device that holds four brushless motors equipped at the end edge of the flying frame by around 90 degrees [3, 4, 5]. The entire frame is dominated by six IMDC-SDSP 2020, June 28-30, Cyberspace Copyright © 2020 EAI DOI 10.4108/eai.28-6-2020.2297931 degrees independently and at least the four motors must be linearly controlled based on the altitude sensor. Furthermore, pitch, roll and twist based quadcopter calibration over X, Y, and Z axes respectively satisfy the orientation procedure. The position of the motors that equipped, in contrast, allows operating each dual motor in clockwise and counterclockwise, which allows the controllability of the motors to be increasing drastically. Moreover, the employed PID system as an integrated component alongside with microcontroller and the GPS module guaranteed fast stability and almost with no oscillation. The PID integrated system fulfills the stability by calibrating K p , K i , and K D gains. It is worth mentioning that the values of the gains play an important role to terminate the peak overshoot and to reach the zero steady-state error rapidly as confirmed in mathematical expressions demonstrated by MATLAB program. Raspberry Pi, FPGA, Arduino microcontrollers provide sensitivity and less complexity in dealing with the sensors and the actuators [6, 7]. While, Arduino controller has a flexible environment, and offers easy setup and communication methodology. Finally, this work proposes the stability satisfaction based on a typical system integrated to create a stable GPS based flying module; moves in a certain area specified by 500 meters. 2. Problem Statements and Objectives The main problem in Quadcopter is the balancing and stability system [8, 9]. Most of the Quadcopters will be unbalanced and lost stability in case there are disturbance direct such as wind [10, 11]. In this research, to solve the above problem the full system of the Quadcopter was designed and constructed [12]. Furthermore, the proposed model satisfies the following terms: design a PC based quadcopter that can be controlled wirelessly. Eliminate the oscillation and peak overshoot of the control response, which subjects the quadcopter to be tipped down. Control the flight using the GPS module in a range of 500 m depending on 1.5 GHz frequency response. Finally, test the performance of the designated flying module. 3. Project Scopes and Constrains The scopes include the weather condition, distance and space: • Quadcopter only can operate on a sunny day or dry condition. • Quadcopter operates in distances not more than 500 meters in eyesight from the wireless receiver. • Quadcopter is controlled by Arduino microcontroller. • Quadcopter is operated by brushless motor control using an electronic speed controller. 4. Aim of Work The coverage area is the argument point that was presented and discussed intelligently in this paper. Most of the quadcopter designers give priority to the control methodology and orientation analysis. Whereas, driving mode without damage is the ultimate argument that should be satisfied. The quadcopter is the device that can be controlled via radio signals in specific areas, while the problem statement starts by supposing that the corresponding range was cracked. Under this act, the whole frame will be subjected to be tipped down and broken. In this paper, the GPS encloses the range and allows the quadcopter to be flying in a range of 500 m away from the transmitting antenna. 5. Quadcopter System Elements The proposed system is constructed from several components identified as follows: 1) Quadcopter Frame. 2) Quadcopter Motors. 3) Electronic Speed Controller (ESC). 4) Power Station. 5) Balancing Port. 6) Arduino UNO Microcontroller. 7) Receiver / Transmitter Controller. 8) NEO 6M GPS SYSTEM. 5.1.The Frame The frame is considered the physical structure of a quadcopter that should be chosen wisely in order to satisfy the balance of the entire stature. The stature holds the motors and intersections all the elements of the flying plane. The massive structure of a frame allows the motors that are equipped at the edges to spin without collisions. However, the weight of the frame is the ultimate point that allows the motors to elevate the frame proficiently. Furthermore, the proposed frame shown in Figure 1 demonstrates the specified metrics by 300 mm distance among the propellers, 200 mm frame diameter, and 50 mm control base [8]. Fig.1. Quadcopter Frame 5.2.Quadcopter Motors The propellers spin depending on the motion of the actuators, which are seen mounted on the end of motors shafts leading the plane to be moving swiftly. Furthermore, the weight of the motors is considered a very critical choice for designers. The brushless motors shown in Figure 2 are the most appropriate actuators for the quadcopter frames due to their drift motion and less weights. For a given low constant voltage, the proposed motor spins as fast as the huge motors such that it reaches 11000 KV. Accordingly, the motor offers 26 A maximum current to spins the motors without harm and maximum power around 289 W at 12 V, 385 W at 15 V. Furthermore, in this work the employed brushless motor weight is 60 g. While the control range of electronic speed control ESC is specified by 25 – 30 A. The diameter of the propellers represents the pitch that reads the number of rotations at a time. Finally, the total weight of the quadcopter was lastly specified by 840 g that results in glorious fly tactics [8, 9]. Fig.2. Quadcopter Brushless Motor 5.3.Electronic Speed Controller Generally, a motor needs to be controlled in order to stabilize the motion approach of the entire system. This stabilization can be satisfied by ESC (Electronic Speed Controller). The ESC in Figure 3 acts effectively under the domination of PWM signals that controls the motors in the form of pulses. Each motor is provided by an average current sufficient to protect the motors against warm. The proposed ESC in this project provides the motors approximately by 20 A which has guaranteed a marvel performance for the quadcopter [13]. Fig.3. Electronic Speed Controller Device 5.4.Power Station The battery of the quadcopter is lithium-ion power station specified by 11.1 V, 3300 mAh, and 35C capacity. It can to mentioned that the term Ampere hour (Ah) is the amount of energy charge in a battery that allows one ampere of current to flow in one hour. Furthermore, C describes the time taken for a battery to be discharged without harm. For more clarity, Figure 4 shows the discharging aspect of the battery station [11, 12]. Fig.4. Storage Device Specifications 5.5.Balancing Port The SparkFun 9D is considered an integrated module that includes Accelerometer, Magnetometer, and Gyroscope in a single slice as shown in Figure 5. This integration minimized circuit complexity regarding the number of ports that need to be wired. Accelerometer is the part responsible for measuring the overall acceleration of the quadcopter depending on the gravity status. Moreover, the Magnetometer section measures the magnetic field of the earth that encloses the quadcopter in order to obtain the range of the heading. Lastly, the Gyroscope portion measures the momentum angles among the three axes which lead to noise absence and subsequently high-quality signal [14]. Fig.5. SparkFun 9D Altitude Sensor 5.6.Arduino Microcontroller Arduino microcontroller is an open-source electronic board manufactured in different modalities such as Arduino mini, Uno, Mega, Nano …etc. Arduino microcontroller is considered the most friendly board and easily compatible with the hardware and software. This board deals with several sensors as inputs to manage data transfer efficiently. In addition, it acts well with motors, lights, specific kits, and some other actuators. The main component in Arduino UNO board is ATMEGA chip, which can be seen affixed on the top of the board. This chip holds the programing code that intentionally activates each part in the board [15, 16]. To be more specific, Arduino microcontroller with the specification of each port is shown in Figure 6 [17, 18]. Fig.6. Arduino Uno Microcontroller 5.7.Receiver / Transmitter Controller The receiver circuit shown in the left-hand side of Fig. 5 was connected to the Arduino microcontroller in order to receive the radio signals coming out from the transmitter antenna. The receiver side uses the HT 12D integrated circuit as an encoder for the incoming signals. While the transmitter circuit shown in the right-hand side of Figure 7 employs HT 12E integrated circuit as a decoder in order to deal with the transmitted signals [19]. Fig.7. Receiver and Transmitter Circuits The transmitter circuit does not need a regulated 5V; hereby it is connected to 9V battery directly. However, the transmitter needs to be provided by a regulated 5 V from the battery source. The transmitted signal will be transformed into PWM signal in order to be adapted with the proposed microcontroller in addition, to separate the controllability of the channels available in the receiver side. The proposed channels satisfy four control actions identified by the pitch, roll, twist, and push. The proposed transceiver module acts under the supervision of 2.4 GHz radio frequency that can be very suitable to control the four receiver channels. 5.8.Neo 6m GPS System The Global Positioning System (GPS) manages the signals that are forwarded via the satellites between the ground station and the space to discover the position of the object on the earth. The proposed GPS module shown in Figure 8 can be interfaced and communicated with the microcontroller through USART port. The module receives information such as UTC time, longitudes, latitudes, altitudes, etc. from a string called NMEA string. Fig.8. GPS System Module As a background for the GPS systems, the global positioning system is made by the constellation of the satellites on the earth. Each satellite has a time clock onboard that shows the precise time. As it is orbiting around the earth, each satellite continuously transmits its location and the time clock on 1.575 GHz frequency. Considering that the GPS receiver was located in a specific place at the earth, the transmissions are listened completely by pointing the receiver towards the sky. By listening in three or more satellites' transmissions, the receiver should be affixed as a triangle on the earth while the forth satellite needs to figure out the altitudes first. The extracted information helps the GPS to realize the location, altitude, how fast the object is moving, and the position on the earth. The good sensitivity in the GPS receiver allows the transmissions to be realized clearly. Finally, the proposed GPS is completely compatible with Arduino microcontroller and connection complexity with such microcontroller boards barely is very comfortable [20, 21]. 6. Quadcopter Orientation Firstly, the whole quadcopter frame looks unsteady, unstable, and uncontrollable system. The controllability issues are difficult without employing an altitude sensor that is used for balancing the frame. The proposed altitude sensor is too important to measure the environmental alterations around the flying plane. In this work, a new integration procedure was done among the microcontroller, the altitude sensor, and the GPS concerning the PID control methodology. The altitude module defines the Accelerometer, Magnetometer, and Gyroscope sections to control and stabilize the dynamical activities of the system. Moreover, the microcontroller can behave completely well depending on the PID integration that defines the parameters identified by proportional K_p, Integral K_i, and Derivative K_D to dominate the three sections of the altitude sensor. The orientation procedure of the proposed quadcopter is shown in Figure 9. Fig.9. Quadcopter Orientation Analysis Where, θe(t) is the angle of the error, and ∅Est is the estimated angle. The quadcopter can have a stable flight mode by enhancing the controllability of the axes shown in Figure 9. Furthermore, the secure flight mode is the operation performed by the proposed NEO 6M GPS module to specify the coverage range of the plane by 500 meters based on the programing code with respect to (#include <TinyGPS++.h>) library. The angular symbols denoted as ( α , γ, and β ) represent the axes that the frame can follow during the flight journey. Hereby, these symbols lead to distinctive controllability and satisfaction for the parameters ( Roll, Pitch, Twist ) respectively. Firstly, the height and the angular rotation of the quadcopter are determined by stabilizing the Roll and Pitch axes based on the attitude sensor. The programing code algorithm that was written in C++ compiler based Arduino IDE can calibrate the sections of the altitude sensor individually. Furthermore, the orientation of the frame based on the angular velocity ω with respect to the Roll (𝛼) and Pitch (𝛾) were fulfilled experimentally and given as follows: 𝜔𝑦 𝛼 = 𝑎𝑟𝑐𝑡𝑎𝑛 ∗ ( ) … … … … … … … … . … … … (1) √𝜔𝑦2 +𝜔𝑧2 𝛾 = 𝑎𝑟𝑐𝑡𝑎𝑛 ∗ ( 𝜔𝑥 ) … … … … … … … … … … (2) √𝜔𝑥2 +𝜔𝑧2 Moreover, PID control system is the appropriate control design to stabilize the quadcopter performance concerning altitude sensor information. As a background, PID controller is constructed of proportional gain K p , Integral gain K i , and Derivative gain K D . It is worth mention that MATLAB program was used to confirm the programming analyses that are realized to specify the parameters of PID system in Arduino IDE software. Firstly, MATLAB simulation was implemented to create the PID system to measure the response of the error signal that dominates the main control system of the quadcopter. For that reason, this error signal denoted as e(t) can be such integration with the proposed gains. Hence, the PID controller defines p as the proportional gain (K p ∗ e(t)), i as the integral gain (K i ∗ e(t)), and D as the derivative gain (K D ∗ e(t)). The suitable PID feedback control system was modeled as shown in Figure 10. The calibration procedure was chosen after laboratory experiments by assigning values for each parameter such that K p = 400, K i = 200, and K D = 5. Under this act, it can be stated that the gains are represented by the calibration method to enhance the reads of the altitude sensor by including the PID values in Arduino programming code. Fig.10. PID Feedback Control System The simulation satisfied the stability of the system and the absence of the peak overshoot that initially lead the quadcopter to be tipped down was terminated as shown in Matlab simulink output response in Figure 11. Fig.11. Output response with and without PID controller 7. Results and Discussions The GPS based operational mode of the quadcopter is simple due to the flexibility allowed in the setup processes. The PID system that integrates the Arduino microcontroller acts as the heart of the quadcopter that controls the entire system and manages signal direction back and forth. The schematic Fritzing software connection in Figure 12 presents the wiring methodology of the components and the terminals based on the Arduino Uno microcontroller. Fig.12. Schematic Connection of Quadcopter System The electronic speed control ESC controls the actuators by adapting their speed and direction of the spin clockwise or counterclockwise. The programing code put into consideration the direction of the spin such that the motors are proposed to be operated in contrary directions by spinning each dual-motor clockwise and counterclockwise. The SparkFun 9D altitude sensor that carries the functions of the Accelerometer, Magnetometer, and Gyroscope together can be calibrated by the programming code through SCL and SDA ports based on 12C bus connector that reduced the complications as shown in the Fig. 12. Moreover, the receive signals are converted by the microcontroller to secure PWM signal depending on a void function created in the code to measure the height of the pulses and extract the corresponding information. The operation is done by separating the duty cycle in milliseconds into sub milliseconds. It is worth mentioning that the transmitted signals represent the instructions that excite the pitch, roll, twist, and push activities. The noise can affect hardly on Accelerometer section due to the vibrations that are caused by the motors involuntarily. While the less effectible section by the noise in the sensor is the Gyroscope section that allows the rotational angles to be estimated accurately. Furthermore, integration between Gyroscope and Accelerometer readings was done in the programming code. It has to be mentioned that the proposed work was satisfied based on the GPS that puts the whole flight in the protected mode once the GPS is activated. The flight can go through its way ordinarily as long as it is the proposed range, while if the distance reached into approximately 500 meters between the transmitter and the receiver sides, the GPS returns the flight to the coverage area. It is worth mentioning that the GPS can cover the range R for speed of light C and signal travel time ∆t as follows: (3) R = C ∗ ∆t A GPS receiver generates timing pulses around one PPS signal hereby, once the GPS receiver is locked with satellites, globally synchronized coordinated universal time UTC information will be generated by the PPS signal. The PPS signal is supported by the Coarse Acquisition code that attenuated continuously based on 1.023 MHz from the satellites making errors around 1 % for each GPS receiver time error of ten nanoseconds. That is, ten nanosecond clock errors can be computed by (3 ∗ 108 m/s / 1.023 ∗ 106 HZ ∗ 0.01 = 2.93 m)[21]. Additionally, by using MATLAB, the readings of the altitude can be computed to the gain K such that the higher gain value represents concentrated Accelerometer read, the low gain value represents colossal noise immunity by the Gyroscope. For more confirmation, the computation algorithm is given as follows: θACC = atan2(YACC , XACC ) … … … … … … … … … … … (4) θe(t) = ∅Est − θACC … … … … … … … … … … … … . … (5) ∅Est = ∅Est + (Out Gyro − θe(t) ∗ K)dt … … … (6) Where, θACC is the angle of the accelerometer, YACC , and XACC are the axes of the accelerometer depends on, θe(t) is the angle of the error, ∅Est is the estimated angle, Out Gyro is the output of the Gyroscope and K represents the gain. For simplicity, it is intended to demonstrate the overall connection aspect and the working principle of the proposed quadcopter as shown in the block diagrams in Figure 13. Fig.13. Diagram Connection of Quadcopter System The programming code is intended to be demonstrated as a flow chart in Figure 13 for more simplicity and to recognize the equations and the programming steps in a tideway. The chart starts by waiting for a signal to be generated from the transmitter side to activate the system. In addition, the GPS starts following the signals satellites until the module is tracked on. Once the signal is received, the motors spin counterclockwise in full speed based on right-hand rule. It is proposed that the Gyroscope and Accelerometer modules predict the measures by 5 decimal readings as the threshold. Hereby, the comparison process will be done only between x and y, which needs the motors to be operating even in a full or half speed accordingly. User instructions start where the transmitted signal is allowed by the transmission antenna such that (forward F, backward B, left L, right R, pull up PU, pull down PD, and turn OFF ) buttons can control the speed levels of the motors as shown in the flow chart in Figure 14. Lastly, the activation of any one of the buttons would synchronously check the range of the GPS. Fig.14. The Programming Code as Flow Chart As a final output, the entire components were assembled to produce the quadcopter structure in reality as shown in Figure 15. Fig.15. The Quadcopter Structure in Reality 8. Conclusions In this paper, the modern economical design of the GPS based quadcopter system has been presented. The motivation of the work was satisfied by integrating the microcontroller with the PID system to control the speed and direction of the motors flawlessly. Hereby, the prosed system reaches zero steady-state error without the peak overshoot and oscillation based on the PID system parameters. Moreover, the applied integration reduced the noise that was generated by motors' hesitation depending on the K value that was illustrated in the mathematical expressions. The satellite-based GPS specifies the flying range of the quadcopter to be around 500 meters based on Eq.3. Hereby, the flying trip will be monitored depending on the GPS that keeps the flight in the desired range. Finally, MATLAB expressions obey the theoretical analysis of the proposed system. References [1] Bao, N., Ran, X., Wu, Z., Xue, Y., & Wang, K. (2017, December). Research on attitude controller of quadcopter based on cascade PID control algorithm. In 2017 IEEE 2nd Information Technology, Networking, Electronic and Automation Control Conference (ITNEC) (pp. 1493-1497). IEEE. [2] Xiu, H., Xu, T., Jones, A. H., Wei, G., & Ren, L. (2017, December). A reconfigurable quadcopter with foldable rotor arms and a deployable carrier. In 2017 IEEE International Conference on Robotics and Biomimetics (ROBIO) (pp. 1412-1417). IEEE. [3] Gubcsi, G., & Zsedrovits, T. (2018, June). Ergonomic Quadcopter Control Using the Leap Motion Controller. In 2018 IEEE International Conference on Sensing, Communication and Networking (SECON Workshops) (pp. 1-5). IEEE. [4] Yu, Y., Tingting, W., Long, C., & Weiwei, Z. (2018, June). Stereo vision based obstacle avoidance strategy for quadcopter UAV. In 2018 Chinese Control And Decision Conference (CCDC) (pp. 490494). IEEE. [5] Kuantama, E., Tarca, I., & Tarca, R. (2018, April). Feedback linearization LQR control for quadcopter position tracking. In 2018 5th International Conference on Control, Decision and Information Technologies (CoDIT) (pp. 204-209). IEEE. [6] Camarillo-Gómez, K. A., Pérez-Soto, G. I., & Rodríguez-Reséndiz, J. (2018). Comparison of PD, PID and Sliding-Mode Position Controllers for V–Tail Quadcopter Stability. IEEE Access, 6, 3808638096. [7] Dixit, K. R., Krishna, P. P., & Antony, R. (2017, December). Design and development of H frame quadcopter for control system with obstacle detection using ultrasound sensors. In 2017 International Conference on Circuits, Controls, and Communications (CCUBE) (pp. 100-104). IEEE. [8] Park, D., Park, M. S., & Hong, S. K. (2001, June). A study on the 3-DOF attitude control of freeflying vehicle. In ISIE 2001. 2001 IEEE International Symposium on Industrial Electronics Proceedings (Cat. No. 01TH8570) (Vol. 2, pp. 1260-1265). IEEE. [9] Hanafi, D., Qetkeaw, M., Ghazali, R., Than, M. N. M., Utomo, W. M., & Omar, R. (2013). Simple GUI wireless controller of quadcopter. International Journal of Communications, Network and System Sciences, 6(01), 52. [10] Achtelik, M., Zhang, T., Kuhnlenz, K., & Buss, M. (2009, August). Visual tracking and control of a quadcopter using a stereo camera system and inertial sensors. In 2009 International Conference on Mechatronics and Automation (pp. 2863-2869). IEEE. [11] Santos, M., Lopez, V., & Morata, F. (2010, November). Intelligent fuzzy controller of a quadrotor. In 2010 IEEE international conference on intelligent systems and knowledge engineering (pp. 141146). IEEE. [12] Li, W., Zhang, T., & Kühnlenz, K. (2011, May). A vision-guided autonomous quadrotor in an airground multi-robot system. In 2011 IEEE International Conference on Robotics and Automation (pp. 2980-2985). IEEE. [13] Chan, H. L., & Woo, K. T. (2015). Design and control of small Quadcopter system with motor closed loop speed control. International Journal of Mechanical Engineering and Robotics Research, 4(4), 287-292. [14] Schäffer, L., Kincses, Z., & Pletl, S. (2018, September). A Real-Time Pose Estimation Algorithm Based on FPGA and Sensor Fusion. In 2018 IEEE 16th International Symposium on Intelligent Systems and Informatics (SISY) (pp. 000149-000154). IEEE. [15] Gunputh, S., Murdan, A. P., & Oree, V. (2017, May). Design and implementation of a low-cost Arduino-based smart home system. In 2017 IEEE 9th International Conference on Communication Software and Networks (ICCSN) (pp. 1491-1495). IEEE. [16] Badamasi, Y. A. (2014, September). The working principle of an Arduino. In 2014 11th International Conference on Electronics, Computer and Computation (ICECCO) (pp. 1-4). IEEE. [17] Mahmood, S. N. (2019). GSM Based Gas Leak Monitoring System. Periodicals of Engineering and Natural Sciences, 7(2), 670-678. [18] Mahmood, S. N., & Hasan, F. F. (2017). Design of weather monitoring system using Arduino based database implementation. Journal of Multidisciplinary Engineering Science and Technology (JMEST), ISSN, 2458-9403. [19] Perry, M. (2015). U.S. Patent No. 9,214,151. Washington, DC: U.S. Patent and Trademark Office. [20] Satria, D., Yana, S., Munadi, R., & Syahreza, S. (2017). Prototype of Google Maps-Based Flood Monitoring System Using Arduino and GSM Module. Int. Res. J. Eng. Technol, 4(10), 1044-1047. [21] Kim, R., Nagayama, T., Jo, H., & Spencer Jr, B. F. (2012, April). Preliminary study of low-cost GPS receivers for time synchronization of wireless sensors. In Sensors and Smart Structures Technologies for Civil, Mechanical, and Aerospace Systems 2012 (Vol. 8345, p. 83451A). International Society for Optics and Photonics.