Zone area photovoltaic output and load prediction method and related equipment
By using similar daily algorithms, variational mode decomposition method and Bi-LSTM model in photovoltaic power generation and load prediction, combined with weather data, the problem of existing prediction methods ignoring weather factors is solved, and high-precision photovoltaic output and load prediction is achieved, supporting the optimization of the power system.
Patent Information
- Application Number
- CN202411637621.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-28
AI Technical Summary
The existing photovoltaic power generation and load prediction methods ignore the important impact of weather factors on photovoltaic power generation output and load, resulting in large errors in the prediction results.
The platform photovoltaic output and load prediction method based on similar daily algorithms and variational mode decomposition methods are used, and the bidirectional long and short-term memory network (Bi-LSTM) model is combined with the weather data to make high-precision prediction.
By making full use of weather data, the accuracy and reliability of prediction are improved, the difficulty of prediction is reduced, and high-precision prediction of photovoltaic output and load in the station area is achieved, supporting the scheduling and optimization of the power system.
Smart Images

Figure CN119539181A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of photovoltaic prediction, specifically to the field of photovoltaic data processing and analysis and time series analysis technology, and in particular to a photovoltaic output and load prediction method and related equipment for a substation. Background Art
[0002] Under the current background of global energy structure transformation, the widespread application of distributed photovoltaic as a clean and renewable energy form has become an important force in promoting the green and low-carbon development of energy. With the rapid growth of the installed capacity of distributed photovoltaic systems, the impact of their grid-connected operation on the distribution network has become increasingly significant, including but not limited to challenges such as voltage fluctuations, harmonic pollution, and reverse currents, which puts higher requirements on the safe and stable operation and power supply quality of the distribution network. In order to effectively manage this impact and improve the power supply quality of the distribution network in the substation area, it is necessary to make a more accurate prediction of the output of photovoltaic power generation.
[0003] However, traditional photovoltaic power generation and load forecasting methods are often limited to simple statistical analysis and trend extrapolation of historical data, ignoring the complex interactions between many key influencing factors, especially the significant impact of weather factors (such as temperature, humidity, light intensity, wind speed, wind direction, cloud cover, etc.) on photovoltaic power generation output and grid load; these factors not only have a high degree of spatiotemporal variability, but also have complex nonlinear relationships with each other, which greatly reduces the accuracy and reliability of traditional forecasting methods and leads to large errors in the final forecast results.
[0004] It can be seen that the existing forecasting methods for photovoltaic power generation and load forecasting ignore the important impact of weather factors on photovoltaic power generation output and load, resulting in large errors in the final forecast results. Summary of the invention
[0005] The purpose of the present invention is to provide a photovoltaic output and load prediction method and related equipment for a substation, so as to solve the technical problem that the existing prediction methods for photovoltaic power generation and load prediction ignore the important influence of weather factors on photovoltaic power generation output and load, resulting in large errors in the final prediction results.
[0006] In order to achieve the above object, the present invention adopts the following technical solution: A method for predicting photovoltaic output and load in a substation, comprising: Based on the similar day algorithm, similar days to the predicted date in historical dates are selected according to the comprehensive similarity distance, and historical data corresponding to the similar days are obtained as similar day sequences; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; The variational mode decomposition method is used to decompose the similar day series into multiple similar day series in different frequency bands; A similar day sequence is input into a pre-trained photovoltaic output and load forecasting model, and a forecast result is output; wherein the photovoltaic output and load forecasting model adopts a bidirectional long short-term memory network and is trained based on the historical data.
[0007] Furthermore, based on the similar day algorithm, the steps of selecting similar days of the to-be-predicted date in historical dates according to the comprehensive similarity distance are as follows: Obtain the photovoltaic output data, photovoltaic load data and weather data for the date to be predicted, and perform normalization processing; The normalized photovoltaic output data, photovoltaic load data and weather data are correlated to obtain the Pearson coefficient; According to the Pearson coefficient, effective weather data and weight coefficients corresponding to photovoltaic output data and photovoltaic load data are selected from the weather data; The Euclidean distance and angle cosine distance between the effective weather data and the historical weather data are calculated respectively, and the comprehensive similarity distance between the effective weather data and the historical weather data is solved based on the weight coefficient; Similar days in historical dates are selected based on the comprehensive similarity distance.
[0008] Furthermore, the specific formula for normalization processing is as follows:
[0009] Where: y* is the normalized data, y min is the minimum value in the data set, y max is the maximum value in the data set; Pearson coefficient P k The calculation formula is as follows:
[0010] Where: x ik For the k Weather data i data, y i It is photovoltaic output data or photovoltaic load data; Calculate the effective weather data X and the historical weather data X i Before calculating the Euclidean distance and angle cosine distance between them, the effective weather data and historical weather data are integrated into vectors and weighted according to the Pearson coefficient, which is specifically expressed as:
[0011] Among them, the Euclidean distance D (X , X i ) is as follows:
[0012] In the formula, n is the number of types of valid weather data; Angle cosine distance θ ( X , X i ) is as follows:
[0013] Comprehensive similarity distance ψ ( X , X i ) is as follows:
[0014] In the formula, α represents the weight coefficient of the Euclidean distance; the smaller the comprehensive similarity distance, the higher the similarity.
[0015] Furthermore, the steps of using the variational mode decomposition method to decompose the similar day sequence into a plurality of similar day sequences of different frequency bands are as follows: Taking similar day series as input signals, we obtain the constrained variational problem of variational mode decomposition method; The quadratic penalty factor and Lagrangian operator are introduced to eliminate the constrained variational problem; The mode set, center frequency set and Lagrangian operator are continuously updated through the alternating direction multiplier algorithm until the maximum number of iterations is reached, and similar day sequences in multiple different frequency bands are obtained.
[0016] Furthermore, the particle swarm optimization algorithm is used to improve the bidirectional long short-term memory network. The specific steps include: The average fitness change rate is used to adjust the inertia weight of the bidirectional long short-term memory network in real time to prevent the bidirectional long short-term memory network from falling into a local optimal solution.
[0017] Furthermore, the specific formula for using the average fitness change rate to adjust the inertia weight of the bidirectional long short-term memory network in real time is as follows:
[0018] In the formula, is the current average fitness value of the particle, is the average fitness value of the particle at the previous moment, is the inertia weight at the current moment, is the inertia weight at the previous moment.
[0019] Furthermore, the linear interpolation method is used to supplement the missing values of the photovoltaic output data, photovoltaic load data and weather data corresponding to the forecast date, as well as the historical photovoltaic output data, historical photovoltaic load data and historical weather data. The specific formula is as follows:
[0020] In the formula, d n and d n+1 are the known data at the corresponding time, d n+k is a missing value, and 0< k < i .
[0021] A photovoltaic output and load prediction system for a substation, used to implement the steps of the above-mentioned photovoltaic output and load prediction method for a substation, including: A similar day sequence acquisition module is used to select similar days of the date to be predicted in historical dates based on a similar day algorithm and a comprehensive similarity distance, and obtain historical data corresponding to the similar days as a similar day sequence; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data, and historical weather data; The modal decomposition module is used to decompose the similar day sequence into multiple similar day sequences in different frequency bands using the variational modal decomposition method; The prediction result output module inputs a similar day sequence into a pre-trained photovoltaic output and load prediction model and outputs a prediction result; wherein the photovoltaic output and load prediction model adopts a bidirectional long short-term memory network and is trained based on the historical data.
[0022] A device comprising: Memory for storing computer programs; A processor is used to implement the steps of the above-mentioned photovoltaic output and load prediction method in the substation when executing the computer program.
[0023] A computer-readable storage medium stores a computer program, which, when executed by a processor, is used to implement the steps of the above-mentioned photovoltaic output and load prediction method for a substation.
[0024] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a method for predicting photovoltaic output and load in a substation, and the method is applicable to various occasions for predicting the output and load of photovoltaic power stations in a substation that include weather data. The method adopts an improved similar day algorithm, makes full use of weather data that has a direct impact on output and load, and uses historical data with similar weather to make predictions, which can improve the accuracy of predictions at the root; at the same time, the information of different frequency bands is extracted by decomposition through the variational mode decomposition method, so that the prediction model predicts data of different frequency bands respectively, reducing the difficulty of prediction; the method adopts a Bi-LSTM prediction model to make up for the deficiency that traditional LSTM can only transmit information in one direction; the method realizes high-precision prediction of photovoltaic output and load in the substation by comprehensively using similar day selection, variational mode decomposition and Bi-LSTM model, and provides strong support for the dispatching and optimization of the power system.
[0025] Preferably, in the present invention, due to the huge amount of information in the weather forecast, including the highest temperature, the lowest temperature, the relative humidity, the average wind speed, the rainfall and other information, in order to ensure the accuracy of the forecast results, it is necessary to reasonably select similar days, and further it is necessary to comprehensively select similar days based on the correlation between various weather information and load and output. The data collection part mainly collects historical data (including output, load, and weather data) to prepare for correlation calculation; the Pearson correlation coefficient is used to perform correlation analysis on various weather data and output and load data. The Pearson correlation coefficient ranges from -1 to 1. The closer to 1, the stronger the positive correlation between the two variables, the closer to -1, the stronger the negative correlation between the two variables, and the closer to 0, the less correlation between the two variables; weather data with a larger absolute value of the coefficient is selected as the basis for similar day calculation; this method uses a comprehensive similarity distance method as the selection basis; on the basis of using Euclidean distance and angle cosine distance to quantitatively evaluate the numerical similarity and angular similarity between vectors, the two are organically combined to accurately determine the similarity between vectors, which well overcomes the defect that the traditional Euclidean distance method cannot mine the morphological similarity of time series.
[0026] Further preferably, in the present invention, various weather data are first normalized to eliminate errors caused by different numerical dimensions; then, the normalized weather data are weighted, and the weighting coefficient is the absolute value of the corresponding Pearson coefficient; finally, the weighted coefficient is brought into the vector, and the comprehensive distance between the vectors is calculated using the comprehensive similarity distance method. The smaller the comprehensive distance, the higher the similarity. This method can more reasonably select similar days and improve prediction accuracy.
[0027] Preferably, in the present invention, the traditional decomposition method is EMD (empirical mode decomposition), but EMD decomposition is prone to mode aliasing problems, the frequency components of the sequence after decomposition are mixed, the prediction difficulty is also relatively large, and the decomposition process is computationally intensive, especially for long time series signals; this method uses VMD (variational mode decomposition) to effectively solve the mode aliasing problem, and the frequency components of the sequence after decomposition are clearer; and this method is relatively simple, improves computational efficiency, has a good decomposition effect, and is easier to predict.
[0028] Preferably, in the present invention, a particle swarm optimization algorithm is used to improve the bidirectional long short-term memory network. The traditional particle swarm optimization algorithm updates its own position and speed respectively through the individual optimal position and the global optimal position, but due to the late iteration of the particle swarm, it is easy to fall into the local optimal solution due to the influence of the inertia weight; for the parameter problem of the prediction model, the present method uses a particle swarm optimization algorithm, which can quickly determine the parameters while avoiding falling into the local optimal solution.
[0029] Preferably, in the present invention, since historical data is not necessarily complete, in order to ensure the normal progress of subsequent steps, the missing data needs to be supplemented, and the linear interpolation method is used to supplement the missing historical data, thereby ensuring the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A flow chart of a method for predicting photovoltaic output and load in a substation provided by an embodiment of the present invention; Figure 2 A block diagram of a photovoltaic output and load prediction method for a substation provided by an embodiment of the present invention; Figure 3 A network structure diagram of the LSTM provided in an embodiment of the present invention; Figure 4 A network structure diagram of the Bi-LSTM provided in an embodiment of the present invention; Figure 5 A flow chart of a photovoltaic output and load prediction method for a substation provided by the present invention; Figure 6 The present invention provides a schematic structural diagram of a photovoltaic output and load forecasting system for an area. DETAILED DESCRIPTION
[0031] Example 1 The present invention provides a method for predicting photovoltaic output and load in a substation area. Figure 5 As shown, the following steps are included: A method for predicting photovoltaic output and load in a substation, comprising: Based on the similar day algorithm, similar days to the predicted date in historical dates are selected according to the comprehensive similarity distance, and the historical data corresponding to the similar days are obtained as the similar day sequence; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; the linear interpolation method is used to supplement the missing values of the photovoltaic output data, photovoltaic load data and weather data corresponding to the predicted date, as well as the historical photovoltaic output data, historical photovoltaic load data and historical weather data. The specific formula is as follows:
[0032] In the formula, d n and d n+1 are the known data at the corresponding time, d n+k is a missing value, and 0< k < i .
[0033] Specifically, the photovoltaic output data, photovoltaic load data and weather data of the date to be predicted are obtained and normalized; The normalized photovoltaic output data, photovoltaic load data and weather data are correlated to obtain the Pearson coefficient; According to the Pearson coefficient, effective weather data and weight coefficients corresponding to photovoltaic output data and photovoltaic load data are selected from the weather data; The Euclidean distance and angle cosine distance between the effective weather data and the historical weather data are calculated respectively, and the comprehensive similarity distance between the effective weather data and the historical weather data is solved based on the weight coefficient; Similar days in historical dates are selected based on the comprehensive similarity distance.
[0034] The specific formula for normalization is as follows:
[0035] Where: y* is the normalized data, y min is the minimum value in the data set, y max is the maximum value in the data set; Pearson coefficient P k The calculation formula is as follows:
[0036] Where: x ik For the k Weather data i data, yi It is photovoltaic output data or photovoltaic load data; Calculate the effective weather data X and the historical weather data X i Before calculating the Euclidean distance and angle cosine distance between them, the effective weather data and historical weather data are integrated into vectors and weighted according to the Pearson coefficient, which is specifically expressed as: Among them, the Euclidean distance D ( X , X i ) is as follows:
[0037] In the formula, n is the number of types of valid weather data; Angle cosine distance θ ( X , X i ) is as follows:
[0038] Comprehensive similarity distance ψ ( X , X i ) is as follows:
[0039] In the formula, α represents the weight coefficient of the Euclidean distance; the smaller the comprehensive similarity distance, the higher the similarity.
[0040] The variational mode decomposition method is used to decompose the similar day series into multiple similar day series in different frequency bands; The specific implementation steps are as follows: Taking similar day series as input signals, we obtain the constrained variational problem of variational mode decomposition method; The quadratic penalty factor and Lagrangian operator are introduced to eliminate the constrained variational problem; The mode set, center frequency set and Lagrangian operator are continuously updated through the alternating direction multiplier algorithm until the maximum number of iterations is reached, and similar day sequences in multiple different frequency bands are obtained.
[0041] A similar day sequence is input into a pre-trained photovoltaic output and load forecasting model, and a forecast result is output; wherein the photovoltaic output and load forecasting model adopts a bidirectional long short-term memory network and is trained based on the historical data.
[0042] The particle swarm optimization algorithm is used to improve the bidirectional long short-term memory network. The specific steps include: The average fitness change rate is used to adjust the inertia weight of the bidirectional long short-term memory network in real time to prevent the bidirectional long short-term memory network from falling into a local optimal solution.
[0043] Here, the specific formula for using the average fitness change rate to adjust the inertia weight of the bidirectional long short-term memory network in real time is as follows:
[0044] In the formula, is the current average fitness value of the particle, is the average fitness value of the particle at the previous moment, is the inertia weight at the current moment, is the inertia weight at the previous moment.
[0045] like Figure 6 As shown, the present invention also provides a photovoltaic output and load forecasting system for a substation, including: a similar day sequence acquisition module, which is used to select similar days of the date to be predicted in historical dates based on a similar day algorithm according to a comprehensive similarity distance, and obtain historical data corresponding to the similar days as a similar day sequence; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; a modal decomposition module, which is used to decompose the similar day sequence into a plurality of similar day sequences of different frequency bands using a variational modal decomposition method; a prediction result output module, which inputs the similar day sequence into a pre-trained photovoltaic output and load forecasting model, and outputs a prediction result; wherein the photovoltaic output and load forecasting model adopts a bidirectional long short-term memory network, which is trained based on the historical data.
[0046] The present invention also provides a device, comprising: a memory for storing a computer program; and a processor for implementing the steps of the method for predicting photovoltaic output and load in a substation when executing the computer program.
[0047] When the processor executes the computer program, the above-mentioned steps of photovoltaic output and load prediction of the substation are implemented, for example: based on the similar day algorithm, similar days of the date to be predicted in historical dates are selected according to the comprehensive similarity distance, and historical data corresponding to the similar days are obtained as similar day sequences; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; the similar day sequence is decomposed into a plurality of similar day sequences of different frequency bands by using the variational mode decomposition method; the similar day sequence is input into a pre-trained photovoltaic output and load prediction model, and the prediction result is output; wherein the photovoltaic output and load prediction model adopts a bidirectional long short-term memory network, which is trained based on the historical data.
[0048] Alternatively, the processor implements the functions of each module in the above system when executing the computer program, for example: a similar day sequence acquisition module, which is used to select similar days of the date to be predicted in historical dates based on a similar day algorithm and a comprehensive similarity distance, and obtain historical data corresponding to the similar days as a similar day sequence; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; a modal decomposition module, which is used to decompose the similar day sequence into a plurality of similar day sequences of different frequency bands using a variational modal decomposition method; a prediction result output module, which inputs the similar day sequence into a pre-trained photovoltaic output and load prediction model and outputs a prediction result; wherein the photovoltaic output and load prediction model adopts a bidirectional long short-term memory network, which is trained based on the historical data.
[0049] Exemplarily, the computer program can be divided into one or more modules / units, and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete preset functions, and the instruction segments are used to describe the execution process of the computer program in the photovoltaic output and load forecasting device of the substation. For example, the computer program can be divided into a similar day sequence acquisition module, a modal decomposition module and a prediction result output module; the specific functions of each module are as follows: a similar day sequence acquisition module, which is used to select similar days of the date to be predicted in historical dates based on a similar day algorithm according to a comprehensive similarity distance, and obtain historical data corresponding to similar days as similar day sequences; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; a modal decomposition module, which is used to decompose the similar day sequence into multiple similar day sequences of different frequency bands using a variational modal decomposition method; a prediction result output module, which inputs the similar day sequence into a pre-trained photovoltaic output and load forecasting model and outputs the prediction result; wherein the photovoltaic output and load forecasting model adopts a bidirectional long short-term memory network, which is trained based on the historical data.
[0050] The photovoltaic output and load forecasting device in the substation can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The photovoltaic output and load forecasting device in the substation can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above are examples of photovoltaic output and load forecasting devices in the substation, and do not constitute a limitation on photovoltaic output and load forecasting devices in the substation, and can include more components than the above, or combine certain components, or different components. For example, the photovoltaic output and load forecasting device in the substation can also include input and output devices, network access devices, buses, etc.
[0051] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the photovoltaic output and load forecasting of the substation, and uses various interfaces and lines to connect various parts of the photovoltaic output and load forecasting equipment of the entire substation.
[0052] The memory can be used to store the computer program and / or module, and the processor implements various functions of the photovoltaic output and load forecasting device in the substation by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0053] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0054] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method for predicting photovoltaic output and load in a substation are implemented.
[0055] If the module / unit integrated in the photovoltaic output and load forecasting system of the substation is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0056] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned photovoltaic output and load forecasting method, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of the above-mentioned photovoltaic output and load forecasting method can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0057] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0058] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0059] The present invention will be further described below in conjunction with the embodiments and drawings: Example 2 As described in the background technology, traditional photovoltaic power generation and load forecasting methods are often limited to simple statistical analysis and trend extrapolation of historical data, ignoring the complex interactions between many key influencing factors, especially the significant impact of weather factors (such as temperature, humidity, light intensity, wind speed, wind direction, cloud cover, etc.) on photovoltaic power generation output and grid load; these factors not only have high temporal and spatial variability, but also have complex nonlinear relationships with each other, which greatly reduces the accuracy and reliability of traditional forecasting methods, resulting in large errors in the final forecast results. If the impact of weather factors on load and output is taken into account in the process of forecasting output and load, and forecasts are made based on historical data of similar weather, and then the forecast model is optimized, the forecast accuracy can be improved.
[0060] In order to achieve the above-mentioned purpose, the present invention provides a photovoltaic output and load forecasting method for a substation. The method can perform correlation analysis on weather data and photovoltaic output and load data, select similar days according to the analysis results, optimize the parameters of a bidirectional long short-term memory network (Bi-LSTM) through an improved particle swarm algorithm (IPSO), and use the optimized forecasting model to forecast the output and load of similar day data.
[0061] like Figure 1 As shown, this embodiment provides a method for predicting photovoltaic output and load in a substation, and the specific process includes data processing process, correlation calculation process, similar day calculation process, VMD decomposition process, and IPSO-Bi-LSTM prediction process.
[0062] Among them, in the data processing process, the missing values of the original data are first supplemented so that the subsequent processes can proceed normally, and then the load or output data is normalized to unify the dimensions and improve the prediction accuracy.
[0063] Since historical data is not necessarily complete, in order to ensure that subsequent steps proceed normally, the missing historical data needs to be supplemented. This embodiment uses linear interpolation to supplement the missing historical data.
[0064] In order to avoid the different dimensions of each data affecting the prediction accuracy, it is necessary to normalize the historical photovoltaic output data and historical photovoltaic load data, that is, the value of the processed data is between 0 and 1.
[0065] The data correlation analysis process includes a data collection process and a correlation calculation process.
[0066] In particular, since the amount of information in the weather forecast is huge, including the highest temperature, lowest temperature, relative humidity, average wind speed, rainfall and other information, in order to ensure the accuracy of the forecast results, it is necessary to reasonably select similar days, and further to comprehensively select similar days based on the correlation between various weather information and load and output. The data collection process mainly collects historical data (including output, load, and weather data) to prepare for correlation calculation.
[0067] Furthermore, the present invention uses the Pearson correlation coefficient to perform correlation analysis on various weather data and output and load data. The Pearson correlation coefficient ranges from -1 to 1. The closer to 1, the stronger the positive correlation between the two variables. The closer to -1, the stronger the negative correlation between the two variables. The closer to 0, the less correlation between the two variables. Weather data with a larger absolute value of the coefficient is selected as the basis for similar day calculation.
[0068] The similar day selection process includes a weather data normalization process and a weighted comprehensive similarity distance method process.
[0069] In particular, the basis for selecting similar days is to form vectors of various weather data, so that the basis for judging similar days is converted into judging vector similarity. The present invention adopts a comprehensive similarity distance method as the basis for selection. This method is based on the use of Euclidean distance and angle cosine distance to quantitatively evaluate the numerical similarity and angular similarity between vectors, and then organically combines the two to accurately determine the degree of similarity between vectors. It overcomes the defect that the traditional Euclidean distance method cannot mine the morphological similarity of time series. Since the numerical dimensions of each weather are different, directly bringing them into the vector will result in large errors, and the correlations of different weather data to load and output are different. Directly bringing them in will ignore the influence of correlation and lead to inaccurate selection of similar days, affecting the prediction accuracy.
[0070] Furthermore, in response to the above problems, this embodiment first normalizes various weather data to eliminate errors caused by different numerical dimensions; then, the normalized weather data is weighted, and the weighting coefficient is the absolute value of the corresponding Pearson coefficient. Finally, the weighted coefficient is brought into the vector, and the comprehensive similarity distance method is used to calculate the comprehensive distance between the vectors. The smaller the comprehensive distance, the higher the similarity. The above is a description of the similar day selection process in the present invention, which can more reasonably select similar days and improve prediction accuracy.
[0071] In this embodiment, the correlation calculation process in this embodiment calculates the Pearson correlation coefficient of the processed data, retains the weather data with strong correlation and the corresponding Pearson correlation coefficient, and prepares for subsequent similar day calculations.
[0072] In this embodiment, in the similar day calculation process of this embodiment, the retained weather data is first normalized and formed into a vector, and then the weather data is weighted to retain the elements of correlation size, and finally the Euclidean distance and cosine distance between the weather vectors between the predicted day and the historical data are calculated, and the two are combined as the basis for judging similar days.
[0073] In this embodiment, the VMD decomposition process decomposes the output or load data of similar days into subsequences of different frequencies, so that the originally complex data sequence with difficult changing rules can be decomposed into a data sequence with relatively simple changing rules, so as to improve the prediction accuracy.
[0074] In particular, since the output and load data will be affected by seasonality, holidays, etc., it is difficult to grasp the changing rules by direct prediction, resulting in low prediction accuracy. Seasonality, holidays, etc. often have regular patterns to follow; therefore, the original output and load series are decomposed into subsequences at different frequencies, each subsequence contains the changing rules at that frequency, and each subsequence is predicted separately, which makes it easier to grasp the changing rules and the prediction will be more accurate.
[0075] Furthermore, the traditional decomposition method is EMD (empirical mode decomposition), but EMD decomposition is prone to mode aliasing problems, the frequency components of the sequence after decomposition are mixed, and the prediction difficulty is also relatively large. In addition, the decomposition process is computationally intensive, especially for long time series signals. The present invention uses VMD (variational mode decomposition) to effectively solve the mode aliasing problem, and the frequency components of the sequence after decomposition are clearer. In addition, the calculation method is relatively simple, the calculation efficiency is improved, the decomposition effect is good, and it is easier to predict.
[0076] In this embodiment, in the IPSO-Bi-LSTM prediction process in this embodiment, the prediction model uses the Bi-LSTM prediction model, which can transmit information in both directions and can better grasp the changing rules of data; IPSO is used to train and determine the parameters of the prediction model, and the average fitness change rate is used to adjust the inertia weight in real time to avoid falling into the problem of local optimal solution.
[0077] The IPSO-Bi-LSTM prediction process includes a Bi-LSTM prediction model process and an IPSO parameter optimization process.
[0078] In particular, in the field of time series analysis technology, LSTM (Long Short-Term Memory Network) is widely used. LSTM effectively solves the shortcomings of traditional RNN in dealing with long-term dependencies and the problem of gradient disappearance. It can maintain and transmit information over a long time span, and can selectively remember and forget information, making it perform well in processing complex sequence data. Due to the above advantages, LSTM is also widely used in output and load forecasting. However, the traditional LSTM network transmits information in one direction and can only extract information from past time points, but not from the future.
[0079] Furthermore, in view of the deficiency of traditional LSTM that can only transmit information in one direction, the present invention adopts LSTM (Bi-LSTM) that can transmit information in two directions as a prediction model, which can simultaneously obtain past and future bidirectional information, and then concatenate the extracted feature vectors to obtain the final feature expression. However, the Bi-LSTM prediction model has many parameters, and directly determining the parameters requires tedious training and comparison, which is a large workload.
[0080] Furthermore, in order to solve the problem of determining the parameters of the Bi-LSTM prediction model, the present invention adopts the particle swarm optimization algorithm (PSO) to determine the parameters of the prediction model. The traditional particle swarm optimization algorithm updates its own position and speed respectively through the individual optimal position and the global optimal position, but due to the influence of inertia weight in the later stage of particle swarm iteration, it is easy to fall into the local optimal solution.
[0081] Furthermore, in view of the problem that the traditional particle swarm optimization algorithm is prone to fall into the local optimal solution, the present invention adopts an improved particle swarm optimization algorithm (IPSO), which uses the average fitness change rate to adjust the inertia weight in real time to avoid falling into the local optimal solution.
[0082] like Figure 2 As shown, Figure 2 It is a specific implementation block diagram of the photovoltaic output and load forecasting method in the substation area; it includes data processing process, correlation calculation process, similar day calculation process, VMD decomposition process, and IPSO-Bi-LSTM prediction process. In the data processing process of this embodiment, regarding the supplementation of the missing values of the original data, the present invention uses linear interpolation to solve the missing data, and the calculation formula is shown in formula (1): (1) Where: d n and d n+1 are the known data at the corresponding time, d n+k is a missing value, and 0< k < i .
[0083] In order to unify the dimensions and facilitate prediction, the photovoltaic output data or photovoltaic load data is normalized. The processing process is shown in formula (2): (2) Where: y * is the normalized data, y min is the minimum value in the data set, y max is the maximum value in the data set.
[0084] In this embodiment, in the correlation calculation process of this embodiment, in order to extract weather data that has a greater impact on processing or load, the Pearson coefficient is used as an evaluation index for screening. The calculation formula of the Pearson coefficient is shown in formula (3): (3) Where: x ik For the k Weather data i data, y i It is output data or load data.
[0085] The Pearson coefficient ranges from -1 to 1. Here, the corresponding weather data with a larger absolute value of the coefficient are selected as the basis for similar day calculations.
[0086] In this embodiment, in the similar day calculation process in this embodiment, due to the different dimensions of various weather data, direct calculation may result in large errors, so the weather data needs to be normalized, and the processing process is shown in formula (4): (4) Where: x * is the normalized data, x min is the minimum value in the data set, x max is the maximum value in the data set.
[0087] The weather data of the day to be predicted and the historical weather data ( i The weather data are integrated into a vector, and then each type of weather data is weighted. The result is shown in formula (5): (5) The Euclidean distance between two vectors is: (6) Where: D ( X , X i ) is a vector X With vector X i The Euclidean distance between n The number of types of weather data after filtering.
[0088] In order to better reflect the impact of vector time-varying properties on the degree of similarity, the angle cosine distance method is used to reflect the morphological similarity between two vectors. The specific calculation is shown in formula (7): (7) Where: θ ( X , X i ) is a vector X With vector X i The cosine distance between .
[0089] In order to meet the requirement that the vector similarity measurement index needs to be monotonic with the similarity distance, and the range of the cosine distance is between 0 and 1, formula (7) is modified as shown in formula (8): (8) Where: E ( X , X i ) is a vectorX With vector X i The modified cosine distance between .
[0090] because D ( X , X i ) will not exceed n 0.5 ,and n Generally, it will not exceed 4, which is the same order of magnitude as the improved cosine distance, so there is no need to normalize the Euclidean distance. D ( X , X i )and E ( X , X i ) are integrated to form a comprehensive similarity distance, the specific form is shown in formula (9): (9) Where: ψ ( X , X i ) is a vector X With vector X i The comprehensive similarity distance between α is the weight coefficient of the Euclidean distance.
[0091] The smaller the comprehensive similarity distance is, the higher the similarity is. The comprehensive similarity distance is used as the basis to screen similar days in historical dates and then select a similar day sequence.
[0092] In this embodiment, the VMD decomposition process in this embodiment, VMD decomposition is a signal decomposition method, by introducing constraints and minimizing the cost function, a complex signal can be decomposed into a linear combination of K modal functions and basis functions. The implementation steps are as follows: Step 1: For the input signal, the constrained variational problem generated by the VMD algorithm is expressed as: (10) (11) Where: u k}={ u 1, u 2,…, u k}and{ ω k}={ ω 1, ω 2,…, ω k} is the mode set and the center frequency set, δ ( t ) is the unit pulse function, f ( t ) is the original signal sequence.
[0093] Step 2: Introduce a quadratic penalty factor β And the Lagrangian operator λ ( t ), to eliminate the constraints of the constrained variation problem: (12) Step 3: Continuously update using the alternating direction multiplier algorithm , , , and the saddle point of equation (13) is obtained in the frequency domain. The updated formula is: (13) (14) (15) Where: n is the number of iterations, τ To update the parameters.
[0094] Step 4: Specify the maximum number of iterations N , so that n satisfy , there is any , when equation (16) is satisfied, the corresponding decomposition subsequence is obtained according to the number of modal functions k.
[0095] (16) The VMD decomposition of similar day series can be completed through equations (10) to (16), preparing for subsequent predictions.
[0096] Combination Figure 3 and Figure 4 As shown, in this embodiment, the IPSO-Bi-LSTM prediction process inputs the decomposed sequences into the Bi-LSTM model for prediction, and integrates the predicted values to obtain the final prediction result.
[0097] The parameters predicted by the model are determined by the improved particle swarm optimization algorithm. The traditional PSO algorithm formula is shown in equation (17) and equation (18): (17) (18) Where: iis the particle number, , N is the particle group size, d is the particle swarm dimension signal, , D is the particle dimension, k is the current iteration number, w is the inertia weight, c 1. c 2 is the learning factor, r 1. r 2 is a number between 0 and 1, , , , They are respectively the velocity vector and position vector of the particle, the optimal solution for the individual particle, and the optimal solution for the entire particle group.
[0098] In the early stage of particle swarm iteration, a larger inertia weight makes the particles fly faster, which is conducive to "exploring" the whole space. However, in the later stage of particle swarm iteration, a larger inertia weight will cause the particles to be unable to stabilize at the optimal point, thus falling into a local optimal situation. In order to solve this problem, the present invention uses the average fitness change rate to adjust the inertia weight in real time. The adjustment method is shown in formula (19): (19) Where: is the current average fitness value of the particle, is the average fitness value of the particle at the previous moment, is the inertia weight at the current moment, is the inertia weight at the previous moment.
[0099] If the average fitness value at the previous moment is smaller than the current moment, it is considered that the particle swarm has found a better position. At this time, the inertia weight can be appropriately increased to speed up the search. If the average fitness value at the previous moment is larger than the current moment, it means that the current position may be better. At this time, the inertia weight can be appropriately reduced to avoid jumping out of a better position.
[0100] In summary, in this embodiment, the improved particle swarm optimization algorithm (IPSO) is implemented as shown in equations (20) and (21): (20) (twenty one) Figure 3 The network structure diagram describing LSTM. The LSTM network can effectively solve the problem of gradient explosion. It is mainly composed of three gate structures and a memory storage unit module.
[0101] , and exist Under the action, the output result is 0 to 1. The value determines how much long-term memory information is retained (forget gate). The calculation formula is shown in formula (22): (twenty two) The principle of the input gate is similar to that of the forget gate. It mainly updates long-term memory information. The calculation formulas are shown in equations (23), (24), and (25): (twenty three) (twenty four) (25) The output gate mainly combines the input with short-term memory information and long-term memory information to output the predicted result. The calculation formula is shown in formula (26) and formula (27): (26) (27) Where: , , , is the cell state weight matrix of the corresponding gate, , , , is the corresponding bias matrix.
[0102] In summary, in this embodiment, the calculation process of an LSTM unit is composed of equations (22) to (27), which can be summarized as follows. As shown in equation (28): (28) Figure 4 The network structure diagram of Bi-LSTM describes that Bi-LSTM can make up for the defect that traditional LSTM can only transmit information in one direction. It is composed of forward and backward LSTM networks, so that it can obtain bidirectional information of the past and the future, and then splice the results of the two to obtain the final prediction result. The specific calculation formulas are shown in formulas (29), (30), and (31).
[0103] (29) (30) (31) Where: and Respectively expressed in t The forward and backward LSTM output values at this moment, Indicated int The concatenated value of the two LSTM network outputs is output at all times, that is, the final photovoltaic output and load forecast results are output.
[0104] In summary, the present invention provides a method for predicting photovoltaic output and load in a substation, which has the following advantages over existing prediction measures: The present invention provides a method for predicting photovoltaic output and load in a substation, which is applicable to various occasions of output and load prediction of photovoltaic power stations in a substation that include weather data. By adopting an improved similar day algorithm, the weather data that has a direct impact on the output and load is fully utilized, and historical data with similar weather is used for prediction, which can improve the accuracy of the prediction at the root; at the same time, information of different frequency bands is extracted through VMD decomposition, so that the prediction model predicts data of different frequency bands respectively, reducing the difficulty of prediction. In addition, the present invention adopts a Bi-LSTM prediction model to make up for the deficiency that traditional LSTM can only transmit information in one direction. Finally, for the parameter problem of the prediction model, the invention adopts an improved particle swarm algorithm (IPSO), which can quickly determine the parameters while avoiding falling into the local optimal solution.
[0105] First, through the selection mechanism based on the similar day algorithm, this method can accurately select the date most similar to the date to be predicted from the historical data, thereby greatly improving the accuracy of the prediction, because similar days usually have similar lighting conditions, load patterns and weather conditions, which are important factors affecting photovoltaic output and load; secondly, the variational mode decomposition method is used to subdivide the similar day sequence into subsequences of multiple frequency bands. This step effectively decomposes the different frequency components in the photovoltaic output and load data, so that the subsequent prediction model can focus more on learning the unique features in each frequency band, further enhancing the precision and robustness of the prediction; finally, the pre-trained bidirectional long short-term memory network (Bi-LSTM) is used as the photovoltaic output and load prediction model, which not only makes full use of the advantages of LSTM in processing time series data, but also captures the contextual dependencies in the data through its bidirectional characteristics, significantly improving the prediction ability and generalization ability of the model. In summary, this method achieves high-precision prediction of photovoltaic output and load in the substation area by comprehensively using similar day selection, variational mode decomposition and Bi-LSTM model, providing strong support for the dispatch and optimization of the power system.
[0106] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A method for predicting photovoltaic output and load in a substation, characterized in that: include: Based on the similar day algorithm, similar days to the predicted date in historical dates are selected according to the comprehensive similarity distance, and historical data corresponding to the similar days are obtained as similar day sequences; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data and historical weather data; The variational mode decomposition method is used to decompose the similar day series into multiple similar day series in different frequency bands; A similar day sequence is input into a pre-trained photovoltaic output and load forecasting model, and a forecast result is output; wherein the photovoltaic output and load forecasting model adopts a bidirectional long short-term memory network and is trained based on the historical data.
2. The photovoltaic output and load prediction method of the substation according to claim 1, characterized in that: Based on the similar day algorithm, the steps for selecting similar days to the predicted date in historical dates according to the comprehensive similarity distance are as follows: Obtain the photovoltaic output data, photovoltaic load data and weather data for the date to be predicted, and perform normalization processing; The normalized photovoltaic output data, photovoltaic load data and weather data are correlated to obtain the Pearson coefficient; According to the Pearson coefficient, effective weather data and weight coefficients corresponding to photovoltaic output data and photovoltaic load data are selected from the weather data; The Euclidean distance and angle cosine distance between the effective weather data and the historical weather data are calculated respectively, and the comprehensive similarity distance between the effective weather data and the historical weather data is solved based on the weight coefficient; Similar days in historical dates are selected based on the comprehensive similarity distance.
3. The photovoltaic output and load prediction method of the substation according to claim 2 is characterized in that: in, The specific formula for normalization is as follows: Where: y* is the normalized data, y min is the minimum value in the data set, y max is the maximum value in the data set; Pearson coefficient P k The calculation formula is as follows: Where: x ik For the k Weather data i data, y i It is photovoltaic output data or photovoltaic load data; Calculate the effective weather data X and the historical weather data X i Before calculating the Euclidean distance and angle cosine distance between them, the effective weather data and historical weather data are integrated into vectors and weighted according to the Pearson coefficient, which is specifically expressed as: Among them, the Euclidean distance D ( X , X i ) is as follows: In the formula, n is the number of types of valid weather data; Angle cosine distance θ ( X , X i ) is as follows: Comprehensive similarity distance ψ ( X , X i ) is as follows: In the formula, α represents the weight coefficient of the Euclidean distance; the smaller the comprehensive similarity distance, the higher the similarity.
4. The photovoltaic output and load prediction method of the substation according to claim 1, characterized in that: The steps of using the variational mode decomposition method to decompose the similar day sequence into multiple similar day sequences of different frequency bands are as follows: Taking similar day series as input signals, we obtain the constrained variational problem of variational mode decomposition method; The quadratic penalty factor and Lagrangian operator are introduced to eliminate the constrained variational problem; The mode set, center frequency set and Lagrangian operator are continuously updated through the alternating direction multiplier algorithm until the maximum number of iterations is reached, and similar day sequences in multiple different frequency bands are obtained.
5. The photovoltaic output and load prediction method of the substation according to claim 1, characterized in that: The particle swarm optimization algorithm is used to improve the bidirectional long short-term memory network. The specific steps include: The average fitness change rate is used to adjust the inertia weight of the bidirectional long short-term memory network in real time to prevent the bidirectional long short-term memory network from falling into a local optimal solution.
6. The photovoltaic output and load prediction method of the substation according to claim 5, characterized in that: The specific formula for using the average fitness change rate to adjust the inertia weight of the bidirectional long short-term memory network in real time is as follows: In the formula, is the current average fitness value of the particle, is the average fitness value of the particle at the previous moment, is the inertia weight at the current moment, is the inertia weight at the previous moment.
7. The photovoltaic output and load prediction method of a substation according to claim 1, characterized in that: The linear interpolation method is used to supplement the missing values of the photovoltaic output data, photovoltaic load data and weather data corresponding to the forecast date, as well as the historical photovoltaic output data, historical photovoltaic load data and historical weather data. The specific formula is as follows: In the formula, d n and d n+1 are the known data at the corresponding time, d n+k is a missing value, and 0< k < i .
8. A photovoltaic output and load forecasting system for a substation, used to implement the steps of the photovoltaic output and load forecasting method for a substation as described in any one of claims 1 to 7, characterized in that: include: A similar day sequence acquisition module is used to select similar days of the date to be predicted in historical dates based on a similar day algorithm and a comprehensive similarity distance, and obtain historical data corresponding to the similar days as a similar day sequence; wherein the historical data includes historical photovoltaic output data, historical photovoltaic load data, and historical weather data; The modal decomposition module is used to decompose the similar day sequence into multiple similar day sequences in different frequency bands using the variational modal decomposition method; The prediction result output module inputs a similar day sequence into a pre-trained photovoltaic output and load prediction model and outputs a prediction result; wherein the photovoltaic output and load prediction model adopts a bidirectional long short-term memory network and is trained based on the historical data.
9. A device, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of the photovoltaic output and load forecasting method for a substation as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it is used to implement the steps of the photovoltaic output and load forecasting method for the substation as described in any one of claims 1-7.
Citation Information
Cited By
Cloud edge cooperative regulation and control method and device based on large model, equipment and medium
CN119904070A
Source-load prediction method and device suitable for optical storage mobile power supply, medium and equipment
CN122740102A