Short-Term AQI Prediction Method Based on SSA-DE-ANFIS Model

Through singular spectrum analysis and the optimization of the ANFIS model combined with differential evolution algorithm, the problem of difficult noise impact in air quality index prediction is solved, and higher prediction accuracy is achieved.

CN115600745BActive Publication Date: 2025-06-10NANCHANG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211293570.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-21
Publication Date
2025-06-10
Estimated Expiration
2042-10-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with noise effects in air quality index (AQI) prediction, resulting in a decrease in prediction accuracy.

Method used

Singular spectrum analysis (SSA) was used to decompose the original AQI sequence into trend components and noise components, and optimize the adaptive neural fuzzy inference system (ANFIS) model with differential evolution algorithm (DE) to perform short-term AQI prediction.

Benefits of technology

By separating noise, the complexity and non-stationarity of the AQI sequence are reduced, the prediction accuracy is improved, and the prediction results are closer to the true value than traditional models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115600745B_ABST
    Figure CN115600745B_ABST
Patent Text Reader

Abstract

The present invention proposes a short-term AQI prediction method based on the SSA-DE-ANFIS model, including: S1, decomposing the original AQI sequence into a trend component and a noise component; S2, dividing both the trend sequence and the noise sequence into a training set and a test set to obtain the variation range of the trend sequence and the variation range of the noise sequence; S3, converting both the trend sequence and the noise sequence in the training set into a continuous universe of discourse, and then fuzzifying each feature to obtain the center and width; S4, initializing the parameters of the differential evolution algorithm, initializing the antecedent parameters of the ANFIS model according to the optimization range, and initializing the consequent parameters of the ANFIS model; S5, respectively inputting the trend sequence training set and the noise sequence training set into the ANFIS model, optimizing the parameters of the ANFIS model to obtain the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence; S6, using the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence for prediction, and adding the predicted values to obtain the predicted AQI value. The present invention can effectively improve the AQI prediction accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of environmental technologies, and in particular, to a short-term AQI prediction method based on an SSA-DE-ANFIS model. Background Art

[0002] The Air Quality Index (AQI) is a dimensionless index used to describe air quality, which describes the degree of air cleanliness or pollution and its impact on people's health. Exhaust gases emitted by factories, vehicle exhaust, and dust generated by construction are the main causes of air pollution. Previous studies have shown that air pollution can significantly increase the risk of cardiovascular and respiratory diseases, and long-term exposure to air pollution may increase the mortality rate of children under 5 years old. In the WHO's Global Burden of Disease report, it is estimated that approximately 8 million people die prematurely each year due to air pollution. Therefore, establishing an accurate and effective AQI prediction model plays a crucial role in guiding the reduction of air pollution and helping social sustainable development.

[0003] In recent years, air quality has received extensive attention from all sectors of society, and many scholars at home and abroad have conducted predictive research on AQI. These prediction methods can be roughly divided into three categories: statistical models, machine learning models, and combined models. Commonly used statistical models include the ARIMA model and the multiple linear regression model (MLR). For example, Wang Jianshu et al. established an ARIMA model to predict the daily air quality in Suzhou. Fu Qianrao established an MLR model based on the concentrations of various pollutants and meteorological factors to predict the PM2.5 content in Beijing for the next day, three days, and one week. However, statistical prediction is not suitable for long-term prediction and has its own limitations because it cannot capture non-linear characteristics well. According to existing literature, the prediction results obtained by machine learning methods are closer to the true values than most traditional statistical models, and generally, they are combined with heuristic optimization algorithms to determine their structures. For example, Gao Shuai et al. used the moth-flame optimization algorithm to optimize the parameters of the support vector machine to predict the AQI in Taiyuan and Datong; Zhang Nan et al. used an improved grey wolf optimization algorithm to optimize the parameters of support vector regression (SVR) to predict the AQI in Taiyuan; Wu Huijing and He Xiaohui used the genetic algorithm to optimize the weights and thresholds of the BP neural network to predict the AQI in Xuchang. However, the accuracy of a single machine learning model is insufficient to meet people's needs. The hybrid model combines multiple methods to improve the prediction accuracy. The common combination methods can be summarized into two types. The first is to combine two or more prediction models by assigning weights, and the other is the decomposition and integration method. For example, Gan Luqing and Liu Yuanhua combined the BP neural network model and the SVR model to obtain a better prediction effect than a single model; Wu Manman et al. used the complementary empirical mode decomposition method to decompose the AQI sequence and then established an Elman neural network model respectively. Compared with the competing models, the error of this model is smaller. Although some scholars have used data decomposition methods to predict air quality, most of the studies have not considered the influence of noise, or directly discarded the noise sequence and only performed secondary decomposition on the decomposed high-frequency subsequences, which reduces the prediction accuracy.

[0004] The Adaptive Neuro-Fuzzy Inference System (ANFIS) is a new type of fuzzy inference system structure that organically combines fuzzy logic and neural networks. It not only takes advantage of the strengths of both but also makes up for their respective deficiencies, endowing ANFIS with strong learning ability. ANFIS has been applied in various prediction fields, such as predicting the life of lithium-acid batteries, wind speed prediction, annual runoff prediction, etc. However, in terms of air quality prediction, there are relatively few studies on using the ANFIS model to predict AQI. Moreover, in the existing technology, the training method of ANFIS mostly uses the fuzzy C-means method to generate the number of fuzzy rules and updates the parameters of ANFIS based on the gradient descent method. This results in the antecedent parameters having to go through all layers, leading to problems of increased complexity and large computational volume during parameter training. In addition, the chain rule used is prone to local convergence, thus affecting the prediction accuracy. Summary of the Invention

[0005] The present invention aims to at least solve the technical problems existing in the prior art, and particularly innovatively proposes a short-term AQI prediction method based on the SSA-DE-ANFIS model.

[0006] To achieve the above object of the present invention, the present invention provides a short-term AQI prediction method based on the SSA-DE-ANFIS model, including the following steps:

[0007] S1, using Singular Spectrum Analysis (SSA) to decompose the original AQI sequence into a trend component and a noise component;

[0008] Among them, Singular Spectrum Analysis (SSA) is a typical time series processing method that can extract information such as trends, cycles, and noises from the original sequence. In addition, SSA is superior to general wavelet analysis and empirical mode decomposition analysis methods in separating noises. Therefore, SSA is used to denoise the original AQI sequence to obtain a more stable AQI sequence.

[0009] S2, dividing both the trend sequence and the noise sequence into a training set and a test set, and then obtaining the change range of the trend sequence according to the maximum and minimum values of the trend sequence training set, and obtaining the change range of the noise sequence according to the maximum and minimum values of the noise sequence training set;

[0010] S3, converting both the trend sequence and the noise sequence in the training set into a continuous universe of discourse U, then performing fuzzification on each feature by selecting two Gaussian membership functions to obtain a high fuzzy set and a low fuzzy set, and then obtaining the centers and widths corresponding to the high fuzzy set and the low fuzzy set within the optimization range;

[0011] S4. Initialize the parameters of the differential evolution algorithm DE, and initialize the antecedent parameters of the ANFIS model according to the optimization range. Initialize the consequent parameters of the ANFIS model within the range of [-5, 5], and do not restrict the optimization range of the rule consequent parameters to ensure the global search ability.

[0012] S5. Input the trend sequence training set and the noise sequence training set into the ANFIS model respectively to obtain the prediction results of the trend sequence training set and the noise sequence training set. Then, using the root mean square error RMSE as the objective function, use the differential evolution algorithm DE to optimize the parameters of the ANFIS model on the trend sequence training set and the noise sequence training set to obtain the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence.

[0013] S6. Use the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence for prediction to obtain the predicted value of the trend sequence and the predicted value of the noise sequence, and then add the two predicted values to obtain the predicted AQI value.

[0014] Decompose the original AQI into a trend sequence and a noise sequence. The trend sequence retains most of the information of the original AQI, that is, it reduces the complexity of the AQI sequence and becomes more stable, so it is suitable for prediction and provides prediction accuracy. Although the noise sequence has a higher complexity, it also retains a part of the information of the AQI sequence. Adding noise to the prediction can improve the prediction accuracy to a certain extent, and the experimental results also prove this point.

[0015] Further, the S1 includes:

[0016] Decompose the original AQI sequence into a certain number of subsequences, calculate the contribution rate of each subsequence, and recombine them into a trend sequence and a noise sequence according to the size of the contribution rate:

[0017]

[0018]

[0019]

[0020] Among them, X(n) represents the original sequence;

[0021] Subseries i (n) represents the i-th subsequence;

[0022] Trend-series(n) represents the trend sequence;

[0023] Noise-series(n) represents the noise sequence;

[0024] n represents the sequence lengths of the original sequence and the subsequence, both being n;

[0025] L is the total number of subsequences;

[0026] p are the first p subsequences reconstructed into the trend sequence.

[0027] Furthermore, the said S3 includes:

[0028] U = [X min -d 1 , X max +d 2 = [e, f] (24)

[0029]

[0030]

[0031]

[0032] Among them, X min , X max respectively represent the maximum and minimum values of the actual sequence;

[0033] d 1 , d 2 respectively represent the first adjustment real number and the second adjustment real number; the purpose is to adjust the boundary values to obtain an integer interval.

[0034] e represents the adjusted integer minimum value;

[0035] f represents the adjusted integer maximum value;

[0036] → indicates optimization within this range;

[0037] c 1 , c 2 respectively represent the centers of the low fuzzy set and the high fuzzy set;

[0038] a 1 , a 2 respectively represent the widths of the low fuzzy set and the high fuzzy set;

[0039] Among them, a1, a 2 , c 1 , c 2 are all antecedent parameters.

[0040] The said optimization range includes and

[0041] The purpose of setting the center of the membership function in this way is to construct two fuzzy sets, low and high, for each input feature, and make the center of the membership function closer to the center position of the interval. Setting the width optimization range in this way can prevent the membership degrees of points far from the center from approaching 0 due to too small a width; it can also prevent points far from the center from obtaining a relatively high membership degree due to too large a width.

[0042] Further, the S5 includes:

[0043] S5-1. For the initialized population obtained in S4, using the root mean square error RMSE as the fitness function, evaluate each particle, and select the particle with the minimum fitness as the initial optimal solution; where multiple particles form a population, and each particle consists of multiple dimensions.

[0044] S5-2. Then, update the global optimal solution iteratively, and use the DE algorithm to find a set of solutions that make the model perform best, that is, the minimum fitness function; when the root mean square error RMSE is less than the threshold or the maximum number of iterations is reached, the iteration stop condition is satisfied at this time, and the optimal parameters of the ANFIS are output.

[0045] The fitness function includes:

[0046]

[0047] where f(X i ) represents the fitness function of the i-th population X i ;

[0048] RMSE(X i ) represents the root mean square error of the i-th population X i ;

[0049] n represents the sequence length;

[0050] y t , respectively represent the true value and the predicted value;

[0051] The objective function for using the DE algorithm to find the minimum fitness function is:

[0052]

[0053] where f(X i ) = f(x i1 , x i2 ,..., x iD ) represents the fitness function of the i-th population X i .

[0054] Further, S6 further includes: predicting the trend sequence test set and the noise sequence test set to obtain corresponding prediction results, and calculating evaluation metrics, where the evaluation metrics adopt root mean square error, mean absolute error, and mean absolute percentage error.

[0055] In summary, due to the adoption of the above technical solutions, the present invention separates noise from the original AQI sequence through SSA. After separating the noise, the complexity and non-stationarity of the original AQI sequence are reduced, and the prediction accuracy is improved. The differential evolution algorithm DE is used to optimize the parameters required for ANFIS within a given interval. Compared with traditional machine learning models, the prediction accuracy is higher, which can provide support for people's travel and enterprise pollution emission regulation, etc.

[0056] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The above and / or additional aspects and advantages of the present invention will become apparent and be readily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0058] Figure 1 is a schematic flow diagram of the method of the present invention.

[0059] Figure 2 is a schematic diagram of the ANFIS structure of the present invention.

[0060] Figure 3 is a schematic diagram of the input-output structure of the present invention.

[0061] Figure 4 is a schematic diagram of the denoising result of the present invention.

[0062] Figure 5 is a schematic diagram of the convergence curve of the fitness value of the present invention.

[0063] Figure 6 is a schematic diagram of the comparison curve between the predicted value and the true value of the AQI in Beijing of each model of the present invention.

[0064] Figure 7 is a schematic diagram of the comparison curve between the predicted value and the true value of the AQI in Tianjin of each model of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0065] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary only for explaining the present invention and should not be construed as limiting the present invention.

[0066] The present invention proposes a short-term AQI prediction method based on the SSA-DE-ANFIS model as follows Figure 1 shown: The original AQI sequence is decomposed by SSA. The subsequences with large contribution rates are reconstructed into the trend sequence of AQI, and the remaining part is reconstructed into the noise sequence. The trend sequence and the noise sequence are respectively divided into a training set and a test set, and the change range of the sequence is obtained. Then, according to the optimization range set by formulas (25)-(27), the antecedent parameters of ANFIS are initialized in the manner of formula (17). The consequent parameters of ANFIS are initialized within [-5, 5], and the consequent parameters are not constrained subsequently to ensure the global optimization ability. Taking RMSE as the objective function, the DE algorithm is used for optimization on the training set. After each mutation and crossover, it is judged whether the antecedent parameters are still within the optimization range. If they exceed the range, the corresponding dimension is re-initialized using formula (17). When the maximum number of iterations is reached, the best parameters are output to construct ANFIS, and the test set is predicted.

[0067] 1 Technologies related to the method of the present invention

[0068] 1.1 Singular spectrum analysis

[0069] SSA is a powerful method for processing non-linear time series data that has emerged in recent years. It constructs a trajectory matrix based on the observed time series and performs operations such as decomposition and reconstruction on the trajectory matrix to extract different component sequences (long-term trends, seasonal trends, noise, etc.) in the time series, thereby analyzing the structure of the time series and further making predictions. Singular spectrum analysis mainly includes the following four steps.

[0070] (1) Embedding

[0071] The analysis object of SSA is a finite-length one-dimensional time series X = [x 1 , x 2 ,..., x N , where N is the length of the sequence.

[0072] First, it is necessary to select an appropriate window length L (L < N / 2) to transform X into K vectors of length L, where Z i = (x i , x i+1 ,..., x i+L-1 ) T (i = 1, 2,..., K = N - L + 1). These vectors form the trajectory matrix Z, as shown below:

[0073]

[0074] where x N represents the Nth time step, xL Denotes the L-th time step.

[0075] (2) Decomposition

[0076] Next, perform singular value decomposition on matrix Z. Let S = ZZ T , Z T be the transpose of Z; and obtain its L eigenvalues λ 1 > λ 2 > … > λ L ≥ 0, U 1 , U 2 , … U L be the orthonormal vectors corresponding to ZZ T . Z can be transformed into the following form:

[0077] Z = Z 1 + Z 2 + … + Z L (3)

[0078]

[0079]

[0080]

[0081] In the formula, Z i denotes the elementary matrix, U i is the empirical orthogonal function of matrix Z, V i is the principal component of matrix Z, is the singular value of matrix Z., i = 1 ~ L; α represents the contribution rate of each Z i .

[0082] (3) Grouping

[0083] Divide the matrix Z in formula (3) into m different groups and add the matrices included in each group. That is, Z is composed of m Z I s, Z i1 Z, i2 , …, Z ip is the matrix included in the i-th group, i = 1, 2, …, m.

[0084] Z I = Z i1 + Z i2 + … + Z ip (7)

[0085] Z = Z I1 + Z I2 ... + Z Im (8)

[0086] (4) Reconstruction

[0087] Convert the grouped matrix into a new sequence of length N using the diagonal averaging method. Assume Y is an L×K matrix with elements y ij , where 1 ≤ i ≤ L, 1 ≤ j ≤ K, and L * = min(L, K), and K * = max(L, K). When L < K, Otherwise the matrix Y is transformed into Y = (y 1 , y 2 ,..., y N ):

[0088]

[0089] In this study, SSA is used to extract the main components of the original AQI sequence, separate the noise, and reconstruct the original sequence by selecting the top p (p < L) components with large contributions according to the magnitudes of the singular values.

[0090] 1.2 Adaptive Neuro-Fuzzy Inference System

[0091] ANFIS is considered a combination of artificial neural networks and fuzzy inference. It combines the ability of fuzzy systems to simulate the inference process and handle uncertainty, while also having the learning ability and adaptability of neural networks. In addition, it follows the "if-then rule" to generate the mapping between inputs and outputs, which is called the "Takagi-Sugeno inference model". ANFIS is typically divided into five layers, namely the fuzzification layer, the rule fitness layer, the normalization fitness layer, the defuzzification layer, and the output layer.

[0092] Assume that the fuzzy inference system has two inputs, x and y, which are two variables used to predict AQI, and one output, z, which is the AQI for a first-order fuzzy neural network model based on the T-S model. The general rules with two fuzzy if-then rules are as follows:

[0093] Rule 1: If x is A 1 , and y is B 1 , then z = p 1 x + q 1 y + r 1

[0094] Rule 2: If x is A 2 , and y is B 2 , then z = p 2 x + q 2 y + r 2

[0095] The input-output model structure is as Figure 2As shown. The network is divided into 5 layers. The first 3 layers are the rule antecedents, and the last 2 layers are the rule consequents. The square nodes represent adaptive nodes whose parameters can be adjusted, and the circular nodes represent fixed nodes with no parameters or non-adjustable parameters. The adjustable parameters are mainly concentrated in the first layer and the fifth layer. The parameters of the first layer are the membership function parameters, and the fifth layer is the rule consequent parameters. The functions of each layer are introduced below. Convention represents the data of the i-th node in the n-th layer.

[0096] The first layer: Fuzzification, which transforms the input variables x and y into the membership degrees of each fuzzy set. The i-th node in this layer is an adaptive node composed of a node function (membership function).

[0097]

[0098]

[0099]

[0100] Among them, represents the membership function of A i (x), represents the membership function of B i-2 (y), μ(x) is the membership function, and A i (x) represents the i-th fuzzy set of the input variable x, is the membership degree of the fuzzy set A = (A 1 , A 2 , B 1 , B 2 ). It determines the degree to which the given input x (or y) satisfies A (or B). The membership function selected in this paper is the Gaussian function. As shown in the above formula, c i represents the center of the Gaussian function, a i represents the width of the Gaussian function, and a i and c i are the parameters to be optimized.

[0101] The second layer: Rule applicability degree. The output of each node is the product of the input signals, that is, the membership degrees of the fuzzy sets corresponding to each variable are multiplied cumulatively, and the result is the applicability degree of this rule.

[0102]

[0103] The third layer: Normalized applicability degree. Calculate the ratio of the applicability degree of the i-th rule to the sum of the applicability degrees of all rules for the i-th node.

[0104]

[0105] Among them, ω 2Denote the fuzzy set A 2 and B 2 The result of cumulative membership degrees corresponding to them.

[0106] Layer 4: Defuzzification. The nodes in this layer are adaptive nodes, and each fuzzy rule corresponds to an output.

[0107]

[0108] Among them, is the normalized fitness output by the third layer, {p i , q i , r i} is called the parameter set of the consequent of the fuzzy rule, which are adjustable parameters.

[0109] Layer 5: Output layer. Sum the outputs of each fuzzy rule to obtain the total output.

[0110]

[0111] Among them, ω 1 denotes the result of cumulative membership degrees corresponding to the fuzzy sets A 1 and B 1 , ω 2 denotes the result of cumulative membership degrees corresponding to the fuzzy sets A 2 and B 2 , f i = (p i x + q i y + r i ), i = 1, 2.

[0112] 1.3 Differential Evolution Algorithm

[0113] The DE algorithm was first proposed by Storn and Price in 1995 and is mainly used to solve real - valued optimization problems. This algorithm is a kind of population - based adaptive global optimization algorithm and belongs to one of the evolutionary algorithms. Because of its characteristics such as simple structure, easy implementation, fast convergence, and strong robustness, it has been widely used in various fields such as data mining, pattern recognition, digital filter design, artificial neural networks, and electromagnetics. The evolutionary process of the differential evolution algorithm is very similar to that of the genetic algorithm, including mutation, crossover, and selection operations, but the specific definitions of these operations are different from those of the genetic algorithm.

[0114] (1) Population Initialization

[0115] Assume that the dimension to be optimized for ANFIS is D. Initialize NP real - valued parameter vectors with dimension D as the starting population. Generally, the initialized population conforms to a uniform probability distribution, and the initialization method is determined according to the optimization range of each dimension.

[0116]

[0117] Among them, x i,j,0 represents the result initialized when the j-th dimension of the i-th population has not started iteration, and 0 indicates that the iteration has not started yet. respectively represent the maximum and minimum values of the j-th dimension to be optimized. i = 1, 2,..., NP, rand j (0, 1) is a random number uniformly distributed between 0 and 1. The population size NP is related to the dimension D and is generally set between [5D, 10D].

[0118] (2) Mutation operation

[0119] In the g-th iteration, for the i-th population x of the g-th iteration i,g Randomly select three individuals for mutation operation to produce offspring individuals.

[0120] v i,g = x r1,g + F * (x r2,g - x r3,g ) (18)

[0121] Among them, r 1 , r 2 , r 3 ∈ {1, 2,..., NP} are distinct integers and are different from the current target vector index i, that is, the i-th population. Therefore, it is required that the population size NP ≥ 4. x r1,g represents the r1-th population of the g-th iteration. The scaling factor F is a constant between (0, 1) and is used to control the size of the difference vector. If F is too small, the convergence speed will be reduced; if F is too large, the population will not converge.

[0122] (3) Crossover operation

[0123] After the mutation operation, it is necessary to perform binomial crossover on the target vector x i,g and the mutation vector v i,g to generate the final experimental vector u i,g = [u i1,g , u i2,g ,..., u iD,g , and the formula is as follows:

[0124]

[0125] Among them, u iD,g represents the experimental vector of the D-th dimension of the i-th population in the g-th iteration; v ij,g represents the mutation vector of the j-th dimension of the i-th population in the g-th iteration; x ij,gDenote the objective vector of the j-th dimension of the i-th population in the g-th iteration; j rand is a randomly selected integer from the set {1, 2,..., D} to ensure that one-dimensional information of the mutation vector v i,g is retained. The crossover probability CR is a constant within the range (0, 1).

[0126] Since this paper optimizes each dimension parameter required by ANFIS within a given range, problems of some dimensions exceeding the boundary may occur after mutation. Therefore, it is necessary to traverse each dimension of the data and reassign the dimensions that exceed the boundary using formula (17).

[0127] (4) Selection operation

[0128] This step obtains a new generation of population by competing the parent individuals with the offspring individuals, that is, comparing the objective function values of the experimental vector u i,g and the target vector x i,g , and the one with the smaller fitness function value will be retained.

[0129]

[0130] 1.4 The proposed SSA-DE-ANFIS prediction model (formulas 21 - 29 are written by oneself)

[0131] To improve the predictability of the AQI sequence and obtain more accurate prediction results, this study uses SSA to denoise the original AQI sequence to obtain a more stable AQI sequence. In addition, the selection of the center and width of the Gaussian membership function is the key to improving the prediction performance, so the DE algorithm is used to optimize the parameters of the ANFIS model.

[0132] The steps of the hybrid prediction model are described as follows:

[0133] (1) SSA denoising

[0134] Decompose the original AQI sequence into a certain number of subsequences, calculate the contribution rate of each subsequence, and recombine them into a trend sequence and a noise sequence according to the contribution rate size.

[0135]

[0136]

[0137]

[0138] where X(n) represents the original sequence, Subseries i(n) represents the i-th subsequence, n represents the sequence length, L is the total number of subsequences, and p are the first p subsequences reconstructed into the trend sequence.

[0139] (2) Divide the dataset

[0140] Construct the trend sequence and the noise sequence into the form of input and output, and divide the training set and the test set.

[0141] (3) Determine the optimization interval

[0142] In this paper, the AQI time series is transformed into the form of supervised learning, so the universe of discourse of each feature is set to be the same. The discrete subsequences are transformed into a continuous universe of discourse U. Two fuzzy sets, "low" and "high", are constructed for each feature, that is, two Gaussian membership functions are selected for each feature for fuzzification, corresponding to two centers and widths. The specific optimization range is as follows:

[0143] U = [X min - d 1 , X max + d 2 = [e, f] (24)

[0144]

[0145]

[0146]

[0147] Among them, X min , X max represent the maximum and minimum values of the actual sequence respectively, d 1 and d 2 are very small real numbers. The purpose is to adjust the boundary values to obtain an integer interval. The purpose of setting the center of the membership function in this way is to construct two fuzzy sets, "low" and "high", for each input feature, and make the center of the membership function closer to the center position of this interval. Setting the optimization range of the width in this way can prevent the membership degrees of points far from the center from approaching 0 due to too small a width; and can also prevent a relatively high membership degree from being obtained for points far from the center due to too large a width.

[0148] (4) Initialize the DE algorithm

[0149] Initialize the parameters of DE, such as the population size, search dimension and other information. Then, according to the optimization range in the third step, initialize the antecedent parameters of the rules. The optimization range of the consequent parameters of the rules is [-5, 5], and the optimization range of the consequent parameters of the rules is not restricted to ensure the global search ability. The initialized rules are as shown in Equation (17).

[0150] (5) DE-ANFIS model

[0151] The fourth step obtains the initialized population X i =(x i1 , x i2 ,..., x iD ), where x iD represents the D-th dimension of the i-th population. Using the root mean square error (RMSE) of the training set as the fitness function, each particle is evaluated, and the particle with the minimum fitness is selected as the initial optimal solution. Then, the global optimal solution is updated through iteration. When the stopping condition is met: RMSE is less than the threshold or the maximum number of iterations is reached, the optimal parameters of the ANFIS are output. The fitness function is defined as follows:

[0152]

[0153] where y t , represent the true value and the predicted value respectively, and n represents the sequence length.

[0154] The goal of the DE algorithm is to find a set of solutions that make the model perform best through iteration, that is, the minimum fitness function. Therefore, the objective function of the optimization problem can be defined as follows:

[0155]

[0156] (6) Prediction

[0157] Use the obtained ANFIS model to predict the test set, obtain the prediction results, and calculate the evaluation metrics.

[0158] 2. Case Study

[0159] 2.1 Study Area

[0160] This paper selects the AQI prediction study of the two municipalities directly under the Central Government, Beijing and Tianjin, in the Beijing-Tianjin-Hebei region, provides reference and basis for controlling and reducing air pollution, and also provides constructive opinions and suggestions for decision-makers to take more economical and efficient measures in improving air quality in the future.

[0161] 2.2 Data Description

[0162] The data used in this paper are the hourly AQI data of Beijing and Tianjin in January 2020. The first 5 hours of data are missing on January 22 for each dataset. Since there is enough data and the missing 5 data have little impact on the prediction results, the missing values are directly deleted, and a total of 739 hours of AQI data are obtained. The basic statistical characteristics of the sample data

[0163] As shown in Table 1. The first 691 hours of AQI data are used as training data, and the subsequent 48 hours of AQI data are used as test data for single-step prediction. The AQI data for the previous 7 hours are used to predict the AQI for the next hour. The input-output results are as Figure 3 shown.

[0164] Basic statistical characteristics of sample data in Table 1

[0165]

[0166] 2.3 Separating noise from the original AQI

[0167] To reduce the volatility of the original AQI sequence and improve the prediction accuracy, SSA is used to separate noise from the original AQI sequences of Beijing and Tianjin. First, the original AQI sequences are decomposed using SSA. The number of decompositions should not be too many or too few. When decomposing, each singular value forms a separate group. Here, the AQI sequences of both cities are selected to be decomposed into 11 subsequences. The contribution rates of each group are shown in Table 2. According to the contribution rates, the first four groups of subsequences are recombined into a trend sequence, and the last seven groups of subsequences are recombined into a noise sequence. The denoising results are as Figure 4 shown.

[0168] Table 2 Grouping and contribution rates

[0169]

[0170] From Figure 4 the denoising results, it can be seen that while the trend sequence retains the original AQI trend, it becomes smoother and is thus more suitable for prediction. The noise sequence is a sequence with irregular fluctuations. Here, the trend sequence and the noise sequence are predicted simultaneously to avoid reducing the prediction accuracy due to discarding the noise sequence.

[0171] 2.4 Parameter settings

[0172] In Section 3.1, the trend sequences and noise sequences of the AQI in Beijing and Tianjin are obtained, and then the optimization intervals for each sequence are determined according to the rules set in Section 1.4, as shown in Table 3. Initialize each dimension within the corresponding interval according to formula (17), and then use the DE algorithm to optimize the parameters.

[0173] The basic parameter settings of the DE algorithm are as follows: As Figure 3 shown, this paper sets 7 features, each feature corresponding to 4 parameters to be optimized, for a total of 28 parameters. Adding the 16 parameters of the rule consequent, there are a total of 44 parameters. Therefore, the dimension D is set to 44, the population size NP is set to 220, the scaling factor F and the crossover probability R are both set to 0.6, the convergence threshold is set to 0.01, and the number of iterations is 1000.

[0174] Table 3 Optimization Interval

[0175]

[0176]

[0177] 2.5 Evaluation Metrics

[0178] To evaluate the prediction results, the performance of the model is evaluated from two aspects: accuracy and stability. The root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) are used to evaluate the prediction accuracy. RMSE is used to measure the deviation between the predicted value and the true value, and it is very sensitive to extremely large and small errors in the same set of measurements. Therefore, RMSE can well reflect the precision of the prediction, but it is difficult to evaluate the gap between the predicted value and the true value through this index. Compared with the mean error, MAE can better reflect the prediction error because the absolute value of the deviation is used for calculation to avoid the cancellation effect of positive and negative values. The calculation formulas of the evaluation metrics are given in Table 4.

[0179] Table 4 Evaluation Metrics

[0180]

[0181] 3 Experiments and Analysis

[0182] 3.1 AQI Prediction Results in Beijing and Tianjin

[0183] In Section 2.3, the trend sequence and noise sequence of the original AQI data were obtained. An ANFIS model was established with the previous 691 data, and the subsequent 48 data were used as test data for model prediction. The trend sequence and noise sequence were respectively modeled and predicted, and the two were added together to obtain the final prediction result. To evaluate the performance of the proposed model in this paper, it was also compared with the non-denoised DE-ANFIS model, the single support vector regression model (SVR), the artificial neural network model (ANN), the SSA-DE-LSTM model, and the SSA-ANFIS model. Figure 5 The fitness value convergence curves of the non-denoised DE-ANFIS model and the SSA-DE-ANFIS model during the optimization of the trend sequence. The comparison results of the predicted values and the measured values of the AQI in Beijing and Tianjin by each model are as Figure 6 and Figure 7 shown.

[0184] 3.2 Discussion and Analysis

[0185] It can be seen from Figure 5 that: After denoising the AQI sequence, the ANFIS model optimized by the DE algorithm has a faster convergence speed and can jump out of the local optimal solution compared with the ANFIS model optimized by the DE algorithm without denoising, thus achieving a better prediction effect. It shows that using SSA for denoising effectively reduces the complexity of the original AQI sequence, thereby improving its predictability.

[0186] It can be seen from Figure 5 and Figure 6 that: (1) By comparing the DE-ANFIS model and the SSA-DE-ANFIS model, it can be found that the latter has a better fitting effect, which can be clearly seen in the predicted values of the AQI in Beijing. (2) By comparing the first three models without using SSA for denoising, the latter three combined models can better predict the trends of the AQI in Beijing and Tianjin, and the prediction has good volatility and followability; (3) By comparing the SSA-ANFIS model and the SSA-DE-ANFIS model, the ANFIS model optimized by the DE algorithm can give full play to the advantages of the ANFIS model. Compared with the traditional ANFIS model, its predicted values and real values have higher consistency. (4) By comparing the SSA-DE-ANFIS model and the SSA-LSTM model, the predicted values of both are very close to the real values. However, when dealing with the situation of AQI mutation, the SSA-DE-ANFIS model can also accurately predict with smaller errors.

[0187] To further compare the accuracy of each model, the prediction errors of each model were evaluated using the three indicators in Table 1, as shown in Tables 5 and 6.

[0188] Table 5 Evaluation indicators for the prediction error of the AQI in Beijing

[0189] Model\Index RMSE MAE MAPE(%) DE-ANFIS 4.843 3.630 6.146 SVR 6.413 4.591 8.279 ANN 5.245 4.124 6.829 SSA-LSTM 1.570 1.230 2.009 SSA-ANFIS 2.099 1.683 3.105 SSA-DE-ANFIS 1.245 0.915 1.417

[0190] Table 6 Evaluation indicators for the prediction error of the AQI in Tianjin

[0191]

[0192]

[0193] It can be seen from the prediction of the AQI in Beijing in Table 5 that:

[0194] (1) By comparing the DE-ANFIS model, the RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 74.29%, 74.79%, and 76.94% lower than those of the DE-ANFIS model, respectively.

[0195] (2) Comparison of single models. The RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 80.59%, 81.35%, and 82.88% lower than those of the SVR model, respectively; and 76.26%, 77.81%, and 79.25% lower than those of the ANN model, respectively.

[0196] (3) Comparison of hybrid models. The RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 20.70%, 25.61%, and 29.47% lower than those of the SSA-LSTM model, respectively; and 38.03%, 45.63%, and 54.36% lower than those of the SSA-ANFIS model, respectively.

[0197] As can be seen from the prediction of Tianjin's AQI in Table 6:

[0198] (1) Comparison of the DE-ANFIS model. The RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 68.51%, 69.61%, and 68.23% lower than those of the DE-ANFIS model, respectively.

[0199] (2) Comparison of single models. The RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 75.61%, 76.07%, and 78.19% lower than those of the SVR model, respectively; and 71.13%, 70.49%, and 68.22% lower than those of the ANN model, respectively.

[0200] (3) Comparison of hybrid models. The RMSE, MAE, and MAPE of the predicted values of the SSA-DE-ANFIS model are 18.02%, 18.40%, and 21.34% lower than those of the SSA-LSTM model, respectively; and 35.32%, 40.24%, and 38.71% lower than those of the SSA-ANFIS model, respectively.

[0201] From the perspective of the prediction error indicators of AQI in Beijing and Tianjin: (1) The SSA-DE-ANFIS model can obtain relatively accurate AQI results in both instances, with the highest prediction accuracy. This indicates that the model has strong generalization ability. Using SSA for denoising is beneficial to reducing the complexity of the original AQI sequence and improving the accuracy of the prediction model. (2) Among the single models, the DE-ANFIS model has the highest prediction accuracy. This shows that the DE-ANFIS model has good feature extraction ability and prediction ability for AQI time series. Moreover, compared with the SVR and ANN models, the DE-ANFIS model is more effective in AQI prediction. (3) Compared with the SSA-LSTM model and the SSA-ANFIS model, the SSA-DE-ANFIS model has better prediction accuracy in both cities than the other two models, indicating that the ANFIS model optimized by the DE algorithm is superior to the traditional ANFIS model and the mainstream LSTM model.

[0202] 4 Conclusions

[0203] In this paper, SSA is combined with DE-ANFIS to propose a high-precision AQI hybrid prediction model. By comparing and studying the historical data of AQI in Beijing and Tianjin, the following conclusions are obtained:

[0204] The hourly AQI data of Beijing and Tianjin in January 2020 are simulated and compared with traditional machine learning models. The results show that after separating the noise, the complexity and non-stationarity of the original AQI sequence are reduced, and the prediction accuracy is improved. Compared with traditional machine learning models, the prediction accuracy is higher, which can provide support for people's travel and the regulation of enterprise pollution emissions.

[0205] (1) Using singular spectrum analysis to decompose the original sequence into a trend sequence and a noise sequence for separate modeling can reduce the difficulty caused by the complexity and non-stationarity of the AQI sequence to AQI prediction.

[0206] (2) Compared with SSA-ANFIS, after optimizing the membership function and the consequent parameters of the rules of ANFIS using the DE algorithm, the prediction accuracy is improved. When predicting the AQI in Beijing and Tianjin, it has good generalization ability, and the comparison between the prediction results and the measured data also verifies the effectiveness of the method in this paper.

[0207] (3) Compare this method with common single machine learning models and hybrid models. When predicting the AQI in Beijing, the RMSE, MAE, and MAPE between the predicted values and the actual values of the SSA-DE-ANFIS model are 1.245, 0.915, and 1.417 respectively; when predicting the AQI in Tianjin, the RMSE, MAE, and MAPE between the predicted values and the actual values of the SSA-DE-ANFIS model are 1.670, 1.264, and 2.234 respectively. It is superior to other comparison models and can be used as an effective and simple tool for air pollution prediction and early warning.

[0208] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the claims and their equivalents.

Claims

1. A short-term AQI prediction method based on the SSA-DE-ANFIS model, characterized in that, it includes the following steps: S1. Use singular spectrum analysis (SSA) to decompose the original AQI sequence into a trend component and a noise component; S2. Divide both the trend sequence and the noise sequence into a training set and a test set. Then, obtain the change range of the trend sequence based on the maximum and minimum values of the trend sequence training set, and obtain the change range of the noise sequence based on the maximum and minimum values of the noise sequence training set; S3. Transform both the trend sequence and the noise sequence in the training set into a continuous universe of discourse U. Then, select two Gaussian membership functions for each feature for fuzzification to obtain a high fuzzy set and a low fuzzy set, and then obtain the centers and widths corresponding to the high fuzzy set and the low fuzzy set within the optimization range; S4. Initialize the parameters of the differential evolution algorithm (DE), initialize the antecedent parameters of the ANFIS model according to the optimization range, initialize the consequent parameters of the ANFIS model within the range of [-5, 5], and do not constrain the optimization range of the rule consequent parameters; S5. Input the trend sequence training set and the noise sequence training set into the ANFIS model respectively to obtain the prediction results of the trend sequence training set and the noise sequence training set. Then, use the root mean square error (RMSE) as the objective function, and use the differential evolution algorithm (DE) to optimize the parameters of the ANFIS model on the trend sequence training set and the noise sequence training set to obtain the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence; S6. Use the ANFIS model of the final trend sequence and the ANFIS model of the noise sequence for prediction to obtain the predicted values of the trend sequence and the predicted values of the noise sequence. Then, add the two predicted values to obtain the predicted AQI value.

2. The short-term AQI prediction method based on the SSA-DE-ANFIS model according to claim 1, characterized in that, S1 includes: Decompose the original AQI sequence into a certain number of subsequences, calculate the contribution rate of each subsequence, and recombine them into a trend sequence and a noise sequence according to the contribution rate size: where X(n) represents the original sequence; Subseries i (n) represents the i-th subsequence; Trend-series(n) represents the trend sequence; Noise-series(n) represents the noise sequence; n represents the sequence lengths of the original sequence and the subsequences, both of which are n; L is the total number of subsequences; p are the first p subsequences recombined into the trend sequence.

3. The short-term AQI prediction method based on the SSA-DE-ANFIS model according to claim 1, characterized in that, S3 includes: U = [X min - d 1 , X max + d 2 = [e, f] (24) wherein, X min and X max represent the maximum and minimum values of the actual sequence, respectively; d 1 and d 2 respectively represent the first adjustment real number and the second adjustment real number; e represents the adjusted integer minimum value; f represents the adjusted integer maximum value; → represents optimization within this range; c 1 and c 2 represent the centers of the low fuzzy set and the high fuzzy set, respectively; a 1 and a 2 represent the width of the low fuzzy set and the width of the high fuzzy set, respectively; The optimization range includes and 4. The short-term AQI prediction method based on the SSA-DE-ANFIS model according to claim 1, characterized in that, S5 includes: S5-1. For the initialized population obtained in S4, use the root mean square error (RMSE) as the fitness function to evaluate each particle, and select the particle with the minimum fitness as the initial optimal solution; S5-2, and then iteratively update the global optimal solution, and use the DE algorithm to find the minimum fitness function; when the root mean square error RMSE is less than the threshold or the maximum number of iterations is reached, the iteration stop condition is satisfied at this time, and the optimal parameters of the ANFIS are output; The fitness function includes: where f(X i ) represents the fitness function of the i-th population X i ; RMSE(X i ) represents the root mean square error of the i-th population X i ; n represents the sequence length; y t 、 represent the true value and the predicted value respectively; The objective function for using the DE algorithm to find the minimum fitness function is: where f(X i ) = f(x i1 , x i2 ,..., x iD ) represents the fitness function of the i-th population X i .

5. A short-term AQI prediction method based on the SSA-DE-ANFIS model according to claim 1, characterized in that The S6 further includes: predicting the trend sequence test set and the noise sequence test set to obtain corresponding prediction results, and calculating evaluation indicators, and the evaluation indicators adopt the root mean square error, the mean absolute error, and the mean absolute percentage error.