INTRODUCTION
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., 2020). 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., 2017).
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., 2017). 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., 2020).
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., 2019). The system must be calibrated for safety and performance (Vargas, 2015; Gyujin et al., 2020), 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., 2020). The PID controller is widely used in UAV flight control due to its high control accuracy and simple structure (Dávila et al., 2017; Zhang et al., 2018, 2019)
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.
MATERIALS AND METHODS
RPAS Prototype
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.
Pixhawk Configuration
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, 2017). 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, 2017; Zhang et al., 2019). PID control is a feedback control mechanism that calculates the deviation or error between the desired and the measured values (Serrano, & Pérez, 2016).
The PID controller generates an output signal to counteract the error between the controlled variable and a reference value of the system (Berra, 2016). The control law is based on Equation 1.
Where
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., 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, 2015; Dávila et al., 2017; Nistal, 2017).
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.
Extended parameters of tuning for PID control (Mission Planner) | |||
---|---|---|---|
P=4.0 | P=4.0 | P=4.0 | P=1 |
P=0.046 | P=0.046 | P=0.10 | P=2 |
I= 0.047 | I=0.047 | I=0.025 | I=1 |
D=0.0036 | D= 0.0036 | D=0 | D=0.5 |
P=0.5 | |||
I=1.0 | |||
D=0.0 |
Prototype RPAS Evaluation
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). 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, 2019). 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.
Processing
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.
Analysis of the RPAS Prototype Functioning
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. (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., 2016). 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))
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., 2020). In Figure 11, it is observed that the average vibration (of the three flights), is between 6 and 16
In the first 30 seconds of flight, the vibration ranged from 3 to 18
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., 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.
CONCLUSIONS
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.