Error mechanism model-based automatic drilling and riveting equipment error dynamic control method and device
By proposing a dynamic error control method for automated drilling and riveting equipment based on an error mechanism model, and using MSCNN and self-attention mechanism combined with BiLSTM for riveting quality prediction, the problem of improving the processing accuracy of automated drilling and riveting equipment in batch processing is solved, and higher processing accuracy and stability are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing automatic drilling and riveting equipment cannot accurately control the processing quality of each rivet during batch processing, which limits the improvement of processing accuracy and prevents the transformation from automation to intelligence.
An error dynamic control method for automatic drilling and riveting equipment based on an error mechanism model is adopted. By acquiring production data, constructing a mathematical model, using MSCNN and self-attention mechanism to capture data features, and combining BiLSTM to predict riveting quality, dynamic control of processing errors is achieved.
It improves the robustness and machining accuracy of automatic drilling and riveting equipment in complex environments, reduces machining errors, and enhances the quality stability of batch processing.
Smart Images

Figure CN122154770A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent manufacturing of aircraft structures, and particularly relates to a method and device for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model. Background Technology
[0002] In aircraft assembly, drilling and riveting account for approximately 30% of the total assembly work. Rivets, while ensuring aesthetics and aerodynamic performance, can withstand significant tensile and shear forces and maintain stability under varying temperature and humidity conditions. The riveting process, similar to extrusion molding, is a complex elasto-plastic nonlinear process that ultimately results in an interference fit between the joined plates (panels, etc.) and the connecting components (rivets, etc.).
[0003] Because the elastoplastic process of riveting is nonlinear, the processing equipment must have high precision, high stability, and the ability to control processing parameters (speed, force, position) to prevent significant losses caused by damage to aircraft panels during manufacturing.
[0004] For automated drilling and riveting systems, the final quality of riveting is affected by a variety of factors, including not only processing parameters such as positioning accuracy, hole-making accuracy, and force-displacement control accuracy, but also stability parameters such as process capability index and potential process capability index. It is important to note that compared to traditional, inefficient hole-making and riveting methods, automated drilling and riveting equipment typically processes hundreds or thousands of rivets in a single production batch. Current processing methods still rely on high-precision automated processing for batch production. During the processing, the processing quality of each rivet is unclear, and it is impossible to accurately and dynamically control the processing error. This is a key issue hindering the further improvement of processing accuracy in batch processing of automated drilling and riveting equipment, and it is also one of the core issues preventing automated drilling and riveting equipment from transitioning to intelligent processing.
[0005] Patent document CN114330030A discloses a method for controlling the quality of drilling and riveting of aircraft structural parts based on digital twins. The method involves installing a robotic automatic drilling and riveting device in the aircraft assembly physical workshop. This device can complete the entire process of hole positioning, drilling, rivet feeding, and riveting. At the same time, a digital twin system corresponding to the physical workshop is established on a computer. The automatic drilling and riveting device transmits the center coordinates of the completed riveting holes and riveting quality information to the digital twin system in real time via a local area network and TCP / IP data interface. Through real-time integration and interaction between the physical workshop and the digital twin system, problematic riveting points can be detected and remedied in a timely manner, effectively avoiding problems such as delayed monitoring of riveting status and accumulation of riveting errors.
[0006] Patent document CN120030813A discloses a method for predicting riveting deformation of thin-walled parts, which specifically includes the following steps: S1, construction of a single-nail riveting mechanical model; S2, construction of a riveting interference model; S3, construction of a prediction model. This method for predicting riveting deformation of thin-walled parts calculates the maximum riveting force required for forming a standard-sized upsetting head through a mechanical model, and couples the riveting interference model. After obtaining the dimensions of the upsetting head, the diameter of the rivet rod, the diameter of the rivet hole, the thickness of the thin-walled part, and the riveting pressure, it can effectively predict the deformation thickness of the thin-walled part, providing theoretical support for process optimization and quality control. Summary of the Invention
[0007] The purpose of this invention is to provide a method and device for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model. This method can solve the problem of poor product processing quality caused by processing errors.
[0008] To achieve the first objective of this invention, the following technical solution is provided: a dynamic error control method for automatic drilling and riveting equipment based on an error mechanism model, comprising the following steps: Acquire production data and categorize it based on the causes of errors to construct a processing dataset; A mathematical model is constructed based on the error generation mechanism. The processing dataset is input into the mathematical model, and the optimal parameters affecting the processing quality are obtained based on the principle of minimum parameters. Label the optimal parameters based on processing quality, and combine the labels and optimal parameters into a dataset. An initial model was constructed and trained using the dataset to obtain a predictive model for predicting the processing quality of automated drilling and riveting equipment.
[0009] This invention proposes a relevant error data model based on the system structure of an automatic drilling and riveting equipment, and selects the most relevant processing parameters based on the error model and the principle of minimum parameters. It uses MSCNN and self-attention mechanism to capture data features and BiLSTM to predict riveting quality, thus demonstrating strong robustness in the face of data loss during the processing of automatic drilling and riveting equipment.
[0010] Specifically, the principle of minimum parameters involves two constraints on parameter selection: First, achieving high-precision prediction with the fewest input and output parameters. The basis for parameter selection is whether a clear linear relationship exists between the parameters. If a clear linear relationship exists, only one representative parameter needs to be selected. If no clear linear relationship exists, summarizing the relationship through fitting or other methods will lead to further equipment errors. Therefore, all parameters without a clear linear relationship need to be included in the algorithm training to ensure the completeness of the features captured by the algorithm. This reduces the training cost of the algorithm and allows for better feature extraction of the main parameters. Furthermore, considering the complexity of the production environment, fewer collected parameters mean less influence from equipment factors, resulting in more stable operation. Second, among the optional parameters (parameters with a clear linear relationship), the basis for parameter selection is that parameter acquisition must have the lowest acquisition cost (ease of acquisition). The difficulty of acquiring parameters directly affects the cost of using the algorithm. The selected parameters should be easy to acquire in order to reduce the acquisition cost of edge devices.
[0011] Specifically, the mathematical model includes a hole-making unit and a riveting unit; The hole-making unit is designed based on the main motion direction of the tool to address the impact of tool wear on machining errors. The riveting unit uses the machining coordinate reference system as the basic reference system to study the influence of riveting force, displacement of the riveting die, and perpendicularity on machining errors.
[0012] Specifically, the preferred parameters include upper riveting die pressure, lower riveting die pressure, presser foot pressure, length gauge, and bore diameter quality.
[0013] Specifically, the aperture quality includes parameters such as power, feed rate, cutting speed, and rotational speed.
[0014] Specifically, the initial model is constructed using a convolutional neural network and an LSTM network, and incorporates a self-attention mechanism.
[0015] Specifically, the initial model includes a data preprocessing module, a multi-scale feature extraction module, a feature fusion module, and a prediction module; The data preprocessing module is used to convert the input production data into a two-dimensional data set; The multi-feature extraction module is used to perform multi-scale feature extraction on the two-dimensional data set to obtain feature vectors corresponding to multiple scales. The feature fusion module is used to fuse feature vectors of multiple scales to obtain fused features; The prediction module makes predictions based on the fused features to obtain prediction results.
[0016] Specifically, the processing quality refers to the riveting interference.
[0017] To achieve the second objective of this invention, the following technical solution is provided: an automatic drilling and riveting equipment error dynamic control device, used to execute the steps of the above-mentioned automatic drilling and riveting equipment error dynamic control method based on the error mechanism model.
[0018] Compared with the prior art, the beneficial effects of the present invention are as follows: In the process of riveting elastic-plastic mechanics, the influencing factors of plastic deformation are further supplemented to the error generation mechanism of the error model, making the parameter selection more objective. A mechanistic model based on the structure of an automatic drilling and riveting device is proposed. Based on the mechanistic model, a minimum parameter principle is proposed and the parameters are selected using this principle. Secondly, based on the parameters, an AttenBiNet prediction algorithm with strong feature extraction capability is proposed. This algorithm has strong robustness when facing missing data and has shown application potential in automatic drilling and riveting systems. Attached Figure Description
[0019] Figure 1 This embodiment provides a dynamic error control method for automatic drilling and riveting equipment based on an error mechanism model. Figure 2 This is a schematic diagram illustrating the error generation mechanism provided in this embodiment; Figure 3 This is a schematic diagram illustrating the principle of the prediction model provided in this embodiment; Figure 4 This is a schematic diagram illustrating the principle of the convolutional neural network provided in this embodiment; Figure 5 This is a schematic diagram of the LSTM network provided in this embodiment; Figure 6 This is a schematic diagram illustrating the principle of the self-attention mechanism provided in this embodiment. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0021] like Figure 1 As shown in this embodiment, an automatic drilling and riveting equipment error dynamic control method based on an error mechanism model is provided, including the following steps: Acquire production data and categorize it based on the causes of errors to construct a processing dataset; A mathematical model is constructed based on the error generation mechanism. The processing dataset is input into the mathematical model, and the optimal parameters affecting the processing quality are obtained based on the principle of minimum parameters. Label the optimal parameters based on processing quality, and combine the labels and optimal parameters into a dataset. An initial model was constructed and trained using the dataset to obtain a predictive model for predicting the processing quality of automated drilling and riveting equipment. The initial model includes a data preprocessing module, a multi-scale feature extraction module, a feature fusion module, and a prediction module; The data preprocessing module is used to convert the input production data into a two-dimensional data set; The multi-feature extraction module is used to perform multi-scale feature extraction on the two-dimensional data set to obtain feature vectors corresponding to multiple scales. The feature fusion module is used to fuse feature vectors of multiple scales to obtain fused features; The prediction module makes predictions based on the fused features to obtain prediction results.
[0022] More specifically, such as Figure 2 As shown, the types of errors generated during the actual processing of automatic drilling and riveting equipment mainly include equipment errors (such as manufacturing errors and transmission errors), usage errors (such as tool wear and riveting die deformation), and rivet errors (the rivet is not perpendicular to the hole diameter). Through analysis of the equipment, it was found that all the errors generated during the processing will eventually accumulate in the hole-making unit and the riveting unit.
[0023] Specifically, firstly, the accumulation of errors directly affects the quality of hole making by the drilling tool. For example, insufficient perpendicularity during the drilling process can lead to deviations in the hole diameter and socket diameter. Secondly, since the riveting process is a hybrid control of force and displacement, the accumulation of errors affects the riveting force exerted by the upper (lower) riveting die during the riveting process and the displacement of the riveting die, thereby reducing the quality of riveting. At the same time, rivet errors will further increase the errors in the above process.
[0024] Therefore, based on the analysis of the causes of equipment errors, an error mechanism model is established for the processing terminals of the hole-making unit and the riveting unit to qualitatively demonstrate the causes of errors.
[0025] For the drilling unit, the electric spindle drives a rotating cutting tool to drill holes in the skin and wall panel. The main accuracy error arises from the influence of the cutting tool on the hole diameter quality, so the cutting tool needs to be modeled. To facilitate the establishment of a mathematical model for the drill bit used, this study selects a theoretical reference frame as the basic reference frame. This reference frame is established based on the main motion direction of the cutting tool, which is closer to the actual situation. Simultaneously, the rake angle, rake angle, and tip angle from the basic angle group (rake angle, clearance angle, edge deflection angle, and edge inclination angle) are selected for modeling, where: Rake angle: The angle between the rake face and the base plane in the orthogonal plane of the cutting tool.
[0026] Inclination angle: The angle between the main cutting edge and the base plane drawn through the tool tip, measured in the cutting plane of the tool.
[0027] Cutting edge angle: The angle between the projections of the two main cutting edges of a cutting tool onto a plane parallel to it.
[0028] The main reason for selecting the above parameters is that the rake angle is a core parameter of the cutting tool and has a significant impact on the drilling process. The inclination angle and tip angle not only express the geometric characteristics of the parameters but also the manufacturing parameters (power, axial force, etc.) during machining. It should be noted that the rake angle and inclination angle vary depending on the position of different points on the main cutting edge.
[0029] According to the formula for calculating the geometric parameters of the cutting tool, the formula for the rake angle of the drill bit in any orthogonal plane is: ; ; in, It is any point selected on the main cutting edge; It is the spiral angle at the selected point; The complementary azimuth angle of any orthogonal plane; It is the principal deflection angle of the selected point; It is the blade inclination angle at the selected point; It is the azimuth angle of any orthogonal plane.
[0030] It should be noted that, depending on the actual machining situation, the cutting edge angle used and the original cutting edge angle of the tool may not be equal, therefore: ; in, It is the principal cutting edge angle at a selected point on the main cutting edge. It is the drill angle at a selected point on the main cutting edge; It is the original sharp angle.
[0031] Since this study uses a blade that does not require sharpening, the original edge angle is equal to the used edge angle; and since the main cutting edge is a straight line, therefore: ; ; in, It is the rake angle of the end face. Meanwhile, since the pitch of the helix at all points on the helical groove of the tool is equal, the helix angle at different radii is not equal. ; in, It is the radius of the selected point; It is the radius of the cutting tool / drill bit; It is the helix angle at the outer edge of the cutting tool / drill bit. Based on the above formula, we can conclude that: ; Numerous studies have experimentally verified the wear of cutting tools and drill bits, including adhesive wear, diffusion wear, oxidation wear, fatigue wear, and abrasive wear. The aforementioned formulas directly reveal the non-independence (different types of wear influence each other) and simultaneity (multiple types of wear occur simultaneously) of the wear mechanism. Specifically, when wear occurs, changes in the rake angle (or inclination angle) affect the original geometric design of the drill bit. These geometric changes cause variations in the principal cutting edge angle or helix angle, resulting in changes to the original design parameters such as the helix angle and principal cutting edge angle during actual machining, leading to hole diameter errors.
[0032] Analysis based on the above formula: (1) Wear of the rake and flank faces. According to the definition and formula of the above angle, the rake and flank faces change the actual machining geometry due to thermal wear or wear caused by hard particles from tiny carbides. Therefore, the rake angle (the angle between the tool rake face and the cutting surface) will directly have an impact. The specific impact depends on the wear of the rake and flank faces. The change of the rake angle will cause a change in the cutting edge inclination angle, which will also directly affect the relevant changes in the cutting force.
[0033] (2) Cutting edge wear. According to the above definitions and formulas, since the cutting motion of the tool is accompanied by axial and rotational motion, it will be subjected to strong compression, and cold welding wear and hard particle wear will occur simultaneously. Therefore, the geometric shape of the cutting edge changes from linear to band-like. This directly changes the size of the rake angle (the angle between the cutting edge and the axis), and the specific impact depends on the condition of the worn cutting edge band. The change in the rake angle may cause a change in the rake angle, which also directly affects the torque and stability during drill bit machining.
[0034] (3) Cutting edge wear. According to the above formula and definition, due to the uneven cutting speed and strong friction at the cutting edge, irregular wear will occur at the cutting edge, which will directly affect the diameter and cutting edge inclination of the drill bit, and also directly affect the machining parameters.
[0035] The specific mechanism by which machining parameters affect the process is described below. Based on the empirical formula for cutting speed in drilling... ,in This refers to the cutting speed, measured in meters per minute (m / min), where d is the drill bit diameter and n is the spindle speed. As the drill bit diameter changes, the cutting speed decreases. At this point, based on empirical formulas, the relationship between the drill thickness and feed rate is established by relating the point angle and rake angle to the geometric and machining parameters. ; in, It's the drill bit feed rate. It refers to the drilling thickness. It is the original sharp angle. It is the cutting edge inclination angle of the end face.
[0036] Combining the formula mentioned above with the empirical formula for processing power: ; ; Where HB is the Brinell hardness of the workpiece, and P is the machining power in kW; through calculation, we obtain: ; in It is a constant. Through observation, the change in machining power under changes in diameter and cutting angle cannot be calculated. Furthermore, since the motor's output current and output power are positively correlated, the change in current also cannot be calculated. Moreover, using the torque formula: ; ; Where M is torque, in N*m; n is rotational speed, in min. -1 Through calculation, we can obtain: .
[0037] Based on the above formula, it is easy to see that the change in power is positively correlated with the change in torque. At the same time, it is found that the cutting speed, drill diameter and cutting edge inclination angle jointly affect the change in rotational speed.
[0038] Based on the formula relating drilling thickness to feed rate, combined with the formula for calculating feed speed: ;in, It is the feed rate, measured in m / min.
[0039] As the diameter decreases, the feed rate also decreases. Further combining this with empirical formulas: That is, it can show that the axial force is affected by the diameter, and the specific change in the effect is positively correlated with the diameter.
[0040] In summary, tool wear is a complex process in machining. It is important to note that the three types of wear mentioned above—rake face wear, cutting edge wear, and cutting edge band wear—do not occur independently, but rather simultaneously during the machining process.
[0041] For the riveting unit, the main process involves the upper and lower riveting dies simultaneously applying pressure to rivets of different sizes, causing elastoplastic deformation of the rivets and the hole walls of the connecting workpieces, forming a stable interference fit. The main accuracy errors arise from the riveting force, the displacement of the riveting die movement, and the influence of perpendicularity. Therefore, the entire process is modeled starting from the movement of the upper and lower riveting dies. To facilitate the establishment of the mathematical model, this study selects the machining coordinate reference system as the basic reference system. It should be noted that riveting is an approximately transient process, meaning that the riveting die can be considered to have a velocity of 0 when it contacts the rivet. Therefore, the process from the start of the riveting die to contacting the rivet involves acceleration and deceleration; after contacting the rivet, the riveting die applies pressure to the rivet to the position specified in the code instruction.
[0042] Since the riveting process involves complex elastoplastic mechanical changes, a process equation is established from an energy perspective: ; in, It is a non-constant force during the acceleration process at the front of the riveting die. It is a non-constant force during the deceleration process in the later stage of the riveting die; It is the displacement during the riveting acceleration process. It is the displacement during the riveting die deceleration process; It is the angle by which the axes of the upper and lower riveting dies deviate from the center line, which is normally zero. This represents the energy required for the rivet to undergo elastic deformation. It is the energy required for the rivet to undergo plastic deformation. It is the residual stress remaining after the riveting process is completed. It is the displacement caused by vibration, which is generally 0.
[0043] During the riveting process ( ,in, It is the total displacement of the riveting die during the riveting process.
[0044] ;in, It is the energy required for the pore to undergo plastic deformation under compression; It is the energy required for the rivet to undergo plastic deformation under pressure.
[0045] During the riveting process, the elastic strain energy varies depending on the material, and can be expressed as follows: ; in, It is the compressed volume. It is the elastic modulus. It is Poisson's ratio. , It is a positive response. It is shear strain.
[0046] Further analysis reveals that the energy transmitted by the riveting die mainly consists of the elastic and plastic deformation energy of the rivet, and the elastic and plastic deformation energy of the hole diameter. Due to the interference fit connection, the compressed hole cannot fully release its elastic deformation energy, thus creating residual stress, as expressed below: ; in, , It is normal stress. It is shear stress.
[0047] Errors in the riveting process mainly arise from force-displacement control technology, primarily occurring during the movement of the riveting die. It's important to note that during equipment use, both the force and displacement transmitted by the riveting die change over time, influenced by numerous factors such as equipment wear and tool wear, and therefore lack a general predictable pattern.
[0048] like Figure 3 The diagram shows the structure of the prediction model provided in this embodiment. The prediction of riveting quality is achieved by selecting deep learning models such as MSCNN, Self-Attention, and BiLSTM. Specifically, the Self-Attention model is mainly used to capture the features and key features (force and displacement) of the time-series data (power changes due to tool wear) in the dataset; the MSCNN model mainly captures data features from different dimensions using convolutional kernels of different sizes to ensure that deep feature relationships are fully displayed; the BiLSTM model mainly performs regression analysis on the captured features according to the time series to ensure the accuracy of the prediction results. The entire algorithm framework extracts local features at different scales using MSCNN, enhances global feature interactions by combining Self-Attention, and then uses BiLSTM to capture long-term dependencies in the time series. It integrates the local perception capability of CNN, the global modeling capability of Self-Attention, and the temporal modeling capability of BiLSTM, ensuring the accuracy of the results.
[0049] The first part is data preprocessing, which divides the original dataset into features and target variables. Feature data X_train and target variable y_train are extracted from the CSV file using `np.genfromtxt`. Features are extracted from X_train to obtain high-dimensional feature representations. These features are converted to NumPy arrays and standardized using `StandardScaler`. The target variable y is reshaped into a two-dimensional array for subsequent operations. The `train_test_split` function is used to proportionally divide the dataset into training and validation sets. The data is then converted to PyTorch tensor format for training and prediction in subsequent deep learning models.
[0050] The second part is the MSCNN unit. First, it extracts features from the input data using three one-dimensional convolutional layers with different kernel sizes (3, 5, and 7). Each convolutional layer outputs a feature map with 64 channels to capture local features at different scales. Then, the outputs of these three branches are concatenated along the channel dimension and flattened using a Flatten layer before being fed into a fully connected layer (128 neurons) for further high-level feature extraction. It's important to note that most algorithms add a max-pooling layer after each convolutional kernel channel. By maximizing the value of a local region in the input data, the spatial dimension of the output is reduced, thus lowering the computational complexity and number of parameters in subsequent layers. In this study, max-pooling layers are not used to ensure that the most detailed feature relationships are input into the BiLSTM unit, thereby guaranteeing the algorithm's final prediction accuracy.
[0051] The third part is the Self-Attention unit. First, the input data is processed through three linear transformation layers (self.values, self.keys, and self.queries) to obtain value vectors, key vectors, and query vectors. Then, the dot product similarity (Energy) between the query vector and the key vector is calculated using torch.einsum, and normalized using the softmax function to obtain attention weights. These weights are used to weighted sum the value vectors, generating new feature representations. Finally, the results are concatenated and integrated through a fully connected layer (self.fc_out).
[0052] The final part is the BiLSTM section. The configuration of the nn.LSTM layer allows the model to process the input sequence from two directions and output hidden states that incorporate bidirectional information. These hidden states are then transformed and used for final prediction through fully connected layers (self.fc1 and self.fc2), during which the ReLU activation function is used to increase non-linear expressiveness. The entire process is completed in the forward method, which first obtains the bidirectional hidden states through the LSTM layer, then concatenates the last forward and backward hidden states, and finally passes through a fully connected layer to obtain the predicted output and relevant evaluation metrics of the algorithm.
[0053] like Figure 4 The diagram shown illustrates the principle of the LSTM network provided in this embodiment. It includes two main parts: feature extraction and classification. The convolutional layer is used to extract features from the input data; for one-dimensional data, the convolution operation can be represented as: ; Where m is the convolution kernel (or filter). The index; n is the convolution result. The index indicates the position in the output sequence; It is the input data; It is a convolution kernel; It is the result of convolution.
[0054] Pooling layers are used to reduce feature dimensionality; max pooling can be represented as: ;in, This is the output after pooling, and M is the size of the pooling window.
[0055] The flattening layer transforms multidimensional feature maps into one-dimensional vectors for input to the fully connected layer. The fully connected layer then maps the flattened feature vectors to the output space. The output of the fully connected layer can be represented as: ; in, It is the input vector. It is a weight matrix. It is a bias vector. It is the output vector.
[0056] like Figure 5 The diagram shown illustrates the principle of the LSTM network provided in this embodiment. Here, x represents the input at different times, s represents the hidden layer state at different times, y represents the network output at different times, and c represents the information at the current time. It should be noted that the forget gate determines the deletion of certain information based on and , represented as: ;in, yes The weight matrix of the layer at the forget gate, It is the bias matrix at the forget gate.
[0057] The input gate, based on and adding partial information, is represented as follows: ;in yes The weight matrix of the layer at the input gate, It is the bias matrix at the input gate.
[0058] Cell state The update is as follows: Updated cell status Used to update the current hidden state The output can then be calculated. This mechanism ensures the short-term memory chain. and long-term memory chain They update each other.
[0059] like Figure 6 The diagram shown is a schematic representation of the self-attention mechanism provided in this embodiment. Figure 6 middle, It is the matrix input for the entire unit, containing multiple input vectors. , can be represented as: ; in, It is the positional encoding of the input vector, enabling the model to understand the order of elements in the sequence.
[0060] This embodiment uses the first input vector as an example to explain the entire process. After the vector is matrixed, different input vectors are processed through the following operations: ; ; ; in, The weight matrix for the query; The weight matrix for the key values; The weight matrix is a set of values; The query vector is the initial vector; The initial vector is the key vector; The value vector is the initial vector.
[0061] The attention score is calculated further, and the specific method is as follows: ;in, These are attention scores. All attention scores are normalized using the softmax function to obtain the final attention weights: ;in, For the final attention weight; It is the value of the last attention weight.
[0062] This operation ensures that the sum of all weights is 1, allowing the model to learn a probability distribution.
[0063] Finally, the output is obtained by weighted summation, and the specific formula is as follows: ;in, For input vectors The final output.
[0064] when After all outputs complete the entire process, the output matrix Y is formed from the input matrix X: .
[0065] In this embodiment, MAE, RMSE, Loss, and The performance of the above model is evaluated using various metrics, where the MAE metric represents the average level of error between the predicted and actual values. Its unit is consistent with that of the target variable, facilitating a clear understanding of the error magnitude. The specific formula is as follows:
[0066] in, It is the sample size. It is the actual value. These are the predicted values, and the absolute value of the difference between them represents the absolute error. The RMSE metric is quite sensitive to large errors, which allows RMSE to better reflect the model's performance when dealing with extreme errors. The specific formula is as follows:
[0067] The loss metric is primarily used to calculate the difference between the model's outputs and the true label y. It is commonly used during neural network training to evaluate prediction error. The specific formula is as follows:
[0068] The metric is primarily used to evaluate the goodness of fit of a regression algorithm, that is, the model's ability to interpret data and its predictive accuracy. It reflects the accuracy and reliability of the model in describing the relationship between the dependent variable (target variable) and the independent variables (feature variables). The specific formula is:
[0069] in, It is the sum of squared residuals, which is the sum of squares of the differences between the actual observed values and the model predictions; It is the total sum of squares, which is the sum of the squares of the differences between the actual observed values and the average of the observed values.
[0070] This embodiment also provides an automatic drilling and riveting equipment error dynamic control device, used to execute the steps of the automatic drilling and riveting equipment error dynamic control method based on the error mechanism model provided in the above embodiment.
[0071] Furthermore, the terms "upper," "lower," "inner," "outer," "front," and "rear" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention.
[0072] Of course, the above description is only a specific embodiment of the present invention and is not intended to limit the scope of the present invention. All equivalent changes or modifications made to the structure, features and principles described in the claims of the present invention should be included in the scope of the claims of the present invention.
[0073] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A dynamic error control method for automatic drilling and riveting equipment based on an error mechanism model, characterized in that, Includes the following steps: Acquire production data and categorize it based on the causes of errors to construct a processing dataset; A mathematical model is constructed based on the error generation mechanism. The processing dataset is input into the mathematical model, and the optimal parameters affecting the processing quality are obtained based on the principle of minimum parameters. Label the optimal parameters based on processing quality, and combine the labels and optimal parameters into a dataset. An initial model was constructed and trained using the dataset to obtain a predictive model for predicting the processing quality of automated drilling and riveting equipment.
2. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 1, characterized in that, The mathematical model includes a hole-making unit and a riveting unit; The hole-making unit is designed based on the main motion direction of the tool to address the impact of tool wear on machining errors. The riveting unit uses the machining coordinate reference system as the basic reference system to study the influence of riveting force, displacement of the riveting die, and perpendicularity on machining errors.
3. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 1, characterized in that, The preferred parameters include upper riveting die pressure, lower riveting die pressure, presser foot pressure, length gauge, and bore diameter quality.
4. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 3, characterized in that, The aperture quality includes parameters such as power, feed rate, cutting speed, and rotational speed.
5. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 1, characterized in that, The initial model is constructed using a convolutional neural network and an LSTM network, and incorporates a self-attention mechanism.
6. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 1, characterized in that, The initial model includes a data preprocessing module, a multi-scale feature extraction module, a feature fusion module, and a prediction module; The data preprocessing module is used to convert the input production data into a two-dimensional data set; The multi-feature extraction module is used to perform multi-scale feature extraction on the two-dimensional data set to obtain feature vectors corresponding to multiple scales. The feature fusion module is used to fuse feature vectors of multiple scales to obtain fused features; The prediction module makes predictions based on the fused features to obtain prediction results.
7. The method for dynamic error control of automatic drilling and riveting equipment based on an error mechanism model according to claim 1, characterized in that, The processing quality refers to the riveting interference.
8. A dynamic error control device for automatic drilling and riveting equipment, characterized in that, The steps are for performing the automatic drilling and riveting equipment error dynamic control method based on the error mechanism model as described in any one of claims 1 to 7.