CN113192569A - 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
- CN113192569A CN113192569A CN202110511330.7A CN202110511330A CN113192569A CN 113192569 A CN113192569 A CN 113192569A CN 202110511330 A CN202110511330 A CN 202110511330A CN 113192569 A CN113192569 A CN 113192569A
- Authority
- CN
- China
- Prior art keywords
- particle
- neural network
- error feedback
- particle swarm
- feedback neural
- 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.)
- Granted
Links
- 239000002245 particle Substances 0.000 title claims abstract description 326
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 79
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012544 monitoring process Methods 0.000 title claims abstract description 13
- 238000005457 optimization Methods 0.000 claims abstract description 46
- 238000012549 training Methods 0.000 claims abstract description 17
- 238000012423 maintenance Methods 0.000 claims abstract description 7
- 239000007789 gas Substances 0.000 claims description 36
- 238000011161 development Methods 0.000 claims description 34
- 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
- 238000003491 array Methods 0.000 claims description 6
- LELOWRISYMNNSU-UHFFFAOYSA-N hydrogen cyanide Chemical compound N#C LELOWRISYMNNSU-UHFFFAOYSA-N 0.000 claims description 6
- 230000007246 mechanism Effects 0.000 claims description 6
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 5
- 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
- 238000001514 detection method Methods 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 abstract description 5
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010276 construction Methods 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
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 231100000331 toxic Toxicity 0.000 description 1
- 230000002588 toxic effect Effects 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Images
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 improved particle swarm and error feedback neural network, which comprises the steps of forming a gas sensor array by MQ series sensors, installing the gas sensor array in a rail transit system door, and collecting gas data in real time; after the gas data are obtained, qualitative identification and quantitative analysis are carried out on the collected gas data by using an improved particle swarm optimization algorithm and an error feedback neural network method, and finally, whether harmful gas exists or not and the hazard grade are obtained by comparing with a preset threshold value, so that early warning is timely given to operation and maintenance personnel, and the safety of the personnel in a carriage and a platform is ensured. In the invention, the improved particle swarm optimization algorithm is used for optimizing the weight and the threshold of the error feedback neural network, 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 mainly operated underground, and takes the main personnel flow tasks of large and medium-sized cities. Because the underground is deep in most underground subway environments, the environment is closed, the space is closed, and once toxic gas leakage or artificial toxic discharge event influence is severe, the toxic gas in the subway is sensed and the content of the toxic gas is quantitatively analyzed at the first time, so that timely early warning is performed on operation and maintenance personnel, and the subway system has practical application value.
Disclosure of Invention
The purpose of the invention is as follows: in order to overcome the problems in the prior art, the invention discloses a harmful gas monitoring method based on improved particle swarm and an error feedback neural network, which is applied to subway carriages and platforms, obtains whether harmful gas exists and the hazard level thereof through qualitative identification and quantitative analysis, and timely warns operation and maintenance personnel to ensure the safety of the personnel in the carriages and the platforms.
The technical scheme is as follows: in order to achieve the purpose, the invention adopts the following technical scheme: a harmful gas monitoring method based on improved particle swarm and an error feedback neural network is characterized by comprising the following steps:
s1, optimizing the error feedback neural network by using the particle swarm optimization algorithm, namely, using the optimal solution output by the particle swarm optimization algorithm as the initial weight and the initial threshold of the error feedback neural network, inputting the training sample into the optimized error feedback neural network, and entering the 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 of the error feedback neural network starting to be optimized according to the training sample to obtain the final weight and threshold of the error feedback neural network, and finishing the training of the error feedback neural network;
s3, mounting the gas sensor array in a rail transit system door, collecting gas data, inputting the gas data into a trained error feedback neural network, and starting qualitative analysis and quantitative monitoring of gas components;
and S4, comparing the quantitative detection result with a preset threshold value to obtain whether the toxic gas component is contained or not and the content of the toxic gas component, giving a specific early warning level, 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 swarms is divided into exploration particle swarms Ii(1. ltoreq. i. ltoreq.N), development of particle group Fi(1. ltoreq. i. ltoreq.N) and update particle group Gi(i is more than or equal to 1 and less than or equal to N), and after each step of particle swarm iterative operation, information interaction work among N particle swarms is carried out through an information diffusion mechanism, so that one iterative update of the particle swarms is completed:
wherein the jth exploring particle swarm IjThe velocity and position updating formula of each exploration particle in the method is as follows:
wherein,representing the inertia velocity weight in the jth exploration particle swarm,and representing the inertia position weight in the jth exploration particle swarm.Representing the speed of the exploring particle i in the jth exploring particle swarm in the kth iteration,the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is explored,for exploring a population of particles IjThe global optimal position of (a);
wherein the jth developing particle group FjThe updating formula of the speed and the position of each developing particle in the process is as follows:
wherein,representing the inertial velocity weights in the jth developing particle swarm,representing the inertia position weight in the jth development particle swarm;representing the velocity of the development particle i in the jth development particle population in the kth iteration,indicating the location of the development particle i in the jth development particle population in the kth iteration,a first preset weight factor and a second preset weight factor of the development particle in the jth development particle swarm respectively,respectively are random numbers with values in the interval of (0,1),to this end a historical optimum position of the particle i is developed,for exploring particle swarm FjThe global optimal position of (a); the inertia velocity weight and the inertia position weight of the development particle are respectively smaller than the inertia velocity weight and the inertia position weight of the exploration particle;
wherein the jth update particle swarm GjWherein each updated particle velocity and position is updated by the formula
Wherein,representing the inertia velocity weight in the jth updated particle swarm,representing the inertia position weight in the jth updating particle swarm;representing the velocity of the update particle i in the jth update particle population in the kth iteration,indicating the location of the update particle i in the jth update particle population in the kth iteration,a first preset weight factor and a second preset weight factor of the updated particle in the jth updated particle group respectively,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is updated,for updating the particle group GjThe global optimal position of (a);representing the fitness value of the updated particle i in the k iteration;
after the N particle swarms respectively update the particles, an information diffusion mechanism is used for diffusing effective information, the optimization precision of the whole algorithm is improved, the operation speed of the algorithm is accelerated, and the process is as follows:
n search particle groups, toBased on the M optimal search particles, respectivelyN developing particle groups toBased on the M optimal development particles respectivelyIn N update particle groups toBased on the M optimal update particles, respectivelyAnd respectively carrying out state updating on the optimal M particles selected from the exploration particle swarm, the development particle swarm and the updating particle swarm according to the following formulas by utilizing the speed and the position information of the optimal particles:
whereinP is I, G and F are the diffusion weight of the particle information,whereinFor the random factor, take a random number between (0,1) for each guaranteeInconsistencies in the population of particles.
Preferably, step S1 includes:
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 one-dimensional arrays, using the one-dimensional arrays as optimization variables of a particle swarm optimization algorithm, using the global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an upper limit value of the error;
s102, initializing parameters of a particle swarm optimization algorithm, comprising the following steps: the number of particle groups is N, the total number of particles in each particle group is set to be Q, the particles in each particle group are divided into exploration particles, development particles and updating particles, the proportion of the exploration particle group, the development particle group and the updating particle group in each particle group is determined, and the number of each particle is determined; maximum number of iterations kmaxSetting the iteration times to be 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 the particles in the N particle swarms, 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 swarms according to the fitness value;
s104, updating all particles in the N particle swarms, updating the speed and the position of each particle according to the historical optimal position of each particle and the global optimal position of the particle swarms, and adding 1 to the iteration times;
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 swarm according to the fitness value;
s106, judging whether the maximum iteration times are reached or the end condition is met, if so, ending the algorithm, outputting the global optimal positions of all particle swarms, and turning to the step S107; otherwise, turning to the step S104, and continuing to execute the particle swarm optimization algorithm;
s107, optimizing the error feedback neural network by using the optimal solution output by the particle swarm optimization algorithm, inputting the training sample into the optimized error feedback neural network and calculating the global average error, if the global average error is less than or equal to the upper limit value of the error, the error feedback neural network is successfully optimized, executing the step S2, otherwise, the error feedback neural network is unsuccessfully optimized, and returning to the 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 connected in sequence, and the activation function among 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.
Has the advantages that: the invention has the following remarkable beneficial effects:
1. the invention obtains whether harmful gas exists or not and the hazard level thereof through qualitative identification and quantitative analysis, and timely warns operation and maintenance personnel to ensure the safety of personnel in the carriage and the platform;
2. the invention optimizes the weight and the threshold of the error feedback neural network by using the improved particle swarm optimization algorithm, and then learns the error feedback neural network, thereby improving the convergence speed and the precision of the error feedback neural network and reducing the training times of the error feedback neural network.
Drawings
FIG. 1 is a flow chart of the algorithm of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings.
The invention discloses a harmful gas monitoring method based on improved particle swarm and error feedback neural network, which uses MQ series gas sensors to form a gas sensor array, is arranged in a rail transit system door, collects gas data in real time, and uses the improved particle swarm optimization algorithm and the error feedback neural network method to perform qualitative identification and quantitative analysis on the collected gas components, wherein:
the improved particle swarm optimization algorithm adopted by the invention is as follows:
the improved particle swarm optimization algorithm aims to optimize each initial parameter 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 function is the global average error of the error feedback neural network. Firstly, initializing a particle swarm, wherein the states (position and speed) of all particles meet the uniform distribution in a state space; then, evaluating each particle 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 position of the swarm according to the fitness value; next, updating the speed and the position of each particle according to the self historical optimal position and the global optimal position of each particle; then, evaluating the 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 position of the swarm according to the fitness value; finally, judging whether the particle swarm optimization algorithm reaches the maximum iteration times or meets an end condition, if so, ending the algorithm, and outputting the current global optimal position; otherwise, continuing to execute the particle swarm optimization algorithm.
Because the error feedback neural network is easy to fall into local convergence, and further the precision is influenced, the improved particle swarm optimization algorithm is utilized to optimize the weight matrix and the threshold matrix of the error feedback neural network, and then the optimized weight matrix and the optimized 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 a one-dimensional array, the one-dimensional array is used as an optimization object of the improved particle swarm optimization algorithm, then optimization is carried out, the optimal solution is output, and finally the output optimal solution is used as the initial weight and the initial threshold of the error feedback neural network.
The error feedback neural network method adopted by the invention is as follows:
due to the space layout limitation of the subway carriage or platform, the hard building method provided by the invention is used for building hard buildingThe part platform is generally an embedded system, has limited computing capability, and cannot 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: the input layer 1 layer, the output layer 1 layer, and the intermediate hidden layer are p-5 layers. The input parameter of the input layer is X ═ X1,x2,...,xn]TData information collected for the gas sensor array; the output parameter of the output layer is Y ═ Y1,y2,...,ym]TThe estimated concentration values of various gas components; desired value O ═ O1,o2,...,om]TThe measured value of a high-precision laboratory standard instrument in a laboratory is used as a benchmark. The weight matrix and the threshold matrix from the input layer to the hidden layer are respectively set asAndwherein j is 1, 2.. multidot.p; the weight matrix and the threshold matrix from the hidden layer to the output layer are respectively set asAndwherein k is 1, 2. The activation function between layers selects a sigmoid function:
wherein the hidden layer activation values are as follows:
the output value of the hidden layer is bj=f(sj) The output layer activation values are as follows:
the output value of the output layer is yk=f(sk) Let the Z-th training sample be (X)Z,YZ) Number of samples T, training error of the z-th time EzAnd the global average error E is:
the invention discloses a particle swarm optimization algorithm and an error feedback neural network method which are comprehensively improved, and provides a harmful gas monitoring method based on improved particle swarm and error feedback, as shown in figure 1, the method specifically comprises the following steps:
and S1, optimizing the error feedback neural network by using the improved particle swarm optimization algorithm, namely, taking the optimal solution output by the improved particle swarm optimization algorithm as the initial weight and the initial threshold of the error feedback neural network, inputting a training sample into the optimized error feedback neural network, and entering the step S2 if the output error meets the requirement, otherwise, re-optimizing the error feedback neural network by using 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 one-dimensional arrays, using the one-dimensional arrays as optimization variables of a particle swarm optimization algorithm, using the global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an upper limit value of the error;
s102, initializing parameters of a particle swarm optimization algorithm, comprising the following steps: the number of particle groups N, the total number of particles in each particle group set to Q, the particle fraction in each particle groupDetermining a population of exploring particles I for exploring particles, developing particles and renewing particlesj(j is not less than 1 and not more than N), and developing particle group Fj(j is not less than 1 and not more than N) and update particle group Gj(j is more than or equal to 1 and less than or equal to N) in each particle swarm, and determining the number of each particle; maximum number of iterations kmaxSetting the iteration times 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 the particles in the N particle swarms, calculating the fitness value of each particle in the kth iteration, and obtaining the historical optimal positions of all the single particles and the global optimal position of each particle swarms according to the fitness value;
s104, updating all particles in the N particle swarms, updating the speed and the position of each particle according to the historical optimal position of each particle and the global optimal position of the particle swarms, and adding 1 to the iteration times; the updating method comprises the following steps:
the exploration particle swarm is mainly responsible for global search work, and the algorithm is prevented from falling into local optimum, wherein the jth exploration particle swarm IjThe velocity and position updating formula of each exploration particle in the method is as follows:
wherein,representing the inertia velocity weight in the jth exploration particle swarm,representing the inertia position weight in the jth exploration particle swarm;denotes the k-th timeThe velocity of the exploring particle i in the jth exploring particle group in the iteration,the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is explored,for exploring a population of particles IjThe global optimum position of.
The development particle swarm is mainly responsible for fine searching in a range, wherein the jth development particle swarm FjThe updating formula of the speed and the position of each developing particle in the process is as follows:
wherein,representing the inertial velocity weights in the jth developing particle swarm,representing the inertia position weight in the jth development particle swarm;representing the velocity of the development particle i in the jth development particle population in the kth iteration,indicating the location of the development particle i in the jth development particle population in the kth iteration,respectively a first preset weight factor and a second preset weight factor in the jth developing particle swarm,respectively are random numbers with values in the interval of (0,1),to this end a historical optimum position of the particle i is developed,for exploring particle swarm FjThe global optimum position of. The main difference between developing particle swarm and exploring particle swarm lies in that the inertia speed weight and the inertia position weight of developing particle swarm are small, and the fine search of a small-range area can be realized.
The updating particle swarm is mainly responsible for self-adaptively adjusting the particle updating speed and accelerating the algorithm convergence speed. Wherein the jth update particle swarm GjWherein each updated particle velocity and position is updated by the formula
Wherein,representing the inertia velocity weight in the jth updated particle swarm,representing the inertia position weight in the jth updating particle swarm;representing the velocity of the update particle i in the jth update particle population in the kth iteration,indicating the location of the update particle i in the jth update particle population in the kth iteration,a first preset weight factor and a second preset weight factor of the updated particle in the jth updated particle group respectively,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is updated,for updating the particle group GjThe global optimal position of (a);indicating the fitness value of the updated particle i in the kth iteration. The velocity update formula mainly indicates that if the velocity of the current update particle is a better velocity, the velocity update is not performed.
After the N particle swarms respectively update the particles, an information diffusion mechanism is used for diffusing effective information, the optimization precision of the whole algorithm is improved, the operation speed of the algorithm is accelerated, and the process is as follows:
n number ofIn exploring a population of particles, toBased on the M optimal search particles, respectivelyN developing particle groups toBased on the M optimal development particles respectivelyIn N update particle groups toBased on the M optimal update particles, respectivelyAnd respectively updating the states of the selected optimal particles again by using the speed and position information of the selected optimal particles according to the following formula:
wherein,p is I, G and F are the diffusion weight of the particle information,whereinAnd (3) taking a random number between (0,1) as a random factor for 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 swarm according to the fitness value;
s106, judging whether the maximum iteration times are reached or the end condition is met, if so, ending the algorithm, outputting the global optimal positions of all particle swarms, and turning to the step S107; otherwise, turning to the step S104, and continuing to execute the particle swarm optimization algorithm;
s107, optimizing the error feedback neural network by using the optimal solution output by the particle swarm optimization algorithm, inputting the training sample into the optimized error feedback neural network and calculating the global average error, if the global average error is less than or equal to the upper limit value of the error, the error feedback neural network is successfully optimized, executing the step S2, otherwise, the error feedback neural network is unsuccessfully optimized, and returning to the step S102.
S2, inputting the optimal solution output by the improved particle swarm optimization algorithm into the error feedback neural network, learning the error feedback neural network which starts to be optimized aiming at the training sample, obtaining each parameter of the final error feedback neural network, namely the weight matrix and the threshold matrix from the input layer to the hidden layer, and the weight matrix and the threshold matrix from the hidden layer to the output layer, and finishing the training of the error feedback neural network.
And S3, installing the gas sensor array in a door of a rail transit system, collecting gas data in the range of a subway carriage and a platform, and inputting the gas data into the trained error feedback neural network to start qualitative analysis and quantitative monitoring of gas components. The gas sensor array consists of MQ series and other sensors, and is used for collecting gas and data. In one embodiment of the invention, the gas sensor array includes an 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 the toxic gas component is contained or not and the content of the toxic gas component, giving a specific early warning level, and reporting to operation and maintenance personnel.
The above description is only of the preferred embodiments of the present invention, and it should be 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 invention and these are intended to be within the scope of the invention.
Claims (5)
1. A harmful gas monitoring method based on improved particle swarm and an error feedback neural network is characterized by comprising the following steps:
s1, optimizing the error feedback neural network by using the particle swarm optimization algorithm, namely, using the optimal solution output by the particle swarm optimization algorithm as the initial weight and the initial threshold of the error feedback neural network, inputting the training sample into the optimized error feedback neural network, and entering the 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 of the error feedback neural network starting to be optimized according to the training sample to obtain the final weight and threshold of the error feedback neural network, and finishing the training of the error feedback neural network;
s3, mounting the gas sensor array in a rail transit system door, collecting gas data, inputting the gas data into a trained error feedback neural network, and starting qualitative analysis and quantitative monitoring of gas components;
and S4, comparing the quantitative detection result with a preset threshold value to obtain whether the toxic gas component is contained or not and the content of the toxic gas component, giving a specific early warning level, and reporting to operation and maintenance personnel.
2. The method of claim 1, wherein the improved multi-population particle swarm optimization algorithm based on the information diffusion mechanism comprises N populations of particles, wherein each population is divided into an exploration population Ii(1. ltoreq. i. ltoreq.N), development of particle group Fi(1. ltoreq. i. ltoreq.N) and update particle group Gi(i is more than or equal to 1 and less than or equal to N), and after each step of particle swarm iterative operation, the information is diffused by an information diffusion machineAnd performing information interaction work among N particle swarms, thereby completing one-time iterative update of the particle swarms:
wherein the jth exploring particle swarm IjThe velocity and position updating formula of each exploration particle in the method is as follows:
wherein,representing the inertia velocity weight in the jth exploration particle swarm,representing the inertia position weight in the jth exploration particle swarm;representing the speed of the exploring particle i in the jth exploring particle swarm in the kth iteration,the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is explored,for exploring a population of particles IjThe global optimal position of (a);
wherein the jth developing particle group FjThe updating formula of the speed and the position of each developing particle in the process is as follows:
wherein,representing the inertial velocity weights in the jth developing particle swarm,representing the inertia position weight in the jth development particle swarm;representing the velocity of the development particle i in the jth development particle population in the kth iteration,indicating the location of the development particle i in the jth development particle population in the kth iteration,a first preset weight factor and a second preset weight factor of the development particle in the jth development particle swarm respectively,respectively are random numbers with values in the interval of (0,1),to this end a historical optimum position of the particle i is developed,for exploring particle swarm FjThe global optimal position of (a); the inertia velocity weight and the inertia position weight of the development particle are respectively smaller than the inertia velocity weight and the inertia position weight of the exploration particle;
wherein the jth update particle swarm GjWherein each updated particle velocity and position is updated by the formula
Wherein,representing the inertia velocity weight in the jth updated particle swarm,representing the inertia position weight in the jth updating particle swarm;representing the velocity of the update particle i in the jth update particle population in the kth iteration,indicating the location of the update particle i in the jth update particle population in the kth iteration,a first preset weight factor and a second preset weight factor respectively of the updated particle in the jth updated particle swarmTwo preset weight factors are set in the weight-value-setting unit,respectively are random numbers with values in the interval of (0,1),for this purpose the historical optimum position of the particle i is updated,for updating the particle group GjThe global optimal position of (a);representing the fitness value of the updated particle i in the k iteration;
after the N particle swarms respectively update the particles, an information diffusion mechanism is used for diffusing effective information, the optimization precision of the whole algorithm is improved, the operation speed of the algorithm is accelerated, and the process is as follows:
n search particle groups, toBased on the M optimal search particles, respectivelyN developing particle groups toBased on the M optimal development particles respectivelyIn N update particle groups toBased on the M optimal update particles, respectivelyAnd respectively carrying out state updating on the optimal M particles selected from the exploration particle swarm, the development particle swarm and the updating particle swarm according to the following formulas by utilizing the speed and the position information of the optimal particles:
3. The harmful gas monitoring method based on the improved particle swarm and the error feedback neural network as claimed in claim 2, wherein the 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 one-dimensional arrays, using the one-dimensional arrays as optimization variables of a particle swarm optimization algorithm, using the global average error of the error feedback neural network as a target value function of the particle swarm optimization algorithm, and determining an upper limit value of the error;
s102, initializing parameters of a particle swarm optimization algorithm, comprising the following steps: the number of particle groups is N, the total number of particles in each particle group is set to be Q, the particles in each particle group are divided into exploration particles, development particles and updating particles, the proportion of the exploration particle group, the development particle group and the updating particle group in each particle group is determined, and the number of each particle is determined; most preferablyLarge number of iterations kmaxSetting the iteration times to be 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 the particles in the N particle swarms, 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 swarms according to the fitness value;
s104, updating all particles in the N particle swarms, updating the speed and the position of each particle according to the historical optimal position of each particle and the global optimal position of the particle swarms, and adding 1 to the iteration times;
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 swarm according to the fitness value;
s106, judging whether the maximum iteration times are reached or the end condition is met, if so, ending the algorithm, outputting the global optimal positions of all particle swarms, and turning to the step S107; otherwise, turning to the step S104, and continuing to execute the particle swarm optimization algorithm;
s107, optimizing the error feedback neural network by using the optimal solution output by the particle swarm optimization algorithm, inputting the training sample into the optimized error feedback neural network and calculating the global average error, if the global average error is less than or equal to the upper limit value of the error, the error feedback neural network is successfully optimized, executing the step S2, otherwise, the error feedback neural network is unsuccessfully optimized, and returning to the step S102.
4. The harmful gas monitoring method based on the improved particle swarm and the error feedback neural network is characterized in that 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 among the layers is a sigmoid function.
5. The method for monitoring harmful gases based on the improved particle swarm and the error feedback neural network as claimed in 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 true CN113192569A (en) | 2021-07-30 |
CN113192569B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114463929A (en) * | 2022-03-29 | 2022-05-10 | 河北金锁安防工程股份有限公司 | Intelligent linkage alarm control method and system |
CN117494617A (en) * | 2023-12-29 | 2024-02-02 | 中国石油大学(华东) | Carbon dioxide flooding quick simulation method based on embedded physical information neural network |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120185226A1 (en) * | 2009-02-26 | 2012-07-19 | Genomatica, Inc. | Mammalian cell line models and related methods |
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 |
-
2021
- 2021-05-11 CN CN202110511330.7A patent/CN113192569B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120185226A1 (en) * | 2009-02-26 | 2012-07-19 | Genomatica, Inc. | Mammalian cell line models and related methods |
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 |
---|
FREITAS D等: "Particle swarm optimisation: a historical review up to the current developments", 《ENTROPY》, vol. 22, no. 3, 21 March 2020 (2020-03-21), pages 1 - 36 * |
孙延吉等: "基于全局优化改进混沌粒子群遗传算法的物料平衡数据校正", 《化工进展》, vol. 35, no. 9, 5 September 2016 (2016-09-05), pages 2663 - 2669 * |
徐星等: "基于扩散机制的杂交粒子群优化算法", 《计算机应用研究》, vol. 28, no. 11, 15 November 2011 (2011-11-15), pages 4156 - 4159 * |
林国汉等: "自适应任务分配的粒子群优化算法", 《计算机应用》, no. 4, 10 April 2015 (2015-04-10), pages 142 - 146 * |
范会联等: "基于信息扩散机制的双子群粒子群优化算法", 《系统仿真学报》, vol. 23, no. 10, 31 October 2011 (2011-10-31), pages 2125 - 2129 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114463929A (en) * | 2022-03-29 | 2022-05-10 | 河北金锁安防工程股份有限公司 | Intelligent linkage alarm control method and system |
CN117494617A (en) * | 2023-12-29 | 2024-02-02 | 中国石油大学(华东) | Carbon dioxide flooding quick simulation method based on embedded physical information neural network |
CN117494617B (en) * | 2023-12-29 | 2024-04-16 | 中国石油大学(华东) | Carbon dioxide flooding quick simulation method based on embedded physical information neural network |
Also Published As
Publication number | Publication date |
---|---|
CN113192569B (en) | 2024-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108426812B (en) | PM2.5 concentration value prediction method based on memory neural network | |
CN111804146B (en) | Intelligent ammonia injection control method and intelligent ammonia injection control device | |
CN108268935B (en) | PM2.5 concentration value prediction method and system based on time sequence recurrent neural network | |
CN110807554B (en) | Generation method and system based on wind power/photovoltaic classical scene set | |
CN113192569A (en) | Harmful gas monitoring method based on improved particle swarm and error feedback neural network | |
CN110008499B (en) | Mechanism optimization design method based on Bayesian kriging model | |
CN110975597B (en) | Neural network hybrid optimization method for cement denitration | |
CN114037163A (en) | Sewage treatment effluent quality early warning method based on dynamic weight PSO (particle swarm optimization) optimization BP (Back propagation) neural network | |
CN110824915A (en) | GA-DBN network-based intelligent monitoring method and system for wastewater treatment | |
CN110610209A (en) | Air quality prediction method and system based on data mining | |
CN112395777B (en) | Engine calibration parameter optimization method based on automobile exhaust emission simulation environment | |
CN113011660A (en) | Air quality prediction method, system and storage medium | |
CN112949894B (en) | Output water BOD prediction method based on simplified long-short-term memory neural network | |
CN114169254A (en) | Abnormal energy consumption diagnosis method and system based on short-term building energy consumption prediction model | |
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 | |
CN116110506A (en) | On-line soft measurement method for dioxin emission concentration in MSWI process | |
CN112765902A (en) | RBF neural network soft measurement modeling method based on TentFWA-GD and application thereof | |
CN117109582A (en) | Atmospheric pollution source positioning system and method combining sensing network and machine learning | |
CN117370766A (en) | Satellite mission planning scheme evaluation method based on deep learning | |
CN113780639B (en) | Urban solid waste incineration nitrogen oxide NOx emission prediction method based on multitask learning framework | |
CN114034334A (en) | Method for identifying pollution source and flow of karst pipeline | |
CN111882230B (en) | Neural network-based dioxin emission online monitoring method | |
CN109214500A (en) | A kind of transformer fault recognition methods based on integrated intelligent algorithm | |
CN113051806A (en) | Water quality BOD measuring method based on AQPSO-RBF neural network |
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 |