CN111612254B - Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network - Google Patents

Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network Download PDF

Info

Publication number
CN111612254B
CN111612254B CN202010443547.4A CN202010443547A CN111612254B CN 111612254 B CN111612254 B CN 111612254B CN 202010443547 A CN202010443547 A CN 202010443547A CN 111612254 B CN111612254 B CN 111612254B
Authority
CN
China
Prior art keywords
attention
lstm
time
model
short term
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010443547.4A
Other languages
Chinese (zh)
Other versions
CN111612254A (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.)
Hefei Institutes of Physical Science of CAS
Original Assignee
Hefei Institutes of Physical Science of CAS
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 Hefei Institutes of Physical Science of CAS filed Critical Hefei Institutes of Physical Science of CAS
Priority to CN202010443547.4A priority Critical patent/CN111612254B/en
Publication of CN111612254A publication Critical patent/CN111612254A/en
Application granted granted Critical
Publication of CN111612254B publication Critical patent/CN111612254B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Primary Health Care (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)

Abstract

The invention discloses a road motor vehicle exhaust emission prediction method for improving an attention bidirectional long-short term memory network, which comprises the following steps: 1. acquiring the exhaust emission data of the motor vehicle by using the PEMS and the OBD detection equipment together; 2. carrying out missing data compensation and normalization pretreatment on the tail gas emission data set; 3. establishing an improved Attention-Bi-LSTM Attention bidirectional long-short term memory network model; 4. determining the hyper-parameters of the model by adopting a pre-experiment; 5. and optimizing model parameters by adopting a self-adaptive learning rate algorithm to finish the training of the prediction model. The invention can fully consider all characteristic factors influencing the tail gas emission of the road motor vehicle, improve the prediction precision of the tail gas emission and have a larger application range, thereby effectively shortening the PEMS tail gas emission test time and reducing the consumption of manpower, resources and time cost.

Description

Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network
Technical Field
The invention relates to the technical field of road motor vehicle exhaust emission prediction algorithms, in particular to an actual road pollutant emission prediction method based on an improved bidirectional long-short term memory network.
Background
In recent years, the number of motor vehicles in China is rapidly increased, so that the tail gas emission of road motor vehicles becomes one of the main factors polluting urban environment, and an effective road motor vehicle tail gas emission monitoring means is adopted, so that the method has important significance for improving the urban air quality. At present, the common methods for monitoring the exhaust emission of road motor vehicles mainly comprise: a chassis power measuring method, a tunnel testing method, a laser remote measuring method, a smoke plume tracing measuring method and a Portable Emission System (PEMS) measuring method. The experimental result of the chassis power measurement method cannot reflect the actual road emission condition of the motor vehicle, the tunnel test method is limited by special geographical environment conditions, the laser telemetry method is easily interfered by external environment, the measurement accuracy is not high, the smoke plume chasing measurement method requires the experimental vehicle to carry test equipment to track and chase the vehicle to be tested, the measurement mode is easy to enforce law, but the accuracy is not as good as that of the vehicle-mounted tail gas detection equipment measurement method. PEMS is used as the most accurate measuring mode in the detection of motor vehicle tail gas roads, has been written into the motor vehicle pollutant emission standard of the sixth stage by the national ministry of environmental protection and the national quality control administration, and is used as one of the necessary inspection links before a novel vehicle goes on the road.
However, during the actual use of PEMS, there are several problems:
(1) Before the test of the tail gas emission of the road motor vehicle begins, a heating pipeline of a Flame Ionization Detection (FID) module and an optical detection air chamber of a Fuel Economy Metering (FEM) module in the PEMS need to be preheated for half an hour and about one hour respectively.
(2) After the PEMS instrument is preheated, zero marking and calibration work of the gas to be measured is required, and the work requires mixed gas and NO 2 And N 2 Three-type standard sample gas cylinder and FID ignition aid H 2 The gas cylinder needs trained professional technicians to operate, so that the detection precondition is harsh, and certain labor, resource and time costs need to be consumed.
(3) In the process of testing actual road pollutant emission of PEMS, FEM, NOx and FID modules often have equipment faults, are in communication interruption with an upper computer and the like, and need related professionals to accompany and follow a vehicle in the whole process, so that waste of human resources and time and certain potential safety hazards are caused.
(4) After the PEMS is continuously monitored for about two hours, the baseline drift phenomenon of the tail gas emission test data is more obvious along with the lapse of the measurement time, and the detection precision is reduced.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a road motor vehicle exhaust emission prediction method based on an improved deep learning network, so that all characteristic factors influencing the road motor vehicle exhaust emission can be fully considered, the exhaust emission prediction precision is improved, and the method has a wide application range, so that the PEMS exhaust emission test time can be effectively shortened, the consumption of manpower, resources and time cost is reduced, the problems of drift and loss of exhaust emission monitoring data caused by long-time work, faults and the like of detection equipment in the actual PEMS test process can be solved, and the effect of repairing a key exhaust emission data segment is achieved.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention relates to a road motor vehicle exhaust emission prediction method based on an improved attention bidirectional long-short term memory network, which is characterized by comprising the following steps:
step 1, collecting exhaust emission data of a road motor vehicle in p days by using a PEMS detection device and an OBD vehicle-mounted diagnosis system together, collecting data of q working conditions every day, wherein the collecting time of each working condition is T, thereby obtaining n = p × q × T exhaust emission data sets containing m characteristics, and recording the data as D origin =(d ij ) n×m Wherein d is ij Representing the jth characteristic value at the ith acquisition time; i is more than or equal to 1 and less than or equal to n; j is more than or equal to 1 and less than or equal to m;
step 2, exhaust emission data set D origin =(d ij ) n×m Carrying out missing data compensation and normalization pretreatment to obtain a tail gas emission characteristic matrix marked as D scaled =(d′ ij ) n×m (ii) a Wherein, d' ij Representing the j characteristic value at the ith pre-processed acquisition time; the normalized data set feature matrix D is processed scaled Division into training sets D train And a verification set D verify Wherein, training set D train Has a feature dimension of m-1, a verification set D verify Has a feature dimension of 1, and a verification set D verify Predicting a true value of the exhaust emission data for the model;
step 3, establishing an improved Attention-Bi-LSTM Attention bidirectional long-short term memory network model composed of an input layer, a hidden layer, an Attention layer, a full connection layer and an output layer, initializing parameters of the model, and defining a time step as lambda and a prediction time as t;
let the data structure of the input layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model be D train ={d (t-λ)j ,...,d tj ,...,d (t+λ)j },j=1,2,...,m-1;d tj Represents the j-th characteristic value at the predicted time t;
enabling the hidden layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model to comprise a forward LSTM network and a backward LSTM network;
the input of the forward LSTM network is d t-λ ,...,d t ...,d t+λ ;d t M-1 characteristic values at the predicted time t are represented;
the forward state output of the forward LSTM network is
Figure BDA0002504811030000021
Figure BDA0002504811030000022
Representing the hidden layer state output of the forward LSTM network at the predicted time t;
the input of the backward LSTM network is d t+λ ,...,d t ...,d t-λ
The backward state output of the backward LSTM network is
Figure BDA0002504811030000031
Figure BDA0002504811030000032
Representing the hidden layer state output of the backward LSTM network at the predicted time t;
let the output of the hidden layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model be output from the forward state as
Figure BDA0002504811030000033
And the backward state output is
Figure BDA0002504811030000034
Is composed of, and is denoted as
Figure BDA0002504811030000035
h t A state output indicating the hidden layer at the prediction time t;
obtaining a matching scoring function F (h) in an Attention layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (1) i ,H k ):
F(h i ,H k )=V T tanh(W 1 h i +W 2 H k ) (1)
In the formula (1), h i Hidden state output, H, representing the ith hidden layer k A hidden state output representing a kth output layer; tanh () represents a hyperbolic tangent function, matrix V, W 1 、W 2 Is Attention model parameter and is obtained by network training, and the dimensions are d respectively 3 ×1、d 3 ×d 1 And d 3 ×d 2 Wherein d is 1 、d 2 、d 3 Are respectively h i 、H k Dimension of V, V T Represents the transpose of the parameter V;
obtaining a weight vector a between the ith hidden layer and the kth output layer in the full-connection layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (2) ik
Figure BDA0002504811030000036
In formula (2), softmax () represents a logistic regression function;
obtaining the kth output vector c in the full connection layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (3) k Comprises the following steps:
Figure BDA0002504811030000037
obtaining the state output H of the output layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model at the prediction time t by using the formula (4) t
H t =Bi-LSTM(H t-1 ,y t-1 ,H t+1 ,y t+1 ,c t ) (4)
In the formula (4), bi-LSTM () represents a bidirectional LSTM network;
step 4, based on the training set D train Determining hyper-parameters of the model using pre-experiments, comprising: the number of hidden layer units, time step, training batch, training iteration times, training period and learning rate;
adjusting the hyper-parameters according to a single variable principle within a certain range, and using the verification set D verify Determining the optimal hyper-parameter when the average absolute error of the MAE changes from descending to increasing as a reference index;
step 5, the training set D train Inputting the Attention-Bi-LSTM Attention bidirectional long-short term memory network model with the set hyper-parameters for training, and adopting an adaptive learning rate algorithm Adam as the self-parameters of the gradient descent algorithm optimization model in the training process to obtain a road motor vehicle exhaust emission prediction model so as to realize the prediction of future exhaust emission data.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention uses the improved Attention-Bi-LSTM Attention bidirectional long-short term memory network prediction model, can predict the motor vehicle exhaust emission data in a longer time period in the future, shortens the PEMS vehicle-mounted experimental test time, reduces the waste of time, resources and labor cost, and reduces the potential safety hazard which is possibly caused to professional technicians for long-time vehicle-mounted PEMS road test.
2. The invention uses the characteristic factors of tail gas emission data related to time before and after, inputs the trained Attention-Bi-LSTM Attention bidirectional long-short term memory network model, and repairs the loss of key tail gas emission data segments caused by PEMS equipment failure, upper computer communication interruption and the like in the process of monitoring the tail gas emission of the PEMS motor vehicle.
3. According to the invention, an Attention mechanism is introduced into a neural network, and the mechanism is used for monitoring the PEMS by endowing correlation weights to time sequence data before and after a prediction node, so that the problem of baseline drift caused by long-time tail gas monitoring is solved, and the detection precision of the PEMS is improved.
4. The invention uses Bi-LSTM bidirectional network, can correlate the front and back time sequences of the prediction node, and improves the accuracy of prediction.
5. The method uses the adaptive learning rate algorithm Adam, avoids the risk that the model falls into local optimum due to random gradient reduction, and improves the generalization capability of the prediction model.
Drawings
FIG. 1 is a schematic flow chart of a method for predicting exhaust emission of a PEMS road motor vehicle according to the present invention;
FIG. 2 is a schematic diagram of the Attention-Bi-LSTM network of the present invention;
FIG. 3 is a schematic diagram of the Bi-LSTM structure of the present invention;
FIG. 4 is a schematic diagram of the structure of an LSTM cell;
FIG. 5 is a diagram of a model training loss function;
FIG. 6 is a diagram of a PEMS exhaust emission test under WLTC conditions;
FIG. 7 is a graph comparing CO predicted and actual emissions for WLTC operating conditions;
FIG. 8 is a graph comparing NO predicted versus actual emissions for WLTC conditions;
FIG. 9 shows NO in WLTC operating mode 2 A comparison of predicted versus actual emissions map;
FIG. 10 is a graph comparing THC predicted versus actual emissions for WLTC operating conditions.
Detailed Description
In this embodiment, as shown in fig. 1, a method for predicting road motor vehicle exhaust emission based on an improved attention bidirectional long-short term memory network is performed as follows:
step 1, jointly acquiring exhaust emission data of a road motor vehicle in p days by using a PEMS detection device and an OBD vehicle-mounted diagnosis system, acquiring data of q working conditions every day, wherein the acquisition time of each working condition is T, thereby obtaining n = p × q × T exhaust emission data sets containing m characteristics, wherein the exhaust emission data sets contain PEMS and OBD, and the PEMS data contains real-time CO 2 、CO、NO、NO 2 、THC、O 2 Concentration, environment humidity, temperature, sampling mass flow, sampling volume flow rate, sampling pipe temperature and the like, wherein the OBD data comprise vehicle instantaneous speed, engine instantaneous power, engine rotating speed, engine load and the like, and m test data, namely m characteristics, are recorded as D origin =(d ij ) n×m Wherein d is ij Representing the jth characteristic value at the ith acquisition time; i is more than or equal to 1 and less than or equal to n; j is more than or equal to 1 and less than or equal to m;
step 2, carrying out data set D on exhaust emission origin =(d ij ) n×m Performing missing data compensationPre-processing of compensation and normalization, wherein data compensation adopts a method of averaging the first M data and the last M data of missing data, the general value of M is 10-20, namely the missing value is filled into the average value of the front and the back 2M effective data, and the characteristic matrix of the repaired data set is marked as D fit The data set D after the repair is finished fit Carrying out normalization processing to calculate the characteristic d of each time node ij Normalized value d of ij ', as shown in formula (1):
Figure BDA0002504811030000051
in the formula (1), d (max)j And d (min)j Respectively the maximum value and the minimum value of the same characteristic data in the data set before normalization, thereby obtaining an exhaust emission characteristic matrix which is marked as D scaled =(d ij ′) n×m (ii) a Wherein, d ij ' represents the j characteristic value at the i acquisition time after the pretreatment; the normalized data set feature matrix D scaled Division into training sets D train And a verification set D verify Wherein, training set D train Has a feature dimension of m-1, and a verification set D verify The characteristic dimension of the model is 1, and the verification set is a true value of the model prediction exhaust emission data;
step 3, as shown in fig. 2, establishing an Attention-Bi-LSTM network model composed of an input layer, a hidden layer, an Attention layer, a full connection layer and an output layer, initializing parameters of the model, and defining a time step length as λ and a prediction time as t;
let the data structure of the input layer of Attention-Bi-LSTM Attention bidirectional long-short term memory network model be D train ={d (t-λ)j ,...,d tj ,...,d (t+λ)j },j=1,2,...,m-1;d tj Represents the j-th characteristic value at the predicted time t;
let the hidden layer of Attention-Bi-LSTM Attention two-way long-short term memory network model include forward LSTM network and backward LSTM network, as shown in FIG. 3;
the input to the Forward LSTM network is d t-λ ,...,d t ...,d t+λ ;d t M-1 eigenvalues at the predicted time t are represented;
the forward state output of the forward LSTM network is
Figure BDA0002504811030000061
Figure BDA0002504811030000062
Representing the hidden layer state output of the forward LSTM network at the predicted time t;
the input to the LSTM network is d t+λ ,...,d t ...,d t-λ
Backward state output to the LSTM network as
Figure BDA0002504811030000063
Figure BDA0002504811030000064
Representing the hidden layer state output of the backward LSTM network at the predicted time t;
let the output of the hidden layer of Attention-Bi-LSTM bidirectional long-short term memory network model be outputted from the forward state as
Figure BDA0002504811030000065
And the backward state output is
Figure BDA0002504811030000066
Is composed of, and is marked as
Figure BDA0002504811030000067
h t A state output indicating the hidden layer at the prediction time t;
obtaining a matching scoring function F (h) in an Attention layer of an Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (2) i ,H k ):
F(h i ,H k )=V T tanh(W 1 h i +W 2 H k ) (2)
In the formula (2), h i Hidden state output, H, representing the ith hidden layer k A hidden state output representing a kth output layer; tanh () represents hyperbolic tangent function, V, W 1 、W 2 The model is an Attention model parameter matrix, which is obtained by network training and has dimensions d 3 ×1、d 3 ×d 1 And d 3 ×d 2 ,d 1 、d 2 、d 3 Are respectively h i 、H k Dimension of V, which belongs to the hyper-parameter, V T Represents the transpose of V;
obtaining a weight vector a between the ith hidden layer and the kth output layer in the fully-connected layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (3) ik
Figure BDA0002504811030000068
In the formula (3), softmax () represents a logistic regression function;
obtaining the kth output vector c in the full connection layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (4) k Comprises the following steps:
Figure BDA0002504811030000071
obtaining state output H of output layer of Attention-Bi-LSTM Attention bidirectional long-short term memory network model at prediction time t by using formula (5) t
H t =Bi-LSTM(H t-1 ,y t-1 ,H t+1 ,y t+1 ,c t ) (5)
A Bi-directional LSTM network represented by Bi-LSTM () in formula (5);
specifically, as shown in fig. 4, an LSTM (Long Short-term Memory) introduces a Memory neuron, which includes three determination conditions of an input gate, a forgetting gate and an output gate, and solves the problem of gradient disappearance in a back propagation process caused by an excessively Long time sequence of a cyclic convolution neural network (RNN). The input gate (input gate) indicates the proportion of the information allowed to be added to the memory unit; a forgetting gate (forget gate) represents a ratio of keeping the history information stored in the node of the current state; the output gate (output gate) represents the proportion of taking the information of the current state node as output, and the expressions of the input gate, the forgetting gate and the output gate are respectively as follows:
an input gate:
i t =σ(W i ·[h t-1 ,x t ]+b i ) (6)
Figure BDA0002504811030000072
Figure BDA0002504811030000073
forget the door:
f t =σ(W f ·[h t-1 ,x t ]+b f ) (9)
an output gate:
o t =σ(W o ·[h t-1 ,x t ]+b o ) (10)
h t =o t *tanh(c t ) (11)
here, W i 、W f 、W c And W o Weight matrices representing input gate, forgetting gate, output gate and cell activation vector, respectively, b i 、b f 、b c And b o Representing the bias of the input gate, the forget gate, the output gate, and the cell activation vector, respectively.
σ denotes the Sigmoid activation function:
Figure BDA0002504811030000081
tanh excitation function:
Figure BDA0002504811030000082
step 4, determining the hyper-parameters of the model by adopting a pre-experiment, comprising the following steps: the number of hidden layer units, time step, training batch, training iteration times, training period and learning rate; with training set
Figure BDA0002504811030000083
As input data, the number h of hidden layer units of the network, the time step lambda, the training batch, the training iteration number iteration, the Attention-Bi-LSTM Attention bidirectional long-short term memory network of the training period epoch are used for training, the values of h, lambda, batch, iteration and epoch are adjusted within a certain range, the model is trained, and the output result and the verification set are calculated by using the formula (14)
Figure BDA0002504811030000084
Mean Absolute Error of (MAE):
Figure BDA0002504811030000085
f (x) in the formula (14) i ) And y i The predicted value and the true value of the model are respectively.
Specifically, the h parameter is increased from 10, step 5; the lambda parameter is increased from 1 with a step size of 1; the batch parameter is increased from 24, step size 24; the iteration parameter is increased from 100, step 50; the epoch parameter is increased from 10 by a step size of 10;
adjusting the hyper-parameters within a certain range, wherein the hyper-parameter adjustment follows the principle of single variable, i.e. when adjusting a certain parameter, the rest hyper-parameters are kept unchanged, and the verification set D is used verify For reference index, when the average absolute error of MAE changes from decreasing to increasing, the optimal hyper-parameter h is determined bestbest ,batch (best) ,iteration (best) And epoch (best)
And 5, as shown in the figure 5, inputting the exhaust emission characteristic matrix into an Attention-Bi-LSTM Attention bidirectional long-short term memory network model with super parameters for training, and adopting an adaptive learning rate algorithm Adam as the self parameters of a gradient descent algorithm optimization model in the training process to obtain a road motor vehicle exhaust emission prediction model so as to realize prediction of future exhaust emission data, wherein a loss function in the model training process is shown in the figure 6. Adam, namely adaptive movements, designs independent adaptive learning rates for different parameters by calculating first moment estimation and second moment estimation of the gradient, and avoids the risk of convergence of a model to local optimum due to random gradient descent.
And 5.1, calculating the gradient at the t moment by using the formula (15):
Figure BDA0002504811030000091
in the formula (15), f (theta) is a random objective function;
step 5.2, updating the biased first moment estimation by using the formula (16):
s t =p 1 ·s t-1 +(1-p 1 )·g t (16)
and 5.3, updating the biased second moment estimation by using the formula (17):
Figure BDA0002504811030000092
and 5.4, correcting the deviation of the first moment by using an equation (18):
Figure BDA0002504811030000093
and 5.5, correcting the deviation of the second moment by using an equation (19):
Figure BDA0002504811030000094
and 5.6, updating parameters by using the formula (20):
Figure BDA0002504811030000095
specifically, after the completed Attention-Bi-LSTM Attention bidirectional long-short term memory network model is trained, the emission test set data of the motor vehicle for the future u days is input
Figure BDA0002504811030000098
Predicting the motor vehicle exhaust emission trend through the model, outputting a prediction result and carrying out inverse normalization processing, wherein the formula is as follows:
y=y scaled ×(x max -x min )+x min (21)
in the formula (21), y represents the model prediction result after inverse normalization, y scaled Representing the normalized model prediction result, x max And x min The maximum and minimum values of the predicted feature data in the training set before normalization, respectively.
And finishing normalization processing, and finally outputting the prediction result of the model. And quantitatively comparing the prediction result with a verification set to verify the accuracy of model prediction. The prediction evaluation index adopts Root Mean Square Error (RMSE) and has the following formula:
Figure BDA0002504811030000096
in the formula (22), y i The predicted value of the exhaust emission at the ith time node of the model,
Figure BDA0002504811030000097
and n is the length of the prediction sequence to verify the real value of the tail gas emission of the ith time node in the set. RMSE ranges from [0, + ∞) and is equal to 0 when the predicted value completely matches the true value, i.e. a perfect model; the larger the error, the larger the value.
TABLE 1 exhaust emission prediction error RMSE TABLE
Figure BDA0002504811030000101
The experimental results of fig. 7, fig. 8, fig. 9, fig. 10 and table 1 show that the present invention can effectively predict four key index gases in the exhaust emission of an automotive vehicle: the prediction trend of CO, NO2 and THC is basically consistent with the actual emission result, the RMSE is less than 50ppm on the whole, the long-time sequence data section loss in the tail gas emission detection of the PEMS road motor vehicle is effectively repaired, and the test time of a PEMS vehicle-mounted experiment is reduced, so that the time, the resource and the labor cost are reduced, and the potential safety hazard possibly generated to professional technicians by long-time vehicle-mounted road tests is reduced.

Claims (1)

1. A road motor vehicle exhaust emission prediction method based on an improved attention bidirectional long-short term memory network is characterized by comprising the following steps:
step 1, jointly acquiring exhaust emission data of a road motor vehicle in p days by using a PEMS detection device and an OBD vehicle-mounted diagnosis system, acquiring data of q working conditions every day, wherein the acquisition time of each working condition is T, thereby obtaining n = p × q × T exhaust emission data sets containing m characteristics, and recording the data as D origin =(d ij ) n×m Wherein d is ij Representing the jth characteristic value at the ith acquisition time; i is more than or equal to 1 and less than or equal to n; j is more than or equal to 1 and less than or equal to m;
step 2, carrying out data set D on exhaust emission origin =(d ij ) n×m Carrying out missing data compensation and normalization pretreatment to obtain a tail gas emission characteristic matrix marked as D scaled =(d′ ij ) n×m (ii) a Wherein, d' ij Representing a j characteristic value at the i acquisition time after the pretreatment; the normalized data set feature matrix D is processed scaled Division into training sets D train And a verification set D verify Wherein, training set D train Has a feature dimension of m-1, and a verification set D verify Has a feature dimension of 1, and a verification set D verify Predicting a true value of the exhaust emission data for the model;
step 3, establishing an Attention-Bi-LSTM Attention bidirectional long-short term memory network model composed of an input layer, a hidden layer, an Attention layer, a full connection layer and an output layer, initializing parameters of the model, and defining a time step length as lambda and a prediction time as t;
let the data structure of the input layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model be D train ={d (t-λ)j ,...,d tj ,...,d (t+λ)j },j=1,2,...,m-1;d tj Represents the j-th characteristic value at the predicted time t;
enabling the hidden layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model to comprise a forward LSTM network and a backward LSTM network;
the input of the forward LSTM network is d t-λ ,...,d t ...,d t+λ ;d t M-1 characteristic values at the predicted time t are represented;
the forward state output of the forward LSTM network is
Figure FDA0003917534660000011
Figure FDA0003917534660000012
Representing the hidden layer state output of the forward LSTM network at the predicted time t;
the input to the backward LSTM network is d t+λ ,...,d t ...,d t-λ
The backward state output of the backward LSTM network is
Figure FDA0003917534660000013
Figure FDA0003917534660000014
Representing the hidden layer state output of the backward LSTM network at the predicted time t;
let the output of the hidden layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model be output from the forward state as
Figure FDA0003917534660000015
And the backward state output is
Figure FDA0003917534660000016
Is composed of, and is denoted as
Figure FDA0003917534660000021
h t Representing the hidden state output of the input layer at time t;
obtaining a matching scoring function F (h) in an Attention layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (1) i ,H k ):
F(h i ,H k )=V T tanh(W 1 h i +W 2 H k ) (1)
In the formula (1), h i Indicating a hidden state output, H, of the input layer at time i k Represents a hidden state output of the output layer at time k; tanh () represents a hyperbolic tangent function, matrix V, W 1 、W 2 Is Attention model parameter and is obtained by network training, and the dimensions are d respectively 3 ×1、d 3 ×d 1 And d 3 ×d 2 Wherein d is 1 、d 2 、d 3 Are respectively h i 、H k Dimension of V, V T Represents the transpose of the parameter V;
obtaining a weight vector a between a hidden layer at the time i and an output layer at the time k in a full-connection layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (2) ik
Figure FDA0003917534660000022
In the formula (2), softmax () represents a logistic regression function;
obtaining an output vector c at a time k in a full connection layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model by using the formula (3) k Comprises the following steps:
Figure FDA0003917534660000023
obtaining the state output H of the output layer of the Attention-Bi-LSTM Attention bidirectional long-short term memory network model at the prediction time t by using the formula (4) t
H t =Bi-LSTM(H t-1 ,y t-1 ,H t+1 ,y t+1 ,c t ) (4)
In the formula (4), bi-LSTM () represents a bidirectional LSTM network;
step 4, based on the training set D train Determining hyper-parameters of the model using pre-experiments, comprising: the hidden layer unit number, the time step length, the training batch, the training iteration number, the training period and the learning rate;
adjusting the hyper-parameters within a certain range according to a single variable principle, and using the verification set D verify Determining the optimal hyper-parameter when the average absolute error of the MAE changes from descending to increasing as a reference index;
step 5, training set D train Inputting an Attention-Bi-LSTM Attention bidirectional long-short term memory network model with set hyper-parameters for training, and adopting an adaptive learning rate algorithm Adam as a self-parameter of a gradient descent algorithm optimization model in the training process to obtain a road motor vehicle exhaust emission prediction model so as to realize prediction of future exhaust emission data;
step 5.1, calculating the gradient at the t moment by using the formula (5):
g t =▽ θ f tt-1 ) (5)
in the formula (5), f t (θ) is a random objective function at time t;
step 5.2, updating the biased first moment estimate s by using the formula (16) t-1 Obtaining an estimated biased first moment s at the time t t
s t =p 1 ·s t-1 +(1-p 1 )·g t (16)
Step 5.3, updating the biased second moment estimation by using the formula (17)Meter r t-1 Obtaining an estimate r of biased second moment at time t t
Figure FDA0003917534660000031
And 5.4, obtaining the corrected first moment deviation by utilizing the formula (18)
Figure FDA0003917534660000032
Figure FDA0003917534660000033
Step 5.5, obtaining the corrected deviation of the second moment by using the formula (19)
Figure FDA0003917534660000034
Figure FDA0003917534660000035
Step 5.6, updating parameter theta by using equation (20) t-1 Obtaining the parameter theta at the time t t
Figure FDA0003917534660000036
Inputting the emission test set data of the motor vehicle for the future u days after completing Attention-Bi-LSTM Attention bidirectional long-short term memory network model training
Figure FDA0003917534660000037
And predicting the motor vehicle exhaust emission trend through the model, outputting a prediction result, performing inverse normalization processing, and finally outputting the prediction result of the model.
CN202010443547.4A 2020-05-22 2020-05-22 Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network Active CN111612254B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010443547.4A CN111612254B (en) 2020-05-22 2020-05-22 Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010443547.4A CN111612254B (en) 2020-05-22 2020-05-22 Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network

Publications (2)

Publication Number Publication Date
CN111612254A CN111612254A (en) 2020-09-01
CN111612254B true CN111612254B (en) 2022-12-23

Family

ID=72203830

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010443547.4A Active CN111612254B (en) 2020-05-22 2020-05-22 Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network

Country Status (1)

Country Link
CN (1) CN111612254B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111966226B (en) * 2020-09-03 2022-05-10 福州大学 Touch communication fault-tolerant method and system based on compensation type long-term and short-term memory network
CN112101660B (en) * 2020-09-15 2022-06-28 重庆交通大学 Rainfall type landslide displacement prediction model and method based on staged attention mechanism
CN112213109A (en) * 2020-09-16 2021-01-12 哈尔滨东安汽车发动机制造有限公司 Initial phase test method for variable valve timing system of engine
CN113158537B (en) * 2021-01-18 2023-03-24 中国航发湖南动力机械研究所 Aeroengine gas circuit fault diagnosis method based on LSTM combined attention mechanism
CN112927507B (en) * 2021-02-04 2022-12-23 南京航空航天大学 Traffic flow prediction method based on LSTM-Attention
CN112949930B (en) * 2021-03-17 2023-04-18 中国科学院合肥物质科学研究院 PA-LSTM network-based road motor vehicle exhaust high-emission early warning method
CN113128776B (en) * 2021-04-26 2023-07-07 中国科学技术大学先进技术研究院 Multi-vehicle type diesel vehicle emission prediction method and system with data self-migration
CN113362598B (en) * 2021-06-04 2022-06-03 重庆高速公路路网管理有限公司 Traffic flow prediction method for expressway service area
CN113657651A (en) * 2021-07-27 2021-11-16 合肥综合性国家科学中心人工智能研究院(安徽省人工智能实验室) Diesel vehicle emission prediction method, medium and equipment based on deep migration learning
CN113674525B (en) * 2021-07-30 2022-08-16 长安大学 Signalized intersection vehicle queuing length prediction method based on sparse data
CN114298389A (en) * 2021-12-22 2022-04-08 中科三清科技有限公司 Ozone concentration forecasting method and device
CN115297496B (en) * 2022-09-28 2022-12-20 南昌航空大学 Link quality prediction method combining Bi-LSTM and time mode attention
CN116953653B (en) * 2023-09-19 2023-12-26 成都远望科技有限责任公司 Networking echo extrapolation method based on multiband weather radar

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214566A (en) * 2018-08-30 2019-01-15 华北水利水电大学 Short-term wind power prediction method based on shot and long term memory network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109009179B (en) * 2018-08-02 2020-09-18 浙江大学 Same isotope labeling double-tracer PET separation method based on deep belief network
CN109919221B (en) * 2019-03-04 2022-07-19 山西大学 Image description method based on bidirectional double-attention machine
CN110334843B (en) * 2019-04-22 2020-06-09 山东大学 Time-varying attention improved Bi-LSTM hospitalization and hospitalization behavior prediction method and device
CN110446112A (en) * 2019-07-01 2019-11-12 南京邮电大学 IPTV user experience prediction technique based on two-way LSTM-Attention
CN111047012A (en) * 2019-12-06 2020-04-21 重庆大学 Air quality prediction method based on deep bidirectional long-short term memory network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109214566A (en) * 2018-08-30 2019-01-15 华北水利水电大学 Short-term wind power prediction method based on shot and long term memory network

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Transfer Learning Using Bi-Lstm With Attention Mechanism On Stack Exchange Data;Maheep Singh et al.;《2019 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COMITCon)》;20191011;全文 *
基于Attenton-LSTM神经网络的船舶航行预测;徐国庆等;《舰船科学技术》;20191208(第23期);全文 *
基于注意力机制的车辆行为预测;蔡英凤等;《江苏大学学报(自然科学版)》;20200310(第02期);全文 *

Also Published As

Publication number Publication date
CN111612254A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111612254B (en) Road motor vehicle exhaust emission prediction method based on improved attention bidirectional long-short term memory network
CN112949930B (en) PA-LSTM network-based road motor vehicle exhaust high-emission early warning method
CN107577910B (en) Vehicle exhaust concentration inversion method based on deep neural network
Fu et al. Application of artificial neural network to forecast engine performance and emissions of a spark ignition engine
CN103091112B (en) Method and device of car emission fault detection and diagnosis based on fuzzy reasoning and self-learning
Ortenzi et al. A new method to calculate instantaneous vehicle emissions using OBD data
US11203962B2 (en) Method for generating a model ensemble for calibrating a control device
CN113554153A (en) Method and device for predicting emission of nitrogen oxides, computer equipment and medium
CN112983608A (en) Particle trap carbon load calculation method and system, controller and storage medium
KR102118088B1 (en) Method for real driving emission prediction using artificial intelligence technology
Wang et al. Performance evaluation of aerospace relay based on evidential reasoning rule with distributed referential points
Ma et al. Connected vehicle based distributed meta-learning for online adaptive engine/powertrain fuel consumption modeling
Liao et al. A comparative investigation of advanced machine learning methods for predicting transient emission characteristic of diesel engine
Howlader et al. Data-driven approach for instantaneous vehicle emission predicting using integrated deep neural network
Martínez-Morales et al. Modeling engine fuel consumption and NOx with RBF neural network and MOPSO algorithm
AU2019100348A4 (en) A specified gas sensor correction method based on locally weighted regression algorithm
Chernyaev et al. The mechanism of continuous monitoring of compliance with environmental requirements imposed on vehicles in operation
US11840974B2 (en) Intelligent mass air flow (MAF) prediction system with neural network
Li et al. Remote sensing and artificial neural network estimation of on-road vehicle emissions
CN114674573B (en) Actual road emission RDE evaluation method suitable for arbitrary test boundary
Shin et al. Application of physical model test-based long short-term memory algorithm as a virtual sensor for nitrogen oxide prediction in diesel engines
Sundaram et al. Modeling of transient gasoline engine emissions using data-driven modeling techniques
CN114282680A (en) Vehicle exhaust emission prediction method and system based on machine learning algorithm
Xu et al. An adaptive variable selection algorithm for gated recurrent unit based on sensitivity analysis and nonnegative garrote
CN116070791A (en) Diesel vehicle NO based on LSTM algorithm x Emission prediction method

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