CN113642783B - Training method and device of power load prediction model and electronic equipment - Google Patents

Training method and device of power load prediction model and electronic equipment Download PDF

Info

Publication number
CN113642783B
CN113642783B CN202110846664.XA CN202110846664A CN113642783B CN 113642783 B CN113642783 B CN 113642783B CN 202110846664 A CN202110846664 A CN 202110846664A CN 113642783 B CN113642783 B CN 113642783B
Authority
CN
China
Prior art keywords
data
frequency domain
features
power load
training
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
CN202110846664.XA
Other languages
Chinese (zh)
Other versions
CN113642783A (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.)
Shenzhen Electric Energy Technology Group Co ltd
Original Assignee
Shenzhen Electric Energy Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Electric Energy Technology Group Co ltd filed Critical Shenzhen Electric Energy Technology Group Co ltd
Priority to CN202110846664.XA priority Critical patent/CN113642783B/en
Publication of CN113642783A publication Critical patent/CN113642783A/en
Application granted granted Critical
Publication of CN113642783B publication Critical patent/CN113642783B/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • 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/06Energy or water supply

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Tourism & Hospitality (AREA)
  • General Engineering & Computer Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Development Economics (AREA)
  • Public Health (AREA)
  • Water Supply & Treatment (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Supply And Distribution Of Alternating Current (AREA)

Abstract

The application belongs to the field of electric power, and provides a training method and a device of a power load prediction model and electronic equipment, wherein the method comprises the following steps: performing time-frequency transformation on historical data of the power load, screening frequency domain characteristics obtained by transformation, and determining effective characteristics in the historical data according to the screened frequency domain characteristics; obtaining an orthogonal component of a span subspace of a feature to be added and a selected feature, calculating a correlation coefficient of a fitting residual error of the orthogonal component and the selected feature, and determining whether the current feature to be added is selected or not according to the correlation coefficient; and taking the selected characteristics after the updating as training samples to train the power load prediction model. Effective characteristics in the historical data can be effectively screened through conversion, the redundant characteristics can be eliminated while the useful characteristics can be selected through the correlation coefficient, the prediction model is effectively simplified, the overfitting probability is reduced, and the prediction precision is improved.

Description

Training method and device of power load prediction model and electronic equipment
Technical Field
The application belongs to the field of electric power, and particularly relates to a training method and device of a power load prediction model and electronic equipment.
Background
The power system load prediction refers to that under the condition of fully considering some important system operation characteristics, capacity increase decision, natural conditions and social influence, a set of mathematical method for systematically processing past and future loads is researched or utilized, and under the meaning of meeting certain precision requirements, the load value at a specific future moment is determined. The method has the advantages of accurately predicting the load of the power system, facilitating the planned power utilization management, reasonably arranging the operation mode of a power grid and the maintenance plan of a unit, saving coal and oil, reducing the power generation cost, making a reasonable power supply construction plan and improving the economic benefit and the social benefit of the power system. For the power selling company, the power selling company is favorable for determining own medium and long term contract signing strategies, spot market quotation and trading strategies, economic measurement and calculation of a single user and other behaviors. Therefore, load prediction of the power system has become one of important contents for realizing modernization of power system management and transformation of the power selling company to the spot market.
The current power load prediction work is usually directed at a large area, and data noise caused by random factors of each user tends to cancel each other out after accumulation, for example, after accumulation of multiple independent and identically distributed normal random changes, the increase of a standard deviation is only in direct proportion to the square root of a mean value. The random factor, namely the proportion of data noise, gradually decreases with the increase of the area, and the predictability is correspondingly enhanced.
However, compared with the regional prediction, the prediction of a short time window of a small number of users or a single user is not cancelled out due to data noise of random factors, and the prediction difficulty is obviously improved. In addition, the historical load data, meteorological conditions and other related data have complex unpredictable factors, and a complex prediction model is easily influenced by noise caused by the unpredictable factors, so that an overfitting phenomenon is generated, namely although training data can be well fitted, effective data cannot be accurately distinguished due to excessive noise information contained in model parameters, and the prediction accuracy of the model is not improved.
Disclosure of Invention
In view of this, embodiments of the present application provide a training method and apparatus for a power load prediction model, and a power device, so as to solve the problems in the prior art that prediction of a small number of or a single user in a short time window is difficult, and it is not beneficial to improve the prediction accuracy of the model.
A first aspect of an embodiment of the present application provides a method for training a power load prediction model, where the method includes:
performing time-frequency transformation on historical data of the power load, screening frequency domain characteristics obtained by transformation, and determining effective characteristics in the historical data according to the screened frequency domain characteristics;
determining selected features and features to be added in the effective features, acquiring orthogonal components of the features to be added and the span subspace of the selected features, calculating correlation coefficients of fitting residuals of the orthogonal components and the selected features, determining whether the current features to be added are selected according to the correlation coefficients, and updating the selected features;
and taking the selected characteristics after the updating as training samples to train the power load prediction model.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the training of the power load prediction model by using the updated selected features as training samples includes:
taking the updated selected features as training data, and determining a penalty factor in a target function of the support vector regression model according to the Markov distance between the data used in prediction and the training data;
and training the determined support vector regression model according to the training data.
With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, determining a penalty factor in an objective function of a support vector regression model according to a mahalanobis distance between data used in prediction and training data includes:
according to the formula:
Figure GDA0003498938830000021
or
Figure GDA0003498938830000022
Determining the penalty factor, wherein CiAs a penalty factor, diMahalanobis distance, d, of the data used in the prediction from the ith training dataminMu is determined according to the deviation of the prediction result from the actual data, for example, the value of mu can be adjusted according to the deviation of the prediction result from the actual data,and comparing the deviation of the prediction result after multiple times of adjustment with the actual data, and determining the selected mu value when the deviation is minimum to calculate the penalty factor.
With reference to the first aspect, in a third possible implementation manner of the first aspect, performing time-frequency transformation on historical data of a power load, screening frequency domain features obtained through the transformation, and determining effective features in the historical data according to the screened frequency domain features includes:
performing time-frequency transformation processing according to the historical data of the power load to obtain frequency domain data;
determining significant ones of the frequency domain data;
and transforming the significant frequency domain data into time domain data to obtain effective characteristics in historical data.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, before performing time-frequency transform processing according to the historical data of the power load to obtain frequency-domain data, the method further includes:
trending the historical data of the power load;
after transforming the significant frequency domain data into time domain data, the method further comprises:
and performing trend processing on the transformed time domain data.
With reference to the third possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the determining significant frequency domain data in the frequency domain data includes:
and determining the frequency domain data with the numerical value larger than a preset frequency domain threshold value as significant frequency domain data, wherein the frequency domain threshold value is determined according to the mean value and the standard deviation of the frequency domain data.
With reference to the first aspect, in a sixth possible implementation manner of the first aspect, calculating a correlation coefficient of a fitting residual of the orthogonal component and the selected feature includes:
according to the formula:
Figure GDA0003498938830000031
determining a correlation coefficient of the orthogonal component with a fitting residual of the selected feature, wherein cov is a covariance calculation, Q is the orthogonal component, and Y is the fitting residual.
A second aspect of an embodiment of the present application provides a power load prediction method, including:
acquiring data to be predicted;
and inputting the data to be predicted into a power load prediction model trained by the training method of the power load prediction model in any one of the first aspect for prediction calculation to obtain a prediction result of the power load.
A third aspect of an embodiment of the present application provides a training apparatus for a power load prediction model, where the apparatus includes:
the effective characteristic screening unit is used for carrying out time-frequency transformation on the historical data of the power load, screening frequency domain characteristics obtained by transformation and determining effective characteristics in the historical data according to the screened frequency domain characteristics;
the feature selection unit is used for determining selected features and features to be added in the effective features, acquiring orthogonal components of the features to be added and the span subspaces of the selected features, calculating correlation coefficients of fitting residuals of the orthogonal components and the selected features, determining whether the current features to be added are selected according to the correlation coefficients, and updating the selected features;
and the training unit is used for taking the selected updated features as training samples to train the power load prediction model.
A fourth aspect of embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any one of the first aspect when executing the computer program.
A fifth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the steps of the method according to any one of the first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: according to the embodiment of the application, time-frequency conversion is carried out on historical data, effective characteristics in the historical data are screened, and data representation capacity is enhanced; and determining whether to select the current feature to be added or not based on the correlation coefficient of the feature to be added and the selected feature in the effective features, so that the redundant features are eliminated while the useful features are selected, the prediction model can be effectively simplified, the overfitting probability is reduced, and the prediction accuracy of the electronic load prediction model is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic implementation flow diagram of a training method of a power load prediction model according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an implementation of a historical data screening method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a training apparatus for a power load prediction model according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
In the conventional power load prediction work, a large area is often targeted, for example, prediction is performed for an area such as a city, an administrative county, and the like. Data noise due to random factors of each user tends to cancel each other out over a large area. For example, after a plurality of independently distributed normal random variables are accumulated, the standard deviation increases only in proportion to the square root of the mean value, the proportion of data noise generated by random factors decreases gradually with the increase of the area, and the predictability is increased gradually. For a small number of users or a single user, the data noise generated by the random factors cannot be offset, so that the prediction difficulty is high. For a short time window, such as 15 minutes of prediction, the prediction difficulty is further increased due to the influence of unpredictable random factors.
In addition, due to the existence of complex unpredictable factors in the historical load data, the meteorological conditions and other related data, a complex prediction model is easily influenced by data noise caused by the factors, and an overfitting phenomenon is easily generated, namely training data can be well fitted through the model, but the model parameters are excessive and contain noise information, so that the prediction of unknown actual data cannot be effectively popularized, and the accuracy of the prediction model is influenced.
In order to overcome the above defects, embodiments of the present application provide a training method for a power load prediction model, where the method trains the power load prediction model to perform power load prediction according to the trained model, so as to improve prediction accuracy. As shown in fig. 1, the method for training the power load prediction model includes:
in S101, time-frequency conversion is performed on the historical data of the power load, frequency domain features obtained by the conversion are screened, and effective features in the historical data are determined according to the screened frequency domain features.
The historical data of the power load is time domain data. The time domain refers to a coordinate system which describes the change of the signal along with time, and the time domain data refers to data which is presented along with the change of the time. The frequency domain is a coordinate system used to describe the characteristics of a signal in terms of frequency, and the frequency domain data refers to data that appears as the frequency changes.
The time-frequency transformation refers to transforming time-domain data into frequency-domain data. In time-frequency transformation, time domain data can be transformed into frequency domain data in a discrete Fourier transform mode.
The historical data may be historical power data collected for a predicted objective, including collected power data for a single user, or for two or more and fewer users, or collected power data for a time period. The power data may include power load data, meteorological data. Or may also include power plan data for the user, etc.
In order to better extract information from the historical data, the embodiment of the application can adopt a time-frequency combination mode to construct the characteristics, reflect the trend through the time-frequency characteristics, and reflect the periodicity through the frequency-domain characteristics, so that more effective information can be extracted from the historical data.
The historical data includes historical load data, historical meteorological data, user plan data, and the like. And the historical data power load is a fitting target, and data obtained by predicting the data to be predicted according to the trained model is a prediction target. The fitting objective or the prediction objective may be the total load of the next day, or the total load of a certain period, etc.
In this embodiment of the present application, when the historical data is filtered, as shown in fig. 2, the method includes:
in S201, the history data of the power load is subjected to a detrending process.
When the trend removing processing is performed on the historical data, the trend removing processing can be performed in a differential mode. That is, the trend of the time domain data is removed by calculating the difference between two adjacent data, for example, for any two adjacent data Zt and Zt-1, the characteristics of the two data can be represented by Zt-1. Alternatively, the trend features in the historical data can be removed by logarithmic calculation.
In S202, time-frequency transform processing is performed according to the historical data of the power load, and frequency domain data is obtained.
The historical data may be transformed into frequency domain data by means of a discrete fourier transform. For example, the formula of discrete fourier transform used may be:
Figure GDA0003498938830000071
Figure GDA0003498938830000072
wherein xn is a time domain sequence, Xk is a frequency domain sequence, N is the length of the used training data segment, and i is the ith feature in the historical data.
In S203, significant frequency domain data among the frequency domain data is determined.
After the frequency domain characteristics are obtained through time-frequency transformation, screening operation can be carried out according to the transformed frequency domain data, and the significant frequency domain data can be selected.
The significant frequency domain data refers to frequency domain characteristics that values in a frequency domain meet preset requirements after historical data are transformed to the frequency domain.
For example, in a possible way of determining the significant frequency domain data, the frequency domain data may be compared with a predetermined frequency domain threshold, and the significant frequency domain data may be determined according to the comparison result.
The frequency domain threshold may be determined from a mean and a standard deviation of the frequency domain data. The frequency domain threshold may be set to be a mean of the frequency domain data and a standard deviation of the frequency domain data of several times. For example, the frequency domain threshold may be the sum of the mean of the frequency domain data and the standard deviation of the 3 times frequency domain data.
In S204, the significant frequency domain data is transformed into time domain data, and the transformed time domain data is subjected to trend addition processing to obtain effective features in the historical data.
After the significant frequency domain data are determined through screening, the significant frequency domain data can be transformed into time domain data through an inverse Fourier transform mode. Trending the time domain data may be performed in a manner opposite to de-trending. For example, when the trend processing is performed by calculating the logarithm, the trend processing can be automatically performed by an index. When the trend processing is performed through the difference value of the adjacent data, the trend processing can be performed according to a mode that the difference value and the data are summed one by one.
For example, by the formula:
Figure GDA0003498938830000081
the significant frequency domain data is transformed into time domain data.
Or, in a possible implementation manner, the historical data may be directly transformed into frequency domain data, the frequency domain data is screened through a frequency domain threshold, and the screened significant frequency domain data is transformed into time domain data, so that the effective features in the historical data can be obtained.
The effective features described in the embodiments of the present application refer to features obtained by frequency domain screening.
In the embodiment of the application, in the time-frequency transformation, if the time interval from the predicted target time point to the last data point is nlagΔ t (where Δ t is the step size), then at the predicted target time point, the value reconstructed based on the frequency domain data should be
Figure GDA0003498938830000082
The time domain data value based on the single significant frequency domain data reconstruction is
Figure GDA0003498938830000083
Considering that the Fourier transform boundary is periodic, it should be first removed by differentiation (Zt-Zt-1) before transforming to the frequency domain. The invention adopts a least square mode to fit the trend, namely the form of the assumed trend is as follows:
x=at+b
where x is time domain data and t is time. By means of least squares, estimates of the coefficients can be derived
Figure GDA0003498938830000084
N is the length of the training data segment used, tnIs the nth time point.
In S102, a selected feature and a feature to be added in the valid features are determined, an orthogonal component of a spanning subspace of the feature to be added and the selected feature is obtained, a correlation coefficient of a fitting residual between the orthogonal component and the selected feature is calculated, whether a current feature to be added is selected or not is determined according to the correlation coefficient, and the selected feature is updated.
To avoid overfitting due to too many model parameters, the number of features must be controlled. The orthogonal component of the spanning subspace of the feature to be added and the existing feature can be obtained, and the feature selection is carried out by calculating the fitting residual error of the orthogonal component and the selected feature, so that the feature with strong correlation is filtered out at acceptable calculation cost on the premise of selecting the effective feature.
Wherein the selected feature and the feature to be added are both valid features. One or more than two effective features can be written as the selected features in advance, and then whether the features to be added are added to the selected features or not is determined through the correlation between the features to be added and the selected features, so that the selected features are updated and refined.
In the implementation process, the orthogonal component of the spanning subspace of the to-be-added feature and the selected feature may be first calculated, and then the correlation coefficient of the fitting residual between the orthogonal component and the selected feature is calculated, so as to determine whether to select the to-be-added feature to the selected feature according to the correlation coefficient. Thereby eliminating the influence of the correlation of the prediction effect among the features.
Let the fitting target be the column vector Y and all valid features be the matrix X. The number of columns in the matrix of valid features is the number of features Nfea. The predetermined correlation coefficient threshold is defined as rthres. The specific process of the feature selection method based on subspace correlation elimination may include:
1. and arranging the columns of the matrix X from large to small according to the correlation coefficient of the matrix X and the fitting target vector Y.
2. Let the fitting residual YresThe initial value of (a) is Y.
3. Processing each characteristic Xi according to 3.1-3.3 steps, wherein i is more than or equal to 1 and is less than or equal to Nfea
3.1 preprocessing Xi to remove the projection of Xi on the spanned subspace Q of the selected feature, i.e.
Figure GDA0003498938830000091
Wherein N isselFor the number of selected features, QjThe j-th orthogonal basis vector of the selected feature Q;
3.2 calculating YresAnd Xi resIs related toi
3.3 if ri≥rthres
3.3.1 selecting the characteristic Xi and letting Nsel=Nsel+1;
3.3.2 expanding the existing feature span space Q and adding orthogonal basis vectors
Figure GDA0003498938830000093
Figure GDA0003498938830000094
3.3.3 updating the fitting residual error, order
Figure GDA0003498938830000092
3.3.4 recording the correlation coefficient r of the selected feature Xi and the fitting residual error before selecting Xii(the actual representable feature Xi brings the information increment);
wherein two column vectors l are calculated1,l2The correlation coefficient is formulated as
Figure GDA0003498938830000101
4. And mapping the selected characteristic serial numbers to the characteristic serial numbers before sequencing according to the fitted target correlation coefficients.
In S103, the selected features after the updating are used as training samples to train the power load prediction model.
After the historical data are screened through the significance of the frequency domain features and the correlation among the features, invalid data can be removed, redundant data can be removed, and training data are simplified. The obtained training data can be input into models such as a neural network model or a support vector machine for training until the difference between the output of the models and the fitting target in the training data meets the preset requirement, so that the training of the models is completed.
In the embodiment of the application, a support vector regression model can be selected for predicting the power load, and the training data can be effectively fitted when the training data is relatively insufficient. When the model is trained, the regularization constant in the support vector regression machine can be weighted by adopting the optimization weight based on the Mahalanobis distance, so that training data similar to data near a predicted point can obtain a larger weight, and the data locality is enhanced.
The specific process may include:
assume that the feature matrix of the selected features is X (each column is a feature, and the ith column is denoted as X)iN columns in total, each row is one group of training observation data), and the objective function is a column vector Y (the ith term is denoted as Y)iThe actual load corresponding to each set of training observation data). A high-order feature space linear regression function can be established:
f(x)=<ω,φ(x)>+b
where ω is a set of constant coefficients, φ (X) is a nonlinear function that maps the feature matrix X into a high-dimensional space, and b is a constant coefficient.
Suppose the error bound is epsilon and introduce the relaxation factor xii
Figure GDA0003498938830000102
Penalty factor CiSolving the objective function as:
Figure GDA0003498938830000103
wherein the relaxation factor xii
Figure GDA0003498938830000104
Is composed of
Figure GDA0003498938830000105
Penalty factor CiTo balance model smoothness and tolerance to out-of-bounds training data, all training data in the conventional approach share the same penalty factor C. In practice, training data closer to the feature data used in prediction (current data) is often more critical and should have a greater impact. However, to avoid overfitting due to the addition of a large number of parameters, C in this methodiInstead of setting each training data individually, it may be determined by the distance of the selected feature data from the current data. CiThe functions that can be selected are:
Figure GDA0003498938830000111
or
Figure GDA0003498938830000112
The parameter μ is determined by the deviation of the prediction result from the actual data, for example, the value of μmay be adjusted according to the deviation of the prediction result from the actual data, the deviation of the prediction result from the actual data after multiple adjustments is compared, and the value of μ selected when the deviation is minimum is determined to perform the calculation of the penalty factor. diMahalanobis distance is used to reflect the effects of scaling and the relevance of the dimensions,
Figure GDA0003498938830000113
wherein S is a covariance matrix.
In order to solve the objective function, a Lagrangian function is introduced and converted into a dual form,
Figure GDA0003498938830000114
the limiting conditions are as follows:
Figure GDA0003498938830000115
setting the obtained optimal solution as
Figure GDA0003498938830000116
Then
Figure GDA0003498938830000117
Figure GDA0003498938830000121
Wherein, a*、b*、ω*To solve the resulting optimal solution, K (x)i,xj) Is the kernel function of the corresponding lagrange function of phi (x).
The prediction model to be finally obtained is,
f(x)=<ω*,φ(x)>+b*
and inputting the vector of the data to be predicted into the prediction model to obtain a corresponding load prediction result. For the prediction result, the abnormal point can be identified based on the normal assumption, and the repairing can be carried out by adopting a periodic prediction mode.
The application provides a time-frequency joint power load prediction method based on subspace correlation feature elimination and weighted SVR (support vector regression). The method adopts a time-frequency combination mode to construct the characteristics, thereby extracting effective characteristics in the data as much as possible and enhancing the representation capability. Meanwhile, calculating the orthogonal components of the stretched subspace of the to-be-added feature and the selected feature, carrying out feature selection through the correlation of the orthogonal components and the fitting residual error of the selected feature, eliminating redundant features while selecting useful features, simplifying a prediction model and avoiding overfitting. And fitting by adopting a support vector regression machine, and weighting by using an optimized weight based on the characteristic Mahalanobis distance, thereby further improving the precision of the prediction model. Therefore, the power load prediction model according to the embodiment of the present application can improve the prediction accuracy as much as possible under the condition that the influence of unpredictable random factors such as single user (or few users) and short prediction period (short time window) is large.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 is a schematic diagram of a training apparatus for a power load prediction model according to an embodiment of the present application, as shown in fig. 3, the apparatus includes:
an effective feature screening unit 301, configured to perform time-frequency transformation on historical data of the power load, screen frequency domain features obtained through the transformation, and determine effective features in the historical data according to the screened frequency domain features;
a feature selection unit 302, configured to determine a selected feature and a feature to be added in the valid features, obtain an orthogonal component of a spanning subspace of the feature to be added and the selected feature, calculate a correlation coefficient of a fitting residual between the orthogonal component and the selected feature, determine whether to select a current feature to be added according to the correlation coefficient, and update the selected feature;
and the training unit 303 is configured to train the power load prediction model by using the updated selected features as training samples.
The training device of the power load prediction model shown in fig. 3 corresponds to the training method of the power load prediction model shown in fig. 1.
Correspondingly, the embodiment of the present application further provides an electrical load prediction apparatus, including:
a data acquisition unit for acquiring data to be predicted;
and the prediction unit is used for inputting the data to be predicted into the power load prediction model trained by the training method of the power load prediction model shown in fig. 1 to perform prediction calculation, so as to obtain the prediction result of the power load.
Fig. 4 is a schematic diagram of an electronic device according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42, such as a power load prediction model training program or a power load prediction program, stored in the memory 41 and operable on the processor 40. The processor 40, when executing the computer program 42, implements the steps in each of the above described power load prediction model training methods or power load prediction method embodiments. Alternatively, the processor 40 implements the functions of the modules/units in the above-described device embodiments when executing the computer program 42.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the electronic device 4.
The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The electronic device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of an electronic device 4 and does not constitute a limitation of the electronic device 4 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the electronic device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or a memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used for storing the computer program and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer readable storage medium, and when the computer program is executed by a processor, the steps of the methods described above can be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; without making a corresponding change or substitution
The spirit and scope of the present disclosure should be construed as limited only by the appended claims.

Claims (10)

1. A method for training a power load prediction model, the method comprising:
for historical data of the power load, a discrete Fourier transform formula is adopted:
Figure FDA0003498938820000011
performing a time-frequency transformation, wherein xnIs a time domain sequence, XkThe method comprises the steps of obtaining a frequency domain characteristic through time-frequency transformation for a frequency domain sequence, wherein N is the length of a used training data segment, i is the ith characteristic in historical data, screening the frequency domain characteristic obtained through transformation, selecting obvious frequency domain data in the frequency domain characteristic, and determining effective characteristics in the historical data according to the screened frequency domain characteristic;
determining selected features and features to be added in the effective features, acquiring orthogonal components of the features to be added and the span subspace of the selected features, calculating correlation coefficients of fitting residuals of the orthogonal components and the selected features, determining whether the current features to be added are selected according to the correlation coefficients, and updating the selected features;
and taking the selected characteristics after the updating as training samples to train the power load prediction model.
2. The method according to claim 1, wherein the power load prediction model is a support vector regression model, and the training of the power load prediction model using the updated selected features as training samples comprises:
taking the updated selected features as training data, and determining a penalty factor in a target function of the support vector regression model according to the Markov distance between the data used in prediction and the training data;
and training the determined support vector regression model according to the training data.
3. The method of claim 2, wherein determining a penalty factor in an objective function of a support vector regression model based on mahalanobis distance of data used in prediction and training data comprises:
according to the formula:
Figure FDA0003498938820000012
or
Figure FDA0003498938820000013
Determining the penalty factor, wherein CiAs a penalty factor, diMahalanobis distance, d, of the data used in the prediction from the ith training dataminAnd determining mu as the minimum value of the Mahalanobis distance according to the deviation of the prediction result and the actual data.
4. The method of claim 1, wherein performing time-frequency transformation on historical data of the power load, screening frequency-domain features obtained by the transformation, and determining valid features in the historical data according to the screened frequency-domain features comprises:
performing time-frequency transformation processing according to the historical data of the power load to obtain frequency domain data;
determining significant ones of the frequency domain data;
and transforming the significant frequency domain data into time domain data to obtain effective characteristics in historical data.
5. The method of claim 4, wherein prior to performing a time-frequency transform process on the historical data of the electrical load to obtain frequency domain data, the method further comprises:
trending the historical data of the power load;
after transforming the significant frequency domain data into time domain data, the method further comprises:
and performing trend processing on the transformed time domain data.
6. The method of claim 4, wherein determining significant ones of the frequency domain data comprises:
and determining the frequency domain data with the numerical value larger than a preset frequency domain threshold value as significant frequency domain data, wherein the frequency domain threshold value is determined according to the mean value and the standard deviation of the frequency domain data.
7. The method of claim 1, wherein calculating the correlation coefficient of the fit residual of the orthogonal component to the selected feature comprises:
according to the formula:
Figure FDA0003498938820000021
determining correlation coefficients of the orthogonal components and the fitting residuals of the selected features, wherein cov is covariance calculation, X is the orthogonal components, and Y is the fitting residuals.
8. A method of predicting a power load, the method comprising:
acquiring data to be predicted;
inputting the data to be predicted into a power load prediction model trained by the power load prediction model training method according to any one of claims 1 to 7 to perform prediction calculation, so as to obtain a prediction result of the power load.
9. An apparatus for training a power load prediction model, the apparatus comprising:
the effective characteristic screening unit is used for screening the historical data of the power load by adopting a discrete Fourier transform formula:
Figure FDA0003498938820000031
performing a time-frequency transformation, wherein xnIs a time domain sequence, XkIs a frequency domain sequence, N is the length of the training data segment used, i is historyThe ith characteristic in the data is subjected to frequency domain characteristic obtaining through time-frequency transformation, the frequency domain characteristic obtained through transformation is screened, obvious frequency domain data in the frequency domain characteristic is selected, and effective characteristics in historical data are determined according to the screened frequency domain characteristic;
the feature selection unit is used for determining selected features and features to be added in the effective features, acquiring orthogonal components of the features to be added and the span subspaces of the selected features, calculating correlation coefficients of fitting residuals of the orthogonal components and the selected features, determining whether the current features to be added are selected according to the correlation coefficients, and updating the selected features;
and the training unit is used for taking the selected updated features as training samples to train the power load prediction model.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 8 are implemented when the computer program is executed by the processor.
CN202110846664.XA 2021-07-26 2021-07-26 Training method and device of power load prediction model and electronic equipment Active CN113642783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110846664.XA CN113642783B (en) 2021-07-26 2021-07-26 Training method and device of power load prediction model and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110846664.XA CN113642783B (en) 2021-07-26 2021-07-26 Training method and device of power load prediction model and electronic equipment

Publications (2)

Publication Number Publication Date
CN113642783A CN113642783A (en) 2021-11-12
CN113642783B true CN113642783B (en) 2022-04-05

Family

ID=78418480

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110846664.XA Active CN113642783B (en) 2021-07-26 2021-07-26 Training method and device of power load prediction model and electronic equipment

Country Status (1)

Country Link
CN (1) CN113642783B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115392594B (en) * 2022-10-27 2023-03-24 南方电网数字电网研究院有限公司 Electrical load model training method based on neural network and feature screening

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104333005B (en) * 2014-08-18 2016-04-13 西南交通大学 Based on frequency dynamic Forecasting Methodology after the Power System Disturbances of support vector regression
CN110009145B (en) * 2019-03-29 2021-04-02 山大地纬软件股份有限公司 Power load prediction method and device based on time-frequency transformation feature extraction and autoregressive trend prediction technology
CN111062512B (en) * 2019-11-14 2021-09-21 广东电网有限责任公司 Wind power prediction method

Also Published As

Publication number Publication date
CN113642783A (en) 2021-11-12

Similar Documents

Publication Publication Date Title
Wei et al. Daily natural gas consumption forecasting via the application of a novel hybrid model
CN109659933B (en) Electric energy quality prediction method for power distribution network with distributed power supply based on deep learning model
Catalão et al. Hybrid wavelet-PSO-ANFIS approach for short-term electricity prices forecasting
Singh et al. An efficient time series forecasting model based on fuzzy time series
Catalão et al. Short-term electricity prices forecasting in a competitive market by a hybrid intelligent approach
CN109636010B (en) Provincial power grid short-term load prediction method and system based on correlation factor matrix
CN113705929B (en) Spring festival holiday load prediction method based on load characteristic curve and typical characteristic value fusion
CN105678414A (en) Data processing method of predicting resource consumption
CN112257928A (en) Short-term power load probability prediction method based on CNN and quantile regression
CN113642783B (en) Training method and device of power load prediction model and electronic equipment
Liu et al. Adaptive wavelet transform model for time series data prediction
CN113962491A (en) Short-term combined prediction method and device for cooling, heating and power loads based on seasonal decomposition
Zhang et al. Load Prediction Based on Hybrid Model of VMD‐mRMR‐BPNN‐LSSVM
Wei et al. Short-term load forecasting using detrend singular spectrum fluctuation analysis
CN113177366A (en) Comprehensive energy system planning method and device and terminal equipment
CN116663746A (en) Power load prediction method and device, computer equipment and storage medium
CN113516275A (en) Power distribution network ultra-short term load prediction method and device and terminal equipment
CN101206727B (en) Data processing apparatus, data processing method
CN113657936A (en) Power load prediction method and terminal
Sun et al. Short-term power load prediction based on VMD-SG-LSTM
CN113592192A (en) Short-term power load prediction method and device and terminal equipment
CN113689068A (en) Electric power and electric quantity balance planning method and device and terminal equipment
CN112257958A (en) Power saturation load prediction method and device
CN113743650A (en) Power load prediction method, device, equipment and storage medium
CN112598181A (en) Load prediction method, device, equipment and storage medium

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