CN113192569B - Harmful gas monitoring method based on improved particle swarm and error feedback neural network - Google Patents
Harmful gas monitoring method based on improved particle swarm and error feedback neural network Download PDFInfo
- Publication number
- CN113192569B CN113192569B CN202110511330.7A CN202110511330A CN113192569B CN 113192569 B CN113192569 B CN 113192569B CN 202110511330 A CN202110511330 A CN 202110511330A CN 113192569 B CN113192569 B CN 113192569B
- Authority
- CN
- China
- Prior art keywords
- particle
- particle swarm
- neural network
- error feedback
- particles
- 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.)
- Active
Links
- 239000002245 particle Substances 0.000 title claims abstract description 325
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 75
- 238000000034 method Methods 0.000 title claims abstract description 23
- 238000012544 monitoring process Methods 0.000 title claims abstract description 13
- 238000005457 optimization Methods 0.000 claims abstract description 43
- 238000012549 training Methods 0.000 claims abstract description 17
- 238000012423 maintenance Methods 0.000 claims abstract description 7
- 238000011161 development Methods 0.000 claims description 41
- 239000007789 gas Substances 0.000 claims description 36
- 239000011159 matrix material Substances 0.000 claims description 30
- 238000009792 diffusion process Methods 0.000 claims description 10
- 230000006870 function Effects 0.000 claims description 10
- 239000002341 toxic gas Substances 0.000 claims description 9
- 230000007246 mechanism Effects 0.000 claims description 7
- LELOWRISYMNNSU-UHFFFAOYSA-N hydrogen cyanide Chemical compound N#C LELOWRISYMNNSU-UHFFFAOYSA-N 0.000 claims description 6
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 5
- 238000001514 detection method Methods 0.000 claims description 4
- 229910000037 hydrogen sulfide Inorganic materials 0.000 claims description 4
- 238000004451 qualitative analysis Methods 0.000 claims description 4
- UGFAIRIUMAVXCW-UHFFFAOYSA-N Carbon monoxide Chemical compound [O+]#[C-] UGFAIRIUMAVXCW-UHFFFAOYSA-N 0.000 claims description 3
- RWSOTUBLDIXVET-UHFFFAOYSA-N Dihydrogen sulfide Chemical compound S RWSOTUBLDIXVET-UHFFFAOYSA-N 0.000 claims description 3
- LFQSCWFLJHTTHZ-UHFFFAOYSA-N Ethanol Chemical compound CCO LFQSCWFLJHTTHZ-UHFFFAOYSA-N 0.000 claims description 3
- 229910002091 carbon monoxide Inorganic materials 0.000 claims description 3
- 238000011155 quantitative monitoring Methods 0.000 claims description 3
- 230000003993 interaction Effects 0.000 claims description 2
- 238000004445 quantitative analysis Methods 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 229910052739 hydrogen Inorganic materials 0.000 description 1
- 239000001257 hydrogen Substances 0.000 description 1
- 125000004435 hydrogen atom Chemical class [H]* 0.000 description 1
- 231100000331 toxic Toxicity 0.000 description 1
- 230000002588 toxic effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/20—Identification of molecular entities, parts thereof or of chemical compositions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/086—Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G08—SIGNALLING
- G08B—SIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
- G08B21/00—Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
- G08B21/02—Alarms for ensuring the safety of persons
- G08B21/12—Alarms for ensuring the safety of persons responsive to undesired emission of substances, e.g. pollution alarms
- G08B21/14—Toxic gas alarms
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/70—Machine learning, data mining or chemometrics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Biophysics (AREA)
- General Engineering & Computer Science (AREA)
- Molecular Biology (AREA)
- Mathematical Physics (AREA)
- Biomedical Technology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computational Linguistics (AREA)
- Chemical & Material Sciences (AREA)
- Toxicology (AREA)
- Crystallography & Structural Chemistry (AREA)
- Evolutionary Biology (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Physiology (AREA)
- Environmental & Geological Engineering (AREA)
- Business, Economics & Management (AREA)
- Emergency Management (AREA)
- Testing And Monitoring For Control Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a harmful gas monitoring method based on an improved particle swarm and an error feedback neural network, which comprises the steps of firstly utilizing an MQ series sensor to form a gas sensor array, installing the gas sensor array in a rail transit system gate, and collecting gas data in real time; after the gas data are acquired, the acquired gas data are qualitatively identified and quantitatively analyzed by using an improved particle swarm optimization algorithm and an error feedback neural network method, and finally, whether harmful gas and hazard levels exist or not is obtained by comparing the acquired gas data with a preset threshold value, early warning is timely carried out on operation and maintenance personnel, and the safety of personnel in a carriage and a platform is ensured. According to the invention, the weight and the threshold of the error feedback neural network are optimized by using the improved particle swarm optimization algorithm, and then the error feedback neural network is learned, so that the convergence speed and the precision of the error feedback neural network are improved, and the training times of the error feedback neural network are reduced.
Description
Technical Field
The invention belongs to the field of air monitoring, and particularly relates to a harmful gas monitoring method based on an improved particle swarm and an error feedback neural network.
Background
The subway is an urban rail transit system which operates as a main underground, and takes on the main personnel flowing task of large and medium-sized cities. As the underground environment is mostly deep, the environment is relatively closed, and the space is relatively closed, once toxic gas leakage occurs or the influence of a manual toxic release event is extremely severe, the toxic gas in the subway is perceived at the first time and the content of the toxic gas is quantitatively analyzed, and the underground environment early warning system timely warn operation and maintenance personnel, and have practical application values.
Disclosure of Invention
The invention aims to: in order to overcome the problems in the prior art, the invention discloses a harmful gas monitoring method based on an improved particle swarm and an error feedback neural network, which is applied to subway carriages and platforms, and the harmful gas and the hazard level thereof are obtained through qualitative identification and quantitative analysis, so that early warning is timely carried out on operation and maintenance personnel, and the safety of personnel in the carriages and the platforms is ensured.
The technical scheme is as follows: in order to achieve the above purpose, the invention adopts the following technical scheme: the harmful gas monitoring method based on the improved particle swarm and the error feedback neural network is characterized by comprising the following steps of:
S1, optimizing an error feedback neural network by using a particle swarm optimization algorithm, namely taking an optimal solution output by the particle swarm optimization algorithm as an initial weight and an initial threshold of the error feedback neural network, inputting a training sample into the optimized error feedback neural network, and entering a step S2 if the global average error meets the requirement, otherwise, re-optimizing the error feedback neural network by using the particle swarm optimization algorithm;
s2, learning an error feedback neural network optimized aiming at a training sample, and obtaining a weight and a threshold of the final error feedback neural network, wherein the training of the error feedback neural network is completed;
S3, installing the gas sensor array in a rail transit system gate, collecting gas data, and inputting the gas data into a trained error feedback neural network to start qualitative analysis and quantitative monitoring of gas components;
And S4, comparing the quantitative detection result with a preset threshold value to obtain whether toxic gas components are contained or not and the content of the toxic gas components, giving a specific early warning grade, and reporting to operation and maintenance personnel.
Preferably, the improved multi-population particle swarm optimization algorithm based on the information diffusion mechanism consists of N particle swarms, wherein each particle swarm is divided into a exploring particle swarm I i (1.ltoreq.i.ltoreq.N), a developing particle swarm F i (1.ltoreq.i.ltoreq.N) and an updating particle swarm G i (1.ltoreq.i.ltoreq.N), and after each step of particle swarm iterative operation, information interaction among the N particle swarms is carried out through the information diffusion mechanism, so that one iteration updating of the particle swarm is completed:
the update formula of each search particle speed and position in the j-th search particle swarm I j is as follows:
Wherein, Represent the inertial velocity weights in the j-th search particle swarm,/>The inertia position weight in the j-th search particle group is represented. /(I)Representing the velocity of search particle i in the jth search particle group in the kth iteration,/>Representing the position of search particle i in the jth search particle group in the kth iteration,/>Respectively obtaining a first preset weight factor and a second preset weight factor of exploring particles in the j exploring particle swarm,/>Respectively, are random numbers with values in the (0, 1) interval,/>For this purpose, the historical optimal position of particle i is explored,/>To explore the global optimal position of particle swarm I j;
the update formula of the velocity and the position of each development particle in the jth development particle swarm F j is as follows:
Wherein, Representing the inertial velocity weight in the j-th development particle swarm,/>Representing inertial position weights in a j-th development particle swarm; /(I)Representing the velocity of development particle i in the jth development particle group in the kth iteration,/>Representing the position of development particle i in the jth development particle group in the kth iteration,/>Respectively a first preset weight factor and a second preset weight factor of development particles in the jth development particle swarm,/>Respectively, are random numbers with values in the (0, 1) interval,/>For this purpose, the historical optimal position of particle i is developed,/>To explore the global optimal position of the particle swarm F j; the inertial velocity weight and the inertial position weight of the development particles are respectively smaller than those of the exploration particles;
Wherein each updated particle velocity and position update formula in the jth updated particle swarm G j is
Wherein,Representing the inertial velocity weight in the jth update particle swarm,/>Representing the inertial position weight in the jth updated particle swarm; /(I)Representing the velocity of update particle i in the jth update particle group in the kth iteration,/>Representing the position of update particle i in the jth update particle group in the kth iteration,/>Respectively a first preset weight factor and a second preset weight factor of the updated particles in the jth updated particle swarm,/>Respectively, are random numbers with values in the (0, 1) interval,/>To this end, the historical optimal position of particle i is updated,/>To update the global optimum position of the particle swarm G j; The fitness value of the updated particle i in the kth iteration is represented;
After the N particle groups are respectively updated, effective information is diffused by using an information diffusion mechanism, so that the optimizing precision of the whole algorithm is improved, the running speed of the algorithm is accelerated, and the method comprises the following steps:
Among N exploring particle groups Based on which M optimal search particles/>, respectively, are selectedOf N development particle groups, to/>Based on which M optimal development particles/>, respectively, are selectedAmong N updated particle groups, to/>Based on which M optimal updated particles/>, respectively, are selectedAnd respectively carrying out state updating on the optimal M particles selected from each exploring particle swarm, developing particle swarm and updating particle swarm according to the following formula by utilizing the speed and position information of the optimal particles:
Wherein the method comprises the steps of P=I, G, F is the particle information diffusion weight,/>Wherein/>Taking the random number between (0, 1) as a random factor, and ensuring the inconsistency of each particle swarm.
Preferably, step S1 comprises:
S101, respectively converting a weight matrix and a threshold matrix from an input layer to a hidden layer, and a weight matrix and a threshold matrix from the hidden layer to an output layer in an error feedback neural network into a one-dimensional array, taking the one-dimensional array as an optimization variable of a particle swarm optimization algorithm, taking a global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an error upper limit value;
S102, initializing parameters of a particle swarm optimization algorithm, including: the number N of particle groups, the total number of particles in each particle group is set to be Q, the particles in each particle group are divided into exploring particles, developing particles and updating particles, the proportion of the exploring particle groups, the developing particle groups and the updating particle groups in each particle group is determined, and the number of each particle is determined; the maximum iteration number k max, the iteration number is set to 0, a search space is determined, and initial solutions are randomly generated in the search space, namely the positions and the speeds of all particles are initialized;
S103, evaluating all particles in the N particle groups, calculating the fitness value of each particle, and obtaining the historical optimal positions of all single particles and the global optimal position of each particle group based on the fitness value;
S104, updating all particles in the N particle groups, wherein each particle updates the speed and the position of each particle according to the historical optimal position of the particle and the global optimal position of the particle group, and the iteration times are increased by 1;
S105, evaluating all the updated particles, calculating the fitness value of each particle, and obtaining the historical optimal positions of all the single particles and the global optimal position of each particle group based on the fitness value;
s106, judging whether the maximum iteration times are reached or the finishing condition is met, if so, finishing the algorithm, outputting the global optimal positions of all particle swarms at the moment, and turning to the step S107; otherwise, go to step S104 to continue to execute the particle swarm optimization algorithm;
And S107, using an optimal solution output by a particle swarm optimization algorithm to optimize the error feedback neural network, inputting a training sample into the optimized error feedback neural network, calculating a global average error, if the global average error is smaller than or equal to an error upper limit value, performing step S2 successfully, otherwise, failing to optimize the error feedback neural network, and returning to step S102.
Preferably, the error feedback neural network comprises a 1-layer input layer, a 5-layer hidden layer and a 1-layer output layer which are sequentially connected, and an activation function between the layers is a sigmoid function.
Preferably, in step S3, the gas sensor array includes an alcohol sensor, a methane sensor, a carbon monoxide sensor, a hydrogen cyanide sensor, and a hydrogen sulfide sensor.
The beneficial effects are that: the invention has the following remarkable beneficial effects:
1. according to the invention, whether harmful gas exists or not and the hazard level thereof are obtained through qualitative identification and quantitative analysis, early warning is timely carried out on operation and maintenance personnel, and the safety of personnel in a carriage and a platform is ensured;
2. According to the invention, the weight and the threshold of the error feedback neural network are optimized by using the improved particle swarm optimization algorithm, and then the error feedback neural network is learned, so that the convergence speed and the precision of the error feedback neural network are improved, and the training times of the error feedback neural network are reduced.
Drawings
FIG. 1 is a flowchart of an algorithm of the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings.
The invention discloses a harmful gas monitoring method based on an improved particle swarm and an error feedback neural network, which uses MQ series gas sensors to form a gas sensor array, is arranged in a rail transit system gate, collects gas data in real time, and uses an improved particle swarm optimization algorithm and an error feedback neural network method to perform qualitative identification and quantitative analysis on collected gas components, wherein:
The improved particle swarm optimization algorithm adopted by the invention is as follows:
The improved particle swarm optimization algorithm aims at optimizing all initial parameters in the error feedback neural network, namely a weight matrix and a threshold matrix from an input layer to a hidden layer, and a weight matrix and a threshold matrix from the hidden layer to an output layer. The target value function is the global average error of the error feedback neural network. Firstly, initializing a particle swarm, wherein the states (positions and speeds) of the particles are uniformly distributed in a state space; then, each particle in the particle swarm is evaluated, the fitness value of each particle is calculated, and the historical optimal positions of all the single particles and the global optimal positions of the colony are obtained based on the fitness value; next, each particle updates the speed and position of each particle according to its own historical optimal position and global optimal position; then, evaluating particles in the particle swarm, calculating the fitness value of each particle, and obtaining the historical optimal positions of all the single particles and the global optimal positions of the colony based on the fitness value; finally, judging whether the particle swarm optimization algorithm reaches the maximum iteration number or meets the ending condition, ending the algorithm if the maximum iteration number or the ending condition is met, and outputting the global optimal position at the moment; otherwise, continuing to execute the particle swarm optimization algorithm.
Because the error feedback neural network is easy to sink into local convergence and further influences the precision, the improved particle swarm optimization algorithm is utilized to optimize the weight matrix and the threshold matrix of the error feedback neural network, and the optimized weight matrix and threshold matrix are used as the initial weight and the initial threshold of the error feedback neural network, so that the convergence speed and the precision of the error feedback neural network are further improved, and the training times of the error feedback neural network are reduced. When the algorithm is used, firstly, the weight matrix and the threshold matrix of the error feedback neural network are converted into one-dimensional arrays, the one-dimensional arrays are used as optimization objects of an improved particle swarm optimization algorithm, then optimization is carried out, an optimal solution is output, and finally the output optimal solution is used as an initial weight and an initial threshold of the error feedback neural network.
The error feedback neural network method adopted by the invention is as follows:
Because of the limitation of space layout of subway carriages or platforms, the hardware platform constructed by the method is generally an embedded system, has limited computing capacity, and can not select a deep neural network to perform qualitative and quantitative analysis on gas components, so that the error feedback neural network construction parameters are as follows: input layer 1, output layer 1, and middle hidden layer set to p=5 layers. The input parameter of the input layer is X= [ X 1,x2,...,xn]T ] which is the data information acquired by the gas sensor array; the output parameter of the output layer is Y= [ Y 1,y2,...,ym]T ] which is the concentration value of various gas components obtained by estimation; the expected value o= [ O 1,o2,...,om]T is the measured value of the high-precision laboratory standard instrument in the laboratory, and is used as a reference. The weight matrix and the threshold matrix from the input layer to the hidden layer are respectively set as And/>Where j=1, 2, p. The weight matrix and the threshold matrix from the hidden layer to the output layer are respectively set as/>And/>Where k=1, 2,..m. The activation function between layers selects the sigmoid function:
wherein, the hidden layer activation value is as follows:
The output value of the hidden layer is b j=f(sj), the output layer activation value is as follows:
The output value of the output layer is y k=f(sk), the Z training sample is (X Z,YZ), the sample number is T, and the Z training error E z and the global average error E are respectively:
The invention provides a harmful gas monitoring method based on improved particle swarm and error feedback, which is disclosed by the invention, and is shown in figure 1, and specifically comprises the following steps:
Step S1, an improved particle swarm optimization algorithm is used for optimizing the error feedback neural network, namely an optimal solution output by the improved particle swarm optimization algorithm is used as an initial weight and an initial threshold of the error feedback neural network, after a training sample is input into the optimized error feedback neural network, if the output error meets the requirement, the step S2 is entered, and otherwise, the error feedback neural network is re-optimized by the improved particle swarm optimization algorithm. The method comprises the following specific steps:
S101, respectively converting a weight matrix and a threshold matrix from an input layer to a hidden layer, and a weight matrix and a threshold matrix from the hidden layer to an output layer in an error feedback neural network into a one-dimensional array, taking the one-dimensional array as an optimization variable of a particle swarm optimization algorithm, taking a global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an error upper limit value;
S102, initializing parameters of a particle swarm optimization algorithm, including: the number N of particle groups is set as Q, the total number of particles in each particle group is divided into exploring particles, developing particles and updating particles, the specific gravity of exploring particle group I j (1.ltoreq.j.ltoreq.N), developing particle group F j (1.ltoreq.j.ltoreq.N) and updating particle group G j (1.ltoreq.j.ltoreq.N) in each particle group is determined, and the number of each particle is determined; maximum iteration number k max, the iteration number is set to 0; determining a search space, and randomly generating an initial solution in the search space, namely initializing the positions and the speeds of all particles;
S103, evaluating all particles in N particle groups, calculating the fitness value of each particle in the kth iteration, and obtaining the historical optimal positions of all single particles and the global optimal position of each particle group based on the fitness value;
S104, updating all particles in the N particle groups, wherein each particle updates the speed and the position of each particle according to the historical optimal position of the particle and the global optimal position of the particle group, and the iteration times are increased by 1; the updating method comprises the following steps:
the exploring particle swarm is mainly responsible for global searching work to avoid the algorithm from falling into local optimum, wherein the speed and position update formula of each exploring particle in the j-th exploring particle swarm I j is as follows:
Wherein, Represent the inertial velocity weights in the j-th search particle swarm,/>Representing inertial position weights in the j-th search particle swarm; /(I)Representing the velocity of search particle i in the jth search particle group in the kth iteration,/>Representing the position of search particle i in the jth search particle group in the kth iteration,/>Respectively obtaining a first preset weight factor and a second preset weight factor of exploring particles in the j exploring particle swarm,/>Respectively, are random numbers with values in the (0, 1) interval,/>For this purpose, the historical optimal position of particle i is explored,/>To explore the global optimum of particle swarm I j.
The development particle swarm is mainly responsible for performing fine search within a range, wherein the update formula of the speed and the position of each development particle in the jth development particle swarm F j is as follows:
Wherein, Representing the inertial velocity weight in the j-th development particle swarm,/>Representing inertial position weights in a j-th development particle swarm; /(I)Representing the velocity of development particle i in the jth development particle group in the kth iteration,/>Representing the position of development particle i in the jth development particle group in the kth iteration,/>Respectively for a first preset weight factor and a second preset weight factor in the jth development particle swarm,/>Respectively random numbers with values in the (0, 1) interval,For this purpose, the historical optimal position of particle i is developed,/>To explore the global optimum of particle swarm F j. The main difference between the development particle swarm and the exploration particle swarm is that the inertia speed weight and the inertia position weight of the development particle swarm are smaller, so that the fine search of a small-range area can be realized.
The updating particle swarm is mainly responsible for adaptively adjusting the particle updating speed, so that the algorithm convergence speed is increased. Wherein each updated particle velocity and position update formula in the jth updated particle swarm G j is
Wherein,Representing the inertial velocity weight in the jth update particle swarm,/>Representing the inertial position weight in the jth updated particle swarm; /(I)Representing the velocity of update particle i in the jth update particle group in the kth iteration,/>Representing the position of update particle i in the jth update particle group in the kth iteration,/>Respectively a first preset weight factor and a second preset weight factor of the updated particles in the jth updated particle swarm,/>Respectively, are random numbers with values in the (0, 1) interval,/>To this end, the historical optimal position of particle i is updated,/>To update the global optimum position of the particle swarm G j; Indicating the fitness value of the updated particle i in the kth iteration. The speed update formula mainly indicates that if the speed of the current update particle is a preferable speed, the speed is not updated.
After the N particle groups are respectively updated, effective information is diffused by using an information diffusion mechanism, so that the optimizing precision of the whole algorithm is improved, the running speed of the algorithm is accelerated, and the method comprises the following steps:
Among N exploring particle groups Based on which M optimal search particles/>, respectively, are selectedOf N development particle groups, to/>Based on which M optimal development particles/>, respectively, are selectedAmong N updated particle groups, to/>Based on which M optimal updated particles/>, respectively, are selectedAnd respectively carrying out state update on the selected optimal particles according to the following formula by utilizing the speed and position information of the selected optimal particles:
Wherein, P=I, G, F is the particle information diffusion weight,/>Wherein/>Taking the random number between (0, 1) as a random factor, and ensuring the inconsistency of each particle swarm.
S105, evaluating all the updated particles, calculating the fitness value of each particle, and obtaining the historical optimal positions of all the single particles and the global optimal position of each particle group based on the fitness value;
s106, judging whether the maximum iteration times are reached or the finishing condition is met, if so, finishing the algorithm, outputting the global optimal positions of all particle swarms at the moment, and turning to the step S107; otherwise, go to step S104 to continue to execute the particle swarm optimization algorithm;
And S107, using an optimal solution output by a particle swarm optimization algorithm to optimize the error feedback neural network, inputting a training sample into the optimized error feedback neural network, calculating a global average error, if the global average error is smaller than or equal to an error upper limit value, performing step S2 successfully, otherwise, failing to optimize the error feedback neural network, and returning to step S102.
S2, inputting the optimal solution output by the improved particle swarm optimization algorithm into an error feedback neural network, and aiming at the learning of the error feedback neural network in which the optimization is started by training samples, obtaining various parameters of the final error feedback neural network, namely a weight matrix and a threshold matrix from an input layer to a hidden layer and a weight matrix and a threshold matrix from the hidden layer to an output layer, wherein the training of the error feedback neural network is completed.
S3, installing the gas sensor array in a rail transit system door, collecting gas data in the range of subway carriages and stations, and inputting the gas data into a trained error feedback neural network to start qualitative analysis and quantitative monitoring of gas components. The gas sensor array is composed of MQ series and other sensors, and is used for gas acquisition and data acquisition. In one embodiment of the invention, the gas sensor array includes a alcohol sensor (MQ-3), a methane sensor (MQ-4), a carbon monoxide sensor (MQ-7), a hydrogen sensor (MQ-8), a hydrogen cyanide sensor (JXBS-7001-HCN), and a hydrogen sulfide sensor (JXBS-7001-H2S).
And S4, comparing the quantitative detection result with a preset threshold value to obtain whether toxic gas components are contained or not and the content of the toxic gas components, giving a specific early warning grade, and reporting to operation and maintenance personnel.
The foregoing is only a preferred embodiment of the invention, it being noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the invention.
Claims (4)
1. The harmful gas monitoring method based on the improved particle swarm and the error feedback neural network is characterized by comprising the following steps of:
S1, optimizing an error feedback neural network by using a particle swarm optimization algorithm, namely taking an optimal solution output by the particle swarm optimization algorithm as an initial weight and an initial threshold of the error feedback neural network, inputting a training sample into the optimized error feedback neural network, and entering a step S2 if the global average error meets the requirement, otherwise, re-optimizing the error feedback neural network by using the particle swarm optimization algorithm;
s2, learning an error feedback neural network optimized aiming at a training sample, and obtaining a weight and a threshold of the final error feedback neural network, wherein the training of the error feedback neural network is completed;
S3, installing the gas sensor array in a rail transit system gate, collecting gas data, and inputting the gas data into a trained error feedback neural network to start qualitative analysis and quantitative monitoring of gas components;
s4, after a quantitative detection result is obtained, comparing the quantitative detection result with a preset threshold value to obtain whether toxic gas components are contained or not and the content of the toxic gas components, giving a specific early warning grade, and reporting to operation and maintenance personnel;
The improved multi-population particle swarm optimization algorithm based on the information diffusion mechanism consists of N particle swarms, wherein each particle swarm is divided into an exploration particle swarm I i (1.ltoreq.i.ltoreq.N), a development particle swarm F i (1.ltoreq.i.ltoreq.N) and an update particle swarm G i (1.ltoreq.i.ltoreq.N), and after each step of particle swarm iterative operation, information interaction among the N particle swarms is carried out through the information diffusion mechanism, so that one iteration update of the particle swarm is completed:
the update formula of each search particle speed and position in the j-th search particle swarm I j is as follows:
Wherein, Represent the inertial velocity weights in the j-th search particle swarm,/>Representing inertial position weights in the j-th search particle swarm; /(I)Representing the velocity of search particle i in the jth search particle group in the kth iteration,/>Representing the position of search particle i in the jth search particle group in the kth iteration,/>Respectively obtaining a first preset weight factor and a second preset weight factor of exploring particles in the j exploring particle swarm,/>Respectively random numbers with values in the (0, 1) interval,For this purpose, the historical optimal position of particle i is explored,/>To explore the global optimal position of particle swarm I j;
the update formula of the velocity and the position of each development particle in the jth development particle swarm F j is as follows:
Wherein, Representing the inertial velocity weight in the j-th development particle swarm,/>Representing inertial position weights in a j-th development particle swarm; /(I)Representing the velocity of development particle i in the jth development particle group in the kth iteration,/>Representing the position of development particle i in the jth development particle group in the kth iteration,/>Respectively a first preset weight factor and a second preset weight factor of development particles in the jth development particle swarm,/>Respectively random numbers with values in the (0, 1) interval,For this purpose, the historical optimal position of particle i is developed,/>To explore the global optimal position of the particle swarm F j; the inertial velocity weight and the inertial position weight of the development particles are respectively smaller than those of the exploration particles;
Wherein each updated particle velocity and position update formula in the jth updated particle swarm G j is
Wherein,Representing the inertial velocity weight in the jth update particle swarm,/>Representing the inertial position weight in the jth updated particle swarm; /(I)Representing the velocity of update particle i in the jth update particle group in the kth iteration,/>Representing the position of update particle i in the jth update particle group in the kth iteration,/>Respectively a first preset weight factor and a second preset weight factor of the updated particles in the jth updated particle swarm, r 1 j,G,/>Respectively random numbers with values in the (0, 1) interval,To this end, the historical optimal position of particle i is updated,/>To update the global optimum position of the particle swarm G j; /(I)The fitness value of the updated particle i in the kth iteration is represented;
After the N particle groups are respectively updated, effective information is diffused by using an information diffusion mechanism, so that the optimizing precision of the whole algorithm is improved, the running speed of the algorithm is accelerated, and the method comprises the following steps:
Among N exploring particle groups Based on which M optimal search particles/>, respectively, are selectedOf N development particle groups, to/>Based on which M optimal development particles/>, respectively, are selectedAmong N updated particle groups, to/>Based on which M optimal updated particles/>, respectively, are selectedAnd respectively carrying out state updating on the optimal M particles selected from each exploring particle swarm, developing particle swarm and updating particle swarm according to the following formula by utilizing the speed and position information of the optimal particles:
Wherein the method comprises the steps of P=I, G, F is the particle information diffusion weight,/>Wherein/>The random number between (0, 1) is taken as the random factor.
2. The method for monitoring harmful gas based on improved particle swarm and error feedback neural network according to claim 1, wherein step S1 comprises:
S101, respectively converting a weight matrix and a threshold matrix from an input layer to a hidden layer, and a weight matrix and a threshold matrix from the hidden layer to an output layer in an error feedback neural network into a one-dimensional array, taking the one-dimensional array as an optimization variable of a particle swarm optimization algorithm, taking a global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an error upper limit value;
S102, initializing parameters of a particle swarm optimization algorithm, including: the number N of particle groups, the total number of particles in each particle group is set to be Q, the particles in each particle group are divided into exploring particles, developing particles and updating particles, the proportion of the exploring particle groups, the developing particle groups and the updating particle groups in each particle group is determined, and the number of each particle is determined; the maximum iteration number k max, the iteration number is set to 0, a search space is determined, and initial solutions are randomly generated in the search space, namely the positions and the speeds of all particles are initialized;
S103, evaluating all particles in the N particle groups, calculating the fitness value of each particle, and obtaining the historical optimal positions of all single particles and the global optimal position of each particle group based on the fitness value;
S104, updating all particles in the N particle groups, wherein each particle updates the speed and the position of each particle according to the historical optimal position of the particle and the global optimal position of the particle group, and the iteration times are increased by 1;
S105, evaluating all the updated particles, calculating the fitness value of each particle, and obtaining the historical optimal positions of all the single particles and the global optimal position of each particle group based on the fitness value;
s106, judging whether the maximum iteration times are reached or the finishing condition is met, if so, finishing the algorithm, outputting the global optimal positions of all particle swarms at the moment, and turning to the step S107; otherwise, go to step S104 to continue to execute the particle swarm optimization algorithm;
And S107, using an optimal solution output by a particle swarm optimization algorithm to optimize the error feedback neural network, inputting a training sample into the optimized error feedback neural network, calculating a global average error, if the global average error is smaller than or equal to an error upper limit value, performing step S2 successfully, otherwise, failing to optimize the error feedback neural network, and returning to step S102.
3. The method for monitoring harmful gas based on the improved particle swarm and the error feedback neural network according to claim 1, wherein the error feedback neural network comprises a 1-layer input layer, a 5-layer hidden layer and a 1-layer output layer which are sequentially connected, and an activation function between the layers is a sigmoid function.
4. The method for monitoring harmful gas based on the improved particle swarm and the error feedback neural network according to claim 1, wherein in step S3, the gas sensor array comprises an alcohol sensor, a methane sensor, a carbon monoxide sensor, a hydrogen cyanide sensor and a hydrogen sulfide sensor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110511330.7A CN113192569B (en) | 2021-05-11 | 2021-05-11 | Harmful gas monitoring method based on improved particle swarm and error feedback neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110511330.7A CN113192569B (en) | 2021-05-11 | 2021-05-11 | Harmful gas monitoring method based on improved particle swarm and error feedback neural network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113192569A CN113192569A (en) | 2021-07-30 |
CN113192569B true CN113192569B (en) | 2024-05-28 |
Family
ID=76981125
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110511330.7A Active CN113192569B (en) | 2021-05-11 | 2021-05-11 | Harmful gas monitoring method based on improved particle swarm and error feedback neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113192569B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114463929A (en) * | 2022-03-29 | 2022-05-10 | 河北金锁安防工程股份有限公司 | Intelligent linkage alarm control method and system |
CN117494617B (en) * | 2023-12-29 | 2024-04-16 | 中国石油大学(华东) | Carbon dioxide flooding quick simulation method based on embedded physical information neural network |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959368A (en) * | 2016-04-29 | 2016-09-21 | 成都信息工程大学 | Social cloud hot spot resource prediction and disposition method |
CN106153567A (en) * | 2016-06-22 | 2016-11-23 | 南京信息工程大学 | Based on the pressure compensated infrared gas sensor of BP neutral net and detection method |
CN106503790A (en) * | 2015-08-28 | 2017-03-15 | 余学飞 | A kind of Pressure wire temperature compensation of Modified particle swarm optimization neutral net |
CN108334059A (en) * | 2018-02-26 | 2018-07-27 | 上海理工大学 | Based on particle cluster algorithm Optimized BP Neural Network Symbolic fault diagnosis method |
CN109120630A (en) * | 2018-09-03 | 2019-01-01 | 上海海事大学 | A kind of SDN network ddos attack detection method based on Optimized BP Neural Network |
CN110880369A (en) * | 2019-10-08 | 2020-03-13 | 中国石油大学(华东) | Gas marker detection method based on radial basis function neural network and application |
CN111539511A (en) * | 2020-04-28 | 2020-08-14 | 三峡大学 | Particle swarm optimization algorithm based on multi-strategy fusion |
CN112118365A (en) * | 2020-09-25 | 2020-12-22 | 集美大学 | Image self-adaptive steganography method, device, electronic equipment and medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2401696B1 (en) * | 2009-02-26 | 2017-06-21 | Intrexon CEU, Inc. | Mammalian cell line models and related methods |
-
2021
- 2021-05-11 CN CN202110511330.7A patent/CN113192569B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106503790A (en) * | 2015-08-28 | 2017-03-15 | 余学飞 | A kind of Pressure wire temperature compensation of Modified particle swarm optimization neutral net |
CN105959368A (en) * | 2016-04-29 | 2016-09-21 | 成都信息工程大学 | Social cloud hot spot resource prediction and disposition method |
CN106153567A (en) * | 2016-06-22 | 2016-11-23 | 南京信息工程大学 | Based on the pressure compensated infrared gas sensor of BP neutral net and detection method |
CN108334059A (en) * | 2018-02-26 | 2018-07-27 | 上海理工大学 | Based on particle cluster algorithm Optimized BP Neural Network Symbolic fault diagnosis method |
CN109120630A (en) * | 2018-09-03 | 2019-01-01 | 上海海事大学 | A kind of SDN network ddos attack detection method based on Optimized BP Neural Network |
CN110880369A (en) * | 2019-10-08 | 2020-03-13 | 中国石油大学(华东) | Gas marker detection method based on radial basis function neural network and application |
CN111539511A (en) * | 2020-04-28 | 2020-08-14 | 三峡大学 | Particle swarm optimization algorithm based on multi-strategy fusion |
CN112118365A (en) * | 2020-09-25 | 2020-12-22 | 集美大学 | Image self-adaptive steganography method, device, electronic equipment and medium |
Non-Patent Citations (5)
Title |
---|
Particle swarm optimisation: a historical review up to the current developments;Freitas D等;《Entropy》;20200321;第22卷(第3期);1-36 * |
基于信息扩散机制的双子群粒子群优化算法;范会联等;《系统仿真学报》;20111031;第23卷(第10期);2125-2129 * |
基于全局优化改进混沌粒子群遗传算法的物料平衡数据校正;孙延吉等;《化工进展》;20160905;第35卷(第9期);2663-2669 * |
基于扩散机制的杂交粒子群优化算法;徐星等;《计算机应用研究》;20111115;第28卷(第11期);4156-4159 * |
自适应任务分配的粒子群优化算法;林国汉等;《计算机应用》;20150410(第4期);142-146 * |
Also Published As
Publication number | Publication date |
---|---|
CN113192569A (en) | 2021-07-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108426812B (en) | PM2.5 concentration value prediction method based on memory neural network | |
CN106650825B (en) | Motor vehicle exhaust emission data fusion system | |
CN113192569B (en) | Harmful gas monitoring method based on improved particle swarm and error feedback neural network | |
CN108268935B (en) | PM2.5 concentration value prediction method and system based on time sequence recurrent neural network | |
CN107577910B (en) | Vehicle exhaust concentration inversion method based on deep neural network | |
CN110242865B (en) | Gas leakage detection and judgment method and system easy for continuous optimization | |
CN114037163A (en) | Sewage treatment effluent quality early warning method based on dynamic weight PSO (particle swarm optimization) optimization BP (Back propagation) neural network | |
CN114781538B (en) | Air quality prediction method and system for GA-BP neural network coupling decision tree | |
CN106289691A (en) | A kind of bridge block impact vibration detection method based on microwave radar device and detection device | |
CN110751289B (en) | Online learning behavior analysis method based on Bagging-BP algorithm | |
CN110555551A (en) | air quality big data management method and system for smart city | |
CN110610209A (en) | Air quality prediction method and system based on data mining | |
CN114881356A (en) | Urban traffic carbon emission prediction method based on particle swarm optimization BP neural network optimization | |
CN109376331A (en) | A kind of city bus emission index estimation method promoting regression tree based on gradient | |
CN112861436A (en) | Real-time prediction method for engine emission | |
CN115422747A (en) | Method and device for calculating discharge amount of pollutants in tail gas of motor vehicle | |
CN110988263B (en) | Vehicle exhaust concentration estimation method based on improved Stacking model | |
CN112765902A (en) | RBF neural network soft measurement modeling method based on TentFWA-GD and application thereof | |
CN117370766A (en) | Satellite mission planning scheme evaluation method based on deep learning | |
Wang et al. | Research on air pollution gases recognition method based on lstm recurrent neural network and gas sensors array | |
CN117109582A (en) | Atmospheric pollution source positioning system and method combining sensing network and machine learning | |
CN112819087B (en) | Method for detecting abnormality of BOD sensor of outlet water based on modularized neural network | |
CN114034334A (en) | Method for identifying pollution source and flow of karst pipeline | |
CN117371616A (en) | Soil frost heaving rate prediction method for optimizing generalized regression neural network | |
CN116933206A (en) | Method and system for predicting heavy metal pollution space risk of polluted site soil |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |