Hydrogen leakage source positioning method based on distributed intelligent group
Through the hydrogen leakage source positioning method based on distributed intelligent groups, using Levy flight strategy and adaptively adjusted inertial weight mechanism, the problems of high computational complexity and insufficient efficiency in the existing technology are solved, and an efficient hydrogen leakage source is achieved. Positioning improves the robustness and processing efficiency of prediction results.
Patent Information
- Application Number
- CN202410884664.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-03
- Publication Date
- 2024-09-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing hydrogen leak source location technology has high computational complexity and slow convergence speed when dealing with large-scale sensor deployment and high-dimensional data sets, resulting in insufficient efficiency.
A method based on distributed intelligent swarms is adopted, by establishing a hydrogen leakage model, determining the sensor position and concentration detection value, establishing a distributed intelligent swarm and its attributes, and using Levy flight strategy, differential evolution mutation operation and adaptively adjusted inertia weight. mechanism to optimize the hydrogen leak fitness function to locate the hydrogen leak source.
By weakening the impact of random errors, this method enhances the robustness and reliability of prediction results, significantly improves processing efficiency and shortens the algorithm execution cycle.
Smart Images

Figure CN118690657A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of hydrogen leakage source positioning, and in particular to a hydrogen leakage source positioning method based on a distributed intelligent group. Background Art
[0002] In recent years, accidents involving hazardous chemicals have occurred frequently. Among them, hydrogen, as a gas that is both efficient and potentially dangerous, poses a significant threat to public safety in leakage and diffusion accidents. Accurately predicting the diffusion trend of hydrogen is crucial to effectively controlling the impact of accidents, and the key to this prediction lies in accurately obtaining the location and intensity information of the hydrogen leakage source. With the advancement of hydrogen sensor technology, hydrogen leakage source positioning technology based on sensor networks and optimization algorithms has developed rapidly. However, it still faces multiple challenges in practical applications. Although swarm intelligence algorithms such as genetic algorithms and particle swarm algorithms can provide more accurate solutions in theory, they are inefficient in actual operations due to high computational complexity and slow convergence speed, especially when dealing with large-scale sensor deployments and high-dimensional data sets. Summary of the invention
[0003] In view of the above problems in the prior art, this paper proposes a hydrogen leakage source positioning method based on distributed intelligent groups.
[0004] The present invention provides the following technical solutions:
[0005] A method for locating a hydrogen leakage source based on a distributed intelligent group, characterized in that it includes 1) establishing a leakage model; 2) locating the hydrogen leakage source according to the leakage model established in step 1); wherein 1) establishing the leakage model includes the following steps:
[0006] 1-1) Establishing the optimization variables and their ranges of the hydrogen leakage model;
[0007] 1-2) Determine the sensor position and the detection value of hydrogen concentration;
[0008] 1-3) Establishing a distributed intelligent group and its first and second attributes;
[0009] 1-4) Establish a hydrogen leakage fitness function based on distributed intelligent groups.
[0010] Preferably, the method of establishing the optimization variables and search range of the hydrogen leakage model in step 1-1) is as follows:
[0011] The optimization variables of the hydrogen leakage model include the location and concentration information of the hydrogen leakage source; the leakage source location coordinates include the x-direction coordinate represented by x1; the y-direction coordinate represented by x2; the z-direction coordinate represented by x3; the leakage source concentration value represented by x4; therefore, the optimization variable can be expressed as x = [x1 x2 x3 x4]T , where T represents the transpose of the vector;
[0012] The range of the optimization variables includes the lower bound of the x-direction coordinate x1 as Lb1 and the upper bound as Ub1; the lower bound of the y-direction coordinate x2 as Lb2 and the upper bound as Ub2; the lower bound of the z-direction coordinate x3 as Lb3 and the upper bound as Ub3; the lower bound of the leakage source concentration value x4 as Lb4 and the upper bound as Ub4.
[0013] Preferably, the method for determining the sensor position and the detection value of the hydrogen concentration in step 1-2) is as follows:
[0014] Set m hydrogen sensors in the search space determined in step 1-1); establish the x coordinate of the jth sensor using a j Indicates; the y coordinate of the jth sensor is represented by b j Indicates; the z coordinate of the jth sensor is represented by c j represents, j = 1, 2…m; the position of the jth sensor is [a j b j c j ] T ; Determine the hydrogen concentration detection value of each sensor position, and define the hydrogen concentration detection value of the jth sensor position as R j , j=1,2…m.
[0015] Preferably, the method of establishing a distributed intelligent group and its first attribute and second attribute in step 1-3) is as follows:
[0016] Step 1-3-1) Establish n distributed intelligent agents; each intelligent agent has a first attribute and a second attribute; wherein the first attribute is the location and concentration value of the hydrogen leakage source; the second attribute is the predicted value of the hydrogen concentration at the sensor location based on the first attribute;
[0017] Step 1-3-2) Establish a 4-row n-column matrix X to represent the first attribute of the distributed intelligent group, as shown in the following formula; where each column of the matrix X represents the first attribute of an intelligent agent; each column of the matrix X consists of 4 elements; the i-th column of the matrix X is x i =[x 1i x 2i x 3i x 4i ] T , represents the first attribute of the i-th distributed agent; the i-th column and the first row element x 1i Represents the x-coordinate of agent i; the element x in the 2nd row of the ith column 2i Represents the y-coordinate of agent i; the element x in the 3rd row of the ith column 3i Represents the z-coordinate of agent i; the element x in the 4th row of the ith column 4irepresents the predicted value of hydrogen concentration of the leakage source of agent i; all elements of the matrix X are within the search range established in step 1-1);
[0018]
[0019] Step 1-3-3) The method of establishing the second attribute of the distributed intelligent group is as follows:
[0020] The diffusion coefficient σ of the distributed intelligent group in the y direction of the sensor position is calculated by the following formula: y and the diffusion coefficient σ in the z direction z ;
[0021]
[0022] Among them, σ yji represents the diffusion coefficient of the y vector of agent i at sensor j; σ zji represents the diffusion coefficient of the z vector of agent i at sensor j; j = 1, 2…m; i = 1, 2…n; Δx ji =a j -x 1i , Δx ji is the distance between the jth sensor and the leakage source predicted by agent i in the x direction; a j represents the x-coordinate of the jth sensor; x 1i Represents the coordinate of the leakage source in the x direction predicted by agent i;
[0023] Assuming that the diffusion of hydrogen from the leakage source reaches a stable state and the concentration remains unchanged, and the ambient wind speed is μ, the second attribute of the distributed intelligent group, that is, the predicted value of the hydrogen concentration of the distributed intelligent agent at the sensor location, is as follows;
[0024]
[0025] Among them, F ji is the predicted value of hydrogen concentration of agent i at the jth sensor location; Δy ji =b j -x 2i , Δy ji b is the distance between the jth sensor and the leakage source predicted by agent i in the y direction; j represents the y-direction coordinate of the jth sensor; x 2i represents the coordinate of the leakage source in the y direction predicted by agent i; Δz ji =c j -x 3i , Δz ji is the distance between the jth sensor and the leakage source predicted by agent i in the z direction; c jrepresents the coordinate of the j-th sensor in the z direction; x 3i represents the coordinate of the predicted leakage source of agent i in the z direction;
[0026] Preferably, the method for establishing the hydrogen leakage fitness function based on the distributed intelligent group in step 1-4) is as follows:
[0027] The hydrogen leakage fitness function of the i-th agent is the mean square error between the measured value and the predicted value of the hydrogen concentration, denoted as J i , as shown in the following formula;
[0028] J i = [(R1 - F 1i ) 2 + (R2 - F 2i ) 2 + … + (R m - F mi ) 2 / n, i = 1, 2…n
[0029] J i The value is called the fitness of agent i.
[0030] Preferably, the method for solving the leakage model in step 2) is as follows:
[0031] Define the maximum number of iterations as T, the switching probability as p, the iteration number loop variable t = 1, and the population number loop variable i = 1; Define n initial distributed intelligent groups; Randomly initialize the first attribute of n distributed agents; And calculate their second attribute; Calculate the fitness of n agents, denoted as J1, J2, … J n ; Compare the sizes of J1, J2, … J n in turn, and take the minimum value among them as the initial optimal fitness, denoted as G 1 ; The first attribute corresponding to the initial optimal fitness is the initial optimal first attribute, denoted as g 1 ;
[0032] Preferably, in step 2-1), if t < T, then execute step 2-2), otherwise execute step 2-9);
[0033] Step 2-2) t = t + 1, if i < n, then execute step 2-3), otherwise execute step 2-1);
[0034] Step 2-3) i = i + 1, R is a random number between 0 and 1, if R < p, then execute step 2-4), otherwise execute step 2-5);
[0035] Step 2-4) Calculate the Levy random number Levy by the following formula:
[0036]
[0037] Where Γ is the standard gamma function, u and v are random numbers that obey the standard normal distribution, and λ = 1.5;
[0038] At the tth iteration, the first attribute update strategy 1 of agent i is as follows;
[0039]
[0040] Among them, g t is the first attribute corresponding to the optimal fitness of the t-th iteration, also called the optimal first attribute of the t-th iteration; i t is the first attribute of agent i at the tth iteration; is the first attribute of agent i at the t+1th iteration; r1 is a random number in [0,1];
[0041] Step 2-5) restrict the range of the first attribute of agent i in the t+1th iteration;
[0042]
[0043] Step 2-6) Calculate the fitness of agent i at the t+1th iteration
[0044] According to the leakage model, the fitness of the distributed intelligent group at the (t+1)th iteration is calculated and recorded as
[0045] Step 2-7) Calculate the optimal fitness and optimal first attribute of the t+1th iteration
[0046]
[0047] Step 2-8) At the tth iteration, the first attribute update strategy 2 of agent i is as follows:
[0048]
[0049] in, is the first attribute of agent α at the tth iteration; is the first attribute of agent β at the tth iteration; the first attributes of agents α, β, and i are not equal to each other, that is, α≠β≠i; α and β are random integers between 1 and n; is the intermediate variable of the tth iteration of the i-th agent; g t is the first attribute corresponding to the optimal fitness of the t-th iteration, also known as the optimal first attribute of the t-th iteration; r2 and r3 are random numbers in [0,1]; w is the inertia weight, and the calculation formula is as follows:
[0050] w=wmax -(w max -w max )×t / T
[0051] Where T represents the maximum number of iterations, w max and w min are the maximum and minimum values of w respectively; t is the current iteration number;
[0052] Repeat steps 2-5);
[0053] Repeat steps 2-6);
[0054] Repeat steps 2-7);
[0055] Step 2-9) The first attribute g corresponding to the optimal fitness of the Tth iteration T , also known as the optimal first attribute of the Tth iteration, is used as the final solution of the hydrogen leakage model, that is, the location and concentration information of the hydrogen leakage source.
[0056] The beneficial effects of the present invention are as follows: by setting the cumulative mean square error between the data collected by multiple sensors and the predicted outputs of multiple distributed intelligent agents as the optimization objective function, this design is intended to weaken the influence of random errors, thereby enhancing the robustness and reliability of the prediction results. A major highlight of this method is the integration of Levy flight strategy, differential evolution mutation operation and adaptive adjustment of inertia weight mechanism. This comprehensive strategy greatly promotes the diversity maintenance of the intelligent agent group and the global exploration and local development capabilities of the algorithm. In addition, by utilizing the parallel computing mode under the distributed architecture, this method effectively shortens the algorithm execution cycle and significantly improves the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0058] Figure 1 It is a flow chart of the method for locating the hydrogen leakage source based on the distributed intelligent group of the present invention;
[0059] Figure 2 It is the flow chart of solving the leakage model. DETAILED DESCRIPTION
[0060] A method for locating a hydrogen leakage source based on a distributed intelligent group includes 1) establishing a leakage model; 2) locating the hydrogen leakage source according to the leakage model established in step 1); wherein 1) establishing the leakage model includes the following steps:
[0061] 1-1) Establishing the optimization variables and their ranges of the hydrogen leakage model;
[0062] 1-2) Determine the sensor position and the detection value of hydrogen concentration;
[0063] 1-3) Establishing a distributed intelligent group and its first and second attributes;
[0064] 1-4) Establish a hydrogen leakage fitness function based on distributed intelligent groups.
[0065] The method of establishing the optimization variables and search range of the hydrogen leakage model in step 1-1) is as follows:
[0066] The optimization variables of the hydrogen leakage model include the location and concentration information of the hydrogen leakage source; the leakage source location coordinates include the x-direction coordinate represented by x1; the y-direction coordinate represented by x2; the z-direction coordinate represented by x3; the leakage source concentration value represented by x4; therefore, the optimization variable can be expressed as x = [x1 x2 x3 x4] T , where T represents the transpose of the vector;
[0067] The range of the optimization variables includes the lower bound of the x-direction coordinate x1 as Lb1 and the upper bound as Ub1; the lower bound of the y-direction coordinate x2 as Lb2 and the upper bound as Ub2; the lower bound of the z-direction coordinate x3 as Lb3 and the upper bound as Ub3; the lower bound of the leakage source concentration value x4 as Lb4 and the upper bound as Ub4.
[0068] The method for determining the sensor position and the detection value of hydrogen concentration in step 1-2) is as follows:
[0069] Set m hydrogen sensors in the search space determined in step 1-1); establish the x coordinate of the jth sensor using a j Indicates; the y coordinate of the jth sensor is represented by b j Indicates; the z coordinate of the jth sensor is represented by c j represents, j = 1, 2…m; the position of the jth sensor is [a j b j c j ] T ; Determine the hydrogen concentration detection value of each sensor position, and define the hydrogen concentration detection value of the jth sensor position as R j , j=1,2…m.
[0070] The method of establishing the distributed intelligent group and its first attribute and second attribute in step 1-3) is as follows:
[0071] Step 1-3-1) Establish n distributed intelligent agents; each intelligent agent has a first attribute and a second attribute; wherein the first attribute is the location and concentration value of the hydrogen leakage source; the second attribute is the predicted value of the hydrogen concentration at the sensor location based on the first attribute;
[0072] Step 1-3-2) Establish a 4-row n-column matrix X to represent the first attribute of the distributed intelligent group, as shown in the following formula; where each column of the matrix X represents the first attribute of an intelligent agent; each column of the matrix X consists of 4 elements; the i-th column of the matrix X is x i =[x 1i x 2i x 3i x 4i ] T , represents the first attribute of the i-th distributed agent; the i-th column and the first row element x 1i Represents the x-coordinate of agent i; the element x in the 2nd row of the ith column 2i Represents the y-coordinate of agent i; the element x in the 3rd row of the ith column 3i Represents the z-coordinate of agent i; the element x in the 4th row of the ith column 4i represents the predicted value of hydrogen concentration of the leakage source of agent i; all elements of the matrix X are within the search range established in step 1-1);
[0073]
[0074] Step 1-3-3) The method of establishing the second attribute of the distributed intelligent group is as follows:
[0075] The diffusion coefficient σ of the distributed intelligent group in the y direction of the sensor position is calculated by the following formula: y and the diffusion coefficient σ in the z direction z ;
[0076]
[0077] Among them, σ yji represents the diffusion coefficient of the y vector of agent i at sensor j; σ zji represents the diffusion coefficient of the z vector of agent i at sensor j; j = 1, 2…m; i = 1, 2…n; Δx ji =a j -x 1i , Δx ji is the distance between the jth sensor and the leakage source predicted by agent i in the x direction; a j represents the x-coordinate of the jth sensor; x 1i Represents the coordinate of the leakage source in the x direction predicted by agent i;
[0078] Assuming that the diffusion of hydrogen from the leakage source reaches a stable state and the concentration remains unchanged, and the ambient wind speed is μ, the second attribute of the distributed intelligent group, that is, the predicted value of the hydrogen concentration of the distributed intelligent agent at the sensor location, is as follows;
[0079]
[0080] Among them, F ji is the predicted value of hydrogen concentration of agent i at the jth sensor location; Δy ji =b j -x 2i , Δy ji b is the distance between the jth sensor and the leakage source predicted by agent i in the y direction; j represents the y-direction coordinate of the jth sensor; x 2i represents the coordinate of the leakage source in the y direction predicted by agent i; Δz ji =c j -x 3i , Δz ji is the distance between the jth sensor and the leakage source predicted by agent i in the z direction; c j represents the coordinate of the jth sensor in the z direction; x 3i Represents the coordinate of the leakage source in the z direction predicted by agent i;
[0081] The method for establishing the hydrogen leakage fitness function based on the distributed intelligent group in step 1-4) is as follows:
[0082] The hydrogen leakage fitness function of the ith intelligent agent is the mean square error between the detected value and the predicted value of hydrogen concentration, denoted by J i , see the following formula;
[0083] J i =[(R1-F 1i ) 2 +(R2-F 2i ) 2 +…+(R m -F mi ) 2 ] / n, i=1,2…n
[0084] J i The value of is called the fitness of agent i.
[0085] The method 2) for solving the leakage model is as follows:
[0086] Define the maximum number of iterations as T, the switching probability as p, the iteration number loop variable t = 1, the population number loop variable i = 1; define n initial distributed intelligent groups; randomly initialize the first attributes of n distributed intelligent agents; and calculate their second attributes; calculate the fitness of n intelligent agents, denoted as J1, J2, ... J n ; Compare J1, J2, ... J in sequence n The size of the minimum value is taken as the initial optimal fitness, denoted as G 1; The first attribute corresponding to the initial optimal fitness is the initial optimal first attribute, denoted as g 1 ;
[0087] Step 2-1) If t < T, then execute Step 2-2); otherwise, execute Step 2-9).
[0088] Step 2-2) t = t + 1. If i < n, then execute Step 2-3); otherwise, execute Step 2-1).
[0089] Step 2-3) i = i + 1. R is a random number between 0 and 1. If R < p, then execute Step 2-4); otherwise, execute Step 2-5).
[0090] Step 2-4) Calculate the Levy random number Levy by the following formula:
[0091]
[0092] where Γ is the standard gamma function, u and v are random numbers服从标准正态分布的随机数, λ = 1.5;
[0093] At the t-th iteration, the first attribute update strategy 1 of agent i is as follows;
[0094]
[0095] where g t is the first attribute corresponding to the optimal fitness at the t-th iteration, also known as the optimal first attribute at the t-th iteration; is the first attribute of agent i at the t-th iteration; is the first attribute of agent i at the (t + 1)-th iteration; r1 is a random number in [0, 1];
[0096] Step 2-5) Restrict the range of the first attribute of agent i at the (t + 1)-th iteration;
[0097]
[0098] Step 2-6) Calculate the fitness of agent i at the (t + 1)-th iteration
[0099] According to the leakage model, calculate the fitness of the distributed intelligent group at the (t + 1)-th iteration, denoted as
[0100] Step 2-7) Calculate the optimal fitness and the optimal first attribute at the (t + 1)-th iteration
[0101]
[0102] At the t-th iteration, the first attribute update strategy 2 of agent i is as follows: 需要注意的是,原文中“u和v为服从标准正态分布的随机数”这里的表述不太准确,推测应该是“u and v are random numbers subject to the standard normal distribution” ,已在翻译中修正。
[0103]
[0104] in, is the first attribute of agent α at the tth iteration; x t β is the first attribute of agent β at the tth iteration; the first attributes of agents α, β, and i are not equal to each other, that is, α≠β≠i; α and β are random integers between 1 and n; is the intermediate variable of the tth iteration of the i-th agent; g t is the first attribute corresponding to the optimal fitness of the t-th iteration, also known as the optimal first attribute of the t-th iteration; r2 and r3 are random numbers in [0,1]; w is the inertia weight, and the calculation formula is as follows:
[0105] w=w max -(w max -w max )×t / T
[0106] Where T represents the maximum number of iterations, w max and w min are the maximum and minimum values of w respectively; t is the current iteration number;
[0107] Repeat steps 2-5);
[0108] Repeat steps 2-6);
[0109] Repeat steps 2-7);
[0110] Step 2-9) The first attribute g corresponding to the optimal fitness of the Tth iteration T , also known as the optimal first attribute of the Tth iteration, which is used as the final solution of the hydrogen leakage model, that is, the location and concentration information of the hydrogen leakage source.
[0111] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for locating a hydrogen leak source based on a distributed intelligent group, characterized in that: Including: 1) Establish a leakage model; 2) Locate the hydrogen leakage source according to the leakage model established in step 1). Among them, 1) Establishing the leakage model includes the following steps: 1-1) Establish the optimization variables and their ranges of the hydrogen leakage model; 1-2) Determine the sensor positions and the detected values of hydrogen concentration; 1-3) Establish a distributed intelligent swarm and its first and second attributes; 1-4) Establish a hydrogen leakage fitness function based on the distributed intelligent swarm.
2. The method for locating a hydrogen leak source based on a distributed intelligent group according to claim 1, characterized in that: The method for establishing the optimization variables and search ranges of the hydrogen leakage model in step 1-1) is as follows: The optimization variables of the hydrogen leakage model include the location and concentration information of the hydrogen leakage source; the leakage source location coordinates include the x-direction coordinate represented by x1; the y-direction coordinate represented by x2; the z-direction coordinate represented by x3; the leakage source concentration value represented by x4; therefore, the optimization variable can be expressed as x = [x1 x2 x3 x4] T , where T represents the transpose of the vector; The ranges of the optimization variables include that the lower bound of the x-direction coordinate x1 is Lb1, and the upper bound is Ub1; the lower bound of the y-direction coordinate x2 is Lb2, and the upper bound is Ub2; the lower bound of the z-direction coordinate x3 is Lb3, and the upper bound is Ub3; the lower bound of the leakage source concentration value x4 is Lb4, and the upper bound is Ub4.
3. The method for locating a hydrogen leak source based on a distributed intelligent group according to claim 1, characterized in that: The method for determining the sensor positions and the detected values of hydrogen concentration in step 1-2) is as follows: Set m hydrogen sensors in the search space determined in step 1-1); establish the x coordinate of the jth sensor using a j Indicates; the y coordinate of the jth sensor is represented by b j Indicates; the z coordinate of the jth sensor is represented by c j represents, j = 1, 2…m; the position of the jth sensor is [a j b j c j ] T ; Determine the hydrogen concentration detection value at each sensor position and define the hydrogen concentration detection value at the jth sensor position as R j , j=1,2…m.
4. The method for locating a hydrogen leakage source based on a distributed intelligent group according to claim 1, characterized in that: The method for establishing a distributed intelligent swarm and its first and second attributes in step 1-3) is as follows: Step 1-3-1) Establish n distributed intelligent agents; each intelligent agent has a first attribute and a second attribute; among them, the first attribute is the position and concentration value of the hydrogen leakage source; the second attribute is the predicted value of the hydrogen concentration at the sensor position based on the first attribute. Step 1-3-2) Establish a 4-row n-column matrix X to represent the first attribute of the distributed intelligent group, as shown in the following formula; where each column of the matrix X represents the first attribute of an intelligent agent; each column of the matrix X consists of 4 elements; the i-th column of the matrix X is x i =[x 1i x 2i x 3i x 4i ] T , represents the first attribute of the i-th distributed agent; the i-th column and the first row element x 1i Represents the x-coordinate of agent i; the element x in the 2nd row of the ith column 2i Represents the y-coordinate of agent i; the element x in the 3rd row of the ith column 3i Represents the z-coordinate of agent i; the element x in the 4th row of the ith column 4i represents the predicted value of hydrogen concentration of the leakage source of agent i; all elements of the matrix X are within the search range established in step 1-1); Step 1-3-3) The method for establishing the second attribute of the distributed intelligent swarm is as follows: The diffusion coefficient σ of the distributed intelligent group in the y direction of the sensor position is calculated by the following formula: y and the diffusion coefficient σ in the z direction z ; Among them, σ yji represents the diffusion coefficient of the y vector of agent i at sensor j; σ zji represents the diffusion coefficient of the z vector of agent i at sensor j; j = 1, 2…m; i = 1, 2…n; Δx ji =a j -x 1i , Δx ji is the distance between the jth sensor and the leakage source predicted by agent i in the x direction; a j represents the x-coordinate of the jth sensor; x 1i Represents the coordinate of the leakage source in the x direction predicted by agent i; Assume that the hydrogen diffusion from the leakage source reaches a steady state and the concentration remains unchanged, and the environmental wind speed is μ. Then, the second attribute of the distributed intelligent swarm, that is, the predicted value of the hydrogen concentration at the sensor position of the distributed intelligent agent, is as described in the following formula; Among them, F ji is the predicted value of hydrogen concentration of agent i at the jth sensor location; Δy ji =b j -x 2i , Δy ji b is the distance between the jth sensor and the leakage source predicted by agent i in the y direction; j represents the y-direction coordinate of the jth sensor; x 2i represents the coordinate of the leakage source in the y direction predicted by agent i; Δz ji =c j -x 3i , Δz ji is the distance between the jth sensor and the leakage source predicted by agent i in the z direction; c j represents the coordinate of the jth sensor in the z direction; x 3i Represents the coordinate of the leakage source in the z direction predicted by agent i.
5. The method for locating a hydrogen leakage source based on a distributed intelligent group according to claim 1, characterized in that: The method for establishing a hydrogen leakage fitness function based on the distributed intelligent swarm in step 1-4) is as follows: The hydrogen leakage fitness function of the ith intelligent agent is the mean square error between the detected value and the predicted value of hydrogen concentration, denoted by J i , see the following formula; J i =[(R1-F 1i ) 2 +(R2-F 2i ) 2 +…+(R m -F mi ) 2 ] / n,i=1,2…n J i The value of is called the fitness of agent i.
6. The method for locating a hydrogen leakage source based on a distributed intelligent group according to claim 1, characterized in that: The method for solving the leakage model in 2) is as follows: Define the maximum number of iterations as T, the switching probability as p, the iteration number loop variable t = 1, and the population number loop variable i = 1; define n initial distributed intelligent swarms; randomly initialize the first attributes of n distributed intelligent agents; and calculate their second attributes. Calculate the fitness of n agents, denoted as J1, J2, …J n ; Compare J1, J2, ... J in sequence n The size of the minimum value is taken as the initial optimal fitness, denoted as G 1 ; The first attribute corresponding to the initial optimal fitness is the initial optimal first attribute, denoted as g 1 ; Step 2-1) If t < T, then execute step 2-2), otherwise execute step 2-9); Step 2-2) t = t + 1. If i < n, then execute step 2-3), otherwise execute step 2-1); Step 2-3) i = i + 1. R is a random number between 0 and 1. If R < p, then execute step 2-4), otherwise execute step 2-5); Step 2-4) Calculate the Levy random number Levy by the following formula: Among them, Γ is the standard gamma function, u and v are random numbers obeying the standard normal distribution, and λ = 1.5; At the t-th iteration, the first attribute update strategy 1 of the intelligent agent i is as follows; Among them, g t is the first attribute corresponding to the optimal fitness of the t-th iteration, also called the optimal first attribute of the t-th iteration; is the first attribute of agent i at the tth iteration; is the first attribute of agent i at the t+1th iteration; r1 is a random number in [0,1]; Step 2-5) Limit the range of the first attribute of the intelligent agent i at the (t + 1)-th iteration; Step 2-6) Calculate the fitness of the intelligent agent i at the (t + 1)-th iteration According to the leakage model, the fitness of the distributed intelligent group at the (t+1)th iteration is calculated and recorded as Step 2-7) Calculate the optimal fitness and the optimal first attribute at the (t + 1)-th iteration Step 2-8) At the t-th iteration, the first attribute update strategy 2 of the intelligent agent i is as follows: in, is the first attribute of agent α at the tth iteration; is the first attribute of agent β at the tth iteration; the first attributes of agents α, β, and i are not equal to each other, that is, α≠β≠i; α and β are random integers between 1 and n; is the intermediate variable of the tth iteration of the i-th agent; g t is the first attribute corresponding to the optimal fitness of the t-th iteration, also known as the optimal first attribute of the t-th iteration; r2 and r3 are random numbers in [0,1]; w is the inertia weight, and the calculation formula is as follows: w=w max -(w max -w max )×t / T Where T represents the maximum number of iterations, w max and w min are the maximum and minimum values of w respectively; t is the current iteration number; Repeat step 2-5); Repeat step 2-6); Repeat step 2-7); Step 2-9) The first attribute g corresponding to the optimal fitness of the Tth iteration T , also known as the optimal first attribute of the Tth iteration, is used as the final solution of the hydrogen leakage model, that is, the location and concentration information of the hydrogen leakage source.
