A method, system and medium for detecting spatial posture error of a moving part

By combining the data fusion of the IMU module and the electronic level and the BP neural network, the problem of high-precision detection of equipment motion space posture errors in extreme environments is solved, and high-precision posture error detection and compensation of measurement results are achieved.

CN119794884BActive Publication Date: 2025-09-30INST OF MACHINERY MFG TECH CHINA ACAD OF ENG PHYSICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510210786.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-09-30
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

The existing equipment motion space posture error detection method is difficult to perform high-precision measurements in extreme environments such as radiation, confinement, and toxicity, and there is a large cumulative error in direct measurement by the inertial measurement unit.

Method used

The IMU module and electronic level are combined to obtain the posture information of the machine tool moving parts. The error prediction model is established through data fusion and BP neural network. The Kalman filter and beetle whisker search algorithm are used to optimize the weights to achieve high-precision posture error detection.

Benefits of technology

High-precision spatial posture error measurement of moving parts is achieved in extreme environments, which improves the accuracy and precision of the measurement and provides a compensation reference for the measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119794884B_ABST
    Figure CN119794884B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, and medium for detecting the spatial posture error of a moving component. The method comprises the following steps: obtaining posture information of a machine tool moving component based on an IMU module and an electronic level: accelerometer signals and angular velocity signals obtained by the IMU module, and angular error signals obtained by the electronic level; fusing the posture information to obtain linear error and angular error; establishing an error prediction model using a BP neural network based on the linear error, angular error, and the motion speed of the machine tool linear axis; obtaining the optimal initial weights and thresholds of the BP neural network using a longhorn beetle whisker search algorithm, substituting these values ​​into the error prediction model for model training to obtain a trained error prediction model; and performing spatial posture error detection on the moving component based on the trained error prediction model to obtain posture error detection results. The present invention can measure the spatial posture error of equipment motion and improve measurement precision while ensuring accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of sensor detection, and in particular to a method, system and medium for detecting the spatial posture error of a moving part. Background Art

[0002] With the continuous development of modern manufacturing, higher and higher requirements are being placed on the machining accuracy of manufacturing equipment such as CNC machine tools and robots. Many factors affect the machining accuracy of manufacturing equipment, among which the spatial position error of key moving parts of manufacturing equipment is one of the most important factors. Measuring and compensating for the spatial position error of equipment motion is of great significance for improving the performance of manufacturing equipment.

[0003] Currently, there are many methods for detecting the spatial pose errors of equipment motion, including physical benchmark measurement, laser ballbar, orthogonal grating measurement, laser interferometry, and laser tracker measurement. These methods can efficiently and accurately measure the spatial pose errors of manufacturing equipment. However, their implementation requires a large amount of manual operation and adjustment, such as adjusting the laser interferometer optical path mirror group and the adjustment of related inspection fixtures. These methods are also difficult to apply to extreme environments such as radiation, confined areas, and highly toxic environments, as well as to space-constrained application scenarios. In comparison, inertial measurement methods can meet the requirements for miniaturized and unmanned measurement equipment in extreme environments, but direct measurement using an inertial measurement unit (IMU) can produce large cumulative errors.

[0004] In view of this, this application is hereby filed. Summary of the Invention

[0005] The technical problem to be solved by the present invention is the detection method of the existing equipment motion spatial posture error. It is difficult to test the spatial accuracy of intelligent manufacturing equipment in extreme environments such as radiation, confinement, and toxicity, and it is difficult to measure the equipment motion spatial posture error. The purpose of the present invention is to provide a method, system and medium for detecting the spatial posture error of moving parts, which combines the IMU module and the electronic level to obtain the posture information of the moving parts of the machine tool for data fusion, and combines the high dynamic response performance of the gyroscope with the high precision advantage of the electronic level; and establishes a corresponding error prediction model to provide theoretical guidance for the high-precision online measurement of the spatial posture of key moving parts, realize the measurement of the equipment motion spatial posture error, and improve the measurement accuracy while ensuring accuracy.

[0006] The present invention is achieved through the following technical solutions:

[0007] In a first aspect, the present invention provides a method for detecting a spatial posture error of a moving component, the method comprising:

[0008] The position information of the moving parts of the machine tool is obtained based on the IMU module (including an accelerometer and a gyroscope) and an electronic level. The position information includes the accelerometer signal obtained by the accelerometer, the angular velocity signal obtained by the gyroscope, and the angle error signal obtained by the electronic level.

[0009] The pose information is fused to obtain three line errors and two angle errors;

[0010] Considering the two main influencing factors of spatial coordinate position and movement speed, namely based on line value error, angle error and movement speed of the linear axis of the machine tool, BP neural network is used to establish an error prediction model;

[0011] The optimal initial weights and thresholds of the BP neural network are obtained by using the beetle whisker search algorithm, and the optimal initial weights and thresholds are substituted into the error prediction model for model training to obtain a trained error prediction model.

[0012] Based on the trained error prediction model, the spatial posture error of the moving parts is detected to obtain the posture error detection results.

[0013] Furthermore, obtaining the position and posture information of the moving parts of the machine tool refers to obtaining the position and posture information of the moving parts of the machine tool when the linear axes of the machine tool move at different constant movement speeds without load.

[0014] Furthermore, the IMU module is a high-precision MEMS three-axis inertial measurement unit, and the electronic level is an RL-A high-precision angle measurement module.

[0015] Furthermore, the pose information is fused to obtain three line errors and two angle errors, including:

[0016] The accelerometer signals (A) in the linear axis X, Y and Z directions in different time bands are x 、A y and A z ) perform filtering and integration on the corresponding frequency bands respectively to obtain three linear errors; wherein the three linear errors are the three-degree-of-freedom linear errors of the moving parts at different speeds at a specific position of the machine tool;

[0017] According to the accelerometer signal, the initial value of the angle error iteration is determined; based on the Kalman filter algorithm, the angular acceleration signal (ω x 、ω xy ) and the angle error signal (θ x ,θ y ) to perform data fusion calculation and obtain two angle errors (θ X ,θ Y ).

[0018] Furthermore, the angular error includes:

[0019] If it is in the low frequency band, the angle error signal (θ x ,θ y ) as the angle error measurement;

[0020] If it is in the medium and high frequency band, the angular acceleration signal (ω x 、ω xy ) and the angle error signal (θ x ,θ y ) to perform data fusion and obtain the final angle error measurement value after iterative calculation.

[0021] Furthermore, the angle error θ X The calculation is as follows: Based on the Kalman filter algorithm, the angle error θ is obtained X The calculation steps are:

[0022] The calculation result after k iterations of the data fusion algorithm is recorded as θ k The electronic level measurement result is z, and the gyroscope measurement result is u. Bias is the random error of the IMU angle. The measurement noise v is a Gaussian noise distribution with variance R. R is a fixed value derived from the official technical specifications of the RL-A electronic level. The process noise caused by gyroscope drift is represented by the matrix w. F, B, and H are matrices constructed to unify the data dimension.

[0023] x k =Fx k-1 +Bu k-1 +w k-1

[0024] z k =Hx k-1 +v k-1

[0025] H=[1 0]

[0026] set up is the random error x in Kalman filtering k The optimal estimate of the k-1 moment can be obtained by Instead of the real value, to get the next moment x k Predicted value The formula is:

[0027]

[0028] Among them, u k-1 is the measurement result of the gyroscope at time k-1 in the IMU module;

[0029] First try to take a larger diagonal matrix Q as the covariance matrix of the process error w.

[0030]

[0031] If the angle estimate in the subsequent step Start to drift, then increase Q ω If the angle estimate Compared with If the change is too small and the trend is estimated to slow down, reduce Q θ Value. Thus, the diagonal matrix Q is determined, and the predicted value can be obtained The first covariance matrix of the error

[0032]

[0033] According to the Kalman filter algorithm, we can get the first covariance matrix Get the Kalman gain K. Thus the optimal estimate at time k is determined Medium forecast value With the observed value z k The optimal estimate can also be obtained. The second covariance matrix P k .

[0034]

[0035] The Kalman gain is:

[0036]

[0037] According to the second covariance matrix P k And the pose information obtained initially, select the appropriate x k 、P k The initial values ​​x0 and P0 are used to fuse the angular acceleration signal and the angle error signal to obtain the angle error θ X .

[0038] Furthermore, the method further includes: verifying the accuracy of the model, specifically:

[0039] When the spatial position and running speed of the measurement system change, the maximum residual and mean square error of the posture error detection results measured by the verification model are calculated.

[0040] During the design process of the present invention, three methods that can derive specific whitening models, such as BP neural network + longhorn beetle whisker search algorithm, multivariate regression, and BP neural network, were considered to establish an error prediction model, and the maximum residual and mean square error of the posture error detection results measured by each model were verified. It was concluded that the BP neural network + longhorn beetle whisker search algorithm has the best accuracy among the above models.

[0041] In a second aspect, the present invention further provides a system for detecting spatial posture errors of moving parts, the system comprising:

[0042] An acquisition unit is used to acquire the position and posture information of the moving parts of the machine tool based on the IMU module and the electronic level; the position and posture information includes the accelerometer signal and angular velocity signal obtained by the IMU module and the angle error signal obtained by the electronic level;

[0043] The data fusion unit is used to fuse the posture information to obtain three line value errors and two angle errors;

[0044] A model building unit is used to establish an error prediction model using a BP neural network based on the line value error, the angle error and the motion speed of the linear axis of the machine tool;

[0045] The model training unit is used to obtain the optimal initial weights and thresholds of the BP neural network by using a longicorn beard search algorithm, and substitute the optimal initial weights and thresholds into the error prediction model for model training to obtain a trained error prediction model;

[0046] The error detection unit is used to perform spatial posture error detection of the moving parts based on the trained error prediction model to obtain the posture error detection result.

[0047] Furthermore, the data fusion unit includes:

[0048] The first fusion subunit is used to combine the accelerometer signals (A) in the linear axis X, Y and Z directions in different time frequency bands. x 、A y and A z ) perform filtering and integration on the corresponding frequency bands respectively to obtain three linear errors; wherein the three linear errors are the three-degree-of-freedom linear errors of the moving parts at different speeds at a specific position of the machine tool;

[0049] The second fusion subunit is used to determine the initial value of the angle error iteration according to the accelerometer signal; based on the Kalman filter algorithm, the angular acceleration signal (ω x 、ω xy ) and the angle error signal (θ x ,θ y ) to perform data fusion calculation and obtain two angle errors (θ X ,θ Y ).

[0050] In a third aspect, the present invention further provides a computer-readable storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the above-mentioned method for detecting the spatial posture error of a moving part.

[0051] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0052] The present invention provides a method, system and medium for detecting the spatial posture error of a moving part. The method combines an IMU module and an electronic level to obtain the posture information of the moving parts of a machine tool and performs data fusion, thereby combining the high dynamic response performance of a gyroscope with the high precision advantage of an electronic level. A corresponding error prediction model is established to provide theoretical guidance for high-precision online measurement of the spatial posture of key moving parts, realize the measurement of the spatial posture error of equipment movement, and improve the measurement accuracy while ensuring accuracy, which can provide a reference for compensating the spatial posture measurement results of the IMU module-electronic level. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0054] Figure 1 This is a flow chart of a method for detecting spatial posture errors of moving parts according to the present invention;

[0055] Figure 2 This is the curve of X-axis positioning error changing with spatial coordinate position and movement speed;

[0056] Figure 3 is the BP neural network structure diagram, w1 and w2 are the weight matrices from the input layer to the hidden layer and from the hidden layer to the output layer respectively;

[0057] Figure 4 This is the logic flow chart of the BP neural network + longicorn beetle whisker search algorithm;

[0058] Figure 5 Comparison diagram of the error prediction models for each degree of freedom at the same speed and different positions;

[0059] Figure 6 This is a comparison diagram of the error prediction models of each degree of freedom at the same position and different speeds;

[0060] Figure 7 This is a structural block diagram of a moving component spatial posture error detection system of the present invention. DETAILED DESCRIPTION

[0061] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with examples and drawings. The exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention.

[0062] Existing methods for measuring equipment's spatial pose errors require extensive manual manipulation and adjustments, such as adjusting the laser interferometer's optical path mirrors and related fixtures. These methods are also difficult to apply to extreme environments, such as those involving radiation, confined spaces, and highly toxic environments, as well as to space-constrained applications. Inertial measurement methods, by contrast, can meet the demands for miniaturized and unmanned measurement equipment in these extreme environments.

[0063] Direct measurement using an inertial measurement unit (IMU) can produce significant cumulative errors. Therefore, employing a data fusion algorithm and utilizing a high-precision electronic level to correct angle measurement data is crucial for improving measurement accuracy. Simultaneously, establishing a predictive model for the spatial position and orientation errors of moving components allows for error compensation in measurement results and has significant application value in monitoring the degradation of machine tool motion axes.

[0064] Therefore, the present invention combines the IMU module and the electronic level to obtain the posture information of the machine tool moving parts for data fusion, and establishes a corresponding error prediction model to provide theoretical guidance for high-precision online measurement of the spatial posture of key moving parts, realize the measurement of the spatial posture error of equipment movement, and improve the measurement accuracy while ensuring accuracy, which can provide a reference for the compensation of the spatial posture measurement results of the IMU module-electronic level.

[0065] Example 1

[0066] like Figure 1 As shown, the present invention provides a method for detecting spatial posture errors of moving parts, the method comprising:

[0067] Step S0: When the linear axis of the machine tool moves at different constant speeds without load, the position information of the moving parts of the machine tool is obtained based on the IMU module (including accelerometer and gyroscope) and the electronic level; the position information includes the accelerometer signal obtained by the accelerometer, the angular velocity signal obtained by the gyroscope, and the angle error signal obtained by the electronic level; then the error evaluation is performed through the test data obtained by the IMU module in the fixed cycle test during the test. Running at a constant speed can minimize the impact of instantaneous dynamics on the measurement data; and moving at different speeds (v1, v2, v3) is to obtain six-degree-of-freedom motion errors in different frequency bands. The function of the change of the sensor measurement data in different frequency bands over time is subjected to band-pass filtering of the corresponding frequency band, and finally the acceleration signal A is obtained. x,i 、A y,i and A z,i; Angle error signal θ obtained by the electronic level x,i ,θ y,i And the angular velocity signal ω obtained by the gyroscope x,i 、ω y,i .

[0068] In this embodiment, the IMU module is a high-precision MEMS three-axis inertial measurement unit, and the electronic level is an RL-A high-precision angle measurement module.

[0069] Step S1: The accelerometer signals (A) in the linear axis X, Y and Z directions in different time frequency bands are converted into x 、A y and A z ), the angular velocity signal obtained by the gyroscope and the angle error signal obtained by the electronic level are fused to obtain three line value errors and two angle errors;

[0070] For the angle error, in the low frequency band close to 0 Hz, the three accelerometer signals (A) in the linear axis X, Y and Z directions are x 、A y and A z ) and angular error (θ X0 and θ Y0 ) can be expressed as:

[0071]

[0072] Where g is the magnitude of gravitational acceleration;

[0073] In the low frequency band, a x 、a y and a z can be ignored, and the θ obtained at this time is X0 and θ Y0 Can be directly used as the measurement result of angle error θ X and θ Y Due to the slow response speed of the electronic level, the data is not fused with the measurement results of the electronic level.

[0074] In the mid-high frequency band, directly change θ X0 and θ Y0 The measurement result of the angle error is inaccurate and needs to be fused with the measurement result of the electronic level. X As an example, let θ X0 and will be used as x in the Kalman filter algorithm k The initial value x0. k After a sufficient number of iterations of Kalman filtering, the final angle error measurement value is obtained.

[0075] For linear error, the error in representing the translational motion of a linear axis using accelerometer signals arises from the tilt of the linear axis. This acceleration error can be considered as a function of its position along the travel path, f(x). Each accelerometer collects three signals, A1, A2, and A3, corresponding to three motion velocities, v1, v2, and v3. Each signal can be expressed as:

[0076] A n,i -f n (x) = a n,i (t)

[0077] Where n can be X, Y, or Z, indicating the accelerometer in three directions; i can be 1, 2, or 3, indicating the motion signal at three motion speeds. n,i Perform filtering on the corresponding frequency band and then integrate over time to obtain V n,i At the same time, V i,n It is also a function of position V n,i (x). And f n The term (x) is independent of time and can be used to n,i -f n (x)=

[0078] a n,i (t) Transform and eliminate f n (x) term, the net translational acceleration due to the linear axis geometric error can be separated.

[0079]

[0080] Combining the above formula, the net translational acceleration a can be calculated using the IMU measurement data: n,1 (x), a n,2 (x). Then, through integration operation, the three-degree-of-freedom linear error d of the moving parts at different speeds at a specific position of the machine tool can be obtained. n,1 (x), d n,2 (x).

[0081] Step S2: Considering the two main influencing factors of spatial coordinate position and movement speed, that is, based on the line value error, angle error and movement speed of the machine tool linear axis, a BP neural network is used to establish an error prediction model;

[0082] Taking the X-direction line value error as an example, its curve of variation with spatial coordinate position and motion speed is as follows: Figure 2 As shown in Figure 1, it presents the characteristics of multiple influencing factors, non-periodic changes, and complex change patterns. The basic structure of the BP neural network used in this invention is as follows: Figure 3As shown in the figure, the machine tool running speed and spatial position are used as two nodes for training input, the axis geometric error is one output node, the matrices w1 and w2 are the weights of the neural network, and b1 and b2 represent the thresholds. k is the input layer data, u k is the hidden layer data, and y is the output layer data.

[0083]

[0084] The X-axis positioning error measurement solution data d obtained in steps S0 and S1 X As the expected output d of the neural network.

[0085]

[0086] δ=(dy)y(1-y)

[0087] Determine the learning rate η, and get the weight from the hidden layer to the output layer and the threshold adjustment formula:

[0088]

[0089] b2 t+1 =b2 t +η(dy)y(1-y)

[0090] We can further obtain the weights of the input layer and hidden layer and the threshold adjustment formula (0<α<1):

[0091]

[0092] The number of hidden layer nodes n is given by the empirical formula Make sure. s is the number of input layer nodes, y s is the number of nodes in the output layer, and a is a constant between 1 and 10. Substituting different values ​​of p into the BP neural network training process, the results of multiple comparisons are shown in Table 1. It can be seen that when p = 6, the residual sum of squares is minimized, and the BP neural network has the highest prediction accuracy. Table 1 shows the residual sum of squares corresponding to BP neural networks with different numbers of hidden layer nodes. The residual sum of squares is minimized when the number of nodes p = 6.

[0093] Table 1

[0094]

[0095] Step S3: using a longicorn beard search algorithm to obtain the optimal initial weights and thresholds of the BP neural network, and substituting the optimal initial weights and thresholds into the error prediction model for model training to obtain a trained error prediction model;

[0096] The process of step S3 is as follows:

[0097] First, we need to set the maximum number of iterations maxgen, the step size factor eta, the initial step size step, the distance between the two whiskers l, the optimized spatial dimension D, and create a random vector in the target direction of the whiskers and perform input normalization.

[0098]

[0099] Where D represents the spatial dimension and rands represents the random value.

[0100] Determine the spatial position of the left and right whiskers of the longicorn:

[0101]

[0102] Where, X r is the position of the right antenna at the tth iteration; X l is the position of the left antenna at the tth iteration; X t is the coordinate of the centroid of the longhorn beetle at the tth iteration; l is the distance between the left and right antennae of the longhorn beetle.

[0103] The fitness function is used to identify the food odor concentration on both sides of the longhorn beetle's left and right antennae and compare the food odor intensity of the two antennae. The fitness function is:

[0104]

[0105] Where N is the number of training samples; t sim(i) is the model prediction value for the i-th sample; y i is the actual value of the i-th sample.

[0106] The variable step size method is used to iteratively update the position of the longicorn, and the following is obtained:

[0107] X t+1 =X t -eta t ×d×sign(Smell left -Smell right )

[0108] Where, eta t is the step size factor at the tth iteration; sign() is the sign function.

[0109] Determine whether the algorithm termination conditions are met: If so, terminate the algorithm and output the optimal position of the longicorn, that is, the optimal initial weights and thresholds of the BP neural network. Substitute these values ​​into the neural network for continued training and learning, establishing a whitening model for the on-machine measurement system error prediction. Otherwise, return to step S2 to continue searching.

[0110] Neural network learning normalizes the input data, and the function from the input layer to the hidden layer is:

[0111]

[0112] Function calculation from hidden layer to output layer:

[0113] purelin(n)=n

[0114] So the output function of the BAS-BP neural network is:

[0115] y=purelin(ω2×tansig(ω1×x+b1)+b2)

[0116] Where ω1 and ω2 are the neural network weights; b1 and b2 are the neural network thresholds; x is the input variable; and y is the desired output.

[0117] Input normalization and output denormalization, the value range of tansig(n) is between (-1,1). In order to maintain the identity of the training input data, normalization training is performed:

[0118]

[0119] Where t is the input data; t1 is the normalized input; amax and amin are the maximum and minimum values ​​of the original input data, respectively.

[0120] After the input data is normalized for training, the expected output needs to be denormalized:

[0121]

[0122] The linear motion axis geometric error prediction model based on the beetle whisker search algorithm (i.e. the trained error prediction model) can be obtained. The overall process is as follows Figure 4 shown.

[0123] Step S4: Based on the trained error prediction model, perform spatial posture error detection and model verification of the moving parts.

[0124] Taking the X-axis multi-item geometric errors as an example, an error prediction model was established using three methods that can derive specific whitening models: multivariate regression, BP neural network, and BP neural network combined with a beetle whisker search algorithm (i.e., BAS-BP neural network or BAS-BP model). The three linear errors of the on-machine geometric errors measured in this invention are expressed in microns, and the angular errors are expressed in arc seconds.

[0125] Adopt BP neural network and BP neural network + beetle whisker search algorithm to carry out prediction modeling to the single geometric error of X axis, determine that the training number of neural network algorithm parameters BP and BP neural network + beetle whisker search algorithm is all 3000 times, learning rate is 0.1, and training target is 0.001. The maximum number of iterations maxgen of BP neural network + beetle whisker search algorithm is 100, step length and initial distance proportional factor ratio=5, get eta=0.8, initial step length step=5. Because the neural network adopted in the present invention is all 2-6-1 three-layer structure, so spatial dimension D=2×6+6×1+6+1=25. With the spatial coordinate position and running speed of X axis as input variables, machine tool geometric error is as output.

[0126] When comparing the influence of the spatial coordinate position of the machine tool on the error modeling, 41 sample error data at different positions with a speed of v = 10 mm / s and a machine tool stroke within (0 to 200) mm are used as the test set, and a total of 369 samples of geometric errors at the other 9 speeds are used as the training set. Similarly, when considering the influence of the machine tool running speed, 10 samples with a machine tool movement speed of v = 1 mm / s, 3 mm / s, 5 mm / s, 8 mm / s, 10 mm / s, 12 mm / s, 14 mm / s, 16 mm / s, 18 mm / s, and 20 mm / s when X = 100 mm are used as the test set, and 400 samples corresponding to the 10 speeds at the other 40 positions are used as the test set. The modeling results are shown in Figure 2. Figure 5 and Figure 6 The mean squared error (MSE) and maximum residual of the prediction model are shown in Tables 2 and 3, respectively. Tables 2 and 3 show the maximum residual and MSE of the error models established by each algorithm at different speeds and positions. In both cases, the data show that the BAS-BP neural network algorithm established the most accurate error model. For both the same speed but different positions, and the same position but different speeds, the BP neural network combined with the longicorn search algorithm achieved the highest modeling accuracy. The maximum MSE was 0.7153 μm at different spatial positions; the maximum residual was only 1.3675 μm at different speeds, and the maximum MSE was 0.4462 μm.

[0127] Table 2

[0128]

[0129] Table 3

[0130]

[0131] The present invention uses an IMU module and an electronic level to jointly obtain the position and posture information of the moving parts of a machine tool; realizes data fusion of the measurement data of each sensor at different movement speeds, and solves the six-degree-of-freedom errors of the moving parts; trains a BP neural network based on the solved data, and establishes a prediction model for each degree of freedom error with spatial coordinate position and movement speed as influencing factors; adopts a beetle whisker search algorithm to optimize the initial weights and thresholds of the BP neural network; establishes a high-precision BAS-BP model and verifies it. This method is based on the cutting-edge MEMS three-axis IMU in the current commercial field, and the RL-A high-precision angle measurement module, and combines the high dynamic response performance of the gyroscope with the high-precision advantage of the electronic level through a data fusion algorithm. The BAS-BP neural network error model established by this method has the highest accuracy among the three commonly used methods for deriving specific whitening models, can achieve relatively accurate error measurement, and can provide a reference for the compensation of the spatial position and posture measurement results of the IMU module-electronic level.

[0132] Example 2

[0133] like Figure 7 As shown, the difference between this embodiment and embodiment 1 is that this embodiment provides a moving part spatial posture error detection system, which corresponds one-to-one to a moving part spatial posture error detection method in embodiment 1; the system includes:

[0134] An acquisition unit is used to acquire the position and posture information of the moving parts of the machine tool based on the IMU module and the electronic level; the position and posture information includes the accelerometer signal and angular velocity signal obtained by the IMU module and the angle error signal obtained by the electronic level;

[0135] The data fusion unit is used to fuse the posture information to obtain three line value errors and two angle errors;

[0136] A model building unit is used to establish an error prediction model using a BP neural network based on the line value error, the angle error and the motion speed of the linear axis of the machine tool;

[0137] The model training unit is used to obtain the optimal initial weights and thresholds of the BP neural network by using a longicorn beard search algorithm, and substitute the optimal initial weights and thresholds into the error prediction model for model training to obtain a trained error prediction model;

[0138] The error detection unit is used to perform spatial posture error detection of the moving parts based on the trained error prediction model to obtain the posture error detection result.

[0139] As a further implementation, the data fusion unit includes:

[0140] The first fusion subunit is used to combine the accelerometer signals (A) in the linear axis X, Y and Z directions in different time frequency bands. x 、A y and A z ) perform filtering and integration on the corresponding frequency bands respectively to obtain three linear errors; wherein the three linear errors are the three-degree-of-freedom linear errors of the moving parts at different speeds at a specific position of the machine tool;

[0141] The second fusion subunit is used to determine the initial value of the angle error iteration according to the accelerometer signal; based on the Kalman filter algorithm, the angular acceleration signal (ω x 、ω xy ) and the angle error signal (θ x ,θ y ) to perform data fusion calculation and obtain two angle errors (θ X ,θ Y ).

[0142] Among them, the execution process of each unit can be performed according to the process steps of a moving component spatial posture error detection method in Example 1, and will not be repeated one by one in this embodiment.

[0143] At the same time, the present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned method for detecting the spatial posture error of a moving part.

[0144] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0145] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0148] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting spatial posture errors of moving parts, characterized in that: The method includes: Acquire the posture information of the moving parts of the machine tool based on the IMU module and the electronic level; the posture information includes the accelerometer signal and angular velocity signal acquired by the IMU module and the angle error signal acquired by the electronic level; Performing data fusion on the posture information to obtain line value error and angle error; Based on the line value error, the angle error and the motion speed of the linear axis of the machine tool, a BP neural network is used to establish an error prediction model; Using a longicorn beard search algorithm to obtain the optimal initial weights and thresholds of a BP neural network, and substituting the optimal initial weights and thresholds into the error prediction model for model training to obtain a trained error prediction model; Based on the trained error prediction model, the spatial posture error of the moving parts is detected to obtain the posture error detection results; The acquisition of the posture information includes: When the linear axis of a machine tool moves at different constant speeds without load, the position information of the machine tool's moving parts is obtained based on the IMU module and electronic level; the IMU module contains an accelerometer and a gyroscope; The pose information is subjected to data fusion to obtain line value error and angle error, including: The accelerometer signals in the X, Y, and Z directions of the linear axes in different time frequency bands are filtered and integrated in the corresponding frequency bands to obtain three linear errors; wherein the three linear errors are the three-degree-of-freedom linear errors when the moving part is at a predetermined position of the machine tool at different speeds; Determine an initial value of the angle error iteration based on the accelerometer signal; perform data fusion calculation on the angular velocity signal and the angle error signal based on a Kalman filter algorithm to obtain two angle errors; Based on the Kalman filter algorithm, the angle error θ is obtained X The calculation steps are: Step A, set is the random error x in Kalman filtering k The optimal estimate of the k-1 moment Instead of the real value, get the next moment x k Predicted value Among them, F and B are matrices constructed to unify the data dimension; u k-1 is the measurement result of the gyroscope at time k-1 in the IMU module; Step B, determine the diagonal matrix Q as the covariance matrix of the process error w, and obtain the predicted value The first covariance matrix of the error Step C, based on the Kalman filter algorithm, according to the first covariance matrix Get the Kalman gain K; Step D: Determine the optimal estimate at time k based on the Kalman gain K Medium forecast value With the observed value z k The proportion of The second covariance matrix P k ; Step E, according to the second covariance matrix P k , the angular acceleration signal and the angle error signal are fused to obtain the angle error θ X .

2. A method for detecting spatial posture errors of a moving part according to claim 1, characterized in that: The IMU module is a high-precision MEMS three-axis inertial measurement unit, and the electronic level is an RL-A high-precision angle measurement module.

3. A method for detecting spatial posture errors of moving parts according to claim 1, characterized in that: The angular error includes: If it is within the low frequency band, the angle error signal is directly used as the angle error measurement value; If it is within the medium and high frequency bands, the angular acceleration signal and the angle error signal are fused and the final angle error measurement value is obtained after iterative calculation.

4. A method for detecting spatial posture errors of a moving part according to claim 1, characterized in that: The method further includes: verifying the accuracy of the model, specifically: When the spatial position and running speed of the measurement system change, the maximum residual and mean square error of the posture error detection results measured by the verification model are calculated.

5. A system for detecting spatial posture errors of moving parts, characterized in that: The system includes: An acquisition unit, configured to acquire position information of a moving part of a machine tool based on an IMU module and an electronic level; the position information includes an accelerometer signal and an angular velocity signal acquired by the IMU module and an angle error signal acquired by the electronic level; A data fusion unit, configured to fuse the posture information to obtain a line error and an angle error; A model building unit is used to establish an error prediction model using a BP neural network based on the line value error, the angle error and the motion speed of the linear axis of the machine tool; A model training unit is used to obtain the optimal initial weights and thresholds of the BP neural network using a longicorn beard search algorithm, and substitute the optimal initial weights and thresholds into the error prediction model for model training to obtain a trained error prediction model; An error detection unit is used to detect the spatial posture error of the moving parts based on the trained error prediction model to obtain the posture error detection result; The acquisition of the posture information includes: When a machine tool linear axis moves at different constant speeds without load, the position information of the machine tool moving parts is obtained based on an IMU module and an electronic level; the IMU module includes an accelerometer and a gyroscope; and the data fusion unit includes: The first fusion subunit is used to filter and integrate the accelerometer signals in the X, Y, and Z directions of the linear axis in different time frequency bands in the corresponding frequency bands to obtain three linear errors; wherein the three linear errors are the three-degree-of-freedom linear errors when the moving part is at a predetermined position of the machine tool at different speeds; The second fusion subunit is configured to determine an initial value of the angle error iteration according to the accelerometer signal; perform data fusion calculation on the angular velocity signal and the angle error signal based on a Kalman filter algorithm to obtain two angle errors; Based on the Kalman filter algorithm, the angle error θ is obtained X The calculation steps are: Step A, set is the random error x in Kalman filtering k The optimal estimate of the k-1 moment Instead of the real value, get the next moment x k Predicted value Among them, F and B are matrices constructed to unify the data dimension; u k-1 is the measurement result of the gyroscope at time k-1 in the IMU module; Step B, determine the diagonal matrix Q as the covariance matrix of the process error w, and obtain the predicted value The first covariance matrix of the error Step C, based on the Kalman filter algorithm, according to the first covariance matrix Get the Kalman gain K; Step D: Determine the optimal estimate at time k based on the Kalman gain K Medium forecast value With the observed value z k The proportion of The second covariance matrix P k ; Step E, according to the second covariance matrix P k , the angular acceleration signal and the angle error signal are fused to obtain the angle error θ X .

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a method for detecting a spatial posture error of a moving component as described in any one of claims 1 to 4 is implemented.