Charging and discharging control method and device of optical storage and charging system and storage medium
By employing predictive control algorithms and rolling optimization feedback correction methods, the control accuracy and efficiency issues of photovoltaic-storage-charging systems under complex operating conditions were resolved. This enabled adaptive control of photovoltaic power output fluctuations and load changes, thereby improving the system's operational stability and profitability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CAMEL ENERGY TECH CO LTD
- Filing Date
- 2026-04-24
- Publication Date
- 2026-07-10
Smart Images

Figure CN122371267A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of optical energy storage and charging systems, and in particular to a charging and discharging control method, device, and storage medium for optical energy storage and charging systems. Background Technology
[0002] The photovoltaic-storage-charging system is a new type of power system that integrates photovoltaic power generation, energy storage systems, and electric vehicle charging facilities. It enables local consumption of photovoltaic power, reduces user electricity costs, and alleviates grid load pressure, and is increasingly widely used in industrial parks, commercial buildings, and charging stations. The core of the photovoltaic-storage-charging system lies in coordinating the charging and discharging behavior of the energy storage system through a reasonable charging and discharging control strategy to balance the volatility of photovoltaic output and the randomness of charging load.
[0003] In existing charging and discharging control methods for photovoltaic energy storage and charging systems, when system equipment ages or environmental conditions change significantly, the control strategies are difficult to adapt to complex operating conditions and cannot maximize the system's operational benefits.
[0004] Therefore, providing a photovoltaic energy storage charging and discharging control strategy that can adapt to complex operating conditions and effectively improve operational benefits has become a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] In view of this, it is necessary to provide a charging and discharging control method, device and storage medium for a photovoltaic energy storage and charging system to solve the technical problems of decreased prediction accuracy and deterioration of control effect of the predictive control algorithm in the long-term operation of the prior art.
[0006] To address the aforementioned problems, in a first aspect, the present invention provides a charging and discharging control method for a photovoltaic energy storage and charging system, comprising: A predictive control algorithm is used to predict the operating status of the photovoltaic-storage-charging system in the future multiple control cycles based on the real-time operating data of the photovoltaic-storage-charging system. The real-time operating data includes at least the real-time power at the grid connection point, the bus voltage, the system frequency, and the energy storage state of charge. Within each control cycle, the optimal energy storage charging and discharging power command is determined with the goal of minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. The photovoltaic energy storage and charging system is then controlled to charge and discharge according to the optimal energy storage charging and discharging power command. After each control cycle, the internal parameters of the predictive control algorithm are corrected by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
[0007] In one possible implementation, before setting the optimization objective as minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation, the method further includes: Identify the current physical operating conditions of the photovoltaic energy storage and charging system; Based on the physical operating conditions, adjust the weighting coefficients corresponding to the grid-connected power fluctuation, the bus voltage deviation, the system frequency deviation, and the energy storage state of charge deviation in the optimization objectives.
[0008] In one possible implementation, the physical operating conditions include photovoltaic fluctuation conditions and off-grid mode; the adjustment steps for the weighting coefficients include: When the photovoltaic energy storage and charging system is identified as being in a photovoltaic fluctuation condition, the weighting coefficient corresponding to the grid-connected power fluctuation is adjusted to the maximum value; When the photovoltaic energy storage and charging system is identified as being in off-grid mode, the weighting coefficients corresponding to the bus voltage deviation and the system frequency deviation are adjusted to their maximum values.
[0009] In one possible implementation, the predictive control algorithm is a model predictive control algorithm, and the internal parameters include a state prediction matrix and a control input matrix; the step of correcting the internal parameters of the predictive control algorithm by utilizing the deviation between the actual output of the optical storage and charging system and the operating state includes: Multiply the proportional coefficient in the proportional-integral correction algorithm by the transpose of the state vector of the current control cycle, and add it to the state prediction matrix of the current control cycle to obtain the state prediction matrix of the next control cycle. Multiply the integral coefficient in the proportional-integral correction algorithm by the integral of the deviation over one control cycle, then multiply by the transpose of the control input vector of the current control cycle, and add this to the control input matrix of the current control cycle to obtain the control input matrix for the next control cycle.
[0010] In one possible implementation, predicting the operating state of the optical energy storage and charging system over multiple future control cycles includes: Construct a discrete-time state-space model of the photovoltaic-storage-charging system. The state vector of the state-space model includes at least the real-time output power of the photovoltaic system, the state of charge of the energy storage system, the bus voltage, and the system frequency. The control input vector of the state-space model includes at least the energy storage discharge power and the energy storage charging power. Based on the state vector and control input vector of the current control cycle, the state vectors of multiple future control cycles are recursively calculated using the state space model. The state vectors are used to characterize the operating state.
[0011] In one possible implementation, the real-time operating data also includes the photovoltaic output change over a preset number of control cycles, as well as the load change rate.
[0012] In one possible implementation, the optimization objective includes multiple safety constraints, including at least: energy storage charging and discharging power constraints, energy storage state of charge safety boundary constraints, bus voltage allowable fluctuation range constraints, and system frequency allowable fluctuation range constraints.
[0013] One possible implementation also includes: When the photovoltaic energy storage and charging system is in off-grid mode, predict the changing trends of bus voltage and system frequency in the real-time operating data; Based on the changing trend, a virtual synchronous generator mode is adopted to adjust the optimal energy storage charging and discharging power command and control the energy storage module in the photovoltaic energy storage and charging system to charge and discharge.
[0014] Secondly, the present invention also provides a charging and discharging control device for a photovoltaic energy storage and charging system, comprising: The prediction unit is used to use a predictive control algorithm to predict the operating status of the photovoltaic storage and charging system in the future multiple control cycles based on the real-time operating data of the photovoltaic storage and charging system. The real-time operating data includes at least the real-time power at the grid connection point, the bus voltage, the system frequency, and the energy storage state of charge. The rolling optimization unit is used to determine the optimal energy storage charging and discharging power command in each control cycle, with the optimization objective being the minimum weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation; and to control the photovoltaic energy storage charging and discharging system to charge and discharge according to the optimal energy storage charging and discharging power command. The model correction unit is used to correct the internal parameters of the predictive control algorithm by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state after each control cycle, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
[0015] Thirdly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instruction, which, when executed by a processor, can implement the steps in the charging and discharging control method of the optical storage and charging system described in any of the above implementations.
[0016] The beneficial effects of this invention are: The charging and discharging control method for a photovoltaic-storage-charging system provided by this invention employs a predictive control algorithm. Based on real-time operating data of the photovoltaic-storage-charging system, it predicts the operating status of the system over multiple future control cycles. The real-time operating data includes at least the real-time power at the grid connection point, bus voltage, system frequency, and energy storage state of charge. This enhances the forward-looking perception capability of photovoltaic power output fluctuations and the randomness of charging load, ensuring that control decisions are based on predictions of future states. Within each control cycle, the optimal energy storage charging and discharging power command is determined by minimizing the weighted sum of at least two of the following: grid connection power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. The system then controls the charging and discharging based on this optimal energy storage charging and discharging power command. The photovoltaic energy storage and charging system performs charging and discharging. Through rolling optimization within each control cycle, the responsiveness of the charging and discharging power command to changes in system state is improved, ensuring that the control strategy can be dynamically adjusted according to changes in actual operating conditions. After each control cycle, the deviation between the actual output of the photovoltaic energy storage and charging system and its operating state is used to correct the internal parameters of the predictive control algorithm to determine the optimal energy storage charging and discharging power command for the next control cycle. This enables the photovoltaic energy storage and charging system to adapt to complex operating conditions, improves the accuracy of the predictive model in long-term operation, and ensures that the control system can maintain high control precision even when equipment ages or environmental conditions change, thereby improving the operational benefits of the charging and discharging control strategy of the photovoltaic energy storage and charging system. Attached Figure Description
[0017] Figure 1 A schematic flowchart of an embodiment of the charging and discharging control method for the photovoltaic energy storage and charging system provided by the present invention; Figure 2 This is a schematic flowchart of another embodiment of the charging and discharging control method for the photovoltaic energy storage and charging system provided by the present invention; Figure 3 A schematic diagram of the charge and discharge control device for the photovoltaic energy storage and charging system provided by the present invention. Detailed Implementation
[0018] 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 a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0019] In the description of the embodiments of the present invention, unless otherwise stated, "a plurality of" means two or more.
[0020] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0022] This invention provides a charging and discharging control method, device, and storage medium for an optical energy storage and charging system, which will be described below.
[0023] The execution subject of the charging and discharging control method of the optical storage and charging system in this application embodiment can be the charging and discharging control device of the optical storage and charging system provided in this application embodiment, or different types of electronic devices such as server equipment, physical host, or user equipment (UE) that integrate the charging and discharging control device of the optical storage and charging system. The charging and discharging control device of the optical storage and charging system can be implemented in hardware or software. The UE can be a terminal device such as a smartphone, tablet computer, laptop computer, handheld computer, desktop computer, or personal digital assistant (PDA).
[0024] Figure 1 This is a schematic flowchart of an embodiment of the charging and discharging control method for the photovoltaic energy storage and charging system provided by the present invention, as shown below. Figure 1 As shown, the charging and discharging control method of the photovoltaic energy storage and charging system includes: S101. A predictive control algorithm is adopted to predict the operating status of the photovoltaic energy storage and charging system in multiple future control cycles based on the real-time operating data of the photovoltaic energy storage and charging system. The real-time operating data includes at least the real-time power at the grid connection point, the bus voltage, the system frequency, and the energy storage state of charge.
[0025] Predictive control algorithms, in this context, refer to control algorithms that determine future control commands based on the current system state and a specific control objective. These include, but are not limited to, Model Predictive Control (MPC) and Model Reference Adaptive Control (MRAC). The core of the MPC algorithm lies in predicting the system state over multiple control cycles based on a system state-space model and solving for the optimal control command through rolling optimization. The core of the MRAC algorithm is to pre-establish a reference model describing the ideal behavior of the system, compare the deviation between the actual system output and the reference model output in real time, and dynamically adjust the control parameters to make the actual output approach the reference model output. Both algorithms can achieve the charging and discharging control objective of the photovoltaic-storage-charging system described in this embodiment. Those skilled in the art can choose the appropriate predictive control algorithm implementation method based on the actual application scenario.
[0026] As a preferred implementation method, the MPC algorithm is selected. At each sampling time, based on the current system state and the prediction model, the optimal control problem in the finite time domain is solved online to obtain the control sequence for a future period. Only the control action at the current time is executed, and the above process is repeated at the next sampling time. In this embodiment, the prediction model of the predictive control algorithm adopts a discrete-time state-space model, which can describe the dynamic coupling relationship between state variables such as photovoltaic output, energy storage state of charge, bus voltage, and system frequency in the photovoltaic-storage-charging system.
[0027] Operating status refers to the key electrical parameters of a photovoltaic-storage-charging system over multiple control cycles. These parameters include real-time photovoltaic output power, energy storage state of charge (SBC), bus voltage, and system frequency. Real-time photovoltaic output power reflects the future power generation capacity of the photovoltaic modules; this parameter is affected by environmental factors such as sunlight intensity and temperature. SBC reflects the remaining charge level of the energy storage modules, and this parameter is crucial for determining whether the modules can continue charging or discharging. Bus voltage and system frequency reflect the power quality of the photovoltaic-storage-charging system. The stability of the bus voltage directly affects the normal operation of the load equipment, while the stability of the system frequency reflects the power balance between power generation and consumption.
[0028] Specifically, the operational data of the photovoltaic-storage-charging system can be acquired in real time through a data acquisition module. This data includes at least the real-time power at the grid connection point, bus voltage, system frequency, and energy storage state of charge. Based on the real-time data, the predictive control algorithm predicts the operational status of the photovoltaic-storage-charging system over multiple future control cycles. For example, the control cycle can be set to 0.1 seconds to predict the system state change trend over the next 10 control cycles (i.e., within 1 second).
[0029] This embodiment improves the ability to anticipate fluctuations in photovoltaic output and randomness in charging load by predicting the operating status of the photovoltaic-storage-charging system. This ensures that control decisions are based on predictions of future states, thereby reducing control lag caused by relying solely on current measurements.
[0030] S102. Within each control cycle, the optimal energy storage charging and discharging power command is determined with the goal of minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. The photovoltaic energy storage and charging system is then controlled to charge and discharge according to the optimal energy storage charging and discharging power command.
[0031] The optimization objectives include at least two sub-objectives from grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. For example, in scenarios where it is necessary to smooth out photovoltaic power fluctuations, grid-connected power fluctuation can be used as the primary optimization objective; in scenarios where it is necessary to maintain system stability, bus voltage deviation and system frequency deviation can be used as the primary optimization objectives.
[0032] Specifically, within each control cycle, a rolling optimization process can be executed, with weighted sum minimization as the optimization objective. Under the premise of satisfying relevant constraints, the optimal energy storage charging and discharging power command sequence within the future finite time domain is solved. Then, only the first command in this sequence, i.e., the charging and discharging power command for the current control cycle, is executed. When the next control cycle arrives, the optimization solution is re-executed based on the latest system state. This rolling approach allows the optimization window to continuously move forward. The objective function of this rolling optimization includes at least two sub-objectives from grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. By assigning different weight coefficients to each sub-objective, multi-objective collaborative optimization can be achieved under different operational requirements. After determining the optimal energy storage charging and discharging power command, the photovoltaic-energy storage-charging system controls the energy storage modules to perform charging and discharging operations according to this command.
[0033] In this embodiment, rolling optimization within each control cycle improves the timeliness of the response of charging and discharging power commands to changes in system state, ensuring that the control strategy can be dynamically adjusted according to changes in actual operating conditions. This enhances the adaptability of the photovoltaic-storage-charging system to uncertainties such as photovoltaic fluctuations and load changes. Simultaneously, by using the weighted sum of multiple sub-objectives as the optimization target, multi-objective coordinated optimization of grid-connected power, bus voltage, system frequency, and energy storage state of charge is achieved.
[0034] S103. After each control cycle ends, the internal parameters of the predictive control algorithm are corrected by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
[0035] The deviation reflects the difference between the prediction model and the actual system, which can originate from random fluctuations in photovoltaic output, sudden changes in load, or slow aging of equipment characteristics.
[0036] Internal parameters refer to the model parameters of the prediction model in the predictive control algorithm, including the state prediction matrix and the control input matrix.
[0037] Specifically, feedback correction is performed on the predictive model of the predictive control algorithm. The actual output value of the optical storage and charging system is collected and compared with the predicted operating state from the previous control cycle, and the deviation between the two is calculated. This deviation is used to correct the internal parameters of the predictive model in the predictive control algorithm, and the corrected internal parameters are used to determine the command for the next control cycle. By correcting the model parameters in the predictive model of the predictive control algorithm, the corrected predictive model can gradually approximate the dynamic characteristics of the actual system.
[0038] In this embodiment, by performing feedback correction on the prediction model, the photovoltaic energy storage and charging system can adapt to complex operating conditions, thereby improving the accuracy of the prediction model in long-term operation and ensuring that the control system can maintain high control precision when the equipment ages or environmental conditions change, thus improving the operational benefits of the charging and discharging control strategy of the photovoltaic energy storage and charging system.
[0039] In summary, the charging and discharging control method for a photovoltaic energy storage and charging system provided in this embodiment of the invention first executes a prediction step at the beginning of any control cycle, predicting the operating state for multiple future control cycles based on currently collected real-time operating data; then, it executes a rolling optimization step, solving for the optimal charging and discharging power command based on the predicted operating state, and controlling the energy storage module to execute the command; after the end of the control cycle, it executes a feedback correction step, using the deviation between the actual output and the predicted state during the cycle to correct the internal parameters within the prediction model. The corrected parameters will serve as the input for the prediction step of the next control cycle, thus forming a complete closed-loop control cycle. This ensures that the control accuracy will not decrease due to model mismatch during long-term operation, improving the control stability and overall robustness of the photovoltaic energy storage and charging system during long-term operation, and thereby enhancing the operational benefits of the charging and discharging control strategy of the photovoltaic energy storage and charging system.
[0040] In some embodiments of the present invention, before step S102, the method further includes: identifying the current physical operating conditions of the photovoltaic-storage-charging system; and adjusting the weighting coefficients corresponding to the grid-connected power fluctuation, the bus voltage deviation, the system frequency deviation, and the energy storage state of charge deviation in the optimization target according to the physical operating conditions.
[0041] Physical operating conditions refer to the current operating scenario of the photovoltaic-storage-charging system, including photovoltaic fluctuation conditions and off-grid mode. Photovoltaic fluctuation conditions refer to scenarios where photovoltaic output changes rapidly due to factors such as cloud cover; in this scenario, the system needs to prioritize smoothing out grid-connected power fluctuations. Off-grid mode refers to scenarios where the photovoltaic-storage-charging system is disconnected from the main grid and operates independently; in this scenario, the system needs to rely on energy storage modules to maintain the stability of the bus voltage and system frequency.
[0042] Weighting coefficients are the weighted values corresponding to each optimization term in the optimization objective, used to adjust the importance of each optimization term in the objective function. By adjusting the relative magnitudes of the weighting coefficients, the degree of emphasis the optimization process places on different control objectives can be changed.
[0043] Specifically, when the system is identified as operating under photovoltaic fluctuation conditions, the weighting coefficients corresponding to grid-connected power fluctuations are adjusted to their maximum values, making them greater than the weighting coefficients corresponding to bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. When the system is identified as operating in off-grid mode, the weighting coefficients corresponding to bus voltage deviation and system frequency deviation are adjusted to their maximum values, making them greater than the weighting coefficients corresponding to grid-connected power fluctuations and energy storage state of charge deviation.
[0044] As a preferred approach, when the system is in photovoltaic fluctuation mode, the weighting coefficient for grid-connected power fluctuation is 0.4, and the weighting coefficients for the other three optimization items are all 0.2. When the system is in off-grid mode, the weighting coefficients for bus voltage deviation and system frequency deviation are both 0.4, the weighting coefficient for grid-connected power fluctuation is 0.1, and the weighting coefficient for energy storage state of charge deviation is 0.1.
[0045] Understandably, this embodiment identifies physical operating conditions and dynamically adjusts weighting coefficients, enabling the control strategy to automatically switch optimization priorities based on the current operating scenario. Under fluctuating photovoltaic conditions, priority is given to smoothing grid-connected power fluctuations to reduce the impact on the grid; in off-grid mode, priority is given to maintaining voltage and frequency stability to ensure the power supply quality to local loads. This condition-adaptive weighting adjustment method avoids the problem of poor control performance under different scenarios with a single fixed weight, thus improving the overall operating performance of the photovoltaic-storage-charging system under multiple operating conditions.
[0046] In some embodiments of the present invention, the physical operating conditions include photovoltaic fluctuation conditions and off-grid mode; the step of adjusting the weighting coefficient includes: when the photovoltaic-storage-charging system is identified as being in photovoltaic fluctuation conditions, adjusting the weighting coefficient corresponding to the grid-connected power fluctuation to the maximum value; when the photovoltaic-storage-charging system is identified as being in off-grid mode, adjusting the weighting coefficients corresponding to the bus voltage deviation and the system frequency deviation to the maximum value.
[0047] Specifically, when the system is in photovoltaic fluctuation mode, the weighting coefficient corresponding to grid-connected power fluctuation is adjusted to its maximum value, for example, 0.4, while the weighting coefficients corresponding to bus voltage deviation, system frequency deviation, and energy storage state of charge deviation are all set to 0.2. When the system is in off-grid mode, the weighting coefficients corresponding to bus voltage deviation and system frequency deviation are adjusted to their maximum values, for example, 0.4, while the weighting coefficients corresponding to grid-connected power fluctuation and energy storage state of charge deviation are set to 0.1. The specific values of the weighting coefficients can be adjusted according to the actual application scenario. For example, in scenarios with severe photovoltaic fluctuations, the weighting coefficient corresponding to grid-connected power fluctuation can be further increased.
[0048] It should be noted that the weighting coefficient can be adjusted online, that is, the system monitors its own operating status in real time. When the rate of change of photovoltaic output exceeds the preset threshold, it is automatically identified as photovoltaic fluctuation condition. When the grid connection point switch is disconnected or the grid voltage and frequency are abnormal, it is automatically identified as off-grid mode.
[0049] Understandably, this embodiment identifies the current physical operating conditions of the system and adjusts the weighting coefficients accordingly, enabling the control strategy to emphasize different optimization priorities for different operating conditions. Under photovoltaic fluctuation conditions, increasing the weight of grid-connected power fluctuations helps to mitigate the impact of photovoltaic output fluctuations on the grid; in off-grid mode, increasing the weight of voltage and frequency deviations helps to maintain the power supply quality of isolated systems. Through this condition-adaptive weighting adjustment method, the system can maintain superior control performance under various operating scenarios.
[0050] In one specific implementation, taking the predictive control algorithm as the MPC algorithm as an example, and considering the control focus of the photovoltaic energy storage and charging system, a rolling optimization objective function is constructed. The optimal energy storage charging and discharging power command is solved within each control cycle, as detailed below: min = ω1·| - | + ω2·| - | + ω3·| - | + ω4·| - | in: Let i be the optimization objective value for the t-th control cycle; i = 1, 2, ..., N (N = 10, prediction time domain); , , , These are the grid-connected power reference value, system bus voltage reference value, system frequency reference value, and energy storage SOC reference value, respectively. ω1, ω2, ω3, and ω4 are weighting coefficients that are dynamically adjusted according to the control scenario: for power smoothing control, ω1=0.4, ω2=0.2, ω3=0.2, and ω4=0.2 are recommended; for off-grid voltage and frequency stabilization control, ω1=0.1, ω2=0.4, ω3=0.4, and ω4=0.1 are recommended.
[0051] In some embodiments of the present invention, the predictive control algorithm is a model predictive control algorithm, and the internal parameters include a state prediction matrix and a control input matrix; step S103 includes: multiplying the proportional coefficient in the proportional-integral correction algorithm by the transpose of the state vector of the current control cycle, adding it to the state prediction matrix of the current control cycle to obtain the state prediction matrix of the next control cycle; multiplying the integral coefficient in the proportional-integral correction algorithm by the integral of the deviation over one control cycle, multiplying it by the transpose of the control input vector of the current control cycle, adding it to the control input matrix of the current control cycle to obtain the control input matrix of the next control cycle.
[0052] In this context, the state prediction matrix refers to the coefficient matrix used in the MPC algorithm to describe the evolution of the system state over time. The control input matrix refers to the coefficient matrix used in the model predictive control algorithm to describe the influence of the control input on the system state.
[0053] The proportional-integral (PI) correction algorithm is a feedback correction method that combines proportional control and integral control. The proportional coefficient is used to respond quickly to the current deviation, while the integral coefficient is used to eliminate the accumulated steady-state error.
[0054] The state vector is a vector composed of the key state variables of the photovoltaic-storage-charging system, including real-time photovoltaic power output, energy storage state of charge, bus voltage, and system frequency. The control input vector is a vector composed of energy storage discharge power and energy storage charging power.
[0055] Deviation refers to the difference between the actual output of the photovoltaic storage and charging system and the output of the prediction model in the MPC algorithm.
[0056] Specifically, the predictive control algorithm employs a model predictive control algorithm, whose internal parameters include the state prediction matrix A and the control input matrix B. The feedback correction step specifically uses a proportional-integral correction algorithm to correct these two matrices online. After each control cycle, the actual system output value is... Compared with the predicted output value of the MPC model Compare and calculate the deviation. = - The proportional-integral correction algorithm is used to correct the state equation parameters (A and B matrices) and disturbance terms for the next control cycle. , To eliminate prediction errors and ensure the consistency between the model and the actual system, the specific correction formula is as follows: = + · · T = + · ( dτ)· T in, , These are the proportional coefficient and the integral coefficient, respectively. K p and integral coefficient K i The value can be calibrated according to the actual system characteristics, for example, =0.05, =0.01, the integration interval is one control cycle. State vector T This represents the transpose of the current state vector and the control input vector. T This represents the transpose of the control input vector at the current moment. Deviation The integral over a control cycle reflects the overall effect of the accumulated deviation within that cycle, and the use of the integral term helps to eliminate steady-state errors that may exist in long-term operation.
[0057] Understandably, this embodiment uses a proportional-integral correction algorithm to online correct the state prediction matrix and control input matrix of the model predictive control algorithm, enabling the predictive model to continuously adjust its internal parameters based on actual operating deviations. When fluctuations in photovoltaic output, load changes, or equipment aging cause changes in the actual system characteristics, the corrected state prediction matrix and control input matrix can more accurately describe the dynamic behavior of the system, thereby improving the consistency between the predictive model and the actual system and reducing the impact of model mismatch on control accuracy. The fast response characteristics of the proportional coefficient and the steady-state error elimination characteristics of the integral coefficient work together to ensure that the system maintains good control performance in both dynamic changes and steady-state operation.
[0058] In some embodiments of the present invention, step S101 includes: constructing a discrete-time state-space model of the photovoltaic-storage-charging system, wherein the state vector of the state-space model includes at least the real-time photovoltaic output power, the energy storage state of charge, the bus voltage, and the system frequency, and the control input vector of the state-space model includes at least the energy storage discharge power and the energy storage charging power; and recursively calculating the state vectors for multiple future control cycles based on the state vector and control input vector of the current control cycle, wherein the state vectors are used to characterize the operating state.
[0059] Among them, the discrete-time state-space model refers to the state-space representation of a continuous-time system at discrete time points.
[0060] Specifically, a discrete-time state-space model of the photovoltaic energy storage and charging system is constructed, and the state equation of this model is expressed as follows: = A· + B· + The output equation is expressed as = C· + D· + The state vectors for multiple future control cycles are recursively calculated using a state-space model.
[0061] In one specific implementation, the MPC algorithm will continue to be used as an example for predictive control. The MPC algorithm uses a discrete-time state-space model with a control period of T=0.1s (to meet the second-level response requirements of the photovoltaic energy storage and charging system) to predict the system state for the next N=10 control periods (i.e., within 1 second). The specific state equations are as follows: (1) System state vector : = [ , , , ]T (2) Control input vector : = [ , ]T( For energy storage discharge power, (Power for energy storage charging) (3) Equation of state: = A· + B· +
[0062] (4) Output equation: = C· + D· +
[0063] Where: A is the system state matrix, reflecting the dynamic coupling relationship between photovoltaic, energy storage, load, and system bus, calibrated based on the actual parameters of the photovoltaic-energy storage-charging system; B is the control input matrix, characterizing the influence coefficient of energy storage charging and discharging power on the system state; C is the output matrix, representing the output quantity. = [ , , , T (i.e., grid-connected power, bus voltage, system frequency, and energy storage SOC); D is the direct transmission matrix, used to correct the direct impact of control input on output; , These are the state disturbance term and the output disturbance term, used to compensate for model errors caused by photovoltaic fluctuations and random load changes. Their value ranges are calibrated based on actual operating experience. For example, ∈[-5kW, 5kW], ∈[-0.05Hz,0.05Hz]).
[0064] Understandably, this embodiment constructs a discrete-time state-space model specifically for photovoltaic-storage-charging systems, using photovoltaic output power, energy storage state of charge, bus voltage, and system frequency as state vectors, and energy storage charging and discharging power as control input vectors. This enables the prediction model to accurately describe the dynamic coupling relationships between various electrical quantities in the photovoltaic-storage-charging system, improving the accuracy of future state predictions. Simultaneously, by introducing state disturbance terms and output disturbance terms to compensate for photovoltaic fluctuations and random load changes, the predictive model's adaptability to uncertain operating conditions is further enhanced.
[0065] In some embodiments of the present invention, the real-time operating data also includes the photovoltaic output change over a preset number of control cycles, and the load change rate.
[0066] Among them, the photovoltaic output change refers to the difference in real-time photovoltaic output power between adjacent control cycles. The load change rate refers to the rate at which the total system load power changes over time.
[0067] Specifically, the input to the MPC model comes from the real-time operating data of the photovoltaic-storage-charging system collected in real time by the central control module, ensuring that the model is synchronized with the actual operating conditions. (1) Photovoltaic side: Real-time photovoltaic power output Pre-set quantities, such as the changes in photovoltaic output over the first three control cycles. , , (Used to predict photovoltaic power output trends); (2) Energy storage side: energy storage modules in real time Energy storage terminal voltage Maximum charging and discharging power of energy storage , Energy storage charging and discharging loss coefficient η; (3) Load side: Total load power of the system Real-time charging power of the charging module Load change rate ; (4) Grid / system side: Real-time power at the grid connection point under grid-connected mode Grid voltage Grid frequency System bus voltage in off-grid mode System frequency ; (5) Control constraint parameters: photovoltaic power output fluctuation threshold Permissible voltage fluctuation range , ], Permissible frequency fluctuation range , ], Energy Storage SOC Safety Boundary , ].
[0068] When collecting real-time operational data, in addition to collecting real-time power at the grid connection point, bus voltage, system frequency, and energy storage state of charge, the data also includes the photovoltaic output change and load change rate for a preset number of control cycles. Optionally, the photovoltaic output change for the first three control cycles can be collected.
[0069] Understandably, this embodiment collects historical changes in photovoltaic output and load change rate, enabling the prediction model to use historical trend information to predict future changes in photovoltaic output and load, thereby improving the prediction accuracy of the prediction model in photovoltaic fluctuation scenarios and load change scenarios, and thus enhancing the adaptability of the charge and discharge control strategy to complex operating conditions.
[0070] Understandably, this embodiment collects historical changes in photovoltaic output and load change rate, enabling the prediction model to use historical trend information to predict future changes in photovoltaic output and load, thereby improving the prediction accuracy of the prediction model in photovoltaic fluctuation scenarios and load change scenarios, and thus enhancing the adaptability of the charge and discharge control strategy to complex operating conditions.
[0071] In some embodiments of the present invention, the optimization objective includes multiple safety constraints, including at least: energy storage charging and discharging power constraints, energy storage state of charge safety boundary constraints, bus voltage allowable fluctuation range constraints, and system frequency allowable fluctuation range constraints.
[0072] Among them, the energy storage charging and discharging power constraint means that the charging and discharging power of the energy storage module must be limited between the minimum allowable value and the maximum allowable value, that is, satisfying P min ≤ Z(t) ≤ P max Where Z(t) is the energy storage charging and discharging power, P min and P max These represent the minimum and maximum charge / discharge power for energy storage, respectively.
[0073] The safety boundary constraint of the state of charge (SOC) of energy storage refers to the requirement that the state of charge of energy storage be maintained within a preset safety range, i.e., satisfying the SOC. min ≤ SOC(t+i) ≤ SOC max Where SOC(t+i) is the energy storage state of charge in the predicted time domain, SOC min and SOC max These are the upper and lower limits of the state of charge, respectively, for example, the value is SOC. min =5%, SOC max =95%.
[0074] The allowable fluctuation range constraint of bus voltage refers to the requirement that the system bus voltage must be controlled within the allowable fluctuation range, i.e., satisfying U min ≤ Ubus(t+i) ≤ U max Where Ubus(t+i) is the bus voltage in the predicted time domain, U min and U max These are the lower and upper limits of the bus voltage, for example, a value of U. min =361V, U max =399V.
[0075] The system frequency permissible fluctuation range constraint means that the system frequency must be controlled within the allowable fluctuation range, that is, satisfying f. min ≤ fbus(t+i) ≤ f max Where fbus(t+i) is the system frequency in the prediction time domain, f min and f max These are the lower and upper limits of the system frequency, respectively; for example, a value of f. min =49.5Hz, f max =50.5Hz.
[0076] Specifically, when solving for the optimal energy storage charging and discharging power command during the rolling optimization process, safety constraints are embedded into the constraint set of the optimization problem. When the optimization algorithm searches for the optimal solution within the feasible solution space, it must simultaneously satisfy the following conditions: the energy storage charging and discharging power does not exceed limits, the energy storage state of charge does not exceed the safety boundary, and the bus voltage and system frequency do not exceed the allowable fluctuation range. If a candidate solution causes any constraint condition to be violated, the solution is determined to be infeasible, and the optimization algorithm automatically excludes it.
[0077] Understandably, this embodiment ensures the operational safety of the energy storage device and the entire system by applying multiple safety constraints, and avoids abnormal operating conditions such as overcharging and over-discharging of energy storage, voltage exceeding limits, and frequency exceeding limits.
[0078] In some embodiments of the present invention, the method further includes: when the photovoltaic energy storage and charging system is in off-grid mode, predicting the changing trends of the bus voltage and system frequency in the real-time operating data; and according to the changing trends, using a virtual synchronous generator mode to adjust the optimal energy storage charging and discharging power command and control the energy storage modules in the photovoltaic energy storage and charging system to charge and discharge.
[0079] The Virtual Synchronous Generator (VSG) mode refers to a control method that simulates the electromechanical transient characteristics of a synchronous generator, enabling the energy storage converter to possess inertial and damping characteristics similar to those of a synchronous generator. This mode can provide voltage and frequency support for off-grid photovoltaic-storage-charging systems.
[0080] Specifically, when the photovoltaic-storage-charging system is in off-grid mode, the data acquisition module focuses on collecting the bus voltage Ubus(t) and system frequency fbus(t) from real-time operating data. The prediction model focuses on predicting the changing trends of the bus voltage and system frequency. The rolling optimization module takes voltage and frequency stability as the core optimization objective, setting the weighting coefficients in the objective function to ω2=0.4 and ω3=0.4 to emphasize the penalty for voltage and frequency deviations. The output optimal energy storage charging and discharging power command, in conjunction with the virtual synchronous generator mode, jointly maintains the system's voltage and frequency stability. The energy storage module charges and discharges according to the adjusted charging and discharging power command to suppress voltage drops or frequency shifts that may occur in off-grid mode.
[0081] Understandably, this embodiment improves the voltage and frequency stability of the photovoltaic-storage-charging system during off-grid operation by predicting the changing trends of bus voltage and system frequency in off-grid mode and adjusting the charging and discharging power commands using a virtual synchronous generator mode, thus ensuring reliable power supply to the electric vehicle charging load.
[0082] In one specific implementation, such as Figure 2 The diagram shows a flowchart of the charging and discharging control method for a photovoltaic-storage-charging system. This control process is executed cyclically, with each cycle comprising three core components: prediction, optimization, and correction.
[0083] Specifically, after the control process begins, the data acquisition module first collects real-time operating data of the photovoltaic-storage-charging system, including parameters such as real-time power at the grid connection point, bus voltage, system frequency, and energy storage state of charge.
[0084] The predictive model module predicts the operating status of the photovoltaic energy storage and charging system over multiple future control cycles based on the collected real-time operational data. The prediction results are then fed into the rolling optimization module.
[0085] The rolling optimization module aims to minimize the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. It then solves for the optimal energy storage charging and discharging power command. The resulting command is output via the control command output module to control the energy storage module's charging and discharging.
[0086] At the end of each control cycle, the feedback correction module collects the actual output of the photovoltaic storage and charging system, compares it with the operating state predicted by the prediction model module, calculates the deviation between the two, and uses this deviation to correct the internal parameters of the prediction model module. The corrected parameters are fed back to the prediction model module for prediction in the next control cycle.
[0087] At this point, one control cycle ends, and the system enters the next control cycle, repeating the above process.
[0088] To better implement the charge / discharge control method of the photovoltaic energy storage and charging system in the embodiments of the present invention, based on the charge / discharge control method of the photovoltaic energy storage and charging system, correspondingly, as follows: Figure 3 As shown, this embodiment of the invention also provides a charge / discharge control device for a photovoltaic energy storage and charging system. The charge / discharge control device 300 for the photovoltaic energy storage and charging system includes: Prediction unit 301 is used to use a predictive control algorithm to predict the operating status of the photovoltaic energy storage and charging system in the future multiple control cycles based on the real-time operating data of the photovoltaic energy storage and charging system. The real-time operating data includes at least the real-time power at the grid connection point, bus voltage, system frequency and energy storage state of charge. The rolling optimization unit 302 is used to determine the optimal energy storage charging and discharging power command in each control cycle with the goal of minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation; and to control the photovoltaic energy storage charging and discharging system to charge and discharge according to the optimal energy storage charging and discharging power command. The model correction unit 303 is used to correct the internal parameters of the predictive control algorithm by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state after each control cycle, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
[0089] The charging and discharging control device 300 of the optical energy storage and charging system provided in the above embodiments can realize the technical solutions described in the embodiments of the charging and discharging control method of the optical energy storage and charging system. The specific implementation principles of each module or unit can be found in the corresponding content of the embodiments of the charging and discharging control method of the optical energy storage and charging system, which will not be repeated here.
[0090] Accordingly, this application also provides a computer-readable storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, they can implement the steps or functions of the charging and discharging control method of the optical storage and charging system provided in the above-described method embodiments.
[0091] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0092] The charging and discharging control method, device, and storage medium of the optical energy storage and charging system provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A charging and discharging control method for a photovoltaic energy storage and charging system, characterized in that, include: A predictive control algorithm is used to predict the operating status of the photovoltaic-storage-charging system in the future multiple control cycles based on the real-time operating data of the photovoltaic-storage-charging system. The real-time operating data includes at least the real-time power at the grid connection point, the bus voltage, the system frequency, and the energy storage state of charge. Within each control cycle, the optimal energy storage charging and discharging power command is determined with the goal of minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation. The photovoltaic energy storage and charging system is then controlled to charge and discharge according to the optimal energy storage charging and discharging power command. After each control cycle, the internal parameters of the predictive control algorithm are corrected by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
2. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, Before setting the optimization objective as minimizing the weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation, the optimization also includes: Identify the current physical operating conditions of the photovoltaic energy storage and charging system; Based on the physical operating conditions, adjust the weighting coefficients corresponding to the grid-connected power fluctuation, the bus voltage deviation, the system frequency deviation, and the energy storage state of charge deviation in the optimization objectives.
3. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 2, characterized in that, The physical operating conditions include photovoltaic fluctuation conditions and off-grid mode; the adjustment steps for the weighting coefficients include: When the photovoltaic energy storage and charging system is identified as being in a photovoltaic fluctuation condition, the weighting coefficient corresponding to the grid-connected power fluctuation is adjusted to the maximum value; When the photovoltaic energy storage and charging system is identified as being in off-grid mode, the weighting coefficients corresponding to the bus voltage deviation and the system frequency deviation are adjusted to their maximum values.
4. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, The predictive control algorithm is a model predictive control algorithm, and the internal parameters include a state prediction matrix and a control input matrix; the step of correcting the internal parameters of the predictive control algorithm by utilizing the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state includes: Multiply the proportional coefficient in the proportional-integral correction algorithm by the transpose of the state vector of the current control cycle, and add it to the state prediction matrix of the current control cycle to obtain the state prediction matrix of the next control cycle. Multiply the integral coefficient in the proportional-integral correction algorithm by the integral of the deviation over one control cycle, then multiply by the transpose of the control input vector of the current control cycle, and add this to the control input matrix of the current control cycle to obtain the control input matrix for the next control cycle.
5. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, The prediction of the operating status of the photovoltaic energy storage and charging system over multiple future control cycles includes: Construct a discrete-time state-space model of the photovoltaic-storage-charging system. The state vector of the state-space model includes at least the real-time output power of the photovoltaic system, the state of charge of the energy storage system, the bus voltage, and the system frequency. The control input vector of the state-space model includes at least the energy storage discharge power and the energy storage charging power. Based on the state vector and control input vector of the current control cycle, the state vectors of multiple future control cycles are recursively calculated using the state space model. The state vectors are used to characterize the operating state.
6. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, The real-time operating data also includes the photovoltaic output change over a preset number of control cycles, as well as the load change rate.
7. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, The optimization objective includes multiple safety constraints, including at least: energy storage charging and discharging power constraints, energy storage state of charge safety boundary constraints, bus voltage allowable fluctuation range constraints, and system frequency allowable fluctuation range constraints.
8. The charging and discharging control method for the photovoltaic energy storage and charging system according to claim 1, characterized in that, Also includes: When the photovoltaic energy storage and charging system is in off-grid mode, predict the changing trends of bus voltage and system frequency in the real-time operating data; Based on the changing trend, a virtual synchronous generator mode is adopted to adjust the optimal energy storage charging and discharging power command and control the energy storage module in the photovoltaic energy storage and charging system to charge and discharge.
9. A charging and discharging control device for a photovoltaic energy storage and charging system, characterized in that, include: The prediction unit is used to use a predictive control algorithm to predict the operating status of the photovoltaic storage and charging system in the future multiple control cycles based on the real-time operating data of the photovoltaic storage and charging system. The real-time operating data includes at least the real-time power at the grid connection point, the bus voltage, the system frequency, and the energy storage state of charge. The rolling optimization unit is used to determine the optimal energy storage charging and discharging power command in each control cycle, with the optimization objective being the minimum weighted sum of at least two of the following: grid-connected power fluctuation, bus voltage deviation, system frequency deviation, and energy storage state of charge deviation; and to control the photovoltaic energy storage charging and discharging system to charge and discharge according to the optimal energy storage charging and discharging power command. The model correction unit is used to correct the internal parameters of the predictive control algorithm by using the deviation between the actual output of the photovoltaic energy storage and charging system and the operating state after each control cycle, so as to determine the optimal energy storage charging and discharging power command for the next control cycle.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps in the charge / discharge control method of the optical storage and charging system according to any one of claims 1 to 8.