A method and system for adaptive optimization of PI parameters of a light storage inverter
By using the Q-learning reinforcement learning algorithm to adaptively optimize the PI parameters of the photovoltaic-storage inverter, the problem of zero-feed control of the photovoltaic-storage inverter in all scenarios is solved, achieving high-precision, fast-response and stable control effects, and reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202610957612.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-11-20
AI Technical Summary
Existing PI control technology is difficult to meet the high-precision zero-feed control requirements of photovoltaic-storage inverters in all scenarios. It has problems such as strong dependence on parameter tuning, difficulty in balancing response speed and steady-state error, weak robustness, and high operation and maintenance costs.
The Q-learning reinforcement learning algorithm is used to perform real-time online adaptive optimization of the PI controller parameters. By collecting system state information, pre-setting the action space and reward function, the Q-learning intelligent optimization module selects the optimal PI parameters to adjust the action and updates the Q table in real time to achieve adaptive control of the inverter.
It improves the accuracy and robustness of zero-feed control of photovoltaic-storage inverters in complex scenarios, reduces operation and maintenance costs, and has stronger adaptability than fixed parameter schemes with manual tuning.
Smart Images

Figure CN123144237A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic-storage inverter control technology, and in particular, to an adaptive optimization method and system for PI parameters of a photovoltaic-storage inverter. Background Technology
[0002] Distributed photovoltaic (PV) and energy storage combined grid-connected systems are widely used in smart microgrids, industrial parks, commercial and industrial distributed PV, and new energy access scenarios. To meet grid management requirements, PV-energy storage inverters need to achieve "zero feed" control, meaning the active power at the grid connection point must always remain zero, preventing backfeeding of power to the public grid. Existing technologies mainly use PI (proportional-integral) controllers to regulate the inverter output, controlling active power by adjusting PI parameters to achieve precise grid-connected power tracking.
[0003] However, traditional PI controllers have the following shortcomings in practical applications:
[0004] First, the manual tuning of PI parameters is highly dependent on specific operating conditions. The tuning results are only applicable to specific operating conditions. In actual operation, various factors such as changes in weather conditions, fluctuations in photovoltaic output, switching of energy storage charging and discharging states, and changes in load all play an intertwined role, making it difficult for manually tuned fixed PI parameters to take into account all operating conditions.
[0005] Second, it is difficult to achieve both system response speed and steady-state error. The parameter tuning of the PI controller requires a trade-off between response speed and steady-state accuracy. When the operating conditions change drastically, the PI controller with fixed parameters is prone to problems such as overshoot, slow response or large steady-state error, making it difficult to achieve the high-precision zero-feed control target.
[0006] Third, the controller has weak robustness; external disturbances such as grid voltage fluctuations, frequency deviations, photovoltaic output jumps, energy storage charging and discharging fluctuations, and load switching occur frequently, and the fixed-parameter PI controller cannot adapt and adjust in a timely manner, making the system prone to power fluctuations and error accumulation.
[0007] Fourth, the operation and maintenance costs are high; existing PI controllers require manual parameter tuning by technicians on a regular basis, which involves a large workload and requires a high level of expertise from the technicians, thus increasing the total life cycle cost of the system.
[0008] Currently, numerous studies attempt to optimize PI parameters using intelligent algorithms. For example, Chinese invention patent CN120972502A discloses an adaptive optimization method and system for inverter PID parameters based on Q-learning. The method includes: first, determining the current load type in real time according to predefined classification rules; then, selecting corresponding state variables based on the load type, and compressing them using discretization and a prime-multiplication hash function to obtain hash-weighted states; based on the detected load type and the obtained hash-weighted states, selecting actions from the Q-table according to an ε-greedy strategy to obtain ΔKp and ΔKi, and updating the PID controller parameters; finally, calculating the immediate reward based on a multi-objective reward function, and updating the Q-table online according to the Q-learning value function update formula, combined with the learning rate and discount factor, to achieve adaptive control. The system includes modules for memory, load detection, state observation, action selection, PID parameter updating, and Q-table updating. This invention effectively improves the control performance and stability of the inverter under different load conditions by combining offline training with online fine-tuning. However, most of the above solutions are designed for the load adaptability of general inverters and are not specifically designed for the "zero-feed" control target of photovoltaic-storage inverters. Their state space, action space and reward function are not deeply bound to the accuracy requirements of zero-feed.
[0009] Therefore, existing PI control technology is difficult to efficiently and intelligently meet the zero-feed control requirements of photovoltaic-storage inverters in all scenarios. It is necessary for us to design an adaptive optimization method or system for PI parameters of photovoltaic-storage inverters that can optimize PI parameters in real time and improve the accuracy and robustness of zero-feed control. Summary of the Invention
[0010] The purpose of this invention is to provide an adaptive optimization method and system for PI parameters of a photovoltaic-storage inverter. By using a Q-learning reinforcement learning algorithm to perform real-time online adaptive optimization of key parameters of the PI controller, the system can achieve high-precision zero-feed control under various complex scenarios such as photovoltaic power output fluctuations, energy storage charging and discharging switching, and load changes, significantly improving control accuracy, response speed, and robustness.
[0011] To achieve the above objectives, the present invention employs the following technical solution:
[0012] In a first aspect, the present invention provides an adaptive optimization method for the PI parameters of a photovoltaic-storage inverter, comprising the following steps:
[0013] S1: Collect system status information, including the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets;
[0014] S2: Preset action space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts;
[0015] S3: Preset a reward function based on the zero-point error of the system's grid-connected power;
[0016] S4: The Q-learning intelligent optimization module selects the action with the optimal PI parameter adjustment from the action space according to the state information and the pre-stored Q value table, based on the decision-making strategy.
[0017] S5: The PI controller determines the current PI parameters and implements control based on the selected optimal action, collects the grid connection point power fed back by the system and obtains reward information according to the reward function, and updates the Q table in real time so that the PI parameters dynamically tend to the optimal.
[0018] S6: The PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
[0019] As a preferred embodiment of the present invention, the state information in step S1 further includes at least one of the following: photovoltaic power output change rate ΔP PV Energy storage battery state of charge (SOC), load power change rate ΔP load , Grid connection point power change rate ΔP Grid .
[0020] As a preferred embodiment of the present invention, the PI parameter adjustment scheme in the action space of step S2 includes at least one of the following forms:
[0021] (a) Discrete adjustment scheme: including multiple actions such as increasing proportional gain Kp, decreasing proportional gain Kp, increasing integral gain Ki, decreasing integral gain Ki, and keeping the parameters constant, each action corresponding to a preset parameter adjustment step size;
[0022] (b) Combined adjustment scheme: includes multiple preset PI parameter combinations, each parameter combination corresponds to one action.
[0023] As a preferred embodiment of the present invention, the preset reward function in step S3 is negatively correlated with the absolute value of the grid connection point power.
[0024] As a preferred embodiment of the present invention, the reward function is a multi-objective weighted reward function, including at least two of the following: absolute power deviation at grid connection point, response speed, and stability.
[0025] As a preferred embodiment of the present invention, the formula for real-time updating of table Q in step S5 is:
[0026] Q t+1 (st ,a t )←Q t (s t ,a t )+α[r t+1 +γMaxQ t (s t+1 ,a)-Q t (s t ,a t )]
[0027] Where α is the learning rate, α∈(0,1]; γ is the discount factor, γ∈(0,1]; s is the state; a is the action; r t+1 The reward value for step t+1; MaxQ t (s t+1 a) is in state s t+1 The maximum Q value corresponding to all actions.
[0028] As a preferred embodiment of the present invention, before executing step S6, the Q-learning algorithm is embedded in the inverter main control chip to realize real-time data acquisition and parameter optimization, ensuring that the inverter achieves zero power supply optimization under external disturbances.
[0029] Secondly, the present invention provides an adaptive optimization system for PI parameters of a photovoltaic-storage inverter, the system comprising:
[0030] The status acquisition module is used to collect system status information, which includes the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets.
[0031] The motion space preset module is used to preset the motion space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts.
[0032] The reward function preset module is used to preset the reward function based on the zero-point error of the system's grid-connected power.
[0033] The Q-learning intelligent optimization module is used to select the optimal PI parameter from the action space to adjust the action based on the state information and the pre-stored Q value table, according to the decision strategy.
[0034] The PI control optimization module is used to determine the current PI parameters and implement control based on the selected optimal action, collect the grid connection point power fed back by the system and obtain reward information according to the reward function, and update the Q table in real time so that the PI parameters dynamically tend to the optimal.
[0035] The PI control execution module, the PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
[0036] The system also includes a cloud collaboration module, which receives Q-value table data uploaded by multiple field-end Q-learning intelligent optimization modules, performs aggregate learning to generate an optimized Q-value table, and distributes it in batches to each field end.
[0037] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method provided by any possible implementation of the first aspect.
[0038] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method provided by any possible implementation of the first aspect.
[0039] The beneficial effects of the adaptive optimization method and system for PI parameters of a photovoltaic-storage inverter of the present invention are as follows:
[0040] It has strong adaptability; the present invention monitors the system status in real time and automatically selects the optimal PI parameters through the Q-learning reinforcement learning algorithm. It can automatically adjust the control parameters according to the changes in actual working conditions such as photovoltaic output, energy storage charging and discharging state switching, and load fluctuations. Its adaptability is far stronger than that of the fixed parameter scheme set manually, and it can effectively cope with complex dynamic scenarios.
[0041] The zero-feed control has high precision. This invention directly links the PI parameter optimization process with the zero-feed target, and uses the zero-point error of the grid-connected power as the core indicator of the reward function to guide the learning direction of Q-learning, which greatly improves the tracking accuracy, response speed and steady-state error control capability of the grid-connected power, and fully meets the stringent requirements of zero-feed.
[0042] Enhance system robustness; This invention can effectively resist the effects of external disturbances such as grid voltage fluctuations, photovoltaic power output jumps, energy storage charging and discharging fluctuations, and load switching, ensuring stable operation of the system under various disturbances;
[0043] Reduce operation and maintenance costs; This invention enables PI parameters to learn and tune themselves, greatly reducing the need for manual periodic parameter tuning and significantly reducing operation and maintenance difficulty and costs. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 This is a schematic diagram of the overall process of an adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to the present invention. Detailed Implementation
[0046] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0047] The following description provides several embodiments of this application. Different embodiments can be substituted or combined. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0048] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0049] Example 1: As Figure 1 The illustration shown is merely one embodiment of the present invention, namely, an adaptive optimization method for PI parameters of a photovoltaic-storage inverter.
[0050] First, the electrical components of the photovoltaic-storage inverter system are described, including: the photovoltaic array, the energy storage battery, the inverter, the local load, and the public power grid. The energy from the photovoltaic array can be fed into the inverter or the energy storage battery. There is bidirectional energy exchange between the energy storage battery and the inverter. The inverter's output energy can be used by the local load or connected to the public power grid. Before being input into the public power grid, the inverter's output energy passes through an output meter.
[0051] The present invention discloses an adaptive optimization method for PI parameters of a photovoltaic-storage inverter. Based on the above electrical components, an acquisition unit, a Q-learning intelligent unit, and a PI control unit are added. The acquisition unit is connected to the output meter to obtain the meter power output from the inverter to the public power grid. The Q-learning intelligent unit processes the meter power from the acquisition unit and then sends the control data to the PI control unit. The PI control unit is connected to the inverter. It should be noted that the Q-learning intelligent unit and the PI control unit are connected in series.
[0052] The method includes the following steps:
[0053] S1: Collect system status information, including the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets.
[0054] The active power error *e* at the grid connection point directly reflects the degree of deviation in the current zero-feed control and is the core basis for parameter optimization. The error change rate *Δe* reflects the trend of error change and helps to predict the direction of changes in control requirements—when the error continues to increase, more aggressive parameter adjustments are needed; when the error tends to stabilize, finer adjustments should be made. The historical PI parameter set provides historical baseline information for parameter optimization, avoiding system oscillations caused by sudden parameter changes, and enabling the Q-learning module to perceive the current parameter status, thereby making more reasonable decisions.
[0055] S2: Preset action space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts.
[0056] The action space is the basis for the Q-learning module's decision-making. In this invention, the action space is a predefined, finite set of actions stored in the controller. The Q-learning module selects only from this predefined finite set of actions, rather than generating new actions online. This design ensures the convergence of the decision-making process and its engineering feasibility.
[0057] S3: Preset a reward function based on the zero-point error of the system's grid-connected power.
[0058] The reward function is crucial in guiding the optimization direction of the Q-learning algorithm. In this invention, the reward function is a pre-designed evaluation function stored in the system. Its core design principle is that the reward value is negatively correlated with the absolute value of the grid-connected power—that is, the smaller the absolute value of the grid-connected power, the larger the reward value; and the larger the absolute value of the grid-connected power, the smaller the reward value. This design ensures that the optimization objective of the Q-learning intelligent optimization module is completely consistent with the engineering objective of zero-feed control.
[0059] In a preferred embodiment, the reward function is r = -|P Grid |, where P Grid The power at the grid connection point is represented by this function. The physical meaning of this reward function is clear, its calculation is simple, and it is suitable for real-time calculation on embedded platforms.
[0060] S4: The Q-learning intelligent optimization module selects the optimal PI parameter from the action space to adjust the action based on the state information and the pre-stored Q value table, according to the decision strategy.
[0061] Q-learning is a model-free reinforcement learning algorithm based on value functions. In this invention, the Q-learning intelligent optimization module queries the currently maintained Q-value table, compares the Q-values of each candidate action in the current state, and selects the action with the largest Q-value as the optimal action.
[0062] The Q-value table is pre-stored to form a currently maintained Q-value table, which will be updated in subsequent steps.
[0063] To achieve a balance between exploration and exploitation, an ε-greedy strategy is preferred: actions are randomly selected for exploration with probability ε, and the action with the highest current Q-value is selected for exploitation with probability 1-ε. The ε-value can gradually decrease as the learning process progresses, achieving a smooth transition from exploration-oriented to exploitation-oriented learning.
[0064] S5: The PI controller determines the current PI parameters and implements control based on the selected optimal action, collects the grid connection point power fed back by the system and obtains reward information according to the reward function, and updates the Q table in real time so that the PI parameters dynamically tend to the optimal.
[0065] After the PI controller implements control, the grid-connected power will change accordingly. The system collects the changed grid-connected power, substitutes it into the preset reward function in step S3, and calculates the reward value corresponding to the current control effect. This reward value reflects the quality of the PI parameter selection—the closer the grid-connected power is to zero, the higher the reward value.
[0066] The formula for real-time updating of table Q is:
[0067] Q t+1 (s t ,a t )←Q t (s t ,a t )+α[r t+1 +γMaxQ t (s t+1 ,a)-Q t (s t ,a t)]
[0068] Where α is the learning rate, α∈(0,1], which controls the degree of influence of new information on Q-value updates—the larger the learning rate, the stronger the correction of Q-value by new information; γ is the discount factor, γ∈(0,1], which describes the weight relationship between current returns and future long-term returns—the larger the discount factor, the more the algorithm values future long-term returns.
[0069] Let s be the state and a be the action. At each step t, the action-value function is Q. t (s t ,a t When ), the state changes from s t Convert to s t+1 r t+1 MaxQ is the reward for step t+1. t (s t+1 , a) is the maximum value of all predicted values at step t+1, which can be determined by policy a based on ε, and is called a greedy policy.
[0070] Through the above update mechanism, the Q-learning module can continuously learn and accumulate control experience, so that the PI parameter gradually approaches the optimal value under the current operating conditions.
[0071] S6: The PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
[0072] The output of the PI controller is: u(k) = K p e(k) + K i , where e is the error between the grid-connected power and the target value of zero. After receiving the control output command, the inverter drives the power switching device through the internal power modulation stage (such as PWM modulation) to regulate the output power, thereby bringing the grid-connected power closer to zero.
[0073] It is important to note that the above steps S1 to S6 run continuously, collecting the real-time status of the system, selecting the optimal parameter action, implementing control, obtaining feedback and updating the Q table, forming a complete closed-loop adaptive optimization process, so that the PI parameter always tracks the changes in the system operating conditions.
[0074] Example 2: As before Figure 1 The illustration shown is merely one embodiment of the present invention. Based on Embodiment 1, the present invention provides an adaptive optimization method for PI parameters of a photovoltaic-storage inverter.
[0075] The state information in step S1 may further include at least one of the following: photovoltaic output change rate ΔPPV, energy storage battery state of charge (SOC), load power change rate ΔPload, and grid connection point power change rate ΔPGrid. The photovoltaic output change rate reflects the drastic change in light intensity, the energy storage SOC reflects the available capacity of the energy storage battery, and the load change rate reflects the rate of load fluctuation. These extended state variables can provide the Q-learning intelligent optimization module with more comprehensive environmental information, further improving the accuracy of parameter optimization decisions.
[0076] In this invention, the PI parameter adjustment scheme in the action space of step S2 includes at least one of the following forms:
[0077] (a) Discrete adjustment scheme: including multiple actions such as increasing proportional gain Kp, decreasing proportional gain Kp, increasing integral gain Ki, decreasing integral gain Ki, and keeping the parameters constant, each action corresponding to a preset parameter adjustment step size;
[0078] (b) Combined adjustment scheme: includes multiple preset PI parameter combinations, each parameter combination corresponds to one action.
[0079] In a preferred embodiment, the action space employs a discrete adjustment scheme, including the following actions: increasing the proportional gain Kp, decreasing the proportional gain Kp, increasing the integral gain Ki, decreasing the integral gain Ki, and maintaining the parameter unchanged. Each action corresponds to a preset parameter adjustment step size (e.g., ΔKp=+1, ΔKp=-1, ΔKi=+0.1, ΔKi=-0.1).
[0080] In another preferred embodiment, the action space adopts a combined adjustment scheme, including multiple sets of preset PI parameter combinations (such as {Kp1, Ki1}, {Kp2, Ki2}, {Kp3, Ki3}, etc.), each set of parameter combinations corresponds to an action, and the Q-learning module selects the optimal combination from the multiple sets of preset parameter combinations.
[0081] When executing step S5, if the Q-learning module selects the "increase Kp" action, the PI controller will increase the current Kp value by a preset step; if it selects "decrease Ki", the current Ki value will decrease by a preset step; if it selects a preset parameter combination, the parameters of the PI controller will be directly set to the Kp and Ki values of the selected combination.
[0082] In one embodiment of the present invention, the reward function is a multi-objective weighted reward function, and the reward value r = -|P Grid |+C, where C includes at least two of the following: absolute deviation of grid connection point power, response speed, and stability, to achieve multi-objective collaborative optimization.
[0083] As one embodiment of the present invention, before executing step S6, the Q-learning algorithm is embedded in the inverter main control chip to realize real-time data acquisition and parameter optimization, ensuring that the inverter achieves zero power supply optimization under external disturbances.
[0084] Example 3: As before Figure 1 The illustration shown is merely one embodiment of the present invention. Based on any of the above embodiments, in the adaptive optimization method for PI parameters of a photovoltaic-storage inverter of the present invention, the Q-value table is generated through offline pre-training. Specifically, a mathematical model of the photovoltaic-storage inverter system is established in a simulation environment to simulate various typical operating conditions such as sudden changes in photovoltaic output, load switching, and energy storage charging and discharging state switching. Q-learning training is performed in the simulation environment using the same steps S1 to S5 as in online control. After sufficient training, an initial Q-value table is generated and loaded into the controller's memory. When the equipment is running in the field, the Q-learning intelligent optimization module performs online fine-tuning based on the initial Q-value table, significantly shortening the field learning convergence time and enabling the equipment to have better control performance from the initial stage of operation.
[0085] In this invention, considering that the controller of a photovoltaic-storage inverter is usually based on an embedded platform (such as a DSP or MCU) with limited computing and storage resources, the Q-learning intelligent optimization module adopts the following embedded optimization scheme:
[0086] Option 1: Use an integer Q-table storage method to quantize the Q value into a 16-bit or 32-bit integer, avoiding the overhead of floating-point operations and improving computational efficiency.
[0087] Option 2: Perform hash compression on the state space. Use a prime-number multiplication hash function to map the high-dimensional state vector into a fixed-length hash value as the index of the Q table, thereby reducing the storage space requirement of the Q table.
[0088] Option 3: When using the ε-greedy strategy, the ε value gradually decreases as the learning process progresses (e.g., gradually decreasing from 0.3 to 0.01), achieving a smooth transition from exploration-oriented to utilization-oriented learning, taking into account both the initial learning and exploration and the later stable utilization.
[0089] The above optimization scheme enables the Q-learning intelligent optimization module to run in real time on resource-constrained embedded platforms, meeting the real-time requirements of industrial control.
[0090] This invention provides an adaptive optimization method for PI parameters of a photovoltaic-storage inverter, which has the following features:
[0091] It has strong adaptability; the present invention monitors the system status in real time and automatically selects the optimal PI parameters through the Q-learning reinforcement learning algorithm. It can automatically adjust the control parameters according to the changes in actual working conditions such as photovoltaic output, energy storage charging and discharging state switching, and load fluctuations. Its adaptability is far stronger than that of the fixed parameter scheme set manually, and it can effectively cope with complex dynamic scenarios.
[0092] The zero-feed control has high precision. This invention directly links the PI parameter optimization process with the zero-feed target, and uses the zero-point error of the grid-connected power as the core indicator of the reward function to guide the learning direction of Q-learning, which greatly improves the tracking accuracy, response speed and steady-state error control capability of the grid-connected power, and fully meets the stringent requirements of zero-feed.
[0093] Enhance system robustness; This invention can effectively resist the effects of external disturbances such as grid voltage fluctuations, photovoltaic power output jumps, energy storage charging and discharging fluctuations, and load switching, ensuring stable operation of the system under various disturbances;
[0094] Reduce operation and maintenance costs; This invention enables the self-learning and self-tuning of PI parameters, significantly reducing the need for manual periodic parameter tuning and substantially reducing operation and maintenance difficulty and costs;
[0095] It is easy to upgrade and promote; the invention can be directly embedded into the existing photovoltaic-storage inverter control system without modifying the main power circuit. Only the main control software needs to be upgraded, which is suitable for large-scale application and intelligent upgrade promotion.
[0096] Example 4: An adaptive optimization system for PI parameters of a photovoltaic-storage inverter provided in this application embodiment, the system comprising:
[0097] The status acquisition module is used to collect system status information, which includes the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets.
[0098] The motion space preset module is used to preset the motion space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts.
[0099] The reward function preset module is used to preset the reward function based on the zero-point error of the system's grid-connected power.
[0100] The Q-learning intelligent optimization module is used to select the optimal PI parameter from the action space to adjust the action based on the state information and the pre-stored Q value table, according to the decision strategy.
[0101] The PI control optimization module is used to determine the current PI parameters and implement control based on the selected optimal action, collect the grid connection point power fed back by the system and obtain reward information according to the reward function, and update the Q table in real time so that the PI parameters dynamically tend to the optimal.
[0102] The PI control execution module, the PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
[0103] It should be noted that when the adaptive optimization system for PI parameters of a photovoltaic-storage inverter in this embodiment is working, it executes the method described in any one of embodiments one to three.
[0104] Based on this embodiment, the adaptive optimization system for PI parameters of a photovoltaic-storage inverter of the present invention has the following improvements:
[0105] In one embodiment of the present invention, the system further includes a cloud collaboration module, which is used to receive Q-value table data uploaded by multiple field-end Q-learning intelligent optimization modules, perform aggregate learning to generate an optimized Q-value table, and distribute it in batches to each field end.
[0106] In one embodiment of the present invention, the system includes multiple photovoltaic-storage inverters, each inverter is configured with an independent Q-learning intelligent optimization module, and the Q-value table data are shared between the Q-learning intelligent optimization modules through a communication bus to realize multi-machine collaborative parameter optimization.
[0107] Example 5: An electronic device provided in this embodiment of the invention is used to implement the method described in any one of Examples 1 to 3. The electronic device may include: at least one central processing unit, at least one network interface, a control interface, a memory, and at least one communication bus.
[0108] The communication bus is used to enable communication and information exchange between the various components.
[0109] The network interface may include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0110] The control interface is used to output control operations according to instructions.
[0111] The central processing unit (CPU) may include one or more processing cores. The CPU connects to various parts of the terminal via various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory, and by calling data stored in memory, according to the methods described in any one of embodiments one to three.
[0112] The memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), methods for implementing any one of embodiments one to three above, etc.; the data storage area may store data involved in the various method embodiments above.
[0113] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of embodiments one to three above. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0114] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0115] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0116] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.
[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0118] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0119] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0120] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0121] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered within the scope of protection of the present invention.
Claims
1. An adaptive optimization method for PI parameters of a photovoltaic-storage inverter, characterized in that, Includes the following steps: S1: Collect system status information, including the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets; S2: Preset action space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts; S3: Preset a reward function based on the zero-point error of the system's grid-connected power; S4: The Q-learning intelligent optimization module selects the action with the optimal PI parameter adjustment from the action space according to the state information and the pre-stored Q value table, based on the decision-making strategy. S5: The PI controller determines the current PI parameters and implements control based on the selected optimal action, collects the grid connection point power fed back by the system and obtains reward information according to the reward function, and updates the Q table in real time so that the PI parameters dynamically tend to the optimal. S6: The PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
2. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 1, characterized in that, The status information in step S1 also includes at least one of the following: photovoltaic power output change rate ΔP PV Energy storage battery state of charge (SOC), load power change rate ΔP load , Grid connection point power change rate ΔP Grid .
3. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 1, characterized in that, The PI parameter adjustment scheme in the action space of step S2 includes at least one of the following forms: (a) Discrete adjustment scheme: including multiple actions such as increasing proportional gain Kp, decreasing proportional gain Kp, increasing integral gain Ki, decreasing integral gain Ki, and keeping the parameters constant, each action corresponding to a preset parameter adjustment step size; (b) Combined adjustment scheme: includes multiple preset PI parameter combinations, each parameter combination corresponds to one action.
4. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 1, characterized in that, The preset reward function in step S3 is negatively correlated with the absolute value of the grid connection point power.
5. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 4, characterized in that, The reward function is a multi-objective weighted reward function, which includes at least two of the following: absolute power deviation at grid connection point, response speed, and stability.
6. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 1, characterized in that, The formula for real-time updating the Q table in step S5 is: Q t+1 (s t ,a t )←Q t (s t ,a t )+α[r t+1 +γMaxQ t (s t+1 ,a)-Q t (s t ,a t )] Where α is the learning rate, α∈(0,1]; γ is the discount factor, γ∈(0,1]; s is the state; a is the action; r t+1 The reward value for step t+1; MaxQ t (s t+1 a) is in state s t+1 The maximum Q value corresponding to all actions.
7. The adaptive optimization method for PI parameters of a photovoltaic-storage inverter according to claim 1, characterized in that, Before executing step S6, the Q-learning algorithm is embedded in the inverter's main control chip to achieve real-time data acquisition and parameter optimization, ensuring that the inverter achieves zero power supply optimization under external disturbances.
8. An adaptive optimization system for PI parameters of a photovoltaic-storage inverter, characterized in that, The system, applied to the method of any one of claims 1 to 7, comprises: The status acquisition module is used to collect system status information, which includes the active power error e at the grid connection point, the rate of change of active power error Δe at the grid connection point, and historical PI parameter sets. The motion space preset module is used to preset the motion space, which includes multiple PI parameter adjustment schemes, each of which corresponds to a set of PI parameter adjustment amounts. The reward function preset module is used to preset the reward function based on the zero-point error of the system's grid-connected power. The Q-learning intelligent optimization module is used to select the optimal PI parameter from the action space to adjust the action based on the state information and the pre-stored Q value table, according to the decision strategy. The PI control optimization module is used to determine the current PI parameters and implement control based on the selected optimal action, collect the grid connection point power fed back by the system and obtain reward information according to the reward function, and update the Q table in real time so that the PI parameters dynamically tend to the optimal. The PI control execution module, the PI controller generates a control output u based on the error between the grid connection point power and the target value of zero and the optimal PI parameters, and controls the inverter to adjust the grid connection point power.
9. The adaptive optimization system for PI parameters of a photovoltaic-storage inverter according to claim 8, characterized in that, It also includes a cloud collaboration module, which is used to receive Q-value table data uploaded by multiple field-end Q-learning intelligent optimization modules, perform aggregate learning to generate an optimized Q-value table and distribute it in batches to each field end.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Inverter PID parameter adaptive optimization method and system based on Q learning
CN120972502A
