Network-formation type energy storage converter control method and system based on virtual synchronous generator
Patent Information
- Application Number
- CN202611415771.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
现有技术通过设置固定虚拟惯量和阻尼系数的二阶转子运动方程进行虚拟频率及相位计算,鉴于真实同步发电机的阻尼系数随转差率非线性变化,而固定参数二阶模型将其视为恒定常数,导致输出轨迹只能反映线性、对称的转子响应,与真实发电机的非线性转矩变化产生相位偏差
[0016] (1) This invention reconstructs the fundamental torque response by collecting three-phase voltage and three-phase current sequences under power grid fluctuation conditions, obtains the fundamental torque sequence, and uses a multilayer perceptron to encode the torque fluctuation features to generate a normalized torque feature vector. Since the fundamental torque response reconstruction can restore the motor torque change from the coupling relationship between voltage and current, and the multilayer perceptron can map and compress the nonlinear correlation in torque fluctuation, it solves the problem that the fixed parameter rotor motion equation is difficult to describe the torque response such as asymmetric overshoot and oscillation attenuation, and improves the completeness and characterization ability of torque dynamic feature extraction under complex power grid fluctuation.
Smart Images

Figure CN122931767A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical technology, and in particular to a control method and system for a grid-type energy storage converter based on a virtual synchronous generator. Background Technology
[0002] Currently, with the large-scale integration of new energy and energy storage devices, multiple grid-connected energy storage converters need to work together to provide inertia and damping support under grid fluctuations such as load surges and line fault clearing. Distributed control can adjust the power output of parallel nodes according to the local operating status of each device. However, the torque response of a real synchronous generator is affected by magnetic circuit saturation, electromechanical coupling, and mechanical damping, exhibiting asymmetric overshoot and oscillatory decay. Moreover, frequency and phase deviations are easily generated between devices. Therefore, coordinated control technology that can characterize nonlinear dynamics and meet real-time computing requirements is needed.
[0003] An existing fixed-parameter virtual synchronous generator control technology collects three-phase electrical quantities at the converter grid connection point using voltage and current sensors to calculate active and reactive power. The controller compares the active power command with the measured active power, inputs the power difference into a second-order rotor motion equation with a fixed virtual inertia and damping coefficient, and obtains the virtual angular frequency and phase angle through discrete integration. This is then combined with a reactive-voltage control loop to generate a modulation voltage command, which is used to generate drive signals for the power switching devices via space vector pulse width modulation. However, this existing technology calculates the virtual frequency and phase by setting a fixed virtual inertia and damping coefficient in the second-order rotor motion equation. Since the damping coefficient of a real synchronous generator varies nonlinearly with slip, and the fixed-parameter second-order model treats it as a constant, the output trajectory can only reflect a linear and symmetrical rotor response, resulting in a phase deviation from the nonlinear torque changes of the real generator.
[0004] Therefore, existing technologies are insufficient to suppress power oscillations in multi-machine parallel nodes under grid fluctuations. Summary of the Invention
[0005] This invention provides a control method and system for a grid-connected energy storage converter based on a virtual synchronous generator, in order to suppress power oscillations at multi-machine parallel nodes under grid fluctuations.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a control method for a grid-connected energy storage converter based on a virtual synchronous generator, comprising:
[0007] Collect the three-phase voltage sequence and three-phase current sequence under power grid fluctuation conditions, and reconstruct the fundamental torque response from the three-phase voltage sequence and the three-phase current sequence to obtain the fundamental torque sequence.
[0008] The fundamental torque sequence is encoded with torque fluctuation features using a pre-trained multilayer perceptron to obtain a normalized torque feature vector;
[0009] The normalized torque eigenvector is subjected to an auto-Kronecker product to obtain a high-dimensional eigenvector. A virtual rotor tensor coupling mapping is performed based on the high-dimensional eigenvector and a preset initial state matrix to obtain a nonlinear coupling matrix. The nonlinear coupling matrix is then subjected to singular value dimensionality reduction reconstruction to obtain a dimensionality-reduced coupling matrix. Finally, a nonlinear disturbance term is embedded based on the dimensionality-reduced coupling matrix and the initial state matrix to obtain a nonlinear rotor model.
[0010] The operating voltage sequence of the grid-type energy storage converter is collected, and the virtual frequency trajectory is derived based on the nonlinear rotor model and the operating voltage sequence to obtain the model frequency trajectory.
[0011] The maximum deviation between the model frequency trajectory and the preset real reference trajectory is extracted to obtain the trajectory deviation amount, and the model frequency trajectory is corrected according to the trajectory deviation amount to obtain the control frequency trajectory;
[0012] The grid-type energy storage converter is controlled according to the control frequency trajectory to suppress power oscillations.
[0013] Secondly, the present invention provides a grid-type energy storage converter control system based on a virtual synchronous generator, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0014] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] (1) This invention reconstructs the fundamental torque response by collecting three-phase voltage and three-phase current sequences under power grid fluctuation conditions, obtains the fundamental torque sequence, and uses a multilayer perceptron to encode the torque fluctuation features to generate a normalized torque feature vector. Since the fundamental torque response reconstruction can restore the motor torque change from the coupling relationship between voltage and current, and the multilayer perceptron can map and compress the nonlinear correlation in torque fluctuation, it solves the problem that the fixed parameter rotor motion equation is difficult to describe the torque response such as asymmetric overshoot and oscillation attenuation, and improves the completeness and characterization ability of torque dynamic feature extraction under complex power grid fluctuation.
[0017] (2) This invention performs an auto-Kronecker product on the normalized torque eigenvectors and performs virtual rotor tensor coupling mapping between the resulting high-dimensional eigenvectors and the initial state matrix. After singular value decomposition to retain the main singular components, a dimension-reduced coupling matrix is formed, which is then embedded into the nonlinear disturbance input of the initial state matrix. Since the auto-Kronecker product can extend the higher-order interaction relationship between torque features, the tensor coupling mapping can establish the correlation between torque fluctuation features and rotor state variables, and singular value reduction can reduce the amount of matrix operation while retaining the main coupling information, it solves the problem that the linearized virtual rotor model is difficult to reflect complex electromechanical transient characteristics, realizes the model-based expression of real torque nonlinear characteristics, and takes into account both model derivation accuracy and real-time calculation efficiency.
[0018] (3) This invention uses the operating voltage sequence of the grid-type energy storage converter as input into a nonlinear rotor model to perform virtual frequency trajectory extrapolation, extracts the maximum deviation between the model frequency trajectory and the real reference trajectory, and selects whether to use Kalman filtering and polynomial smoothing for trajectory correction based on the trajectory deviation. Finally, the grid-type energy storage converter is controlled according to the control frequency trajectory. Since the maximum deviation can reflect the local severe mismatch in the frequency trajectory, Kalman filtering can integrate the rotor motion state prediction with the current trajectory observation, and polynomial smoothing can weaken the residual fluctuations in the corrected trajectory. This solves the problem of phase deviation between the virtual frequency response and the real dynamics and the difficulty in adapting to different disturbance intensities, improves the tracking accuracy of the frequency trajectory, and thus suppresses the power oscillation of multi-machine parallel nodes and improves the operating stability under grid fluctuation conditions. Attached Figure Description
[0019] Figure 1 This is a schematic flowchart of the grid-type energy storage converter control method based on a virtual synchronous generator provided in the first embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram of the high-dimensional feature matrix of the self-Kronecker product provided in the first embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Reference Figure 1 The first embodiment of the present invention provides a control method for a grid-connected energy storage converter based on a virtual synchronous generator, comprising the following steps:
[0023] S11, Collect the three-phase voltage sequence and three-phase current sequence under power grid fluctuation conditions, and reconstruct the fundamental torque response of the three-phase voltage sequence and the three-phase current sequence to obtain the fundamental torque sequence;
[0024] S12, a pre-trained multilayer perceptron is used to encode the torque fluctuation features of the fundamental torque sequence to obtain a normalized torque feature vector;
[0025] S13, perform auto-Kronecker product operation on the normalized torque eigenvector to obtain a high-dimensional eigenvector, perform virtual rotor tensor coupling mapping based on the high-dimensional eigenvector and the preset initial state matrix to obtain a nonlinear coupling matrix, perform singular value dimensionality reduction reconstruction on the nonlinear coupling matrix to obtain a dimensionality-reduced coupling matrix, and embed nonlinear disturbance terms based on the dimensionality-reduced coupling matrix and the initial state matrix to obtain a nonlinear rotor model;
[0026] S14, Collect the operating voltage sequence of the grid-type energy storage converter, and perform virtual frequency trajectory deduction based on the nonlinear rotor model and the operating voltage sequence to obtain the model frequency trajectory;
[0027] S15, extract the maximum deviation between the model frequency trajectory and the preset real reference trajectory to obtain the trajectory deviation amount, and perform trajectory correction on the model frequency trajectory according to the trajectory deviation amount to obtain the control frequency trajectory;
[0028] S16, control the grid-type energy storage converter to suppress power oscillation according to the control frequency trajectory.
[0029] In step S11, the three-phase voltage sequence and three-phase current sequence under the power grid fluctuation state are collected, and the fundamental torque response is reconstructed on the three-phase voltage sequence and the three-phase current sequence to obtain the fundamental torque sequence.
[0030] Specifically, three-phase voltage and current sensors are installed at the grid connection point of the grid-connected energy storage converter, and the three-phase voltage and current sequences are acquired through a 6-channel synchronous sampling analog-to-digital converter in the controller. The start and end times of grid fluctuations are determined by reading existing fluctuation event record flags in the control design document. These flags are generated by voltage over-limit criteria, frequency over-limit criteria, and power step criteria. The limit values for each criterion are the protection settings and power change record settings in the control design document. The turns ratio, polarity, phase error, and calibration validity range of each sensor are read from the corresponding measurement chain calibration certificate. All six channels are started by the same sampling trigger pulse, and a common timestamp is written to each set of sampled values by the controller's hardware clock. Each row of the three-phase voltage sequence sequentially displays the timestamp, A-phase voltage value, B-phase voltage value, and C-phase voltage value; each row of the three-phase current sequence sequentially displays the same timestamp and A-phase, B-phase, and C-phase current values. Sampling period. Read the design values of the controller's analog-to-digital conversion cycle task and verify them using the difference between adjacent timestamps. The deviation of the difference between adjacent timestamps should be considered. When the sampling frequency exceeds the timestamp clock resolution, the sampling record is interrupted at that point. The sampling frequency should be higher than twice the cutoff frequency of the analog anti-aliasing filter, which is read from the product technical documentation of the acquisition device. If any voltage or current value exceeds the corresponding calibration valid range, the analog-to-digital converter saturates, the timestamp is duplicated, or the timestamp is missing, the corresponding sampling time is determined as an invalid sampling time, and a continuous valid sampling segment is formed accordingly.
[0031] Each consecutive valid sampling segment is arranged in ascending order of timestamp, without interpolation of invalid sampling times. The rated grid frequency is read from the control design document and verified to be consistent with the rated frequency recorded on the equipment nameplate. The rated fundamental frequency window length is taken as the number of sampling points per rated fundamental frequency period specified in the control design document, and verified to be one rated fundamental frequency period divided by the sampling period. The most recent positive integer of the obtained value. Using the current sampling time as the end of the window, multiple sets of three-phase voltage and current values of the rated fundamental frequency window length are extracted from the same continuous effective sampling segment to form a rated fundamental frequency sliding window. The voltage and current values of each phase are multiplied by the rated grid frequency and sampling period, respectively. The cosine and sine reference values generated from the sampling positions within the window are then summed and multiplied respectively. Divide by the rated fundamental window length to obtain the fundamental voltage complex phase and fundamental current complex phase of each phase expressed in RMS value. The cosine reference value and sine reference value use the window end timestamp as the phase reference, and each sampled value within the window uses the same weight. Add the fundamental voltage complex phase of phase A, the fundamental voltage complex phase of phase B after rotating counterclockwise by 120 degrees, and the fundamental voltage complex phase of phase C after rotating counterclockwise by 240 degrees, and divide by 3 to obtain the positive sequence fundamental voltage complex phase. When the magnitude of adjacent positive sequence fundamental voltage complex phases is not lower than the lower limit of the RMS value of the positive sequence fundamental voltage, multiply the current positive sequence fundamental voltage complex phase by the complex conjugate of the previous positive sequence fundamental voltage complex phase, take the argument of the obtained complex number, and divide by 3. The fundamental angular frequency increment is obtained, and this increment is added to the fundamental angular frequency of the previous moment to obtain the fundamental angular frequency of the current moment. The above calculation relationship is as follows:
[0032] ;
[0033] ;
[0034] ;
[0035] ;
[0036] In the formula, This indicates the rated fundamental frequency window length, i.e., the number of sampling points contained in the window; Indicates the rated power grid frequency; Indicates the sampling period; Indicates the current sampling time sequence number; Indicates the sampling position within the window; Indicates the first The reference phase angle corresponding to each sampling position; Indicates separation, and ; express Phase in The voltage or current sampled value at each sampling moment; express Xiangzai The fundamental voltage or current complex phasor at a given moment; and They represent Xiangzai The fundamental voltage complex and fundamental current complex at time t; , and They represent phases A, B, and C respectively. The fundamental voltage phasor at time t; express The positive-sequence fundamental voltage complex phasor at time t; express The increment of the fundamental angular frequency at time t; express The fundamental angular frequency at time t; Represents the imaginary unit; Represents the natural constant; Represents pi; This indicates taking the nearest integer; Indicates the argument of a complex number; superscript Indicates complex conjugation.
[0037] The lower limit of the positive-sequence fundamental voltage RMS value is taken as the larger of the minimum measurable positive-sequence fundamental RMS value specified in the voltage measurement chain calibration certificate and the low-voltage frequency calculation blocking value specified in the control design document. When the fundamental angular frequency is lower than the frequency protection lower limit or higher than the frequency protection upper limit in the control design document, no fundamental torque value is generated for the corresponding sampling time. For each phase, the fundamental voltage complex phasor is first multiplied by the complex conjugate of the fundamental current complex phasor, and the real part of the resulting complex number is taken. Then, the real parts of the three phases are added together to obtain the fundamental active power. The upper limit of the three-phase active power is calculated by multiplying the fundamental voltage complex phasor and the conjugate of the fundamental current complex phasor of each phase, taking the real part, and summing the results to obtain the maximum value of the active power at each sampling time. The fundamental active power is divided by the fundamental angular frequency at the same sampling time to obtain the fundamental torque. The positive direction of the current sensor is determined according to the wiring direction of the grid-type energy storage converter outputting current to the grid. The upper limit of the absolute value of the fundamental torque is obtained by dividing the upper limit of the three-phase active power by the minimum fundamental angular frequency. Fundamental torque exceeding this upper limit is deleted as an outlier and is not subject to amplitude limiting. The first rated fundamental window length of each consecutive effective sampling segment is used to form adjacent rated fundamental sliding windows. The remaining effective fundamental torque values and their corresponding timestamps are arranged in chronological order to obtain a fundamental torque sequence composed of timestamps and fundamental torque values. Different consecutive effective sampling segments are kept as independent sequence segments and are directly used as input for torque fluctuation feature encoding in step S12.
[0038] The calculation relationship between the fundamental active power and the fundamental torque is as follows:
[0039] ;
[0040] ;
[0041] In the formula, express The three-phase fundamental active power at a given time; Indicates separation; and They represent Xiangzai The fundamental voltage complex and fundamental current complex at time t; Indicates taking the real part of a complex number; superscript Indicates complex conjugation; express Fundamental torque at time t; express The fundamental angular frequency at time t; This represents the maximum value of the three-phase fundamental active power during all valid sampling times; This represents the minimum fundamental angular frequency across all valid sampling times. Indicates the upper limit of the absolute value of the fundamental torque; and These represent the sequence numbers of the valid sampling times. Take the maximum and minimum values.
[0042] In step S12, a pre-trained multilayer perceptron is used to encode the torque fluctuation features of the fundamental torque sequence to obtain a normalized torque feature vector.
[0043] Specifically, each continuous effective fundamental torque sequence output in step S11 is arranged in ascending order of timestamp, and the torque observation duration specified in the control design document is continuously truncated and divided by the sampling period. The most recent positive integer fundamental torque value is then taken to form the fundamental torque encoding window. The window movement step size is one sampling period. Continuous valid fundamental torque sequences shorter than the window length do not form a fundamental torque encoding window. The pre-trained multilayer perceptron is an encoding-decoding model pre-built with the control software version. Its historical fundamental torque encoding window is derived from the type test records and post-commissioning fluctuation event records of the same type of grid-connected energy storage converter, and is generated in accordance with the method described in step S11. The type test record includes at least one waveform condition from voltage drop, frequency ramp, load step, and fault clearing recovery. The waveform amplitude, slope, duration, and recovery time are read from the control design document. If the historical records of the same type are insufficient, the trial operation records of the current equipment are collected before grid connection according to the same waveform conditions to supplement them. If the first set of equipment has no historical records of the same type, the type test is performed and the trial operation records are collected. Only historical fundamental torque encoding windows with continuous timestamps, fundamental torque values between the negative and positive effective limits of fundamental torque, and complete fluctuation event records are retained, and then arranged from earliest to latest according to the event occurrence time. The first 80% of the historical fundamental torque encoding windows are used as training samples, and the remaining historical fundamental torque encoding windows are used as validation samples. The division ratio is read from the control software model design file. All fundamental torque values in the training samples are arranged from smallest to largest, and the 1st percentile, 50th percentile, and 99th percentile values are read respectively. For each fundamental torque value, the 50th percentile value is subtracted first, and then divided by the larger of the two differences obtained by subtracting the 50th percentile value from the 99th percentile value and subtracting the 1st percentile value from the 50th percentile value. The resulting value is then restricted to a closed interval from -1 to 1 to obtain the normalized fundamental torque encoding window. When both differences are less than the fundamental torque measurement resolution, the fundamental torque measurement resolution is used as the divisor to avoid division by zero in the normalization operation.
[0044] The above encoding window length and normalization relationship are as follows:
[0045] ;
[0046] ;
[0047] ;
[0048] In the formula, This indicates the number of sampling points contained in a fundamental torque encoding window; Indicates the duration of torque observation; Indicates the sampling period; , and These represent the 1st, 50th, and 99th percentile values of the fundamental torque in the sample set, respectively. Indicates the resolution of the fundamental torque measurement; Indicates the normalization scale; Indicates the sampling position within the encoding window; Indicates the first One fundamental frequency torque value; Indicates the first One normalized fundamental torque value; This indicates taking the nearest integer; Indicates will Limited to Closed interval.
[0049] The encoding part of the pre-trained multilayer perceptron consists of an input layer, a hidden layer, and a feature output layer. The number of nodes in the input layer is equal to the length of the fundamental torque encoding window. The number of nodes in the hidden layer is twice the number of nodes in the feature output layer, and the number of nodes in the feature output layer is 'd'. The widths of all three layers are written into the control software model design file. The determination of 'd' does not depend on the already generated nonlinear coupling matrix. Instead, before forming the nonlinear coupling matrix, an upper bound is estimated based on the matrix storage capacity corresponding to the candidate 'd' and the worst-case processor cycle for matrix multiplication, while satisfying the model storage capacity and one sampling cycle. The maximum integer value among the candidate values for completing matrix operations and the upper limit of feature reconstruction error specified in the control design document is selected; if any constraint is not satisfied even when candidate d is 1, the current multilayer perceptron is not constructed. The input layer weight matrix has 2d rows and a sum of... The input layer bias vector has 2d components, and the normalized fundamental torque encoding windows are arranged in chronological order as follows: A column vector. First, multiply the input layer weight matrix by the aforementioned... The hidden layer output vector is obtained by multiplying the output layer weight matrix by the hidden layer output vector, then adding the input layer bias vector component by component, and setting the negative components to 0. The output layer weight matrix has d rows and 2d columns, and the output layer bias vector has d components. The output layer weight matrix is multiplied by the hidden layer output vector, and then the output layer bias vector is added component by component to obtain the d-dimensional torque fluctuation feature vector. The decoding part sequentially sets up a 2d-node decoding hidden layer and... The decoding output layer has 2d nodes. The decoding hidden layer uses a function to set negative components to 0, and the decoding output layer uses a linear function. The number of components in each bias vector is consistent with the number of nodes in the corresponding output layer, in both rows and 2D columns.
[0050] The coding relationship of the above multilayer perceptron is as follows:
[0051] ;
[0052] In the formula, Indicates chronological order 1D normalized fundamental torque encoding window column vector; Indicates the size is The weight matrix of the encoded hidden layer; express 3D encoding of hidden layer bias vectors; express 3D encoded hidden layer output vector; Indicates and The zero vector of the same dimension; This means that negative values will be set to zero for each component. Indicates the size is The feature output layer weight matrix; express 3D feature output layer bias vector; express 3D torque ripple eigenvector; This indicates the number of nodes in the feature output layer.
[0053] When constructing a pre-trained multilayer perceptron, the training samples are arranged into a training sample matrix with one normalized fundamental torque encoding window per row, arranged chronologically according to the event occurrence time. The decoded output is then made to approximate the corresponding normalized fundamental torque encoding window. An encoder-decoder structure is used because its intermediate feature layer can preserve the nonlinear low-dimensional manifold structure of the torque sequence, which serves as the feature input for the subsequent nonlinear rotor model. Compared to linear dimensionality reduction, this structure can preserve the nonlinear correlation between torque features. The decoded output is subtracted element-wise from the corresponding normalized fundamental torque encoding window, and the sum of the squared differences is divided by the product of the number of training samples and the length of the fundamental torque encoding window to obtain the training error. Each weight matrix uses a pseudo-random seed with a fixed layer width in the control software model design file, and initial values are generated uniformly between the square root of the number of positive and negative corresponding input nodes. Each bias vector is initially set to 0. Full-batch backpropagation is used to calculate the error gradients of each weight matrix and bias vector in reverse order of the decoding output layer, decoding hidden layer, feature output layer, and encoding hidden layer. An update is completed by subtracting the product of the update step size and the corresponding error gradient from the current matrix. The update step size is the reciprocal of the square of the largest singular value of the training sample matrix. If the largest singular value is zero, training is not performed and the corresponding training sample set is deleted. Updates stop when the training error is not greater than the square of the fundamental torque measurement resolution after percentile conversion. If this condition is not met, updates stop at the maximum number of iterations. The maximum number of iterations is calculated by dividing the allowed offline training time specified in the control software model design document by the worst-case execution time for a single iteration and rounding down. After each update, validation samples are used to calculate the validation error. Only the encoding weight matrix and bias vector with the smallest validation error that is not greater than the upper limit of the training error are saved. If no matching encoding part is formed, the fixed encoding part pre-built with the control software version in the controller model storage area is called; if the fixed encoding part does not exist, if the previous valid nonlinear rotor model exists, that model is used; if it is the first startup, the linear rotor model composed of the initial state matrix and the operating voltage input vector is used to execute step S14. When calling the multilayer perceptron, only the encoding part is retained. The torque fluctuation feature vector is divided by its 2-norm to obtain the normalized torque feature vector. When the 2-norm is lower than the minimum resolution value of the controller's floating-point operation, one component of the feature vector is set to 1 and the remaining components are set to zero.
[0054] The above relationships between training, parameter updates, and feature normalization are as follows:
[0055] ;
[0056] ;
[0057] In the formula, Indicates the training mean squared error; Indicates the number of training samples; Indicates the length of the fundamental torque encoding window; Indicates the training sample number; Indicates the first The decoded and reconstructed output vector of each sample; Indicates the first The normalized fundamental torque encoding window vector of each sample; Represents the 2-norm of a vector; Indicates the parameter update step size; Represents the training sample matrix; express The maximum singular value; Indicates the first The set of all trainable weight matrices and bias vectors at the time of the next iteration, where In this formula, the number of training iterations is represented; express about The gradient; This represents the torque fluctuation characteristic vector before normalization. Let represent the normalized torque eigenvector; and let the 2-norm of the normalized torque eigenvector be 1.
[0058] In step S13, the normalized torque eigenvector is subjected to an auto-Kronecker product to obtain a high-dimensional eigenvector. A virtual rotor tensor coupling mapping is then performed based on the high-dimensional eigenvector and a preset initial state matrix to obtain a nonlinear coupling matrix. Singular value reduction is then performed on the nonlinear coupling matrix to obtain a reduced-dimensional coupling matrix. Finally, nonlinear disturbance terms are embedded based on the reduced-dimensional coupling matrix and the initial state matrix to obtain a nonlinear rotor model, including:
[0059] Arrange the vector elements in the high-dimensional feature vector with the same number of row elements and column elements to obtain the high-dimensional feature matrix;
[0060] Each element of the high-dimensional feature matrix is multiplied by the initial state matrix to obtain an element-wise product matrix;
[0061] Arrange the element-product matrix according to the row and column positions of each matrix element in the high-dimensional feature matrix to obtain a matrix block sequence;
[0062] The nonlinear coupling matrix is obtained by concatenating the matrix block sequence according to the row and column order of the high-dimensional feature matrix.
[0063] Specifically, the virtual inertia parameters in the control design file of the grid-type energy storage converter are read. Virtual damping coefficient and sampling period An initial state matrix of 2 rows and 2 columns is constructed according to the forward discrete relation of the rotor motion equations of the virtual synchronous generator. The two elements in the first row of the initial state matrix are set to 1 and 2 respectively. The two matrix elements in the second row are taken as 0 and 1 respectively, minus and product divided by The obtained values. Virtual angular frequency deviation is uniformly defined as the deviation relative to the rated angular frequency. The deviation term in the state transition does not use the deviation of the previous sampling time as a reference for common frequency drift. Virtual inertia parameters and virtual damping coefficients use the currently effective values of the controller. Their effective range uses the upper and lower limits determined in the control design document based on the converter's rated power, allowable frequency change rate, and design damping ratio. Any value exceeding the corresponding upper or lower limit... A nonlinear rotor model is not generated when the value is not greater than zero. An auto-Kronecker product is performed on the d-dimensional normalized torque eigenvector, multiplying each component sequentially by all d components, arranged in the order of fixing the previous component and then iterating over the next. The high-dimensional feature vector is obtained by multiplying the elements of the initial state matrix. The high-dimensional feature vector is then transformed into a d-row, d-column high-dimensional feature matrix, with each element having d elements in each row and column. Each element in the high-dimensional feature matrix is multiplied by the initial state matrix, resulting in a 2-row, 2-column element-product matrix. All element-product matrices are then concatenated according to the row and column positions of their corresponding elements in the high-dimensional feature matrix, yielding a 2d-row, 2d-column nonlinear coupling matrix.
[0064] The initial state matrix, auto-Kronecker product, and tensor coupling relationship described above are as follows:
[0065] ;
[0066] ;
[0067] ;
[0068] In the formula, Represents a second-order discrete initial state matrix; Indicates the sampling period; Indicates the virtual damping coefficient; Represents the virtual inertia parameter; express 3D normalized torque eigenvector; Indicates the feature dimension; and They represent The and the One component; express High-dimensional feature vectors; express The One component; Indicates the Kronecker product; and Indicates the sequence number of the characteristic component; Indicates by Composition High-dimensional feature matrix; Indicates by and Obtained by Kronecker product Nonlinear coupling matrix.
[0069] In one implementation, the nonlinear coupling matrix is subjected to singular value decomposition to obtain a sequence of singular values, a set of left singular vectors, and a set of right singular vectors.
[0070] The singular values in the singular value sequence are arranged in descending order of numerical value to obtain the singular value sorting.
[0071] According to the preset retention quantity, the singular values that appear first in the sorted singular values are extracted to obtain the core singular values.
[0072] Based on the core singular values, the corresponding singular vectors are extracted from the left singular vector set and the right singular vector set to obtain the core left vector set and the core right vector set.
[0073] The reduced-dimensional coupling matrix is obtained by reconstructing the matrix based on the core singular values, the core left vector set, and the core right vector set.
[0074] The step of extracting the top-ranked singular values from the sorted singular values according to a preset retention quantity to obtain the core singular values includes:
[0075] The singular values are sorted according to their order, and their positions are assigned to obtain the singular value positions.
[0076] From the singular values, select singular values whose rank is not greater than the number of retained values to obtain the retained singular values;
[0077] The retained singular values are collected according to the singular value positions to obtain the core singular values.
[0078] Specifically, singular value decomposition is performed on the nonlinear coupling matrix to obtain a sequence of singular values, a set of left singular vectors, and a set of right singular vectors. The singular values are then ranked in descending order. The number of singular values to be retained is determined by reading the matrix operation design file from the control software. This process involves incrementing the number of singular values from 1, verifying the storage space occupied by the corresponding singular values and left and right singular vectors, the processor cycles used for a single low-rank matrix multiplication, and the relative reconstruction error of the matrix reconstructed from the retained singular values, all within the limits of the model storage capacity and the sampling period. The largest integer among the candidate values whose processor cycle limit and relative reconstruction error are not greater than the error limit specified in the control design document is selected. When the number of retained values is greater than the number of rows and columns of the nonlinear coupling matrix, the number of rows and columns of the nonlinear coupling matrix is taken as the actual number of retained values. Core singular values whose singular value positions are not greater than the actual number of retained values are extracted, and core left vector sets and core right vector sets with the same position are extracted from the left singular vector set and the right singular vector set. First, the core left vector set is multiplied by the diagonal matrix formed by the core singular values, and then multiplied by the transpose matrix of the core right vector set to obtain a dimension-reduced coupling matrix of the same size as the nonlinear coupling matrix. When all matrix elements of the nonlinear coupling matrix are zero, the dimension-reduced coupling matrix is set to a 0 matrix of the same size. When the singular value decomposition does not converge or non-finite matrix elements appear, the model construction of the current normalized torque eigenvector is terminated; if there is a previous effective nonlinear rotor model, the model is used; if there is no previous effective model, a linear rotor model composed of the initial state matrix and the operating voltage input vector is used. If the number of retained values is 1, it still exceeds the model storage capacity and sampling period. If the processor cycle limit or error limit is reached, the current nonlinear rotor model will not be generated.
[0079] The relationship between the above singular value decomposition, dimensionality reduction reconstruction, and relative reconstruction errors is as follows:
[0080] ;
[0081] ;
[0082] In the formula, Represents a nonlinear coupling matrix; and They represent The left singular vector matrix and the right singular vector matrix; Indicates by A diagonal matrix consisting of all singular values; superscript Indicates matrix transpose; This indicates the actual rank retained in this expression; and They represent the preceding A matrix consisting of a core left singular vector and a core right singular vector; Indicates the preceding A diagonal matrix composed of core singular values; This represents the coupling matrix obtained from dimensionality reduction and reconstruction. Indicates the relative reconstruction error; This represents the Frobenius norm of the matrix.
[0083] In one implementation, the dimension-reduced coupling matrix is determined as the compensation term matrix of the initial state matrix;
[0084] The perturbation input position corresponding to each matrix element in the compensation term matrix is determined from the initial state matrix according to the preset node mapping relationship;
[0085] Arrange the matrix elements in the compensation term matrix according to the positions of the perturbation inputs to obtain the embedding term matrix;
[0086] The nonlinear rotor model is obtained by superimposing the embedded term matrix onto the nonlinear perturbation input of the initial state matrix.
[0087] Specifically, the dimension-reduced coupling matrix is determined as a compensation term matrix formed by a 2d-row, 2d-column extended initial state matrix, consisting of a d-order identity matrix and the initial state matrix. The disturbance input position corresponding to each matrix element is determined according to the node mapping relationship pre-stored in the control software model design file. This node mapping relationship is established based on the fixed position of the normalized torque feature nodes reconstructed from the training samples and their dimensional correspondence with the rotor state blocks, with the normalized torque feature nodes preceding the rotor state nodes. The virtual phase angle deviation position corresponding to the p-th normalized torque feature node is... The virtual angular frequency deviation position is d normalized torque feature nodes participate in pairing respectively; after the multilayer perceptron is trained, the output values of each node in the feature output layer have different sensitivities to decoding and reconstruction errors. During training, each feature node is fixed in its position according to its contribution to the reconstruction error from largest to smallest, with the node with the largest contribution being the first, and so on. The feature node with the largest contribution is paired with the first state block formed by the virtual phase angle deviation and virtual angular frequency deviation in the rotor state vector, the node with the second largest contribution is paired with the second state block, and so on, so that the torque feature with the highest contribution obtains the highest rotor state coupling weight. This pairing method ensures that when the dimension reduction coupling matrix is truncated in the subsequent singular value truncation, the coupling channel corresponding to the dominant mode is preferentially retained, thereby maximizing the model inference accuracy under the premise of meeting real-time computation constraints.
[0088] The disturbance receiving node is determined according to the row position of the compensation term matrix, and the disturbance input node is determined according to the column position. The matrix elements are then arranged to their corresponding node positions to obtain a 2d x 2d column embedding term matrix. The normalized torque eigenvector is multiplied by the rotor state vector composed of the virtual phase angle deviation and the virtual angular frequency deviation to obtain the extended rotor state vector. The first component of the operating voltage input vector is set to 0. The second component is obtained by dividing the rated active power by the rated angular frequency, multiplying by the sampling period, and then dividing by the virtual inertia parameter. The rated active power and rated angular frequency are obtained from the equipment nameplate and control design documents. At each sampling moment, the block diagonal matrix formed by the d-order identity matrix and the initial state matrix is multiplied by the extended rotor state vector. Then, the embedding term matrix is multiplied by the same extended rotor state vector. Subsequently, the Kronecker product of the normalized torque eigenvector and the operating voltage input vector is multiplied by the operating voltage deviation value. Finally, the three vectors are added component by component to form the next extended rotor state vector. Since the embedding term matrix is formed by coupling the auto-Kronecker product of the normalized torque eigenvectors with the initial state matrix, the extended rotor state update relation remains nonlinear with respect to the normalized torque eigenvectors. By storing the initial state matrix, normalized torque eigenvectors, embedding term matrix, operating voltage input vector, node mapping relation, and extended rotor state update relation together, a nonlinear rotor model is obtained.
[0089] The above extended state and nonlinear state update relationships are as follows:
[0090] ;
[0091] ;
[0092] ;
[0093] In the formula, express Expand the initial state matrix; express An identity matrix of order 1; Represents the second-order discrete initial state matrix; Indicates the Kronecker product; Indicates the first Each sampling moment consists of a two-dimensional rotor state vector composed of virtual phase angle deviation and virtual angular frequency deviation; Indicates the first Each sampling time 3D extended rotor state vector; express 3D normalized torque eigenvector; Represents the operating voltage input vector; Indicates the rated active power; Indicates the sampling period; Indicates the rated angular frequency; Indicates the virtual inertia parameter; This represents the embedding matrix formed by the node mapping relationship; Indicates the first Operating voltage deviation at each sampling time; Indicates the sampling time sequence number.
[0094] like Figure 2 As shown in the figure, this is a schematic diagram of the structure of the high-dimensional feature matrix generated by the Kronecker product operation. The horizontal axis represents the column index, the vertical axis represents the row index, the color intensity represents the magnitude of the feature product value, and the color bars indicate the range of the feature product value. The matrix is symmetrically distributed about the main diagonal. The feature product value at the diagonal position is the result of multiplying the corresponding dimension, and the value is the largest. The feature product value at the off-diagonal position is the cross product between different dimensions, and the value is smaller and alternates between positive and negative. This high-dimensional feature matrix completely preserves the high-order interaction information between the dimensions of the normalized torque feature vector, providing a structured data carrier for subsequent tensor coupling mapping with the initial state matrix.
[0095] In step S14, the operating voltage sequence of the grid-type energy storage converter is collected, and a virtual frequency trajectory is derived based on the nonlinear rotor model and the operating voltage sequence to obtain the model frequency trajectory.
[0096] Specifically, the three-phase operating voltage values are collected using the existing three-phase voltage sensors and synchronous sampling analog-to-digital converters at the grid connection point of the grid-connected energy storage converter. Following the rated fundamental phasor extraction method in step S11, the fundamental phasor quantities of the operating voltage for each of the three phases are obtained. Then, the fundamental phasor quantities of phase A, phase B (rotated 120 degrees counterclockwise), and phase C (rotated 240 degrees counterclockwise) are added together and divided by 3 to obtain the positive-sequence fundamental phasor quantity of the operating voltage. The magnitude of the positive-sequence fundamental phasor quantity is taken as the operating voltage value, and an operating voltage sequence is formed according to the field order: timestamp first, operating voltage value last. The operating voltage sequence uses the same sampling period as the nonlinear rotor model. The difference between adjacent timestamps deviates When the timestamp clock resolution is exceeded, the operating voltage sequence is disconnected at that point. The effective range of the operating voltage value is the intersection of the positive-sequence fundamental effective value range specified in the three-phase voltage measurement chain calibration certificate and the operating voltage protection range in the control design document. If the operating voltage value exceeds the intersection, the corresponding voltage channel becomes saturated, or the timestamp is missing, the operating voltage value is not input into the nonlinear rotor model. The end timestamp of the fundamental torque encoding window corresponding to the nonlinear rotor model is used as the start timestamp of the operating voltage sequence, so that the normalized torque characteristic vector corresponds to the same grid fluctuation state as the operating voltage sequence.
[0097] Read the rated voltage from the equipment nameplate. When the rated voltage is the effective value of the three-phase line voltage, first divide it by the square root of 3 to convert it to the effective value of the phase voltage. When the rated voltage is already the effective value of the phase voltage, use it directly. The converted rated voltage is used as the reference rated voltage for the positive sequence fundamental complex phase quantity of the operating voltage. Subtract the reference rated voltage from each operating voltage value, and then divide it by the reference rated voltage to obtain the operating voltage deviation value. Set the initial virtual phase angle deviation of the nonlinear rotor model to 0. The initial virtual angular frequency deviation is obtained by dividing the phase increment of the first two positive sequence fundamental complex phase quantities of the operating voltage sequence by the sampling period and then subtracting the rated angular frequency. The virtual angular frequency deviation is always referenced to the rated angular frequency. Combine the initial virtual phase angle deviation and the initial virtual angular frequency deviation to form the rotor state vector, and then perform a Kronecker product with the normalized torque characteristic vector to obtain the first extended rotor state vector. According to the timestamp order of the operating voltage sequence, substitute each operating voltage deviation value into the nonlinear rotor model one by one. Each substitution of an operating voltage deviation value generates the next extended rotor state vector. The extended rotor state vector is divided into d consecutive two-component state blocks, each multiplied by the component of the same position in the normalized torque characteristic vector. The components of each state block are then summed to obtain the rotor state vector composed of virtual phase angle deviation and virtual angular frequency deviation. The virtual angular frequency deviation is added to the rated angular frequency to obtain the model frequency value. If the value is below the lower frequency protection limit, the lower frequency protection limit is used; if it is above the upper frequency protection limit, the upper frequency protection limit is used. The model frequency value and its corresponding timestamp are arranged in order of timestamp first, followed by the model frequency value, to obtain the model frequency trajectory. When the extended rotor state vector contains non-finite components, the model frequency value after the abnormal timestamp is deleted.
[0098] The relationships between the above-mentioned operating voltage deviation, state restoration, and model frequency calculations are as follows:
[0099] ;
[0100] ;
[0101] ;
[0102] In the formula, Indicates the first Operating voltage deviation at each sampling time; Indicates the first The positive-sequence fundamental complex phasor of the operating voltage at each sampling time; This indicates the value of the complex phase modulus; This indicates the rated voltage converted to a phase voltage reference. This represents the two-dimensional initial rotor state vector composed of the initial virtual phase angle deviation and the initial virtual angular frequency deviation; and These represent the positive-sequence fundamental voltage complex phasors at the first two sampling times, respectively; Indicates the argument of a complex number; superscript Indicates complex conjugation; Indicates the sampling period; Indicates the rated angular frequency; This represents the initial extended rotor state vector; This represents the normalized torque eigenvector; and They represent the first Two-dimensional rotor state vector and extended rotor state vector at each sampling time; superscript Indicates matrix transpose; Represents a second-order identity matrix; This represents the row vector used to extract the virtual angular frequency deviation; Indicates the first Model frequency values at each sampling time; and These represent the lower limit and upper limit of frequency protection, respectively. Indicates will Limited to Closed interval.
[0103] In step S15, the maximum deviation between the model frequency trajectory and the preset real reference trajectory is extracted to obtain the trajectory deviation amount, and the model frequency trajectory is corrected according to the trajectory deviation amount to obtain the control frequency trajectory, including:
[0104] The model frequency value and the reference frequency value are extracted from the model frequency trajectory and the real reference trajectory respectively according to the same sampling time to obtain frequency data pairs;
[0105] The absolute value of the difference between the model frequency value and the reference frequency value in each frequency data pair is used to obtain the trajectory deviation sequence.
[0106] The trajectory deviation with the largest value is extracted from the trajectory deviation sequence to obtain the trajectory deviation amount.
[0107] When the trajectory deviation is greater than a preset mismatch threshold, Kalman filtering is used to perform state estimation on the model frequency trajectory to obtain the posterior frequency trajectory.
[0108] The control frequency trajectory is obtained by polynomial smoothing of the posterior frequency trajectory.
[0109] When the trajectory deviation is not greater than the mismatch threshold, the model frequency trajectory is determined as the control frequency trajectory.
[0110] Specifically, Kalman filtering is used to perform state estimation on the frequency trajectory of the model to obtain the posterior frequency trajectory, including:
[0111] The virtual inertia parameters and virtual damping coefficient of the grid-type energy storage converter are read, and the state prediction of the model frequency trajectory is performed based on the virtual inertia parameters, the virtual damping coefficient and the virtual synchronous generator rotor motion equation to obtain the prior frequency trajectory;
[0112] Read the preset process noise covariance and measurement noise covariance, and calculate the Kalman gain matrix based on the process noise covariance and the measurement noise covariance to obtain the Kalman gain matrix;
[0113] The prior frequency trajectory and the model frequency trajectory are linearly weighted and updated based on the Kalman gain matrix to obtain the posterior frequency trajectory.
[0114] Specifically, the true reference trajectory is derived from the type test records of a real synchronous generator that uses the same rated frequency and per-unit power reference as the grid-type energy storage converter. The type test records simultaneously record the initial active power per-unit value, initial reactive power per-unit value, power factor, voltage sag depth, disturbance duration, and grid short-circuit ratio. The allowable deviations for each recorded field are read from the control design document. The type test uses the reference voltage disturbance waveform specified in the control design document, and acquires the actual synchronous generator speed through a shaft encoder within its calibration validity period, then multiplies it by the number of pole pairs to convert it into the true reference angular frequency. Only test records are retained where the shaft encoder is not saturated, the timestamp is continuous, the true reference angular frequency is between the lower and upper limits of frequency protection, the initial active power per-unit value, the initial reactive power per-unit value, the power factor, the voltage sag depth, the disturbance duration, and the grid short-circuit ratio differ from the corresponding fields of the fluctuation events of the grid-type energy storage converter by no more than the corresponding record resolution specified in the control design document, and the type test did not trigger protection shutdown. The initial time of the reference voltage disturbance was used as the relative time zero point for each test record, and the same sampling period as the model frequency trajectory was adopted. Arrange the true reference angular frequencies. For the same relative timestamp, arrange all valid true reference angular frequencies in ascending order of value, and take the 50th percentile value as the reference frequency value. Arrange the reference frequency values in ascending order of relative timestamp to obtain the true reference trajectory, and write it to the controller's read-only model area along with the control software version. The duration of the true reference trajectory is the frequency response observation duration specified in the control design document. If the true reference trajectory has fewer than 3 reference frequency values or has timestamp gaps, the current trajectory correction is not performed.
[0115] Model frequency values and reference frequency values are extracted from the model frequency trajectory and the true reference trajectory using the same relative timestamp, respectively, to obtain frequency data pairs. For each frequency data pair, the reference frequency value is subtracted from the model frequency value, and the absolute value of the difference is taken. These are then arranged in ascending order of timestamp to obtain a trajectory deviation sequence. The trajectory deviation with the largest value is extracted from the trajectory deviation sequence to obtain the trajectory deviation amount. The mismatch threshold is the greater of the maximum angular frequency measurement error specified in the shaft encoder calibration certificate and the allowable frequency tracking deviation specified in the control design document. An exit threshold less than the mismatch threshold is read from the control design document. In continuous fluctuation events, the mismatch threshold and exit threshold are used to form a switching hysteresis. When the trajectory deviation amount is between the two thresholds, the model frequency trajectory and the smoothed posterior frequency trajectory are linearly fused according to the relative position of the trajectory deviation amount between the two thresholds to ensure a continuous switching process. When the trajectory deviation amount is not greater than the mismatch threshold, the model frequency trajectory is directly determined as the control frequency trajectory. When the number of timestamps in the model frequency trajectory and the actual reference trajectory are inconsistent, only the continuous timestamp interval shared by the two trajectories is retained. If the shared interval has fewer than three sampling times, a control frequency trajectory is not generated. If any model frequency value or reference frequency value is not a finite value, the corresponding timestamp is deleted and the number of continuous timestamps is rechecked.
[0116] The linear fusion relationship between the above trajectory deviation and hysteresis interval is as follows:
[0117] ;
[0118] ;
[0119] In the formula, This indicates the sampling time sequence number within a shared continuous timestamp interval; Indicates the first Model frequency values at each sampling time; Indicates the first The true reference frequency value at each sampling time; Indicates the first The absolute frequency deviation at each sampling time; This indicates the maximum trajectory deviation within a shared consecutive timestamp interval; Indicates the mismatch threshold; Indicates the exit threshold, and Greater than ; Represents the linear fusion coefficient between the model frequency trajectory and the posterior frequency trajectory; Indicates the first The smoothed posterior frequency values at each sampling time point; Indicates the first Control frequency value at each sampling time; Indicates will Limited to Closed interval.
[0120] When the trajectory deviation exceeds the mismatch threshold, the Kalman state vector is composed of the virtual phase angle deviation and the virtual angular frequency deviation, and the virtual inertia parameters of the grid-type energy storage converter are read. and virtual damping coefficient Kalman filtering is performed in time-stamp order after the model frequency trajectory has been generated, and it does not participate in the model frequency trajectory derivation in step S14.
[0121] It should be noted that both the process noise covariance and the measurement noise covariance are pre-tuned offline and written into the control design file. The process noise covariance is determined based on the uncertainty estimation of the forward discrete truncation error and virtual inertia parameter of the VSG rotor motion equation, while the measurement noise covariance is determined based on the measurement variance specified in the shaft encoder calibration certificate. The observation matrix is arranged in one row and two columns, with the first column set to zero and the second column set to one, so that the virtual angular frequency deviation observation value is obtained by subtracting the rated angular frequency from the model frequency value. The prior covariance matrix is multiplied by the transpose of the observation matrix, and then divided by the sum of the product of the observation matrix, the prior covariance matrix, and the transpose of the observation matrix, and the measurement noise covariance to obtain the Kalman gain matrix. The frequency observation deviation is first obtained by subtracting the virtual angular frequency deviation in the prior state vector from the virtual angular frequency deviation observation value. This frequency observation deviation is then multiplied by the Kalman gain matrix and added to the prior state vector to obtain the posterior state vector. Subtract the product of the Kalman gain matrix and the observation matrix from the identity matrix, and then multiply by the prior covariance matrix to obtain the posterior covariance matrix. Add the nominal angular frequency to the virtual angular frequency deviation in each posterior state vector, and arrange them according to the original timestamps to obtain the posterior frequency trajectory. If any matrix contains non-finite matrix elements, the current posterior frequency trajectory is not generated.
[0122] The Kalman state prediction and update relationship described above is as follows:
[0123] ;
[0124] ;
[0125] ;
[0126] ;
[0127] ;
[0128] In the formula, Indicates the sampling time sequence number; and They represent the first The prior state vector and posterior state vector at each sampling time; Represents the second-order discrete initial state matrix; and They represent the first The prior error covariance matrix and the posterior error covariance matrix at each sampling time; Represents the process noise covariance matrix; Represents the observation matrix. ; Indicates the first The observed virtual angular frequency deviation at each sampling time; Indicates the first Model frequency values at each sampling time; Indicates the rated angular frequency; Indicates the first Kalman gain matrix at each sampling time; Indicates the measurement noise covariance; Represents a second-order identity matrix; superscript Indicates matrix transpose; superscript This represents finding the inverse of a matrix. Indicates the first The posterior frequency value at each sampling time.
[0129] The posterior frequency trajectory is smoothed using a second-order local polynomial smoothing method, with the polynomial order set to 2 to match the order of the second-order rotor motion equation of the virtual synchronous generator. The smoothing window length is a maximum odd number, not exceeding the rated fundamental window length and the number of sampling times for the posterior frequency trajectory, and guaranteed to be no less than 3. If the posterior frequency trajectory has fewer than 3 consecutive sampling times, second-order local polynomial smoothing is not performed, and the current control frequency trajectory is not generated. For each target timestamp, continuous posterior frequency values of the specified window length are extracted within the longest consecutive valid segment containing that target timestamp. If there are timestamp gaps or abnormal deletions on either side of the target timestamp, the gaps are not crossed during splicing. If the number of consecutive valid values is less than the specified window length, the smoothed frequency value for that target timestamp is not generated. The relative time is first formed by subtracting the target timestamp from each window timestamp, and then a fitting matrix is constructed using a constant term, a first-order relative time term, and a second-order relative time term. The fitted matrix is transposed and multiplied by the original fitted matrix. The resulting matrix is inverted and then multiplied by the transposed fitted matrix and the column vector of posterior frequency values within the window, yielding three coefficients of a second-order polynomial. The constant term coefficient is used as the smoothed frequency value of the target timestamp. When the beginning and end of the trajectory are insufficient to form a symmetrical window, the posterior frequency values closest to the beginning and end of the window are used for fitting, keeping the target timestamp within the used time range, without extrapolation. Smoothed frequency values below the frequency protection lower limit are set as the frequency protection lower limit, and smoothed frequency values above the frequency protection upper limit are set as the frequency protection upper limit. The smoothed frequency values after boundary checks are arranged in ascending order of timestamp to obtain the control frequency trajectory. If the fitted matrix is not invertible or the smoothed frequency value is not a finite value, the current control frequency trajectory is not generated.
[0130] The relationship between the second-order local polynomial fitting and boundary checking is as follows:
[0131] ;
[0132] ;
[0133] In the formula, Indicates the target timestamp; Indicates the first in the window A timestamp; express Compared to Time offset; Indicates the sample number within the window; Indicates the target timestamp The corresponding set of smooth window timestamps; Indicated by , and Design a fitting matrix for the elements in each row; Represents a column vector consisting of the posterior frequencies within the window; Indicates the target timestamp The coefficient vector of the second-order polynomial at the location; express The constant term coefficient; superscript Indicates matrix transpose; superscript This represents finding the inverse of a matrix. Indicates the first Control frequency value at each sampling time; and These represent the lower limit and upper limit of frequency protection, respectively. Indicates will Limited to Closed interval.
[0134] In step S16, the grid-type energy storage converter is controlled to suppress power oscillations according to the control frequency trajectory.
[0135] Specifically, the control frequency values in the control frequency trajectory are read in ascending order of timestamps, and the first timestamp is aligned with the control cycle of the grid-type energy storage converter. The current phase angle of the internal oscillator of the grid-type energy storage converter at the first timestamp is read as the initial value of the control phase angle. For each subsequent timestamp, the current control frequency value is first added to the previous control frequency value, and then multiplied by the sampling period. of Finally, add the control phase angle to the previous one to obtain the control phase angle trajectory. Limit the control phase angle to 0 to... Within the range, exceeding Subtract time Add when it is below 0 When a timestamp gap exists in the control frequency trajectory, the control frequency value after the gap is stopped from being used, and the last valid control frequency value before the gap is maintained until a new continuous control frequency trajectory is obtained. When the control frequency value exceeds the closed interval between the lower and upper limits of the frequency protection, the controller frequency protection is triggered and the update of the control phase angle is stopped. Through the above time integration, the control phase angle trajectory is kept continuous, avoiding phase angle jumps caused by control frequency switching.
[0136] Read the rated output voltage from the control design file, and subtract the rated output voltage from the control phase angle and the control phase angle, respectively. And control phase angle plus The three-phase voltage reference sequence is generated by combining the existing voltage outer loop and current inner loop. The existing voltage outer loop PI regulator is connected in series with the current inner loop PI regulator. The controlled object of the current loop is a current path composed of an output filter inductor and a series resistor, while the controlled object of the voltage loop is an LC filter path composed of an output filter inductor, an output filter capacitor, and a series resistor. The control design file stores the nominal transfer function of the above controlled objects and the check values for closed-loop poles or open-loop cutoff frequencies. This is only applied when the current loop angular bandwidth is lower than the switching angular frequency. The voltage loop bandwidth is lower than the current loop bandwidth. Furthermore, only when the verification value meets the requirements of the control design document is it written into the PI coefficient according to the bandwidth relationship described later; otherwise, the PI coefficient pre-tuned according to the control software version is called. The three-phase voltage reference sequence is input into the existing voltage outer loop and current inner loop of the grid-type energy storage converter, and subtracted from the synchronously acquired three-phase output voltage feedback value and three-phase output current feedback value, respectively, to form voltage deviation and current deviation. The nominal values of the output filter inductor, output filter capacitor, and series resistor are read from the component technical documents and verified using the measured values recorded in the factory inspection report. The current loop angular bandwidth is taken from the design value and switching angular frequency in the control software design document. The smaller of the two, the voltage loop bandwidth and the current loop bandwidth, are taken from the design value in the control software design file. The smaller of the two. The inner current loop proportional coefficient is the product of the output filter inductance and the current loop angular bandwidth; the inner current loop integral coefficient is the product of the series resistance and the current loop angular bandwidth; the outer voltage loop proportional coefficient is... The product of the output filter capacitor, voltage loop bandwidth, and three other quantities is used. The integral coefficient of the outer voltage loop is the product of the output filter capacitor and the square of the voltage loop bandwidth. These four coefficients are then written into the control software design file. The outer voltage loop first multiplies the voltage deviation by the proportional and integral coefficients, accumulates the integral term over the sampling period, and then adds the proportional and integral terms to form the current reference value. The inner current loop generates the three-phase modulated voltage value according to the same operational order. The upper limit of the absolute value of the current reference value is the smaller of the maximum permissible short-time current specified in the product technical document and the effective upper limit of the current measurement chain calibration. When the upper limit is reached, the integral term no longer increases. The three-phase modulated voltage value is input into the space vector pulse width modulation module, which, combined with the DC bus voltage, generates the duty cycles of the three bridge arms. Each duty cycle is limited to a closed interval between 0 and 1. When any duty cycle reaches its boundary, the corresponding inner current loop integral term is frozen. The switching frequency is the rated switching frequency specified in the power module product technical document. The drive pulses of the bridge arm power switching devices are generated according to the duty cycle, so that the output voltage phase and frequency of the grid-type energy storage converter follow the control phase angle trajectory and control frequency trajectory, thereby suppressing the power oscillation of the multi-machine parallel node.
[0137] The second embodiment of the present invention provides a grid-type energy storage converter control system based on a virtual synchronous generator, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0138] It should be noted that the grid-type energy storage converter control system based on a virtual synchronous generator provided in this embodiment of the invention is used to execute all the process steps of the grid-type energy storage converter control method based on a virtual synchronous generator in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0139] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0140] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A control method for a grid-type energy storage converter based on a virtual synchronous generator, characterized in that, include: Collect the three-phase voltage sequence and three-phase current sequence under power grid fluctuation conditions, and reconstruct the fundamental torque response from the three-phase voltage sequence and the three-phase current sequence to obtain the fundamental torque sequence. The fundamental torque sequence is encoded with torque fluctuation features using a pre-trained multilayer perceptron to obtain a normalized torque feature vector; The normalized torque eigenvector is subjected to an auto-Kronecker product to obtain a high-dimensional eigenvector. A virtual rotor tensor coupling mapping is performed based on the high-dimensional eigenvector and a preset initial state matrix to obtain a nonlinear coupling matrix. The nonlinear coupling matrix is then subjected to singular value dimensionality reduction reconstruction to obtain a dimensionality-reduced coupling matrix. Finally, a nonlinear disturbance term is embedded based on the dimensionality-reduced coupling matrix and the initial state matrix to obtain a nonlinear rotor model. The operating voltage sequence of the grid-type energy storage converter is collected, and the virtual frequency trajectory is derived based on the nonlinear rotor model and the operating voltage sequence to obtain the model frequency trajectory. The maximum deviation between the model frequency trajectory and the preset real reference trajectory is extracted to obtain the trajectory deviation amount, and the model frequency trajectory is corrected according to the trajectory deviation amount to obtain the control frequency trajectory; The grid-type energy storage converter is controlled according to the control frequency trajectory to suppress power oscillations.
2. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 1, characterized in that, The step of performing virtual rotor tensor coupling mapping based on the high-dimensional feature vector and the preset initial state matrix to obtain a nonlinear coupling matrix includes: Arrange the vector elements in the high-dimensional feature vector with the same number of row elements and column elements to obtain the high-dimensional feature matrix; Each element of the high-dimensional feature matrix is multiplied by the initial state matrix to obtain an element-wise product matrix; Arrange the element-product matrix according to the row and column positions of each matrix element in the high-dimensional feature matrix to obtain a matrix block sequence; The nonlinear coupling matrix is obtained by concatenating the matrix block sequence according to the row and column order of the high-dimensional feature matrix.
3. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 1, characterized in that, The singular value reduction reconstruction of the nonlinear coupling matrix to obtain the dimension-reduced coupling matrix includes: Singular value decomposition is performed on the nonlinear coupling matrix to obtain a sequence of singular values, a set of left singular vectors, and a set of right singular vectors. The singular values in the singular value sequence are arranged in descending order of numerical value to obtain the singular value sorting. According to the preset retention quantity, the singular values that appear first in the sorted singular values are extracted to obtain the core singular values. Based on the core singular values, the corresponding singular vectors are extracted from the left singular vector set and the right singular vector set to obtain the core left vector set and the core right vector set. The reduced-dimensional coupling matrix is obtained by reconstructing the matrix based on the core singular values, the core left vector set, and the core right vector set.
4. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 3, characterized in that, The process of extracting the top-ranked singular values from the sorted singular values according to a preset retention limit to obtain the core singular values includes: The singular values are sorted according to their order, and their positions are assigned to obtain the singular value positions. From the singular values, select singular values whose rank is not greater than the number of retained values to obtain the retained singular values; The retained singular values are collected according to the singular value positions to obtain the core singular values.
5. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 1, characterized in that, The step of embedding nonlinear perturbation terms based on the reduced-dimensional coupling matrix and the initial state matrix to obtain a nonlinear rotor model includes: The dimensionality reduction coupling matrix is determined as the compensation term matrix of the initial state matrix; The perturbation input position corresponding to each matrix element in the compensation term matrix is determined from the initial state matrix according to the preset node mapping relationship; Arrange the matrix elements in the compensation term matrix according to the positions of the perturbation inputs to obtain the embedding term matrix; The nonlinear rotor model is obtained by superimposing the embedded term matrix onto the nonlinear perturbation input of the initial state matrix.
6. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 1, characterized in that, The step of extracting the maximum deviation between the model frequency trajectory and the preset real reference trajectory to obtain the trajectory deviation includes: The model frequency value and the reference frequency value are extracted from the model frequency trajectory and the real reference trajectory respectively according to the same sampling time to obtain frequency data pairs; The absolute value of the difference between the model frequency value and the reference frequency value in each frequency data pair is used to obtain the trajectory deviation sequence. The trajectory deviation with the largest value is extracted from the trajectory deviation sequence to obtain the trajectory deviation amount.
7. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 1, characterized in that, The step of correcting the model frequency trajectory based on the trajectory deviation to obtain the control frequency trajectory includes: When the trajectory deviation is greater than a preset mismatch threshold, Kalman filtering is used to perform state estimation on the model frequency trajectory to obtain the posterior frequency trajectory. The control frequency trajectory is obtained by polynomial smoothing of the posterior frequency trajectory. When the trajectory deviation is not greater than the mismatch threshold, the model frequency trajectory is determined as the control frequency trajectory.
8. The control method for a grid-type energy storage converter based on a virtual synchronous generator according to claim 7, characterized in that, The step of using Kalman filtering to perform state estimation on the model frequency trajectory to obtain the posterior frequency trajectory includes: The virtual inertia parameters and virtual damping coefficient of the grid-type energy storage converter are read, and the state prediction of the model frequency trajectory is performed based on the virtual inertia parameters, the virtual damping coefficient and the virtual synchronous generator rotor motion equation to obtain the prior frequency trajectory; Read the preset process noise covariance and measurement noise covariance, and calculate the Kalman gain matrix based on the process noise covariance and the measurement noise covariance to obtain the Kalman gain matrix; The prior frequency trajectory and the model frequency trajectory are linearly weighted and updated based on the Kalman gain matrix to obtain the posterior frequency trajectory.
9. A grid-connected energy storage converter control system based on a virtual synchronous generator, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method described in any one of claims 1 to 8.