Linear motor balancing device control method and system based on positioning compensation

By collecting the balanced characteristic parameters of Z-axis motors in real time and using machine learning models to predict spring tension and elongation, the problem that the Z-axis motor balance system in the prior art cannot respond quickly to dynamic changes, achieving higher positioning accuracy and balance stability.

CN119652204AActive Publication Date: 2025-03-18WINTOP DONGGUAN IND TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510162555.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-03-18
Estimated Expiration
2045-02-14

AI Technical Summary

Technical Problem

The existing Z-axis motor balancing device control system cannot quickly respond to dynamic changes caused by load changes or acceleration/deceleration during operation of the motor, resulting in reduced positioning accuracy or lag in the balance system, especially in high-speed machining or frequent speed changes, which is difficult to maintain a stable state.

Method used

The linear motor balancing device control method based on positioning compensation is adopted. By collecting the balance characteristic parameters of the Z-axis motor in real time, the pre-constructed machine learning model is used to predict the spring tension and spring elongation amount, and a spring elongation amount adjustment command is generated to realize real-time automatic adjustment of the spring tension and elongation amount.

Benefits of technology

It realizes accurate prediction and automatic adjustment of the spring tension required by Z-axis motor, enhances the adaptability of the balance system, reduces the impact and oscillation of the motor movement, and improves positioning accuracy and balance stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652204A_ABST
    Figure CN119652204A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Z-axis motor balancing, in particular to a linear motor balancing device control method and system.The linear motor balancing device is used for balancing the weight of a Z-axis motor and comprises a supporting electric cylinder, and a connecting frame is installed at the top end of the supporting electric cylinder; and a plurality of springs are connected between the connecting frame and the Z-axis motor. According to the method, the spring tension is predicted based on the trained first machine learning model by collecting the real-time balance characteristic parameters, the external temperature, the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor are comprehensively considered, the prediction accuracy is guaranteed, real-time collection and real-time feedback are carried out, and the prediction accuracy is improved. The tension of the spring can be automatically adjusted according to the external environment (such as temperature change) and the working state (such as acceleration and load), the self-adaptive capacity is high, and the device adapts to complex and variable working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Z-axis motor balancing, and in particular to a linear motor balancing device control method and system based on positioning compensation. Background Art

[0002] When the Z-axis motor moves, it will be affected by gravity and tend to move downward. In order to keep the Z-axis motor in a certain position, a device will be provided to offset the gravity of the Z-axis motor. The current offset methods are: Method 1: Use a pulley to balance the weight of the load by hanging heavy objects; Method 2: Use the compression characteristics of the spring to balance the load. Method 1 takes up a large space, and it is difficult to control the motor output to balance the load and counterweight due to inertia during acceleration and deceleration. Method 2 has a simple structure, takes up little space, and is easier to implement;

[0003] However, it was found during use that the spring tension changes proportionally with the stroke. The spring tension changes throughout the entire stroke range, and it is not easy for the driver to accurately control the spring tension. Secondly, the Z-axis motor will be affected by gravity and movement acceleration when moving and have different downward movement tendencies. That is, the existing balancing device control system usually operates with fixed parameters or simple feedback, and cannot quickly respond to dynamic changes of the Z-axis motor caused by load changes or acceleration / deceleration during operation, resulting in reduced positioning accuracy or lag of the balancing system. Especially under high-speed processing or frequent speed changes, it is difficult to maintain a stable state. Disclosed is a linear motor balancing device control method and system based on positioning compensation. Summary of the invention

[0004] In order to solve the above problems, the present invention provides a linear motor balancing device control method and system based on positioning compensation.

[0005] The present invention adopts the following technical scheme, a control method of a linear motor balancing device based on positioning compensation, the balancing device is used to balance the weight of the Z-axis motor, the balancing device includes a supporting electric cylinder, a connecting frame is installed on the top of the supporting electric cylinder, and a plurality of springs are connected between the connecting frame and the Z-axis motor. The control method includes:

[0006] Step S01: collecting balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include the Z-axis balance coefficient and the external temperature;

[0007] Step S02: inputting the collected balance characteristic parameters into a pre-built first machine learning model to output the comprehensive spring tension;

[0008] Step S03: inputting the comprehensive spring tension and the spring elongation coefficient into a pre-built second machine learning model, and outputting the spring elongation, which is recorded as the predicted spring elongation;

[0009] Step S04: Collect the real-time spring length, subtract the initial length of the spring, obtain the real-time spring elongation, compare and analyze the real-time spring elongation with the predicted spring elongation, and generate a spring elongation adjustment instruction.

[0010] As a further description of the above technical solution: a plurality of springs are provided, and the plurality of springs are arranged in parallel.

[0011] As a further description of the above technical solution: the parameters affecting the Z-axis balance coefficient include the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor;

[0012] The method for obtaining the Z-axis balance coefficient is: performing weighted calculation on the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor to obtain the Z-axis balance coefficient.

[0013] As a further description of the above technical solution: the first machine learning model includes 1 input layer, 2 convolutional layers, 2 pooling layers, 1 RNN layer and 2 fully connected layers; the number of neurons in the input layer is 5; the 2 convolutional layers include the first convolutional layer and the second convolutional layer, the convolution kernel sizes of the first convolutional layer and the second convolutional layer are both 3×3, the activation functions are both ReLU, the step sizes are both 1, the margins are both 0, the number of convolution kernels of the first convolutional layer is 32, and the number of convolution kernels of the second convolutional layer is 64; the 2 pooling layers include the first pooling layer and the second pooling layer, the 2 pooling layers have the same structure, the window size is both 2×2, and the pooling method adopts the maximum pooling method, that is, within the pooling window In the mouth, only the maximum value is taken as the feature value of the corresponding position of the window after pooling; the RNN layer includes 64 LSTM units, 64 input channels and 64 output channels; the LSTM unit includes 5 components, including input gate, forget gate, cell state, output gate and hidden state; the time step number of the input channel of the RNN layer is 1; RNN is equipped with a random attenuation mechanism, and the random attenuation probability is 0.2; the two fully connected layers include the first fully connected layer and the second fully connected layer; the first fully connected layer includes 128 neurons, and the activation function is ReLU; the second fully connected layer includes 1 neuron, which outputs the comprehensive spring tension as the final output, where the comprehensive spring tension The regression calculation formula is:

[0014] ;

[0015] In the formula, is the weight of the second fully connected layer, is the bias value of the second fully connected layer; is a three-dimensional tensor.

[0016] As a further description of the above technical solution: the training method of the first machine learning model includes:

[0017] Get i groups of historical training data, divide the i groups of historical training data into training set and validation set, and the training set has Set historical training data, including balance feature parameters and comprehensive spring tension, and initialize the weight parameter set of all layers and the set of bias parameters for all layers , forward propagation calculates the predicted value , the actual integrated spring tension is set to , calculate the loss function The formula is:

[0018] ;

[0019] In the formula Indicates The actual integrated spring tension in the group's historical training data, Indicates The predicted composite spring tension from the historical training data, Represents the group number of historical training data, ≤A; Back propagation calculates the gradient, and the formula for updating parameters using the gradient descent method includes:

[0020] ;

[0021] ;

[0022] In the formula, Represents the learning rate, which is the preset value; express The gradient of express The gradient of Represents the updated weight parameter set ; Represents the updated bias parameter set ;

[0023] Repeatedly calculate and update parameters until Until convergence, the model training is completed.

[0024] As a further description of the above technical solution: the parameters affecting the spring elongation coefficient include the stiffness of the spring, the number of parallel springs and the initial length of the spring;

[0025] The method for obtaining the spring elongation coefficient is: performing a weighted operation on the stiffness of the spring, the number of parallel springs and the initial length of the spring to obtain the Z-axis balance coefficient.

[0026] As a further description of the above technical solution: the method for constructing the second machine learning model includes:

[0027] Initialize the second machine learning model structure. The second machine learning model structure adopts an MLP type multi-layer forward network structure. The MLP type multi-layer forward network structure includes three input layers, two hidden layers and an output layer. The input layer includes the first input layer, the second input layer and the third input layer. The number of nodes in the first input layer is 2, corresponding to the Z-axis balance coefficient and the external temperature in the balance characteristic parameters respectively. The second input layer is node 1, and node 1 is the comprehensive spring tension. The third input layer is node 11, and node 11 is the spring elongation coefficient. The hidden layer includes the first hidden layer and the second hidden layer. The number of nodes in the first hidden layer is 128, and the ReLU function is used as the activation function. The number of nodes in the second hidden layer is 64, and the ReLU function is used as the activation function. The output layer is the first output layer, and the first output layer is node 1, and node 1 is the predicted spring elongation.

[0028] After initializing the second machine learning model structure, the second machine learning model is trained using the comprehensive spring tension and spring elongation coefficient as well as the spring elongation corresponding to the comprehensive spring tension and spring elongation coefficient. The optimizer is Adam, the loss function is the MSE loss function, the batch size is set to 32, the number of iterations is 200, and the training is terminated when the loss function converges.

[0029] As a further description of the above technical solution: the second machine learning model training method includes:

[0030] Convert the comprehensive spring tension and spring elongation coefficient into a corresponding set of eigenvectors;

[0031] The comprehensive spring tension and spring elongation coefficient are used as input of the second machine learning model, the second machine learning model takes the spring elongation corresponding to each set of comprehensive spring tension and spring elongation coefficient as output, takes the spring elongation actually corresponding to each set of comprehensive spring tension and spring elongation coefficient as prediction target, and takes minimizing the loss function value of the second machine learning model as training target; training stops when the loss function value of the second machine learning model is less than or equal to the preset target loss value.

[0032] As a further description of the above technical solution: the method of comparing and analyzing the real-time spring elongation with the predicted spring elongation to generate a spring elongation adjustment instruction includes:

[0033] The difference between the real-time spring elongation and the predicted spring elongation is obtained and recorded as the length decay value. A spring elongation adjustment instruction is generated based on the length decay value. The length of the length decay value corresponding to the extension and retraction of the support electric cylinder is controlled based on the spring elongation adjustment instruction, so that the real-time spring elongation is equal to the predicted spring elongation.

[0034] A linear motor balancing device control system based on positioning compensation, used to implement a linear motor balancing device control method based on positioning compensation, comprising:

[0035] A data acquisition module collects balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include a Z-axis balance coefficient and an external temperature;

[0036] a first data analysis module, inputting the collected balance characteristic parameters into a pre-built first machine learning model, and outputting a comprehensive spring tension;

[0037] A second data analysis module inputs the comprehensive spring tension and the spring elongation coefficient into a pre-built second machine learning model, and outputs the spring elongation, which is recorded as the predicted spring elongation;

[0038] The data processing module collects the real-time spring length, subtracts the initial length of the spring, obtains the real-time spring elongation, compares and analyzes the real-time spring elongation with the predicted spring elongation, and generates a spring elongation adjustment instruction.

[0039] Beneficial effects:

[0040] The present invention provides a linear motor balancing device control method and system based on positioning compensation. By collecting real-time balancing characteristic parameters, the spring tension is predicted based on the trained first machine learning model, that is, the spring tension required for balancing the Z-axis motor is automatically predicted in real time based on the real-time collected external temperature, the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor. The method comprehensively considers the external temperature, the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor to ensure the accuracy of the prediction, and performs real-time collection and real-time feedback to realize the automatic adjustment of the spring tension according to the external environment (such as temperature changes) and working conditions (such as acceleration, load). The method has strong adaptive ability and can adapt to complex and multi-faceted situations. The working conditions are changed, the impact and vibration of the Z-axis motor movement are reduced, and the spring elongation coefficient is further obtained, and the spring elongation coefficient and the predicted comprehensive spring tension are input into the pre-built second machine learning model for predicting the spring elongation to obtain the spring elongation, thereby directly outputting the spring elongation, and then the real-time spring length based on the driver control is collected to obtain the real-time spring elongation, the real-time spring elongation is compared and analyzed with the predicted spring elongation, and a spring elongation adjustment instruction is generated to adjust the spring elongation, so as to realize real-time monitoring and adjustment of the spring elongation, so that the Z-axis motor can maintain the best load balance during the working process, reduce the impact and vibration of the Z-axis motor movement, and extend the service life of the Z-axis motor. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The present invention will be further explained below in conjunction with the accompanying drawings and embodiments:

[0042] Figure 1 A structural schematic diagram of a balancing device is provided for an embodiment of the present invention;

[0043] Figure 2 A flow chart of a linear motor balancing device control method based on positioning compensation provided by an embodiment of the present invention;

[0044] Figure 3 A module connection diagram of a linear motor balancing device control system based on positioning compensation provided in an embodiment of the present invention.

[0045] In the figure: 1. Supporting electric cylinder; 2. Connecting frame; 3. Spring. DETAILED DESCRIPTION

[0046] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the present invention is further described below with reference to specific diagrams. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0047] Example 1

[0048] See also Figure 1-Figure 2 The embodiment of the present invention provides a technical solution: a control method of a linear motor balancing device based on positioning compensation, wherein the balancing device is used to balance the weight of a Z-axis motor, and the balancing device comprises a supporting electric cylinder 1, a connecting frame 2 is installed on the top of the supporting electric cylinder 1, and a spring 3 is connected between the connecting frame 2 and the Z-axis motor. There are a plurality of springs 3, and the plurality of springs 3 are arranged in parallel. The control method comprises:

[0049] Step S01: collecting balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include the Z-axis balance coefficient and the external temperature.

[0050] It should be noted that temperature changes will affect the stiffness of the spring 3. When the temperature rises, the elastic modulus of the spring 3 will decrease, resulting in a decrease in its tension; conversely, when the temperature decreases, the stiffness of the spring 3 will increase, and the tension will increase.

[0051] The parameters affecting the Z-axis balance coefficient include the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor;

[0052] It should be noted that the mass of the Z-axis motor itself also affects the tension. The heavier the Z-axis motor is, the greater the tension of the spring 3 is required to balance its gravity, and vice versa.

[0053] When the Z-axis motor accelerates, the inertia force increases, and a higher tension of spring 3 is required to maintain balance. The inertia force during deceleration is opposite to the inertia force during acceleration. Therefore, the tension requirement of spring 3 will be reduced, and it needs to be adjusted to a lower tension to maintain balance.

[0054] The heavier the load of the Z-axis motor, the greater the required tension of the spring 3, and vice versa.

[0055] The method for obtaining the Z-axis balance coefficient is: performing weighted calculation on the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor to obtain the Z-axis balance coefficient.

[0056] It should be noted that the calculation formula of the Z-axis balance coefficient is:

[0057] ;

[0058] In the formula, is the Z-axis balance coefficient of the Z-axis motor, is the weight of the Z-axis motor, is the acceleration of the Z-axis motor, is the load of the Z-axis motor, , and is the weight coefficient, , and Both are greater than 0.

[0059] It should be noted that the value of the weight coefficient is generally determined by technical personnel in this field according to actual conditions. The size of the weight coefficient is a specific numerical value obtained by quantifying each parameter. In order to facilitate subsequent comparison, the size of the coefficient is not unique, as long as it does not affect the proportional relationship between the parameter and the quantized value.

[0060] Step S02: inputting the collected balance characteristic parameters into a pre-built first machine learning model, and outputting the comprehensive spring 3 tension;

[0061] The first machine learning model includes 1 input layer, 2 convolutional layers, 2 pooling layers, 1 RNN layer and 2 fully connected layers; the number of neurons in the input layer is 5; the 2 convolutional layers include the first convolutional layer and the second convolutional layer, the convolution kernel size of the first convolutional layer and the second convolutional layer is 3×3, the activation function is ReLU, the step size is 1, the margin is 0, the number of convolution kernels of the first convolutional layer is 32, and the number of convolution kernels of the second convolutional layer is 64; the 2 pooling layers include the first pooling layer and the second pooling layer, the two pooling layers have the same structure, the window size is 2×2, and the pooling method adopts the maximum pooling method, that is, only the maximum value is taken within the pooling window. is the feature value of the corresponding position of the window after pooling; the RNN layer includes 64 LSTM units, 64 input channels and 64 output channels; the LSTM unit includes 5 components, including input gate, forget gate, cell state, output gate and hidden state; the time step number of the input channel of the RNN layer is 1; RNN is equipped with a random attenuation mechanism, and the random attenuation probability is 0.2; the two fully connected layers include the first fully connected layer and the second fully connected layer; the first fully connected layer includes 128 neurons, and the activation function is ReLU; the second fully connected layer includes 1 neuron, which is the final output and outputs the comprehensive spring 3 tension, where the comprehensive spring 3 tension The regression calculation formula is:

[0062] ;

[0063] In the formula, is the weight of the second fully connected layer, is the bias value of the second fully connected layer; is a three-dimensional tensor.

[0064] The training method of the first machine learning model includes:

[0065] Get i groups of historical training data, divide the i groups of historical training data into training set and validation set, and the training set has Set historical training data, including balance feature parameters and comprehensive spring 3 tension, and initialize the weight parameter set of all layers and the set of bias parameters for all layers , forward propagation calculates the predicted value , the actual combined spring 3 tension is set to , calculate the loss function The formula is:

[0066] ;

[0067] In the formula Indicates The actual integrated spring 3 tension in the group's historical training data, Indicates The predicted composite spring 3 tension from the historical training data, Represents the group number of historical training data, ≤A; Back propagation calculates the gradient, and the formula for updating parameters using the gradient descent method includes:

[0068] ;

[0069] ;

[0070] In the formula, Represents the learning rate, which is the preset value; express The gradient of express The gradient of Represents the updated weight parameter set ; Represents the updated bias parameter set ;

[0071] It should be noted that the formula for updating parameters of the gradient descent method is in computer language.

[0072] Repeatedly calculate and update parameters until Until convergence, the model training is completed.

[0073] Step S03: inputting the comprehensive spring 3 tension and the spring 3 elongation coefficient into the pre-built second machine learning model, and outputting the spring 3 elongation, which is recorded as the predicted spring 3 elongation;

[0074] The parameters affecting the elongation coefficient of the spring 3 include the stiffness of the spring 3, the number of parallel springs 3 and the initial length of the spring 3;

[0075] The method for obtaining the elongation coefficient of the spring 3 is: performing a weighted operation on the stiffness of the spring 3, the number of parallel springs 3 and the initial length of the spring 3 to obtain the Z-axis balance coefficient.

[0076] The method for constructing the second machine learning model includes:

[0077] Initialize the second machine learning model structure. The second machine learning model structure adopts an MLP type multi-layer forward network structure. The MLP type multi-layer forward network structure includes three input layers, two hidden layers and an output layer. The input layer includes the first input layer, the second input layer and the third input layer. The number of nodes in the first input layer is 2, which correspond to the Z-axis balance coefficient and the external temperature in the balance characteristic parameters respectively. The second input layer is node 1, and node 1 is the comprehensive spring 3 tension. The third input layer is node 11, and node 11 is the spring 3 elongation coefficient. The hidden layer includes the first hidden layer and the second hidden layer. The number of nodes in the first hidden layer is 128, and the ReLU function is used as the activation function. The number of nodes in the second hidden layer is 64, and the ReLU function is used as the activation function. The output layer is the first output layer, and the first output layer is node 1, and node 1 is the predicted spring 3 elongation.

[0078] After initializing the second machine learning model structure, the second machine learning model is trained using the comprehensive spring 3 tension and spring 3 elongation coefficient and the spring 3 elongation corresponding to the comprehensive spring 3 tension and spring 3 elongation coefficient. The optimizer is Adam, the loss function is the MSE loss function, the batch size is set to 32, the number of iterations is 200 rounds, and the training is ended when the loss function converges.

[0079] The second machine learning model training method comprises:

[0080] Convert the comprehensive spring 3 tension and spring 3 elongation coefficient into a corresponding set of eigenvectors;

[0081] The comprehensive spring 3 tension and spring 3 elongation coefficient are used as inputs of the second machine learning model, the second machine learning model takes the spring 3 elongation corresponding to each set of comprehensive spring 3 tension and spring 3 elongation coefficient as output, takes the spring 3 elongation actually corresponding to each set of comprehensive spring 3 tension and spring 3 elongation coefficient as prediction target, and takes minimizing the loss function value of the second machine learning model as training target; training stops when the loss function value of the second machine learning model is less than or equal to the preset target loss value.

[0082] The loss function value of the second machine learning model is mean square error;

[0083] Mean square error is one of the commonly used loss functions. By transforming the loss function formula Minimization is used to train the model so that the machine learning model can better fit the data, thereby improving the performance and accuracy of the model.

[0084] In the loss function is the loss function value of the second machine learning model, x is the feature vector group number; e is the number of feature vector groups; is the elongation of spring 3 output by the second machine learning model corresponding to the xth set of feature vectors, is the actual elongation of spring 3 corresponding to the xth group of eigenvectors.

[0085] It is particularly noteworthy that the optimal decision control group of the initial sample of spring 3 elongation corresponding to the comprehensive spring 3 tension and spring 3 elongation coefficient is obtained by manually making the optimal decision and recording it after manual experiments. At this stage, the initial stage of decision-making training data requires manual decision-making. Machine learning is the result of logical judgment and classification summary based on manual decision-making. The most typical example is the manually labeled data involved in the big data feeding of gpt.

[0086] Step S04: Collect the real-time length of the spring 3, subtract the initial length of the spring 3, obtain the real-time elongation of the spring 3, compare and analyze the real-time elongation of the spring 3 with the predicted elongation of the spring 3, and generate a spring elongation adjustment instruction.

[0087] The method of comparing and analyzing the obtained real-time elongation of the spring 3 with the predicted elongation of the spring 3 to generate a spring elongation adjustment instruction includes:

[0088] The difference between the real-time elongation of spring 3 and the predicted elongation of spring 3 is obtained and recorded as the length decay value. A spring elongation adjustment instruction is generated based on the length decay value. Based on the spring elongation adjustment instruction, the length of the length decay value corresponding to the extension and retraction of the support electric cylinder 1 is controlled so that the real-time elongation of spring 3 is equal to the predicted elongation of spring 3.

[0089] Example 2

[0090] A linear motor balancing device control system based on positioning compensation, used to implement a linear motor balancing device control method based on positioning compensation, comprising:

[0091] A data acquisition module collects balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include a Z-axis balance coefficient and an external temperature;

[0092] A first data analysis module inputs the collected balance characteristic parameters into a pre-built first machine learning model and outputs the comprehensive spring 3 tension;

[0093] The second data analysis module inputs the comprehensive spring 3 tension and the spring 3 elongation coefficient into the pre-built second machine learning model, and outputs the spring 3 elongation, which is recorded as the predicted spring 3 elongation;

[0094] The data processing module collects the real-time length of the spring 3, subtracts the initial length of the spring 3, obtains the real-time elongation of the spring 3, compares and analyzes the real-time elongation of the spring 3 with the predicted elongation of the spring 3, and generates a spring elongation adjustment instruction.

[0095] The basic principles, main features and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and the description in the specification are only to illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A control method for a linear motor balancing device based on positioning compensation, wherein the balancing device is used to balance the weight of a Z-axis motor, the balancing device comprises a supporting electric cylinder (1), a connecting frame (2) is installed on the top of the supporting electric cylinder (1), a spring (3) is connected between the connecting frame (2) and the Z-axis motor, and the method is characterized in that: The control method comprises: Step S01: collecting balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include the Z-axis balance coefficient and the external temperature; Step S02: inputting the collected balance characteristic parameters into a pre-built first machine learning model, and outputting the comprehensive spring (3) tension; Step S03: inputting the comprehensive spring (3) tension and the spring (3) elongation coefficient into a pre-built second machine learning model, and outputting the spring (3) elongation, which is recorded as the predicted spring (3) elongation; Step S04: Collect the real-time length of the spring (3), subtract the initial length of the spring (3), obtain the real-time elongation of the spring (3), compare and analyze the real-time elongation of the spring (3) with the predicted elongation of the spring (3), and generate a spring elongation adjustment instruction.

2. A linear motor balancing device control method based on positioning compensation according to claim 1, characterized in that: A total of a plurality of springs (3) are provided, and the plurality of springs (3) are arranged in parallel.

3. A linear motor balancing device control method based on positioning compensation according to claim 1, characterized in that: The parameters affecting the Z-axis balance coefficient include the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor; The method for obtaining the Z-axis balance coefficient is: performing weighted calculation on the weight of the Z-axis motor, the acceleration of the Z-axis motor and the load of the Z-axis motor to obtain the Z-axis balance coefficient.

4. A linear motor balancing device control method based on positioning compensation according to claim 1, characterized in that: The first machine learning model includes 1 input layer, 2 convolutional layers, 2 pooling layers, 1 RNN layer and 2 fully connected layers; the number of neurons in the input layer is 5; the 2 convolutional layers include the first convolutional layer and the second convolutional layer, the convolution kernel size of the first convolutional layer and the second convolutional layer is 3×3, the activation function is ReLU, the step size is 1, the margin is 0, the number of convolution kernels of the first convolutional layer is 32, and the number of convolution kernels of the second convolutional layer is 64; the 2 pooling layers include the first pooling layer and the second pooling layer, the two pooling layers have the same structure, the window size is 2×2, and the pooling method adopts the maximum pooling method, that is, in the pooling window, only the maximum value is taken as the pooling The feature value of the corresponding position of the window after quantization; the RNN layer includes 64 LSTM units, 64 input channels and 64 output channels; the LSTM unit includes 5 components, including input gate, forget gate, cell state, output gate and hidden state; the time step number of the RNN layer input channel is 1; RNN is equipped with a random attenuation mechanism, and the random attenuation probability is 0.2; the two fully connected layers include the first fully connected layer and the second fully connected layer; the first fully connected layer includes 128 neurons, and the activation function is ReLU; the second fully connected layer includes 1 neuron, as the final output, outputs the comprehensive spring (3) tension, where the comprehensive spring (3) tension The regression calculation formula is: ; In the formula, is the weight of the second fully connected layer, is the bias value of the second fully connected layer; is a three-dimensional tensor.

5. A linear motor balancing device control method based on positioning compensation according to claim 4, characterized in that: The training method of the first machine learning model includes: Get i groups of historical training data, divide the i groups of historical training data into training set and validation set, and the training set has Set historical training data, which includes balance feature parameters and comprehensive spring (3) tension, and initialize the weight parameter set of all layers and the set of bias parameters for all layers , forward propagation calculates the predicted value , the actual combined spring (3) tension is set to , calculate the loss function The formula is: ; In the formula Indicates The actual integrated spring (3) tension in the group's historical training data, Indicates The predicted composite spring (3) tension from the historical training data, Represents the group number of historical training data, ≤A; Back propagation calculates the gradient, and the formula for updating parameters using the gradient descent method includes: ; ; In the formula, Represents the learning rate, which is the preset value; express The gradient of express The gradient of Represents the updated weight parameter set ; Represents the updated bias parameter set ; Repeatedly calculate and update parameters until Until convergence, the model training is completed.

6. A linear motor balancing device control method based on positioning compensation according to claim 1, characterized in that: Parameters affecting the elongation coefficient of the spring (3) include the stiffness of the spring (3), the number of parallel springs (3) and the initial length of the spring (3); The method for obtaining the elongation coefficient of the spring (3) is as follows: weighted calculation is performed on the stiffness of the spring (3), the number of parallel springs (3) and the initial length of the spring (3) to obtain the Z-axis balance coefficient.

7. A linear motor balancing device control method based on positioning compensation according to claim 6, characterized in that: The method for constructing the second machine learning model includes: Initialize the second machine learning model structure. The second machine learning model structure adopts an MLP type multi-layer forward network structure. The MLP type multi-layer forward network structure includes three input layers, two hidden layers and an output layer. The input layer includes a first input layer, a second input layer and a third input layer. The number of nodes in the first input layer is 2, corresponding to the Z-axis balance coefficient and the external temperature in the balance characteristic parameters respectively. The second input layer is node 1, and node 1 is the comprehensive spring (3) tension. The third input layer is node 11, and node 11 is the spring (3) elongation coefficient. The hidden layer includes a first hidden layer and a second hidden layer. The number of nodes in the first hidden layer is 128, and the ReLU function is used as the activation function. The number of nodes in the second hidden layer is 64, and the ReLU function is used as the activation function. The output layer is a first output layer, and the first output layer is node 1, and node 1 is the predicted spring (3) elongation. After initializing the second machine learning model structure, the second machine learning model is trained using the comprehensive spring (3) tension and spring (3) elongation coefficient and the spring (3) elongation corresponding to the comprehensive spring (3) tension and spring (3) elongation coefficient. The optimizer is Adam, the loss function is the MSE loss function, the batch size is set to 32, the number of iterations is 200, and the training is terminated when the loss function converges.

8. A linear motor balancing device control method based on positioning compensation according to claim 7, characterized in that: The second machine learning model training method comprises: Convert the comprehensive spring (3) tension and the spring (3) elongation coefficient into a corresponding set of eigenvectors; The integrated spring (3) tension and the spring (3) elongation coefficient are used as inputs of a second machine learning model; the second machine learning model uses the spring (3) elongation corresponding to each set of integrated spring (3) tension and spring (3) elongation coefficient as output, uses the spring (3) elongation actually corresponding to each set of integrated spring (3) tension and spring (3) elongation coefficient as a prediction target, and uses minimizing the loss function value of the second machine learning model as a training target; and stops training when the loss function value of the second machine learning model is less than or equal to a preset target loss value.

9. A linear motor balancing device control method based on positioning compensation according to claim 6, characterized in that: The method of comparing and analyzing the obtained real-time spring (3) elongation with the predicted spring (3) elongation to generate a spring elongation adjustment instruction comprises: The difference between the real-time elongation of the spring (3) and the predicted elongation of the spring (3) is obtained and recorded as a length decay value. A spring elongation adjustment instruction is generated based on the length decay value. Based on the spring elongation adjustment instruction, the length of the length decay value corresponding to the extension and retraction of the support electric cylinder (1) is controlled so that the real-time elongation of the spring (3) is equal to the predicted elongation of the spring (3).

10. A linear motor balancing device control system based on positioning compensation, used to implement a linear motor balancing device control method based on positioning compensation according to any one of claims 1 to 9, characterized in that: include: A data acquisition module collects balance characteristic parameters of the Z-axis motor in real time, wherein the balance characteristic parameters include a Z-axis balance coefficient and an external temperature; A first data analysis module inputs the collected balance characteristic parameters into a pre-built first machine learning model and outputs a comprehensive spring (3) tension; A second data analysis module inputs the comprehensive spring (3) tension and the spring (3) elongation coefficient into a pre-built second machine learning model, and outputs the spring (3) elongation, which is recorded as the predicted spring (3) elongation; The data processing module collects the real-time length of the spring (3), subtracts the initial length of the spring (3), obtains the real-time elongation of the spring (3), compares and analyzes the real-time elongation of the spring (3) with the predicted elongation of the spring (3), and generates a spring elongation adjustment instruction.

Citation Information

Patent Citations

  • Torque balancing device capable of measuring torque

    CN106994698A

  • Terminal sliding-mode control method for suspended six-freedom-degree microgravity environment simulation system

    CN107121931A

  • Methods and apparatus for generating force and torque

    CN1488055A

  • KR20200099028A