An integrated simulation test method for grid-forming inverters or converters
By adopting an integrated simulation testing method, the problem of mutual interference between simulation models of grid-type converters was solved, enabling efficient simulation and testing of specific operating conditions and improving the development and testing efficiency of converter products.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 天津瑞源电气有限公司
- Filing Date
- 2026-03-12
- Publication Date
- 2026-05-19
AI Technical Summary
During the development and verification of grid-type converter products, the functions of simulation models interfere with each other, making it difficult to balance them. This leads to management difficulties and low simulation testing efficiency, especially when multiple models need to be rebuilt during product iteration, which affects simulation testing efficiency.
An integrated simulation testing method is adopted, which obtains various disturbance signals, including fault voltage, frequency disturbance, phase angle offset and harmonic disturbance, through a simulated power grid signal construction unit. The three-phase virtual power grid voltage signal is calculated and motor signal simulation is integrated to realize the simulation of specific working conditions, with a high degree of decoupling between functions.
It improves the efficiency and flexibility of simulation testing, reduces model switching and preparation time, simplifies management, and enhances the efficiency of control algorithm development and simulation testing for grid-type converter products.
Smart Images

Figure CN121809114B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy power electronics simulation testing, and more specifically to an integrated simulation testing method for grid-connected inverters or converters. Background Technology
[0002] With the continuous development of the new energy industry, more and more grid-connected power electronic equipment is being connected to the power grid. This situation has led to problems such as weak control capability, low inertia damping, and wideband oscillation in the grid voltage, which have constrained the construction process of new power grids. To meet the needs of new power grid construction, grid-connected converters have been introduced. Grid-connected converters can improve power angle stability and enhance the grid's inertia and frequency regulation active support capabilities, and have become a technological hotspot in recent years.
[0003] In the development and verification of grid-connected converter products, hardware-in-the-loop (HIL) simulation has become an essential step in grid-connected certification. Developing corresponding simulation test models based on product testing and certification needs can effectively verify the grid-connected operation performance of the converter, including aspects such as fault ride-through and grid adaptability.
[0004] As product simulation and verification demands become increasingly comprehensive and complex, the requirements for simulation models are gradually rising. These models must possess rich functionality and be able to freely combine various disturbance functions. This requirement is particularly important in simulating specific operating conditions of products in the field. However, during the formation of the model's functional set, factors such as modeling methods and signal transmission methods can lead to mutual interference between some test functions, making it difficult to achieve simultaneous implementation. Specifically, a product often requires the development of multiple simulation models for different test scenarios. This situation presents significant challenges to the management and maintenance of product models, especially when the product undergoes technical changes or iterative upgrades, necessitating the simultaneous reconstruction of multiple models to match the changes. Furthermore, the frequent switching, compilation, and restarting of models during actual testing consumes considerable time, severely impacting product simulation testing efficiency and hindering practical use. Summary of the Invention
[0005] This invention overcomes the shortcomings of the prior art and provides an integrated simulation test method for grid-type inverters or converters.
[0006] The objective of this invention is achieved through the following technical solution.
[0007] An integrated simulation testing method for grid-connected inverters or converters includes the following steps:
[0008] A simulated power grid signal construction unit is established. This unit integrates multiple simulation sub-units to obtain the three-phase fault voltage coefficient, fault disturbance frequency, three-phase phase angle offset, harmonic disturbance signal, and three-phase negative sequence component signal. The three-phase positive sequence signal is calculated based on the three-phase fault voltage coefficient, fault disturbance frequency, and three-phase phase angle offset. The three-phase signal is then calculated based on the obtained three-phase positive sequence signal, three-phase negative sequence component signal, and harmonic disturbance signal. Finally, the three-phase signal is converted into a three-phase virtual power grid voltage simulation signal.
[0009] The simulation experiment was conducted by inputting the three-phase virtual grid voltage simulation signal obtained by the simulated grid signal construction unit into the electrical system model.
[0010] Furthermore, the sub-units of the simulated power grid signal construction unit include: fault ride-through unit, frequency disturbance unit, phase angle change unit, harmonic disturbance unit, and unbalance control unit.
[0011] Furthermore, the fault ride-through unit is equipped with a time-amplitude curve. The y-axis of the time-amplitude curve is the voltage axis, which is used to describe the per-unit value V1 of fault voltage 1 and the per-unit value V2 of fault voltage 2. The x-axis of the time-amplitude curve is the time axis t. Starting from point 0, time points a1´, b1´, c1´, d1´, e1´, and f1´ are set on the time axis t. Time point b1´ to time point c1´ represents the duration of fault voltage 1, time point d1´ to time point e1´ represents the duration of fault voltage 2, and time points a1´ to time point b1´, time point c1´ to time point d1´, and time point e1´ to time point f1´ represent the transition time.
[0012] The working steps of the fault-crossing unit are as follows:
[0013] Step A1: Detect the fault parameters input by the user. The fault parameters include fault amplitude, fault time, transition time and number of chain reactions. Input the fault parameters into the time-amplitude curve to generate the corresponding fault crossover curve.
[0014] Step A2: Initialize the value k of the fault timer and the value R of the chain count counter;
[0015] Step A3: Detect the host computer control command. Determine whether the trigger is triggered by the host computer control command. If it is triggered, execute step A4. Otherwise, reset the value R of the interlock count counter and the value k of the fault timer, and then jump to step A8.
[0016] Step A4: Detect the value R of the interlock count counter. If the value R of the interlock count counter is greater than or equal to the interlock count setting value input by the user, reset the value R of the interlock count counter and the value k of the fault timer, and jump to Step A8; if the value R of the interlock count counter is less than the interlock count setting value input by the user, execute Step A5;
[0017] Step A5: Determine the stage of the fault according to the value k of the fault timer,
[0018] When a1´ < k < b1´, it is the transition stage of Fault 1;
[0019] When b1´ < k < c1´, it is the holding stage of Fault 1;
[0020] When c1´ < k < d1´, it is the transition stage from Fault 1 to Fault 2;
[0021] When d1´ < k < e1´, it is the holding stage of Fault 2;
[0022] When e1´ < k < f1´, it is the recovery transition stage of Fault 2;
[0023] When the value k of the fault timer exceeds the single interlock time period range, that is, k ≥ f1´, add 1 to the value R of the interlock count counter, reset the value k of the fault timer, and return to Step A4;
[0024] where, a1´ is the input value of time point a1´; b1´ is the input value of time point b1´; c1´ is the input value of time point c1´; d1´ is the input value of time point d1´; e1´ is the input value of time point e1´; f1´ is the input value of time point f1´; k is the value of the fault timer; R is the value of the interlock count counter; V1 is the per-unit value describing Fault Voltage 1; V2 is the per-unit value describing Fault Voltage 2;
[0025] Step A6: Calculate the single-phase amplitude according to the fault time period in which the value k of the fault timer is located through the generated fault ride-through curve;
[0026] Step A7: Select the phase where the fault occurs according to the user's test requirements input;
[0027] Step A8: Output the three-phase fault voltage coefficients ;
[0028] where, is the first-phase fault voltage coefficient; is the second-phase fault voltage coefficient; is the third-phase fault voltage coefficient.
[0029] Furthermore, the frequency disturbance unit includes two models: frequency step disturbance curve and curve planning disturbance curve. The x-axis of both the frequency step disturbance curve and the curve planning disturbance curve is the time axis t, and the y-axis is the disturbance frequency axis f. The disturbance frequency axis f is provided with the fault disturbance frequency f1 and the grid default frequency f0.
[0030] The time axis t of the frequency step disturbance curve is set with the time point 0 when the disturbance begins and the step disturbance time a2. The time axis t of the curve planning disturbance curve is set with the time point 0 when the disturbance begins, the time point b2 when the fault disturbance frequency f1 is reached, the time point c2 when the disturbance begins to recover, and the time point d2 when the disturbance recovers to the default grid frequency f0.
[0031] The operating steps of the frequency disturbance unit are as follows.
[0032] Step B1: Initialize the frequency disturbance function parameters based on the input power grid default frequency f0, disturbance mode, disturbance time, and ramp disturbance slope.
[0033] Step B2: By detecting the control command from the host computer, determine whether the trigger is triggered. If it is triggered, start the first disturbance timer, record the value z of the first disturbance timer, and execute step B3; otherwise, calculate the power grid frequency according to the default power grid frequency f0, reset the value z of the first disturbance timer, and jump to step B6.
[0034] Step B3: By detecting the control commands from the host computer, obtain the value m used to determine the disturbance mode, and determine the execution frequency step disturbance curve model or the curve planning disturbance curve model based on the value of m.
[0035] Step B4: In the frequency step disturbance curve model mode, when the value z of the first disturbance timer is less than the value of the step disturbance time a2, the grid frequency is calculated according to the fault disturbance frequency f1; when the value z of the first disturbance timer is greater than or equal to the value of the step disturbance time a2, the grid frequency is calculated according to the grid default frequency f0, the value z of the first disturbance timer is reset, and the process jumps to step B6.
[0036] Where a2 is the value of time point a2; z is the value of the first disturbance timer; and f1 is the fault disturbance frequency. This is the default frequency for the power grid.
[0037] Step B5: In the curve planning disturbance curve model mode, detect the host computer control commands and determine the default frequency of the power grid. Fault disturbance frequency The parameters of hold time T, entry rate of change r1, and exit rate of change r2 are used to calculate the specific values of times b2, c2, and d2. The calculation formulas are as follows:
[0038] ;
[0039] Where, r1 is the entering change rate; r2 is the exiting change rate; T is the holding time;
[0040] By comparing the value z of the first disturbance timer with b2, c2, and d2, determine the stage of the disturbance;
[0041] When 0 < z ≤ b2, the stage of the disturbance is the stage from the default grid frequency f0 to the fault disturbance frequency f1;
[0042] When b2 < z ≤ c2, the stage of the disturbance is the stage where the fault disturbance frequency f1 is held;
[0043] When c2 < z ≤ d2, the stage of the disturbance is the stage where the fault disturbance frequency f1 recovers to the default grid frequency f0;
[0044] When the value of z exceeds the disturbance time period range, i.e., z > d2, calculate the grid frequency according to the default grid frequency f0, reset the first disturbance timer z, and execute step B6;
[0045] Step B6: Substitute the value z of the first disturbance timer at the current moment into the corresponding model curve to calculate the grid frequency at the current moment, and calculate the corresponding three-phase grid phase angle through the angle integrator , the three-phase grid phase angle The calculation formula is as follows;
[0046] ;
[0047] Where, is the three-phase grid phase angle at time t; is the grid angular frequency;
[0048] The grid angular frequency The calculation formula is as follows:
[0049] ;
[0050] Where, is the simulated grid frequency, when the grid frequency is the power frequency = = 50Hz, when the grid frequency is an abnormal frequency = ;
[0051] Step B7: Output the three-phase grid phase angle .
[0052] Furthermore, the phase angle mutation unit determines the three-phase grid target offset angle through the host computer control command 、 , Based on the disturbance set time a3, determine the three-phase phase angle offset. , , The working steps of the phase angle mutation unit are as follows:
[0053] Step C1: Input the disturbance time and three-phase disturbance angle parameters according to the test requirements;
[0054] Step C2: Detect the host computer control command and determine whether the trigger is triggered. If it is not triggered, the three-phase phase angle will not shift and the value j of the second disturbance timer will be reset. Jump to step C4. If it is triggered, start the second disturbance timer, record the value j of the second disturbance timer, and proceed to the next determination.
[0055] Step C3: If the value j of the second disturbance timer is less than the value of the disturbance set time a3, then the three-phase offset angle is executed according to the disturbance angle parameter; otherwise, the three-phase phase angle is not offset and the value j of the second disturbance timer is reset.
[0056] Step C4: Based on the target offset angle of the three-phase power grid in the host computer... , , When the offset command and disturbance setting are in place, calculate the three-phase phase angle offset using a3. , , And output; , , The calculation formula is as follows:
[0057] ;
[0058] ;
[0059] in, , , This refers to the three-phase phase angle offset; , , denoted as the target offset angle of the three-phase power grid; j is the value of the second disturbance timer; a3 is the disturbance setting time.
[0060] Furthermore, the harmonic disturbance unit, based on the default phase difference of the power grid, groups the harmonic signals into sets of three phases and determines the harmonic order h of each group of harmonic disturbance signals by detecting control commands from the host computer. n Harmonic content coefficient L n Multiple harmonic signals are superimposed according to the following formula to form the final three-phase harmonic disturbance signal. , , The specific formula is as follows: ;
[0061] in, Let t be the phase angle of phase A of the power grid. … For the 1st Harmonic content coefficients of 2…n harmonic signals; … A1 represents the harmonic order of the 1st, 2nd...nth harmonic signals; A2 represents the A-phase harmonic disturbance signal; B2 represents the B-phase harmonic disturbance signal; C2 represents the C-phase harmonic disturbance signal.
[0062] The working steps of the harmonic disturbance unit are as follows:
[0063] Step D1: Detect the host computer command and initialize the parameters of the harmonic order and harmonic content coefficient for each group of harmonic signals;
[0064] Step D2: Check the host computer command to confirm whether the harmonic disturbance switch is enabled. If it is not enabled, set the harmonic content to zero and jump to D4; if it is enabled, execute step D3.
[0065] Step D3: Based on the harmonic order h n Harmonic content coefficient L n Phase angle of the three-phase power grid at time t Calculate a single group of three-phase harmonic signals;
[0066] Step D4: Superimpose multiple sets of harmonic signals and output three-phase harmonic disturbance signals. , , .
[0067] Furthermore, the operation steps of the imbalance control unit are as follows:
[0068] Step E1: Initialize the input parameters according to the target imbalance.
[0069] Step E2: Calculate the negative sequence signal angle based on the power grid base frequency, and then calculate the unbalance coefficient input from the host computer. Calculate the three-phase negative sequence component signal , , And output, , , The calculation formula is as follows:
[0070] ;
[0071] in, It is the negative order imbalance coefficient; Let A be the phase angle of the A-phase power grid at time t; A3 represents the negative sequence component signal of phase A; B3 represents the negative sequence component signal of phase B; and C3 represents the negative sequence component signal of phase C.
[0072] Furthermore, the expression for the three-phase virtual grid voltage simulation signal is as follows:
[0073] ;
[0074] in, A represents the phase voltage amplitude of the power grid; A, B, and C represent the constructed three-phase signals. , , This is a three-phase virtual power grid voltage simulation signal;
[0075] The formulas for calculating the three-phase signals A, B, and C are as follows:
[0076] ;
[0077] in, , , This is a three-phase positive sequence signal; , , This is a three-phase harmonic disturbance signal; , , This is a three-phase negative sequence component signal;
[0078] Three-phase positive sequence signal , , The calculation formula is as follows:
[0079] ;
[0080] in, , , The three-phase fault voltage coefficients obtained for the fault ride-through unit; , , The three-phase phase angle offset obtained for the phase angle mutation unit; Let t be the phase angle of phase A of the power grid at time t.
[0081] Furthermore, a motor signal construction unit is established, which includes a drive mode unit and a generator mode unit. Both the drive mode unit and the generator mode unit control the mechanical angular velocity and use the voltage equation and electromagnetic torque equation of the permanent magnet synchronous motor model to calculate the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor. By converting the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor into abc signal coordinate transformation, a three-phase motor virtual signal source is obtained. The three-phase motor virtual signal source obtained by the motor signal construction unit is input into the electrical system model for simulation experiments.
[0082] The beneficial effects of this invention are as follows:
[0083] This patent aims to provide a convenient and efficient integrated simulation testing method for hardware-in-the-loop simulation of grid-type converters. By proposing a multi-level signal construction method, it integrates various disturbance types of simulated power grid and motor signals to achieve specific operating condition simulation. The specific operating condition simulation includes power grid fault ride-through, frequency disturbance, phase angle change, power grid harmonics, imbalance control, as well as motor mode switching, motor speed and torque disturbance. The integrated functions of this solution have a high degree of decoupling, allowing users to operate according to actual needs. Through the free combination of different functional modules, complex on-site operating conditions can be reproduced, thereby improving the simulation accuracy and completing customized complex simulation experiments in one go.
[0084] Based on this, the integration of simulation functions greatly reduces the number of hardware-in-the-loop simulation models for converter products, effectively reduces the switching and preparation time of simulation models, and makes simulation model management and iteration simpler and more efficient, significantly improving the development and simulation testing efficiency of control algorithms for grid-type converter products. Attached Figure Description
[0085] Figure 1 This is a schematic diagram of the time-amplitude curve set within the fault ride-through unit;
[0086] Figure 2 These are schematic diagrams of frequency step disturbance curves and curve programming disturbance curves. Detailed Implementation
[0087] The technical solution of the present invention will be further described below through specific embodiments.
[0088] Example 1
[0089] An integrated simulation testing method for grid-connected inverters or converters includes the following steps:
[0090] A simulated power grid signal construction unit is established. This unit integrates multiple simulation sub-units to obtain the three-phase fault voltage coefficient, fault disturbance frequency, three-phase phase angle offset, harmonic disturbance signal, and three-phase negative sequence component signal. The positive sequence signal is calculated based on the three-phase fault voltage coefficient, fault disturbance frequency, and three-phase phase angle offset. The three-phase signal is then calculated based on the obtained positive sequence signal, three-phase negative sequence component signal, and harmonic disturbance signal, and converted into a three-phase virtual power grid voltage simulation signal.
[0091] The simulation experiment was conducted by inputting the three-phase virtual grid voltage simulation signal obtained by the simulated grid signal construction unit into the electrical system model.
[0092] The sub-units of the simulated power grid signal construction unit include: fault ride-through unit, frequency disturbance unit, phase angle change unit, harmonic disturbance unit, and unbalance control unit.
[0093] like Figure 1 As shown, a time-amplitude curve is set within the fault ride-through unit. The y-axis of the time-amplitude curve is the voltage axis, used to describe the per-unit value V1 of fault voltage 1 and the per-unit value V2 of fault voltage 2. The x-axis of the time-amplitude curve is the time axis t. Starting from point 0, time points a1´, b1´, c1´, d1´, e1´, and f1´ are set sequentially on the time axis t. Time point b1´ to time point c1´ represents the duration of fault voltage 1, time point d1´ to time point e1´ represents the duration of fault voltage 2, and time points a1´ to time point b1´, time point c1´ to time point d1´, and time point e1´ to time point f1´ represent the transition time.
[0094] In this embodiment, taking actual testing as an example, two consecutive low-voltage and high-voltage cascading faults occur in a three-phase power grid. Specific parameters include: the per-unit value of low-voltage fault V1 is 0.2 pu, and the amplitude lasts for 200 ms; the per-unit value of high-voltage fault V2 is 1.2 pu, and the amplitude lasts for 300 ms. The voltage drop transition time is 20 ms, and the voltage rise transition time is 10 ms.
[0095] Based on the above test conditions, the faulty phases A, B, and C (three-phase fault voltage coefficient) are selected via the host computer. =1、 =1、 =1), set the interlock count to 2, fault voltage 1 amplitude to 0.2 pu, fault voltage 1 duration to 200 ms, fault voltage 2 amplitude to 1.2 pu, fault voltage 2 duration to 300 ms. The transition time for direction 1 is a1´~b1´ and e1´~f1´, and the transition time for direction 1 is set to 20 ms. The transition time for direction 2 is... , the transition time in the direction 2 is set to 10 ms. The calculation results of the time point parameters b1´, c1´, d1´, e1´, f1´ are as follows:
[0096] b1´ = a1´ + 0.02 (seconds)
[0097] c1´ = b1´ + 0.2 (seconds)
[0098] d1´ = c1´ + 0.01 (seconds)
[0099] e1´ = d1´ + 0.3 (seconds)
[0100] f1´ = e1´ + 0.02 (seconds)
[0101] The working steps of the fault ride-through unit are as follows.
[0102] Step A1: Detect the fault parameters input by the user. The fault parameters include fault amplitude, fault time, transition time, and interlock times. Input the fault parameters into the time-amplitude curve to generate the corresponding fault ride-through curve.
[0103] Step A2: Initialize the value k of the fault timer and the value R of the interlock times counter.
[0104] Step A3: Detect the host computer control command. Determine whether the trigger is triggered through the host computer control command. If triggered, execute Step A4; otherwise, reset the value R of the interlock times counter and the value k of the fault timer, and then jump to Step A8.
[0105] Step A4: Detect the value R of the interlock times counter. If the value of the interlock times counter R is greater than or equal to the set value of the interlock times input by the user, reset the value R of the interlock times counter and the value k of the fault timer, and jump to Step A8; if the value of the interlock times counter R is less than the set value of the interlock times input by the user, execute Step A5.
[0106] Step A5: Determine the fault stage according to the value k of the fault timer.
[0107] When a1´ < k < b1´, it is the fault transition stage.
[0108] When b1´ < k < c1´, it is the fault holding stage.
[0109] When c1´ < k < d1´, it is the fault - fault transition stage.
[0110] When d1´ < k < e1´, it is the fault holding stage.
[0111] When e1´ < k < f1´, it is the fault recovery transition stage.
[0112] When the value k of the fault timer exceeds the range of a single interlocking time period, i.e. k≥f1´, increment the value R of the interlocking count counter by 1, reset the value k of the fault timer, and return to step A4.
[0113] Where a1´ is the input value at time point a1´, in seconds; b1´ is the input value at time point b1´, in seconds; c1´ is the input value at time point c1´, in seconds; d1´ is the input value at time point d1´, in seconds; e1´ is the input value at time point e1´, in seconds; f1´ is the input value at time point f1´, in seconds; k is the value of the fault timer, in seconds; R is the value of the interlock count counter, dimensionless; V1 is the per-unit value describing fault voltage 1, dimensionless; V2 is the per-unit value describing fault voltage 2, dimensionless.
[0114] Step A6: Calculate the single-phase amplitude based on the fault time period in which the fault timer value k is located, using the generated fault ride-through curve.
[0115] Step A7: Select the phase where the fault occurred based on the user's input test requirements;
[0116] Step A8: Output three-phase fault voltage coefficient ;
[0117] in, The fault voltage coefficient for the first phase is dimensionless. The second-phase fault voltage coefficient is dimensionless. The third-phase fault voltage coefficient is dimensionless.
[0118] like Figure 2 As shown, the frequency disturbance unit includes two models: frequency step disturbance curve and curve planning disturbance curve. The x-axis of both the frequency step disturbance curve and the curve planning disturbance curve is the time axis t, and the y-axis is the disturbance frequency axis f. The disturbance frequency axis f is provided with the fault disturbance frequency f1 and the grid default frequency f0.
[0119] The time axis t of the frequency step disturbance curve is set with the time point 0 when the disturbance begins and the step disturbance time a2. The time axis t of the curve planning disturbance curve is set with the time point 0 when the disturbance begins, the time point b2 when the fault disturbance frequency f1 is reached, the time point c2 when the disturbance begins to recover, and the time point d2 when the disturbance recovers to the default grid frequency f0.
[0120] The operating steps of the frequency disturbance unit are as follows.
[0121] Step B1: Initialize the frequency disturbance function parameters based on the input power grid default frequency f0, disturbance mode, disturbance time, and ramp disturbance slope.
[0122] Step B2: Determine whether the trigger is triggered by detecting the host computer control command. If triggered, start the first disturbance timer to record the value z of the first disturbance timer, and execute Step B3; otherwise, calculate the grid frequency according to the default grid frequency f0, reset the value z of the first disturbance timer, and jump to Step B6;
[0123] Step B3: Obtain the value m for determining the disturbance mode by detecting the host computer control command, and determine whether to execute the frequency step disturbance curve model or the curve planning type disturbance curve model according to the value of m;
[0124] Step B4: In the mode of the frequency step disturbance curve model, when the value z of the first disturbance timer is less than the value of the step disturbance time a2, calculate the grid frequency according to the fault disturbance frequency f1; when the value z of the first disturbance timer is greater than or equal to the value of the step disturbance time a2, calculate the grid frequency according to the default grid frequency f0, reset the value z of the first disturbance timer, and jump to Step B6;
[0125] Among them, a2 is the value of time point a2, that is, the step disturbance time, in seconds; z is the value of the first disturbance timer, in seconds; f1 is the fault disturbance frequency, in Hz; is the default grid frequency, in Hz;
[0126] Step B5: In the mode of the curve planning type disturbance curve model, detect the host computer control command to determine the default grid frequency , the fault disturbance frequency , the holding time T, the parameters of the entering change rate r1 and the exiting change rate r2, and calculate the specific values of time points b2, c2 and d2. The calculation formula is as follows,
[0127] ;
[0128] Among them, b2 is in seconds; c2 is in seconds; d2 is in seconds; r1 is the entering change rate, in Hz / s; r2 is the exiting change rate, in Hz / s; T is the holding time, in seconds;
[0129] Judge the disturbance stage by comparing the value z of the first disturbance timer with b2, c2 and d2;
[0130] When 0 < z ≤ b2, the disturbance stage is the stage from the default grid frequency f0 to the fault disturbance frequency f1;
[0131] When b2 < z ≤ c2, the disturbance stage is the stage where the fault disturbance frequency f1 is maintained;
[0132] When c2 < z ≤ d2, the stage where the disturbance is located is the stage where the fault disturbance frequency f1 returns to the grid default frequency f0;
[0133] When the value of z exceeds the disturbance time range, that is, z > d2, calculate the grid frequency according to the grid default frequency f0, reset the first disturbance timer z, and execute step B6;
[0134] Step B6: Substitute the value z of the first disturbance timer at the current moment into the corresponding model curve to calculate the grid frequency at the current moment, and calculate the corresponding three-phase grid phase angle through the angle integrator , the three-phase grid phase angle The calculation formula is as follows;
[0135]
[0136] Where, is the three-phase grid phase angle at time t, in radians;
[0145] The simulated power grid frequency is increased from the default power grid frequency f0 of 50Hz to 52Hz at a rate of 0.5Hz / s, held for 30 seconds, and then restored to the default power grid frequency f0 of 50Hz at a rate of 0.5Hz / s.
[0146] The host computer sets the default power grid frequency f0 to 50Hz, then selects the curve planning disturbance curve model mode to transition to a fault disturbance frequency f1 of 52Hz, holds for 30 seconds, enters a change rate of 0.5Hz / s, exits a change rate of 0.5Hz / s, at this point the fault disturbance frequency f1 = 52Hz, holds for 30 seconds, and enters a change rate... =0.5Hz / s, rate of change =0.5Hz / s. Based on the calculation formula in step B5, the specific values of time b2, c2, and d2 are calculated, and the results are as follows:
[0147] ;
[0148] The above describes the logic of the power grid frequency starting to execute the curve planning frequency disturbance curve model mode after being triggered by the host computer control trigger.
[0149] The phase angle abrupt change unit determines the target offset angle of the three-phase power grid through control commands from the host computer. , , Based on the disturbance set time a3, determine the three-phase phase angle offset. , , The working steps of the phase angle mutation unit are as follows:
[0150] Step C1: Input the disturbance time and three-phase disturbance angle parameters according to the test requirements;
[0151] Step C2: Detect the host computer control command and determine whether the trigger is triggered. If it is not triggered, the three-phase phase angle will not shift and the value j of the second disturbance timer will be reset. Jump to step C4. If it is triggered, start the second disturbance timer, record the value j of the second disturbance timer, and proceed to the next determination.
[0152] Step C3: If the value j of the second disturbance timer is less than the value of the disturbance set time a3, then the three-phase offset angle is executed according to the disturbance angle parameter; otherwise, the three-phase phase angle is not offset and the value j of the second disturbance timer is reset.
[0153] Step C4: Based on the target offset angle of the three-phase power grid in the host computer... , , When the offset command and disturbance setting are in place, calculate the three-phase phase angle offset using a3. , , And output; , , The calculation formula is as follows:
[0154] ;
[0155] ;
[0156] in, , , This represents the three-phase phase angle offset, in rad. , , denoted as 'a', representing the target offset angle of the three-phase power grid in degrees; 'j' represents the value of the second disturbance timer in seconds; and 'a3' represents the disturbance setting time in seconds.
[0157] The specific example of a sudden change in phase angle provided in this embodiment is as follows:
[0158] During the simulated operation of the power grid, a power grid fault caused the voltage of phase A to deviate by 30 degrees, phase B by 60 degrees, and phase C by 90 degrees. The fault lasted for 1 second.
[0159] At this time, the disturbance setting time a3=1s is set by the host computer for phase angle offset, and phase A offset... Phase B offset C-phase shift Once triggered by the phase angle mutation trigger on the host computer, the phase angle mutation logic begins to execute.
[0160] During the phase angle sudden change disturbance, i.e. when the value j of the second disturbance timer is less than 1s, the three-phase phase angle offset is... , , as follows:
[0161] ;
[0162] After the phase angle abrupt disturbance ends, that is, after the value j of the second disturbance timer is greater than 1 second, the three-phase phase angle offset is... , , as follows:
[0163] ;
[0164] The harmonic disturbance unit, based on the default phase difference of the power grid, groups the harmonic signals into sets of three phases. It determines the harmonic order h of each group of harmonic disturbance signals by detecting control commands from the host computer. n Harmonic content coefficient L n Multiple harmonic signals are superimposed according to the following formula to form the final three-phase harmonic disturbance signal. , , The specific formula is as follows:
[0165] ;
[0166] in, Let t be the phase angle of phase A of the power grid at time t, in rad. … For the 1st The harmonic content coefficients of the 2…n harmonic signals are dimensionless. … The harmonic order of the 1st, 2nd...nth harmonic signals is dimensionless; A1 represents the three-phase harmonic disturbance signal, dimensionless; A2 represents the A-phase harmonic disturbance signal, dimensionless; B2 represents the B-phase harmonic disturbance signal, dimensionless; C2 represents the C-phase harmonic disturbance signal, dimensionless.
[0167] In a three-phase power grid, the phase difference between phases A, B, and C is constant. In the above formula, the phase angles of phases B and C are calculated based on the phase angle of phase A. Specifically, phase B lags behind phase A by 120 degrees, and phase C leads phase A by 120 degrees.
[0168] The working steps of the harmonic disturbance unit are as follows:
[0169] Step D1: Detect the host computer command and initialize the parameters of the harmonic order and harmonic content coefficient for each group of harmonic signals;
[0170] Step D2: Check the host computer command to confirm whether the harmonic disturbance switch is enabled. If it is not enabled, set the harmonic content to zero and jump to D4; if it is enabled, execute step D3.
[0171] Step D3: Based on the harmonic order h n Harmonic content coefficient L n Phase angle of the three-phase power grid at time t Calculate a single group of three-phase harmonic signals;
[0172] Step D4: Superimpose multiple sets of harmonic signals and output three-phase harmonic disturbance signals. , , .
[0173] A specific example of a harmonic disturbance unit is as follows:
[0174] In the simulation of a three-phase power grid, two sets of harmonic disturbance signals of different types are added simultaneously. The first set of harmonics is the 7th harmonic with a content of 5%; the second set of harmonics is the 9th harmonic with a content of 6%.
[0175] At this point, the first set of harmonic content is input through the host computer control panel. The first group of harmonics The second group of harmonic content The second group of harmonic orders Then, triggered by the harmonic disturbance trigger, the harmonic disturbance logic of the harmonic disturbance unit begins execution. Three-phase harmonic disturbance signal. , , as follows:
[0176] ;
[0177] After the harmonic disturbance experiment is completed, the harmonic disturbance trigger is removed, and the simulated power grid returns to its pre-disturbance state. At this time, the three-phase harmonic disturbance signal... , , as follows:
[0178] ;
[0179] The working steps of the imbalance control unit are as follows:
[0180] Step E1: Initialize the input parameters according to the target imbalance.
[0181] Step E2: Calculate the negative sequence signal angle based on the power grid base frequency, and then calculate the unbalance coefficient input from the host computer. Calculate the negative-order component signal , , It also outputs three-phase negative sequence component signals. , , The calculation formula is as follows:
[0182] ;
[0183] in, This is the negative order imbalance coefficient, which is dimensionless. Let be the phase angle of phase A of the power grid at time t, in rad; , , A3 represents the three-phase negative sequence component signal, which is dimensionless; B3 represents the phase B negative sequence component signal, which is dimensionless; C3 represents the phase C negative sequence component signal, which is dimensionless.
[0184] The first example of an imbalance control unit is as follows:
[0185] During the simulation of a three-phase power grid, a 4% negative sequence voltage imbalance was observed.
[0186] At this point, the imbalance coefficient is set via the host computer. Three-phase negative sequence component signal , , as follows:
[0187]
[0188] The second example of an imbalance control unit is as follows:
[0189] During the simulation of the three-phase power grid, no negative sequence voltage imbalance was observed.
[0190] At this point, the imbalance coefficient is set via the host computer. Three-phase negative sequence signal , , as follows:
[0191]
[0192] The expression for the three-phase virtual power grid voltage simulation signal is as follows.
[0193]
[0194] in, A represents the phase voltage amplitude of the power grid, in V; A, B, and C represent the constructed three-phase signals, which are dimensionless. , , This is a three-phase virtual power grid voltage simulation signal, in V.
[0195] The formulas for calculating the three-phase signals A, B, and C are as follows:
[0196]
[0197] in, , , It is a three-phase positive sequence signal, dimensionless; , , It is a three-phase harmonic disturbance signal, dimensionless; , , It is a three-phase negative sequence component signal, dimensionless;
[0198] positive sequence signal , , The calculation formula is as follows:
[0199]
[0200] in, , , The three-phase fault voltage coefficients obtained by the fault ride-through unit are dimensionless. , , The three-phase phase angle offset obtained for the phase angle mutation unit, in rad; Let t be the phase angle of phase A of the power grid at time t, in rad.
[0201] Example 2
[0202] Based on Example 1, this scheme establishes a motor signal construction unit in addition to the simulated power grid signal construction unit. The motor signal construction unit includes a drive mode unit and a generator mode unit. Both the drive mode unit and the generator mode unit control the mechanical angular velocity and use the voltage equation and electromagnetic torque equation of the permanent magnet synchronous motor model to calculate the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor. By converting the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor into abc signal coordinate transformation, a three-phase motor virtual signal source is obtained. The three-phase motor virtual signal source obtained by the motor signal construction unit is input into the electrical system model for simulation experiments.
[0203] The voltage equations for the permanent magnet synchronous motor model are as follows.
[0204] ;
[0205] in, These are the d-axis and q-axis voltages, in V. These are the d-axis and q-axis currents, in amperes (A). These are the d-axis and q-axis inductances, in H (watts). Stator resistance, unit is Ω; The flux linkage of a permanent magnet is measured in Wb. is the number of pole pairs of the motor, dimensionless; This refers to the mechanical angular velocity, measured in rad / s.
[0206] The formula for calculating the electromagnetic torque equation is as follows:
[0207]
[0208] in, This represents the electromagnetic torque of the motor, measured in N•m. The number of pole pairs of the motor is dimensionless.
[0209] The working steps of the drag mode unit in the motor signal construction unit are as follows:
[0210] Step F1: According to the test requirements, input the target torque value of the virtual mechanical load and the parameter u1 of the loading change rate;
[0211] Step F2: Initialize the timer value s1 and the register value H1;
[0212] Step F3: Detect whether the input parameters have changed. If they have changed, store the target value before the change in the register value H1 and reset the timer value s1. If the parameters have not changed, proceed to step F4.
[0213] Step F4: Detect the status of the host computer command and determine whether the loading process is controlled by the slope. If it is not controlled by the slope, directly update the current virtual mechanical load target torque value to achieve step loading; if it is controlled by the slope, proceed to step F5.
[0214] Step F5: Start the timer and record the timer value s1;
[0215] Step F6: Based on the virtual load change rate parameter u1 and the timer value s1,
[0216] The formula for calculating the virtual mechanical load torque increment i1 per unit period is as follows:
[0217]
[0218] Where i1 is the virtual mechanical load torque increment in N·m, and u1 is the virtual load loading change rate in N·m / s;
[0219] Step F7: Calculate the virtual mechanical load torque value at the current moment based on the register value H1 and the unit period virtual mechanical load torque increment i1. The mechanical dynamic equation of the permanent magnet synchronous motor is as follows:
[0220]
[0221] in, This refers to the mechanical angular acceleration of the motor shaft, measured in rad / s². 2 ; This represents the mechanical angular velocity of the motor shaft, measured in rad / s. This represents the virtual mechanical load torque, expressed in N•m. is the coefficient of viscous friction, with units of N·m·s / rad; This is the static friction torque, expressed in N•m. The moment of inertia is expressed in kg·m². This represents the electromagnetic torque of the motor, measured in N•m.
[0222] Virtual mechanical load torque for
[0223] ;
[0224] in, The default mechanical load torque, in N•m, is given by the host computer control panel. This represents the virtual mechanical load torque, expressed in N•m.
[0225] Step F8: Determine whether the ramp transition is complete. If the ramp transition is complete, update the value H1 of the register and reset the value s1 of the timer. If the transition is not complete, output the current virtual mechanical load torque value.
[0226] The working steps of the generator mode unit in the motor signal construction unit are as follows:
[0227] Step G1: According to the test requirements, input the target speed value of the virtual generator and the parameter u2 of the loading change rate;
[0228] Step G2: Initialize the timer value s2 and the register value H2;
[0229] Step G3: Detect whether the input parameters have changed. If they have changed, store the target value before the change in the register value H2 and reset the timer value s2. If the parameters have not changed, execute G4.
[0230] Step G4: Detect the status of the host computer command and determine whether the loading process is controlled by the slope. If it is not controlled by the slope, directly update the current target generator speed to achieve step speed change; if it is controlled by the slope, execute G5.
[0231] Step G5: Start the timer, and the timer records the value of s2;
[0232] Step G6: Based on the generator speed change rate parameter u2 and the timer value s2, calculate the virtual generator speed increment i2 per unit period. The calculation formula is as follows:
[0233]
[0234] Where i2 is the generator speed increment in RPM, and u2 is the generator speed change rate in RPM / s;
[0235] Step G7: Calculate the current virtual generator speed value based on the register value H2 and the unit period virtual generator speed increment i2. The mechanical dynamic equation of the permanent magnet synchronous motor is as follows:
[0236]
[0237] in, This refers to the mechanical angular acceleration of the motor shaft, measured in rad / s². 2 ; This represents the mechanical angular velocity of the motor shaft, measured in rad / s. This represents the virtual mechanical load torque, expressed in N•m. is the coefficient of viscous friction, with units of N·m·s / rad; This is the static friction torque, expressed in N•m. The moment of inertia is expressed in kg·m². This represents the electromagnetic torque of the motor, measured in N•m.
[0238] When the motor is in generator mode, the motor shaft speed is... for
[0239] ;
[0240] in, This is the default motor shaft speed, in RPM, which is given by the host computer control panel. This refers to the motor shaft speed, measured in RPM.
[0241] motor shaft speed mechanical angular velocity of the motor shaft The relationship is as follows:
[0242]
[0243] Step G8: Determine whether the ramp transition is complete. If the ramp transition is complete, update the value H2 of the register and reset the value s2 of the timer. If the transition is not complete, output the current virtual generator speed value.
[0244] The generator mode unit has multiple disturbance channels with signal decoupling. Each disturbance channel is controlled by an independent switch. The operation steps of a single disturbance channel in the generator mode unit are as follows:
[0245] Step H1: Initialize the input parameters, which include the perturbation frequencies of the three channels. and disturbance amplitude ;
[0246] Step H2: Detect the host computer command status and determine whether the disturbance switch is closed. If not closed, adjust the disturbance amplitude. If all values are set to 0, proceed to step H4; if closed, proceed to step H3.
[0247] Step H3: Based on the disturbance amplitude Calculate the current value of the disturbance signal using frequency parameters;
[0248] Step H4: Merge the motor default speed and other disturbance channel signals;
[0249] Step H5: Calculate and output the merged motor speed at the current moment. The formula for calculating the motor speed at the current moment is as follows:
[0250]
[0251] in, The default motor speed at time t, in RPM; These are the disturbance amplitude coefficients for the three channels, in RPM. These are the perturbation frequencies for the three channels, expressed in Hz. The speed after the disturbance is expressed in RPM, and t is the current time in seconds.
[0252] In this embodiment, an example of simulating a permanent magnet synchronous motor in a driving condition is as follows:
[0253] The virtual mechanical load torque increases from 10 N•m to 10000 N•m at a rate of change of 1000 N•m / s. At this point, the motor operating mode is selected as drive mode via the host computer control panel. Then, the virtual load change rate u1 is set to 1000 N•m / s. Finally, the virtual mechanical load torque on the host computer control panel is changed from 10 N•m to 10000 N•m. The virtual mechanical load increment i1 is as follows:
[0254]
[0255] During load transition, virtual mechanical load torque for:
[0256]
[0257] After the load change is completed:
[0258]
[0259] In this embodiment, an example of simulating a permanent magnet synchronous motor in power generation mode is as follows:
[0260] The mechanical shaft speed is reduced from 200 RPM to 100 RPM at a rate of 50 RPM / s.
[0261] At this point, select generator mode for the motor operating mode via the host computer control panel, then set the generator speed change rate u2 to -50 RPM / s, and finally change the generator speed on the host computer control panel from 200 RPM to 100 RPM. The generator speed increment i2 is as follows:
[0262]
[0263] During the speed change transition, the motor shaft speed for:
[0264]
[0265] After the gear shift is complete:
[0266]
[0267] In this embodiment, an example of generator speed disturbance is as follows:
[0268] When the simulated generator is running at 200 RPM, periodic speed fluctuations occur, and two different disturbance signals are superimposed. The first speed disturbance has a frequency of 30 Hz and an amplitude of 20 RPM, and the second speed disturbance has a frequency of 40 Hz and an amplitude of 10 RPM.
[0269] At this point, the generator's default speed is set via the host computer panel. RPM, first-path speed disturbance parameter Second-path speed disturbance parameters Third-path speed disturbance parameters RPM; the motor speed at current time t. as follows:
[0270] .
[0271] The embodiments of the present invention have been described in detail above, but the content described is only a preferred embodiment of the present invention and should not be considered as limiting the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the patent coverage of the present invention.
Claims
1. An integrated simulation and testing method for grid-connected inverters or converters, characterized in that, Includes the following steps: A simulated power grid signal construction unit is established. This unit integrates multiple simulation sub-units to obtain the three-phase fault voltage coefficient, fault disturbance frequency, three-phase phase angle offset, harmonic disturbance signal, and three-phase negative sequence component signal. The three-phase positive sequence signal is calculated based on the three-phase fault voltage coefficient, fault disturbance frequency, and three-phase phase angle offset. The three-phase signal is then calculated based on the obtained three-phase positive sequence signal, three-phase negative sequence component signal, and harmonic disturbance signal. Finally, the three-phase signal is converted into a three-phase virtual power grid voltage simulation signal. Simulation experiments were conducted by inputting the three-phase virtual grid voltage simulation signal obtained by the simulated grid signal construction unit into the electrical system model. The expression for the three-phase virtual power grid voltage simulation signal is as follows. ; in, A represents the phase voltage amplitude of the power grid; A, B, and C represent the constructed three-phase signals. , , This is a three-phase virtual power grid voltage simulation signal; The formulas for calculating the three-phase signals A, B, and C are as follows: ; in, , , This is a three-phase positive sequence signal; , , This is a three-phase harmonic disturbance signal; , , This is a three-phase negative sequence component signal; Three-phase positive sequence signal , , The calculation formula is as follows: ; in, , , The three-phase fault voltage coefficients obtained for the fault ride-through unit; , , The three-phase phase angle offset obtained for the phase angle mutation unit; Let t be the phase angle of phase A of the power grid at time t; A motor signal construction unit was also established, which includes a drive mode unit and a generator mode unit. Both the drive mode unit and the generator mode unit control the mechanical angular velocity and use the voltage equation and electromagnetic torque equation of the permanent magnet synchronous motor model to calculate the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor. By converting the virtual voltage and current in the dq coordinate system of the permanent magnet synchronous motor into abc signal coordinate transformation, a three-phase motor virtual signal source is obtained. The three-phase motor virtual signal source obtained by the motor signal construction unit is input into the electrical system model for simulation experiments.
2. The integrated simulation and testing method for grid-type inverters or converters according to claim 1, characterized in that, The sub-units of the simulated power grid signal construction unit include: fault ride-through unit, frequency disturbance unit, phase angle change unit, harmonic disturbance unit, and unbalance control unit.
3. The integrated simulation testing method for grid-type inverters or converters according to claim 2, characterized in that: The fault ride-through unit is equipped with a time-amplitude curve. The y-axis of the time-amplitude curve is the voltage axis, which is used to describe the per-unit value V1 of fault voltage 1 and the per-unit value V2 of fault voltage 2. The x-axis of the time-amplitude curve is the time axis t. Starting from point 0, the time points a1´, b1´, c1´, d1´, e1´, and f1´ are set sequentially on the time axis t. The time point b1´ to time point c1´ represents the duration of fault voltage 1, the time point d1´ to time point e1´ represents the duration of fault voltage 2, and the time points a1´ to time point b1´, c1´ to time point d1´, and e1´ to time point f1´ represent the transition time. The working steps of the fault-crossing unit are as follows: Step A1: Detect the fault parameters input by the user. The fault parameters include fault amplitude, fault time, transition time and number of chain reactions. Input the fault parameters into the time-amplitude curve to generate the corresponding fault crossover curve. Step A2: Initialize the value k of the fault timer and the value R of the chain count counter; Step A3: Detect the host computer control command. Determine whether the trigger is triggered by the host computer control command. If it is triggered, execute step A4. Otherwise, reset the value R of the interlock count counter and the value k of the fault timer, and then jump to step A8. Step A4: Detect the value R of the chain count counter. If the value R of the chain count counter is greater than or equal to the chain count set value input by the user, reset the value R of the chain count counter and the value k of the fault timer, and jump to Step A8; if the value R of the chain count counter is less than the chain count set value input by the user, execute Step A5; Step A5: Determine the fault stage according to the value k of the fault timer, When a1´ < k < b1´, it is the transition stage of Fault 1; When b1´ < k < c1´, it is the holding stage of Fault 1; When c1´ < k < d1´, it is the transition stage from Fault 1 to Fault 2; When d1´ < k < e1´, it is the holding stage of Fault 2; When e1´ < k < f1´, it is the recovery transition stage of Fault 2; When the value k of the fault timer exceeds the single-chain time period range, that is, k ≥ f1´, increment the value R of the chain count counter by 1, reset the value k of the fault timer, and return to Step A4; Where, a1´ is the input value of time point a1´; b1´ is the input value of time point b1´; c1´ is the input value of time point c1´; d1´ is the input value of time point d1´; e1´ is the input value of time point e1´; f1´ is the input value of time point f1´; k is the value of the fault timer; R is the value of the chain count counter; V1 is the per-unit value describing Fault Voltage 1; V2 is the per-unit value describing Fault Voltage 2; Step A6: Calculate the single-phase amplitude according to the fault time period in which the value k of the fault timer is located through the generated fault ride-through curve; Step A7: Select the phase where the fault occurs according to the user's test requirements input; Step A8: Output three-phase fault voltage coefficient ; in, The fault voltage coefficient for the first phase; The fault voltage coefficient for the second phase; This represents the fault voltage coefficient for the third phase.
4. The integrated simulation testing method for grid-type inverters or converters according to claim 3, characterized in that: The frequency disturbance unit includes models of two modes: the frequency step disturbance curve and the curve-programmed disturbance curve. The x-axis of both the frequency step disturbance curve and the curve-programmed disturbance curve is the time axis t, and the y-axis is the disturbance frequency axis f. On the disturbance frequency axis f, there are the fault disturbance frequency f1 and the grid default frequency f0; On the time axis t of the frequency step disturbance curve, there are the time point 0 when the disturbance starts to occur and the step disturbance time a2. On the time axis t of the curve-programmed disturbance curve, there are the time point 0 when the disturbance starts to occur, the time point b2 when it reaches the fault disturbance frequency f1, the time point c2 when the disturbance starts to recover, and the time point d2 when it recovers to the grid default frequency f0; [[ID= Step B4: In the mode of the frequency step disturbance curve model, when the value z of the first disturbance timer is less than the value of the step disturbance time a2, the grid frequency is calculated according to the fault disturbance frequency f1; when the value z of the first disturbance timer is greater than or equal to the value of the step disturbance time a2, the grid frequency is calculated according to the grid default frequency f0, the value z of the first disturbance timer is reset, and the process jumps to Step B6; Where a2 is the value of time point a2; z is the value of the first disturbance timer; and f1 is the fault disturbance frequency. This is the default frequency for the power grid. Step B5: In the curve planning disturbance curve model mode, detect the host computer control commands and determine the default frequency of the power grid. Fault disturbance frequency The parameters of hold time T, entry rate of change r1, and exit rate of change r2 are used to calculate the specific values of times b2, c2, and d2. The calculation formulas are as follows: ; Among them, r1 is the entry change rate; r2 is the exit change rate; T is the hold time; By comparing the value z of the first disturbance timer with b2, c2, and d2, the stage of the disturbance is judged; When 0 < z ≤ b2, the stage of the disturbance is the stage of transitioning from the grid default frequency f0 to the fault disturbance frequency f1; When b2 < z ≤ c2, the stage of the disturbance is the stage of maintaining the fault disturbance frequency f1; When c2 < z ≤ d2, the stage of the disturbance is the stage of restoring the fault disturbance frequency f1 to the grid default frequency f0; When the value of z exceeds the disturbance time range, that is, z > d2, the grid frequency is calculated according to the grid default frequency f0, the first disturbance timer z is reset, and Step B6 is executed; Step B6: Substitute the value z of the first disturbance timer at the current moment into the corresponding model curve to calculate the grid frequency at the current moment, and calculate the corresponding three-phase grid phase angle using an angle integrator. Three-phase power grid phase angle The calculation formula is as follows; ; in, Let be the phase angle of the three-phase power grid at time t; The angular frequency of the power grid; Grid angular frequency The calculation formula is as follows: ; in, To simulate the power grid frequency, when the power grid frequency is the power frequency... = =50Hz, when the power grid frequency is an abnormal frequency = ; Step B7: Output the phase angle of the three-phase power grid .
5. The integrated simulation testing method for grid-type inverters or converters according to claim 4, characterized in that: The phase angle abrupt change unit determines the target offset angle of the three-phase power grid through control commands from the host computer. , , Based on the disturbance set time a3, determine the three-phase phase angle offset. , , The working steps of the phase angle mutation unit are as follows: Step C1: Input the disturbance time and three-phase disturbance angle parameters according to the test requirements; Step C2: Detect the host computer control command, determine whether the trigger is triggered. If not triggered, the three-phase phase angle does not shift and the value j of the second disturbance timer is reset, and the process jumps to Step C4; if triggered, the second disturbance timer is started, the value j of the second disturbance timer is recorded, and the next judgment is executed; Step C3: If the value j of the second disturbance timer is less than the value of the disturbance setting time a3, the three-phase offset angle is executed according to the disturbance angle parameter; otherwise, the three-phase phase angle does not shift and the value j of the second disturbance timer is reset; Step C4: Based on the target offset angle of the three-phase power grid in the host computer... , , When the offset command and disturbance setting are in place, calculate the three-phase phase angle offset using a3. , , And output; , , The calculation formula is as follows: ; ; in, , , This refers to the three-phase phase angle offset; , , denoted as the target offset angle of the three-phase power grid; j is the value of the second disturbance timer; a3 is the disturbance setting time.
6. The integrated simulation testing method for grid-type inverters or converters according to claim 5, characterized in that: The harmonic disturbance unit, based on the default phase difference of the power grid, groups the harmonic signals into sets of three phases. It determines the harmonic order h of each group of harmonic disturbance signals by detecting control commands from the host computer. n Harmonic content coefficient L n Multiple harmonic signals are superimposed according to the following formula to form the final three-phase harmonic disturbance signal. , , The specific formula is as follows: ; in, Let t be the phase angle of phase A of the power grid. … For the 1st Harmonic content coefficients of 2…n harmonic signals; … A1 represents the harmonic order of the 1st, 2nd...nth harmonic signals; A2 represents the A-phase harmonic disturbance signal; B2 represents the B-phase harmonic disturbance signal; C2 represents the C-phase harmonic disturbance signal. The working steps of the harmonic disturbance unit are as follows: Step D1: Detect the host computer command and initialize the parameters of the harmonic order and harmonic content coefficient of each group of harmonic signals; Step D2: Detect the host computer command to confirm whether the harmonic disturbance switch is enabled. If not enabled, the harmonic content is set to zero and the process jumps to D4; if enabled, Step D3 is executed; Step D3: Based on the harmonic order h n Harmonic content coefficient L n Phase angle of the three-phase power grid at time t Calculate a single group of three-phase harmonic signals; Step D4: Superimpose multiple sets of harmonic signals and output three-phase harmonic disturbance signals. , , .
7. The integrated simulation testing method for grid-type inverters or converters according to claim 6, characterized in that: The working steps of the unbalance control unit are as follows: Step E1: Initialize the input parameters according to the target unbalance; Step E2: Calculate the negative sequence signal angle based on the power grid base frequency, and then calculate the unbalance coefficient input from the host computer. Calculate the three-phase negative sequence component signal , , And output, , , The calculation formula is as follows: ; in, It is the negative order imbalance coefficient; Let A be the phase angle of the A-phase power grid at time t; A3 represents the negative sequence component signal of phase A; B3 represents the negative sequence component signal of phase B; and C3 represents the negative sequence component signal of phase C.