User short-term net load prediction method based on adaptive frequency domain decomposition and long and short term hopping memory network
By combining adaptive frequency domain decomposition and the LSTSM model, the problem of low prediction accuracy of traditional frequency domain decomposition method in summer when the climate is unpredictable is solved, and smooth and high-precision prediction of user net load data is achieved, especially for periodic utilization during periods without photovoltaic power output and feature fitting during photovoltaic power output periods.
Patent Information
- Application Number
- CN202511649748.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-10
AI Technical Summary
Traditional frequency domain decomposition methods cannot effectively extract the periodic components of user net load data during the unpredictable summer weather, resulting in low prediction accuracy and an inability to smooth data and reduce load uncertainty.
An adaptive frequency domain decomposition method based on genetic algorithm is adopted to convert user net load data to the frequency domain. The optimal frequency set is extracted by genetic algorithm and combined with LSTSM model to predict aperiodic components. After processing by adaptive frequency domain decomposition method, the fluctuation of user net load data becomes smoother, the average amplitude is reduced, and the prediction accuracy is improved.
By combining adaptive frequency domain decomposition and the LSTSM model, the difficulty of predicting user net load is reduced and the prediction accuracy is improved, especially in the periodic utilization during periods without photovoltaic output and the feature fitting ability during periods with photovoltaic output, thus improving the prediction accuracy.
Smart Images

Figure CN121507699A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term memory network, and belongs to the technical field of power load prediction. BACKGROUND
[0002] In recent years, many methods have appeared to change the load change rule by decomposing the load data, effectively improving the problem of large load volatility.
[0003] The traditional frequency domain decomposition method uses Fourier transform to convert the load data from the time domain to the frequency domain. Then, according to the pre-set frequency domain decomposition rule, the load data is decomposed into daily periodic components, weekly periodic components, high-frequency components and low-frequency components. Finally, the above four components are converted to the time domain through inverse Fourier transform, so that the periodicity of the data is extracted. However, in summer, the climate in some areas is unpredictable, and the daily periodicity and weekly periodicity of the user net load data in the photovoltaic output period are greatly weakened. The proportion of the periodic components extracted by the traditional frequency domain decomposition method is reduced, which cannot play a role in smoothing the data and reducing the uncertainty of the load. SUMMARY
[0004] In order to solve the problem of fixed frequency domain decomposition rule of the traditional frequency domain decomposition method, the present application provides a user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term memory network. After converting the user net load data from the time domain to the frequency domain, all frequency domain decomposition set combinations are extracted using genetic algorithm to find the optimal frequency set that can improve the suddenness and volatility of the user net load. After processing by the adaptive frequency domain decomposition method, the volatility of the user net load data becomes smooth, the average amplitude is reduced, the prediction difficulty is reduced, the prediction accuracy is improved, and the LSTSM model is used to predict the non-periodic components of the user net load data, further improving the prediction accuracy.
[0005] The present application provides a user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term memory network, which comprises: Obtaining user net load data and performing abnormal value processing; The processed user net load data is decomposed into periodic components and non-periodic components using an adaptive frequency domain decomposition method based on genetic algorithm; Using the spearman correlation coefficient to screen the prediction features for predicting the non-periodic components from the candidate prediction features related to the net load change, and then normalizing all prediction features; Based on the screened prediction features, using the LSTSM model to predict the non-periodic components of the user net load, and using the trend extrapolation method to predict the periodic components of the user net load; The final user net load prediction result is reconstructed from the prediction result of the non-periodic component and the prediction result of the periodic component.
[0006] As a preferred embodiment, the data with a correlation coefficient greater than 50% is taken as an alternative prediction feature, and the alternative prediction feature includes temperature, humidity, light, and adjacent time net load value.
[0007] As a preferred embodiment, the periodic component includes a short-period component and a long-period component; the adaptive frequency domain decomposition method based on genetic algorithm is used for decomposition into the periodic component and the non-periodic component, including: encoding all potential frequency domain decomposition rules; generating an initial population, setting selection, crossover, and mutation parameters; discrete Fourier transform is performed on the user net load data to convert from time domain to frequency domain, and the discrete Fourier transform formula is: The Fourier expansion coefficients of the frequency domain user net load data obtained through the discrete Fourier transform are and , and the formula is: The Fourier expansion coefficients , can be obtained through the discrete Fourier transform, and the user net load is decomposed into a long-period component, a short-period component, and a non-periodic component in the frequency domain; According to the frequency domain decomposition rule, a frequency set corresponding to each population is generated for frequency domain decomposition; The inverse discrete Fourier transform is used to convert the decomposed user net load data from the frequency domain back to the time domain, and the expression is: In the time domain, the user net load is decomposed into a short-period component, a long-period component, and a non-periodic component; All non-periodic components are predicted using a pre-constructed prediction model, and all populations are sorted based on the fitness function value, and selection, crossover, and mutation operations are performed. When the fitness function value no longer changes, the result corresponding to the population with the highest fitness function value is the optimal frequency domain decomposition set.
[0008] As a preferred embodiment, the fitness function is as follows.
[0009] In the formula: represents the prediction value at the th time point, represents the actual value at the actual value at a time point, average value of actual values, number of samples.
[0010] As a preferred embodiment, after Fourier decomposition, the user load data is decomposed into frequency domain components orthogonal to each other The original load The expression of reconstruction is: In the formula: represents the DC component, represents the short-period component, represents the long-period component, represents the aperiodic component; In the process of extracting short-period and long-period components in the frequency domain, a modulo operation is introduced, and the user load data is taken as a time point of 15 minutes, and under the condition of 96 time points in a day, the frequency domain decomposition process is as follows: User load time series The expression after Fourier transform is: In the formula: represents the DC coefficient, represents the number of user load time points; Short-period component is a component that changes with time points and the DC component is composed of, The frequency set of In the formula: represents the DC component frequency, represents the number of short-period time points, represents the short-period frequency set.
[0011] Long-period component is a component that changes with time points and the component does not contain a component that changes with time points, The frequency set of In the formula: represents the number of long-period time points, represents the long-period frequency set.
[0012] Aperiodic components are the set of all frequency components in the frequency domain, excluding short-period and long-period components. The frequency set is: In the formula: This represents the set of non-periodic frequencies.
[0013] As a preferred embodiment, the formula for the Spearman correlation coefficient is: In the formula: This represents the i-th influence factor. This represents the average number of impact factors. This represents the i-th net load. This represents the average net load.
[0014] In a preferred embodiment, the LSTSM model includes convolutional layers, recurrent layers, and fully connected layers; The first layer of LSTSM is a convolutional layer, which contains only convolutional kernels and no pooling layers; the size of the convolutional kernels is selected as 1*3 and 3*3, with a width of 1 or 3 and a length of 3; The second layer of LSTSM is the cyclic layer, which consists of LSTM units and LSTM jump units. The LSTM jump units are used to predict the periods when the non-periodic component of the user's net load has no photovoltaic output, and the LSTM units are used to predict the periods when the non-periodic component of the user's net load has photovoltaic output. The mathematical expression for the LSTM skip unit is: In the formula: This represents the output values of the first h states; Combining the above formula, the difference between an LSTM skip unit and an LSTM unit is that during the training process, the output value of the previous state becomes the output value of the previous h states, where h represents the value of the skipped state. The value of h can be determined by observing the historical patterns of user net load data, and the value of h is determined to be 96 during periods without photovoltaic power output. The third layer of LSTSM is a fully connected layer. This layer integrates the outputs of the LSTM skip units, obtaining the optimal output through the weights assigned during training. The mathematical expression for the fully connected layer is: In the formula, The weights represent the output of the skip LSTM unit. This represents the result of the skip LSTM unit output. Indicates bias. This represents the output value of the fully connected layer.
[0015] Compared with existing technologies, the beneficial effects achieved by this invention are as follows: This invention proposes an adaptive frequency domain decomposition method based on a genetic algorithm. After processing by the adaptive frequency domain decomposition method, the fluctuation of user net load becomes smoother, and the average amplitude is reduced. This invention transforms user net load data from the time domain to the frequency domain, and then uses a genetic algorithm to extract all frequency domain decomposition sets to find the optimal set of frequencies that can improve the burstiness and volatility of user net load, reducing the prediction difficulty and improving the prediction accuracy. Furthermore, for the aperiodic components decomposed from user net load data, this invention further constructs a prediction model combining convolutional structures, LSTM units, and LSTM skip units—the LSTSM model. The LSTSM model training process is divided into two parts: the first part uses convolutional kernels to smooth historical data and extract the coupling relationship between features; the second part uses LSTM skip units to predict the aperiodic component during periods without photovoltaic power output, and uses LSTM units to predict the aperiodic component during periods with photovoltaic power output. This separate prediction method fully utilizes the periodicity of periods without photovoltaic power output and does not affect the relationship between the predicted features of the photovoltaic power output period and the load. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the adaptive frequency domain decomposition method based on genetic algorithms. Figure 2 A graph showing the raw data of user net load; Figure 3 The three components are the adaptive frequency domain decomposition of the user's net load. Figure 4 A comparison chart of prediction results and actual values from various prediction models; Figure 5 Here is a diagram of the LSTSM model structure; Figure 6 The flowchart is shown below for a user short-term load combination prediction model based on adaptive frequency domain decomposition and LSTSM. Figure 7 This is a dataset of net load per household. Figure 8 Data set of net load for 26 households; Figure 9 A comparison chart of the predicted and actual values for each model for a single household on a single day; Figure 10 A comparison chart of 7-day predicted and actual values for each model for a single household; Figure 11 A comparison chart of the 7-day predicted and actual values for each of the 26 households using different models; Figure 12 A comparison chart of the predicted and actual values for each model for one household on one day; Figure 13 A comparison chart of predicted and actual values for each model over 7 days for one household; Figure 14 This chart compares the predicted and actual net load values for each of the 26 households over 7 days. Detailed Implementation
[0017] It should be noted that: The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0018] The term "and / or" simply describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0019] This embodiment introduces a method for predicting short-term user net load based on adaptive frequency domain decomposition and long short-term skip memory networks. User net load exhibits characteristics such as periodicity, suddenness, and volatility. Identifying the factors influencing changes in user net load based on these characteristics is crucial for improving prediction accuracy. Therefore, various data, including light intensity, temperature, humidity, season, and date, are analyzed. The Spearman rank correlation coefficient is used to quantify the impact of each factor affecting user net load changes, laying the foundation for building the prediction model. The formula for the Spearman correlation coefficient is as follows: In the formula: This represents the i-th influence factor. This represents the average number of impact factors. This represents the i-th net load. This represents the average net load.
[0020] The present invention selects features for predicting user net load by mining the correlation between various factors and user net load. Currently, candidate prediction features include temperature, humidity, light intensity, and net load values at adjacent times. In addition, seasonal factors, date, and other factors determine the time length of the features. This embodiment uses the Spearman correlation coefficient to quantify the correlation between various influencing factors and prediction data, laying the foundation for building a short-term user net load prediction model.
[0021] To address the problem of fixed frequency domain decomposition rules in traditional frequency domain decomposition methods, this embodiment proposes an adaptive frequency domain decomposition method based on a genetic algorithm.
[0022] After converting user load data from the time domain to the frequency domain, a genetic algorithm is used to extract all frequency domain decomposition sets to find the optimal set of frequencies that can improve the burstiness and volatility of user load, thereby reducing the difficulty of prediction and improving the accuracy of prediction.
[0023] After Fourier decomposition, the user load data is decomposed into mutually orthogonal frequency domain components. Therefore, the original load can be... The reconstruction is shown in 4-1.
[0024] In the formula: Represents the DC component. Represents short-period components, Represents long-period components, This represents a non-periodic component.
[0025] In the process of extracting short-period and long-period components in the frequency domain, a modulo operation is introduced, where mod(m,n) represents the remainder when m is divided by n. Given user load data with 15-minute intervals and 96 time points per day, the frequency domain decomposition process of the adaptive frequency domain decomposition method based on a genetic algorithm is as follows: (1) User net load time series After Fourier transform, it is shown in the following equation. In the formula: Indicates the DC coefficient. This indicates the number of user net load time points.
[0026] Short-period components Therefore The components and DC components at each time point are periodically changing. composition, The set of frequencies is shown in the following formula.
[0027] In the formula: Indicates the frequency of the DC component. This indicates the number of short-cycle time points. This represents the set of short-period frequencies.
[0028] Long-period components Therefore The components are periodically changing at each time point, and the components do not contain any components with a periodicity of 10 ... Each time point represents a component that changes periodically. The frequency set is shown in the following formula.
[0029] In equation (4-4): Indicates the number of long-period time points. It represents a set of long-period frequencies.
[0030] Aperiodic components are the set of all frequency components in the frequency domain, excluding short-period and long-period components. The frequency set is shown in the following formula.
[0031] In the formula: This represents the set of non-periodic frequencies.
[0032] (2) The user's net load consists of discrete data points. When converting between the time domain and the frequency domain, the Discrete Fourier Transform and the Inverse Discrete Fourier Transform must be used. The formula for the Discrete Fourier Transform is shown below.
[0033] Frequency domain user load sequence obtained through discrete Fourier transform The Fourier expansion coefficients are , As shown in the following formula.
[0034] The discrete Fourier transform can be used to obtain the coefficients of the Fourier expansion. , In the frequency domain, the user's net load is decomposed into long-period components, short-period components, and aperiod components.
[0035] (3) The long-period component, short-period component, and aperiod component are transformed from the frequency domain back to the time domain through the inverse discrete Fourier transform, as shown in the following equation.
[0036] Through the above process, the irregular user load data is decomposed into components with different patterns of variation. The adaptive frequency domain decomposition method based on genetic algorithms is as follows: Figure 1 As shown.
[0037] Combination Figure 1 The adaptive frequency domain decomposition method based on genetic algorithm is as follows: (1) Encode the set of all potential frequency domain decomposition rules. (2) Generate the initial population and set the selection, crossover, and mutation parameters.
[0038] (3) Use Discrete Fourier Transform to convert the user net load data from the time domain back to the frequency domain, and perform frequency domain decomposition according to the frequency set corresponding to the population generated in (1).
[0039] (4) Use the inverse discrete Fourier transform to convert the decomposed user load data from the frequency domain back to the time domain. In the time domain, the user load is decomposed into short-period components, long-period components, and aperiodic components.
[0040] (5) The same prediction model is used to predict all aperiodic components. After sorting all populations based on their fitness function values, selection, crossover, and mutation operations are performed. When the fitness function values no longer change, the population with the highest fitness function value corresponds to the optimal frequency domain decomposition set, i.e., the values in equations (4-3) and (4-4) are obtained. and The fitness function is shown below.
[0041] In the formula: Indicates the first Predicted values at each time point Indicates the first The actual value at each point in time. This represents the average of the actual values. Indicates the number of samples.
[0042] This embodiment uses an adaptive frequency domain decomposition method based on a genetic algorithm to process the measured user net load data, and then uses an LSTM model to predict the aperiodic components. The aperiodic components are reconstructed with the periodic components to obtain the final prediction result. The result is compared with the frequency domain decomposition method - LSTM and LSTM to verify the actual effect of the adaptive frequency domain decomposition method on short-term user net load prediction.
[0043] The experimental data used in this section comes from the net load values of users in a smart community in New York City, USA. The data is presented in 15-minute intervals, with 96 time points per day. Figure 2 The raw data for the user's net load.
[0044] The experimental simulation software for the adaptive frequency domain decomposition method was MATLAB 2016a, and the genetic algorithm code called the Genetic Algorithm package of the Optimization Tool in MATLAB.
[0045] Before using a genetic algorithm to adaptively solve for the optimal frequency set, it is necessary to determine the parameters of genetic operations such as selection, crossover, and mutation. Among these, the genetic and mutation operations have the greatest impact on the final result. All parameters are shown in Table 1.
[0046] Table 1 Genetic Algorithm Parameter Settings An LSTM prediction model was built using the Jupyter editor in Anaconda and the frameworks TensorFlow and Keras. The main parameters of the LSTM prediction model included the number of training iterations and the learning rate. The number of iterations was 50, the learning rate was 0.01, and the number of LSTM units was 10. All parameter settings are shown in Table 2. Table 2 LSTM Model Hyperparameter Settings To verify the practical effect of the adaptive frequency domain decomposition method based on genetic algorithm in decomposing user load data, this section uses the adaptive frequency domain decomposition method to decompose the user load data. The decomposition results are as follows: Figure 3 As shown.
[0047] Depend on Figure 3 As can be seen, the adaptive frequency domain decomposition method decomposes the user load into short-period components, long-period components, and aperiodic components. The long-period component has a period of seven days, and the short-period component has a period of five days. The aperiodic component shows a significant reduction in fluctuation and average amplitude. Experimental results demonstrate that the adaptive frequency domain decomposition method is an effective preprocessing method for user load data.
[0048] In this embodiment, Spearman coefficients are used to select the prediction features of the adaptive frequency domain decomposition method, the aperiodic components obtained from the frequency domain decomposition method, and the original data. The candidate prediction features are derived from the factors affecting changes in user net load analyzed above. Table 3 shows the set of candidate prediction features.
[0049] Table 3 Predicted Feature Sets and Abbreviations The load interval is 15 minutes, L i In the table, 'i' represents the i-th 15-minute interval before the prediction time, and the value of 'i' ranges from 1 to 12, 96, and 672. The Spearman coefficients of all candidate prediction features in Table 3 are calculated and sorted in descending order, as shown in Table 4.
[0050] Table 4. Descending order of Spearman coefficients of aperiodic components and original data for the two decomposition methods. When constructing prediction models for the original value, the aperiodic component obtained by the adaptive frequency domain decomposition method, and the aperiodic component obtained by the frequency domain decomposition method, the first 6 features in Table 4 are used as prediction features.
[0051] This section uses LSTM prediction models to perform short-term predictions on the aperiodic components of user net load obtained by frequency domain decomposition and adaptive frequency domain decomposition methods, respectively. When constructing the LSTM prediction model, the simulation environment, hyperparameters, and prediction features are all set according to the values specified in Section 4.3.2. Figure 4 The predicted and actual values for the three prediction models are given. Table 5 shows the MAPE and RMSE values for the three prediction models.
[0052] Depend on Figure 4 It can be seen that all three prediction models can roughly reconstruct the trend of user net load changes, but their prediction performance is poor at points where the data suddenly rises or falls. The adaptive frequency domain decomposition method - LSTM model is better at predicting fluctuations in user net load than the other two models. Compared with the LSTM model, the frequency domain decomposition method - LSTM model shows only a small improvement in prediction accuracy, further demonstrating that using the traditional frequency domain decomposition method to decompose user net load data with daily and weekly cycles as frequency sets does not significantly reduce the prediction difficulty.
[0053] Table 5. Prediction errors of various prediction models As shown in Table 5, compared with LSTM and frequency domain decomposition-LSTM, the adaptive frequency domain decomposition-LSTM improved the prediction accuracy by 8.27% and 6.81%, respectively, and reduced the mean absolute error per time step by 0.0354 and 0.0236. In terms of prediction accuracy, adaptive frequency domain decomposition effectively improved the predictive power of the prediction model.
[0054] This embodiment, after processing user load data using the traditional frequency domain decomposition method, found that after decomposing the user load data into daily, weekly, and aperiodic components, the proportion of the periodic component in the original data was low, and the variation trend of the aperiodic component was similar to that of the original data, failing to achieve the goal of reducing prediction difficulty. This embodiment proposes an adaptive frequency domain decomposition method based on a genetic algorithm. The genetic algorithm finds the optimal frequency set among all frequency sets and then performs frequency domain decomposition. Experimental results demonstrate that the adaptive frequency domain decomposition method is an effective preprocessing method for user load data. After processing using the adaptive frequency domain decomposition method, the fluctuations in user load become smoother, and the average amplitude decreases.
[0055] Furthermore, the user net load data was divided into long-period, short-period, and aperiod components using an adaptive frequency domain decomposition method. The long-period and short-period components can be predicted using trend extrapolation. Since the factors influencing the changes in photovoltaic (PV) output during aperiod and non-PV output periods are different, and only the non-PV output period exhibits periodicity, using an LSTM model to predict the aperiod component would neither fully utilize the periodicity of the non-PV output period nor accurately fit the relationship between the PV output period prediction features and the aperiod component. This embodiment constructs a prediction model combining convolutional structures, LSTM units, and LSTM skip units—the LSTSM model. The LSTSM model training process is divided into two parts: the first part uses convolutional kernels to smooth historical data and extract the coupling relationships between features; the second part uses LSTM skip units to predict the non-PV output period of the aperiod component and LSTM units to predict the PV output period of the aperiod component. This separate prediction approach fully utilizes the periodicity of the non-PV output period without affecting the fitting of the relationship between the PV output period prediction features and the load.
[0056] In recent years, numerous studies and experiments have demonstrated that LSTM models can effectively improve the accuracy of short-term net load forecasting. LSTM networks, with their unique gate control structure and learning method, possess strong nonlinear fitting capabilities and can fully exploit the temporal correlations of time series data. However, LSTM networks lack representation learning capabilities and cannot find coupling relationships between discontinuous high-dimensional features. Therefore, LSTM networks need to be combined with other methods to explore high-dimensional feature coupling relationships. Secondly, user net load data exhibits periodicity, especially during periods without photovoltaic output, where load values at the same time point between adjacent days do not fluctuate significantly. Although LSTM networks have the ability to remember the inherent relationships within time series data, this ability weakens as the time series length increases. When sampling at 15-minute intervals, the interval between two consecutive days is 96 time points, significantly reducing the ability of LSTM to utilize the periodicity of periods without photovoltaic output. In summary, LSTM networks are suitable for short-term load forecasting, but due to their lack of representation learning capabilities and the ability to explore long-term relationships in time series data, they do not achieve optimal results when predicting the non-periodic components of user net load data.
[0057] This embodiment, based on CNN and LSTM networks, constructs a Long Short-Term Memory (LSTM) neural network to address the different variation patterns of the aperiodic components of user net load data during photovoltaic (PV) output periods and periods without PV output. The specific structure is as follows: Figure 5 As shown.
[0058] Depend on Figure 5As we can see, the LSTSM model consists of three parts: convolutional layers, recurrent layers, and fully connected layers. The first layer of LSTSM is a convolutional layer, which only contains convolutional kernels and no pooling layers. The main function of pooling layers is to reduce the dimensionality of features, as an excessive number of features can affect model efficiency. After filtering by the Spearman coefficient, the total number of predicted features in the user payload is relatively small, generally less than 10. Using pooling layers to reduce the dimensionality of predicted features in this case will affect the final prediction accuracy. The size of the convolutional kernel is generally chosen to be 1*3 or 3*3, i.e., a width of 1 or 3 and a length of 3. Constructing convolutional layers is to improve the representation learning ability of the prediction model and enhance the ability to extract the coupling relationships between multidimensional features. Secondly, convolutional layers can smooth historical payload data and reduce the impact of sudden changes on the model.
[0059] The second layer of LSTSM is the cyclic layer, which consists of LSTM cells and LSTM skip units. The LSTM skip units predict the periods when the user's net load has no photovoltaic output (aperiodic component), while the LSTM cells predict the periods when the user's net load has no photovoltaic output (aperiodic component). The mathematical expression for the LSTM skip unit is shown in the following equation.
[0060] In the formula: This represents the output value of the first h states.
[0061] As shown in the above formula, the difference between the LSTM skip unit and the LSTM unit lies in the fact that during training, the output value of the previous state becomes the output value of the previous h states, where h represents the value of the skipped state. The value of h can be determined by observing the historical patterns of user net load data (the value of h is determined to be 96 during periods without photovoltaic output). If the photovoltaic output data changes steadily and shows a periodic trend, the prediction performance of the LSTM skip unit will be better than that of the LSTM unit.
[0062] The third layer of LSTSM is a fully connected layer. The function of the fully connected layer is to integrate the outputs of the LSTM skip units and obtain the optimal output through the weights assigned during training. The mathematical expression for the fully connected layer is shown below.
[0063] In the formula, The weights represent the output of the skip LSTM unit. This represents the result of the skip LSTM unit output. Indicates bias. This represents the output value of the fully connected layer.
[0064] Despite the powerful learning capabilities of deep learning, each model has its limitations and drawbacks. To make prediction models more comprehensive and stable, combined prediction models have emerged. Building upon the theoretical foundation laid in previous sections, and aiming to improve the accuracy of predictions by overcoming the shortcomings of single models, this section constructs a combined prediction model for short-term net load using the adaptive frequency domain decomposition method and the LSTSM neural network. The specific process is as follows: Figure 6 As shown.
[0065] Depend on Figure 6 It can be seen that the process of the user short-term load combination prediction model based on the adaptive frequency domain decomposition method and LSTSM is as follows: (1) First, outlier detection is performed on the dataset, and then the outlier data is manually processed.
[0066] (2) The user net load data is decomposed into long-cycle components, short-cycle air volume and non-cycle components by using the adaptive frequency domain decomposition method.
[0067] (3) The predictive features of the non-periodic component are selected from the factors that affect the change of net load of users, such as light intensity, temperature and humidity, by using the Spearman coefficient, and then all predictive features are normalized.
[0068] (4) The LSTSM model is used to predict the aperiodic component of the user net load, and the trend extrapolation method is used to predict the short-periodic and long-period components. Finally, the prediction results of the aperiodic component and the prediction results of the periodic component are reconstructed to obtain the final prediction result of the user net load.
[0069] The analysis, combined with a case study, uses data from 42 days of measured net load data and weather data from 26 households in a smart community in New York State, USA. All 26 households are equipped with distributed power sources (photovoltaic power generation equipment) and are self-consuming. The smart meter data collection cycle is 15 minutes, resulting in 96 data points per household per day, totaling 4032 data points over 42 days. 35 days are the training set, and 7 days are the test set. The original data is as follows: Figure 7 , Figure 8 As shown.
[0070] Depend on Figure 7 , Figure 8 It can be seen that neither the net load data of a single household nor the net load data of 26 households has obvious periodicity, and the daily peak-to-valley difference fluctuates significantly and the fluctuation range is different.
[0071] Because the dimensions of the user net load prediction feature values are inconsistent, the numerical differences between various features are huge. If these features are directly input into the prediction model without preprocessing, features with large values will be identified as anomalous features, leading to a significant increase in network training time, and in severe cases, even causing the prediction model to fail to converge, affecting the prediction results. This embodiment uses a linear function to normalize the features, so that all features are mapped to the range [0,1].
[0072] In the formula: Represents the normalized features. Represents the features before normalization. This represents the maximum value of the feature. This represents the minimum value of the feature.
[0073] Generally, real-time data collected by sensors exhibits data gaps and anomalies, primarily due to transient malfunctions in the acquisition device, manifesting as missing or abnormal data values at a given moment. To ensure data quality, data anomalies and gaps typically require manual processing, commonly employing methods such as multiple interpolation, finding specific values, and averaging. The predicted characteristic values of user net load exhibit regular changes, with only a very few instances of significant increases or decreases. Therefore, data anomalies and gaps can be extrapolated based on trends. In this embodiment, missing and outlier values are replaced by the average value of nearby times, as shown in the formula below.
[0074] In the formula: Indicates the previous eigenvalue. This represents the next eigenvalue.
[0075] The error index of a forecasting model is determined by the magnitude of the deviation between the predicted and actual values. Analyzing the error index reveals the causes of the error, allowing for further improvement of the forecasting model and increased forecast accuracy. Currently, the following four error indices are commonly used in load forecasting: (1) Mean Absolute Error In the formula: Indicates the predicted value. Indicates the actual value. Indicates the number, the same applies below.
[0076] (2) Mean Square Error (3) Root mean square error (4) Mean absolute percentage error The four error metrics mentioned above each have their own evaluation principles, and it is impossible to prove which one is more authoritative. It is unreasonable to use only one evaluation metric to verify the model's effectiveness. In this embodiment, root mean square error and mean absolute percentage error are used to evaluate the proposed model.
[0077] The LSTSM model was implemented using the Keras and TensorFlow frameworks. The main hyperparameters of LSTSM include batch size, number of training iterations, and learning rate. All hyperparameter settings are shown in Table 6.
[0078] Table 6 Model Hyperparameter Settings This section uses models such as LSTSM, LSTM, GRU, and CNN-LSTM to simultaneously perform short-term predictions of the aperiodic components of user load. LSTSM is an improvement on CNN and LSTM, and its actual effectiveness in user load prediction can be verified by comparing it with LSTM and CNN-LSTM. Figure 9 A comparison chart of predicted and actual values for one day is provided. Table 7 presents evaluation metrics for various models.
[0079] Depend on Figure 9 As can be seen, the prediction curve of the LSTSM model proposed in this embodiment is closer to the actual value than the prediction curves of other prediction models. Although the net user load fluctuated sharply between time 55 and time 67, the LSTSM model also correctly predicted the data change trend. Only the predicted values at a few individual times were less accurate than those of other models, and overall, the performance was closer to the actual value.
[0080] Table 7 Evaluation Indicators for One-Day Prediction by Different Models for a Single Household Table 7 shows that the prediction accuracy of the LSTSM model is 6.6%, 8.46%, and 5.34% higher than that of LSTM, GRU, and CNN-LSTM models, respectively. The prediction results of the CNN-LSTM model demonstrate that extracting features through convolutional layers before inputting them into the model yields better prediction results compared to directly feeding the prediction features into the model. The higher prediction accuracy of the LSTSM model compared to the CNN-LSTM model proves that the idea of splitting the aperiodic component of user net load into periods without photovoltaic power output and periods with photovoltaic power output for separate training is correct; the prediction performance during periods without photovoltaic power output is significantly better than other models.
[0081] To further investigate the predictive performance of the LSTSM model, a rolling approach was adopted, increasing the prediction period from 1 day to 7 days. The prediction results are as follows:Figure 10 As shown in Table 8, the evaluation metrics for various models are presented.
[0082] Depend on Figure 10 It can be seen that most of the errors in the prediction models occur where the data fluctuates dramatically. On the third day, the net user load data changed smoothly, and the predicted values of all prediction models were very close to the actual values. On the second, fifth, and sixth days, the net user load fluctuated dramatically, but the prediction results of the LSTSM model did not show significant deviations and were significantly better than other prediction models.
[0083] Table 8 Evaluation Indicators for 7-Day Predictions by Different Models for Single Households As shown in Table 8, the RMSE and MAPE values of LSTSM were the lowest in the 7-day forecast, indicating that the LSTSM model proposed in this embodiment has a better forecasting effect. The accuracy of the 7-day forecast is lower than that of the 1-day forecast, mainly because the load changes drastically on the second, fifth, and sixth days of the 7-day period, causing an overall decrease in forecast accuracy. To further verify the forecasting effect of the LSTSM model under large net load conditions, the above four models were used to predict the total net load of 26 households in the community. Figure 11 A comparison chart of the predicted net load for 26 households and the actual values is provided. Table 9 shows the evaluation indicators for the 7-day predictions of the 26 households using different models.
[0084] Depend on Figure 11 It can be seen that the net load data for 26 households did not fluctuate as drastically as the net load data for a single household, and the daily peak and trough values were relatively close. The prediction performance of all four prediction models improved significantly. The LSTSM model performed significantly better than the other models during periods without photovoltaic power output.
[0085] Table 9 Evaluation Indicators for 7-Day Predictions by Different Models for 26 Households As shown in Table 9, compared with the prediction of net load for a single household, the prediction accuracy of all four prediction models increased significantly. The LSTSM model improved accuracy by 2.08%, 2.45%, and 0.35% compared to LSTM, GRU, and CNN-LSTM, respectively. Although the LSTSM model had the highest prediction accuracy, the improvement in accuracy decreased compared to the single-household prediction. This is mainly because the daily net load weakens periodically during periods without photovoltaic power output, leading to a smaller improvement in the prediction accuracy of the LSTSM model.
[0086] To more intuitively investigate whether the user short-term net load forecasting model based on adaptive frequency domain decomposition and LSTSM is more stable and accurate than other forecasting models, a comparison chart of the forecasting results of the LSTSM model, the frequency domain decomposition-LSTSM model, and the adaptive frequency domain decomposition-LSTSM model is drawn. Figure 12 A comparison chart of the predicted and actual values for each model for one household on one day is provided. Figure 13 A comparison chart of the predicted and actual values of each model for 7 days is given for one household. Table 10 gives the evaluation index of each prediction model for one day for one household.
[0087] Depend on Figure 12 It can be seen that the prediction results of the LSTSM model and the frequency domain decomposition method-LSTSM model are significantly worse than those of the adaptive frequency domain decomposition method-LSTSM model proposed in this embodiment during periods of drastic fluctuation in user net load (18 to 30 and 54 to 72). However, the adaptive frequency domain decomposition method-LSTSM model shows a significant error at time 48, which can be further improved.
[0088] Figure 13 It has been demonstrated that the adaptive frequency domain decomposition method-LSTSM model can predict load abrupt changes well in the long-term prediction process. However, there are also prediction errors. Even after the adaptive frequency domain decomposition method is applied, there may still be times when the load increases sharply and the prediction model cannot find the cause of the load increase, thus leading to prediction errors.
[0089] Table 10 Evaluation Indicators for Each Prediction Model for 1 Household As shown in Table 10, the model proposed in this embodiment has the lowest MAPE and RMSE values in both 1-day and 7-day forecasts, proving that the adaptive frequency domain decomposition method-LSTSM combined forecast model has practical value. To further study the model's forecasting effect under large numerical conditions, 672 data points were selected for forecasting the total net load of 26 households in the same community on the same date for the next 7 days. Figure 14 A comparison chart of the predicted and actual values of each model for 26 households over 7 days is provided, and Table 11 provides the evaluation indicators of each prediction model for 26 households over 7 days.
[0090] Table 11 Evaluation indicators for each prediction model for 26 households.
[0091] Depend on Figure 14It can be seen that the periodicity of the net load of the 26 households without photovoltaic output weakens, and the difference between peaks and troughs increases. The prediction results of the three prediction models do not show significant error points and almost perfectly reproduce the trend. Table 11 shows that the adaptive frequency domain decomposition method-LSTSM combined model has lower MAPE and RMSE values than other models for both 1-day and 7-day predictions. This indicates that the combination of the adaptive frequency domain decomposition method and the LSTSM model is effective and yields a superior prediction model.
[0092] This embodiment addresses the challenges of the diurnal periodicity of periods without photovoltaic (PV) output in user net load data and the different factors influencing the variation of PV output during non-periodic periods and periods without PV output. It proposes a prediction model composed of convolutional layers, LSTM units, and LSTM skip units, and verifies the effectiveness of the LSTSM model on real user net load data. Finally, the combined model adaptive frequency domain decomposition method-LSTSM is used to predict the net load data for a single household and 26 households for the next 1 day and 7 days, and the prediction results are compared with those of LSTSM and frequency domain decomposition method-LSTSM. Experimental results demonstrate that the combined model proposed in this embodiment has higher prediction accuracy and is suitable for short-term user net load forecasting.
[0093] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0095] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0096] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0097] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for predicting short-term net load for users based on adaptive frequency domain decomposition and long short-term skip memory networks, characterized in that, include: Acquire user payload data and handle outliers; The processed user net load data is decomposed into periodic and aperiodic components using an adaptive frequency domain decomposition method based on a genetic algorithm. Spearman correlation coefficient was used to screen out the predictive features for predicting aperiodic components from the candidate predictive features related to net load change, and then all predictive features were normalized. Based on the selected predictive features, the LSTSM model is used to predict the aperiodic component of the user net load data, and the trend extrapolation method is used to predict the periodic component of the user net load data. The prediction results of the aperiodic component and the prediction results of the periodic component are reconstructed to obtain the final prediction results of the user net load data.
2. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 1, characterized in that, Data with a correlation coefficient greater than 50% are used as candidate prediction features, which include temperature, humidity, light intensity, and net load values at adjacent times.
3. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 1, characterized in that, The periodic components include short-period components and long-period components; decomposing them into periodic components and aperiod components using an adaptive frequency domain decomposition method based on a genetic algorithm includes: Encode the set of all potential frequency domain decomposition rules; Generate an initial population and set selection, crossover, and mutation parameters; To convert user load data from the time domain to the frequency domain using Discrete Fourier Transform (DFT), the formula for DFT is: Frequency domain user load data obtained through Discrete Fourier Transform The Fourier expansion coefficients are and The formula is: The discrete Fourier transform can be used to obtain the coefficients of the Fourier expansion. , In the frequency domain, user payload data is decomposed into long-period components, short-period components, and aperiod components. Frequency domain decomposition is performed by generating frequency sets corresponding to each population based on the frequency domain decomposition rules. The decomposed user load data is transformed back from the frequency domain to the time domain using the inverse discrete Fourier transform, as shown in the expression: In the time domain, user payload data is decomposed into short-period components, long-period components, and aperiodic components. The pre-built prediction model is used to predict all aperiodic components. After sorting all populations based on fitness function values, selection, crossover, and mutation operations are performed. When the fitness function values no longer change, the population with the highest fitness function value is the optimal frequency domain decomposition set.
4. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 3, characterized in that, The fitness function is shown below: In the formula: Indicates the first Predicted values at each time point Indicates the first The actual value at each point in time. This represents the average of the actual values. Indicates the number of samples.
5. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 3, characterized in that, After Fourier decomposition, the user payload data is decomposed into mutually orthogonal frequency domain components. The original load can be The refactored expression is: In the formula: Represents the DC component. Represents short-period components, Represents long-period components, Indicates aperiodic components; In the process of extracting short-period and long-period components in the frequency domain, a modulo operation is introduced, where mod(m,n) represents the remainder when m is divided by n. Given user load data with 15-minute intervals and 96 time points per day, the frequency domain decomposition process is as follows: Time series of user net load data The expression after Fourier transform is: In the formula: Indicates the DC coefficient. This indicates the number of user net load time points; Short-period components Therefore The components and DC components at each time point are periodically changing. composition, The frequency set is: In the formula: Indicates the frequency of the DC component. Indicates the number of short-cycle time points. Represents the set of short-period frequencies; Long-period components Therefore The components are periodically changing at each time point, and the components do not contain any components with a periodicity of 10 ... Each time point represents a component of periodic variation. The frequency set is: In the formula: Indicates the number of long-period time points. Represents a set of long-period frequencies; Aperiodic components are the set of all frequency components in the frequency domain, excluding short-period and long-period components. The frequency set is: In the formula: This represents the set of non-periodic frequencies.
6. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 1, characterized in that, The formula for the Spearman correlation coefficient is: In the formula: This represents the i-th influence factor. This represents the average number of impact factors. This represents the i-th net load. This represents the average net load.
7. The user short-term net load prediction method based on adaptive frequency domain decomposition and long short-term skip memory network according to claim 1, characterized in that, The LSTSM model includes convolutional layers, recurrent layers, and fully connected layers; The first layer of LSTSM is a convolutional layer, which contains only convolutional kernels and no pooling layers; the size of the convolutional kernels is selected as 1*3 and 3*3, with a width of 1 or 3 and a length of 3; The second layer of LSTSM is the cyclic layer, which consists of LSTM units and LSTM jump units. The LSTM jump units are used to predict the non-periodic component of the user's net load data during periods without photovoltaic output, while the LSTM units are used to predict the non-periodic component of the user's net load during periods with photovoltaic output. The mathematical expression for the LSTM skip unit is: In the formula: This represents the output values of the first h states; Combining the above formula, the difference between an LSTM skip unit and an LSTM unit is that during the training process, the output value of the previous state becomes the output value of the previous h states, where h represents the value of the skipped state. The value of h can be determined by observing the historical patterns of user net load data, and the value of h is determined to be 96 during periods without photovoltaic power output. The third layer of LSTSM is a fully connected layer. This layer integrates the outputs of the LSTM skip units, obtaining the optimal output through the weights assigned during training. The mathematical expression for the fully connected layer is: In the formula, The weights represent the output of the skip LSTM unit. This represents the result of the skip LSTM unit output. Indicates bias. This represents the output value of the fully connected layer.