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 PDF

Info

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
Application number
CN202110511330.7A
Other languages
Chinese (zh)
Other versions
CN113192569B (en
Inventor
陈烨
路绳方
高阳
焦良葆
孟琳
刘洋洋
陈庆
张嘉超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Institute of Technology
Original Assignee
Nanjing Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Institute of Technology filed Critical Nanjing Institute of Technology
Priority to CN202110511330.7A priority Critical patent/CN113192569B/en
Publication of CN113192569A publication Critical patent/CN113192569A/en
Application granted granted Critical
Publication of CN113192569B publication Critical patent/CN113192569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/20Identification of molecular entities, parts thereof or of chemical compositions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/086Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B21/00Alarms responsive to a single specified undesired or abnormal condition and not otherwise provided for
    • G08B21/02Alarms for ensuring the safety of persons
    • G08B21/12Alarms for ensuring the safety of persons responsive to undesired emission of substances, e.g. pollution alarms
    • G08B21/14Toxic gas alarms
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/70Machine 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

Harmful gas monitoring method based on improved particle swarm and error feedback neural network
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:
Figure BDA0003060504500000021
Figure BDA0003060504500000022
wherein,
Figure BDA0003060504500000023
representing the inertia velocity weight in the jth exploration particle swarm,
Figure BDA0003060504500000024
and representing the inertia position weight in the jth exploration particle swarm.
Figure BDA0003060504500000025
Representing the speed of the exploring particle i in the jth exploring particle swarm in the kth iteration,
Figure BDA0003060504500000026
the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,
Figure BDA0003060504500000027
a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,
Figure BDA0003060504500000028
respectively are random numbers with values in the interval of (0,1),
Figure BDA0003060504500000029
for this purpose the historical optimum position of the particle i is explored,
Figure BDA00030605045000000210
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:
Figure BDA00030605045000000211
Figure BDA00030605045000000212
wherein,
Figure BDA00030605045000000213
representing the inertial velocity weights in the jth developing particle swarm,
Figure BDA00030605045000000214
representing the inertia position weight in the jth development particle swarm;
Figure BDA00030605045000000215
representing the velocity of the development particle i in the jth development particle population in the kth iteration,
Figure BDA00030605045000000216
indicating the location of the development particle i in the jth development particle population in the kth iteration,
Figure BDA00030605045000000217
a first preset weight factor and a second preset weight factor of the development particle in the jth development particle swarm respectively,
Figure BDA00030605045000000218
respectively are random numbers with values in the interval of (0,1),
Figure BDA00030605045000000219
to this end a historical optimum position of the particle i is developed,
Figure BDA00030605045000000220
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
Figure BDA00030605045000000221
Figure BDA00030605045000000222
Wherein,
Figure BDA00030605045000000223
representing the inertia velocity weight in the jth updated particle swarm,
Figure BDA00030605045000000224
representing the inertia position weight in the jth updating particle swarm;
Figure BDA0003060504500000031
representing the velocity of the update particle i in the jth update particle population in the kth iteration,
Figure BDA0003060504500000032
indicating the location of the update particle i in the jth update particle population in the kth iteration,
Figure BDA0003060504500000033
a first preset weight factor and a second preset weight factor of the updated particle in the jth updated particle group respectively,
Figure BDA0003060504500000034
respectively are random numbers with values in the interval of (0,1),
Figure BDA0003060504500000035
for this purpose the historical optimum position of the particle i is updated,
Figure BDA0003060504500000036
for updating the particle group GjThe global optimal position of (a);
Figure BDA0003060504500000037
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, to
Figure BDA0003060504500000038
Based on the M optimal search particles, respectively
Figure BDA0003060504500000039
N developing particle groups to
Figure BDA00030605045000000310
Based on the M optimal development particles respectively
Figure BDA00030605045000000311
In N update particle groups to
Figure BDA00030605045000000312
Based on the M optimal update particles, respectively
Figure BDA00030605045000000313
And 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:
Figure BDA00030605045000000314
wherein
Figure BDA00030605045000000315
P is I, G and F are the diffusion weight of the particle information,
Figure BDA00030605045000000316
wherein
Figure BDA00030605045000000317
For 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 as
Figure BDA0003060504500000051
And
Figure BDA0003060504500000052
wherein j is 1, 2.. multidot.p; the weight matrix and the threshold matrix from the hidden layer to the output layer are respectively set as
Figure BDA0003060504500000053
And
Figure BDA0003060504500000054
wherein k is 1, 2. The activation function between layers selects a sigmoid function:
Figure BDA0003060504500000061
wherein the hidden layer activation values are as follows:
Figure BDA0003060504500000062
the output value of the hidden layer is bj=f(sj) The output layer activation values are as follows:
Figure BDA0003060504500000063
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:
Figure BDA0003060504500000064
Figure BDA0003060504500000065
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:
Figure BDA0003060504500000071
Figure BDA0003060504500000072
wherein,
Figure BDA0003060504500000073
representing the inertia velocity weight in the jth exploration particle swarm,
Figure BDA0003060504500000074
representing the inertia position weight in the jth exploration particle swarm;
Figure BDA0003060504500000075
denotes the k-th timeThe velocity of the exploring particle i in the jth exploring particle group in the iteration,
Figure BDA0003060504500000076
the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,
Figure BDA0003060504500000077
a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,
Figure BDA0003060504500000078
respectively are random numbers with values in the interval of (0,1),
Figure BDA0003060504500000079
for this purpose the historical optimum position of the particle i is explored,
Figure BDA00030605045000000710
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:
Figure BDA00030605045000000711
Figure BDA00030605045000000712
wherein,
Figure BDA00030605045000000713
representing the inertial velocity weights in the jth developing particle swarm,
Figure BDA00030605045000000714
representing the inertia position weight in the jth development particle swarm;
Figure BDA00030605045000000715
representing the velocity of the development particle i in the jth development particle population in the kth iteration,
Figure BDA00030605045000000716
indicating the location of the development particle i in the jth development particle population in the kth iteration,
Figure BDA00030605045000000717
respectively a first preset weight factor and a second preset weight factor in the jth developing particle swarm,
Figure BDA00030605045000000718
respectively are random numbers with values in the interval of (0,1),
Figure BDA00030605045000000719
to this end a historical optimum position of the particle i is developed,
Figure BDA00030605045000000720
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
Figure BDA0003060504500000081
Figure BDA0003060504500000082
Wherein,
Figure BDA0003060504500000083
representing the inertia velocity weight in the jth updated particle swarm,
Figure BDA0003060504500000084
representing the inertia position weight in the jth updating particle swarm;
Figure BDA0003060504500000085
representing the velocity of the update particle i in the jth update particle population in the kth iteration,
Figure BDA0003060504500000086
indicating the location of the update particle i in the jth update particle population in the kth iteration,
Figure BDA0003060504500000087
a first preset weight factor and a second preset weight factor of the updated particle in the jth updated particle group respectively,
Figure BDA0003060504500000088
respectively are random numbers with values in the interval of (0,1),
Figure BDA0003060504500000089
for this purpose the historical optimum position of the particle i is updated,
Figure BDA00030605045000000810
for updating the particle group GjThe global optimal position of (a);
Figure BDA00030605045000000811
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, to
Figure BDA00030605045000000812
Based on the M optimal search particles, respectively
Figure BDA00030605045000000813
N developing particle groups to
Figure BDA00030605045000000814
Based on the M optimal development particles respectively
Figure BDA00030605045000000815
In N update particle groups to
Figure BDA00030605045000000816
Based on the M optimal update particles, respectively
Figure BDA00030605045000000817
And 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:
Figure BDA00030605045000000818
wherein,
Figure BDA00030605045000000819
p is I, G and F are the diffusion weight of the particle information,
Figure BDA00030605045000000820
wherein
Figure BDA00030605045000000821
And (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:
Figure FDA0003060504490000011
Figure FDA0003060504490000012
wherein,
Figure FDA0003060504490000013
representing the inertia velocity weight in the jth exploration particle swarm,
Figure FDA0003060504490000014
representing the inertia position weight in the jth exploration particle swarm;
Figure FDA0003060504490000015
representing the speed of the exploring particle i in the jth exploring particle swarm in the kth iteration,
Figure FDA0003060504490000016
the position of the exploration particle i in the jth exploration particle swarm in the kth iteration is shown,
Figure FDA0003060504490000017
a first preset weight factor and a second preset weight factor of the exploration particles in the jth exploration particle swarm respectively,
Figure FDA0003060504490000018
respectively are random numbers with values in the interval of (0,1),
Figure FDA0003060504490000019
for this purpose the historical optimum position of the particle i is explored,
Figure FDA00030605044900000110
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:
Figure FDA0003060504490000021
Figure FDA0003060504490000022
wherein,
Figure FDA0003060504490000023
representing the inertial velocity weights in the jth developing particle swarm,
Figure FDA0003060504490000024
representing the inertia position weight in the jth development particle swarm;
Figure FDA0003060504490000025
representing the velocity of the development particle i in the jth development particle population in the kth iteration,
Figure FDA0003060504490000026
indicating the location of the development particle i in the jth development particle population in the kth iteration,
Figure FDA0003060504490000027
a first preset weight factor and a second preset weight factor of the development particle in the jth development particle swarm respectively,
Figure FDA0003060504490000028
respectively are random numbers with values in the interval of (0,1),
Figure FDA0003060504490000029
to this end a historical optimum position of the particle i is developed,
Figure FDA00030605044900000210
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
Figure FDA00030605044900000211
Wherein,
Figure FDA00030605044900000212
representing the inertia velocity weight in the jth updated particle swarm,
Figure FDA00030605044900000213
representing the inertia position weight in the jth updating particle swarm;
Figure FDA00030605044900000214
representing the velocity of the update particle i in the jth update particle population in the kth iteration,
Figure FDA00030605044900000215
indicating the location of the update particle i in the jth update particle population in the kth iteration,
Figure FDA00030605044900000216
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,
Figure FDA00030605044900000217
respectively are random numbers with values in the interval of (0,1),
Figure FDA00030605044900000218
for this purpose the historical optimum position of the particle i is updated,
Figure FDA00030605044900000219
for updating the particle group GjThe global optimal position of (a);
Figure FDA00030605044900000220
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, to
Figure FDA00030605044900000221
Based on the M optimal search particles, respectively
Figure FDA00030605044900000222
N developing particle groups to
Figure FDA00030605044900000223
Based on the M optimal development particles respectively
Figure FDA00030605044900000224
In N update particle groups to
Figure FDA00030605044900000225
Based on the M optimal update particles, respectively
Figure FDA00030605044900000226
And 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:
Figure FDA0003060504490000031
wherein
Figure FDA0003060504490000032
As the weight of the diffusion of the particle information,
Figure FDA0003060504490000033
wherein
Figure FDA0003060504490000034
For the random factor, take a random number between (0, 1).
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.
CN202110511330.7A 2021-05-11 2021-05-11 Harmful gas monitoring method based on improved particle swarm and error feedback neural network Active CN113192569B (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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