Gasoline car emission prediction method based on XGBoost-SVR combined model

Through XGBoost-SVR combined model and singular spectrum analysis technology, the problems of low emission prediction accuracy and high test cost of gasoline vehicles under complex operating conditions are solved, and high-precision and low-cost emission prediction are achieved.

CN119227874APending Publication Date: 2024-12-31CHINA MACHINERY HUANYU(SHAN DONG)VEHICLE CERTIFICATION AND TESTING CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411265412.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing gasoline vehicle emission prediction model has low prediction accuracy under complex operating conditions, and reliance on a large number of road tests leads to high cost and time investment.

Method used

Using the XGBoost-SVR combination model, data is collected through a portable emission measurement system, timing calibration and singular spectrum analysis are performed, effective trend information is extracted, pollutant emissions are predicted in combination with the XGBoost model, and residuals are corrected through the SVR model to improve prediction accuracy.

Benefits of technology

It significantly improves the prediction accuracy of the instantaneous emissions of four pollutants such as CO, NOx, HC and PN under complex operating conditions, reduces the frequency and time investment of road tests, reduces the experimental cost, improves the prediction efficiency and generalization ability of the model .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227874A_ABST
    Figure CN119227874A_ABST
Patent Text Reader

Abstract

The invention relates to the field of vehicle emission prediction, and discloses a gasoline vehicle emission prediction method based on an XGBoost-SVR combined model, and the method comprises the following steps: S1, collecting the instantaneous emission data of pollutants of a gasoline vehicle and vehicle driving parameters, and carrying out the time sequence calibration processing; s2, singular spectrum analysis is adopted to decompose and reconstruct the pollutant emission data; s3, dividing the processed pollutant emission data and vehicle driving parameters into a training set, a verification set and a test set; s4, establishing an XGBoost model, and predicting the instantaneous discharge amount of pollutants by inputting vehicle driving parameters; s5, calculating a residual error between a predicted value and an actual value based on the verification set; and S6, correcting the residual error by using an SVR model to obtain a final pollutant emission prediction value. According to the method, the XGBoost and SVR models are combined, so that high-precision prediction of the pollutant emission of the gasoline car is realized, data noise is effectively removed, the experiment cost is reduced, and the generalization ability and adaptability of the model under complex working conditions are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle emission prediction, and in particular to a gasoline vehicle emission prediction method based on an XGBoost-SVR combined model. Background Art

[0002] With the improvement of my country's economic level and people's living standards, the number of motor vehicles is also growing rapidly, and there is still huge room for growth. At the same time, the emission of pollutants from motor vehicles is also growing rapidly. Automobiles are the main contributor to the total amount of pollutant emissions, and their emissions of CO, HC, NOx and PM exceed 90%. Among them, gasoline vehicles CO exceeds 80% of the total automobile emissions, and HC exceeds 70%. The urgency of strengthening gasoline vehicle pollution control is becoming increasingly prominent, and controlling automobile exhaust emissions has become the key to improving environmental quality and people's quality of life.

[0003] The National VI standard is the latest version of my country's automobile pollutant emission standard. It has been implemented since 2019. Compared with the previous National V standard, the National VI standard has stricter restrictions on pollutant emissions, further reducing the exhaust emission limits of gasoline and diesel vehicles, especially for some important pollutants, such as nitrogen oxides, non-methane total hydrocarbons, particulate matter, etc., and requires all vehicles to be equipped with an OBD (on-board diagnostic system) system to ensure that the emission level of the vehicle meets the standard under normal driving conditions. In addition, the National VI standard also introduced the Real Drive Emission test of the Euro VI standard, and PEMS equipment was developed as a result. The data obtained from the RDE test can better reflect the actual pollution level of my country's vehicles when driving on actual roads.

[0004] In order to strictly limit automobile emissions, some domestic scholars have begun to study the emission models developed by European and American countries. The motor vehicle emission model mainly reflects the emission characteristics of motor vehicles by considering the relationship between characteristic parameters (such as vehicle type, engine technology, vehicle speed, driving mode, etc.) and emission rate. However, at present, most of the emission models are based on bench test data. The laboratory standard test cycle can only provide emission data under specific working conditions and cannot fully reflect the complex conditions and working condition changes faced by vehicles when driving on actual roads. Actual road driving involves many factors such as different driving habits, road conditions, ambient temperature, vehicle maintenance status, etc., all of which may affect the vehicle's pollutant emissions.

[0005] In recent years, machine learning has been applied in the field of motor vehicle emission prediction. Relevant papers mention emission prediction models based on machine learning, but most of them are single models. Motor vehicle pollutant emission data is affected by many factors and is a non-stationary and nonlinear time series data. A single model cannot fit it well. The practicality and stability of the model are not ideal. The prediction results of automobile exhaust emissions under different working conditions are not very accurate. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention provides a gasoline vehicle emission prediction method based on the XGBoost-SVR combined model, which improves the prediction accuracy of pollutant emissions of gasoline vehicles under complex working conditions, while reducing the cost and time investment of actual road tests.

[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions: A gasoline vehicle emission prediction method based on the XGBoost-SVR combined model, comprising the following steps:

[0008] The portable emission measurement system was installed on a gasoline vehicle to conduct an actual road driving test, collect the instantaneous emission data of four pollutants, CO, NOx, HC, and PN, and vehicle driving parameters, and perform time series calibration processing;

[0009] Using singular spectrum analysis to decompose and reconstruct the pollutant emission data, extract effective trend information, and eliminate useless noise;

[0010] Divide the processed pollutant emission data and vehicle driving parameters into a training set, a validation set and a test set;

[0011] An XGBoost model was established to predict the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by inputting vehicle driving parameters;

[0012] Calculate the residual between the predicted value and the actual value based on the validation set;

[0013] The SVR model is used to correct the residual to obtain the final pollutant emission prediction value.

[0014] Preferably, the step of collecting instantaneous emission data of four pollutants, CO, NOx, HC, and PN, and vehicle driving parameters of gasoline vehicles includes:

[0015] Installing a portable emission measurement system on a gasoline vehicle, the system includes a gas analyzer, an exhaust gas flow meter, and an on-board diagnostic system;

[0016] Conduct actual road driving tests in accordance with the Type II test specifications of the National VI Standard, and continuously record pollutant emission data and vehicle driving parameters during the test;

[0017] The collected pollutant emission data include the instantaneous emission concentrations of four pollutants: CO, NOx, HC, and PN. The vehicle driving parameters include vehicle speed, engine speed, exhaust temperature, exhaust flow, load percentage, and fuel consumption rate.

[0018] Preferably, the step of timing calibration processing includes:

[0019] The gas analyzer and exhaust gas flow meter are calibrated by the consistency of the peak and valley values ​​of CO emission concentration and exhaust flow;

[0020] The on-board diagnostic system data is aligned with the gas analyzer using vehicle speed and CO emission concentration;

[0021] GPS data and weather station data are synchronized with the on-board diagnostics system via vehicle speed.

[0022] Preferably, the step of decomposing and reconstructing the pollutant emission data using singular spectrum analysis includes:

[0023] Assume that the pollutant emission data is a time series {x1,x2,...x N}, and construct it into a trajectory matrix x. The dimension of the trajectory matrix is ​​determined by the window length L and the sequence length K = N-L+1. The trajectory matrix X is expressed as:

[0024]

[0025] Among them, L is the sliding window length, L <N / 2;

[0026] Calculate the covariance matrix S of the trajectory matrix X, defined as S = XX T The covariance matrix S is used to represent the relationship between different segments of the time series;

[0027] Perform eigenvalue decomposition on the covariance matrix S to obtain eigenvalues ​​λ1,λ2,…λ L and its corresponding eigenvectors U1,U2,…U L , the eigenvalues ​​are arranged in descending order:

[0028] λ1>λ2>λ3>…>λ L ≥0

[0029] Select the first p main components for data reconstruction, and the reconstructed trajectory matrix X p It is expressed as:

[0030]

[0031] The reconstructed trajectory matrix X p Transformed into a reconstructed time series by diagonal averaging in It is expressed as:

[0032]

[0033] Among them, L * =min(L,K),K * =max(L,K);

[0034] The main trend information of the original data is retained, and useless noise is eliminated to generate an optimized data sequence for subsequent modeling and prediction.

[0035] Preferably, the step of dividing the processed pollutant emission data and vehicle driving parameters into a training set, a validation set and a test set comprises:

[0036] The pollutant emission data processed by singular spectrum analysis and vehicle driving parameters are collated to generate a characteristic data set;

[0037] The dataset is divided into training set, validation set and test set in a ratio of 3:1:1.

[0038] Preferably, the step of establishing an XGBoost model and predicting the instantaneous emissions of four pollutants, namely, CO, NOx, HC, and PN, by inputting vehicle driving parameters comprises:

[0039] Construct the input feature matrix X=x1,x2,…,x m , the pollutant emissions are taken as output y=y1,y2,…,y n ;

[0040] Use the XGBoost model, which consists of multiple regression trees and its prediction formula is:

[0041]

[0042] Among them, K is the number of regression trees, f k (x i ) represents the kth regression tree for sample x i The predicted value of

[0043] Define the objective function of the XGBoost model, which includes the loss function and the regularization term:

[0044]

[0045] Among them, Ω(f k ) is the regularization term, and its expression is:

[0046]

[0047] Where T is the number of leaf nodes, ω j is the weight of the jth leaf node;

[0048] Perform Taylor second-order expansion on the objective function and obtain the iterative update formula:

[0049]

[0050] Among them, g i With h i are the first and second derivatives of the objective function, respectively. is a constant term;

[0051] Substituting the regularization term expression into the objective function, we get the expression:

[0052]

[0053] By optimizing the weights of leaf nodes, the formula for updating weights is:

[0054]

[0055] The optimal objective function is:

[0056]

[0057] Among them, I J Represents the sample set of leaf nodes;

[0058] Optimize the model's hyperparameters, including the number of decision trees, learning rate, and maximum tree depth, through grid search combined with cross-validation;

[0059] The XGBoost model is trained using the training set, and the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, are finally predicted to obtain preliminary prediction values.

[0060] Preferably, the step of calculating the residual between the predicted value and the actual value based on the validation set includes:

[0061] Use the trained XGBoost model to train each feature vector x in the validation set. i Make a prediction and get the predicted value where y i is the actual value;

[0062] The residual e for each sample is calculated using the following formula i :

[0063]

[0064] The residuals are calculated for all samples in the validation set to generate a residual sequence that reflects the deviation between the predicted values ​​of the XGBoost model and the actual values.

[0065] Preferably, the step of using a support vector regression model to correct the residual to obtain a final pollutant emission prediction value includes:

[0066] The residual sequence calculated from the validation set is used as the target variable of the support vector regression model, and the corresponding vehicle driving parameters are used as input features;

[0067] Construct a support vector regression model, use the kernel function for nonlinear mapping, and select the radial basis kernel function;

[0068] The preliminary prediction values ​​of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model and the prediction values ​​of the residuals by the SVR model are added together to obtain the final prediction results of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost-SVR combined model, which are as follows:

[0069]

[0070] in, is the preliminary prediction value of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model. is the predicted value of the residual by the SVR model.

[0071] Preferably, the method further comprises: a step of evaluating the method of the XGBoost-SVR combination model in a test set using normalized root mean square error and determination coefficient.

[0072] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the above method is implemented.

[0073] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0074] The present invention provides a gasoline vehicle emission prediction method based on the XGBoost-SVR combined model. It has the following beneficial effects:

[0075] 1. The present invention combines XGBoost and SVR models. The XGBoost model uses multiple regression trees to process the complex nonlinear relationship between vehicle driving parameters and pollutant emissions, while the SVR model further improves the prediction accuracy through residual correction. This combined model can effectively reduce the prediction error and significantly improve the prediction accuracy of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, under complex working conditions.

[0076] 2. The present invention uses singular spectrum analysis (SSA) to decompose and reconstruct pollutant emission data, extract effective trend information, and remove noise and outliers in the data. This process ensures the quality of model training data, enables the model to more accurately capture the main characteristics of pollutant emissions, and avoids the impact of noise interference on the prediction results.

[0077] 3. The present invention reduces the need to rely on a large number of road tests to obtain data through accurate emission prediction, and reduces the frequency and time investment of RDE (real road emission) tests. Effective model prediction can replace part of the test process, saving experimental costs and resource consumption, and improving prediction efficiency.

[0078] 4. The combination of XGBoost and SVR in the present invention enables it to cope with diverse road conditions and vehicle operating states. Through reasonable hyperparameter optimization and residual correction, the generalization ability of the model is improved, so that it can still maintain a high prediction accuracy under different test environments and complex conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 One of the schematic flow charts of the method of the present invention;

[0080] Figure 2 This is the second schematic diagram of the method flow of the present invention;

[0081] Figure 3 This is a comparison chart of the prediction results of the instantaneous CO emissions of the sample vehicle by the XGBoost-SVR combined model of the present invention and the XGBoost single model;

[0082] Figure 4 This is a comparison chart of the prediction results of NOx instantaneous emissions of a sample vehicle using the XGBoost-SVR combined model of the present invention and the XGBoost single model;

[0083] Figure 5 This is a comparison chart of the prediction results of HC instantaneous emissions of a sample vehicle by the XGBoost-SVR combined model of the present invention and the XGBoost single model;

[0084] Figure 6This is a comparison chart of the prediction results of the XGBoost-SVR combined model and the XGBoost single model for the PN instantaneous emission of the sample vehicle;

[0085] Figure 7 It is a schematic diagram of the device structure of the present invention.

[0086] Among them, 100, data acquisition module; 200, timing calibration module; 300, data processing module; 400, model building module; 500, residual correction module; 600, prediction output module. DETAILED DESCRIPTION

[0087] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0088] See also Figure 1-Figure 2 The embodiment of the present invention provides a gasoline vehicle emission prediction method based on the XGBoost-SVR combined model, comprising the following steps:

[0089] S1. Data collection and timing calibration processing

[0090] First, the pollutant emissions of gasoline vehicles are collected through a portable emission measurement system (PEMS), and the input data is constructed in combination with the vehicle driving parameters. In order to ensure the consistency and accuracy of the collected emission data and driving parameters, necessary time series calibration processing is performed. The main task of this step is to obtain high-quality pollutant emission data and vehicle driving data, laying the foundation for subsequent data processing and modeling.

[0091] In this embodiment, a portable emission measurement system (PEMS) is first installed on a gasoline vehicle. The PEMS includes a gas analyzer, an exhaust gas flow meter, and an on-board diagnostic system (OBD) to collect instantaneous emission data of four pollutants, CO, NOx, HC, and PN, as well as the driving parameters of the vehicle. The specific data collected include the following:

[0092] Pollutant emission data: instantaneous emission concentrations of four pollutants: CO, NOx, HC, and PN. These pollutants are the main components of gasoline vehicle emissions, and accurate collection of them can effectively characterize the emission characteristics of gasoline vehicles.

[0093] Vehicle driving parameters: including vehicle speed, engine speed, exhaust temperature, exhaust flow, load percentage and fuel consumption rate. These parameters are closely related to pollutant emissions and can provide key input features for the prediction model. This is carried out according to the Type II test specifications of the National VI Standard to ensure that the test results have a high reference value.

[0094] In this embodiment, after the emission data and driving parameters are collected, a timing calibration process needs to be performed to ensure that all data can be correctly aligned and consistent at the same time point.

[0095] The specific steps for timing calibration are as follows:

[0096] 1. Calibration of gas analyzer and exhaust gas flow meter: By analyzing the time consistency of the peak and valley values ​​of CO2 emission concentration and exhaust gas flow, data alignment is performed to ensure that the peak and valley changes of CO2 concentration are synchronized with the fluctuations of exhaust gas flow.

[0097] 2. Calibration of OBD data and gas analyzer: By comparing the changing trends of vehicle speed and CO2 concentration, the OBD data and gas analyzer are calibrated to ensure the synchronization of CO2 emission concentration changes and vehicle speed data when the vehicle accelerates or decelerates.

[0098] 3. Calibration of GPS data and weather station data: The vehicle speed data recorded by GPS is aligned with the OBD data to ensure that the GPS location information is consistent with the vehicle speed information of the OBD. At the same time, the environmental parameters such as wind speed and wind direction recorded by the weather station are also aligned with the vehicle driving parameters to ensure that the external environmental data matches the driving status.

[0099] 4. Timing alignment: Based on the calibrated data above, align according to a unified timestamp to ensure time synchronization of all data sources and eliminate errors that may be caused by asynchrony of the acquisition device clocks.

[0100] Through the above steps, this embodiment ensures the temporal consistency and accuracy of the collected data, which provides a high-quality data foundation for subsequent singular spectrum analysis and model construction.

[0101] S2. Singular Spectrum Analysis (SSA) Processing

[0102] After completing data collection and time series calibration, the next step is to process the pollutant emission data. Since the original data may contain noise and outliers, singular spectrum analysis (SSA) is used to decompose and reconstruct the data to extract effective trend information and remove useless noise, thereby providing a more accurate and reliable data basis for subsequent modeling.

[0103] In this embodiment, singular spectrum analysis (SSA) is used to decompose and reconstruct the emission data of four pollutants, namely, CO, NOx, HC, and PN. The specific steps are as follows:

[0104] 1. Construct trajectory matrix:

[0105] First, the pollutant emission data is represented as a time series {x1,x2,...x N}, then select the window length L, and construct the trajectory matrix X according to the window length, which is expressed as:

[0106]

[0107] Among them, K=N-L+1, L is the sliding window length, which is used to extract local feature information in the sequence.

[0108] 2. Calculate the covariance matrix:

[0109] The covariance matrix S is calculated based on the trajectory matrix X, and its expression is:

[0110] S=XX T

[0111] The covariance matrix reflects the relationship between different segments of the time series and can help identify the main trend components in the data.

[0112] 3. Eigenvalue decomposition:

[0113] Perform eigenvalue decomposition on the covariance matrix S to obtain a series of eigenvalues ​​λ1,λ2,…λ L and its corresponding eigenvectors U1,U2,…U L The eigenvalues ​​reflect the contribution of different components to the original data and are usually arranged in descending order:

[0114] λ1>λ2>λ3>…>λ L ≥0

[0115] 4. Data reconstruction:

[0116] Based on the size of the eigenvalue, the components corresponding to the first p main eigenvalues ​​are selected for data reconstruction, and the components with smaller contributions are ignored to remove noise. The reconstruction formula of the trajectory matrix X is:

[0117]

[0118] Where d = rank(X), the first p components are taken to reconstruct the original sequence, V m Yes with U m The corresponding singular vectors. By reconstructing the components with larger eigenvalues, the main trend components in the data can be effectively extracted.

[0119] 5. Diagonal averaging:

[0120] The reconstructed trajectory matrix X p Convert to a new time series by diagonal averaging The calculation formula for diagonal averaging is:

[0121]

[0122] Among them, L * =min(L,K),K * =max(L,K); This process can restore the reconstructed matrix to a time series form, so that the data can be used for subsequent model training and prediction.

[0123] Through the above singular spectrum analysis, this embodiment can effectively extract the main change trend of pollutant emission data, remove noise, and provide clean and reliable data input for subsequent modeling. This process ensures that the model can better capture the key features in the data during the training phase and avoid noise interference.

[0124] S3, Dataset Division

[0125] The pollutant emission data and vehicle driving parameters processed by singular spectrum analysis (SSA) need to be divided into training set, validation set and test set according to a certain ratio. The training set is used for model training, the validation set is used for model hyperparameter tuning and residual calculation, and the test set is used to evaluate the generalization ability of the model. Reasonable data division can ensure the stability and reliability of model training, while preventing problems such as data leakage from affecting model performance.

[0126] In this embodiment, the pollutant emission data and vehicle driving parameters processed by singular spectrum analysis are divided into a training set, a validation set and a test set in a ratio of 3:1:1. The specific steps are as follows:

[0127] 1. Data normalization processing:

[0128] In order to eliminate the dimensional differences between different features, all data are first normalized. Normalization ensures that the model gives the same weight to different features during training.

[0129] 2. Division of training set, validation set and test set:

[0130] The data set is divided in chronological order to ensure that there is no future data leakage between different data sets. The division ratio is 3:1:1, that is, 60% of the data is used as the training set, 20% of the data is used as the validation set, and the remaining 20% ​​of the data is used as the test set.

[0131] 3. Data sequential processing:

[0132] When dividing the data set, keep the order of the time series, ensure that the data in the training set is located at the front of the time series, and the data in the validation set and test set are located in the middle and back of the time series respectively. This can prevent the model from being exposed to future data in advance during validation or testing, and ensure the credibility of the evaluation results.

[0133] 4. The training set is used for model training:

[0134] Training is the main dataset used to train the XGBoost model, which contains vehicle driving parameters and corresponding pollutant emission data. Through this dataset, the model can learn the relationship between vehicle operating conditions and pollutant emissions.

[0135] 5. The validation set is used for model tuning:

[0136] The validation set is used to adjust the hyperparameters of the XGBoost model and is used for residual calculation in the subsequent residual correction stage. Through the validation set, the impact of different hyperparameter configurations on model performance can be evaluated, so as to select the optimal parameters.

[0137] 6. Test set is used for model evaluation:

[0138] The test set is used for the final performance evaluation of the model. The data in the test set has never been involved in training and verification, so its results can better reflect the generalization ability of the model, that is, the prediction effect of the model in practical applications.

[0139] Through the above steps, this embodiment ensures the rationality and scientificity of data set division, avoids data leakage problems, and provides a reliable data foundation for model training, verification and evaluation.

[0140] S4. Construction and prediction of XGBoost model

[0141] After data division, the XGBoost model is constructed using the training set data, and the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, are predicted by inputting vehicle driving parameters. As a regression tree model based on gradient boosting, the XGBoost model can handle nonlinear features and has strong prediction capabilities. By training the XGBoost model, preliminary prediction results of pollutant emissions can be obtained, laying the foundation for subsequent residual correction and final prediction.

[0142] In this embodiment, the constructed XGBoost model is used to predict the instantaneous emissions of four pollutants: CO, NOx, HC, and PN. The specific implementation steps are as follows:

[0143] 1. Input feature construction:

[0144] The input of the XGBoost model is vehicle driving parameters, including vehicle speed, engine speed, exhaust temperature, exhaust flow, load percentage and fuel consumption rate. These parameters are directly related to pollutant emissions. By inputting these parameters into the model, the model can predict pollutant emissions based on the vehicle's operating status.

[0145] 2. Basic structure of the model:

[0146] The XGBoost model achieves prediction by integrating multiple regression trees. The output of each regression tree is a partial fit of pollutant emissions, and the final prediction value is the weighted sum of the outputs of all regression trees. The specific expression is:

[0147]

[0148] in, is the predicted value of pollutant emission of the i-th sample, f k (x i ) represents the kth regression tree for x i The predicted value of , K is the total number of regression trees.

[0149] The XGBoost model adds a new function in each iteration, corresponding to a regression tree. The newly generated regression tree is fitted with the error predicted by all previous trees. The iteration formula is:

[0150]

[0151] In the formula, t represents the number of iterations.

[0152] The expression of XGBoost objective function is as follows:

[0153]

[0154] In the formula, is the loss function of the model, is the regularization term in the function. The regularization term expression is:

[0155]

[0156] In the formula, ω j represents the weight of the jth leaf node, T is the number of leaf nodes, λ represents the regularization penalty coefficient, which ensures that the weight of the leaf node is not too large, and γ represents the penalty function coefficient, which prevents the number of leaf nodes from being too large.

[0157] 3. Gradient update and second-order expansion:

[0158] XGBoost performs Taylor second-order expansion on the objective function and obtains the objective function expression as follows:

[0159]

[0160] g i With h i are the first and second derivatives of the objective function, respectively. is a constant term, which can be removed to simplify the objective function without affecting the result. Substituting the regularization term expression into the objective function, we get the expression:

[0161]

[0162] 4. Leaf node weight update:

[0163] Further j The optimal weight of the leaf is derived as:

[0164]

[0165] Among them, I j represents the sample set belonging to leaf node j, g i and h i are the first and second order derivatives of the corresponding samples.

[0166] The optimal objective function obtained is:

[0167]

[0168] 5. Hyperparameter Optimization:

[0169] In order to further improve the predictive performance of the model, the hyperparameters of the XGBoost model are optimized by combining grid search with cross validation, including:

[0170] The number of decision trees ranges from 500 to 1000;

[0171] Learning rate, ranging from 0.001 to 0.01;

[0172] The maximum depth of a decision tree, ranging from 2 to 5.

[0173] 6. Model training and prediction:

[0174] The XGBoost model is trained using the training set to learn the relationship between vehicle driving parameters and pollutant emissions. After training, the model can predict the samples in the validation set and the test set and output the instantaneous emissions of four pollutants: CO, NOx, HC, and PN.

[0175] Through the above steps, this embodiment uses the XGBoost model to make a preliminary prediction of the four major pollutants of CO, NOx, HC, and PN emitted by gasoline vehicles, providing a basis for subsequent residual correction and final prediction.

[0176] S5. Residual calculation

[0177] The XGBoost model learned the relationship between pollutant emissions and vehicle driving parameters through the training set and made predictions on the validation set. In order to further improve the accuracy of the prediction, it is necessary to calculate the residual between the predicted value and the actual value. The residual reflects the error of the model on different samples and provides a basis for subsequent corrections through the SVR model. The calculation of the residual can help identify the prediction deviation of the XGBoost model under certain specific conditions, thereby providing data support for further corrections.

[0178] In this embodiment, the residual between the predicted value and the actual value is calculated based on the validation set. The specific steps are as follows:

[0179] 1. Use XGBoost model for prediction:

[0180] First, use the trained XGBoost model to predict each sample in the validation set. Assume that the feature vector in the validation set is x i , the predicted value of the XGBoost model Calculated by the following formula:

[0181]

[0182] 2. Calculate the residual:

[0183] The residuals represent the predicted values ​​of the XGBoost model The actual observed value y i The difference between them is calculated as:

[0184]

[0185] Among them, e i is the residual of the i-th sample, y i is the actual pollutant emission value. The calculation of residuals can intuitively reflect the error size of the model on a specific sample.

[0186] 3. Generate residual sequence:

[0187] After calculating the residuals of all samples in the validation set, we get the residual sequence E = {e1, e2, ...e m}, where m is the number of samples in the validation set. The residual sequence will be used to correct the subsequent support vector regression (SVR) model.

[0188] Through the above steps, this embodiment calculates and analyzes the residuals of the prediction results of the XGBoost model, providing a basis for the subsequent SVR model to correct the residuals.

[0189] S6. Residual Correction of Support Vector Regression (SVR) Model

[0190] After calculating and analyzing the residuals of the XGBoost model, the support vector regression (SVR) model is used to correct these residuals. The SVR model can map the input features to a high-dimensional space through nonlinear mapping, thereby fitting and correcting complex nonlinear residuals. Through the correction of the SVR model, the prediction error can be further reduced and a more accurate prediction value of pollutant emissions can be obtained.

[0191] In this embodiment, a support vector regression (SVR) model is used to correct the residual, and the specific steps are as follows:

[0192] 1. Input features and target construction:

[0193] The input features of the SVR model are the vehicle driving parameters processed by singular spectrum analysis, and the target is the residual e between the predicted value and the actual value of the XGBoost model in the validation set. i . Input feature x i Including vehicle speed, engine speed, exhaust temperature, exhaust flow, load percentage and fuel consumption rate, etc.

[0194] 2.SVR model:

[0195] Support Vector Regression (SVR) is a supervised learning algorithm for classification and regression. Map the samples in low-dimensional space to high-dimensional space to fit nonlinear data. Assume that the sample set is {x i ,y i}, where x i is the input vector, y i is the output vector. The decision function of the SVR model is expressed as:

[0196]

[0197] Where ω is the weight coefficient, is a nonlinear mapping function that maps the input vector x from the input space to a higher-dimensional space, and b is the bias. The training process of the SVR model can be seen as finding the optimal ω, b so that f(x i ) infinitely close to y i ,Right now:

[0198]

[0199] f(x i )-y i ≤ε+ξ i

[0200]

[0201] ξ i ≥0,

[0202] In the formula, ξ i , is the slack variable, ε is f(x i ) and y i The difference between the two, C is the penalty factor, and a larger C can make the model fit the sample better. By introducing the Lagrange multiplier and α i , transformed into solving the dual optimization problem, and the final regression prediction model is:

[0203]

[0204] In the formula, k(x,x i ) is the kernel function.

[0205] The kernel function of the SVR model is set as follows:

[0206] 1) Select radial basis kernel function, linear kernel function and polynomial kernel function for SVR modeling respectively, and select radial basis function as the kernel function of SVR model according to the fitting effect of the three kernel functions on the residual.

[0207] 2) The residual sequence e i The emission data of four pollutants, CO, NOx, HC and PN, after singular spectrum analysis were substituted into the SVR model.

[0208] 3) Obtain the residual prediction values ​​of the instantaneous emissions of four pollutants: CO, NOx, HC, and PN

[0209] The preliminary prediction values ​​of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model and the prediction values ​​of the residuals by the SVR model are added together to obtain the final prediction results of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost-SVR combined model, which are as follows:

[0210]

[0211] in, is the preliminary prediction value of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model. is the predicted value of the residual by the SVR model.

[0212] Through the above steps, this embodiment uses the SVR model to correct the residual of the XGBoost model, and finally obtains a more accurate pollutant emission prediction result. The introduction of SVR not only improves the nonlinear fitting ability of the model, but also enhances the prediction stability of the model under complex working conditions.

[0213] The present invention can effectively improve the prediction accuracy of pollutant emissions from gasoline vehicles by combining the XGBoost model and the support vector regression (SVR) model. The XGBoost model fits the nonlinear relationship between vehicle driving parameters and pollutant emissions through multiple regression trees, and the SVR model further corrects its prediction error, thereby reducing the overall error of the model. By removing noise through singular spectrum analysis and optimizing the model in stages, the present invention can better capture the pollutant emission characteristics under complex working conditions, while reducing experimental costs and test time.

[0214] Furthermore, the present invention also evaluates the method of the XGBoost-SVR combination model in the test set.

[0215] Specifically, the normalized root mean square error NRMSE and the coefficient of determination R are used. 2 Evaluate the model performance, the results are as follows Figure 3 , Figure 4 , Figure 5 , Figure 6 The formula is as follows:

[0216]

[0217] Among them, y i is the measured value of the ith sample, is the predicted value of the ith sample, is the sample mean, and n is the number of samples.

[0218] Combination Figure 3 , Figure 4 , Figure 5 , Figure 6 The experimental results show that the XGBoost-SVR combined model and the XGBoost single model compare the instantaneous emission prediction results of four pollutants, CO, NOx, HC, and PN, for gasoline vehicles. As can be seen from the figure, near the extreme point, due to the change of engine operating conditions in a short period of time, the response time of the emission prediction model is insufficient, resulting in the XGboost single model's prediction results at certain peaks and troughs being significantly different from the measured values, and the prediction accuracy is insufficient. However, the XGBoost-SVR combined model uses the SVR model to perform residual correction, and further predicts the residual obtained by the XGBoost model to obtain the final prediction result. Figure 3 , Figure 4 , Figure 5 , Figure 6 It can be seen that the predicted values ​​of the XGBoost-SVR combination model can better match the measured values.

[0219] Using RMSE, R 2 Evaluate the XGBoost model and the XGBoost-SVR combination model

[0220] The NRMSE of the XGBoost model for predicting instantaneous emissions of four pollutants, CO, NOx, HC, and PN, are 0.055, 0.035, 0.057, and 0.047, respectively.

[0221] The R value of XGBoost model for predicting instantaneous emissions of four pollutants: CO, NOx, HC, and PN 2 They are 0.643, 0.756, 0.859 and 0.709 respectively.

[0222] The XGBoost-SVR combined model has a high accuracy in predicting instantaneous emissions of four pollutants, CO, NOx, HC, and PN. The NRMSE of the prediction results are 0.033, 0.026, 0.029, and 0.04, respectively, which are 40%, 25.7%, 49.1%, and 14.9% higher than those of the XGBoost single model.

[0223] The R2 of the XGBoost-SVR combined model for instantaneous emission prediction of four pollutants, CO, NOx, HC, and PN, are 0.924, 0.947, 0.984, and 0.959, respectively, which are 43.7%, 25.2%, 14.5%, and 35.3% higher than those of the XGBoost single model.

[0224] From RMSE and R 2 It can be seen from the values ​​that the XGBoost-SVR combined model has a higher prediction accuracy for the instantaneous emissions of four pollutants: CO, NOx, HC, and PN.

[0225] The gasoline vehicle emission prediction device based on the XGBoost-SVR combination model described below and the gasoline vehicle emission prediction method based on the XGBoost-SVR combination model described above can be referenced to each other.

[0226] Please see attached Figure 7 The present invention also provides a gasoline vehicle emission prediction device based on the XGBoost-SVR combined model, comprising:

[0227] The data acquisition module 100 is used to collect the instantaneous emission data of four pollutants, namely, CO, NOx, HC and PN, and the vehicle driving parameters of the gasoline vehicle;

[0228] The timing calibration module 200 is used to perform timing calibration on the collected data;

[0229] The data processing module 300 is used to perform singular spectrum analysis on the pollutant emission data, extract effective trend information, and remove useless noise;

[0230] A model building module 400 is used to build an XGBoost model to predict instantaneous pollutant emissions;

[0231] A residual correction module 500, used to correct the prediction residual by using the SVR model;

[0232] The prediction output module 600 is used to output the final pollutant emission prediction result.

[0233] The device of this embodiment can be used to execute the above method embodiment, and its principles and technical effects are similar, which will not be repeated here.

[0234] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A gasoline vehicle emission prediction method based on the XGBoost-SVR combined model, characterized in that: The following steps are involved: The portable emission measurement system was installed on a gasoline vehicle to conduct an actual road driving test, collect the instantaneous emission data of four pollutants, CO, NOx, HC, and PN, and vehicle driving parameters, and perform time series calibration processing; Using singular spectrum analysis to decompose and reconstruct the pollutant emission data, extract effective trend information, and eliminate useless noise; Divide the processed pollutant emission data and vehicle driving parameters into a training set, a validation set and a test set; An XGBoost model was established to predict the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by inputting vehicle driving parameters; Calculate the residual between the predicted value and the actual value based on the validation set; The SVR model is used to correct the residual to obtain the final pollutant emission prediction value.

2. According to claim 1, a gasoline vehicle emission prediction method based on the XGBoost-SVR combined model is characterized in that: The step of collecting instantaneous emission data of four pollutants, CO, NOx, HC, and PN, and vehicle driving parameters of gasoline vehicles includes: Installing a portable emission measurement system on a gasoline vehicle, the system includes a gas analyzer, an exhaust gas flow meter, and an on-board diagnostic system; Conduct actual road driving tests in accordance with the Type II test specifications of the National VI Standard, and continuously record pollutant emission data and vehicle driving parameters during the test; The collected pollutant emission data include the instantaneous emission concentrations of four pollutants: CO, NOx, HC, and PN. The vehicle driving parameters include vehicle speed, engine speed, exhaust temperature, exhaust flow, load percentage, and fuel consumption rate.

3. According to claim 1, a gasoline vehicle emission prediction method based on the XGBoost-SVR combined model is characterized in that: The steps of the timing calibration process include: The gas analyzer and exhaust gas flow meter are calibrated by the consistency of the peak and valley values ​​of CO emission concentration and exhaust flow; The on-board diagnostic system data is aligned with the gas analyzer using vehicle speed and CO emission concentration; GPS data and weather station data are synchronized with the on-board diagnostics system via vehicle speed.

4. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The step of decomposing and reconstructing the pollutant emission data by using singular spectrum analysis comprises: Assume that the pollutant emission data is a time series {x1,x2,...x N }, and construct it into a trajectory matrix x. The dimension of the trajectory matrix is ​​determined by the window length L and the sequence length K = N-L+1. The trajectory matrix X is expressed as: Among them, L is the sliding window length, L <N / 2; Calculate the covariance matrix S of the trajectory matrix X, defined as S = XX T The covariance matrix S is used to represent the relationship between different segments of the time series; Perform eigenvalue decomposition on the covariance matrix S to obtain eigenvalues ​​λ1,λ2,…λ L and its corresponding eigenvectors U1,U2,…U L , the eigenvalues ​​are arranged in descending order: λ1>λ2>λ3>…>λ L ≥0 Select the first p main components for data reconstruction, and the reconstructed trajectory matrix X p It is expressed as: The reconstructed trajectory matrix X p Transformed into a reconstructed time series by diagonal averaging in It is expressed as: Among them, L * =min(L,K),K * =max(L,K); The main trend information of the original data is retained, and useless noise is eliminated to generate an optimized data sequence for subsequent modeling and prediction.

5. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The step of dividing the processed pollutant emission data and vehicle driving parameters into a training set, a validation set and a test set comprises: The pollutant emission data processed by singular spectrum analysis and vehicle driving parameters are collated to generate a characteristic data set; The dataset is divided into training set, validation set and test set in a ratio of 3:1:

1.

6. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The steps of establishing the XGBoost model and predicting the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by inputting vehicle driving parameters include: Construct the input feature matrix X=x1,x2,…,x m , the pollutant emissions are taken as output y=y1,y2,…,y n ; Use the XGBoost model, which consists of multiple regression trees and its prediction formula is: Among them, K is the number of regression trees, f k (x i ) represents the kth regression tree for sample x i The predicted value of Define the objective function of the XGBoost model, which includes the loss function and the regularization term: Among them, Ω(f k ) is the regularization term, and its expression is: Where T is the number of leaf nodes, ω j is the weight of the jth leaf node; Perform Taylor second-order expansion on the objective function and obtain the iterative update formula: Among them, g i With h i are the first and second derivatives of the objective function, respectively. is a constant term; Substituting the regularization term expression into the objective function, we get the expression: By optimizing the weights of leaf nodes, the formula for updating weights is: The optimal objective function is: Among them, I J Represents the sample set of leaf nodes; Optimize the model's hyperparameters, including the number of decision trees, learning rate, and maximum tree depth, through grid search combined with cross-validation; The XGBoost model is trained using the training set, and the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, are finally predicted to obtain preliminary prediction values.

7. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The step of calculating the residual between the predicted value and the actual value based on the validation set includes: Use the trained XGBoost model to train each feature vector x in the validation set. i Make a prediction and get the predicted value where y i is the actual value; The residual e for each sample is calculated using the following formula i : The residuals are calculated for all samples in the validation set to generate a residual sequence that reflects the deviation between the predicted values ​​of the XGBoost model and the actual values.

8. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The step of using the support vector regression model to correct the residual to obtain the final pollutant emission prediction value includes: The residual sequence calculated from the validation set is used as the target variable of the support vector regression model, and the corresponding vehicle driving parameters are used as input features; Construct a support vector regression model, use the kernel function for nonlinear mapping, and select the radial basis kernel function; The preliminary prediction values ​​of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model and the prediction values ​​of the residuals by the SVR model are added together to obtain the final prediction results of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost-SVR combined model, which are as follows: in, is the preliminary prediction value of the instantaneous emissions of four pollutants, CO, NOx, HC, and PN, by the XGBoost model. is the predicted value of the residual by the SVR model.

9. The gasoline vehicle emission prediction method based on the XGBoost-SVR combined model according to claim 1 is characterized in that: The method also includes: using normalized root mean square error and determination coefficient to evaluate the method of the XGBoost-SVR combination model in a test set.

10. A gasoline vehicle emission prediction device based on an XGBoost-SVR combined model, used to implement the method according to any one of claims 1 to 9, characterized in that: include: Data acquisition module, used to collect instantaneous emission data of four pollutants, CO, NOx, HC, and PN, and vehicle driving parameters of gasoline vehicles; A timing calibration module is used to perform timing calibration on the collected data; Data processing module, used to perform singular spectrum analysis on pollutant emission data, extract effective trend information, and eliminate useless noise; Model building module, used to build XGBoost model to predict instantaneous pollutant emissions; The residual correction module is used to correct the prediction residual through the SVR model; The prediction output module is used to output the final pollutant emission prediction results.

Citation Information

Cited By

  • Hybrid electric vehicle NHemission prediction method based on TCN + Feam + Transform

    CN120337411A

  • Heavy diesel vehicle emission degradation prediction system and method

    CN120596822A

  • A heavy-duty diesel vehicle emission degradation prediction system and method

    CN120596822B