SEHWS energy prediction method and device based on weather forecast
By adopting a weather forecast-based energy prediction method in solar energy collection wireless sensors, combining weather forecast data and historical data, and establishing an energy prediction model, the existing methods are solved inefficient and difficult to consider in resource-limited environments, achieving higher accuracy energy prediction and more reliable sensor network performance.
Patent Information
- Application Number
- CN202411761410.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
AI Technical Summary
Existing methods for solar collecting wireless sensor energy prediction rely mainly on machine learning and deep learning models or data flow-based prediction methods, however, these methods are inefficient in resource-limited environments and are difficult to accurately consider the impact of weather changes, resulting in low prediction accuracy.
A SEHWS energy prediction method based on weather forecast is adopted to establish a data set, including establishing a wireless sensor energy prediction model based on the time slot weather variables and historical solar energy collection recorded in the weather forecast, and predict future energy changes in combination with weather forecast data and historical data.
It improves the accuracy of solar energy collection wireless sensor energy prediction, can better respond to weather changes, improve the reliability and energy efficiency of sensor networks, and is especially suitable for solar-enriched environments in remote areas.
Smart Images

Figure BDA0005167764360000021 
Figure BDA0005167764360000031 
Figure BDA0005167764360000032
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of solar energy collection wireless sensor energy prediction, and in particular to a SEHWS energy prediction method and device based on weather forecast. Background Art
[0002] With the development of Internet of Things technology, wireless sensor networks (WSNs) have been widely used in various remote monitoring fields, especially in agricultural monitoring, bridge structure monitoring, desert ecological monitoring and forest environment monitoring. These sensor nodes are deployed in remote areas that usually lack basic energy facilities. Since solar energy resources are relatively abundant in these areas, solar energy is an ideal choice for powering wireless sensor nodes. Researchers have introduced solar energy harvesting technology into wireless sensors. By integrating solar panels on sensor nodes, solar energy can be converted into electrical energy to provide continuous power support for wireless sensors. Sensor nodes can continue to operate in remote unattended conditions, ensuring long-term monitoring of environmental data. Wireless sensor nodes powered by solar energy harvesting technology are called Solar Energy Harvesting Wireless Sensors (SEHWS). This self-powered method based on solar energy effectively extends the working life of sensor nodes and significantly reduces the maintenance cost of battery replacement. Since solar energy resources are affected by periodic changes in factors such as seasons and weather, their collection efficiency will fluctuate at different times. Therefore, it is necessary to accurately predict the solar energy collected by solar energy harvesting wireless sensors to ensure reasonable energy allocation of sensor nodes and ensure sustainable and permanent operation of nodes.
[0003] Current energy forecasting technologies mainly focus on prediction algorithms based on machine learning and deep learning models, as well as prediction methods based on data streams. Since solar energy collection wireless sensor systems are limited by resources such as computing power and storage space, the efficiency and resource consumption of prediction methods become key issues. Although prediction models based on machine learning and deep learning can provide higher prediction accuracy after processing and training a large amount of data, they usually require higher computing resources and are prone to increase energy consumption in resource-limited environments. At the same time, these models have poor interpretability, which is not conducive to real-time adjustment and optimization. In contrast, prediction methods based on data streams, such as EWMA, WCMA, and Pro-Energy, are widely used in resource-limited environments. However, these methods are based on historical solar energy data and do not fully consider the impact of weather changes on prediction results, resulting in large errors in prediction accuracy. Summary of the invention
[0004] In view of this, the present invention provides a SEHWS energy prediction method and device based on weather forecast, which takes into account the impact of weather changes on solar energy collection, refers to weather forecasts, introduces several weather variables such as precipitation, cloud cover, temperature and wind speed into the prediction, and improves the accuracy of energy prediction collected by solar energy collection wireless sensors.
[0005] The technical solution adopted by the embodiment of the present invention to solve the technical problem is:
[0006] A SEHWS energy prediction method based on weather forecast, implemented by a SHE wireless sensor, includes the following steps:
[0007] Step S1, establish a data set, the data set includes weather variables of each time slot recorded according to the weather forecast, and the historical solar energy collection amount E, the weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); n∈[1,N], N is the total number of equally divided time slots per day;
[0008] Step S2: Establishing a wireless sensor energy prediction model
[0009]
[0010] In the formula, represents the energy value of the n time slot to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot; C n-N is the periodic value of the previous cycle; ρ is the weight that adjusts the impact of weather forecast data on the forecast result; W(n) is the comprehensive impact of weather forecast data in time slot n;
[0011] The iteration formula of B(d,n-1) is:
[0012]
[0013] Where α is the smoothing coefficient, α∈[0,1]; E(d,n-1) represents the energy value actually collected by the sensor in the n-1 time slot; the initial B(d,n-1) is the data value E(d,n-1) at the first time point;
[0014] The iteration formula of T(d,n-1) is:
[0015] T(d,n-1)=β·(S(d,n-1)-S(d,n-2))+(1-β)·T(d,n-2)
[0016] Where β is the trend smoothing coefficient, β∈[0,1]; S(d,n-1) is the smoothing value of the n-1 time slot, S(d,n-2) is the smoothing value of the n-2 time slot; the initial T(d,n-1) value is 0;
[0017] C n The iteration formula is:
[0018] C n =γ·M D (d,n)+(1-γ)·C n-N
[0019] Where γ is the periodic smoothing coefficient, γ∈[0,1]; M D (d,n) is the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days; C n-N is the periodic value of the previous cycle; C n The initial value of is the energy collection value of the same time slot on the previous day;
[0020] M D The calculation formula for (d,n) is:
[0021]
[0022] In the formula, the actual collected value E(i,n) of the nth time slot of each day is calculated using the data of the past D days, i∈[d-D+1,d], E(di,n) is the actual collected energy value of the nth time slot of the dith day in the past D days, S(di,n) is the smoothed value of the corresponding day and time slot, indicating the long-term trend after removing short-term fluctuations;
[0023] The calculation formula for the comprehensive impact of weather forecast data W(n) is:
[0024] W(n)=δ cloud C(n)+δ precip P(n)+δ temp T w (n)+δ wind W s (n)
[0025] In the formula, δ cloud , δ precip , δ temp , δ wind is the weight, δ cloud +δ precip +δ temp +δ wind =1;
[0026] Step S3, collecting weather variables for predicting the energy collected in the required time slot according to the weather forecast, and using the wireless sensor energy prediction model Make a prediction and obtain the predicted value of the energy collected in the required time slot.
[0027] Preferably, in the calculation formula of the comprehensive impact of weather forecast data W(n) in step S2, the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula. The specific implementation steps are:
[0028] Step S21, normalizing the weather variables and the solar energy collection amount E to the interval [0,1]:
[0029]
[0030] In the formula, X represents the original variable value, X min and X max The minimum and maximum values of the selected variable type in time slot n respectively;
[0031] Step S22, using the Pearson correlation coefficient formula to calculate the correlation between each of the weather variables and the solar energy collection amount E:
[0032]
[0033] In the formula, X represents any weather variable, and Y represents the amount of solar energy collected E; and are the average values of X and Y respectively; D is the total number of data points, i represents a data point; accordingly, the correlation r between cloud cover and E is obtained cloud , the correlation between precipitation and E precip , the correlation between temperature and E temp , the correlation between wind speed and E wind ;
[0034] Step S23, calculate the absolute correlation coefficient δ of each weather variable cloud , δ precip , δ temp , δ wind :
[0035]
[0036] Among them, i∈{cloud,precip,temp,wind}.
[0037] Preferably, the weight factors α, β, γ and ρ in step S2 are determined as follows:
[0038] Step S23, let the weight factors α, β, γ and ρ traverse in the interval [0,1], and bring the four weight factors into the smoothing value S(d,n), trend value T(d,n), periodicity value C n and the wireless sensor energy prediction
[0039] Model In the formula, the predicted value of the nth time slot is obtained;
[0040] Step S24, calculating the mean absolute percentage error MAPE according to the predicted value and the true value of the nth time slot, and selecting the combination with the lowest MAPE value as the weight factors α, β, γ and ρ used in the step S2.
[0041] A SEH wireless sensor comprises a microcontroller, and a data acquisition module, a solar energy collection module, a memory, a wireless communication module and a power management module connected to the microcontroller; wherein the memory stores instructions executable by the microcontroller, and the instructions are executed by the microcontroller so that the microcontroller can execute the aforementioned method;
[0042] The data acquisition module is responsible for obtaining the solar radiation value of the environmental parameter in real time through the sensor;
[0043] The solar energy collection module is composed of solar panels and is used to convert the collected sunlight into electrical energy;
[0044] The power management module is responsible for managing the electric energy generated by the solar energy collection module, and specifically includes:
[0045] Charging management unit: stores the electricity converted from solar energy into the battery;
[0046] Voltage regulation unit: used to supply power to each module in the SEH wireless sensor to ensure stable output voltage;
[0047] Energy monitoring unit: used to monitor the battery power and health status in real time;
[0048] The wireless communication module is used to obtain weather variables of each time slot based on weather forecast through the API interface using wireless transmission technology and send the predicted values to the upper-level device through wireless signal transmission; the memory is used to store historical energy collection data and operating procedures required for sensor operation; store weather variables of each time slot;
[0049] The microcontroller is used to establish a database, wherein the data set includes weather variables of each time slot recorded according to the weather forecast, and the historical solar energy collection amount E, wherein the weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s(n); n∈[1,N], N is the total number of equally divided time slots per day;
[0050] The microcontroller is used to establish a wireless sensor energy prediction model
[0051]
[0052] In the formula, represents the energy value of the n time slot to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot; C n-N is the periodic value of the previous cycle; ρ is the weight that adjusts the impact of weather forecast data on the forecast result; W(n) is the comprehensive impact of weather forecast data in time slot n;
[0053] The iteration formula of B(d,n-1) is:
[0054]
[0055] Where α is the smoothing coefficient, α∈[0,1]; E(d,n-1) represents the energy value actually collected by the sensor in the n-1 time slot; the initial B(d,n-1) is the data value E(d,n-1) at the first time point;
[0056] The iteration formula of T(d,n-1) is:
[0057] T(d,n-1)=β·(S(d,n-1)-S(d,n-2))+(1-β)·T(d,n-2)
[0058] Where β is the trend smoothing coefficient, β∈[0,1]; S(d,n-1) is the smoothing value of the n-1 time slot, S(d,n-2) is the smoothing value of the n-2 time slot; the initial T(d,n-1) value is 0;
[0059] C n The iteration formula is:
[0060] C n =γ·M D (d,n)+(1-γ)·C n-N
[0061] Where γ is the periodic smoothing coefficient, γ∈[0,1]; M D (d,n) is the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days; C n-N is the periodic value of the previous cycle; C n The initial value of is the energy collection value of the same time slot on the previous day;
[0062] M D The calculation formula for (d,n) is:
[0063]
[0064] In the formula, the actual collected value E(i,n) of the nth time slot of each day is calculated using the data of the past D days, i∈[d-D+1,d], E(di,n) is the actual collected energy value of the nth time slot of the dith day in the past D days, S(di,n) is the smoothed value of the corresponding day and time slot, indicating the long-term trend after removing short-term fluctuations;
[0065] The calculation formula for the comprehensive impact of weather forecast data W(n) is:
[0066] W(n)=δ cloud C(n)+δ precip P(n)+δ temp T w (n)+δ wind W s (n)
[0067] In the formula, δ cloud , δ precip , δ temp , δ wind is the weight, δ cloud +δ precip +δ temp +δ wind =1;
[0068] The microcontroller is used to collect weather information for predicting the required time slots for collecting energy according to the weather forecast.
[0069] Variables, using the wireless sensor energy prediction model Predicting and obtaining a predicted value of energy collected in a required time slot; and allocating energy according to the predicted value;
[0070] The wireless communication module is used to obtain weather variables of each time slot based on weather forecast through the API interface using wireless transmission technology and send the predicted values to the upper-level device through wireless signal transmission;
[0071] Preferably, in the calculation formula of the comprehensive impact of weather forecast data W(n), the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula:
[0072] Normalize the weather variables and solar energy collection E to the [0,1] interval:
[0073]
[0074] In the formula, X represents the original variable value, X min and X max The minimum and maximum values of the selected variable type in time slot n respectively;
[0075] The correlation between each weather variable and the solar energy collection amount E is calculated using the Pearson correlation coefficient formula:
[0076]
[0077] In the formula, X represents any weather variable, and Y represents the amount of solar energy collected E; and are the average values of X and Y respectively; D is the total number of data points, i represents a data point; accordingly, the correlation r between cloud cover and E is obtained cloud , the correlation between precipitation and E precip , the correlation between temperature and E temp , the correlation between wind speed and E wind ;
[0078] Calculate the absolute correlation coefficient δ for each weather variable cloud , δ precip , δ temp , δ wind :
[0079]
[0080] Among them, i∈{cloud,precip,temp,wind}.
[0081] Preferably, the weight factors α, β, γ and ρ are determined as follows:
[0082] Let the weight factors α, β, γ and ρ all traverse in the interval [0,1], and bring the four weight factors into the average
[0083] Slippage value S(d,n), trend value T(d,n), periodicity value C n And the wireless sensor energy prediction model In the formula, the predicted value of the nth time slot is obtained;
[0084] The mean absolute percentage error (MAPE) is calculated based on the predicted value and the true value of the nth time slot, and the combination with the lowest MAPE value is selected as the weight factors α, β, γ and ρ used in the model.
[0085] It can be seen from the above technical solution that the SEHWS energy prediction method and device based on weather forecast provided by the embodiment of the present invention first establishes a data set, which includes weather variables of each time slot recorded according to the weather forecast and the historical solar energy collection amount E. The weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); Establishing wireless sensor energy prediction model The parameters include the basic level B(d,n-1) of the energy collected in the n-1 time slot, the trend value T(d,n-1) of the energy increase or decrease trend, the periodicity value C n-N The weather forecast data of n time slots comprehensively affects W(n); according to the weather forecast data collected for prediction
[0086] Measure the weather variables required to collect energy in the time slot and use the wireless sensor energy prediction model The prediction is made to obtain the predicted value of the energy collected in the required time slot. The present invention combines real-time weather forecast data (precipitation, cloud cover, temperature and wind speed) with historical energy collection data to more accurately predict future energy changes, more accurately reflect the actual situation, and improve the accuracy of the prediction. Compared with the existing methods based only on historical data, the present invention can better cope with weather changes, improve the reliability and energy efficiency of the sensor network, and is particularly suitable for deployment in remote areas with sufficient solar energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 The flowchart of the SEHWS energy prediction method based on weather forecast of the present invention is shown in FIG. DETAILED DESCRIPTION
[0088] The technical scheme and technical effects of the present invention are further elaborated in detail below in conjunction with the accompanying drawings of the present invention.
[0089] refer to Figure 1 As shown, the present invention provides a SEHWS (Solar Energy Harvesting Wireless Sensor) energy prediction method based on weather forecast, and the implementation subject is a SHE wireless sensor. The steps include:
[0090] Step S1, establish a data set, the data set includes weather variables of each time slot recorded according to the weather forecast, and the historical solar energy collection amount E, the weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); n∈[1,N], N is the total number of equally divided time slots per day;
[0091] Before prediction, the present invention divides each day into N time slots, each time slot lasts half an hour, that is, N = 48. Taking into account the diurnal variation of solar energy, that is, the periodic period is also N = 48, and an energy storage matrix E is set to store each past time slot. Subsequently, the energy information collected in each past time slot is stored in a matrix E with a dimension of D×N. D represents the number of days of historical energy observation, and the element E(i,n) in the energy information matrix E represents the actual energy value actually collected in the nth time slot on the i-th day. Let E(d,n) represent the energy information of the nth time slot on the d-th day, i∈[dD,d], n∈[1,N]. In this way, the time series data is converted into a two-dimensional matrix for subsequent processing and analysis. At the same time, at time slot n, the corresponding weather forecast data is obtained, denoted as W(n), including cloud cover C(n), precipitation P(n), temperature T w (n), wind speed W s (n).
[0092] Step S2: Establishing a wireless sensor energy prediction model
[0093]
[0094] This prediction formula combines the basic level value of the currently collected energy data, the change of trend, the periodic wave
[0095] The dynamic and weather forecast data are combined, where represents the energy value of the n time slots to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot, reflecting the basic state of the collected energy data; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot, which is used to estimate the change speed of future data; C n-Nis the periodic value of the previous cycle, reflecting the daily periodic fluctuations of solar energy collected by the solar energy collection wireless sensor, capturing repeated patterns within a fixed interval, such as different periods of the day, periodic changes, etc.; ρ is the weight for adjusting the impact of weather forecast data on the prediction results. The impact of weather factors may vary with time and season, so ρ can be dynamically adjusted according to time or weather conditions, and the value range is between 0 and 1. For example, clear weather usually means low cloud cover, no precipitation, suitable temperature and low wind speed, which will promote solar energy collection. In order to reflect the promotion effect of clear weather, ρ should be small to reduce the weakening effect of 1-ρW(n) and make the prediction result closer to the maximum collection value. Cloudy or severe weather may be accompanied by high cloud cover, lower temperature, strong wind or precipitation, which are not conducive to solar energy collection. At this time, ρ should be large to increase the weakening effect so that the predicted value reflects the actual lower collection efficiency. Weather forecast data is added to the model as an exogenous variable, and the model prediction results are corrected according to the changes in weather variables such as cloud cover, precipitation, temperature and wind speed; W(n) is the weighted sum of multiple weather variables, representing the comprehensive impact of weather forecast data in n time slots; 1-ρW(n), which is used to correct the impact of weather factors on solar energy collection prediction; using indicates that weather factors have a weakening effect on the prediction. For example, bad weather (such as heavy cloud cover, rainfall, low temperature, etc.) usually reduces the efficiency of solar energy collection. When W(n) is large (meaning that weather conditions have a greater impact on solar energy collection), 1-ρW(n) is small, weakening the impact of weather variables, indicating that poor weather conditions will significantly reduce the amount of solar energy collected. Conversely, when W(n) is small (indicating that the impact of weather factors is weak or weather conditions are good), 1-ρW(n) is large, which means that weather has a smaller impact on solar energy collection and the predicted value is close to a higher level. In this case, the promoting effect of weather is small, but the collection efficiency will still increase due to clear conditions. This adjustment enables the model to dynamically reflect weather changes, thereby improving the accuracy of predictions.
[0096] Calculate the parameters in the model: The iterative formula for the smoothing value B(d,n-1) in the model is:
[0097]
[0098] Where α is the smoothing coefficient, which controls the update speed of the smoothing value, α∈[0,1]; E(d,n-1) represents the energy value actually collected by the sensor in the n-1 time slot; the initial B(d,n-1) is the data value E(d,n-1) at the first time point;
[0099] The iterative formula of the change trend T(d,n-1) in the model is:
[0100] T(d,n-1)=β·(S(d,n-1)-S(d,n-2))+(1-β)·T(d,n-2) (3)
[0101] The change trend value is used to capture the change trend of the solar wireless sensor energy collection data in the current time slot relative to the previous time slot, indicating the upward or downward trend of the data. In the formula, β is the trend smoothing coefficient, which controls the update speed of the trend term, β∈[0,1]; S(d,n-1) is the smoothing value of the n-1 time slot, and S(d,n-2) is the smoothing value of the n-2 time slot; the initial T(d,n-1) value is 0;
[0102] Periodic characteristics Periodic term C n The iteration formula is:
[0103] C n =γ·M D (d,n)+(1-γ)·C n-N (4)
[0104] Where γ is the periodic smoothing coefficient, which controls the update speed of the periodic value, γ∈[0,1]; M D (d,n) is the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days; C n-N is the periodic value of the previous cycle; C n The initial value is the energy collection value of the same time slot on the previous day (referring to the previous cycle value C of the initial point n-N );
[0105] M D The calculation formula for (d,n) is:
[0106]
[0107] In the formula, the actual collected value E(i,n) of the nth time slot of each day is calculated using the data of the past D days, i∈[d-D+1,d], E(di,n) is the actual collected energy value of the nth time slot of the dith day in the past D days, S(di,n) is the smoothed value of the corresponding day and time slot, indicating the long-term trend after removing short-term fluctuations;
[0108] Since the daily energy collection data may have a certain periodicity (such as the peak of solar energy collection at noon), C n Reflects the daily cycle characteristics in solar energy collection and captures the cycle characteristics within a day. The formula combines the ratio of the actual energy collection value and the trend value in the same time slot in the last D days. D (d,n), and the historical periodic term C n-N , to update and adjust the periodicity value C of the current time slot n . MD (d,n) is the average value of the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days. n-N The periodicity value of the previous cycle (the same time slot of the previous day) represents the periodic impact in the historical cycle, and N is the cycle length (the periodicity of a time slot in the 48 time slots of each day). γ is a periodic smoothing coefficient that controls the update speed of the periodicity value, and the value range is usually between 0 and 1. It is used to balance the impact of current data and historical periodicity. A larger γ gives more weight to the current data, while a smaller γ relies more on past periodicity. The initial periodicity C n For the data in the first period, calculate the proportional relationship of each point relative to the initial smoothing value.
[0109] The calculation formula for the comprehensive impact of weather forecast data W(n) is:
[0110] W(n)=δ cloud C(n)+δ precip P(n)+δ temp T w (n)+δ wind W s (n) (6)
[0111] In the formula, δ cloud , δ precip , δ temp , δ wind is the weight, δ cloud +δ precip +δ temp +δ wind =1;
[0112] W(n) is the comprehensive impact of the weather forecast data at the current time point n, which is the weighted sum of normalized weather variables. It specifically includes the following data: C(n) represents cloud cover, P(n) represents precipitation, T w (n) represents temperature, W s(n) represents wind speed, and each σ represents the weight coefficient of each weather factor, indicating their relative influence on solar energy collection. The specific value can be evaluated by using the Pearson correlation coefficient formula, as shown in the following formula (8) to evaluate the influence of each weather variable on solar energy collection. The setting of the basic weight can be determined by analyzing historical data and combining the average degree of influence of each weather variable on solar energy collection. First, by calculating the Pearson correlation coefficient, the correlation between each weather variable and solar energy collection in the historical data is analyzed, and the absolute value of the correlation coefficient of each variable is used to measure its relative influence to obtain the relative size of the basic weight. A higher correlation means that the variable has a more significant impact on solar energy collection, so a higher basic weight can be given. Then, in order to avoid a certain weather variable from having an excessive impact on the forecast, the relative influence of all variables is adjusted to weights by normalization so that the sum is 1. This method ensures that the weight of each variable is within a reasonable proportion range and no single variable dominates the entire forecast.
[0113] In the calculation formula of the comprehensive impact of weather forecast data W(n) in step S2, the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula. The specific implementation steps are:
[0114] Step S21, normalize the weather variables and the solar energy collection amount E to the interval [0,1]:
[0115]
[0116] In the formula, X represents the original variable value, X min and X max The minimum and maximum values of the selected variable type in time slot n respectively;
[0117] Step S22, using the Pearson correlation coefficient formula, calculate the correlation between each weather variable and the solar energy collection amount E:
[0118]
[0119] In the formula, X represents any weather variable, and Y represents the amount of solar energy collected E; and are the average values of X and Y respectively; D is the total number of data points, i represents a data point; accordingly, the correlation r between cloud cover and E is obtained cloud , the correlation between precipitation and E precip , the correlation between temperature and E temp , the correlation between wind speed and E wind ;
[0120] Step S23, calculate the absolute correlation coefficient δ of each weather variable cloud , δ precip , δ temp , δ wind :
[0121]
[0122] Among them, i∈{cloud,precip,temp,wind}.
[0123] The method for determining the values of the weight factors α, β, γ and ρ in step S2 is:
[0124] Step S23, let the weight factors α, β, γ and ρ traverse in the interval [0,1], and bring the four weight factors into the smoothing value S(d,n), trend value T(d,n), periodicity value C n and wireless sensor energy prediction model
[0125] In the formula, the predicted value of the nth time slot is obtained;
[0126] Step S24, calculating the mean absolute percentage error MAPE according to the predicted value and the true value of the nth time slot, and selecting the combination with the lowest MAPE value as the weight factors α, β, γ and ρ used in step S2.
[0127] Step S3, collecting weather variables for predicting the required time slot for collecting energy according to the weather forecast, using
[0128] Wireless sensor energy prediction model Make a prediction and obtain the predicted value of the energy collected in the required time slot.
[0129] Furthermore, the present invention provides a SEH wireless sensor for implementing Figure 1 The method comprises a SEH wireless sensor, comprising a microcontroller, a data acquisition module, a solar energy collection module, a memory, a wireless communication module and a power management module connected to the microcontroller; wherein the memory stores instructions executable by the microcontroller, and the instructions are executed by the microcontroller so that the microcontroller can perform steps S1-S3 of the method;
[0130] Data acquisition module: responsible for obtaining the environmental parameter solar radiation value in real time through sensors;
[0131] Solar energy collection module: It consists of solar panels and is used to convert the collected sunlight into electrical energy;
[0132] Power management module: responsible for managing the power generated by the solar energy collection module, including:
[0133] Charging management unit: stores the electricity converted from solar energy into the battery;
[0134] Voltage regulation unit: used to supply power to each module in the SEH wireless sensor to ensure stable output voltage;
[0135] Energy monitoring unit: used to monitor the battery power and health status in real time;
[0136] Wireless communication module: used to obtain weather variables of each time slot based on weather forecast through API interface by adopting wireless transmission technology and send the predicted values to the upper-level equipment by wireless signal transmission;
[0137] A memory for storing historical energy collection data and operating programs required for sensor operation; storing weather variables for each time slot;
[0138] A microcontroller is used to establish a database. The data set includes weather variables for each time slot recorded according to the weather forecast, as well as the historical solar energy collection amount E. The weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); n∈[1,N], N is the total number of equally divided time slots per day;
[0139] Microcontroller for building energy prediction models for wireless sensors
[0140]
[0141] In the formula, represents the energy value of the n time slot to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot; C n-N is the periodic value of the previous cycle; ρ is the weight for adjusting the impact of weather forecast data on the prediction result; W(n) is the comprehensive impact of weather forecast data in time slot n; the expressions of various parameters refer to formulas (1)-(9); in the calculation formula of the comprehensive impact of weather forecast data W(n), the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula, and the weight factors α, β, γ and ρ are taken according to the previous steps;
[0142] Microcontroller: used to collect weather variables for predicting the required time slots to harvest energy based on weather forecasts, using wireless sensor energy prediction models Predicting and obtaining a predicted value of energy collected in a required time slot; and allocating energy based on the predicted value;
[0143] Wireless communication module: used to obtain weather variables for each time slot based on weather forecast through API interface using wireless transmission technology and send the predicted values to the upper-level device through wireless signal transmission.
[0144] The present invention proposes a method for predicting energy of solar energy collection wireless sensors based on weather forecast data. By combining real-time weather forecast data (precipitation, cloud cover, temperature and wind speed) with historical energy collection data, future energy changes can be predicted more accurately, the actual situation can be reflected more accurately, and the accuracy of prediction can be improved. Compared with the existing methods based only on historical data, the present invention can better cope with weather changes, improve the reliability and energy efficiency of sensor networks, and is particularly suitable for deployment in remote areas with sufficient solar energy.
[0145] Based on the above statements, it is hereby declared that a person skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should be included in the scope of the claims of the present invention. Therefore, the protection scope of the present invention should include any modification or equivalent alternative to the present technical solution, as long as they still fall within the purpose and scope of the present technical solution.
Claims
1. A SEHWS energy prediction method based on weather forecast, characterized in that: The implementation subject is SHE wireless sensor, and the steps include: Step S1, establish a data set, the data set includes weather variables of each time slot recorded according to the weather forecast, and the historical solar energy collection amount E, the weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); n∈[1,N], N is the total number of equally divided time slots per day; Step S2: Establishing a wireless sensor energy prediction model In the formula, represents the energy value of the n time slot to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot; C n-N is the periodic value of the previous cycle; ρ is the weight that adjusts the impact of weather forecast data on the prediction result, ρ∈[0,1]; W(n) is the comprehensive impact of weather forecast data in time slot n; The iteration formula of B(d,n-1) is: Where α is the smoothing coefficient, α∈[0,1]; E(d,n-1) represents the energy value actually collected by the sensor in the n-1 time slot; the initial B(d,n-1) is the data value E(d,n-1) at the first time point; The iteration formula of T(d,n-1) is: T(d,n-1)=β·(S(d,n-1)-S(d,n-2))+(1-β)·T(d,n-2) Where β is the trend smoothing coefficient, β∈[0,1]; S(d,n-1) is the smoothing value of the n-1 time slot, S(d,n-2) is the smoothing value of the n-2 time slot; the initial T(d,n-1) value is 0; C n The iteration formula is: C n =γ·M D (d,n)+(1-γ)·C n-N Where γ is the periodic smoothing coefficient, γ∈[0,1]; M D (d,n) is the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days; C n-N is the periodic value of the previous cycle; C n The initial value of is the energy collection value of the same time slot on the previous day; M D The calculation formula for (d,n) is: In the formula, the actual collected value E(i,n) of the nth time slot of each day is calculated using the data of the past D days, i∈[d-D+1,d], E(di,n) is the actual collected energy value of the nth time slot of the dith day in the past D days, S(di,n) is the smoothed value of the corresponding day and time slot, indicating the long-term trend after removing short-term fluctuations; The calculation formula for the comprehensive impact of weather forecast data W(n) is: W(n)=δ cloud C(n)+δ precip P(n)+δ temp T w (n)+δ wind W s (n) where δ cloud , δ precip , δ temp , δ wind are weights, and δ cloud +δ precip +δ temp +δ wind = 1; Step S3, collecting weather variables for predicting the required time slot for collecting energy according to the weather forecast, using the Wireless sensor energy prediction model Make a prediction and obtain the predicted value of the energy collected in the required time slot.
2. The SEHWS energy prediction method based on weather forecast according to claim 1, characterized in that: In the calculation formula of the comprehensive impact of weather forecast data W(n) in step S2, the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula. The specific implementation steps are: Step S21, normalizing the weather variables and the solar energy collection amount E to the interval [0,1]: In the formula, X represents the original variable value, X min and X max The minimum and maximum values of the selected variable type in time slot n respectively; Step S22, using the Pearson correlation coefficient formula to calculate the correlation between each of the weather variables and the solar energy collection amount E: In the formula, X represents any weather variable, and Y represents the amount of solar energy collected E; and are the average values of X and Y respectively; D is the total number of data points, i represents a data point; accordingly, the correlation r between cloud cover and E is obtained cloud , the correlation between precipitation and E precip , the correlation between temperature and E temp , the correlation between wind speed and E wind ; Step S23, calculate the absolute correlation coefficient δ of each weather variable cloud , δ precip , δ temp , δ wind : Among them, i∈{cloud,precip,temp,wind}.
3. The SEHWS energy prediction method based on weather forecast as claimed in claim 1, characterized in that: The method for determining the values of the weight factors α, β, γ and ρ in step S2 is: Step S23, let the weight factors α, β, γ and ρ traverse in the interval [0,1], and bring the four weight factors into the smoothing value S(d,n), trend value T(d,n), periodicity value C n And the wireless sensor energy prediction model In the formula, the predicted value of the nth time slot is obtained; Step S24, calculating the mean absolute percentage error MAPE according to the predicted value and the true value of the nth time slot, and selecting the combination with the lowest MAPE value as the weight factors α, β, γ and ρ used in the step S2.
4. A SEH wireless sensor, characterized in that: It comprises a microcontroller, and a data acquisition module, a solar energy collection module, a memory, a wireless communication module and a power management module connected to the microcontroller; wherein the memory stores instructions executable by the microcontroller, and the instructions are executed by the microcontroller so that the microcontroller can execute the method described in any one of claims 1 to 3; The data acquisition module is responsible for obtaining the solar radiation value of the environmental parameter in real time through the sensor; The solar energy collection module is composed of solar panels and is used to convert the collected sunlight into electrical energy. The power management module is responsible for managing the electrical energy generated by the solar energy collection module, and specifically includes: Charging management unit: stores the electricity converted from solar energy into the battery; Voltage regulation unit: used to supply power to each module in the SEH wireless sensor to ensure stable output voltage; Energy monitoring unit: used to monitor the battery power and health status in real time; The wireless communication module is used to obtain weather variables for each time slot based on weather forecasts through an API interface using wireless transmission technology; The memory is used to store historical energy collection data and operating procedures required for sensor operation; store weather variables for each time slot; The microcontroller is used to establish a database, wherein the data set includes weather variables of each time slot recorded according to the weather forecast, and the historical solar energy collection amount E, wherein the weather variables include cloud cover C(n), precipitation P(n), temperature T w (n) and wind speed W s (n); n∈[1,N], N is the total number of equally divided time slots per day; The microcontroller is used to establish a wireless sensor energy prediction model In the formula, represents the energy value of the n time slot to be predicted; B(d,n-1) is the basic level of energy collected in the n-1 time slot; T(d,n-1) is the trend value of the energy increase or decrease trend between the n-1 time slot and the n-2 time slot; C n-N is the periodic value of the previous cycle; ρ is the weight that adjusts the impact of weather forecast data on the forecast result; W(n) is the comprehensive impact of weather forecast data in time slot n; The iteration formula of B(d,n-1) is: Where α is the smoothing coefficient, α∈[0,1]; E(d,n-1) represents the energy value actually collected by the sensor in the n-1 time slot; the initial B(d,n-1) is the data value E(d,n-1) at the first time point; The iteration formula of T(d,n-1) is: T(d,n-1)=β·(S(d,n-1)-S(d,n-2))+(1-β)·T(d,n-2) Where β is the trend smoothing coefficient, β∈[0,1]; S(d,n-1) is the smoothing value of the n-1 time slot, S(d,n-2) is the smoothing value of the n-2 time slot; the initial T(d,n-1) value is 0; C n The iteration formula is: C n =γ·M D (d,n)+(1-γ)·C n-N Where γ is the periodic smoothing coefficient, γ∈[0,1]; M D (d,n) is the ratio of the energy collection value to the smoothed value at the same time slot n in the past D days; C n-N is the periodic value of the previous cycle; C n The initial value of is the energy collection value of the same time slot on the previous day; M D The calculation formula for (d,n) is: In the formula, the actual collected value E(i,n) of the nth time slot of each day is calculated using the data of the past D days, i∈[d-D+1,d], E(di,n) is the actual collected energy value of the nth time slot of the dith day in the past D days, S(di,n) is the smoothed value of the corresponding day and time slot, indicating the long-term trend after removing short-term fluctuations; The calculation formula for the comprehensive impact of weather forecast data W(n) is: W(n)=δ cloud C(n)+δ precip P(n)+δ temp T w (n)+δ wind W s (n) where δ cloud , δ precip , δ temp , δ wind are weights, and δ cloud +δ precip +δ temp +δ wind = 1; The microcontroller is used to collect weather variables for predicting the required time slots for collecting energy according to the weather forecast, Using the wireless sensor energy prediction model Predicting and obtaining a predicted value of energy collected in a required time slot; and allocating energy according to the predicted value; The wireless communication module is used to transmit the predicted value to the upper-level device via wireless signal transmission.
5. The SEH wireless sensor according to claim 4, characterized in that: In the calculation formula of the comprehensive impact of weather forecast data W(n), the weight δ cloud , δ precip , δ temp , δ wind It is calculated by using the Pearson correlation coefficient formula: Normalize the weather variables and solar energy collection E to the [0,1] interval: In the formula, X represents the original variable value, X min and X max The minimum and maximum values of the selected variable type in time slot n respectively; The correlation between each weather variable and the solar energy collection amount E is calculated using the Pearson correlation coefficient formula: In the formula, X represents any weather variable, and Y represents the amount of solar energy collected E; and are the average values of X and Y respectively; D is the total number of data points, i represents a data point; accordingly, the correlation r between cloud cover and E is obtained cloud , the correlation between precipitation and E precip , the correlation between temperature and E temp , the correlation between wind speed and E wind ; Calculate the absolute correlation coefficient δ for each weather variable cloud , δ precip , δ temp , δ wind : Among them, i∈{cloud,precip,temp,wind}.
6. The SEH wireless sensor according to claim 4, characterized in that: The values of weight factors α, β, γ and ρ are as follows: Let the weight factors α, β, γ and ρ all traverse in the interval [0,1], and bring the four weight factors into the smoothing value S(d,n), trend value T(d,n), and periodicity value C respectively. n And the wireless sensor energy prediction model In the formula, the predicted value of the nth time slot is obtained; The mean absolute percentage error (MAPE) is calculated based on the predicted value and the true value of the nth time slot, and the combination with the lowest MAPE value is selected as the weight factors α, β, γ and ρ used in the model.