Management system based on environmental energy
By constructing a multi-objective optimization model of mixed integer linear programming, and combining data acquisition, cleaning, rolling prediction and closed-loop control, the optimal charging and discharging strategy of energy storage equipment is generated. This solves the problem that the energy storage control strategy in the existing technology is difficult to achieve optimal scheduling throughout the entire life cycle, and improves the self-consumption rate and economic benefits of photovoltaics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING HUAKE ZHONGHE TECH CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-09
AI Technical Summary
Existing energy storage control strategies are difficult to achieve optimal scheduling throughout the entire lifecycle under conditions of photovoltaic power output fluctuations and electricity price changes, resulting in limited economic improvement. Furthermore, under complex operating conditions, it is difficult to avoid demand charge penalties caused by overcharging due to the desire for off-peak electricity prices.
A multi-objective optimization model based on mixed-integer linear programming is constructed. Combining photovoltaic power output, load electricity consumption changes, and time-of-use electricity price differences, the optimal charging and discharging strategy for energy storage devices is generated through data acquisition, cleaning, rolling prediction, and closed-loop control. The model includes a data acquisition module, a data cleaning module, a rolling prediction module, a multi-objective optimization module, and a strategy verification module.
It has achieved full-cycle economic operation under complex working conditions, significantly improved the self-consumption rate of photovoltaic power and overall economic benefits, reduced demand electricity costs, and enhanced the robustness and control reliability of the system in the face of uncertainty.
Smart Images

Figure CN122178403A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid and distributed energy management technology, and in particular to a management system based on environmentally friendly energy. Background Technology
[0002] With the large-scale application of distributed photovoltaic (PV) and user-side energy storage systems in industrial and commercial scenarios, achieving economical and efficient operation of energy storage devices under conditions of significant fluctuations in PV output and time-of-use electricity prices has become a key technical issue in energy management systems. Existing systems typically need to coordinate PV power generation, local loads, and energy storage charging and discharging behavior in a unified manner while ensuring the safety of load power supply, in order to reduce overall energy costs through arbitrage of electricity price differences and increasing PV self-consumption rate. Therefore, higher requirements are placed on the time-dimensional optimization and scheduling capabilities of energy storage power.
[0003] In existing technologies, most energy storage control strategies still use fixed rules or local heuristic logic for scheduling, such as switching charging and discharging states according to electricity price thresholds or simple control based on instantaneous power balance. These methods are difficult to comprehensively consider photovoltaic forecasts, load changes and future electricity price information across multiple time scales, resulting in obvious short-sightedness in energy storage operation decisions, limited improvement in overall economic efficiency, and difficulty in obtaining optimal scheduling results in the full life cycle under complex operating conditions. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides a management system based on environmentally friendly energy, which aims to improve the problem that most energy storage control strategies in the prior art still use fixed rules or local heuristic logic for scheduling.
[0005] This invention provides the following technical solution: a management system based on environmentally friendly energy, comprising: The data acquisition module acquires the power generation of the photovoltaic power generation equipment, the state of charge and real-time DC bus voltage of the energy storage battery equipment, and the power consumption of the user load end according to a preset sampling frequency, and encapsulates the power generation, the state of charge, the real-time DC bus voltage and the power consumption into a real-time operating status dataset. The data cleaning module, based on the real-time running status dataset, performs data preprocessing using outlier detection and interpolation completion algorithms to generate a standardized time-series dataset that has undergone outlier correction and time synchronization processing. The rolling prediction module, based on the standardized time series dataset, uses a time series analysis algorithm to calculate and generate a future power prediction sequence containing the photovoltaic power generation power value and the load power consumption value within a preset future time period. The multi-objective optimization module constructs an objective function containing power consumption cost items and maximum demand cost items based on the future power prediction sequence, the standardized time-series dataset, and the preset time-of-use electricity price parameter table. The objective function is solved by a mixed integer linear programming model to generate a time-domain scheduling matrix containing the energy storage charging and discharging power value and the grid interaction power value for each time step within the preset future time period. The strategy verification module, based on the time-domain scheduling matrix and the preset physical safety boundary parameters of the energy storage battery device, performs ramp rate limit verification and current amplitude verification on the energy storage charging and discharging power value of the current time step, and generates a corrected power command value output by the verification logic. The closed-loop control module converts the corrected power command value into a register write command based on the corrected power command value, generates a device control command stream, and sends it to the controller of the energy storage battery device.
[0006] Preferably, in the data acquisition module, the step of encapsulating the power generation, the state of charge, the real-time DC bus voltage, and the power consumption into a real-time operating status dataset specifically includes the following steps: Based on the pre-stored device communication protocol point table, the binary raw messages received from the communication bus are parsed to extract the decimal raw values corresponding to the power generation, the state of charge, the real-time DC bus voltage, and the power consumption, respectively. The decimal raw values are subjected to dimensional normalization calculations to convert power values of different precisions into uniform kilowatt units, the real-time DC bus voltage into uniform volt units, and the state of charge into uniform percentage values. The system clock data at the time of data acquisition is obtained, a synchronization timestamp conforming to a preset time format is generated, and the synchronization timestamp is associated and bound with the normalized kilowatt unit value, volt unit value and percentage value. According to the preset key-value pair data structure definition, each value bound to the synchronization timestamp is written into the corresponding field position to generate a real-time running status dataset.
[0007] Preferably, in the data cleaning module, the data preprocessing using the outlier detection algorithm and the interpolation completion algorithm specifically includes the following steps: Traverse each numerical sequence in the real-time operating status dataset, compare the values of the power generation, the state of charge, the real-time DC bus voltage, and the power consumption with the preset physical allowable range, and mark the values that exceed the physical allowable range as abnormal data points; The abnormal data points and the time breakpoints caused by communication packet loss in the real-time running status dataset are uniformly set as invalid data identifiers to generate a data sequence to be completed. Retrieve the values of the preceding and following valid data points immediately adjacent to the time point of each invalid data identifier in the data sequence to be completed, and calculate the theoretical completion value corresponding to the invalid data identifier using a linear interpolation formula; The corresponding invalid data identifiers are replaced with the theoretically completed numerical values, and the replaced data sequences are resampled and aligned according to a uniform time step interval to generate a standardized time series dataset.
[0008] Preferably, in the rolling prediction module, the calculation using the time series analysis algorithm specifically includes the following steps: The standardized time series dataset is decomposed into independent photovoltaic power historical time series vectors and load power historical time series vectors, and a preset length of numerical segments up to the current time is extracted from each vector. A sliding window input matrix is constructed based on the numerical fragments, and the sliding window input matrix is mapped to the input layer of a preset time series regression prediction model; The weighted summation and nonlinear transformation operations are performed on the sliding window input matrix using the weight coefficient matrix inside the time series regression prediction model to output a set of predicted power values corresponding to a future preset time period. The predicted power value set is mapped into photovoltaic prediction data column and load prediction data column respectively according to the time step order to generate future power prediction sequence.
[0009] Preferably, in the multi-objective optimization module, the step of constructing an objective function that includes an energy consumption cost item and a maximum demand cost item based on the future power prediction sequence, the standardized time-series dataset, and a preset time-of-use electricity price parameter table specifically includes the following steps: The electricity unit price vector corresponding one-to-one with the time step of the future power prediction sequence is parsed from the preset time-of-use electricity price parameter table, and the demand unit price scalar is used to calculate the peak power cost. Within the solution space of the mixed-integer linear programming model, a sequence of power grid interaction decision variables with the same dimension as the unit price vector of electricity is defined, and a peak demand decision variable is defined to characterize the maximum power within the scheduling cycle. Perform a vector dot product operation on the power grid interaction decision variable sequence and the electricity unit price vector to generate the electricity cost item representing the cost of electricity consumption throughout the entire cycle; Perform a multiplication operation on the demand peak decision variable and the demand unit price scalar to generate the maximum demand electricity cost item representing the power peak penalty cost; The objective function is generated by performing a linear addition operation on the electricity cost item and the maximum demand cost item.
[0010] Preferably, in the multi-objective optimization module, solving the objective function using a mixed-integer linear programming model specifically includes the following steps: Based on the values in the future power prediction sequence, an energy balance equation constraint set is constructed, which stipulates that the sum of grid interaction power, photovoltaic power generation power and energy storage discharge power at each time step is equal to the sum of load power consumption and energy storage charging power. Based on the current state of charge value and the pre-stored charge and discharge efficiency coefficient in the standardized time series dataset, a set of state transition equation constraints is constructed, which limits the energy storage state of charge value at any time step to be calculated by superimposing the state of charge value of the previous time step with the charge and discharge power value corrected by the efficiency coefficient. Construct a set of demand control inequality constraints to limit the value of the power grid interaction decision variable at any time step within the preset future time period to be less than or equal to the value of the peak demand decision variable. The branch and bound algorithm is used to search the feasible region of the set of constraints that satisfy the energy balance equation, the set of constraints that satisfy the state transition equation, and the set of constraints that satisfy the demand control inequality, and to determine the optimal solution for each decision variable that makes the objective function converge to the minimum value. Extract the energy storage charging and discharging power numerical sequence and the grid interaction power numerical sequence from the optimal solutions of each decision variable, and arrange them in chronological order to generate a time-domain scheduling matrix.
[0011] Preferably, in the strategy verification module, the step of performing ramp rate limit verification and current amplitude verification on the energy storage charging and discharging power value at the current time step specifically includes the following steps: Extract the energy storage charging and discharging power value corresponding to the current time step from the time-domain scheduling matrix, and use this value as the power scheduling value to be executed. At the same time, extract the actual operating power value of the equipment and the real-time DC bus voltage value of the previous sampling time from the standardized time-series dataset. Calculate the power change difference between the power scheduling value to be executed and the actual operating power value of the device. Perform numerical limiting processing on the power change difference based on the maximum allowable ramp rate in the preset physical safety boundary parameters of the energy storage battery device to generate a limited difference. Then, add the limited difference to the actual operating power value of the device to generate a first corrected power value. The real-time DC bus voltage value is multiplied by the maximum allowable charge / discharge current threshold in the preset physical safety boundary parameters of the energy storage battery device to generate the dynamic power safety boundary value at the current moment. The absolute value of the first corrected power value is compared with the absolute value of the dynamic power safety boundary value. If the absolute value of the first corrected power value is greater than the absolute value of the dynamic power safety boundary value, the dynamic power safety boundary value is assigned the sign of the first corrected power value to generate the corrected power command value. Otherwise, the first corrected power value is directly output as the corrected power command value.
[0012] Preferably, in the closed-loop control module, the step of generating the device control command stream and sending it to the controller of the energy storage battery device specifically includes the following steps: Call the preset device communication protocol library to retrieve the target register address corresponding to the active power control function and the instruction scaling factor used for numerical conversion; The modified power command value is discretized using the instruction scaling factor, and the floating-point power value is mapped to a target integer value that conforms to the controller register bit width definition. According to the preset fieldbus communication frame format, the preset device station number, the preset write instruction function code, the target register address, the target write integer value, and the check code generated based on the cyclic redundancy check algorithm are concatenated to assemble a binary control message. The binary control messages are sequentially written into the communication port transmission buffer that establishes a physical connection with the energy storage battery device, and the signal transmission action is triggered by the hardware driver layer to form a device control command stream.
[0013] The present invention has the following beneficial effects: 1. In this invention, by constructing a multi-objective optimization model based on mixed integer linear programming, photovoltaic power output fluctuations, load electricity consumption changes, and time-of-use electricity price differences are incorporated into a unified global optimization framework. By using a mathematical solver, the limitations of traditional simple logic in handling the complex trade-off between current grid parity and future peak demand are overcome. This enables the accurate calculation of the optimal action command of the battery at each moment to achieve multi-variable time-series arbitrage throughout the entire cycle, significantly improving the overall economic efficiency of the photovoltaic-storage system under complex operating conditions.
[0014] 2. In this invention, a peak demand decision variable and a corresponding penalty weight term are introduced into the objective function. By constructing a strict demand control inequality constraint, the system is forced to automatically avoid the peak superposition of grid interaction power when engaging in low-price charging arbitrage. This effectively solves the technical problem of triggering huge demand electricity fee penalties due to excessive charging caused by greed for off-peak electricity prices, which leads to record high total power. This ensures that users can minimize their basic demand electricity expenses while obtaining electricity price difference benefits.
[0015] 3. In this invention, a model predictive control strategy based on rolling prediction is adopted, which replaces the traditional one-time static plan with high-frequency real-time rolling calculation. It can dynamically correct the subsequent strategy based on the latest battery state of charge feedback and updated meteorological forecast data at each time step, effectively eliminating the accumulation of prediction errors caused by unforeseen environmental disturbances such as sudden drop in photovoltaic power or sudden load changes, thereby enhancing the robustness and control reliability of the system when facing the uncertainty of actual operation. Attached Figure Description
[0016] Figure 1 This is an architecture diagram of the environmentally friendly energy-based management system proposed in this invention; Figure 2 Application scenario diagram of the environmentally friendly energy-based management system proposed in this invention; Figure 3 The implementation steps of the multi-objective optimization module proposed in this invention are shown in the diagram. Detailed Implementation
[0017] The technical solutions in 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.
[0018] This invention provides a management system based on environmentally friendly energy, such as... Figures 1-3 As shown, it includes: The data acquisition module acquires the power generation of the photovoltaic power generation equipment, the state of charge and real-time DC bus voltage of the energy storage battery equipment, and the power consumption of the user load end according to the preset sampling frequency, and encapsulates the power generation, state of charge, real-time DC bus voltage and power consumption into a real-time operating status dataset. Furthermore, in the data acquisition module, the encapsulation of power generation, state of charge, real-time DC bus voltage, and power consumption into a real-time operating status dataset specifically includes the following steps: Based on the pre-stored device communication protocol point table, the binary raw messages received from the communication bus are parsed, and the decimal raw values corresponding to the power generation, state of charge, real-time DC bus voltage and power consumption are extracted respectively. Perform dimensional normalization calculations on the original decimal values, convert power values of different precisions into uniform kilowatt units, convert real-time DC bus voltage into uniform volt units, and convert state of charge into uniform percentage values. Acquire system clock data at the time of data acquisition, generate a synchronization timestamp conforming to a preset time format, and associate and bind the synchronization timestamp with the normalized kilowatt, volt, and percentage values. According to the preset key-value pair data structure definition, each value bound to the synchronization timestamp is written into the corresponding field position to generate a real-time running status dataset.
[0019] Specifically, the data acquisition module periodically receives binary raw messages uploaded from photovoltaic inverters, energy storage converters, and load metering devices via an industrial field communication bus according to a preset sampling frequency. The communication bus can be Ethernet, CAN bus, or RS485 bus, and the message format follows the ModbusTCP or CANopen industrial standard protocol. The module has a pre-stored device communication protocol point table, which defines in detail the register address, byte length, data type, and scaling factor of each physical quantity in the message. The data acquisition module uses this point table to perform frame-by-frame parsing of the received binary raw messages, extracts the raw data fields corresponding to power generation, state of charge, real-time DC bus voltage, and power consumption through bit operations, and converts these fields into decimal raw values according to the byte order specified by the protocol.
[0020] After obtaining the raw decimal values, the data acquisition module performs dimensional normalization to eliminate precision differences between devices. For power data, a linear proportional conversion formula is used for calculation. ; in, This represents the normalized power value, in kilowatts. This represents the raw power count value parsed from the message, in dimensionless integer form. This represents the preset power scaling factor, expressed in kilowatts per count. This formula is applicable to the calculation of photovoltaic power generation and load power consumption. For real-time DC bus voltage, the following formula is used for conversion: ; in, This represents the normalized real-time DC bus voltage, in volts. This represents the original voltage count value obtained from the analysis, in dimensionless integer form. This indicates the voltage compression factor, measured in volts per count. For the state of charge, it can be converted to a percentage using the following formula: ; in, This represents the normalized state of charge, expressed as a percentage. This represents the original count value of the state of charge, in dimensionless integer form. This indicates the corresponding percentage coefficient, with the unit being percentage per count.
[0021] After normalization, the data acquisition module obtains the system clock data at the current sampling moment to generate a synchronization timestamp. It then uses a hash table or structure object to construct a key-value pair mapping relationship for a single frame of data in memory. The system predefines a set of unique string constants as keys, identifying the timestamp, power generation, state of charge, DC bus voltage, and power consumption. The module performs a data binding operation, assigning the currently acquired and normalized values of each physical quantity to the corresponding key, generating a single-frame operating status record. The mapping logic for this process is as follows: ; in, This represents the current frame's running status record. , , , and These are preset string key identifiers used to index each physical quantity; This is the current synchronization timestamp; This represents the normalized photovoltaic power generation value. This is the normalized state of charge value; This is the normalized real-time DC bus voltage value. This is the normalized load power consumption value.
[0022] Subsequently, the data acquisition module uses a first-in-first-out (FIFO) queue mechanism to maintain a fixed-length time-series container. Each new record is appended to the end of the container, and if the container is full, the oldest record is removed, thus constructing a real-time running status dataset. The update logic of this dataset is as follows: ; in, This represents a fully encapsulated real-time running status dataset. This indicates the total number of historical sampling points contained in the dataset; Square brackets indicate a sequence structure arranged in chronological order. This dataset is ultimately stored in the system cache as a JSON array or in a time-series database row protocol format for subsequent module calls.
[0023] The data acquisition module can accurately encapsulate multi-source operating data from different devices into a structured real-time operating status dataset while ensuring time synchronization and unit consistency, providing a stable and reliable basic input for subsequent energy management algorithms.
[0024] The data cleaning module, based on the real-time running status dataset, uses outlier detection and interpolation completion algorithms to perform data preprocessing, generating a standardized time-series dataset that has undergone outlier correction and time synchronization. Furthermore, in the data cleaning module, the data preprocessing performed using outlier detection and interpolation completion algorithms specifically includes the following steps: Traverse each numerical sequence in the real-time operating status dataset, compare the values of power generation, state of charge, real-time DC bus voltage and power consumption with the preset physical allowable range, and mark the values that exceed the physical allowable range as abnormal data points. The abnormal data points and the time breakpoints caused by communication packet loss in the real-time running status dataset are uniformly set as invalid data identifiers to generate a data sequence to be completed. Retrieve the values of the preceding and following valid data points immediately adjacent to the time point of each invalid data identifier in the data sequence to be completed, and calculate the theoretical completion value corresponding to the invalid data identifier using a linear interpolation formula; The corresponding invalid data identifiers are replaced with theoretically completed numerical values, and the replaced data sequences are resampled and aligned according to a uniform time step interval to generate a standardized time series dataset.
[0025] Specifically, the data cleaning module first reads the real-time operating status dataset generated by the previous module from the system cache. This dataset contains single-frame operating status records arranged in chronological order. The module parses the key-value pairs in the dataset, extracting the timestamp sequence and the corresponding numerical sequences of photovoltaic power generation, state of charge, real-time DC bus voltage, and power consumption. Subsequently, the module loads a pre-set equipment physical parameter table, which stores the system-defined physical allowable ranges, including the upper and lower limits of the rated power of the photovoltaic inverter, the 0 to 100% percentage range of the battery's physical state of charge, and the safe operating threshold of the DC bus voltage. The module uses a vectorized traversal method to perform range verification on each data point in each numerical sequence. For any index position in the sequence... The value at the location The module executes the following exception detection and marking logic: ; in, This represents the value after an anomaly flag is applied. If the value is determined to be an anomaly, it is assigned the non-numeric special identifier NaN; otherwise, the original value is retained. This represents the original physical quantity value to be detected, specifically photovoltaic power generation, state of charge, DC bus voltage, or power consumption. This indicates the lower limit of the preset physical allowable range corresponding to the physical quantity; This indicates the upper limit of the preset physical allowable range corresponding to the physical quantity. At the same time, the module traverses the timestamp sequence and calculates the upper limit of the range between two adjacent timestamps. and If the difference between the values is greater than the preset sampling period tolerance threshold, the system determines that there is a time breakpoint caused by communication packet loss, inserts a placeholder record at the breakpoint, initializes the corresponding physical quantity value to NaN, and thus generates a data sequence to be completed containing invalid holes.
[0026] For NaN invalid data markers present in the data sequence to be completed, the data cleaning module executes repair logic based on linear interpolation. The module traverses the data sequence, and when the index is found... When the value at a given point is NaN, search for the nearest valid data point in both directions (forward and backward) to determine the index of the previous valid data point. The index of the next valid data point is Then, using the numerical and time information of these two reference points, the theoretical completion value for the current breakpoint is calculated. The calculation formula is as follows: ; in, This represents the calculated theoretical completion value, used to replace the index. The NaN label at the location; This indicates the value of the previous valid data point, and the unit is the same as the physical quantity to be completed. This indicates the value of the next valid data point; Indicates the timestamp of the previous valid data point; Indicates the timestamp of the next valid data point; This represents the theoretical timestamp that the missing data point should have originally corresponded to. Using this formula, the system can fill in the gaps caused by abnormal removal or packet loss based on the linear trend of data changes.
[0027] After replacing the values of all invalid data identifiers, the data cleaning module performs resampling and alignment operations on each repaired data sequence to eliminate time jitter caused by network latency during the original acquisition process and to unify the data frequency. The module sets a unified standard time step, such as 15 minutes or 1 hour, and constructs a standardized time axis grid based on the start time of the dataset. The time calculation logic for the standard grid points is as follows: ; in, Indicates the first Timestamps for each standard time grid point; Indicates the start time of the standardized sequence; Integer representing the sequence index of a grid point; This indicates the preset standard time step; The module then maps the repaired data sequence onto the standard time grid, for each The system selects the nearest original data point value or re-applies the above interpolation formula to calculate the precise value at that moment, thereby generating a new sequence that is strictly aligned at equal intervals in the time dimension. Finally, the photovoltaic power generation, state of charge, DC bus voltage and power consumption sequences, after being cleaned, repaired and aligned, are repackaged into a standardized time series dataset and transmitted to the next level rolling prediction module.
[0028] The data cleaning module effectively removes noise and outliers from the original data, and repairs the discontinuities and jitters in the time series, generating a high-quality standardized time series dataset. This ensures that subsequent prediction and optimization models will not diverge or misjudge due to data quality issues.
[0029] The rolling forecast module, based on a standardized time-series dataset, uses time-series analysis algorithms to generate a future power forecast sequence containing photovoltaic power generation and load power consumption values within a preset time period. Furthermore, the rolling forecast module utilizes time series analysis algorithms for calculations, specifically including the following steps: The standardized time series dataset is decomposed into independent photovoltaic power historical time series vectors and load power historical time series vectors, and numerical segments of preset lengths up to the current time are extracted from each vector. A sliding window input matrix is constructed based on numerical fragments, and the sliding window input matrix is mapped to the input layer of a preset time series regression prediction model; The weight coefficient matrix inside the time series regression prediction model is used to perform weighted summation and nonlinear transformation operations on the sliding window input matrix, and outputs a set of predicted power values corresponding to a future preset time period. The predicted power data set is mapped into photovoltaic prediction data series and load prediction data series according to the time step order to generate future power prediction sequence.
[0030] Specifically, the rolling prediction module first receives a standardized time-series dataset output by the data cleaning module. This dataset resides in memory as a two-dimensional array or data frame, where row indices correspond to time steps and column indices correspond to physical quantities such as photovoltaic power generation and load power consumption. The module separates the photovoltaic power generation column and the load power consumption column through column index operations, forming two independent one-dimensional historical time-series vectors. To construct the input features of the model, the module defines a fixed historical observation window length. and the index pointer at the current moment. The module uses array slicing operations to extract indices ranging from the aforementioned independent vectors. The module then performs max-min normalization on the numerical segments, scaling them to the range of zero to one to fit the input requirements of the neural network model, thereby generating a standardized sliding window input matrix.
[0031] After constructing the input matrix, the module feeds it into a pre-built time series regression prediction model, which internally stores a trained weight coefficient matrix and bias vector. The module performs forward inference calculations, mapping the nonlinear relationship between the input and output through matrix multiplication and a nonlinear activation function to calculate the normalized predicted value, and then performs inverse normalization. The specific algorithm formula for this calculation process is as follows: ; in, This represents the set of predicted power values for a predetermined future time period after restoration. This set is a set of values of length [missing information]. A one-dimensional vector, corresponding to the future One time step; This represents the range coefficient required for inverse normalization, calculated by subtracting the minimum value from the maximum value. This represents the weight coefficient matrix from the hidden layer to the output layer; This represents a nonlinear activation function used to perform nonlinear transformation operations; This represents the weight coefficient matrix from the input layer to the hidden layer; The sliding window input matrix represents the input. This represents the bias vector of the hidden layer; This represents the bias vector of the output layer; This represents the minimum coefficient required for inverse normalization.
[0032] Using this formula, the model outputs a power value per kilowatt that has practical physical meaning.
[0033] After obtaining the photovoltaic forecast data column and the load forecast data column, the module performs time series reconstruction and encapsulation operations. The module obtains the timestamp of the current moment. and the prediction step interval set by the system The module initializes a string of length [length missing]. The loop structure, for the first in the predicted sequence For each data point, calculate its corresponding future timestamp. The module uses the calculated future timestamp as the key to access the photovoltaic forecast data column. The first value and load forecast data column Each key-value pair is used as a value and written into a predefined structure object. After traversal, all key-value pairs are combined to form an ordered sequence of future power predictions.
[0034] Through the above steps, the rolling forecasting module can accurately predict future energy supply and demand curves based on the evolution patterns of historical data and using a nonlinear regression model, providing forward-looking time-series input data for subsequent multi-objective optimization scheduling.
[0035] The multi-objective optimization module constructs an objective function that includes power consumption cost items and maximum demand cost items based on future power prediction sequences, standardized time-series datasets, and preset time-of-use electricity price parameter tables. The objective function is solved by a mixed-integer linear programming model to generate a time-domain scheduling matrix that includes the energy storage charging and discharging power values and grid interaction power values for each time step within a preset future time period. Furthermore, in the multi-objective optimization module, based on the future power prediction sequence, standardized time-series dataset, and preset time-of-use electricity price parameter table, the objective function that includes the electricity cost item and the maximum demand cost item is constructed specifically through the following steps: The electricity unit price vector corresponding to the time step of the future power prediction sequence is parsed from the preset time-of-use electricity price parameter table, and the demand unit price scalar is used to calculate the peak power cost. Within the solution space of the mixed-integer linear programming model, a sequence of power grid interaction decision variables with the same dimension as the unit price vector is defined, and a peak demand decision variable is defined to characterize the maximum power within the scheduling cycle. Perform a vector dot product operation on the power grid interaction decision variable sequence and the unit price vector of electricity to generate an electricity cost item that represents the cost of electricity consumption throughout the entire cycle; Perform a multiplication operation on the peak demand decision variable and the demand unit price scalar to generate the maximum demand electricity cost item representing the peak power penalty cost; Perform a linear addition operation on the electricity cost item and the maximum demand cost item to generate the objective function.
[0036] Furthermore, in the multi-objective optimization module, solving the objective function using a mixed-integer linear programming model specifically includes the following steps: Based on the values in the future power prediction sequence, an energy balance equation constraint set is constructed, which stipulates that the sum of grid interaction power, photovoltaic power generation power and energy storage discharge power at each time step is equal to the sum of load power consumption and energy storage charging power. Based on the current state of charge value and pre-stored charge and discharge efficiency coefficients in the standardized time series dataset, a set of state transition equation constraints is constructed, which stipulates that the energy storage state of charge value at any time step is calculated by superimposing the state of charge value of the previous time step and the charge and discharge power value corrected by the efficiency coefficient. Construct a set of demand control inequality constraints to limit the value of the power grid interaction decision variable at any time step within a preset future time period to be less than or equal to the value of the peak demand decision variable. The branch and bound algorithm is used to search the feasible region of the set of constraints satisfying the energy balance equation, the set of constraints satisfying the state transition equation, and the set of constraints satisfying the demand control inequality, and to determine the optimal solution of each decision variable that makes the objective function converge to the minimum value. The numerical sequences of energy storage charging and discharging power and grid interaction power are extracted from the optimal solutions of each decision variable and arranged in chronological order to generate a time-domain scheduling matrix.
[0037] Specifically, the multi-objective optimization module first reads the future power prediction sequence, the standardized time-series dataset, and the pre-stored time-of-use pricing parameter table from the system memory. The module parses the time-of-use pricing parameter table, extracting the energy unit price vector corresponding one-to-one with the future prediction time steps, and the demand unit price scalar used to calculate the basic demand charge. Subsequently, the module initializes a mixed-integer linear programming solver in memory, defining a set of decision variables in the solution space, including a grid interaction power decision variable sequence of length equal to the total prediction step length, an energy storage charging power sequence, an energy storage discharging power sequence, and a demand peak decision variable characterizing the maximum grid power consumption within the scheduling cycle. Based on these variables, the module constructs a total cost objective function, which is a linear sum of the energy charge cost term and the maximum demand charge cost term. Its calculation formula is as follows: ; in, This represents the objective function value of the total operating cost to be minimized; This represents the total number of time steps within the future forecast period; Indicates the time step index; Indicates the first Power interaction decision variables for each time step, in kilowatts; Indicates the first The unit price of electricity for each time step is expressed in yuan per kilowatt-hour. Indicates the time step interval, in hours; This represents the peak demand decision variable, in kilowatts. This indicates the unit price per kilowatt, expressed in yuan. This formula quantifies the economic operating objective of the system through a linear combination of vector dot product and scalar multiplication.
[0038] After constructing the objective function, the multi-objective optimization module adds constraints to the solver. First, it constructs a set of energy balance equation constraints to ensure that power supply and demand are balanced in real time at each time step. The constraint formulas are as follows: ; in, Represents the first [unit] obtained from the future power prediction sequence. The photovoltaic power generation value at a time step; Indicates the first The energy storage discharge power decision variable is a time step; Represents the first [unit] obtained from the future power prediction sequence. The load power consumption value for each time step; Indicates the first The energy storage charging power decision variable has a time step.
[0039] Next, the module constructs a set of state transition equation constraints, using the latest state of charge in the standardized time-series dataset as the initial value, to deduce the battery state at future times. The constraint formulas are as follows: ; in, Indicates the first The energy storage charge state variables are time-step variables, in percentage form (expressed as decimals). This represents the charged state variable at the previous time step; This represents the pre-stored energy storage charging efficiency coefficient. This represents the pre-stored energy storage discharge efficiency coefficient; This indicates the rated capacity of the energy storage battery, expressed in kilowatt-hours.
[0040] Subsequently, the module constructs a set of demand control inequality constraints, linking the peak demand decision variable to the grid interaction power. The constraint formula is as follows: ; The formula is limited to any time. The power exchange between the power grids must not exceed the peak demand. This forces the solver to consider reducing the peak power while searching for the optimal solution.
[0041] After the model is built, the module calls the branch and bound algorithm to search the feasible region formed by the above constraints. This algorithm rapidly converges to the objective function by continuously decomposing the problem into subproblems and calculating upper and lower bounds, and pruning branches that do not contain the optimal solution. The module extracts the minimum global optimal solution from the solution results. , and The optimal numerical sequence is obtained, and these sequences are vertically combined in chronological order to generate a time-domain scheduling matrix containing detailed control instructions for each time step within a future preset time period.
[0042] Through the above implementation steps, the multi-objective optimization module can automatically generate the optimal charging and discharging strategy that balances power supply and demand and equipment physical constraints, thereby maximizing economic benefits.
[0043] The strategy verification module, based on the time-domain scheduling matrix and the preset physical safety boundary parameters of the energy storage battery device, performs ramp rate limit verification and current amplitude verification on the energy storage charging and discharging power value of the current time step, and generates the corrected power command value output by the verification logic. Furthermore, the strategy verification module performs ramp-up limit verification and current amplitude verification on the energy storage charging and discharging power value at the current time step, specifically including the following steps: Extract the energy storage charging and discharging power value corresponding to the current time step from the time-domain scheduling matrix, and use this value as the power scheduling value to be executed. At the same time, extract the actual operating power value of the equipment and the real-time DC bus voltage value of the previous sampling time from the standardized time-series dataset. Calculate the power change difference between the power scheduling value to be executed and the actual operating power value of the equipment. Based on the maximum allowable ramp rate in the preset physical safety boundary parameters of the energy storage battery equipment, perform numerical limiting processing on the power change difference to generate the limited difference. Then, add the limited difference to the actual operating power value of the equipment to generate the first corrected power value. The real-time DC bus voltage value is multiplied by the maximum allowable charge and discharge current threshold in the preset physical safety boundary parameters of the energy storage battery device to generate the dynamic power safety boundary value at the current moment. The absolute value of the first corrected power value is compared with the absolute value of the dynamic power safety boundary value. If the absolute value of the first corrected power value is greater than the absolute value of the dynamic power safety boundary value, the dynamic power safety boundary value is assigned the sign of the first corrected power value to generate the corrected power command value. Otherwise, the first corrected power value is directly output as the corrected power command value.
[0044] Specifically, the strategy verification module first uses the system's real-time control cycle, such as 100 milliseconds or 1 second, as a trigger signal to read the recommended energy storage charging and discharging power value corresponding to the current time step from the time-domain scheduling matrix generated by the previous module, and defines it as the power scheduling value to be executed. At the same time, the module accesses the standardized time-series dataset or directly through the underlying driver interface to obtain the actual operating power value of the device fed back by the energy storage converter at the previous sampling time and the current real-time DC bus voltage value. The module loads the preset physical safety boundary parameters of the energy storage battery device, including the maximum allowable power change ramp rate and the maximum allowable charging and discharging current threshold of the battery pack.
[0045] After obtaining the basic data, the module executes the ramp rate limit verification logic. The module first calculates the algebraic difference between the power scheduling value to be executed and the actual operating power value of the equipment, and compares this difference with the maximum allowable change per step calculated based on the control cycle. If the difference exceeds the allowable range, the change is truncated, and the corrected change is added to the actual operating power value of the equipment to generate the first corrected power value. This ramp rate limit process follows the following algorithm formula: ; in, This represents the first corrected power value after the gradeability limitation, in kilowatts. This represents the actual operating power of the device at the previous sampling time, in kilowatts. This represents the power scheduling value to be executed extracted from the time-domain scheduling matrix, in kilowatts; This indicates the preset maximum allowable climbing rate, in kilowatts per second. This indicates the duration of the system's control cycle, measured in seconds. This step ensures the smoothness of power command changes and prevents power grid shocks caused by sudden power fluctuations.
[0046] Subsequently, the module uses real-time DC bus voltage data to perform current amplitude verification on the first corrected power value to prevent current overload caused by constant power control under low voltage conditions. The module calculates the dynamic power safety boundary under the current voltage and uses it to finally limit the first corrected power value, generating a corrected power command value. This current amplitude verification process follows the following algorithm formula: ; in, This represents the final corrected power command value, which will be sent down to the underlying actuator. This is a sign function used to keep the power direction (charging or discharging) unchanged; This represents the absolute value of the first corrected power value; This represents the real-time DC bus voltage value collected, in volts. This indicates the preset maximum allowable charge / discharge current threshold, in amperes. The conversion factor for converting volt-amperes (W) to kilowatts (kW); This is a minimum value function used to select the smaller of the calculated results as the safety amplitude.
[0047] Through the above steps, while executing the upper-level optimization strategy, the strategy verification module forcibly filters out unsafe instructions that may cause hardware overload or system oscillation through dual physical constraint verification, ensuring the operational safety and stability of the energy storage system under extreme conditions such as voltage fluctuations or scheduling command jumps.
[0048] The closed-loop control module converts the corrected power command value into a register write command based on the corrected power command value, generates a device control command stream, and sends it to the controller of the energy storage battery device.
[0049] Furthermore, in the closed-loop control module, generating the device control command stream and sending it to the controller of the energy storage battery device specifically includes the following steps: Call the preset device communication protocol library to retrieve the target register address corresponding to the active power control function and the instruction scaling factor used for numerical conversion; The modified power command value is discretized using the instruction scaling factor, and the floating-point power value is mapped to a target integer value that conforms to the controller register bit width definition. According to the preset fieldbus communication frame format, the preset device station number, preset write instruction function code, target register address, target write integer value and check code generated based on cyclic redundancy check algorithm are concatenated to assemble a binary control message. The binary control messages are written sequentially into the communication port transmission buffer that establishes a physical connection with the energy storage battery device, and the signal transmission action is triggered by the hardware driver layer to form a device control command stream.
[0050] Specifically, the closed-loop control module first receives the corrected power command value output by the strategy verification module. This command value is a floating-point active power value that has undergone security verification. The module immediately calls the system's preset device communication protocol library and, based on the communication point table corresponding to the device station number index of the current controlled object, retrieves the physical address of the target register used to control the active power and the command scaling factor used for numerical quantization. To adapt to the industrial controller's requirement for receiving integer data, the module uses the command scaling factor to perform discretization and rounding operations on the corrected power command value, mapping the physical quantity to a raw count value that the register can recognize. This discretization process follows the following algorithm formula: ; in This indicates that the converted target value is written as an integer, which will be filled into the data field of the communication message. This represents the rounding function, used to convert floating-point numbers to the nearest integer; This indicates the corrected power command value input from the previous module, in kilowatts; This represents the preset command scaling factor, measured in counts per kilowatt. This factor determines the resolution of the control commands.
[0051] After completing the numerical conversion, the module enters the message assembly stage. Following the preset fieldbus communication frame format, the module allocates a buffer in memory and sequentially fills in the preset device station number, the preset write instruction function code, the target register address after high / low byte order processing, and the calculated target write integer value, thus forming the message body to be verified. Subsequently, the module uses a cyclic redundancy check (CRC) algorithm to calculate the message body, generating a 16-bit checksum with the low byte first and the high byte last. The mathematical generation logic of the CRC is described by the following modulo-2 division formula: ; in This represents the calculated 16-bit cyclic redundancy check code; This represents a binary message polynomial consisting of the device station number, function code, register address, and target integer value to be written. This means shifting the message polynomial left by sixteen bits to accommodate the parity bit; Represents the standard generator polynomial; This represents the modulo-2 division remainder operation; The module appends the calculated checksum to the end of the message body, assembling it into the final binary control message.
[0052] Finally, the module writes the assembled binary control message into the serial communication port or network socket transmit buffer that establishes a physical connection with the energy storage battery device in byte order through the hardware abstraction layer interface of the operating system. After the underlying driver detects that the buffer is not empty, it immediately triggers the signal transmission action and sends the level signal to the bus to form a continuous stream of device control commands.
[0053] Through the above steps, the closed-loop control module accurately transforms the abstract optimized power strategy into executable hardware signals at the device level, realizing the final mapping from algorithm decision-making to physical action, and ensuring that the storage converter can strictly perform charging and discharging operations according to the optimal strategy calculated by the system.
[0054] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A management system based on environmentally friendly energy, characterized in that, include: The data acquisition module acquires the power generation of the photovoltaic power generation equipment, the state of charge and real-time DC bus voltage of the energy storage battery equipment, and the power consumption of the user load end according to a preset sampling frequency, and encapsulates the power generation, the state of charge, the real-time DC bus voltage and the power consumption into a real-time operating status dataset. The data cleaning module, based on the real-time running status dataset, performs data preprocessing using outlier detection and interpolation completion algorithms to generate a standardized time-series dataset that has undergone outlier correction and time synchronization processing. The rolling prediction module, based on the standardized time series dataset, uses a time series analysis algorithm to calculate and generate a future power prediction sequence containing the photovoltaic power generation power value and the load power consumption value within a preset future time period. The multi-objective optimization module constructs an objective function containing power consumption cost items and maximum demand cost items based on the future power prediction sequence, the standardized time-series dataset, and the preset time-of-use electricity price parameter table. The objective function is solved by a mixed integer linear programming model to generate a time-domain scheduling matrix containing the energy storage charging and discharging power value and the grid interaction power value for each time step within the preset future time period. The strategy verification module, based on the time-domain scheduling matrix and the preset physical safety boundary parameters of the energy storage battery device, performs ramp rate limit verification and current amplitude verification on the energy storage charging and discharging power value of the current time step, and generates a corrected power command value output by the verification logic. The closed-loop control module converts the corrected power command value into a register write command based on the corrected power command value, generates a device control command stream, and sends it to the controller of the energy storage battery device.
2. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the data acquisition module, the process of encapsulating the power generation, state of charge, real-time DC bus voltage, and power consumption into a real-time operating status dataset specifically includes the following steps: Based on the pre-stored device communication protocol point table, the binary raw messages received from the communication bus are parsed to extract the decimal raw values corresponding to the power generation, the state of charge, the real-time DC bus voltage, and the power consumption, respectively. The decimal raw values are subjected to dimensional normalization calculations to convert power values of different precisions into uniform kilowatt units, the real-time DC bus voltage into uniform volt units, and the state of charge into uniform percentage values. The system clock data at the time of data acquisition is obtained, a synchronization timestamp conforming to a preset time format is generated, and the synchronization timestamp is associated and bound with the normalized kilowatt unit value, volt unit value and percentage value. According to the preset key-value pair data structure definition, each value bound to the synchronization timestamp is written into the corresponding field position to generate a real-time running status dataset.
3. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the data cleaning module, the data preprocessing using outlier detection and interpolation completion algorithms specifically includes the following steps: Traverse each numerical sequence in the real-time operating status dataset, compare the values of the power generation, the state of charge, the real-time DC bus voltage, and the power consumption with the preset physical allowable range, and mark the values that exceed the physical allowable range as abnormal data points; The abnormal data points and the time breakpoints caused by communication packet loss in the real-time running status dataset are uniformly set as invalid data identifiers to generate a data sequence to be completed. Retrieve the values of the preceding and following valid data points immediately adjacent to the time point of each invalid data identifier in the data sequence to be completed, and calculate the theoretical completion value corresponding to the invalid data identifier using a linear interpolation formula; The corresponding invalid data identifiers are replaced with the theoretically completed numerical values, and the replaced data sequences are resampled and aligned according to a uniform time step interval to generate a standardized time series dataset.
4. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the rolling forecast module, the calculation using time series analysis algorithms specifically includes the following steps: The standardized time series dataset is decomposed into independent photovoltaic power historical time series vectors and load power historical time series vectors, and a preset length of numerical segments up to the current time is extracted from each vector. A sliding window input matrix is constructed based on the numerical fragments, and the sliding window input matrix is mapped to the input layer of a preset time series regression prediction model; The weighted summation and nonlinear transformation operations are performed on the sliding window input matrix using the weight coefficient matrix inside the time series regression prediction model to output a set of predicted power values corresponding to a future preset time period. The predicted power value set is mapped into photovoltaic prediction data column and load prediction data column respectively according to the time step order to generate future power prediction sequence.
5. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the multi-objective optimization module, the construction of an objective function that includes an energy consumption cost item and a maximum demand cost item, based on the future power prediction sequence, the standardized time-series dataset, and a preset time-of-use electricity price parameter table, specifically includes the following steps: The electricity unit price vector corresponding one-to-one with the time step of the future power prediction sequence is parsed from the preset time-of-use electricity price parameter table, and the demand unit price scalar is used to calculate the peak power cost. Within the solution space of the mixed-integer linear programming model, a sequence of power grid interaction decision variables with the same dimension as the unit price vector of electricity is defined, and a peak demand decision variable is defined to characterize the maximum power within the scheduling cycle. Perform a vector dot product operation on the power grid interaction decision variable sequence and the electricity unit price vector to generate the electricity cost item representing the cost of electricity consumption throughout the entire cycle; Perform a multiplication operation on the demand peak decision variable and the demand unit price scalar to generate the maximum demand electricity cost item representing the power peak penalty cost; The objective function is generated by performing a linear addition operation on the electricity cost item and the maximum demand cost item.
6. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the multi-objective optimization module, solving the objective function using a mixed-integer linear programming model specifically includes the following steps: Based on the values in the future power prediction sequence, an energy balance equation constraint set is constructed, which stipulates that the sum of grid interaction power, photovoltaic power generation power and energy storage discharge power at each time step is equal to the sum of load power consumption and energy storage charging power. Based on the current state of charge value and the pre-stored charge and discharge efficiency coefficient in the standardized time series dataset, a set of state transition equation constraints is constructed, which limits the energy storage state of charge value at any time step to be calculated by superimposing the state of charge value of the previous time step with the charge and discharge power value corrected by the efficiency coefficient. Construct a set of demand control inequality constraints to limit the value of the power grid interaction decision variable at any time step within the preset future time period to be less than or equal to the value of the peak demand decision variable. The branch and bound algorithm is used to search the feasible region of the set of constraints that satisfy the energy balance equation, the set of constraints that satisfy the state transition equation, and the set of constraints that satisfy the demand control inequality, and to determine the optimal solution for each decision variable that makes the objective function converge to the minimum value. Extract the energy storage charging and discharging power numerical sequence and the grid interaction power numerical sequence from the optimal solutions of each decision variable, and arrange them in chronological order to generate a time-domain scheduling matrix.
7. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the strategy verification module, the verification of ramp rate limitation and current amplitude for the energy storage charging and discharging power value at the current time step specifically includes the following steps: Extract the energy storage charging and discharging power value corresponding to the current time step from the time-domain scheduling matrix, and use this value as the power scheduling value to be executed. At the same time, extract the actual operating power value of the equipment and the real-time DC bus voltage value of the previous sampling time from the standardized time-series dataset. Calculate the power change difference between the power scheduling value to be executed and the actual operating power value of the device. Perform numerical limiting processing on the power change difference based on the maximum allowable ramp rate in the preset physical safety boundary parameters of the energy storage battery device to generate a limited difference. Then, add the limited difference to the actual operating power value of the device to generate a first corrected power value. The real-time DC bus voltage value is multiplied by the maximum allowable charge / discharge current threshold in the preset physical safety boundary parameters of the energy storage battery device to generate the dynamic power safety boundary value at the current moment. The absolute value of the first corrected power value is compared with the absolute value of the dynamic power safety boundary value. If the absolute value of the first corrected power value is greater than the absolute value of the dynamic power safety boundary value, the dynamic power safety boundary value is assigned the sign of the first corrected power value to generate the corrected power command value. Otherwise, the first corrected power value is directly output as the corrected power command value.
8. The management system based on environmentally friendly energy according to claim 1, characterized in that, In the closed-loop control module, the process of generating the device control command stream and sending it to the controller of the energy storage battery device specifically includes the following steps: Call the preset device communication protocol library to retrieve the target register address corresponding to the active power control function and the instruction scaling factor used for numerical conversion; The modified power command value is discretized using the instruction scaling factor, and the floating-point power value is mapped to a target integer value that conforms to the controller register bit width definition. According to the preset fieldbus communication frame format, the preset device station number, the preset write instruction function code, the target register address, the target write integer value, and the check code generated based on the cyclic redundancy check algorithm are concatenated to assemble a binary control message. The binary control messages are sequentially written into the communication port transmission buffer that establishes a physical connection with the energy storage battery device, and the signal transmission action is triggered by the hardware driver layer to form a device control command stream.