A solar energy storage system charging and discharging optimization strategy based on internet of things

By deploying an NTP server in a solar energy storage system to correct time drift and generate time-series aligned data, an optimization model is built and charging and discharging are adjusted in real time. This solves the problem of data timestamp alignment, improves system energy efficiency and battery life, and achieves efficient energy management.

CN120978953BActive Publication Date: 2026-02-10NANTONG RUIBO ELECTRIC CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511483500.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-02-10
Estimated Expiration
2045-10-17

AI Technical Summary

Technical Problem

In existing IoT-based solar energy storage systems, the time drift of distributed sensing nodes makes it difficult to align the timestamps of power generation, energy storage, and electricity consumption data. This leads to a misalignment between charging and discharging decisions and the actual energy situation, resulting in ineffective battery charging and discharging and low system energy efficiency.

Method used

By deploying an NTP server to establish a unified time reference, correcting node time drift, and aggregating and completing the data, a time-aligned comprehensive energy data is generated. A mixed integer programming charging and discharging optimization model is constructed and solved quickly using a cloud platform. Finally, real-time adjustment of charging and discharging is achieved through closed-loop control.

Benefits of technology

It effectively solves the problem of repeated ineffective charging and discharging of batteries, slows down battery aging, improves energy utilization efficiency and overall system energy efficiency, and enhances the effectiveness of the strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120978953B_ABST
    Figure CN120978953B_ABST
Patent Text Reader

Abstract

The application discloses a solar energy storage system charging and discharging optimization strategy based on an internet of things, and relates to the technical field of solar energy storage systems. The application comprises the following steps: S1, collecting real-time power generation data of a photovoltaic power generation unit, real-time state of charge data of an energy storage battery, environmental parameter data collected by an environmental sensor and real-time power load data of a load by means of a distributed sensing node, wherein the data all contain corresponding timestamp information; S2, performing timestamp synchronization and data alignment processing on the distributed sensing data collected in S1 and containing the timestamp information, and generating time sequence aligned comprehensive energy data. The application establishes a unified time reference by deploying an NTP server, corrects node time drift, and completes data aggregation, thereby generating time sequence aligned comprehensive energy data; and then constructs a mixed integer programming charging and discharging optimization model with the minimum comprehensive cost as the target, and combines power balance, battery SOC and other constraints to ensure reasonable decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of solar energy storage system technology, specifically to an optimization strategy for charging and discharging a solar energy storage system based on the Internet of Things. Background Technology

[0002] Against the backdrop of current energy structure transformation, solar energy storage systems have become an important component of the distributed energy sector. These systems typically consist of photovoltaic power generation units, energy storage batteries, charge / discharge controllers, and loads. By converting solar energy into electrical energy and storing it in batteries, they enable the time-shifting application of electrical energy. With the widespread adoption of IoT technology, the system can collect real-time data on power generation, battery status, environmental parameters, and electricity load through sensors, and rely on a cloud platform for centralized monitoring and intelligent control, thereby improving energy utilization efficiency.

[0003] However, existing IoT-based optimization strategies face a deep-seated timing coordination problem in practical operation: due to microsecond to millisecond-level time drift in the sampling time of distributed sensing nodes, the timestamps of the power generation, energy storage, and electricity consumption data acquired by the system are difficult to align. This timing asynchronicity causes a misalignment between the charging and discharging decisions made by the optimization algorithm based on the misaligned data and the actual energy fluctuation situation. This not only reduces the effectiveness of the strategy but also leads to repeated ineffective charging and discharging of batteries, accelerating battery aging and reducing the overall energy efficiency of the system. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides an IoT-based solar energy storage system charging and discharging optimization strategy. This strategy solves the problems in existing technologies where time drift of distributed sensing nodes during use leads to difficulty in aligning data timestamps, misalignment of charging and discharging decisions with the actual energy situation, and consequently, ineffective charging and discharging of batteries, aging, and low system energy efficiency.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a charging and discharging optimization strategy for a solar energy storage system based on the Internet of Things, specifically including the following steps:

[0006] S1. Real-time power generation data of photovoltaic power generation unit, real-time state of charge data of energy storage battery, environmental parameter data collected by environmental sensor and real-time power load data of load are collected through distributed sensing nodes. All data include corresponding timestamp information.

[0007] S2. Perform timestamp synchronization and data alignment processing on the distributed sensing data containing timestamp information collected in S1 to generate time-aligned comprehensive energy data. The synchronization processing is achieved by establishing a unified time reference.

[0008] S3. Based on the time-aligned integrated energy data generated by S2, and the preset system operation objectives and constraints, construct a charging and discharging optimization model for the solar energy storage system.

[0009] S4. Solve the charge-discharge optimization model constructed in S3 to obtain the optimal charge-discharge decision sequence within a specific optimization period. The decision sequence contains the charge-discharge power command for each time step.

[0010] S5. Based on the optimal charge / discharge decision sequence obtained in S4, the charge / discharge operation of the energy storage battery is controlled in real time by the charge / discharge controller, and the control operation is synchronized with the actual system operating state.

[0011] Furthermore, the distributed sensing node in S1 includes:

[0012] Photovoltaic power generation sensor, used to monitor the output power of photovoltaic power generation units. ;

[0013] Battery management system is used to obtain the real-time state of charge of energy storage batteries. and the current range of available charge and discharge power. and ;

[0014] Environmental sensor used to collect light intensity Ambient temperature Environmental parameters that affect photovoltaic power generation and battery performance;

[0015] Electrical load sensors are used to measure the instantaneous electrical load of a load in real time. ;

[0016] The timestamp information includes an association identifier between the local sampling time and the network synchronization time.

[0017] Furthermore, the timestamp synchronization and data alignment processing of the distributed sensor data in S2 specifically involves:

[0018] S21. Obtain the time drift information of each distributed sensing node. The time drift information is determined by periodically comparing the deviation between the local clock of each node and a preset global reference clock.

[0019] S22. Based on the time drift information obtained in S21, the original timestamps of the data collected by each distributed sensing node are corrected to obtain a unified global synchronization timestamp. ;

[0020] S23. Collect data from each node at different local times but synchronize it globally using a unified timestamp. The data points below are normalized to form a normalized result for each common time interval. Aggregated data within;

[0021] S24. For missing data points within a uniform time interval, interpolation is used to fill in the missing data points, ensuring that all data streams are sequentially continuous and complete.

[0022] Furthermore, the method for correcting the original timestamp in S22 is as follows:

[0023] Define the original timestamp of each distributed sensing node i at time t as: The timestamp of the global reference clock is ;

[0024] Calculate the time drift of each node ;

[0025] Correct the original timestamps of the data collected from each node to the globally synchronized timestamps. This ensures that all sensor data are aligned on a uniform physical time scale, wherein the global reference clock is provided via a Network Time Protocol (NTP) server.

[0026] Furthermore, in step S23, the data of each node is normalized to form a normalized value for each common time interval. The aggregated data within is specifically as follows:

[0027] Set a uniform sampling time interval. ;

[0028] For each time interval Within this interval, the average value of the data collected by all sensor nodes is aggregated.

[0029] Aggregated photovoltaic power generation data Energy storage battery state of charge data Environmental parameter data and and electricity load data Integrated energy data as time-aligned data.

[0030] Furthermore, the specific steps for constructing the solar energy storage system charge-discharge optimization model in S3 are as follows:

[0031] Construct a comprehensive objective function that considers both system operating costs and battery degradation costs. The expression is:

[0032] ,

[0033] in, To optimize the total number of time steps within the cycle, For grid interaction pricing, This refers to the interaction power between the system and the power grid. Cost per unit power loss of energy storage batteries The charging and discharging power of the energy storage battery;

[0034] The charging and discharging power of the energy storage battery Defined as:

[0035] ,

[0036] in, For charging power, This represents the discharge power.

[0037] Furthermore, the optimization model constructed in S3 also includes the following constraints:

[0038] Power balance constraints:

[0039] ,

[0040] Battery State of Charge (SOC) Constraints:

[0041] ,

[0042] in, and These are the minimum and maximum allowable values ​​for the battery's state of charge, respectively.

[0043] Battery dynamic constraints:

[0044] ,

[0045] in, and These represent charging and discharging efficiencies, respectively. This refers to the battery's rated capacity.

[0046] Charge and discharge power limits:

[0047] ,

[0048] ,

[0049] Grid-to-grid power limits:

[0050] ,

[0051] in, and These are the minimum and maximum allowable values ​​for the power exchanged with the power grid, respectively.

[0052] Furthermore, the charge-discharge optimization model constructed by S3 is a mixed integer linear programming model, in which binary variables are introduced for the charge-discharge state to represent the unidirectional operation characteristics of the battery, that is, within any time step, the battery can only be in one of the three states of charging, discharging and standby.

[0053] Furthermore, the method for solving the charge-discharge optimization model in S4 is as follows:

[0054] The mixed-integer linear programming model constructed by S3 is input into the optimization solver. The solver uses a strategy that combines the branch and bound algorithm with the interior point method to iteratively solve the problem in order to find the optimal solution that satisfies all constraints and minimizes the objective function value.

[0055] The optimization process is deployed on a cloud platform, and parallel computing resources are used to quickly solve large-scale datasets and complex models. The output of the optimal solution is the charging and discharging power command for each time step in a future optimization cycle.

[0056] Furthermore, the step S5, which controls the charging and discharging operation of the energy storage battery based on the optimal charging and discharging decision sequence, also includes:

[0057] At the beginning of each time step, the corresponding charge / discharge power command in the current optimal charge / discharge decision sequence is sent to the charge / discharge controller of the energy storage battery.

[0058] After receiving the command, the charge and discharge controller adjusts the battery's charge and discharge current and voltage in real time to ensure that the actual charge and discharge power is consistent with the commanded power.

[0059] Meanwhile, the system continuously monitors the actual state of charge and charging / discharging power of the energy storage battery, and feeds back the real-time operating data to S1 for rolling optimization in the next optimization cycle, thereby forming a closed-loop control.

[0060] Compared to existing technologies, the advantages of this invention are as follows: This invention establishes a unified time base by deploying an NTP server, corrects node time drift, and aggregates and completes data to generate time-aligned comprehensive energy data. It then constructs a hybrid integer programming charge-discharge optimization model with the goal of minimizing overall cost, combining constraints such as power balance and battery SOC to ensure reasonable decision-making. The model is solved quickly using a cloud platform, and finally, charge-discharge is adjusted in real-time through closed-loop control. This approach avoids repeated ineffective charge-discharge cycles to delay battery aging, while simultaneously improving energy utilization efficiency and overall system energy efficiency, effectively solving the problem of poor effectiveness of existing strategies. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating the strategy of the present invention;

[0062] Figure 2This is a flowchart of the timestamp synchronization and data alignment process of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Please see Figure 1 This invention provides a charging and discharging optimization strategy for an IoT-based solar energy storage system, specifically including the following steps:

[0065] S1. Real-time power generation data of photovoltaic power generation unit, real-time state of charge data of energy storage battery, environmental parameter data collected by environmental sensor and real-time power load data of load are collected through distributed sensing nodes. All data include corresponding timestamp information.

[0066] S2. Perform timestamp synchronization and data alignment processing on the distributed sensing data containing timestamp information collected by S1 to generate time-aligned comprehensive energy data. The synchronization processing is achieved by establishing a unified time reference.

[0067] S3. Based on the time-aligned integrated energy data generated by S2, and the preset system operation objectives and constraints, construct a charging and discharging optimization model for the solar energy storage system.

[0068] S4. Solve the charge-discharge optimization model constructed in S3 to obtain the optimal charge-discharge decision sequence within a specific optimization period. The decision sequence contains the charge-discharge power command for each time step.

[0069] S5. Based on the optimal charge and discharge decision sequence obtained in S4, the charge and discharge operation of the energy storage battery is controlled in real time by the charge and discharge controller, and the control operation is kept synchronized with the actual system operating state.

[0070] Specifically, S1, distributed sensor node data acquisition

[0071] Multiple types of distributed sensing nodes are deployed to cover key data acquisition scenarios of the solar energy storage system. High-precision power sensors are installed at the photovoltaic power generation units to collect output power data in real time; the energy storage batteries are connected to the battery management system to obtain the state of charge and charge / discharge power range in real time; environmental sensors are deployed around the system and inside the battery compartment to collect parameters such as light intensity and ambient temperature; and current and voltage combined sensors are installed at the load end to calculate instantaneous power load. All data collected by the nodes carries dual time signatures: the local sampling time and the network synchronization time. The local sampling time is generated by the node's built-in clock, while the network synchronization time is obtained through periodic network communication. For example, if a node collects a set of power data when its local clock displays 15:00:00.002, it simultaneously records the 15:00:00.000 obtained through network synchronization at that time, ensuring a reference for subsequent time correction.

[0072] S2. Timestamp synchronization and data alignment processing

[0073] First, a unified time standard is established, using a high-precision network time protocol server deployed on a cloud platform as the global reference clock. This server is calibrated via satellite time synchronization, with time errors controlled within microseconds. Then, time correction is performed on the collected data: for time drift at each node, the local clock of each node is compared with the global reference clock every 100 milliseconds, and the deviation value is recorded. The original timestamp is corrected based on the deviation value. For example, if the local clock of an environmental sensor is 3 milliseconds ahead of the global reference clock, the original timestamp of its collected data is 15:00:01.003, which becomes 15:00:01.000 after correction. Next, data aggregation is performed. A common time interval of 1 second is set, and the average value of multiple sets of collected data from the same node within each time interval is taken to form aggregated data. For data missing within the interval due to communication delays of some nodes, linear interpolation is used to fill in the missing data. For example, if a load sensor only collects data at 15:00:02.2 and 15:00:02.8 within the interval of 15:00:02-15:00:03, the load data at 15:00:02.5 is calculated by interpolation. Finally, a comprehensive energy data with continuous time series and time alignment is generated.

[0074] S3. Construction of Charge / Discharge Optimization Model

[0075] A model is constructed with the objective of minimizing the overall system cost, which includes grid interaction costs and battery degradation costs. The objective function is defined as follows:

[0076] ,

[0077] in, To optimize the total number of time steps within a period, for example, if the optimization period is set to 1 hour and the time step is 1 second, then ; The grid interaction price at time t adopts a time-of-use pricing mechanism. For example, the peak hours are 9:00-12:00 and 17:00-20:00, and the price is 1.2 yuan / kWh, while the off-peak hours are 23:00-7:00, and the price is 0.5 yuan / kWh. Let t be the power exchanged between the system and the power grid at time t. A positive value indicates that the system purchases electricity from the power grid, and a negative value indicates that the system sells electricity to the power grid. Let t be the unit power loss cost of the battery at time t, calculated based on the battery cycle life and maintenance cost, for example, set to 0.1 yuan / kWh; Let be the battery charging / discharging power at time t, and its expression is:

[0078] ,

[0079] In the formula, The charging power at time t, Let be the discharge power at time t, and both are non-negative. The model also incorporates constraints such as power balance, battery state of charge, and charge / discharge power limits to ensure it meets actual operational requirements.

[0080] S4. Solving the optimization model

[0081] The constructed optimization model is input into an optimization solver deployed on a cloud platform, such as the Gurobi solver. The solution process employs a strategy combining branch and bound algorithms with interior-point methods: first, the branch and bound algorithm is used to process the integer variables in the model, gradually narrowing the solution space; then, the interior-point method is used to precisely optimize the continuous variables, iteratively finding the optimal solution. The cloud platform is configured with 4 cores and 8 threads of parallel computing resources. For a model with a 1-hour optimization cycle and a 1-second time step, the solution time can be controlled within 10 seconds, meeting real-time requirements. After the solution is completed, the charging and discharging power commands for each time step within the next hour are output. For example, the charging power command at t=100 seconds is 15 kW, and the discharging power command at t=200 seconds is 10 kW, forming a complete optimal charging and discharging decision sequence.

[0082] S5, Real-time Charge / Discharge Control and Closed-Loop Optimization

[0083] At the start of each time step, the cloud platform sends the corresponding charging / discharging power command to the charging / discharging controller. For example, at t=300 seconds, it sends a command for "discharging power 8 kW". After receiving the command, the controller controls the charging / discharging current and voltage by adjusting the duty cycle of the switching transistors in the battery circuit, ensuring that the deviation between the actual charging / discharging power and the commanded power is kept within 5%. Simultaneously, the system collects the battery's actual state of charge, charging / discharging power, and load power consumption data in real time, and feeds this data back to the S1 acquisition stage as the initial data for the next optimization cycle, i.e., the next hour of data acquisition, thus achieving closed-loop control with rolling optimization.

[0084] In this embodiment, the distributed sensing nodes in S1 include:

[0085] Photovoltaic power generation sensor, used to monitor the output power of photovoltaic power generation units. ;

[0086] Battery management system is used to obtain the real-time state of charge of energy storage batteries. and the current range of available charge and discharge power. and ;

[0087] Environmental sensor used to collect light intensity Ambient temperature Environmental parameters that affect photovoltaic power generation and battery performance;

[0088] Electrical load sensors are used to measure the instantaneous electrical load of a load in real time. ;

[0089] The timestamp information includes an association identifier between the local sampling time and the network synchronization time.

[0090] Specifically, the photovoltaic power generation sensor uses a Hall effect-based power sensor, such as a combination of a current sensor and a voltage sensor (model SCT-013), to monitor the output power of the photovoltaic power generation unit in real time. This power is used... It is stated that the measurement accuracy can reach ±0.5%, and the sampling frequency is set to 10 Hz to ensure that rapid fluctuations in photovoltaic power generation can be captured.

[0091] Battery Management System: Employs a battery management module with multi-parameter monitoring capabilities, such as the BMS-12V200A system, to acquire the real-time state of charge (SOC), maximum available charging power, and maximum discharging power of the energy storage battery. The real-time SOC is measured using... The measurement accuracy is ±2%, and the maximum charging power is indicated by... Indicates the maximum discharge power. It indicates that the maximum charging and discharging power is dynamically adjusted according to the current battery temperature and state of charge. For example, when the battery temperature is higher than 45°C, the maximum charging power will automatically drop to 80% of the rated value.

[0092] Environmental sensors: Integrated multi-parameter sensors are selected, such as a combination of a SHT30 temperature and humidity sensor and a TSL2591 light sensor to collect light intensity and ambient temperature. The light intensity is measured using... The measurement range is 0-100000 lux, with an accuracy of ±10%, and the ambient temperature is expressed as... It indicates that the measurement range is -40℃ to 125℃, the accuracy is ±0.3℃, and the sampling frequency is set to 1 Hz, providing data support for photovoltaic power generation prediction and battery performance correction.

[0093] Electrical load sensor: A combination of a clamp-on current sensor and a voltage acquisition module is used, such as the ET704 load monitoring sensor, to measure the instantaneous electrical load of the load in real time. It indicates that the measurement range is 0-500 amperes, the accuracy is ±1%, and the sampling frequency is 5 Hz, ensuring accurate reflection of load power fluctuations.

[0094] All distributed sensor nodes' timestamp information includes a correlation identifier between the local sampling time and the network synchronization time. For example, it is stored in the format of "node ID-local sampling timestamp-network synchronization timestamp". The node ID is a unique identifier, such as "PV-001" which represents a photovoltaic power generation sensor. The local sampling timestamp is generated by the node's built-in RTC clock, and the network synchronization timestamp is obtained by synchronizing with the global NTP server every 500 milliseconds to ensure the accuracy of the time correlation.

[0095] In this embodiment, the timestamp synchronization and data alignment processing of distributed sensor data in S2 specifically involves:

[0096] S21. Obtain the time drift information of each distributed sensing node. The time drift information is determined by periodically comparing the deviation between the local clock of each node and a preset global reference clock.

[0097] S22. Based on the time drift information obtained in S21, the original timestamps of the data collected by each distributed sensing node are corrected to obtain a unified global synchronization timestamp. ;

[0098] S23. Collect data from each node at different local times but synchronize it globally using a unified timestamp. The data points below are normalized to form a normalized result for each common time interval. Aggregated data within;

[0099] S24. For missing data points within a uniform time interval, interpolation is used to fill in the missing data points, ensuring that all data streams are sequentially continuous and complete.

[0100] Specifically, the global reference clock is set to the clock of an NTP server deployed on the system cloud platform. This server is calibrated via a GPS timing module, achieving a time accuracy of 1 microsecond. Each distributed sensor node sends a time synchronization request to the NTP server every 100 milliseconds to obtain the global reference clock timestamp returned by the server. This timestamp is used... This indicates that the current timestamp of the node's local clock is also recorded, and this timestamp is used... Let 'i' represent the node number. The average time drift between two consecutive synchronization requests is calculated as the node's time drift information. For example, during the first synchronization of an electrical load sensor, both the local clock timestamp and the global reference clock timestamp are 15:00:00.000. During the second synchronization with a 100-millisecond interval, the local clock timestamp is 15:00:00.102, and the global reference clock timestamp is 15:00:00.100. Therefore, the time drift of this node is 2 milliseconds.

[0101] Based on the time drift information obtained in S21, the original timestamps of the data collected by each node are corrected. For example, if the time drift of a photovoltaic power generation sensor is 3 milliseconds, the original timestamp of a certain set of power data it collects is 15:00:01.003. After correction, it becomes 15:00:01.000, ensuring that this set of data is on the same physical time scale as the corrected timestamps of other nodes.

[0102] Set a uniform public time interval, which is used for... This indicates a value of 1 second, starting from the globally synchronized timestamp, which is used... This indicates that the data is divided into multiple consecutive time intervals, with the time interval format as follows: For each time interval, all data points collected by all sensor nodes within that interval are collected, and the arithmetic mean of data of the same type is aggregated. For example, in the time interval from 15:00:01.000 to 15:00:02.000, the photovoltaic power generation sensor collects 10 power data points such as 12.1kW, 12.3kW, 12.2kW, etc. The average value of 12.2kW is taken as the aggregated photovoltaic power generation data for that interval. This aggregated data is used... Similarly, aggregated data on the state of charge (SBC) of the energy storage battery, aggregated data on light intensity, aggregated data on ambient temperature, and aggregated data on electricity load are calculated within this interval. The aggregated SBC data is represented by... This indicates that the aggregated data of light intensity is used... This indicates that the aggregated ambient temperature data is used... This indicates that the aggregated electricity load data is used... express.

[0103] For nodes with missing data within a uniform time interval, such as an environmental sensor failing to collect data within a 1-second interval due to a temporary communication interruption, linear interpolation is used to fill in the missing data. Assuming the light intensity data for the environmental sensor in the preceding interval (15:00:00.000-15:00:01.000) is 8000 lux, and the light intensity data in the following interval (15:00:02.000-15:00:03.000) is 8200 lux, then the light intensity data for the missing interval (15:00:01.000-15:00:02.000) is calculated to be 8100 lux through linear interpolation, ensuring that all data streams are sequentially continuous and complete.

[0104] In this embodiment, the method for correcting the original timestamp in S22 is as follows:

[0105] Define the original timestamp of each distributed sensing node i at time t as: The timestamp of the global reference clock is ;

[0106] Calculate the time drift of each node ;

[0107] Correct the original timestamps of the data collected from each node to the globally synchronized timestamps. This ensures that all sensor data are aligned on a uniform physical time scale, with the global reference clock provided by a Network Time Protocol (NTP) server.

[0108] Specifically, we define the original timestamp generated by the built-in local clock of each distributed sensing node i when it collects data at any time t, where i represents different nodes, such as node 1 being a photovoltaic power generation sensor, node 2 being a battery management system, etc., and the original timestamp is used as... This indicates that a global reference clock deployed on the cloud platform is defined with timestamps at the same physical moment. This global reference clock is provided by an NTP server, and the timestamps are... express.

[0109] First, calculate the time drift at each node. This time drift is used as... The calculation formula is as follows:

[0110]

[0111] For example, if node 3 is an environmental sensor, and it collects data at physical time 15:00:00.500, its local original timestamp is 15:00:00.504, and its global reference clock timestamp is 15:00:00.500, then the time drift of this node is 4 milliseconds.

[0112] Then, the original timestamp is corrected based on the time drift to obtain a globally synchronized timestamp, which is used... The correction formula is as follows:

[0113]

[0114] Using the example above, the original timestamp of the data collected by node 3 is 15:00:00.504, and the time drift is 4 milliseconds. Therefore, the corrected global synchronization timestamp is 15:00:00.500, which is consistent with the global reference clock timestamp.

[0115] The global reference clock NTP server adopts a hierarchical deployment architecture. All sensor nodes in the system are connected to the same level of NTP server. The server ensures that its time accuracy is maintained within ±1 microsecond by calibrating the GPS signal once per second. The communication between the node and the NTP server adopts the UDP protocol, and the communication latency is controlled within 10 milliseconds to avoid the impact of communication latency on the calculation of time drift.

[0116] In this embodiment, in S23, the data of each node is normalized to form a normalized value at each common time interval. The aggregated data within is specifically as follows:

[0117] Set a uniform sampling time interval. ;

[0118] For each time interval Within this interval, the average value of the data collected by all sensor nodes is aggregated.

[0119] Aggregated photovoltaic power generation data Energy storage battery state of charge data Environmental parameter data and and electricity load data Integrated energy data as time-aligned data.

[0120] Specifically, firstly, a uniform sampling time interval is set, which is used as... This indicates that, based on the system's operating characteristics and optimization requirements, It can be flexibly set, for example, during the daytime when the light intensity fluctuates greatly from 8:00 to 18:00. Set to 1 second for precise capture of energy data fluctuations; during periods of stable lighting from 18:00 to 8:00 the next day, Set to 5 seconds to reduce data redundancy.

[0121] For each time interval, the time interval format is as follows: ,For example , The time interval is 15:00:00.000-15:00:01.000. All data points collected by all sensor nodes within this interval are collected, and the arithmetic mean of the same type of data is performed to obtain the aggregated data within this time interval.

[0122] Taking photovoltaic power generation data aggregation as an example, if the photovoltaic power generation sensor collects a total of n raw power data points within the aforementioned time interval, these raw power data points are used... The unit is kilowatt, and here n=10. The aggregated photovoltaic power generation data is then used... The calculation formula is as follows:

[0123] ,

[0124] Assuming the 10 original data points are 11.8kW, 12.1kW, 12.0kW, 12.2kW, 11.9kW, 12.3kW, 12.1kW, 11.7kW, 12.0kW, and 12.2kW respectively, summing these data points and dividing by 10 yields an aggregated photovoltaic power generation of 12.03kW.

[0125] Similarly, the aggregated state-of-charge (SOC) data for energy storage batteries is the average of all SOC data within that interval. This aggregated data is used... This indicates that the aggregated light intensity data in the environmental parameters is the average of all light intensity data within this interval. This aggregated data is represented by... This indicates that the aggregated ambient temperature data is the average of all ambient temperature data within this interval. This aggregated data is represented by... This indicates that the aggregated electricity load data is the average of all electricity load data within that interval. This aggregated data is represented by... express.

[0126] All aggregated data maintains the same units as the original data, such as power in kilowatts, state of charge in percentages, illuminance in lux, and temperature in degrees Celsius, ensuring dimensional consistency without additional normalization. This aggregated data collectively constitutes time-aligned comprehensive energy data, which can be directly used to construct subsequent charge-discharge optimization models, effectively reducing the volatility of the original data while preserving the overall trend of energy data changes.

[0127] In this embodiment, the specific steps for constructing the solar energy storage system charge and discharge optimization model in S3 are as follows:

[0128] Construct a comprehensive objective function that considers both system operating costs and battery degradation costs. The expression is:

[0129] ,

[0130] in, To optimize the total number of time steps within the cycle, For grid interaction pricing, This refers to the interaction power between the system and the power grid. Cost per unit power loss of energy storage batteries The charging and discharging power of the energy storage battery;

[0131] The charging and discharging power of energy storage batteries Defined as:

[0132] ,

[0133] in, For charging power, This represents the discharge power.

[0134] Specifically, the objective is to minimize the overall cost during system operation, which includes grid interaction costs and battery depreciation costs. The objective function is denoted by F, and its expression is as follows:

[0135] ,

[0136] The parameters are explained below:

[0137] The total number of time steps within the optimization period. For example, if the optimization period is set to 1 hour and the time step is 1 second, then... ;

[0138] The grid interaction price at time t is based on the time-of-use price published by the local power grid company. For example, the peak hours on weekdays are 9:00-12:00 and 17:00-20:00, which is 1.2 yuan / kWh; the average hours are 7:00-9:00, 12:00-17:00, and 20:00-23:00, which is 0.8 yuan / kWh; and the off-peak hours are 23:00-7:00 the next day, which is 0.5 yuan / kWh.

[0139] : The power exchanged between the system and the power grid at time t, in kilowatts. A positive value indicates that the system purchases electricity from the power grid, and a negative value indicates that the system sells electricity to the power grid, if local policies allow the sale of electricity.

[0140] The unit power loss cost of the energy storage battery at time t is expressed in yuan / kWh. It is calculated based on the battery's initial purchase cost, expected cycle life, and maintenance cost. For example, if the initial cost of a lithium battery is 1,000 yuan / kWh, the expected cycle life is 2,000 cycles, and the average discharge capacity per cycle is 80% of the rated capacity, then the unit power loss cost is 0.625 yuan / kWh. In practical applications, it can be fine-tuned according to the current health status of the battery.

[0141] The charging and discharging power of the energy storage battery at time t, expressed in kilowatts, is given by:

[0142] ,

[0143] in Let be the charging power of the battery at time t, which is non-negative and in kilowatts. Let t be the battery's discharge power at time t, and it is a non-negative value in kilowatts. When the charge / discharge power is positive, it indicates that the battery is in a charging state, and when it is negative, it indicates that the battery is in a discharging state.

[0144] In this embodiment, the optimization model constructed in S3 also includes the following constraints:

[0145] Power balance constraints:

[0146] ,

[0147] Battery State of Charge (SOC) Constraints:

[0148] ,

[0149] in, and These are the minimum and maximum allowable values ​​for the battery's state of charge, respectively.

[0150] Battery dynamic constraints:

[0151] ,

[0152] in, and These represent charging and discharging efficiencies, respectively. This refers to the battery's rated capacity.

[0153] Charge and discharge power limits:

[0154] ,

[0155] ,

[0156] Grid-to-grid power limits:

[0157] ,

[0158] in, and These are the minimum and maximum allowable values ​​for the power exchanged with the power grid, respectively.

[0159] Specifically, power balance constraints

[0160] ,

[0161] in, Let be the output power of the photovoltaic power generation unit at time t, in kilowatts, and a non-negative value. Let t be the electrical load of the load at time t, in kilowatts, and non-negative. This constraint ensures that the power generation, grid interaction power, and battery charging / discharging power within the system at time t together meet the load's power demand. For example, when the photovoltaic power generation is 10kW, the load power is 15kW, and the discharge power is 0kW, the grid interaction power is 5kW, meaning the system needs to purchase 5kW of electricity from the grid to meet the load demand.

[0162] Battery State of Charge (SOC) Constraints

[0163] ,

[0164] in, The state of charge of the battery at time t is expressed as a percentage. This is the minimum permissible value for the battery's state of charge. This is the maximum allowable value. It is set according to the battery characteristics. For example, for lithium batteries, the minimum allowable value is 20%, and the maximum allowable value is 90%, to avoid battery life degradation caused by overcharging and over-discharging.

[0165] Battery dynamic constraints

[0166] ,

[0167] in, Battery charging efficiency, with a value range of 0-1, for example, set to 0.95;

[0168] Battery discharge efficiency, with a value range of 0-1, for example, set to 0.92;

[0169] : Time step and unit is hours. If the time step is 1 second, then the value is 1 / 3600 hours.

[0170] : Rated battery capacity in kilowatt-hours, for example, 100 kilowatt-hours;

[0171] Multiplying by 100 in the formula is to convert the calculation result into a percentage form, so as to be consistent with the unit of state of charge.

[0172] For example, if the battery's state of charge is 50% at time t, the charging power is 20kW, the discharging power is 0kW, and the time step is 1 / 3600 hours, then the state of charge at time t+1 is approximately 50.0053%.

[0173] Charge and discharge power limits

[0174] ,

[0175] ,

[0176] in, Let t be the maximum allowable charging power of the battery at time t, in kilowatts. The maximum allowable discharge power of the battery at time t is expressed in kilowatts. Both are dynamically adjusted based on the current battery temperature and state of charge. For example, when the battery temperature is below 0°C, the maximum allowable charging power is reduced to 50% of the rated charging power, such as 50kW, i.e., 25kW. When the battery state of charge is greater than 80%, the maximum allowable charging power is reduced to 30% of the rated value to avoid overcharging.

[0177] Grid Interaction Power Limitation

[0178] ,

[0179] in, This represents the minimum permissible power exchange between the system and the power grid, expressed in kilowatts. A negative value indicates the sale of electricity to the grid. This is the maximum allowable value in kilowatts. A positive value indicates that electricity is purchased from the grid. It is set according to the grid access capacity and local policies. For example, the minimum allowable value is -30kW, which means the maximum power sold is 30 kilowatts, and the maximum allowable value is 40kW, which means the maximum power purchased is 40 kilowatts, in order to avoid causing excessive impact on the grid.

[0180] In this embodiment, the charge-discharge optimization model constructed by S3 is a mixed integer linear programming model, in which binary variables are introduced for the charge-discharge state to represent the unidirectional operation characteristics of the battery, that is, within any time step, the battery can only be in one of the three states of charging, discharging and standby.

[0181] Specifically, three binary variables are introduced, each corresponding to one of the three operating states of the battery:

[0182] The battery charging status indicator at time t, with a value of 1 indicating that the battery is charging and a value of 0 indicating that it is not charging.

[0183] The battery discharge state indicator at time t, with a value of 1 indicating that the battery is in a discharge state and a value of 0 indicating that it is not in a discharge state.

[0184] The battery's standby status indicator at time t. A value of 1 indicates that the battery is in standby mode, meaning it is neither charging nor discharging, while a value of 0 indicates that it is not in standby mode.

[0185] State Mutual Exclusion Constraint

[0186] To ensure that the battery is in only one state at any time step, the following constraints are added:

[0187] ,

[0188] Additionally, to prevent simultaneous charging and discharging, the following is added:

[0189] ,

[0190] In integer programming models, this constraint can be indirectly achieved through power constraints, without the need for direct addition.

[0191] Power and state association constraints

[0192] Associating charging and discharging power with binary state variables ensures that power is output only in the corresponding state:

[0193] ,

[0194] ,

[0195] ,

[0196] ,

[0197] For example, when the charging status indicator is 1, i.e., charging status, the charging power can be between 0 and the maximum allowable charging power, while the discharging power is limited to 0 because the discharging status indicator is 0; when the discharging status indicator is 1, i.e., discharging status, the discharging power can be between 0 and the maximum allowable discharging power, while the charging power is limited to 0; when the standby status indicator is 1, i.e., standby status, both the charging power and the discharging power are limited to 0.

[0198] In this embodiment, the method for solving the charge-discharge optimization model in S4 is as follows:

[0199] The mixed-integer linear programming model constructed by S3 is input into the optimization solver. The solver uses a strategy that combines the branch and bound algorithm with the interior point method to iteratively solve the problem in order to find the optimal solution that satisfies all constraints and minimizes the objective function value.

[0200] The optimization solution process is deployed on a cloud platform, which uses parallel computing resources to quickly solve large-scale datasets and complex models. The optimal solution output is the charging and discharging power command for each time step in a future optimization cycle.

[0201] Specifically, the mixed-integer linear programming model constructed by S3 is input into a specialized optimization solver, such as the Gurobi 10.0 solver or the CPLEX 22.1 solver, which are highly efficient at solving integer programming problems. The solution process employs a hybrid solution strategy combining the branch-and-bound algorithm with the interior-point method.

[0202] Branch and bound algorithm: used to handle binary integer variables in the model, namely battery state variables. , , By progressively decomposing the feasible domain of integer variables into branches and calculating the lower bound of the objective function for each subdomain, subdomains that cannot contain the optimal solution are removed, thus quickly narrowing the search range.

[0203] Interior point method: used to handle continuous variables in a model, such as... , , , It approaches the optimal solution by iteratively tracing from within the feasible region, and features fast convergence speed and high solution accuracy.

[0204] The optimization solution process is deployed on the cloud platform associated with the system. The cloud platform is configured with elastic computing resources, such as dynamically allocating 4 to 16 CPU cores and 8 to 32 GB of memory resources according to the model size. For large-scale models, such as those with an optimization cycle of 24 hours, a time step of 1 minute, and a total of 1440 time steps, parallel computing is used to control the solution time to within 30 seconds, meeting the system's real-time optimization requirements.

[0205] After the solution is completed, the optimizer outputs the optimal solution for each time step in the next optimization cycle, i.e., the charging and discharging power command sequence, including the charging power, discharging power, and grid interaction power for each time step, where the charging power is represented by... Indicates that the discharge power is expressed as... This indicates that the power exchange between power grids is used for... For example, when the optimization cycle is 1 hour and the time step is 1 second, it outputs power commands for 3600 time steps, each command accurate to 0.1 kilowatts, ensuring that the charge and discharge controller can execute accurately.

[0206] In this embodiment, S5, which controls the charging and discharging operation of the energy storage battery based on the optimal charging and discharging decision sequence, further includes:

[0207] At the beginning of each time step, the corresponding charge / discharge power command in the current optimal charge / discharge decision sequence is sent to the charge / discharge controller of the energy storage battery.

[0208] After receiving the command, the charge and discharge controller adjusts the battery's charge and discharge current and voltage in real time to ensure that the actual charge and discharge power is consistent with the commanded power.

[0209] Meanwhile, the system continuously monitors the actual state of charge and charging / discharging power of the energy storage battery, and feeds back the real-time operating data to S1 for rolling optimization in the next optimization cycle, thereby forming a closed-loop control.

[0210] Specifically, at the beginning of each time step, such as the start of each full second when the time step is 1 second, the cloud platform sends the charging and discharging power command for the current time step to the energy storage battery's charging and discharging controller via industrial Ethernet. The command format is JSON, containing information such as the time step identifier, charging power command value, and discharging power command value. For example, at t=300 seconds, the issued command is "{"time_step":300,"charge_power":0,"discharge_power":8}", indicating that the charging power is 0 kW and the discharging power is 8 kW within this time step.

[0211] For example, an energy storage controller such as the ECU-2000 can be used for charging and discharging. After receiving commands, it adjusts the duty cycle of the IGBT switches in the battery circuit using pulse width modulation (PWM) technology, thereby controlling the charging and discharging current and voltage. The controller has a built-in power feedback module that collects the actual charging and discharging power of the battery in real time at a sampling frequency of 100 Hz and compares it with the commanded power. Through a PID control algorithm, the deviation between the actual power and the commanded power is controlled within ±2%, ensuring control accuracy. For example, if the commanded discharge power is 8 kWh, the actual discharge power is stable between 7.84 kWh and 8.16 kWh.

[0212] The system continuously collects data on the actual state of charge (SOC) of the energy storage battery, actual charge / discharge power, real-time load, and photovoltaic power generation through distributed sensing nodes. The actual SOC is used as the data source for this data collection. This indicates the real-time power consumption of the load. It indicates that photovoltaic power generation capacity is used This indicates that the data collection frequency is consistent with the optimization time step, for example, 1 second. This real-time operational data is uploaded to the cloud platform via the MQTT protocol, serving as the initial input data for the next optimization cycle, such as the next 1-hour S1 data collection phase, thus achieving closed-loop rolling optimization of "collection-synchronization-modeling-solving-control-feedback".

[0213] For example, if the current optimization period is 10:00:00-11:00:00, the system will feed back the real-time running data of this period to the cloud platform at 11:00:00. Based on this data, the cloud platform will start the optimization calculation for the 11:00:00-12:00:00 period to ensure that the optimization strategy is always synchronized with the actual running status of the system.

[0214] In summary, this invention establishes a unified time base by deploying an NTP server, corrects node time drift, and aggregates and completes data to generate time-aligned comprehensive energy data. It then constructs a hybrid integer programming charge-discharge optimization model with the goal of minimizing overall cost, combining constraints such as power balance and battery SOC to ensure reasonable decision-making. The model is solved quickly using a cloud platform, and finally, closed-loop control is used to adjust charge and discharge in real time. This approach avoids repeated ineffective charge-discharge cycles to delay battery aging, while simultaneously improving energy utilization efficiency and overall system efficiency, effectively addressing the problem of poor effectiveness in existing strategies.

[0215] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0216] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A charging and discharging optimization strategy for an IoT-based solar energy storage system, characterized in that, Specifically, the following steps are included: S1. Real-time power generation data of photovoltaic power generation unit, real-time state of charge data of energy storage battery, environmental parameter data collected by environmental sensor and real-time power load data of load are collected through distributed sensing nodes. All data include corresponding timestamp information. S2. Perform timestamp synchronization and data alignment processing on the distributed sensor data containing timestamp information collected in S1 to generate time-aligned integrated energy data. The timestamp synchronization processing is achieved by deploying a Network Time Protocol (NTP) server to establish a unified time base, specifically including: S21. Obtain time drift information of each distributed sensing node. The time drift information is determined by periodically comparing the deviation between the local clock of each node and the global reference clock provided by the NTP server. S22. Based on the time drift information obtained in S21, the original timestamps of the data collected by each distributed sensing node are corrected to obtain a unified global synchronization timestamp. ; S23. Collect data from each node at different local times but synchronize it globally using a unified timestamp. The data points below are normalized to form a normalized result for each common time interval. Aggregated data within; S24. For data points that are missing within a uniform time interval, use interpolation to fill them in, ensuring that all data streams are sequentially continuous and complete. S3. Based on the time-aligned integrated energy data generated by S2, and the preset system operation objectives and constraints, construct a charging and discharging optimization model for the solar energy storage system. S4. Solve the charge-discharge optimization model constructed in S3 to obtain the optimal charge-discharge decision sequence within a specific optimization period. The decision sequence contains the charge-discharge power command for each time step. S5. Based on the optimal charge / discharge decision sequence obtained in S4, the charge / discharge operation of the energy storage battery is controlled in real time by the charge / discharge controller, and the control of the charge / discharge operation of the energy storage battery is synchronized with the actual system operating state.

2. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, The distributed sensing nodes in S1 include: Photovoltaic power generation sensor, used to monitor the output power of photovoltaic power generation units. ; Battery management system is used to obtain the real-time state of charge of energy storage batteries. and the current range of available charge and discharge power. and ; Environmental sensor used to collect light intensity Ambient temperature Environmental parameters that affect photovoltaic power generation and battery performance; Electrical load sensors are used to measure the instantaneous electrical load of a load in real time. ; The timestamp information includes an association identifier between the local sampling time and the network synchronization time.

3. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, The method for correcting the original timestamp in S22 is as follows: Define the original timestamp of each distributed sensing node i at time t as: The timestamp of the global reference clock is ; Calculate the time drift of each node ; Correct the original timestamps of the data collected from each node to the globally synchronized timestamps. This aligns all sensor data on a uniform physical time scale.

4. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, In step S23, the data of each node is normalized to form a normalized data set for each common time interval. The aggregated data within is specifically as follows: Set a uniform sampling time interval. ; For each time interval Within this interval, the average value of the data collected by all sensor nodes is aggregated. Aggregated photovoltaic power generation data Energy storage battery state of charge data Environmental parameter data and and electricity load data Integrated energy data as time-aligned data.

5. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, The specific steps for constructing the solar energy storage system charge and discharge optimization model in S3 are as follows: Construct a comprehensive objective function that considers both system operating costs and battery degradation costs. The expression is: , in, To optimize the total number of time steps within the cycle, For grid interaction pricing, This refers to the interaction power between the system and the power grid. Cost per unit power loss of energy storage batteries The charging and discharging power of the energy storage battery; The charging and discharging power of the energy storage battery Defined as: , in, For charging power, This represents the discharge power.

6. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 5, characterized in that, The optimization model constructed in S3 also includes the following constraints: Power balance constraints: , Battery State of Charge (SOC) Constraints: , in, and These are the minimum and maximum allowable values ​​for the battery's state of charge, respectively. Battery dynamic constraints: , in, and These represent charging and discharging efficiencies, respectively. This refers to the battery's rated capacity. Charge and discharge power limits: , , Grid-to-grid power limits: , in, and These are the minimum and maximum allowable values ​​for the power exchanged with the power grid, respectively.

7. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 6, characterized in that, The charging and discharging optimization model constructed by S3 is a mixed integer linear programming model, in which binary variables are introduced for the charging and discharging state to represent the unidirectional operation characteristics of the battery. That is, within any time step, the battery can only be in one of the three states of charging, discharging, and standby.

8. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, The method for solving the charge-discharge optimization model in S4 is as follows: The mixed-integer linear programming model constructed by S3 is input into the optimization solver. The solver uses a strategy that combines the branch and bound algorithm with the interior point method to iteratively solve the problem in order to find the optimal solution that satisfies all constraints and minimizes the objective function value. The optimization process is deployed on a cloud platform, and parallel computing resources are used to quickly solve large-scale datasets and complex models. The output of the optimal solution is the charging and discharging power command for each time step in a future optimization cycle.

9. The charging and discharging optimization strategy for an IoT-based solar energy storage system according to claim 1, characterized in that, The step S5, which controls the charging and discharging operation of the energy storage battery based on the optimal charging and discharging decision sequence, further includes: At the beginning of each time step, the corresponding charge / discharge power command in the current optimal charge / discharge decision sequence is sent to the charge / discharge controller of the energy storage battery. After receiving the command, the charge and discharge controller adjusts the battery's charge and discharge current and voltage in real time to ensure that the actual charge and discharge power is consistent with the commanded power. Meanwhile, the system continuously monitors the actual state of charge and charging / discharging power of the energy storage battery, and feeds back the real-time operating data to S1 for rolling optimization in the next optimization cycle, thereby forming a closed-loop control.

Citation Information

Patent Citations

  • Source network load storage cooperation method and system

    CN118539521A

  • Optical storage and charging cooperative control method and system based on multi-energy complementation

    CN120433382A