Robust Backstepping Control Applied to UAVs for Pest Recognition in Maize Crops

: In this paper, a robust control technique is developed to achieve the quadrotor stabilization against unmodeled matching vanishing dynamics. The synthesis of the proposed robust control is based on the Lyapunov approach and the backstepping method allowing to construct an iterative control algorithm. To compare the performance of the proposed controller, a Proportional Derivative (PD) controller is used to obtain experimental results in an outdoor environment. To compare the closed-loop system responses with both controllers, the Integral Absolute Error is computed and several tests are conducted to calculate the error standard deviation. Ultimately, employing the robust backstepping control approach in pest recognition in maize crops, which is a speciﬁc task of precision agriculture, demonstrates its effectiveness in improving the trajectory tracking of the vehicle while it captures images of the crops.


Introduction
Today, the use of Unmanned Aerial Vehicles (UAVs) is growing, and multirotor systems are expected to replace manned aircraft in a variety of activities [1].Examples of such activities include search and rescue missions, data collection, precision agriculture, and payload delivery [2][3][4][5].Quadcopters can rapidly change direction and perform vertical takeoffs and landings, thus making them increasingly popular.
Small-scale UAVs typically suffer from the effects of outside wind gusts and unmodeled dynamics, effects that involve changes in mass and inertial moments causing parametric uncertainties.These effects also result from the coupling effect between the forces and moments produced by their actuators, which are commonly neglected in the practical designs [6].Since an advanced control system is based on the nominal model, the uncertain parameters and unmodeled dynamics adversely affect its performance.Developing robust controllers to guarantee UAV stabilization has been a key topic that some authors have handled in different ways.For instance, on the basis of sliding mode algorithms and backstepping methods, [7] offers a robust backstepping sliding mode controller for attitude and position control; accordingly, smooth bounded disturbances and non-vanishing perturbations were considered for a quadrotor vehicle, and simulation results were presented.In [8], the attitude control of an eight-rotor UAV in the presence of model uncertainties and external disturbances was suggested; hence, a robust backstepping sliding mode controller with adaptive radial basis function neural network was employed, and simulation results were reported.According to [9], the adaptive backstepping sliding mode tracking control method for underactuated unmanned surface vehicle was employed to compensate for its model uncertainty, time-varying disturbances and input saturation, and a simulation study was introduced.Attitude and position tracking were performed using the backstepping technique and sliding mode control in [10]; in this case, the controller adapts to the mass changes to control the UAV, and the controller performance was evaluated through simulations.Furthermore, attitude regulation and translational movement of an aircraft using a backstepping approach was done in [11], and altitude control was performed with sliding mode control considering uncertainties.As a result of the presence of sinusoidal functions in the roll and pitch subsystems, the virtual input is always bounded, allowing the control input produced with backstepping to be smoother than the input provided by the sliding mode controller, exhibiting no implementation issues such as chattering; however, the controller robustness problem was not addressed.In [12], a backstepping control strategy was employed to decrease the wind disturbances that can impact the accuracy of image acquisition in the course of drone flight in an outdoor environment; in particular, the specific task involved estimating nitrogen in a rice crop using the aerial imagery.
As a result of adaptive backstepping control, several estimations of the non-vanishing external disturbance were employed for the proposed controller in [13]; in this case, the experimental results were obtained in an indoor environment using a VICON Bonita motion capture system and MATLAB software.Similarly, in [14], the same motion capture system was used to implement feedback linearization and an integral-backstepping-like controller to address the perturbation problems that appear in a quadrotor; in this sense, simulations and indoor environment experimental results were presented with slowlyvarying wind conditions.To regulate quadrotors in the presence of constant and timevarying disturbances, a nonlinear controller based on backstepping was designed, and simulation results were presented in [15]; the non-vanishing disturbances were estimated by a nonlinear observer.A nonlinear robust and adaptive backstepping control strategy was proposed in [16] to solve the trajectory tracking problem of hexacopter UAVs.The nominal backstepping control approach was designed as the main controller, and simulations were performed considering non-vanishing bounded disturbances.In [17], the robust position and attitude tracking control problem of a quadrotor subject to nonlinearities, input coupling, aerodynamic uncertainties and external wind disturbances was presented, the control scheme was validated through simulations and experimental validation on a Quanser's 3-DOF Hover setup.In [18], a robust landing algorithm onto a heaving platform, using an autonomous quadcopter DJI-F450, was presented.This algorithm addressed the altitude flight under the ground effect and external disturbances.In [19], a nonlinear robust Fast Terminal Sliding Mode Controller was designed to control and to stabilize a reconfigurable UAV in the presence of uncertain and variable parameters.The proposed controller was evaluated through a flight scenario.In [20], a hybrid control architecture that combines Deep Reinforcement Learning and Robust Linear Quadratic Regulator for vision-based lateral control of an autonomous vehicle was presented.The proposal was validated via simulation results.The robust control Lyapunov function approach is another control approach that has been used to tackle the rejecting boundedmatched disturbance problems in a Planar Vertical Take-Off and Landing (PVTOL) [21], presenting experimental results.Furthermore, using the command filtered backstepping approach with a parameter scheduling algorithm, an experimental flying test of a quadrotor with a nonlinear controller in an indoor environment was described in [22]; however, the robust design was not included in the controller synthesis.Simulation routines of a robust control based on a backstepping method was presented in [23] to drive the position and attitude of a unmanned mini aerial rotorcraft vehicle subjected to bounded uncertainties and bounded disturbances.
According to the specialized literature cited above, most of the robust backstepping or robust control algorithms were tested in simulations: [7][8][9][10]15,16,19,20,23]; advanced control in an outdoor environment: for nitrogen estimation with relative high-cost equipment was presented in [12], and robust landing algorithm onto a heaving platform in [18]; in an indoor environment in UAVs [13,14,17] and in a PVTOL [21].In our opinion, a robust backstepping control algorithm has to be sufficiently simple to implement it on an autopilot for flying tests in a more realistic environment (outdoors and trajectory tracking in precision agriculture).In this sense, the embedded computing resources required by autonomous unmanned aircraft systems represented a challenge [24].The backstepping algorithm allows to synthesize a recursive stabilizing controllers for nonlinear systems and it could be modified to obtain robust controllers.Moreover, unmodeled dynamics, external disturbances, actuators, and signal conditioner nonlinearities are latent in the real-time control loop.Under all these conditions, it is essential to assess the controller's performance [25] by experimental evaluation of the control algorithms in meaningful environments to validate their robustness in a closed loop with a real plant.
In this contribution, based on the Lyapunov approach, a robust nonlinear controller solves the trajectory tracking problem for a quadrotor.Our proposal uses the backstepping method [26], allowing to construct an iterative control algorithm that rejects the effects of the unstructured dynamics in the quadrotor nonlinear model.For this purpose, the quadrotor model is divided into four subsystems related to the altitude, the yaw angle, the pitch-x and the roll-y, as in [11], and it considers the coupled nonlinear dynamics in the actuators.While these disturbances are unknown, they are assumed as bounded matched vanishing dynamics.The robustness is incorporated in the proposed controller to stabilize the drone in the presence of non-modeled dynamics, which improve the image capture system on board of the UAV as it flies over corn crops to detect dry leaves, providing clues to identify fungus such as Phyllachora maydis, Monographella maydis, and Coniothyrium phyllachorae on the corn leaves.These fungi are the cause of the tar spot in the corn [27], which causes crop losses.
Regarding the proposal mission in this paper, growing loss owing to disease is one of the most representative problem in agriculture.Crop growth inspecting and early identification of pest in the crops is still an important issue.In this regard, farmers are investing great efforts to conserve crops; however, they are mostly failing because they are not correctly monitoring the crops when they have been infested.Additionally, plagues in the crops are also difficult to detect due to it is not uniformly distributed.Hence, UAVs have a key role in crop disease surveillance and early detection [28][29][30].This research attempts to provide experimental evidence of the implementation feasibility of the developed robust backstepping control in a PixHawk autopilot used in a pest detection task.An RGB GoPro Hero8 Black camera is mounted on the vehicle, and the video is processed off-line in the MATLAB software.This image processing provides the approximated location of the possibly affected crops.The overall system (UAV and camera) represents a relative low-cost (less than USD 450) alternative in precision agriculture.
The contributions of the article are as follows: • A new robust backstepping approach-based control algorithm that considers matched vanishing disturbances is proposed.The proposed controller uses a virtual bounded input: the function sin(.), which produces bounded control signals, and it is appropriate to the physical constrains of the UAV.

•
Experimental results in trajectory tracking using a UAV in an outdoor environment are reported.A specific precision agriculture task is involved using a commercial camera system and MATLAB software.

•
The robustness provided to the proposed controller allows to reduce the capture of distorted crop images and it represents better performance when our proposal is compared to a PD controller, although a gimbal or additional software are not used.

•
This article tries to fill the gap between the technological development with advanced control theory.
Accordingly, the paper is organized as follows: In Section 2, the problem formulation and the main result are presented.The quadrotor model is shown in Section 3, and the application of the control strategy is developed in Section 4. The description of the experimental platform and the experimental results are given in Section 5. Section 6 demonstrates how pests are detected in the field.Finally, concluding comments are enunciated in Section 7.

Problem Formulation and Main Results
In this part, the problem is stated and the theoretical main result is presented.

System Description
The following perturbed nonlinear system is addressed: where ϑ T , ζ T ∈ R n+1 is the state, and u ∈ R is the control input.It is considered that the next assumptions are fulfilled: 1.
The known functions f 0 : D → R n and f 1 : The Equation (1) of the system can be stabilized with a state feedback ζ = µ(ϑ), with µ(0) = 0, then, there is a Lyapunov function that satisfies the following equation: where W(ϑ) is a positive definite function, ∀ϑ ∈ D.

3.
Function δ(t, ϑ) is a bounded matched vanishing perturbation, i.e., Problem statement: Design a control u that guarantees the closed-loop robust stability of the origin (ϑ = 0, ζ = 0) of system ( 1) and ( 2) in the presence of unstructured matched disturbance δ(t, ϑ).Then, compute the control laws for every subsystem of the quadrotor, guaranteeing its robust stabilization.

Main Result
The synthesis of the proposed control algorithm is stated as follows.
Theorem 1.Consider the system (1) and ( 2), under the Assumptions 1-3, for k > 0, and for a Lyapunov function of the form robustly stabilizes the system.
Proof of Theorem 1.The proof is inspired on the methodology given in [26].Adding and subtracting f 1 (ϑ)µ(ϑ) on the right-hand side of Equation ( 1), it yields to where Now, the system (5) is expressed in the classical backstepping form when z = 0, it guarantees that the system (8) has an equilibrium point at the origin (according to Assumption 2).A positive definite Lyapunov candidate function of the form z2 is proposed, and its derivative along the trajectories of system (8), according to Assumption 2, is given by with k > 0; substituting into the previous equation, it yields and | z| zsgn( z); so, | z|∆ = zsgn( z)∆; substituting into Equation (10), it yields so, the origin of the system (8) is robustly stable; since µ(0) = 0, the origin of system (1) and ( 2) is robustly stable too.The input u = v + μ(ϑ) is obtained from Equation ( 6), and replacing Equations ( 7) and ( 9) into u, the result follows in Equation ( 4).
The control action ( 4) is used to solve the trajectory tracking problem of a quadrotor whose model is shown in the following section.

Quadrotor Model
The quadrotor model (see Figure 1) is obtained by representing a solid body moving in 3D space and being subjected to one force and three moments [31].The generalized coordinates of the four rotor helicopter q = (γ, λ), where γ = (x, y, z) ∈ R 3 represents the relative position of the center of mass of the quadrotor with respect to an inertial reference, and λ = (φ, θ, ψ) ∈ R 3 are the Euler angles representing the orientation of the quadrotor, known as roll-pitch-yaw, respectively.The inertial moments in the flying robot are defined by I x , I y , I z ordered with respect to x, y and z axes, while m denotes its mass, l is the arm length, and τ φ , τ θ and τ ψ are the input signals to be applied to the motors.The following equations describe the movement of the quadcopter affected by collective throttle u s and torques τ φ , τ θ and τ ψ [32] The following assumptions, proposed in [11], are considered: 1.
The UAV is considered as a rigid and symmetrical body.

2.
The center of gravity (CoG) of the quadrotor is in its origin.

3.
The blades are rigid bodies with fixed angle pitch.4.
In the nominal model of the quadrotor, the aerodynamics effects have not been considered.

5.
The motor dynamic could be modeled as a first-order transfer function, and it is sufficient to reproduce the dynamics between the propeller's speed set-point and its true speed.As the time constant of this transfer function is small, we can consider that the rotor dynamic is approximately equal to one [33].This assumption is used to suppose additional dynamics (or uncertain parameters) that represent matched vanishing perturbations in the actuators.6.
Remark 1. Additionally to Assumption 5, the effects of the propellers are neglected [34].However, a more accurate trust model of the vehicle is given in [34], which can be expressed as where T i is the trust of motor i th , ω i is the angular velocity of the motor i th , µ i (t) and λ i (t) are the advance and inflow ratios respectively (nonlinear functions), c 1 and c 2 are positive constants.So, δ could be the second term of T i , among other unmodelled dynamics.
With the nominal model given by (11), the robust backstepping controller is synthesized in the next section.

Control Strategy Applied to the Quadrotor
In this section, the quadrotor mathematical model ( 11) is divided into subsystems as was done in [11,35]: the altitude subsystem z, the yaw subsystem ψ, the pitch subsystem x − θ and the roll subsystem y − φ.Then, the robust stabilizing controllers for each subsystem are obtained using the result of Theorem 1 while considering the presence of matched vanishing disturbances δ(t, ϑ).

Controller for Subsystem x − θ
Dynamics related with translational motion along x-axis and the pitch angle θ around the y-axis are described by where c 3 = I x −I z I y , u s = 0, and c 4 = l I y .Let x 5 = x, x 6 = ẋ, x 7 = θ and x 8 = θ.Then, the state space representation is given by ẋ5 Considering the first and second equations of the state space representation (20) and defining the virtual input as follows: then, according to the backstepping methodology [26] x 6 = µ(x 5 ) = −α 5 x 5 , for α 5 > 0. Notice that the selected virtual input sin(x 7 ) produces bounded control signals and it is appropriate to the physical constrains of the UAV: . These equations can be rewritten as follows: ẋ5 = −α 5 x 5 ẋ6 = u x , where u x = −(1 + α 5 k 5 )x 5 − (α 5 + k 5 )x 6 is the control input, computed with the Lyapunov function V 1 (x 5 ) = 1 2 x 5 2 .Replacing u x into Equation (21), it yields to where Next, the iterative methodology of backstepping is applied; taking the first three equations of the state space representation (20), the subsystem is rewritten as In this case, ϑ = (x 5 , x 6 ) T , and ζ = x 7 .The modified backstepping structure, proposed by [11], is applied for system (23) considering the Lyapunov function The virtual input ) is defined as u 1x , given in Equation ( 22); substituting Equation (13) in µ 1 where p = g + u z .Applying Proposition 1 of [11], the control u 2x has the following form: where So, the virtual input u 2x is x 5 (25) Finally, the whole state space representation ( 20) is considered with ϑ = (x 5 , x 6 , x 7 ) T , ζ = x 8 , and for this subsystem can be rewritten as The proposed Lyapunov function for subsystem (27) is and the virtual input µ 2 is associated with u 2x , given in (25), as According to Theorem 1, the controller is given by where x 5 + 2β 1 p sin x 7 cos 3 x 7 cos x 11 Therefore, the input u 3x is

Experimental Platform Description
The quadrotor is constructed on a plastic frame F450.An autopilot Pixhawk, version 2.4.8, is on board the F450 structure.The Pixhawk exhibits the following performance: a primary clock at 168 MHz, and with a 32-bit processor STM32F427 Cortex M4 core with a floating processor unit.The autopilot has two accelerometers, a gyroscope, and two magnetometers for attitude measurements of the UAV.The Pixhawk is equipped with radio signal input ports compatible with Futaba 10J radio.Furthermore, it has eight pulse width modulation main outputs that are used to control the motors.To pinpoint the longitudinal positions, an external module Ublox NEO-M8N GPS (accuracy of 0.6-0.9m) is mounted.The yaw angle is estimated via an internal magnetometer located in the GPS.As power supply of the UAV, Lipo technology batteries are employed (capacity of 5200 mAh, discharge rate of 15 C).The quadrotor has four propellers of model 1045, four 2212 920 KV brushless motors and four electronic speed controllers of model SIMONK30A.The trajectory tracking reference was programmed into the Pixhawk (Figure 2).

Experimental Results Applying Synthesized Controllers
In this subsection, for comparison purposes, experimental tests in outdoor environment of UAV are presented for the proposed backstepping controller and a PD controller.For the trajectory tracking task on the spaces (x; y; z) and (φ, θ, ψ), the UAV follows three paths: 1.The manual takeoff of the UAV, until the desired altitude is reached, and this altitude is defined by the pilot.2. The quadrotor tracks parametric circle equations given by 3. At the end, when the trajectory is finished, the pilot regains control of the quadrotor and lands it.The programmed sampling time (T) is T = 0.01 s, it was used in all experimental tests.The quadrotor parameters are as follows: mass m = 1.3 kg, distance from the motors to the centre of gravity l = 0.3 m, constant of gravity g = 9.81 m/s 2 and inertia moments I x = I y = 0.01567 kgm 2 , I z = 0.028346 kgm 2 .The gains of controllers ( 13), ( 16), ( 26) and ( 34) are heuristically proposed in Table 1.The delta values (∆ i , i = 1, 2, 3, 4) are the maximum values for the matched disturbances that could be adjusted heuristically such that the closed-loop performance is satisfactory.

Subsystems
To compare the behavior of the proposed controller, a PD controller, which is tuned as is proposed in [35], is employed, obtaining the gains by proposing the following temporal parameters: the maximum overshoot and the settling time.Translational and attitude initial values of the drone are near to the origin.
Figure 3 displays the translational positions recorded during the experiment following the desired trajectory.The figure is divided in three figures: 1.The first shows the trajectory of the vehicle on the X axis, 2. The second displays the trajectory along the Y axis, 3. The last one illustrates the trajectory tracking task on the Z axis.As shown in Figure 3, the trajectory tracking task in (X, Y, Z) space, in the blue line, displays a reliable performance when it is compared with the reference values in the red line.The position performance of the drone in the (X, Y) space is displayed in Figures 4 and 5.It is noteworthy that these experimental results were obtained in an outdoor environment.
Figure 6 shows the relative small errors during the trajectory tracking.During the trajectory tracking task, the references are subject to changes in the X, Y axes, then the errors may increase or decrease.Nevertheless, for the altitude, the Set Point is constant, then the error is relatively small.Furthermore, the measurements of the position, provided by the GPS device, present a relatively larger deviations (around 1.4 m to 1.6 m) than other devices employed for indoor environment.This explains the errors in the trajectory-tracking displacement task.
The four control input signals for roll, pitch, altitude and yaw, respectively, are presented in Figure 7.These control inputs are obtained with the proposed backstepping controllers and are sent to the motors in real-time during the tests for desired trajectory tracking.
Figure 8 shows the recorded translational positions, following the desired trajectory, for PD controllers.This figure is divided into three subfigures, representing the trajectory performance along the X, Y and Z axes.
Figure 9 shows the UAV's trajectory performance in three-dimensional space, whereas Figure 10 displays it in two-dimensional space.Figures 11 and 12 show the errors during the trajectory tracking and the control signals for PD controllers, respectively.To compare the performances of both controllers, the Integral Absolute Error (IAE) is computed for the robust backstepping (BS) and PD, and these values are reported in Table 2. Table 2 shows that the robust backstepping controller outperforms the PD controller in the trajectory-tracking phase of the quadrotor in the presence of disturbances; additionally, the standard deviation is calculated to analyze the error dispersion, and the mean value of the 10 conducted experimental tests is calculated and compared with the results obtained using the PD control.
Additionally, Table 3 shows the mean of the integral of the absolute value of the signal control, defined as where N is the number of samples.The index J control is related with the energy consumption of the actuators.According to the results showed on Table 3, the energy consumption required by the Robust Backstepping Controller (RBC) is lower than the PD controller.It implies that the control signal of the RBC is smaller and softer than the control signal of PD, which allows the captured images to be less blurred and distorted.

Detection of Pest in Corn Leaves
In this section, the vision system and the offline images processing are presented, aiming to locate the tar spot complex [27] in the maize fields based on the images taken when the quadcopter flies over the corn crop.

Vision System
The modules of the vision system include the camera and the image processing (a PC and MATLAB software).The natural light illuminates the plants to be inspected.The GoPro HERO8 Black camera [36] is mounted under the UAV frame (see Figure 13).While the quadrotor flies over the crops, the camera lens captures and sends images to the camera sensor in the form of light.This sensor converts this light to a digital image that is then stored in the camera's memory for later analysis.For the image processing, the "Color Thresholding" toolbox is used (included in MATLAB Software), in which the interesting areas in the analyzed images are selected based on the color spaces: Red, Green, Blue (RGB); Hue, Saturation, Value (HSV); Luma, Blue and Red chromaticity (YCbCr) and Luminosity, Red/Green and Yellow/Blue chromaticity coordinates (CIE-Lab).This is done by applying segmentation methods on the images; in this regard, image segmentation is a processing technique that refers to the extraction of useful information from a frame to facilitate observation and analysis since the rest of the image content is not useful for the purpose, i.e., if within an image the red color is selected, everything that is not red is discriminated by the segmentation method.This toolbox is selected because it allows comparing the intensity level, pixel by pixel, with a certain threshold previously defined by the user.To establish this threshold, it is necessary to analyze the interest region to be isolated, finding a characteristic and exclusive color level.

Image Processing
In computer vision, segmentation processes are of vital importance when it comes to detecting objects in unstructured environments.
In this article, the segmentation process employs the method based on regions [37] due to the specific task (detecting color levels on affected leaves).Methods based on regions aim to determine the areas of an image that have homogeneous properties, and the border of these areas will delimit some objects from others.Regarding the segmentation methods, Figure 14 displays the process of application followed in this work.

Segmentation Method
The application process of the segmentation method starts with the images of the corn fields (Figure 15) where the dry leaves of the plants are detected, as this is a symptom that the plant could be ill.For this purpose, first, based on the photograph, the pixels of interest are selected to find the thresholds.Once the pixel values are obtained, a new image is loaded to search for dry leaves in the field.
Figure 16 shows the processed image using different segmentation methods where the dry leaves of the plant are highlighted.It should be mentioned that in the processed image, the areas that are not of interest are colored in black.For the RGB segmentation method, the threshold values are as follows: R > 126, G > 104, B < 80.As for the HSV method, the ranges are as follows: 0.096 < H < 0.153, 0.243 < S < 0.944, 0.222 < V < 0.   With the obtained thresholds, from the segmentation methods, a MATLAB code runs to analyze the images obtained from the flights made over the corn fields.First, an image is selected and then subjected to the thresholds of each method to identify dry leaves in the field.
Figure 17 displays the segmented images using the RGB, HSV, YCbCr and CIE-Lab methods.From the images obtained after applying the segmentation methods with the thresholds proposed in the previous section, it can be seen that using RGB segmentation to detect dry leaves is not very convenient as only some points were highlighted, while in the HSV segmentation method, a greater detection of dry leaves can be noted in the image of the crop; however, these highlighted points look like brush strokes, and the plant is not well distinguished.In the YCbCr segmentation, the dry leaves can be better identified in the plot; however, when it is compared with the original image, there are parts of the dry leaves of the plant that despite being dry, do not appear in the processed image.Finally, the best detection is obtained when the CIE-Lab segmentation method is applied to the image, although it also detects a little of the soil, which does not represent a relevant issue.The robustness provided to the proposed controller is necessary to improve the closed loop performance of the vehicle in outdoor environment.This improved performance is a crucial issue to the image capturing while the trajectory tracking task is executed by the UAV, allowing reduce distorted capture of the crops.In fact, when a PD controller is used to control the vehicle in order to capture the crop images, from ten experiments only six were satisfactory to stabilize the drone with the mounted camera.In contrast, for the robust backstepping control approach, all the tests were satisfactory, despite a gimbal or extra software not being used.
Furthermore, each processed image has an (x, y) coordinate, which is obtained with the real-time clock ('Time stamp' function) of the Pixhawk autopilot.Then, when an image with affected leaves is detected, the user obtains the relative position (x, y) of the chosen reference frame, and then the user can apply a corrective action, programming a trajectory whose final point corresponds to these coordinates.

Conclusions
The quadrotor trajectory tracking problem, in outdoor environment, is addressed by the proposed robust control scheme.The four controllers are synthesized using the robust backstepping approach, it uses virtual bounded inputs (the function sin(.)), which produce bounded control signals, and it is appropriate to the physical constrains of the UAV.The convergence for altitude, translational and rotational UAV variables is guaranteed when the vehicle is subjected to vanishing disturbances.The proposed control algorithm achieves a higher performance in closed loop when is compared to a linearized model-based PD controller.This improved performance is a crucial issue to the image capturing while a trajectory tracking task is executed by the UAV, allowing to reduce the wrong capture of the crops, despite a gimbal or extra software not being used.In fact, the experimental results validate and confirm the aforementioned higher performance level of the proposed control algorithm.Moreover, the proposal presents a potential advantage in precision agriculture as it can prevent crop losses by identifying crop areas with dry leaves.In contrast to the

Figure 14 .
Figure 14.Scheme for the application of segmentation.

Figure 15 .
Figure 15.Image captured by the camera.

Table 2 .
Comparative analysis of the performance IAE for the trajectory tracking phase.

Table 3 .
Comparison of absolute control values during the trajectory tracking phase.