An assembly process error modeling method based on physical information neural network
By combining boundary element theory and neural networks, and using measured point cloud data and the firefly algorithm to optimize the network structure, the problem of stress deformation not being considered in assembly accuracy analysis was solved, thus achieving efficient and accurate assembly accuracy analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2026-04-10
AI Technical Summary
Existing assembly accuracy analysis methods fail to effectively consider the stress and deformation of parts, resulting in inaccurate assembly accuracy analysis results and affecting the actual assembly effect.
A physical information neural network-based approach is adopted, which combines boundary element theory and neural networks to construct a stress-deformation calculation model. The network structure is optimized using measured point cloud data and the Firefly algorithm, and a loss function is established to achieve accurate prediction of stress-deformation.
It significantly improves the accuracy and computational efficiency of assembly precision analysis, reduces the stringent requirements on data scale and quality, avoids overfitting, and ensures the physical rationality of model prediction results.
Smart Images

Figure CN120911254B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of assembly process, and particularly relates to a part assembly process error modeling method based on a physical information neural network. TECHNICAL BACKGROUND
[0002] The part stress deformation calculation method in the assembly process is an important research direction in the field of assembly process, and the purpose is to establish a model more in line with the real appearance of the part surface, so as to improve the accuracy of assembly accuracy analysis. In the past, the influence of contact deformation was not considered in the research of most tolerance analysis, and stress deformation would occur in the assembly process. The model used in the assembly accuracy analysis cannot represent the real assembly state of the mechanical product, which will make the result of the product assembly accuracy analysis inaccurate, and further affect the actual assembly effect.
[0003] In recent years, domestic and foreign scholars have carried out a lot of research on assembly process error modeling. The prior art discloses an assembly accuracy analysis method considering surface topography and stress deformation, uses a small displacement rotation model and a base function superposition method to model positioning / orientation, shape error, uses a conjugate gradient-fast Fourier transform algorithm to establish a contact deformation calculation method of the assembly joint surface, and finally performs assembly deviation accumulation calculation based on an improved polyhedral model, so as to realize assembly accuracy analysis considering surface topography and stress deformation. The prior art also discloses an improved constraint registration part assembly tolerance analysis method, takes the minimum distance between the force action point on the fitting surface and the corresponding point as the objective function to improve the initial mathematical model of the constraint registration, then calculates the stress deformation based on the Hertz contact theory, and then corrects the constraint registration model to make the assembly joint surface closer to the real contact state. However, the method has large complexity, and there is still a deficiency in the reality of error modeling. SUMMARY
[0004] The purpose of the application is to establish a mechanical assembly assembly process model under the premise that the existing tolerance analysis method does not consider stress deformation in the assembly accuracy calculation process, and a part stress deformation calculation method based on a boundary element is proposed.
[0005] To achieve the above purpose, the technical scheme of the application is as follows: a part assembly process error modeling method based on a physical information neural network, comprising the following steps:
[0006] Step 1: According to the theoretical geometric profile of the assembly joint surface, the sampling area is determined, the discrete grid is discretized according to the discrete grid factor, and the index matrix is obtained according to the real shape of the assembly joint surface.
[0007] Step 2: Obtain the measured point cloud data of the part assembly joint surface, and register the point cloud data of the assembly joint surface by registration method.
[0008] Step 3: Down-sampling the measured point cloud data according to the index matrix to obtain the down-sampled assembly joint surface measured point cloud data.
[0009] Step 4: Converting the assembly joint surface into an ideal surface and a non-ideal surface by the difference surface method, and realizing the cooperation of the assembly joint surface by the progressive contact method.
[0010] Step 5: Establishing a boundary constraint equation set based on the boundary element theory.
[0011] Step 6: Constructing a neural network structure, obtaining the best network structure by using the glowworm algorithm, and constructing a stress-strain prediction model.
[0012] Step 7: Based on the boundary constraint equation set obtained in step 5, constructing a loss function of the physical information neural network. Step 8: Based on the results in steps 5, 6, and 7, constructing a physical information neural network model, inputting point coordinates, obtaining point displacements after stress deformation, and updating point cloud data.
[0013] The specific implementation process of step 1 is as follows:
[0014] When determining the index matrix according to the actual profile of the part assembly feature surface, first, the minimum rectangular envelope that can completely cover the feature surface and has the smallest area is locked through geometric calculation. The core purpose is to accurately limit the processing range: neither to include the redundant area outside the feature surface, nor to miss any details of the feature surface. Next, taking the top left corner point of the minimum rectangular envelope as the origin, the X-axis positive direction is established along the long side of the rectangle, and the Y-axis positive direction is established along the short side, to construct a two-dimensional rectangular coordinate system. At this time, any point in the rectangle can be represented as (x, y) (x∈[0, a], y∈[0, b]), which provides a coordinate reference for subsequent grid discretization. Then, introduce the discrete grid factor λ (divide the rectangle into grids. The number of rows d (the number of grids in the Y-axis direction) and the number of columns e (the number of grids in the X-axis direction) of the discrete matrix are determined by the size of the rectangle and λ, and the formula is:
[0015]
[0016] where a and b are the length and width of the minimum rectangle, respectively, and d and e are the number of rows and columns of the discrete grid, respectively.
[0017] λ is the discrete grid factor, and [] represents the integer function. The smaller λ is, the finer the grid is, and the larger λ is, the coarser the grid is.
[0018] After grid division, each grid element is judged one by one whether it is located inside the part assembly feature surface: if the element position is inside the surface, it is marked as 1; if the element position is outside the surface, it is marked as 0, and then the corresponding index matrix element a ij, and the complete index matrix A is obtained by traversing all the grid elements. The process of determining the index matrix is shown in Figure 2 .
[0019] The specific process of step 2 is as follows:
[0020] Through high-precision acquisition equipment, the measured point cloud data P = {p i |p i ∈ R 3 , i = 1, 2, … q} of the assembly joint surface is obtained. Since each acquisition of the measurement equipment is based on its own coordinate system, the obtained point cloud data only reflects the relative position of the feature surface with respect to the measurement equipment. In actual application, the original point cloud data needs to be unified to the inherent local coordinate system of the part. A rigid transformation matrix T from the measurement coordinate system to the part coordinate system is constructed, and the transformation matrix is applied to the original point cloud data to obtain the registered point cloud data P' = {p i |p i ∈ R 3 , i = 1, 2, … q'}, q' is the number of point clouds corresponding to the point cloud data. In this scheme, the point cloud data of the feature surface of the part to be assembled is directly obtained by using high-precision acquisition equipment, which is more realistic and accurate than the point cloud data generated by model discretization, and the process is more simple.
[0021] The specific process of step 3 is as follows:
[0022] After completing the construction of the index matrix grid and the registration of the point cloud, the part surface point cloud data P' = {p i |p i ∈ R 3 , i = 1, 2, … q'} is matched to the index matrix grid. Because the number of point clouds and the number of grids may differ, the following operations need to be performed:
[0023] (1) If there is a single coincident point between the center of a grid and the point cloud data, the point is retained;
[0024] (2) If there are multiple coincident points between the center of a grid and the point cloud data, one coincident point is retained;
[0025] (3) If there are multiple coincident matching points between the center of a grid and the point cloud data but they are distributed in the Z direction, the Z direction coordinates of these points are taken as the arithmetic mean to generate a fusion point, and the fusion point is retained;
[0026] (4) If there is no coincident point between the center of a grid and the point cloud data, the point is not retained.
[0027] After traversing all the index matrix grids, the down-sampled assembly joint surface point cloud data P'' = {p i |p i ∈ R 3i = 1, 2, …, t}, t is the number of points in the down-sampled point cloud data.
[0028] In this scheme, compared with the original high-density point cloud, the down-sampled point cloud data is more concise, which can effectively reduce the subsequent computational overhead and significantly improve the processing efficiency.
[0029] The specific process of step 4 is as follows:
[0030] The joint surface of the parts is two non-ideal surfaces. According to the related theory of contact mechanics, the contact problem between any two non-ideal surfaces can be equivalent to the contact between an ideal surface and a non-ideal surface. The above surfaces are represented by discrete points, and the equivalent process can be represented by the formula:
[0031] S = S1-S2 (2) Where S1 and S2 represent the two non-ideal surfaces in contact, and S represents the non-ideal surface after equivalence. Set the upper surface as S1, and the upper surface point cloud data as S1 = {s i |s i ∈R 3 i = 1, 2, …, t} ; set the lower surface as S2, and the lower surface point cloud data as S2 = {s i |s i ∈R 3 i = 1, 2, …, t}, t is the number of points in the down-sampled point cloud data. i |s i ∈R 3 i = 1, 2, …, t} and the ideal surface point cloud data S 0 = {s i |s i ∈R 3 i = 1, 2, …, t}, t is the number of points in the down-sampled point cloud data.
[0032] When the substitute features of two parts are assembled, the method of progressive contact is used to gradually approach the ideal surface to the non-ideal surface. The contact point of the ideal surface after translation by the shortest distance is called the first contact point (P1). If there is only one first contact point, the ideal surface will further rotate until the second contact point (P2) is found. If the second contact point is another extreme value point on the non-ideal surface except the first contact point, the ideal surface will further rotate until the third contact point (P3) is found, and the assembly joint surface is completed. If there are three or more first contact points, the ideal surface and the non-ideal surface will directly complete the assembly of the joint surface. The implementation process is shown in the accompanying Figure 6
[0033] In this scheme, the contact problem is simplified: the surface topography characteristics of the non-ideal assembly joint surface complicate the contact analysis when the difference surface treatment is not used. The difference surface treatment significantly simplifies the geometric characteristics of the contact area, making the contact state more intuitive and clear, and greatly reducing the calculation difficulty. The contact authenticity is improved: the traditional fitting method usually realizes the fitting only along the normal translation of the contact surface. The gradual contact method realizes the complete stable contact of the joint surface by adjusting the fitting surface through translation and rotation, and more accurately represents the contact behavior in the real assembly state.
[0034] The specific process of step 5 is as follows:
[0035] Two rough surfaces are in contact under the action of load, and the essence is that the micro-convex bodies on the rough surface are in contact deformation and produce contact pressure under the action of force, and the actual contact area only accounts for a very small part of the nominal contact area. With the application of normal load, the micro-convex bodies change from elastic deformation to elastic-plastic deformation, so that more and more micro-convex bodies are in contact deformation, causing the change of normal contact pressure. According to the difference surface method, a model of rough surface and smooth surface contact is established, and the contact of two rough surfaces is replaced by the contact of a rigid ideal plane and a non-ideal plane. It is assumed that there is no interaction between the adjacent two micro-convex bodies. When the ideal plane is subjected to force, the micro-convex bodies at the three contact points between the ideal plane and the non-ideal plane produce deformation, and when the micro-convex bodies deform to a certain extent, the contact between the ideal plane and the non-ideal plane reaches a stable state, and the contact of the assembly joint surface after conversion is shown in FIG. 2. Figure 3 The following equations are obtained based on the above process analysis:
[0036] Balance equation
[0037]
[0038] Geometric equation
[0039]
[0040] Physical equation (isotropic material)
[0041]
[0042] where σ x , σ y , σ z respectively represent the normal stress acting on the plane perpendicular to the x-axis, y-axis, z-axis, and the stress direction is also along the x-axis, y-axis, z-axis. f x , f y , f z are the body force components along the x-axis, y-axis, z-axis, respectively, and ε x , ε y , ε zrespectively denote the normal strain along the x, y, z axis direction, γ xy respectively denote the normal strain along the x, y, z axis direction, γ xz respectively denote the normal strain along the x, y, z axis direction, γ yz respectively denote the shear strain component in the x-y, x-z, y-z plane, τ yz respectively denote the shear strain component in the x-y, x-z, y-z plane, τ xz respectively denote the shear strain component in the x-y, x-z, y-z plane, τ xy denote the shear stress component acting on the plane perpendicular to the first subscript coordinate axis, and the stress direction along the second subscript coordinate axis.
[0043] The control equation of the spatial force deformation problem is composed of the balance equation, the geometric equation and the physical equation. In addition, the boundary condition of the problem needs to be considered when calculating the spatial force deformation problem. The stress boundary condition and the displacement boundary condition need to be considered.
[0044] The stress boundary condition satisfied on the stress boundary S σ is as follows:
[0045]
[0046] The displacement boundary condition satisfied on the displacement boundary S u is as follows:
[0047]
[0048] wherein l, m, n are direction cosines, are the surface force components in the x, y, z directions respectively, are the known displacement components in the x, y, z directions respectively, and u, v, w respectively denote the displacement components along the x, y, z three directions.
[0049] These differential equations will give the neural network model physical meaning, and the constraint conditions will be integrated into the loss function, and the force deformation problem is solved by minimizing the loss function.
[0050] In the scheme, the pure data-driven model needs a large amount of high-quality data support. If the data is sparse or contains noise, overfitting may easily occur, and even unreasonable results that violate physical laws may be output. The numerical method that simply relies on physical equations often faces the challenges of low solving efficiency and complex inversion process. In contrast, integrating physical constraints into the model architecture can effectively suppress problems such as overfitting, and use physical laws to regularize data noise. By adjusting the loss function, the same model framework can solve both the direct problem and the inverse problem, which helps to alleviate the problem of insufficient data or poor adaptability of the model to new scenarios.
[0051] The specific process of step 6 is as follows:
[0052] The neural network structure is constructed, the number of input layer neurons is set to 3, which are (x, y, z) of the coordinates; the number of output neurons is 3, including the predicted coordinates (u, v, w); the activation function uses Tanh; and full connection transmission is adopted. The network structure of the neural network is adaptively optimized by the firefly algorithm, and the best structure is found by searching different network architectures, so as to balance the model complexity and prediction performance. In the process of optimizing the neural network structure based on the firefly algorithm, each firefly individual represents a network configuration scheme, and its dimension is defined as the number of hidden layers (up to 3 layers) and the number of neurons in each layer (up to 100 nodes per layer). In the initialization stage of the algorithm, a random distribution strategy is used to generate a population, and then the individuals are trained and verified to quantify their fitness (i.e. brightness) based on the performance indicators of the validation set. In the iteration process, all individuals in the population are compared in brightness: lower brightness individuals perform position updates according to the attraction model towards better individuals, which combines the effects of brightness difference and individual distance. After global position update in each iteration, the population fitness is re-evaluated. When the preset number of iterations is reached, the convergence process is terminated, and the algorithm outputs the network layer number and neuron configuration corresponding to the firefly individual with the highest fitness as the optimal structure scheme. The process of determining the optimal network main structure is as shown in the attached Figure 5 .
[0053] In this scheme, the firefly algorithm is used to optimize the number of hidden layers and neurons in the neural network structure. Compared with traditional grid search and random search, the main advantages are significantly higher search efficiency and stronger global search ability. Compared with other intelligent algorithms, this step has a more concise mechanism, and the distance-dependent attractiveness brings stronger search line and parallel search.
[0054] The specific process of step 7 is as follows:
[0055] Generally speaking, the loss function of the physical information neural network method has three parts, which are the errors of the differential equation, the boundary condition and the initial condition. Since this problem belongs to the category of statics, there is no need to add the initial condition error. The mean square error is used to measure the loss function, and the total loss function can be represented as
[0056]
[0057] MSE PDE = MSE P + MSE G + MSE C (9)
[0058] Wherein, MSE PDE is the equation error, MSE BC is the boundary condition error (which can be set as the deviation of contact pressure), and MSEP , MSE G and MSE C are the errors of the balance equation, geometry equation and physical equation respectively. and are the weights of the loss functions, used to balance the contribution of different loss functions to the total loss function. The weights are dynamically adjusted according to the relative size of the gradient of each loss term in the loss function, so that the influence of all loss terms in model training is balanced. Avoid some loss dominating the training, and the effect of some loss is weakened. Among them, the specific expression of the differential equation error is
[0059]
[0060]
[0061] where σ x , σ y , σ z respectively represent the normal stress acting on the plane perpendicular to the x-axis, y-axis, z-axis, and the stress direction is along the x-axis, y-axis, z-axis respectively. f x , f y , f z are the body force components along the x-axis, y-axis, z-axis respectively, ε x , ε y , ε z respectively represent the normal strain along the x-axis, y-axis, z-axis direction, γ xy , γ xz , γ yz respectively represent the shear strain components occurring in the x-y, x-z, y-z plane, τ yz , τ xz , τ xy represent the shear stress components acting on the plane perpendicular to the first subscript coordinate axis, and the stress direction is along the second subscript coordinate axis. The differential equation loss contains the balance equation, geometry equation and physical equation, which provides the physical information for the physical information neural network model.
[0062] The specific expression of the boundary condition error is
[0063]
[0064] where N b is the number of points located on the boundary in the point cloud data, and N P is the number of points located on the non-boundary in the point cloud data.
[0065] In the scheme, the physical residual term is used as a strong regularizer, which can ensure the physical reasonableness of the solution and greatly reduce the dependence on labeled data even in the case of sparse data or noisy scenes; the unified processing of the forward problem (solving the physical field) and the inverse problem (identifying unknown parameters) is realized through end-to-end optimization, without the need to reconstruct the algorithm framework; the calculation of the physical residual is realized based on the sampling of the spatial coordinates, which breaks through the traditional grid limitation, naturally adapts to complex geometric domains and high-dimensional problems, and supports real-time interpolation and differentiation of continuous solution representation.
[0066] The specific process of step 8 is as follows:
[0067] Based on the neural network structure obtained in step 6, the input layer input point coordinates (x, y, z) are processed through the neural network, and the neural network approximation displacement solution (u, v, w) is obtained at the output layer. The obtained approximation solution is calculated by automatic differentiation technology to obtain the corresponding partial derivative, which is brought into the loss function containing physical information. The relative size of the gradient of each loss term in the loss function is used to dynamically adjust the weight size of the corresponding loss term. The loss function is trained under the model, and the loss is continuously reduced until the convergence condition of the model is reached, and the training is ended, otherwise the neural network structure is updated by back propagation, and the loss is continuously reduced by updating the neural network. In the training process of the model, the total loss is continuously reduced until the total loss of the model is less than the threshold value, and the training is ended. If the total loss is greater than the set threshold value, the network structure parameters are updated in reverse, until the total loss is less than the threshold value, and the training is ended. After the training is completed, the displacement solution (u, v, w) of the stress deformation is output, the displacement solution is superimposed on the corresponding point coordinates to obtain the point coordinates after stress deformation, and the point cloud coordinate data of the non-ideal surface after stress deformation is obtained by traversing all point coordinates.
[0068] An electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the assembly process error modeling method based on the physical information neural network when executing the program.
[0069] A computer readable storage medium having computer instructions stored thereon, the computer instructions being executed by a processor to implement the assembly process error modeling method based on the physical information neural network.
[0070] Compared with the inherent problems of high dimension, complex calculation, long time-consuming and other algorithm models that depend on a large amount of high-quality data, are prone to overfitting and may violate physical laws, the physical information neural network model introduced in the present application combines measured point cloud data and the boundary element method, and has a significant advantage in calculating the stress deformation of the assembly joint surface. The core is that the control equation (such as the balance equation and the constitutive relationship) describing the elastic mechanical behavior is directly embedded in the loss function of the neural network training process, which gives the model a strict physical rule constraint. This strong fusion of physical information greatly reduces the stringent requirements for the size and quality of the training data, effectively avoids the risk of overfitting, and fundamentally ensures that the model prediction results comply with the physical laws and avoid violating the principles of mechanics. On the other hand, in view of the problems of grid dependence, calculation efficiency bottleneck and long solving time of traditional numerical simulation in dealing with complex assembly surfaces, the method skillfully uses the high-fidelity representation of measured point cloud data to represent the real geometric shape and surface characteristics of the joint surface, and converts the deformation problem of continuous medium into the solution of discrete physical points. Theoretical derivation shows that the boundary element method is naturally suitable for such boundary discrete description problems, and it only needs the discrete point cloud data of the assembly joint surface, reduces the three-dimensional space problem to a two-dimensional problem for solving, thereby significantly reducing the calculation degrees of freedom and greatly improving the solving efficiency and speed. Therefore, the method realizes the comprehensive improvement of the stress deformation calculation in precision, efficiency, robustness and physical consistency through the theoretical guarantee of physical constraint, the real representation of point cloud data and the theoretical advantage of boundary element dimension reduction calculation. BRIEF DESCRIPTION OF DRAWINGS
[0071] Figure 1 The overall modeling flowchart in a physical information neural network-based assembly process error modeling method according to the present application.
[0072] Figure 2 The index matrix solving method.
[0073] Figure 3 The contact area schematic diagram of the assembly joint surface.
[0074] Figure 4 The neural network structure.
[0075] Figure 5 The flowchart of optimizing the network main structure by the firefly algorithm.
[0076] Figure 6 The implementation flowchart of the gradual contact method.
[0077] Figure 7 The physical information neural network model solving block diagram. DETAILED DESCRIPTION
[0078] The present application is further illustrated by the following examples, which are illustrative and not limiting, and do not limit the scope of protection of the present application.
[0079] Example: According to the actual geometry of the part assembly feature surface, find a minimum rectangle that can just wrap the surface. This rectangle is the basis for subsequent discrete meshing, ensuring that no part of the feature surface is missed, and no excessive irrelevant area is included. Establish an X-Y coordinate system with the upper left corner of the minimum rectangle as the coordinate origin, and perform discrete meshing on the rectangle by the discrete meshing factor λ. The number of rows and columns of the discrete meshing is determined by the actual size of the rectangle and the discrete meshing factor, and the formula is:
[0080]
[0081] where a, b are the length and width of the minimum rectangle, d, e are the number of rows and columns of the discrete meshing, λ is the discrete meshing factor, and [] represents the integer function. After discrete meshing, it is determined whether each mesh element is located inside the part assembly feature surface, and if the element position is inside the surface, it is recorded as 1, otherwise as 0. After traversing all elements, the corresponding index matrix A is obtained, and the corresponding element is recorded as a ij , as shown in Figure 2 .
[0082] Through high-precision acquisition equipment, the original point cloud data of the part surface is obtained: P = {p i | p i ∈ R 3 , i = 1, 2, … q}, q is the number of point clouds corresponding to the point cloud set. A rigid transformation matrix T from the measurement coordinate system to the part coordinate system is constructed, and the transformation matrix is applied to the original point cloud data to obtain the registered point cloud data P' = {p i | p i ∈ R 3 , i = 1, 2, … q'}, q' is the number of point clouds in the corresponding point cloud data.
[0083] After completing the index matrix grid construction and point cloud registration, the part surface point cloud set P' = {p i | p i ∈ R 3 , i = 1, 2, … q'} is matched to the index grid. Because the number of point clouds and the number of grids may differ, a downsampling operation is required, and all point cloud data is traversed to obtain the downsampled part surface point cloud set P' = {p i | p i ∈ R 3 , i = 1, 2, … t}, t is the number of points in the downsampled point cloud data.
[0084] According to the differential plane method, the contact of two non-ideal assembly joint surfaces is equivalent to the contact between an ideal surface and a non-ideal surface, and the contact area of the equivalent assembly joint surface is as shown in Figure 3 The upper surface is set as S1, and the lower surface is set as S2, and then the non-ideal surface point set S1 = {s i |s i ∈R 3 ,i = 1, 2, … t} and the ideal surface point set S2 = {s i |s i ∈R 3 ,i = 1, 2, … t}, t is the number of point clouds in the point set after downsampling. The method of gradual contact is used to gradually approach the ideal surface to the non-ideal surface, and the contact point of the ideal surface after translation by the shortest distance is called the first contact point (P1). If the first contact point is only one, the ideal surface will further rotate until the second contact point (P2) is found. If the second contact point is another extreme value point on the non-ideal surface except the first contact point, the ideal surface will further rotate until the third contact point (P3) is found, and the assembly joint surface is completed. If the first contact point exists three or more than three, the ideal surface and the non-ideal surface will directly complete the assembly joint surface. The implementation process is as shown in Figure 6 .
[0085] According to the differential plane method, a model of the contact between a rough surface and a smooth surface is established, and the contact between two rough surfaces is replaced by the contact between a rigid ideal plane and a non-ideal plane. It is assumed that there is no interaction between the two adjacent microconvex bodies. When the ideal plane is subjected to force, the microconvex bodies where the three contact points of the ideal plane and the non-ideal plane are located are deformed, and when the microconvex bodies are deformed to a certain extent, the contact between the ideal plane and the non-ideal plane reaches a stable state, and the contact of the converted assembly joint surface is as shown in the accompanying Figure 3 During the stress deformation process of the assembly joint surface, the balance equation, the geometric equation and the physical equation of the assembly joint surface, and the stress / displacement boundary conditions can be obtained through the theory of elasticity, and the specific formulas are as shown in equations (3) to (7).
[0086] A neural network structure was constructed, with 3 neurons in the input layer and 3 neurons in the output layer. The Tanh activation function was used, and fully connected propagation was employed. The number of hidden layers and neurons in each layer were adaptively optimized using the firefly algorithm. The optimal structure was found by searching different network architectures, thus achieving a balance between model complexity and prediction performance. In the firefly-based neural network structure optimization process, each firefly represents a network configuration scheme, defined by the number of hidden layers (maximum 3 layers) and the number of neurons in each layer (maximum 100 nodes per layer). During the algorithm initialization phase, a random distribution strategy was used to generate the population. Subsequently, the individuals were trained and validated, with the validation set performance metric quantifying their fitness (i.e., brightness). During iteration, all individuals in the population underwent pairwise brightness comparisons: individuals with lower brightness updated their positions towards those with higher brightness according to an attraction model. This mechanism combined the dual effects of brightness difference and individual spacing. After each iteration, the global position update was completed, and the population fitness was re-evaluated. When the preset number of iterations is reached, the convergence process terminates, and the algorithm outputs the number of network layers and neuron configuration corresponding to the firefly individual with the highest fitness as the optimal structure. The process of determining the neural network structure is shown in the appendix. Figure 5 A loss function containing physical information is constructed based on the boundary constraint equations. The mean squared error is used to measure the loss function, which includes equation error and boundary condition error. The weights of the loss terms are dynamically adjusted according to the relative magnitude of the gradients of the loss terms, so that the influence of all loss terms in model training is balanced.
[0087] The input layer of the constructed neural network structure takes the coordinates (x, y, z) of points in the point cloud data as input. After processing by the hidden layers, the output layer yields the approximate displacement solution (u, v, w). Partial derivatives of the approximate solution are obtained using automatic differentiation. These partial derivatives are substituted into a loss function containing physical information. The weights of the loss terms are then dynamically adjusted based on their relative gradients to balance their influence on the model. After weight adjustment, the total loss is calculated. If the total loss is less than a set threshold, the predicted point displacement (u, v, w) is output. If the total loss is greater than the threshold, backpropagation is performed, and the neural network structure is further adjusted to obtain a neural network architecture that meets subsequent threshold requirements. The physical information neural network solution framework is as follows: Figure 7 As shown. After model training, inputting point cloud data of the non-ideal surface allows us to obtain the point displacements of the non-ideal surface after deformation under stress. These point displacements are then superimposed onto the corresponding point coordinates. By iterating through all point cloud data, we obtain the point cloud data of the non-ideal surface after deformation under stress. It should be noted that the above embodiments are not intended to limit the scope of protection of this invention. Equivalent transformations or substitutions made based on the above technical solutions fall within the scope of protection of the claims of this invention.
Claims
1. A physical information neural network-based assembly process error modeling method, characterized by, The method comprises the following steps: Step 1: determining an index matrix, According to the assembly joint surface theory, the sampling area is determined based on the geometric profile, the discrete grid is discretized based on the discrete grid factor, and the index matrix is obtained based on the actual shape of the assembly joint surface, Step 2: registering the measured point cloud, Obtaining the measured point cloud coordinates of the assembly joint surface of the parts, and registering the point cloud data of the assembly joint surface by registration method, Step 3: down-sampling the measured point cloud, According to the coordinate index matrix, the point coordinates are down-sampled to obtain the down-sampled measured point cloud of the assembly joint surface, Step 4: processing the assembly joint surface, The assembly joint surface is converted into an ideal surface and a non-ideal surface by the difference surface method, and the assembly joint surface is matched by the gradual contact method, Step 5: establishing boundary constraint equations, Based on the boundary element theory, a boundary constraint equation set is established, Step 6: constructing a neural network structure, A neural network structure is constructed, the best network structure is obtained by using the firefly algorithm, and a stress-strain prediction model is constructed, Step 7: constructing a loss function, Based on the boundary constraint equation set obtained in step 5, a loss function of the physical information neural network is constructed, Step 8: training the model Based on the results in steps 5, 6 and 7, a physical information neural network model is constructed, point coordinates are input, and point displacements after stress deformation are obtained, and point cloud data is updated; In step 5, based on the boundary element theory, a boundary constraint equation set is established, (1) After the assembly joint surface realizes assembly constraint, under the action of force, the ideal surface will gradually press the non-ideal surface, the non-ideal surface will produce stress deformation, and the position of the ideal surface will change, (2) According to the contact mechanics theory, the boundary constraint conditions and constraint equation set of the assembly joint surface are obtained, as shown in formulas (3)-(6), Balance equation Geometric equation Physical equation (isotropic material) The balance equation, geometric equation and physical equation together constitute the control equation of the space stress deformation problem, in addition, when calculating the space stress deformation problem, the boundary conditions of the problem also need to be considered, the stress boundary condition and the displacement boundary condition need to be considered, At the stress boundary The stress boundary condition is satisfied when At the displacement boundary The displacement boundary condition is satisfied when Where u, v, and w represent the displacement components along the x, y, and z directions, respectively, and E represents the elastic modulus. Poisson's ratio, It is a displacement boundary. It is a stress boundary. , , These represent normal stresses acting on planes perpendicular to the x-axis, y-axis, and z-axis, respectively, with the stress directions also along the x-axis, y-axis, and z-axis. , , The body force components along the x-axis, y-axis, and z-axis respectively. , , These represent the normal strains along the x-axis, y-axis, and z-axis, respectively. , These represent the shear strain components occurring in the xy, xz, and yz planes, respectively. , , This represents the shear stress component acting on a plane perpendicular to the first subscript coordinate axis, with the stress direction along the second subscript coordinate axis; The direction cosine, , , They are respectively Surface force components in the direction, , , They are respectively Known displacement components in the direction; These differential equations will give the neural network model physical meaning, and the constraint conditions will be integrated into the loss function, and the stress deformation problem is solved by minimizing the loss function, (3) In the assembly joint surface matching process, there are different boundary conditions in the contact area and the non-contact area.
2. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 1, the sampling area is determined according to the ideal geometric profile of the assembly joint surface, the discrete grid is discretized by the discrete grid factor, and the index matrix is obtained according to the surface shape of the part, (1) According to the actual geometric shape of the part assembly feature surface, a smallest rectangle that can wrap the surface is found, which is the basis for subsequent discrete grid, to ensure that no part of the feature surface is missed, and no excessive irrelevant area is included, (2) Establishing X-Y coordinate system with the upper left corner point of the minimum rectangle as the coordinate origin, and determining the discrete grid factor by Discrete grid is performed on the rectangle, and the row and column numbers of the discrete grid are determined by the actual size of the rectangle and the discrete grid factor, and the formula is: where a, b are the length and width of the minimum rectangle, respectively, d, e are the number of rows and columns of the discrete grid, respectively, is the discrete grid factor, and [ ] denotes the floor function, (3) After discretization, it is judged whether each grid element is located inside the surface of the assembly feature of the part. If the element is located inside the surface, it is recorded as 1, otherwise it is recorded as 0. After traversing all elements, the corresponding index matrix A is obtained, and the corresponding element is recorded as .
3. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 2, the measured point cloud coordinates of the assembly joint surface of the parts are obtained, and the point cloud data of the assembly joint surface is registered by registration method, (1) Collecting point cloud data of the assembly joint surface by means of high-precision measuring equipment to obtain point cloud data q is the number of points in the point set, (2) Construct the rigid body conversion matrix T from the measurement coordinate system to the part coordinate system, and apply the conversion matrix to the source point set to obtain the registered point cloud data , is the number of points in the new point set.
4. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 3, the point coordinates are down-sampled according to the coordinate index matrix to obtain the down-sampled measured point cloud of the assembly joint surface, (1) Register the point cloud data Match to the index grid and perform matching analysis; (2) If a grid center coincides with a point in a single point cloud, the point is retained; (3) If one grid center coincides with multiple repeated points, one point in the repeated points is reserved; (4) If one grid center has multiple matching points that coincide but are distributed in the Z direction, the Z direction coordinates of these points are taken as the arithmetic mean to generate a fusion point, and the fusion point is reserved; (5) If one grid center has no matching points, no point is reserved; (6) Traverse all index grids to obtain new point cloud data after downsampling , t is the number of points after downsampling.
5. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 4, the assembly joint surface is converted into an ideal surface and a non-ideal surface by the difference surface method, and the assembly constraint positioning is obtained by the adjustment method, (1) According to the contact mechanics theory, the two non-ideal component assembly joint surfaces are converted into the contact of an ideal surface and a non-ideal surface, and two new point cloud data are obtained: and t is the number of points after downsampling, (2) In the process of gradually approaching the non-ideal surface to the ideal surface, the ideal surface gradually realizes contact with the non-ideal surface through translation and rotation methods, and three or more contact points are obtained in the contact process, realizing the cooperation of the assembly joint surface.
6. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 6, the neural network structure is constructed, and the best network structure is obtained by the firefly algorithm to construct the stress-strain prediction model, (1) The neural network structure is constructed, the number of neurons in the input layer is 3, the number of neurons in the output layer is 3, the number of hidden layers is limited to not more than 3, and the number of neurons in each layer is limited to not more than 100, the number of hidden layers and the number of neurons in each layer are obtained by the firefly algorithm, (2) Based on the firefly algorithm, the network structure solving process of the model is as follows: Step 1: Firefly coding, each firefly represents a network structure configuration, the coding length is 3 layers of the maximum hidden layer number set, and each dimension of the coding represents the number of neurons in the corresponding hidden layer, Step 2: Population initialization, different structure firefly individuals are generated according to random distribution, and all parameters are taken within the set range, Step 3: Fitness evaluation, the physical information neural network model of each firefly individual is constructed, the model training is completed on the corresponding training set, and the loss function value on the validation set is taken as the fitness evaluation standard, Step 4: Position update, compare the brightness of the fireflies, the individual with lower brightness will approach the individual with higher brightness, and search by adjusting the parameters of the firefly individual itself, Step 5: After a predetermined number of iterations, select the network structure represented by the firefly with the smallest loss in the validation set, (3) Select the optimal network structure as the neural network structure for subsequent model prediction.
7. The physical information neural network based assembly process error modeling method of claim 1, wherein, In step 7, based on the boundary constraint equation set, the loss function of the physical information neural network is constructed, (1) According to the boundary constraint equation set obtained by the boundary element theory, the loss function is expressed in the form of weighted mean square error, including control equation error and boundary condition error, (2) The influence weight of control equation error and boundary condition error in the loss function is described by weight coefficients, and the weight is dynamically adjusted by the relative size of the gradient of each loss term; In step 8, based on the boundary constraint equation set, the neural network structure and the loss function, the physical information neural network model is trained to complete the model establishment, and the stress deformation is calculated to update the point cloud data, (1) The point coordinates of the input point cloud data are input, and the solution approximated by the neural network is output, and the partial derivative of the solution is obtained by automatic differentiation technology, (2) The partial derivative is substituted into the loss function, and the weight is dynamically adjusted by the relative size of the gradient of each loss term, (3) in the model training, the total loss is continuously reduced until the convergence of the model is reached, then the training is ended, if it is greater than the set value, the network structure parameters are updated, (4) after the model training is completed, the point displacement after stress deformation is output, the point displacement is superimposed on the corresponding point coordinates, and the point cloud data of the non-ideal surface after stress deformation is obtained by traversing the point cloud data.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the physical information neural network-based assembly process error modeling method in any one of claims 1-7 when executing the program.
9. A computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions implement the physical information neural network-based assembly process error modeling method in any one of claims 1-7 when executed by the processor.