A fuzzy energy management method based on LSTM-solar radiation prediction
By combining LSTM-solar radiation prediction and fuzzy controller, the energy management problem of off-grid photovoltaic systems under cold and changeable weather conditions is solved, realizing flexible load scheduling and efficient energy utilization, ensuring continuous operation of critical tasks and long-term system service.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-23
AI Technical Summary
Existing off-grid photovoltaic system energy management strategies are prone to accidental disconnection or energy waste in cold or variable weather conditions, making it difficult to accurately predict future energy trends. This can lead to data loss for critical loads or premature battery depletion. Furthermore, hard threshold control causes frequent oscillations in load relays, resulting in unstable power supply.
A fuzzy energy management method based on LSTM-solar radiation prediction is adopted. By collecting data in real time, performing feature encoding and preprocessing, using the LSTM model to predict future radiation intensity, and combining it with a fuzzy controller to establish a nonlinear mapping relationship, the load level is dynamically adjusted to achieve flexible scheduling.
While ensuring the continuous operation of critical loads, it maximizes system service duration and energy utilization, reduces hardware losses, and optimizes energy consumption strategies, making it suitable for unattended field monitoring scenarios.
Smart Images

Figure CN122267733A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of new energy power generation and microgrid control technology, specifically involving a fuzzy energy management method based on LSTM-solar radiation prediction. Background Technology
[0002] With the widespread application of IoT technology in fields such as field ecological environment monitoring, border security surveillance, and meteorological data collection, a large number of unmanned monitoring stations have been deployed in remote areas such as high-altitude and frigid regions. Since these areas are typically difficult to connect to the public power grid, independent off-grid power supply systems composed of photovoltaic power generation units and energy storage batteries have become their primary energy solution. However, in the frigid environment of the field, the climate conditions are extremely harsh and rapidly changing, with solar radiation intensity exhibiting significant intermittency, fluctuation, and randomness, posing a severe challenge to the energy supply and demand balance of off-grid systems.
[0003] Existing off-grid photovoltaic (PV) system energy management strategies typically employ passive control methods based on fixed rules, such as hysteresis comparison control. These methods primarily monitor the battery's terminal voltage or state of charge (SOC) in real time and compare it to preset fixed upper and lower thresholds. When the charge level falls below the lower limit, the load is cut off; when it rises above the upper limit, power is restored. This control logic, which relies solely on the current state for "post-event response," has significant technical drawbacks in practical applications. First, fixed threshold strategies lack the ability to predict future energy acquisition trends. For example, at dawn, although the current battery SOC is low, sunlight is about to resume. The system should maintain the monitoring load running to wait for charging, but traditional strategies often force a power outage when the threshold is reached, resulting in the loss of monitoring data during critical periods. Conversely, in the evening or when facing continuous cloudy / rainy weather, if the current SOC is still acceptable, traditional strategies cannot anticipate the risk of future energy shortages and fail to reduce power consumption in time, causing the battery to be depleted prematurely at night, or even shortening battery life due to deep discharge.
[0004] Furthermore, in cloudy or rainy weather, photovoltaic output power fluctuates drastically, causing frequent voltage jumps around the battery terminal voltage near the threshold. Existing hard threshold control easily triggers repeated on / off oscillations of load relays, leading not only to unstable power supply but also accelerated hardware wear and tear. Simultaneously, existing control methods typically employ a crude "all-on" or "all-off" management approach, lacking a refined adjustment mechanism that dynamically adjusts load operation levels based on energy availability, making it difficult to find a balance between ensuring the survival rate of critical loads and improving the overall system service quality. While some research has introduced predictive algorithms into microgrid dispatching, most focus on grid-connected systems or use simple linear predictive models, failing to effectively capture the highly nonlinear time-varying characteristics of solar radiation in cold environments. Therefore, there is an urgent need for an intelligent energy management method that can deeply mine the characteristics of historical photovoltaic data to accurately predict future trends and combine fuzzy logic to achieve flexible decision-making. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention proposes a fuzzy energy management method based on LSTM-solar radiation prediction. This method solves the problem that fixed threshold strategies are prone to false shutdowns or energy waste in cold or variable weather conditions. It maximizes the system's service duration and energy utilization while ensuring the continuous operation of critical loads.
[0006] The technical solution adopted in this invention is: a fuzzy energy management method based on LSTM-solar radiation prediction, the specific steps of which are as follows:
[0007] S1. Real-time acquisition of environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) of batteries from field monitoring stations;
[0008] A photovoltaic energy storage monitoring system is used to collect real-time environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) data of batteries at field monitoring stations. The hardware structure of the photovoltaic energy storage monitoring system includes: a microcontroller and a battery interface and power supply connected to it, a voltage acquisition module, a temperature acquisition module, a light acquisition module, a current acquisition module, a communication module, and a multi-channel DC relay control module.
[0009] The microcontroller acquires ambient radiation intensity data through a light acquisition module, ambient temperature data through a temperature acquisition module, and calculates the real-time state of charge (SOC) of the battery through the battery interface and voltage and current acquisition modules. The multi-channel DC relay control module includes three relays.
[0010] S2. Based on the data collected in step S1, outlier cleaning and missing value filling are performed on the collected historical radiation intensity data, and feature encoding is performed in combination with time information to construct a time series feature vector.
[0011] The feature encoding introduces sinusoidal and cosine time codes as auxiliary features, which, together with the normalized radiation intensity observations, construct the current time value. The time series feature vector.
[0012] S3. Based on the feature vector constructed in step S2, input the pre-trained LSTM-solar radiation prediction model, output the solar radiation intensity prediction sequence within the future set time window, and calculate the future effective radiation intensity.
[0013] The pre-trained LSTM-solar radiation prediction model is implemented as follows: a dataset is constructed based on historical radiation intensity data, and a sliding window mechanism is used to extract past data. The LSTM network is trained offline using the Adam optimizer by taking a continuous sequence of feature vectors at each time step as input, the radiation intensity at future time steps as labels, the mean square error as the loss function, and the Adam optimizer as the loss function. After training, it is deployed in a microcontroller.
[0014] The calculation of future effective radiation intensity is to obtain the future output of the LSTM model. The radiation intensity prediction sequence at each time step is converted into an equivalent radiation intensity considering the temperature effect using a photovoltaic temperature correction model, and the average energy level over a future period is calculated using a sliding window weighted average method.
[0015] S4. Calculate the current effective radiation intensity, and use it, along with the real-time SOC obtained in step S1 and the future effective radiation intensity obtained in step S3, as the three input variables of the fuzzy controller. Use the preset membership function to map them into fuzzy linguistic variables.
[0016] The fuzzy controller adopts a three-input single-output fuzzy logic control architecture. Its core consists of a fuzzification interface, a fuzzy rule base, an inference engine, and a defuzzification interface. The input variables are the real-time SOC of the battery, the current effective radiation intensity, and the future effective radiation intensity. The output variable is the load shedding level (LSP). A nonlinear mapping relationship is established between the current and future energy states of the system and the load scheduling decision.
[0017] S5. Based on the preset fuzzy control rule base, perform fuzzy reasoning on the fuzzy linguistic variables of the three input variables to obtain a fuzzy output set, and use the defuzzification algorithm to calculate the accurate load shedding level LSP.
[0018] The fuzzy control rule base includes adjustment strategies based on energy trend prediction, specifically including: when the future light intensity is predicted to be strong, more loads are allowed to be turned on even if the current power is low; and when the future light intensity is predicted to be continuous, high-power loads are restricted from being turned on even if the current power is restored.
[0019] For the three-input single-output fuzzy logic control architecture, the corresponding mathematical expression for the fuzzy inference rule is as follows:
[0020] ;
[0021] in, Indicates the number of fuzzy control rules; ; This represents the output fuzzy set of the fuzzy controller. These represent the membership degrees of the input variables of the fuzzy controller, namely the battery state of charge (SOC) and the current radiation intensity. and future radiation intensity . Indicates a fuzzy relationship, " indicates taking the intersection, " " indicates taking the union of sets, " " indicates the composition operator.
[0022] The load shedding level LSP is the precise numerical control quantity obtained by defuzzifying the fuzzy set output by fuzzy inference.
[0023] Among them, defuzzification involves using the centroid method to calculate the fuzzy set of the fuzzy inference output. The geometric centroid is calculated and transformed into a precise control quantity executable by the microcontroller. The output is the centroid of the area enclosed by the fuzzy member function, and the output variable is the output variable. The domain of discourse is The final load shedding level The calculation expression is as follows:
[0024] ;
[0025] S6. Based on the load shedding level LSP obtained in step S5, generate the corresponding relay control signal to control the on / off of the hierarchical load circuit of the system and realize energy management.
[0026] The hierarchical load loop control divides the system load into primary critical loads, secondary monitoring loads, and tertiary flexible loads based on the importance of the loads in the monitoring task and the load power. Based on the range of LSP values, relays are used to control the closing or opening of each level of load to adjust the total power consumption of the system.
[0027] The specific structure and control actions of the graded load circuit are as follows:
[0028] Level 1 critical load: includes the core microcontroller, data storage module and wireless communication module, controlled by the first relay;
[0029] Secondary monitoring load: includes various low-power environmental sensors, controlled by a second relay;
[0030] Level 3 flexible load: includes high-definition image acquisition equipment, pan-tilt motor and equipment heating and de-icing device, controlled by a third relay.
[0031] The microcontroller controls actions based on LSP values, and the specific control logic is as follows:
[0032] when When in full-speed mode M0, all three relays are closed;
[0033] when When this occurs, energy-saving mode M1 is executed, and the third relay is disconnected;
[0034] when At this time, execute survival mode M2 to disconnect the second and third relays;
[0035] when When this happens, execute sleep mode M3 and disconnect all three relays.
[0036] Furthermore, step S2 is specifically as follows:
[0037] S21. Outlier cleaning and missing value imputation:
[0038] Introducing physical consistency constraints, a correction process is performed on all sampling points, as shown in the following expression:
[0039] ;
[0040] in, Represents the radiation observation value at the original time. This indicates the corrected value.
[0041] Then, a linear interpolation method based on time continuity is used to fill in the missing values, set at... and If there are data gaps between time points, then the missing points... The expression for calculating the value of is as follows:
[0042] ;
[0043] in, ; and These represent the nearest valid observations before and after the missing segment, respectively.
[0044] S22, Data Normalization;
[0045] The radiation intensity collected in step S1 is obtained using the maximum-minimum normalization method. and ambient temperature Mapped to For intervals, eliminating the influence of dimensions, the calculation expression is as follows:
[0046] ;
[0047] in, This represents the normalized data. Represents the original data. and These represent the minimum and maximum values of the feature in the training set, respectively.
[0048] S23, Time Feature Coding:
[0049] Use the current timestamp Convert to continuous values with a daily period, and calculate sine and cosine codes. , The calculation expression is as follows:
[0050] ;
[0051] ;
[0052] in, Indicates the current time The corresponding number of hours.
[0053] S24. Construct time series feature vectors;
[0054] Construct the current moment Input time series feature vector The expression is as follows:
[0055] ;
[0056] in, express Normalized radiation intensity at any given time; This indicates the transpose operation.
[0057] Furthermore, step S3 is specifically as follows:
[0058] S31. Input the feature vector constructed in step S2 into the pre-trained LSTM-solar radiation prediction model, and output the solar radiation intensity prediction sequence within the future set time window.
[0059] The LSTM-solar radiation prediction model includes an input layer, a hidden layer, and a fully connected output layer.
[0060] The input layer receives a sequence of feature vectors extracted by a sliding window for the current time step. The input layer consists of A series of time steps Composition, where each node represents a complete feature vector at a certain moment, including: normalized radiance value Sine time coding and cosine time coding The input layer uses a weight matrix. Temporal features are passed to the hidden layer.
[0061] Hidden layer by It consists of LSTM units, denoted as . Each unit has a time-series memory function and uses a weight matrix. The hidden layer's state propagation over time is represented by the forget gate. Input gate and output gate Controlling cell state The update is calculated using the following expression:
[0062] ;
[0063] ;
[0064] ;
[0065] ;
[0066] ;
[0067] ;
[0068] in, This represents the Sigmoid activation function. , , , This represents the corresponding weight matrix. , , , This indicates the corresponding bias term. This means mapping the input data to the interval (-1, 1) to generate the feature representation to be updated. This represents the output of the hidden layer at the current moment.
[0069] The LSTM-solar radiation prediction model employs a recursive prediction strategy. The predicted output at time step is used as One of the input features of a given moment is the iterative deduction of the future. The radiation sequence at each time step. High-order temporal features extracted by the hidden layer are processed by a weight matrix. After linear weighted aggregation, it is passed to the fully connected output layer, and the final output is... Predicted radiation intensity .
[0070] S32. Based on step S31, calculate the future effective radiation intensity using the photovoltaic temperature correction model;
[0071] After obtaining the predicted sequence, the future effective radiation intensity is calculated using a photovoltaic temperature correction model. The expression is as follows:
[0072] ;
[0073] in, This indicates the total number of time steps in the forecast; The model predicts the first The intensity of solar radiation at any given time; Indicates the current ambient temperature; This indicates the standard test condition temperature, taken as 25℃. The power temperature coefficient of a photovoltaic module is represented by a value of [value missing]. .
[0074] Furthermore, step S4 is specifically as follows:
[0075] (1) For the radiation intensity input variable and ;
[0076] A mixed membership function distribution is adopted, and for the Z-level, a Gaussian membership function is used. The mathematical expression for smoothly covering the mean region is as follows:
[0077] ;
[0078] Among them, level Z is the medium level. This represents the input value for radiation intensity. This represents the central value of the Gaussian function. This represents the standard deviation and is used to control the width of the function.
[0079] For the P-level, an S-type membership function is used. Its expression is as follows:
[0080] ;
[0081] Among them, P level means strong level. The parameter representing the slope of the control curve. This represents the offset center parameter.
[0082] For level N, a Z-type membership function is used. Its curve characteristics are mirror-symmetric to the S-shaped function about the central axis, and it is used to characterize the downward trend in the low-light range. Its expression is as follows:
[0083] ;
[0084] Among them, level N is the weak level.
[0085] (2) Input variables for battery SOC;
[0086] For the battery SOC input variable, there are four state levels: VL - Very Low, L - Low, M - Medium, and H - High.
[0087] For the boundary states VL and H, as well as the intermediate steady state M, trapezoidal membership functions are selected; while for the L region, which is sensitive to changes in state, triangular membership functions are selected to improve control sensitivity.
[0088] (3) For battery SOC output variables;
[0089] Trapezoidal membership functions are used to describe the VL and H states, ensuring that the SOC is in a state of... and The membership degree remains 1 in the extreme range; a triangular membership function is used to describe the L and M states to maintain sensitivity to changes in intermediate charge.
[0090] Furthermore, in step S5, the fuzzy control rule base is specifically as follows:
[0091] Set the total number of rules in the fuzzy control rule base to Article, then Article Rules The expression is as follows:
[0092] ;
[0093] in, Indicates real-time SOC; These represent the input variables respectively. In the rules The corresponding fuzzy set in; This represents the output variable, i.e., the load shedding level; Indicates that the output variable is in the rule The fuzzy set corresponding to the load shedding level in the [theory / concept].
[0094] The fuzzy control rule base includes adjustment strategies based on energy trend prediction, among which the key protective rules are as follows:
[0095] (a) Rule I - Dawn Awakening: IF is AND is AND is THEN is ;
[0096] (b) Rule II - Dusk Avoidance: IF is AND is AND is THEN is ;
[0097] (c) Rule III - Extreme Cold Protection: IF is THEN is Regardless of lighting conditions, all loads are forcibly disconnected to prevent irreversible battery damage.
[0098] The beneficial effects of this invention are as follows: The method of this invention first collects historical solar radiation data and battery state of charge (SOC) of the photovoltaic system, and preprocesses and encodes the collected solar radiation to construct a feature vector sequence. Then, it uses a trained Long Short-Term Memory (LSTM) network model to make multi-step predictions of the solar radiation trend within a set future time period to obtain the future effective irradiance. Furthermore, a fuzzy logic controller is designed, which takes the battery SOC, the current effective irradiance, and the predicted future effective irradiance as three input variables. Through fuzzy inference and defuzzification calculation, it outputs the load shedding level (LSP). Finally, it performs hierarchical on / off control of multi-level loads in the system according to the load shedding level. The method of this invention uses a fuzzy controller based on multi-source information fusion to replace a hard threshold switch. It can establish a nonlinear mapping relationship between battery SOC, current illumination, and future trends, and realize flexible hierarchical scheduling of the load. This not only eliminates the frequent oscillation of relays caused by transient changes in illumination, significantly reducing hardware losses, but also actively optimizes energy consumption strategies under critical conditions such as dawn, dusk, or continuous rain. While ensuring the continuous operation of key monitoring tasks, it maximizes the remaining energy of the battery and the effective service time of the system, making it particularly suitable for unattended field monitoring scenarios. Attached Figure Description
[0099] Figure 1 This is a flowchart of a fuzzy energy management method based on LSTM-solar radiation prediction according to the present invention.
[0100] Figure 2 This is a hardware system structure block diagram of the photovoltaic energy storage monitoring system in an embodiment of the present invention.
[0101] Figure 3 This is a network topology diagram of the LSTM-solar radiation prediction model in an embodiment of the present invention.
[0102] Figure 4 This is a schematic diagram of the long short-term memory neural network unit structure in an embodiment of the present invention.
[0103] Figure 5 This is a diagram showing the internal logic structure of the fuzzy controller in an embodiment of the present invention.
[0104] Figure 6 This is a schematic diagram of the membership function of the input variable of the fuzzy controller in an embodiment of the present invention.
[0105] Figure 7 This is a simulation comparison diagram of load scheduling between the method of the present invention and the existing fixed threshold strategy under typical variable weather conditions in the embodiments of the present invention. Detailed Implementation
[0106] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0107] like Figure 1 The flowchart of a fuzzy energy management method based on LSTM-solar radiation prediction according to the present invention is shown below, and the specific steps are as follows:
[0108] S1. Real-time acquisition of environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) of batteries from field monitoring stations;
[0109] like Figure 2 As shown, this embodiment uses a photovoltaic energy storage monitoring system to collect real-time environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) data of the battery at the field monitoring station. The hardware structure of the photovoltaic energy storage monitoring system includes: a microcontroller and a battery interface and power supply connected to it, a voltage acquisition module, a temperature acquisition module, a light acquisition module, a current acquisition module, a communication module, and a multi-channel DC relay control module.
[0110] The microcontroller acquires ambient radiation intensity data through a light acquisition module, ambient temperature data through a temperature acquisition module, and calculates the real-time state of charge (SOC) of the battery through a battery interface and voltage / current acquisition modules. The multi-channel DC relay control module includes three relays. In this embodiment, the data acquisition time interval is set to 15 minutes.
[0111] S2. Based on the data collected in step S1, outlier cleaning and missing value filling are performed on the collected historical radiation intensity data, and feature encoding is performed in combination with time information to construct a time series feature vector.
[0112] The feature encoding takes into account the significant diurnal periodicity of solar radiation, introducing sinusoidal and cosine time encodings as auxiliary features, which, together with normalized radiation intensity observations, construct the current time... The time series feature vectors are used to enhance the model's ability to perceive time periodicity.
[0113] S3. Based on the feature vector constructed in step S2, input the pre-trained LSTM-solar radiation prediction model, output the solar radiation intensity prediction sequence within the future set time window, and calculate the future effective radiation intensity.
[0114] The pre-trained LSTM-solar radiation prediction model is implemented as follows: a dataset is constructed based on historical radiation intensity data, and a sliding window mechanism is used to extract past data. The LSTM network is trained offline using a sequence of continuous feature vectors at each time step as input, with the radiation intensity at future time steps as labels, mean squared error (MSE) as the loss function, and the Adam optimizer. After training, it is deployed in a microcontroller.
[0115] The calculation of future effective radiation intensity is to obtain the future output of the LSTM model. The radiation intensity prediction sequence at each time step is converted into an equivalent radiation intensity considering the temperature effect using a photovoltaic temperature correction model, and the average energy level over a future period is calculated using a sliding window weighted average method.
[0116] S4. Calculate the current effective radiation intensity, and use it, along with the real-time SOC obtained in step S1 and the future effective radiation intensity obtained in step S3, as the three input variables of the fuzzy controller. Use the preset membership function to map them into fuzzy linguistic variables.
[0117] The fuzzy controller adopts a three-input single-output fuzzy logic control architecture. Its core consists of a fuzzification interface, a fuzzy rule base, an inference engine, and a defuzzification interface. The input variables are the real-time SOC of the battery, the current effective radiation intensity, and the future effective radiation intensity. The output variable is the load shedding level (LSP), which is used to establish a nonlinear mapping relationship between the current and future energy states of the system and the load scheduling decision.
[0118] S5. Based on the preset fuzzy control rule base, perform fuzzy reasoning on the fuzzy linguistic variables of the three input variables to obtain a fuzzy output set, and use the defuzzification algorithm to calculate the accurate load shedding level LSP.
[0119] The fuzzy control rule base includes adjustment strategies based on energy trend prediction, specifically including: when the future light intensity is predicted to be strong, more loads are allowed to be turned on even if the current power is low; and when the future light intensity is predicted to be continuous, high-power loads are restricted from being turned on even if the current power is restored.
[0120] The fuzzy inference described is the process in the fuzzy controller of comprehensively judging the input fuzzy information based on a fuzzy rule base and obtaining a fuzzy output. The input and output variables have a non-linear mapping relationship in the rule base. This inference logic based on multidimensional fuzziness is used... The mathematical expression for the corresponding fuzzy inference rule for the three-input single-output fuzzy logic control architecture is as follows:
[0121] ;
[0122] in, Indicates the number of fuzzy control rules; ; This represents the output fuzzy set of the fuzzy controller. These represent the membership degrees of the input variables of the fuzzy controller, namely the battery state of charge (SOC) and the current radiation intensity. and future radiation intensity . Indicates a fuzzy relationship, " indicates taking the intersection, " " indicates taking the union of sets, " " indicates the composition operator.
[0123] The load shedding level (LSP) is a precise numerical control quantity obtained by defuzzifying the fuzzy set output by fuzzy inference. This numerical quantification characterizes the energy adequacy of the system under the constraints of the current battery state and future illumination trends, and is used to define the load power consumption level that the system should maintain in the continuous domain.
[0124] Among them, defuzzification involves using the centroid method to calculate the fuzzy set of the fuzzy inference output. (Right now The geometric centroid of the area is calculated and converted into a precise control quantity that can be executed by the microcontroller. The output is the centroid of the area enclosed by the fuzzy member function, and the output variable is the centroid of the area enclosed by the fuzzy member function. The domain of discourse is The final load shedding level The calculation expression is as follows:
[0125] ;
[0126] S6. Based on the load shedding level LSP obtained in step S5, generate the corresponding relay control signal to control the on / off of the hierarchical load circuit of the system and realize energy management.
[0127] The hierarchical load loop control divides the system load into primary critical loads, secondary monitoring loads, and tertiary flexible loads based on the importance of the loads in the monitoring task and the load power. Based on the range of LSP values, relays are used to control the closing or opening of each level of load to adjust the total power consumption of the system.
[0128] The specific structure and control actions of the graded load circuit are as follows:
[0129] Level 1 critical load: includes the core microcontroller, data storage module and wireless communication module, controlled by the first relay;
[0130] Secondary monitoring load: includes various low-power environmental sensors (temperature, humidity, air pressure, wind speed), controlled by a second relay;
[0131] Level 3 flexible load: includes high-definition image acquisition equipment, pan-tilt motor and equipment heating and de-icing device, controlled by a third relay.
[0132] The microcontroller controls actions based on LSP values, and the specific control logic is as follows:
[0133] when When in full-speed mode (M0), all three relays are closed;
[0134] when When in power, the energy-saving mode (M1) is activated, and the third relay is disconnected.
[0135] when When this happens, execute Survival Mode (M2) and disconnect the second and third relays;
[0136] when When the time is right, execute sleep mode (M3) and disconnect all three relays.
[0137] In this embodiment, step S2 is specifically as follows:
[0138] S21. Outlier cleaning and missing value imputation:
[0139] During the analysis of the raw data, several small negative values were found during the nighttime period (such as...). Based on the physical fact that light energy cannot be negative, this study introduces a physical consistency constraint and performs a correction process on all sampling points, as shown in the following expression:
[0140] ;
[0141] in, Represents the radiation observation value at the original time. This indicates the corrected value. This step effectively eliminates the interference of sensor noise on the neural network's low-light prediction capability.
[0142] Due to the harsh weather conditions in high-altitude and cold environments, field monitoring sensors occasionally experience signal transmission interruptions or equipment restarts, resulting in missing data at certain moments in the original time series. To address these missing data due to sensor malfunctions, this invention employs a linear interpolation method based on time continuity to fill in the missing values, ensuring the integrity of the time series. (Set at...) and If there are data gaps between time points, then the missing points... The expression for calculating the value of is as follows:
[0143] ;
[0144] in, ; and These represent the nearest valid observations before and after the missing segment, respectively.
[0145] S22, Data Normalization;
[0146] The radiation intensity collected in step S1 is obtained using the maximum-minimum normalization method. and ambient temperature Mapped to For intervals, eliminating the influence of dimensions, the calculation expression is as follows:
[0147] ;
[0148] in, This represents the normalized data. Represents the original data. and These represent the minimum and maximum values of the feature in the training set, respectively.
[0149] S23, Time Feature Coding:
[0150] Use the current timestamp Convert to continuous values with a daily period, and calculate sine and cosine codes. , The calculation expression is as follows:
[0151] ;
[0152] ;
[0153] in, Indicates the current time The corresponding number of hours.
[0154] S24. Construct time series feature vectors;
[0155] Construct the current moment Input time series feature vector The expression is as follows:
[0156] ;
[0157] in, express Normalized radiation intensity at any given time; This indicates the transpose operation.
[0158] In this embodiment, step S3 is specifically as follows:
[0159] S31. Input the feature vector constructed in step S2 into the pre-trained LSTM-solar radiation prediction model, and output the solar radiation intensity prediction sequence within the future set time window.
[0160] like Figure 3 As shown, the LSTM-solar radiation prediction model includes an input layer, a hidden layer, and a fully connected output layer.
[0161] The input layer receives a sequence of feature vectors extracted by a sliding window. In this embodiment, the length of the sliding window is set. (That is, making predictions using data from the past 3 hours). For the current moment... The input layer consists of A series of time steps Composition, where each node represents a complete feature vector at a certain moment, including: normalized radiance value Sine time coding and cosine time coding The input layer uses a weight matrix. Temporal features are passed to the hidden layer.
[0162] Hidden layer by Composed of LSTM units (as defined in this embodiment) ), denoted as Each unit has a time-series memory function and uses a weight matrix. The hidden layer itself is represented by the state transmission in the time dimension, so that the output of the neuron at the current moment depends not only on the current input, but also on its own state at the previous moment, thus effectively capturing the dynamic change trend of photovoltaic data.
[0163] Figure 4The internal control logic of the LSTM unit is shown in detail. Each LSTM unit uses a forget gate. Input gate and output gate Controlling cell state The update is calculated using the following expression:
[0164] ;
[0165] ;
[0166] ;
[0167] ;
[0168] ;
[0169] ;
[0170] in, This represents the Sigmoid activation function. , , , This represents the corresponding weight matrix. , , , This indicates the corresponding bias term. This means mapping the input data to the interval (-1, 1) to generate the feature representation to be updated. This represents the output of the hidden layer at the current moment.
[0171] The LSTM-solar radiation prediction model employs a recursive prediction strategy. The predicted output at time step is used as One of the input features of a given moment is the iterative deduction of the future. The radiation sequence at each time step. High-order temporal features extracted by the hidden layer are processed by a weight matrix. After linear weighted aggregation, it is passed to the fully connected output layer, and the final output is... Predicted radiation intensity .
[0172] S32. Based on step S31, calculate the future effective radiation intensity using the photovoltaic temperature correction model;
[0173] After obtaining the predicted sequence, the future effective radiation intensity is calculated using a photovoltaic temperature correction model. The expression is as follows:
[0174] ;
[0175] in, This represents the total number of time steps for prediction (in this embodiment). ); The model predicts the first The intensity of solar radiation at any given time; Indicates the current ambient temperature; This indicates the standard test condition temperature, taken as 25℃. The power temperature coefficient of a photovoltaic module is represented by a value of [value missing]. This formula is used to correct theoretical radiation intensity to the actual usable equivalent power generation intensity.
[0176] In this embodiment, step S4 is specifically as follows:
[0177] Figure 5 The internal logic structure diagram of the fuzzy controller is shown, including three core components: fuzzification, fuzzy inference (in conjunction with a fuzzy rule base), and defuzzification. Based on Figure 5 As shown in the logical structure, this embodiment constructs a three-input single-output control architecture.
[0178] (1) For the radiation intensity input variable and ;
[0179] A mixed membership function distribution is adopted, and for the Z (medium) level, a Gaussian membership function is used. The mathematical expression for smoothly covering the mean region is as follows:
[0180] ;
[0181] in, This represents the input value for radiation intensity. This represents the central value of the Gaussian function. This represents the standard deviation and is used to control the width of the function.
[0182] For the P (strong) level, an S-type membership function is used. Its expression is as follows:
[0183] ;
[0184] in, The parameter representing the slope of the control curve. This represents the offset center parameter.
[0185] For N (weak) levels, a Z-type membership function is used. Its curve characteristics are mirror-symmetric to the S-shaped function about the central axis, and it is used to characterize the downward trend in the low-light range. Its expression is as follows:
[0186] ;
[0187] (2) Input variables for battery SOC;
[0188] For the battery SOC input variable, there are four state levels: VL (Very Low), L (Low), M (Medium), and H (High).
[0189] In this diagram, VL corresponds to a deeply discharged battery state (e.g., 0–10%), where the battery terminal voltage is close to the discharge cutoff threshold. Continuing to discharge with a high current will lead to irreversible damage to the electrode materials and capacity decay, posing a risk of battery failure. L represents a lower charge range (e.g., 5%–45%), where the system can only maintain basic survival or low-power operation, and the startup of high-power loads must be strictly limited. M covers a moderate charge range (e.g., 40%–85%), where the battery is in a stable discharge plateau region, and the system has a relatively stable load-bearing capacity. H represents a fully charged state (e.g., 80%–100%), where the battery is in a float charging or fully charged stage, supporting full-speed operation of all loads. For the boundary states VL and H, and the intermediate steady state M, trapezoidal membership functions are selected to ensure output stability. For the L region, which is sensitive to changes in state, triangular membership functions are selected to improve control sensitivity.
[0190] The specific membership function shape is as follows: Figure 6 As shown. Among them. Figure 6 (a) is the membership function of battery SOC. Figure 6 (b) is the membership function of radiation intensity.
[0191] (3) For battery SOC output variables;
[0192] Trapezoidal membership functions are used to describe the VL (very low) and H (high) states to ensure that the SOC is in a state of... and In the extreme range, the membership degree remains at 1 to prevent control signal oscillation; a triangular membership function is used to describe the L (low) and M (medium) states to maintain sensitivity to changes in intermediate charge.
[0193] In this embodiment, the fuzzy control rule base in step S5 is as follows:
[0194] Set the total number of rules in the fuzzy control rule base to Article, then Article Rules The expression is as follows:
[0195] ;
[0196] in, Indicates real-time SOC; These represent the input variables respectively. In the rules The corresponding fuzzy set in; This represents the output variable, i.e., the load shedding level; Indicates that the output variable is in the rule The fuzzy set corresponding to the load shedding level in the [theory / concept].
[0197] The fuzzy control rule base includes adjustment strategies based on energy trend prediction, among which the key protective rules are as follows:
[0198] (a) Rule I (Dawn Awakening): IF is (low) AND is (weak) AND is (Strong) THEN is (Energy saving mode);
[0199] (b) Rule II (Dusk Avoidance): IF is (Chinese) AND is (Chinese) AND is (Weak) THEN is (Survival Mode);
[0200] (c) Rule III (Extreme Cold Protection): IF is (Very Low) THEN is (Hibernation Mode) Forces all loads off regardless of light conditions to prevent irreversible battery damage.
[0201] Figure 7 The paper presents a comparison of load scheduling between the method of this invention and existing fixed threshold strategies under typical variable weather conditions. As shown in the figure, the method of this invention, by predicting future light trends, adjusts the load level in advance before light decays, effectively avoiding deep battery depletion, and reduces the cutoff level in advance before light recovers, thus extending the system's service duration.
[0202] In summary, the method of this invention adopts a proactive management approach of "prediction + decision-making." By introducing periodic time-encoded features to construct an LSTM prediction model, it deeply mines the temporal dependencies of photovoltaic data, accurately predicting energy supply trends for future time windows under complex weather conditions, overcoming the blindness and lag of existing hysteresis comparison control. Simultaneously, in terms of the decision-making mechanism, the method of this invention utilizes a fuzzy logic controller to integrate the current battery SOC, current illumination, and future illumination trends, establishing a nonlinear load shedding level (LSP) mapping relationship, replacing hard threshold switches, and achieving flexible and smooth scheduling of multi-level loads. This method effectively eliminates the frequent relay oscillation losses caused by transient illumination changes and optimizes energy consumption strategies under critical conditions such as dawn, dusk, or continuous rainy weather. While ensuring the continuous operation of critical tasks at high-altitude and cold-weather monitoring stations, it maximizes the system's energy utilization and service duration.
[0203] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Various modifications and variations can be made to the invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the invention should be included within the scope of the claims of the invention.
Claims
1. A fuzzy energy management method based on LSTM-solar radiation prediction, the specific steps of which are as follows: S1. Real-time acquisition of environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) of batteries from field monitoring stations; A photovoltaic energy storage monitoring system is used to collect real-time environmental radiation intensity data, environmental temperature data, and real-time state of charge (SOC) data of the battery at field monitoring stations. The hardware structure of the photovoltaic energy storage monitoring system includes: The microcontroller and its connected battery interface, power supply, voltage acquisition module, temperature acquisition module, light acquisition module, current acquisition module, communication module, and multi-channel DC relay control module; The microcontroller acquires ambient radiation intensity data through a light acquisition module, ambient temperature data through a temperature acquisition module, and calculates the real-time state of charge (SOC) of the battery through a battery interface and voltage and current acquisition modules; the multi-channel DC relay control module includes three relays. S2. Based on the data collected in step S1, outlier cleaning and missing value filling are performed on the collected historical radiation intensity data, and feature encoding is performed in combination with time information to construct a time series feature vector. The feature encoding introduces sinusoidal and cosine time codes as auxiliary features, which, together with the normalized radiation intensity observations, construct the current time value. Time series feature vectors; S3. Based on the feature vector constructed in step S2, input the pre-trained LSTM-solar radiation prediction model, output the solar radiation intensity prediction sequence within the future set time window, and calculate the future effective radiation intensity. The pre-trained LSTM-solar radiation prediction model is implemented as follows: a dataset is constructed based on historical radiation intensity data, and a sliding window mechanism is used to extract past data. The LSTM network is trained offline using the Adam optimizer by taking a continuous sequence of feature vectors at each time step as input, the radiation intensity at future time steps as labels, the mean square error as the loss function, and the Adam optimizer as the loss function. After training, it is deployed in a microcontroller. The calculation of future effective radiation intensity is to obtain the future output of the LSTM model. The radiation intensity prediction sequence at each time step is converted into an equivalent radiation intensity considering the temperature effect using a photovoltaic temperature correction model, and the average energy level over a future period is calculated using a sliding window weighted average method. S4. Calculate the current effective radiation intensity, and use it, along with the real-time SOC obtained in step S1 and the future effective radiation intensity obtained in step S3, as the three input variables of the fuzzy controller. Use the preset membership function to map them into fuzzy linguistic variables. The fuzzy controller adopts a three-input single-output fuzzy logic control architecture. Its core consists of a fuzzification interface, a fuzzy rule base, an inference engine, and a defuzzification interface. The input variables are the real-time SOC of the battery, the current effective radiation intensity, and the future effective radiation intensity. The output variable is the load shedding level LSP. A nonlinear mapping relationship is established between the current and future energy states of the system and the load scheduling decision. S5. Based on the preset fuzzy control rule base, perform fuzzy reasoning on the fuzzy linguistic variables of the three input variables to obtain a fuzzy output set, and use the defuzzification algorithm to calculate the accurate load shedding level LSP. The fuzzy control rule base includes adjustment strategies based on energy trend prediction, specifically including: when the future light intensity is predicted to be strong, more loads are allowed to be turned on even if the current power is low; and when the future light intensity is predicted to be continuous, high-power loads are restricted from being turned on even if the current power is restored. For the three-input single-output fuzzy logic control architecture, the corresponding mathematical expression for the fuzzy inference rule is as follows: ; in, Indicates the number of fuzzy control rules; ; This represents the output fuzzy set of the fuzzy controller. These represent the membership degrees of the input variables of the fuzzy controller, namely the battery state of charge (SOC) and the current radiation intensity. and future radiation intensity To indicate a fuzzy relationship, "Indicates taking the intersection," "Indicates taking the union of sets," " indicates the composition operator; The load shedding level LSP is the precise numerical control quantity obtained by defuzzifying the fuzzy set output by fuzzy inference. Among them, defuzzification involves using the centroid method to calculate the fuzzy set of the fuzzy inference output. The geometric centroid is calculated and transformed into a precise control quantity executable by the microcontroller. The output is the centroid of the area enclosed by the fuzzy member function, and the output variable is the output variable. The domain of discourse is The final load shedding level The calculation expression is as follows: ; S6. Based on the load shedding level LSP obtained in step S5, generate the corresponding relay control signal to control the on / off of the hierarchical load circuit of the system and realize energy management. The graded load loop control divides the system load into primary critical loads, secondary monitoring loads, and tertiary flexible loads based on the importance of the loads in the monitoring task and the load power. Based on the range of LSP values, relays are used to control the closing or opening of each level of load to adjust the total power consumption of the system. The specific structure and control actions of the graded load circuit are as follows: Level 1 critical load: includes the core microcontroller, data storage module and wireless communication module, controlled by the first relay; Secondary monitoring load: includes various low-power environmental sensors, controlled by a second relay; Level 3 elastic load: includes high-definition image acquisition equipment, gimbal motor and equipment heating and de-icing device, controlled by a third relay; The microcontroller controls actions based on LSP values, and the specific control logic is as follows: when When in full-speed mode M0, all three relays are closed; when When this occurs, energy-saving mode M1 is executed, and the third relay is disconnected; when At this time, execute survival mode M2 to disconnect the second and third relays; when When this happens, execute sleep mode M3 and disconnect all three relays.
2. The fuzzy energy management method based on LSTM-solar radiation prediction according to claim 1, characterized in that, Step S2 is as follows: S21. Outlier cleaning and missing value imputation: Introducing physical consistency constraints, a correction process is performed on all sampling points, as shown in the following expression: ; in, Represents the radiation observation value at the original time. This indicates the corrected value; Then, a linear interpolation method based on time continuity is used to fill in the missing values, set at... and If there are data gaps between time points, then the missing points... The expression for calculating the value of is as follows: ; in, ; and These represent the nearest valid observations before and after the missing segment; S22, Data Normalization; The radiation intensity collected in step S1 is obtained using the maximum-minimum normalization method. and ambient temperature Mapped to For intervals, eliminating the influence of dimensions, the calculation expression is as follows: ; in, This represents the normalized data. Represents the original data. and These represent the minimum and maximum values of the feature in the training set, respectively. S23, Time Feature Coding: Use the current timestamp Convert to continuous values with a daily period, and calculate sine and cosine codes. , The calculation expression is as follows: ; ; in, Indicates the current time The corresponding number of hours; S24. Construct time series feature vectors; Construct the current moment Input time series feature vector The expression is as follows: ; in, express Normalized radiation intensity at any given time; This indicates the transpose operation.
3. The fuzzy energy management method based on LSTM-solar radiation prediction according to claim 2, characterized in that, Step S3 is as follows: S31. Input the feature vector constructed in step S2 into the pre-trained LSTM-solar radiation prediction model, and output the solar radiation intensity prediction sequence within the future set time window. The LSTM-solar radiation prediction model includes: an input layer, a hidden layer, and a fully connected output layer; The input layer receives a sequence of feature vectors extracted by a sliding window for the current time step. The input layer consists of A series of time steps Composition, where each node represents a complete feature vector at a certain moment, including: normalized radiance value Sine time coding and cosine time coding The input layer uses a weight matrix. Pass temporal features to the hidden layer; Hidden layer by It consists of LSTM units, denoted as . Each unit has a time-series memory function and uses a weight matrix. The hidden layer's state propagation over time is represented by the forget gate. Input gate and output gate Controlling cell state The update is calculated using the following expression: ; ; ; ; ; ; in, This represents the Sigmoid activation function. , , , This represents the corresponding weight matrix. , , , This indicates the corresponding bias term. This means mapping the input data to the interval (-1, 1) to generate the feature representation to be updated. This represents the output of the hidden layer at the current moment; The LSTM-solar radiation prediction model employs a recursive prediction strategy. The predicted output at time step is used as One of the input features of a given moment is the iterative deduction of the future. The radiation sequence at each time step; the high-order temporal features extracted by the hidden layer are processed by the weight matrix. After linear weighted aggregation, it is passed to the fully connected output layer, and the final output is... Predicted radiation intensity ; S32. Based on step S31, calculate the future effective radiation intensity using the photovoltaic temperature correction model; After obtaining the predicted sequence, the future effective radiation intensity is calculated using a photovoltaic temperature correction model. The expression is as follows: ; in, This indicates the total number of time steps in the forecast; The model predicts the first The intensity of solar radiation at any given time; Indicates the current ambient temperature; This indicates the standard test condition temperature, taken as 25℃. The power temperature coefficient of a photovoltaic module is represented by a value of [value missing]. .
4. The fuzzy energy management method based on LSTM-solar radiation prediction according to claim 3, characterized in that, Step S4 is as follows: (1) For the radiation intensity input variable and ; A mixed membership function distribution is adopted, and for the Z-level, a Gaussian membership function is used. The mathematical expression for smoothly covering the mean region is as follows: ; Among them, level Z is the medium level. This represents the input value for radiation intensity. This represents the central value of the Gaussian function. This represents the standard deviation and is used to control the width of the function. For the P-level, an S-type membership function is used. Its expression is as follows: ; Among them, P level means strong level. The parameter representing the slope of the control curve. Indicates the offset center parameter; For level N, a Z-type membership function is used. Its curve characteristics are mirror-symmetric to the S-shaped function about the central axis, and it is used to characterize the downward trend in the low-light range. Its expression is as follows: ; Among them, level N is the weak level; (2) Input variables for battery SOC; For the battery SOC input variable, there are four state levels: VL - Very Low, L - Low, M - Medium, and H - High; For the boundary states VL and H, as well as the intermediate steady state M, trapezoidal membership functions are selected; while for the L region, which is sensitive to changes in state, triangular membership functions are selected to improve control sensitivity. (3) For battery SOC output variables; Trapezoidal membership functions are used to describe the VL and H states, ensuring that the SOC is in a state of... and The membership degree remains 1 in the extreme range; a triangular membership function is used to describe the L and M states to maintain sensitivity to changes in intermediate charge.
5. The fuzzy energy management method based on LSTM-solar radiation prediction according to claim 4, characterized in that, In step S5, the fuzzy control rule base is specifically as follows: Set the total number of rules in the fuzzy control rule base to Article, then Article Rules The expression is as follows: ; in, Indicates real-time SOC; These represent the input variables respectively. In the rules The corresponding fuzzy set in; This represents the output variable, i.e., the load shedding level; Indicates that the output variable is in the rule The fuzzy set corresponding to the load shedding level in the context; The fuzzy control rule base includes adjustment strategies based on energy trend prediction, among which the key protective rules are as follows: (a) Rule I - Dawn Awakening: IF is AND is AND is THEN is ; (b) Rule II - Dusk Avoidance: IF is AND is AND is THEN is ; (c) Rule III - Extreme Cold Protection: IF is THEN is Regardless of lighting conditions, all loads are forcibly disconnected to prevent irreversible battery damage.