Different designs have been proposed for RPAS platforms, showing a strong development for flight, control, and landing in an autonomous way, with global positioning devices (GPS) (Galimov et al., 2020GALIMOV, M.; FEDORENKO, R.; KLIMCHIK, A.: “UAV Positioning Mechanisms in Landing Stations: Classification and Engineering Design Review”, Sensors, 13(20), 2020, DOI: https://dx.doi.org/ 10.3390/s20133648.). However, the challenge is to correctly select the components in an RPAS platform, so that it meets the desired needs and objectives (Christiansen et al., 2017CHRISTIANSEN, M.P.; STIGAARD, M.; NYHOLM, J.R.; SKOVSEN, S.; GISLUM, R.: “Designing and Testing a UAV Mapping System for Agricultural Field Surveying”, Sensors, 17(12), 2017, DOI: https://dx.doi.org/10.3390/s17122703.).
The adequate selection of the elements for prototypes allows the implementation of different control strategies, for the stabilization of the quadcopter axes (Lara et al., 2017LARA, S.B.M.; FAGUA, P.E.Y.; SALAMANCA, J.M.; HIGUERA, M.O.I.: “Diseño e implementación de un sistema de control de vuelo para un vehículo aéreo no tripulado tipo cuadricóptero”, Revista Tecnología y Cultura, afirmando el conocimiento (TECNURA), 21(53), 2017, DOI: https://dx.doi.org/ 10.14483/22487638.10256. ISSN: 0123-921X.). To use this resource efficiently, it is necessary to establish coordination between the controller and monitoring systems for the RPAS, to determine its route based on the environment and to program it in a safe, collision-free, and time-efficient manner (Thibbotuwawa et al., 2020THIBBOTUWAWA, A.; BOCEWICZ, G.; BOCEWICZ, G.; NIELSEN, P.; BANASZAK, Z.: “Unmanned Aerial Vehicle Routing Problems: A Literature Review”, Applied Sciences, 10(13), 2020, DOI: https://dx.doi.org/10.3390/app10134504.).
Pixhawk 4, a navigation and flight control system hardware, consists of an inertial measurement unit (IMU) (gyros and accelerometers), magnetometer (compass), barometer and global positioning system (GPS) module (Pei et al., 2019PEI, H.C.; DER, M.M.; JAW, K.S.E.: “Design, Manufacturing, and Flight Testing of an Experimental Flying Wing UAV"”, Applied Sciences, 9(15), 2019, DOI: https://dx.doi.org/10.3390/app9153043.). The system must be calibrated for safety and performance (Vargas, 2015VARGAS, F.L.M.: Desarrollo de algoritmos para el seguimiento de trayectorias de un quadrotor utilizando técnicas modernas de control con álgebra lineal, [en línea], Escuela Politécnica Nacional, Tesis de Licenciatura, Ecuador, 101 p., 2015, Disponible en:http://bibdigital.epn.edu.ec/handle/15000/11668.; Gyujin et al., 2020GYUJIN, J.; JAEYOUNG, K.; JU, Y.; HAK, J.K.; YOONHA, K.; DONG, K.; YONG, S.C.: “Review: Cost-Effective Unmanned Aerial Vehicle (UAV) Platform for Field Plant Breeding Application”, Remote Sens., 12(6): 2-20, 2020, DOI: https://dx.doi.org/10.3390/rs12060998.), in addition to the configuration of flight parameters and a correct adjustment in the PID control (proportional, integral and derivative), which regulates the corrections of errors due to disturbances caused by wind or differences in the engines and propellers (Bonney et al., 2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].). The PID controller is widely used in UAV flight control due to its high control accuracy and simple structure (Dávila et al., 2017DÁVILA, P.; ORNA, J.; ROSALES, A.; ÁVALOS, E.: “Diseño, Construcción de la Estructura Mecánica y Pruebas de Vuelo de un Hexacóptero de Monitoreo para Aplicaciones Militares”, Revista Politécnica, 39(1): 37-39, 2017, ISSN: 1390-0129.; Zhang et al., 2018ZHANG, H.; YANG, J.; JANTIENE, E.M.B.; SHUQIN, L.; BEI, J.; WENTING, H.; XIAOMEI, Y.: “Quality of terrestrial data derived from UAV photogrammetry: A case study of Hetao irrigation district in northern China"”, International Journal of 2018Agricultural and Biological Engineering, 11(3), 2018, DOI: https://dx.doi.org/10.25165/j.ijabe.20181103.3012., 2019ZHANG, K.; HONG, B.F.; LI, L.K.; LIANG, Y.; YANG, J.: “Design and Implementation of a Dual-IP Core UAV Flight Control" System Based on Qsys”, En: 3rd International Conference on Mechatronics and Intelligent Robotics (ICMIR-2019), 3rd International Conference on Mechatronics and Intelligent Robotics (ICMIR-2019), pp. 180-186, 2019, DOI: https://dx.doi.org10.1016/j.procs.2020.02.045.)
Considering the necessary characteristics that aircraft must have to be used in precision agriculture, the objective of this work was to evaluate a RPAS type quadcopter, according to an established flight configuration and PID control, with a system that allows autonomous and stable flights to obtain georeferenced images in a sequential way, through the instrumentation of an RGB sensor.
A quadcopter type RPAS prototype was used (Figure 1) which was developed at the facilities of the Universidad Autónoma Chapingo, equipped with a Hawkeye Firefly 8SE RGB camera with the IMX117 Sony sensor. The flight controller model pixhawk, which it uses, is open source and supervises the RPAS operation in the different flight modes, controls the camera and the gimbal turns and georefers the images that are captured.
The "ArduCopter V3.611" firmware was installed in the flight controller and it was configured with the "Mission Planner" program, a tool that provides, in a simple and graphic way, aircraft configurations based on the communication and control protocol "MAVLINK" (Reyes, 2017REYES, P.P.: Diseño de un Multicóptero para Investigación Controlado Vía Terminal Android, [en línea], Universitat Politécnica de Valéncia, Tesis de Licenciatura, Valencia, España, 84 p., 2017, Disponible en:https://riunet.upv.es/handle/10251/86467.). The firmware, "ArduCopter V3.611" (specific for quadcopters) was loaded; the accelerometer, compass, radio, flight modes (loiter, stabilize and RTL) were calibrated and so was the telemetry to 20 mA. In addition, the flight and control parameters of the RPAS were adjusted, in the "Full Parameter List", with a horizontal and vertical forward speed of 1 m/s, maximum flight height of 30m, and minimum flight voltage of 10.5v (activating the autonomous return home, RTL).
An important adjustment is the PID control (Proportional, Integral and Derivative), which regulates the corrections of errors due to disturbances caused by wind or differences in the motors and propellers (Nistal, 2017NISTAL, L.J.: Diseño de un Drone Programable de Bajo Coste, [en línea], Escuela Técnica Superior de Ingenieros Industriales y de Telecomunicaciones, Tesis de maestría, España, 132 p., 2017, Disponible en:https://repositorio.unican.es.; Zhang et al., 2019ZHANG, K.; HONG, B.F.; LI, L.K.; LIANG, Y.; YANG, J.: “Design and Implementation of a Dual-IP Core UAV Flight Control" System Based on Qsys”, En: 3rd International Conference on Mechatronics and Intelligent Robotics (ICMIR-2019), 3rd International Conference on Mechatronics and Intelligent Robotics (ICMIR-2019), pp. 180-186, 2019, DOI: https://dx.doi.org10.1016/j.procs.2020.02.045.). PID control is a feedback control mechanism that calculates the deviation or error between the desired and the measured values (Serrano, & Pérez, 2016SERRANO, C.C.; PÉREZ, O.: Análisis, Diseño Estructural y Construcción de un Dron para la Detección de Minas Antipersona, [en línea], Inst. Universidad Politécnica de Catalunya, Informe Técnico, España, 306 p., 2016, Disponible en:https://upcommons. upc.edu/handle/2117/102000?show=full.).
The PID controller generates an output signal to counteract the error between the controlled variable and a reference value of the system (Berra, 2016BERRA, E.V.: “Cálculo de variables de control PID para Drones Cuadcopter”, Reaxión, Revista de Divulgación Tecnológica, 1(9), 2016, ISSN: 2007-7750.). The control law is based on Equation 1.
Where : Time, : Error, : Constants, : Proportional action, : Integral action, : Derivative action.
In autonomous missions, the pixhawk flight controller, incorporates a PID control, which corrects the altitude and stability (Figure 2). The control is based on the values calculated by the IMU and the barometer, which measure the angle of the vehicle and the height, respectively. These values are compared with those desired, to calculate the error, and thus, apply it to the control system (Bonney et al., 2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].).
In Figure 2, the PID control diagram of the pixhawk flight controller, used to correct stability and height, is developed. The value "Roll" is the rotation on the X axis, allowing the displacement to the right or left. The value "Pitch", is the rotation on the Y axis, allowing the displacement forward or backward. The value "Yaw", is the rotation on the Z axis, allowing the rotation on its vertical axis (Vargas, 2015VARGAS, F.L.M.: Desarrollo de algoritmos para el seguimiento de trayectorias de un quadrotor utilizando técnicas modernas de control con álgebra lineal, [en línea], Escuela Politécnica Nacional, Tesis de Licenciatura, Ecuador, 101 p., 2015, Disponible en:http://bibdigital.epn.edu.ec/handle/15000/11668.; Dávila et al., 2017DÁVILA, P.; ORNA, J.; ROSALES, A.; ÁVALOS, E.: “Diseño, Construcción de la Estructura Mecánica y Pruebas de Vuelo de un Hexacóptero de Monitoreo para Aplicaciones Militares”, Revista Politécnica, 39(1): 37-39, 2017, ISSN: 1390-0129.; Nistal, 2017NISTAL, L.J.: Diseño de un Drone Programable de Bajo Coste, [en línea], Escuela Técnica Superior de Ingenieros Industriales y de Telecomunicaciones, Tesis de maestría, España, 132 p., 2017, Disponible en:https://repositorio.unican.es.).
In Table 1, the PID control settings of the RPAS, which were used in the flight missions for the speed P and height PID values, are shown.
The evaluation was carried out in the experimental field "Tlapeaxco", of the Autonomous University Chapingo, in Texcoco, State of Mexico, North Latitude 19°28'57.41", West Longitude -99°6'33.69 (Figure 3). It was developed by means of autonomous flight missions, which were carried out at an altitude of 20m, with a horizontal advance speed of 1m/s and with winds no greater than 5km/h, covering an area of 2258 𝑚2 (0.23 ha).
To plan the flight (in the field), a mobile device (cell phone) was used with the "Qground Contol" application, in addition, the cell phone was linked to the RPAS via telemetry (Figure 4).
In the Qground Control application, the flight area was defined and the overlap parameters of the photographs were adjusted with 75% front and 65% side (Figure 5) as recommended by Ortega (2018)ORTEGA, C.V.E.: Procedimiento para la captura de datos fotogramétricos con la ayuda de aparatos controlados remotamente, como herramienta para la evaluación en estabilidad de taludes y difusión con realidad aumentada, [en línea], Universidad Nacional de Colombia, Tesis de Maestría, Colombia, 130 p., 2018, Disponible en:http://bdigital.unal.edu.co/69667/.. The parameters of the sensor Sony IMX117 of the camera Hawkeye Firefly 8SE, that was used in the RPAS, were adjusted with a width of 6.17 mm and a length of 4.55 mm, a resolution of 4608 pixels in the width and 3456 in the height and a focal distance of 3mm (Figure 5).
Other values that were adjusted were the departure and return points in the flight mission. These values were defined in the point where the RPAS was at the time of setting up the mission (positioned on a flat surface and without weeds).
After setting the mentioned values, the application calculates the number of photos to take and in which location (waypoints), according to the configured overlap and the characteristics of the camera (Navarro, 2019NAVARRO, R.D.: Análisis de un Sistema de Vuelo de Rpas con Controladora Px4 y Subsitema de Visión, [en línea], Universidad Carlos III de Madrid, Tesis de Licenciatura, Madrid, España, 111 p., 2019, Disponible en:https://e-archivo.uc3m.es/handle/10016/30300.). In Figure 6, green points indicate where the pictures were taken.
The flight plan (configured) was uploaded to the RPAS (via telemetry) and the flights were performed. The application showed the progress of the vehicle in real time and the characteristics of the flight as time of flight, battery status and satellite reception.
The information generated by the different sensors that the vehicle has, such as speed, height, battery voltage, current consumption, geographic position, vibrations and position angle (X, Y and Z), was stored by the flight controller.
The flight records were downloaded using Mission Planner, in a Matlab (.mat) read file, so, it was necessary to convert the information into a (.xlsx) file, using a developed programming code. With the information in a file (.xlsx), Microsoft Excel spreadsheet reading format, the desired values were plotted.
Three flight missions were performed and the parameters of voltage, power consumption, current, spin, vibration and flight altitude were measured and used for the evaluation of the RPAS performance, which were then plotted and analyzed.
In Figure 7, the behavior of the battery voltage during the three flight missions is shown. The flight controller detects the battery voltage (actual voltage) and makes a correction (corrected voltage), because the actual voltage drops quickly, caused by the current supplied to the ESC.
In this study, the real voltage was used to evaluate the state of the battery and to configure the safe return home (RTL), which is configured to activate, when detecting minimum voltages of 10.5v in the battery. Bonney et al. (2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].), mention that the value of the corrected battery voltage can be used to extend the duration of the flight, but it reduces the battery life.
In Figure 7, it is observed that in the first 30s, negative peaks appear in the real voltage; this is because, at that time, the RPAS began its ascent to 20 m high, causing a sudden drop in voltage. As the time elapses, the voltage decreases from 12.5v (full load) to 10.4v, limiting the flight to approximately 7 minutes (because the return home RTL is configured with a minimum voltage of 10.5v.
The average consumption of the battery in the three flights was 1520mAh, for 7 minutes of flight (approximately) (Figure 8), a 38% of the total capacity of the battery (4,000mAh), so, the battery can support the double of flight time (theoretically), if the minimum voltage safety factor is configured according to the corrected voltage and not to the real voltage, increasing considerably the flight time.
As mentioned in the power calculation section, the battery can supply a continuous current of 200A, to power all electronic components. In Figure 8, it is observed that the maximum current, which was required during the flights, was not greater than 23A.
One of the important points to evaluate the stability of a RPAS is the rotation in the axes "Roll", "Pitch" and "Yaw. These values represent the inclination of the vehicle in its 3 axes of movement (Fernandez et al., 2016FERNÁNDEZ, B.H.A.; TORRES, I.J.; RAMÍREZ, U.: Diseño, Construcción y Control de una Aeronave Tipo Dron, [en línea], Universidad Nacional Autónoma De México, Tesis de Licenciatura, Mexico, 248 p., 2016, Disponible en:http://www.ptolomeo.unam.mx.). To evaluate this factor, two flight missions were performed, which are shown in Figures 9 and 10 where the rotation for "Roll" and "Pitch" in the autonomous flights of the RPAS, vary from -6° to 5°, these values did not exceed the limits recommended by Bonney et al. (2020)BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].) for "Roll" and "Pitch".
The "Yaw" turn has values of 0-360° because the changes of the trajectory are represented (turn on its own axis). In addition, the origin is oriented to the north, so any takeoff with the front of the RPAS that is not oriented to the north will have values of 0-360°.
Another parameter that was used to evaluate the stability of the RPAS was vibration, which is the propagation of waves that produce deformations and stresses on the chassis (repetitive movements around the position of equilibrium) (Bonney et al., 2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].). In Figure 11, it is observed that the average vibration (of the three flights), is between 6 and 16 , therefore, the values obtained are within the parameters recommended by Bonney et al. (2020)BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020]. of 0-30
In the first 30 seconds of flight, the vibration ranged from 3 to 18 , this is because an air bubble is generated between the soil and the RPAS, as the lift disappears the bubble and the vibrations are reduced. It is not possible to decrease this vibration with the PID control settings, only with flight heights greater than 5m the vibration disappears (Bonney et al., 2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].).
The average values of height (m) and altitude (m.a.s.l), of the three flights were obtained (Figure 12). These values are generated by the barometer, which measures the atmospheric pressure, and corrected by the accelerometer (Bonney et al., 2020BONNEY, B.; SIDDHARTH, B.P.; SHAMAEV, E.; WALSER, J.; GONÇALVES, L.V.; OLSON, C.O.; QUILTER, S.: Ardupilot.org/ardupilot/index, [en línea], Ardupilot, 2020, Disponible en:https://ardupilot.org/ardupilot/index.html, [Consulta: 19 de agosto de 2020].). The PID control performed the correction of the flight height, maintaining the height at 20 m with an error of ±0.5m, an accepted error in photogrammetry.
It was obtained the graph of the behavior of PID control values, which correct the flight height (Figure 13). In the first three seconds the value of the proportional action "P", ranges from ±200 and the integral action from -150 to 15, this is because the RPAS has initiated the flight and the parameters seek to reduce the height error according to time. After three seconds, the PID control, stabilizes the height that the system requires and the error tends to zero.
The behavior of the PID control values of the pitch (Y-axis) and roll (X-axis) axes was plotted in Figures 14 and 15. The RPAS, when starting the flight is on a flat surface, so the PID control detects that the error is close to zero, in the second three, the RPAS starts the climbing and that is when the PID control decreases the errors quickly, with a stabilization time of two seconds, obtaining a robust behavior.
The operation of the RPAS was evaluated in terms of its electrical consumption, obtaining a 7-minute flight with a total consumption of 1520 mAh, using 38% of the total battery capacity and a final voltage of 10.3v, in flights with a height of 20m and a horizontal speed of 1 m/s.
The PID control adjustments were made, with values of P=0.046, I=0.047 and D=0.0036 in the roll and pitch axes and values of P=0.1, I=0.025 and D=0.5 in the yaw axis, obtaining a robust behavior of the system, with a stabilization time of two seconds, average vibrations of 9 𝑚 𝑠2which range from 6 to 18𝑚 𝑠2and an average rotation of 3 degrees on the X and Y axes. Therefore, it can be concluded that stability is among the appropriate parameters to be able to use RPAS in photogrammetry.