Positioning and tracking method of forest planting machine based on WSP algorithm and BP network model

By combining the WSP algorithm and the BP network model, using UWB sensors and the Tent chaotic algorithm to initialize the individual wolf pack positions, and combining the population mutation strategy of the genetic algorithm to optimize the weight matrix of the BP neural network, the problems of slow positioning accuracy and convergence speed in traditional methods are solved, and high-precision positioning of the forest planting machine is achieved.

CN116029362BActive Publication Date: 2026-06-19NANJING UNIV OF SCI & TECH +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF SCI & TECH
Filing Date
2022-09-06
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing wolf pack algorithms and traditional biological-neural network models suffer from slow convergence speed and are prone to getting stuck in local optima in indoor positioning, making it difficult to meet the requirements for high-precision positioning.

Method used

The WSP algorithm and BP network model are combined. TDOA data are acquired through UWB sensors. The Tent chaotic algorithm is used to initialize the individual wolf pack positions. Path optimization is performed by combining the population mutation strategy of the genetic algorithm. The weight matrix of the BP neural network is optimized to improve the positioning accuracy.

🎯Benefits of technology

It achieves faster convergence speed and higher positioning accuracy, improves the robustness and noise resistance of neural networks, overcomes the defects of local optima, and meets the high-precision positioning requirements of forestry planting machines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029362B_ABST
    Figure CN116029362B_ABST
Patent Text Reader

Abstract

This invention proposes a method for locating and tracking a forest planter based on the WSP algorithm and a BP neural network model. It uses UWB sensors to acquire TDOA data of the planter head during operation, calculates the coarse dynamic position of the planter head, and constructs training and validation sample sets. A BP neural network model is used to predict the dynamic three-dimensional coordinates of the planter head. First, the number of nodes in the BP neural network model is determined based on the training sample set. Then, the Tent chaotic algorithm is introduced to initialize the wolf pack position, and fitness calculations are performed to determine the alpha wolf and artificial wolves in the initial state. Multiple populations are divided, and various population mutation strategies based on genetic algorithms are introduced to optimize and update the wolf pack path, obtaining the globally optimal alpha wolf vector. The globally optimal alpha wolf vector is used as the weight matrix of the BP neural network, and the model is validated using the validation sample set. The BP neural network weight matrix is ​​output to predict the dynamic three-dimensional coordinates of the planter head in practical applications. This invention improves the tracking accuracy of the planter's dynamic operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to indoor positioning technology, and in particular to a method for locating and tracking forestry planting machines based on the WSP algorithm and BP network model. Background Technology

[0002] Many factors constrain the accuracy of the positioning signal propagation model method during indoor positioning. Existing research on indoor positioning shows that the method of creating a positioning prediction model by improving biological algorithms and fusing neural networks has significant accuracy and robustness after large-sample training. Many studies have shown that BP neural networks have strong nonlinear mapping capabilities and fast learning speeds, outperforming other network models such as RBF. While the traditional Wolf Pack Algorithm (WPA) has good global optimization search capabilities, its local search capabilities are insufficient, leading to getting stuck in local optima. Genetic algorithms have strong local search capabilities, and their mutation update process satisfies the requirement of preserving excellent genes to a large extent while increasing gene diversity through mutation, thereby increasing the probability of finding the optimal solution. However, the conventional wolf pack algorithm + neural network model still cannot meet the requirements for high positioning accuracy. Therefore, how to organically integrate the two to obtain the global optimal solution or near-global optimal solution of the objective function and thus achieve precise positioning is the problem that this invention aims to solve. Summary of the Invention

[0003] The purpose of this invention is to propose a positioning and tracking method for forest planters based on the WSP algorithm and BP network model, in order to solve the technical problems of slow convergence speed and easy getting trapped in local optima in the standard wolf pack algorithm when dealing with multi-objective optimization problems, and the low positioning accuracy and robustness of traditional biological-neural network models.

[0004] The technical solution to achieve the purpose of this invention is: a method for locating and tracking a forestry planter based on the WSP algorithm and BP network model, specifically including the following steps:

[0005] S1: Use UWB sensors to acquire TDOA data during the operation of the planting head, solve the rough dynamic position of the planting head, and construct training and validation sample sets;

[0006] S2: The dynamic three-dimensional coordinates of the planting machine head are predicted using a BP neural network model. First, the number of nodes in the BP neural network model is determined based on the training sample set, i.e. the individual position dimension of the wolf pack. Then, the Tent chaos algorithm is introduced to complete the initialization of the wolf pack position and the fitness calculation is performed to determine the alpha wolf and artificial wolf in the initial situation.

[0007] S3: Divide the wolf pack into multiple populations and introduce various population mutation strategies based on genetic algorithms to optimize and update the wolf pack path, thereby obtaining the globally optimal alpha wolf vector;

[0008] S4: Use the globally optimal alpha wolf vector as the weight matrix of the BP neural network, and use the validation sample set to validate the model. If the model accuracy does not meet the accuracy requirements, return to S2 to readjust the weight matrix of the BP neural network; otherwise, go to S5.

[0009] S5: Outputs the weight matrix of the BP neural network to predict the dynamic three-dimensional coordinates of the planting machine head in practical applications.

[0010] Furthermore, S1: Use UWB sensors to acquire TDOA data during the operation of the planting head, solve for the coarse dynamic position of the planting head, and construct training and validation sample sets. The specific method is as follows:

[0011] First, UWB sensors are used to acquire TDOA data at time T during the operation of the planting head. Then, a three-dimensional solution algorithm is used to solve for the position and obtain the approximate position (x, y, z) of the planting head at time t. t A rough dynamic position set of the planting machine head is constructed, and after normalization, it is divided into a training sample set and a validation sample set.

[0012] Furthermore, the feature is that, S2: a BP neural network model is used to predict the dynamic three-dimensional coordinates of the planting machine head, wherein the input and output of the BP neural network are respectively:

[0013] The output is: Where N is the number of UWB sensors in the forest farm, d n The measured location (x, y, z) during planting and operation is related to the base station n(x). n ,y n ,z n The distance between them, where t is the sampling time. d n,1 =d n -d1;

[0014] The output is the three-dimensional true coordinates (x0, y0, z0) of the planting machine head at time t. t .

[0015] Furthermore, the key feature is that the number of nodes in the BP neural network model, i.e., the individual wolf pack position dimension, is first determined based on the training sample set. Then, the Tent chaotic algorithm is introduced to initialize the wolf pack positions, and fitness calculations are performed to determine the alpha wolf and artificial wolf in the initial situation. The specific method is as follows:

[0016] S2.1: Based on the training sample set, determine the number of input layer nodes I = N + 1 and the number of output layer nodes O = 3 in the BP neural network, that is, the number of three-dimensional real position elements output.

[0017] The number of hidden layer nodes is selected using empirical formulas. Where Q is the number of hidden layer nodes, I is the number of input nodes, O is the number of output nodes, and a is an integer in the range [1, 10].

[0018] The relationship between the dimension D of an individual wolf's position and the nodes at each level is expressed as: D = I × Q + Q + Q × O + O;

[0019] S2.2: Set up a wolf pack of S individuals and initialize the wolf pack using the Tent chaotic algorithm. The wolf pack initialization process using the chaotic algorithm includes:

[0020] d): Randomly generate a D-dimensional vector c1 within the interval [0,1];

[0021] e): Iteratively generate the d-th dimension position vector of the remaining S-1 normalized individuals using the logistic mapping. The logistic mapping formula is as follows:

[0022]

[0023] Where u is a control parameter, taking a value of 4, and c i Let i be the normalized position of an individual wolf after chaotic mapping, i = 1, 2...S, d = 1, 2...D;

[0024] f): The value c after chaotic mapping i Mapping to the search space [L,U] of the solution, we get:

[0025]

[0026] Where i = 1, 2...S, d = 1, 2...D, L and U are the upper and lower bounds of the search space, respectively, x i It is the initial position of individual wolf i in the search space;

[0027] S2.3: Construct the fitness function for the wolf pack, choosing the following:

[0028]

[0029] Where: RMSE is the root mean square error function. Let (x0, y0, z0) be the true coordinates at time t. t P t The output coordinates (x, y, z) of the BP neural network are obtained by inputting the individual wolf information after iteration at time t. t A fitness function that increases from small to large indicates a gradual decrease in performance;

[0030] S2.4: Based on the wolf pack's fitness function, determine the alpha wolf and artificial wolves, namely the aggressive wolf and the scout wolf.

[0031] Furthermore, S3: Divide the wolf pack into multiple populations and introduce various population mutation strategies based on genetic algorithms to optimize and update the wolf pack path, thereby obtaining the globally optimal alpha wolf vector. The specific method is as follows:

[0032] S3.1: Wolf pack path optimization phase, the specific process is as follows:

[0033] d) Scouting wolves: After obtaining information about the initial alpha wolf, select L wolves with the second-best fitness to serve as scouts. L should be a value of... The integers in the set are S, where S is the number of wolves in the pack, and α is the scouting wolf ratio factor. H directions are selected around each scouting wolf, and one step is taken in each of the H directions. The step size is denoted as step. a Search for a better location; if so, update to the better location; otherwise, keep the original location.

[0034] The position of the wolf l in the h-th direction in the d-th dimension for:

[0035]

[0036] Where h = 1, 2....H, l = 1, 2....L, d = 1, 2....D; after the scout wolf's roaming behavior ends, the scout wolf with the best fitness value is compared with the alpha wolf. If the scout wolf has a better fitness value, that is, a smaller fitness function output error value, it becomes the new alpha wolf and initiates the summoning raid behavior; otherwise, the scout wolf's roaming behavior is repeated until a new alpha wolf appears or the roaming count is reached, and then the summoning raid phase begins.

[0037] e) Summoning the Charge: After the scout wolves finish their roaming, the alpha wolf initiates a summoning action by howling. The wolves then synchronously move towards the alpha wolf's position. The number of wolves is SL-1 = M, and the wolves move in steps of length step. b As the wolf rapidly approaches the alpha wolf's position, the wolf m's position in the d-th dimension of the variable space during its evolution is:

[0038]

[0039] Where m = 1, 2...SL-1, d = 1, 2....D, g d Let be the position of the alpha wolf in the d-th dimension. During the charge, if the fitness function value of the m-th wolf is better than that of the alpha wolf, then this wolf replaces the alpha wolf and becomes the new alpha wolf, and restarts the summoning charge. Otherwise, the wolf continues to charge until the distance dis between itself and the alpha wolf is less than the decision distance d. near The wolf pack would then stop and launch a pincer attack. near Expressed as a formula:

[0040]

[0041] in Let the d-th coordinate be the alpha wolf. This represents the d-th dimension coordinate of the m-th wolf, where ω is the distance determination factor;

[0042] f) Wolf Pack Attack: In the attack, the wolf pack assumes that the prey's position in the d-th dimension of the variable space is G. d If we consider the alpha wolf's position as the prey's position, and the other S-1 artificial wolves (excluding the alpha wolf) launch a siege attack on the prey, then the positional change of the i-th artificial wolf in the d-th dimension can be represented as:

[0043]

[0044] Where λ is a random number uniformly distributed between [-1, 1], step c The attack step length is defined as the attack step length of the artificial wolf i when performing a siege behavior. During the siege, the fitness values ​​before and after the position change are compared. If the position change is better, the wolf remains in the same position; otherwise, it returns to its original position. Finally, the wolf with the optimal fitness value is designated as the alpha wolf. The roaming step length is defined as step. a Strike stride length b Attack step length c The following relationship must be satisfied:

[0045] step a =step a / 2 = step c ×2=|UL| / B

[0046] Where B is the step size factor, representing the precision with which the artificial wolf searches in the optimization space;

[0047] S3.2: The mutation and renewal phase of the wolf pack, the specific process is as follows:

[0048] By incorporating the mutation and evolutionary ideas of genetic algorithms, the wolf pack is divided into four groups according to the fitness matching degree. The specific mutation and update strategies for different groups are as follows:

[0049] e) The optimal group size is n1. Keep the individual position information unchanged and proceed to the next path optimization process.

[0050] f) The suboptimal population size is n², and an adaptive t-distribution mutation strategy is adopted. The adaptive t-distribution mutation strategy sets a mutation probability factor Pt, and the selection method of Pt is as follows:

[0051] Pt=w1-w2×(magen-iter) / magen

[0052] Where: w1 is the upper limit factor of mutation, which determines the upper limit of the dynamic selection probability; w2 is the magnitude factor of mutation, which determines the magnitude of the change in the dynamic selection probability; magen is the maximum number of iterations; and iter is the current number of iterations.

[0053] Based on the aforementioned mutation probability factor Pt, a random number rand in the range [0,1] is randomly generated during each iteration update of the suboptimal population. The specific t-distribution mutation strategy based on the mutation probability factor Pt is as follows:

[0054]

[0055] in It is the d-th spatial location of individual i in this population. These are random interference terms, i = 1, 2, ..., n²;

[0056] g) The size of the second-difference population is n³, and a random forward-backward mean-based superposition mutation is adopted, as follows:

[0057] Calculate the mean values ​​of individual wolf information in the best and worst wolf packs, denoted as ave1 and ave4 respectively. Determine the random direction of the randP sequence. For the d-th dimension of individual wolf information in the second-worst wolf pack... Define the following mutation relationship:

[0058]

[0059] Where i = 1, 2, ..., n3;

[0060] h) The worst-case population size is n4, and a complete cover mutation method is adopted under the initialization of the chaotic algorithm;

[0061] In this example, n1 = n2 = n3 = n4 = 30.

[0062] S3.3: This realizes the wolf scouting, summoning, wolf pack attack, and mutation update behavior of the population. Then, a maximum number of iterations is set to iterate the above process to obtain the global optimal vector, that is, the alpha wolf position information.

[0063] A forestry planter positioning and tracking system based on the WSP algorithm and BP network model is disclosed. Based on the aforementioned forestry planter positioning and tracking method, the system achieves positioning and tracking of the forestry planter using the WSP algorithm and BP network model.

[0064] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it realizes the positioning and tracking of the forest planter based on the WSP algorithm and BP network model, according to the aforementioned forest planter positioning and tracking method.

[0065] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, realizes the positioning and tracking of a forest planter based on the WSP algorithm and BP network model, according to the aforementioned forest planter positioning and tracking method.

[0066] Compared with existing technologies, the significant advantages of this invention are: 1) By applying a chaotic algorithm to the initialization of the wolf pack based on the traditional wolf pack algorithm, the initialization effect has better randomness and ergodicity, making the initial solution as evenly distributed as possible in the solution space; 2) After the wolf pack steps, it is divided into multiple populations according to fitness, and then multiple mutation strategies are adopted for multiple populations, which enables the algorithm to have a faster convergence speed, thereby improving the global optimal search ability and the ability to escape local optimal solutions. Through the same number of wolf pack optimization processes, this method can obtain a better neural network weight matrix than the traditional wolf pack algorithm, thereby obtaining more accurate tracking accuracy of the dynamic operation of the planting machine. Attached Figure Description

[0067] Figure 1 To develop an overall flowchart.

[0068] Figure 2 This is the network structure diagram of the BP neural network in this algorithm.

[0069] Figure 3 This is a location map showing the actual location and the initial TDOA algorithm positioning result.

[0070] Figure 4 A comparison chart of location distance errors predicted by the BP, WSP-BP, and optimized WSP-BP models. Detailed Implementation

[0071] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0072] Please see Figure 1 This invention discloses a method for locating and tracking a forestry planter based on the WSP algorithm and BP network model, comprising the following steps:

[0073] S1: Use UWB sensors to acquire TDOA data during the operation of the planting machine head, solve for the coarse dynamic position set of the planting head based on the dataset, and further establish a training sample set and a validation sample set for planting machine operation tracking. The specific steps include:

[0074] UWB sensors were used to acquire TDOA data during the operation of the base station and planting machine head in the forest farm. Based on the TDOA data, a three-dimensional solution algorithm was used to obtain a coarse dynamic location set. In this example, the three-dimensional spatial environment of the forest farm was simulated in MATLAB, simulating the planting machine planting 15*10 rows of seedlings. The search area of ​​the forest farm was set to [2002002] (unit: meters). The least squares method + Newton's iteration method was used to solve the TDOA data, and the coarse dynamic location set was obtained, including the coarse location (x, y, z) at time t. t The approximate location data and the actual location data are as follows: Figure 2 As shown.

[0075] Based on the aforementioned TDOA data and coarse dynamic location set, the input and output term sets of the neural network are established from the sample set. The input term is: The forest farm has N=4 base stations, located at [0, 0, 0; 0, 200, 0; 200, 0, 0; 0, 0, 10], d n Let (x, y, z) be the position to be measured. t With base station n(x) n ,y n ,z n The distance between them, where t is the sampling time. d n,1 =d n -d1; The output item is the three-dimensional true coordinates (x0, y0, z0) of the planting head at time k. t ;

[0076] After determining the input and output database information, the data is aggregated and normalized to obtain the final sample set (140 training samples + 10 validation samples).

[0077] S2: Set the initialization parameters related to the wolf pack, the fitness function of the neural network scheme, and the mutation probability factor Pt. Use the Tent chaotic algorithm to initialize and generate the wolf pack population information, and determine the information of the alpha wolf, scout wolf, and predator wolf. Specifically, this includes the following steps:

[0078] S2.1: The number of nodes in the input and output layers of a neural network is determined based on the training sample set. In a BP neural network, the number of nodes in the input layer is I = N + 1, and the number of nodes in the output layer is O = 3, which represents the number of true 3D position elements output. The number of nodes in the hidden layer can be selected using empirical formulas. Where Q is the number of hidden layer nodes, I is the number of input nodes, O is the number of output nodes, and a is an integer in the range [1, 10]. In this example, the [input layer nodes, hidden layer nodes, output layer nodes] are selected as

[5123] . The dimension D of the individual wolf pack position is expressed by the formula: D = I*Q + Q + Q*O + O = 111.

[0079] S2.2: The Tent chaotic algorithm is used to initialize the wolf pack. The number of wolves, S, is selected as 120. The wolf pack initialization process using the chaotic algorithm includes:

[0080] a) Randomly generate a D-dimensional vector c1 within the interval [0,1];

[0081] b) Use the logistic mapping iteratively to generate the d-th dimension position vector of the remaining S-1 normalized individuals. The logistic mapping formula is as follows:

[0082]

[0083] Where u is a control parameter, typically 4, and c i Let i be the normalized position of an individual wolf after chaotic mapping, i = 1, 2...S, d = 1, 2...D;

[0084] c) The value c after chaotic mapping i Mapping to the search space [L,U] of the solution, we get:

[0085]

[0086] Where i = 1, 2...S, d = 1, 2...D, L and U are the upper and lower limits of the search space, respectively. In this example, [LU] = [-55], x i It is the initial position of individual wolf i in the search space;

[0087] S2.3: The fitness function of the neural network is:

[0088] Fitness i =RMSE(P0,P)

[0089] Where: RMSE is the root mean square error function. Let (x0, y0, z0) be the true coordinates at time t. t P t The output coordinates (x, y, z) of the BP neural network are obtained by inputting the individual wolf information after iteration at time t. t A fitness function that increases from small to large indicates a gradual decrease in performance;

[0090] S2.4: Based on the wolf pack's fitness function, determine the alpha wolf and artificial wolves, namely the aggressive wolf and the scout wolf.

[0091] S3: Divide the wolf pack into multiple populations and introduce various population mutation strategies based on genetic algorithms to optimize and update the wolf pack path, thereby obtaining the globally optimal alpha wolf vector. This includes the following steps:

[0092] S3.1: Wolf pack path optimization phase, the specific process is as follows:

[0093] a) Scouting wolves: The best individual after fitness function ranking is designated as the alpha wolf. The next best L individuals are selected as scout wolves, where L should be a value of... The integers in the set are α, where α is 3. H directions are selected around each scouting wolf, and the wolf moves one step in each of these directions (the step size is denoted as step). a Search for a better position; if found, update to the better position; otherwise, maintain the existing position. The position of the scout wolf l in the h-th direction at the d-th dimension. for:

[0094]

[0095] Where h = 1, 2....H, l = 1, 2....L, d = 1, 2....D; after the scout wolf's roaming behavior ends, the scout wolf with the best fitness value is compared with the alpha wolf. If the scout wolf has a better fitness value, that is, a smaller fitness function output error value, it becomes the new alpha wolf and initiates the summoning raid behavior; otherwise, the scout wolf's roaming behavior is repeated until a new alpha wolf appears or the roaming count is reached, and then the summoning raid phase begins.

[0096] b) Summoning the Charge: After the scouts finish, the alpha wolf initiates a summoning action by howling, and then the wolves synchronously move towards the alpha wolf's position. The number of wolves is SL-1 = M, and the wolves move in steps of step length. b As the wolf rapidly approaches the alpha wolf's position, the wolf m's position in the d-th dimension of the variable space during its evolution is:

[0097]

[0098] Where m = 1, 2...SL-1, d = 1, 2....D, and gd represents the position of the alpha wolf in the d-th dimension. During the raid, if the fitness function value of the m-th wolf is better than that of the alpha wolf, then this wolf replaces the alpha wolf and becomes the new alpha wolf, and restarts the summoning raid behavior. Otherwise, the wolf continues to raid until the distance dis between it and the alpha wolf is less than the decision distance d. near Stop at this time, and then proceed with the wolf pack's encirclement and attack. near Expressed as a formula:

[0099]

[0100] in Let the d-th coordinate be the alpha wolf. The d-th dimension coordinates represent the upper and lower boundaries of the search interval, and ω is the distance determination factor with a value of 0.84;

[0101] c): Wolf Pack Attack: If the alpha wolf initiates the attack, the wolf pack assumes the prey's position in the d-th dimension variable space is G. d If we consider the alpha wolf's position as the prey's position, and the remaining S-1 artificial wolves (excluding the alpha wolf) launch a siege attack on the prey, then the positional change of the i-th wolf in the d-th dimension can be represented as:

[0102]

[0103] Where λ is a random number uniformly distributed between [-1, 1], step c This represents the attack stride length of the artificial wolf when performing a siege. During the siege, the fitness values ​​before and after a position change are compared; if the position change is better, it remains unchanged; otherwise, it returns to its original position. The wolf with the optimal fitness value is designated as the alpha wolf, where the roaming stride length is *step*. a Strike stride length b Attack step length c It satisfies the following relationship:

[0104] step a =step a / 2 = step c ×2=|UL| / B

[0105] Where B is the step size factor, which represents the fineness of the artificial wolf's search in the optimization space. In this example, the value is 1000.

[0106] S3.2: The mutation and renewal phase of the wolf pack, the specific process is as follows:

[0107] a) The optimal population size is n1, and the species remain unchanged before proceeding to the next iteration;

[0108] b) The size of the suboptimal population is n². A t-distribution mutation based on the mutation probability factor Pt is adopted. The mutation probability factor Pt is set based on an adaptive t-distribution dynamic selection strategy. The selection method for Pt is as follows:

[0109] Pt=w1-w2×(magen-iter) / magen

[0110] Where: w1 is the upper limit of mutation factor, w2 is the mutation magnitude factor, magen is the maximum number of iterations, and iter is the current iteration number. In this example, w1 = 0.6, w2 = 0.4, and magen = 10000.

[0111] Based on the aforementioned mutation probability factor Pt, a random number rand in the range [0,1] is randomly generated during each iteration update. Specifically, the t-distribution mutation based on the mutation probability factor Pt is as follows:

[0112]

[0113] in x is the d-th spatial position of individual wolf i in the wolf pack. id ×t(iter) is a random disturbance term, i = 1, 2, ..., n²;

[0114] c) The second-difference population size is n³, and random forward and backward mean-based superposition mutation is adopted, as follows:

[0115] Calculate the mean values ​​of wolf information in the best and worst populations, denoted as ave1 and ave2 respectively. Determine the random direction of the randP (taking 1 / -1) sequence. For wolf individuals in the second-worst population... Define the following mutation relationship:

[0116]

[0117] Where i = 1, 2, ..., n3;

[0118] d) The worst-case population size is n4, and the complete cover mutation method under the chaotic algorithm initialization described in S2 is adopted;

[0119] This enables the wolf population to roam, summon and attack, engage in pack attacks, and undergo mutation and renewal behaviors.

[0120] S4: Use the globally optimal alpha wolf vector as the weight matrix of the BP neural network, and validate the model using the validation sample set. If the model accuracy does not meet the accuracy requirements, return to S2 to readjust the weight matrix of the BP neural network; otherwise, proceed to S5, which includes the following steps:

[0121] After the wolf pack completes its iterative optimization, the globally optimal vector (i.e., the alpha wolf's position information) is used as the weight matrix of the final BP neural network. The weight matrix information includes the weight information of the input layer, hidden layer, and output layer of the neural network. Then, the model is validated on a validation sample set. If the root mean square error between the output of the constructed BP neural network model and the software-simulated real planting machine head position result is less than the error threshold E, it indicates that the positioning accuracy meets the requirements. The error threshold E can be set by referring to the specific implementation accuracy requirements on site. In this example, E = 0.42m is used.

[0122] S5: Output the BP neural network weight matrix to predict the dynamic three-dimensional coordinates of the planting machine head in practical applications. This includes the following steps:

[0123] Dynamically acquire the tth data of a real forest farm planting machine head. real The TDOA data of the operation at any given time is used to solve for the coarse dynamic position using the least squares + Newton iteration algorithm, and a real dynamic operation sample is established as the input. Then, the t-th position of the planting machine head can be obtained through the output of the BP neural network. real The three-dimensional real dynamic coordinates at any given moment.

[0124] In this embodiment, the traditional BP neural network, the WSP-BP neural network, and the optimized WSP-BP neural network model of this invention are used to process 10 sets of validation data. The average distance error between the prediction results and the actual values ​​under the three algorithms is shown below:

[0125] Table 1 shows the average distance error between the prediction results and the actual values ​​in the validation set for the 13 algorithms.

[0126]

[0127] The distance error refers to the difference in straight-line distance between the predicted 3D value and the actual 3D value. From this, we can obtain... Figure 4 The simulation results show a comparison of distance errors between the three algorithms. The simulation demonstrates that, compared to the traditional WSP-BP, BP, and optimized WSP-BP algorithms, the optimized WSP-BP algorithm described in this invention exhibits significantly higher and more stable positioning accuracy. Compared to the standard traditional neural network structure, it improves the network's convergence speed, reduces the system's data processing burden, overcomes the BP neural network's tendency to get trapped in local minima, and improves the accuracy of the neural network's weights, thereby enhancing the processing accuracy of regional positioning technology. Furthermore, the system itself possesses strong robustness, high resistance to noise, simple algorithm processing, high reliability, low cost, and accuracy that basically meets positioning requirements. It provides a new method for 3D positioning and has excellent application prospects.

[0128] A forestry planter positioning and tracking system based on the WSP algorithm and BP network model is disclosed. Based on the aforementioned forestry planter positioning and tracking method, the system achieves positioning and tracking of the forestry planter using the WSP algorithm and BP network model.

[0129] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it realizes the positioning and tracking of the forest planter based on the WSP algorithm and BP network model, according to the aforementioned forest planter positioning and tracking method.

[0130] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, realizes the positioning and tracking of a forest planter based on the WSP algorithm and BP network model, according to the aforementioned forest planter positioning and tracking method.

[0131] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0132] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for locating and tracking a forestry planter based on the WSP algorithm and BP network model, characterized in that: Specifically, the steps include the following: S1: Use UWB sensors to acquire TDOA data during the operation of the planting head, solve the rough dynamic position of the planting head, and construct training and validation sample sets; S2: The dynamic three-dimensional coordinates of the planting machine head are predicted using a BP neural network model. First, the number of nodes in the BP neural network model is determined based on the training sample set, i.e. the individual position dimension of the wolf pack. Then, the Tent chaos algorithm is introduced to complete the initialization of the wolf pack position and the fitness calculation is performed to determine the alpha wolf and artificial wolf in the initial situation. S3: Divide the wolf pack into multiple populations and introduce various population mutation strategies based on genetic algorithms to optimize and update the wolf pack path, thereby obtaining the globally optimal alpha wolf vector; S4: Use the globally optimal alpha wolf vector as the weight matrix of the BP neural network, and use the validation sample set to validate the model. If the model accuracy does not meet the accuracy requirements, return to S2 to readjust the weight matrix of the BP neural network; otherwise, go to S5. S5: Outputs the BP neural network weight matrix to predict the dynamic three-dimensional coordinates of the planting machine head in practical applications; in: S2: A BP neural network model is used to predict the dynamic three-dimensional coordinates of the planting machine head, where the input and output of the BP neural network are as follows: Input is: Where N is the number of UWB sensors in the forest farm. The measured location (x, y, z) during planting and operation is related to the base station n (x n ,y n ,z n The distance between them, where t is the sampling time. n=1,2,....N ; The output is the three-dimensional true coordinates (x0, y0, z0) of the planting machine head at time t. t ; First, the number of nodes in the BP neural network model, i.e., the position dimension of individual wolves, is determined based on the training sample set. Then, the Tent chaos algorithm is introduced to initialize the wolf pack positions, and fitness calculations are performed to determine the alpha wolf and artificial wolves in the initial situation. The specific method is as follows: S2.1: Based on the training sample set, determine the number of input layer nodes I=N+1 and the number of output layer nodes O=3 in the BP neural network, that is, the number of three-dimensional real position elements output. The number of hidden layer nodes is selected using empirical formulas. , where Q is the number of hidden layer nodes, I is the number of input nodes, O is the number of output nodes, and a is an integer in the range [1, 10]. The relationship between the dimension D of an individual wolf's position and the nodes at each layer is expressed as follows: ; S2.2: Set up a wolf pack of S individuals and initialize the wolf pack using the Tent chaotic algorithm. The wolf pack initialization process using the chaotic algorithm includes: a) Randomly generate a D-dimensional vector c1 within the interval [0,1]; b): The remaining S-1 normalized individuals' d-th dimension position vectors are generated iteratively using the logistic mapping. The logistic mapping formula is as follows: ; Where u is a control parameter, with a value of 4. Let i be the normalized position of an individual wolf after chaotic mapping, i=1,2...n, d=1,2...D; c): The value after chaotic mapping Mapping to the search space [L,U] of the solution, we get: ; Where i = 1, 2...n, d = 1, 2...D, L and U are the upper and lower bounds of the search space, respectively, x i It is the initial position of individual wolf i in the search space; S2.3: Construct the fitness function for the wolf pack, choosing the following: ; Where: RMSE is the root mean square error function. Let (x0, y0, z0) be the true coordinates at time t. t , The output coordinates (x, y, z) of the BP neural network are obtained by inputting the individual wolf information after iteration at time t. t A fitness function that increases from small to large indicates a gradual decrease in performance; S2.4: Determine the alpha wolf and artificial wolves (i.e., the aggressive wolf and the scout wolf) based on the wolf pack's fitness function. S3: Divide the wolf pack into multiple populations and introduce various population mutation strategies based on genetic algorithms to optimize the wolf pack path and obtain the globally optimal alpha wolf vector. The specific method is as follows: S3.1: Wolf pack path optimization phase, the specific process is as follows: a) Scouting Wolf Roaming: After obtaining information about the initial alpha wolf, select L wolf individuals with the second-best fitness to serve as scouts. L should be a value of... The integer in the set, where S is the number of individual wolves in the pack. To determine the wolf-hunting ratio factor, select H directions around each wolf and move one step in each of the H directions. The step size is denoted as step. a Search for a better location; if so, update to the better location; otherwise, keep the original location. The position of the wolf l in the h-th direction in the d-th dimension for: ; Where h = 1, 2....H, l = 1, 2....L, d = 1, 2....D; after the scout wolf's roaming behavior ends, the scout wolf with the best fitness value is compared with the alpha wolf. If the scout wolf has a better fitness value, that is, a smaller fitness function output error value, it becomes the new alpha wolf and initiates the summoning raid behavior; otherwise, the scout wolf's roaming behavior is repeated until a new alpha wolf appears or the roaming count is reached, and then the summoning raid phase begins. b) Summoning the Charge: After the scout wolves finish their roaming, the alpha wolf initiates a summoning action by howling. The wolves then synchronously move towards the alpha wolf's position. The number of wolves is SL-1=M, and the wolves move in steps of step... b As the wolf rapidly approaches the alpha wolf's position, the wolf m's position in the d-th dimension of the variable space during its evolution is: ; Where m = 1, 2...SL-1, d = 1, 2....D, g d Let be the position of the alpha wolf in the d-th dimension. During the charge, if the fitness function value of the m-th wolf is better than that of the alpha wolf, then this wolf replaces the alpha wolf and becomes the new alpha wolf, and restarts the summoning charge. Otherwise, the wolf continues to charge until the distance dis between itself and the alpha wolf is less than the decision distance d. near The wolf pack would then stop and launch a pincer attack. near Expressed as a formula: ; in Let the d-th coordinate be the alpha wolf. This represents the d-th dimension coordinate of the m-th wolf, where ω is the distance determination factor; c) Wolf Pack Attack: In the attack, the wolf pack assumes that the prey's position in the d-th dimension of the variable space is G. d If we consider the alpha wolf's position as the prey's position, and the other S-1 artificial wolves (excluding the alpha wolf) launch a siege attack on the prey, then the positional change of the i-th artificial wolf in the d-th dimension can be represented as: ; Where λ is a random number uniformly distributed between [-1, 1], step c The attack step length is defined as the attack step length of the artificial wolf i when performing a siege behavior. During the siege, the fitness values ​​before and after the position change are compared. If the position change is better, the wolf remains in the same position; otherwise, it returns to its original position. Finally, the wolf with the optimal fitness value is designated as the alpha wolf. The roaming step length is defined as step. a Strike stride length b Attack step length c The following relationship must be satisfied: ; Where B is the step size factor, representing the precision with which the artificial wolf searches in the optimization space; S3.2: The mutation and renewal phase of the wolf pack, the specific process is as follows: By incorporating the mutation and evolutionary ideas of genetic algorithms, the wolf pack is divided into four groups according to the fitness matching degree. The specific mutation and update strategies for different groups are as follows: a) The optimal group size is n1. Keep the individual position information unchanged and proceed to the next path optimization process. b) The suboptimal population size is n², and an adaptive t-distribution mutation strategy is adopted. The adaptive t-distribution mutation strategy sets a mutation probability factor Pt, and the selection method of Pt is as follows: ; Where: w1 is the upper limit factor of mutation, which determines the upper limit of the dynamic selection probability; w2 is the magnitude factor of mutation, which determines the magnitude of the change in the dynamic selection probability; magen is the maximum number of iterations; and iter is the current number of iterations. Based on the aforementioned mutation probability factor Pt, a random number rand in the range [0,1] is randomly generated during each iteration update of the suboptimal population. The specific t-distribution mutation strategy based on the mutation probability factor Pt is as follows: ; in It is the d-th spatial location of individual i in this population. These are random interference terms, i=1,2...n²; c) The size of the second-difference population is n³, and a random forward-backward mean-based superposition mutation is adopted, as follows: Calculate the mean values ​​of individual wolf information in the best and worst wolf packs, denoted as ave1 and ave4 respectively. Determine the random direction of the randP sequence. For the d-th dimension of individual wolf information in the second-worst wolf pack... Define the following mutation relationship: ; Where i = 1, 2, ..., n3; d) The worst-case population size is n4, and a complete cover mutation method is adopted under the initialization of chaotic algorithm; S3.3: This realizes the wolf scouting, summoning, wolf pack attack, and mutation update behavior of the population. Then, a maximum number of iterations is set to iterate the above process to obtain the global optimal vector, that is, the alpha wolf position information.

2. The forestry planter positioning and tracking method based on the WSP algorithm and BP network model according to claim 1, characterized in that, S1: Use UWB sensors to acquire TDOA data during the operation of the planting head, solve for the coarse dynamic position of the planting head, and construct training and validation sample sets. The specific method is as follows: First, UWB sensors are used to acquire TDOA data at time T during the operation of the planting head. Then, a three-dimensional solution algorithm is used to solve for the position and obtain the approximate position (x, y, z) of the planting head at time t. t A rough dynamic position set of the planting machine head is constructed, and after normalization, it is divided into a training sample set and a validation sample set.

3. A forestry planter positioning and tracking system based on the WSP algorithm and BP network model, characterized in that, Based on the forest planter positioning and tracking method according to any one of claims 1-2, the positioning and tracking of the forest planter is realized based on the WSP algorithm and BP network model.

4. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it realizes the positioning and tracking of the forest planter based on the WSP algorithm and BP network model according to the forest planter positioning and tracking method according to any one of claims 1-2.

5. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, it realizes the positioning and tracking of a forest farm planter based on the WSP algorithm and BP network model, according to the forest farm planter positioning and tracking method according to any one of claims 1-2.

Citation Information

Patent Citations

  • Intelligent robot positioning method and positioning system based on UWB and TDOA algorithms

    CN108810133A

  • Hybrid swarm intelligence deep learning model hyper-parameter optimization method

    CN113128653A