Unmanned aerial vehicle dynamic target tracking method and system based on sliding mode control
By adopting a sliding mode control method in the drone tracking control, combining pixel point error and attitude compensation, and using a predefined time fast adaptive terminal sliding mode controller for feedforward compensation, the problem of target loss and oscillation caused by attitude changes during the tracking process of the drone is solved, and efficient target tracking is achieved.
Patent Information
- Application Number
- CN202510096756.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-02-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing drone tracking and control technology fails to effectively consider the possible tilt rotation of the drone during movement, resulting in lost targets and drone oscillation.
Using a sliding mode control method, the relative distance between the drone and the target is determined by obtaining the pixel point error of the moving target in the image and fusing it with the drone's height to compensate for the drone's attitude angle changes. Then, a predefined time fast adaptive terminal sliding mode controller is used to combine the speed and position of the moving target to perform feed-forward compensation to achieve relative static between the drone and the target.
It effectively solves the problem of target loss and oscillation caused by attitude changes during the tracking process of drones, improves the synchronization rate of tracking speed, and reduces interference from attitude changes.
Smart Images

Figure CN119535995A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of unmanned aerial vehicle control, and in particular relates to a method and system for tracking a dynamic target of an unmanned aerial vehicle based on sliding mode control. Background Art
[0002] A tracking drone is a special-purpose drone that uses onboard sensors to collect position information, obtains the target's position information on the image through a target detection process (or predicts the target's position information through state estimation and multi-sensor information fusion), and controls the drone's movement by calculating control instructions (usually velocity vectors) through a tracking algorithm to ensure that the target is always located near the center of the field of view obtained by the onboard camera.
[0003] At present, vision-based UAV tracking control technology mainly uses multiple types of design schemes and control algorithm designs. The more common ones are design schemes based on machine recognition or optical flow target detection or GPS positioning tracking control technology, as well as the supporting classic PID (proportional, integral, differential) control and its derivative algorithms to achieve target control, and also include sliding mode control algorithms widely used in nonlinear system control. In order for existing UAVs to track targets of interest during flight, they first need to detect moving targets from monitoring images. Currently, the more widely used motion detection methods are optical flow method and highly data fusion image recognition method. The optical flow method uses the optical flow characteristics of moving targets that change over time to detect moving targets, image recognition locks the target moving object, and returns the relative coordinates of the moving object and the airborne in real time. The classic sliding mode control technology uses variable structure control to make the system error converge to zero and obtain the expected control output speed to achieve control of the displacement of the UAV.
[0004] The above process is driven only by the movement of the target, without considering the possible tilt and rotation of the drone during movement, and without compensating for some changes in the drone's posture, which makes it easy for the target to be lost during tracking and even causes the drone to vibrate. Summary of the invention
[0005] The present invention provides a method and system for tracking dynamic targets of unmanned aerial vehicles (UAVs) based on sliding mode control, so as to solve the problem that the prior art only uses the movement of the target as a driving force, does not consider the possible tilt and rotation of the UAV during the movement, and does not make compensation designs for some changes in the posture of the UAV, which makes it easy to lose the target during the tracking process and even causes the UAV to vibrate.
[0006] In a first aspect, the present invention provides a method for tracking a dynamic target of an unmanned aerial vehicle based on sliding mode control, comprising:
[0007] Get the pixel error of the moving target in the image;
[0008] After fusing the pixel error with the height of the drone, the change in the drone's attitude angle is compensated to determine the relative distance between the drone and the moving target in the horizontal roll and pitch directions;
[0009] Determine the current speed and position of a moving target;
[0010] The relative distance between the UAV and the moving target in the horizontal roll and pitch directions is used as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and the current speed and position of the moving target are added as feedforward compensation to achieve relative stillness between the UAV and the moving target.
[0011] Optionally, the step of fusing the pixel point error with the height of the drone to compensate for the change in the attitude angle of the drone, so as to determine the relative distance between the drone and the moving target in the horizontal rolling direction and the pitching direction, includes:
[0012] The relative distance between the drone and the moving target in the horizontal roll and pitch directions is calculated according to the following formula:
[0013] ;
[0014] in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
[0015] Optionally, determining the current speed and position of the moving target includes:
[0016] The current speed of the moving target is calculated according to the following formula:
[0017] V 目标 =v1+v2;
[0018] Among them, V 目标is the relative speed between the moving target and the ground; v1 is the speed of the UAV in the horizontal rolling direction or pitching direction; v2 is the relative speed between the UAV and the moving target in the horizontal rolling direction or pitching direction;
[0019] V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
[0020] Optionally, the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitching direction is used as an input error variable of the predefined time fast adaptive terminal sliding mode controller, and the current speed and position of the moving target are added as feedforward compensation to achieve relative stillness of the UAV and the moving target, including:
[0021] Construct the expression of the fast adaptive terminal sliding mode controller with predefined time:
[0022] ;
[0023] ;
[0024] ;
[0025] ;
[0026] ;
[0027] ;
[0028] ;
[0029] ;
[0030] ;
[0031] ;
[0032] ;
[0033] ;
[0034] ;
[0035] ;
[0036] ;
[0037] ;
[0038] ;
[0039] ;
[0040] Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; sign(·) is the sign function; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; η d is the reference input of the moving target tracked by the UAV system; S2 is the fourth intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; for After a derivation; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function; Tc is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ a is the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter.
[0041] In a second aspect, the present invention provides a UAV dynamic target tracking system based on sliding mode control, comprising:
[0042] An acquisition module is used to obtain the pixel error of the moving target in the image;
[0043] The first determination module is used to compensate for the change in the attitude angle of the drone after fusing the pixel point error with the height of the drone, so as to determine the relative distance between the drone and the moving target in the horizontal rolling direction and the pitch direction;
[0044] The second determination module is used to determine the current speed and position of the moving target;
[0045] The third determination module is used to use the relative distance between the UAV and the mobile target in the horizontal roll direction and the pitch direction as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and add the current speed and position of the mobile target as the feedforward compensation to achieve relative stillness of the UAV and the mobile target.
[0046] Optionally, the first determining module includes:
[0047] The first calculation unit is used to calculate the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitch direction according to the following formula:
[0048] ;
[0049] in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
[0050] Optionally, the second determining module includes:
[0051] The second calculation unit is used to calculate the current speed of the moving target according to the following formula:
[0052] V 目标 =v1+v2;
[0053] Among them, V 目标 is the relative speed between the moving target and the ground; v1 is the speed of the UAV in the horizontal rolling direction or pitching direction; v2 is the relative speed between the UAV and the moving target in the horizontal rolling direction or pitching direction;
[0054] Position determination unit for V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
[0055] Optionally, the third determining module includes:
[0056] Building blocks for constructing expressions for fast adaptive terminal sliding mode controllers with predefined time:
[0057] ;
[0058] ;
[0059] ;
[0060] ;
[0061] ;
[0062] ;
[0063] ;
[0064] ;
[0065] ;
[0066] ;
[0067] ;
[0068] ;
[0069] ;
[0070] ;
[0071] ;
[0072] ;
[0073] ;
[0074] ;
[0075] Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; sign(·) is the sign function; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; ηd is the reference input of the moving target tracked by the UAV system; S2 is the fourth intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; for After a derivation; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function; T c is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ a is the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter.
[0076] In a third aspect, the present invention provides a computer device comprising a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the steps of the UAV dynamic target tracking method based on sliding mode control described in the first aspect are implemented.
[0077] In a fourth aspect, the present invention provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the steps of the UAV dynamic target tracking method based on sliding mode control described in the first aspect are implemented.
[0078] The present invention provides a method and system for tracking dynamic targets of unmanned aerial vehicles based on sliding mode control. In the method, the unmanned aerial vehicle determines the speed of a moving target by means of feedforward compensation and performs synchronous motion, so that the unmanned aerial vehicle can continuously track a moving target in any motion state, has a high tracking speed synchronization rate, and is less disturbed by posture changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0080] Figure 1 A schematic diagram of a flow chart of a method for tracking a dynamic target of an unmanned aerial vehicle based on sliding mode control provided by an embodiment of the present invention;
[0081] Figure 2 A schematic diagram of the flow of the Openmv software algorithm provided in an embodiment of the present invention;
[0082] Figure 3 A schematic diagram of the tilt state of a drone provided by an embodiment of the present invention;
[0083] Figure 4 A schematic diagram of the structure of a fast adaptive terminal sliding mode controller based on predefined time provided by an embodiment of the present invention;
[0084] Figure 5 A schematic structural diagram of a UAV dynamic target tracking system based on sliding mode control provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0085] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Example 1
[0086] like Figure 1 As shown, this embodiment provides a method for tracking a dynamic target of an unmanned aerial vehicle based on sliding mode control, comprising:
[0087] Step 101, obtaining pixel errors of a moving target in an image.
[0088] Exemplarily, in this step, the image processing component openmv is used to identify and capture the moving target.
[0089] The image processing component openmv has rich image processing functions. It is connected to the drone flight control mainboard stm32F407 through a serial port connection and placed horizontally directly below the drone, with the lens facing vertically downward and the lens module facing the direction of the drone head.
[0090] The pixel distribution of each frame of the image shot by Openmv is selected to be 160×120 (length×width), and the image refresh rate is 100HZ. The relative coordinates (80, 60) of the central pixel of the image are selected as the expected position of the tracking target and the expected center of the camera field of view.
[0091] Openmv is used to identify red blocks in the field of view, and the RGB threshold interval for reading the blocks is manually set. The target red block threshold interval is set to Red_threshold = (20, 70, 40, 100, 20, 70).
[0092] like Figure 2 As shown in the figure, the library function img.find_blobs provided by openmv is used to find the color blocks within the set threshold. , find the largest target color block by comparison. Use the library function img.draw_rectangle to frame the target object, and use the library function img.draw_cross to draw a cross arrow in the middle of the box, and return the coordinate value (x, y) of the cross arrow. If the red color block is not found, directly assign the coordinate point to (0, 0) and assign 0 to the state quantity dot.find. Use Openmv to mark the target color block and return the center value (x, y) of the color block pixel cluster. If the corresponding color block cannot be found, it is necessary to manually adjust the threshold of the set color block until the color block is displayed stably and clearly. Calculate the offset from the expected pixel point (Δx, Δy) = (x-80, y-60), in units of the number of pixels.
[0093] Step 102 , after fusing the pixel point error with the height of the drone, the change in the attitude angle of the drone is compensated to determine the relative distance between the drone and the moving target in the horizontal rolling direction and the pitch direction.
[0094] The pixel error data in step 101 cannot be input into the control loop as direct error data. Because the relative distance between the drone and the moving target cannot be represented by the pixel offset alone, it is also related to the drone's endurance altitude and the change in the drone's attitude angle. Especially in fast movement, the impact of attitude changes is very large. The drone will inevitably cause changes in attitude during movement. Under normal flight conditions, these are unavoidable because it is these changes in attitude angles that cause the horizontal displacement of the drone. In particular, changes in the roll angle and pitch angle will cause the camera shooting range to shift, resulting in errors in the error data read, and may even cause an overshoot of the drone's negative feedback to cause an accident.
[0095] In this embodiment, a quantity needs to be defined: the displacement of a unit pixel at a height of one meter corresponding to the ground offset , the unit is , ΔX is the actual relative distance between the drone and the target in the horizontal rolling direction, in centimeters. Since the M value is related to factors such as the area of the drone camera reading screen and the image resolution, the actual measurement here is The X direction represents the rolling direction of the drone (left and right), and the Y direction represents the pitch direction of the drone (front and back).
[0096] like Figure 3 As shown, let the height of the drone from the ground be H (cm) and be directly read by the laser sensor Tfmini. The roll angle and pitch angle of the drone during movement are θ and φ respectively. Use the following calculation formula: For example, the relative distance in the horizontal direction of the roll can be written as ΔX0 = H × Δx × M, where ΔX0 represents the relative distance in the horizontal roll direction corresponding to the target and the drone when the drone is in a horizontal state at a height of H. Similarly, the pitch direction ΔY0 = H × Δy × M.
[0097] As the drone is tilted, its angle changes, and the target object originally in the center of the field of view will have some deviation (Δx', Δy'), which is compensated by the following formula. The original data ΔX0, ΔY0 needs to subtract the error caused by the change in the fuselage tilt angle.
[0098] Exemplarily, the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitching direction is calculated (i.e., compensation is performed) according to the following formula:
[0099] .
[0100] in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
[0101] Through testing, it was found that the horizontal error of the drone was kept within 10cm when the tilt angle was less than 20°. In actual operation, the deflection angle of the drone was also stable within 15°.
[0102] Step 103, determining the current speed and position of the moving target.
[0103] Exemplarily, the current speed of the moving target is calculated according to the following formula:
[0104] V 目标 =v1+v2.
[0105] Among them, V 目标 is the relative speed between the moving target and the ground; v1 is the speed of the UAV in the horizontal roll or pitch direction directly read by the optical flow sensor; v2 is the relative speed between the UAV and the moving target in the horizontal roll or pitch direction obtained by using the error differential variable.
[0106] After the relative speed between the moving target and the ground is obtained, the position of the moving target is determined by solving the integral of the speed and the initial position of the moving target, that is, V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
[0107] Step 104, the relative distance between the UAV and the moving target in the horizontal roll direction and the pitch direction is used as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and the current speed and position of the moving target are added as feedforward compensation to achieve relative stillness of the UAV and the moving target.
[0108] In this step, if Figure 4 As shown, the error with the target to be tracked and its derivative are used as the sliding mode state of the predefined time fast adaptive terminal sliding mode controller (hereinafter referred to as the controller), and the tracking control of the UAV is achieved by calculating the corresponding input of the controller.
[0109] Exemplarily, the expression of the predefined time fast adaptive terminal sliding mode controller is constructed:
[0110] (1)
[0111] (2)
[0112] (3)
[0113] (4)
[0114] (5)
[0115] (6)
[0116] (7)
[0117] (8)
[0118] (9)
[0119] (10)
[0120] (11)
[0121] (12)
[0122] (13)
[0123] (14)
[0124] (15)
[0125] (16)
[0126] (17)
[0127] (18)
[0128] Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the first derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; sign(·) is the sign function; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; η d is the reference input of the moving target tracked by the UAV system; S2 is the third intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function, which is linear in the region very close to zero and is a continuous function of the sign function for the rest of the values; T c is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ a is the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter. In this embodiment, the preset first system parameter to the preset tenth system parameter are all constants set according to actual conditions.
[0129] Formula (2) is the dynamic equation solved by the Euler-Lagrange method after considering the system modeling error; Formula (3) is the lumped disturbance containing all uncertainties that cannot be measured by sensors; Formula (4) and Formula (5) are formal simplifications of the computable parts of the dynamic equation, and then Formula (3), Formula (4) and Formula (5) are substituted into Formula (2) to obtain the improved dynamic model of Formula (6); Formula (7) designs an intermediate variable ξ to track the generalized velocity coordinates of the drone, and Formula (9) is the derivative solution of the disturbance estimation part; the derivative of the intermediate variable ξ can be calculated by Formula (10) to update the intermediate variable ξ; in Formula (11) is the tracking error vector. In order to achieve tracking control, it is hoped that the error will eventually approach zero. Formula (12) is the sliding surface of the controller. λ1 and λ2 are used to adjust the sliding speed of the sliding surface. Formula (13) indicates that the controller input consists of two parts. Formula (14) is the input of the controller to offset the non-sliding variable. Formula (15) is the input of the sliding mode reaching law of the controller. T c is the predefined limit time designed for the controller, χ is a system parameter less than 1, where the variable part contains an adaptive parameter ρ(t) determined by the controller, the derivative of which is given by formula (16); ε is the boundary used to prevent the parameter value from being too large after the controller approaches stability, causing system chattering; the variable function in formula (16) is calculated by formulas (17) and (18); d, k1 and k2 are used to control the rate of change.
[0130] Next, the entire sliding mode controller is analyzed in the time domain, taking into account the Lyapunov function: , taking the derivative of V2, we can get:
[0131] .
[0132] Because there are:
[0133] .
[0134] .
[0135] Here, i represents the value of the i-th element in the column vector.
[0136] It turns out that:
[0137] .
[0138] Integrating the differential inequality yields the relationship between time and the Lyapunov function:
[0139] .
[0140] .
[0141] After that, the sliding surface equation formed by the error is:
[0142] .
[0143] Its differential equation is convergent when the coefficients are all greater than zero, and the error will converge to zero, thereby controlling the drone to track the moving target.
[0144] In an indoor environment, the drone using the predefined time fast adaptive terminal sliding mode controller based on feedforward compensation of this embodiment can track and control the red block in any motion state. For example, the red tracking car is moving around the black line at the center of the circle, and the drone is remotely located to any height to start tracking control. It can be found that the drone can continuously track the movement of the car and achieve stable synchronous tracking.
[0145] In summary, in the UAV dynamic target tracking method based on sliding mode control provided in this embodiment, the UAV determines the speed of the moving target through feedforward compensation and performs synchronous movement, so that the UAV can continuously track the moving target in any motion state, with a high tracking speed synchronization rate and less interference from posture changes. Example 2
[0146] Based on the same inventive concept as Example 1, this embodiment provides a UAV dynamic target tracking system based on sliding mode control. Since the principle of solving the problem by this system is similar to the aforementioned UAV dynamic target tracking method based on sliding mode control, the implementation of this system can refer to the implementation of the UAV dynamic target tracking method based on sliding mode control.
[0147] like Figure 5 As shown in the figure, the UAV dynamic target tracking system based on sliding mode control includes:
[0148] The acquisition module 10 is used to acquire the pixel error of the moving target in the image.
[0149] The first determination module 20 is used to compensate for the change in the attitude angle of the drone after fusing the pixel point error with the height of the drone, so as to determine the relative distance between the drone and the moving target in the horizontal rolling direction and the pitching direction.
[0150] The second determination module 30 is used to determine the current speed and position of the moving target.
[0151] The third determination module 40 is used to use the relative distance between the UAV and the mobile target in the horizontal roll direction and the pitch direction as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and add the current speed and position of the mobile target as the feedforward compensation to achieve relative stillness of the UAV and the mobile target.
[0152] Exemplarily, the first determining module includes:
[0153] The first calculation unit is used to calculate the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitch direction according to the following formula:
[0154] .
[0155] in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
[0156] Exemplarily, the second determining module includes:
[0157] The second calculation unit is used to calculate the current speed of the moving target according to the following formula:
[0158] V 目标 =v1+v2.
[0159] Among them, V 目标 is the relative speed between the moving target and the ground; v1 is the speed of the UAV in the horizontal roll or pitch direction; v2 is the relative speed between the UAV and the moving target in the horizontal roll or pitch direction.
[0160] Position determination unit for V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
[0161] Exemplarily, the third determining module includes:
[0162] Building blocks for constructing expressions for fast adaptive terminal sliding mode controllers with predefined time:
[0163] ;
[0164] ;
[0165] ;
[0166] ;
[0167] ;
[0168] ;
[0169] ;
[0170] ;
[0171] ;
[0172] ;
[0173] ;
[0174] ;
[0175] ;
[0176] ;
[0177] ;
[0178] ;
[0179] ;
[0180] ;
[0181] Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; sign(·) is the sign function; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; η d is the reference input of the moving target tracked by the UAV system; S2 is the fourth intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; for After a derivation; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function; T c is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ ais the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter.
[0182] For more specific working processes of the above modules, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here. Example 3
[0183] This embodiment provides a computer device, including a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the steps of the UAV dynamic target tracking method based on sliding mode control described in Example 1 are implemented.
[0184] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here. Example 4
[0185] This embodiment provides a computer-readable storage medium for storing a computer program; when the computer program is executed by a processor, the steps of the method for tracking dynamic targets of unmanned aerial vehicles based on sliding mode control described in Embodiment 1 are implemented.
[0186] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here. Example 5
[0187] This embodiment provides a computer program product, including computer executable instructions or a computer program. When the computer executable instructions or the computer program are executed by a processor, the steps of the method for dynamic target tracking of an unmanned aerial vehicle based on sliding mode control described in Example 1 are implemented.
[0188] For more specific details of the above method, please refer to the corresponding contents disclosed in Example 1, which will not be repeated here.
[0189] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the systems, devices, storage media, and computer program products disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0190] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0191] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0192] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0193] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0194] The present invention has been described in detail above in conjunction with specific implementations and exemplary examples, but these descriptions cannot be understood as limiting the present invention. Those skilled in the art understand that, without departing from the spirit and scope of the present invention, a variety of equivalent substitutions, modifications or improvements may be made to the technical solution of the present invention and its implementation methods, all of which fall within the scope of the present invention. The scope of protection of the present invention shall be subject to the attached claims.
Claims
1. A method for tracking dynamic targets of unmanned aerial vehicles based on sliding mode control, characterized in that: include: Get the pixel error of the moving target in the image; After fusing the pixel error with the height of the drone, the change in the drone's attitude angle is compensated to determine the relative distance between the drone and the moving target in the horizontal roll and pitch directions; Determine the current speed and position of a moving target; The relative distance between the UAV and the moving target in the horizontal roll and pitch directions is used as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and the current speed and position of the moving target are added as feedforward compensation to achieve relative stillness between the UAV and the moving target.
2. The method for tracking a dynamic target of an unmanned aerial vehicle according to claim 1, characterized in that: The pixel point error is integrated with the height of the UAV to compensate for the change in the attitude angle of the UAV, so as to determine the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitching direction, including: The relative distance between the drone and the moving target in the horizontal roll and pitch directions is calculated according to the following formula: ; in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
3. The method for tracking a dynamic target of an unmanned aerial vehicle according to claim 1, characterized in that: Determining the current speed and position of the moving target includes: The current speed of the moving target is calculated according to the following formula: V 目标 =v1+v2; in, is the relative speed between the moving target and the ground; is the speed of the drone in the horizontal rolling or pitching direction; v2 is the relative speed between the drone and the moving target in the horizontal rolling or pitching direction; V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
4. The method for tracking a dynamic target of an unmanned aerial vehicle according to claim 1, characterized in that: The relative distance between the UAV and the moving target in the horizontal rolling direction and the pitching direction is used as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and the current speed and position of the moving target are added as the feedforward compensation amount to achieve the relative stillness of the UAV and the moving target, including: Construct the expression of the fast adaptive terminal sliding mode controller with predefined time: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; sign(·) is the sign function; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; η d is the reference input of the moving target tracked by the UAV system; S2 is the fourth intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; for After a derivation; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function; T c is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ a is the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter.
5. A UAV dynamic target tracking system based on sliding mode control, characterized in that: include: An acquisition module is used to obtain the pixel error of the moving target in the image; The first determination module is used to compensate for the change in the attitude angle of the drone after fusing the pixel point error with the height of the drone, so as to determine the relative distance between the drone and the moving target in the horizontal rolling direction and the pitch direction; The second determination module is used to determine the current speed and position of the moving target; The third determination module is used to use the relative distance between the UAV and the mobile target in the horizontal roll direction and the pitch direction as the input error variable of the predefined time fast adaptive terminal sliding mode controller, and add the current speed and position of the mobile target as the feedforward compensation to achieve relative stillness of the UAV and the mobile target.
6. The unmanned aerial vehicle dynamic target tracking system according to claim 5, characterized in that: The first determining module comprises: The first calculation unit is used to calculate the relative distance between the UAV and the moving target in the horizontal rolling direction and the pitch direction according to the following formula: ; in, is the relative distance between the compensated moving target and the corresponding horizontal rolling direction of the UAV; To compensate for the relative distance between the moving target and the horizontal rolling direction of the drone when the drone is in a horizontal state at the height H above the ground; is the relative distance between the compensated moving target and the corresponding pitch direction of the UAV; To compensate for the relative distance between the moving target and the pitch direction of the drone when the drone is in a horizontal state at the height H above the ground; The moving target deviation caused by the change of the drone's attitude angle; is the pixel error in the x direction; M is the displacement of the unit pixel corresponding to the ground offset at a height of one meter; is the pixel error in the y direction; θ is the roll angle; φ is the pitch angle.
7. The unmanned aerial vehicle dynamic target tracking system according to claim 5, characterized in that: The second determining module comprises: The second calculation unit is used to calculate the current speed of the moving target according to the following formula: V 目标 =v1+v2; in, is the relative speed between the moving target and the ground; v1 is the speed of the UAV in the horizontal rolling direction or pitching direction; v2 is the relative speed between the UAV and the moving target in the horizontal rolling direction or pitching direction; Position determination unit for V 目标 Solve the integral and determine the current position of the moving target based on the initial position of the moving target.
8. The unmanned aerial vehicle dynamic target tracking system according to claim 5, characterized in that: The third determination module comprises: Building blocks for constructing expressions for fast adaptive terminal sliding mode controllers with predefined time: ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Where η represents the generalized coordinate vector containing the actual position and attitude of the drone; p b is the position coordinate of the UAV in the inertial reference system; Ф b The attitude of the drone is described by Euler angles; T represents the transpose of the matrix; M0(·) represents the modeling part of the system matrix using the acceleration of the Euler-Lagrange equation; represents η after two derivations; C0(·) represents the modeling part of the system matrix using the Euler-Lagrange equation velocity; represents the first derivative of η; G0(·) represents the modeling part of the system matrix using the position variables of the Euler-Lagrange equation; u is the input of the UAV system; f is the external disturbance of the UAV system; ΔM(·) represents the modeling error of the system matrix using the acceleration of the Euler-Lagrange equation; ΔC(·) represents the modeling error of the system matrix using the velocity of the Euler-Lagrange equation; ΔG(·) represents the modeling error of the system matrix using the position variables of the Euler-Lagrange equation; α(·) represents the simplification of the relational operation in the formula; is the inverse operation of M0(·); β(·) represents the simplified form of the inverse operation of M0(·); δ(·) represents the simplified form of the equivalent disturbance to the acceleration of the UAV system; z is the first intermediate variable; ξ is the second intermediate variable; is the derivative of ξ; S is the third intermediate variable; k is the preset first system parameter; σ is the preset second system parameter; ε is the boundary used to prevent the system from chattering due to excessive parameter value after the fast adaptive terminal sliding mode controller approaches stability within a predefined time; sign(·) is the sign function; n is the preset third system parameter; m is the preset fourth system parameter; diag(·) represents the diagonal elements of the constructed matrix; |·| represents the absolute value operation of each element of the matrix; is the tracking error vector; η d is the reference input of the moving target tracked by the UAV system; S2 is the fourth intermediate variable; for After one derivation; λ1 is the preset fifth system parameter; λ2 is the preset sixth system parameter; u1 is the dynamic compensation input of the UAV system; u2 is the sliding mode input pre-designed for the UAV system; is η d After two derivations; is the estimated value of the lumped disturbance δ(·) of acceleration; for After a derivation; ρ(t) is an adaptive parameter that increases the robustness of the UAV system; Sat(·) is a step function; T c is the predefined limit time of the design; χ is the preset seventh system parameter; is ρ(t) after one derivation; D2(t) is the fifth intermediate variable; ||·|| represents the second norm of the vector; ρ b is the upper bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes in the predefined time; D1(t) is the sixth intermediate variable; t is the time from the start of the tracking task to the time point 0; ρ a is the lower bound of the adaptive parameter after the fast adaptive terminal sliding mode controller stabilizes within a predefined time; d is the preset eighth system parameter; exp(·) is an exponential function with the natural constant e as the base; k1 is the preset ninth system parameter; k2 is the preset tenth system parameter.
9. A computer device, characterized in that: It includes a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the steps of the sliding mode control-based unmanned aerial vehicle dynamic target tracking method described in any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; when the computer programs are executed by the processor, the steps of the sliding mode control-based unmanned aerial vehicle dynamic target tracking method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Unmanned aerial vehicle complex dynamic target tracking method based on feedforward compensation PID control
CN113848979A
Ground target tracking control method for multi-rotor unmanned aerial vehicle
CN114510065A
Visual servo tracking and impedance control method of flying operation robot
CN115480583A
Dynamic target tracking method, robot and computer-readable storage medium
US20240009841A1