Grid-connected and off-network seamless switching method and device, equipment and storage medium
By acquiring and analyzing the grid status and load prediction data of the photovoltaic power grid, generating grid-connected control instructions and dividing the microgrid, the problem of the photovoltaic power grid being unable to seamlessly transition under complex grid fluctuations is solved, and the stable switching between the photovoltaic power grid and the island mode is achieved.
Patent Information
- Application Number
- CN202510240659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-03
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot achieve a seamless transition between the grid-connected and island modes of photovoltaic power grids under complex power grid fluctuations, resulting in grid instability and damage to photovoltaic power generation systems.
By obtaining the grid status data and load prediction data of the photovoltaic power grid, a grid-connected control command is generated, the photovoltaic power grid is divided into several microgrids, and a pre-switching command is generated through distributed model prediction control to control the switching of the photovoltaic inverter to the grid-connected or island mode.
The seamless switching between the photovoltaic power grid and the island mode is achieved, which avoids the system instability and grid impact that may be caused during the switching process in the traditional method, and ensures the efficient and stable operation of the power grid.
Smart Images

Figure CN119726721A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of photovoltaic power grids, and in particular to a method, device, equipment and storage medium for seamless switching between on-grid and off-grid. Background Art
[0002] With the accelerated development of global energy transformation, photovoltaic power generation, as an important part of renewable energy, has gradually played a vital role in the power system. Especially in the construction of smart grids and microgrids, the access and grid-connected operation of photovoltaic power grids has become a research topic of increasing concern. At the same time, how to ensure the efficiency, stability and reliability of photovoltaic power grids when they are connected to the main grid has also become an important challenge to maximize the benefits of photovoltaic systems.
[0003] The traditional on-grid and off-grid switching between photovoltaic power grids and the main power grid usually relies on simple timing control or preset trigger conditions. When the grid load fluctuates abnormally or other emergencies occur, the photovoltaic power grid needs to quickly switch to island mode to ensure the stability of power supply. However, existing technologies are often unable to achieve a "seamless" transition between grid-connected and island modes for photovoltaic power grids under various complex grid fluctuation conditions. Especially when the grid is abnormal, the switching between photovoltaic power grids and energy storage systems is often accompanied by power fluctuations and frequency fluctuations, which may cause grid instability and even damage the photovoltaic power generation system. Summary of the invention
[0004] The present application provides a method, device, equipment and storage medium for seamless on-grid and off-grid switching, which are used to solve the problem of unstable on-grid and off-grid switching between a photovoltaic power grid and a main power grid in the related art.
[0005] A first aspect of the present application provides a method for seamless switching between grid and off-grid, the method comprising: Obtain grid status data and load forecast data of the photovoltaic power grid; Generate a grid connection control instruction according to the grid state data and the load forecast data; Dividing the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generating pre-switching instructions corresponding to the microgrids through distributed model predictive control; Controlling the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to the pre-switching instruction; If a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic grid is switched to an island mode.
[0006] Optionally, in a first implementation of the first aspect of the present application, the step of generating a grid connection control instruction according to the grid state data and the load forecast data includes: Inputting the grid state data and the load forecast data into a deep learning model to generate grid load change trend information within a preset time period; Determining an output parameter control strategy of the photovoltaic inverter according to the change trend information; Acquiring real-time feedback data of the photovoltaic power grid; The output parameter control strategy is adjusted according to the real-time feedback data to generate an optimal control strategy and a grid-connected control instruction corresponding to the optimal control strategy.
[0007] Optionally, in a second implementation of the first aspect of the present application, the step of controlling the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to the pre-switching instruction includes: Controlling a high-precision phase detection device to collect first electrical characteristic information of each of the microgrids and second electrical characteristic information of the main grid according to the pre-switching instruction; Based on the error between the first electrical characteristic information and the second electrical characteristic information, dynamically adjusting the output parameter of the photovoltaic inverter through a nonlinear control algorithm; The output phase of the photovoltaic power grid is controlled to be synchronized with the main power grid according to the output parameter until the photovoltaic power grid is switched to a grid-connected mode.
[0008] Optionally, in a third implementation of the first aspect of the present application, the step of dividing the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generating a pre-switching instruction corresponding to the microgrid through distributed model predictive control includes: Determining grid status information of the photovoltaic grid by analyzing grid status data of the photovoltaic grid; According to the grid state information and the grid-connected control instruction, the photovoltaic grid is divided to obtain a plurality of independent microgrid units; Analyzing the power flow of each microgrid unit to determine the status data of each microgrid; Based on the microgrid state data, optimizing the power dispatch of each microgrid through distributed model predictive control; According to the power dispatch optimization result, the control strategy of each microgrid is adjusted to generate a pre-switching operation instruction.
[0009] Optionally, in a fourth implementation of the first aspect of the present application, if a grid abnormality risk is detected by a grid abnormality prediction model in the grid-connected mode, the step of switching the photovoltaic grid to an island mode includes: Detecting the power grid abnormality risk existing in the power grid state data according to the power grid abnormality prediction model; generating a pre-adjustment instruction for the photovoltaic inverter according to the abnormal risk of the power grid; Generate a power support instruction based on the load demand of the island mode and the power of the energy storage system corresponding to the photovoltaic power grid; controlling output parameters of the energy storage system according to the power support instruction; Controlling the output parameters of the photovoltaic inverter to conform to island mode parameters according to the pre-regulation instruction; The output parameters of the energy storage system and the output parameters of the photovoltaic inverter are adjusted in real time according to the grid status data until the photovoltaic grid is switched to an island mode.
[0010] Optionally, in a fifth implementation of the first aspect of the present application, the method further includes: Determine a load prediction model after quantum state encoding by performing quantum computing processing on the power grid state data and load history data; Predicting the load within a preset time period according to the load prediction model to obtain the load prediction data; Based on the load forecast data, determining a power allocation scheme for the photovoltaic inverter and the energy storage system through a quantum optimization algorithm; The output power of the energy storage system and the output power of the photovoltaic inverter are adjusted according to the power allocation scheme.
[0011] Optionally, in a sixth implementation of the first aspect of the present application, the method further includes: Obtaining the remaining power of the energy storage system; Based on the remaining power and the load forecast data, the charging and discharging of the energy storage system is optimized by a quantum variational algorithm to generate an optimal energy storage power allocation plan for the energy storage system; According to the optimal energy storage power distribution plan and the preset grid-connected and off-grid switching threshold, the grid-connected and off-grid mode switching time of the photovoltaic power grid is determined.
[0012] A second aspect of the present application provides a grid-connected and off-grid seamless switching device, the grid-connected and off-grid seamless switching device comprising: An acquisition module, used to acquire grid status data and load forecast data of the photovoltaic grid; A first generating module, configured to generate a grid connection control instruction according to the grid state data and the load forecast data; A second generating module is used to divide the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generate pre-switching instructions corresponding to the microgrids through distributed model predictive control; A first control module, configured to control the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to the pre-switching instruction; The second control module is used to switch the photovoltaic power grid to an island mode if a power grid abnormality risk is detected by a power grid abnormality prediction model in the grid-connected mode.
[0013] A third aspect of an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute a computer program stored in the memory, and when the processor executes the computer program, it implements each step of the method for seamless switching between on-grid and off-grid provided in the first aspect of the embodiment of the present application.
[0014] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step of the method for seamless switching between the grid and off-grid provided in the first aspect of the embodiments of the present application is implemented.
[0015] In summary, according to the method, device, equipment and storage medium for seamless on-grid and off-grid switching provided by the present application, the grid status data and load forecast data of the photovoltaic power grid are obtained; a grid-connected control instruction is generated according to the grid status data and the load forecast data; the photovoltaic power grid is divided into several microgrids according to the grid-connected control instruction, and a pre-switching instruction corresponding to the microgrid is generated through distributed model predictive control; the photovoltaic inverter is controlled according to the pre-switching instruction to switch the photovoltaic power grid to the grid-connected mode; if a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic power grid is switched to the island mode. Through the implementation of the present application, the photovoltaic power grid is divided into several microgrids, and the state of each microgrid is independently managed by a distributed control system, which can effectively avoid system instability and grid shock that may be caused during the switching process in the traditional method. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic diagram of a flow chart of a method for seamless on-grid and off-grid switching provided in an embodiment of the present application; Figure 2 A schematic diagram of a program module of a device for seamlessly switching between grid and off-grid provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0018] In order to solve the problem of unstable on-grid and off-grid switching between photovoltaic power grid and main power grid in related technologies, the embodiment of the present application provides a method for seamless on-grid and off-grid switching, such as Figure 1 The flowchart of the on-grid and off-grid seamless switching method provided in this embodiment includes the following steps: Step 110: Acquire grid status data and load forecast data of the photovoltaic grid.
[0019] Specifically, in this embodiment, the grid state data includes but is not limited to voltage, current, frequency, power factor, load information, equipment status, etc., and power sensors, frequency meters, power factor meters, load monitoring equipment, etc. are installed at various key nodes of the grid (such as substations, distribution networks, and power users). These devices will regularly collect data such as voltage, current, and frequency of the grid and transmit them to the central control system. The load forecasting data is obtained by modeling the load fluctuation trend of the photovoltaic power grid through a quantum support vector machine (QSVM), obtaining a load forecasting model after quantum state encoding, and performing efficient load forecasting on the grid load based on the load forecasting model. The load forecasting data represents the load demand of the photovoltaic power grid in the future.
[0020] Step 120: Generate a grid connection control instruction according to the grid status data and the load forecast data.
[0021] Specifically, the grid-connected control instruction determines how to adjust the power generation and load output of the photovoltaic power grid based on the current grid state and future load demand. In this embodiment, a large amount of historical data and grid state data are used to build a deep learning model (such as LSTM or convolutional neural network). The deep learning model is based on the existing grid state and load forecast data to identify the changing trend of the grid load and photovoltaic power generation output, predict the fluctuations that may occur in the short term in the future, and generate optimized control instructions. According to the prediction information provided by the deep learning model, the adaptive control algorithm adjusts the balance between the output power of the inverter and the grid load to ensure stable response when the grid load fluctuates. At the same time, the system continuously receives real-time feedback data (such as frequency, voltage, current, etc.) of the photovoltaic power grid, and adjusts the working state of the inverter in time according to the feedback results, further optimizes the matching degree between the grid and photovoltaic power generation, and finally generates a grid-connected control instruction that adapts to the current grid load and photovoltaic power generation state through the joint optimization of the deep learning model and the adaptive control algorithm, ensuring the stable grid connection of the photovoltaic power grid and avoiding frequency and voltage fluctuations.
[0022] In an optional implementation of the present embodiment, the step of generating a grid-connected control instruction based on grid status data and load forecast data includes: inputting the grid status data and load forecast data into a deep learning model to generate grid load change trend information within a preset time period; determining an output parameter control strategy of the photovoltaic inverter based on the change trend information; obtaining real-time feedback data of the photovoltaic power grid; adjusting the output parameter control strategy based on the real-time feedback data to generate an optimal control strategy and a grid-connected control instruction corresponding to the optimal control strategy.
[0023] Specifically, by inputting the grid state data and load forecast data into the deep learning model, the model can learn the time series characteristics of the grid load and its impact on the photovoltaic power generation system, and then predict the change trend of the grid load in the future. Deep learning models, especially neural networks such as long short-term memory networks (LSTM) or convolutional neural networks (CNN) that can process time series data, can capture the law of load changes by analyzing a large amount of historical data and predict the possible fluctuations of load in the future. The formulation of the control strategy is mainly carried out by predicting the balance between load demand and photovoltaic power generation capacity. If the forecast shows that the load demand will increase, the control strategy will instruct the inverter to increase the power output to meet the needs of the grid; otherwise, the power output will be reduced. Real-time feedback data includes but is not limited to the power generation of the photovoltaic grid, the output power of the inverter, the frequency of the grid, load fluctuations, etc. By monitoring these data, the system can judge the difference between the actual operation and the predicted results, and then adjust the control strategy in time. If in actual operation, the grid load fluctuates inconsistently with the prediction, such as the rapid increase of load and the failure of photovoltaic power generation to keep up in time, the system needs to adjust the control strategy to increase the power output of the inverter. By analyzing the feedback data, the system can determine the gap between the current photovoltaic output and the load demand, thereby optimizing the control strategy. For example, if the actual change in load demand during a certain period is more drastic than the predicted change, the control system will adjust the inverter output strategy according to this new load trend to ensure the stable operation of the power grid. Finally, based on the optimal control strategy, the system will generate the corresponding grid-connected control instructions, which will be sent to the photovoltaic inverter in real time to ensure that the inverter's output power matches the grid load and avoid excess or insufficient power, thereby maintaining efficient and stable operation of the system.
[0024] Step 130: divide the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generate pre-switching instructions corresponding to the microgrids through distributed model predictive control.
[0025] Specifically, in this embodiment, the photovoltaic power grid is divided into multiple microgrid units according to the grid load forecast data and the real-time grid status, and each unit is managed independently. For example, according to the load distribution and the photovoltaic system access point, the grid is divided into several areas, and each area becomes a microgrid. Each microgrid is equipped with an independent intelligent control unit, and the distributed model predictive control (EDMPC) technology is used to optimize the power flow, energy storage system status and load conditions within each microgrid, and generate pre-switching instructions for each microgrid. The pre-switching instructions include the specific pre-switching operation plan of each microgrid, and provide specific control parameters for subsequent grid-connected synchronization.
[0026] In an optional implementation of the present embodiment, the photovoltaic power grid is divided into several microgrids according to the grid-connected control instruction, and the steps of generating pre-switching instructions corresponding to the microgrids through distributed model predictive control include: determining the grid status information of the photovoltaic power grid by analyzing the grid status data of the photovoltaic power grid; dividing the photovoltaic power grid according to the grid status information and the grid-connected control instruction to obtain several independent microgrid units; analyzing the power flow of each microgrid unit to determine the status data of each microgrid; optimizing the power dispatch of each microgrid through distributed model predictive control based on the microgrid status data; adjusting the control strategy of each microgrid according to the power dispatch optimization result to generate a pre-switching operation instruction.
[0027] Specifically, in this embodiment, the grid state data of the photovoltaic power grid is comprehensively analyzed to obtain multiple parameters including voltage, frequency, load and energy storage system status, so as to grasp the overall operation state of the photovoltaic power grid, and the photovoltaic power grid is divided into several independent microgrid units according to the obtained grid state information and grid-connected control instructions. Each microgrid is independent of each other during operation, but can work together according to the global control instructions to adapt to grid load changes and power supply fluctuations. In the divided microgrid units, the power flow of each microgrid is modeled and analyzed in detail, and the voltage, current and power distribution (i.e., microgrid state data) inside it are obtained to determine the load conditions and power demand of each part of the microgrid. Distributed model predictive control technology (Distributed Model Predictive Control (DMPC) is a model-based control method that uses the models of each subsystem for optimization control and can handle coordination and constraint problems between multiple subsystems) is used to optimize the power dispatch of each microgrid. By considering the load demand, energy storage system status and power flow characteristics of each microgrid, the predictive control method is used to perform real-time scheduling of each microgrid to ensure the stable operation of each microgrid and maximize the use of grid resources. After the optimization scheduling is completed, the control strategy of each microgrid is adjusted based on the scheduling results to ensure that the microgrid can cope with load fluctuations in actual operation and coordinate with other microgrids and the main grid. Finally, the distributed model predictive control integrates multiple microgrids of the photovoltaic power grid, generates pre-switching instructions according to the actual load demand and grid status of each microgrid, and generates pre-switching operation instructions by analyzing the power flow, energy storage status and load changes. The microgrid can quickly respond to grid load fluctuations through the control of pre-switching instructions, ensure the stability of the microgrid when it is independently operated, and ensure that the photovoltaic power grid is synchronized with the main grid when it needs to be connected to the grid, avoiding voltage and frequency fluctuations or system instability caused by switching.
[0028] It should be noted that the power distribution of each microgrid is optimized through distributed model predictive control technology to ensure that the power demand is met and energy waste is avoided. Its objective function is: , The constraints are: Power balance constraints: , Energy storage system constraints: , Energy storage power constraints: , Photovoltaic power generation constraints: , in, is the load demand power of the kth microgrid; is the photovoltaic power generation power of the kth microgrid; is the energy storage system power of the kth microgrid; is the power of the kth microgrid transferred to or from the neighboring microgrid; is the remaining power of the energy storage system of the kth microgrid; is the target energy storage capacity of the kth microgrid; is the power change of the kth microgrid; is the maximum charging and discharging power of the energy storage system; is the maximum output power of the photovoltaic power generation system; A, B, and C are weight coefficients, which are set based on the experience and domain knowledge of power grid managers.
[0029] First item This ensures that the error between the load demand of each microgrid and the photovoltaic power generation is as small as possible, ensuring a high degree of matching between photovoltaic power generation and load. The power management of the energy storage system is optimized, requiring the remaining power of the energy storage system to be as close to the target value as possible to avoid overcharging or discharging of the energy storage system and ensure that the energy storage system can effectively provide energy support when needed. It is used to balance power fluctuations and ensure that the system avoids large power fluctuations during the scheduling process. If the final function J obtained after optimization is too large, it means that the system scheduling strategy needs to be adjusted. If the load is too large, it indicates that the matching between the load and the photovoltaic power generation is not good, and the power distribution needs to be optimized. If it is too large, it indicates that the charging and discharging scheduling of the energy storage system is unreasonable and the energy storage strategy needs to be optimized. If it is too large, it indicates that the power fluctuation is severe, which may affect the operation stability of the microgrid.
[0030] The optimization algorithm minimizes the overall objective function to optimize the power distribution of the microgrid, the power of the energy storage system, and the matching between photovoltaic power generation and load, thereby ensuring the stable operation of the microgrid and supporting seamless switching between the photovoltaic power grid and the main power grid.
[0031] Step 140: Control the photovoltaic inverter to switch the photovoltaic power grid to the grid-connected mode according to the pre-switching instruction.
[0032] Specifically, in this embodiment, the control system adjusts the power output of the photovoltaic inverter through the pre-switching instruction to ensure that the power generation capacity of the photovoltaic power grid can meet the grid connection requirements. After the inverter power is adjusted to an appropriate level, the control system connects the photovoltaic power grid to the main power grid and ensures the synchronization of the photovoltaic power grid and the main power grid.
[0033] In an optional implementation of the present embodiment, the step of controlling the photovoltaic inverter to switch the photovoltaic power grid to the grid-connected mode according to the pre-switching instruction includes: controlling the high-precision phase detection device to collect the first electrical characteristic information of each microgrid and the second electrical characteristic information of the main power grid according to the pre-switching instruction; dynamically adjusting the output parameters of the photovoltaic inverter through a nonlinear control algorithm based on the error between the first electrical characteristic information and the second electrical characteristic information; and controlling the output phase of the photovoltaic power grid to be synchronized with the main power grid according to the output parameters until the photovoltaic power grid is switched to the grid-connected mode.
[0034] Specifically, during the grid-connected switching process, it is necessary to collect electrical characteristic information of the microgrid and the main grid, including parameters such as voltage, frequency, and phase. This information will be used as the input of the nonlinear control algorithm to achieve synchronization with the main grid by dynamically adjusting the output parameters of the photovoltaic inverter. In this embodiment, the high-precision phase detection device is controlled according to the pre-switching instruction to collect the first electrical characteristic information of each microgrid and the second electrical characteristic information of the main grid, including but not limited to physical quantities such as voltage amplitude, frequency, and phase, especially phase information, which is crucial for grid-connected synchronization. The phase difference is a key factor affecting the grid-connected stability of the photovoltaic inverter. When the phase of the photovoltaic grid differs greatly from that of the main grid, it will cause power fluctuations, inverter overload, and even grid instability. Therefore, the collected electrical characteristic information (i.e., the voltage, frequency, and phase information of the microgrid and the main grid) will be used to calculate the error, and the error value will be used as the input of the nonlinear control algorithm to dynamically adjust the output parameters of the photovoltaic inverter. Based on the phase error between the collected first electrical characteristic information and the second electrical characteristic information, it is adjusted by the nonlinear control algorithm. This process can be achieved through a typical control system model, such as a state feedback controller, a PID controller, or a feedback controller based on nonlinear control theory. In this control algorithm, the phase error, as an input parameter, interacts with the output phase of the inverter and dynamically adjusts the output of the inverter so that the phase of the photovoltaic grid gradually approaches the phase of the main grid, thereby achieving seamless switching. The calculation formula of the nonlinear control algorithm can be expressed as: , in, represents the required phase adjustment amount, , , is the tuning parameter in the control algorithm, is the phase of the mains grid, is the current phase of the photovoltaic grid, is the current frequency of the photovoltaic grid, is the frequency of the mains grid, is the base of the natural logarithm, which is used to construct a nonlinear function to ensure a smooth transition of the phase error. It can be understood that the phase error is It is expressed as, reflecting the phase difference between the main grid and the photovoltaic grid, through the dynamic function of error adjustment , the nonlinear control algorithm gradually corrects the phase of the photovoltaic power grid according to the phase difference to reduce the error. In the frequency error adjustment part, by To adjust the inverter output frequency to ensure the frequency synchronization of the power grid. , , As a control gain parameter, it determines the speed and sensitivity of the system response. The value can speed up the phase difference adjustment process, while larger and The adjustment range and frequency response capability can be increased. During the adjustment process, the output parameters of the inverter (such as voltage and power) will also change accordingly, ultimately making the electrical characteristics of the photovoltaic power grid closer to the main power grid and achieving phase synchronization. Through precise adjustment, the power grid can transition smoothly and stably during the grid connection process, avoiding grid shock or equipment damage.
[0035] Through continuous dynamic adjustment, the system will gradually reduce the phase error and eventually synchronize the PV grid with the main grid. When the phase is fully aligned, the PV grid can seamlessly switch to the grid-connected mode and operate stably. In this process, the nonlinear control algorithm can not only handle the phase error, but also tolerate certain fluctuations in the grid, such as frequency changes, load fluctuations, etc., to ensure that the system can operate stably in complex environments. For example, during a certain grid-connected process, the phase of the PV grid was 30° different from that of the main grid. At this time, the nonlinear control algorithm will adjust the output phase of the inverter according to the phase error and gradually reduce the error. If there is also a certain deviation in the grid frequency (for example, the main grid frequency is 50.05Hz and the PV grid frequency is 49.95Hz), the algorithm will also adjust the output frequency of the inverter according to the frequency error to ensure that the electrical characteristics of the PV grid and the main grid are completely consistent when they are finally connected to the grid.
[0036] Step 150: If a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic grid is switched to the island mode.
[0037] Specifically, the grid status is detected in real time by sensors, and analyzed in combination with the grid abnormality prediction model to identify whether the grid fluctuation exceeds the safety range. If the grid abnormality risk (such as voltage instability and frequency imbalance) is predicted, an early warning of switching to island mode is triggered. In the case of grid abnormality, the control command controls the photovoltaic inverter to switch the photovoltaic grid to island mode to ensure the stability of the grid.
[0038] In an optional implementation of the present embodiment, if a grid abnormality risk is detected by a grid abnormality prediction model in a grid-connected mode, the step of switching the photovoltaic power grid to an island mode includes: detecting a grid abnormality risk in grid status data according to a grid abnormality prediction model; generating a pre-adjustment instruction for a photovoltaic inverter according to the grid abnormality risk; generating a power support instruction based on the load demand of the island mode and the power of the energy storage system corresponding to the photovoltaic power grid; controlling the output parameters of the energy storage system according to the power support instruction; controlling the output parameters of the photovoltaic inverter to conform to the island mode parameters according to the pre-adjustment instruction; and adjusting the output parameters of the energy storage system and the output parameters of the photovoltaic inverter in real time according to the grid status data until the photovoltaic power grid is switched to the island mode.
[0039] Specifically, by analyzing the grid status data, potential grid abnormality risks are detected. There are abnormal signals in the grid status data, such as voltage drop, excessive frequency fluctuation or abnormal power factor. The prediction model will analyze these data and identify potential problems that are about to occur in the grid. After the grid abnormality risk is detected, the system will generate a pre-adjustment instruction for the photovoltaic inverter according to the risk type. The core goal of the pre-adjustment instruction is to enable the photovoltaic power grid to smoothly transition from grid-connected mode to island mode through the adjustment of the photovoltaic inverter. These instructions involve the adjustment of the inverter output power, output voltage and frequency to ensure that when an abnormality occurs in the grid, the photovoltaic power grid can operate stably without affecting the overall stability of the grid. Through this pre-adjustment instruction, the system will make detailed adjustments to the inverter output in advance to prepare for the upcoming island mode.
[0040] At the same time, according to the load demand in the island mode and the power of the energy storage system corresponding to the photovoltaic power grid, the system will generate a series of power support instructions. The role of the energy storage system in the island mode is to provide stable power output to meet the load demand and the short-term fluctuations of the photovoltaic power generation system. When the power grid is abnormal, the energy storage system will provide power support for the photovoltaic power grid to supplement the power due to the instability or instantaneous shortage of photovoltaic power generation. In this process, the power support instructions will be optimized according to the real-time load demand and energy storage power. The output parameter control instructions of the energy storage system will adjust the output power of the energy storage system according to these support instructions to ensure that the energy storage system can provide sufficient support power in the island mode to avoid the impact of grid fluctuations on the load. In terms of the output of the photovoltaic power grid, the pre-regulation instruction will instruct the photovoltaic inverter to adjust its output to meet the needs of the island mode. The island mode usually requires the photovoltaic power grid to have a high self-sufficiency, so the output of the photovoltaic inverter will be dynamically adjusted according to the island load demand to avoid outputting too much or too little power and ensure the stability and efficient operation of the system. At the same time, as the state of the grid changes in real time, the system also needs to continuously adjust the output of the energy storage system and photovoltaic inverter according to the grid state data. This process is usually achieved through a real-time feedback mechanism. The feedback data comes from the operating status of the grid and the energy storage system, including changes in voltage, frequency, and energy storage capacity. Through the mutual coordination of this series of control instructions, the system can achieve a smooth transition of the photovoltaic grid from grid-connected mode to island mode. In practical applications, predictive off-grid detection and deep optimization strategies of energy storage systems can effectively prevent shocks during grid anomalies and avoid power supply interruptions caused by grid failures. Among them, the power support and adjustment formulas in the control process can be expressed as: , in, represents the total power output required, is the load demand power in island mode, is the current power generation of the photovoltaic grid, The power output of the energy storage system. Through this formula, the system can monitor the load demand and the output of the photovoltaic power grid in real time and calculate the power support required by the energy storage system. In the case of grid abnormalities, when photovoltaic power generation is insufficient, the energy storage system will provide additional power to ensure that the load demand is met, while avoiding over-discharge and protecting the long-term service life of the energy storage system.
[0041] In addition, the output power control formula of the energy storage system can be expressed as: , in, It is the regulation coefficient of the energy storage system, which indicates the response speed and power regulation capability of the energy storage system. This formula describes how the energy storage system adjusts the power output of the energy storage system according to the difference between the actual output of photovoltaic power generation and the load demand. According to this formula, the energy storage system will supplement the power that the photovoltaic power grid cannot provide according to the real-time demand of the load to ensure the stable operation of the power grid.
[0042] Ultimately, through the coordination of the above control strategies and algorithms, the photovoltaic power grid can quickly adjust the output parameters of the inverter and energy storage system according to the abnormal conditions of the power grid, and achieve smooth switching from grid-connected to island mode.
[0043] It should be noted that the construction of the power grid anomaly prediction model is based on deep learning and pattern recognition of historical power grid data in order to predict the abnormal risks of the power grid in advance. Its goal is to be able to monitor the power grid status in real time during the operation of the power grid, including fluctuations in parameters such as voltage, frequency, and power, to detect abnormal signals in a timely manner, provide early warning information, and thus initiate corresponding control strategies. The algorithm formula of the power grid anomaly prediction model can be expressed as: , in, It indicates the abnormal risk value of the power grid at time t. The higher the value, the greater the risk of power grid abnormality. Represents the number of input features, usually including voltage, current, power, frequency, etc. It is represented as the voltage value of the i-th feature, reflecting the voltage change of the power grid. It is represented as the frequency value of the i-th feature, reflecting the frequency fluctuation of the power grid. It is represented as the power value of the i-th feature, representing the power output of the power grid, is the maximum power output of the grid, is the weight coefficient of the i-th feature, which is obtained through deep learning training and reflects the importance of each feature. is a nonlinear activation function that maps frequency data into a probability range (between 0 and 1), indicating the impact of frequency fluctuations on power grid risk. is a constant that controls the impact of time dependence in abnormal risk. It is a time-varying function that represents the long-term trend or periodic fluctuation of the power grid. Each electrical feature (such as voltage, current, frequency, and power) has a weight coefficient that reflects the importance of the feature in the stability of the power grid. These weight coefficients are obtained through deep learning algorithm training to ensure that the model has high accuracy and predictive ability. The nonlinear activation function can effectively map the relationship between frequency fluctuations and power grid risks. For example, when the frequency fluctuation exceeds the set safety range, The output of will be close to 1, indicating that the frequency fluctuation has a greater impact on the grid risk, thereby increasing the abnormal risk value of the grid. The long-term trend of the power grid is modeled to better reflect the potential impact of changes in grid load. If the grid load increases over a long period of time or there are seasonal fluctuations, By adjusting the predicted value, it is possible to identify in advance whether the power grid is at risk of overload.
[0044] It should also be noted that the role of the energy storage system is to balance short-term fluctuations in electricity supply and demand. When the photovoltaic power grid generates excess electricity, the energy storage system can store the excess electricity, and when the photovoltaic power generation is insufficient, the energy storage system releases the stored electricity to support the main grid load. Minimizing the difference between output power and load can improve the efficiency of the energy storage system, reduce unnecessary energy loss, and avoid overcharging or discharging of the energy storage system, extending its service life.
[0045] In an optional implementation of this embodiment, the load prediction model after quantum state encoding is determined by performing quantum computing processing on the grid state data and the load history data; the load within a preset time period is predicted according to the load prediction model to obtain load prediction data; based on the load prediction data, the power allocation scheme of the photovoltaic inverter and the energy storage system is determined by a quantum optimization algorithm; and the output power of the energy storage system and the output power of the photovoltaic inverter are adjusted according to the power allocation scheme.
[0046] Specifically, in this embodiment, the grid state data and load history data are processed by quantum computing, and more feature information can be extracted from the high-dimensional data space. The parallel computing characteristics of quantum computing make it more advantageous than traditional computing methods in large-scale data processing, and can accelerate the model training process. In quantum computing, data is represented by quantum bits (qubits), and through the characteristics of quantum superposition and entanglement, multiple calculations can be performed simultaneously during the processing process, thereby improving the speed and accuracy of the calculation. After the load history data is encoded into a quantum state, it is trained by a quantum algorithm (such as a quantum support vector machine or a quantum neural network) to obtain a load forecasting model. After training, the model can predict the load change trend within a preset time. For example, the quantum algorithm is used to extract the laws of periodic fluctuations, sudden fluctuations, etc. from the historical load data, and combined with the real-time grid state data, the future load demand is accurately predicted. After obtaining the load forecast data, the power distribution of the photovoltaic inverter and the energy storage system is optimized using a quantum optimization algorithm. The power regulation of the photovoltaic inverter and the energy storage system is closely related, and the two will be dynamically adjusted according to the grid load demand and power supply in different working modes. Through quantum optimization algorithms, the optimal solution for power distribution can be achieved while ensuring the stable operation of the photovoltaic system and energy storage system.
[0047] It should be noted that the calculation formula of the quantum optimization algorithm is as follows: , in, is the output power of the photovoltaic inverter at time t, is the output power of the energy storage system at time t, , They are the weight coefficients of the photovoltaic inverter and the energy storage system, which are used to balance the impact of the two on power distribution. For example, the load demand of the photovoltaic power grid usually changes with time. For example, during the day, photovoltaic power generation is sufficient and the load is low; when photovoltaic power generation cannot be generated at night, the load demand usually relies on the energy storage system to provide power support. In this case, the weight coefficient of the energy storage system may be higher at night, while the weight coefficient of the photovoltaic inverter is higher during the day. is the preset duration, which indicates the time period that needs to be predicted. Through the formula, the goal of the quantum optimization algorithm is to minimize the difference between the output power of the photovoltaic inverter and the energy storage system and the grid load. Through quantum computing and quantum optimization algorithms, the photovoltaic inverter and the energy storage system can adjust their power output according to the real-time changes in the grid load, thereby improving the efficiency of power utilization while ensuring the stability of the grid.
[0048] It should also be noted that the load forecasting algorithm formula can be expressed as: , in, It represents the load demand value predicted at time t, which is the final prediction result; Represents the actual load data of the past k time steps (e.g. hours). This historical data sequence is used to consider the time correlation of the load; is the weighting coefficient, which indicates the influence of different time steps on the prediction results. The weight determines the importance of load data in different time periods. It represents the influence coefficient of load data on model prediction, reflecting the autoregressive influence of historical load data at a certain time point; is the attenuation coefficient, which controls the influence of external environment changes on load forecasting. If the external environment has a greater impact, the attenuation coefficient increases, otherwise it decreases; Represents the impact of environmental factors (such as temperature, humidity, climate change, etc.) on load. This variable helps model the relationship between load and climate conditions; represents the prediction function based on the grid state information, which depends on the grid temperature T(t), voltage V(t) and other possible state factors at time t. is the adjustment coefficient; is the weight coefficient of the grid state information, which is used to balance the impact of grid temperature, pressure and voltage on load forecasting. This formula combines the time series characteristics of load data, grid state information and the impact of environmental factors on load forecasting. Through quantum computing processing, relevant features can be efficiently extracted from a large amount of data to optimize the load forecasting process. The implementation of the formula ensures the accuracy of load forecasting through polynomial regression and quantum computing optimization, providing a reliable basis for the dynamic adjustment of photovoltaic power grids and energy storage systems.
[0049] It should also be noted that the actual setting of the weight coefficient depends on the actual situation, the quality of the data and the prediction target, including but not limited to the empirical method: based on the experience and domain knowledge of the power grid management personnel, preliminary weight coefficients can be set for different power grid status information.
[0050] In an optional implementation of this embodiment, the remaining power of the energy storage system is obtained; based on the remaining power and load forecast data, the charging and discharging of the energy storage system is optimized by a quantum variational algorithm to generate an optimal energy storage power distribution plan for the energy storage system; according to the optimal energy storage power distribution plan and a preset grid-connected and off-grid switching threshold, the on-grid and off-grid mode switching time of the photovoltaic power grid is determined.
[0051] Specifically, in this embodiment, when switching the photovoltaic power grid to the off-grid mode, it is first necessary to obtain the remaining power of the energy storage system. By real-time monitoring the battery power of the energy storage system, it can be ensured that when the load of the power grid changes or the power supply is insufficient, appropriate charging and discharging measures can be taken in time to ensure the stable operation of the system. Once the remaining power of the energy storage system is obtained, the charging and discharging of the energy storage system is optimized based on the power information and load forecast data. Specifically, the load forecast data provides the trend of future load demand, and the remaining power of the energy storage system is the basis for optimization. In the quantum variational algorithm, the goal is to accurately calculate the optimal charging and discharging strategy of the energy storage system, thereby minimizing the risk of insufficient or excessive power that may occur in the system during load fluctuations, and ensuring the stability of the power grid and the reasonable allocation of energy. After obtaining the optimal energy storage power distribution plan for the energy storage system, the on-grid and off-grid mode switching time of the photovoltaic power grid is determined according to the preset on-grid switching threshold. When the energy storage power reaches a certain critical value and the load demand exceeds the system power supply capacity, the system will start the off-grid mode to ensure that the photovoltaic power grid can continue to operate stably in the island mode. On the contrary, when the grid is stable and the energy storage system can support the load demand, the system will decide to switch back to the grid-connected mode based on the load forecast data and the energy storage status. In this way, the collaborative work of the energy storage system and the photovoltaic grid can achieve seamless switching, ensuring that the grid can stably and reliably supply electricity in various operating modes.
[0052] According to a method for seamless on-grid and off-grid switching provided by the present application, the grid status data and load forecast data of the photovoltaic power grid are obtained; a grid control instruction is generated according to the grid status data and the load forecast data; the photovoltaic power grid is divided into several microgrids according to the grid control instruction, and a pre-switching instruction corresponding to the microgrid is generated through distributed model predictive control; the photovoltaic inverter is controlled according to the pre-switching instruction to switch the photovoltaic power grid to the grid-connected mode; if a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic power grid is switched to the island mode. Through the implementation of the present application, the photovoltaic power grid is divided into several microgrids, and the state of each microgrid is independently managed by a distributed control system, which can effectively avoid system instability and grid shock that may be caused during the switching process in the traditional method.
[0053] Figure 2 The embodiment of the present application provides a device for seamlessly switching between grid and off-grid, which can be used to implement the method for seamlessly switching between grid and off-grid in the above-mentioned embodiment. Figure 2 As shown, the on-grid and off-grid seamless switching device mainly includes: An acquisition module 10 is used to acquire grid status data and load forecast data of the photovoltaic grid; A first generating module 20, for generating a grid connection control instruction according to the grid state data and the load forecast data; The second generation module 30 is used to divide the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generate pre-switching instructions corresponding to the microgrids through distributed model predictive control; A first control module 40, configured to control the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to a pre-switching instruction; The second control module 50 is used to switch the photovoltaic power grid to the island mode if a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode.
[0054] In an optional implementation of the present embodiment, the first generation module is specifically used to: input grid status data and load forecast data into a deep learning model to generate grid load change trend information within a preset time period; determine the output parameter control strategy of the photovoltaic inverter based on the change trend information; obtain real-time feedback data of the photovoltaic power grid; adjust the output parameter control strategy based on the real-time feedback data, and generate an optimal control strategy and a grid-connected control instruction corresponding to the optimal control strategy.
[0055] In an optional implementation of the present embodiment, the second generation module is specifically used to: determine the grid status information of the photovoltaic power grid by analyzing the grid status data of the photovoltaic power grid; divide the photovoltaic power grid according to the grid status information and the grid-connected control instructions to obtain a number of independent microgrid units; analyze the power flow of each microgrid unit to determine the status data of each microgrid; based on the microgrid status data, optimize the power dispatch of each microgrid through distributed model predictive control; according to the power dispatch optimization results, adjust the control strategy of each microgrid to generate a pre-switching operation instruction.
[0056] In an optional implementation of the present embodiment, the first control module is specifically used to: control the high-precision phase detection device to collect the first electrical characteristic information of each microgrid and the second electrical characteristic information of the main grid according to the pre-switching instruction; dynamically adjust the output parameters of the photovoltaic inverter through a nonlinear control algorithm based on the error between the first electrical characteristic information and the second electrical characteristic information; control the output phase of the photovoltaic power grid to be synchronized with the main grid according to the output parameters until the photovoltaic power grid switches to the grid-connected mode.
[0057] In an optional implementation of the present embodiment, the second control module is specifically used to: detect the grid abnormality risk existing in the grid status data according to the grid abnormality prediction model; generate a pre-adjustment instruction for the photovoltaic inverter according to the grid abnormality risk; generate a power support instruction based on the load demand of the island mode and the power of the energy storage system corresponding to the photovoltaic power grid; control the output parameters of the energy storage system according to the power support instruction; control the output parameters of the photovoltaic inverter to comply with the island mode parameters according to the pre-adjustment instruction; and adjust the output parameters of the energy storage system and the output parameters of the photovoltaic inverter in real time according to the grid status data until the photovoltaic power grid switches to the island mode.
[0058] In an optional implementation of the present embodiment, the second control module is also used to: determine the load prediction model after quantum state encoding by performing quantum computing processing on the grid state data and the load history data; predict the load within a preset time period according to the load prediction model to obtain load prediction data; determine the power allocation plan of the photovoltaic inverter and the energy storage system through a quantum optimization algorithm based on the load prediction data; and adjust the output power of the energy storage system and the output power of the photovoltaic inverter according to the power allocation plan.
[0059] In an optional implementation of the present embodiment, the second control module is also used to: obtain the remaining power of the energy storage system; based on the remaining power and load forecast data, optimize the charging and discharging of the energy storage system through a quantum variational algorithm to generate an optimal energy storage power distribution plan for the energy storage system; determine the on-grid and off-grid mode switching time of the photovoltaic power grid according to the optimal energy storage power distribution plan and a preset on-grid and off-grid switching threshold.
[0060] According to a grid-connected and off-grid seamless switching device provided by the present application, the grid state data and load forecast data of the photovoltaic power grid are obtained; a grid-connected control instruction is generated according to the grid state data and the load forecast data; the photovoltaic power grid is divided into several microgrids according to the grid-connected control instruction, and a pre-switching instruction corresponding to the microgrid is generated through distributed model predictive control; the photovoltaic inverter is controlled according to the pre-switching instruction to switch the photovoltaic power grid to the grid-connected mode; if a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic power grid is switched to the island mode. Through the implementation of the present application, the photovoltaic power grid is divided into several microgrids, and the state of each microgrid is independently managed by a distributed control system, which can effectively avoid the system instability and grid shock that may be caused during the switching process in the traditional method.
[0061] According to the application plan provided Figure 3 An electronic device provided in an embodiment of the present application. The electronic device can be used to implement the on-grid and off-grid seamless switching method in the aforementioned embodiment, mainly comprising: A memory 301, a processor 302, and a computer program 303 stored in the memory 301 and executable on the processor 302, the memory 301 and the processor 302 are connected by communication. When the processor 302 executes the computer program 303, the method for seamless switching between the grid and the off-grid in the foregoing embodiment is implemented. The number of processors may be one or more.
[0062] The memory 301 may be a high-speed random access memory (RAM) memory, or a non-volatile memory (non-volatile memory), such as a disk memory. The memory 301 is used to store executable program codes, and the processor 302 is coupled to the memory 301 .
[0063] Furthermore, the present application also provides a computer-readable storage medium, which may be disposed in the electronic device in each of the embodiments. The computer-readable storage medium may be the aforementioned Figure 3 Memory in the illustrated embodiment.
[0064] The computer readable storage medium stores a computer program, and when the program is executed by the processor, the method for seamless switching between the grid and the grid in the aforementioned embodiment is implemented. Furthermore, the computer storable medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a RAM, a magnetic disk or an optical disk, and other media that can store program codes.
[0065] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the described systems, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0066] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0067] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for seamless switching between grid and off-grid, characterized in that: include: Obtain grid status data and load forecast data of the photovoltaic power grid; Generate a grid connection control instruction according to the grid state data and the load forecast data; Dividing the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generating pre-switching instructions corresponding to the microgrids through distributed model predictive control; Controlling the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to the pre-switching instruction; If a grid abnormality risk is detected by the grid abnormality prediction model in the grid-connected mode, the photovoltaic grid is switched to an island mode.
2. The method for seamless on-grid and off-grid switching according to claim 1, characterized in that: The step of generating a grid connection control instruction according to the grid state data and the load forecast data comprises: Inputting the grid state data and the load forecast data into a deep learning model to generate grid load change trend information within a preset time period; Determining an output parameter control strategy of the photovoltaic inverter according to the change trend information; Acquiring real-time feedback data of the photovoltaic power grid; The output parameter control strategy is adjusted according to the real-time feedback data to generate an optimal control strategy and a grid-connected control instruction corresponding to the optimal control strategy.
3. The method for seamless switching between grid and off-grid according to claim 1, characterized in that: The step of dividing the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generating pre-switching instructions corresponding to the microgrids through distributed model predictive control includes: Determining grid status information of the photovoltaic grid by analyzing grid status data of the photovoltaic grid; According to the grid state information and the grid-connected control instruction, the photovoltaic grid is divided to obtain a plurality of independent microgrid units; Analyzing the power flow of each microgrid unit to determine the status data of each microgrid; Based on the microgrid state data, optimizing the power dispatch of each microgrid through distributed model predictive control; According to the power dispatch optimization result, the control strategy of each microgrid is adjusted to generate a pre-switching operation instruction.
4. The method for seamless on-grid and off-grid switching according to claim 1, characterized in that: The step of controlling the photovoltaic inverter to switch the photovoltaic power grid to the grid-connected mode according to the pre-switching instruction includes: Controlling a high-precision phase detection device to collect first electrical characteristic information of each of the microgrids and second electrical characteristic information of the main grid according to the pre-switching instruction; Based on the error between the first electrical characteristic information and the second electrical characteristic information, dynamically adjusting the output parameter of the photovoltaic inverter through a nonlinear control algorithm; The output phase of the photovoltaic power grid is controlled to be synchronized with the main power grid according to the output parameter until the photovoltaic power grid is switched to a grid-connected mode.
5. The method for seamless on-grid and off-grid switching according to claim 1, characterized in that: The step of switching the photovoltaic power grid to an island mode if a power grid abnormality risk is detected by a power grid abnormality prediction model in the grid-connected mode comprises: Detecting the power grid abnormality risk existing in the power grid state data according to the power grid abnormality prediction model; generating a pre-adjustment instruction for the photovoltaic inverter according to the abnormal risk of the power grid; Generate a power support instruction based on the load demand of the island mode and the power of the energy storage system corresponding to the photovoltaic power grid; controlling output parameters of the energy storage system according to the power support instruction; controlling the output parameters of the photovoltaic inverter to conform to island mode parameters according to the pre-regulation instruction; The output parameters of the energy storage system and the output parameters of the photovoltaic inverter are adjusted in real time according to the grid status data until the photovoltaic grid is switched to the island mode.
6. The method for seamless switching between grid and off-grid according to claim 5, characterized in that: After the photovoltaic power grid is switched to the island mode, the method further includes: Determine a load prediction model after quantum state encoding by performing quantum computing on the power grid state data and load history data; Predicting the load within a preset time period according to the load prediction model to obtain the load prediction data; Based on the load forecast data, determining a power allocation scheme for the photovoltaic inverter and the energy storage system through a quantum optimization algorithm; The output power of the energy storage system and the output power of the photovoltaic inverter are adjusted according to the power allocation scheme.
7. The method for seamless on-grid and off-grid switching according to claim 6, characterized in that: The method further comprises: Obtaining the remaining power of the energy storage system; Based on the remaining power and the load forecast data, the charging and discharging of the energy storage system is optimized by a quantum variational algorithm to generate an optimal energy storage power allocation plan for the energy storage system; According to the optimal energy storage power distribution plan and the preset on-grid and off-grid switching threshold, the on-grid and off-grid mode switching time of the photovoltaic power grid is determined.
8. A seamless switching device for on-grid and off-grid, characterized in that: The on-grid and off-grid seamless switching device comprises: An acquisition module, used to acquire grid status data and load forecast data of the photovoltaic grid; A first generating module, used for generating a grid connection control instruction according to the grid state data and the load forecast data; A second generating module is used to divide the photovoltaic power grid into a plurality of microgrids according to the grid-connected control instruction, and generate a pre-switching instruction corresponding to the microgrid through a distributed model predictive control; A first control module, configured to control the photovoltaic inverter to switch the photovoltaic power grid to a grid-connected mode according to the pre-switching instruction; The second control module is used to switch the photovoltaic power grid to an island mode if a power grid abnormality risk is detected by a power grid abnormality prediction model in the grid-connected mode.
9. An electronic device, characterized in that: The device comprises a memory and a processor, wherein: The processor is used to execute the computer program stored in the memory; When the processor executes the computer program, the steps in the method for seamless switching between on-grid and off-grid are implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method for seamless on-grid and off-grid switching described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
AC access flywheel UPS control method for stabilizing dynamic load of data center
CN119944937A
Optical storage system grid-connected and off-grid switching method, system and device
CN120546108A