CN113473501A - Optimization method applied to gas pipe network leakage detector and pressure sensor deployment - Google Patents

Optimization method applied to gas pipe network leakage detector and pressure sensor deployment Download PDF

Info

Publication number
CN113473501A
CN113473501A CN202110721451.4A CN202110721451A CN113473501A CN 113473501 A CN113473501 A CN 113473501A CN 202110721451 A CN202110721451 A CN 202110721451A CN 113473501 A CN113473501 A CN 113473501A
Authority
CN
China
Prior art keywords
sensor
current optimal
function value
objective function
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110721451.4A
Other languages
Chinese (zh)
Inventor
梁光华
黄丽达
刘罡
王静舞
于淼淼
关劲夫
王宇
刘磊
柏跃领
吴津津
李振铎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Global Safety Technology Co Ltd
Original Assignee
Beijing Global Safety Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Global Safety Technology Co Ltd filed Critical Beijing Global Safety Technology Co Ltd
Priority to CN202110721451.4A priority Critical patent/CN113473501A/en
Publication of CN113473501A publication Critical patent/CN113473501A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/06Testing, supervising or monitoring using simulated traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Examining Or Testing Airtightness (AREA)

Abstract

The scheme comprises the steps of obtaining a sensor group for monitoring gas leakage and gas pipeline pressure, and obtaining a target function of each sensor position by initializing the sensor group; acquiring an objective function value of each sensor position according to the objective function and comparing the objective function values to obtain a current optimal sensor; updating the positions and the states of all sensors except the current optimal sensor by using a Levis flight mechanism, and determining a global optimal sensor; and carrying out layout optimization according to the position of the global optimal sensor and outputting the position of the global optimal sensor. The scheme optimizes the deployment of the sensor group based on the Levy flight mechanism, avoids the problem that the existing optimization method is easy to fall into a local limit, and reduces the cost of hardware equipment and the redundancy of monitoring data.

Description

Optimization method applied to gas pipe network leakage detector and pressure sensor deployment
Technical Field
The application relates to the technical field of gas pipe network leakage detector and pressure sensor deployment, in particular to an optimization method applied to gas pipe network leakage detector and pressure sensor deployment.
Background
The natural gas is an important basic energy for promoting the economic development of China and has the characteristics of cleanness and no pollution, so that the strengthening of the natural gas pipeline transportation construction is beneficial to promoting the economic development of China and protecting the environment. Because some defects of the natural gas pipeline and careless leakage existing in the construction and operation processes, the leakage event of the natural gas pipeline happens occasionally, and a serious safety problem is brought. The gas leakage detector and the pressure sensor are arranged in the adjacent space and key nodes of the gas pipe network, so that the gas leakage detection device and the pressure sensor have important significance for monitoring the gas leakage condition in real time and protecting gas safety. Through the mixed layout of the gas leakage detector and the pressure sensor in different adjacent spaces and node positions, the gas leakage condition and the pipeline pressure can be monitored simultaneously, and risk prevention and control and monitoring early warning of multi-parameter fusion are realized. The mixed layout optimization technology of the urban underground gas pipe network leakage detector and the pipe network pressure sensor is researched, so that the cost of hardware equipment can be reduced, the redundancy of monitoring data is reduced, and the utilization rate of the equipment is improved.
The gas leakage detector and the pipe network pressure sensor belong to typical wireless detectors. The wireless detector network is formed by a communication network formed by a large number of wireless sensor nodes, can carry out real-time monitoring and cooperative sensing on key areas in a target area, and can carry out information acquisition and processing on a monitored object and a working area. Therefore, it is very important for the deployment of wireless sensor nodes. The wireless sensor network with excellent performance has good performance in the aspects of network node coverage rate, node utilization rate and energy balance coefficient. In particular, it is desirable to achieve maximum network coverage for a target area with a minimum number of wireless sensors to allow it to operate for a sufficient period of time. However, in practical applications, there are often only one or two objectives, since most of these factors are conflicting with each other, and optimization of one of the objectives will likely result in the other objective or objectives being constrained. Therefore, a reasonable multi-objective optimization algorithm is needed to optimize the deployment of the sensor network nodes, so that the performance of the wireless sensor network can be obviously improved.
However, the current optimization method for wireless sensor network deployment is easy to fall into a local limit problem, and the searching capability is weak.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present application is to provide an optimization method applied to gas pipe network leakage detector and pressure sensor deployment, so as to solve the technical problems that the existing optimization method for wireless sensor network deployment is prone to fall into a local limit and the searching capability is weak.
A second objective of the present application is to provide an optimization device applied to the deployment of a gas pipe network leakage detector and a pressure sensor.
A third object of the present application is to provide a position determining apparatus applied to a gas leakage detector and a pressure sensor.
A fourth object of the present application is to propose a computer device.
A fifth object of the present application is to propose a non-transitory computer-readable storage medium.
In order to achieve the above object, an embodiment of the first aspect of the present application provides an optimization method applied to the deployment of a gas pipe network leakage detector and a pressure sensor, including the following steps:
step S10, acquiring a sensor group for monitoring gas and a gas pipeline, and initializing the sensor group, wherein the initialization of the sensor group comprises the steps of randomly initializing the position of each sensor in the sensor group and defining an objective function of the position of each sensor;
step S20, obtaining the objective function value of each sensor position and comparing to obtain the current optimum function value and the current optimum sensor corresponding to the current optimum function value;
step S30, updating the positions and the states of all sensors except the current optimal sensor by using a Levy flight mechanism, acquiring objective function values of all sensors except the current optimal sensor, comparing the acquired function values with the current optimal function values, and if the objective function values are better, updating and recording the current optimal function values and the current optimal sensor corresponding to the current optimal function values, wherein the current optimal sensor is a global optimal sensor;
and S40, performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor, and outputting the position of the global optimal sensor.
Optionally, in this embodiment of the application, initializing the sensor group in step S10 further includes: and setting the scale of the sensor group, the dimension of a search space, the maximum iteration number and the initial discovery probability.
Optionally, in this embodiment of the application, the method for obtaining the objective function value of each sensor position in step S20 specifically includes the following steps:
step S21, discretizing the monitored sensor group into a plurality of sub-areas, deploying a plurality of sensor nodes in the sub-areas, and forming a sensor set by the plurality of sensor nodes;
step S22, calculating the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes;
and step S23, optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
Optionally, in this embodiment of the application, the step S30 compares the obtained function value with the current optimal function value, and if the obtained function value is better, the current optimal function value and the current optimal sensor corresponding to the current optimal function value are updated and recorded, where the current optimal sensor is a global optimal sensor, and the method further includes updating the position of the current optimal sensor by using the following formula:
Figure BDA0003136976970000031
wherein r is a scaling factor, and r is in the range of 0,1]Obeying a uniform distribution of random numbers, xi t+1、xi tT +1 generation and t generation sensor groups respectively representing the ith sensor; x is the number ofj t、xi tRespectively represent the jth sensor and the ith sensor in the tth generation sensor group, wherein xj tIs xi tA nearby sensor.
Optionally, in this embodiment of the application, the step S30 further includes the following steps:
step S31, after the position is updated, the improved self-adapting scaling factor is compared with the self-adapting finding probability, if the self-adapting scaling factor is larger than the self-adapting finding probability, the position of the sensor is updated randomly;
otherwise, the sensor position is unchanged.
Step S32, when the algorithm iterates to a first threshold, whether the position of the global optimum sensor falls into a local optimum state is judged, if yes, the position of the global optimum sensor is updated by adopting a simulated annealing algorithm mechanism, a target function value of the global optimum sensor is calculated, a memory function is introduced to keep the position of the south optimum sensor in the annealing process, and after the annealing is finished, the current optimum function value and the current optimum sensor corresponding to the current optimum function value are obtained and then the step S30 is carried out;
if not, the process proceeds directly to step S30.
Step S33, when the algorithm iteration meets the maximum iteration times or meets the preset search precision requirement, executing the step S40;
otherwise, go back to execute the step S30.
In order to achieve the above object, an embodiment of the second aspect of the present application provides an optimization apparatus applied to gas pipe network leakage detector and pressure sensor deployment, including:
the initialization module is used for acquiring a sensor group for monitoring gas and a gas pipeline and initializing the sensor group, wherein the initialization of the sensor group comprises the steps of randomly initializing the position of each sensor in the sensor group and defining an objective function of the position of each sensor;
the comparison module is used for acquiring and comparing the objective function value of each sensor position to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value;
the updating module is used for updating the positions and the states of all the sensors except the current optimal sensor by utilizing a Levy flight mechanism, acquiring objective function values of all the sensors except the current optimal sensor, comparing the acquired function values with the current optimal function values, and if the acquired function values are better, updating and recording the current optimal function values and the current optimal sensor corresponding to the current optimal function values, wherein the current optimal sensor is a global optimal sensor;
and the optimization module is used for performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor and outputting the position of the global optimal sensor.
Optionally, in an embodiment of the present application, the comparing module specifically includes:
a discretization unit, configured to discretize the sensor group to be monitored into a plurality of sub-areas, deploy a plurality of sensor nodes in the sub-areas, and form a sensor set from the plurality of sensor nodes;
the computing unit is used for computing the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes;
and the optimization unit is used for optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
In order to achieve the above object, a third embodiment of the present application provides a position determining apparatus applied to a gas leakage detector and a pressure sensor, including:
the system comprises a first initialization module, a second initialization module and a third initialization module, wherein the first initialization module is used for initializing initial parameters of a cuckoo search algorithm, and the initial parameters comprise the number of sensors and the positions of the initial sensors; wherein the sensor number is indicative of a number of the plurality of gas leak detectors and pressure sensors, and the initial sensor position is indicative of a first position of the plurality of gas leak detectors and pressure sensors;
the calculation module is used for determining objective function values corresponding to the plurality of sensors according to the positions of the plurality of gas leakage detectors and the pressure sensors determined by the first initialization module; the objective function value is used for indicating the contribution degree of a plurality of gas leakage detectors and pressure sensors to gas leakage risk prevention, control, monitoring and early warning;
the position module is used for updating positions according to objective function values corresponding to the plurality of sensors determined by the calculation module and a preset algorithm, and determining the target position of the target sensor; the target sensor is any one of a plurality of sensors and is used for indicating a sensor to be finally deployed, and the target position is used for indicating the deployment position of the target sensor.
To achieve the above object, a fourth aspect of the present application provides a computer device, including: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to perform the method according to the embodiment of the first aspect of the present application.
In order to achieve the above object, a fifth aspect of the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored, wherein the computer program is configured to, when executed by a processor, implement the method according to the first aspect of the present application.
To sum up, the optimization method, the optimization device, the position determination device, the computer device and the non-transitory computer-readable storage medium applied to the deployment of the gas pipe network leakage detector and the pressure sensor in the embodiment of the present application acquire a sensor group for monitoring gas leakage and gas pipeline pressure, and initialize the sensor group to acquire a target function of each sensor position; acquiring an objective function value of each sensor position according to the objective function of each sensor position, and comparing the objective function values to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value; updating the positions and the states of all sensors except the current optimal sensor by using a Levis flight mechanism, acquiring objective function values of all sensors except the current optimal sensor, comparing the acquired function values with the current optimal function values, and if the acquired function values are better, updating and taking the current optimal sensor as a global optimal sensor; and performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor, and outputting the position of the global optimal sensor. Therefore, the scheme optimizes the arrangement of the gas leakage detector and the pipeline pressure sensor based on the Levy flight mechanism, and the mixed arrangement of the optimized gas leakage detector and the pipeline pressure sensor is used for gas risk prevention and control, monitoring and early warning, so that the problem that the existing optimization method is easy to fall into a local limit is avoided, and the cost of hardware equipment and the redundancy of monitoring data are reduced.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of an optimization method applied to gas pipe network leakage detector and pressure sensor deployment according to an embodiment of the present disclosure;
FIG. 2 is a block diagram of a cuckoo algorithm in an embodiment of the present application;
FIG. 3 is a graph of an initialization node distribution in an embodiment of the present application;
FIG. 4 is a MATLAB simulation of the Lewy flight regime in an embodiment of the present application;
FIG. 5 is a node distribution diagram after optimization in an embodiment of the present application; and
fig. 6 is a schematic structural diagram of an optimization apparatus applied to gas pipe network leakage detector and pressure sensor deployment according to an embodiment of the present disclosure; and
fig. 7 is a schematic structural diagram of a position determination device applied to a gas pipeline network leakage detector and a pressure sensor according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The following describes a method and an apparatus for optimizing the deployment of a gas pipe network leakage detector and a pressure sensor according to an embodiment of the present application with reference to the drawings.
Fig. 1 is a flowchart of an optimization method applied to gas pipe network leak detector and pressure sensor deployment according to an embodiment of the present disclosure.
Fig. 2 is a block diagram of a cuckoo algorithm in the embodiment of the present application.
As shown in fig. 1 and fig. 2, an optimization method applied to the deployment of a gas pipe network leakage detector and a pressure sensor provided in an embodiment of the present application includes the following steps:
step S10, as shown in fig. 3, obtaining a sensor group for monitoring gas leakage and gas pipeline pressure, and initializing the sensor group, where the initializing the sensor group includes randomly initializing a position of each sensor in the sensor group, and defining an objective function of the position of each sensor, where the sensor position is randomly set to (x)i,yi),i∈[1,n]The target function for each sensor position is denoted as f (x), x ═ x1,x2,…,xn]T
In an embodiment of the present application, initializing the sensor group further includes: and setting the scale of the sensor group, the dimension of a search space, the maximum iteration number and the initial discovery probability.
And step S20, acquiring the objective function value of each sensor position and comparing the objective function values to obtain the current optimal function value and the current optimal sensor corresponding to the current optimal function value.
Further, in this embodiment of the present application, the method for obtaining the objective function value of each sensor position specifically includes the following steps:
step S21, discretizing the monitored sensor cluster into a plurality of sub-areas, deploying a plurality of sensor nodes in the sub-areas, and forming a sensor set from the plurality of sensor nodes.
Specifically, in the embodiment of the present application, a monitored region is discretized into m × N sub-regions, and a sensor set C { C } consisting of N sensor nodes is deployed in the region1,c2,…,cn}。
And step S22, calculating the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes.
The specific calculation processes of the coverage rate, the node utilization rate and the energy balance coefficient of the plurality of sensor nodes in the implementation of the method are as follows:
let i the ith sensor node ciHas the coordinate of ci=(xi,yi) For coordinates of the target subregion p as (x, y), the probability that the target subregion p is covered by the sensor set C is:
Figure BDA0003136976970000061
wherein the position coordinates c of the sensoriThe information may be one-dimensional coordinate information, two-dimensional coordinate information, or three-dimensional coordinate information, and the above embodiment is only exemplified by two-dimensional coordinates.
Specifically, in the embodiment of the present application, the node adopts a boolean (0-1) perception model, and then the target sub-region p is detected by the sensor node ciThe probability covered is:
Figure BDA0003136976970000062
wherein R is the monitoring radius of the sensor node, and for the gas leakage detector, the monitoring radius can be influenced by the porosity, the water content and the like of soil near the pipe network; for a pipe network pressure sensor, the monitoring radius can be influenced by the diameter of a pipe network, the gas pressure and the like. The monitoring radius is far smaller than the communication radius between the sensor nodes; d (c)iP) is a sensor node ciThe euclidean distance to the target subregion p is given by:
Figure BDA0003136976970000063
therefore, the node coverage rate of the monitored area is represented as a ratio of the number of sub-areas covered by the sensor node in the working area to the total number of sub-areas in the working area, and is represented by the following formula:
Figure BDA0003136976970000071
the node utilization of the monitored area represents the ratio of the nodes in the deployment area in the working state to the total N sensor nodes, as shown in the following formula:
Figure BDA0003136976970000072
the energy balance coefficient of the monitored area represents the energy balance degree of the node which works effectively, and is shown as the following formula:
Figure BDA0003136976970000073
therein, max (E)i) Node representing the maximum remaining energy among all sensor nodes, min (E)i) Representing the node of minimum remaining energy among all sensor nodes, and K represents the number of nodes that are actively working.
The node coverage of the gas leak detector is expressed as muleakNode utilization rate
Figure BDA0003136976970000074
Coefficient of energy balance etaleak(ii) a The node coverage rate of the pipe network pressure sensor is expressed as mupressureNode utilization rate
Figure BDA0003136976970000075
Coefficient of energy balance etapressure
The gas leakage detector and the pipeline pressure sensor are not arranged at the same position at the same time.
And step S23, optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
In the embodiment of the application, an objective function of each sensor position is optimized according to three indexes, namely coverage rate, utilization rate and energy balance coefficient of a network node, and the optimized objective function is represented by the following formula:
Figure BDA0003136976970000076
wherein ω is1、ω2、ω3Weight coefficient, omega, for each sub-target of the corresponding gas leakage detector123=1;ω4、ω5、ω6Is the weight coefficient, omega, of each sub-target of the corresponding pipe network pressure sensor456=1;ξleak、ξpressureRespectively the contribution degree of the gas leakage detector and the pipe network pressure sensor to the gas leakage risk prevention and control and the monitoring and early warning technology, xileakpressure=1。
Step S30, as shown in fig. 4, the levy flight mechanism is used to update the positions and states of all sensors except the current optimal sensor, and obtain the objective function values of all sensors except the current optimal sensor, compare the obtained function values with the current optimal function values, and if the obtained function values are better, update and record the current optimal function values and the current optimal sensor corresponding to the current optimal function values, where the current optimal sensor is the global optimal sensor.
In the embodiment of the present application, a formula (levy flight formula) of the levy flight mechanism is:
Figure BDA0003136976970000077
wherein r is a Gamma function;
wherein s is a random step length of the Levy distribution, and the expression is as follows:
Figure BDA0003136976970000081
wherein u to N (0, sigma)2) v.N (0, 1). Wherein, the expression of sigma is:
Figure BDA0003136976970000082
comparing the obtained function value with the current optimal function value in step S30 of the embodiment of the present application, and if the obtained function value is better, updating and recording the current optimal function value and the current optimal sensor corresponding to the current optimal function value, where the current optimal sensor is a global optimal sensor, and the method further includes updating the position of the current optimal sensor by the following formula:
Figure BDA0003136976970000083
wherein r is a scaling factor, and r is in the range of 0,1]Obeying a uniform distribution of random numbers, xi t+1、xi tT +1 generation and t generation sensor groups respectively representing the ith sensor; x is the number ofj t、xi tRespectively represent the jth sensor and the ith sensor in the tth generation sensor group, wherein xj tIs xi tA nearby sensor.
Specifically, the embodiment of the present application updates the sensor position in the following manner:
when the sensor i needs to generate a new position xt+1Then, executing once a levy flight formula as shown in the following formula:
Lévy(λ)~u=t,(1≤λ≤3).
thus, the sensor position update formula is as follows:
Figure BDA0003136976970000084
further, step S30 in the embodiment of the present application further includes the following steps:
step S31, after the position is updated, the improved self-adapting scaling factor is compared with the self-adapting finding probability, if the self-adapting scaling factor is larger than the self-adapting finding probability, the position of the sensor is updated randomly; otherwise, the sensor position is unchanged. According to the method, the cuckoo algorithm is improved by adopting double parameters of the self-adaptive step length and the self-adaptive discovery probability, the problem that the sensing cuckoo algorithm is easy to fall into a local limit is avoided, and the searching capacity and the convergence speed are effectively improved.
Specifically, in the embodiment of the present application, the adaptive scaling factor r and the adaptive discovery probability Pa are calculated by the following formula:
Figure BDA0003136976970000085
Figure BDA0003136976970000086
wherein r isi tA scaling factor for the ith sensor in the t-generation sensor group; r ismaxAnd rminRespectively the upper limit and the lower limit of the scaling factor; f. ofi t、fbest tAnd fworst tThe fitness values of the ith sensor, the optimal sensor and the worst sensor in the t generation sensor group are respectively set; p is a radical ofa tThe probability of finding the ith sensor in the t generation sensor group is obtained; p is a radical ofamaxAnd paminTo find the upper and lower bounds of the probability.
Probability of discovery PaThe following update method may also be employed. P in primitive cuckoo algorithmaIs a fixed value; in the actual optimization process, along with the continuous increase of the iteration times, the result is more and more close to the optimal value, and the probability P is found at the momentaIf the original base number is still kept, a large number of high-quality solutions are eliminated, and the optimization performance of the algorithm is damaged; therefore, the discovery probability P is updated by the learning rate attenuation method using the following equationaMake the discovery probability PaBecomes a value that varies with the number of iterations:
Pa=0.95tPa0
where t is the number of iterations, Pa0For initial discovery probability, take 0.25.
Step S32, when the algorithm iterates to a first threshold, whether the position of the global optimum sensor falls into a local optimum state is judged, if yes, the position of the global optimum sensor is updated by adopting a simulated annealing algorithm mechanism, a target function value of the global optimum sensor is calculated, a memory function is introduced to keep the position of the south optimum sensor in the annealing process, and after the annealing is finished, the current optimum function value and the current optimum sensor corresponding to the current optimum function value are obtained and then the step S30 is carried out; wherein the first threshold in the iteration of the algorithm to the first threshold is step 12 of proceeding, as shown in fig. 2.
If not, the process proceeds directly to step S30.
Specifically, in the embodiment of the present application, whether the position of the global optimum sensor falls into the local optimum state is determined by the following equation:
Figure BDA0003136976970000091
after the nest of the cuckoo is updated by adopting a simulated annealing algorithm mechanism, new discovery probability and random number are calculated and used as a measurement for judging whether to give up a solution, and the calculation formula is as follows:
Figure BDA0003136976970000092
ri′=(ri+Pai)/2
step S33, when the algorithm iteration meets the maximum iteration times or meets the preset search precision requirement, executing the step S40;
otherwise, go back to execute the step S30.
And step S40, performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor, and outputting the position of the global optimal sensor, wherein the optimized sensor node distribution diagram is shown in FIG. 5.
In summary, the optimization method applied to the deployment of the gas pipe network leakage detector and the pressure sensor provided by the embodiment of the application utilizes the advantages that the cuckoo algorithm has few parameters, is easy to implement, has strong searching capability and the like, and improves the cuckoo algorithm by adopting double parameters of self-adaptive step length and self-adaptive discovery probability on the basis of the existing cuckoo algorithm, thereby avoiding the problem that the sensing cuckoo algorithm is easy to fall into local limit, and effectively improving the searching capability and the convergence speed; and on the other hand, the sensor network coverage rate, the node utilization rate and the network balance coefficient are taken as comprehensive optimization targets, and the multi-objective optimization is carried out on the sensor network.
Fig. 6 is a schematic structural diagram of an optimization apparatus applied to gas pipe network leakage detector and pressure sensor deployment according to an embodiment of the present disclosure.
As shown in fig. 6, an optimization apparatus applied to gas pipe network leakage detector and pressure sensor deployment provided in an embodiment of the present application includes:
the initialization module 10 is configured to acquire a sensor group for monitoring gas leakage and gas pipeline pressure, and initialize the sensor group, where initializing the sensor group includes randomly initializing a position of each sensor in the sensor group, and defining an objective function of the position of each sensor.
And the comparison module 20 is configured to obtain an objective function value of each sensor position and compare the objective function values to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value.
The comparison module 20 in the embodiment of the present application specifically includes:
a discretization unit, configured to discretize the sensor group to be monitored into a plurality of sub-areas, deploy a plurality of sensor nodes in the sub-areas, and form a sensor set from the plurality of sensor nodes;
the computing unit is used for computing the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes;
and the optimization unit is used for optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
And the updating module 30 is configured to update the positions and the states of all the sensors except the current optimal sensor by using a levy flight mechanism, obtain objective function values of all the sensors except the current optimal sensor, compare the obtained function values with the current optimal function values, and if the obtained function values are better, update and record the current optimal function values and the current optimal sensor corresponding to the current optimal function values, where the current optimal sensor is a global optimal sensor.
And the optimization module 40 is used for performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor, and outputting the position of the global optimal sensor.
Fig. 7 is a schematic structural diagram of a position determining apparatus applied to a gas leakage detector and a pressure sensor according to an embodiment of the present disclosure.
In order to implement the above embodiment, as shown in fig. 7, the present application further provides a position determining apparatus applied to a gas leakage detector and a pressure sensor, including:
a first initialization module 50, configured to initialize initial parameters of a cuckoo search algorithm, where the initial parameters include the number of sensors and initial sensor positions; wherein the sensor number is indicative of a number of the plurality of gas leak detectors and pressure sensors, and the initial sensor position is indicative of a first position of the plurality of gas leak detectors and pressure sensors;
a calculating module 60, configured to determine objective function values corresponding to the multiple sensors according to the positions of the multiple gas leakage detectors and the pressure sensors determined by the first initializing module; the objective function value is used for indicating the contribution degree of a plurality of gas leakage detectors and pressure sensors to gas leakage risk prevention, control, monitoring and early warning;
a position module 70, configured to update positions according to objective function values and a preset algorithm corresponding to the multiple sensors determined by the calculation module, and determine target positions of the target sensors; the target sensor is any one of a plurality of sensors and is used for indicating a sensor to be finally deployed, and the target position is used for indicating the deployment position of the target sensor.
In summary, the above scheme provided by the embodiment of the present application has the following advantages:
the method has the advantages that: the gas leakage detector and the pipeline pressure sensor are arranged in a mixed mode and used for gas risk prevention and control, monitoring and early warning, different weight coefficients are given to the two sensors according to the contribution degree of the two sensors to the gas risk prevention and control, monitoring and early warning technology, and the gas leakage detector and the pipeline pressure sensor are used for sensor deployment optimization design based on the cuckoo algorithm.
The advantages are two: many problems in scientific and engineering practice can be attributed to optimization problems. Compared with bionic intelligent algorithms which are more completely developed such as ACO (ant colony optimization), PSO (particle swarm optimization) and the like, the cuckoo algorithm adopts Levy flight random walk and deviation random walk to construct a new solution, so that the global search capability is better, the local search capability is stronger, and the performance is better. The new solution generated by the random deviation swimming is actually a mutation operation on the individual, so that the sensor group keeps high diversity. The larger the value of the scaling factor r is, the more the variation of an individual is, and the larger the contribution to the constructed new solution is; conversely, the smaller the variation of an individual, the smaller the contribution to the construction of a new solution. Probability of discovery PaThe larger the value is, the higher the probability of generating a new solution is, the larger the contribution to the next generation solution is, and the search capability and the convergence speed acceleration are facilitated to be improved; on the contrary, the smaller the contribution to the next generation solution, the less the search capability is improved and the convergence speed is accelerated.
The scaling factor r in the standard cuckoo algorithm is randomly generated and generally has positive correlation with the step length; probability of discovery PaThe method is a fixed value, and the scaling factor r is reduced along with the reduction of the step length due to the reduction of the search space in the later evolution stage, so that the algorithm is easy to have the problems of reduced variation capability, local optimization, low convergence speed, low precision and the like.
In other words, the embodiment of the application optimizes the standard cuckoo algorithm by adopting the double-parameter improved cuckoo algorithm of the self-adaptive step length and the self-adaptive discovery probability, so that the problem that the standard cuckoo algorithm is easy to fall into the local optimum is solved, the searching capacity and the convergence speed are effectively improved, in addition, whether the position of the sensor falls into the local optimum state is judged again by adopting a simulated annealing algorithm mechanism, and the two methods are jointly used, so that the algorithm is effectively ensured not to fall into the local optimum.
The target function combining the gas leakage sensor and the pressure sensor is provided for two different types of detectors, and the method has important significance for gas leakage risk prevention and control, monitoring and early warning.
In order to implement the foregoing embodiments, the present application further provides a computer device, which is characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the optimization method applied to the deployment of the gas pipeline network leakage detector and the pressure sensor according to the foregoing embodiments.
In order to implement the above embodiments, the present application further proposes a non-transitory computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the optimization method applied to gas pipe network leak detector and pressure sensor deployment described in the above embodiments.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. An optimization method applied to the deployment of a gas pipe network leakage detector and a pressure sensor is characterized by comprising the following steps:
step S10, acquiring a sensor group for monitoring gas leakage and gas pipeline pressure, and initializing the sensor group, wherein the initialization of the sensor group comprises randomly initializing the position of each sensor in the sensor group and defining an objective function of the position of each sensor;
step S20, obtaining the objective function value of each sensor position and comparing to obtain the current optimum function value and the current optimum sensor corresponding to the current optimum function value;
step S30, updating the positions and the states of all sensors except the current optimal sensor by using a Levy flight mechanism, acquiring objective function values of all sensors except the current optimal sensor, comparing the acquired function values with the current optimal function values, and if the objective function values are better, updating and recording the current optimal function values and the current optimal sensor corresponding to the current optimal function values, wherein the current optimal sensor is a global optimal sensor;
and S40, performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor, and outputting the position of the global optimal sensor.
2. The method of claim 1, wherein the step S10 of initializing the sensor group further comprises: and setting the scale of the sensor group, the dimension of a search space, the maximum iteration number and the initial discovery probability.
3. The optimization method applied to gas pipe network leakage detector and pressure sensor deployment according to claim 1, wherein the method for obtaining the objective function value of each sensor position in step S20 specifically includes the following steps:
step S21, discretizing the monitored sensor group into a plurality of sub-areas, deploying a plurality of sensor nodes in the sub-areas, and forming a sensor set by the plurality of sensor nodes;
and step S22, calculating the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes.
And step S23, optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
4. The method as claimed in claim 1, wherein the step S30 compares the obtained function value with the current optimal function value, and if the obtained function value is better, the current optimal function value and the current optimal sensor corresponding to the current optimal function value are updated and recorded, wherein the current optimal sensor is a global optimal sensor, and the method further comprises updating the position of the current optimal sensor according to the following formula:
Figure FDA0003136976960000021
wherein r is a scaling factor, and r is in the range of 0,1]Obeying a uniform distribution of random numbers, xi t+1、xi tT +1 generation and t generation sensor groups respectively representing the ith sensor; x is the number ofj t、xi tRespectively represent the jth sensor and the ith sensor in the tth generation sensor group, wherein xj tIs xi tA nearby sensor.
5. The optimization method applied to the deployment of the gas pipe network leakage detector and the pressure sensor according to any one of claims 1 to 4, wherein the step S30 further comprises the following steps:
step S31, after the position is updated, the improved self-adapting scaling factor is compared with the self-adapting finding probability, if the self-adapting scaling factor is larger than the self-adapting finding probability, the position of the sensor is updated randomly;
otherwise, the sensor position is unchanged.
Step S32, when the algorithm iterates to a first threshold, judging whether the position of the global optimum sensor falls into a local optimum state, if so, updating the position of the global optimum sensor by adopting a simulated annealing algorithm mechanism, calculating a target function value of the global optimum sensor, introducing a memory function to reserve the position of the optimum sensor in the annealing process, acquiring a current optimum function value and a current optimum sensor corresponding to the current optimum function value after the annealing is finished, and then transferring to the step S30;
if not, the process proceeds directly to step S30.
Step S33, when the algorithm iteration meets the maximum iteration times or meets the preset search precision requirement, executing the step S40;
otherwise, go back to execute the step S30.
6. The utility model provides an be applied to optimization device that gas pipe network leak detector and pressure sensor deployed which characterized in that includes:
the initialization module is used for acquiring a sensor group for monitoring gas leakage and gas pipeline pressure and initializing the sensor group, wherein the initialization of the sensor group comprises the random initialization of the position of each sensor in the sensor group and the definition of an objective function of the position of each sensor;
the comparison module is used for acquiring and comparing the objective function value of each sensor position to obtain a current optimal function value and a current optimal sensor corresponding to the current optimal function value;
the updating module is used for updating the positions and the states of all the sensors except the current optimal sensor by utilizing a Levy flight mechanism, acquiring objective function values of all the sensors except the current optimal sensor, comparing the acquired function values with the current optimal function values, and if the acquired function values are better, updating and recording the current optimal function values and the current optimal sensor corresponding to the current optimal function values, wherein the current optimal sensor is a global optimal sensor;
and the optimization module is used for performing layout optimization on the gas pipe network leakage detector and the pressure sensor according to the position of the global optimal sensor and outputting the position of the global optimal sensor.
7. The optimization method applied to gas pipe network leak detector and pressure sensor deployment according to claim 6, wherein the comparison module specifically comprises:
a discretization unit, configured to discretize the sensor group to be monitored into a plurality of sub-areas, deploy a plurality of sensor nodes in the sub-areas, and form a sensor set from the plurality of sensor nodes;
the computing unit is used for computing the coverage rate, the node utilization rate and the energy balance coefficient of the sensor nodes;
and the optimization unit is used for optimizing an objective function of each sensor position according to the coverage rate, the node utilization rate and the energy balance coefficient.
8. A position determining apparatus applied to a gas leakage detector and a pressure sensor, comprising:
the system comprises a first initialization module, a second initialization module and a third initialization module, wherein the first initialization module is used for initializing initial parameters of a cuckoo search algorithm, and the initial parameters comprise the number of sensors and the positions of the initial sensors; wherein the sensor number is indicative of a number of the plurality of gas leak detectors and pressure sensors, and the initial sensor position is indicative of a first position of the plurality of gas leak detectors and pressure sensors;
the calculation module is used for determining objective function values corresponding to the plurality of sensors according to the positions of the plurality of gas leakage detectors and the pressure sensors determined by the first initialization module; the objective function value is used for indicating the contribution degree of a plurality of gas leakage detectors and pressure sensors to gas leakage risk prevention, control, monitoring and early warning;
the position module is used for updating positions according to objective function values corresponding to the plurality of sensors determined by the calculation module and a preset algorithm, and determining the target position of the target sensor; the target sensor is any one of a plurality of sensors and is used for indicating a sensor to be finally deployed, and the target position is used for indicating the deployment position of the target sensor.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1-5 when executing the computer program.
10. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1-5.
CN202110721451.4A 2021-06-28 2021-06-28 Optimization method applied to gas pipe network leakage detector and pressure sensor deployment Pending CN113473501A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110721451.4A CN113473501A (en) 2021-06-28 2021-06-28 Optimization method applied to gas pipe network leakage detector and pressure sensor deployment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110721451.4A CN113473501A (en) 2021-06-28 2021-06-28 Optimization method applied to gas pipe network leakage detector and pressure sensor deployment

Publications (1)

Publication Number Publication Date
CN113473501A true CN113473501A (en) 2021-10-01

Family

ID=77873383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110721451.4A Pending CN113473501A (en) 2021-06-28 2021-06-28 Optimization method applied to gas pipe network leakage detector and pressure sensor deployment

Country Status (1)

Country Link
CN (1) CN113473501A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116341761A (en) * 2023-05-22 2023-06-27 北京京燃凌云燃气设备有限公司 Optimized deployment method and system for remote control mechanism of gas pipe network valve
CN116383769A (en) * 2023-05-19 2023-07-04 陕西科诺特斯科技技术有限公司 Sensor-based gas data detection method and system
CN118114885A (en) * 2024-04-26 2024-05-31 北京理工大学前沿技术研究院 Gas pipeline dynamic risk early warning platform based on Internet of things model
CN118228601A (en) * 2024-04-11 2024-06-21 湖南艾尔希科技发展有限公司 Helium storage leakage early warning system and method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116383769A (en) * 2023-05-19 2023-07-04 陕西科诺特斯科技技术有限公司 Sensor-based gas data detection method and system
CN116383769B (en) * 2023-05-19 2023-08-15 陕西科诺特斯科技技术有限公司 Sensor-based gas data detection method and system
CN116341761A (en) * 2023-05-22 2023-06-27 北京京燃凌云燃气设备有限公司 Optimized deployment method and system for remote control mechanism of gas pipe network valve
CN116341761B (en) * 2023-05-22 2023-08-25 北京京燃凌云燃气设备有限公司 Optimized deployment method and system for remote control mechanism of gas pipe network valve
CN118228601A (en) * 2024-04-11 2024-06-21 湖南艾尔希科技发展有限公司 Helium storage leakage early warning system and method
CN118228601B (en) * 2024-04-11 2024-08-16 湖南艾尔希科技发展有限公司 Helium storage leakage early warning system and method
CN118114885A (en) * 2024-04-26 2024-05-31 北京理工大学前沿技术研究院 Gas pipeline dynamic risk early warning platform based on Internet of things model

Similar Documents

Publication Publication Date Title
CN113473501A (en) Optimization method applied to gas pipe network leakage detector and pressure sensor deployment
Zan Research on robot path perception and optimization technology based on whale optimization algorithm
Ayvaz Simultaneous determination of aquifer parameters and zone structures with fuzzy c-means clustering and meta-heuristic harmony search algorithm
CN104950883A (en) Mobile robot route planning method based on distance grid map
Yan et al. Modified PSO algorithms with “Request and Reset” for leak source localization using multiple robots
CN101459914A (en) Wireless sensor network node coverage optimization method based on ant colony algorithm
CN101448267A (en) Wireless sensor network node coverage optimization method based on particle swarm algorithm
CN114827929A (en) Multi-sensor network collaborative deployment method and device based on improved particle swarm optimization
CN109299778B (en) RCRSS rescue map partition calculation method based on cuckoo search algorithm
CN113240068A (en) RBF neural network optimization method based on improved ant lion algorithm
Zaimen et al. A survey of artificial intelligence based wsns deployment techniques and related objectives modeling
Mnasri et al. A hybrid ant-genetic algorithm to solve a real deployment problem: a case study with experimental validation
CN113671942A (en) Apparatus and method for controlling robot
CN113361087A (en) Method and system for optimizing position layout of lateral line detection sensors of underwater vehicle
JP7047576B2 (en) Cartography device
CN115688562A (en) Grounding grid corrosion diagnosis method and system based on improved wolf optimization algorithm
CN107657311A (en) Test method for optimizing based on multi-objective particle swarm algorithm
CN107396375B (en) Quantum brain storm-based optimal target coverage method for heterogeneous sensor network
Guo et al. Analysis of local communication load in shape formation of a distributed morphogenetic swarm robotic system
Corne et al. Using computational intelligence techniques to model subglacial water systems
CN107197519B (en) Underwater target positioning method based on improved least square support vector machine
JP7380902B2 (en) Object detection device, learned model generation method, and program
Mohsen et al. A robust harmony search algorithm based Markov model for node deployment in hybrid wireless sensor networks
Zhong et al. Sustainable Environmental Design Using Green IOT with Hybrid Deep Learning and Building Algorithm for Smart City
Khoshrangbaf et al. Ant colony based coverage optimization in wireless sensor networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination