Intelligent smoothing method for grid-connected controller based on real-time power prediction
By using real-time power prediction and dynamic adjustment of the Savitzky-Golay filter window, combined with the ARIMA model and DTW/ACF to optimize the sliding window length, the problem of poor smoothing of the hydrogen fuel cell power curve was solved, and stable grid connection of new energy power generation was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID SHANDONG ELECTRIC POWER CO MARKETING SERVICE CENT (MEASURING CENT)
- Filing Date
- 2023-12-22
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies using Savitzky-Golay filters to smooth the power curve of hydrogen fuel cells struggle to effectively smooth out power fluctuations, leading to the impact of renewable energy generation on the power grid.
By dynamically adjusting the window size of the Savitzky-Golay filter through real-time power prediction, and combining the ARIMA model with dynamic time warping (DTW) and autocorrelation factor (ACF), the sliding window length is optimized to enhance the smoothing effect.
It effectively reduces the impact of new energy power generation on the power grid, improves the quality of grid-connected power, and enhances the smoothing effect on the output power of new energy power generation involving hydrogen fuel cells.
Smart Images

Figure CN117767348B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy power generation technology, and specifically to a smart smoothing method for grid-connected controllers based on real-time power prediction. Background Technology
[0002] In recent years, with the continuous growth of energy demand and the increasing requirements for environmental protection, the new energy power generation industry has gradually become a global focus. The new energy power generation industry includes solar and wind power, but because the power generation of solar and wind power is affected by a series of factors such as weather, temperature, and the angle of sunlight, it suffers from instability in power generation. Therefore, energy storage systems, such as hydrogen fuel cells, have been introduced. These systems can store excess energy, which can be released when new energy power generation is insufficient.
[0003] However, in order to reduce the impact of renewable energy generation on the power grid and improve the quality of grid-connected power, the power curve needs to be smoothly adjusted according to real-time demand in the grid-connected control of hydrogen fuel cells. Existing technologies generally use Savitzky-Golay filters to smooth the power curve of hydrogen fuel cells. However, when using Savitzky-Golay filters to smooth the power curve of hydrogen fuel cells, a window of the same size is usually used. Using a window of the same size may result in an overly smoothed power curve when there are power fluctuations, or it may not be able to smooth the curve well to eliminate noise when the overall power fluctuations are small. This leads to poor smoothing effect and cannot effectively reduce the impact of renewable energy generation on the power grid. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides an intelligent smoothing method for grid-connected controllers based on real-time power prediction. The specific technical solution adopted is as follows:
[0005] This invention provides a smart smoothing method for grid-connected controllers based on real-time power prediction, comprising the following steps:
[0006] Obtain the actual output power of the hydrogen fuel cell at each historical moment, the predicted actual output power of the hydrogen fuel cell at each future moment, and the actual output power of the hydrogen fuel cell at the current moment;
[0007] Based on the actual output power corresponding to each historical moment and the predicted actual output power corresponding to each future moment, the actual output power window and the predicted output power window corresponding to the current moment are obtained.
[0008] The length of the sliding window corresponding to the current moment is obtained based on the actual output power window, the predicted output power window, and the actual output power corresponding to the current moment.
[0009] Based on the actual output power window and the predicted output power window, the window adjustment factor corresponding to the hydrogen fuel cell at the next moment is obtained;
[0010] The length of the sliding window at the next moment is obtained based on the window adjustment factor and the length of the sliding window at the current moment.
[0011] Based on the length of the sliding window corresponding to the next time step, the sliding window corresponding to the hydrogen fuel cell at the next time step is obtained; the sliding window corresponding to the hydrogen fuel cell at the next time step is smoothed using a Savitzky-Golay filter.
[0012] Preferably, the method for obtaining the actual output power of the hydrogen fuel cell at each historical moment and the method for obtaining the actual output power of the hydrogen fuel cell at the current moment includes:
[0013] Obtain the actual output power and grid-connected power corresponding to each historical moment in the historical time period monitored by the hydrogen fuel cell grid-connected controller;
[0014] Obtain the actual output power and grid-connected power at the current moment as monitored in the hydrogen fuel cell grid-connected controller;
[0015] For any given moment, the actual output power and grid-connected power are as follows: when the difference between the grid-connected power and the actual output power at that moment is greater than 0, the difference is recorded as the actual output power at that moment; when the difference is less than or equal to 0, 0 is recorded as the actual output power at that moment.
[0016] Preferably, the method for obtaining the predicted actual output power of a hydrogen fuel cell at various future moments includes:
[0017] An ARIMA model is established based on the actual output power and grid-connected power corresponding to each historical moment in the historical time period and the actual output power and grid-connected power corresponding to the current moment. Based on the ARIMA model, the predicted output power and predicted grid-connected power of the hydrogen fuel cell corresponding to each future moment in the future time period are predicted.
[0018] For any future moment in a future time period of a hydrogen fuel cell: if the value of the predicted grid-connected power minus the predicted output power at that future moment is greater than 0, then the value of the predicted grid-connected power minus the predicted output power at that future moment is recorded as the predicted actual output power at that future moment; if the value of the predicted grid-connected power minus the predicted output power at that future moment is less than or equal to 0, then 0 is recorded as the predicted actual output power at that future moment.
[0019] Preferably, the method for obtaining the actual output power window and the predicted output power window corresponding to the current time includes:
[0020] The window constructed from the actual output power of the N1 consecutive historical moments adjacent to and preceding the current moment in time is denoted as the actual output power window corresponding to the current moment; where N1 is a positive integer.
[0021] The window constructed from the predicted actual output power corresponding to the N2 consecutive future times adjacent to the current time and located temporally after the current time is denoted as the predicted output power window corresponding to the current time; where N2 is a positive integer.
[0022] Preferably, the method for obtaining the length of the sliding window corresponding to the current moment includes:
[0023] The value obtained by adding 1 to the sum of the actual output power in the actual output power window and the predicted actual output power in the predicted output power window is recorded as the length of the sliding window at the current moment.
[0024] Preferably, the method for obtaining the window adjustment factor of the hydrogen fuel cell at the next time step includes:
[0025] The average value of all actual output powers in the actual output power window corresponding to the current time is recorded as the average output power value of the actual output power window corresponding to the current time.
[0026] The average value of all predicted actual output powers in the predicted output power window corresponding to the current time is recorded as the average output power of the predicted output power window corresponding to the current time.
[0027] Based on all actual output powers in the actual output power window, the average output power of the actual output power window, all predicted actual output powers in the predicted output power window, and the average output power of the predicted output power window, the window optimization factor corresponding to the hydrogen fuel cell at the next time step is obtained.
[0028] Calculate the DTW distance between the actual output power window and the predicted output power window corresponding to the current moment;
[0029] Calculate the N1+1 order lag autocorrelation between the actual output power window and the predicted output power window corresponding to the current time; where N1 is a positive integer.
[0030] Based on the window optimization factor, the DTW distance, and the N1+1 order hysteresis autocorrelation degree, the window adjustment factor corresponding to the hydrogen fuel cell at the next time step is obtained.
[0031] Preferably, the window optimization factor for the hydrogen fuel cell at the next time step is calculated according to the following formula:
[0032]
[0033] in, Let exp be the window optimization factor for the hydrogen fuel cell at the next time step, N1 be an exponential function with the natural constant e as the base, and r1 be the number of actual output powers within the actual output power window corresponding to the current time step. i Let U1 be the i-th actual output power in the actual output power window corresponding to the current time, U2 be the average output power in the actual output power window corresponding to the current time, and N2 be the number of predicted actual output powers in the predicted output power window corresponding to the current time. j U1 represents the j-th predicted actual output power in the predicted output power window corresponding to the current time, and U2 represents the average output power in the predicted output power window corresponding to the current time.
[0034] Preferably, the window adjustment factor for the hydrogen fuel cell at the next time step is calculated according to the following formula:
[0035]
[0036] Where ε is the window adjustment factor for the hydrogen fuel cell at the next time step. Here, is the window optimization factor for the hydrogen fuel cell at the next time step, Norm() is the normalization function, W1 is the actual output power window at the current time step, W2 is the predicted output power window at the current time step, DTW(W1,W2) is the DTW distance between the actual output power window and the predicted output power window at the current time step, and ACF is the variable. N1+1 (W1,W2) represents the N1+1 order lag autocorrelation between the actual output power window at the current time and the predicted output power window at the current time, where N1 is the number of actual output powers in the actual output power window at the current time.
[0037] Preferably, the method for obtaining the length of the sliding window corresponding to the next moment includes:
[0038] Round the product of the window adjustment factor and the length of the sliding window at the current moment to the nearest integer.
[0039] When the rounded-down value is even, the sum of 1 and the rounded-down value is recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next moment.
[0040] When the rounded-down value is odd, the rounded-down value is directly recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next moment.
[0041] Preferably, the method for obtaining the sliding window corresponding to the hydrogen fuel cell at the next moment includes:
[0042] Obtain the actual output power of the hydrogen fuel cell at the next moment, the actual output power at each moment preceding the next moment in time, and the predicted actual output power at each future moment following the next moment in time.
[0043] The sliding window corresponding to the next time moment is obtained based on the length of the sliding window corresponding to the next time moment, the actual output power corresponding to the next time moment, the actual output power corresponding to each time moment preceding the next time moment in time, and the predicted actual output power corresponding to each future time moment following the next time moment in time. The actual output power corresponding to the next time moment is located in the middle position of the sliding window corresponding to the next time moment. The number of actual output powers to the left and predicted actual output powers to the right of the actual output power corresponding to the next time moment in the sliding window is equal, and the sum of the number of actual output powers to the left and the number of predicted actual output powers to the right plus 1 is the length of the sliding window corresponding to the next time moment.
[0044] Beneficial Effects: This invention first obtains the actual output power of the hydrogen fuel cell at each historical time point, the predicted actual output power at each future time point, and the actual output power at the current time point. Then, based on the actual output power at each historical time point and the predicted actual output power at each future time point, it obtains the actual output power window and the predicted output power window at the current time point. Based on the actual output power window, the predicted output power window, and the actual output power at the current time point, it obtains the length of the sliding window at the current time point. Next, based on the actual output power window and the predicted output power window, it obtains the window adjustment factor for the hydrogen fuel cell at the next time point. Based on the window adjustment factor and the length of the sliding window at the current time point, it obtains the length of the sliding window at the next time point. Finally, based on the length of the sliding window at the next time point, it obtains the sliding window for the hydrogen fuel cell at the next time point, and smooths the sliding window at the next time point using a Savitzky-Golay filter. This invention can enhance the smoothing effect on the output power of new energy power generation involving hydrogen fuel cells, effectively reducing the impact of new energy power generation on the power grid. Attached Figure Description
[0045] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a flowchart of a grid-connected controller intelligent smoothing method based on real-time power prediction according to the present invention. Detailed Implementation
[0047] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the protection scope of the embodiments of the present invention.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art.
[0049] This embodiment provides a smart smoothing method for grid-connected controllers based on real-time power prediction, which is described in detail below:
[0050] like Figure 1As shown, this intelligent smoothing method for grid-connected controllers based on real-time power prediction includes the following steps:
[0051] Step S001: Obtain the actual output power of the hydrogen fuel cell at each historical moment, the predicted actual output power of the hydrogen fuel cell at each future moment, and the actual output power of the hydrogen fuel cell at the current moment.
[0052] This embodiment first obtains the actual output power and grid-connected power corresponding to each historical moment in the historical time period monitored by the hydrogen fuel cell grid-connected controller, and obtains the actual output power and grid-connected power corresponding to the current moment monitored by the hydrogen fuel cell grid-connected controller; the actual output power and grid-connected power can be directly obtained through the power detection module; in specific applications, it is necessary to set the length of the historical time period and the time interval between adjacent historical moments according to the actual situation; and the current moment and the historical time period are continuous in time.
[0053] Then, based on the actual output power and grid-connected power at each historical moment monitored by the hydrogen fuel cell grid-connected controller, and the actual output power and grid-connected power at the current moment, an ARIMA model is established. According to the ARIMA model, the predicted output power and predicted grid-connected power of the hydrogen fuel cell at each future moment in the future time period are predicted. Since the establishment and prediction process of the ARIMA model is a well-known technology, it will not be described in detail in this example.
[0054] Because in the process of renewable energy power generation, when the output power cannot reach the grid-connected power, it is necessary to supplement the power through hydrogen fuel cells. Therefore, for the grid-connected process involving hydrogen fuel cells, the actual output power needs to be determined based on the activation function, the actual output power, and the grid-connected power. Similarly, the predicted actual output power also needs to be determined based on the activation function, the predicted output power, and the predicted grid-connected power. Therefore, for any historical moment within the historical time period monitored by the hydrogen fuel cell grid-connected controller: based on the actual output power and grid-connected power corresponding to that historical moment, the actual output power of the hydrogen fuel cell at that historical moment is obtained. The actual output power of the hydrogen fuel cell at that historical moment is calculated using the following formula:
[0055] G1 = ReLU(β1 - α1)
[0056] Where G1 is the actual output power of the hydrogen fuel cell at this historical moment, ReLU() is the activation function, β1 is the grid-connected power of the hydrogen fuel cell at this historical moment, and α1 is the actual output power of the hydrogen fuel cell at this historical moment.
[0057] Then, based on the actual output power and grid-connected power at the current moment, the actual output power of the hydrogen fuel cell at the current moment is obtained; the actual output power of the hydrogen fuel cell at the current moment is calculated using the following formula:
[0058] G2=ReLU(β2-α2)
[0059] Where G2 is the actual output power of the hydrogen fuel cell at the current moment, ReLU() is the activation function, β2 is the grid-connected power of the hydrogen fuel cell at the current moment, and α is the actual output power of the hydrogen fuel cell at the current moment.
[0060] For any future moment in the future time period of a hydrogen fuel cell: based on the predicted output power and predicted grid-connected power corresponding to that future moment, the predicted actual output power of the hydrogen fuel cell at that future moment is obtained; the predicted actual output power of the hydrogen fuel cell at that future moment is calculated using the following formula:
[0061] G3 = ReLU(β3 - α3)
[0062] Where G3 is the predicted actual output power of the hydrogen fuel cell at this future time, ReLU() is the activation function, β3 is the predicted grid-connected power of the hydrogen fuel cell at this future time, and α3 is the predicted output power of the hydrogen fuel cell at this future time.
[0063] Thus, we have obtained the actual output power of the hydrogen fuel cell at each historical moment in the historical time period, the predicted output power of the hydrogen fuel cell at each future moment in the future time period, and the actual output power of the hydrogen fuel cell at the current moment.
[0064] Step S002: Based on the actual output power corresponding to each historical time and the predicted actual output power corresponding to each future time, obtain the actual output power window and the predicted output power window corresponding to the current time; based on the actual output power window, the predicted output power window, and the actual output power corresponding to the current time, obtain the length of the sliding window corresponding to the current time.
[0065] To reduce the impact of renewable energy generation on the power grid and improve the quality of grid-connected power, the hydrogen fuel cell grid-connected controller needs to balance the unstable power output of renewable energy sources when participating in grid connection. This smooths the power output to the grid and reduces damage to the grid. In other words, in today's renewable energy generation systems such as photovoltaics and wind power, the addition of hydrogen fuel cells can smooth the impact on the grid when the output power of renewable energy generation is unstable. Typically, a Savitzky-Golay filter is used to smooth the power curve of the hydrogen fuel cell. Although the Savitzky-Golay filter can effectively preserve data information and filter out noise, smoothing the power curve of a hydrogen fuel cell using the Savitzky-Golay filter requires setting a fixed window length in advance to perform least-squares polynomial fitting on the data within the window. That is, a window of the same size is used for smoothing. Using windows of the same size may result in an overly smoothed power curve during power fluctuations, or it may fail to effectively smooth the curve and eliminate noise when overall power fluctuations are small, leading to poor smoothing effects and an inability to effectively reduce the impact of renewable energy generation on the grid. For example, when the window is set too long, fluctuations caused by increased power at the renewable energy end and increased power demand at the grid end may also be treated as noise and partially eliminated, resulting in poor smoothing effects. Moreover, since the grid-connected control of hydrogen fuel cells is an online application, and the process of smoothing the power curve of hydrogen fuel cells using Savitzky-Golay filters only uses historical data to smooth the power curve, a lag problem will occur. For example, using data of length 2n+1 to smooth the curve at point n will result in a lag of n, where n is a positive integer. This situation is not conducive to grid-connected control, i.e., it cannot better cope with grid changes. Therefore, to enhance the smoothing effect and enable hydrogen fuel cells to adjust their power output in a timely manner to cope with changes, this embodiment provides a smart smoothing method for grid-connected controllers based on real-time power prediction. This method dynamically adjusts the window size of the Savitzky-Golay filter by using the actual output power and the predicted actual output power. This enhances the smoothing effect on the output power of new energy power generation involving hydrogen fuel cells, and the hydrogen fuel cells can adjust their power output in a timely manner to cope with changes, effectively reducing the impact of new energy power generation on the power grid. Therefore, this embodiment will analyze the actual output power and predicted actual output power obtained above. First, it will determine the actual output power window, the predicted output power window, and the length of the sliding window corresponding to the current moment. The actual output power window, the predicted output power window, and the length of the sliding window corresponding to the current moment are important parameters for effectively reducing the impact of new energy power generation on the power grid and improving the grid-connected power quality. Specifically:
[0066] The window constructed from the actual output power of the N1 consecutive historical moments adjacent to and preceding the current moment is denoted as the actual output power window corresponding to the current moment; the window constructed from the predicted actual output power of the N2 consecutive future moments adjacent to and following the current moment is denoted as the predicted output power window corresponding to the current moment; the actual output power window, the actual output power, and the predicted output power window corresponding to the current moment are used as the sliding window corresponding to the current moment, and the length of the sliding window corresponding to the current moment is N1+N2+1; within the sliding window corresponding to the current moment... The actual output power at time t is centered. Within the sliding window corresponding to the current time, the actual output power window at the current time is to the left of the actual output power at the current time, and the predicted output power window at the current time is to the right of the actual output power at the current time. In specific applications, the values of N1 and N2 need to be set according to the actual situation. In this embodiment, the values of N1 and N2 are both set to 20, so the length of the sliding window corresponding to the current time is 41. Moreover, the actual output power at the current time can be smoothly fitted based on the Savitzky-Golay filter and the sliding window corresponding to the current time.
[0067] Thus, we have obtained the actual output power window, the predicted output power window, and the length of the sliding window at the current moment.
[0068] Step S003: Based on the actual output power window and the predicted output power window, obtain the window adjustment factor corresponding to the hydrogen fuel cell at the next moment.
[0069] New energy power generation is affected by factors such as weather. For example, in photovoltaic power generation, the photovoltaic power is affected by the intensity of solar radiation, which is the most important and direct factor affecting power variation. Cloud cover can cause a sudden drop in power, while cloud cover dissipation can cause a sudden increase in power, resulting in a relatively steep fluctuation in output power. Furthermore, this fluctuation cannot be eliminated during smoothing. Therefore, when smoothing the output power curve of a hydrogen fuel cell grid-connected controller using a filter, it is necessary to filter out noise while ensuring real-time response to power changes caused by solar radiation fluctuations. The application of actual output power prediction can effectively reflect the changes in new energy power generation, calculating the similarity and stability between actual and predicted actual output power. The length of the sliding window can be dynamically adjusted to ensure effective noise filtering and smoothing of the curve when the power is stable, while retaining fluctuation information when the power fluctuates. This avoids the problems of an overly large window length causing the curve to be too smooth and ignoring fluctuations, and an underly small window length failing to effectively filter noise. Specifically, during the smoothing of the hydrogen fuel cell's output power, the window length needs to be larger than the length of the region with minor fluctuations. This ensures that noise in the output power curve is eliminated while retaining the information about the hydrogen fuel cell's output power changes. Therefore, in this embodiment, based on the actual output power window and the predicted output power window, the window adjustment factor corresponding to the hydrogen fuel cell at the next time step will be determined. Subsequently, the length of the sliding window corresponding to the next time step will be determined based on the window adjustment factor. Specifically:
[0070] Next, the window adjustment factor for the hydrogen fuel cell at the next time step needs to be determined based on the similarity between the actual output power window and the predicted output power window at the current moment. In this embodiment, the difference is supplemented by the autocorrelation degree of ACF based on the DTW dynamic bending distance to jointly measure the overall similarity between the actual output power window and the predicted output power window. The main reason for supplementing the difference by the autocorrelation degree of ACF based on the DTW dynamic bending distance to measure the overall similarity between the actual output power window and the predicted output power window is that: although the DTW distance between sequences can ensure that the similarity of the fluctuation pattern is taken into account when the fluctuation state between the windows is similar, thus accurately assessing the distance between the subsequences corresponding to the data points in the two windows, when there is a relatively abrupt change in output power in the data of one sequence and the other sequence When data changes are relatively stable, for example, if a sequence experiences a sharp fluctuation in output power due to weather changes, the abrupt output power during DTW dynamic normalization might correspond to a large number of data points in a more stable sequence. Therefore, using DTW distance for similarity measurement is unreliable. This embodiment requires similarity compensation using ACF (Adaptive Convergence Fault) based on DTW to more accurately assess the similarity between the actual output power window and the predicted output power window at the current moment, thereby obtaining a more reliable window adjustment factor. Therefore, this embodiment first determines the window optimization factor based on the actual output power window and the predicted output power window at the current moment. This window optimization factor reflects the similarity of fluctuations between the actual and predicted output power windows. Subsequently, the window adjustment factor is determined based on the window optimization factor, specifically:
[0071] The average of all actual output powers within the actual output power window corresponding to the current time is recorded as the average output power of the actual output power window corresponding to the current time. The average of all predicted actual output powers within the predicted output power window corresponding to the current time is recorded as the average output power of the predicted output power window corresponding to the current time. Based on the actual output powers within the actual output power window corresponding to the current time, the average output power of the actual output power window corresponding to the current time, the predicted actual output powers within the predicted output power window corresponding to the current time, and the average output power of the predicted output power window corresponding to the current time, the window optimization factor for the hydrogen fuel cell at the next time is obtained. The next time refers to a time adjacent to the current time and located after the current time in time. The window optimization factor for the hydrogen fuel cell at the next time is calculated according to the following formula:
[0072]
[0073] in, Let exp be the window optimization factor for the hydrogen fuel cell at the next time step, N1 be an exponential function with the natural constant e as the base, and r1 be the number of actual output powers within the actual output power window corresponding to the current time step. i Let U1 be the i-th actual output power in the actual output power window corresponding to the current time, U2 be the average output power in the actual output power window corresponding to the current time, and N2 be the number of predicted actual output powers in the predicted output power window corresponding to the current time. j U1 represents the j-th predicted actual output power in the predicted output power window corresponding to the current time, and U2 represents the average output power in the predicted output power window corresponding to the current time.
[0074] when The smaller the value, the more it indicates The smaller the value, the better. The smaller the value, the more similar the fluctuations between the actual output power window and the predicted output power window at the current moment; when The larger the value, the more it indicates The larger the value, the more... The larger the value, the less similar the fluctuations are between the actual output power window and the predicted output power window at the current moment.
[0075] Since the window optimization factor calculated above can reflect the similarity of fluctuations between the actual output power window and the predicted output power window at the current moment, when the window optimization factor is small, this embodiment tends to evaluate the similarity between windows through the DTW distance, that is, it tends to determine the window adjustment factor through the DTW distance. When the window optimization factor is large, this embodiment tends to evaluate the similarity between windows through the ACF autocorrelation degree, that is, it tends to determine the window adjustment factor through the autocorrelation degree (ACF). Therefore, this embodiment calculates the DTW distance between the actual output power window and the predicted output power window at the current moment, and calculates the N1+1 hysteresis autocorrelation degree between the actual output power window and the predicted output power window at the current moment. Based on the window optimization factor of the hydrogen fuel cell at the next moment, the DTW distance between the actual output power window and the predicted output power window at the current moment, and the N1+1 hysteresis autocorrelation degree between the actual output power window and the predicted output power window at the current moment, the window adjustment factor of the hydrogen fuel cell at the next moment is obtained. The window adjustment factor of the hydrogen fuel cell at the next moment is calculated according to the following formula:
[0076]
[0077] Where ε is the window adjustment factor for the hydrogen fuel cell at the next time step. Here, is the window optimization factor for the hydrogen fuel cell at the next time step, Norm() is the normalization function, W1 is the actual output power window at the current time step, W2 is the predicted output power window at the current time step, DTW(W1,W2) is the DTW distance between the actual output power window and the predicted output power window at the current time step, and ACF is the variable. N1+1 (W1,W2) represents the N1+1 order lag autocorrelation between the actual output power window at the current time and the predicted output power window at the current time, where N1 is the number of actual output powers in the actual output power window at the current time.
[0078] In this embodiment, the process of obtaining the DTW distance between the actual output power window and the predicted output power window at the current time, as well as the N1+1 order hysteresis autocorrelation (ACF) between the actual output power window and the predicted output power window at the current time, is a well-known technique, and therefore will not be described in detail in this embodiment.
[0079] Furthermore, a larger window adjustment factor ε for the hydrogen fuel cell at the next time step indicates a greater similarity between the actual and predicted output power windows at the current time step, suggesting stable external conditions. In this case, the window at the next time step can be enlarged, enhancing the smoothing process's noise reduction effect. Conversely, a smaller window adjustment factor ε for the hydrogen fuel cell at the next time step indicates a less similarity between the actual and predicted output power windows at the current time step, suggesting rapid changes in external conditions, such as fragmented clouds causing intermittent sunlight. In this case, the window at the next time step can be appropriately reduced to ensure that noise information is removed without losing fluctuation information due to smoothing. The window optimization factor for the hydrogen fuel cell at the next time step... When the value is small, it indicates that the fluctuations between the actual output power window and the predicted output power window at the current moment are more similar. In this case, it is more likely to use DTW(W1,W2) to evaluate the similarity between the actual output power window and the predicted output power window at the current moment. That is, it is more likely to use DTW(W1,W2) to obtain the window adjustment factor of the hydrogen fuel cell at the next moment. The smaller the value of DTW(W1,W2), the higher the similarity between the actual output power window and the predicted output power window at the current moment. When the window optimization factor of the hydrogen fuel cell at the next moment is small, it indicates that the fluctuations between the actual output power window and the predicted output power window at the current moment are more similar. A larger value indicates a less similarity between the fluctuations in the actual output power window and the predicted output power window at the current moment. In this case, it is more likely to use ACF (Automatic Control Form). N1+1(W1,W2) evaluates the similarity between the actual output power window at the current time and the predicted output power window at the current time, i.e., it is more inclined to use ACF. N1+1 (W1, W2) obtains the window adjustment factor corresponding to the hydrogen fuel cell at the next time step, and ACF N1+1 The smaller the value of (W1,W2), the higher the autocorrelation between the actual output power window and the predicted output power window at the current time. The higher the autocorrelation, the higher the similarity between the actual output power window and the predicted output power window at the current time.
[0080] Thus, the window adjustment factor corresponding to the hydrogen fuel cell at the next moment was obtained.
[0081] Step S004: Based on the window adjustment factor and the length of the sliding window corresponding to the current time, obtain the length of the sliding window corresponding to the next time; based on the length of the sliding window corresponding to the next time, obtain the sliding window corresponding to the hydrogen fuel cell at the next time; smooth the sliding window corresponding to the hydrogen fuel cell at the next time using the Savitzky-Golay filter.
[0082] Next, this embodiment will determine the length of the sliding window at the next time step based on the window adjustment factor and the length of the sliding window at the current time step; then, based on the length of the sliding window at the next time step, determine the sliding window corresponding to the hydrogen fuel cell at the next time step; finally, smooth the sliding window corresponding to the hydrogen fuel cell at the next time step using a Savitzky-Golay filter; specifically:
[0083] The product of the window adjustment factor corresponding to the hydrogen fuel cell at the next time step and the length of the sliding window corresponding to the current time step is calculated. This product is then rounded down. If the rounded-down value is even, the sum of 1 and the rounded-down value is recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next time step. If the rounded-down value is odd, the rounded-down value is directly recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next time step. Therefore, it can be seen from the above that the length of the sliding window at time t+1 is determined by the length of the sliding window at time t and the window adjustment factor at time t+1; where t is a positive integer.
[0084] The system obtains the actual output power and grid-connected power at the next moment monitored by the hydrogen fuel cell grid-connected controller, as well as the actual output power and grid-connected power at each moment preceding the next moment in time. Then, it establishes an ARIMA model based on the actual output power and grid-connected power at the next moment monitored by the hydrogen fuel cell grid-connected controller, as well as the actual output power and grid-connected power at each moment preceding the next moment in time. Based on the ARIMA model, it predicts the predicted output power and predicted grid-connected power at each future moment following the next moment in time.
[0085] The actual output power of the hydrogen fuel cell at the next moment is obtained based on the real output power and grid-connected power monitored by the hydrogen fuel cell grid-connected controller. The actual output power at each moment preceding the next moment is obtained based on the monitored real output power and grid-connected power. The predicted actual output power at each future moment following the next moment is obtained based on the predicted output power and predicted grid-connected power. The methods for obtaining the actual output power at the next moment, the actual output power at each moment preceding the next moment, and the predicted actual output power at each future moment following the next moment are the same as those in step S001 for obtaining the actual output power at the current moment, the actual output power at each historical moment, and the predicted actual output power at each future moment. Therefore, the detailed process will not be described further.
[0086] Next, based on the length of the sliding window corresponding to the hydrogen fuel cell at the next moment, the actual output power at the next moment, the actual output power at each moment preceding the next moment in time, and the predicted actual output power at each future moment following the next moment in time, the sliding window corresponding to the hydrogen fuel cell at the next moment in time is obtained. The actual output power at the next moment is located in the middle of the sliding window corresponding to the next moment. To the left of the actual output power at the next moment in the sliding window, there are the actual output powers at each moment preceding the next moment in time. To the right of the actual output power at the next moment in the sliding window, there are the predicted actual output powers at each future moment following the next moment in time. The number of actual output powers to the left and predicted actual output powers to the right of the actual output power at the next moment in the sliding window is equal. The length of the sliding window corresponding to the next moment is the sum of the number of actual output powers to the left and the number of predicted actual output powers to the right of the actual output power at the next moment in the sliding window, plus 1.
[0087] Then, the sliding window corresponding to the hydrogen fuel cell at the next moment is smoothed by the Savitzky-Golay filter to obtain the smoothed value. The smoothed value is used as the output power value of the hydrogen fuel cell at the next moment and is transmitted to the control module of the grid-connected controller. This value is then used for real-time control of the grid-connected controller.
[0088] This embodiment first obtains the actual output power of the hydrogen fuel cell at each historical time point, the predicted actual output power at each future time point, and the actual output power at the current time point. Then, based on the actual output power at each historical time point and the predicted actual output power at each future time point, it obtains the actual output power window and the predicted output power window for the current time point. Based on the actual output power window, the predicted output power window, and the actual output power at the current time point, it obtains the length of the sliding window for the current time point. Next, based on the actual output power window and the predicted output power window, it obtains the window adjustment factor for the hydrogen fuel cell at the next time point. Based on the window adjustment factor and the length of the sliding window at the current time point, it obtains the length of the sliding window for the next time point. Finally, based on the length of the sliding window for the next time point, it obtains the sliding window for the hydrogen fuel cell at the next time point and smooths it using a Savitzky-Golay filter. This embodiment enhances the smoothing effect on the output power of new energy power generation involving hydrogen fuel cells, effectively reducing the impact of new energy power generation on the power grid.
[0089] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A smart smoothing method for grid-connected controllers based on real-time power prediction, characterized in that, The method includes the following steps: Obtain the actual output power of the hydrogen fuel cell at each historical moment, the predicted actual output power of the hydrogen fuel cell at each future moment, and the actual output power of the hydrogen fuel cell at the current moment; Based on the actual output power corresponding to each historical moment and the predicted actual output power corresponding to each future moment, the actual output power window and the predicted output power window corresponding to the current moment are obtained. The length of the sliding window corresponding to the current moment is obtained based on the actual output power window, the predicted output power window, and the actual output power corresponding to the current moment. Based on the actual output power window and the predicted output power window, the window adjustment factor corresponding to the hydrogen fuel cell at the next moment is obtained; The length of the sliding window at the next moment is obtained based on the window adjustment factor and the length of the sliding window at the current moment. Based on the length of the sliding window corresponding to the next time step, the sliding window corresponding to the hydrogen fuel cell at the next time step is obtained; the sliding window corresponding to the hydrogen fuel cell at the next time step is smoothed using the Savitzky-Golay filter; Methods for obtaining the actual output power of a hydrogen fuel cell at various historical moments and the actual output power at the current moment include: Obtain the actual output power and grid-connected power corresponding to each historical moment in the historical time period monitored by the hydrogen fuel cell grid-connected controller; Obtain the actual output power and grid-connected power at the current moment as monitored in the hydrogen fuel cell grid-connected controller; For any given moment, the actual output power and grid-connected power are as follows: if the difference between the grid-connected power and the actual output power at that moment is greater than 0, then the difference is recorded as the actual output power at that moment; if the difference is less than or equal to 0, then 0 is recorded as the actual output power at that moment. Methods for obtaining the predicted actual output power of a hydrogen fuel cell at various future moments include: An ARIMA model is established based on the actual output power and grid-connected power corresponding to each historical moment in the historical time period and the actual output power and grid-connected power corresponding to the current moment. Based on the ARIMA model, the predicted output power and predicted grid-connected power of the hydrogen fuel cell corresponding to each future moment in the future time period are predicted. For any future moment in a future time period of a hydrogen fuel cell: if the value of the predicted grid-connected power minus the predicted output power at that future moment is greater than 0, then the value of the predicted grid-connected power minus the predicted output power at that future moment is recorded as the predicted actual output power at that future moment; if the value of the predicted grid-connected power minus the predicted output power at that future moment is less than or equal to 0, then 0 is recorded as the predicted actual output power at that future moment.
2. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 1, characterized in that, The method for obtaining the actual output power window and the predicted output power window corresponding to the current moment includes: The window constructed from the actual output power of the N1 consecutive historical moments adjacent to and preceding the current moment in time is denoted as the actual output power window corresponding to the current moment; where N1 is a positive integer. The window constructed from the predicted actual output power corresponding to the N2 consecutive future times adjacent to the current time and located temporally after the current time is denoted as the predicted output power window corresponding to the current time; where N2 is a positive integer.
3. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 2, characterized in that, The method for obtaining the length of the sliding window corresponding to the current moment includes: The value obtained by adding 1 to the sum of the actual output power in the actual output power window and the predicted actual output power in the predicted output power window is recorded as the length of the sliding window at the current moment.
4. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 1, characterized in that, Methods for obtaining the window adjustment factor of a hydrogen fuel cell at the next time step include: The average value of all actual output powers in the actual output power window corresponding to the current time is recorded as the average output power value of the actual output power window corresponding to the current time. The average value of all predicted actual output powers in the predicted output power window corresponding to the current time is recorded as the average output power of the predicted output power window corresponding to the current time. Based on all actual output powers in the actual output power window, the average output power of the actual output power window, all predicted actual output powers in the predicted output power window, and the average output power of the predicted output power window, the window optimization factor corresponding to the hydrogen fuel cell at the next time step is obtained. Calculate the DTW distance between the actual output power window and the predicted output power window corresponding to the current moment; Calculate the N1+1 order lag autocorrelation between the actual output power window and the predicted output power window corresponding to the current time; where N1 is a positive integer. Based on the window optimization factor, the DTW distance, and the N1+1 order hysteresis autocorrelation degree, the window adjustment factor corresponding to the hydrogen fuel cell at the next time step is obtained.
5. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 4, calculates the window optimization factor for the hydrogen fuel cell at the next time step according to the following formula: ; in, Let be the window optimization factor for the hydrogen fuel cell at the next time step, exp be an exponential function with the natural constant e as the base, and N1 be the number of actual output powers within the actual output power window corresponding to the current time step. This represents the i-th actual output power within the actual output power window corresponding to the current moment. N1 represents the average output power of the actual output power window corresponding to the current time, and N2 represents the number of predicted actual output powers in the predicted output power window corresponding to the current time. This represents the j-th predicted actual output power within the predicted output power window corresponding to the current moment. This represents the average output power of the predicted output power window corresponding to the current moment.
6. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 4, characterized in that, The window adjustment factor for the hydrogen fuel cell at the next time step is calculated using the following formula: ; in, This represents the window adjustment factor for the hydrogen fuel cell at the next time step. The window optimization factor for the hydrogen fuel cell at the next time step is defined by Norm(), which is the normalization function. This represents the actual output power window at the current moment. This represents the predicted output power window for the current moment. The DTW distance is the distance between the actual output power window and the predicted output power window at the current time. It represents the N1+1 order lag autocorrelation between the actual output power window corresponding to the current time and the predicted output power window corresponding to the current time, where N1 is the number of actual output powers in the actual output power window corresponding to the current time.
7. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 1, characterized in that, The method for obtaining the length of the sliding window corresponding to the next moment includes: Round the product of the window adjustment factor and the length of the sliding window at the current moment to the nearest integer. When the rounded-down value is even, the sum of 1 and the rounded-down value is recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next moment. When the rounded-down value is odd, the rounded-down value is directly recorded as the length of the sliding window corresponding to the hydrogen fuel cell at the next moment.
8. The intelligent smoothing method for grid-connected controllers based on real-time power prediction as described in claim 1, characterized in that, Methods for obtaining the sliding window corresponding to the next moment in a hydrogen fuel cell include: Obtain the actual output power of the hydrogen fuel cell at the next moment, the actual output power at each moment preceding the next moment in time, and the predicted actual output power at each future moment following the next moment in time. The sliding window corresponding to the next time moment is obtained based on the length of the sliding window corresponding to the next time moment, the actual output power corresponding to the next time moment, the actual output power corresponding to each time moment preceding the next time moment in time, and the predicted actual output power corresponding to each future time moment following the next time moment in time. The actual output power corresponding to the next time moment is located in the middle position of the sliding window corresponding to the next time moment. The number of actual output powers to the left and predicted actual output powers to the right of the actual output power corresponding to the next time moment in the sliding window is equal, and the sum of the number of actual output powers to the left and the number of predicted actual output powers to the right plus 1 is the length of the sliding window corresponding to the next time moment.