Neural network construction method and system for solving high-index differential algebraic equation of constrained mechanical multi-body system

By constructing a physical information neural network model based on KANs, the problem that the existing technology is difficult to efficiently solve high-index differential algebraic equations is solved, and the solution effect is achieved with high precision and high efficiency, which is suitable for multiple scientific and engineering fields.

CN119558357AActive Publication Date: 2025-03-04GUANGZHOU UNIVERSITY

Patent Information

Application Number
CN202411464246.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-03-04
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing neural network methods are difficult to solve high-index differential algebraic equations efficiently and accurately, and there are problems of low accuracy and poor stability.

Method used

By constructing a physical information neural network model based on Kolmogorov–Arnold Networks (KANs), preprocessing, defining loss functions, setting training parameters and data, and iterative training using the L-BFGS algorithm, ultimately achieving efficient and accurate solutions of high-index differential algebraic equations.

Benefits of technology

It overcomes the accuracy and efficiency limitations of traditional neural networks when solving high-index differential algebraic equations, and achieves high-precision and high-efficiency solutions. It is suitable for solving differential algebraic equations in the fields of physics, chemistry, biology, etc.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558357A_ABST
    Figure CN119558357A_ABST
Patent Text Reader

Abstract

The invention discloses a neural network construction method and system for solving a high-index differential algebraic equation, and the method achieves the efficient and precise solving of the high-index differential algebraic equation through the preprocessing of an equation, the construction of a physical information neural network model, the definition of a loss function, the setting of training parameters and data, and the iterative training through an L-BFGS algorithm. And finally, the trained neural network model is used for solving a differential algebraic equation of the constrained mechanical arm system, variable values are uniformly selected in a definition domain and input into the trained model, so that a solution of the system is obtained, in addition, a predicted solution and an actual solution of the neural network are compared and analyzed, and the optimal solution is obtained. By means of the mode, the nonlinear high-index differential algebraic equation problem in the constrained mechanical arm system can be efficiently and accurately solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of neural network technology, and more specifically, to a neural network construction method and system for solving high-index differential algebraic equations. Background Art

[0002] Differential-algebraic equations (DAE) are a common and important type of equations in science and engineering, including differential equations and algebraic equations. This type of equation is widely used in power system simulation, mechanical system modeling, chemical reaction kinetics, circuit simulation, control system design, biological science modeling and many other fields.

[0003] The index (index) of a differential algebraic equation refers to the minimum number of times that some or all of the differential algebraic equation system needs to be differentiated when converting it into an ordinary differential equation system. Generally speaking, the higher the index, the more difficult it is to solve the DAE directly. Due to its complexity and the existence of high-order derivatives, solving high-index (index ≥ 2) differential algebraic equations is usually very challenging, and special numerical methods and algorithms are required to obtain effective solutions. To this end, various numerical methods for approximate analytical solutions have been proposed, such as the finite difference method, the finite element method, and the finite volume method. However, traditional solution methods are usually based on numerical calculations or symbolic calculations, which have problems such as high computational complexity and low precision.

[0004] In recent years, with the development of physical information neural network technology, more and more researchers have begun to explore the use of neural networks to solve differential algebraic equations. As a new computing model, neural networks have the advantages of parallel computing, adaptive learning, strong generalization and high fault tolerance compared to traditional numerical computing methods. Therefore, they are considered to be a potential tool for solving differential algebraic equations.

[0005] At present, most neural network methods can only solve differential algebraic equations with an index of 1, and existing neural network methods have problems of low accuracy and poor stability when solving differential algebraic equations with high indexes. Kolmogorov–Arnold Networks (KANs) neural networks use spline functions as their trainable activation functions, which have unique advantages in scientific computing.

[0006] Therefore, a neural network construction method and system for solving high-index differential algebraic equations is desired to solve the problems faced in solving high-index differential algebraic equations. Summary of the invention

[0007] In order to solve the above technical problems, this application is proposed. The embodiments of this application provide a neural network construction method and system for solving high-index differential algebraic equations, which can achieve efficient and accurate solution of high-index differential algebraic equations by preprocessing equations, building a physical information neural network model, defining loss functions, setting training parameters and data, and using the L-BFGS algorithm for iterative training, thus overcoming the accuracy and efficiency limitations of traditional artificial neural networks on such problems.

[0008] According to one aspect of the present application, a method for constructing a neural network for solving high-index differential algebraic equations is provided, which includes: S1. constructing a preprocessing module for preprocessing high-index differential algebraic equations; S2. constructing a physical information neural network model of high-index differential algebraic equations based on KAN; S3. constructing a loss function according to the physical information of the high-index differential algebraic equations; S4. setting training parameters, generating training data, and iteratively training the physical information neural network model of high-index differential algebraic equations using the L-BFGS algorithm; obtaining a physical information neural network model for solving high-index differential algebraic equations.

[0009] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that it also includes the following steps: S5. Use the trained high-index differential algebraic equation physical information neural network model to solve the differential algebraic equations in chronological order.

[0010] In the above-mentioned neural network construction method for solving high-index differential-algebraic equations, it is characterized in that the preprocessing in step S1 is specifically: splitting the differential-algebraic equation group of the form: y′=f(y,z), y(t0)=y0; 0=g(y), z(t0)=z0 into the differential equation y′=f(y,z) and the algebraic equation 0=g(y).

[0011] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that step S2 includes: constructing a multi-output Kolmogorov–Arnold Networks (KANs) neural network with trainable parameters θ, initializing the neural network parameters θ using the Xavier initialization method, selecting the B-spline function as a trainable activation function, and assigning a KAN-based multi-output neural network to the high-index differential algebraic equation.

[0012] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that the step S3 includes: according to the characteristics of the high-index differential algebraic equations, the physical information of the differential algebraic equations is embedded into the KAN-based neural network, and the residual loss term L of the KAN-based neural network is constructed. 残差 , as shown in the following formula:

[0013]

[0014] The initial loss term L of the neural network based on KAN is constructed by taking the mean square error between the true value of the initial condition and the predicted value of the neural network as the initial condition loss of the neural network. 初始 , as shown in the following formula:

[0015]

[0016] Among them, N f is the number of residual points, N0 is the number of initial points, f is the differential function equation and algebraic function equation, is the true value of the initial condition, y n is the predicted value of the neural network;

[0017] The total loss function L is obtained based on the residual loss term and the initial loss term of the neural network. 总 , as shown in the following formula:

[0018] L 总 =L 残差 +L 初始 .

[0019] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that the step S4 includes: S41. According to the complexity of the differential algebraic equations, the scale of the neural network is set, including the width and depth of the neural network, and the number of grids and the order of the neural network basis function are set; S42. The optimizer is set to minimize the loss function; S43. Uniform sampling is performed in the entire time domain to generate a residual data point set; S44. According to the initial conditions of the differential algebraic equations, an initial condition data set is generated; S45. The residual data point set and the initial condition data set are combined into training data; S46. Using the training data, the neural network model is iteratively trained, and the L-BFGS optimization algorithm is used to minimize the loss function to obtain the optimal neural network model.

[0020] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that the step S5 includes: using a trained neural network model to solve the high-index differential algebraic equations: in the process of outputting the prediction approximate solution, the variable values ​​are uniformly taken within the definition domain, and are input into the trained neural network model as the variable values ​​of the differential algebraic equation to obtain the solution of the differential algebraic equation.

[0021] In the above-mentioned neural network construction method for solving high-index differential algebraic equations, it is characterized in that step S4 includes: testing and optimizing the trained high-index differential algebraic equation physical information neural network model, specifically: comparing the predicted solution of the neural network with the exact solution set of the differential algebraic equation, and testing and optimizing the trained high-index differential algebraic equation physical information neural network model through error comparison analysis.

[0022] According to one aspect of the present application, a neural network construction system for solving high-index differential algebraic equations is also provided, which includes: a preprocessing module for preprocessing high-index differential algebraic equations; a high-index differential algebraic equation physical information neural network model based on KAN; the loss function of the high-index differential algebraic equation physical information neural network model is constructed according to the physical information of the high-index differential algebraic equation, and the high-index differential algebraic equation physical information neural network model is obtained by setting training parameters, generating training data, and iterative training using the L-BFGS algorithm.

[0023] According to one aspect of the present application, an electronic device is also provided, which includes a processor and a memory, wherein the memory stores an executable program, and when the processor executes the executable program, it implements a neural network construction method for solving high-index differential algebraic equations as described above.

[0024] Compared with the prior art, the neural network construction method for solving high-index differential algebraic equations provided by the present application effectively overcomes the problems of low precision and low computational efficiency of existing artificial neural networks in solving high-index differential algebraic equations. This method has broad application prospects and is suitable for solving various differential algebraic equations in physics, chemistry, biology and other fields. For example, in the field of physics, it can be used to solve Schrödinger equations, wave equations, heat conduction equations, etc.; in the field of chemistry, it can be used to solve chemical reaction kinetics equations and mass spectrometry equations; in the field of biology, it can be applied to solving biokinetic equations and neuron model equations. The introduction of this technology not only helps to solve differential algebraic equations in scientific research and engineering practice, but also has significant practical value and economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0026] Figure 1The present invention is a flowchart of a neural network construction method for solving high-index differential algebraic equations according to an embodiment of the present application.

[0027] Figure 2 It is a flowchart of a neural network construction method for solving high-index differential algebraic equations according to an embodiment of the present application.

[0028] Figure 3 This is a schematic diagram of fitting predicted solutions and exact solutions for solving a group of ordinary Heisenberg index type 3 differential algebraic equations according to case 1 provided in an embodiment of the present application.

[0029] Figure 4 This is a schematic diagram of the absolute error between the predicted solution and the exact solution for solving the ordinary Heisenberg index type 3 differential algebraic equation system according to the case 1 provided in the embodiment of the present application.

[0030] Figure 5 This is a schematic diagram of fitting the predicted solution and the exact solution for solving the simple pendulum Heisenberg index type 3 differential algebraic equation system according to Case 2 provided in an embodiment of the present application.

[0031] Figure 6 This is a schematic diagram of the absolute error between the predicted solution and the exact solution for solving the simple pendulum Heisenberg index type 3 differential algebraic equation system according to Case 2 provided in an embodiment of the present application.

[0032] Figure 7 A schematic diagram of a constrained robot arm according to Case 3 provided for one or more embodiments of this specification;

[0033] Figure 8 A schematic diagram of fitting predicted solutions and exact solutions for a constrained mechanical multi-body system provided in case 3 of one or more embodiments of this specification;

[0034] Fig. 9 A schematic diagram of the absolute error between the predicted solution and the exact solution of a constrained mechanical multi-body system in case three provided for one or more embodiments of this specification. DETAILED DESCRIPTION

[0035] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0036] As shown in this application and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0037] Although the present application makes various references to certain modules in the system according to the embodiments of the present application, any number of different modules can be used and run on the user terminal and / or server. The modules are only illustrative, and different aspects of the system and method can use different modules.

[0038] Flowcharts are used in the present application to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps may be processed in reverse order or simultaneously as required. Meanwhile, other operations may also be added to these processes, or a certain step or several steps of operations may be removed from these processes.

[0039] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0040] At present, most neural network methods can only solve differential algebraic equations with an index of 1, and the existing neural network methods have the problems of low accuracy and poor stability when solving high-index differential algebraic equations. Differential algebraic equation systems are classified according to their so-called indices. Those with indices of 1 or 0 are easy to solve, while those with indices of 2 or 3, and higher, cannot be solved directly by existing solvers and need to be converted before solving. By using symbolic processing, the high index is converted to index 1 or 0, and then directly solved by the existing solver. However, the process of symbolic conversion will reduce the accuracy of the original algebraic constraint equation. The Kolmogorov–Arnold Networks (KANs) neural network uses spline functions as its trainable activation function, which has unique advantages in scientific computing. Therefore, the present invention aims to provide a neural network construction method and system for solving high-index differential algebraic equations to solve the problems faced in solving high-index differential algebraic equations.

[0041] In the technical solution of the present application, a neural network construction method for solving high-index differential algebraic equations is proposed. Figure 1 Flow chart of a neural network construction method for solving high-index differential algebraic equations according to an embodiment of the present application. Figure 1As shown, according to the embodiment of the present application, the neural network construction method for solving high-index differential algebraic equations includes the following steps: S1. Constructing a preprocessing module for preprocessing high-index differential algebraic equations; S2. Constructing a physical information neural network model of high-index differential algebraic equations based on KAN; S3. Constructing a loss function according to the physical information of the high-index differential algebraic equations; S4. Setting training parameters, generating training data, and iteratively training the physical information neural network model of high-index differential algebraic equations using the L-BFGS algorithm; obtaining a physical information neural network model for solving high-index differential algebraic equations; S5. Using the trained physical information neural network model of high-index differential algebraic equations to solve differential algebraic equations in chronological order.

[0042] In an embodiment of the present application, the step S1 preprocesses the high-index differential algebraic equation. It should be understood that the preprocessing of the present application is a preprocessing for machine learning tasks. While maintaining the high-index characteristics of the original system, it is properly processed to make it more suitable for the input of the machine learning model. This preprocessing may include steps such as data cleaning, feature selection, and data standardization to ensure that the data input to the neural network is appropriate. Specifically, in one embodiment of the present application, the preprocessing in step S1 is specifically: splitting the differential algebraic equation group of the form: y′=f(y,z), y(t0)=y0; 0=g(y), z(t0)=z0 into a differential equation y′=f(y,z) and an algebraic equation 0=g(y).

[0043] In an embodiment of the present application, the step S2 constructs a physical information neural network model of high-index differential algebraic equations based on KAN. It should be understood that traditional numerical methods cannot directly solve high-index differential algebraic equations, and it is necessary to convert the high index into a differential algebraic equation with an index of 1 or 0; this conversion process will lead to the problem of reduced accuracy of the original algebraic equation. Compared with the traditional physical information neural network using a multi-layer perceptron (MLP) as its neural network, the physical information neural network using the KAN network provides better accuracy and interpretability, which is crucial for understanding the logic behind the model prediction in scientific research and engineering applications. The KAN network can be customized and optimized according to specific problems in different fields, making it highly adaptable and can be widely used in solving differential algebraic equations in multiple fields such as physics, chemistry, and biology.

[0044] Specifically, in one embodiment of the present application, step S2 includes: constructing a multi-output Kolmogorov–Arnold Networks (KANs) neural network with trainable parameters θ. Initializing the parameters θ of the neural network using the Xavier initialization method, and selecting the B-spline function as a trainable activation function. Finally, this KAN-based multi-output neural network is applied to solving high-index differential algebraic equations.

[0045] In the embodiment of the present application, the step S3 constructs a loss function according to the physical information of the high-index differential algebraic equation. It should be understood that by adding the physical law to the loss function in the form of residuals, it can be ensured that the prediction results of the neural network satisfy the physical equations, thereby improving the accuracy and reliability of the model. The introduction of physical information reduces the dependence on a large amount of training data, so that the model can be effectively trained and predicted even when there is less data or more noise.

[0046] Specifically, in one embodiment of the present application, step S3 includes: according to the characteristics of high-index differential algebraic equations, embedding the physical information of the differential algebraic equations into a KAN-based neural network, and constructing a residual loss term L of the KAN-based neural network. 残差 , as shown in the following formula:

[0047]

[0048] The initial loss term L of the neural network based on KAN is constructed by taking the mean square error between the true value of the initial condition and the predicted value of the neural network as the initial condition loss of the neural network. 初始 , as shown in the following formula:

[0049]

[0050] Among them, N f is the number of residual points, N0 is the number of initial points, f is the differential function equation and algebraic function equation, is the true value of the initial condition, y n is the predicted value of the neural network;

[0051] The total loss function L is obtained based on the residual loss term and the initial loss term of the neural network. 总 , as shown in the following formula:

[0052] L 总 =L 残差 +L 初始 .

[0053] In an embodiment of the present application, the step S4 sets training parameters, generates training data, and uses the L-BFGS algorithm to iteratively train the high-index differential algebraic equation physical information neural network model. Specifically, in one embodiment of the present application, the step S4 includes: S41. According to the complexity of the differential algebraic equation, the scale of the neural network is set, including the width and depth of the neural network, and the number of grids and the order of the neural network basis function are set; S42. The optimizer is set to minimize the loss function; S43. Uniform sampling is performed in the entire time domain to generate a residual data point set; S44. According to the initial conditions of the differential algebraic equation, an initial condition data set is generated; S45. The residual data point set and the initial condition data set are combined into training data; S46. Using the training data, the neural network model is iteratively trained, and the loss function is minimized using the L-BFGS optimization algorithm to obtain the optimal neural network model.

[0054] Further, the step S4 includes: testing and optimizing the trained high-index differential algebraic equation physical information neural network model, specifically: comparing the predicted solution of the neural network with the exact solution set of the differential algebraic equation, and testing and optimizing the trained high-index differential algebraic equation physical information neural network model through error comparison analysis.

[0055] In the embodiment of the present application, the step S5 uses the trained high-index differential algebraic equation physical information neural network model to solve the differential algebraic equation in chronological order. It should be understood that the physical information neural network has embedded the physical laws into the model during the training process, and solving in chronological order can ensure that these physical laws are satisfied. Through the solution in chronological order, the change of the system state over time can be captured more accurately, which is particularly important for dynamic systems. Solving differential algebraic equations in chronological order can ensure the compliance with physical laws, improve the accuracy and efficiency of solving, and facilitate the verification and analysis of the results, and has important practical application value.

[0056] Specifically, in one embodiment of the present application, step S5 includes: using a trained neural network model to solve a high-index differential algebraic equation: in the process of outputting a predicted approximate solution, variable values ​​are uniformly taken within the definition domain and input into the trained neural network model as the variable values ​​of the differential algebraic equation to obtain a solution to the differential algebraic equation.

[0057] In one or more embodiments, a Heisenberg index 3 type differential algebraic equation is solved by a neural network construction method for solving high index differential algebraic equations:

[0058] Case 1:

[0059] For the common Heisenberg index type 3 differential algebraic equations commonly used in engineering:

[0060]

[0061] Given the initial conditions x1(0)=x2(0)=x3(0)=x4(0)=x5(0)=1, the exact solution to the equation system is x1(t)=x3(t)=e 2t ,x2(t)=x4(t)=e -t ,x5(t)=e t , we need to find an approximate solution to this system of differential algebraic equations.

[0062] In this embodiment, based on the Pytorch deep learning framework, a high-index differential algebraic equation neural network based on KAN is constructed in the Pycharm integrated development environment using the Python programming language.

[0063] Before the experiment, it is necessary to determine the number of residual points in the training data. In this example, 100 points are uniformly selected in the interval t∈(0,1], plus the initial data point at time t=0, for a total of 101 training data points. The training data is input into the KAN-based neural network for iterative training to obtain the neural network prediction solution of the high-index differential algebraic equation. The experimental results are shown in Figure 3 as shown.

[0064] After multiple experimental verifications, this example uses the B-spline function as a trainable activation function, where the order of the spline function is 3, the number of grids is 3, the width and depth of the KAN neural network are {1, [4, 5], 5}, and a neural network with an input of 1 and an output of 5 is constructed, where [4, 5] is a hidden layer, which means that the layer has 4 additive neurons and 5 multiplicative neurons. Using the above neural network parameters can achieve the best prediction effect.

[0065] In the training process of this example, the B-spline function of the KAN neural network is initialized using the Xavier initialization method, and the training is performed with an initial learning rate of lr = 1. The training process uses the L-BFGS optimization algorithm to minimize the loss function and trains for 200 rounds. Finally, the optimal neural network parameter configuration is found, and an efficient and high-precision high-index differential algebraic equation solving model is obtained.

[0066] The trained high-index differential-algebraic equation neural network based on KAN is used to solve the ordinary Heisenberg index type 3 differential-algebraic equation system. The experimental results are as follows Figure 4 As shown in the figure, the absolute error between the predicted solution and the exact solution of the differential variables x2 and x4 is kept at 10 -4 The absolute error of the differential variables x1 and x3 is kept within 10 -3 The absolute error of the algebraic variable x5 is kept within 10 -2 .

[0067] Case 2:

[0068] For the simple pendulum Heisenberg index type 3 differential algebraic equation system commonly used in engineering:

[0069]

[0070] Given: m=1, g=1, x1(0)=x4(0)=1, x2(0)=x3(0)=0, λ(0)=1. This case and Case 1 construct a high-index differential algebraic equation neural network based on KAN in the same environment. In this example, 100 points are uniformly selected in the interval t∈(0,1], plus the initial data point at t=0, for a total of 101 training data points. The training data is input into the KAN-based neural network for iterative training to obtain the neural network prediction solution for high-index differential algebraic equations. The experimental results are shown in Figure 5 shown.

[0071] After multiple experimental verifications, this example uses the B-spline function as a trainable activation function, where the order of the spline function is 9, the number of grids is 6, the width and depth of the KAN neural network are [1,2,3,5], and a neural network with an input of 1 and an output of 5 is constructed, where the second layer has 2 neurons and the third layer has 3 neurons. Using the above neural network parameters can achieve the best prediction effect.

[0072] In the training process of this example, the B-spline function of the KAN neural network is initialized using the Xavier initialization method, and training is performed with an initial learning rate of lr = 1. The training process uses the L-BFGS optimization algorithm to minimize the loss function and trains for 200 rounds. Finally, the optimal neural network parameter configuration is found, and an efficient and high-precision high-index differential algebraic equation solving model is obtained.

[0073] The trained high-index differential-algebraic equation neural network based on KAN is used to solve the simple pendulum Heisenberg index 3 differential-algebraic equation system. The experimental results are as follows: Figure 6 As shown in the figure, the absolute error between the predicted solution and the exact solution of the differential variables x1 and x3 is kept at 10 -5 The absolute error of the differential variables x2 and x4 is kept within 10 -4 The absolute error of the algebraic variable λ is kept within 10 -3 The accuracy and stability of this method in solving Heisenberg index 3 differential algebraic equations are higher than those of existing neural network methods for solving high-index differential algebraic equations. This method can solve the problems existing in the existing physical information neural network for solving high-index differential algebraic equations and provide convenience for subsequent engineering research.

[0074] Case 3:

[0075] Constrained multibody systems have applications in many industries such as aerospace engineering, vehicle industry and robotics. A constrained mechanical multibody system is a collection of rigid and flexible bodies connected by kinematic joints. The role of these kinematic joints is to impose some restrictions on the relative motion of the bodies of the system. As examples of constrained mechanical multibody systems are: cranes, slider cranks, constrained robotic arms. To express the restrictions on the motion of the bodies, algebraic equations are used. Due to these equations, there are some constraining forces in the system. The forces acting on the components of the multibody system can come from springs, dampers and actuators or from external forces. The dynamics of these complex mechanical systems are described by a system of nonlinear index 3 type differential algebraic equations (DAEs) of the following form:

[0076]

[0077] Where t is time, t∈[0,T]; u' represents the derivative of u with respect to t; u(t), v(t) represent the position, direction and velocity of the object; λ is the vector of Lagrange multipliers; M(u) is the mass matrix; function f defines the applied force and internal force; function g defines the constraint. T (u,t)λ represents the constraint force;

[0078] Represents the Jacobian matrix of g(u,t).

[0079] Depend on Figure 7 The schematic diagram of the robot arm gives the M matrix:

[0080]

[0081] Where m and l represent the weight and length of the robot arm respectively;

[0082] Get the f function and g function:

[0083]

[0084] g(θ1,θ2,t)=l1sinθ1+l2sin(θ1+θ2)

[0085] Let m1=m2=3, l1=l2=1; u=(u1,u2)=(θ1,θ2); v=du / dt;

[0086] The initial conditions of the equation system are: u1(0) ​​= 0, u2(0) = 0, v1(0) = 1, v2(0) = -2, λ(0) = 1;

[0087] The exact solution is: u1(t) = sin(t); u2(t) = -2sin(t); v1(t) = cos(t); v2(t) = -2cos(t); λ(t) = cos(t);

[0088] Based on the training methods of Case 1 and Case 2, this case constructs a KAN-based neural network for iterative training to obtain the neural network prediction solution of the constrained robot arm system. Figure 8 shown.

[0089] After multiple experimental verifications, this example uses the B-spline function as a trainable activation function, where the order of the spline function is 8, the number of grids is 8, the width and depth of the KAN neural network are [1, [3, 2], [3, 2], 5], and a neural network with an input of 1 and an output of 5 is constructed. The above neural network parameters can achieve the best prediction effect.

[0090] In the training process of this example, the B-spline function of the KAN neural network is initialized using the Xavier initialization method, and training is performed with an initial learning rate of lr = 1. The training process uses the L-BFGS optimization algorithm to minimize the loss function and trains for 200 rounds. Finally, the optimal neural network parameter configuration is found, and an efficient and high-precision high-index differential algebraic equation solving model is obtained.

[0091] The constrained robot arm system is solved by the trained high-index differential algebraic equation neural network based on KAN. The experimental results are as follows Fig. 9 As shown in the figure, the absolute error between the predicted solution and the exact solution of the differential variables u1 and u2 is kept at 10 -5 The absolute error of the differential variables v1 and v2 is kept within 10 -4 The absolute error of the algebraic variable λ is kept within 10 -3 The accuracy and stability of this method in solving nonlinear index 3 differential algebraic equations in complex mechanical power systems are higher than those of existing neural network methods that directly solve high-index differential algebraic equations. This method can solve the problems existing in the existing physical information neural network for solving high-index differential algebraic equations, and provide convenience for subsequent engineering research.

[0092] In summary, the neural network construction method and system for solving high-index differential algebraic equations based on the embodiments of the present application effectively overcome the problems of low precision and low computational efficiency of existing artificial neural networks in solving high-index differential algebraic equations. This method has broad application prospects and is suitable for solving various differential algebraic equations in physics, chemistry, biology and other fields. For example, in the field of physics, it can be used to solve Schrödinger equations, wave equations, heat conduction equations, etc.; in the field of chemistry, it can be used to solve chemical reaction kinetics equations and mass spectrometry equations; in the biological field, it can be applied to solving biokinetic equations and neuron model equations. The introduction of this technology not only helps to solve differential algebraic equations in scientific research and engineering practice, but also has significant practical value and economic benefits.

[0093] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems, characterized in that: include: S1. Construct a preprocessing module for preprocessing high-index differential algebraic equations; S2. Construct a high-index differential algebraic equation physical information neural network model based on KAN; S3. Construct loss functions based on the physical information of high-index differential algebraic equations; S4. Set training parameters, generate training data, and use the L-BFGS algorithm to iteratively train the physical information neural network model of high-index differential algebraic equations; obtain the physical information neural network model for solving high-index differential algebraic equations.

2. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 1 is characterized in that: The following steps are also included: S5. Use the trained high-index DAE physical information neural network model to solve DAEs in time sequence.

3. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 2, characterized in that: The preprocessing in step S1 is specifically: ′ =f(y,z), y(t0)=y0;0=g(y), z(t0)=z0 The differential algebraic equation system is split into differential equations y ′ =f(y,z) and the algebraic equation 0=g(y).

4. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 3 is characterized in that: The step S2 specifically includes: constructing a multi-output KANs neural network with a trainable parameter θ, initializing the neural network parameter θ using the Xavier initialization method, selecting a B-spline function as a trainable activation function, and assigning a KAN-based multi-output neural network to the high-index differential algebraic equation.

5. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 4, characterized in that: The step S3 includes: according to the characteristics of high-index differential algebraic equations, embedding the physical information of the differential algebraic equations into the KAN-based neural network, and constructing the residual loss term L of the KAN-based neural network. 残差 , as shown in the following formula: The initial loss term L of the neural network based on KAN is constructed by taking the mean square error between the true value of the initial condition and the predicted value of the neural network as the initial condition loss of the neural network. 初始 , as shown in the following formula: Among them, N f is the number of residual points, N0 is the number of initial points, f is the differential function equation and algebraic function equation, is the true value of the initial condition, y n is the predicted value of the neural network; The total loss function L is obtained based on the residual loss term and the initial loss term of the neural network. 总 , as shown in the following formula: L 总 =L 残差 +L 初始 .

6. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 5, characterized in that: The step S4 comprises: S41. According to the complexity of the differential algebraic equation, set the scale of the neural network, including the width and depth of the neural network, and set the number of grids and order of the neural network basis function; S42. Setting the optimizer to minimize the loss function; S43. uniformly sampling in the entire time domain to generate a residual data point set; S44. generating an initial condition data set according to the initial condition of the differential algebraic equation; S45. Combining the residual data point set and the initial condition data set into training data; S46. Use the training data to iteratively train the neural network model, use the L-BFGS optimization algorithm to minimize the loss function, and obtain the optimal neural network model.

7. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 6, characterized in that: The step S5 includes: using a trained neural network model to solve a high-index differential algebraic equation: in the process of outputting a predicted approximate solution, uniformly taking variable values ​​within the definition domain, and inputting the trained neural network model as the variable values ​​of the differential algebraic equation to obtain a solution to the differential algebraic equation.

8. The neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to claim 7, characterized in that: The step S4 includes: testing and optimizing the trained high-index differential algebraic equation physical information neural network model, specifically: comparing the predicted solution of the neural network with the exact solution set of the differential algebraic equation, and testing and optimizing the trained high-index differential algebraic equation physical information neural network model through error comparison analysis.

9. A neural network construction system for solving high-index differential algebraic equations of constrained mechanical multi-body systems, characterized in that: include: Preprocessing module, used for preprocessing high-index differential algebraic equations; High-index differential algebraic equation physical information neural network model based on KAN; The loss function of the high-index differential algebraic equation physical information neural network model is constructed according to the physical information of the high-index differential algebraic equation. The high-index differential algebraic equation physical information neural network model is obtained by setting training parameters, generating training data, and performing iterative training using the L-BFGS algorithm.

10. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores an executable program, and when the processor executes the executable program, it implements the neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • High-index differential algebraic equation neural network solving method based on Radau method

    CN117407637A

  • Partial differential equation solving algorithm based on physical information graph neural network and finite difference

    CN117421519A

  • Fluid mechanics equation solving method based on physical information neural network

    CN117786286A

  • Method for solving time-varying continuous algebraic riccati equation on the basis of zeroing neural network

    WO2022227780A1

Cited By

  • Simulation parameter decision-making method and device based on deep learning representation and medium

    CN119885447A