A nonlinear frequency gradient analytical method suitable for meshwork type device control

By characterizing the system dynamics of grid frequency and grid-type device parameter control quantities in discrete state space, and using sparsity recursion to calculate gradients, the problem of insufficient gradient information acquisition in nonlinear optimization problems in existing technologies is solved, thereby improving the accuracy and speed of grid-type device control and enhancing the frequency stability of new energy power systems.

CN122267764APending Publication Date: 2026-06-23TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TSINGHUA UNIVERSITY
Filing Date
2026-02-04
Publication Date
2026-06-23

Smart Images

  • Figure CN122267764A_ABST
    Figure CN122267764A_ABST
Patent Text Reader

Abstract

The application provides a nonlinear frequency gradient analysis method suitable for networked device control, comprising: establishing a frequency response model of a networked device under grid access, so as to describe the system dynamic characteristic relationship between the grid frequency, power dynamics and networked device parameter control quantity in a discrete state space; constructing a system state gradient information extraction method based on the system dynamic characteristic relationship, so as to recursively calculate the system state gradient based on the state update relationship and system state sparsity; based on the system state and the system state gradient, and by using the constructed frequency gradient information extraction method, the gradient between the grid frequency and the networked device parameter control quantity at all sampling points is batch calculated; based on the system state, the system state gradient and the power vector, a frequency change rate gradient information extraction method is constructed, so as to batch calculate the gradient between the grid frequency change rate and the networked device parameter control quantity at all sampling points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power system technology, specifically relating to a nonlinear frequency gradient analytical method suitable for the control of grid-type devices. Background Technology

[0002] Currently, supporting frequency stability in high-proportion renewable energy power systems using grid-connected devices is a major concern in academia and industry. Against this backdrop, the optimal control problem of grid-connected devices that satisfy frequency stability constraints has attracted significant attention.

[0003] The optimal control problem for networked devices typically manifests as an optimization problem with the control parameters of the networked devices as decision variables and frequency stability as a constraint. Due to the nonlinear coupling between the control parameters and the frequency response, this type of problem exhibits highly nonlinear optimization structure characteristics. Strategies for solving this type of nonlinear optimization are generally divided into three categories: Researchers from the University of Concepta del Concordia in Chile and Concordia University in Canada modeled a complete optimization problem with the inertia and damping of the networked devices as control decision variables, but did not explicitly consider the nonlinear relationship between the control variables and the frequency response. This approach directly processes the networked device control problem using a general nonlinear solver, essentially relying on the solver's built-in difference-based numerical gradient estimation method to obtain the gradient and determine the descent direction in the optimization process. Researchers from the Norwegian University of Science and Technology and the University of Trento in Italy directly obtained the analytical relationship between the maximum frequency offset and the maximum rate of change of frequency under a step disturbance and the control variables of the networked devices based on the grid frequency response characteristics. They simplified the continuous frequency state by considering the response extrema under specific scenarios. Scholars from Tsinghua University Shenzhen International Research Institute and Pengcheng Laboratory simulated the frequency response under different control variables in advance, and used the piecewise linearization method to approximate the nonlinear relationship between the control variable of the grid-type device and the frequency response of the power grid, thus simplifying the nonlinear characteristics in the optimal control of the grid-type device at the model level.

[0004] In general, existing control methods for networked devices considering frequency constraints can be categorized into two approaches to handling nonlinear frequency characteristics. One approach focuses on the algorithm, obtaining the gradient of the nonlinear problem through numerical methods and applying it to the nonlinear optimization solution. While this method preserves the integrity and accuracy of the model, it is highly dependent on the solver's performance in handling nonlinear problems and is difficult to apply to scenarios requiring fast response. The other approach focuses on the model, simplifying the nonlinear frequency characteristics to easily tractable discrete extrema or linear forms. This method can improve the speed of optimal control, but it is essentially a model simplification approximation for a specific scenario, making it difficult to guarantee the accuracy of the simplified model under actual continuous disturbances, thus affecting the control precision.

[0005] Therefore, from the perspective of existing technical implementations, there is still a lack of a method for rapidly obtaining gradient information of nonlinear optimization problems based on a complete optimization control model. The implementation of such a method is of great significance for accurate and rapid control of network-type devices. Summary of the Invention

[0006] The present invention aims to at least partially solve one of the technical problems in the related art.

[0007] Therefore, the first objective of this invention is to propose a nonlinear frequency gradient analytical method suitable for the control of network-type devices.

[0008] The second objective of this invention is to provide a nonlinear frequency gradient analytical device suitable for the control of network-type devices.

[0009] The third objective of this invention is to provide a computer device.

[0010] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.

[0011] To achieve the above objectives, a first aspect of the present invention provides a nonlinear frequency gradient analytical method suitable for the control of network-type devices, comprising:

[0012] A frequency response model for grid-connected devices connected to the power grid is established to characterize the dynamic relationship between power grid frequency, power dynamics, and parameter control quantities of grid-connected devices in discrete state space. A system state gradient information extraction method is constructed based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. Based on the system state and system state gradient, and using the constructed frequency gradient information extraction method, the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points is calculated in batches. A method for extracting frequency change rate gradient information is constructed based on system state, system state gradient, and power vector to batch calculate the gradient of grid frequency change rate on the control parameters of grid-type devices at all sampling points; wherein, the power vector is the difference between load power offset and steady-state power setpoint offset.

[0013] In one embodiment of the present invention, the frequency response model is constructed based on a discrete state space, and the system dynamic equations in the continuous state space are discretized by the backward Euler method; the frequency response model uses the virtual inertia, virtual damping and steady-state power setpoint offset of the grid-type device as parameter control quantities, and uses the grid phase angle offset, angular frequency offset and synchronous generator mechanical power offset as system state vectors.

[0014] In one embodiment of the present invention, a method for extracting system state gradient information is constructed, comprising: An auxiliary control variable is introduced to simplify the coupling relationship between the parameter control variable and the system state matrix; Based on the discrete state-space model, the gradient recursive relationship between the system state and the auxiliary control quantity is derived. Based on coupling relationships and gradient recursion, the sparse structure in the gradient of the system state matrix simplifies the three-dimensional tensor calculation to a two-dimensional matrix calculation, calculating only the part corresponding to the non-zero slice, thus achieving efficient gradient recursion. The sparse structure means that the gradient of the system state matrix is ​​non-zero only in the slice corresponding to the current control point, and zero in the remaining slices. By identifying the position of the non-zero slice and using the position matrix to restore it, the full tensor operation is avoided, reducing the dimensionality of gradient calculation.

[0015] In one embodiment of the present invention, a method for extracting frequency gradient information is constructed, comprising: The frequency output matrix corresponding to each sampling point is aggregated into a batch output matrix according to the time sequence; the system state time sequence is aggregated into a batch state matrix, and its gradient is aggregated into a batch state gradient matrix. Based on the batch system state and its gradient, the frequency gradient of the power grid frequency relative to the parameter control quantity is calculated in batches by utilizing the analytical gradient and sparsity of the output matrix.

[0016] In one embodiment of the present invention, the method for constructing frequency change rate gradient information extraction includes the following steps: Aggregate the frequency change rate output matrix and power vector corresponding to each sampling point according to the time sequence; Based on batch system states, system state gradients, power vectors and their gradients, and utilizing the analytical gradients and sparsity of the output matrix and power vectors, the gradient of the grid frequency change rate relative to the frequency change rate of the parameter control quantity is calculated in batches.

[0017] In one embodiment of the present invention, a frequency response model is constructed based on discrete state space, expressed as follows:

[0018] in Represents the system state vector. , Let P be the system state matrix in discrete state space, and let P be the power vector.

[0019] In one embodiment of the present invention, the gradient recursion relationship is expressed as:

[0020] in, Indicates auxiliary control quantity. This represents the gradient calculation of the auxiliary control quantity.

[0021] To achieve the above objectives, a second aspect of the present invention provides a nonlinear frequency gradient analysis device suitable for controlling network-type devices, comprising: The modeling module is used to establish a frequency response model of grid-connected devices connected to the power grid, so as to characterize the system dynamic relationship between power grid frequency, power dynamics and grid-connected device parameter control quantities in discrete state space; The state gradient extraction module is used to construct a system state gradient information extraction method based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. The frequency gradient extraction module is used to calculate the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points in batches based on the system state and the system state gradient, and using the constructed frequency gradient information extraction method. The frequency change rate gradient extraction module is used to construct a frequency change rate gradient information extraction method based on system state, system state gradient and power vector, so as to batch calculate the gradient of the grid frequency change rate on the control quantity of grid-type device parameters at all sampling points; wherein, the power vector is the difference between the load power offset and the steady-state power setpoint offset.

[0022] This invention presents a nonlinear frequency gradient analysis method and apparatus suitable for the control of network-type devices. Compared with previous gradient analysis techniques, this invention, based on a complete frequency optimization control model, innovatively analyzes the recursive relationship of the state gradient and utilizes the sparsity structure characteristics of the model to propose a nonlinear frequency gradient analysis method suitable for the control of network-type devices. First, this invention accurately models the system frequency response under network-type device access and characterizes it as a state equation in discrete state space, thereby accurately characterizing the impact of the control actions of the network-type devices on the frequency. Second, this invention completely derives the analytical recursive relationship of the state gradient, constructing the calculation of the state gradient in a form similar to state updates. During model simulation, the state and its gradient with respect to the control quantity can be calculated simultaneously, saving computational resources in the gradient acquisition process. Finally, this invention deeply explores the sparsity characteristics in the model structure, accurately calculates non-zero element values ​​and obtains their positions, avoiding complex three-dimensional tensor calculations and other redundant calculations, significantly improving computational efficiency. The proposed scheme can effectively improve the solution accuracy and response speed of optimal control for network-type devices, enhance the support capability of network-type devices for the power grid, and strengthen the frequency stability of high-proportion new energy power systems. Therefore, this invention has significant practical implications and broad application prospects.

[0023] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0024] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of a nonlinear frequency gradient analysis method applicable to the control of network-type devices according to an embodiment of the present invention; Figure 2 This is a structural diagram of a nonlinear frequency gradient analysis device suitable for controlling network-type devices according to an embodiment of the present invention. Detailed Implementation

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. 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 should fall within the scope of protection of the present invention.

[0027] The following description, with reference to the accompanying drawings, describes a nonlinear frequency gradient analysis method and apparatus for controlling network-type devices according to an embodiment of the present invention.

[0028] Figure 1 This is a flowchart of a nonlinear frequency gradient analytical method for controlling network-type devices according to an embodiment of the present invention, such as... Figure 1 As shown, it includes: A frequency response model for grid-connected devices connected to the power grid is established to characterize the dynamic relationship between power grid frequency, power dynamics, and parameter control quantities of grid-connected devices in discrete state space. A system state gradient information extraction method is constructed based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. Based on the system state and system state gradient, and using the constructed frequency gradient information extraction method, the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points is calculated in batches. A method for extracting frequency change rate gradient information is constructed based on system state, system state gradient, and power vector to batch calculate the gradient of grid frequency change rate on the control parameters of grid-type devices at all sampling points; wherein, the power vector is the difference between load power offset and steady-state power setpoint offset.

[0029] This invention provides a nonlinear frequency gradient analytical method applicable to the control of network-type devices. Addressing the control problem of network-type devices with nonlinear frequency characteristics, this method obtains the gradient analytical form of the grid frequency response on the parameter control quantities of the network-type devices, thereby improving the accuracy and efficiency of optimal control solutions for network-type devices.

[0030] The following describes in detail, with reference to the accompanying drawings, a nonlinear frequency gradient analytical method applicable to the control of network-type devices according to an embodiment of the present invention.

[0031] This invention proposes a nonlinear frequency gradient analytical method applicable to the control of network-type devices. This method addresses the control problem of network-type devices with nonlinear frequency characteristics, obtaining the gradient analytical form of the grid frequency response on the control parameters of the network-type devices, thereby improving the accuracy and efficiency of optimal control solutions for network-type devices.

[0032] The nonlinear frequency gradient analytical method applicable to the control of network-type devices of the present invention is specifically based on discrete state space, and the sampling step size is defined as follows: The sampling point labels are Control step size is ( ), control point labels are .

[0033] The method includes the following steps: 1) Establish a frequency response model for grid-connected devices connected to the power grid, and characterize the dynamic relationship between the power grid frequency and the parameter control quantities of the grid-connected devices in the discrete state space; 2) Construct a method for extracting system state gradient information, and realize efficient recursive calculation of system state gradient based on state update relationship and system state sparsity; 3) Construct a frequency gradient information extraction method to batch calculate the gradient information between the power grid frequency and the control parameters of the grid-type device at all sampling points; 4) Construct a method for extracting gradient information of frequency change rate, and batch calculate the gradient information between the power grid frequency change rate and the control quantity of grid-type device parameters at all sampling points.

[0034] According to the method, step 1) specifically includes: The frequency response model of the grid-connected device under grid connection describes the dynamic characteristics of the grid frequency under the input of the grid-connected device parameter control quantity. Including virtual inertia of network-type devices Virtual damping Steady-state power setpoint offset ,Right now .

[0035] Let the phase angle offset of the power grid be The angular frequency offset of the power grid is The input power offset is The port power offset is The load power offset is Inertia is Damping is Set of power grid nodes superscript This represents the nodes of the power grid. In a continuous state space... In this context, the dynamic characteristics of the power grid frequency are given by the following swing equation:

[0036] Port power offset Phase angle offset The numerical relationship between them is given by the DC power flow equations:

[0037] in Represents a node and The line susceptance between them.

[0038] For nodes connected to synchronous generator sets, their input power offset Corresponding to the mechanical power offset of the synchronous generator set , In the Laplace domain frequency offset The relationship is a downward proportional relationship:

[0039] in This indicates the percentage of the droop coefficient. The time constant of the synchronous generator set ( ).

[0040] For nodes connected to network-type devices, their input power offset Offset of steady-state power setpoint It belongs to the parameter control variable.

[0041] System state vector Including grid phase angle offset Angular frequency offset of the power grid and synchronous generator set mechanical power offset ,Right now Power vector Determined by the parameter control quantity, it is defined as the difference between the load power offset and the steady-state power setpoint offset, i.e. .

[0042] By rearranging the above dynamic characteristic equations into matrix form, we can obtain the frequency response model of the grid-connected device in continuous state space:

[0043] in This represents the derivative of the system state vector with respect to time. and The system state matrix is ​​determined by the parameter control variables of the network-type devices, specifically:

[0044] in Represents the identity matrix. Represents the zero matrix. Aggregate the inertia of all nodes respectively and damping ( The diagonal matrix of ) This is the susceptance matrix that aggregates the susceptance of all lines. The auxiliary parameter matrix is ​​defined as follows: ,in To aggregate the droop coefficient ratio of all nodes and synchronous generator set time constant The diagonal matrix, for nodes not connected to synchronous generator sets, can be made into... , Each of these represents a non-zero value greater than 1.

[0045] System output Including the frequency offset of the center of inertia (COI) and its rate of change ,Right now The center of inertia offset is defined as the weighted average of the offsets of each node, weighted by its inertia. System output. The system state vector and power vector can be given by the system output equation as follows:

[0046] in and The system output matrix has the following structure:

[0047]

[0048] in The output matrix part corresponding to the inertia center frequency offset is calculated to obtain the frequency-weighted average value of each node with inertia as the weight. and This is the output matrix portion corresponding to the rate of change of the inertia center frequency offset. It is defined as follows:

[0049]

[0050]

[0051] in This is an inertia vector that includes the inertia of each node. This is the sum of the inertia of all nodes.

[0052] The continuous state space is discretized using the backward Euler method with zero-order preservation, yielding the frequency response model in the discrete state space. (Parameter control quantity) The decision is obtained at each control point and remains constant across all sampling points within that control point. ,in For the first Parameter control quantity at each control point For the first The parameter control quantity at each sampling point. The frequency response model in discrete state space can be expressed as:

[0053] The first in discrete state space System state matrix at each control point Given the system state matrix in continuous state space:

[0054]

[0055] Using the system state in discrete state space The system output in discrete state space can be obtained. The system output equation remains unchanged.

[0056] According to the method, step 2) specifically includes: To obtain the gradient of the system state more concisely, an auxiliary control variable is introduced. . With parameter control quantity There is a one-to-one correspondence, therefore the system state gradient for the parameter control variable can be obtained. This can be equivalent to obtaining the system state gradient of the auxiliary control quantity. Define the timing aggregation of control variables at all control points. vector The system state gradient is the system state. Compared to The derivative of .

[0057] because The system state matrix, containing control variables at all control points, can be written as: function The calculation of the frequency response model in discrete state space is relative to... The partial derivatives yield the following:

[0058] in express For control quantity The gradient, i.e. The above equation constitutes the recursive update relationship of the system state gradient, with the left side representing the first... The system state gradient at time t, the first term on the right contains the state gradient at time t. The system state gradient at time t, the second term on the right contains the first term. The system state at time t, other items are the same as the first. The gradient of the system state is related to the power vector at each time step. Therefore, the gradient of the system state can be similar to a state recursion process, realizing the transition and update from the previous time step to the next time step, and the gradient of the system state at each time step can be obtained accordingly.

[0059] To further simplify the calculation, according to and The definition of control quantity The gradient should be:

[0060]

[0061] according to and From the matrix structure characteristics, it can be seen that It should be a three-dimensional tensor. But... and Only with the first Auxiliary control quantity at each control point In Related, therefore it is relevant to the control quantity 3D gradient tensor Only the first One 2D slice has non-zero terms, and all other slices are all zero. 3D gradient tensor Each two-dimensional slice can be represented as:

[0062] In the above formula Indicates the first A two-dimensional slice, Indicates substituting the first individual control quantities The discrete space state matrix, To bring into the first individual control quantities continuous space state matrix right The derivative of , whose value can be directly derived from . The definition is obtained through analytical calculation.

[0063] Similarly, the three-dimensional gradient tensor Each two-dimensional slice can be represented as:

[0064] In the above formula To bring into the first individual control quantities continuous space state matrix right The derivative of can be directly derived from . The definition is obtained through analytical calculation.

[0065] Due to the three-dimensional gradient tensor The discrete state space contains a large number of zero values, exhibiting significant sparsity in its structure. When performing recursive calculations, direct three-dimensional tensor calculations can be avoided. Instead, this sparsity characteristic can be used to simplify three-dimensional tensor calculations, reducing them to two-dimensional matrix calculations, thereby saving computational resources. Let... and They represent the first The first and second components of the control quantity at each control point, i.e. and For three-dimensional tensor multiplication According to the sparsity principle, calculations containing zero terms can be skipped. The values ​​of non-zero terms in the multiplication result can be expressed as:

[0066] in express No. The gradient information corresponding to the first component in each slice is in the form of a matrix. express No. The gradient information corresponding to the second component in each slice is in matrix form. Meanwhile... It is a vector, therefore The calculation is a two-dimensional matrix calculation.

[0067] Meanwhile, the aforementioned non-zero terms in The position is known, and the original three-dimensional tensor multiplication result can be reconstructed from it. Let For only in the Let a standard vector have 1s at some positions and 0s at the other positions, and let... , corresponding to middle The positions of the first and second components. Using the non-zero terms calculated directly above, we can restore them to their corresponding positions and calculate:

[0068] Similarly, for three-dimensional tensor multiplication The values ​​of the non-zero terms in the multiplication result can be expressed as:

[0069] in express No. The gradient information corresponding to the first component in each slice is in the form of a matrix. express No. The gradient information corresponding to the second component in each slice is in matrix form. Meanwhile... It is a vector, therefore The calculation is a two-dimensional matrix calculation.

[0070] Meanwhile, the aforementioned non-zero terms in The position of the term is known, and the original three-dimensional tensor multiplication result can be reconstructed from this. Using the non-zero terms calculated directly above, we can restore them to their corresponding positions and calculate:

[0071] Through the above steps, the gradient calculation containing tensors is transformed from... Degenerate into This enables efficient recursive calculation of the system state gradient.

[0072] According to the method, step 3) specifically includes: Unlike step 2), where the state gradient is updated recursively point by point, the output gradient can be calculated in batches after the state and state gradient recursion is completed. The batch frequency output matrix for time series aggregation is defined as follows:

[0073] in This represents the total number of sampling points in the entire control interval. Indicates the first The control point label corresponding to each sampling point can be obtained by converting the sampling step size and the control step size. ,in This indicates rounding up to the nearest integer.

[0074] The batch state matrix for time-series aggregation is defined as follows:

[0075] Define the batch inertia center frequency offset vector for time-series aggregation as:

[0076] Define batch multiplication operators based on the system output equations. This indicates element-wise multiplication, i.e.:

[0077] The terms on the right-hand side of the above equation are multiplied individually for each element, and the term is... Item Calculate the gradient of the batch inertia center frequency offset vector.

[0078] in Each value can be obtained recursively from step 2). For the previous value, since... Only with The control quantity is related to, but independent of, other control points, therefore the three-dimensional gradient tensor It also exhibits highly sparsity. This sparsity can be used to reduce it to two-dimensional matrix operations:

[0079] in For corresponding Gradient information of the first component. For only The standard matrix is ​​set to 1 at one position and zero at all other positions. Its function is to reconstruct the three-dimensional gradient tensor from the degenerate calculation results based on the position information of the non-zero elements.

[0080] According to The analytical form can be directly calculated as follows:

[0081] The non-zero values ​​are located based on the node number of the network-type device. Thus, the frequency gradient information extraction method has batch-calculated the gradient information between the grid frequency and the control parameters of the network-type device at all sampling points. .

[0082] According to the method, step 4) specifically includes: The output matrix of batch frequency change rate for time-series aggregation is defined as follows:

[0083]

[0084] The batch power vector for time-series aggregation is defined as:

[0085] Define the batch inertia center frequency change rate offset vector of time-series aggregation as:

[0086] According to the system output equation, the frequency change rate offset is determined by both the state vector and the power vector, that is:

[0087] The terms on the right-hand side of the above equation are multiplied individually for each element, and the term is... Item Calculate the gradient of the offset vector of the rate of change of the bulk inertia center frequency.

[0088] in Each value can be obtained recursively from step 2). Each value can be derived from the power vector. The definition is given, and it is related to the control variable. They are linearly related. For the first term in the above equation, since... Only with The control quantity is related to, but independent of, other control points, therefore the three-dimensional gradient tensor It also exhibits highly sparsity. This sparsity can be used to reduce it to two-dimensional matrix operations:

[0089] in For corresponding The gradient information of the first component, where For corresponding The gradient information of the second component. For only A standard matrix with 1 at position 1 and all other positions 0, corresponding to Location, For only A standard matrix with 1 at position 1 and all other positions 0, corresponding to The position of the non-zero element is used to reconstruct the three-dimensional gradient tensor from the degenerate calculation results based on the position information of the non-zero element.

[0090] According to The analytical form can be directly calculated as follows:

[0091]

[0092] The location of non-zero values ​​depends on the node number of the network device.

[0093] Similarly, for the second term in the above equation, since Only with The control quantity is related to, but independent of, other control points, therefore the three-dimensional gradient tensor It also exhibits highly sparsity. This sparsity can be used to reduce it to two-dimensional matrix operations:

[0094] According to The analytical form can be directly calculated as follows:

[0095] Therefore, using the above relationship, the frequency change rate gradient information extraction method can batch calculate the gradient information between the power grid frequency change rate and the control variables of the grid-type device parameters at all sampling points. .

[0096] Example 3 To achieve the above embodiments, such as Figure 2 As shown, this embodiment also provides a nonlinear frequency gradient analysis device 10 suitable for the control of network-type devices. The device 10 includes a modeling module 100, a state gradient extraction module 200, a frequency gradient extraction module 300, and a frequency change rate gradient extraction module 400.

[0097] Modeling module 100 is used to establish a frequency response model of grid-connected devices connected to the power grid, so as to characterize the system dynamic characteristic relationship between power grid frequency, power dynamics and grid-connected device parameter control quantities in discrete state space; The state gradient extraction module 200 is used to construct a system state gradient information extraction method based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. The frequency gradient extraction module 300 is used to calculate the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points based on the system state and the system state gradient, and using the constructed frequency gradient information extraction method. The frequency change rate gradient extraction module 400 is used to construct a frequency change rate gradient information extraction method based on system state, system state gradient and power vector, so as to batch calculate the gradient of the grid frequency change rate on the control quantity of grid-type device parameters at all sampling points; wherein, the power vector is the difference between the load power offset and the steady-state power setpoint offset.

[0098] Furthermore, the aforementioned modeling module 100 is also used for: The frequency response model is constructed based on a discrete state space, and the dynamic equations of the system in the continuous state space are discretized by the backward Euler method. The frequency response model uses the virtual inertia, virtual damping and steady-state power setpoint offset of the grid-type device as parameter control quantities, and the grid phase angle offset, angular frequency offset and synchronous generator mechanical power offset as system state vectors. The frequency response model is constructed based on discrete state space and expressed as follows:

[0099] in Represents the system state vector. , Let P be the system state matrix in discrete state space, and let P be the power vector.

[0100] Furthermore, the aforementioned state gradient extraction module 200 is also used for: An auxiliary control variable is introduced to simplify the coupling relationship between the parameter control variable and the system state matrix; Based on the discrete state-space model, the gradient recursive relationship between the system state and the auxiliary control quantity is derived. Based on coupling relationships and gradient recursion, the sparse structure in the gradient of the system state matrix simplifies the three-dimensional tensor calculation to a two-dimensional matrix calculation, calculating only the part corresponding to the non-zero slice, thus achieving efficient gradient recursion. The sparse structure means that the gradient of the system state matrix is ​​non-zero only in the slice corresponding to the current control point, and zero in the remaining slices. By identifying the position of the non-zero slice and using the position matrix to restore it, the full tensor operation is avoided, and the dimensionality of gradient calculation is reduced. The gradient recursive relationship is expressed as follows:

[0101] in, Indicates auxiliary control quantity. This represents the gradient calculation of the auxiliary control quantity.

[0102] Furthermore, the frequency gradient extraction module 300 described above is also used for: The frequency output matrix corresponding to each sampling point is aggregated into a batch output matrix according to the time sequence; the system state time sequence is aggregated into a batch state matrix, and its gradient is aggregated into a batch state gradient matrix. Based on the batch system state and its gradient, the frequency gradient of the power grid frequency relative to the parameter control quantity is calculated in batches by utilizing the analytical gradient and sparsity of the output matrix.

[0103] Furthermore, the frequency change rate gradient extraction module 400 described above is also used for: Aggregate the frequency change rate output matrix and power vector corresponding to each sampling point according to the time sequence; Based on batch system states, system state gradients, power vectors and their gradients, and utilizing the analytical gradients and sparsity of the output matrix and power vectors, the gradient of the grid frequency change rate relative to the frequency change rate of the parameter control quantity is calculated in batches.

[0104] This invention provides a nonlinear frequency gradient analysis device suitable for the control of network-type devices. Addressing the control problem of network-type devices with nonlinear frequency characteristics, it obtains the gradient analysis form of the grid frequency response on the parameter control quantities of the network-type devices, thereby improving the accuracy and efficiency of optimal control solutions for network-type devices.

[0105] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0106] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A nonlinear frequency gradient analytical method suitable for controlling network-type devices, characterized in that, Includes the following steps: A frequency response model for grid-connected devices connected to the power grid is established to characterize the dynamic relationship between power grid frequency, power dynamics, and parameter control quantities of grid-connected devices in discrete state space. A system state gradient information extraction method is constructed based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. Based on the system state and system state gradient, and using the constructed frequency gradient information extraction method, the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points is calculated in batches. A method for extracting frequency change rate gradient information is constructed based on system state, system state gradient, and power vector to batch calculate the gradient of grid frequency change rate on the control parameters of grid-type devices at all sampling points; wherein, the power vector is the difference between load power offset and steady-state power setpoint offset.

2. The method according to claim 1, characterized in that, The frequency response model is constructed based on a discrete state space, and the dynamic equations of the system in the continuous state space are discretized by the backward Euler method. The frequency response model uses the virtual inertia, virtual damping and steady-state power setpoint offset of the grid-type device as parameter control quantities, and the grid phase angle offset, angular frequency offset and synchronous generator mechanical power offset as system state vectors.

3. The method according to claim 1, characterized in that, Constructing a method for extracting system state gradient information includes: An auxiliary control variable is introduced to simplify the coupling relationship between the parameter control variable and the system state matrix; Based on the discrete state-space model, the gradient recursive relationship between the system state and the auxiliary control quantity is derived. Based on coupling and gradient recursion, the sparse structure in the gradient of the system state matrix simplifies the three-dimensional tensor calculation to a two-dimensional matrix calculation, calculating only the part corresponding to the non-zero slice, thus achieving efficient gradient recursion. The sparse structure means that the gradient of the system state matrix is ​​non-zero only in the slice corresponding to the current control point, and zero in the remaining slices. By identifying the position of the non-zero slice and restoring it using the position matrix, the full tensor operation is avoided, reducing the dimensionality of gradient calculation.

4. The method according to claim 1, characterized in that, Constructing a method for extracting frequency gradient information includes: The frequency output matrices corresponding to each sampling point are aggregated into a batch frequency output matrix according to the time sequence; the system state time sequence is aggregated into a batch state matrix, and its gradient is aggregated into a batch state gradient matrix. Based on the batch system state and its gradient, the frequency gradient of the power grid frequency relative to the parameter control quantity is calculated in batches by utilizing the analytical gradient and sparsity of the output matrix.

5. The method according to claim 1, characterized in that, The method for constructing a frequency change rate gradient information extraction method includes the following steps: Aggregate the frequency change rate output matrix and power vector corresponding to each sampling point according to the time sequence; Based on batch system states, system state gradients, power vectors and their gradients, and utilizing the analytical gradients and sparsity of the output matrix and power vectors, the gradient of the grid frequency change rate relative to the frequency change rate of the parameter control quantity is calculated in batches.

6. The method according to claim 2, characterized in that, The frequency response model constructed based on discrete state space is expressed as follows: in Represents the system state vector. This is the parameter control value at the k-th sampling point. Let P be the system state matrix in discrete state space, and let P be the power vector. The frequency response model of the grid-connected device under grid connection is as follows: and The system state matrix is ​​determined by the control parameters of the network-type devices. , in Represents the identity matrix. Represents the zero matrix. Aggregate the inertia of all nodes respectively and damping ( The diagonal matrix of ) To aggregate the susceptance of all lines, This is the auxiliary parameter matrix.

7. The method according to claim 3, characterized in that, The gradient recursive relationship is expressed as follows: in, Indicates auxiliary control quantity. This represents the gradient calculation of the auxiliary control quantity; The two-dimensional slice of the three-dimensional tensor is: , To bring into the first individual control quantities continuous space state matrix right The derivative of .

8. The method according to claim 4, characterized in that, The batch frequency output matrix is: , in This represents the total number of sampling points in the entire control interval. Indicates the first The control point label corresponding to each sampling point can be obtained by converting the sampling step size and the control step size. , This indicates rounding up to the nearest integer. Based on the batch frequency output matrix, define the batch calculation multiplication operator. This indicates element-wise multiplication, i.e.: The terms on the right-hand side of the above equation are multiplied individually for each element, and the term is... Item The gradient of the batch inertia center frequency offset vector should be calculated as follows: , in .

9. The method according to claim 5, characterized in that, The batch frequency change rate output matrix is: , The batch power vector is: 。 10. A nonlinear frequency gradient analytical device suitable for controlling network-type devices, characterized in that, include: The modeling module is used to establish a frequency response model of grid-connected devices connected to the power grid, so as to characterize the system dynamic relationship between power grid frequency, power dynamics and grid-connected device parameter control quantities in discrete state space; The state gradient extraction module is used to construct a system state gradient information extraction method based on the dynamic characteristic relationship of the system, so as to recursively calculate the system state gradient based on the state update relationship and the sparsity of the system state. The frequency gradient extraction module is used to calculate the gradient between the power grid frequency and the control quantity of the grid-type device parameters at all sampling points in batches based on the system state and the system state gradient, and using the constructed frequency gradient information extraction method. The frequency change rate gradient extraction module is used to construct a frequency change rate gradient information extraction method based on system state, system state gradient and power vector, so as to batch calculate the gradient of the grid frequency change rate on the control quantity of grid-type device parameters at all sampling points; wherein, the power vector is the difference between the load power offset and the steady-state power setpoint offset.