Photovoltaic-assisted multi-energy power supply method and system based on machine learning
By dividing and reconstructing historical power load data and predicting photovoltaic power generation values in integrated machine learning models, the problems of insufficient prediction accuracy and low timeliness of multi-energy complementary systems in the existing technology are solved, and efficient photovoltaic participation in multi-energy power supply scheduling is achieved.
Patent Information
- Application Number
- CN202411444889.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-10-16
AI Technical Summary
The existing multi-energy complementary systems have insufficient prediction accuracy and low timeliness in terms of power consumption load and power generation prediction, and lack scheduling optimization for collaborative power generation.
Using a multi-energy photovoltaic power supply method based on machine learning, the high-frequency part of the information is extracted to predict the short-term power load, and the integrated machine learning model is used to predict the photovoltaic power generation value, combined with the power supply plan to optimize the objective function and its constraints, to achieve coordinated scheduling.
It improves the accuracy and accuracy of power load and photovoltaic power generation prediction, improves the scheduling efficiency of multi-energy power supply, and ensures the stability of photovoltaic participation in multi-energy power supply.
Smart Images

Figure CN119341084B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent energy supply technology, and in particular relates to a photovoltaic multi-energy power supply method and system based on machine learning. Background Art
[0002] The realization of the dual carbon goals requires continuous innovation and progress in new energy technologies. With the development of new energy power generation technology, it can effectively further promote the transformation and upgrading of the energy structure. However, due to its intermittent and volatile problems, photovoltaic power generation is difficult to match with electricity demand in real time. There is a large amount of abandoned light in energy development and utilization, which has hindered the development of renewable energy such as photovoltaics. Multi-energy complementarity is a reliable way to improve the utilization rate of renewable energy. It can alleviate the contradiction between energy supply and demand by utilizing the complementary characteristics of different energy resources in energy.
[0003] The key to multi-energy complementarity is to accurately predict the power load and renewable energy generation, so as to help the dispatch center to timely understand the time-varying behavior of power users and renewable energy generation systems. However, the existing multi-energy complementarity system still has the shortcomings of prediction accuracy and accuracy in power load and power generation prediction, low prediction timeliness, and lack of dispatch optimization for coordinated power generation. Summary of the invention
[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a photovoltaic participation in multi-energy power supply method and system based on machine learning, which solves the problem of insufficient scheduling efficiency of photovoltaic participation in multi-energy power supply.
[0005] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0006] On the one hand, the present invention provides a photovoltaic multi-energy power supply method based on machine learning, comprising the following steps:
[0007] S1. Obtain historical power load data;
[0008] S2, dividing the historical power load data into components, and reconstructing the component division results to obtain the decomposition results of the power load time series data;
[0009] S3, according to the decomposition results of the power load time series data, train the high-frequency multi-layer perceptron and the low-frequency multi-layer perceptron to obtain the power load prediction value;
[0010] S4, obtaining historical photovoltaic power generation data, and using an integrated machine learning model to predict the historical photovoltaic data to obtain a photovoltaic power generation prediction value;
[0011] S5. According to the power load forecast value and photovoltaic power generation forecast value, based on the power supply plan optimization objective function and its constraints, execute the day-ahead power supply plan to complete the multi-energy power supply with photovoltaic participation.
[0012] The beneficial effects of the present invention are as follows: the present invention provides a photovoltaic-participated multi-energy power supply method based on machine learning, which can extract high-frequency part information in the power load time series data by dividing and reconstructing the components of the acquired historical power load data, and based on the high-frequency part information, can accurately predict the short-term power load, and obtain a high-precision and accurate power load prediction value. The present invention also provides a method for predicting photovoltaic power generation prediction values using an integrated machine learning model based on the acquired historical photovoltaic power generation data. By inheriting the machine learning model, the data space and structure can be deeply mined from multiple angles to achieve performance complementarity of the machine learning model, effectively improve the prediction accuracy of the model, and perform hyperparameter tuning of the machine learning model through cross-validation and Bayesian global optimization, so as to achieve the optimal prediction accuracy of the model without increasing the complexity of the model and the computational cost. The present invention also provides a power supply plan optimization objective function and its constraints, so as to achieve efficient coordinated scheduling of photovoltaic-participated multi-energy power supply under microgrid power supply based on high-accuracy power load prediction values and photovoltaic power generation prediction values.
[0013] Furthermore, S2 comprises the following steps:
[0014] S21. Based on the historical power load data, construct power load time series data;
[0015] S22, generating a power load time signal according to the power load time series data, and using the signal as an initial power load time signal;
[0016] S23, according to the upper extreme point and the lower extreme point of the power load time signal, averaging the envelope of the power load time signal to obtain the mean line of the power load time signal;
[0017] S24, obtaining difference time data based on the envelope and mean line of the power load time signal;
[0018] The calculation expression of the difference time data is as follows:
[0019] s(t)=b(t)-m(t),
[0020] Among them, s(t) represents the difference time data, b(t) represents the envelope of the power load time signal, and m(t) represents the mean line of the power load time signal;
[0021] S25, judging whether the difference time data meets the inherent modal condition, if so, setting the difference time data as the first-order inherent modal component and entering S27, otherwise entering S26;
[0022] S26, taking the difference time data as the power load time signal, repeating S23-S24 several times until the obtained difference time data meets the inherent modal condition, and obtaining the first-order inherent modal component;
[0023] The calculation expression of the first-order natural mode component is as follows:
[0024]
[0025] Where c1(t) represents the first-order natural mode component, represents the power load time signal at the kth repetition, represents the power load time signal at the k-1th repetition, The mean line of the power load time signal at the kth repetition;
[0026] S27, calculating a first-order low-frequency residual based on the initial power load time signal and the first-order natural modal component;
[0027] The calculation expression of the first-order low-frequency residual is as follows:
[0028] r1(t)=D(t)-c1(t),
[0029] Among them, r1(t) represents the first-order low-frequency residual, and D(t) represents the initial power load time signal;
[0030] S28, taking the first-order low-frequency residual as a new initial power load time signal, and calculating all low-frequency residuals according to S23-S27 and based on the residual model;
[0031] The calculation expression of the residual model is as follows:
[0032] r j (t) = r j-1 (t)-c j (t),
[0033] Among them, r j (t) represents the j-th order low-frequency residual, r j-1 (t) represents the j-1th order low-frequency residual, c j (t) represents the j-th order natural mode component, where j is a positive integer greater than or equal to 2;
[0034] S29. If the n-th order low-frequency residual is a monotonic function, the decomposition result of the power load time series data is reconstructed, where n is a positive integer;
[0035] The calculation expression of the decomposition result of the power load time series data is as follows:
[0036]
[0037] Where D(t) represents the decomposition result of the power load time series data, c j′ (t) represents the j′th order natural mode component, r n (t) represents the nth-order low-frequency residual.
[0038] The beneficial effect of adopting the above further scheme is: the present invention provides a method for component division and reconstruction of historical electricity load data to obtain the decomposition results of electricity load time series data. The high-frequency part of the decomposition results of the electricity load time series data has the characteristics of short-term changes in electricity load, and the low-frequency part has the characteristics of long-term changes in electricity load. By learning the characteristics of short-term changes in electricity load, it is helpful to accurately and highly accurately predict the electricity load value in each scheduling period, thereby providing a basis for efficient scheduling of multi-energy power supply involving photovoltaics.
[0039] Furthermore, S3 comprises the following steps:
[0040] S31, reconstructing the decomposition result of the electric load time series data according to the extreme point partitioning method to obtain a high-frequency part and a low-frequency part;
[0041] S32, respectively establish a high-frequency multilayer perceptron and a low-frequency multilayer perceptron;
[0042] S33. According to the Pearson correlation coefficient method, the correlation between the high-frequency part and the low-frequency part and the high-frequency multilayer perceptron and the low-frequency multilayer perceptron is analyzed to obtain the correlation coefficient;
[0043] S34, selecting the high-frequency part and the low-frequency part corresponding to when the absolute value of the correlation coefficient is greater than a preset absolute value threshold as an input training set;
[0044] S35, using the input training set to respectively train and adjust parameters of the high-frequency multilayer perceptron and the low-frequency multilayer perceptron to obtain trained high-frequency multilayer perceptron and low-frequency multilayer perceptron;
[0045] S36, obtaining the power load data to be predicted, and predicting the power load prediction value based on the trained high-frequency multi-layer perceptron and low-frequency multi-layer perceptron.
[0046] The beneficial effect of adopting the above further scheme is: the present invention provides a method for training high-frequency multilayer perceptron and low-frequency multilayer perceptron according to the decomposition results of power load time series data, and predicting the power load prediction value based on the trained high-frequency multilayer perceptron and low-frequency multilayer perceptron. By extracting and learning the high-frequency part and the low-frequency part, the power load can be predicted with high precision, providing a basis for accurately predicting the power load within the song scheduling period.
[0047] Further, the S36 comprises the following steps:
[0048] S361, extracting the high-frequency part, the low-frequency part and the temperature from the power load data to be predicted;
[0049] S362, according to the Pearson correlation coefficient method, based on the high-frequency part of the power load data to be predicted and the corresponding temperature, filter out high-frequency features to be predicted;
[0050] S363, using the trained high-frequency multi-layer perceptron to predict the high-frequency features to be predicted, to obtain the prediction result of the high-frequency power load;
[0051] S364, according to the Pearson correlation coefficient method, based on the low-frequency part of the power load data to be predicted and the corresponding temperature, filter out the low-frequency features to be predicted;
[0052] S365, using the trained high-frequency multi-layer perceptron to predict the low-frequency features to be predicted, to obtain the prediction result of the low-frequency power load;
[0053] S366. Perform a weighted summation on the high-frequency part power load forecast result and the low-frequency part power load forecast result to obtain a power load forecast value.
[0054] The beneficial effect of adopting the above further scheme is: the present invention provides a method for predicting the power load prediction value based on the trained high-frequency multi-layer perceptron and low-frequency multi-layer perceptron, which fully considers the influence of the high-frequency part, the low-frequency part and the corresponding ambient temperature factors in the power load data, and performs weighted summation on the high-frequency part power load prediction result and the low-frequency part power load prediction result to obtain the power load prediction value, thereby ensuring the accuracy and precision of the data.
[0055] Furthermore, the S4 comprises the following steps:
[0056] S41, obtaining historical photovoltaic power generation data;
[0057] The calculation expression of the historical photovoltaic power generation data is as follows:
[0058] D N′ ={(x1,y1),(x2,y2),...,(xk′ ,y k′ ),...,(x N′ ,y N′ )},
[0059] x k′ =(x k′1 ,x k′2 ,...,x k′q ),
[0060] Among them, D N′ represents historical photovoltaic power generation data, x1 represents the first photovoltaic power generation input feature vector, y1 represents the first photovoltaic power generation output, x k′ represents the k′th photovoltaic power input feature vector, y k′ represents the k′th photovoltaic power output, x N′ represents the N′th photovoltaic power input feature vector, y N′ represents the N′th photovoltaic power output, x k′1 represents the first feature in the k′th photovoltaic power input feature vector, x k′q represents the qth feature in the k′th photovoltaic power input feature vector;
[0061] S42, randomly dividing the historical photovoltaic power generation data into a training set and a prediction set;
[0062] S43, dividing the training set into K sample subsets of equal size;
[0063] S44. According to the Bayesian hyperparameter optimization method, K-1 sample subsets are used to train and optimize the selected machine learning models respectively, and the remaining 1 sample subset is used to verify the selected machine learning model;
[0064] S45, repeating S44 K times in total under the condition that the sample subsets used for verification are different each time, and making predictions using the machine learning model trained each time according to the prediction set, to obtain K prediction results of the selected machine learning model;
[0065] S46, concatenating the K prediction results corresponding to each machine learning model in each prediction model as the target training data set;
[0066] S47. According to the cross-validation error minimization principle, the weights of each machine learning model in the prediction model are determined, and the prediction model is trained with linear regression using the target training data set to obtain a trained prediction model;
[0067] S48. The K-times prediction results of the selected machine learning model are used as a test set, and the test set is input into the trained prediction model to obtain a photovoltaic power generation prediction value.
[0068] The beneficial effects of adopting the above further scheme are as follows: the present invention adopts a basic machine learning model to extract and learn features of historical photovoltaic power generation data, deeply mines the data space and structure from multiple angles, realizes the performance complementarity of the algorithm, and can adaptively integrate the advantages of multiple separate models to obtain highly accurate prediction results. The present invention optimizes the hyperparameters of each machine learning model through Bayesian optimization, and through cross-validation training, without increasing the complexity of the model and the computational cost, the accuracy of the photovoltaic power generation prediction value is optimized, thereby providing a basis for efficient and accurate scheduling of photovoltaic participation in multi-energy power supply.
[0069] Furthermore, the S5 comprises the following steps:
[0070] S51. For the day-ahead power supply plan, 24 hours is set as a scheduling cycle, and a preset duration is used as a scheduling step, that is, a scheduling cycle includes a number of scheduling periods;
[0071] S52, according to S2-S4, predict the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day;
[0072] S53, setting the power supply plan optimization objective function and its constraints according to the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day;
[0073] S54. Optimize the objective function and its constraints according to the power supply plan, execute the day-ahead power supply plan, and complete multi-energy power supply involving photovoltaics.
[0074] The beneficial effect of adopting the above further scheme is: based on the high-precision and accurate electric load forecast value and photovoltaic power generation forecast value, the day-ahead power supply plan can be most efficiently executed based on the power supply plan optimization objective function and its constraints, and efficient photovoltaic participation in multi-energy collaborative power supply can be achieved.
[0075] Furthermore, the calculation expressions of the power supply plan optimization objective function and its constraints in 53 are as follows:
[0076]
[0077] Where f represents the power supply plan optimization objective function, min(·) represents minimization, represents the electricity purchase cost during the d dispatch period, represents the electricity sales revenue during the d dispatch period, represents the multi-energy power generation cost, represents the unit electricity purchase price during the d dispatch period, represents the purchased power in the d scheduling period, Δd represents the scheduling step, represents the unit electricity price in the d dispatch period, represents the electricity sales power in the d scheduling period, η represents the power generation cost coefficient, represents the power of other energy sources during the scheduling period d, ST: represents the power of other energy sources during the scheduling period d, SOC d Indicates the state of charge of the storage device during the scheduling period d, SOC d-1 Indicates the charge state of the storage device during the d-1 scheduling period, represents the storage power of the storage equipment during the scheduling period d, represents the power consumption of the power storage device during the scheduling period d, B rl Indicates the rated capacity of the power storage device, SOC 1 Indicates the state of charge of the power storage device in the first scheduling period, SOC D Indicates the charge state of the power storage device during the Dth dispatch period, represents the power of photovoltaic power generation allocated to the power storage device during the scheduling period d, It represents the power allocated from purchased power to sold power during the dispatching period d. It represents the power of other energy supply power allocated to the power selling power during the scheduling period d, It represents the power distributed to the load during the dispatching period d. It represents the power allocated from the sold power to the purchased power during the dispatch period d, represents the predicted value of power load during the scheduling period d, represents the power of photovoltaic power distributed to the load during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy sources allocated to the load during the scheduling period d. represents the predicted value of photovoltaic power generation in the scheduling period d, represents the power of photovoltaic power distributed to the grid during the scheduling period d, represents the abandoned power of photovoltaic power generation during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, represents the upper limit of power purchase during the dispatching period d, represents the upper limit of the power sold during the dispatching period d, Indicates the upper limit of the storage power of the storage device. Indicates the upper limit of power consumption of the power storage device, SOC min Indicates the minimum state of charge of the energy storage device, SOC maxRepresents the maximum state of charge of the power storage device, where d=1, 2, ..., D.
[0078] The beneficial effect of adopting the above further scheme is: the present invention provides a calculation method for the power supply plan optimization objective function and its constraints, with the goal of minimizing the power supply cost, fully considering the power conditions of power purchase, power sale, photovoltaic power generation, other energy power generation and power storage, and realizing efficient coordinated scheduling and allocation of power load and real-time power, ensuring the stability of photovoltaic participation in multi-energy power supply.
[0079] On the other hand, the present invention also provides a system for photovoltaic-participated multi-energy power supply method based on machine learning, comprising:
[0080] The first module is used to obtain historical power load data;
[0081] The second module is used to divide the historical power load data into components and reconstruct the component division results to obtain the decomposition results of the power load time series data;
[0082] The third module is used to train a high-frequency multilayer perceptron and a low-frequency multilayer perceptron according to the decomposition results of the power load time series data to obtain a power load prediction value;
[0083] The fourth module is used to obtain historical photovoltaic power generation data and use the integrated machine learning model to predict the historical photovoltaic data to obtain the photovoltaic power generation prediction value;
[0084] The fifth module is used to optimize the objective function and its constraints based on the power supply plan according to the power load forecast value and the photovoltaic power generation forecast value, execute the day-ahead power supply plan, and complete the multi-energy power supply with the participation of photovoltaics.
[0085] The beneficial effects of the present invention are as follows: a system of a photovoltaic participation in multi-energy power supply method based on machine learning provided by the present invention is a system corresponding to the above-mentioned photovoltaic participation in multi-energy power supply method based on machine learning, and is used to implement the photovoltaic participation in multi-energy power supply method based on machine learning, so that the power load and real-time power are efficiently coordinated and dispatched, and the stability of photovoltaic participation in multi-energy power supply is ensured.
[0086] Other advantages of the present invention will be analyzed in more detail in subsequent embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0088] Figure 1 This is a flowchart of the steps of a photovoltaic multi-energy power supply method based on machine learning in Example 1 of the present invention.
[0089] Figure 2 This is a block diagram of a system for a photovoltaic-participated multi-energy power supply method based on machine learning in Example 2 of the present invention. DETAILED DESCRIPTION
[0090] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0091] Example 1: Figure 1 As shown, in one embodiment of the present invention, the present invention provides a photovoltaic participation multi-energy power supply method based on machine learning, comprising the following steps:
[0092] S1. Obtain historical power load data;
[0093] S2, dividing the historical power load data into components, and reconstructing the component division results to obtain the decomposition results of the power load time series data;
[0094] The S2 comprises the following steps:
[0095] S21. Constructing power load time series data based on historical power load data; in this embodiment, the power load time series data is the power load data after sorting the historical power load data in chronological order;
[0096] S22, generating a power load time signal according to the power load time series data, and using the signal as an initial power load time signal;
[0097] S23, according to the upper extreme point and the lower extreme point of the power load time signal, averaging the envelope of the power load time signal to obtain the mean line of the power load time signal;
[0098] S24, obtaining difference time data based on the envelope and mean line of the power load time signal;
[0099] The calculation expression of the difference time data is as follows:
[0100] s(t)=b(t)-m(t),
[0101] Among them, s(t) represents the difference time data, b(t) represents the envelope of the power load time signal, and m(t) represents the mean line of the power load time signal;
[0102] S25, judging whether the difference time data meets the inherent modal condition, if so, setting the difference time data as the first-order inherent modal component and entering S27, otherwise entering S26;
[0103] In this embodiment, the inherent modal condition is that the difference between the number of extreme values of the data and the number of points where the data crosses the time axis does not exceed 1, and the mean value of the envelope formed by the upper extreme value points and the lower extreme value points of the data is 0.
[0104] S26, taking the difference time data as the power load time signal, repeating S23-S24 several times until the obtained difference time data meets the inherent modal condition, and obtaining the first-order inherent modal component;
[0105] The calculation expression of the first-order natural mode component is as follows:
[0106]
[0107] Where c1(t) represents the first-order natural mode component, represents the power load time signal at the kth repetition, represents the power load time signal at the k-1th repetition, The mean line of the power load time signal at the kth repetition;
[0108] S27, calculating a first-order low-frequency residual based on the initial power load time signal and the first-order natural modal component;
[0109] The calculation expression of the first-order low-frequency residual is as follows:
[0110] r1(t)=D(t)-c1(t),
[0111] Among them, r1(t) represents the first-order low-frequency residual, and D(t) represents the initial power load time signal;
[0112] S28, taking the first-order low-frequency residual as a new initial power load time signal, and calculating all low-frequency residuals according to S23-S27 and based on the residual model;
[0113] The calculation expression of the residual model is as follows:
[0114] r j (t) = r j-1 (t)-c j (t),
[0115] Among them, r j (t) represents the j-th order low-frequency residual, r j-1 (t) represents the j-1th order low-frequency residual, c j (t) represents the j-th order natural mode component, where j is a positive integer greater than or equal to 2;
[0116] S29. If the n-th order low-frequency residual is a monotonic function, the decomposition result of the power load time series data is reconstructed, where n is a positive integer. In this embodiment, when the n-th order low-frequency residual is a monotonic function, the inherent mode cannot be extracted, that is, the decomposition of the power load time series data is completed.
[0117] The calculation expression of the decomposition result of the power load time series data is as follows:
[0118]
[0119] Where D(t) represents the decomposition result of the power load time series data, c j′ (t) represents the j′th order natural mode component, r n (t) represents the nth-order low-frequency residual.
[0120] S3, according to the decomposition results of the power load time series data, train the high-frequency multi-layer perceptron and the low-frequency multi-layer perceptron to obtain the power load prediction value;
[0121] The S3 comprises the following steps:
[0122] S31, reconstructing the decomposition result of the electric load time series data according to the extreme point partitioning method to obtain a high-frequency part and a low-frequency part;
[0123] In this embodiment, the extreme point division method first extracts the number of maximum and minimum values of each order of intrinsic modal components, and then divides and reconstructs the intrinsic modal components based on the number of maximum and minimum values. The number of extreme values can reflect the degree of fluctuation of the intrinsic modal classification, thereby realizing the division of the high-frequency part and the low-frequency part. In this embodiment, the intrinsic modal components whose sum of the number of maximum and minimum values is not less than 200 are divided into the high-frequency part, and the intrinsic modal components whose sum of the number of maximum and minimum values is less than 200 are divided into the low-frequency part; the high-frequency part has a higher fluctuation frequency, which can reflect the short-term fluctuation characteristics, and the low-frequency part has a low fluctuation frequency, which can reflect the long-term fluctuation characteristics, and can provide data guarantee for predicting accurate electric load prediction results.
[0124] S32, respectively establish a high-frequency multilayer perceptron and a low-frequency multilayer perceptron;
[0125] In this embodiment, the number of input neurons of the high-frequency multilayer perceptron and the low-frequency multilayer perceptron are 7 and 3 respectively, the number of output neurons is 1, the hidden layer transfer function adopts the logarithmic S-type function, the output layer transfer function is a linear function, and the training function adopts a gradient descent algorithm with a dynamic adaptive learning rate.
[0126] S33. According to the Pearson correlation coefficient method, the correlation between the high-frequency part and the low-frequency part and the high-frequency multilayer perceptron and the low-frequency multilayer perceptron is analyzed to obtain the correlation coefficient;
[0127] In this embodiment, when the correlation analysis is performed between the high-frequency part and the low-frequency part and the high-frequency multi-layer perceptron and the low-frequency multi-layer perceptron according to the Pearson correlation coefficient method, the historical values of the high-frequency part and the low-frequency part are firstly obtained respectively as the Pearson analysis input data, and the Pearson analysis input data includes the power load input data, the temperature input data and the humidity input data;
[0128] The calculation expression of the Pearson analysis input data is as follows:
[0129]
[0130] Where P represents the power load input data, Indicates the power load data at the same time of the previous day. represents the power load data at the same time of the previous n′ days, T represents the temperature input data, Indicates the highest temperature of the previous day. represents the average temperature of the previous day, Indicates the minimum temperature of the previous day. represents the highest temperature in the previous n′ days, represents the average temperature of the previous n′ days, represents the lowest temperature of the previous n' days, W represents the humidity input data, Indicates the average humidity of the previous day. Represents the average humidity over the previous n′ days, where n′ is a positive integer.
[0131] The calculation expression of Pearson correlation coefficient is as follows:
[0132]
[0133] Among them, r a,b represents the Pearson correlation coefficient, cov(a,b) represents the covariance between the input variable a and the output variable b, σ a represents the standard deviation of the input variable a, σ brepresents the standard deviation of the output variable b, a i′ represents the i′th input variable, represents the mean value of the input variable, b i′ represents the i′th output variable, Represents the average value of the output variable, where i′=1, 2, …, n″. The value of the Pearson correlation coefficient is between -1 and 1, which can reflect the linear correlation between the input data and the output data. When the value of the Pearson correlation coefficient is 1, the input data and the output data are positively correlated. When the value of the Pearson correlation coefficient is -1, the input data and the output data are negatively correlated.
[0134] S34, selecting the high-frequency part and the low-frequency part corresponding to the absolute value of the correlation coefficient greater than the preset absolute value threshold as the input training set; in this embodiment, the preset absolute value threshold is 0.47;
[0135] S35, using the input training set to respectively train and adjust parameters of the high-frequency multilayer perceptron and the low-frequency multilayer perceptron to obtain trained high-frequency multilayer perceptron and low-frequency multilayer perceptron;
[0136] In this embodiment, when training and adjusting the parameters of the high-frequency multilayer perceptron and the low-frequency multilayer perceptron, the adjusted hyperparameters include the number of hidden layers, the number of hidden layer neurons, the learning rate and the iteration target.
[0137] S36, obtaining the power load data to be predicted, and predicting the power load prediction value based on the trained high-frequency multi-layer perceptron and low-frequency multi-layer perceptron.
[0138] The S36 comprises the following steps:
[0139] S361, extracting the high-frequency part, the low-frequency part and the temperature from the power load data to be predicted;
[0140] S362, according to the Pearson correlation coefficient method, based on the high-frequency part of the power load data to be predicted and the corresponding temperature, filter out high-frequency features to be predicted;
[0141] S363, using the trained high-frequency multi-layer perceptron to predict the high-frequency features to be predicted, to obtain the prediction result of the high-frequency power load;
[0142] S364, according to the Pearson correlation coefficient method, based on the low-frequency part of the power load data to be predicted and the corresponding temperature, filter out the low-frequency features to be predicted;
[0143] S365, using the trained high-frequency multi-layer perceptron to predict the low-frequency features to be predicted, to obtain the prediction result of the low-frequency power load;
[0144] S366. Perform a weighted summation of the high-frequency power load forecast result and the low-frequency power load forecast result to obtain a power load forecast value.
[0145] In this embodiment, the absolute percentage error and root mean square error are used to evaluate the accuracy of the power load prediction value and the actual value. The absolute percentage error can characterize the relative deviation between the power load prediction result and the actual power load, and the root mean square error can characterize the degree of deviation between the power load prediction result and the actual power load. The evaluation results show that, by comprehensively considering the power load data, temperature data and humidity data, the prediction accuracy of the power load can be effectively improved, and the short-term power load prediction can be achieved efficiently and accurately.
[0146] S4, obtaining historical photovoltaic power generation data, and using an integrated machine learning model to predict the historical photovoltaic data to obtain a photovoltaic power generation prediction value;
[0147] The S4 comprises the following steps:
[0148] S41, obtaining historical photovoltaic power generation data;
[0149] The calculation expression of the historical photovoltaic power generation data is as follows:
[0150] D N′ ={(x1,y1),(x2,y2),...,(x k′ ,y k′ ),...,(x N′ ,y N′ )},
[0151] x k′ =(x k′1 ,x k′2 ,...,x k′q ),
[0152] Among them, D N′ represents historical photovoltaic power generation data, x1 represents the first photovoltaic power generation input feature vector, y1 represents the first photovoltaic power generation output, x k′ represents the k′th photovoltaic power input feature vector, y k′ represents the k′th photovoltaic power output, x N′ represents the N′th photovoltaic power input feature vector, y N′ represents the N′th photovoltaic power output, x k′1 represents the first feature in the k′th photovoltaic power input feature vector, x k′qRepresents the qth feature in the k′th photovoltaic power generation input feature vector; in this embodiment, the historical photovoltaic power generation data corresponds to N′ groups of photovoltaic power generation input feature vectors and corresponding photovoltaic power generation outputs, and each group of photovoltaic power generation input feature vectors corresponds to q features, which correspond to weather conditions, temperature, humidity, wind direction, wind speed and other meteorological data.
[0153] S42, randomly dividing the historical photovoltaic power generation data into a training set and a prediction set; in this embodiment, the training set accounts for 80%;
[0154] S43, dividing the training set into K sample subsets of equal size;
[0155] S44. According to the Bayesian hyperparameter optimization method, K-1 sample subsets are used to train and optimize the selected machine learning models respectively, and the remaining 1 sample subset is used to verify the selected machine learning model; in this embodiment, the selected machine learning models include GBRT model, XGB model, decision tree model, Bagging model, linear regression model and K nearest neighbor regression model;
[0156] S45, repeating S44 K times in total under the condition that the sample subsets used for verification are different each time, and making predictions using the machine learning model trained each time according to the prediction set, to obtain K prediction results of the selected machine learning model;
[0157] S46, concatenating the K prediction results corresponding to each machine learning model in each prediction model as the target training data set;
[0158] S47. According to the cross-validation error minimization principle, the weights of each machine learning model in the prediction model are determined, and the prediction model is trained with linear regression using the target training data set to obtain a trained prediction model;
[0159] S48. The K-times prediction results of the selected machine learning model are used as a test set, and the test set is input into the trained prediction model to obtain a photovoltaic power generation prediction value.
[0160] S5. According to the power load forecast value and photovoltaic power generation forecast value, based on the power supply plan optimization objective function and its constraints, execute the day-ahead power supply plan to complete the multi-energy power supply with photovoltaic participation.
[0161] The S5 comprises the following steps:
[0162] S51. For the day-ahead power supply plan, 24 hours is set as a scheduling cycle, and the preset duration is used as the scheduling step, that is, one scheduling cycle includes several scheduling periods; in this embodiment, the day-ahead power supply plan is a power supply plan set for the load power consumption in each scheduling period of the next day, and the power supply plan is suitable for a microgrid power supply environment with multi-energy power supply involving photovoltaics.
[0163] S52, according to S2-S4, predict the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day;
[0164] S53, setting the power supply plan optimization objective function and its constraints according to the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day;
[0165] The calculation expressions of the power supply plan optimization objective function and its constraints in 53 are as follows:
[0166]
[0167] Where f represents the power supply plan optimization objective function, min(·) represents minimization, represents the electricity purchase cost during the d dispatch period, represents the electricity sales revenue during the d dispatch period, represents the multi-energy power generation cost, represents the unit electricity purchase price during the d dispatch period, represents the purchased power in the d scheduling period, Δd represents the scheduling step, represents the unit electricity price in the d dispatch period, represents the electricity sales power in the d scheduling period, η represents the power generation cost coefficient, represents the power of other energy sources during the scheduling period d, ST: represents the power of other energy sources during the scheduling period d, SOC d Indicates the state of charge of the storage device during the scheduling period d, SOC d-1 Indicates the charge state of the storage device during the d-1 scheduling period, represents the storage power of the storage equipment during the scheduling period d, represents the power consumption of the power storage device during the scheduling period d, B rl Indicates the rated capacity of the power storage device, SOC 1 Indicates the state of charge of the power storage device in the first scheduling period, SOC D Indicates the charge state of the power storage device during the Dth dispatch period, represents the power of photovoltaic power generation allocated to the power storage device during the scheduling period d, It represents the power allocated from purchased power to sold power during the dispatching period d. It represents the power of other energy supply power allocated to the power selling power during the scheduling period d, It represents the power distributed to the load during the dispatching period d. It represents the power allocated from the sold power to the purchased power during the dispatch period d, represents the predicted value of power load during the scheduling period d, represents the power of photovoltaic power distributed to the load during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy sources allocated to the load during the scheduling period d. represents the predicted value of photovoltaic power generation in the scheduling period d, represents the power of photovoltaic power distributed to the grid during the scheduling period d, represents the abandoned power of photovoltaic power generation during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, represents the upper limit of power purchase during the dispatching period d, represents the upper limit of the power sold during the dispatching period d, Indicates the upper limit of the storage power of the storage device. Indicates the upper limit of power consumption of the power storage device, SOC min Indicates the minimum state of charge of the energy storage device, SOC max Represents the maximum state of charge of the power storage device, where d=1, 2, ..., D.
[0168] S54. Optimize the objective function and its constraints according to the power supply plan, execute the day-ahead power supply plan, and complete multi-energy power supply involving photovoltaics.
[0169] Example 2: Figure 2 As shown, based on Example 1, the present invention also provides a system for photovoltaic participation in multi-energy power supply method based on machine learning, including:
[0170] The first module is used to obtain historical power load data;
[0171] The second module is used to divide the historical power load data into components and reconstruct the component division results to obtain the decomposition results of the power load time series data;
[0172] The third module is used to train a high-frequency multilayer perceptron and a low-frequency multilayer perceptron according to the decomposition results of the power load time series data to obtain a power load prediction value;
[0173] The fourth module is used to obtain historical photovoltaic power generation data and use the integrated machine learning model to predict the historical photovoltaic data to obtain the photovoltaic power generation prediction value;
[0174] The fifth module is used to optimize the objective function and its constraints based on the power supply plan according to the power load forecast value and the photovoltaic power generation forecast value, execute the day-ahead power supply plan, and complete the multi-energy power supply with the participation of photovoltaics.
[0175] The system of the photovoltaic multi-energy power supply method based on machine learning provided by the present invention is a system corresponding to the photovoltaic multi-energy power supply method based on machine learning, which is used to implement the photovoltaic multi-energy power supply method based on machine learning, so that the power load and real-time power are efficiently coordinated and dispatched, and the stability of photovoltaic multi-energy power supply is guaranteed. Based on this system, the efficient use of photovoltaic power supply energy can be effectively promoted, the power supply cost can be reduced, and the power supply reliability can be improved.
[0176] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A photovoltaic multi-energy power supply method based on machine learning, characterized in that: The steps include: S1. Obtain historical power load data; S2, dividing the historical power load data into components, and reconstructing the component division results to obtain the decomposition results of the power load time series data; S3, according to the decomposition results of the power load time series data, train the high-frequency multi-layer perceptron and the low-frequency multi-layer perceptron to obtain the power load prediction value; S4, obtaining historical photovoltaic power generation data, and using an integrated machine learning model to predict the historical photovoltaic data to obtain a photovoltaic power generation prediction value; S5. According to the power load forecast value and photovoltaic power generation forecast value, based on the power supply plan optimization objective function and its constraints, execute the day-ahead power supply plan to complete the multi-energy power supply with photovoltaic participation.
2. The photovoltaic multi-energy power supply method based on machine learning according to claim 1 is characterized in that: The S2 comprises the following steps: S21. Based on the historical power load data, construct power load time series data; S22, generating a power load time signal according to the power load time series data, and using the signal as an initial power load time signal; S23, according to the upper extreme point and the lower extreme point of the power load time signal, averaging the envelope of the power load time signal to obtain the mean line of the power load time signal; S24, obtaining difference time data based on the envelope and mean line of the power load time signal; The calculation expression of the difference time data is as follows: s(t)=b(t)-m(t), Among them, s(t) represents the difference time data, b(t) represents the envelope of the power load time signal, and m(t) represents the mean line of the power load time signal; S25, judging whether the difference time data meets the inherent modal condition, if so, setting the difference time data as the first-order inherent modal component and entering S27, otherwise entering S26; S26, taking the difference time data as the power load time signal, repeating S23-S24 several times until the obtained difference time data meets the inherent modal condition, and obtaining the first-order inherent modal component; The calculation expression of the first-order natural mode component is as follows: Where c1(t) represents the first-order natural mode component, represents the power load time signal at the kth repetition, represents the power load time signal at the k-1th repetition, The mean line of the power load time signal at the kth repetition; S27, calculating a first-order low-frequency residual based on the initial power load time signal and the first-order natural modal component; The calculation expression of the first-order low-frequency residual is as follows: r1(t)=D(t)-c1(t), Among them, r1(t) represents the first-order low-frequency residual, and D(t) represents the initial power load time signal; S28, taking the first-order low-frequency residual as a new initial power load time signal, and calculating all low-frequency residuals according to S23-S27 and based on the residual model; The calculation expression of the residual model is as follows: r j (t)=r j-1 (t)-c j (t), Among them, r j (t) represents the j-th order low-frequency residual, r j-1 (t) represents the j-1th order low-frequency residual, c j (t) represents the j-th order natural mode component, where j is a positive integer greater than or equal to 2; S29. If the n-th order low-frequency residual is a monotonic function, the decomposition result of the power load time series data is reconstructed, where n is a positive integer; The calculation expression of the decomposition result of the power load time series data is as follows: Where D(t) represents the decomposition result of the power load time series data, c j′ (t) represents the j′th order natural mode component, r n (t) represents the nth order low-frequency residual.
3. The photovoltaic multi-energy power supply method based on machine learning according to claim 1 is characterized in that: The S3 comprises the following steps: S31, reconstructing the decomposition result of the electric load time series data according to the extreme point partitioning method to obtain a high-frequency part and a low-frequency part; S32, respectively establish a high-frequency multilayer perceptron and a low-frequency multilayer perceptron; S33. According to the Pearson correlation coefficient method, the correlation between the high-frequency part and the low-frequency part and the high-frequency multilayer perceptron and the low-frequency multilayer perceptron is analyzed to obtain the correlation coefficient; S34, selecting the high-frequency part and the low-frequency part corresponding to when the absolute value of the correlation coefficient is greater than a preset absolute value threshold as an input training set; S35, using the input training set to respectively train and adjust parameters of the high-frequency multilayer perceptron and the low-frequency multilayer perceptron to obtain trained high-frequency multilayer perceptron and low-frequency multilayer perceptron; S36, obtaining the power load data to be predicted, and predicting the power load prediction value based on the trained high-frequency multi-layer perceptron and low-frequency multi-layer perceptron.
4. The photovoltaic-participated multi-energy power supply method based on machine learning according to claim 3 is characterized in that: The S36 comprises the following steps: S361, extracting the high-frequency part, the low-frequency part and the temperature from the power load data to be predicted; S362, according to the Pearson correlation coefficient method, based on the high-frequency part of the power load data to be predicted and the corresponding temperature, filter out high-frequency features to be predicted; S363, using the trained high-frequency multi-layer perceptron to predict the high-frequency features to be predicted, to obtain the prediction result of the high-frequency power load; S364, according to the Pearson correlation coefficient method, based on the low-frequency part of the power load data to be predicted and the corresponding temperature, filter out the low-frequency features to be predicted; S365, using the trained high-frequency multi-layer perceptron to predict the low-frequency features to be predicted, to obtain the prediction result of the low-frequency power load; S366. Perform a weighted summation of the high-frequency power load forecast result and the low-frequency power load forecast result to obtain a power load forecast value.
5. The photovoltaic-participated multi-energy power supply method based on machine learning according to claim 1 is characterized in that: The S4 comprises the following steps: S41, obtaining historical photovoltaic power generation data; The calculation expression of the historical photovoltaic power generation data is as follows: D N′ ={(x1,y1),(x2,y2),...,(x k′ ,y k′ ),...,(x N′ ,y N′ )}, x k′ =(x k′1 ,x k′2 ,...,x k′q ), Among them, D N′ represents historical photovoltaic power generation data, x1 represents the first photovoltaic power generation input feature vector, y1 represents the first photovoltaic power generation output, x k′ represents the k′th photovoltaic power input feature vector, y k′ represents the k′th photovoltaic power output, x N′ represents the N′th photovoltaic power input feature vector, y N′ represents the N′th photovoltaic power output, x k′1 represents the first feature in the k′th photovoltaic power input feature vector, x k′q represents the qth feature in the k′th photovoltaic power input feature vector; S42, randomly dividing the historical photovoltaic power generation data into a training set and a prediction set; S43, dividing the training set into K sample subsets of equal size; S44. According to the Bayesian hyperparameter optimization method, K-1 sample subsets are used to train and optimize the selected machine learning models respectively, and the remaining 1 sample subset is used to verify the selected machine learning model; S45, repeating S44 K times in total under the condition that the sample subsets used for verification are different each time, and making predictions using the machine learning model trained each time according to the prediction set, to obtain K prediction results of the selected machine learning model; S46, concatenating the K prediction results corresponding to each machine learning model in each prediction model as the target training data set; S47. According to the cross-validation error minimization principle, the weights of each machine learning model in the prediction model are determined, and the prediction model is trained with linear regression using the target training data set to obtain a trained prediction model; S48. The K-times prediction results of the selected machine learning model are used as a test set, and the test set is input into the trained prediction model to obtain a photovoltaic power generation prediction value.
6. The photovoltaic-participated multi-energy power supply method based on machine learning according to claim 5 is characterized in that: The S5 comprises the following steps: S51. For the day-ahead power supply plan, 24 hours is set as a scheduling cycle, and a preset duration is used as a scheduling step, that is, a scheduling cycle includes a number of scheduling periods; S52, according to S2-S4, predict the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day; S53, setting the power supply plan optimization objective function and its constraints according to the power load forecast value and photovoltaic power generation forecast value in each scheduling period of the next day; S54. Optimize the objective function and its constraints according to the power supply plan, execute the day-ahead power supply plan, and complete multi-energy power supply involving photovoltaics.
7. The photovoltaic-participated multi-energy power supply method based on machine learning according to claim 6 is characterized in that: The calculation expressions of the power supply plan optimization objective function and its constraints in 53 are as follows: SOC min ≤SOC d ≤SOC max , Where f represents the power supply plan optimization objective function, min(·) represents minimization, represents the electricity purchase cost during the d dispatch period, represents the electricity sales revenue during the d dispatch period, represents the multi-energy power generation cost, represents the unit electricity purchase price during the d dispatch period, represents the purchased power in the d scheduling period, Δd represents the scheduling step, represents the unit electricity price in the d dispatch period, represents the electricity sales power in the d scheduling period, η represents the power generation cost coefficient, represents the power of other energy sources during the scheduling period d, ST: represents the power of other energy sources during the scheduling period d, SOC d Indicates the state of charge of the storage device during the scheduling period d, SOC d-1 Indicates the charge state of the storage device during the d-1 scheduling period, represents the storage power of the storage equipment during the scheduling period d, represents the power consumption of the power storage device during the scheduling period d, B rl Indicates the rated capacity of the power storage device, SOC 1 Indicates the state of charge of the power storage device in the first scheduling period, SOC D Indicates the charge state of the power storage device during the Dth dispatch period, represents the power of photovoltaic power generation allocated to the power storage device during the scheduling period d, It represents the power allocated from purchased power to sold power during the dispatching period d. It represents the power of other energy supply power allocated to the power selling power during the scheduling period d, It represents the power distributed to the load during the dispatching period d. It represents the power allocated from the sold power to the purchased power during the dispatch period d, represents the predicted value of power load during the scheduling period d, represents the power of photovoltaic power distributed to the load during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy sources allocated to the load during the scheduling period d. represents the predicted value of photovoltaic power generation in the scheduling period d, represents the power of photovoltaic power distributed to the grid during the scheduling period d, represents the abandoned power of photovoltaic power generation during the scheduling period d, It represents the power of purchased power allocated to the load during the dispatching period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, It represents the power of other energy supply power allocated to the purchased power during the scheduling period d, represents the upper limit of power purchase during the dispatching period d, represents the upper limit of the power sold during the dispatching period d, Indicates the upper limit of the storage power of the storage device. Indicates the upper limit of power consumption of the power storage device, SOC min Indicates the minimum state of charge of the energy storage device, SOC max Represents the maximum state of charge of the power storage device, where d=1, 2, ..., D.
8. A system for the photovoltaic multi-energy power supply method based on machine learning according to any one of claims 1 to 7, characterized in that: include: The first module is used to obtain historical power load data; The second module is used to divide the historical power load data into components and reconstruct the component division results to obtain the decomposition results of the power load time series data; The third module is used to train a high-frequency multilayer perceptron and a low-frequency multilayer perceptron according to the decomposition results of the power load time series data to obtain a power load prediction value; The fourth module is used to obtain historical photovoltaic power generation data and use the integrated machine learning model to predict the historical photovoltaic data to obtain the photovoltaic power generation prediction value; The fifth module is used to optimize the objective function and its constraints based on the power supply plan according to the power load forecast value and the photovoltaic power generation forecast value, execute the day-ahead power supply plan, and complete the multi-energy power supply with the participation of photovoltaics.
Citation Information
Patent Citations
Photovoltaic power generation load prediction method and system based on historical data
CN116345444A
Photovoltaic power generation power integrated prediction method, system, equipment and medium
CN117709744A