Micro-grid three-dimensional stability domain estimation algorithm based on ant colony algorithm

Through the ant colony algorithm and T-S fuzzy model, searching for boundaries in the microgrid, and combining with greedy algorithms, the difficulty of solving the three-dimensional stable domain estimation of large signals in the microgrid is solved, efficient stable domain determination is achieved, and the stability analysis of the microgrid system is improved efficiency.

CN118916581APending Publication Date: 2024-11-08ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410947742.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

There are problems of solving problems with three-dimensional stability domain estimation of large signals in microgrids, resulting in instability of microgrid systems.

Method used

The three-dimensional stability domain estimation algorithm of microgrid based on ant colony algorithm is used to search for boundaries in three-dimensional space by ants, and combined with the T-S fuzzy model and greedy algorithm, the three-dimensional stability domain of the system is gradually determined.

Benefits of technology

It realizes the rapid and reliable determination of the three-dimensional stable domain of the microgrid, improves the computing speed and work efficiency, and is more convenient than traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_8
    Figure SMS_8
  • Figure SMS_11
    Figure SMS_11
Patent Text Reader

Abstract

The invention discloses a micro-grid three-dimensional stability domain estimation algorithm based on an ant colony algorithm, and relates to the technical field of micro-grid large signal stability analysis, stability domain estimation of a micro-grid can be searched through an ant colony superposition greedy algorithm, and the position of an ant colony is combined with initial values of three variables in a system, so that the stability domain of the micro-grid is estimated. Therefore, the boundaries found by the ant colony according to the corresponding pheromones are the three-dimensional stability domain regions of the three variables in the micro-grid. According to the method, the reliable three-dimensional stability domain of the system can be obtained, and the boundary is searched through the ant colony, so that the method has certain convenience compared with the traditional manual search.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of large signal stability analysis of microgrids, and in particular to a three-dimensional stability region estimation algorithm for microgrids based on an ant colony algorithm and a TS fuzzy model. Background Art

[0002] As the concept of low-carbon life gradually takes root in people's minds, the use of new energy is becoming more and more popular in people's lives. Microgrids, as a way to efficiently integrate and utilize new energy, have also become a hot topic for research. Due to their small size, the "weak" grid characteristics of microgrids, such as low inertia and high impedance, make their stability extremely vulnerable to various large disturbances, leading to collapse, oscillation and other unstable phenomena in the microgrid system. Therefore, the large signal stability domain analysis of microgrids is also a focus of microgrid research.

[0003] At present, there are problems such as difficulty in solving the large signal three-dimensional stability domain of microgrids and low efficiency of the solution process. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention proposes a large signal three-dimensional stability domain estimation algorithm for microgrids based on ant colony algorithm. The stability domain estimation of the microgrid can be searched by using the ant colony superposition greedy algorithm, combining the position of the ant colony with the initial values ​​of the three variables in the system, so that the boundary found by the ant colony according to the corresponding pheromone is the three-dimensional stability domain area of ​​the three variables in the microgrid.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] Build a state-space model of the system:

[0007]

[0008] The state space equation of the translation system is made so that the origin of the coordinate system of the reference system is located at the stable point of the system. The translation system is made to the stable point so that the origin of the coordinate system of the reference system is located at x0, that is:

[0009]

[0010] The Takagi-Sugeno (TS) fuzzy model is used to linearize the nonlinear components in the state space model:

[0011] The system model can be expressed as a matrix product:

[0012]

[0013] According to the TS fuzzy model, the nonlinear system A(ξ) can be described as consisting of multiple linear subsystems A k(k=1, 2, ..., 2 r ), the linear subsystem is expressed as follows:

[0014]

[0015] example where c 11 ~c nn is a constant, g1(ξ1)~g r (ξ r ) is the r-term nonlinear component.

[0016] According to the TsS fuzzy model, the nonlinear system A(ξ) can be described as consisting of multiple linear subsystems A k (k=1, 2, .., 2 r ), the linear subsystem is expressed as follows:

[0017]

[0018] Where Ak represents the dynamic coefficient matrix of the linear subsystem of the fuzzy model. Ak is calculated by the following steps:

[0019] If * =[ξ1 * ,ξ2 * , .., ξ r * ] T , where ξ * is a non-zero vector. r (ξ r ) in the state variables ξ1~ξ r Linearization: First, g1[|ξ1 * |] and g1[-|ξ1 * |] replace g1(ξ1) respectively, splitting the above A(ξ) into two matrices Here, || represents the absolute value operation; subsequently, both matrices are represented by g2[|ξ2 * |] and g2[-|ξ2 * |] replace g2(ξ2) respectively, thus splitting into four matrices:

[0020]

[0021] The above splitting continues until g1(ξ1)~g r (ξ r ) are all g1[|ξ1 * |], g1[-|ξ1 * |]~g r [|ξ r* |], g r [-|ξ r * |] Replace, split into 2 r matrices, that is, the total linear subsystem Then the nonlinear system A(ξ) can be expressed by Fitted.

[0022] Create a three-dimensional space D for the system network operation, where D is a sphere; R is the radius of the sphere in the D area; R = 1000. This three-dimensional space is the three-dimensional space formed by the projection of the n-dimensional space composed of the n spatial state variables of the system. Generate ant colony pairs.

[0023] Generate ant pairs in three-dimensional space i , R_ant i is a 2×3 matrix that records the polar coordinates of the ant pairs’ positions, R_ant i The subscript i of R_ant represents the i-th group of ants. i The generation rules are as follows:

[0024]

[0025] Transform the coordinates of the ant pairs and obtain the pheromone Tau of the ant colony pairs i , Tau i It is a 1×2 matrix that records the pheromones of the two ants in an ant pair. Pheromones are a value of 0 or 1 that are used to help ants determine the direction of movement.

[0026] Réants i Ants is obtained by transforming formula (7) i :

[0027]

[0028] Ants i It is expressed as follows:

[0029]

[0030] Get ant pheromones. i The first ant in the game gets the pheromone Tau i (1) Take the second ant's pheromone Tau as an example. i (2) The acquisition process is similar. The process is as follows:

[0031] Let [|ξ4 * |,...,|ξ r * |] T =[0, 0, .., 0]T , let ξ1 * =Ant_x i1 ,ξ2 * =Ant_y i1 ,ξ3 * =Ant_z i1 , and obtain the dynamic coefficient matrix in the linear subsystem of the fuzzy model Will Substitute into (8) and construct the inequality set:

[0032]

[0033] The || operation indicates the determinant. The linear matrix inequality tool (LMIs) is used to solve equation (8). If the matrix P has a solution, it means that the system can be moved from the operating point ξ * =[ξ1 * ,ξ2 * , .., ξ r * ] T Asymptotically stabilize to ξ=0, the working point ξ * is a point inside the stable region, at which the initial pheromone Tau i (1) = 1; if the matrix P does not exist, it means that the system can be operated from the operating point ξ * =[ξ1 * ,ξ2 * , ..., ξ r * ] T It cannot gradually stabilize to ξ=0, the working point ξ * It is not a point inside the stable region. At this time, the initial pheromone Tau i (1)=0.

[0034] Since the initially set three-dimensional space D does not necessarily contain the stable region completely, the three-dimensional space is further expanded by moving the position of the first ant in the ant pair until the pheromone of the first ant in all ant pairs is 0. Because the position of the second ant in the ant pair is close to the stable point, and the position close to the stable point is stable, the pheromone Tau of the second ant in the ant pair is i (2)=1.

[0035] The process is as follows:

[0036] If Tau i (1) = 0, then no movement is required; if Tau i (1) = 1, then a virtual ant (Ant_x) is assigned to each ant pair. i ,Ant_y i ,Ant_z i) is used to update the position of the ants, and the position of the first ant in the ant pair is updated by the following formula:

[0037] Ant_x i =Ant_x i1 ,Ant_y i =Ant_y i1 , Ant_z i =Ant_z i1 ; (9)

[0038] Ant_x i1 =2Ant_x i ,Ant_y i1 =2Ant_y i , Ant_z i1 =2Ant_z i ;

[0039] Update the pheromone Tau through the steps of ants obtaining pheromones i (1), if Tau i (1) If it is still 1, continue to move until Tau i (1) = 0, stop moving, record the position of the ant; and update the corresponding R_ants through formula (9) i , r i1 Stored in the matrix R_ant.

[0040] According to the steps of moving the first ant in the ant pair to make its pheromone 0, the position of the first ant in all ant pairs is updated, and the expanded three-dimensional space D is obtained.

[0041] The ants search for the three-dimensional stability domain boundary of the system based on the pheromones they obtain. The process is as follows:

[0042] The present invention adopts the binary method to update the movement of ants in the ant colony. First, the ant pair Ants1 is moved, and the virtual ants of Ants1 are assigned positions.

[0043]

[0044] Obtain the pheromone tau of virtual ants i .

[0045] if:

[0046] tau i =Tau i (o), (o=1ot2) (11)

[0047] The position of the ant with the same pheromone as the virtual ant in Ants1 is updated by formula (13).

[0048] Ant xio =Ant xi , Ant yio =Ant yi , Ant zio =Ant zi ; (12)

[0049] (o=1or2)

[0050] Formula (10) is executed again to reallocate the positions of the virtual ants, and pheromones are obtained from the virtual ants again. Then, the positions of the ants in Ants1 that have the same pheromones as the virtual ants are updated through formulas (11) and (12), and the positions of the two ants in the ant pair are updated cyclically until the distance between the two ants in Ants1 satisfies formula (13):

[0051] |r i1 -r i2 |≤ε (13)

[0052] Exit the loop and stop moving; store the position of an ant in Ants1 into the matrix x. Move Ants2 to Ants1 in the same way as the ants in Ants1. ants The positions of the ants in the ant colony are stored in the matrix x; the matrix x is the boundary of the three-dimensional stable domain searched by the ant colony. In the above formula, ε is the error coefficient,

[0053] Since the ant pairs generated in step 3 are sparsely distributed, the error of the three-dimensional stable region boundary of the system will be large. Therefore, a greedy algorithm is added to find the points of the three-dimensional stable region boundary that the ant pairs have not searched, so as to supplement the three-dimensional stable region boundary of the system. The process is as follows:

[0054] Generate 100 virtual position ants using a greedy algorithm k '(ants_x k ',ants_y k ',ants_z k ')(1≤k≤100), and these positions are stable points outside the data in the matrix X; these virtual positions are added and filled into the original matrix X, and the updated matrix is ​​X'; so that the three-dimensional stable domain boundary volume V composed of the data in the matrix X' total Maximum. The formal description is:

[0055] By vector

[0056]

[0057] Where R max =max(R_ant).

[0058] Solving the objective function

[0059] max(y total ) (15)

[0060] V total It is the three-dimensional stable domain boundary volume composed of the data in the matrix X′.

[0061] The constraints are

[0062] P k ≠nan, 1≤k≤100 (16)

[0063] Let ξ1 * =ants_x k ',ξ2 * =ants_y k ',ξ3 * =ants_z k ', substitute into step 5 to find out whether the matrix P exists, and determine the virtual position ants k 'Whether it is in the stable region of the system, if so, it is expressed as P k ≠nan, otherwise expressed as P k =nan; where P k The superscript k is the number of the virtual ant.

[0064] The data matrix x′ of the three-dimensional boundary points after the final greedy algorithm is supplemented is saved and recorded.

[0065] The final three-dimensional boundary data points found were recorded, and the three-dimensional surface fitting was performed using the Least Squares Progressive Iterative Approximation (LSPIA) algorithm.

[0066] Compared with the prior art, the present invention has the following beneficial effects:

[0067] 1. The present invention can obtain a relatively reliable three-dimensional stable domain of the system, and the boundary is searched by ant colonies, which is more convenient than traditional manual search.

[0068] 2. The present invention is simple to operate and has a fast calculation speed. DETAILED DESCRIPTION

[0069] The technical solutions in the embodiments of the present invention are described below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0070] The present invention can be applied to a microgrid cluster, and can also be applied to a relatively complex microgrid model.

[0071] Firstly, a spatial state model of the simplified model of the DC microgrid cluster is established; the stability point of the model is calculated; the spatial variables in the spatial state model of the simplified model of the DC microgrid cluster are transferred to the equilibrium point by using the TsS fuzzy model modeling method, and the TsS fuzzy model of the system is established.

[0072] Secondly, a three-dimensional space is established and ant pairs are generated. The ant pairs search for the initial three-dimensional stable region boundary points of the system. A greedy algorithm is added to supplement the three-dimensional stable region boundary of the system to make the three-dimensional boundary more accurate.

[0073] Finally, the LSPIA algorithm is used to perform three-dimensional surface fitting to obtain the three-dimensional stable region of the system.

[0074] To sum up, the present invention involves a microgrid three-dimensional stability domain estimation algorithm based on an ant colony algorithm involving a TS fuzzy model, which can obtain the three-dimensional stability domain of the microgrid by searching the boundary through an ant colony. Compared with the traditional algorithm, the present invention can obtain the three-dimensional stability domain of the system, the algorithm is relatively simple, and the work efficiency is improved.

[0075] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations within the meaning and scope of the equivalent elements of the claims be included in the invention. Any marking in a claim should not be considered as limiting the claim to which it relates.

[0076] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A large signal three-dimensional stability region estimation algorithm for microgrid based on ant colony algorithm, It is characterized in that The following steps are involved: Step 1: Establish the state space model of the system: Where x = [x 1 ,x 2 ,…x n ] T , is a column vector consisting of n state variables of the system, u=[u 1 ,u 2 ,…u m ] T is a column vector consisting of the m inputs of the system, f 1 (x,u),f 2 (x,u),…f n (x,u) represent the state variables x 1 ,x 2 ,…x n The functional relationship between the first-order derivative of and all state variables and input variables of the system; the above equations can also be simplified as follows: Among them, f(x, u) = [f 1 (x, u), f 2 (x, u), … f n (x, u)] T ; Step 2: Translate the state space equation of the system so that the origin of the reference system is located at the stable point of the system, set the first-order derivative of the state variable to 0, and solve the following nonlinear algebraic equations: 0=f(x,t) (3) The solution is the stable point of the system, that is, x 0 =[x 1 0 ,x 2 0 ,…,x n 0 ] T , discuss the asymptotic stability of the region around it, and the stability domain; Translate the system to a stable point so that the origin of its reference frame is at x 0 ,Right now: Step 3: Use the Takagi-Sugeno (TS) fuzzy model to linearize the nonlinear components in the state space model. The system model is expressed in the form of matrix product: Where ξ=xx 0 =[ξ 1 ,ξ 2 ,…,ξ n ] T , A(ξ) and B(u) are n×n dynamic matrices and n×m input matrices respectively. where c 11 ~c nn is a constant, g 1 (ξ 1 )~g r (ξ r ) is the r-term nonlinear component; According to the TS fuzzy model, the nonlinear system A(ξ) is described as a system consisting of multiple linear subsystems A k (k=1,2,…,2 r ), the linear subsystem is expressed as follows: Among them, A k Represents the dynamic coefficient matrix of the linear subsystem of the fuzzy model, A k The following steps are performed: If * =[ξ 1 * ,ξ 2 * ,…,ξ r * ] T , where ξ * is a non-zero vector, and g in the system 1 (ξ 1 )~g r (ξ r ) in the state variable ξ 1 ~ξ r Linearization: First, g 1 [|ξ 1 * |] and g 1 [-|ξ 1 * |]Replace g respectively 1 (ξ 1 ), split the above A(ξ) into two matrices and Here, || represents the absolute value operation; subsequently, both matrices are represented by g 2 [|ξ 2 * |] and g 2 [-|ξ 2 * |]Replace g respectively 2 (ξ 2 ), which splits into four matrices: and The above splitting continues until g in A(ξ) 1 (ξ 1 )~g r (ξ r ) are all g 1 [|ξ 1 * |], g 1 [-|ξ 1 * |]~g r [|ξ r * |], g r [-|ξ r * |] Replace, split into 2 r matrices, that is, the total linear subsystem Then the nonlinear system A(ξ) is given by Fitted Step 4: Create a three-dimensional space D for the system network to run, where D is a sphere; R is the radius of the sphere in the D area; R=1000. This three-dimensional space is a three-dimensional space formed by the n-dimensional space projection composed of the n spatial state variables of the system, and generates ant colony pairs. Ant colony pairs are used to search the boundary. Ant colony pairs are a pair of ants searching the same boundary point. Generate ant pairs in three-dimensional space i , R_ant i is a 2×3 matrix that records the polar coordinates of the ant pairs’ positions, R_ant i The subscript i represents the i-th ant pair, R_ant i The generation rules are as follows: where r i1 =R, ants represents the total number of ant pairs, and the position of the ants is represented by r is the distance from the point to the origin, θ is the polar angle, is the azimuth; each pair of ants is on the same ray with the center of the circle as the endpoint. The initial position of the first ant is at the intersection of the ray and the boundary of the D sphere, and the second ant is at the position of the ray close to the origin; Step 5: Convert the coordinates of the ant pairs and obtain the pheromone Tau of the ant colony pairs i , Tau i is a 1×2 matrix that records the pheromones of the two ants in an ant pair. Pheromones are a value of 0 or 1 that helps ants determine the direction of movement. Réants i Ants is obtained by transforming formula (8) i : Ants i It is expressed as follows: Get ant pheromones, with Ants i The first ant in the game gets the pheromone Tau i (1) as an example, the second The ant pheromone Tau i (2) The acquisition process is as follows: Let [|ξ 4 * |,…,|ξ r * |] T =[0,0,…,0] T , let ξ 1 * =Ant_x i1 ,ξ 2 * =Ant_y i1 ,ξ 3 * =Ant_z i1 , and obtain the dynamic coefficient matrix in the linear subsystem of the fuzzy model Will Substitute into (8) and construct the inequality set: The || operation indicates the determinant. The linear matrix inequality tool LMIs is used to solve formula (9). If the matrix P has a solution, it means that the system is moving from the operating point ξ * =[ξ 1 * ,ξ 2 * ,…,ξ r * ] T Asymptotically stabilize to ξ=0, the working point ξ * is a point inside the stable region, at which the initial pheromone Tau i (1) = 1; if the matrix P does not exist, it means that the system is from the operating point ξ * =[ξ 1 * ,ξ 2 * ,…,ξ r * ] T It cannot gradually stabilize to ξ=0, the working point ξ * It is not a point inside the stable region. At this time, the initial pheromone Tau i (1) = 0; Step 6: Further expand the three-dimensional space by moving the position of the first ant in the ant pair until the pheromone of the first ant in all ant pairs is 0 and the pheromone of the second ant in the ant pair is Tau i (2) = 1; The process is as follows: If Tau i (1) = 0, then no movement is required; if Tau i (1) = 1, then a virtual ant (Ant_x) is assigned to each ant pair. i ,Ant_y i ,Ant_z i ) is used to update the position of the ants, and the position of the first ant in the ant pair is updated by the following formula: Ant_x i =Ant_x i1 ,Ant_y i =Ant_y i1 ,Ant_z i =Ant_z i1 ; (10) Ant_x i1 =2Ant_x i ,Ant_y i1 =2Ant_y i ,Ant_z i1 =2Ant_z i ; Update Pheromone Tau through step 5 i (1), if Tau i (1) If it is still 1, continue to move until Tau i (1) = 0, stop moving, record the position of the ant; and update the corresponding R_ants through formula (8) i , r i1 Stored in the matrix R_ant; After updating the position of the first ant in all ant colony pairs according to step 6, the expanded three-dimensional space D is obtained; Step 7: The ants search for the three-dimensional stability domain boundary of the system based on the acquired pheromones. The process is as follows: Use binary search to update the movement of ants in the ant colony. First, update the movement of ants in the ant colony. 1 Move to Ants 1 The virtual ants are assigned positions Obtain the pheromone tau of the virtual ant through step 5 i ; if: weather i =Price i (o), (o=1or2) (12) Update Ants by formula (13) 1 The position of the ant with the same pheromone as the virtual ant; Ant xio =Ant xi ,Ant yio =Ant yi ,Ant zio =Ant zi ; (13) (o=1or2) Execute formula (11) again to reallocate the virtual ants, obtain pheromones from the virtual ants again through step 4, and then update Ants through formulas (12) and (13). 1 The position of the ant with the same pheromone as the virtual ant…, the position of the two ants in the ant pair is updated cyclically; until Ants 1 The distance between the two ants satisfies formula (14): |r i1 -r i2 |≤ε (14) Exit the loop and stop moving; 1 The position of an ant is stored in the matrix X, according to Ants 1 The steps of ant movement are as follows: 2 ~Ants ants The positions of the ants in the matrix are stored in the matrix X; the matrix X is the boundary of the three-dimensional stable domain searched by the ant colony. In the above formula, ε is the error coefficient. Step 7: Since the ant pairs generated in step 3 are sparsely distributed, the error of the three-dimensional stable region boundary of the system will be large. Therefore, a greedy algorithm is added to find the points of the three-dimensional stable region boundary that the ant pairs have not found, so as to supplement the three-dimensional stable region boundary of the system. The process is as follows: Generate 100 virtual position ants using a greedy algorithm k '(ants_x k ',ants_y k ',ants_z k ')(1≤k≤100), and these positions are stable points outside the data in the matrix X; these virtual positions are added and filled into the original matrix X, and the updated matrix is ​​X'; so that the three-dimensional stable domain boundary volume V composed of the data in the matrix X' total The maximum, formally described as: By vector Where R max =max(R_ant). Solving the objective function max(V total ) (16) V total It is the three-dimensional stable domain boundary volume composed of the data in the matrix X′; The constraints are P k ≠nan,1≤k≤100 (17) Let ξ 1 * =ants_x k ',ξ 2 * =ants_y k ',ξ 3 * =ants_z k ', substitute into step 5 to find out whether the matrix P exists, and determine the virtual position ants k 'Whether it is in the stable region of the system, if so, it is expressed as P k ≠nan, otherwise expressed as P k =nan; where P k The superscript k is the number of the virtual ant; Save and record the data matrix X′ of the three-dimensional boundary points after the final greedy algorithm supplements; Step 8: Record the three-dimensional boundary data points finally found, and use the Least Squares Progressive Iterative Approximation (LSPIA) algorithm to perform three-dimensional surface fitting.

2. According to the microgrid large signal three-dimensional stability region estimation algorithm based on ant colony algorithm according to claim 1, It is characterized in that In step 7, the three-dimensional stable domain boundary volume V total The process of obtaining is as follows: Use the triangulation algorithm to convert the data in the matrix X' into a closed mesh composed of triangular facets; select the origin as the vertex, and then connect the point with the three vertices of each triangle on the surface to form multiple tetrahedrons, and number each tetrahedron, and record the total number of tetrahedrons as N; for each tetrahedron, use the following formula to calculate its volume. In the tetrahedron OX'_a1X'_a2X'_a3, X'_a1, X'_a2, and X'_a3 are three points in the matrix X': (x a1 ,y a1 ,z a1 )、(x a2 ,y a2 ,z a2 )、(x a3 ,y a3 ,z a3 ) are the point coordinates of X′_a1, X′_a2, and X′_a3 respectively; the vector expression of the above formula is converted into a coordinate expression as follows: Then, the volumes of all tetrahedrons are added up as shown in formula (19) to obtain the approximate volume of the closed solid figure:

3. According to the microgrid large signal three-dimensional stability region estimation algorithm based on ant colony algorithm as described in claim 1, It is characterized in that In step 8, the LSPIA surface fitting algorithm has the following steps: Step 1: Sort the data points in the matrix X′: m represents the number of data points in the matrix X′, and a parameter value is assigned to each point Step 2: Select the initial set of control points Construct the initial blending surface as follows: in is the normalized all-positive basis function; Step 3: Start the iterative process: For the tth iteration, t = 1, 2, ..., T, where T is the maximum number of iterations or the number of iterations that meet the termination condition, the current set of control points is The corresponding blended surface is as follows: The updating process of the control point set is as follows: First, calculate the error between the approximate surface and the given data point, the given data point is X′ d (x_d, y_d, z_d), then the error function E is defined as: M is the number of given data points, ‖‖ represents the Euclidean norm (i.e., distance); Secondly, for each control point Calculate the gradient of the error function about this point: Here · represents the dot product. Finally, the control points are updated using the gradient descent method: Where η is the learning rate, which is a constant set by yourself and is used to control the step size of each iteration; Step 4: Set the termination condition: The iteration is terminated when any of the following conditions is met: Condition 1: σ preset threshold, that is, when the error function E satisfies the following formula E(Q (t) )≤σ (26) Condition 2: Reach the maximum number of iterations T; Condition 3: The change of the control point is less than the threshold τ, indicating that the surface has converged, that is, Step 5: The final output is the fitted three-dimensional surface, which is represented by the parametric equation Q(u,v).