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

By constructing a KANs-based neural network model and combining it with the L-BFGS algorithm, the accuracy and stability problems of high-index differential-algebraic equations are solved, achieving efficient and accurate solutions. This method is applicable to differential-algebraic equations in physics, chemistry, and biology.

CN119558357BActive Publication Date: 2025-12-05GUANGZHOU UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411464246.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-12-05
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 suffer from low accuracy and poor stability.

Method used

We employ Kolmogorov–Arnold Networks (KANs) as the activation function, and combine preprocessing, constructing a physical information neural network model, defining a loss function, and using the L-BFGS algorithm for iterative training to build a neural network system for solving high-index differential algebraic equations.

Benefits of technology

It improves the solution accuracy and stability of high-index differential-algebraic equations, and is applicable to solving differential-algebraic equations in the fields of physics, chemistry and biology, with significant practical value and economic benefits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119558357B_ABST
    Figure CN119558357B_ABST
Patent Text Reader

Abstract

The application discloses a neural network construction method and system for solving high-index differential algebraic equations. Through preprocessing equations, constructing a physical information neural network model, defining a loss function, setting training parameters and data, and using an L-BFGS algorithm for iterative training, efficient and accurate solution of high-index differential algebraic equations is realized. Finally, the trained neural network model is used to solve the differential algebraic equations of the constrained robotic arm system. By uniformly selecting variable values within the domain and inputting them into the trained model, the solution of the system is obtained. In addition, the predicted solution of the neural network is compared with the actual solution to test and optimize the performance of the model. In this way, the nonlinear high-index differential algebraic equation problem in the constrained robotic arm system can be efficiently and accurately solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of neural network technology, and more specifically, to a method and system for constructing neural networks for solving high-index differential-algebraic equations. Background Technology

[0002] Differential-algebraic equations (DAEs) are a common and important type of equation in science and engineering, encompassing both differential and algebraic equations. These equations are widely used in fields such as power system simulation, mechanical system modeling, chemical reaction kinetics, circuit simulation, control system design, and biological science modeling.

[0003] The index (index) of a differential-algebraic equation (DAE) refers to the minimum number of differentiations required to transform a system of differential-algebraic equations into a system of ordinary differential equations (ODEs). Generally, the higher the index, the more difficult it is to directly solve the DAE. Due to its complexity and the existence of higher-order derivatives, solving differential-algebraic equations with high indices (index ≥ 2) is usually very challenging and requires special numerical methods and algorithms to obtain efficient solutions. To this end, various numerical methods for approximating 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 or symbolic computation, which suffer from high computational complexity and low accuracy.

[0004] In recent years, with the development of physical information neural network technology, more and more researchers have begun to explore methods for solving differential algebraic equations using neural networks. As a novel computational model, neural networks have advantages over traditional numerical computation methods, such as parallel computing, adaptive learning, strong generalization, and high fault tolerance, and are therefore considered a promising tool for solving differential algebraic equations.

[0005] Most current neural network methods can only solve differential algebraic equations with an index of 1, and existing neural network methods suffer from low accuracy and poor stability when solving high-index differential algebraic equations. In contrast, Kolmogorov-Arnold Networks (KANs) use spline functions as their trainable activation functions, giving them unique advantages in scientific computing.

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

[0007] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method and system for constructing a neural network to solve high-index differential-algebraic equations. By preprocessing the equations, constructing a physical information neural network model, defining a loss function, setting training parameters and data, and performing iterative training using the L-BFGS algorithm, the method ultimately achieves efficient and accurate solutions to high-index differential-algebraic equations, overcoming the accuracy and efficiency limitations of traditional artificial neural networks in such problems.

[0008] According to one aspect of this application, a method for constructing a neural network for solving high-index differential-algebraic equations is provided, comprising: S1. constructing a preprocessing module for preprocessing the high-index differential-algebraic equations; S2. constructing a KAN-based physical information neural network model of the high-index differential-algebraic equations; S3. constructing a loss function based on 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 the high-index differential-algebraic equations using the L-BFGS algorithm; and obtaining a physical information neural network model for solving high-index differential-algebraic equations.

[0009] The neural network construction method for solving high-index differential algebraic equations described above is characterized by the following step: S5. Solving the differential algebraic equations in chronological order using the trained high-index differential algebraic equation physical information neural network model.

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

[0011] In the above-mentioned method for constructing a neural network for solving high-index differential algebraic equations, the step S2 is characterized in that: constructing a multi-output Kolmogorov–Arnold Networks (KANs) neural network with trainable parameters θ, initializing the neural network parameters θ 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.

[0012] In the aforementioned neural network construction method for solving high-index differential-algebraic equations, the characteristic feature is that step S3 includes: embedding the physical information of the high-index differential-algebraic equation into a KAN-based neural network according to the characteristics of the high-index differential-algebraic equation, and constructing the residual loss term L of the KAN-based neural network. 残差 The specific formula is as follows:

[0013]

[0014] The initial loss term L of the KAN-based neural network is constructed by using the mean squared error between the true value of the initial conditions and the predicted value of the neural network as the initial condition loss. 初始 The specific formula is as follows:

[0015]

[0016] Where, N f Let N be the number of residual points, N0 be the number of initial points, and f be the differential function equation and the algebraic function equation. The true value of y is the initial condition. n These are the predicted values ​​from 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. 总 The specific formula is as follows:

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

[0019] In the above-described method for constructing a neural network to solve high-index differential-algebraic equations, step S4 is characterized by comprising: S41. setting the scale of the neural network, including its width and depth, and setting the number of grids and order of the basis functions, according to the complexity of the differential-algebraic equation; S42. setting the optimizer to minimize the loss function; S43. uniformly sampling throughout the time domain to generate a residual data point set; S44. generating an initial condition dataset based on the initial conditions of the differential-algebraic equation; S45. combining the residual data point set and the initial condition dataset into training data; S46. using the training data to iteratively train the neural network model, using the L-BFGS optimization algorithm to minimize the loss function, and obtaining the optimal neural network model.

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

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

[0022] According to one aspect of this application, a neural network construction system for solving high-index differential-algebraic equations is also provided, comprising: a preprocessing module for preprocessing the high-index differential-algebraic equations; a KAN-based high-index differential-algebraic equation physical information neural network model; the loss function of the high-index differential-algebraic equation physical information neural network model is constructed based on the physical information of the high-index differential-algebraic equations, and 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.

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

[0024] Compared with existing technologies, this application provides a neural network construction method for solving high-index differential-algebraic equations, effectively overcoming the problems of low accuracy and low computational efficiency of existing artificial neural networks when solving high-index differential-algebraic equations. This method has broad application prospects and is applicable to solving various differential-algebraic equations in physics, chemistry, biology, and other fields. For example, in physics, it can be used to solve the Schrödinger equation, wave equation, and heat conduction equation; in chemistry, it can be used to solve chemical reaction kinetic equations and mass spectrometry equations; and in biology, it can be applied to solving biokinetic equations and neuron model equations. This technology not only helps solve differential-algebraic equation problems in scientific research and engineering practice but also has significant practical value and economic benefits. Attached Figure Description

[0025] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

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

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

[0028] Figure 3 This is a schematic diagram showing the fitting of the predicted solution and the exact solution of the ordinary Heisenberg index type 3 differential algebraic equation system according to Case 1 provided in the embodiments of this application.

[0029] Figure 4 This is a schematic diagram illustrating the absolute error between the predicted solution and the exact solution of the ordinary Heisenberg index type 3 differential-algebraic equation system provided in Example 1 of this application.

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

[0031] Figure 6 This diagram illustrates the absolute error between the predicted solution and the exact solution of the Heisenberg index type 3 differential-algebraic equation system for solving a simple pendulum according to Example 2 provided in this application.

[0032] Figure 7 A schematic diagram of a constrained robotic arm for one or more embodiments of this specification, illustrating Example 3.

[0033] Figure 8 A schematic diagram illustrating the fitting of predicted and exact solutions for solving a constrained mechanical multibody system in Case 3, provided for one or more embodiments of this specification;

[0034] Figure 9 This diagram illustrates the absolute error between the predicted and exact solutions of a constrained mechanical multibody system provided in one or more embodiments of this specification. Detailed Implementation

[0035] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0036] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.

[0037] While this application makes various references to certain modules of the systems according to embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The modules described are merely illustrative, and different aspects of the systems and methods may use different modules.

[0038] Flowcharts are used in this application to illustrate the operations performed by the system according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from them.

[0039] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0040] Most current neural network methods can only solve differential-algebraic equations with an index of 1, and existing methods suffer from 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 directly solved by existing solvers and require transformation. Symbolic processing is used to transform high-index equations into indices of 1 or 0, and then existing solvers can solve them directly. However, this symbolic transformation process reduces the accuracy of the original algebraically restricted equations. Kolmogorov-Arnold Networks (KANs) use spline functions as their trainable activation functions, offering unique advantages in scientific computing. Therefore, this invention aims to provide a method and system for constructing neural networks for solving high-index differential-algebraic equations, thereby addressing the problems encountered in solving these equations.

[0041] In the technical solution of this application, a neural network construction method for solving high-index differential algebraic equations is proposed. Figure 1 This is a flowchart illustrating a neural network construction method for solving high-index differential-algebraic equations according to an embodiment of this application. Figure 1As shown, the neural network construction method for solving high-index differential-algebraic equations according to an embodiment of this application includes the following steps: S1. Constructing a preprocessing module for preprocessing the high-index differential-algebraic equations; S2. Constructing a KAN-based physical information neural network model for high-index differential-algebraic equations; S3. Constructing a loss function based on 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 for high-index differential-algebraic equations using the L-BFGS algorithm; obtaining the physical information neural network model for solving high-index differential-algebraic equations; S5. Solving the differential-algebraic equations sequentially using the trained physical information neural network model for high-index differential-algebraic equations.

[0042] In this embodiment, step S1 involves preprocessing the high-index differential-algebraic equations. It should be understood that this preprocessing is specifically designed for machine learning tasks. While maintaining the high-index characteristics of the original system, it appropriately processes it to make it more suitable as input to a 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 this application, the preprocessing in step S1 involves splitting the high-index differential-algebraic equation system 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).

[0043] In this embodiment, step S2 involves constructing a physical information neural network model for high-index differential-algebraic equations based on KAN. It should be understood that traditional numerical methods cannot directly solve high-index differential-algebraic equations, requiring the transformation of the high index into differential-algebraic equations with indices of 1 or 0; this transformation process leads to a decrease in the accuracy of the original algebraic equation. Compared to traditional physical information neural networks that use multilayer perceptrons (MLPs) as their neural network, physical information neural networks using KAN networks offer better accuracy and interpretability, which is crucial for understanding the logic behind model predictions in scientific research and engineering applications. KAN networks can be customized and optimized according to specific problems in different fields, making them highly adaptable and widely applicable to solving differential-algebraic equations in multiple fields such as physics, chemistry, and biology.

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

[0045] In this embodiment, step S3 involves constructing a loss function based on the physical information of the high-index differential-algebraic equations. It should be understood that by incorporating physical laws into the loss function as residuals, the prediction results of the neural network can be ensured to satisfy the physical equations, thereby improving the accuracy and reliability of the model. The introduction of physical information reduces the reliance on large amounts of training data, enabling the model to perform effective training and prediction even with limited data or high noise levels.

[0046] Specifically, in one embodiment of this application, step S3 includes: embedding the physical information of the differential-algebraic equation into a KAN-based neural network based on the characteristics of the high-index differential-algebraic equation, and constructing the residual loss term L of the KAN-based neural network. 残差 The specific formula is as follows:

[0047]

[0048] The initial loss term L of the KAN-based neural network is constructed by using the mean squared error between the true value of the initial conditions and the predicted value of the neural network as the initial condition loss. 初始 The specific formula is as follows:

[0049]

[0050] Where, N f Let N be the number of residual points, N0 be the number of initial points, and f be the differential function equation and the algebraic function equation. The true value of y is the initial condition. n These are the predicted values ​​from 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. 总 The specific formula is as follows:

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

[0053] In this embodiment, step S4 involves setting training parameters, generating training data, and iteratively training a high-index differential-algebraic equation physical information neural network model using the L-BFGS algorithm. Specifically, in one embodiment of this application, step S4 includes: S41. Setting the size of the neural network, including its width and depth, and setting the number of grids and order of the neural network basis functions, based on the complexity of the differential-algebraic equation; S42. Setting the optimizer to minimize the loss function; S43. Uniformly sampling across the entire time domain to generate a residual data point set; S44. Generating an initial condition dataset based on the initial conditions of the differential-algebraic equation; S45. Combining the residual data point set and the initial condition dataset into training data; S46. Iteratively training the neural network model using the training data, minimizing the loss function using the L-BFGS optimization algorithm, and obtaining the optimal neural network model.

[0054] Furthermore, 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 this embodiment, step S5 involves solving the differential-algebraic equations in chronological order using a trained high-index differential-algebraic equation physical information neural network model. It should be understood that the physical information neural network embeds physical laws into the model during training, and solving in chronological order ensures that these physical laws are satisfied. Solving in chronological order allows for a more accurate capture of the system's state changes over time, which is particularly important for dynamic systems. Solving differential-algebraic equations in chronological order ensures adherence to physical laws, improves the accuracy and efficiency of the solution, and facilitates the verification and analysis of results, thus possessing significant practical application value.

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

[0057] In one or more embodiments, the Heisenberg index type 3 differential-algebraic equation is solved using 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 equation system in engineering:

[0060]

[0061] Given the initial conditions x1(0)=x2(0)=x3(0)=x4(0)=x5(0)=1, the exact solution to the system of equations 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, a high-index differential algebraic equation neural network based on KAN is constructed using the PyTorch deep learning framework and the Python programming language on the PyCharm integrated development environment.

[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 within the interval t∈(0,1], plus the initial data points at time t=0, for a total of 101 training data points. The training data is input into a 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 as follows. Figure 3 As shown.

[0064] After multiple experiments, this example uses a B-spline function as the trainable activation function, with an order of 3 and a grid size of 3. The width and depth of the KAN neural network are {1,[4,5],5}, constructing a neural network with an input of 1 and an output of 5, where [4,5] represents the hidden layer, indicating that this layer has 4 additive neurons and 5 multiplicative neurons. Using the above neural network parameters achieves optimal prediction results.

[0065] In this training example, the Xavier initialization method is used to initialize the B-spline function of the KAN neural network, and training is performed with an initial learning rate of lr = 1. The L-BFGS optimization algorithm is used to minimize the loss function during training, and the training is conducted for 200 epochs. Finally, the optimal neural network parameter configuration is found, resulting in an efficient and accurate high-index differential-algebraic equation solving model.

[0066] The ordinary Heisenberg index type 3 differential-algebraic equation system was solved using a pre-trained KAN-based high-index differential-algebraic equation neural network. The experimental results are as follows: Figure 4 As shown, the absolute errors of the predicted solutions for differential variables x2 and x4 compared to the exact solutions both remain within 10. -4 With an accuracy within 10, the absolute errors of the differential variables x1 and x3 are maintained at 10. -3 The accuracy is within 10, while the absolute error of the algebraic variable x5 remains within 10. -2 .

[0067] Case 2:

[0068] For the 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 study constructs a high-index differential-algebraic equation neural network based on KAN under the same environment as Case 1. In this example, 100 points are uniformly selected within 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. Experimental results are as follows... Figure 5 As shown.

[0071] After multiple experiments, this example uses the B-spline function as the trainable activation function, with an order of 9 and a grid size of 6. The width and depth of the KAN neural network are [1, 2, 3, 5], constructing a neural network with an input of 1 and an output of 5. The second layer has 2 neurons, and the third layer has 3 neurons. Using the above neural network parameters can achieve the optimal prediction effect.

[0072] In this example, the Xavier initialization method is used to initialize the B-spline function of the KAN neural network, and training is performed with an initial learning rate of lr = 1. The L-BFGS optimization algorithm is used to minimize the loss function during training, and the training is conducted for 200 epochs. Finally, the optimal neural network parameter configuration is found, resulting in an efficient and accurate high-index differential-algebraic equation solving model.

[0073] The Heisenberg index type 3 differential-algebraic equations for a simple pendulum were solved using a pre-trained KAN-based high-index differential-algebraic equation neural network. Experimental results are as follows: Figure 6 As shown, the absolute errors of the predicted solutions for differential variables x1 and x3 compared to the exact solutions both remain within 10. -5 With an accuracy within 10, the absolute errors of the differential variables x2 and x4 are maintained at 10. -4 The accuracy is within 10, while the absolute error of the algebraic variable λ remains within 10. -3 This method achieves higher accuracy and stability than existing neural network methods for solving high-index differential-algebraic equations with the Heisenberg index type 3. It can solve the problems existing in the solution of high-index differential-algebraic equations by existing physical information neural networks, and provide convenience for subsequent engineering research.

[0074] Case 3:

[0075] Constrained multibody systems have applications in many industries, such as aerospace engineering, automotive, and robotics. A constrained mechanical multibody system is a collection of rigid and flexible bodies connected by kinematic joints. These kinematic joints impose restrictions on the relative motion of the system's components. Examples of constrained mechanical multibody systems include cranes, slider cranks, and constrained robot arms. Algebraic equations are used to express the restrictions on the motion of the objects. Due to these equations, constraint forces exist within the system; the forces acting on the components of the multibody system can originate from springs, dampers, actuators, or external forces. The dynamics of these complex mechanical systems are described by a system of nonlinear index Type 3 differential-algebraic equations (DAEs).

[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 a vector of Lagrange multipliers; M(u) is the mass matrix; the function f defines the forces and internal forces; the function g defines the constraints. G T (u,t)λ represents the constraint force; where

[0078] Let g(u,t) be the Jacobian matrix.

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

[0080]

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

[0082] We obtain the f function and the 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 for this system of equations are: u1(0)=0, u2(0)=0, v1(0)=1, v2(0)=-2, λ(0)=1;

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

[0088] This case study builds upon the training methods of Case 1 and Case 2, constructing a KAN-based neural network for iterative training to obtain the neural network prediction solution for the constrained robotic arm system. Experimental results are as follows: Figure 8 As shown.

[0089] After multiple experiments, this example uses the B-spline function as the trainable activation function, with an order of 8 and a grid number of 8. The width and depth of the KAN neural network are [1,[3,2],[3,2],5], constructing a neural network with an input of 1 and an output of 5. Using the above neural network parameters can achieve the optimal prediction effect.

[0090] In this example, the Xavier initialization method is used to initialize the B-spline function of the KAN neural network, and training is performed with an initial learning rate of lr = 1. The L-BFGS optimization algorithm is used to minimize the loss function during training, and the training is conducted for 200 epochs. Finally, the optimal neural network parameter configuration is found, resulting in an efficient and accurate high-index differential-algebraic equation solving model.

[0091] The constrained robotic arm system was solved using a pre-trained KAN-based high-index differential-algebraic equation neural network. Experimental results are as follows: Figure 9 As shown, the absolute errors of the predicted solutions for differential variables u1 and u2 compared to the exact solutions both remain within 10. -5 With an accuracy within 10, the absolute errors of the differential variables v1 and v2 are maintained at 10. -4 The accuracy is within 10, while the absolute error of the algebraic variable λ remains within 10. -3 This method achieves higher accuracy and stability than existing neural network methods for directly solving high-index differential-algebraic equations in complex mechanical dynamic systems. It can solve the problems existing in current physical information neural networks 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 described in the embodiments of this application effectively overcome the problems of low accuracy and low computational efficiency of existing artificial neural networks when solving high-index differential-algebraic equations. This method has broad application prospects and is applicable to solving various differential-algebraic equations in physics, chemistry, biology, and other fields. For example, in physics, it can be used to solve the Schrödinger equation, wave equation, and heat conduction equation; in chemistry, it can be used to solve chemical reaction kinetic equations and mass spectrometry analysis equations; and in biology, it can be applied to solving biokinetic equations and neuron model equations. This technology not only helps solve differential-algebraic equation problems in scientific research and engineering practice but also has significant practical value and economic benefits.

[0093] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled 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, The method comprises the following steps: S1. Constructing a preprocessing module for preprocessing high-index differential algebraic equations; S2. Constructing a KAN-based physical information neural network model for high-index differential algebraic equations; 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 KAN-based physical information neural network model for high-index differential algebraic equations by using an L-BFGS algorithm; Obtaining the KAN-based physical information neural network model for solving high-index differential algebraic equations; The step S3 comprises: embedding physical information of the differential algebraic equation into the KAN-based neural network according to characteristics of the high-index differential algebraic equation, and constructing a residual loss term L of the KAN-based neural network 残差 , as shown in the following formula: An initial loss term L of the neural network based on KAN is constructed by taking the mean square error of 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: Wherein, N f is the residual point quantity, N0 is the initial point quantity, 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; A total loss function L is obtained according to the residual loss term and the initial loss term of the neural network 总 , and is specifically shown as follows: L 总 = L 残差 + L 初始 ; The step S4 comprises: S41. Setting the size of the neural network according to the complexity of the differential algebraic equations, including the width and depth of the neural network, and setting the grid number and order of the neural network base function; S42. Setting an 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 conditions of the differential algebraic equations; S45. Combining the residual data point set and the initial condition data set to form training data; S46. Iteratively training the neural network model using the training data, minimizing the loss function by using an L-BFGS optimization algorithm, and obtaining an optimal neural network model.

2. The neural network construction method for solving high-index differential-algebraic equations of constrained mechanical multi-body systems according to claim 1, characterized in that, The method further comprises the following steps: S5. Using the trained KAN-based physical information neural network model for high-index differential algebraic equations to sequentially solve the differential algebraic equations in time.

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 the step S1 is specifically: taking the form of y ′ = f(y, z), y(t0) = y0; 0 = g(y), z(t0) = z0 as an index differential algebraic equation group, which is split into a differential equation y ′ = f(y, z) and an 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, characterized in that, The step S2 specifically comprises: constructing a multi-output KANs neural network with trainable parameters θ, initializing the neural network parameters θ by using an 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 equations.

5. 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 step S5 comprises: using the trained neural network model to solve the high-index differential algebraic equations: in the process of outputting the predicted approximate solution, uniformly taking variable values in the domain as variable value inputs of the trained neural network model, and obtaining the solution of the differential algebraic equations.

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: testing and optimizing the trained KAN-based physical information neural network model for high-index differential algebraic equations, specifically: comparing the predicted solution of the neural network with the accurate solution set of the differential algebraic equations, and analyzing the error comparison to test and optimize the trained KAN-based physical information neural network model for high-index differential algebraic equations.

7. A neural network construction system for solving high-index differential-algebraic equations of constrained mechanical multi-body systems, characterized in that, The method comprises the following steps: A preprocessing module for preprocessing high-index differential algebraic equations; A KAN-based physical information neural network model for high-index differential algebraic equations; The loss function of the KAN-based physical information neural network model for high-index differential algebraic equations is constructed according to the physical information of the high-index differential algebraic equations, and the KAN-based physical information neural network model for high-index differential algebraic equations is obtained by setting training parameters, generating training data, and iteratively training by using an L-BFGS algorithm; 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 includes: according to the characteristics of the high-index differential-algebraic equation, embedding the physical information of the differential-algebraic equation into the KAN-based neural network to construct a residual loss term L of the KAN-based neural network 残差 , as shown in the following formula: An 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: Wherein, N f is the residual point quantity, N0 is the initial point quantity, 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; A total loss function L is obtained according to the residual loss term and the initial loss term of the neural network 总 , and is specifically shown as follows: L 总 = L 残差 + L 初始 ; The KAN-based physical information neural network model for high-index differential algebraic equations is obtained by setting training parameters, generating training data, and iteratively training by using an L-BFGS algorithm, comprising: According to the complexity of the differential algebraic equation, the size of the neural network is set, including the width and depth of the neural network, and the grid number and order of the neural network base function are set; The optimizer is set to minimize the loss function; Uniform sampling in the entire time domain generates a residual data point set; According to the initial conditions of the differential algebraic equation, an initial condition data set is generated; The residual data point set and the initial condition data set form the training data; Using the training data, the neural network model is iteratively trained, the L-BFGS optimization algorithm is used to minimize the loss function, and the optimal neural network model is obtained.

8. An electronic device, comprising: The electronic device includes a processor and a memory, the memory stores an executable program, and the processor executes the executable program to implement the neural network construction method for solving high-index differential algebraic equations of constrained mechanical multi-body systems according to any one of claims 1-6.

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