A short-term dynamic prediction method for solar energy based on reference energy distribution
By adopting a short-term dynamic prediction method based on reference energy distribution in solar energy prediction, using dynamic weighting factors and energy correction values, the problem of large prediction errors in the current technology when weather changes are severe, and higher prediction accuracy and energy management capabilities are achieved.
Patent Information
- Application Number
- CN202210758115.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-06-29
AI Technical Summary
Existing solar energy prediction methods have large prediction errors when weather changes dramatically, making it difficult to provide accurate short-term dynamic energy prediction.
A short-term dynamic prediction method of solar energy based on reference energy distribution is adopted, and a prediction model is composed by dynamic weighting factor weighting, the current slot energy value and the correction value of the most similar energy distribution are used for prediction, and the historical energy distribution pool is updated according to the time freshness and similarity.
It improves the accuracy of solar energy prediction in the case of severe weather changes, reduces prediction errors, and enhances the energy management capabilities of the energy harvesting network.
Smart Images

Figure CN115169670B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of wireless communication energy harvesting, and relates to a short-term dynamic prediction method for solar energy based on reference energy distribution. Background Art
[0002] Wireless sensor networks often use batteries for power supply, and are often deployed in harsh or inaccessible areas, where it is inconvenient or impossible to replace the batteries. Energy supply has become one of the biggest constraints on the development of wireless sensor networks. To solve the problem of continuous power supply for nodes in wireless sensor networks, energy harvesting technology has emerged. It harvests green energy in nature to power the nodes. Among them, solar energy has become the first choice for power supply of wireless sensor network nodes due to its advantages such as ubiquity, high energy density, and easy access. However, solar energy is greatly affected by day and night, seasons, location, etc., and has randomness, intermittency, and instability. Energy management is required to provide stable and continuous energy to the nodes. And energy prediction is the premise of energy management. By predicting the energy arrival situation at future moments or time periods, the nodes can formulate appropriate energy allocation and usage strategies. Currently, the mainstream solar energy prediction methods include EWMA, WCMA, Pro-Energy, and QL-SEP.
[0003] The prediction effect of EWMA is very significant under consistent weather conditions, but the prediction effect is not good and the prediction error is large when the weather changes violently. WCMA introduces a GAP factor on the basis of EWMA to reduce the prediction error caused by weather changes. Pro-Energy and QL-SEP further improve the prediction accuracy. However, when the weather changes violently, there are still huge prediction errors in these methods. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a short-term dynamic prediction method for solar energy based on reference energy distribution. The prediction model is composed of the energy value of the current time slot and the predicted energy correction value of the most similar energy distribution time slot weighted by a dynamic weight factor.
[0005] To achieve the above purpose, the present invention provides the following technical solutions:
[0006] A short-term dynamic prediction method for solar energy based on reference energy distribution, the method comprising the following steps:
[0007] S1: Divide a day into N time slots equally, and store the energy values collected in each time slot in an N×1 matrix; select the energy distributions of M typical weather conditions of sunny days, cloudy days, and rainy days in the past and store them in an N×M matrix, which is called the historical energy distribution;
[0008] S2: Select the most similar energy distribution from the typical weather energy distributions based on the difference between the solar energy values of the first K time slots of the prediction time slot (n + 1) predicted on the prediction day and the energy standard deviation of the last K time slots in the historical energy distribution, as well as their mean absolute error;
[0009] S3: Calculate the scaling factor erate according to the average percentage between the most similar energy distribution and the energy values of the first K time slots of the prediction time slot on the prediction day, and then calculate the energy correction value e of the most similar energy distribution at time slot n + 1 rep (n + 1);
[0010] S4: Calculate the dynamic weight factor a according to the degree to which the energy correction value of the most similar energy distribution at time slot n + 1 deviates from the average energy value of the first K time slots of the prediction time slot on the prediction day:
[0011] S5: Establish a prediction model to obtain the following solar energy prediction method:
[0012]
[0013] where is the energy prediction value of prediction time slot n + 1, e(n) is the energy value of the current time slot, e rep (n + 1) is the energy correction value of the prediction time slot of the most similar energy distribution, α is the dynamic weight factor, 0 < α < 1;
[0014] S6: After the energy value prediction of all time slots of each day is completed, update the historical energy distribution pool according to the time freshness and similarity. For the similarity between the N time slots of the current day and each historical energy distribution, if the minimum value of the value representing the similarity is greater than the threshold T max , replace the historical energy distribution with the highest similarity to the current day with the energy distribution of the current day. If the minimum value of the value representing the similarity is less than T min , replace the historical energy distribution that is the oldest from the current day with the energy distribution of the current day to update the energy pool.
[0015] Optionally, in S2, the specific steps for selecting the most similar energy distribution are as follows:
[0016] Calculate the difference in standard deviation between the first K time slots of the (n + 1)-th time slot of the prediction day and the historical energy distribution on the i-th day, and the calculation is as follows:
[0017]
[0018] where, is the average solar energy value of the first K time slots of time slot n + 1 on the prediction day, e(k) is the solar energy value of time slot k on the prediction day, is the average solar energy value of the first K time slots of time slot n + 1 of the model on the i-th day in the historical energy distribution, ei (k) is the solar energy value at the k-th time slot on the i-th day of the historical energy distribution;
[0019] The average energy error of the first K time slots of the predicted day and the (n + 1)-th time slot on the i-th day of the historical energy distribution is calculated as follows:
[0020]
[0021] The most similar energy distribution is the energy model with the minimum weighted sum of SDV(i) and ER(i), where i * is the most similar energy distribution, and its selection method is:
[0022] i * = argmin(β * ER(i) + SDV(i)) (4).
[0023] Optionally, in S3, the calculation steps of the energy correction value e rep (n + 1) for the most similar energy distribution at the (n + 1)-th time slot are as follows:
[0024] Calculate the scaling coefficient for scaling the energy value at the (n + 1)-th time slot of the most similar energy distribution as:
[0025]
[0026] In the formula, e m (k) is the energy value at the k-th time slot of the most similar energy distribution, e(k) is the predicted energy value at the k-th time slot of the predicted day. To prevent the correction value from being too large or too small due to interfering data, an energy ratio range is set: TH min 、TH max are the minimum and maximum thresholds respectively, which keep the energy correction value within a reasonable range, and e(k) / e m (k) is expressed as:
[0027]
[0028] The energy correction value at the (n + 1)-th time slot of the most similar energy distribution is calculated from the scaling coefficient erate and the energy value at the (n + 1)-th time slot of the most similar energy distribution as:
[0029] e rep (n + 1) = e m (n + 1) * erate
[0030] (7).
[0031] Optionally, in S4, the specific steps for calculating the dynamic weight factor α are as follows:
[0032] Calculate the variance of the energy values of the first K time slots before the (n + 1)-th time slot of the predicted day:
[0033]
[0034] Calculate the variance of the energy values of the K time slots before the (n + 1)-th time slot of the predicted day plus the energy correction value of the most similar energy distribution at the (n + 1)-th time slot:
[0035]
[0036] Among them, is the average energy value of the energy values of the K time slots before the (n + 1)-th time slot of the predicted day plus the energy correction value of the most similar energy distribution at the (n + 1)-th time slot, and the calculation is as follows:
[0037]
[0038] The dynamic weight factor is calculated from the above two variances:
[0039]
[0040] Among them, S is an adjustment parameter, in order to expand the range of the dynamic weight factor from 0 to 0.5 to 0 to 1.
[0041] Optionally, in S6, the steps for calculating the similarity between the entire predicted day and the historical energy distribution are as follows:
[0042]
[0043] Among them, N represents the total number of time slots of the predicted day, e(k), e i (k) are the solar energy values at the k-th time slot on the i-th day in the predicted day and the historical energy distribution respectively, and are the average solar energy values on the i-th day in the predicted day and the historical energy distribution respectively. The smaller the sim value, the higher the similarity.
[0044] The beneficial effects of the present invention are as follows:
[0045] (1) Aiming at the problem that the energy value difference between adjacent time slots is large and the correlation becomes weak under the condition of drastic weather changes, the present invention takes into account both the absolute energy error and the energy change trend, and selects the most similar energy distribution from the historical energy distribution to the greatest extent, so as to improve the prediction accuracy of the prediction method.
[0046] (2) The present invention calculates the error between the energy value of the predicted time slot of the most similar energy distribution caused by the number of historical energy distributions and the true value of the predicted time slot of the current day for the energy correction value, and uses the corrected energy value to replace the energy value of the predicted time slot of the most similar energy model in the prediction model for prediction, further improving the prediction accuracy.
[0047] (3) The present invention compares the energy correction value with the energy values of the previous K time slots before the predicted time slot to determine the weather change situation of the next time slot, and adjusts the weight factor in real time and dynamically. The prediction model can adapt to different weather changes and improve the accuracy of solar energy prediction in the energy harvesting network.
[0048] (4) The present invention updates the historical energy distribution pool according to time freshness and similarity, ensuring that the historical energy distribution changes with seasons, and increasing the reliability of the most similar energy distribution.
[0049] Other advantages, objectives and features of the present invention will be described to some extent in the subsequent specification, and to some extent, will be obvious to those skilled in the art based on the study of the following text, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be described in detail preferably with reference to the accompanying drawings, wherein:
[0051] Figure 1 It is a flowchart of the prediction algorithm. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] The following specific examples illustrate the embodiments of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present invention schematically, and the following embodiments and the features in the embodiments can be combined with each other without conflict.
[0053] Among them, the drawings are only for illustrative purposes, showing only schematic diagrams, rather than physical diagrams, and should not be construed as a limitation to the present invention; in order to better illustrate the embodiments of the present invention, some components in the drawings will be omitted, enlarged or reduced, and do not represent the dimensions of actual products; for those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0054] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components; in the description of the present invention, it should be understood that if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc. indicating the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, it is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, the terms describing the positional relationship in the accompanying drawings are only for illustrative purposes and cannot be construed as a limitation to the present invention. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific circumstances.
[0055] As Figure 1 shown, it is a flowchart of a short-term dynamic prediction method for solar energy based on reference energy distribution according to the present invention. Before prediction, each day is evenly divided into N time slots. The prediction steps are as follows: Select a total of M typical historical energy distributions for sunny days, rainy days, and cloudy days, record the solar energy values of each time slot, and select the most similar energy distribution from the M typical historical energy distributions according to the most similar energy distribution selection rule using the recently obtained solar energy values of the nearest K time slots. Calculate the energy correction value of the most similar energy distribution at the n + 1 time slot, then calculate the dynamic weight factor according to the dynamic weight factor calculation method. Predict the solar energy value at the n + 1 time slot of the prediction day based on the energy prediction model, the solar energy value at the n time slot, the energy correction value of the most similar energy distribution at the n + 1 time slot, and the dynamic weight factor. Determine whether all time slots of a day are completed. If not, wait for the arrival of the next time slot to continue the prediction. If all time slots have been predicted, calculate the similarity between the prediction day and all historical energy distributions and update the typical historical energy distributions.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the present technical solution, and they should all be covered by the scope of the claims of the present invention.
Claims
1. A short-term dynamic prediction method for solar energy based on reference energy distribution, characterized in that: The method includes the following steps: S1: Divide one day into N time slots equally, and store the energy values collected in each time slot in an N×1 matrix; select the energy distributions of M typical weather conditions on sunny, cloudy and rainy days in the past and store them in an N×M matrix, which is called the historical energy distribution; S2: Select the most similar energy distribution from the typical weather energy distributions according to the difference between the solar energy values of the first K time slots of the predicted time slot (n + 1) on the predicted day and the energy standard deviation of the last K time slots in the historical energy distribution, as well as their mean absolute error; S3: Calculate the scaling factor erate based on the average percentage between the predicted energy values of the first K time slots before the time slot predicted by the most similar energy distribution and the predicted day, and then calculate the energy correction value e of the most similar energy distribution at the (n + 1)-th time slot; rep (n + 1); In the above S3, the most similar energy distribution is the energy correction value e of the n+1 time slot rep (n+1) and the calculation steps are as follows: Calculate the scaling coefficient for scaling the energy value of the most similar energy distribution at time slot n + 1 as: Where, e m (k) is the energy value of the k-th time slot of the most similar energy distribution, and e(k) is the predicted energy value of the k-th time slot of the predicted day. To prevent the correction value from being too large or too small due to interfering data, an energy ratio range is set: TH min and TH max are the minimum and maximum thresholds respectively, which keep the energy correction value within a reasonable range. e(k) / e m (k) is expressed as: Calculate the energy correction value of the most similar energy distribution at time slot n + 1 from the scaling coefficient erate and the energy value of the most similar energy distribution at time slot n + 1 as: e rep (n + 1) = e m (n + 1)*erate(7) S4: Calculate the dynamic weight factor α according to the degree to which the energy correction value of the most similar energy distribution at time slot n + 1 deviates from the average energy value of the first K time slots of the predicted time slot on the predicted day; S5: Establish a prediction model to obtain the following solar energy prediction method: Among them is the predicted energy value of the prediction time slot n + 1, e(n) is the energy value of the current time slot, e rep (n + 1) is the energy correction value of the most similar energy distribution prediction time slot, α is the dynamic weight factor, 0 < α < 1; S6: After the prediction of the energy values of all time slots every day is completed, update the historical energy distribution pool according to the time freshness and similarity. For the similarity between the N time slots of the current day and each historical energy distribution, if the minimum value of the value representing the similarity is greater than the threshold T max , replace the historical energy distribution with the highest similarity to the current day with the energy distribution of the current day. If the minimum value of the value representing the similarity is less than T min , replace the historical energy distribution that is the farthest from the current day in time with the energy distribution of the current day, and update the energy pool; In the above S6, the steps for calculating the similarity between the entire predicted day and the historical energy distribution are as follows: Among them, N represents the total time slots of the prediction day, e(k), e i (k) are the solar energy values at the k-th time slot on the i-th day in the prediction day and the historical energy distribution respectively, and are the average solar energy values on the i-th day in the prediction day and the historical energy distribution respectively. The smaller the sim value, the higher the similarity.
2. The solar short-term dynamic prediction method based on the reference energy distribution according to claim 1, wherein: In the above S2, the specific steps for selecting the most similar energy distribution are as follows: Calculate the difference in standard deviation between the first K time slots of the (n + 1)-th time slot of the predicted day and the historical energy distribution on the i-th day, and the calculation is as follows: Among them, is the average solar energy value of the previous K time slots n + 1 time slots before the predicted day, and e(k) is the solar energy value of the k time slot on the predicted day. is the average solar energy value of the previous K time slots n + 1 time slots before the model on the i-th day in the historical energy distribution, and e i (k) is the solar energy value of the k time slot on the i-th day in the historical energy distribution; Calculate the average energy error between the first K time slots of the (n + 1)-th time slot of the predicted day and the historical energy distribution on the i-th day, and the calculation is as follows: The most similar energy distribution is the energy model with the minimum weighted sum of SDV(i) and ER(i), where i * is the most similar energy distribution, and its selection method is as follows: i * = argmin(β * ER(i) + SDV(i)) (4).
3. A short-term dynamic prediction method for solar energy based on reference energy distribution according to claim 1, characterized in that: In the above S4, the specific steps for calculating the dynamic weight factor α are as follows: Calculate the variance of the energy values of the first K time slots before time slot n + 1 on the predicted day: Calculate the variance of the energy values of the first K time slots before time slot n + 1 on the predicted day plus the energy correction value of the most similar energy distribution at time slot n + 1: Among them, is the average energy value of predicting the energy values of the first K time slots before the (n + 1)-th time slot and adding the energy correction value of the most similar energy distribution at the (n + 1)-th time slot, and the calculation is as follows: The dynamic weight factor is calculated from the above variances: where S is an adjustment parameter, in order to expand the range of the dynamic weight factor from 0 - 0.5 to 0 - 1.