Target search method based on PSO-HS
By adopting the PSO-HS-based target search method in multi-objective search tasks, the problems of slow optimization speed and large energy consumption during base station updates in the existing technology are solved, and more efficient search efficiency and lower energy consumption are achieved. .
Patent Information
- Application Number
- CN202411642780.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-18
Smart Images

Figure CN119485164A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target search, and in particular to a target search method based on PSO-HS. Background Art
[0002] When dealing with search tasks for multiple targets, traditional algorithms usually use a sequential method to search for multiple targets one by one. For example, Tang et al. proposed a method to control a group robot system to search for multiple targets simultaneously. Each robot group only focuses on searching for a specific target, and the robots in each group move according to a particle swarm optimization algorithm based on a shrinkage factor, which cannot guarantee the balanced use of search resources. At the same time, the diversity of individual robots in each small group is not taken into account, which makes it easy for the sub-group to fall into a local optimum.
[0003] The patent with publication number CN115955679A proposes the MBDPSO algorithm. When the number of robots in a subgroup exceeds the average value, no robots will be assigned to the subgroup to balance the distribution of robot resources. However, this will prevent some robots suitable for searching a certain target from being assigned to the corresponding subgroup, reducing the search efficiency. At the same time, this method can achieve accurate target search by combining DSD and PSO, but the optimization speed needs to be further optimized. In addition, although this method takes into account the communication limitation of robots, the base station update method leads to high energy consumption. Summary of the invention
[0004] In view of the shortcomings of the existing method, the present invention solves the problems of slow optimization speed and high energy consumption when base station is updated in the existing CN115955679A method.
[0005] The technical solution adopted by the present invention is: a target search method based on PSO-HS comprises the following steps:
[0006] Step 1: Build a swarm robot system and set the number of search targets;
[0007] Step 2: Use PSO to update the speed and position of the robot;
[0008] Step 3: Calculate the probability of the robot responding to the search target, and use the probability of the search target to divide the group robot system into subgroups;
[0009] As a preferred embodiment of the present invention, dividing the group robot system into subgroups using the probability of searching for a target includes:
[0010] Set the response threshold p rt , through p rt and the probability p(T j R i) Compare and divide subgroups;
[0011] At each iteration, when p(T j R i ) is greater than the threshold p rt , divides the robots into subgroups that search for the target.
[0012] Step 4: Construct a random model to adjust the speed of the robot;
[0013] As a preferred embodiment of the present invention, the formula of the random model is:
[0014]
[0015] Among them, c3 is the learning coefficient, r3 is a random number in the range of [0,1]; is the average value of kbest.
[0016] Step 5: Deploy base stations and use harmony search algorithm to control the location of base stations;
[0017] As a preferred embodiment of the present invention, the harmony search algorithm includes:
[0018] Step 41, initializing HS coefficients;
[0019] Step 42, initializing the HS memory HM;
[0020] HM stores all solutions of HMV, each HMV represents the position of the unknown base station, and the length of HMV is expressed as:
[0021]
[0022] Among them, r4 is a random number in the range of [0,1]; and N b The upper and lower limits of is the number of search targets, N b is the length of the solution HMV;
[0023] Step 43: Generate new solution X new ;
[0024] Step 44: Determine X new Is it better than the worst solution in HM?
[0025] Step 45: If yes, set X new Replace with the worst solution and update HM; otherwise, regenerate a new solution X new , repeat steps 43 to 45.
[0026] As a preferred embodiment of the present invention, an evaluation function of HMV is constructed, and the formula is:
[0027] f1=||Λ||-N b +E (9)
[0028] Among them, Λ represents the set of all robots that can communicate at time t, and E is the residual energy of the base station.
[0029] As a preferred embodiment of the present invention, the new solution X new Cross-factor enhancement is performed. The cross-factor is to randomly take out several elements from a solution vector and recombine them with another solution.
[0030] Step 6: Update the speed and position of the base station and generate a new solution.
[0031] As a preferred implementation of the present invention, the formula for updating the speed and position of the base station is:
[0032]
[0033] Among them, ω1 is the inertia weight, c4 is the learning coefficient, and r5 is a random number in the range of [0,1]; and Represents base station BS i The position and velocity of the jth dimension at time t; is the average value of the j-th dimension position of all optimal robots within the communication range of the base station, t c is the time when the base station established communication last time, θ is the time interval required for communication, ||Nr i (t)|| represents the number of all robots within the communication range of the base station.
[0034] As a preferred embodiment of the present invention, a target search system based on PSO-HS includes: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a target search method based on PSO-HS.
[0035] As a preferred embodiment of the present invention, a computer readable medium stores a computer program code, and when the computer program code is executed by a processor, the target search method based on PSO-HS is implemented.
[0036] Beneficial effects of the present invention:
[0037] 1. When there is an imbalance in resource utilization among target-searching robots, a random model is used to make the subgroup division more reasonable, that is, by adjusting the positions of some robots, the swarm robot system can effectively handle multiple targets at the same time;
[0038] 2. Deploy base stations based on the HS algorithm, which can ensure the search effect while deploying fewer base stations and reduce costs;
[0039] 3. Improve the HS algorithm and design the crossover factor to improve the global optimization ability of the HS algorithm;
[0040] 4. The switch item set in the base station update mode can make the base station move to the average position of all the most valuable robots within the communication range of the base station only when communication is needed, which can reduce the mobile energy consumption of the base station while satisfying the search effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of a target search method based on PSO-HS of the present invention;
[0042] Figure 2 is a flow chart of robot subgroup division of the present invention;
[0043] Figure 3 is a flow chart of the harmony search algorithm of the present invention;
[0044] Figure 4 It is a graph showing the error variation of the number of iterations when the IHSPSO algorithm of the present invention searches for three targets;
[0045] Figure 5 It is a graph showing the error variation of the number of iterations when the IHSPSO algorithm of the present invention searches for five targets;
[0046] Figure 6 It is a graph showing the error variation of the number of iterations when the IHSPSO algorithm of the present invention searches for 10 targets;
[0047] Figure 7 It is a comparison diagram of the base station residual energy of the IHSPSO algorithm of the present invention and the MBDPSO algorithm. DETAILED DESCRIPTION
[0048] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0049] like Figure 1 As shown, a target search method based on PSO-HS includes the following steps:
[0050] Step 1: Build a swarm robot system and set the number of search targets;
[0051] Initialize the robot and search target parameters. For example, a swarm robot system is composed of 60 robots. The number of search targets can be set to 1, 3, 5, 10, etc.
[0052] Step 2: Use PSO to update the speed and position of the robot;
[0053] The robot individuals are regarded as particles in the PSO algorithm. Based on the i-th particle (robot R i )’s speed and position update formula are as follows:
[0054]
[0055] Where ω is the inertia weight, For robot R i The best historical position, kbest is the best position known after communication; V i and X i They are robot R i The velocity and position vectors, c1 and c2 are learning coefficients; r1 and r2 are random numbers in the range [0,1]; and are the upper and lower limits of the particle velocity in the jth dimension respectively; and are the upper and lower limits of the particle position in the jth dimension; t is the number of iterations, i is the i-th robot, and j is the dimension index.
[0056] Step 3: Calculate the probability of the robot responding to the search target, and use the probability of the search target to divide the group robot system into subgroups;
[0057] Computing Robot R i Able to respond to target T j The probability calculation method is as follows:
[0058]
[0059] Among them, I(T j R i ) is the robot R i Able to detect target T j The strength of the signal, n d Indicates robot R i The number of targets that can be detected, the response threshold p rt Used to determine the target that each robot will search for.
[0060] Response threshold p rt It is a custom parameter based on the number of robots and the size of the search range. rt and p(T j R i ) compares and divides the subgroups; in each iteration, based on the probability p(T j R i ), when p(Tj R i ) is greater than the threshold p rt , group the robots; for example: p(T j R i )>p rt , then the robot R i Divide into search target T j in the subgroup of .
[0061] like Figure 2 ,Step 4, construct a random model to adjust the speed of the robot;
[0062] In order to effectively handle multiple targets simultaneously during the search process, all robots are dynamically divided into several robot sub-groups. Once the robot grouping is completed, each robot sub-group will search for the target independently;
[0063] When it is detected that there are too many robots in a subgroup and the robot resources occupied are greater than the average, the position of the robots in the subgroup is adjusted, that is, the position is adjusted by the speed of the entire robot;
[0064] The present invention uses a random model to adjust the position of the robot, and the formula of the random model is:
[0065]
[0066] Among them, c3 is the learning coefficient, r3 is a random number in the range of [0,1]; is the average value of kbest.
[0067] When the number of robots in a subgroup exceeds the average value, the speed of the robots is adjusted based on formulas (6) and (7) to intervene.
[0068] Using formula (6) to solve the By updating, random disturbances can be added to the existing position to generate a new position. On the basis of making full use of the original position, the robot resources can be balanced. In formula (6), the robot speed update is based on the average value of the optimal position it has obtained. The update factor is not limited to a specific target. No matter which subgroup it is assigned to in the next iteration, it can improve the search efficiency for the target.
[0069] like Figure 3 ,Step 5: Deploy base stations and use the Harmony Search (HS) algorithm to control the location of base stations;
[0070] The construction of the HS algorithm includes:
[0071] Step 41, initializing HS coefficients; including: the size of the harmony memory bank, the probability of memory bank value (HMCR), the probability of pitch fine-tuning, the pitch fine-tuning bandwidth (BW) and the number of creations;
[0072] Step 42, initializing the HS memory HM;
[0073] HM stores all solutions of HMV, where HMV represents the location of the base station; each HMV represents the location of the unknown base station, and the length of HMV is expressed as:
[0074]
[0075] Among them, r4 is a random number in the range of [0,1]; and N b In this embodiment, is 2, is the number of search targets, N b is the length of the solution HMV;
[0076] Step 43: Generate new solution X new ;
[0077] Step 44: Determine X new Is it better than the worst solution in HM?
[0078] Step 45: If yes, set X new Replace with the worst solution and update HM; otherwise, regenerate a new solution X new , repeat steps 43 to 45.
[0079] The HMV evaluation function is constructed as follows:
[0080] f1=||Λ||-N b +E (9)
[0081] Among them, Λ represents the set of all robots that can communicate at time t, and E is the residual energy of the base station.
[0082] The introduction of E is to enhance communication capabilities and reduce energy consumption, such as Figure 7 It can be seen that the energy consumption of the method of the present invention is significantly reduced.
[0083] In step 43 of the HS algorithm, the crossover factor is introduced to improve the global optimization ability of the HS algorithm;
[0084] The cross factor generation includes: there are two HMVs in HM, namely (x1, y1, x2, y2, x3, y3, x4, y4, x5, y5) and (x6, y6, x7, y7, x8, y8, x9, y9, x 10 ,y10 )After adding the cross factor, a new solution (x1,y1,x7,y7,x3,y3,x9,y9,x5,y5) can be generated, that is, several elements are randomly taken out from a solution vector and recombined with another solution vector; this can enable HS to enhance the diversity of solutions and the ability of exploration and search and avoid falling into local optimality.
[0085] Since the HS search algorithm often lacks diversity of solutions and falls into the local optimal solution, the cross factor is used to avoid falling into the local optimal solution.
[0086] Step 6: Update the speed and position of the base station and generate a new solution;
[0087] The kbest in the robot's position update is largely based on the optimal information transmission of the base station; except for the first iteration, in each subsequent iteration, in order to make the base station's position keep up with the robot's update status, ensure enhanced communication and improve search efficiency, the base station's speed and position need to be updated.
[0088] In each iteration, in order to ensure the search efficiency, the speed and position of the base station need to be updated; the base station BS i The speed and position update method is as follows:
[0089]
[0090] Among them, ω1 is the inertia weight, c4 is the learning coefficient, and r5 is a random number in the range of [0,1]; and Represents base station BS i The position and velocity of the jth dimension at time t; is the average value of the j-th dimension positions of all optimal robots within the communication range of the base station, t c is the time when the base station established communication last time, θ is the time interval required for communication, ||Nr i (t)|| represents the number of all robots within the communication range of the base station.
[0091] When the termination condition is met, the subgroup division ends; otherwise, return to step 3 for iteration.
[0092] Table 1 lists the target search time comparison between the IHSPSO model of the present invention and PSO, DPSO, CDPSO, PDPSO, IGES, IGS and MBDPSO under different target numbers; MBDPSO is a distributed particle swarm optimization algorithm based on a mobile base station in the CN115955679A patent, and the time units in Table 1 are all seconds.
[0093] Table 1 Comparison of optimization speed between the present invention and the existing model
[0094]
[0095] like Figure 4-6 This is a trend diagram of the search error corresponding to the number of iterations when searching for different targets of the IHSPSO model of the present invention. From the figure, when the number of iterations is shorter, the search error decreases rapidly, indicating the effectiveness of the model of the present invention.
[0096] The present invention utilizes a random model to make subgroup division more reasonable; utilizes the HS algorithm to deploy base stations, deploys a smaller number of base stations while ensuring the search effect; designs a cross factor to improve the global optimization capability of the HS algorithm; and sets a switch item in the base station update method to reduce the energy consumption of the base station.
[0097] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A target search method based on PSO-HS, characterized in that: The following steps are involved: Step 1: Build a swarm robot system and set the number of search targets; Step 2: Use PSO to update the speed and position of the robot; Step 3: Calculate the probability of the robot responding to the search target, and use the probability of the search target to divide the group robot system into subgroups; Step 4: Construct a random model to adjust the speed of the robot; Step 5: Deploy base stations and use harmony search algorithm to control the location of base stations; Step 6: Update the speed and position of the base station and generate a new solution.
2. The target search method based on PSO-HS according to claim 1, characterized in that: The formula for the stochastic model is: Among them, c3 is the learning coefficient, r3 is a random number in the range of [0,1]; is the average value of kbest.
3. The target search method based on PSO-HS according to claim 1, characterized in that: The harmony search algorithm includes: Step 41, initializing HS coefficients; Step 42, initializing the HS memory HM; HM stores all solutions of HMV, each HMV represents the position of the unknown base station, and the length of HMV is expressed as: Among them, r4 is a random number in the range of [0,1]; and N b The upper and lower limits of is the number of search targets, N b is the length of the solution HMV; Step 43: Generate new solution X new ; Step 44: Determine X new Is it better than the worst solution in HM? Step 45: If yes, set X new Replace with the worst solution and update HM; otherwise, regenerate a new solution X new , repeat steps 43 to 45.
4. The target search method based on PSO-HS according to claim 3, characterized in that: Construct the HMV evaluation function, the formula is: f1=||Λ||-N b +E (9) Among them, Λ represents the set of all communicating robots at time t, and E is the residual energy of the base station.
5. The target search method based on PSO-HS according to claim 3, characterized in that: New Solution X new Cross-factor enhancement is performed. The cross-factor is to randomly take out several elements from a solution vector and recombine them with another solution.
6. The target search method based on PSO-HS according to claim 1, characterized in that: The formula for updating the speed and position of the base station is: Among them, ω1 is the inertia weight, c4 is the learning coefficient, and r5 is a random number in the range of [0,1]; and Represents base station BS i The position and velocity of the jth dimension at time t; is the average value of the j-th dimension position of all optimal robots within the communication range of the base station, t c is the time when the base station established communication last time, θ is the time interval required for communication, ||Nr i (t)|| represents the number of all robots within the communication range of the base station.
7. The target search method based on PSO-HS according to claim 1, characterized in that: Using the probability of searching for a target to divide a swarm robot system into subgroups includes: Set the response threshold p rt , through p rt and the probability p(T j R i ) compares the subgroups; when p(T j R i ) is greater than the threshold p rt , divides the robots into subgroups that search for the target.
8. The target search system based on PSO-HS is characterized by: include: a memory for storing instructions executable by a processor; A processor, configured to execute instructions to implement the target search method based on PSO-HS as described in any one of claims 1 to 7.
9. A computer readable medium storing a computer program code, characterized in that: When the computer program code is executed by a processor, the computer program code implements the target search method based on PSO-HS as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Distributed particle swarm optimization algorithm based on mobile base station
CN115955679A