A three-dimensional space gas leakage source positioning method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-08
- Publication Date
- 2026-08-11
AI Technical Summary
[0005]针对现有技术的不足,本发明所要解决的技术问题是:提供一种三维空间气体泄漏源定位方法,该方法针对三维空间中计算量增大、以较小的计算资源增加解空间的搜索精度以及对于粒子的不确定性进行处理,使用基于信息熵的粒子滤波鲸群优化算法,利用带扰动项的鲸鱼算法控制引导粒子运动扩大搜索精度,能够更快速准确的搜索,克服了现有搜索算法缺少三维搜索,计算量大,算法易陷入局部极值,搜寻精度低的问题
[0043] Compared with the prior art, the beneficial effects of the present invention are: it improves the accuracy and precision of gas source positioning, and is more adaptable to gas environments with discontinuous and sparse concentration changes in three-dimensional space.
Smart Images

Figure CN117456137B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of active olfaction technology for robots, and is applicable to the application of locating gas leak sources in three-dimensional confined spaces. Specifically, it relates to a method for locating gas leak sources in three-dimensional space, which uses a particle filter whale swarm optimization algorithm based on information entropy to achieve the location of gas leak sources in three-dimensional space. Background Technology
[0002] With industrial development and technological advancements, leaks and diffusion of flammable, explosive, and toxic gases caused by natural or man-made factors pose significant safety hazards to industrial production and daily life. Therefore, the ability to quickly and accurately locate and address leak sources is crucial in both industrial production and daily life. Currently, there are few active olfactory methods for robots in three-dimensional space. Given the dramatic increase in computational complexity in three-dimensional space, optimizing algorithm selection, solution space search, and handling uncertainties are paramount.
[0003] For example, Michael et al., in their paper "Information-Based Search for an Atmospheric Release Using a Mobile Robot: Algorithm and Experiments," used an information entropy-based particle filtering algorithm. This algorithm calculates the posterior probability of particles and uses a reward function to find the grid location where the gas leak source is most likely to exist. The problem with this method is that it is limited to two-dimensional spatial search and involves many iterative steps before particle convergence, leading to the robot repeatedly searching for the same location. CN106444827A discloses a spatially stimuli-driven gas tracking algorithm, which is a blind search algorithm and suffers from low robot search efficiency and long search time.
[0004] Therefore, a method for accurate short-time gas source leakage location in three-dimensional space is urgently needed. Summary of the Invention
[0005] To address the shortcomings of existing technologies, the technical problem this invention aims to solve is to provide a three-dimensional spatial gas leak source localization method. This method addresses the increased computational load in three-dimensional space, improves the search accuracy of the solution space with relatively small computational resources, and handles the uncertainty of particles. It employs a particle filtering whale swarm optimization algorithm based on information entropy, and utilizes a whale algorithm with perturbation terms to control and guide particle movement to expand search accuracy. This method enables faster and more accurate searching, overcoming the problems of existing search algorithms, such as lack of three-dimensional search, large computational load, susceptibility to local extrema, and low search accuracy.
[0006] The technical solution adopted by this invention to solve this technical problem is:
[0007] A three-dimensional spatial gas leak source localization method first uses a zigzag search method during the plume detection phase. After plume detection, an information entropy-based particle filter swarm optimization algorithm is used for plume tracking to locate the estimated gas source. Finally, a method for calculating mass flux is used to confirm the false source and verify the actual location of the gas source. The specific process of the information entropy-based particle filter swarm optimization algorithm is as follows:
[0008] 2-1. First, initialize the particle swarm. The number of particles in the particle swarm is N. Set the maximum number of iterations. Divide the three-dimensional search space into several cubic grids according to the size of the three-dimensional search space. Randomly generate particle positions within the three-dimensional search space or around the robot. Initialize the particle weights and probabilities to be the reciprocals of the number of particles. Calculate the sum of the information entropy of all particles in each grid. Move the robot towards the center of the grid with the largest sum of information entropy.
[0009] 2-2. The sensor model simulates the actual gas concentration measured at the robot's position, and the robot reads the gas concentration reading at the corresponding position of the sensor model as the actual gas concentration;
[0010] A three-dimensional gas turbulence model is used to calculate the estimated gas concentration at the robot's location, with the particle position as the gas source; the particle weight is obtained by subtracting the estimated gas concentration from the actual gas concentration and then normalizing it.
[0011] Each particle is treated as a gas release source. Based on the estimated gas concentration at the robot's location and the obtained normalized particle weight, the particle probability is obtained and then normalized.
[0012] 2-3. Using the normalized particle probabilities from step 2-2, calculate the sum of the Shannon information entropy of all particles falling into each grid. Move the robot towards the center of the grid with the largest sum of information entropy. The robot moves in six directions: forward, backward, left, right, up, and down.
[0013] 2-4 Importance Sampling: After moving the robot towards the center of the grid with the maximum sum of information entropy in step 2-3, sequential importance sampling is used to sample the particle swarm.
[0014] 2-5. Resampling: Set an effective particle count threshold and resample the particles that are missing after importance sampling. Use the effective particle count Neff to characterize the degree of particle degradation. When Neff is less than the set effective particle count threshold, the sampled particles need to be resampled; if Neff is not less than the set effective particle count threshold, no resampling is performed, and proceed to step 2-6.
[0015] 2-6. Use a whale swarm optimization algorithm with perturbation terms to control the movement of the particle swarm:
[0016] All particles in the particle swarm are considered as a pod of whales, and the particle with the highest historical position probability is considered as the alpha whale. The movement mode of each whale in the pod is determined based on the normalized particle probability, which is divided into three movement modes: surrounding prey, spiral search, and random search. If the normalized particle probability is greater than or equal to the reciprocal of the total number of particles, it is the surrounding prey movement mode; if it is less than the reciprocal of the total number of particles, it is one of the other two movement modes. The position of the alpha whale is randomly perturbed.
[0017] Before each iteration of the particle filter, the particles are sorted in ascending order according to their probability. All sorted particles are then divided into three parts, and the average value of each part is calculated, denoted as W. av1 W av2 and W av3 W av1 <W av2 <W av3 Then, the normalized particle probability at each particle's position is read and compared with W. av1 W av2 and W av3 The comparison can be divided into the following four cases:
[0018] Case 1: The probability of the j-th particle at time t If the probability interval is [0, W], av1 If the position perturbation term of the head whale is taken as a random number within wt∈(0.3, 0.6) or wt∈(1.3, 1.6), there is a 50% probability of it falling into either of these two intervals;
[0019] The second scenario: The perturbation term for the head whale's position is taken as a random number within the range (0.6, 1.3);
[0020] The third scenario: The perturbation term for the head whale's position is taken as a random number within the range (0.8, 1.2);
[0021] The fourth scenario: Then wt = 1, and no further perturbation is needed;
[0022] Based on the probability of the j-th particle at time t The probability interval is set with a head whale position perturbation term as described above. The whale optimization algorithm is executed based on the set head whale position perturbation term, and the particle position after the position is moved is output.
[0023] 2-7. After moving the particle in step 2-6, perform the next iteration and repeat steps 2-2 to 2-6. As the maximum distance between particles decreases during iteration, convergence is considered when the maximum distance between particles is less than 2m for three consecutive iterations, or when the maximum number of iterations is reached. After convergence, return the head whale position as the estimated source position. If the distance is not less than 2m and the maximum number of iterations has not been reached, it is considered non-converged, and return to step 2-1.
[0024] The three-dimensional gas turbulence model is expressed by formula (1):
[0025]
[0026]
[0027] Where Q is the gas release rate from the gas source, and K is the gas diffusion rate, taken as 0.6 m / s. 2 , r is the distance between the gas release source and the robot's position, y s Let y be the particle's Y-coordinate. r Let λ be the robot's Y-coordinate, λ be an intermediate quantity, and its expression is shown in equation (2); τ be the gas particle lifetime, v be the wind speed, and C be the estimated gas concentration.
[0028] Particle weight Represented as formula (3):
[0029]
[0030] in, This represents the weight of the i-th particle after normalization at the previous time step. The expected concentration of the i-th particle at time k is obtained by formula (1); The actual gas concentration measured by the robot at time k;
[0031] right Perform normalization to obtain the normalized particle weight of the i-th particle at time k.
[0032] The probability of obtaining the particle's position according to formula (4) is:
[0033]
[0034] Among them, Γ s,k z represents the state vector estimate of the source vector at time k. 1:k ={z1, ..., z k} represents the observations collected up to time k;
[0035] The particle probabilities are then normalized.
[0036] The plume detection method employs a zigzag search approach. A plume detection concentration threshold is set, and a zigzag search is performed within a horizontal plane at a certain height. When the measured concentration exceeds the plume detection concentration threshold, a plume is considered detected, and the plume tracking phase begins. The robot's position and the gas concentration at that position are then returned. If the measured gas concentration consistently fails to reach the plume detection concentration threshold, and the number of collisions with walls exceeds 20, the plane is considered to be free of plumes, and the search continues with the height increased by 0.5m. If the search exceeds the three-dimensional search space, the search is considered to have failed to find a plume and the search is stopped.
[0037] The process of identifying the false source is as follows: A mass flux threshold is set. Once the particle swarm convergence is confirmed, the robot moves to the optimal particle position and advances 1m in each of the six directions of the grid. The mass flux of the gas concentration in each of the six directions of the grid is then measured and calculated.
[0038]
[0039] Where V represents the volume of the j-th grid, and ρ represents the gas density. S represents the velocity vector, C represents the gas flow cross-sectional area, and S represents the gas concentration. Represents the Hamiltonian operator; Indicates mass flux; For spatial integrals;
[0040] The cross-sectional area of the gas flow is taken as the grid area. If the sum of the absolute values of the mass flux in the six directions of the grid measured by the robot is greater than or equal to the mass flux threshold, the robot is considered to have found the gas source and returns to the gas source location. If it is less than the mass flux threshold, the particle swarm is re-initialized and the plume tracking is repeated using the particle filter whale swarm optimization algorithm based on information entropy.
[0041] The quality throughput threshold is 0.03.
[0042] The side length of the cubic mesh is 1m; the step length of the robot is 0.2m; the number of samples for importance sampling is 80% of the total number of particles; and the effective particle count threshold is 50% of the total number of particles.
[0043] Compared with the prior art, the beneficial effects of the present invention are: it improves the accuracy and precision of gas source positioning, and is more adaptable to gas environments with discontinuous and sparse concentration changes in three-dimensional space.
[0044] The key features of this invention are: combining the particle filtering algorithm with the whale swarm optimization algorithm to locate the gas source more accurately with less computation; proposing a random inertial perturbation term to increase search accuracy while avoiding local optima; and using a method for calculating particle weights and probabilities that is adaptable to sparse gas environments.
[0045] This invention uses a whale swarm algorithm with perturbation to guide the particle position in the particle filtering algorithm. In the step of updating the particle swarm position, the whale swarm algorithm with perturbation is used to control the movement of the particle swarm instead of simply calculating the random particle velocity. The particle swarm with retained particle weights is regarded as a whale swarm. When calculating the positions of other whales except the position of the head whale, the position of the head whale is multiplied by a random inertial perturbation coefficient. This increases the search accuracy while avoiding local optima problems. Controlling the particle movement can have stronger global search capabilities and faster convergence.
[0046] The significant advancements of this invention are as follows:
[0047] (1) The method of the present invention uses the sum of the information entropy of the particles falling into each grid as the direction of robot movement, avoiding the use of complex reward functions, which can effectively reduce the uncertainty of particle probability in three-dimensional space and improve search accuracy.
[0048] (2) This invention uses a whale swarm algorithm with perturbation term to control the movement of the particle swarm, which is used as the movement mode of the particle swarm in particle filtering, increases the search accuracy in three-dimensional space, improves the convergence and convergence speed of the algorithm, helps to solve the problems of large computational load and many iterations in three-dimensional space, avoids the algorithm from falling into the particle poverty problem, and enriches the diversity of particles in three-dimensional space.
[0049] This invention selects random inertial perturbation, and by judging whether the particle weight falls into the interval, assigns random values to different intervals, and then multiplies them with the particle coordinates. This can improve the search accuracy and speed up convergence, avoiding the problem of slow convergence speed caused by multiplying the perturbation amplitude with a random number selected by the standard normal distribution as the perturbation term in the prior art. Attached Figure Description
[0050] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0051] Figure 1 This is a flowchart illustrating the method of the present invention.
[0052] Figure 2 This is a gas diffusion model (three-dimensional gas turbulence model) simulated by the CFD software Fluent.
[0053] Figure 3 This refers to the robot's motion trajectory using a zigzag search method within the z=1.5m plane during the feather flow detection phase.
[0054] Figures 4 to 9Examples of robot trajectory and particle distribution diagrams are provided for the robot's movement 0, 3, 6, 12, 21 and 37 forward movements during the process from discovering the plume to locating the gas source. The algorithm converges at the 21st movement and the robot successfully locates the gas source at the 37th movement. Blue dots represent particle positions, black dots represent the robot's historical positions, and adjacent robot historical positions are connected by red lines. The number of particles is 300. Detailed Implementation
[0055] The present invention will be further explained below with reference to the embodiments and accompanying drawings, but this is not intended to limit the scope of protection of this application.
[0056] Figure 1 The illustrated embodiment shows that the process of the three-dimensional spatial gas leak source localization method of the present invention is as follows:
[0057] 1. Use a zigzag search method to detect plumes → 2. Initialize the particle swarm and divide the search space into grids → 3. Input gas concentration from the sensor model, use a 3D gas turbulence model to calculate the concentration at the robot's location, and calculate particle probabilities and particle weights → 4. Calculate the information entropy of each grid based on the particle weights and move the robot towards the grid with the highest information entropy → 5. Perform importance sampling and resampling on the particle swarm → 6. Use a whale algorithm with perturbation terms to control the movement of the particle swarm and move its position → 7. Determine if the particle swarm has converged → 8. If converged, calculate the mass flux at the estimated source location, use the mass flux to confirm the pseudo-source, and output the gas source location if it is a real gas source; otherwise, return to continue initializing the particle swarm and dividing the search space into grids; if the particle swarm has not converged, return to estimate the particle weights again.
[0058] This invention provides a three-dimensional spatial gas leak source localization method. First, a zigzag search method is used to discover the plume. Second, a particle filter swarm optimization algorithm based on information entropy is used to track the plume and locate the estimated gas source. Finally, a method for calculating mass flux is used to confirm the false source and verify the actual location of the gas source. The specific steps are as follows:
[0059] Step 1, Feather Stream Discovery Phase
[0060] Using a zigzag search method, a plume detection concentration threshold is set. First, a zigzag search is performed within a horizontal plane at a certain height. When the measured concentration is greater than the plume detection concentration threshold, a plume is considered to have been detected, and the plume tracking phase begins. The robot's position and the gas concentration at that position are then returned. If the measured gas concentration never reaches the plume detection concentration threshold, and the number of collisions with walls exceeds 20, it is considered that there is no plume on that plane. The height is increased by 0.5m to continue the search. If the search exceeds the three-dimensional search space, it is considered that no plume has been found and the search stops.
[0061] Step 2, Feather Tracking Phase
[0062] The feather tracking is performed using a particle filter whale swarm optimization algorithm based on information entropy. The specific process of the particle filter whale swarm optimization algorithm based on information entropy is as follows:
[0063] 2-1. First, initialize the particle swarm N and the maximum number of iterations. Divide the three-dimensional search space into several cubic grids with a side length of 1m according to the size of the three-dimensional search space. Randomly generate particle positions within the three-dimensional search space or within a certain range around the robot. Initialize the particle weights and probabilities to be the reciprocals of the number of particles. Move the robot towards the center of the grid with the maximum sum of information entropy.
[0064] 2-2. The actual gas concentration measured at the robot's position using the sensor model is given by CFD simulation data. The robot reads the gas concentration reading at the corresponding position of the sensor model as the actual gas concentration.
[0065] The three-dimensional gas turbulence model is used to calculate the estimated gas concentration at the robot's location using the particle position as the gas source, and is expressed as formula (1):
[0066]
[0067]
[0068] Where Q is the gas release rate from the gas source, and K is the gas diffusion rate, taken as 0.6 m / s. 2 , r is the distance between the gas release source and the robot's position, y s Let y be the particle's Y-coordinate. r Let λ be the robot's Y-coordinate, λ be an intermediate quantity, and the expression is as shown in equation (2). τ is the gas particle lifetime of 500s, and v is the wind speed of 3m / s.
[0069] Based on the three-dimensional gas turbulence model, the estimated gas concentration of the robot position is calculated with the particle position as the gas source. The particle weight is obtained by subtracting the estimated gas concentration from the actual gas concentration (Formula (3)). The larger the weight, that is, the smaller the difference, the closer the particle position is to the actual gas source position.
[0070] Particle weight Represented as formula (3):
[0071]
[0072] in, This represents the weight of the i-th particle after normalization at the previous time step. This represents the expected concentration of the i-th particle at time k (i.e., obtained from formula (1)). The actual gas concentration measured by the robot at time k;
[0073] right Perform normalization to obtain the normalized particle weight of the i-th particle at time k.
[0074] Each particle is considered as a gas release source. The estimated gas concentration C(r) at the robot's location is calculated according to equation (1). Then, based on the normalized particle weights, the location of the particle is the gas source location according to equation (4). The particle probability is expressed as:
[0075]
[0076] Where Γ s,k z represents the state vector estimate of the source vector at time k. 1:k ={z1, ..., z k} represents the observations collected up to time k. This represents the normalized particle weight of particle i at time k.
[0077] The particle probabilities are then normalized.
[0078] 2-3. Calculate the sum of Shannon information entropy of all particles falling into each grid using the normalized particle probabilities. Move the robot towards the center of the grid with the largest sum of information entropy. The robot moves in six directions: forward, backward, left, right, up, and down, with a step size of 0.2m.
[0079] 2-4. Importance Sampling: After moving the robot towards the center of the grid with the maximum sum of information entropy in step 2-3, sequential importance sampling is used to sample the particle swarm, as shown in equation (5):
[0080]
[0081] in This represents the new sample after sorting the i-th particle at time k, with the subscript q indicating the sorted order; SIS stands for Sequential Importance Sampling, which can be derived from the importance distribution. Obtained from;
[0082] The number of samples for importance sampling is 80% of the total number of particles. After importance sampling, the total number of particles is reduced. The reduced number of particles is made up by resampling. The made-up particles are initialized, the positions of the made-up particles are randomly generated, and the reciprocal of the total number of particles is assigned as the probability and weight.
[0083] 2-5. Resampling: Set an effective particle number threshold, and resample the particles that are missing after importance sampling. Use the effective particle number Neff to characterize the degree of particle degradation. This value is only related to the particle weight, and the expression is shown in equation (6):
[0084]
[0085] When Neff is less than the set effective particle count threshold, the sampled particles need to be resampled. The basic idea of resampling is to keep the total number of particles unchanged, copy particles with high weights, discard particles with very low weights, and replace particles with low weights with copied particles with high weights. The number of particles removed by importance sampling is replenished through resampling, and the replenished particles (i.e., the copied particles with high weights) are reinitialized, that is, the positions of the copied particles with high weights are randomly generated, and assigned the reciprocal of the total number of particles as the probability and weight. The effective particle count threshold is generally set to 30% to 50% of the total number of particles.
[0086] If Neff is not less than the set effective particle number threshold, then no resampling is performed, and proceed to steps 2-6;
[0087] 2-6. Use a whale swarm optimization algorithm with perturbation terms to control the movement of the particle swarm:
[0088] All particles in the particle swarm obtained in steps 2-5 are considered as whales. The particle with the highest historical position probability (which changes as the number of iterations increases) is considered the alpha whale. The movement mode of each whale in the swarm is determined based on the normalized particle probability, which is divided into three movement modes: surrounding prey, spiral search, and random search. If the normalized particle probability is greater than or equal to the reciprocal of the total number of particles, it is the surrounding prey movement mode; if it is less than the reciprocal of the total number of particles, it is one of the other two movement modes. Random inertial perturbation is applied to the position of the alpha whale to improve the search accuracy.
[0089] Before each iteration of the particle filter, the particles are sorted in ascending order according to their probability. All sorted particles are then divided into three parts, and the average value of each part is calculated, denoted as W. av1 W av2 and W av3 (W av1 <W av2 <W av3 Then, read the normalized particle probability at each particle's position and compare it with W. av1 W av2 and W av3 The comparison can be divided into the following four cases:
[0090] First scenario: That is, the probability of the j-th particle at time t, if its probability interval is [0, W]. av1 If the position perturbation term of the head whale is taken as a random number within wt∈(0.3, 0.6) or wt∈(1.3, 1.6), there is a 50% probability of it falling into these two intervals, which can expand the search range;
[0091] The second scenario: The perturbation term for the head whale's position is taken as a random number within (0.6, 1.3) to avoid getting trapped in local extrema.
[0092] The third scenario: The perturbation term for the head whale's position is taken as a random number within (0.8, 1.2) for a more detailed search;
[0093] The fourth scenario: Then wt = 1, at which point the particle's adaptability is good, and no further perturbation is needed;
[0094] Based on the probability of the j-th particle at time t The probability interval is set with a head whale position perturbation term as described above. The whale optimization algorithm is then executed based on the set head whale position perturbation term, and the particle position after the position is moved is output.
[0095] 2-7. After moving the particle in step 2-6, perform the next iteration and repeat steps 2-2 to 2-6. As the maximum distance between particles decreases during iteration, convergence is considered when the maximum distance between particles is less than 2m for three consecutive iterations, or when the maximum number of iterations is reached. After convergence, return to the head whale position as the estimated source position and proceed to step 3. If the distance is not less than 2m and the maximum number of iterations has not been reached, convergence is considered to have failed, and return to step 2-1.
[0096] Step 3: Source Confirmation Phase
[0097] Set a mass flux threshold. Once the particle swarm convergence is determined, the robot moves to the optimal particle position and advances 0.5m in each of the six directions of the grid. The mass flux expression for measuring and calculating the gas concentration in the six directions of the grid is shown in Equation (7):
[0098]
[0099] Where V represents the volume of the j-th grid, and ρ represents the gas density. S represents the velocity vector, C represents the gas flow cross-sectional area, and S represents the gas concentration. Represents the Hamiltonian operator; Indicates mass flux; This is the symbol for spatial integrals.
[0100] The cross-sectional area of the gas flow is taken as the grid area. If the sum of the absolute values of the mass flux in the six directions of the grid measured by the robot is greater than or equal to the mass flux threshold, the robot is considered to have found the gas source and returns to the gas source location. If it is less than the mass flux threshold, the particle swarm is re-initialized and step 2 is repeated for plume tracking.
[0101] If the particle swarm fails to converge or the gas source is a spurious source during the plume tracing and source confirmation phases, the particle swarm is re-initialized and the plume tracing phase is repeated.
[0102] Example 1
[0103] In this embodiment, the three-dimensional spatial gas leak source localization method uses a robot to measure concentrations simulated by Fluent. The alcohol gas release source is located at (8.6m, 4.5m, 0.8m). Figure 2 As shown. The specific steps are as follows:
[0104] Step 1, Feather Stream Discovery Phase
[0105] Using a zigzag search method, the robot first performs a zigzag search within a horizontal plane at a height h = 1.0m. When the measured concentration exceeds the plume detection threshold, a plume is considered detected, and the search enters the plume tracking phase. If the gas concentration never reaches the plume detection threshold and the number of collisions with walls exceeds 20, the plane is considered to have no plume, and the search continues at a height increased by 0.5m. If the search exceeds the three-dimensional search space, the search is considered to have failed and the search stops. Assuming the robot's initial position is (9m, 15m, 1.5m), the zigzag search method returns the plume location found by the robot as (4.80m, 7.77m, 2m). The robot's trajectory is as follows: Figure 3 As shown.
[0106] Step 2, Initialization. The 3D search space is initialized with 10*20*5 search grids. Particle positions are randomly generated. Particle weights are calculated and the reciprocal of the number of particles is defined as the probability. Particle positions are randomly generated in the first half of the 3D search space, which is the upwind position.
[0107] Step 3: Export the CFD simulation data from the sensor model using Fluent software, such as... Figure 3 As shown, the robot reads the gas concentration reading at the corresponding location as the actual gas concentration, which is the measured data. The three-dimensional gas turbulence model is represented by the following formula:
[0108]
[0109]
[0110] Where Q is the gas release rate from the gas source, and K is the gas diffusion rate, taken as 0.6 m / s. 2 , r is the distance between the gas release source and the robot's position, y s Let y be the particle's Y-coordinate. r Let λ be the robot's Y-coordinate, λ be an intermediate quantity, and the expression is as shown in equation (2). τ is the gas particle lifetime of 500s, and v is the wind speed of 3m / s.
[0111] Treating each particle as a gas release source, the gas concentration at the robot's location is calculated according to equation (1), and then the particle weights are determined. Represented as formula (3):
[0112]
[0113] in, This represents the weight of the i-th particle after normalization at the previous time step. This represents the expected concentration of the i-th particle at time k (i.e., obtained from formula (1)). The actual gas concentration measured by the robot at time k;
[0114] right Perform normalization to obtain the normalized particle weight of the i-th particle at time k.
[0115] The probability that the location of each particle is the location of the gas source is expressed as:
[0116]
[0117] Where Γ s,k z represents the state vector estimate of the source vector at time k. 1:k ={z1, ..., z k} represents the observations collected up to time k. The particle weight represents the normalized particle i (there are N particles in total) at time k, and then the particle probability is normalized.
[0118] Step 4: Calculate the sum of Shannon information entropy for all particles falling into each grid, and move the robot towards the center of the grid with the largest information entropy. The robot moves in six directions: forward, backward, left, right, up, and down.
[0119] Step 5, Importance Sampling: Sequential importance sampling is used for importance sampling, as shown in Equation 5:
[0120]
[0121] in This represents the new sample after sorting the i-th particle at time k, with the subscript q indicating the sorted order; SIS stands for Sequential Importance Sampling, which can be derived from the importance distribution. Obtained from;
[0122] The number of samples for importance sampling is 80% of the total number of particles;
[0123] Step 6, Resampling: Set an effective particle number threshold and use the effective particle number Neff to characterize the degree of particle degradation. This value is only related to the particle weight, and the expression is shown in Equation 6:
[0124]
[0125] When Neff is less than the set effective particle number threshold, the sampled particles need to be resampled. The basic idea is to keep the total number of particles unchanged, copy the particles with large weights, and discard the particles with very low weights. In this embodiment, the effective particle number threshold is 50% of the total number of particles.
[0126] Resampling involves resampling the particle swarm. After resampling, the number of particles with relative importance remains unchanged, resulting in higher particle weights.
[0127] Step 7: Use the whale swarm optimization algorithm with perturbation term to control the movement of the particle swarm:
[0128] All particles are considered part of a pod, with the particle having the highest historical position probability considered the lead whale. The movement pattern of each whale in the pod is determined by the normalized particle probability, categorized into three patterns: surrounding prey, spiral search, and random search. If the normalized particle probability is greater than or equal to the reciprocal of the total number of particles, it follows the surrounding prey movement pattern; otherwise, it follows one of the other two. Search accuracy is improved by randomly perturbing the lead whale's position. Before each iteration, particles are sorted in ascending order of probability, divided into three parts, and their average values are calculated, denoted as W. av1 W av2 and W av3 (W av1 <W av2 <W av3 Then read the normalized probability of each particle's position and compare it with W. av1 W av2 and W av3 The particles are compared and sorted from smallest to largest according to their weight. This allows for the determination of search precision for particles with different weights, as particles with higher weights do not require strong global search capabilities or high search precision. This can be divided into the following four cases:
[0129] First scenario: That is, the probability of the j-th particle at time t, if its probability interval is [0, W]. av1 If the position perturbation term of the head whale is taken as a random number within wt∈(0.3, 0.6) or wt∈(1.3, 1.6), there is a 50% probability of it falling into these two intervals, which can expand the search range;
[0130] The second scenario: The perturbation term for the head whale's position is taken as a random number within (0.6, 1.3) to avoid getting trapped in local extrema.
[0131] The third scenario: The perturbation term for the head whale's position is set to wt∈(0.8, 1.2) for a more detailed search;
[0132] The fourth scenario: Then wt = 1, at which point the particle's adaptability is good, and no further perturbation is needed;
[0133] Based on the probability of the j-th particle at time t The probability interval is set with a head whale position perturbation term as described above. The whale optimization algorithm is executed based on the set head whale position perturbation term, and the particle position after the position is moved is output.
[0134] Step 8: Use the whale swarm optimization algorithm with perturbation term to move the particles and perform the next iteration. Repeat steps 3 to 7. As the maximum distance between particles decreases during iteration, the algorithm is considered to have converged when the maximum distance between particles is less than 1m for three consecutive iterations, and the head whale position is returned. Alternatively, convergence is considered when the maximum number of iterations is reached, and the head whale position is returned as the estimated source position. If the distance is not less than 1m and the maximum number of iterations has not been reached, convergence is considered to have failed, and the algorithm returns to step 2.
[0135] Step 9: Once the particle swarm convergence is confirmed, the robot moves to the optimal particle position and advances 1m in each of the six directions of the grid, measuring and calculating the mass flux of the gas concentration in each of the six directions.
[0136]
[0137] Where V represents the volume of the j-th grid, and ρ represents the gas density. S represents the velocity vector, C represents the gas flow cross-sectional area, and S represents the gas concentration. Represents the Hamiltonian operator; Indicates mass flux; Spatial integral symbol
[0138] If the sum of the absolute values of the mass flux in the six directions of the grid measured by the robot is greater than or equal to the mass flux threshold (in this embodiment, the mass flux threshold is 0.03), then the robot is considered to have found the gas source and returns to the gas source location. If it is less than the mass flux threshold, then the particle swarm is re-initialized and steps 2 to 8 are repeated.
[0139] This completes the location of the gas source in three-dimensional space.
[0140] Table 1 compares the simulation results of different algorithms in two models: Model A (gas source location: (8.6m, 1.8m, 0.8m) with a wind speed of 3m / s) and Model B (gas source location: (1.8m, 1.5m, 1m) with the same wind speed of 3m / s). Each algorithm was run 50 times with different particle numbers. IWOA-IEPF is the entropy-based particle filter whale swarm optimization algorithm used in this invention; IEPF-R is an entropy-based particle filter algorithm without whale swarm control; IPSO is an improved particle swarm algorithm incorporating wind direction information; WE-PSO is an improved particle swarm algorithm using the WE method to initialize the particle swarm; and IIL is an improved lion swarm algorithm based on entropy. The average number of iterations refers to the average number of iterations at particle convergence. Source-finding accuracy is calculated using Euclidean distance in meters. The optimal data in each row is bolded.
[0141] Table 1
[0142]
[0143]
[0144] As can be seen from the table above, the algorithm of this invention achieves a higher number of successful source tracings and better source tracing accuracy with a lower average number of iterations, significantly improving both positioning accuracy and timeliness.
[0145] This invention first enters the plume discovery step, using a zigzag search to find the plume. Once found, the plume's position and concentration at that point are recorded, proceeding to the plume tracking stage, which employs a particle filtering swarm optimization algorithm based on information entropy. The population positions are randomly initialized, with particle weights and probabilities initialized using an average method. Then, the gas concentration at the robot's location is measured, particle weights are calculated, and the total information entropy of each grid is statistically compared. The algorithm moves a certain step towards the grid with the highest information entropy, followed by importance sampling and resampling of the particle swarm. A swarm optimization algorithm with perturbation terms is used to move particle positions, improving spatial search accuracy. Continuous iteration brings the particles closer to their optimal positions. Finally, the source confirmation step calculates the cumulative mass flux to determine if the gas source has been correctly located. This invention overcomes the problem of insufficient accuracy in existing 3D spatial search methods and avoids algorithms getting trapped in local optima.
[0146] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A method for locating a three-dimensional gas leak source, characterized in that, After detecting the plume, a particle filter swarm optimization algorithm based on information entropy is used to track the plume, locate the estimated gas source, and finally confirm the actual location of the gas source by identifying false sources. The specific process of the particle filter swarm optimization algorithm based on information entropy is as follows: 2-1. First, initialize the particle swarm. The number of particles in the particle swarm is N. Set the maximum number of iterations. Divide the three-dimensional search space into several cubic grids according to the size of the three-dimensional search space. Randomly generate particle positions within the three-dimensional search space or around the robot. Initialize the particle weights and probabilities to be the reciprocals of the number of particles. Calculate the sum of the information entropy of all particles in each grid. Move the robot towards the center of the grid with the largest sum of information entropy. 2-2. The sensor model simulates the actual gas concentration measured at the robot's position, and the robot reads the gas concentration reading at the corresponding position of the sensor model as the actual gas concentration; A three-dimensional gas turbulence model is used to calculate the estimated gas concentration at the robot's location, with the particle position as the gas source; the particle weight is obtained by subtracting the estimated gas concentration from the actual gas concentration and then normalizing it. Each particle is treated as a gas release source. Based on the estimated gas concentration at the robot's location and the obtained normalized particle weight, the particle probability is obtained and then normalized. 2-3. Using the normalized particle probabilities from step 2-2, calculate the sum of the Shannon information entropy of all particles falling into each grid. Move the robot towards the center of the grid with the largest sum of information entropy. The robot moves in six directions: forward, backward, left, right, up, and down. 2-4 Importance Sampling: After moving the robot towards the center of the grid with the maximum sum of information entropy in step 2-3, sequential importance sampling is used to sample the particle swarm. 2-5. Resampling: Set an effective particle count threshold and resample the particles that are missing after importance sampling. Use the effective particle count Neff to characterize the degree of particle degradation. When Neff is less than the set effective particle count threshold, the sampled particles need to be resampled; if Neff is not less than the set effective particle count threshold, no resampling is performed, and proceed to step 2-6. 2-6. Use a whale swarm optimization algorithm with perturbation terms to control the movement of the particle swarm: All particles in the particle swarm are considered as a pod of whales, and the particle with the highest historical position probability is considered as the alpha whale. The movement mode of each whale in the pod is determined based on the normalized particle probability, which is divided into three movement modes: surrounding prey, spiral search, and random search. If the normalized particle probability is greater than or equal to the reciprocal of the total number of particles, it is the surrounding prey movement mode; if it is less than the reciprocal of the total number of particles, it is one of the other two movement modes. The position of the alpha whale is randomly perturbed. Before each iteration of the particle filter, the particles are sorted in ascending order according to their probability. All sorted particles are then divided into three parts, and the average value of each part is calculated, denoted as W. av1 W av2 and W av3 W av1 <W av2 <W av3 Then, the normalized particle probability at each particle's position is read and compared with W. av1 W av2 and W av3 The comparison can be divided into the following four cases: Case 1: The probability of the j-th particle at time t If the probability interval is [0, W], av1 If the position perturbation term of the head whale is taken as a random number within wt∈(0.3, 0.6) or wt∈(1.3, 1.6), there is a 50% probability of it falling into either of these two intervals; The second scenario: The perturbation term for the head whale's position is taken as a random number within the range (0.6, 1.3); The third scenario: The perturbation term for the head whale's position is taken as a random number within the range (0.8, 1.2); The fourth scenario: Then wt = 1, and no further perturbation is needed; Based on the probability of the j-th particle at time t The probability interval is set with a head whale position perturbation term as described above. The whale optimization algorithm is executed based on the set head whale position perturbation term, and the particle position after the position is moved is output. 2-7. After moving the particle in step 2-6, perform the next iteration and repeat steps 2-2 to 2-6. As the maximum distance between particles decreases during iteration, convergence is considered when the maximum distance between particles is less than 2m for three consecutive iterations, or when the maximum number of iterations is reached. After convergence, return the head whale position as the estimated source position. If the distance is not less than 2m and the maximum number of iterations has not been reached, it is considered non-converged, and return to step 2-1.
2. The method according to claim 1, characterized in that, The three-dimensional gas turbulence model is expressed by formula (1): Where Q is the gas release rate from the gas source, and K is the gas diffusion rate, taken as 0.6 m / s. 2 , r is the distance between the gas release source and the robot's position, y s Let y be the particle's Y-coordinate. r Let λ be the robot's Y-coordinate, λ be an intermediate quantity, and its expression is shown in equation (2); τ be the gas particle lifetime, v be the wind speed, and C be the estimated gas concentration. Particle weight Represented as formula (3): in, This represents the weight of the i-th particle after normalization at the previous time step. The expected concentration of the i-th particle at time k is obtained by formula (1); The actual gas concentration measured by the robot at time k; right Perform normalization to obtain the normalized particle weight of the i-th particle at time k. The probability of obtaining the particle's position according to formula (4) is: Among them, Γ s,k z represents the state vector estimate of the source vector at time k. 1:k ={z1, ..., z k } represents the observations collected up to time k; The particle probabilities are then normalized.
3. The method according to claim 1, characterized in that, The plume detection method employs a zigzag search approach. A plume detection concentration threshold is set, and a zigzag search is performed within a horizontal plane at a certain height. When the measured concentration exceeds the plume detection concentration threshold, a plume is considered detected, and the plume tracking phase begins. The robot's position and the gas concentration at that position are then returned. If the measured gas concentration consistently fails to reach the plume detection concentration threshold, and the number of collisions with walls exceeds 20, the plane is considered to be free of plumes, and the search continues with the height increased by 0.5m. If the search exceeds the three-dimensional search space, the search is considered to have failed to find a plume and the search is stopped.
4. The method according to claim 1, characterized in that, The process of identifying the false source is as follows: A mass flux threshold is set. Once the particle swarm convergence is confirmed, the robot moves to the optimal particle position and advances 1m in each of the six directions of the grid. The mass flux of the gas concentration in each of the six directions of the grid is then measured and calculated. Where V represents the volume of the j-th grid, and ρ represents the gas density. S represents the velocity vector, C represents the gas flow cross-sectional area, and S represents the gas concentration. Represents the Hamiltonian operator; Indicates mass flux; For spatial integrals; The cross-sectional area of the gas flow is taken as the grid area. If the sum of the absolute values of the mass flux in the six directions of the grid measured by the robot is greater than or equal to the mass flux threshold, the robot is considered to have found the gas source and returns to the gas source location. If it is less than the mass flux threshold, the particle swarm is re-initialized and the plume tracking is repeated using the particle filter whale swarm optimization algorithm based on information entropy.
5. The method according to claim 4, characterized in that, The quality throughput threshold is 0.
03.
6. The method according to claim 1, characterized in that, The side length of the cubic mesh is 1m; the step length of the robot is 0.2m; the number of samples for importance sampling is 80% of the total number of particles; and the effective particle count threshold is 50% of the total number of particles.
Citation Information
Patent Citations
Rotor type air-ground integrated amphibious active olfaction robot and odor detection method thereof
CN106444827A