Carbon emission prediction method in urban and rural construction field based on PCA-BP neural network
Through the PCA-BP neural network model, dimensionality reduction and prediction of influencing factors in urban and rural construction fields is solved, and the problem of insufficient accuracy of carbon emission prediction in the existing technology is solved, and effective prediction of carbon emissions in urban and rural construction fields is achieved, so as to reach the peak of carbon The target provides data support.
Patent Information
- Application Number
- CN202410964024.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-12-17
AI Technical Summary
The existing technology has insufficient accuracy in carbon emission forecasting in the field of urban and rural construction, and the model parameters are highly subjective, making it difficult to effectively achieve the carbon peak goal.
The PCA-BP neural network model is adopted to reduce the dimensionality of influencing factors through principal component analysis, remove information redundancy, simplify the modeling process, and use BP neural network to predict carbon emissions.
It has achieved effective prediction of carbon emissions in the urban and rural construction field, avoided the problem of overfitting, and provided data support for regional carbon peak.
Smart Images

Figure CN119151025A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of carbon emission prediction, and in particular to a carbon emission prediction method in the field of urban and rural construction based on a PCA-BP neural network. Background Art
[0002] Since the Industrial Revolution, the excessive CO2 and other greenhouse gases emitted by humans into the atmosphere have caused the earth's temperature to continue to rise. In order to control the extent of global warming, countries around the world have taken relevant measures. According to relevant studies, in order to control the increase of 1.5℃, it is necessary to reduce CO2 emissions by 45% in 2030 compared with 2005. Therefore, my country made a commitment to the world on September 22, 2020: China's carbon dioxide emissions will strive to reach a peak before 2030, and strive to achieve carbon neutrality before 2060. The task of carbon reduction is arduous. According to relevant statistics, my country's carbon emissions mainly come from four fields: energy, industry, urban and rural construction, and transportation. Carbon emissions in the field of urban and rural construction account for 24% of the total carbon emissions in the whole society, of which direct carbon emissions account for 10% and indirect carbon emissions account for 14%.
[0003] To achieve the carbon peak target in the field of urban and rural construction before 2030 and control the total carbon emissions in the field of urban and rural construction, it is necessary to establish a scientific assessment and prediction of the current status of carbon emissions in the construction field and possible future changes. At present, there are many studies on the prediction of energy demand and total carbon emissions at the global or national scale, but there are relatively few studies on the prediction methods of carbon emissions and their peak control in the field of urban and rural construction. Therefore, it has become an urgent issue to establish a carbon emission prediction model based on the historical data of carbon emissions, predict the development trend of carbon emissions in the field of urban and rural construction, and analyze and study the peak of carbon emissions and the year of peaking.
[0004] At present, the prediction models for carbon emissions can be summarized into the following categories: the first category is the STIRPAT model; the second category is the machine learning model, mainly artificial neural network (ANN) and support vector machine regression (SVR); the third category is the gray prediction model GM; the fourth category is the bottom-up energy accounting model, mainly the LEAP model. Among them, the STIRPAT model is simple to calculate, but the accuracy is poor; the support vector machine is difficult to separate the real data; the gray prediction model cannot accurately reflect the association between the dependent variable and the independent variable; the parameters of the bottom-up energy accounting model are less subjective. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method for predicting carbon emissions in the field of urban and rural construction based on a PCA-BP neural network model. The method first performs principal component analysis on the influencing factors, removes information redundancy, eliminates the correlation between variables, simplifies the modeling process, and then uses the principal components extracted by PCA as the input of the BP neural network to establish a PCA-BP prediction model to achieve the prediction of carbon emissions in the field of urban and rural construction.
[0006] The present invention provides a method for predicting carbon emissions in the field of urban and rural construction based on a PCA-BP neural network, comprising the following steps:
[0007] Step 10: Obtain energy consumption data in the urban and rural construction field during the period of q from the statistical yearbook, calculate carbon emissions, and obtain the actual value of carbon emissions for each year;
[0008] Step 20, identifying n influencing factors of carbon emissions in the field of urban and rural construction and obtaining statistical data for q years, wherein the influencing factors include: permanent population, population density, urbanization rate, per capita GDP, energy consumption per 10,000 yuan of GDP, proportion of tertiary industry, green coverage rate of built-up areas, and completed building area of houses;
[0009] Step 30, reduce the dimension of the statistical data of n influencing factors of carbon emissions in the field of urban and rural construction during the period of q, and determine the first p principal components corresponding to the cumulative variance contribution rate being greater than the specified value;
[0010] Step 40: Generate a training set and a test set based on the initial data, the determined p principal components, and the calculated actual carbon emission value; use the training set to train the BP neural network model, adjust the network weights and thresholds of the error function, and obtain a trained BP neural network model; input the test set into the trained BP neural network model to obtain a carbon emission prediction value. If the error between the carbon emission prediction value and the actual carbon emission value is within a specified range, the BP neural network model training is completed;
[0011] Step 50: Obtain prediction indicators of n influencing factors from the development plan of the area to be predicted, input them into the trained BP neural network model, and obtain the carbon emission trend prediction results in the field of urban and rural construction in the area to be predicted.
[0012] Furthermore, the formula for calculating carbon emissions in step 10 is as follows:
[0013]
[0014] Among them, A i is the consumption of the i-th energy, including liquefied petroleum gas, natural gas, coal, electricity, and steam; EF i is the carbon emission factor of the i-th energy source.
[0015] Furthermore, the step 30 specifically includes:
[0016] Step 31: The data of n influencing factors of carbon emissions in urban and rural construction in the period of q nq Constitute an n×q matrix, that is:
[0017]
[0018] Step 32: Perform center normalization on the matrix to generate a standard matrix:
[0019]
[0020] Where i = 1, 2, ..., n; j = 1, 2, ..., q; s j They are indicator variables x j The mean and variance of
[0021] Step 33: Establish the correlation matrix R and calculate the eigenvalues and eigenvectors:
[0022] R=X *T X * / (n-1)
[0023] Among them, X * is the standardized data matrix, T is the matrix transpose; the eigenvalues of the autocorrelation matrix R are obtained as λ1≥λ2≥…≥λ q and the corresponding eigenvectors μ1,μ 2... ,μ q ;
[0024] Step 34, select the first p principal components corresponding to the cumulative variance contribution rate being greater than the specified percentage; the calculation formula for the variance contribution rate is:
[0025]
[0026] The calculation formula for the cumulative variance contribution rate is:
[0027]
[0028] Step 35: The eigenvectors corresponding to the p principal components are Then the principal component matrix of n samples is:
[0029]
[0030] in, is a sample of the standardized data matrix.
[0031] Furthermore, the step 40 specifically includes:
[0032] Step 41: normalize the actual value of carbon emissions calculated in step 10 as the output of the BP neural network model, reduce the dimension of the initial data according to the p principal components determined in step 30 as the input of the BP neural network model, and divide the data into training sets and test sets according to the specified ratio;
[0033] Step 42: train the BP neural network model using the training set to obtain a trained neural BP neural network model: the model initially has 4 input layer neurons, 2 hidden layer neurons, and 1 output layer neuron;
[0034] The connection weights ω between the input layer, hidden layer, and output layer ij ,ω jk , the hidden layer threshold a, threshold b are initialized, and the learning rate and neuron activation function are given;
[0035] Calculate the hidden layer output:
[0036]
[0037] Among them, f is the hidden layer activation function, l is the number of hidden layer nodes;
[0038] According to the hidden layer output H j , connection weight ω jk And threshold b, calculate the predicted output:
[0039]
[0040] Among them, m is the number of hidden layers to output layers; the root mean square error between the predicted value and the actual value of carbon emissions is:
[0041]
[0042] According to the gradient descent strategy, the BP neural network adjusts the parameters in the negative gradient direction of the objective function. k , given a learning rate η, for weight ω ij ,ω jk Make adjustments and continue to iterate until the error is within the target value and the training ends;
[0043] Step 43, input the test set into the trained BP neural network to obtain the predicted value. If the error between the predicted value and the actual value is within the specified range, the accuracy of the established model meets the requirements; if the error does not meet the requirements, return to step 42 to adjust the number of neurons or adjust the neuron excitation function to rebuild the model for training.
[0044] Further, the specified range of the error is 5%.
[0045] The present invention has the following advantages:
[0046] Principal component analysis is used to reduce the dimension of eight influencing factors, including permanent population, population density, urbanization rate, per capita GDP, energy consumption per 10,000 yuan of GDP, proportion of tertiary industry, green coverage rate of built-up areas, and completed housing area. This can avoid overfitting problems while using BP neural network to perform prediction tasks, effectively predict carbon emissions in the field of regional urban and rural construction, and provide data support for the implementation path of carbon peak in the field of regional urban and rural construction. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0048] Figure 1 is an execution flow chart of the method in an embodiment of the present invention;
[0049] Figure 2 Schematic diagram of the working principle of the BP neural network in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The embodiment of the present invention provides a method for predicting carbon emissions in the field of urban and rural construction based on a PCA-BP neural network model. The method first performs principal component analysis on the influencing factors, removes information redundancy, eliminates the correlation between variables, simplifies the modeling process, and then uses the principal components extracted by PCA as the input of the BP neural network to establish a PCA-BP prediction model to achieve the prediction of carbon emissions in the field of urban and rural construction.
[0051] The technical solution in the embodiment of the present invention has the following general idea:
[0052] With the gradual improvement of computer hardware computing power and the development of deep learning technology, the accuracy and efficiency of carbon emission prediction using BP neural network are getting higher and higher, and the model architecture is simple. However, since carbon emission prediction in the field of urban and rural construction involves many influencing factors, if multiple influencing factors are directly applied to BP neural network, it is easy to cause overfitting and other problems. In order to solve the problem of overfitting, the present invention proposes a carbon emission prediction method in the field of urban and rural construction based on PCA-BP neural network, which first performs principal component analysis (PCA) on the influencing factors, removes information redundancy, eliminates the correlation between variables, and simplifies the modeling process. Then the principal components extracted by PCA are used as the input of BP neural network to establish PCA-BP prediction model.
[0053] Embodiment 1
[0054] This embodiment provides a method for predicting carbon emissions in the field of urban and rural construction based on PCA-BP neural network. Figure 1 As shown, the following steps may be included:
[0055] S10. Carbon emission calculation: Obtain energy consumption data in the urban and rural construction field in the period of q from the statistical yearbook, calculate carbon emissions, and obtain the actual value of carbon emissions for each year. The calculation formula is as follows:
[0056]
[0057] Among them, A i is the consumption of the i-th energy, including liquefied petroleum gas, natural gas, coal, electricity, and steam; EF i is the carbon emission factor of the i-th energy source.
[0058] S20. Identification of influencing factors: Identify n influencing factors of carbon emissions in urban and rural construction and obtain statistical data over q years. The identified influencing factors should at least include: permanent population, population density, urbanization rate, per capita GDP, energy consumption per 10,000 yuan of GDP, proportion of the tertiary industry, green coverage rate of built-up areas, and completed housing area.
[0059] S30, principal component analysis dimensionality reduction: Dimensionality reduction is performed on the statistical data of n influencing factors of carbon emissions in the field of urban and rural construction over the period of q years, and the corresponding first p principal components are determined when the cumulative variance contribution rate is greater than the specified value; specifically, the following steps are included:
[0060] S31. The data of n influencing factors of carbon emissions in urban and rural construction in q years x nq Constitute an n×q matrix, that is:
[0061]
[0062] S32, perform center normalization on the matrix to generate a standard matrix:
[0063]
[0064] Where i = 1, 2, ..., n; j = 1, 2, ..., q; s j They are indicator variables x j The mean and variance of
[0065] S33. Establish the correlation matrix R and calculate the eigenvalues and eigenvectors:
[0066] R=X *T X * / (n-1)(4)
[0067] Among them, X * is the standardized data matrix, T is the matrix transpose; the eigenvalues of the autocorrelation matrix R are obtained as λ1≥λ2≥…≥λ q and the corresponding eigenvectors μ1,μ 2… ,μq ;
[0068] S34, select the first p principal components corresponding to the cumulative variance contribution rate being greater than the specified percentage; the calculation formula for the variance contribution rate is:
[0069]
[0070] The calculation formula for the cumulative variance contribution rate is:
[0071]
[0072] In this embodiment, the specified percentage is 90%, that is, when the cumulative variance contribution rate is greater than 90%, four principal components are obtained.
[0073] S35, the eigenvector corresponding to the p principal components is U qp =[μ1,μ 2... ,μ p ], then the principal component matrix of n samples is:
[0074]
[0075] in, is a sample of the standardized data matrix.
[0076] S40, training and testing the BP neural network model: generating a training set and a test set based on the initial data (i.e., obtaining energy consumption data in the field of urban and rural construction in the period of q from the statistical yearbook), the determined p principal components, and the calculated actual carbon emission values; training the BP neural network model using the training set, adjusting the network weights and thresholds of the error function, and obtaining a trained BP neural network model; inputting the test set into the trained BP neural network model to obtain a predicted carbon emission value, and if the error between the predicted carbon emission value and the actual carbon emission value is within a specified range, the BP neural network model training is completed;
[0077] S41, normalizing the actual value of carbon emissions calculated by S10 as the output of the BP neural network model, reducing the dimensions of the initial data according to the p principal components determined by S30 as the input of the BP neural network model, and dividing the data into a training set and a test set in a ratio of 7:3;
[0078] S42, using the training set Figure 2 The BP neural network model shown in the figure is trained to obtain a trained neural BP neural network model: the initial input layer neurons of the model are 4, the hidden layer neurons are 2, and the output layer neuron is 1;
[0079] The connection weights ω between the input layer, hidden layer, and output layer ij ,ω jk, the hidden layer threshold a, threshold b are initialized, and the learning rate and neuron activation function are given;
[0080] Calculate the hidden layer output:
[0081]
[0082] Among them, f is the hidden layer activation function, l is the number of hidden layer nodes;
[0083] According to the hidden layer output H j , connection weight ω jk And threshold b, calculate the predicted output:
[0084]
[0085] Among them, m is the number of hidden layers to output layers; the root mean square error between the predicted value and the actual value of carbon emissions is:
[0086]
[0087] According to the gradient descent strategy, the BP neural network adjusts the parameters in the negative gradient direction of the objective function. k , given a learning rate η, for weight ω ij ,ω jk Adjust and iterate continuously until the error is within the target value (for example, 0.0001), and the training ends;
[0088] S43, input the test set into the trained BP neural network to obtain the predicted value. If the error between the predicted value and the actual value is within the specified range (for example, 5%), the accuracy of the established model meets the requirements; if the error does not meet the requirements, return to S42 to adjust the number of neurons or adjust the neuron excitation function to rebuild the model for training.
[0089] S50. Predicting carbon emission trends: Obtain prediction indicators of n influencing factors from the development plan of the area to be predicted, input them into the trained BP neural network model, and obtain the prediction results of carbon emission trends in the urban and rural construction field of the area to be predicted.
[0090] The present invention uses principal component analysis to reduce the dimension of eight influencing factors, including permanent population, population density, urbanization rate, per capita GDP, energy consumption per 10,000 yuan of GDP, proportion of the tertiary industry, green coverage rate of built-up areas, and completed building area of houses, so as to avoid overfitting problems while using the BP neural network to perform prediction tasks. It can realize effective prediction of carbon emissions in the field of regional urban and rural construction and provide data support for the implementation path of carbon peak in the field of regional urban and rural construction.
[0091] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for predicting carbon emissions in urban and rural construction based on PCA-BP neural network, characterized in that: The steps include: Step 10: Obtain energy consumption data in the urban and rural construction field during the period of q from the statistical yearbook, calculate carbon emissions, and obtain the actual value of carbon emissions for each year; Step 20, identifying n influencing factors of carbon emissions in the field of urban and rural construction and obtaining statistical data for q years, wherein the influencing factors include: permanent population, population density, urbanization rate, per capita GDP, energy consumption per 10,000 yuan of GDP, proportion of tertiary industry, green coverage rate of built-up areas, and completed building area of houses; Step 30, reduce the dimension of the statistical data of n influencing factors of carbon emissions in the field of urban and rural construction during the period of q, and determine the first p principal components corresponding to the cumulative variance contribution rate being greater than a specified value; Step 40: Generate a training set and a test set based on the initial data, the determined p principal components, and the calculated actual carbon emission value; use the training set to train the BP neural network model, adjust the network weights and thresholds of the error function, and obtain a trained BP neural network model; input the test set into the trained BP neural network model to obtain a carbon emission prediction value. If the error between the carbon emission prediction value and the actual carbon emission value is within a specified range, the BP neural network model training is completed; Step 50: Obtain prediction indicators of n influencing factors from the development plan of the area to be predicted, input them into the trained BP neural network model, and obtain the carbon emission trend prediction results in the field of urban and rural construction in the area to be predicted.
2. The method according to claim 1, characterized in that The formula for calculating carbon emissions in step 10 is as follows: Among them, A i is the consumption of the i-th energy, including liquefied petroleum gas, natural gas, coal, electricity, and steam; EF i is the carbon emission factor of the i-th energy source.
3. The method according to claim 1, characterized in that The step 30 specifically includes: Step 31: The data of n influencing factors of carbon emissions in urban and rural construction in the period of q nq Constitute an n×q matrix, that is: Step 32: Perform center normalization on the matrix to generate a standard matrix: Where i = 1, 2, ..., n; j = 1, 2, ..., q; s j They are indicator variables x j The mean and variance of Step 33: Establish the correlation matrix R and calculate the eigenvalues and eigenvectors: R=X *T X * / (n-1) Among them, X * is the standardized data matrix, T is the matrix transpose; the eigenvalues of the autocorrelation matrix R are obtained as λ1≥λ2≥…≥λ q and the corresponding eigenvectors μ1,μ2...,μ q ; Step 34, select the first p principal components corresponding to the cumulative variance contribution rate being greater than the specified percentage; the calculation formula for the variance contribution rate is: The calculation formula for the cumulative variance contribution rate is: Step 35: The eigenvectors corresponding to the p principal components are Then the principal component matrix of n samples is: in, is a sample of the standardized data matrix.
4. The method according to claim 1, characterized in that: The step 40 specifically includes: Step 41: normalize the actual value of carbon emissions calculated in step 10 as the output of the BP neural network model, reduce the dimension of the initial data according to the p principal components determined in step 30 as the input of the BP neural network model, and divide the data into training sets and test sets according to the specified ratio; Step 42: train the BP neural network model using the training set to obtain a trained neural BP neural network model: the model initially has 4 input layer neurons, 2 hidden layer neurons, and 1 output layer neuron; The connection weights ω between the input layer, hidden layer, and output layer ij ,ω jk , the hidden layer threshold a, threshold b are initialized, and the learning rate and neuron activation function are given; Calculate the hidden layer output: Among them, f is the hidden layer activation function, l is the number of hidden layer nodes; According to the hidden layer output H j , connection weight ω jk And threshold b, calculate the predicted output: Among them, m is the number of hidden layers to output layers; the root mean square error between the predicted value and the actual value of carbon emissions is: According to the gradient descent strategy, the BP neural network adjusts the parameters in the negative gradient direction of the objective function. k , given a learning rate η, for weight ω ij ,ω jk Make adjustments and continue to iterate until the error is within the target value and the training ends; Step 43, input the test set into the trained BP neural network to obtain the predicted value. If the error between the predicted value and the actual value is within the specified range, the accuracy of the established model meets the requirements; if the error does not meet the requirements, return to step 42 to adjust the number of neurons or adjust the neuron excitation function to rebuild the model for training.
5. The method according to claim 1, characterized in that: The specified range of error is 5%.
Citation Information
Cited By
Method for predicting carbon emission of atrium shopping mall based on BP (Back Propagation) neural network
CN119904248A
