A phase-locked control method and related device

CN123019032APending Publication Date: 2026-10-30SHENZHEN POWEROAK NEWENER CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611507533.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-28
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本申请提供储能并网控制方法和相关设备,以解决现有技术中易出现单周波内相位跳反和稳态相位抖动与漂移的技术问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123019032A_ABST
    Figure CN123019032A_ABST
Patent Text Reader

Abstract

The application provides a phase-locked control method and related equipment, which are suitable for a grid-connected control system, and the grid-connected control system at least comprises an inverter, a phase-locked loop and a PI controller. The method comprises the following steps: determining a phase angle error of the phase-locked loop based on an alternating input voltage signal of a power grid; if the grid-connected control system is currently in a zero-crossing point region, performing single-step limiting amplification by using the phase angle error and the PI controller to determine a phase-locked angle of a current period; if the grid-connected control system is currently in a non-zero-crossing point region, determining the phase-locked angle of the current period based on a historical angle frequency and a historical phase-locked angle; and modulating a driving signal of the inverter according to the phase-locked angle of the current period, and controlling inverter bridge MOS tubes in the inverter based on the driving signal. The technical scheme can avoid phase jump in a single cycle, and can avoid steady-state phase jitter and drift.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of grid-connected control technology, and in particular to a phase-locked loop control method and related equipment. Background Technology

[0002] In the grid-connected control systems of portable outdoor power supplies, energy storage systems, or bidirectional inverters, the phase-locked loop (PLL) is the core control algorithm that ensures that the inverter output voltage is in phase and frequency with the external AC input voltage.

[0003] The currently used technology is a phase-locked loop (SOGI-PLL) based on a second-order generalized integrator. However, this technology has several drawbacks. Firstly, under complex and harsh operating conditions, especially with high-power inductive loads such as motors, and with significant grid connection transients and phase differences, the PI controller continuously performs integral calculations throughout the entire cycle. This results in a substantial accumulation of errors in the non-zero region into the integral term, leading to severe control loop distortion. Furthermore, within a single power frequency cycle, the phase-locked angle is highly susceptible to drastic changes or even complete reversal, causing abnormal phenomena such as reverse operation of the motor or other loads.

[0004] On the other hand, the PI controller continuously performs integral calculations throughout the entire cycle. When faced with large error conditions caused by interference or power loss at the input (such as sampling being subject to sudden changes in interference or normal power loss switching off-grid output), the full-wave full-scale adjustment of the PI controller will force the output of a huge angle correction. This drastic change will cause the phase-locked loop to oscillate severely in steady state, resulting in phase drift. Summary of the Invention

[0005] This application provides a grid-connected control method and related equipment for energy storage to solve the technical problems of phase jump within a single cycle and steady-state phase jitter and drift that are prone to occur in the prior art.

[0006] Firstly, a phase-locked loop (PLL) control method is provided, applicable to a grid-connected control system. The grid-connected control system includes at least an inverter, a PLL, and a PI controller. The method includes: determining the phase angle error of the PLL based on the AC input voltage signal from the grid; if the grid-connected control system is currently in a zero-crossing region, determining the PLL angle for the current cycle by using the phase angle error and the PI controller for single-step limiting; wherein, the zero-crossing region is the interval in the grid-connected control system where the AC voltage or current waveform crosses zero potential; if the grid-connected control system is currently in a non-zero-crossing region, determining the PLL angle for the current cycle based on historical angular frequencies and historical PLL angles; wherein, the historical angular frequencies and historical PLL angles are the angular frequencies and PLL angles of the previous cycle; modulating the inverter's drive signal according to the current cycle's PLL angle, and controlling the inverter bridge MOSFETs in the inverter based on the drive signal.

[0007] By avoiding the use of PI controllers when the grid-connected controller is in the non-zero-crossing region, the microcontroller is freed from the high-frequency, highly complex control operations of PI controllers. Instead, a lightweight linear feedforward recursive formula is used. This not only significantly frees up the microcontroller's core computing resources, allowing the embedded software system to have a more abundant resource window to run more intensive and higher-frequency tasks, but also optimizes the tracking of the phase-locked loop and subsequent phase changes caused by transient disturbances. Furthermore, when the grid-connected control system is in the zero-crossing region, enabling the PI controller and introducing a single-step limiting mechanism not only ensures that even with severe grid-connected phase deviations, the phase-locked loop will never overshoot within one cycle, completely eliminating phase jumps that could cause abnormal load operation, but also limits single-step output when the zero-point error is large, through smooth iteration over multiple cycles. Thus, this application not only eliminates the oscillations caused by sudden overshoot, but also ensures that after multi-cycle convergence and approximation, the inverter output phase and the external grid phase can achieve high-precision, zero-steady-state-error alignment, guaranteeing the safety of energy storage grid connection, while also significantly eliminating phase drift caused by phase changes.

[0008] In conjunction with the first aspect, in one possible implementation, determining the phase angle error based on the AC input voltage signal of the power grid includes: determining the actual angle of the phase-locked loop (PLL) based on the AC input voltage signal of the power grid; determining the control angle of the PLL based on the single integral adjustment angle currently output by the PI controller; and calculating the difference between the actual angle of the PLL and the control angle of the PLL to obtain the phase angle error of the PLL.

[0009] By utilizing the actual angle and control angle of the phase-locked loop (PLL), the phase angle error of the PLL can be calculated more accurately, providing more accurate usage parameters for subsequent applications.

[0010] In conjunction with the first aspect, in one possible implementation, after determining the phase angle error of the phase-locked loop based on the AC input voltage signal from the power grid, the method further includes: calculating the number of integer cycle points of the inverter's modulation frequency based on the inverter's control frequency and modulation frequency; and calculating the maximum and minimum number of zero-crossing cycle points according to the number of integer cycle points, the AC input voltage signal, a preset zero-crossing voltage dead zone threshold, a preset maximum value calculation formula, and a preset minimum value calculation formula; wherein, the preset maximum value calculation formula is: The formula for calculating the preset minimum value is: , The maximum number of zero-crossing periodic points. The minimum number of zero-crossing periodic points, The number of points in the entire cycle. The voltage signal amplitude within the AC input voltage signal. The preset zero-crossing voltage dead zone threshold is defined; a zero-crossing cycle number threshold interval is generated based on the minimum and maximum zero-crossing cycle number; and the grid-connected control system is determined to be in the zero-crossing region based on the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, and the zero-crossing cycle number threshold interval.

[0011] By combining the inverter's control frequency, modulation frequency, zero-crossing period threshold range, and zero-crossing voltage dead zone threshold, a multi-dimensional judgment logic is formed to determine whether the grid-connected control system is in the zero-crossing region. This upgrades zero-crossing detection from a fragile single-point event trigger to a highly reliable and highly resistant regional state judgment, effectively addressing complex operating conditions such as severe grid distortion, frequency fluctuations, and electromagnetic interference.

[0012] In conjunction with the first aspect, in one possible implementation, based on the AC input voltage signal, a preset zero-crossing voltage dead zone threshold, and a zero-crossing cycle point threshold range, it is determined whether the grid-connected control system is currently in the zero-crossing region. This includes: responding to the absolute value of the voltage signal amplitude within the AC input voltage signal being less than the preset zero-crossing voltage dead zone threshold, accumulating the number of times the system enters the phase-locked loop and continuing to acquire the AC input voltage signal; when it is detected again that the absolute value of the voltage signal amplitude within the AC input voltage signal is less than the preset zero-crossing voltage dead zone threshold, stopping the accumulation of the number of times the system enters the phase-locked loop; if the accumulated number of times the system enters the phase-locked loop is within the zero-crossing cycle point threshold range, determining that the grid-connected control system is currently in the zero-crossing region; if the accumulated number of times the system enters the phase-locked loop is not within the zero-crossing cycle point threshold range, determining that the grid-connected control system is currently in the non-zero-crossing region.

[0013] By constructing a dual "amplitude-time" verification mechanism, the zero-crossing detection is upgraded from relying on instantaneous event triggering to a robust judgment based on regional state, thereby significantly enhancing the system's anti-interference capability and reliability in complex environments.

[0014] In conjunction with the first aspect, in one possible implementation, the single integral adjustment angle is the newly added cumulative amount of the integral term of the PI controller in the current cycle, and the single angle adjustment amount is proportional to the current error and the cumulative historical error of the integral term in the PI controller. The phase-locked angle for the current cycle is determined by using the phase angle error and the PI controller for single-step limiting, including: if the grid-connected control system is currently in the zero-crossing region, activating the PI controller; inputting the phase angle error into the activated PI controller, causing the activated PI controller to perform proportional and integral superposition calculations using the phase angle error, and outputting the single angle adjustment amount for the current cycle; calculating the phase-locked angle for the current cycle based on the first phase-locked angle calculation formula, the single angle adjustment amount output by the activated PI controller after clamping control, the historical angular frequency, and the historical phase-locked angle; wherein, the first phase-locked angle calculation formula is: , This refers to the single angle adjustment output of the activated PI controller after clamping control. The control cycle of the grid-connected control system is given. The historical angular frequency, The historical phase-locked angle, The phase-locked angle for the current cycle is denoted as .

[0015] By activating the PI controller when the grid-connected control system is in the zero-crossing region and introducing a single-step limiting mechanism for multi-cycle smooth approximation, not only is the sharp change or even complete reversal of the single-frequency cycle angle during grid-connected phase-locked looping cut off, but the steady-state jitter and phase drift caused by interference and grid-connected / off-grid detection are also reduced.

[0016] In conjunction with the first aspect, in one possible implementation, clamping control is performed on the activated PI controller based on the phase angle error, the single integral adjustment angle of the activated PI controller, and the single angle adjustment amount in the current cycle, including: in response to the phase angle error exceeding the phase angle error limit range, clamping the phase angle error to the maximum value within the phase angle error limit range; in response to the single integral adjustment angle of the activated PI controller exceeding the single integral adjustment angle limit range, clamping the single integral adjustment angle of the activated PI controller to the maximum value within the single integral adjustment angle limit range; and in response to the single angle adjustment amount in the current cycle exceeding the single angle adjustment amount limit range, clamping the single angle adjustment amount of the activated PI controller to the maximum value within the single angle adjustment amount limit range.

[0017] By introducing phase angle error, the single integral adjustment angle of the activated PI controller, and the single angle adjustment amount, clamping control is performed on the activated PI controller, thereby eliminating overshoot caused by a single large adjustment value and subsequent steady-state phase drift.

[0018] In conjunction with the first aspect, in one possible implementation, determining the phase-locked angle (PLA) for the current cycle based on historical angular frequencies and historical PLA angles includes: if the grid-connected control system is currently in a non-zero-crossing region, freezing the PI controller in the PLA; and, while the PI controller is frozen, calculating the PLA angle for the current cycle using a second PLA angle calculation formula, historical angular frequencies, and historical PLA angles; wherein the second PLA angle calculation formula is: .

[0019] By completely freezing the PI controller's function when the grid-connected control system is in the zero-crossing region, the possibility of excessive single-cycle phase shift is completely eliminated in the algorithm channel.

[0020] In conjunction with the first aspect, in one possible implementation, the inverter's drive signal is modulated according to the phase-locked angle of the current cycle, including: using trigonometric functions to calculate the phase-locked angle of the current cycle to obtain trigonometric function values; and using the inverter to perform pulse width modulation based on the trigonometric function values ​​to generate the corresponding drive signal.

[0021] The trigonometric function is used to calculate the phase-locked angle of the current cycle to obtain the trigonometric function value. The inverter then performs pulse width modulation based on the trigonometric function value to generate the corresponding drive signal. The generated drive signal is used to control the drive signal of the inverter bridge MOSFET, thereby achieving smooth synchronization between the inverter voltage and the grid voltage.

[0022] Secondly, a phase-locked loop (PLL) control device is provided, comprising: a real-time sampling and error calculation module, a single-step limiting control module, a PLL angle estimation module for the non-zero-crossing region, and a drive signal modulation and output module; the real-time sampling and error calculation module is used to determine the phase angle error of the PLL based on the AC input voltage signal of the power grid; the single-step limiting control module is used to determine the PLL angle of the current cycle by using the phase angle error and a PI controller for single-step limiting if the grid-connected control system is currently in the zero-crossing region; wherein, the zero-crossing region is the interval in the grid-connected control system where the AC voltage or current waveform crosses zero potential; the PLL angle estimation module for the non-zero-crossing region is used to determine the PLL angle of the current cycle based on historical angular frequency and historical PLL angle if the grid-connected control system is currently in the non-zero-crossing region; wherein, the historical angular frequency and historical PLL angle are the angular frequency and PLL angle of the previous cycle; and the drive signal modulation and output module is used to modulate the inverter's drive signal according to the PLL angle of the current cycle and control the inverter bridge MOS transistor in the inverter based on the drive signal.

[0023] Thirdly, a computer device is provided, including a memory and one or more processors, the memory being connected to the one or more processors, the one or more processors being configured to execute one or more computer programs stored in the memory, and the one or more processors, when executing the one or more computer programs, causing the computer device to implement the phase-locked control method of the first aspect or any possible implementation thereof.

[0024] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the phase-locked control method of the first aspect or any possible implementation thereof. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application 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.

[0026] Figure 1 A schematic flowchart of a phase-locked control method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a phase-locked loop control device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0028] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0029] The technical solution of this application can be applied to various scenarios where grid-connected control systems are connected to the power grid. The grid-connected control system can be a portable outdoor power supply, an energy storage system, or a bidirectional inverter grid-connected control system. The phase-locked loop in the above scenarios can be a synchronous rotating coordinate system phase-locked loop (SRF-PLL), a decoupled dual synchronous coordinate system phase-locked loop (DDSRF-PLL), or a dual second-order generalized integrator phase-locked loop (DSOGI-PLL), and this application does not limit this to any particular type.

[0030] The technical solution of this application is described in detail below.

[0031] See Figure 1 This diagram illustrates a flow chart of a phase-locked loop (PLL) control method provided in an embodiment of this application. This PLL control method can be applied to a grid-connected control system, which includes at least an inverter, a PLL, and a PI controller. The PLL control method specifically includes the following steps: S101: Determine the phase angle error of the phase-locked loop based on the AC input voltage signal of the power grid.

[0032] The AC input voltage signal of a power grid refers to the electrical signal detected at the connection boundary between the power grid and the grid-connected control system, used to characterize the instantaneous variation of the AC voltage transmitted from the power grid to the grid-connected control system. The AC input voltage signal of the power grid is used to characterize the amplitude, frequency, and waveform quality characteristics of the power grid's supply capacity.

[0033] In some embodiments, during inverter grid-connected operation, the analog-to-digital converter (ADC) module can be triggered by the microcontroller's internal timer to enable the ADC module to acquire the AC input voltage signal of the power grid in real time at a set interrupt frequency (10kHz in this embodiment). The AC input voltage signal includes the voltage signal amplitude. .

[0034] During the specific execution of step S101, the AC input voltage signal transmitted from the power grid to the grid-connected control system can be collected in real time, and the actual angle of the phase-locked loop at the current moment can be calculated using the AC input voltage signal, so as to calculate the phase angle error of the phase-locked loop at the current moment.

[0035] The actual angle of the phase-locked loop (PLL) refers to the electrical control parameter calculated in real time within the PLL of a grid-connected control system, representing the instantaneous phase value of the fundamental positive-sequence component of the grid voltage at the current moment. The current actual angle of the PLL characterizes the real-time phase position of the grid voltage and is a core reference parameter for the grid-connected control system to achieve synchronization of output current / voltage with the grid voltage (i.e., same frequency and phase), decoupling control of active and reactive power, and coordinate transformations (such as Park transformation / Clark transformation).

[0036] The phase angle error of a phase-locked loop (PLL) refers to the difference between the actual instantaneous phase of the grid voltage and the locked phase output by the PLL in a grid-connected control system. It is an electrical control parameter used to characterize the accuracy of the PLL's phase tracking of the grid. The phase angle error of the PLL is crucial for determining whether the PLL is in a stable locked state and is a core criterion parameter for the grid-connected control system to judge whether grid connection conditions are met, trigger unlocking protection, and perform phase compensation correction.

[0037] The control angle of a phase-locked loop (PLL) refers to the phase reference value output from the PLL after closed-loop regulation in a grid-connected control system, used to control the switching action of the power converter. The PLL control angle characterizes the reference phase used by the grid-connected control system when performing coordinate transformations (such as converting voltage / current in a stationary coordinate system to d / q components in a rotating coordinate system), generating PWM modulation waves (determining the conduction sequence of switching transistors), and achieving directional control of active / reactive power.

[0038] The current moment refers to the current point in time indicated by the system clock during the operation of the grid-connected control system. It serves as a time reference for characterizing the execution of various tasks of the control system.

[0039] The current cycle refers to a complete control cycle (a complete phase-locked control) that the system is currently executing or about to execute within the periodic control scheduling framework of a grid-connected control system. It is used to characterize the scheduling timing and number of iterations of the corresponding control task.

[0040] Optionally, after acquiring the AC input voltage signal from the power grid, the phase angle error of the phase-locked loop at the current moment can be determined through the following steps A1-A3: A1: Determine the actual angle of the phase-locked loop based on the AC input voltage signal of the power grid.

[0041] In some embodiments, the voltage signal amplitude in the AC input voltage signal of the power grid is used to construct α and β orthogonal signals through a second-order generalized integrator (SOGI). Then, the α and β orthogonal signals are subjected to arctangent transformation using trigonometric functions to obtain the actual angle of the phase-locked loop at the current moment. .

[0042] A2: Determine the control angle of the phase-locked loop based on the single integral adjustment angle of the current output of the PI controller.

[0043] In some embodiments, the control angle of the phase-locked loop at the current moment can be obtained by superimposing the actual angle of the phase-locked loop at the previous moment with the single integral adjustment angle currently output by the PI controller. The single integral adjustment angle of the PI controller's current output is the cumulative increase of the PI controller's integral term within the current period.

[0044] A3: Calculate the difference between the actual angle of the phase-locked loop and the control angle of the phase-locked loop to obtain the phase angle error of the phase-locked loop.

[0045] In some embodiments, the control angle of the phase-locked loop at the current moment is obtained. Then, the difference between the actual angle and the control angle of the phase-locked loop at the current moment can be calculated to obtain the actual phase angle error of the phase-locked loop at the current moment. The specific calculation method is shown in formula (1): (1) in, The control angle of the phase-locked loop at the current moment. This represents the actual angle of the phase-locked loop at the current moment. This represents the phase angle error of the phase-locked loop at the current moment.

[0046] It is worth noting that, compared to directly acquiring the phase angle error of the phase-locked loop (PLL), using the actual angle of the PLL at the current moment and the control angle at the current moment can more accurately calculate the phase angle error of the PLL at the current moment, providing more accurate usage parameters for subsequent applications.

[0047] S102: Based on the AC input voltage signal and the preset zero-crossing voltage dead zone threshold, determine whether the grid-connected control system is currently in the zero-crossing region. If the grid-connected control system is currently in the zero-crossing region, proceed to step S103; if the grid-connected control system is currently in the non-zero-crossing region, proceed to step S104.

[0048] The preset zero-crossing voltage dead zone threshold is a voltage amplitude threshold set in advance in the grid voltage zero-crossing detection stage of the grid-connected control system. It is used to determine whether the grid voltage signal has truly crossed zero, avoiding false zero-crossing judgments caused by signal noise, harmonic distortion, or sampling jitter. The zero-crossing voltage dead zone threshold characterizes the hysteresis comparison range of grid voltage zero-crossing detection and is a key protective parameter for the grid-connected control system to achieve reliable zero-crossing signal triggering, initial phase capture of the phase-locked loop, and precise control of the grid-connected switch closing time.

[0049] It should be noted that a preset zero-crossing voltage dead zone threshold can be set according to the fundamental amplitude of the grid-connected voltage. The preset zero-crossing voltage dead zone threshold can be set to a fault tolerance range of 3V, but this embodiment of the application does not limit it.

[0050] The zero-crossing region is the interval in a grid-connected control system where the AC voltage or current waveform crosses zero potential. Specifically, in the grid voltage zero-crossing detection stage of the grid-connected control system, it is the interval formed by extending a certain phase range (or time range) to both sides of the actual zero-crossing point of the grid voltage waveform (i.e., the moment when the instantaneous voltage value is zero). It is used to define the sensitive interval where the voltage signal is close to zero. The zero-crossing region characterizes a specific interval where the voltage amplitude is low and sensitive to noise before and after the grid voltage crosses zero. It is an important reference interval for the grid-connected control system to perform zero-crossing detection dead-zone configuration, soft-switching of switching transistors (such as ZVS / ZCS), verification of the effectiveness of grid synchronization signals, and to avoid critical control actions (such as large jumps in PWM duty cycle) in the voltage abrupt change interval.

[0051] During the execution of step S102, the system can determine whether the grid-connected control system is currently in the zero-crossing region based on the voltage signal amplitude within the currently acquired AC input voltage signal of the power grid and the preset zero-crossing voltage dead zone threshold. If the grid-connected control system is currently in the zero-crossing region, proceed to step S103; if the grid-connected control system is currently in the non-zero-crossing region, proceed to step S104.

[0052] It is worth noting that in the process of determining whether the grid-connected control system is in the zero-crossing region, the introduction of a preset zero-crossing voltage dead zone threshold can effectively avoid zero-crossing misjudgments caused by noise, harmonics and sampling jitter, and provide the system with a stable and reliable zero-crossing indicator and phase reference.

[0053] Optionally, the following steps B1-B3 can be used to determine whether the grid-connected control system is currently in the zero-crossing region: B1: Calculate the number of integer cycle points of the inverter's modulation frequency based on the inverter's control frequency and modulation frequency.

[0054] The control frequency of an inverter refers to the periodic repetition rate at which the grid-connected control system executes the complete core control algorithm (including sampling and reading, phase-locked loop updates, power calculation, PI regulation, coordinate transformation, and PWM duty cycle calculation) in the inverter's digital control system (such as a DSP). It characterizes the response speed of the grid-connected control system to real-time adjustments of electrical parameters. This control frequency can be determined by the main loop scheduling cycle of the grid-connected control system or by the execution cycle of the control task triggered by the PWM periodic interrupt; however, this embodiment does not limit this determination.

[0055] The modulation frequency of an inverter refers to the repetition rate at which power switching devices (such as IGBTs and MOSFETs) switch on and off at a fixed period in the inverter's pulse width modulation (PWM) generation module. It characterizes the frequency of the carrier signal used by the inverter to convert DC voltage to AC voltage. This modulation frequency is directly generated by the periodic matching interrupt or count overflow event of the PWM timer, and its period length (i.e., the PWM carrier period) determines the switching timing of the power devices.

[0056] In some embodiments, the control frequency and modulation frequency of the inverter can be obtained, and the integer number of the modulation frequency of the inverter can be calculated based on the control frequency and modulation frequency of the inverter. The specific calculation method is shown in formula (2): (2) in, This is the control frequency of the inverter. This is the modulation frequency of the inverter. This represents the number of integer points in the modulation frequency of the inverter.

[0057] B2: Determine the threshold range of zero-crossing cycle points using the total number of cycle points, the AC input voltage signal, and the preset zero-crossing voltage dead zone threshold.

[0058] The zero-crossing period count threshold range refers to a set range of valid sampling points between two consecutive valid zero-crossing events in the grid-connected control system's grid voltage zero-crossing detection and frequency measurement stages. This range is used to filter out false zero-crossing detections caused by grid harmonic distortion, voltage dips, sampling jitter, or noise interference, ensuring the validity and reliability of frequency calculations. The zero-crossing period count threshold range characterizes the valid length range of the grid voltage fundamental period and is a key criterion parameter for verifying the validity of zero-crossing operations in the grid-connected control system.

[0059] In this embodiment, the zero-crossing cycle number threshold range can be set according to the fault tolerance range of the preset zero-crossing voltage dead zone threshold.

[0060] Specifically, based on the number of points in the whole cycle, the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, the preset maximum value calculation formula, and the preset minimum value calculation formula, the maximum number of zero-crossing cycle points and the minimum number of zero-crossing cycle points are calculated respectively; among them, the preset maximum value calculation formula is shown in formula (3), and the preset minimum value calculation formula is shown in formula (4): (3) (4) In formulas (3) and (4), The maximum number of zero-crossing periodic points. Minimum number of zero-crossing period points This represents the number of integer points in the modulation frequency of the inverter. (i.e., U(t)) is the voltage signal amplitude within the AC input voltage signal. This is a preset zero-crossing voltage dead zone threshold.

[0061] In practical applications, it can be seen from the preset maximum and minimum value calculation formulas that the maximum zero-crossing voltage dead zone threshold is calculated by summing the voltage signal amplitude and the preset zero-crossing voltage dead zone threshold, and by calculating the difference between the voltage signal amplitude and the preset zero-crossing voltage dead zone threshold. Based on the sum of the voltage signal amplitude and the preset zero-crossing voltage dead zone threshold, the voltage signal amplitude, and the integer number of cycles of the inverter's modulation frequency, the maximum zero-crossing cycle number is calculated. Based on the difference between the voltage signal amplitude and the preset zero-crossing voltage dead zone threshold, the voltage signal amplitude, and the integer number of cycles of the inverter's modulation frequency, the minimum zero-crossing cycle number is calculated. The zero-crossing cycle number threshold interval is formed by combining the minimum and maximum values ​​of the zero-crossing cycle number threshold interval. For example, the formed zero-crossing cycle number threshold interval can be […]. -2, +2], where "2" can be a wide error value preset by relevant technicians, and is not limited in this embodiment of the application.

[0062] B3: Based on the AC input voltage signal, the preset zero-crossing voltage dead zone threshold and the zero-crossing period number threshold range, determine whether the grid-connected control system is currently in the zero-crossing region.

[0063] In this embodiment, the inverter's control frequency, modulation frequency, zero-crossing period threshold range, and zero-crossing voltage dead zone threshold are combined to form a multi-dimensional judgment logic to determine whether the grid-connected control system is in the zero-crossing region. This can upgrade zero-crossing detection from a fragile single-point event trigger to a highly reliable and highly anti-interference regional state judgment, which can effectively cope with complex operating conditions such as severe grid distortion, frequency fluctuations, and electromagnetic interference.

[0064] In a preferred embodiment of this application, in response to the absolute value of the voltage signal amplitude within the AC input voltage signal being less than a preset zero-crossing voltage dead zone threshold, the number of times the system enters the phase-locked loop (PLL) is accumulated and the AC input voltage signal continues to be acquired; when the absolute value of the voltage signal amplitude within the AC input voltage signal is detected to be less than the preset zero-crossing voltage dead zone threshold again, the accumulation of the number of times the system enters the PLL is stopped; if the accumulated number of times the system enters the PLL is within the zero-crossing period point threshold range, it is determined that the grid-connected control system is currently in the zero-crossing region; if the accumulated number of times the system enters the PLL is not within the zero-crossing period point threshold range, it is determined that the grid-connected control system is currently in the non-zero-crossing region.

[0065] Specifically, the process of determining whether the grid-connected control system is currently in the zero-crossing region based on the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, and the zero-crossing period number threshold range can be described by the following steps C1-C5: C1: Determine whether the absolute value of the voltage signal amplitude of the AC input voltage signal is less than the preset zero-crossing voltage dead zone threshold; if yes, execute C2; ​​if no, continue to detect the AC input voltage signal until the absolute value of the voltage signal amplitude within the AC input voltage signal is detected to be less than the preset zero-crossing voltage dead zone threshold, then execute C2.

[0066] C2: Start accumulating the number of times the phase-locked loop is entered, and continue to collect the AC input voltage signal until the absolute value of the voltage signal amplitude in the AC input voltage signal is less than the preset zero-crossing voltage dead zone threshold, at which point the accumulation of the number of times the phase-locked loop is entered stops.

[0067] C3: After stopping the cumulative number of times entering the phase-locked loop, further determine whether the final cumulative number of times entering the phase-locked loop is within the zero-crossing period point threshold range; if yes, execute C4; if no, execute C5.

[0068] C4: Determines that the grid-connected control system is currently in the zero-crossing region.

[0069] C5: Determines that the grid-connected control system is currently in the non-zero-crossing region.

[0070] In summary, when the absolute value of the voltage signal amplitude within the first detected AC input voltage signal is less than the preset zero-crossing voltage dead zone threshold, that is... At that time, the number of times the device enters the phase-locked loop begins to accumulate. The process continues until the absolute value of the voltage signal amplitude within the next detected new AC input voltage signal is less than the preset zero-crossing voltage dead zone threshold, and the cumulative number of times the signal enters the phase-locked loop falls within the zero-crossing period count threshold range. And satisfy If the current condition is met, the grid-connected control system is determined to be in the zero-crossing region; otherwise, it is determined to be in the non-zero-crossing region and the system is reset to zero. This is to allow for the re-accumulation of the number of times the system re-enters the phase-locked loop, which is used to determine whether the grid-connected control system is in the zero-crossing region.

[0071] It is worth noting that this application constructs a dual verification mechanism of "amplitude-time", which improves the zero-crossing detection from relying on the triggering of instantaneous events to a robust judgment based on the regional state, thereby significantly enhancing the system's anti-interference ability and reliability in complex environments.

[0072] S103: Use the phase angle error and PI controller to perform single-step limiting to determine the phase-locked angle of the current cycle.

[0073] In this embodiment, the single integral adjustment angle is the cumulative amount added to the integral term of the PI controller in the current cycle, and the single angle adjustment amount is proportional to the current error and the cumulative historical error of the integral term in the PI controller.

[0074] The angular frequency of a phase-locked loop (PLL) is an electrical control parameter in a grid-connected control system. It is the output of the PLL after closed-loop regulation and characterizes the PLL's frequency tracking of the fundamental positive-sequence component of the grid voltage. The angular frequency of the PLL is used to characterize the real-time tracking measurement of the grid frequency and is a core parameter in grid-connected control systems for performing phase-locked angle accumulation and integration, frequency feedforward compensation, frequency over-limit protection (such as triggering protection actions when the frequency is too high / too low), and frequency-active power droop characteristics in active power control (applicable to microgrids or off-grid modes).

[0075] The phase-locked loop (PLL) angle, in a grid-connected control system, is an electrical control parameter output after closed-loop regulation by the PLL. It characterizes the instantaneous phase tracking result of the PLL on the fundamental positive-sequence component of the grid voltage. The PLL angle represents the real-time locking value of the PLL to the instantaneous phase of the grid voltage. It is a core reference parameter for the grid-connected control system in performing coordinate transformations (such as Park transformation from stationary to rotating coordinates, and inverse Park transformation from rotating to stationary coordinates), generating the phase reference for PWM modulation waves, and directional control of active and reactive power.

[0076] In the specific execution of step S103, when it is determined that the grid-connected control system has entered the zero-crossing region, the PI controller can be activated normally. The activated PI controller and the phase angle error of the phase-locked loop (the phase angle error of the phase-locked loop here is the phase angle error of the phase-locked loop obtained in step S101) are used to perform single-step limiting to determine the phase-locked loop's phase angle in the current cycle.

[0077] Specifically, the process of determining the phase-locked loop angle for the current cycle by using the phase angle error of the phase-locked loop and the PI controller for single-step limiting can be shown in steps D1-D4 below: D1: Activate the PI controller when it is determined that the grid-connected control system is currently in the zero-crossing region.

[0078] D2: Input the phase angle error into the activated PI controller, so that the activated PI controller can use the phase angle error to perform proportional and integral superposition calculations and output the single angle adjustment amount of the current cycle.

[0079] In some embodiments, when the PI controller is in an active state, the phase angle error of the phase-locked loop is... The input is used to perform proportional and integral superposition calculations in the activated PI controller, and the output is the single angle adjustment amount for the current cycle. It can achieve the "zero steady-state error" elimination of phase error and the decoupling of dynamic adjustment.

[0080] D3: Clamp the activated PI controller based on the phase angle error, the single integral adjustment angle of the activated PI controller, and the single angle adjustment amount.

[0081] In this embodiment, to eliminate overshoot and subsequent steady-state phase drift caused by a single large adjustment value, this application can introduce single-step limiting control for the phase angle error of the phase-locked loop, the single-integral adjustment angle of the activated PI controller, and the single-angle adjustment amount. Specifically, in response to the phase angle error exceeding the phase angle error limit range, the phase angle error is clamped to the maximum value within the phase angle error limit range; in response to the single-integral adjustment angle of the activated PI controller exceeding the single-integral adjustment angle limit range, the single-integral adjustment angle of the activated PI controller is clamped to the maximum value within the single-integral adjustment angle limit range; in response to the single-angle adjustment amount exceeding the single-angle adjustment amount limit range, the single-angle adjustment amount of the activated PI controller is clamped to the maximum value within the single-angle adjustment amount limit range.

[0082] It is worth noting that when the grid-connected control system is in the zero-crossing region, the PI controller is activated and a single-step limiting mechanism is introduced to perform multi-cycle smooth approximation. This not only cuts off the drastic change or even complete reversal of the single-frequency cycle angle during grid-connected phase locking, but also reduces the steady-state jitter and phase drift caused by factors such as interference and grid-connected / off-grid detection.

[0083] In practical applications, the phase angle error limit range can be preset separately (e.g., ( , = (-30°, 30°)), single integral adjustment angle limit range (e.g., (( , = (-3°, 3°)) and the single angle adjustment limit range (e.g., ( , ) = (-3°, 3°)).

[0084] It should be noted that during normal operation, the inverter will lock onto the grid phase. Only when there is a grid fault and active current control is required to assist protection can the phase angle error be limited to (-30°, 30°). To ensure that the traditional protection devices on the grid side can still correctly determine the fault type and phase without disconnecting the inverter from the grid, the phase angle error limit range can be set to (-30°, 30°). To meet the PI controller's anti-integral saturation requirements, the single integral adjustment angle limit range can be set to (-3°, 3°) to avoid overshoot and oscillation during transient processes, ensuring that the phase angle can smoothly and stably track the reference value, rather than experiencing drastic jumps when disturbed. To constrain the "step size" of the PI controller's integrator and prevent it from "running too fast" during transient processes, the single angle adjustment limit range can be set to (-3°, 3°) to avoid PI controller overshoot and oscillation.

[0085] Specifically, determining the phase angle error of the phase-locked loop. Does it exceed ( , If the error exceeds the limit, the phase angle error of the phase-locked loop will be forcibly reduced. Clamp to (e.g., 30°); otherwise, maintain the phase angle error of the phase-locked loop.

[0086] Determine the single integral adjustment angle of the activated PI control. Does it exceed the single integral adjustment angle limit? If it does, the single integral adjustment angle of the activated PI controller will be adjusted accordingly. Clamp to (e.g., 3°); otherwise, maintain the single integral adjustment angle of the active PI controller. .

[0087] Determine the single angle adjustment amount in the current cycle. Does it exceed the limit for single angle adjustment? If it does, the single angle adjustment of the activated PI controller will be adjusted accordingly. Clamp to (For example, 3°); otherwise, maintain the single angle adjustment amount of the active PI controller, thereby completing the clamping control of the active PI controller. That is to say, after clamping, the single angle adjustment amount output by the active PI controller is either... It is either the single angle adjustment of the activated PI controller. .

[0088] D4: Calculate the phase-locked angle for the current cycle based on the formula for calculating the first phase-locked angle, the single angle adjustment amount output by the PI controller after clamping control and activation, the historical angular frequency, and the historical phase-locked angle.

[0089] In some embodiments, after clamping control is completed on the activated PI controller, the output (single angle adjustment amount) of the clamped and activated PI controller can be used as the feedback value of the first phase-locked loop angle calculation formula, and the angular frequency of the previous cycle can be used as the feedforward value to calculate the phase-locked loop angle in the current cycle. The formula for calculating the first phase-locked angle is shown in formula (5): (5) In formula (5), The output of the activated PI controller (single angle adjustment amount) is used to complete clamping control. The control cycle of the grid-connected control system (which can be set to 100µs in this embodiment of the application). For historical angular frequency, The phase-locked angle for the current cycle. This is a historical phase-locked perspective.

[0090] It should be noted that the historical angular frequency and historical phase-locked angle are the angular frequency and phase-locked angle of the phase-locked loop in the previous cycle.

[0091] It is worth noting that, as can be seen from formula (5), by using the single-step amplitude limiting mechanism, the large-angle single synchronization that may cause grid-connected control system oscillation can be transformed into a gradual multi-cycle smooth approximation that spans multiple power frequency cycles.

[0092] S104: Determine the phase-locked angle of the current cycle based on the historical angular frequency and historical phase-locked angle; wherein, the historical angular frequency and historical phase-locked angle are the angular frequency and phase-locked angle of the phase-locked loop in the previous cycle.

[0093] In this embodiment, when it is determined that the grid-connected control system is currently in a non-zero-crossing region, the phase-locked loop (PLL) can be frozen to control the PI controller. While the PI controller is frozen, the phase-locked angle for the current cycle is calculated using the second phase-locked angle calculation formula, historical angular frequency, and historical phase-locked angle. The historical angular frequency and historical phase-locked angle are the angular frequency and phase-locked angle of the PLL in the previous cycle.

[0094] Specifically, when the grid-connected control system is determined to be in the non-zero-crossing region (i.e., the main range of the full cycle), the phase-locked loop (PLL) forcibly freezes the PI controller's operation. At this time, neither the proportional nor integral term of the PI controller responds to the phase angle error of the PLL. The calculation reduces interference signals from entering the core control loop. It calls upon the angular frequency of the phase-locked loop from the previous calculation (previous cycle). (i.e., the instantaneous angle change difference) serves as the sole feedforward in the second phase-locked angle calculation formula, affecting the phase-locked angle of the current cycle. The recursive calculation is performed, and the specific recursive calculation process is shown in the angular frequency formula (6) and the second phase-locked angle calculation formula (7): The formula for angular velocity is: (6) The formula for calculating the second phase-locked angle is: (7) In formulas (6) and (7), The control cycle of the grid-connected control system (which can be set to 100µs in this embodiment of the application). For historical angular frequency, From a historical perspective, This represents the phase-locked angle for the current cycle.

[0095] It is worth noting that this application completely freezes the PI controller's function when the grid-connected control system is in the zero-crossing region, thus completely eliminating the possibility of excessive single-cycle phase shift in the algorithm channel. The PI controller is only activated when the grid-connected control system is in the zero-crossing region. By limiting the phase difference step, it ensures that even if the phase deviation of the grid-connected control system is severe, the phase-locked loop will never overshoot within one cycle, thereby eliminating phase jumps that could cause abnormal load operation.

[0096] Furthermore, this application disables PI control when the grid-connected control system is in the non-zero-crossing region, which optimizes the tracking of the phase-locked loop and subsequent phase changes caused by transient disturbances. Moreover, the single-step limiting mechanism implemented when the grid-connected control system is in the zero-crossing region limits single-step output when the zero-point error is large. Through smooth iteration over multiple cycles, it not only cuts off the oscillations caused by sudden overshoot but also ensures that after multi-cycle convergence, the inverter output phase and the external grid phase can achieve high-precision, zero-steady-state-error alignment, guaranteeing the safety of energy storage grid connection and significantly eliminating phase drift caused by phase changes.

[0097] S105: Modulates the inverter's drive signal according to the phase-locked angle of the current cycle, and controls the inverter bridge MOS transistors in the inverter based on the drive signal.

[0098] In this embodiment of the application, after obtaining the phase-locked loop angle in the current cycle, the phase-locked loop angle in the current cycle can be calculated using trigonometric functions to obtain trigonometric function values; the inverter then performs pulse width modulation based on the trigonometric function values ​​to generate corresponding drive signals.

[0099] Specifically, the phase-locked angle of the phase-locked loop in the current cycle is obtained by trigonometric function calculation. and , trigonometric function values ​​( and The input is fed into the pulse width modulation (PWM) drive signal generation module of the inverter, so that the PWM drive signal generation module modulates the drive signal used to control the inverter bridge MOSFET according to the input trigonometric function value, thereby achieving smooth synchronization between the inverter voltage and the grid voltage.

[0100] In summary, the phase-locked loop (PLL) control method provided in this application does not rely on any triggering conditions, does not increase the cost of peripheral hardware, and can freeze the PI controller when the grid-connected controller is in the non-zero-crossing region. This frees the microcontroller from the high-frequency, highly complex control calculations of the PI controller, replacing them with a lightweight linear feedforward recursive formula. This not only significantly frees up the microcontroller's core computing resources, allowing the embedded software system to have a more abundant resource window to run more intensive and higher-frequency tasks, but also optimizes the PLL's following and subsequent phase changes caused by transient interference changes. Furthermore, when the grid-connected control system is in the zero-crossing region, enabling the PI controller and introducing a single-step limiting mechanism not only ensures that even with severe grid phase deviation, the PLL will never overshoot within one cycle, completely eliminating phase jumps that could cause abnormal load operation, but also limits single-step output when the zero-point error is large, through smooth iteration over multiple cycles. Therefore, this application not only eliminates the oscillation caused by sudden overshoot, but also ensures that after multi-cycle convergence and approximation, the inverter output phase and the external grid phase can achieve high-precision zero-static-error matching, ensuring the safety of energy storage grid connection, and also significantly eliminating the phase drift phenomenon caused by phase sudden changes.

[0101] The method of this application has been described above; the apparatus of this application will be described next.

[0102] See Figure 2 , Figure 2 This is a schematic diagram of a phase-locked loop control device provided in an embodiment of this application. Figure 2 As shown, the phase-locked control device 20 may include a real-time sampling and error calculation module 201, a single-step amplitude limiting control module 202, a phase-locked angle calculation module 203 for non-zero-crossing regions, and a drive signal modulation and output module 204.

[0103] The real-time sampling and error calculation module 201 is used to determine the phase angle error of the phase-locked loop based on the AC input voltage signal of the power grid. The single-step limiting control module 202 is used to determine the phase-locked angle of the current cycle by using the phase angle error and the PI controller to perform single-step limiting if the grid-connected control system is currently in the zero-crossing region; wherein, the zero-crossing region is the interval in the grid-connected control system where the AC voltage or current waveform crosses the zero potential. The phase-locked loop angle estimation module 203 for non-zero-crossing regions is used to determine the phase-locked loop angle of the current cycle based on historical angular frequency and historical phase-locked loop angle if the grid-connected control system is currently in the non-zero-crossing region; wherein, the historical angular frequency and historical phase-locked loop angle are the angular frequency and phase-locked loop angle of the previous cycle. The drive signal modulation and output module 204 is used to modulate the drive signal of the inverter according to the phase-locked angle of the current cycle, and control the inverter bridge MOS transistor in the inverter based on the drive signal.

[0104] It should be noted that the aforementioned energy storage grid-connected control device 20 can execute the phase-locked control method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the phase-locked control device 20 can be found in the aforementioned phase-locked control method provided in the embodiments of this application.

[0105] See Figure 3 , Figure 3 This is a schematic diagram of a computer device provided in an embodiment of this application. The computer device 30 may include a processor 301 and a memory 302. The memory 302 is connected to the processor 301, for example, via a bus.

[0106] Processor 301 may be a central processing unit (CPU), microcontroller unit (MCU), digital signal processor (DSP), field-programmable gate array (FPGA), or other processor capable of executing program instructions. Memory 302 may include read-only memory, random access memory, flash memory, solid-state drive, or other storage components capable of storing programs and data.

[0107] The memory 302 is used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions or modules corresponding to the phase-locked control method in the embodiments of this application. The processor 301 executes various functional applications and data processing of the phase-locked control method by running the non-volatile software programs, instructions, and modules stored in the memory 302, thereby realizing the functions of the phase-locked control method provided in the above method embodiments.

[0108] This application also provides a computer-readable storage medium storing a computer program. The computer program includes program instructions, which, when executed by a computer, cause the computer to perform the phase-locked loop control method as described in the foregoing embodiments. The computer-readable storage medium may include a medium capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory, a random access memory, a magnetic disk, or an optical disk.

[0109] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above.

[0110] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of protection of this application. Therefore, any equivalent variations made based on the disclosure of this application shall still fall within the scope of this application.

Claims

1. A phase-locked loop control method, characterized in that, Applicable to grid-connected control systems, wherein the grid-connected control system includes at least an inverter, a phase-locked loop, and a PI controller, the method includes: The phase angle error of the phase-locked loop is determined based on the AC input voltage signal of the power grid. If the grid-connected control system is currently in the zero-crossing region, activate the PI controller; The activated PI controller determines the single angle adjustment amount for the current cycle based on the phase angle error, and calculates the phase angle for the current cycle based on the phase angle error, the single angle adjustment amount for the current cycle, and the single integral adjustment angle of the activated PI controller. The single integral adjustment angle is the cumulative amount added to the integral term of the PI controller in the current cycle, and the single angle adjustment amount is proportional to the current error and the cumulative historical error of the integral term in the PI controller. The zero-crossing region is the interval in the grid-connected control system where the AC voltage or current waveform crosses zero potential. If the grid-connected control system is currently in a non-zero-crossing region, the PI controller is frozen, and while the PI controller is frozen, the phase-locked angle of the current cycle is determined based on the historical angular frequency and the historical phase-locked angle; wherein, the historical angular frequency and the historical phase-locked angle are the angular frequency and phase-locked angle of the phase-locked loop in the previous cycle. The drive signal of the inverter is modulated according to the phase-locked angle of the current cycle, and the inverter bridge MOS transistor in the inverter is controlled based on the drive signal.

2. The method according to claim 1, characterized in that, The determination of phase angle error based on the AC input voltage signal of the power grid includes: The actual angle of the phase-locked loop is determined based on the AC input voltage signal of the power grid; The control angle of the phase-locked loop is determined based on the single integral adjustment angle currently output by the PI controller. The phase angle error of the phase-locked loop is obtained by calculating the difference between the actual angle of the phase-locked loop and the control angle of the phase-locked loop.

3. The method according to claim 1, characterized in that, After determining the phase angle error of the phase-locked loop based on the AC input voltage signal of the power grid, the method further includes: Based on the control frequency and modulation frequency of the inverter, calculate the number of integer cycle points of the modulation frequency of the inverter; Based on the total number of cycle points, the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, the preset maximum value calculation formula, and the preset minimum value calculation formula, the maximum number of zero-crossing cycle points and the minimum number of zero-crossing cycle points are calculated respectively; wherein, the preset maximum value calculation formula is: The formula for calculating the preset minimum value is: , The maximum number of zero-crossing periodic points. The minimum number of zero-crossing periodic points, The number of points in the entire cycle. The voltage signal amplitude within the AC input voltage signal. The preset zero-crossing voltage dead zone threshold; A threshold range for the number of zero-crossing period points is generated based on the minimum and maximum number of zero-crossing period points. Based on the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, and the zero-crossing period number threshold range, it is determined whether the grid-connected control system is currently in the zero-crossing region.

4. The method according to claim 3, characterized in that, The step of determining whether the grid-connected control system is currently in the zero-crossing region based on the AC input voltage signal, the preset zero-crossing voltage dead zone threshold, and the zero-crossing period number threshold range includes: In response to the absolute value of the voltage signal amplitude within the AC input voltage signal being less than the preset zero-crossing voltage dead zone threshold, the number of times the phase-locked loop is entered is accumulated and the AC input voltage signal continues to be acquired. When the absolute value of the voltage signal amplitude within the AC input voltage signal is detected to be less than the preset zero-crossing voltage dead zone threshold again, the accumulation of the number of times entering the phase-locked loop is stopped. If the cumulative number of times entering the phase-locked loop is within the threshold range of the zero-crossing period points, it is determined that the grid-connected control system is currently in the zero-crossing region; If the cumulative number of times entering the phase-locked loop is not within the threshold range of the zero-crossing period points, it is determined that the grid-connected control system is currently in the non-zero-crossing region.

5. The method according to claim 1, characterized in that, The process involves the activated PI controller determining the single-cycle angle adjustment amount for the current period based on the phase angle error, and calculating the phase angle for the current period based on the phase angle error, the single-cycle angle adjustment amount for the current period, and the single-integral adjustment angle of the activated PI controller, including: The phase angle error is input into the activated PI controller, which then uses the phase angle error to perform proportional and integral superposition calculations and outputs the single angle adjustment amount for the current cycle. Clamping control is performed on the activated PI controller based on the phase angle error, the single integral adjustment angle of the activated PI controller, and the single angle adjustment amount of the current cycle. The phase-locked angle for the current cycle is calculated based on the first phase-locked angle calculation formula, the single angle adjustment amount output by the clamped and activated PI controller, the historical angular frequency, and the historical phase-locked angle; wherein, the first phase-locked angle calculation formula is: , This refers to the single angle adjustment output of the activated PI controller after clamping control. The control cycle of the grid-connected control system is given. The historical angular frequency, The historical phase-locked angle, The phase-locked angle for the current cycle is denoted as .

6. The method according to claim 5, characterized in that, The clamping control of the activated PI controller based on the phase angle error, the single integral adjustment angle of the activated PI controller, and the single angle adjustment amount of the current cycle includes: In response to the phase angle error exceeding the phase angle error limit range, the phase angle error is clamped to the maximum value within the phase angle error limit range; In response to the activated PI controller's single integral adjustment angle exceeding the single integral adjustment angle limit, the activated PI controller's single integral adjustment angle is clamped to the maximum value within the single integral adjustment angle limit. In response to the single angle adjustment amount exceeding the single angle adjustment amount limit range in the current cycle, the single angle adjustment amount of the activated PI controller is clamped to the maximum value within the single angle adjustment amount limit range.

7. The method according to claim 5, characterized in that, The step of determining the phase-locked angle for the current cycle based on historical angular frequencies and historical phase-locked angles when the PI controller is in a frozen state includes: With the PI controller in a frozen state, the phase-locked angle for the current cycle is calculated using the second phase-locked angle calculation formula, historical angular frequency, and historical phase-locked angle; wherein, the second phase-locked angle calculation formula is: .

8. The method according to claim 1, characterized in that, The step of modulating the inverter's drive signal according to the phase-locked angle of the current cycle includes: The phase-locked angle of the current cycle is calculated using trigonometric functions to obtain the trigonometric function value; The inverter performs pulse width modulation based on the trigonometric function value to generate a corresponding drive signal.

9. A computer device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, the processor causing the computer device to perform the method as described in any one of claims 1-8 when executing the one or more computer programs.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.