Error judgment acceleration method and device based on TT-FFHE method and medium

By converting the steps of solving the inverse of a large matrix into matrix vector multiplication and vector internal product operations, the problem of high calculation cost in judging the convergence radius is solved, and more efficient calculation is achieved, reducing the real-time calculation cost of the power grid.

CN119807592APending Publication Date: 2025-04-11HUNAN GREAT WALL GALAXY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411862905.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When the existing TT-FFHE method determines the convergence radius in the segmented extension stage, it is necessary to repeatedly solve the inverse of the large matrix, which is very costly and is difficult to meet the requirements of the power grid for real-time calculation.

Method used

By converting the steps of solving the inverse of a large matrix into a matrix vector multiplication and a vector internal product operation, a new algorithm for judging convergence radius error is developed, which reduces the computational complexity.

Benefits of technology

The number of iterations is reduced, the calculation efficiency is improved, the calculation amount and calculation time is reduced, and the real-time calculation cost of the power grid is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807592A_ABST
    Figure CN119807592A_ABST
Patent Text Reader

Abstract

The invention relates to an error judgment acceleration method based on a TT-FFHE method. The method comprises the following steps: processing power system data according to a TT-FFHE method, and obtaining a rational approximation function according to a rational approximation step of the TT-FFHE method; setting an allowable convergence error and an initial continuation step length; substituting the continuation initial step length into the rational approximation function, substituting the obtained rational approximation function value into a preset judgment condition, calculating an error between two sides of the function value of the judgment condition, judging whether the calculation error is smaller than an allowable convergence error or not, and calculating whether the advancing direction of the rational approximation function is a function value descending direction or not; the step length is reduced or increased according to the judgment result, and the number of iterations is reduced. The method can reduce the real-time calculation cost of the power grid.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to an error judgment acceleration method, device and medium based on a TT-FFHE method. Background Art

[0002] With the rapid development of China's power industry in recent years, my country's power grid has basically formed an overall pattern of "transmitting electricity from west to east, supplying electricity from north to south, and interconnecting the whole country", covering most parts of the country and becoming one of the largest power grids in the world. At the same time, my country's power grid has also put forward higher requirements for the timeliness of calculations. Optimal power flow is an important type of nonlinear optimization problem that often needs to be simulated in the operation and planning of modern power systems. In order to solve the problems that existing iterative optimization methods are prone to fall into local optimal solutions, it is difficult to conduct global searches to find higher quality solutions or global optimal solutions, and these methods often have convergence domains with fractal boundaries, which are prone to non-convergence and difficulty in predicting convergence trends.

[0003] However, a new method based on trust technology (TT) and fast and flexible holomorphic embedding (FFHE) has been proposed. This method can quickly solve the nonlinear dynamic system constructed by the trust technology method for global search, and systematically search layer by layer to find (if any) multiple local optimal solutions. However, when judging the convergence radius in the piecewise extension stage, this method needs to repeatedly solve the inverse of a large matrix, which has a high computational cost. The existing algorithm for judging the convergence error in the piecewise extension stage of the TT-FFHE method has a large amount of computation, especially for the optimization calculation of large power grids, which requires a lot of computing resources and computing time, and it is difficult to meet the requirements of the power grid for real-time computing. Summary of the invention

[0004] Based on this, it is necessary to provide an error judgment acceleration method, device and medium based on the TT-FFHE method, which can reduce the real-time calculation cost of the power grid, in response to the above technical problems.

[0005] An error judgment acceleration method based on the TT-FFHE method, the method comprising:

[0006] Step 1: Obtain power system data; process the power system data according to the TT-FFHE method, and obtain a rational approximate function according to the rational approximation steps of the TT-FFHE method; set the allowable convergence error and the initial step size of the extension;

[0007] Step 2: Substitute the initial step length of the extension into the rational approximate function, substitute the obtained rational approximate function value into the preset judgment condition, and obtain two function values ​​of the judgment condition;

[0008] Step 3: Calculate the errors on both sides of the function value of the judgment condition, determine whether the calculation error is less than the allowable convergence error, and calculate whether the forward direction of the rational approximate function is the decreasing direction of the function value;

[0009] Step 4: If the calculation error is greater than the allowable convergence error or the direction of the rational approximate function is not the direction of the function value decreasing, the step size is reduced by a preset multiple; if the calculation error is less than the allowable convergence error and the direction of the rational approximate function is the direction of the function value decreasing, it is determined again whether the step size reduction operation was performed in the previous round of iteration; if the step size is reduced, the algorithm is terminated; if the step size is not reduced, the step size is enlarged by a preset multiple, and the enlarged step size is set as the initial step size of the new round of iteration, and the algorithm returns to step 2.

[0010] In one embodiment, the rational approximation function is [m / n](x); the obtained rational approximation function value is substituted into the preset judgment condition to obtain two function values ​​of the judgment condition, including:

[0011] Substitute the obtained rational approximate function value [m / n](s′) into the pre-set judgment condition The two function values ​​of the judgment conditions are

[0012]

[0013] Where s=s′ represents the initial step size, and the superscript T represents the transposition operation. represents the objective function gradient.

[0014] In one embodiment, determining whether the calculation error is less than the allowable convergence error includes:

[0015] Determine whether the calculation error is less than the allowable convergence error, that is, check whether the function value of the judgment condition satisfies the judgment formula condition, that is, Wherein, e* represents the allowable convergence error.

[0016] In one embodiment, calculating whether the advancing direction of the rational approximation function is a decreasing direction of the function value includes:

[0017] The direction of progress for calculating the rational approximation function is

[0018]

[0019] Where s = s′ represents the initial step length;

[0020] If the cosine value of the angle between the forward direction and the objective function gradient of the optimal power flow problem is less than 0, it is the decreasing direction of the function value, which can be less than or equal to 0 in actual operation.

[0021] In one embodiment, if the calculation error is greater than the allowable convergence error or the direction of the rational approximation function is not the direction of function value decrease, the step size is reduced by a preset multiple, including:

[0022] If the calculation error is greater than the allowable convergence error e* or Then the step size s* is reduced to αs′, (α<1).

[0023] In one embodiment, if the step size is not reduced, the step size is enlarged according to a preset multiple, including:

[0024] If the step size is not reduced, the step size s*=αs′ is enlarged according to a preset multiple (α>1).

[0025] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0026] Step 1: Obtain power system data; process the power system data according to the TT-FFHE method, and obtain a rational approximate function according to the rational approximation steps of the TT-FFHE method; set the allowable convergence error and the initial step size of the extension;

[0027] Step 2: Substitute the initial step length of the extension into the rational approximate function, substitute the obtained rational approximate function value into the preset judgment condition, and obtain two function values ​​of the judgment condition;

[0028] Step 3: Calculate the errors on both sides of the function value of the judgment condition, determine whether the calculation error is less than the allowable convergence error, and calculate whether the forward direction of the rational approximate function is the decreasing direction of the function value;

[0029] Step 4: If the calculation error is greater than the allowable convergence error or the direction of the rational approximate function is not the direction of the function value decreasing, the step size is reduced by a preset multiple; if the calculation error is less than the allowable convergence error and the direction of the rational approximate function is the direction of the function value decreasing, it is determined again whether the step size reduction operation was performed in the previous round of iteration; if the step size is reduced, the algorithm is terminated; if the step size is not reduced, the step size is enlarged by a preset multiple, and the enlarged step size is set as the initial step size of the new round of iteration, and the algorithm returns to step 2.

[0030] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0031] Step 1: Obtain power system data; process the power system data according to the TT-FFHE method, and obtain a rational approximate function according to the rational approximation steps of the TT-FFHE method; set the allowable convergence error and the initial step size of the extension;

[0032] Step 2: Substitute the initial step length of the extension into the rational approximate function, substitute the obtained rational approximate function value into the preset judgment condition, and obtain two function values ​​of the judgment condition;

[0033] Step 3: Calculate the errors on both sides of the function value of the judgment condition, determine whether the calculation error is less than the allowable convergence error, and calculate whether the forward direction of the rational approximate function is the decreasing direction of the function value;

[0034] Step 4: If the calculation error is greater than the allowable convergence error or the direction of the rational approximate function is not the direction of the function value decreasing, the step size is reduced by a preset multiple; if the calculation error is less than the allowable convergence error and the direction of the rational approximate function is the direction of the function value decreasing, it is determined again whether the step size reduction operation was performed in the previous round of iteration; if the step size is reduced, the algorithm is terminated; if the step size is not reduced, the step size is enlarged by a preset multiple, and the enlarged step size is set as the initial step size of the new round of iteration, and the algorithm returns to step 2.

[0035] The above-mentioned error judgment acceleration method based on the TT-FFHE method, this application develops a new convergence radius error judgment algorithm for the segmented extension stage of the TT-FFHE method, and converts the steps of solving the inverse of a large matrix into a matrix-vector multiplication and a vector inner product operation. The calculated convergence step will be longer than the convergence step calculated by the existing method, thereby reducing the number of iterations and obtaining the final solution of the TT-FFHE method more quickly. The benefit brought by it is that it greatly simplifies the calculation, reduces the required amount of calculation and calculation time, and thus reduces the real-time calculation cost of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a flowchart of an error judgment acceleration method based on the TT-FFHE method in one embodiment;

[0037] Figure 2 A flowchart of an error judgment acceleration process in an embodiment;

[0038] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] In one embodiment, Figure 1 and Figure 2As shown, an error judgment acceleration method based on the TT-FFHE method is provided, comprising the following steps:

[0041] Step 1: Obtain power system data; process the power system data according to the TT-FFHE method, and obtain a rational approximate function according to the rational approximation steps of the TT-FFHE method; set the allowable convergence error and the initial step size of the extension;

[0042] According to the rational approximation steps of the TT-FFHE method, a rational approximation function, [m / n](x), is obtained, an allowable convergence error e* is set, and an initial step length of extension s=s′ is set.

[0043] Step 2: Substitute the initial step length of the extension into the rational approximate function, substitute the obtained rational approximate function value into the preset judgment condition, and obtain two function values ​​of the judgment condition;

[0044] Substitute the initial step size s = s′ into the rational approximation function [m / n](x), and then substitute the obtained rational approximation function value [m / n](s′) into

[0045] This application adds two new judgment conditions Deleted the original algorithm judgment conditions

[0046] The original algorithm judgment condition Multiplying both sides of the equation by DH(X) gives:

[0047]

[0048] At this time, use the judgment condition Replace the original algorithm judgment condition It can avoid calculating complex functions during the operation process Greatly improve computing efficiency and reduce computing costs.

[0049] In addition, the new judgment condition Not completely equivalent to the original algorithm judgment condition At the same time, add judgment conditions To ensure that the direction of the rational approximation function [m / n](x) is the direction that makes the function value decrease. Judgment conditions The geometric meaning is that the trajectory of the solution vector is within the hyperplane (feasible domain) H(X) = 0, and the judgment condition The geometric meaning of is that the velocity direction of the solution vector is consistent with the projection direction of the negative gradient of the objective function in the hyperplane. The solution vector that meets the two judgment conditions is equivalent to satisfying the judgment condition of the original algorithm.

[0050] For judgment conditions The cosine of the angle between the two vectors is not required Because the goal of the piecewise extension stage is to quickly approach the stable equilibrium point of the projected gradient system, trajectories that are still in the feasible domain space (within the error range) but do not strictly conform to the negative gradient direction of the objective function can be accepted.

[0051] The matrices and vectors involved in the two newly added judgment conditions are all known or obtained variables of the executed steps of the TT-FFHE method. In addition to calculating the judgment conditions themselves, no additional calculation amount is added. The calculation of complex functions involving large matrix inversion is converted into a matrix-vector multiplication and a vector inner product operation, which greatly simplifies the calculation and reduces the required calculation amount and time.

[0052] Step 3: Calculate the errors on both sides of the function value of the judgment condition, determine whether the calculation error is less than the allowable convergence error, and calculate whether the forward direction of the rational approximate function is the decreasing direction of the function value;

[0053] Step 4: If the calculation error is greater than the allowable convergence error or the direction of the rational approximate function is not the direction of the function value decreasing, the step size is reduced by a preset multiple; if the calculation error is less than the allowable convergence error and the direction of the rational approximate function is the direction of the function value decreasing, it is determined again whether the step size reduction operation was performed in the previous round of iteration; if the step size is reduced, the algorithm is terminated; if the step size is not reduced, the step size is enlarged by a preset multiple, and the enlarged step size is set as the initial step size of the new round of iteration, and the algorithm returns to step 2.

[0054] If the calculation error is greater than the allowable convergence error e* or Then reduce the step size s* = αs′, (α < 1); if the calculation error is less than the allowable convergence error e* and [m / n](s′)· Then it is determined again whether the step size reduction operation was performed in the last iteration. If the step size was reduced, the algorithm is terminated. If the step size was not reduced, the step size s* = αs′ is enlarged (α>1), and the new step size s* is set as the initial step size of the new iteration, and the process goes to step 2. By converting the steps of solving the inverse of a large matrix into a matrix-vector multiplication and a vector inner product operation, the convergence step size of the calculation will be longer than that of the existing method, thereby reducing the number of iterations and obtaining the final solution of the TT-FFHE method more quickly. The benefit brought by this is that the calculation is greatly simplified.

[0055] The above-mentioned error judgment acceleration method based on the TT-FFHE method, this application develops a new convergence radius error judgment algorithm for the segmented extension stage of the TT-FFHE method, and converts the steps of solving the inverse of a large matrix into a matrix-vector multiplication and a vector inner product operation. The calculated convergence step will be longer than the convergence step calculated by the existing method, thereby reducing the number of iterations and obtaining the final solution of the TT-FFHE method more quickly. The benefit brought by it is that it greatly simplifies the calculation, reduces the required amount of calculation and calculation time, and thus reduces the real-time calculation cost of the power grid.

[0056] In one embodiment, the rational approximation function is [m / n](x); the obtained rational approximation function value is substituted into the preset judgment condition to obtain two function values ​​of the judgment condition, including:

[0057] Substitute the obtained rational approximate function value [m / n](s′) into the pre-set judgment condition The two function values ​​of the judgment conditions are

[0058]

[0059] Where s=s′ represents the initial step size, and the superscript T represents the transposition operation. represents the objective function gradient.

[0060] In one embodiment, determining whether the calculation error is less than the allowable convergence error includes:

[0061] Determine whether the calculation error is less than the allowable convergence error, that is, check whether the two function values ​​of the judgment condition meet the judgment formula conditions, that is, Wherein, e* represents the allowable convergence error.

[0062] In one embodiment, calculating whether the advancing direction of the rational approximation function is a decreasing direction of the function value includes:

[0063] The direction of progress for calculating the rational approximation function is

[0064]

[0065] Where s = s′ represents the initial step length;

[0066] If the cosine value of the angle between the forward direction and the gradient of the objective function of the optimal power flow problem is less than 0, it is the direction of function value decrease, which can be less than or equal to 0 in actual operation.

[0067] In a specific embodiment, the optimal power flow problem can be concisely described as follows:

[0068] minf(x),

[0069] S T i (x)≤0, {i=1,...,m},

[0070] h j (x)=0, {j=1,...,l}.

[0071] in is the objective function, g i (x) represents the i-th inequality constraint, h j (x) represents the jth equality constraint. By introducing slack variables, we can express the above optimization problem as:

[0072] minf(X),

[0073] StH(X)=0.

[0074] Where H(X) is a function vector of dimension l+m, and X is defined as: = [x, z] T , let N = l + m, and redefine f(X) as

[0075] The TT-FFHE method converts the above optimization problem into the following dynamic system differential equation and solves it to obtain the solution of the original optimization problem.

[0076] In one embodiment, if the calculation error is greater than the allowable convergence error or the direction of the rational approximation function is not the direction of function value decrease, the step size is reduced by a preset multiple, including:

[0077] If the calculation error is greater than the allowable convergence error e* or Then the step size s* is reduced to αs′, (α<1).

[0078] In one embodiment, if the step size is not reduced, the step size is enlarged according to a preset multiple, including:

[0079] If the step size is not reduced, the step size s*=αs′ is enlarged according to a preset multiple (α>1).

[0080] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0081] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an error judgment acceleration method based on the TT-FFHE method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0082] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0083] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0084] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0085] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An error judgment acceleration method based on the TT-FFHE method, characterized in that: The method comprises: Step 1: Acquire power system data; process the power system data according to the TT-FFHE method, and obtain a rational approximation function according to the rational approximation steps of the TT-FFHE method; set an allowable convergence error and an initial step size for extension; Step 2: Substitute the initial step length of the extension into the rational approximate function, substitute the obtained rational approximate function value into the preset judgment condition, and obtain two function values ​​of the judgment condition; Step 3: Calculate the errors on both sides of the function value of the judgment condition, determine whether the calculation error is less than the allowable convergence error, and calculate whether the forward direction of the rational approximate function is the descending direction of the function value; Step 4: If the calculation error is greater than the allowable convergence error or the direction of the rational approximate function is not the direction of function value decrease, the step size is reduced by a preset multiple; if the calculation error is less than the allowable convergence error and the direction of the rational approximate function is the direction of function value decrease, it is determined again whether the step size reduction operation was performed in the previous round of iteration; if the step size is reduced, the algorithm is terminated; if the step size is not reduced, the step size is enlarged by a preset multiple, the enlarged step size is set as the initial step size of the new round of iteration, and the process returns to step 2.

2. The method according to claim 1, characterized in that: The rational approximate function is [m / n](x); the obtained rational approximate function value is substituted into the preset judgment condition, and the two function values ​​of the judgment condition are obtained, including: Substitute the obtained rational approximate function value [m / n](s′) into the pre-set judgment condition The two function values ​​of the judgment conditions are Where s=s′ represents the initial step size, and the superscript T represents the transposition operation. represents the objective function gradient.

3. The method according to claim 1, characterized in that Determine whether the calculation error is less than the allowable convergence error, including: Determine whether the calculation error is less than the allowable convergence error, that is, check whether the function value of the judgment condition satisfies the judgment formula condition, that is, Among them, e * Represents the allowable convergence error.

4. The method according to claim 1, characterized in that: Calculating whether the advancing direction of the rational approximate function is a decreasing direction of the function value includes: The forward direction of the rational approximation function is calculated as Where s = s′ represents the initial step length; If the cosine value of the angle between the forward direction and the gradient of the objective function of the optimal power flow problem is less than 0, it is the direction of function value decrease.

5. The method according to claim 1, characterized in that If the calculation error is greater than the allowable convergence error or the forward direction of the rational approximation function is not the decreasing direction of the function value, the step size is reduced according to a preset multiple, including: If the calculation error is greater than the allowable convergence error e * or Then reduce the step size s * =αs′,(α<1).

6. The method according to claim 1, characterized in that If the step size is not reduced, the step size is enlarged by a preset multiple, including: If the step size is not reduced, the step size s is enlarged according to the preset multiple * =αs′,(α>1).

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.