A RNN vectorization method for power system linear model order reduction
Through the vectorization operation of RNN, the calculation process of the Lyapunov equation is simplified, the problems of low solution efficiency and high hardware complexity are solved, and more efficient solution and hardware optimization of the Lyapunov equation are achieved.
Patent Information
- Application Number
- CN202211363037.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-28
- Filing Date
- 2022-11-02
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-11-02
AI Technical Summary
In the prior art, the solution efficiency of the Lyapunov equation is limited by software algorithms, and the hardware circuits of the RNN model are complex and the number of components are large, which affects the hardware volume and failure rate.
The vectorization operation of RNN is adopted, and the vectorization function module and the recurrent neural network function module are simplified, the calculation process is reduced, the complexity of hardware circuits is improved, and the calculation efficiency is improved.
More efficient solution to Lyapunov equations is achieved, reducing the complexity and failure rate of hardware circuits, reducing the hardware volume, and improving the computing speed.
Smart Images

Figure CN115712242B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power system order reduction, and in particular to an RNN vectorization method for power system linear model order reduction. Background Art
[0002] Power systems are large in scale, making direct research and analysis both inconvenient and unnecessary. Therefore, power system model reduction has long attracted considerable attention. Currently, model reduction methods for linear systems are relatively mature. Among them, the balanced truncation method can largely ensure that the input-output characteristics of the reduced-order system model are consistent with those of the original system model. The reduced-order system model also maintains the stability of the original system and exhibits global reduced-order errors in the frequency domain. These advantages have led to widespread attention for the balanced truncation model reduction method (Zhu Zexiang. Research on Dynamic Parameter Identification and Model Reduction of Power Systems [D]. Zhejiang University, 2018). However, the computational speed of the balanced truncation method is limited by the efficiency of solving the Lyapunov equation, which to some extent limits its scope of application.
[0003] Regarding the efficient solution methods of the Lyapunov equation, the academic community has achieved rich research results, such as the classic Bartels-Stewart method (Bartels R., Stewart G. (1972). Solution of the equation A X+XB=C. Comm ACM, 15 (9), 820–826. doi: 10.1145 / 361573.361582), the minimum residual method (Lin Y., Simoncini V. (2013) Minimal residual methods for large scale Lyapunovequations. Appl. Numer. Math., 72, 52–71. doi: 10.1016 / j.apnum.2013.04.004), and the low-rank iterative method (Stykel T. (2008). Low-rank iterative methods for projected generalized Lyapunov equations.Electron.Trans.Numer.Anal.,30(1),187–202.doi:10.1080 / 14689360802423530) etc.These studies are all aimed at software algorithms. In recent years, with the development of recurrent neural networks (RNNs), online solvers for the Lyapunov equation based on RNNs have also attracted attention (Yi C., Chen Y., Lu Z. (2011). Improved gradient-based neural networks for online solution of Lyapunovmatrix equation. Inform. Process. Lett., 111 (16), 780–786. doi: 10.1016 / j.ipl.2011.05.010, Yi C., Chen Y., Lan X. (2013). Comparison on neural solvers for the Lyapunov matrix equation with stationary & nonstationary coeffificients. Appl. Math. Model., 37 (4), 2495–2502. doi: 10.1016 / j.apm.2012.06.022, Xiao L., Liao B. (2016). A Convergence-accelerated Zhang neural network and its solution application to Lyapunov equation, Neurocomputing, 193, 213–218. doi:10.1016 / j.neucom.2016.02.021). Unlike traditional software algorithms, the RNN-based solution method fully utilizes the parallel processing capabilities and easy hardware implementation of RNN, further improving the efficiency of solving the Lyapunov equation.
[0004] RNN is used to solve the Lyapunov equation, and its ultimate goal is to build an online solver for the Lyapunov equation. Therefore, for online computing, improving computational efficiency is the most critical task. Many scholars have improved computational efficiency by improving the convergence of the RNN model (Xiao L., Zhang Y., Hu Z., Dai J. (2019). Performance Benefits of Robust Nonlinear Zeroing Neural Network for Finding Accurate Solution of Lyapunov Equation in Presence of Various Noises. IEEE Trans. Ind. Inf., 15(9), 5161-5171. doi: 10.1109 / TII.2019.2900659). In fact, the vectorized computing efficiency of the RNN model still has room for improvement. In addition, the hardware circuit wiring of the RNN model is complex and the number of components is large, which is not conducive to reducing the hardware volume and reducing the failure rate. Summary of the Invention
[0005] In response to the real-time requirements for solving the Lyapunov equation and the complex hardware circuit wiring and large number of components of the RNN model, the present invention takes the vectorization operation of RNN as the research object and finds that the coefficient matrix after vectorization has a fixed element composition. Therefore, an RNN vectorization method for reducing the order of power system linearization model is proposed. Compared with the traditional vectorization method based on Kronecker product, it is simpler and more computationally efficient, has obvious advantages in software time consumption, and can also reduce the complexity and failure rate of hardware circuit wiring, which is conducive to reducing hardware volume.
[0006] The purpose of the present invention is achieved by at least one of the following technical solutions.
[0007] A RNN vectorization method for power system linear model order reduction includes the following steps:
[0008] S1. Obtain the Lyapunov equation based on the power system linearization model and transfer the parameter matrix to the vectorization function module;
[0009] S2. Based on the structural characteristics of the vectorized matrix, the vectorized function module is constructed and the output signal is transmitted to the recurrent neural network (RNN) function module;
[0010] S3. Build a recurrent neural network (RNN) functional module;
[0011] S4, determining calculation parameters and driving a recurrent neural network (RNN) function module to obtain a solution signal of the Lyapunov equation;
[0012] S5. Based on the solution signal of step S4, a linearized reduced-order model of the power system is obtained.
[0013] Furthermore, step S1 is specifically as follows:
[0014] The small signal model of the power system is:
[0015]
[0016] Among them, A, B, C, and D are all constant matrices of the power system linearization model, Δx o 、 They represent the state variables and their derivatives inside the power system linearization model, Δu represents the input variable of the power system linearization model, Δy o represents the output variable of the power system linearization model, n represents the dimension of the state variable and its derivative, m and p represent the dimension of the input variable and output variable respectively. represents the real number field; Δx o Generally includes linearized generator rotor angle, generator angular frequency and state quantities of dynamic components, Δu and Δy o It needs to be determined according to the specific research object.
[0017] Based on the principle of equilibrium truncation method, the dual Lyapunov equation of the power system is obtained:
[0018]
[0019] Among them, G and X are the controllability matrix and observability matrix respectively;
[0020] For the observability matrix, the Lyapunov equation is as follows:
[0021] A T X(t)+X(t)A=-Q (3)
[0022] Where Q is a symmetric positive definite matrix with constant coefficients and Q = C T C, X(t) is the solution of the observable Lyapunov equation, t is the time variable;
[0023] It should be noted that the observability matrix of formula (3) is different from that of formula (2) in form. Since the present invention adopts an iterative method based on a recurrent neural network to solve the observability matrix, the solution matrix X(t) of formula (3) contains a time variable.
[0024] For the controllability matrix, the Lyapunov equation is as follows:
[0025] AG(t)+G(t)A T =-W (4)
[0026] Where W is a symmetric positive definite matrix with constant coefficients and W = BB T , G(t) is the solution of the controllability Lyapunov equation,
[0027] The parameter matrices A, Q, and W are passed to the vectorization function module.
[0028] Furthermore, in step S2, the vectorization function module is aimed at parameter matrix vectorization, and its core is to calculate For the convenience of description, let Represents Kronecker product operation, I represents n-order unit matrix; after research, The inherent elements of are:
[0029]
[0030] Among them, a ij Represents the element in the i-th row and j-th column of matrix A, 1≤i≤n, 1≤j≤n.
[0031] Therefore, directly based on The structural characteristics of
[0032] It should be pointed out that the specific form of the vectorized functional module can be a software algorithm or a hardware circuit, depending on the requirements.
[0033] If software algorithm is used to build First, according to According to and The elements of the matrix A are composed of elements a ij Assign values to the matrix M; therefore, the vectorization method of the present invention replaces a large number of addition and multiplication operations of the traditional Kronecker product method with a small number of addition operations and assignment operations, and has higher calculation efficiency.
[0034] If hardware circuit is used According to formula (5), a 11 ,…,a1n ,…,a n1 ,…,a nn Send to the corresponding in, For the diagonal elements of M, adders need to be configured, while the non-diagonal elements of M are directly connected by wiring. Therefore, the vectorization method of the present invention can obtain The traditional Kronecker product method requires a large number of multipliers and adders, which increases the complexity of hardware circuit wiring and the failure rate, and is not conducive to reducing the hardware volume.
[0035] Furthermore, in step S2, the vectorization function module also needs to expand the n-order matrices Q and W into n 2 One-dimensional vectors vecQ and vecW of order;
[0036] If software algorithm is used to build vecQ and vecW, then according to vec(Q)=[q 11 ,…,q 1n ,q 21 ,…,q n1 ,…,q nn ] T and vec(W)=[w 11 ,…,w 1n ,w 21 ,…,w n1 ,…,w nn ] T Just transform the matrix dimensions of Q and W respectively, where q ij and w ij Represents the element in the i-th row and j-th column of matrices Q and W respectively, and 1≤i≤n, 1≤j≤n;
[0037] If hardware circuit is used to build vecQ and vecW, then Separately q 11 ,…,q nn 、w 11 ,…,w nn Transmitted to the corresponding That's it;
[0038] According to the received parameter matrices A, Q and W, the vectorized results are transmitted to the neural network function module.
[0039] Furthermore, in step S3, since RNN mainly includes gradient neural network (GNN) and Zhang neural network (ZNN), the following model is constructed according to the definitions of the two:
[0040] For the observability matrix, the vectorized gradient neural network (GNN) model is:
[0041]
[0042] in, represents the Kronecker product operation, I represents the n-order identity matrix, vec(X(t))=[x 11 (t),…,x 1n (t),x 21 (t),…,x n1 (t),…,x nn (t)] T , where x ij (t) represents the elements of the matrix X(t); γ is a constant greater than 0, is the time derivative of X(t), Represents the activation function of GNN;
[0043] The vectorized Zhang neural network (ZNN) model is:
[0044]
[0045] in, is the activation function of ZNN;
[0046] Similarly, for the controllability matrix, the vectorized gradient neural network (GNN) model is:
[0047]
[0048] The vectorized Zhang neural network (ZNN) model is:
[0049]
[0050] The vectorized RNN model constitutes the neural network functional module;
[0051] It should be noted that the vectorization of RNN includes parameter matrix vectorization and network structure vectorization. The former is the task of the vectorization function module in step S2, and the latter is the task of the neural network function module in step S3.
[0052] Similar to the vectorization function module, the specific form of the neural network function module can be a software algorithm or a hardware circuit. Using a software algorithm to build a neural network function module is to construct a differential equation model according to Equation (6-9). Using a hardware circuit to build a recurrent neural network (RNN) function module is to build a circuit model using integrators, adders, multipliers, etc. according to Equation (6-9).
[0053] Receive the output of the vectorization function module to complete the vectorization of the RNN.
[0054] Furthermore, step S4 is specifically as follows:
[0055] S4.1. Set the initial values of the solution vectors vecX(t) and vecG(t) to vecX(0) and vecG(0), respectively, and select an appropriate activation function and constant γ.
[0056] S4.2. Drive the recurrent neural network (RNN) functional module to obtain the solution of the Lyapunov equation.
[0057] Furthermore, step S5 is specifically as follows:
[0058] S5.1. According to steps S2-S4, obtain the controllability matrix G and the observability matrix X. Perform Cholesky decomposition on the controllability matrix G and the observability matrix X to obtain:
[0059]
[0060] Among them, Z G and Z X They are all lower triangular matrices;
[0061] Then, perform SVD decomposition and get:
[0062]
[0063] Among them, U and V are column orthogonal matrices, ∑=diag(σ1,σ2…σ n ), σ1≥σ2…≥σ i …≥σ n ,σ i represents the diagonal elements of the i-th row of the Hankel singular value matrix;
[0064] In this way, the left and right projection matrices are obtained as follows:
[0065]
[0066] Among them, U r and V r Represent the first r columns of matrices U and V respectively,
[0067] According to the left and right projection matrices, the coefficient matrix A of the reduced-order system is obtained r 、B r 、C r 、D r :
[0068]
[0069] S5.2. Further, the reduced-order system expression is obtained:
[0070]
[0071] in, and and represent the state variables and their derivatives of the reduced-order system respectively.
[0072] Compared with the prior art, the present invention has the following advantages and effects:
[0073] 1. This paper takes RNN vectorization as the starting point for the first time and explores a more efficient and simpler RNN vectorization method.
[0074] 2. The efficient vectorization method proposed in this invention is simpler and faster than the traditional Kronecker product method, whether implemented in software simulation or hardware. Specifically, it significantly reduces software simulation time and also reduces hardware circuit wiring complexity and failure rate, thus minimizing hardware size. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 This is a flowchart of an RNN vectorization method for reducing the order of a power system linearization model in an embodiment of the present invention.
[0076] Figure 2 This is a GNN hardware circuit diagram in an embodiment of the present invention.
[0077] Figure 3 This is a comparison diagram of the system time domain curves before and after order reduction for the 97th-order example in an embodiment of the present invention.
[0078] Figure 4 1 is a comparison diagram of the system frequency domain curves before and after order reduction for the 97th-order example in an embodiment of the present invention. DETAILED DESCRIPTION
[0079] The present invention is described in further detail below with reference to specific embodiments.
[0080] Example:
[0081] A RNN vectorization method for power system linear model order reduction, such as Figure 1 As shown, the following steps are included:
[0082] S1. Obtain the Lyapunov equation based on the power system linearization model and transfer the parameter matrix to the vectorization function module, as follows:
[0083] The small signal model of the power system is:
[0084]
[0085] Among them, A, B, C, and D are all constant matrices of the power system linearization model. They represent the state variables and their derivatives inside the power system linearization model, and represent the input variables of the power system linearization model. represents the output variable of the power system linearization model, n represents the dimension of the state variable and its differential component, m and p represent the dimension of the input variable and output variable respectively, represents the real number field; Δx o Generally includes linearized generator rotor angle, generator angular frequency and state quantities of dynamic components, Δu and Δy o It needs to be determined according to the specific research object.
[0086] Based on the principle of equilibrium truncation method, the dual Lyapunov equation of the power system is obtained:
[0087]
[0088] Among them, G and X are the controllability matrix and observability matrix respectively;
[0089] For the observability matrix, the Lyapunov equation is as follows:
[0090] A T X(t)+X(t)A=-Q (3)
[0091] Where is a symmetric positive definite matrix with constant coefficients and Q = C T C, is the solution of the observable Lyapunov equation, t is the time variable;
[0092] It should be noted that the observability matrix of formula (3) is different from that of formula (2) in form. Since the present invention adopts an iterative method based on a recurrent neural network to solve the observability matrix, the solution matrix X(t) of formula (3) contains a time variable.
[0093] For the controllability matrix, the Lyapunov equation is as follows:
[0094] AG(t)+G(t)A T =-W (4)
[0095] in, is a symmetric positive definite matrix with constant coefficients and W = BB T , is the solution of the controllability Lyapunov equation;
[0096] The parameter matrices A, Q, and W are passed to the vectorization function module.
[0097] In this embodiment, the 16-machine system and 48-machine system calculation examples of the PST software toolbox are 35-order and 97-order examples respectively. o Includes the linearized generator rotor angle, generator angular frequency and generator excitation voltage, Δu includes the generator angular velocity difference, Δy o Includes excitation voltage auxiliary signal.
[0098] S2. Based on the structural characteristics of the vectorized matrix, the vectorized function module is constructed and the output signal is transmitted to the recurrent neural network (RNN) function module;
[0099] The vectorization function module is aimed at parameter matrix vectorization, and its core is to calculate For the convenience of description, let Represents Kronecker product operation, I represents n-order unit matrix; after research, The inherent elements of are:
[0100]
[0101] Among them, a ij Represents the elements of matrix A.
[0102] Therefore, directly based on The structural characteristics of
[0103] It should be pointed out that the specific form of the vectorized functional module can be a software algorithm or a hardware circuit, depending on the requirements.
[0104] In this embodiment, a software algorithm is used to build First, according to According to and The elements of the matrix A are composed of elements a ij Assign values to the matrix M. Therefore, the vectorization method of the present invention replaces a large number of addition and multiplication operations of the traditional Kronecker product method with a small number of addition operations and assignment operations, and has higher calculation efficiency.
[0105] In order to compare the performance difference between the parameter matrix vectorization method proposed in this invention and the traditional Kronecker product method, the above-mentioned 35-order and 97-order examples are simulated and the two methods are calculated. The time consumption is recorded in Table 1.
[0106] Table 1 Time consumption comparison of two vectorization methods
[0107]
[0108] In Table 1, method A represents the vectorization method proposed in this paper, method B represents the Kronecker product method, and the time consumption ratio is the time consumption of method A divided by the time consumption of method B.
[0109] From the data in Table 1, it can be seen that under two different calculation examples, the computational efficiency of the vectorization method proposed in the present invention is higher than that of the traditional Kronecker product method.
[0110] Furthermore, the vectorization function module also needs to expand the n-order matrices Q and W into n 2 One-dimensional vectors vecQ and vecW of order;
[0111] In this embodiment, a software algorithm is used to build vecQ and vecW, according to vec(Q)=[q 11 ,…,q 1n ,q 21 ,…,q n1 ,…,q nn ] T and vec(W)=[w 11 ,…,w 1n ,w 21 ,…,w n1 ,…,w nn ] T Just transform the matrix dimensions of Q and W respectively, where q ij and w ij Represent the elements of matrices Q and W respectively, and 1≤i≤n, 1≤j≤n;
[0112] According to the received parameter matrices A, Q and W, the vectorized results are transmitted to the neural network function module.
[0113] S3. Build a recurrent neural network (RNN) functional module;
[0114] Since RNN mainly includes gradient neural network (GNN) and Zhang neural network (ZNN), the following model can be constructed according to their definitions:
[0115] For the observability matrix, the vectorized gradient neural network (GNN) model is:
[0116]
[0117] in, represents the Kronecker product operation, I represents the n-order identity matrix, vec(X(t))=[x 11 (t),…,x 1n (t),x 21(t),…,x n1 (t),…,x nn (t)] T , where x ij (t) represents the elements of the matrix X(t); γ is a constant greater than 0, is the time derivative of X(t), Represents the activation function of GNN;
[0118] The vectorized Zhang neural network (ZNN) model is:
[0119]
[0120] Among them, φ is the activation function of ZNN;
[0121] Similarly, for the controllability matrix, the vectorized gradient neural network (GNN) model is:
[0122]
[0123] The vectorized Zhang neural network (ZNN) model is:
[0124]
[0125] The vectorized RNN model constitutes the neural network functional module.
[0126] It should be noted that the vectorization of RNN includes parameter matrix vectorization and network structure vectorization. The former is the task of the vectorization function module in step S2, and the latter is the task of the neural network function module in step S3.
[0127] Similar to the vectorization function module, the specific form of the neural network function module can be a software algorithm or a hardware circuit. Using a software algorithm to build a neural network function module is to construct a differential equation model according to Equation (6-9). Using a hardware circuit to build a recurrent neural network (RNN) function module is to build a circuit model using integrators, adders, multipliers, etc. according to Equation (6-9).
[0128] Receive the output of the vectorization function module to complete the vectorization of the RNN.
[0129] S4. Determine the calculation parameters and drive the recurrent neural network (RNN) function module to obtain the solution signal of the Lyapunov equation, as follows:
[0130] (1) Set the initial values of the solution vectors vecX(t) and vecG(t) to vecX(0) and vecG(0) respectively, and select the appropriate activation function and constant γ.
[0131] (2) Drive the recurrent neural network (RNN) functional module to obtain the solution of the Lyapunov equation.
[0132] In this embodiment, the observability matrix of the 97th order example is taken as an example, vecX(0) is an all-zero matrix, the activation function is a linear activation function, γ is 100, and if software is used to solve, the ode45 function of the matlab software is called. If a hardware circuit is used, taking GNN as an example, it can be used Figure 2 Solve the circuit diagram shown in [5], where
[0133] The results of solving ZNN using the software are shown in Table 2.
[0134] Table 2 ZNN solution accuracy for the 97th-order example
[0135] Linear activation function ZNN norm 0.0055
[0136] The norm in the table refers to the ||A after ZNN convergence T X+XA+C|| F , represents the accuracy of the ZNN solution. As can be seen from Table 2, the norm is very close to 0, indicating that the accuracy of the obtained Lyapunov solution is very high.
[0137] S5. Based on the solution signal of step S4, a linearized reduced-order model of the power system is obtained, which is as follows:
[0138] (1) According to steps S2-S4, the controllability matrix G and the observability matrix X are obtained. The controllability matrix G and the observability matrix X are subjected to Cholesky decomposition to obtain:
[0139]
[0140] Among them, Z G and Z X They are all lower triangular matrices;
[0141] Then, perform SVD decomposition and get:
[0142]
[0143] Among them, U and V are column orthogonal matrices, ∑=diag(σ1,σ2…σ n ), σ1≥σ2…≥σ i …≥σ n ,σ i represents the diagonal elements of the i-th row of the Hankel singular value matrix;
[0144] In this way, the left and right projection matrices can be obtained as follows:
[0145]
[0146] Among them, U r and V r Represent the first r columns of matrices U and V respectively,
[0147] According to the left and right projection matrices, the coefficient matrix A of the reduced-order system can be obtained r 、B r 、C r 、D r :
[0148]
[0149] (2) Furthermore, the reduced-order system expression can be obtained:
[0150]
[0151] in, and and represent the state variables and their derivatives of the reduced-order system respectively.
[0152] In this embodiment, the reduced-order system order r is taken as 70.
[0153] In order to compare the dynamic characteristics of the system before and after order reduction, a step disturbance of 0.01 pu is used to compare the time domain response and frequency domain response of the original system model and the reduced-order system model, as shown in Figure 2. Figure 3 and Figure 4 shown.
[0154] from Figure 3 and Figure 4 It can be seen that the reduced-order system model can be well approximated to the original system.
[0155] Example 2:
[0156] The difference from Example 1 is that in this embodiment, vecQ and vecW are constructed using hardware circuits, and Separately q 11 ,…,q nn 、w 11 ,…,w nn Transmitted to the corresponding That's it.
[0157] Example 3:
[0158] The difference from Example 1 is that in this embodiment, a hardware circuit is used to build According to formula (5), a 11 ,…,a 1n,…,a n1 ,…,a nn Send to the corresponding in, For the diagonal elements of M, adders need to be configured, while the non-diagonal elements of M are directly connected by wiring. Therefore, the vectorization method of the present invention can obtain The traditional Kronecker product method requires a large number of multipliers and adders, which increases the complexity of hardware circuit wiring and the failure rate, and is not conducive to reducing the hardware volume.
[0159] It is easy for those skilled in the art to understand that the above embodiments are preferred implementations of the present invention, but the implementation of the present invention is not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be considered as equivalent replacement methods and are included in the scope of protection of the present invention.
Claims
1. A RNN vectorization method for power system linear model order reduction, characterized in that: The following steps are involved: S1. Obtain the Lyapunov equation based on the power system linearization model and transfer the parameter matrix to the vectorization function module; S2. According to the structural characteristics of the vectorized matrix, the vectorized function module is built and the output signal is transmitted to the recurrent neural network function module; the vectorized function module is aimed at the parameter matrix vectorization, and its core is to calculate Let M = A T ⊕A T ; Represents Kronecker product operation, I represents n-order unit matrix; after research, A T ⊕A T The inherent elements of are: Among them, a ij Represents the element in the i-th row and j-th column of matrix A, 1≤i≤n, 1≤j≤n; Therefore, directly according to A T ⊕A T The structural characteristics of A T ⊕A T ; If software algorithm is used to build A T ⊕A T , first according to According to and The elements of the matrix A are composed of elements a ij Assign to matrix M; If hardware circuit is used to build A T ⊕A T , according to formula (5), a 11 ,…,a 1n ,…,a n1 ,…,a nn Send to the corresponding in, For the diagonal elements of M, adders need to be configured, while the off-diagonal elements of M are directly connected with wires; The vectorization function module also needs to expand the n-order matrices Q and W into n 2 One-dimensional vectors vecQ and vecW of order; If software algorithm is used to build vecQ and vecW, then according to vecQ=[q 11 ,…,q 1n ,q 21 ,…,q n1 ,…,q nn ] T and vecW=[w 11 ,…,w 1n ,w 21 ,…,w n1 ,…,w nn ] T Just transform the matrix dimensions of Q and W respectively, where q ij and w ij Represents the element in the i-th row and j-th column of matrices Q and W respectively, and 1≤i≤n, 1≤j≤n; If hardware circuit is used to build vecQ and vecW, then Separately q 11 ,…,q nn 、w 11 ,…,w nn Transmitted to the corresponding That's it; According to the received parameter matrices A, Q and W, the vectorized results are transmitted to the neural network function module; S3. Build a recurrent neural network functional module; S4, determining calculation parameters and driving the recurrent neural network function module to obtain the solution signal of the Lyapunov equation; S5. Based on the solution signal of step S4, a linearized reduced-order model of the power system is obtained.
2. The RNN vectorization method for power system linear model order reduction according to claim 1, characterized in that: Step S1 is specifically as follows: The small signal model of the power system is: Among them, A, B, C, and D are all constant matrices of the power system linearization model, Δx o 、 They represent the state variables and their derivatives inside the power system linearization model, Δu represents the input variable of the power system linearization model, Δy o represents the output variable of the power system linearization model, n represents the dimension of the state variable and its derivative, m and p represent the dimension of the input variable and output variable respectively. represents the real number field; Δx o Including linearized generator rotor angle, generator angular frequency and state quantities of dynamic elements, Δu and Δy o It needs to be determined according to the specific research object; Based on the principle of equilibrium truncation method, the dual Lyapunov equation of the power system is obtained: Among them, G and X are the controllability matrix and observability matrix respectively; For the observability matrix, the Lyapunov equation is as follows: A T X(t)+X(t)A=-Q (3) Where Q is a symmetric positive definite matrix with constant coefficients and Q = C T C, X(t) is the solution of the observable Lyapunov equation, t is the time variable; For the controllability matrix, the Lyapunov equation is as follows: AG(t)+G(t)A T =-W (4) Where W is a symmetric positive definite matrix with constant coefficients and W = BB T , G(t) is the solution of the controllability Lyapunov equation, The parameter matrices A, Q, and W are passed to the vectorization function module.
3. The RNN vectorization method for power system linear model order reduction according to claim 2, characterized in that: In step S3, since the recurrent neural network includes the gradient neural network and the Zhang neural network, the following model is constructed according to the definitions of the two: For the observability matrix, the vectorized gradient neural network model is: in, (A⊕A) T =A T ⊕A T , represents the Kronecker product operation, I represents the n-order identity matrix, vecX(t)=[x 11 (t),…,x 1n (t),x 21 (t),…,x n1 (t),…,x nn (t)] T , where x ij (t) represents the elements of the matrix X(t); γ is a constant greater than 0, is the time derivative of X(t), Represents the activation function of the gradient neural network; The vectorized Zhang neural network model is: in, is the activation function of Zhang’s neural network.
4. The RNN vectorization method for power system linear model order reduction according to claim 3, characterized in that: For the controllability matrix, the vectorized gradient neural network model is: The vectorized Zhang neural network model is: The vectorized recurrent neural network model constitutes the neural network functional module.
5. The RNN vectorization method for power system linear model order reduction according to claim 4, characterized in that: If a software algorithm is used to build a neural network function module, a differential equation model is constructed according to equations (6) to (9); If a hardware circuit is used to build a recurrent neural network functional module, a circuit model is built according to equations (6) to (9). The circuit model includes an integrator, an adder, and a multiplier. Receive the output of the vectorization function module to complete the vectorization of the recurrent neural network.
6. The RNN vectorization method for power system linear model order reduction according to any one of claims 2 to 5, characterized in that: Step S4 is specifically as follows: S4.
1. Set the initial values of the solution vectors vecX(t) and vecG(t) to vecX(0) and vecG(0), respectively, and select an appropriate activation function and constant γ. S4.
2. Drive the recurrent neural network function module to obtain the solution of the Lyapunov equation.
7. The RNN vectorization method for power system linear model order reduction according to claim 6, characterized in that: Step S5 is specifically as follows: S5.
1. According to steps S2-S4, obtain the controllability matrix G and the observability matrix X. Perform Cholesky decomposition on the controllability matrix G and the observability matrix X to obtain: Among them, Z G and Z X They are all lower triangular matrices; Then, perform SVD decomposition and get: Among them, U and V are column orthogonal matrices, ∑=diag(σ1,σ2…σ n ), σ1≥σ2…≥σ i …≥σ n ,σ i represents the diagonal elements of the i-th row of the Hankel singular value matrix; In this way, the left and right projection matrices are obtained as follows: Among them, U r and V r Represent the first r columns of matrices U and V respectively, According to the left and right projection matrices, the coefficient matrix A of the reduced-order system is obtained r 、B r 、C r 、D r : S5.
2. Further, the reduced-order system expression is obtained: in, and Δx r and denote the state variables and their derivatives of the reduced-order system, r<<n.
Citation Information
Patent Citations
Pattern recognition apparatus and pattern recognition method
CN108073980A
Order reduction method, order reduction device and order reduction equipment for circuit interconnection network model
CN111859835A