Unmanned aerial vehicle gesture control method and control system based on chaotic sparrow search optimization fuzzy PID parameter

CN116501168BActive Publication Date: 2026-08-28NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310393019.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-13
Publication Date
2026-08-28
Estimated Expiration
2043-04-13

AI Technical Summary

Technical Problem

其通信距离远,但对人员操作要求较高,一般需要进行专业培训,不能满足对于无人机便捷控制的需求

Benefits of technology

[0058]有益效果:本发明相对于现有技术,其显著优点是基于混沌麻雀搜索优化的模糊PID控制方法能够以更高的稳定性、更好的准确度完成手势指令控制无人机飞行。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501168B_ABST
    Figure CN116501168B_ABST
Patent Text Reader

Abstract

The application discloses an unmanned aerial vehicle gesture control method based on chaotic sparrow search optimization fuzzy PID parameter, and sets a mapping relationship between a gesture action instruction and an unmanned aerial vehicle control instruction; based on the mapping relationship, an improved sparrow search algorithm is used for fuzzy PID control parameter self-optimization, intelligent adjustment of PID control parameters is realized, and optimal control parameters from the gesture action instruction to the unmanned aerial vehicle control instruction are obtained; a gesture action is acquired, a dynamic gesture recognition model is used to analyze the gesture action to obtain a gesture action instruction; the dynamic gesture recognition model is established by using a dynamic time warping algorithm and based on a visual image; and the motion of the unmanned aerial vehicle is controlled according to the obtained gesture action instruction. The improved sparrow search optimization fuzzy PID control method based on the reverse learning strategy can control the unmanned aerial vehicle to fly with higher stability and better accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to gesture control for unmanned aerial vehicles (UAVs), specifically to a gesture control method and control system for UAVs based on chaotic sparrow search optimization of fuzzy PID parameters. Background Technology

[0002] With the development of computer technology, traditional methods of human-computer interaction can no longer meet user needs, leading to a surge in research on new human-computer interaction methods. The drone industry is developing rapidly, but current drone control methods still have some drawbacks. Firstly, traditional control methods are relatively limited, almost exclusively using remote controllers and ground stations. Secondly, operating drones via remote controllers has a certain learning curve and a relatively long learning period.

[0003] Traditional drone control typically uses RF (radio frequency) remote controllers. Users generate control commands via buttons and joysticks, which are then transmitted through internal radio frequency circuitry. While offering long communication distances, this method requires highly skilled operators, often necessitating specialized training, and thus fails to meet the demands for convenient drone control. Modern human-computer interaction methods include fingerprint recognition, voiceprint recognition, retinal recognition, gesture recognition, and electromyography (EMG) signal detection. Gestures, as a form of interaction, are flexible and convenient, and as the most frequently used organ in human communication, hands convey rich and natural meanings.

[0004] Currently, there are two main types of gesture control methods: one is motion sensor-based gesture control, and the other is image-based gesture control. Image-based gesture recognition generally uses visual sensors to capture gesture images, eliminating the need for data acquisition devices worn on the hand. Gesture control can be performed with bare hands, resulting in natural and fluid gestures without the burden of wearing devices. This invention proposes the idea of ​​integrating gesture recognition with UAV flight control. However, for a complex system like a UAV with multiple interconnected modules, combining gesture recognition technology with UAV control requires in-depth research into the relationship between gesture signals and the UAV flight control system. Summary of the Invention

[0005] Purpose of the invention: To address the above shortcomings, this invention provides a UAV gesture control method based on chaotic sparrow search optimization of fuzzy PID parameters, which offers high control accuracy and stability.

[0006] The present invention also provides a drone gesture control system based on chaotic sparrow search to optimize fuzzy PID parameters.

[0007] Technical Solution: To solve the above problems, this invention adopts a UAV gesture control method based on chaotic sparrow search to optimize fuzzy PID parameters, including the following steps:

[0008] (1) Set up the mapping relationship between gesture commands and UAV control commands;

[0009] (2) Based on the mapping relationship obtained in step (1), the sparrow search algorithm improved by the reverse learning strategy is used to perform fuzzy PID control parameter self-optimization, realize intelligent adjustment of PID control parameters, and obtain the optimal control parameters from gesture action command to UAV control command.

[0010] (3) Obtain gesture actions, and parse the gesture actions based on the dynamic gesture recognition model to obtain gesture action instructions; the dynamic gesture recognition model is established by using the dynamic time warping algorithm and based on visual images;

[0011] (4) Control the movement of the drone according to the obtained gesture commands.

[0012] Furthermore, in step (1), the gesture type and the amplitude of the gesture in the gesture action command are mapped to the flight direction of the UAV and the distance between the target point of the movement and the current position of the UAV.

[0013] The gesture types include: waving to the left, waving to the right, waving upwards, waving downwards, drawing a circle clockwise, and drawing a circle counterclockwise, which correspond to the drone's flight directions as: flying to the left, flying to the right, climbing upwards, diving downwards, flying forwards, and flying backwards, respectively.

[0014] The amplitude of the gesture includes three levels: 0 to M / 3 is small amplitude, M / 3 to 2M / 3 is medium amplitude, and 2M / 3 to M is large amplitude. Among them, 0 to M is the maximum acquisition range. The distances between the target point and the current position corresponding to small, medium, and large amplitudes are 5M / 3, 5M, and 25M / 3, respectively.

[0015] Furthermore, in step (2), three controllers are designed for the three channels x, y, and z of the UAV position loop. The error e between the UAV target position and the current position corresponding to the gesture action and the error change rate ec are set as the input quantities of the fuzzy controller, and then quantized by factor k. e k ec The fuzzification process transforms the inputs E and EC of the fuzzy controller into the output U of the fuzzy PID controller, which is the correction amount Δk of the three parameters of the PID regulator. p Δk i Δk d The corrected PID control parameters are obtained based on the correction amount:

[0016]

[0017] Where, k′ p 、k′i 、k′ d The PID control parameters before correction, k p k i k d These are the corrected PID control parameters.

[0018] Furthermore, in step (2), the initial values ​​of the PID control parameters are set empirically, and the quantization factor k of the fuzzy PID controller is determined using the improved Sparrow Search Algorithm (ISSA). e k ec Scale factor k u The search for optimization;

[0019] According to k e k ec k u The range of values ​​is used to construct a three-dimensional target search space, and the initial position of the sparrows is generated using cubic chaotic mapping and inverse learning strategies to initialize the sparrow population.

[0020] Initialize a sparrow population consisting of c three-dimensional individuals. First, randomly generate a three-dimensional vector y1 with each dimension ranging from -1 to 1 as the first individual. Then, iterate through each dimension of y1 using the cubic mapping formula to obtain the remaining c-1 individuals. Next, map the variable values ​​generated by the cubic mapping onto the sparrow individuals. The sparrow population obtained using cubic chaotic mapping is denoted as H. p ;

[0021] The initial sparrow population H was re-applied using a reverse learning strategy. p The sparrow population H was obtained through processing. o H o The individual positions in the text are:

[0022]

[0023] in, Let x be the position of the i-th sparrow in the target search space after being mapped by cubic chaos. lb x ub These represent the upper and lower boundaries of the target search space; Let be the position of the i-th sparrow in the target search space after learning the reverse learning strategy;

[0024] Using a reverse learning strategy, obtain c more initial individuals and merge the sparrow population H. p and H o Select the c sparrow individuals with the best fitness to form an initial population, denoted as H0;

[0025] An improved algorithm for updating the positions of the discoverer, follower, and frame observer is adopted using the golden sine wave method.

[0026] The formula for updating the discoverer's location is:

[0027]

[0028] Where R1 and R2 are randomly selected, and R1∈[0,2π], R2∈[0,π]; b is a random number and b∈[0,1], d is a random number that follows a normal distribution, and s r The safety threshold is a constant; W is a vector consisting entirely of 1s. This represents the position of the i-th sparrow during the t-th iteration. ξ1 and ξ2 are the optimal positions at the t-th iteration; ξ1 and ξ2 are parameters that control the update step size and direction.

[0029] The formula for updating the position of followers is:

[0030]

[0031] in, Let c be the worst position in the t-th iteration, c be the population size, and A be a matrix whose elements are randomly set to 1 or -1. + =A T (AA T ) -1 ;

[0032] The position update formula for the frame observer is:

[0033]

[0034] Among them, f i f is the fitness value of the current individual sparrow; best f worst represents the global optimal fitness and worst fitness values ​​under the current iteration number, respectively; β is a random number following a normal distribution (0,1); r∈[-1,1] is a random number, and ε is a set small constant;

[0035] After initializing the population, the positions of the sparrows are updated according to the iterative formula for each sparrow's position. Then, the fitness value (ITAE) of each sparrow in the population is calculated and denoted as f. i The optimized greedy strategy is used for position updates, and the calculation method is as follows:

[0036]

[0037] Among them, f i f new These represent the fitness levels before and after the location update. Let ξ3 be the updated position, and let ξ3 be a random number, where ξ3∈[0,1].

[0038] The iteration stops when the number of iterations reaches the maximum number of iterations or when the optimal position found by the sparrow flock so far meets the predetermined minimum fitness threshold, and the optimal solution obtained by optimization is output.

[0039] Furthermore, the number of observers is calculated using a linearly decreasing formula, as follows:

[0040]

[0041] Where Num represents the current number of scouts, Num ini Let t be the initial number of scouts, and t be the current iteration number. max This represents the maximum number of iterations.

[0042] Furthermore, in step (3), a binocular camera is used to acquire hand gestures and collect hand gesture data to construct a hand gesture dataset. The hand gesture data includes the position and speed information of the hand relative to the coordinate system of the binocular camera. 5% of the maximum speed of the hand during the movement is used as the hand gesture segmentation threshold to segment the movement state and the stationary state of the hand gesture. The segmented hand gesture data are preprocessed and classified and stored to establish a hand gesture dataset.

[0043] Using the position information of the index fingertip in the gesture data as the gesture feature, a two-dimensional feature vector is created for each gesture based on the index fingertip coordinates, resulting in a gesture feature sequence.

[0044] An improved Dynamic Time Warping (DTW) algorithm is used to establish a dynamic gesture recognition model based on visual images. The specific steps for parsing gesture actions based on the dynamic gesture recognition model are as follows: N samples are collected for each gesture type to obtain a gesture sample set for each gesture type. The gesture to be tested is then subjected to DTW operation with the gesture sample set of each gesture type to obtain N cumulative Euclidean distances. The gesture type corresponding to the smaller average cumulative Euclidean distance among the N obtained cumulative Euclidean distances is the gesture type of the gesture to be tested.

[0045] Furthermore, the establishment of the dynamic gesture recognition model specifically involves: defining a gesture feature sequence Q corresponding to a sample gesture action and a gesture feature sequence C corresponding to a gesture action to be tested; the value of each point in the sequence is the data of each frame of the gesture feature sequence, and the gesture feature sequence Q has a total of n frames, with the data of the i-th frame being q. i The gesture feature sequence C has a total of m frames, and the data of the j-th frame is c. j ;

[0046] Q = {q1,q2,q3,…,q} i ,…,q n}, C = {c1, c2, c3, ..., c j ,…,cm}

[0047] Align the gesture feature sequence Q and the gesture feature sequence C along the time axis; specifically, construct an n×m matrix grid, where matrix element (i,j) represents q. i and c j Euclidean distance d(q) between two points i ,c j Find a path through several grid points in this grid. The grid points traversed by the path are the points used for alignment calculations between the two sequences. The k-th element of the path W is defined as W. k =(i,j) k The mapping between the gesture feature sequence Q and the gesture feature sequence C is as follows:

[0048] W = {W1, W2, ..., W} k ,…,W K max(m,n)≤K≤m+n-1

[0049] When performing dynamic programming, ensure that the planned path starts with W1 = (1,1) and ends with W. K = (m,n) ends, when W k-1 When =(a′,b′), for the next point W on the path k = (a, b) needs to satisfy:

[0050] 0≤(aa′)≤1,0≤(bb′)≤1

[0051] The optimal normalized path W is the one with the minimum sum of distances to all nodes:

[0052]

[0053] K is used to compensate for regular paths of different lengths.

[0054] The present invention also employs a drone gesture control system based on chaotic sparrow search optimization of fuzzy PID parameters, including a mapping module for setting the mapping relationship between gesture commands and drone control commands;

[0055] The optimal parameter calculation module is used to perform fuzzy PID control parameter self-optimization based on the mapping relationship and using an improved sparrow search algorithm to realize intelligent adjustment of PID control parameters and obtain the optimal control parameters from gesture commands to UAV control commands.

[0056] The instruction recognition module is used to acquire gesture actions and parse the gesture actions to obtain gesture action instructions based on a dynamic gesture recognition model; the dynamic gesture recognition model is established by using a dynamic time warping algorithm and based on visual images;

[0057] The execution module is used to control the movement of the drone based on the received gesture commands.

[0058] Beneficial effects: Compared with the prior art, the significant advantage of this invention is that the fuzzy PID control method based on chaotic sparrow search optimization can complete the control of drone flight with gesture commands with higher stability and better accuracy. Attached Figure Description

[0059] Figure 1 This is a flowchart illustrating the drone gesture control method of the present invention. Detailed Implementation

[0060] like Figure 1 As shown in the figure, a UAV gesture control method based on chaotic sparrow search to optimize fuzzy PID parameters in this embodiment includes the following steps:

[0061] Step 1: Utilize the dynamic time warping algorithm and establish a dynamic gesture recognition model based on visual images.

[0062] A dynamic gesture recognition model based on visual images was established using the Dynamic Time Warping (DTW) algorithm. Gesture data was collected using a binocular camera to construct a gesture dataset, and the DTW algorithm was used to recognize six gestures (including waving to the left, waving to the right, waving upwards, waving downwards, drawing a circle clockwise, and drawing a circle counterclockwise).

[0063] Considering the different ways different groups of people express the same gesture and the problem of misrecognition between different gestures, the designed gestures need to meet the following requirements:

[0064] 1) The defined gestures conform to the operating habits of most people, the gestures are simple and have a certain correlation with the corresponding drone actions;

[0065] 2) Different gestures have high distinguishability, which reduces the complexity of gesture recognition algorithms and improves the recognition rate;

[0066] 3) The trend and basic characteristics of the same gesture are almost the same when performed by different operators.

[0067] Based on the above requirements, the six hand gestures designed are: waving to the left, waving to the right, waving upwards, waving downwards, drawing a circle clockwise, and drawing a circle counterclockwise.

[0068] Before building a gesture recognition model, gesture data collection and preprocessing are necessary. The position and velocity information of the hand relative to the binocular camera coordinate system during the gesture action are collected as observations, and Python is used to acquire hand motion data. At the beginning and end of the gesture data collection phases, the operator's hand remains almost stationary; therefore, the collected gesture data will include some static state data. A gesture segmentation threshold of 5% of the maximum speed during the gesture movement is used, and the window length is set to 5 to segment the gesture into moving and stationary states. A Savitzky-Golay filter is used to smooth and filter the moving gesture data, and after normalization, it is classified and stored to build a gesture dataset.

[0069] The normalization formula is:

[0070]

[0071] Where, max(z) and Let z represent the maximum and minimum values ​​in the gesture sequence, respectively. i Represents the original data, d i This represents the normalized data.

[0072] Next, gesture features are selected by analyzing the similarities in data from different individuals performing the same gesture to obtain the features of that gesture. The position information of the index fingertip is selected as the gesture feature. Since the gesture actions are all in the xy plane, the coordinates x(t) and y(t) of the index fingertip are selected to create a two-dimensional feature vector for each gesture.

[0073] Then, gesture sample clustering is performed on the gesture dataset. The six gestures are classified along their principal axes using the maximum amplitude and average value of the gesture sequences. Only the variances of x(t) and y(t) need to be calculated. The axis with the largest variance is retained, and its variance Ω is compared with the variance S of the other axis. If S is greater than 40% of Ω, S is retained; otherwise, S is discarded. Therefore, gesture actions have at least one principal axis and at most two principal axes. Left and right waving gestures have the x-axis as their principal axis, upward and downward waving gestures have the y-axis as their principal axis, and clockwise and counterclockwise circling gestures are considered dual-principal-axis gestures.

[0074] This concludes the construction of a gesture recognition framework based on the Dynamic Time Warping (DTW) algorithm. The DTW algorithm primarily addresses the alignment of two time series of unequal length. While two time series can be aligned through stretching and compression, the DTW algorithm finds an optimal stretching method to warp the two time series to the same length. After alignment, the differences caused by the unequal lengths are eliminated, greatly aiding in determining the similarity between the two time series. DTW uses a time warping function W(n) that satisfies certain conditions to describe the temporal correspondence between the test template and the reference template, and solves for the warping function that minimizes the cumulative distance when the two templates match.

[0075] Given two gesture data sequences Q and C, where sequence Q is the reference template and sequence C is the test template, the value of each point in the sequence is the data for each frame of the gesture sequence. Sequence Q has n frames, and the data for the i-th frame is q. i To determine the degree of matching between these two gesture sequences, we need to align them along the timeline.

[0076]

[0077] To align these two sequences, we need to construct an n×m matrix grid, where the matrix element (i,j) represents q. i and c j Euclidean distance d(q) between two points i ,c j The smaller the Euclidean distance, the higher the similarity. Each matrix element (i,j) represents point q. i and c j Alignment. Dynamic programming can be reduced to finding a path through several grid points in this grid, and the grid points that the path passes through are the points where alignment calculations are performed between the two sequences.

[0078] in:

[0079] d(q i ,c j )=(q i -c j ) 2 (3)

[0080] When performing dynamic programming, it is necessary to ensure that the planned path starts with W1 = (1,1) and ends with W. K =Ending with (m,n), and when W k-1 When =(a′,b′), for the next point W on the path k = (a, b) needs to satisfy:

[0081] 0≤(aa′)≤1,0≤(bb′)≤1 (4)

[0082] Based on the above constraints, many paths that meet the conditions can be found, but it is also required that the Euclidean distance d(q) between the two sequences of points on the planned path be calculated. i ,c j Minimize, which means finding the optimal path that minimizes the cost.

[0083] Let's define this path as the optimal regular path, denoted by W. The k-th element of W is defined as Wk. k =(i,j) k That is, it defines the mapping between sequences Q and C.

[0084] W = {W1, W2, ..., W} k ,…,W K} max(m,n)≤K≤m+n-1 (5)

[0085] The distance of the optimal normalized path is the sum of the distances of all nodes in the optimal normalized path:

[0086]

[0087] K is used to compensate for regular paths of different lengths.

[0088] Based on the constructed gesture sample sets of the three main axes, each sample set consists of N gesture data collected by different operators. Therefore, after performing DTW (Time-to-Wave) operations on the gesture to be measured and the gestures in the gesture sample sets, N cumulative Euclidean distances, denoted by Dist, are obtained. For the N Dist... i The average value is calculated for each group, with the smaller value representing the gesture being tested. Each main axis gesture sample set contains two gestures. When storing the sample set data, the first N / 2 columns and the last N / 2 columns store the two gesture sequences respectively. We only need to calculate the average of the first N / 2 Dist values ​​and the last N / 2 Dist values ​​separately, using the following formula:

[0089]

[0090] Among them, the smaller of D1 and D2 corresponds to the gesture category to be tested.

[0091] Step 2: Based on the characteristics of the UAV's control signals and gesture command signals, construct a mapping relationship from the gesture set to the UAV's action set;

[0092] Since a gesture is only recognized and a single gesture command signal is obtained after the entire action is completed, containing the gesture type and amplitude, while the drone's control signals exist continuously throughout the flight, the gesture command signal cannot be directly mapped to the drone's control input. Therefore, the gesture type and amplitude obtained from gesture recognition are mapped to the drone's flight direction and the distance of the target point from the drone's current position.

[0093] The correspondence between gesture command types and drone flight directions is as follows:

[0094] (1) Waving to the left corresponds to the drone flying to the left.

[0095] (2) Waving to the right corresponds to the drone flying to the right.

[0096] (3) Waving upwards corresponds to the drone climbing upwards.

[0097] (4) Waving downwards corresponds to the drone diving downwards.

[0098] (5) Draw a clockwise circle to correspond to the forward flight of the drone.

[0099] (6) Draw a counterclockwise circle to correspond to the drone's backward flight.

[0100] Based on the image acquisition range of the binocular camera, the amplitude of gestures can be divided into three levels to construct a mapping between gesture information and the drone's target position: If the maximum horizontal and vertical acquisition range of the binocular camera is 0 to M, it is proportionally divided into three ranges: 0 to M / 3 for small amplitude, M / 3 to 2M / 3 for medium amplitude, and 2M / 3 to M for large amplitude. The gesture amplitudes within the small, medium, and large amplitude ranges are standardized to the average values ​​of these ranges, M / 6, M / 2, and 5M / 6, respectively. By scaling up, the distances between the optimal mapped target point and the drone's current position are 5M / 3, 5M, and 25M / 3, respectively.

[0101] Step 3: Based on the mapping designed in Step 2, perform optimal parameter calculation to convert gesture commands into UAV control commands. To achieve the goal of gesture commands, only the UAV position loop needs to be controlled.

[0102] The dynamic model of the position loop of the quadcopter UAV is as follows:

[0103]

[0104] Where, [x,y,z] T Let C be the position of the quadcopter UAV in the ground coordinate system. (·) and S (·) Let cos and sin be the functions respectively. These represent the roll angle, pitch angle, and yaw angle, respectively; U1 is the total lift generated by the four propellers; and m is the mass of the UAV. i , i = 1, 2, 3 represents the sum of model uncertainty and disturbances.

[0105] The initial values ​​of the PID parameters are set empirically, and the quantization factor k of the fuzzy PID controller is determined using an improved sparrow search algorithm. e k ec Scale factor k u The optimization is aimed at solving the problems caused by constant control parameters and improving the system's adaptive capability.

[0106] The Sparrow Search Algorithm (SSA) has significant advantages over other optimization algorithms in terms of globality and convergence. It requires fewer parameter adjustments, has strong global optimization capabilities, and converges quickly, and has been well applied to UAV path planning.

[0107] Since the optimization objective is k e k ec k u According to k e k ec k u The range of values ​​is used to construct a three-dimensional target search space. The population size is set, and the initial positions of the sparrows are generated using a cubic chaotic mapping and reverse learning strategy to initialize the sparrow flock.

[0108] The formula for cubic mapping is as follows:

[0109]

[0110] The initial population consists of c three-dimensional individuals. First, a three-dimensional vector y1 with each dimension ranging from -1 to 1 is randomly generated as the first individual. Then, the cubic mapping formula is used to iterate through each dimension of y1 to obtain the remaining c-1 individuals. The variable values ​​generated by the cubic mapping are then mapped to the sparrow individuals using the following mapping formula:

[0111] x i p =x lb +(x lb -x ub )×(y i +1)×0.5 (10)

[0112] Where, x i p =(x i1 ,x i2 ,x i3 Let x be the position of the i-th sparrow in the target search space. lb xub To determine the upper and lower boundaries of the solution space, the sparrow population obtained using (10) is denoted as H. p ...

[0113] The initial population is processed again using a reverse learning strategy to obtain population H. o H o The individual positions in the text are:

[0114]

[0115] Using a reverse learning strategy, obtain c initial individuals again, and merge the population H. p and H o The c sparrow individuals with the best fitness are selected to form an initial population, denoted as H0. The SSA algorithm has discoverers, followers, and frame observers, each updating its position according to its own update rule. The position update algorithm is improved by using the golden sine wave method.

[0116] The formula for updating the discoverer's location is:

[0117]

[0118] Where R1 and R2 are randomly selected, and R1∈[0,2π], R2∈[0,π]; b is a random number and b∈[0,1], d is a random number that follows a normal distribution, and s r The safety threshold is a constant, and W is a vector containing only 1s. Let be the position of the i-th sparrow in the t-th iteration. Let ξ1 and ξ2 be the optimal position at the t-th iteration, and let ξ1 and ξ2 be the parameters controlling the update step size and direction, respectively, and their formulas are as follows:

[0119]

[0120] In the formula The golden ratio, i.e.

[0121] The formula for updating the position of followers is:

[0122]

[0123] in, Let c be the worst position in the t-th iteration, c be the population size, and A be a matrix whose elements are randomly set to 1 or -1. + =A T (AA T ) -1 .

[0124] The position update formula for the frame observer is:

[0125]

[0126] Among them, f i f is the current fitness value of the individual sparrow. best f worst Let represent the global optimal fitness and worst fitness values ​​under the current iteration number, respectively. β follows a normal distribution of (0,1), r∈[-1,1] is a random number, and ε is a set small constant.

[0127] The number of observers is calculated using a linearly decreasing formula, as follows:

[0128]

[0129] Where Num represents the current number of scouts, Num ini t represents the initial number of scouts. max This represents the maximum number of iterations.

[0130] The fitness function for the sparrow flock is set as the integral performance index (ITAE). The lower the ITAE value, the better the performance. Its expression is:

[0131]

[0132] After initializing the population, the positions of the sparrows are updated according to the iterative formula for each sparrow's position. Then, the fitness value (ITAE) of each sparrow in the population is calculated and denoted as f. i The optimized greedy strategy is used for position updates, and the calculation method is as follows:

[0133]

[0134] Among them, f i f new These represent the fitness levels before and after the location update. To update the position of ξ3, ξ3 is a random number, and ξ3∈[0,1].

[0135] The iteration stops when the maximum number of iterations is reached or the optimal position found by the sparrow flock so far satisfies the predetermined minimum fitness threshold, and the optimal solution x obtained through optimization is output. g That is, the current optimal k e k ec k u .

[0136] The fuzzy PID controller optimized by the improved sparrow search algorithm adopts a two-dimensional fuzzy controller structure. To achieve the control objective mapped in step 2, three controllers need to be designed for the three channels x, y, and z of the position loop. The error e between the UAV target point position corresponding to the gesture action and the current position, and the error change rate ec, are used as the inputs of the fuzzy controller, and quantized by a factor k. e k ec The fuzzification process transforms the inputs E and EC of the fuzzy controller into the output U of the fuzzy controller, which is the correction amount Δk of the three parameters of the PID controller. p Δk i Δk d This enables parameter self-tuning.

[0137] Set the universe of discourse of input variables E and EC to {-3,-2,-1,0,+1,+2,+3}, and output Δk in U. p The universe of discourse is {-0.3,-0.2,-0.1,0,+0.1,+0.2,+0.3}, Δk i The universe of discourse is {-0.03,-0.02,-0.02,0,+0.01,+0.02,+0.03}, Δk d The universe of discourse is {-3,-2,-1,0,+1,+2,+3}. The corresponding linguistic variables are {NB,NM,NS,ZO,PS,PM,PB}. To improve computation speed, a symmetrically distributed trigonometric function is chosen as the membership function, thereby obtaining the membership degrees of each fuzzy subset. A fuzzy rule table is then designed based on the fuzzy control rules for each parameter. The corrected PID control parameters are obtained based on the correction values.

[0138]

[0139] Where, k′ p 、k′ i 、k′ d The PID parameters before correction, k p k i k d These are the corrected PID parameters. Using the optimized k... e k ec k u With the corrected k p k i k d By designing a fuzzy PID controller, the optimal mapping from gesture control signals to drone control signals can be achieved.

Claims

1. A method for UAV gesture control based on chaotic sparrow search optimization of fuzzy PID parameters, characterized in that, Includes the following steps: (1) Set up the mapping relationship between gesture commands and UAV control commands; (2) Based on the mapping relationship obtained in step (1), the sparrow search algorithm improved by the reverse learning strategy is used to perform self-optimization of fuzzy PID control parameters, realize intelligent adjustment of PID control parameters, and obtain the optimal control parameters from gesture action command to UAV control command. In step (2), the initial values ​​of the PID control parameters are set empirically, and the quantization factor of the fuzzy PID controller is determined using the improved Sparrow Search Algorithm (ISSA). Scale factor The search for optimization; according to The range of values ​​is used to construct a three-dimensional target search space, and the initial position of the sparrows is generated using cubic chaotic mapping and inverse learning strategies to initialize the sparrow population. Initialize a sparrow population consisting of c three-dimensional individuals. First, randomly generate a three-dimensional vector with each dimension ranging from -1 to 1. As the first individual, the cubic mapping formula is then used to... Iterate through each dimension to obtain the remaining c-1 individuals; The variable values ​​generated by the cubic mapping are then mapped to individual sparrows, and the sparrow population obtained using the cubic chaotic mapping is denoted as . ; The initial sparrow population was re-engineered using a reverse learning strategy. Sparrow population obtained through processing , The individual positions in the text are: in, For the first The location of a sparrow in the target search space after being mapped by cubic chaos. These represent the upper and lower boundaries of the target search space; For the first The position of a sparrow in the target search space after learning a backpropagation strategy; Using a reverse learning strategy, obtain c initial individuals again, and then merge the sparrow population. and Select the c sparrow individuals with the best fitness to form an initial population, denoted as . ; An improved algorithm for updating the positions of the discoverer, follower, and frame observer is adopted using the golden sine wave method. The formula for updating the discoverer's location is: in, Randomly selected values, and b is a random number and d is a random number that follows a normal distribution. The safety threshold is a constant; W is a vector consisting entirely of 1s. For the first The position of a sparrow in the t-th iteration; This represents the optimal position at the t-th iteration. To control the parameters for updating the step size and direction; The formula for updating the position of followers is: in, Let be the worst position in the t-th iteration, c be the population size, and A be a matrix whose elements are randomly set to 1 or -1. ; The position update formula for the frame observer is: in, This represents the current fitness value of the individual sparrow. These represent the global best fitness and worst fitness values ​​at the current iteration number, respectively. These are random numbers that follow a normal distribution (0,1). For a random number, It is a predetermined small constant; After initializing the population, the positions of the sparrows are updated according to the iterative formula for each sparrow's position. Then, the fitness value (ITAE) of each sparrow in the population is calculated and denoted as [Icon's value]. The optimized greedy strategy is used for position updates, and the calculation method is as follows: in, These represent the fitness levels before and after the location update. The updated position It is a random number, and ; The iteration stops when the number of iterations reaches the maximum number of iterations or when the optimal position found by the sparrow flock so far meets the predetermined minimum fitness threshold, and the optimal solution obtained by optimization is output. (3) Obtain gesture actions, and parse the gesture actions based on the dynamic gesture recognition model to obtain gesture action instructions; the dynamic gesture recognition model is established by using the dynamic time warping algorithm and based on visual images; (4) Control the movement of the drone according to the obtained gesture commands.

2. The UAV gesture control method according to claim 1, characterized in that, In step (1), the gesture type and the amplitude of the gesture in the gesture action command are mapped to the flight direction of the UAV and the distance between the target point of the movement and the current position of the UAV. The gesture types include: waving to the left, waving to the right, waving upwards, waving downwards, drawing a circle clockwise, and drawing a circle counterclockwise, which correspond to the drone's flight directions as: flying to the left, flying to the right, climbing upwards, diving downwards, flying forwards, and flying backwards, respectively. The amplitude of the gesture includes three levels: 0~M / 3 is small amplitude, M / 3~2M / 3 is medium amplitude, and 2M / 3~M is large amplitude. Among them, 0~M is the maximum acquisition range. The distances between the target point and the current position corresponding to small, medium and large amplitudes are 5M / 3, 5M and 25M / 3, respectively.

3. The UAV gesture control method according to claim 2, characterized in that, In step (2), the three channels of the UAV position loop are... Design three controllers and set the error between the drone target position and the current position corresponding to the gesture action. and error change rate As the input to the fuzzy controller, it is quantized by a factor. The fuzzification process converts the data into the input of the fuzzy controller. The output of the fuzzy PID controller The correction values ​​for the three parameters of the PID controller The corrected PID control parameters are obtained based on the correction amount: in, These are the PID control parameters before correction. These are the corrected PID control parameters.

4. The UAV gesture control method according to claim 3, characterized in that, The number of observers is calculated using a linearly decreasing formula, as follows: in, The current number of scouts, The initial number of scouts. This represents the current iteration number. This represents the maximum number of iterations.

5. The UAV gesture control method according to claim 2, characterized in that, In step (3), a binocular camera is used to acquire hand gestures and collect hand gesture data to build a hand gesture dataset. The hand gesture data includes the position and speed information of the hand relative to the binocular camera coordinate system. 5% of the maximum speed of the hand during the movement is used as the hand gesture segmentation threshold to segment the movement state and the static state of the hand gesture. The segmented hand gesture data are preprocessed and classified and stored to establish a hand gesture dataset. Using the position information of the index fingertip in the gesture data as the gesture feature, a two-dimensional feature vector is created for each gesture based on the index fingertip coordinates, resulting in a gesture feature sequence. An improved Dynamic Time Warping (DTW) algorithm is used to establish a dynamic gesture recognition model based on visual images. The specific steps for parsing gesture actions based on the dynamic gesture recognition model are as follows: N samples are collected for each gesture type to obtain a gesture sample set for each gesture type. The gesture to be tested is then subjected to DTW operation with the gesture sample set of each gesture type to obtain N cumulative Euclidean distances. The gesture type corresponding to the smaller average cumulative Euclidean distance among the N obtained cumulative Euclidean distances is the gesture type of the gesture to be tested.

6. The UAV gesture control method according to claim 5, characterized in that, The establishment of the dynamic gesture recognition model is specifically as follows: Define the gesture feature sequence Q corresponding to the sample gesture action and the gesture feature sequence C corresponding to the gesture action to be tested; the value of each point in the sequence is the data of each frame of the gesture feature sequence, and the gesture feature sequence Q has n frames, the th... The data in the frame is ; The gesture feature sequence C has a total of m frames, the first... The data in the frame is ; , Align the gesture feature sequence Q and the gesture feature sequence C on the time axis; specifically by constructing a... A matrix grid, where matrix elements express and Euclidean distance between two points Find a path that passes through several grid points in this grid. The grid points traversed by the path are the points used for alignment calculations between the two sequences. The path W is the first... Each element is defined as The mapping between the gesture feature sequence Q and the gesture feature sequence C is as follows: When performing dynamic programming, ensure that the planned path follows the same path. Beginning and In the end, when At that time, for the next point on the path The following conditions must be met: The optimal normalized path W is the one with the minimum sum of distances to all nodes: K is used to compensate for regular paths of different lengths.

7. A UAV gesture control system based on chaotic sparrow search optimization of fuzzy PID parameters, characterized in that, Includes a mapping module, used to set the mapping relationship between gesture commands and drone control commands; The optimal parameter calculation module is used to perform fuzzy PID control parameter self-optimization based on the mapping relationship and using an improved sparrow search algorithm to realize intelligent adjustment of PID control parameters and obtain the optimal control parameters from gesture commands to UAV control commands. The initial values ​​of the PID control parameters are set empirically, and the quantization factor of the fuzzy PID controller is determined using the improved Sparrow Search Algorithm (ISSA). Scale factor The search for optimization; according to The range of values ​​is used to construct a three-dimensional target search space, and the initial position of the sparrows is generated using cubic chaotic mapping and inverse learning strategies to initialize the sparrow population. Initialize a sparrow population consisting of c three-dimensional individuals. First, randomly generate a three-dimensional vector with each dimension ranging from -1 to 1. As the first individual, the cubic mapping formula is then used to... Iterate through each dimension to obtain the remaining c-1 individuals; The variable values ​​generated by the cubic mapping are then mapped to individual sparrows, and the sparrow population obtained using the cubic chaotic mapping is denoted as . ; The initial sparrow population was re-engineered using a reverse learning strategy. The sparrow population was obtained through processing. , The individual positions in the text are: in, For the first The location of a sparrow in the target search space after being mapped by cubic chaos. These represent the upper and lower boundaries of the target search space; For the first The position of a sparrow in the target search space after learning a backpropagation strategy; Using a reverse learning strategy, obtain c initial individuals again, and then merge the sparrow population. and Select the c sparrow individuals with the best fitness to form an initial population, denoted as . ; An improved algorithm for updating the positions of the discoverer, follower, and frame observer is adopted using the golden sine wave method. The formula for updating the discoverer's location is: in, Randomly selected values, and b is a random number and d is a random number that follows a normal distribution. The safety threshold is a constant; W is a vector consisting entirely of 1s. For the first The position of a sparrow in the t-th iteration; This represents the optimal position at the t-th iteration. To control the parameters for updating the step size and direction; The formula for updating the position of followers is: in, Let be the worst position in the t-th iteration, c be the population size, and A be a matrix whose elements are randomly set to 1 or -1. ; The position update formula for the frame observer is: in, This represents the current fitness value of the individual sparrow. These represent the global best fitness and worst fitness values ​​at the current iteration number, respectively. These are random numbers that follow a normal distribution (0,1). For a random number, It is a predetermined small constant; After initializing the population, the positions of the sparrows are updated according to the iterative formula for each sparrow's position. Then, the fitness value (ITAE) of each sparrow in the population is calculated and denoted as . The optimized greedy strategy is used for position updates, and the calculation method is as follows: in, These represent the fitness levels before and after the location update. The updated position It is a random number, and ; The iteration stops when the number of iterations reaches the maximum number of iterations or when the optimal position found by the sparrow flock so far meets the predetermined minimum fitness threshold, and the optimal solution obtained by optimization is output. The instruction recognition module is used to acquire gesture actions and parse the gesture actions based on a dynamic gesture recognition model to obtain gesture action instructions; the dynamic gesture recognition model is established by using a dynamic time warping algorithm and based on visual images; The execution module is used to control the movement of the drone based on the received gesture commands.

8. A device, characterized in that, Includes memory and processor, wherein: Memory is used to store computer programs that can run on a processor; A processor, configured to, while running the computer program, perform the steps of the UAV gesture control method based on chaotic sparrow search to optimize fuzzy PID parameters as described in any one of claims 1-6.

9. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by at least one processor, implements the steps of the UAV gesture control method based on chaotic sparrow search to optimize fuzzy PID parameters as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Unmanned aerial vehicle intelligent control method based on gesture recognition

    CN112732083A

  • Underwater climbing robot control system and fault recovery method

    CN112748686A