CN108805253B - PM2.5 concentration prediction method - Google Patents

PM2.5 concentration prediction method Download PDF

Info

Publication number
CN108805253B
CN108805253B CN201710297281.5A CN201710297281A CN108805253B CN 108805253 B CN108805253 B CN 108805253B CN 201710297281 A CN201710297281 A CN 201710297281A CN 108805253 B CN108805253 B CN 108805253B
Authority
CN
China
Prior art keywords
neural network
wolf
data
concentration
optimized
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.)
Expired - Fee Related
Application number
CN201710297281.5A
Other languages
Chinese (zh)
Other versions
CN108805253A (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.)
Potevio Information Technology Co Ltd
Original Assignee
Potevio Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Potevio Information Technology Co Ltd filed Critical Potevio Information Technology Co Ltd
Priority to CN201710297281.5A priority Critical patent/CN108805253B/en
Publication of CN108805253A publication Critical patent/CN108805253A/en
Application granted granted Critical
Publication of CN108805253B publication Critical patent/CN108805253B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a PM2.5 concentration prediction method, which is characterized in that a gray wolf optimization algorithm and a BP neural network are combined, the weight and the threshold of the BP neural network are optimized by the gray wolf optimization algorithm, and the concentration of PM2.5 is predicted by adopting an optimized model. The method has the beneficial effect of improving the accuracy of PM2.5 concentration prediction.

Description

PM2.5 concentration prediction method
Technical Field
The invention relates to the technical field of air quality prediction, in particular to a PM2.5 concentration prediction method.
Background
PM2.5 refers to particles with an aerodynamic equivalent diameter of 2.5 microns or less. It has the characteristics of small particle size, large area, strong activity and easy attachment of toxic and harmful substances. The long-time retention in the atmosphere and the long conveying distance can directly enter the lung of a human body and influence the health of the human body. When PM2.5 concentration is higher in the air, haze weather of different degrees can be formed, and air visibility is reduced. The main meteorological factors (such as weather, temperature, wind speed, wind direction and the like) and the pollutant concentration (such as NO) in the air influencing the concentration of PM2.5x、SO2、O3Etc.). PM2.5 has brought serious influence to people's daily life. By predicting the PM2.5 concentration, measures are taken to reduce the PM concentration, so that convenience is brought to life and travel of people.
At present, a neural network is mostly adopted to predict the PM2.5 concentration. The BP neural network is one of the most widely used neural network models at present. During PM2.5 prediction, meteorological data (such as weather, temperature, wind speed, wind direction and the like) and pollutant concentration (such as NO) in air are obtainedx、SO2、O3Etc.) as inputs to the neural network and PM2.5 concentration as the network output.
However, when the neural network model is used for predicting the concentration of PM2.5, the weight and the threshold of the neural network are not easy to train, and the network is easy to fall into local optimum, so that the accuracy of the neural network model for predicting the concentration of PM2.5 is low.
Disclosure of Invention
In order to overcome the problems or at least partially solve the problems, the invention provides a PM2.5 concentration prediction method, which optimizes the weight and the threshold of a neural network through a wolf optimization algorithm, selects a good training starting point for the network and avoids the network from falling into local optimization. The neural network optimized by the method can improve the PM2.5 concentration prediction accuracy.
According to an aspect of the present invention, there is provided a PM2.5 concentration prediction method including the steps of:
step 1, randomly generating a wolf cluster corresponding to a BP neural network to be optimized by using a wolf optimization algorithm;
step 2, training the BP neural network to be optimized, and calculating a fitness value corresponding to each wolf in the wolf group; selecting three wolfs with the best fitness value to be marked as alpha, beta and delta in sequence, and recording the position information and the fitness value of the alpha, the beta and the delta respectively;
step 3, based on the respective position information and fitness value of alpha, beta and delta, calculating by utilizing a wolf optimization algorithm to obtain an optimized BP neural network model;
and 4, taking the PM2.5 concentration prediction data as input information, and calculating by using the optimized BP neural network model to obtain a PM2.5 concentration prediction result.
The application provides a PM2.5 concentration prediction method, a grey wolf optimization algorithm and a BP neural network are combined, the weight and the threshold of the BP neural network are optimized by the grey wolf optimization algorithm, and the concentration of PM2.5 is predicted by an optimized model. The method has the beneficial effect of improving the accuracy of PM2.5 concentration prediction.
Drawings
FIG. 1 is a schematic diagram of a prior art BP neural network architecture;
FIG. 2 is a schematic diagram of a PM2.5 concentration prediction overall scheme for optimizing a BP neural network by using a Grey wolf algorithm according to the present invention;
FIG. 3 is a schematic diagram of the position vector of a wolf in 2-dimensional space and the possible positions to which the next step may be moved in the prior art gray wolf optimization algorithm;
FIG. 4 is a schematic diagram of the location update of the wolf colony in the gray wolf optimization algorithm of the prior art;
FIG. 5 is a schematic overall flow chart of a PM2.5 concentration prediction method according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a method for predicting PM2.5 concentration according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating verification of accuracy of a prediction result of a PM2.5 concentration prediction method according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples. The following examples are intended to illustrate the invention but are not intended to limit the scope of the invention.
At present, in the prior art, a neural network is mostly adopted to predict the concentration of PM 2.5. The BP neural network is one of the most widely used neural network models at present. During PM2.5 prediction, meteorological data (such as weather, temperature, wind speed, wind direction and the like) and pollutant concentration (such as NO) in air are obtainedx、SO2、O3Etc.) as inputs to the neural network and PM2.5 concentration as the network output.
First, a preliminary description will be given of the BP neural network.
The BP (back propagation) neural network is a multi-layer feedforward network trained according to an error inverse propagation algorithm, and a typical BP neural network structure is shown in fig. 1, and is generally a 3-layer structure j-i-m, that is, j inputs, i hidden nodes and m outputs are provided. Input node x ═ x1,x2,…,xj]TThe network weight between the input node and the hidden node is W1, and the hidden node is o ═ o1,o2,…,oi]TThe weight between the hidden node and the output node is W2, and the output node is y ═ y1,y2,…,ym]TThe desired output of the network is yp。φiThe activation function of the ith hidden node is shown in (t), an S-type logarithmic function is usually adopted as the activation function of the network, and a hyperbolic tangent function can also be adopted.
The working principle of the BP neural network consists of two parts: forward propagation and back propagation of errors. Each neuron of the input layer is responsible for receiving input information from the outside and transmitting the input information to each neuron of the middle layer; the middle layer is an internal information processing layer and is responsible for information transformation; the hidden layer transmits the information of each neuron to the output layer, and after further processing, the forward propagation processing process of one-time learning is completed, and the output layer outputs an information processing result to the outside. When the actual output does not match the desired output, the error back-propagation phase is entered. And the error passes through the output layer, the weight of each layer is corrected in a mode of error gradient reduction, and the error is reversely transmitted to the hidden layer and the input layer by layer. The repeated information forward propagation and error backward propagation process is a process of continuously adjusting weights of all layers and a process of learning and training the neural network, and the process is carried out until the error output by the network is reduced to an acceptable degree or preset learning times.
However, when the neural network model is used for predicting the concentration of PM2.5, the weight and the threshold of the neural network are not easy to train, and the network is easy to fall into local optimum, so that the accuracy of the neural network model for predicting the concentration of PM2.5 is low.
The invention provides an air pollutant PM2.5 concentration prediction method for optimizing a BP neural network based on a gray wolf optimization algorithm. The weight and the threshold of the neural network are optimized through a wolf optimization algorithm, a good training starting point is selected for the network, and the network is prevented from falling into local optimization. The neural network optimized by the method can improve the PM2.5 concentration prediction accuracy. The air pollutant PM2.5 concentration prediction overall scheme based on the gray wolf algorithm optimization BP neural network is shown in figure 2.
A brief introduction to the gray wolf optimization algorithm follows.
The gray wolf optimization algorithm (GWO) is a new meta-heuristic bio-intelligence algorithm proposed by Seyedali mirjalii et al in 2014. The wolf colony algorithm is mainly proposed according to the leader level of the big gray wolf in nature and a hunting mechanism. To simulate the lead rank mechanism inside a wolf pack, the entire wolf pack is divided into four types of wolfs: alpha, beta, delta, and omega. The hunting process is divided into three stages according to the hunting mechanism of the wolf colony: search for prey, surround prey, attack prey. Of the four groups of wolves, α, β, δ are seen as the first three wolves in the group of wolves that perform best, and they direct the other wolves (W) towards the best region in the search space. In the whole iterative search process, three wolves of alpha, beta and delta are used for predicting and evaluating the possible positions of the prey, and in the optimization process, the wolve group updates the positions of the wolves according to the following formula:
Figure BDA0001283371710000041
Figure BDA0001283371710000051
wherein t is the iteration frequency of this time,
Figure BDA0001283371710000052
and
Figure BDA0001283371710000053
is a vector of coefficients that is a function of,
Figure BDA0001283371710000054
is the position vector of the prey,
Figure BDA0001283371710000055
is the position of the wolf.
Vector quantity
Figure BDA0001283371710000056
And
Figure BDA0001283371710000057
the expression of (a) is as follows:
Figure BDA0001283371710000058
Figure BDA0001283371710000059
wherein the coefficients
Figure BDA00012833717100000510
The number of iterations of the algorithm decreases linearly from 2 to 0 as it increases.
Figure BDA00012833717100000511
And
Figure BDA00012833717100000512
is [0,1 ]]Random vector of (2).
The ideas and conceptual descriptions of the location update equations (1) and (2) are shown in fig. 3. It can be seen from the illustration that the wolf located at the (X, Y) position can relocate its position around the prey according to the position update formula set forth above. Although only 7 positions to which the wolf may move are shown, the wolf may be allowed to move to any one position in the continuous space around the game by adjusting the random parameters a and C.
In the wolf pack algorithm, we always assume that the positions where α, β and δ wolfs are located are likely to be the positions of the prey (optimal solution). In the optimization process, the first three solutions obtained at present are assumed to be α, β, and δ, respectively, and then the other wolf considered as W repositions itself according to the positions of the three leading wolfs α, β, and δ. The position of the wolf of class W is adjusted again by the following mathematical integer-modulus formula, and the update diagram of the wolf position is shown in fig. 4.
Figure BDA00012833717100000513
Figure BDA00012833717100000514
Figure BDA00012833717100000515
Wherein
Figure BDA00012833717100000516
Is the position of the alpha wolf and,
Figure BDA00012833717100000517
is the position of the beta wolf and,
Figure BDA00012833717100000518
is the delta wolf position. Is a random vector representing the position of the current solution. Equations (5), (6) and (7) calculate the current solution position and the distances between alpha, beta and delta, respectivelyThe approximate distance of (c). After defining the distance between them, the final position of the current solution is calculated according to the following formula:
Figure BDA0001283371710000061
Figure BDA0001283371710000062
Figure BDA0001283371710000063
Figure BDA0001283371710000064
in the formula (I), the compound is shown in the specification,
Figure BDA0001283371710000065
the position of the alpha wolf is shown,
Figure BDA0001283371710000066
the position of the beta wolf is shown,
Figure BDA0001283371710000067
indicating the location of the delta wolf.
Figure BDA0001283371710000068
Is a random vector and t represents the number of iterations.
As can be seen from the above equations, equations (5), (6), (7) define the step sizes when W tends toward α, β, δ wolf, respectively. Equations (8), (9), (10) and (11) define the final position of the W wolf.
Fig. 5 is a schematic flow chart illustrating an overall flow of a PM2.5 concentration prediction method according to an embodiment of the present invention. In general, the method comprises the following steps:
step 1, randomly generating a wolf cluster corresponding to a BP neural network to be optimized by using a wolf optimization algorithm;
step 2, training the BP neural network to be optimized, and calculating a fitness value corresponding to each wolf in the wolf group; selecting three wolfs with the best fitness value to be marked as alpha, beta and delta in sequence, and recording the position information and the fitness value of the alpha, the beta and the delta respectively;
step 3, based on the respective position information and fitness value of alpha, beta and delta, calculating by utilizing a wolf optimization algorithm to obtain an optimized BP neural network model;
and 4, taking the PM2.5 concentration prediction data as input information, and calculating by using the optimized BP neural network model to obtain a PM2.5 concentration prediction result.
In another embodiment of the present invention, a PM2.5 concentration prediction method further includes, before step 1: setting a topological structure of the BP neural network to be optimized, and setting the initial weight w and the threshold b of the BP neural network to be optimized; and setting the wolf colony scale and the maximum iteration times and/or the iteration precision of the wolf optimization algorithm.
In another embodiment of the present invention, a method for predicting PM2.5 concentration, wherein the randomly generating a wolf colony corresponding to a BP neural network to be optimized by using a wolf optimization algorithm in step 1 further includes: and determining the dimensionality of the wolf position by utilizing the topological structure of the BP neural network to be optimized.
In another embodiment of the present invention, the calculating the fitness value corresponding to each wolf in step 2 further includes: and taking the PM2.5 value, meteorological data and pollutant concentration data of the previous day as the input of a neural network, taking the PM2.5 value of the next day as the output of the neural network, taking the output error of the PM2.5 in the neural network as a fitness function of a wolf optimization algorithm, and calculating the fitness value corresponding to each wolf by using the fitness function.
In another embodiment of the present invention, in a PM2.5 concentration prediction method, the step 3 further includes:
s31, updating the position information of other wolfs W except alpha, beta and delta by utilizing a wolf optimization algorithm; updating the parameters of the gray wolf optimization algorithm;
s32, repeating the loop of the step 2 and the step 3 until the iteration termination condition is confirmed to be met, and updating the weight and the threshold of the BP neural network by using the position information of the alpha wolf;
and S33, training the BP data network by using PM2.5 concentration training data to obtain an optimized BP neural network model.
In the foregoing embodiment of the present invention, the network input includes: maximum air temperature, minimum air temperature, day weather, night weather, wind power, wind direction, SO2, CO, NO2, O3, PM10, PM2.5 on the first day. The network output comprises: PM2.5 value the next day; the input and output enter the neural network at the time of the second step.
In another embodiment of the present invention, a PM2.5 concentration prediction method, where the iteration termination condition in step 4 includes: and stopping GWO algorithm optimization on the neural network after the maximum iteration times of the gray wolf optimization algorithm is met or the set iteration precision is reached.
In the above embodiment of the present invention, the whole process is not completed after the optimization of the neural network by the algorithm GWO is stopped, and then the training optimization of the neural network itself is performed.
In another embodiment of the present invention, a PM2.5 concentration prediction method, the determining the dimension of the wolf location by using the topology of the BP neural network to be optimized in step 1 further includes:
Figure BDA0001283371710000081
wherein lthThe number of neurons at the Th layer of the BP neural network is, the Th is the total number of layers of the BP neural network, and the total number of layers of the BP neural network comprises an input layer and an output layer of the BP neural network.
In another embodiment of the present invention, a PM2.5 concentration prediction method, where the fitness function of the grayish wolf optimization algorithm in step 2 further includes:
Figure BDA0001283371710000082
wherein the content of the first and second substances,youtifor the ith sample PM2.5 concentration output value, a, of the BP neural networkiThe actual value of the concentration of PM2.5 of the ith sample is shown, and n is the number of the tested samples.
In another embodiment of the present invention, the step S31 of repositioning the W wolf to its own position according to the positions of the three captain wolfs, namely α, β and δ, further comprises:
Figure BDA0001283371710000083
Figure BDA0001283371710000084
Figure BDA0001283371710000085
wherein the content of the first and second substances,
Figure BDA0001283371710000086
is the position of the alpha wolf,
Figure BDA0001283371710000087
is the position of the beta wolf,
Figure BDA0001283371710000088
the position of the delta wolf is a random vector and represents the position of the current solution;
Figure BDA0001283371710000089
Figure BDA00012833717100000810
Figure BDA00012833717100000811
Figure BDA0001283371710000091
wherein the content of the first and second substances,
Figure BDA0001283371710000092
is the position of the alpha wolf,
Figure BDA0001283371710000093
is the position of the beta wolf,
Figure BDA0001283371710000094
is the position of the delta wolf and,
Figure BDA0001283371710000095
Figure BDA0001283371710000096
and
Figure BDA0001283371710000097
is a random vector and t is the number of iterations.
In another embodiment of the present invention, the updating the weight and the threshold of the BP neural network by using the location information of the α wolf in step 4 further includes:
Wi=X(K+1:K+li×li+1),
Bi=X(K+li×li+1+1:K+li×li+1+li+1),
wherein:
Figure BDA0001283371710000098
Wiis the weight between the ith layer and the (i + 1) th layer of the BP neural network, BiIs the i +1 th layer threshold, X is the position of alpha wolf, liThe number of the i-layer neurons of the BP neural network is shown.
Fig. 6 shows a flowchart of an operation of a PM2.5 concentration prediction method according to another embodiment of the present invention, in which a gray wolf optimization algorithm is combined with a BP neural network, a weight and a threshold of the BP neural network are optimized by the gray wolf optimization algorithm, and an optimized model is used to predict the concentration of PM 2.5. In the learning process of the BP neural network, the weight and the threshold of the network directly influence the accuracy of PM2.5 prediction. We optimize the weights and thresholds of the network using the GWO algorithm. The example method generally includes the steps of:
and step A, initializing parameters. And determining the topological structure of the BP neural network, and obtaining the training sample of the BP neural network by the initial network weight w and the threshold b. The wolf colony size n, the maximum number of iterations itermax, is set.
And B: and randomly generating a population. Randomly generating a N wolf
Figure BDA0001283371710000099
The position of each wolf corresponds to the weight and the threshold of a group of BP neural networks.
The invention relates to a concrete method for combining a wolf location with a neural network weight and a threshold value, which comprises the following steps: and determining the dimensionality of the wolf position according to the network topological structure, and updating the weight and the threshold of the neural network by using the position of the wolf group.
The method for determining the dimension of the wolf position comprises the following steps:
Figure BDA0001283371710000101
wherein lthIs the number of network Th layer neurons, the number of Th network layers (including input layer and output layer)
And C: training a BP neural network, calculating the fitness value corresponding to each wolf, selecting the three wolfs with the best fitness values as alpha, beta and delta in sequence, and keeping the positions and the fitness values of the three wolfs.
The specific link method of the PM2.5 concentration and the neural network and GWO algorithm is to take the PM2.5 output error in the neural network as the fitness function of the wolf optimization algorithm:
Figure BDA0001283371710000102
youtiis the output value of the network to the ith sample PM2.5 concentration, aiIs the actual value of the concentration of PM2.5 of the ith sample, and n is the number of the test samples.
Step D: and (4) updating the position. Updating the positions of other wolfs W by using the formulas (5) - (11) in the specification, namely updating the positions of W wolfs;
step E: and (6) updating the parameters. Updating parameters a, A and C of the gray wolf optimization algorithm by using formulas (3) - (4) in the specification;
step F: and judging operation. And D, judging whether an iteration termination condition is met, if so, outputting the position and the fitness value of the alpha wolf as an optimal solution, and if not, returning to the step C.
Step G: and (5) verifying the model. The position of alpha wolf
Figure BDA0001283371710000103
And the corresponding parameters are used as the weight and the threshold of the BP neural network, the training data is retrained, a BP neural network model is established, and the model is verified by using the test data.
In the step G, updating the weight and the threshold of the BP neural network by using the position information of the α wolf further includes:
Wi=X(K+1:K+li×li+1),
Bi=X(K+li×li+1+1:K+li×li+1+li+1),
wherein:
Figure BDA0001283371710000111
Wiis the weight between the ith layer and the (i + 1) th layer of the BP neural network, BiIs the i +1 th layer threshold, X is the position of alpha wolf, liThe number of the i-layer neurons of the BP neural network is shown.
In yet another embodiment of the present invention, a PM2.5 concentration prediction method, in this example, 500 sets of air pollution concentration and meteorological data from 2015 to 2016 to 5 are used as training and prediction data of a network, wherein 400 sets are training data and 100 sets are used as prediction data. The raw data are shown in table 1 below.
TABLE 1 Nanjing Meteorological and contaminant concentration raw data
Figure BDA0001283371710000112
The method comprises the steps of firstly, removing abnormal data from original data, classifying weather, wind power and wind direction characteristics, converting data formats, and converting the data into information which can be identified by a neural network. The weather characteristics are classified into 14 types, the wind direction characteristics are classified into 8 types, and the wind power characteristics are classified into 5 types. The classification details are shown in the following table.
Processing weather data, classifying weather into 14 classes
All-weather 1 Fog mist 4 Gust of rain 7 Moderate to heavy rain 10 Heavy Rain 12 Snow in small to medium 14
Cloudy 2 Light rain 5 Thunderstorm rain 8 Heavy rain 11 Rain and snow 13 Snow in the middle 14
Yin (kidney) 3 Rain in the small to medium range 6 Medium rain 9 Heavy to heavy rain 12 Small snow 14 Big snow 14
The wind power data processing is divided into 5 grades
Breeze of breeze 2
Grade 3-4 3
4-5 stages 4
5-6 stages 5
6-7 stages 6
Processing wind direction data, dividing into 8 wind directions
Dongfeng (Dongfeng) 1 Northwest of China 5
Southeast wind 2 Western medicine 6
Northeast 3 Southwest 7
North China 4 South China 8
The data after treatment are shown in table 2:
TABLE 2 Nanjing Meteorological and pollutant concentration processed data
Figure BDA0001283371710000121
Figure BDA0001283371710000131
And the PM2.5 value, the meteorological data and the pollutant concentration data of the previous day are in one-to-one correspondence with the PM2.5 value of the next day. The PM2.5 value of the following day is predicted using the PM2.5 value of the previous day, weather and pollutant concentration data.
Network input: maximum air temperature, minimum air temperature, day weather, night weather, wind power, wind direction, SO2, CO, NO2, O3, PM10, PM2.5 on the first day. And (3) network output: PM2.5 value the next day.
And randomly disorganizing the generated samples, and finally performing data normalization processing and entering a training network.
The experiment adopts a 3-layer BP neural network which comprises an input layer, a single hidden layer and an output layer. The dimension of the input layer is 12, the dimension of the output layer is 1, and the number of neurons in the hidden layer is 5. The scale n of the gray wolf algorithm is 30, the iteration number iter of the gray wolf algorithm is 100, the training iteration number epochs of the neural network is 1000, and the network learning rate lr is 0.1.
The trained network is tested and verified, and fig. 7 is a comparison graph of test results of 100 groups of data.
Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A PM2.5 concentration prediction method is characterized by comprising the following steps:
step 1, randomly generating a wolf cluster corresponding to a BP neural network to be optimized by using a wolf optimization algorithm;
step 2, training the BP neural network to be optimized, and calculating a fitness value corresponding to each wolf in the wolf group; selecting three wolfs with the best fitness value to be marked as alpha, beta and delta in sequence, and recording the position information and the fitness value of the alpha, the beta and the delta respectively;
step 3, based on the respective position information and fitness value of alpha, beta and delta, calculating by utilizing a wolf optimization algorithm to obtain an optimized BP neural network model;
step 4, taking PM2.5 concentration prediction data as input information, and calculating by using the optimized BP neural network model to obtain a PM2.5 concentration prediction result;
the step 3 further comprises:
s31, updating the position information of other wolfs W except alpha, beta and delta by utilizing a wolf optimization algorithm; updating the parameters of the gray wolf optimization algorithm;
s32, repeating the loop of the step 2 and the step 3 until the iteration termination condition is confirmed to be met, and updating the weight and the threshold of the BP neural network by using the position information of the alpha wolf;
s33, training the BP neural network by using PM2.5 concentration training data to obtain an optimized BP neural network model;
the updating of the weight and the threshold of the BP neural network by using the position information of the alpha wolf in the step 4 further includes:
Wi=X(K+1:K+li×li+1),
Bi=X(K+li×li+1+1:K+li×li+1+li+1),
wherein:
Figure FDA0002774401020000021
Wiis the weight between the ith layer and the (i + 1) th layer of the BP neural network, BiIs the i +1 th layer threshold, X is the position of alpha wolf, lthThe number of the neurons at the Th layer of the BP neural network is set, and Th is the total number of the layers of the BP neural network;
wherein, step 1 also includes before:
the method comprises the following steps of removing abnormal data from original data, classifying the original data subjected to abnormal data removal according to weather, wind and wind direction characteristics, converting the original data into information which can be identified by a neural network, wherein the type of the weather data comprises: fog, light rain, light to medium rain, rain fall, thunderstorm rain, medium to heavy rain, snow, light to medium snow, and heavy snow; the types of wind data include: breeze, grade 3-4, grade 4-5, grade 5-6, and grade 6-7; the types of wind direction data include: east wind, southeast wind, northeast wind, north wind, northwest wind, west wind, southwest wind and south wind;
the PM2.5 value, the meteorological data and the pollutant concentration data of the previous day are in one-to-one correspondence with the PM2.5 value, the meteorological data and the pollutant concentration data of the next day, the PM2.5 value, the meteorological data and the pollutant concentration data of the previous day are used as input samples, and the PM2.5 value, the meteorological data and the pollutant concentration data of the next day are used as corresponding actual outputs of the input samples;
and randomly disorganizing the generated samples, and finally performing data normalization processing to obtain the PM2.5 concentration training data.
2. The method of claim 1, wherein step 1 is preceded by: setting a topological structure of the BP neural network to be optimized, and setting the initial weight w and the threshold b of the BP neural network to be optimized; and setting the wolf colony scale and the maximum iteration times and/or the iteration precision of the wolf optimization algorithm.
3. The method of claim 1, wherein randomly generating a wolf pack corresponding to a BP neural network to be optimized using a wolf optimization algorithm in step 1 further comprises: and determining the dimensionality of the wolf position by utilizing the topological structure of the BP neural network to be optimized.
4. The method of claim 1, wherein the step 2 of calculating the fitness value corresponding to each wolf further comprises: the PM2.5 value, meteorological data and pollutant concentration data of the previous day are used as the input of a neural network, the PM2.5 value of the next day is used as the output of the neural network, the output error of the PM2.5 in the neural network is used as a fitness function of a wolf optimization algorithm, and the fitness function is used for calculating the fitness value corresponding to each wolf.
5. The method of claim 1, wherein the iteration termination condition in step 4 comprises: and stopping GWO algorithm optimization on the neural network after the maximum iteration times of the gray wolf optimization algorithm is met or the set iteration precision is reached.
6. The method of claim 3, wherein the step 1 of determining the dimension of the wolf location using the topology of the BP neural network to be optimized further comprises:
Figure FDA0002774401020000031
wherein lthThe number of neurons at the Th layer of the BP neural network is, the Th is the total number of layers of the BP neural network, and the total number of layers of the BP neural network comprises an input layer and an output layer of the BP neural network.
7. The method of claim 4, wherein the fitness function of the grayling optimization algorithm in step 2 further comprises:
Figure FDA0002774401020000032
wherein, youtiFor the ith sample PM2.5 concentration output value, a, of the BP neural networkiThe actual value of the concentration of PM2.5 of the ith sample is shown, and n is the number of the tested samples.
8. The method as claimed in claim 1, wherein the step S31 of updating the positions of the remaining wolves W other than α, β and δ using the gray wolf optimization algorithm further comprises:
Figure FDA0002774401020000033
Figure FDA0002774401020000034
Figure FDA0002774401020000041
wherein the content of the first and second substances,
Figure FDA0002774401020000042
is the position of the alpha wolf,
Figure FDA0002774401020000043
is the position of the beta wolf,
Figure FDA0002774401020000044
is the position of the delta wolf and,
Figure FDA0002774401020000045
Figure FDA0002774401020000046
is a random vector of the number of bits,
Figure FDA0002774401020000047
indicating the location of the current solution;
Figure FDA0002774401020000048
Figure FDA0002774401020000049
Figure FDA00027744010200000410
Figure FDA00027744010200000411
wherein the content of the first and second substances,
Figure FDA00027744010200000412
is the position of the alpha wolf,
Figure FDA00027744010200000413
is the position of the beta wolf,
Figure FDA00027744010200000414
is the position of the delta wolf and,
Figure FDA00027744010200000415
Figure FDA00027744010200000416
and
Figure FDA00027744010200000417
is a random vector and t is the number of iterations.
CN201710297281.5A 2017-04-28 2017-04-28 PM2.5 concentration prediction method Expired - Fee Related CN108805253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710297281.5A CN108805253B (en) 2017-04-28 2017-04-28 PM2.5 concentration prediction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710297281.5A CN108805253B (en) 2017-04-28 2017-04-28 PM2.5 concentration prediction method

Publications (2)

Publication Number Publication Date
CN108805253A CN108805253A (en) 2018-11-13
CN108805253B true CN108805253B (en) 2021-03-02

Family

ID=64053868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710297281.5A Expired - Fee Related CN108805253B (en) 2017-04-28 2017-04-28 PM2.5 concentration prediction method

Country Status (1)

Country Link
CN (1) CN108805253B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109696412A (en) * 2018-12-20 2019-04-30 南京信息工程大学 Infrared gas sensor and atmospheric pressure compensating method based on AGNES Optimized BP Neural Network
CN111371607B (en) * 2020-02-28 2022-09-16 大连大学 Network flow prediction method for optimizing LSTM based on decision-making graying algorithm
CN113777000B (en) * 2021-10-09 2024-04-12 山东科技大学 Dust concentration detection method based on neural network

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6364666B1 (en) * 1997-12-17 2002-04-02 SCIENTIFIC LEARNîNG CORP. Method for adaptive training of listening and language comprehension using processed speech within an animated story
CN106374534A (en) * 2016-11-17 2017-02-01 云南电网有限责任公司玉溪供电局 Multi-target grey wolf optimization algorithm-based large scale household energy management method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104092503B (en) * 2014-07-15 2016-08-17 哈尔滨工程大学 A kind of artificial neural network frequency spectrum sensing method optimized based on wolf pack
CN106022517A (en) * 2016-05-17 2016-10-12 温州大学 Risk prediction method and device based on nucleus limit learning machine
CN106355192B (en) * 2016-08-16 2019-12-31 温州大学 Support vector machine method based on chaos grey wolf optimization

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6364666B1 (en) * 1997-12-17 2002-04-02 SCIENTIFIC LEARNîNG CORP. Method for adaptive training of listening and language comprehension using processed speech within an animated story
CN106374534A (en) * 2016-11-17 2017-02-01 云南电网有限责任公司玉溪供电局 Multi-target grey wolf optimization algorithm-based large scale household energy management method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Sen Zhang et al.Using Orthogonal Grey Wolf Optimizer with Mutation for Training Multi-Layer Perceptron Neural Network.《Journal of Computational and Theoretical Nanoscience》.2016,第13卷(第7期),4544-4556页. *
李常洪等.基于狼群算法优化的BP神经网络.《理论探索》.2016,(第1期), *

Also Published As

Publication number Publication date
CN108805253A (en) 2018-11-13

Similar Documents

Publication Publication Date Title
CN108805253B (en) PM2.5 concentration prediction method
CN112418406B (en) Wind power tower inclination angle missing data supplementing method based on SSA-LSTM model
CN103324980A (en) Wind power station wind speed prediction method
CN112488208B (en) Method for acquiring remaining life of island pillar insulator
CN111222706A (en) Chaos time sequence prediction method based on particle swarm optimization and self-encoder
CN115564114A (en) Short-term prediction method and system for airspace carbon emission based on graph neural network
CN112700326A (en) Credit default prediction method for optimizing BP neural network based on Grey wolf algorithm
CN113361761A (en) Short-term wind power integration prediction method and system based on error correction
CN114004163A (en) PM2.5 inversion method based on MODIS and long-and-short-term memory network model
CN114118537A (en) Combined prediction method for carbon emission of airspace flight
CN110942182A (en) Method for establishing typhoon prediction model based on support vector regression
CN110458342A (en) One kind monitoring system and method based on improved NARX neural network microclimate
CN114970815A (en) Traffic flow prediction method and device based on improved PSO algorithm optimized LSTM
Wang et al. Pm2. 5 prediction based on neural network
CN109034478B (en) High-precision prediction method for high-wind iterative competition along high-speed railway
CN107688862B (en) Insulator equivalent salt deposit density accumulation rate prediction method based on BA-GRNN
CN109711593B (en) Instantaneous calculation decision-oriented high-speed railway line wind speed prediction method
CN109063907B (en) Intelligent traversal large-step-length prediction method for maximum wind speed along high-speed railway
CN107590346B (en) Downscaling correction model based on spatial multi-correlation solution set algorithm
CN116307139A (en) Wind power ultra-short-term prediction method for optimizing and improving extreme learning machine
CN115034159A (en) Power prediction method, device, storage medium and system for offshore wind farm
CN114741952A (en) Short-term load prediction method based on long-term and short-term memory network
Wang et al. LSTM wastewater quality prediction based on attention mechanism
CN114662244B (en) BP neural network-based multi-working-condition optimization design method for propeller
CN109685242B (en) Photovoltaic ultra-short term combined prediction method based on Adaboost algorithm

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210302