A control method and system for a linear motor balancing device 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.
Patent Information
- Application Number
- CN202510162555.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-02-14
AI Technical Summary
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.
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.
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.
Smart Images

Figure CN119652204B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Z-axis motor balance, and specifically to a control method and system for a linear motor balance device based on positioning compensation. Background Art
[0002] When the Z-axis motor moves, it has a tendency to move downward under the influence of gravity. In order to keep the Z-axis motor at a certain position, a device for offsetting the gravity of the Z-axis motor is provided. Currently, the offset methods are as follows: Method 1: Use a pulley to balance the load weight by hanging a heavy object; Method 2: Use the spring compression characteristic to balance the load. Method 1 occupies a large space and it is difficult to control the motor output force to balance the load and counterweight due to inertia during acceleration and deceleration. Method 2 has a simple structure, occupies a small space, and is relatively easy to implement;
[0003] However, it is found in the process of its use that the spring tension changes proportionally with the stroke, and the spring tension changes throughout the stroke range, which is not easy for the driver to accurately control the spring tension. Secondly, when the Z-axis motor moves, it has different downward movement tendencies under the influence of gravity and moving acceleration, that is, the existing balance device control system usually operates with fixed parameters or simple feedback methods, and cannot quickly respond to the dynamic changes caused by load changes or acceleration / deceleration during the operation of the Z-axis motor, resulting in a decrease in positioning accuracy or a lag in the balance system. Especially in the case of high-speed machining or frequent speed changes, it is difficult to maintain a stable state. Therefore, a control method and system for a linear motor balance device based on positioning compensation are disclosed. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a control method and system for a linear motor balance device based on positioning compensation.
[0005] The present invention adopts the following technical solutions. A control method for a linear motor balance device based on positioning compensation, the balance device is used to balance the weight of the Z-axis motor, the balance device includes a support electric cylinder, a connecting frame is installed at the top of the support 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: Real-time collect the balance characteristic parameters of the Z-axis motor, and the balance characteristic parameters include the Z-axis balance coefficient and the external temperature;
[0007] Step S02: Input the collected balance characteristic parameters into a pre-constructed first machine learning model to output the comprehensive spring tension;
[0008] Step S03: Input the comprehensive spring tension and the spring elongation coefficient into a pre-constructed second machine learning model to output the spring elongation, denoted as the predicted spring elongation;
[0009] Step S04: Collect the real-time spring length, subtract the initial length of the spring to obtain the real-time spring elongation, compare and analyze the obtained 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 number of springs are provided, and the number of springs is 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 Z-axis motor load;
[0012] The method for obtaining the Z-axis balance coefficient is: perform a weighted operation on the weight of the Z-axis motor, the acceleration of the Z-axis motor, and the Z-axis motor load 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 convolutional kernel sizes of the first convolutional layer and the second convolutional layer are both 3×3, the activation functions are both ReLU, the strides are both 1, the margins are both 0, the number of convolutional kernels in the first convolutional layer is 32, and the number of convolutional kernels in the second convolutional layer is 64; the 2 pooling layers include the first pooling layer and the second pooling layer. The structures of the 2 pooling layers are the same, the window sizes are both 2×2, and the pooling method is the maximum pooling method, that is, in the pooling window, only the maximum value is taken as the feature value at 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, and the 5 components include an input gate, a forget gate, a cell state, an output gate, and a hidden state; the number of time steps of the input channels of the RNN layer is 1; the RNN is provided with a random weakening mechanism, and the random weakening probability is 0.2; the 2 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 used as the final output to output the comprehensive spring tension, 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] Obtain i sets of historical training data, and divide the i sets of historical training data into a training set and a validation set. There are sets of historical training data in the training set. The historical training data includes balance feature parameters and comprehensive spring tension. Initialize the weight parameter set of all layers and the bias parameter set of all layers , and calculate the predicted value through forward propagation . Set the actual comprehensive spring tension to , and calculate the loss function . The formula is:
[0018] ;
[0019] In the formula represents the actual comprehensive spring tension in the th set of historical training data, represents the predicted comprehensive spring tension in the th set of historical training data, represents the group number of the historical training data, ≤A; Calculate the gradient through backpropagation. The formulas for updating the parameters using the gradient descent method include:
[0020] ;
[0021] ;
[0022] In the formula, represents the learning rate, which is a preset value; represents the gradient, represents the gradient; represents the updated weight parameter set ; represents the updated bias parameter set ;
[0023] Repeatedly calculate and update the parameters until converges, that is, 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: perform a weighted operation on the stiffness of the spring, the number of parallel springs, and the initial length of the spring to obtain the spring elongation coefficient.
[0026] As a further description of the above technical solution: The construction method of the second machine learning model includes:
[0027] Initialize the second machine learning model structure. The second machine learning model structure adopts a multi-layer forward network structure of the MLP type. The multi-layer forward network structure of the MLP type 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 feature 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, use the comprehensive spring tension, the spring elongation coefficient, and the spring elongation corresponding to the comprehensive spring tension and the spring elongation coefficient to train the second machine learning model. The optimizer is Adam, the loss function is the MSE loss function, the batch size is set to 32, and the number of iterations is 200 rounds. When the loss function converges, the training ends, and the training is completed.
[0029] As a further description of the above technical solution: The training method of the second machine learning model includes:
[0030] Convert the comprehensive spring tension and the spring elongation coefficient into a corresponding set of feature vectors.
[0031] Use the comprehensive spring tension and the spring elongation coefficient as the input of the second machine learning model. The second machine learning model uses the spring elongation corresponding to each set of comprehensive spring tension and spring elongation coefficient as the output, uses the actually corresponding spring elongation of each set of comprehensive spring tension and spring elongation coefficient as the prediction target, and uses minimizing the loss function value of the second machine learning model as the training target. Stop training 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 obtained real-time spring elongation and the predicted spring elongation to generate a spring elongation adjustment instruction includes:
[0033] Obtain the difference between the real-time spring elongation and the predicted spring elongation, denoted as the length decay value. Generate a spring elongation adjustment instruction based on the length decay value, and control the support electric cylinder to extend and contract by the length corresponding to the length decay value based on the spring elongation adjustment instruction, so that the real-time spring elongation is equal to the predicted spring elongation.
[0034] A control system for a linear motor balancing device based on positioning compensation, which is used to implement the control method for the linear motor balancing device based on positioning compensation, includes:
[0035] A data acquisition module that collects the balance characteristic parameters of the Z-axis motor in real time. The balance characteristic parameters include the Z-axis balance coefficient and the external temperature.
[0036] A first data analysis module inputs the collected balance characteristic parameters into a pre-constructed first machine learning model and outputs the comprehensive spring tension.
[0037] A second data analysis module inputs the comprehensive spring tension and the spring elongation coefficient into a pre-constructed second machine learning model and outputs the spring elongation, denoted as the predicted spring elongation.
[0038] A data processing module collects the real-time spring length, subtracts the initial length of the spring to obtain the real-time spring elongation, compares and analyzes the obtained real-time spring elongation with the predicted spring elongation, and generates a spring elongation adjustment instruction.
[0039] Beneficial effects:
[0040] The control method and system for a linear motor balancing device based on positioning compensation provided by the present invention predict the spring tension based on the first machine learning model that has been trained by collecting real-time balance characteristic parameters, that is, it can automatically and real-time predict the spring tension required to balance the Z-axis motor 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. It 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 its prediction, and performs real-time collection and real-time feedback, enabling automatic adjustment of the spring tension according to the external environment (such as temperature change) and working conditions (such as acceleration, load), with strong adaptability, adapting to complex and changing working conditions, reducing the impact and vibration of the Z-axis motor movement. Further, by obtaining the spring elongation coefficient, inputting the spring elongation coefficient and the predicted comprehensive spring tension into the second machine learning model for predicting the spring elongation amount, the elongation amount of the spring is obtained, so as to directly output the elongation amount of the spring, and then collect the real-time spring length based on the drive control to obtain the real-time spring elongation, compare and analyze the real-time spring elongation with the predicted spring elongation, generate a spring elongation adjustment instruction, and adjust the spring elongation amount to achieve real-time monitoring and adjustment of the spring elongation amount, so that the Z-axis motor can maintain the best load balance during operation, reduce the impact and vibration of the Z-axis motor movement, and extend the service life of the Z-axis motor. Description of the Drawings
[0041] The following further explains the present invention in conjunction with the drawings and embodiments:
[0042] Figure 1 The structural schematic diagram of the balancing device provided by the embodiment of the present invention;
[0043] Figure 2 The flowchart of a control method for a linear motor balancing device based on positioning compensation provided by the embodiment of the present invention;
[0044] Figure 3 The module connection diagram of a control system for a linear motor balancing device based on positioning compensation provided by the embodiment of the present invention.
[0045] In the figure: 1. Support electric cylinder; 2. Connecting frame; 3. Spring. Specific embodiments
[0046] In order to make the technical means, creative features, achieved purposes and functions of the present invention easy to understand, the present invention will be further described below with reference to specific drawings. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other.
[0047] Embodiment 1
[0048] Please refer to Figure 1 - Figure 2 , the embodiment of the present invention provides a technical solution: a control method for 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 support electric cylinder 1, a connecting frame 2 is installed at the top of the support electric cylinder 1, a spring 3 is connected between the connecting frame 2 and the Z-axis motor, a plurality of springs 3 are provided, and the plurality of springs 3 are arranged in parallel, and the control method includes:
[0049] Step S01: Real-time collect the balance characteristic parameters of the Z-axis motor, and the balance characteristic parameters include the Z-axis balance coefficient and the external temperature.
[0050] It should be noted that the temperature change 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 increases and the tension increases.
[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 Z-axis motor load;
[0052] It should be noted that the mass of the Z-axis motor itself also affects the tension. The heavier the Z-axis motor, the greater the tension required for the spring 3 to balance its gravity, and vice versa;
[0053] When the Z-axis motor accelerates and moves, the inertial force increases, and a higher tension of spring 3 is required to maintain balance. When decelerating, the inertial force is opposite to that during acceleration. Therefore, for spring 3, the required tension will decrease, 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 spring 3, and vice versa.
[0055] The method for obtaining the Z-axis balance coefficient is as follows: perform a weighted operation 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 for 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 are weight coefficients, , and are all greater than 0.
[0059] It should be noted that the values of the weight coefficients are generally determined by those skilled in the art according to the actual situation. The magnitudes of the weight coefficients are for quantifying each parameter to obtain a specific value, which is for facilitating subsequent comparisons. Regarding the magnitudes of the coefficients, they are not unique, as long as they do not affect the proportional relationship between the parameters and the quantified values.
[0060] Step S02: Input the collected balance characteristic parameters into the pre-constructed first machine learning model to output the comprehensive tension of spring 3;
[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 convolutional kernel sizes of the first convolutional layer and the second convolutional layer are both 3×3, the activation functions are both ReLU, the strides are both 1, the paddings are both 0, the number of convolutional kernels in the first convolutional layer is 32, and the number of convolutional kernels in the second convolutional layer is 64; the 2 pooling layers include the first pooling layer and the second pooling layer, the structures of the 2 pooling layers are the same, the window sizes are both 2×2, and the pooling method is the maximum pooling method, that is, within the pooling window, only the maximum value is taken as the feature value at the corresponding position of the pooled window; the RNN layer includes 64 LSTM units, 64 input channels, and 64 output channels; the LSTM unit includes 5 components, and the 5 components include an input gate, a forget gate, a cell state, an output gate, and a hidden state; the number of time steps of the input channels of the RNN layer is 1; the RNN is provided with a random attenuation mechanism, and the random attenuation probability is 0.2; the 2 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 used as the final output to output the tension of the comprehensive spring 3, where the tension of the comprehensive spring 3 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] Obtain i groups of historical training data, divide the i groups of historical training data into a training set and a validation set, and there are groups of historical training data in the training set. The historical training data includes balanced feature parameters and the tension of the comprehensive spring 3. Initialize the weight parameter set of all layers and the bias parameter set of all layers, calculate the predicted value through forward propagation, set the actual tension of the comprehensive spring 3 as , and calculate the loss function The formula is:
[0066] ;
[0067] In the formula represents the actual tension of the comprehensive spring 3 in the th group of historical training data, and represents the The predicted comprehensive spring 3 tension in the set of historical training data represents the group number of the historical training data ≤A; The formula for backpropagation to calculate the gradient and update the parameters using the gradient descent method includes:
[0068] ;
[0069] ;
[0070] In the formula, represents the learning rate, which is a preset value; represents the gradient of represents the gradient of represents the updated set of weight parameters ; represents the updated set of bias parameters ;
[0071] It should be specifically noted that the formula for updating the parameters using the gradient descent method is in computer language
[0072] Repeatedly calculate and update the parameters until converges, that is, the model training is completed
[0073] Step S03: Input the comprehensive spring 3 tension and the spring 3 elongation coefficient into the pre - constructed second machine learning model, and output the spring 3 elongation, denoted as the predicted spring 3 elongation;
[0074] The parameters affecting the spring 3 elongation coefficient include the stiffness of spring 3, the number of parallel springs 3, and the initial length of spring 3;
[0075] The method for obtaining the spring 3 elongation coefficient is: perform a weighted operation on the stiffness of spring 3, the number of parallel springs 3, and the initial length of spring 3 to obtain the spring elongation coefficient
[0076] The construction method of the second machine learning model includes:
[0077] Initialize the second machine learning model structure. The second machine learning model structure adopts a multi-layer forward network structure of the MLP type. The multi-layer forward network structure of the MLP type 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 feature parameters respectively. The second input layer is node 1, and node 1 is the combined tension of spring 3. The third input layer is node 11, and node 11 is the elongation coefficient of spring 3. 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 elongation of spring 3.
[0078] After initializing the second machine learning model structure, use the combined tension of spring 3, the elongation coefficient of spring 3, and the elongation of spring 3 corresponding to the combined tension of spring 3 and the elongation coefficient of spring 3 to train the second machine learning model. The optimizer is Adam, the loss function is the MSE loss function, the batch size is set to 32, and the number of iterations is 200 rounds. When the loss function converges, end the training, and the training is completed.
[0079] The training method of the second machine learning model includes:
[0080] Convert the combined tension of spring 3 and the elongation coefficient of spring 3 into a corresponding set of feature vectors;
[0081] Use the combined tension of spring 3 and the elongation coefficient of spring 3 as the input of the second machine learning model. The second machine learning model uses the elongation of spring 3 corresponding to each set of the combined tension of spring 3 and the elongation coefficient of spring 3 as the output, uses the actual elongation of spring 3 corresponding to each set of the combined tension of spring 3 and the elongation coefficient of spring 3 as the prediction target, and uses minimizing the loss function value of the second machine learning model as the training target. Stop training 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 the mean square error;
[0083] The mean square error is one of the common loss functions. By minimizing the loss function formula = as the target to train the model, 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; The elongation of spring 3 output by a set of second machine learning models corresponding to the x - th group of feature vectors is the actual elongation of spring 3 corresponding to the x - th group of feature vectors.
[0085] It should be noted that the optimal decision - control group of the initial samples of the elongation of spring 3 corresponding to the comprehensive spring 3 tension and spring 3 elongation coefficient is obtained by making the optimal decision manually after manual tests and recording. At the initial stage of the current decision - making training data, all need to be manually decided. Machine learning is obtained by logical judgment and classification summary based on manual decisions. The most typical example is the manually labeled data involved in the large - data feeding of gpt.
[0086] Step S04: Collect the real - time length of spring 3, subtract the initial length of spring 3 to obtain the real - time elongation of spring 3, compare and analyze the obtained real - time elongation of spring 3 with the predicted elongation of spring 3, and generate a spring elongation adjustment instruction.
[0087] The method of comparing and analyzing the obtained real - time elongation of spring 3 with the predicted elongation of spring 3 to generate a spring elongation adjustment instruction includes:
[0088] Obtain the difference between the real - time elongation of spring 3 and the predicted elongation of spring 3, denoted as the length decay value, generate a spring elongation adjustment instruction based on the length decay value, and control the length corresponding to the length decay value of the telescopic support electric cylinder 1 based on the spring elongation adjustment instruction, so that the real - time elongation of spring 3 is equal to the predicted elongation of spring 3.
[0089] Embodiment 2
[0090] A control system for a linear motor balancing device based on positioning compensation, used to implement the control method of the linear motor balancing device based on positioning compensation, includes:
[0091] A data acquisition module that collects the balance characteristic parameters of the Z - axis motor in real - time. The balance characteristic parameters include the Z - axis balance coefficient and the external temperature;
[0092] A first data analysis module that inputs the collected balance characteristic parameters into a pre - constructed first machine learning model and outputs the comprehensive spring 3 tension;
[0093] A second data analysis module that inputs the comprehensive spring 3 tension and the spring 3 elongation coefficient into a pre - constructed second machine learning model and outputs the elongation of spring 3, denoted as the predicted elongation of spring 3;
[0094] A data processing module that collects the real - time length of spring 3, subtracts the initial length of spring 3 to obtain the real - time elongation of spring 3, compares and analyzes the obtained real - time elongation of spring 3 with the predicted elongation of spring 3, and generates a spring elongation adjustment instruction.
[0095] The foregoing has shown and described the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and the descriptions in the specification are only used to illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and all these changes and improvements fall within the scope of the present invention claimed. The scope of the present invention claimed is defined by the appended 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: 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 elongation coefficient of the spring (3).
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
Terminal sliding-mode control method for suspended six-freedom-degree microgravity environment simulation system
CN107121931A
Methods and apparatus for generating force and torque
CN1488055A