CN113093545B - Linear servo system thermal error modeling method and compensation system based on energy balance - Google Patents
Linear servo system thermal error modeling method and compensation system based on energy balance Download PDFInfo
- Publication number
- CN113093545B CN113093545B CN202110355438.1A CN202110355438A CN113093545B CN 113093545 B CN113093545 B CN 113093545B CN 202110355438 A CN202110355438 A CN 202110355438A CN 113093545 B CN113093545 B CN 113093545B
- Authority
- CN
- China
- Prior art keywords
- linear servo
- servo system
- thermal error
- model
- energy balance
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B13/00—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
- G05B13/02—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
- G05B13/04—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators
- G05B13/042—Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric involving the use of models or simulators in which a parameter or coefficient is automatically adjusted to optimise the performance
Abstract
The invention discloses a linear servo system thermal error modeling method based on energy balance, which comprises the following steps: 1) Constructing an LSTM neural network model according to an energy balance equation of a linear servo system; 2) Acquiring original operation data of a linear servo system, and carrying out wavelet threshold denoising on armature current in the original operation data; 3) Generating an input data vector from the original operation data subjected to wavelet threshold denoising processing, and generating the input data vector into a data file in a npy format for model training; 4) Training an LSTM neural network model to obtain a thermal error model of the linear servo system; 5) Method for predicting thermal error delta L of linear servo system by using thermal error model of linear servo system τ+1 . The invention also provides a linear servo system thermal error compensation system based on energy balance, which comprises a data acquisition system, a data processing system, a thermal error prediction system, a CNC control system and a servo control system.
Description
Technical Field
The invention belongs to the technical field of mechanical error analysis, and particularly relates to a linear servo system thermal error modeling method and a compensation system based on energy balance.
Background
The thermal expansion of the shaft system has a hysteresis effect, and the hysteresis effect is significant for the shaft system. The hysteresis effect is important for robust modeling of thermal errors, which can lead to time-varying, non-linear, and non-steady-state characteristics of thermal expansion temperature behavior. The hysteresis effect means that the current thermal error is not only dependent on the current input, but also has a memory property for and is significantly affected by the historical thermal effect. Therefore, the effect of historical thermal information on the current thermal error should be considered in the thermal error modeling of the axis system. Conventional thermal error models cannot apply past thermal information, resulting in poor prediction performance and poor robustness.
The Long Short-Term Memory network (LSTM) is a time-cycle neural network, which is specially designed to solve the Long-Term dependence problem of the general RNN (cyclic neural network), and all RNNs have a chain form of repeated neural network modules. In standard RNNs, this repeated structure block has only one very simple structure, e.g. one tanh layer. Due to the unique design structure, LSTM is suitable for handling and predicting significant events of very long intervals and delays in a time series.
Disclosure of Invention
In view of the above, the present invention provides a linear servo system thermal error modeling method and compensation system based on energy balance, which utilize the memory characteristics of the LSTM neural network to utilize the previous thermal information of the axis system to establish a thermal error model considering the thermal expansion hysteresis effect of the axis system.
In order to achieve the purpose, the invention provides the following technical scheme:
the invention firstly provides a linear servo system thermal error modeling method based on energy balance, which comprises the following steps:
1) According to the energy balance equation of the linear servo system, constructing an expression of an LSTM neural network model:
wherein, Δ L τ+1 Represents the thermal error of the linear servo system at the running time of tau +1, I τ+1 Representing the armature current of the linear servo system at the tau +1 running time; n is τ+1 The rotating speed of the linear servo system at the running time of tau +1 is represented; t (x, τ + 1) represents the temperature of the linear servo system at τ +1 run time and at the linear coordinate x position; t is 0 Represents the ambient temperature; f represents a mapping function of the LSTM neural network model;
2) Acquiring original operation data of a linear servo system, and carrying out wavelet threshold denoising on armature current in the original operation data;
3) Generating an input data vector from the original operation data subjected to wavelet threshold denoising processing, and generating the input data vector into a data file in a npy format for model training;
4) Training an LSTM neural network model to obtain a thermal error model of the linear servo system;
5) To be provided withn τ+1 、T(x,τ+1)、T 4 (x, τ + 1) and T 0 As an input, the thermal error Delta L of the linear servo system is predicted by using a thermal error model of the linear servo system τ+1 。
Further, in step 1), the energy balance equation of the linear servo system is as follows:
wherein Q represents an amount of energy increase inside the linear servo system, and:m represents mass, c represents specific heat capacity, α represents coefficient of thermal expansion, Δ L represents thermal expansion,is a coefficient, L represents the length of the screw shaft;
Q b represents the heat generated by the friction of the bearing, and:n represents the rotational speed of the linear servo system, a 6 And a 7 Are all coefficients;
Q M representing the heat generated by the servo motor; and isI denotes the armature current of the linear servo system, a 1 、a 2 And a 3 Are all coefficients;
Q n heat generated by friction of the ball screw; and is provided witha 4 And a 5 Are all coefficients;
Q d the heat dissipation capacity of the linear servo system; and isQ tr Indicating radiation heat dissipation, Q cht Showing convective heat dissipation, w 6 And w 7 Are all coefficients;
t represents time;
thereby obtaining:
wherein w 1 、w 2 、w 3 And w 4 Are all coefficients;
the thermal error at the time period t = τ to t = τ +1 is Δ L τ+1 -ΔL τ Obtaining:
namely:
and (3) considering the hysteresis effect of the thermal error, so as to obtain an expression for establishing an LSTM neural network model:
further, the LSTM neural network model includes seven layers, and sequentially: the system comprises an input layer, a hidden layer of an input part, a first LSTM network layer, a second LSTM network layer, a hidden layer of an output part, a full connection layer and an output layer, wherein an activation function of the hidden layer of the input part adopts a tanh function, and an activation function of the hidden layer of the output part adopts a relu function.
Further, in the step 2), the method for performing wavelet threshold denoising on the original operation data comprises:
a fixed threshold λ is used, and:
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
wherein, W j,k Representing wavelet coefficients;
the hard threshold function is defined as:
the soft threshold function is defined as:
wherein the content of the first and second substances,representing wavelet coefficients after thresholding;
combining a hard threshold function and a soft threshold function, providing a threshold function with continuity, and preprocessing an armature current signal of a servo motor, wherein the expression is as follows:
wherein a is an adjustment factor and can be any normal number.
Further, a has a value in the range of (0,15 ].
The invention also provides a linear servo system thermal error compensation system based on energy balance, which comprises a data acquisition system, a data processing system, a thermal error prediction system, a CNC control system and a servo control system;
the data acquisition system is used for acquiring original operation data of the linear servo system and comprises an infrared camera for acquiring temperature field data of the linear servo system, a current monitoring port for acquiring armature current of the linear servo system and an encoder for acquiring rotating speed of the linear servo system;
the data processing system comprises a filter, an amplifier and an A/D converter which are used for filtering, amplifying and performing analog-to-digital conversion on the original operating data in sequence;
the thermal error prediction system comprises a computer for operating a linear servo system thermal error model constructed by the linear servo system thermal error modeling method based on energy balance, and the linear servo system thermal error model obtains a thermal error prediction value according to input original operation data processed by the data processing system;
the CNC control system comprises a PLC controller, and the PLC controller obtains error compensation quantities of the linear servo system in different directions according to the thermal error prediction values;
and the servo control system controls the linear servo system to act and perform error compensation.
The invention has the beneficial effects that:
the invention relates to a linear servo system thermal error modeling method based on energy balance, which comprises the steps of firstly utilizing an energy balance equation of a linear servo system to construct an expression of an LSTM neural network model, and because armature current of a servo motor has obvious uncertainty and complexity, denoising the armature current in original running data by adopting a wavelet threshold value and inputting the denoised armature current into the LSTM neural network model, so that the prediction precision and the generalization capability can be improved; the LSTM neural network can remember historical information by changing the internal state of the LSTM neural network, so that the information can be stably propagated reversely on the whole time axis, the structure of the model network can be matched with the characteristics of thermal error data, the advantages of the LSTM neural network in time sequence analysis can be fully utilized, and the prediction accuracy and robustness of the thermal error are improved.
Drawings
In order to make the object, technical scheme and beneficial effect of the invention more clear, the invention provides the following drawings for explanation:
FIG. 1 is a structural diagram of a thermal error model of a linear servo system constructed by the thermal error modeling method of the linear servo system based on energy balance;
FIG. 2 is a block diagram of an LSTM neural network;
FIG. 3 is a schematic block diagram of the thermal error compensation system of the linear servo system based on energy balance according to the present invention;
fig. 4 is a measurement diagram of the armature current of the motor in the operating state # 1;
FIG. 5 is a graph of screw shaft temperature measurements; FIG. 5 (a) is a measurement diagram of a temperature field; FIG. 5 (b) is a temperature field of the screw shaft;
FIG. 6 is a schematic view of the arrangement of temperature measurement points on the screw shaft;
FIG. 7 is a thermal error of a screw shaft, and FIG. 7 (a) is a measurement diagram of a positioning error; FIG. 7 (b) is a graph of positioning error; FIG. 7 (c) is a graph of thermal error;
FIG. 8 is a comparative plot of transfer functions and optimization methods; FIG. 8 (a) is a comparison of the accuracy of three transfer functions; FIG. 8 (b) is a comparison of the accuracy of the four optimization algorithms;
FIG. 9 is a diagram illustrating the structure and parameters of a thermal error model according to this embodiment;
FIG. 10 is a thermal error fit graph;
FIG. 11 is a graph of a thermal error compensation structure; fig. 11 (a) - (f) are thermal error compensation graphs at t =30min, t =60min, t =90min, t =120min, t =180min, and t =240min, respectively.
Detailed Description
The present invention is further described below in conjunction with the drawings and the embodiments so that those skilled in the art can better understand the present invention and can implement the present invention, but the embodiments are not to be construed as limiting the present invention.
Fig. 1 is a structural diagram of a thermal error model of a linear servo system constructed by the thermal error modeling method of the linear servo system based on energy balance according to the present invention. The linear servo system thermal error modeling method based on energy balance comprises the following steps:
1) According to the energy balance equation of the linear servo system, constructing an expression of an LSTM neural network model:
wherein, Δ L τ+1 Representing the thermal error, I, of the linear servo system at τ +1 run time τ+1 Representing the armature current of the linear servo system at the tau +1 running time; n is τ+1 The rotating speed of the linear servo system at the running time of tau +1 is represented; t (x, τ + 1) represents the temperature of the linear servo system at τ +1 run time and at the linear coordinate x position; t is 0 Represents the ambient temperature; f represents a mapping function of the LSTM neural network model;
2) Acquiring original operation data of a linear servo system, and carrying out wavelet threshold denoising on an armature current in the original operation data;
3) Generating an input data vector from the original operation data subjected to wavelet threshold denoising processing, and generating the input data vector into a data file in a npy format for model training;
4) Training an LSTM neural network model to obtain a thermal error model of the linear servo system;
5) To be provided withn τ+1 、T(x,τ+1)、T 4 (x, τ + 1) and T 0 As an input, the thermal error Delta L of the linear servo system is predicted by using a thermal error model of the linear servo system τ+1 。
Specifically, the LSTM neural network model of this embodiment includes seven layers, and sequentially: the system comprises an input layer, a hidden layer of an input part, a first LSTM network layer, a second LSTM network layer, a hidden layer of an output part, a complete connection layer and an output layer, wherein an activation function of the hidden layer of the input part adopts a tanh function, and an activation function of the hidden layer of the output part adopts a relu function.
In the step 1), the process of constructing the LSTM neural network model according to the energy balance equation of the linear servo system is as follows.
1) Electric heat generated by servo motor
Electric heating Q generated by servo motor M The equation is:
Q M =P copper +P iron +P air +P mech +P eddy +P addtional
wherein, P copper Represents copper loss; p iron Represents the iron loss; p air Represents an air resistance loss; p mech Represents mechanical losses; p eddy Represents the eddy current loss; p addtional The hysteresis loss is expressed. P copper Is the main part of the electric heating, which is proportional to the square of the armature current I:
P copper =k 1 I 2
wherein k is 1 Is a coefficient;
P iron 、P air 、P mech and P eddy Are all proportional to the square of the speed n, P addtional Proportional to the speed n, i.e.:
P iron =k 2 n+k 3 n 2
P air =k 4 n 2
P mech =k 5 n 2
P eddy =k 6 n 2
P addtional =k 7 n
wherein k is 2 、k 3 、k 4 、k 5 、k 6 And k 7 Are all coefficients.
The total electrical heating equation can be obtained as follows:
Q M =k 1 I 2 +(k 2 n+k 3 n 2 )+k 4 n 2 +k 5 n 2 +k 6 n 2 +k 7 n
=k 1 I 2 +(k 2 +k 7 )n+(k 3 +k 4 +k 5 +k 6 )n 2
the generalized form of total heat is expressed as:
Q M =a 1 I 2 +a 2 n+a 3 n 2
wherein, a 1 、a 2 And a 3 Are all coefficients.
During the τ operating period, the generalized form of the total heat of the electric heat is expressed as:
where τ denotes the running time and t denotes time.
2) Heat generated by friction of ball screw
Frictional heat Q of ball screw n With friction torque M 2 Proportional to the speed n, i.e.:
Q n ∝nM 2
M 2 =k 8 +k 9 n 2/3
wherein k is 8 And k 9 Is a coefficient, i.e.:
Q n ∝n(k 8 +k 9 n 2/3 )
a general expression for frictional heat can be found:
Q n =a 4 n+a 5 n 5/3
wherein, a 4 And a 5 Are coefficients.
Total frictional heat Q of ball screw during tau running period n The generalized expression of (1) is:
3) Heat generated by friction of bearings
Friction heat and friction torque M generated by bearing 1 Proportional to the angular velocity ω, i.e.:
Q b ∝M 1 ·ω=M 1 ·2πn
M 1 =k 10 n 2/3 +k 11
wherein k is 10 And k 11 Are coefficients.
The total heat of friction generated by the bearing is as follows:
Q b =M 1 ·ω=(k 10 n 2/3 +k 11 )·2πn
the general expression for the total heat of friction generated by a bearing is:
Q b =a 6 n+a 7 n 5/3
wherein, a 6 And a 7 The coefficients are represented.
During the tau running period, the generalized expression of the total heat of friction generated by the bearing is as follows:
4) Heat dissipation property
The heat dissipated by convective heat transfer is proportional to the temperature difference Δ T (x, T), i.e.:
Q cht ∝ΔT(x,t)=[T(x,t)-T 0 ]
wherein, T 0 Is ambient temperature.
The generalized expression for the amount of heat dissipated by convective heat transfer during the τ operating period is:
the heat radiation of the heat radiation is:
the generalized expression for the amount of heat dissipated by thermal radiation during the τ operating period is:
then during the τ operation period, the total heat dissipated is expressed as:
the energy balance equation of the linear servo system is as follows:
wherein Q represents an amount of energy increase inside the linear servo system, and:
wherein m represents mass and c represents specific heat capacity.
Thermal expansion Δ L and coefficient of expansion αLength L of screw shaft, and average temperature riseIn direct proportion, namely:
the following results were obtained:
5) Thermal error modeling
Then, during the period τ, the energy balance equation of the linear servo system can be expressed as:
during the τ +1 operation period, the linear servo system energy balance equation can be expressed as:
the thermal error delta L of the linear servo system in the period from tau to tau +1 can be obtained τ+1 -ΔL τ :
Namely:
the thermal error has strong hysteresis effect, namely the temperature at the time of tau +1 can not reflect the thermal error delta L τ+1 . Thus, taking into account hysteresis effects, thermal errors of τ -1 and τ -2 are introduced, and then the thermal error at τ +1 run is expressed as:
i.e. thermal error Δ L τ+1 Armature current I of servo motor τ+1 Rotational speed n τ+1 Temperature T (x, τ + 1) at time τ +1, and thermal error Δ L at time τ τ Thermal error Δ L at time τ -1 τ-1 At Δ L τ-2 Thermal error Δ L of time τ-2 And the ambient temperature T 0 It is related. The coefficients in the thermal error model are the same for different run times and operating conditions, and are inconsistent with the actual situation. The actual operating conditions of the ball screw linear shaft are complex. Therefore, the coefficients should vary with actual operating conditions and should not be constant at different run times. Furthermore, the thermal error model is a Multiple Linear Regression (MLR) model, whereinn τ+1 ,T(x,τ+1),T 4 (x,τ+1),ΔL τ ,ΔL τ-1 ,ΔL τ-2 ,and T 0 The isoparameters are arguments. For the more general case, the mapping relationship is defined as:
the input of the model is an τ+1 ,T(x,τ+1),T 4 (x,τ+1),ΔL τ ,ΔL τ-1 ,ΔL τ-2 ,and T 0 And (4) a data matrix consisting of the equal variables. The output is a one-dimensional matrix of predicted thermal errors. Thermal error Δ L at time τ +1 τ+1 Thermal error Δ L dependent on time τ τ Tau-1 thermal error DeltaL τ-1 And thermal error Δ L at time τ -2 τ-2 Indicating that there is memory behavior. According to the mapping relation, for the next calculation and prediction, it is necessary to input the predicted thermal error of the previous time, that is, to input the predicted output of the model of the previous time as the input of the predicted model of the thermal error of the current time, resulting in problems of propagation and accumulation of the predicted error, and then the prediction accuracy becomes worse and worse. Where f represents the mapping function of the LSTM neural network model.
The LSTM neural network is specifically designed to solve the time-dependent problem in model prediction, and is suitable for processing and predicting actual problems with long intervals and time series delays. The LSTM neural network adds state c to the RNN to preserve long-term state, as shown in FIG. 2, x in the figure t And h t Representing the input and output of the neural network at time t. If the data time span is large, the LSTM network may not be able to preserve long-term results. The LSTM neural network enables the storage and control of information through three so-called gate structures. The conclusion is that the LSTM neural network can achieve the ability to remember the thermally induced error of the output at the previous time by its own internal mechanism, thus having an impact on the subsequent output. To overcome the propagation and accumulation of prediction errors, LSTM neural networks have the ability to remember thermal information and thus can be used to build models of thermally induced errors.
The LSTM neural network model will automatically record the output the last time and save it for output calculations the next time. That is, the LSTM neural network model may record the thermal error Δ L τ ,ΔL τ-1 ,andΔL τ-2 Then the thermal error Δ L is calculated τ ,ΔL τ-1 ,andΔL τ-2 As part of the next thermal error calculation input. Therefore, Δ can be deleted from the rightL τ ,ΔL τ-1 ,andΔL τ-2 And reserve the item ofn τ+1 ,T(x,τ+1),T 4 (x,τ+1),and T 0 The item (1). Therefore, the LSTM neural network can avoid the problem of model error propagation and accumulation, thereby obtaining an expression of the LSTM neural network model:
the output of the model is the thermal error Δ L at time τ +1 τ+1 . The input is the square of the armature current at time τ +1, the rotational speed at time τ +1, the square of the rotational speed at time τ +1, the power of two-thirds of the rotational speed at time τ +1, the temperature at time τ +1, the fourth power of the temperature at time τ +1, and the ambient temperature T 0 。
Structure of LSTM neural network model
The structure of the thermal error model is shown in fig. 1. The LSTM neural network model of this embodiment includes seven layers, and sequentially: the system comprises an input layer, an input part hidden layer, a first LSTM network layer, a second LSTM network layer, an output part hidden layer, a full connection layer and an output layer, wherein an activation function of the input part hidden layer adopts a tanh function, an activation function of the output part hidden layer adopts a relu function, and the tanh function is expressed as:
the weight vector of the hidden layer of the input part is w _ in, and the threshold vector is b _ in. The weight vector of the hidden layer of the output section is w _ out1, and the threshold vector is b _ out1. The weight vector of the fully connected layer is w _ out2, and the threshold vector is b _ out2. This means that the model is input comprises eight variables of (n τ+1 ,T(x,τ+1),T 4 (x,τ+1),T(x,τ),T 4 (x,τ),andT 0 ) As described in the expression of the LSTM neural network model. Data is input into a hidden layer and then sent to the LSTM unit to obtain the LSTM unit h t Then transfers the data to the hidden layer and the fully connected layer, and finally obtains the predicted thermal error.
In the step 2), the method for denoising the armature current in the original operation data by using the wavelet threshold is as follows.
The uncertainty and complexity of the armature current of the servo motor is significant. If the raw armature current data of the motor servo is used directly as input to the prediction model, the predicted thermal error will be significantly different from the measured data. It should be decomposed and denoised effectively and input into the thermal error model to obtain better prediction accuracy and generalization ability.
The principle of wavelet threshold denoising is to separate the signal and noise into wavelet coefficients with different amplitudes, and the wavelet coefficients will be larger than those of the noise; finally, the noise is eliminated by setting an appropriate threshold. It is important to select an appropriate threshold. A fixed threshold λ is typically used, and:
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
wherein, W j,k Representing wavelet coefficients;
the hard threshold function is defined as:
the soft threshold function is defined as:
wherein the content of the first and second substances,representing wavelet coefficients after thresholding;
the wavelet coefficients generated by soft threshold estimation have good continuity but compress the original signal, resulting in some bias and distortion. The effect of the hard threshold function will be relatively better, but signal jumps and oscillations will occur and the smoothness of the signal will be lost. The method comprises the steps of combining wavelet coefficients with a hard threshold function and a soft threshold function together, and preprocessing an armature current signal of a servo motor, wherein the expression is as follows:
wherein a is an adjustment factor and can be any normal number.
When a → + ∞, the limit value of the above expression approaches W j,k - λ, which is equivalent to a soft threshold function; when a is any normal number, the limit of the expression tends to lambda/2, and the threshold function has the characteristics of fast attenuation and smooth soft threshold function; when a goes to 0, the above expression is close to W j,k It is equivalent to a hard threshold function. The conclusion is that by adjusting the value of a, the threshold function can be made to have the characteristics of a hard threshold function and a soft threshold function, so that different threshold functions are obtained. When a =15, the above expression is very close to the soft threshold function, so the value range of a is (0,15)]. For signals with more interference details, the value of a may be smaller, which helps to preserve the details of the signal; the value of a is usually largeAnd is more favorable for noise reduction. That is, the value range of a is preferably (0,15)]。
As shown in fig. 3, the linear servo system thermal error compensation system based on energy balance of the present embodiment includes a data acquisition system, a data processing system, a thermal error prediction system, a CNC control system and a servo control system;
the data acquisition system is used for acquiring original operation data of the linear servo system and comprises an infrared camera for acquiring temperature field data of the linear servo system, a current monitoring port for acquiring armature current of the linear servo system and an encoder for acquiring rotating speed of the linear servo system;
the data processing system comprises a filter, an amplifier and an A/D converter which are used for filtering, amplifying and performing analog-to-digital conversion on the original operation data in sequence;
the thermal error prediction system comprises a computer for operating a linear servo system thermal error model constructed by the linear servo system thermal error modeling method based on energy balance, and the linear servo system thermal error model obtains a thermal error prediction value according to input original operation data processed by the data processing system;
the CNC control system comprises a PLC controller, and the PLC controller obtains error compensation quantities of the linear servo system in different directions according to the thermal error prediction value;
and the servo control system controls the linear servo system to act and perform error compensation.
The following description will be given of the effects of the thermal error model of the linear servo system and the thermal error compensation of the linear servo system, which are obtained by using the thermal error modeling method of the linear servo system based on the energy balance.
The operating conditions # 1 and #2 were set according to the actual running process, as shown in table 1. Operating conditions # 1 and #2 were used for modeling and compensation, respectively. Armature current, speed of rotation and temperature need to be measured.
TABLE 1 working conditions
1) Armature current measurement
The armature current of the servomotor was measured in this example and is marked as red line in fig. 4. During operation, the armature current fluctuates significantly. Armature current is closely related to input and output power. The electrical and frictional heat determine the thermally induced error. That is, armature current fluctuations may reflect thermally induced errors. Because the disturbance type of the armature current signal of the servo motor is unknown and multiple types of disturbances generally exist at the same time, the noise removal effect is good when the value of a is less than 10, and the details of the signal disturbance are reserved. Therefore, the value of a is set to 8 according to the noise removal effect of the armature current, and then the noise interference is removed and the effective information of the high frequency component of the interference signal is retained and marked as a blue line in fig. 4.
2) Measurement of temperature
The thermal imager FILR SC7000 is used to record the temperature. As shown in fig. 5 (b), the temperature rise in the time domain and the space domain is very significant, especially the temperature of the bearing housing is high. Thermal errors have a hysteresis characteristic with respect to the temperature field. The average temperature of all measurement points is taken as input. FIG. 6 shows the measurable travel on the X-axis ofWith X =0 as reference point. The measurement separation distance was 68mm. The temperatures of these 11 marked points are then extracted. T (x, τ + 1) is:
3) Measurement of thermal error
As shown in fig. 7 (a), the thermal error is measured by a laser interferometer. The full stroke reciprocating motion of each measurement is performed according to ISO test standards. The total stroke and operating range are 750mm and 680mm respectively. Further, the reference point and the measurement interval are set to X =0 and 68mm, respectively. The laser interferometer XL80 takes 2 seconds to complete each acquisition and measurement. The nut with retro-reflector is then stopped for 5s at each measurement point to ensure that the laser interferometer has enough time to complete the measurement. By compiling the G code, the reverse overrun was set to 3mm in the experiment. Each measurement is taken several times and the average of the positioning errors moving back and forth is taken as the final positioning error, as shown in fig. 7 (b). Then, the thermal error is obtained by subtracting the original positioning error, as shown in fig. 7 (c).
4) Thermal error model
The transfer function is an important hyper-parameter of the LSTM neural network. As shown in fig. 8 (a), different transfer functions between connection layers with sigmoid, tanh, and relu functions were tested. The fitting accuracy and convergence speed of four optimization methods, including a random gradient descent method (SGD), adatala, adam algorithm, and root mean square algorithm (RMSprop), were tested, as shown in fig. 8 (b). The learning rate is set to 0.001. When tanh is the transfer function, the convergence speed and fitting accuracy are optimal. Moreover, the Adam algorithm also has the best effect as an optimization method. And finally, selecting tanh as a transfer function of the model, and selecting an Adam algorithm as a model optimization algorithm. The architecture and parameters of the current error model are then obtained, as shown in FIG. 9.
The inputs and outputs are vector dimensions of the network data. The loss function is the mean square error. The LSTM layer time step is 4 and the batch size is 60. The training process of the thermal error model is optimized through an Adam algorithm, SGD is replaced by the Adam algorithm to reduce the memory usage and improve the calculation efficiency, the learning rate of the Adam optimization algorithm is set to be alpha =0.001, and the exponential decay rate of the first moment estimation is beta 1 =0.9, exponential decay rate of second moment estimate β 2 =0.999,epsilon=10×10 -8 . The network model was constructed under the Keras framework. The number of thermal error model training times was set to 100.
To compare the prediction performance and convergence, the RNN-based model structure is the same as the present model. In this model, two RNN layers replace two LSTM layers. Furthermore, the hyper-parameters of the RNN model are as follows: the loss function is the mean square error; the time step of the RNN model is 4; batch size is 60; the training process is optimized by Adam algorithm, and the parameter setting is the same as that of the current model. As shown in table 2, fitting performance and calculation time of the thermal error model, the RNN model, and the time series model of the present embodiment were compared. The fitting accuracy of the thermal error model is highest in the embodiment, the time series model is followed, and the training accuracy of the RNN model is lowest. The computation time of the thermal error model, the RNN model and the time series model is respectively 175s, 138s and 75s, and the computation time of the time series model is the shortest because no complex network propagation exists in the computation process. The calculation time of the thermal error model of the embodiment is the longest, and the calculation time of the RNN model is shorter than that of the thermal error model of the embodiment and longer than that of the time series model. In practical application, the time interval of thermal error compensation is five minutes, so the calculation time of the above three models is short enough to perform thermal error compensation.
Table 2 training results for the thermal elongation model under operating condition # 1.
Fig. 10 shows the predicted thermal error under operating condition # 1. The following characteristics are useful for testing data due to the prospective prediction of the LSTM neural network. The parameters for calculating the goodness of fit, the determination coefficients of the minimum value, the maximum value, the average value, the root mean square error and the absolute value of the residual error are | e respectively i | min 、|e i | max 、RMSE and R 2 . Further, the predictive power is η. Then, the goodness-of-fit was calculated as shown in table 3. Determining the coefficient R 2 Has [0,1]The boundary field of (1). The average absolute value of the residual value predicted by the model is small, the root mean square RMSE is similar and close to 0, and the determination coefficient is also close to 1. The prediction capability of the thermal error model reaches over 90 percent, which shows that the prediction accuracy of the model is very high.
Wherein, y i Is a predicted value of thermal error;and n is the true value of the thermal error and the number of samples.
TABLE 3 goodness of fit of thermal errors
5) Thermal error compensation
Fig. 3 shows a compensation system developed for a turning and milling center. Firstly, a measuring instrument is installed, wherein the measuring instrument comprises an infrared thermal imager and an armature current and rotating speed acquisition system, then the temperature compensation module and the numerical control system are connected, and finally, the corresponding parameter setting on a compensation interface is completed. By moving the machine tool axes, the compensation system can compensate thermally induced errors in real time based on model inputs.
Fig. 11 shows the compensation effect. For the thermal error model of the present embodiment, the error fluctuation is smaller than the fluctuation compared to the RNN model and time series model compensation. In addition, the positioning error fluctuation compensated by the timing model is smaller than the positioning error fluctuation compensated by the RNN model. Propagation and accumulation of prediction errors can be avoided in the thermal error model of the present embodiment, and memory behavior can be accurately characterized by the thermal error model of the present embodiment. The RNN model cannot avoid propagation and accumulation of prediction errors, and the prediction errors are larger than those of the existing models. The time series model may describe the storage performance of the thermal error.
The compensation effect is shown in table 4. The thermal error model, compensation of RNN model and positioning error of time series model of this example were in the range of [ -1.4 μm,2.6 μm ], [ -4.7 μm,5.1 μm ] and [ -3.6 μm,4.2 μm ] at t =30 min. The validity of the model is then verified, with sufficient accuracy for error compensation. In addition, the compensation effect of the model provided by the embodiment is the best, and the next is the RNN model and the time series model, and the compensation effect of the RNN model is the worst due to error accumulation.
TABLE 4 Compensation Effect
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.
Claims (5)
1. A linear servo system thermal error modeling method based on energy balance is characterized in that: the method comprises the following steps:
1) According to the energy balance equation of the linear servo system, constructing an expression of an LSTM neural network model:
wherein, Δ L τ+1 Representing the thermal error, I, of the linear servo system at τ +1 run time τ+1 Representing the armature current of the linear servo system at the tau +1 running time; n is τ+1 The rotating speed of the linear servo system at the running time of tau +1 is represented; t (x, τ + 1) represents the temperature of the linear servo system at τ +1 run time and at the linear coordinate x position; t is 0 Represents the ambient temperature; f represents a mapping function of the LSTM neural network model;
2) Acquiring original operation data of a linear servo system, and carrying out wavelet threshold denoising on armature current in the original operation data;
3) Generating an input data vector from the original operation data subjected to wavelet threshold denoising processing, and generating the input data vector into a data file in a npy format for model training;
4) Training an LSTM neural network model to obtain a thermal error model of the linear servo system;
5) To be provided withn τ+1 、T(x,τ+1)、T 4 (x, τ + 1) and T 0 As an input, the thermal error Delta L of the linear servo system is predicted by using a thermal error model of the linear servo system τ+1 ;
In the step 1), the energy balance equation of the linear servo system is as follows:
wherein Q represents an amount of energy increase inside the linear servo system, and:m represents mass, c represents specific heat capacity, α represents coefficient of thermal expansion, Δ L represents thermal expansion,is a coefficient, L represents the length of the screw shaft;
Q b represents the heat generated by the friction of the bearing, and:n represents the rotational speed of the linear servo system, a 6 And a 7 Are all coefficients;
Q M representing the heat generated by the servo motor; and is provided withI denotes the armature current of the linear servo system, a 1 、a 2 And a 3 Are all coefficients;
Q d heat dissipation capacity of the linear servo system; and is provided withQ tr Indicating radiation heat dissipation, Q cht Showing convective heat dissipation, w 6 And w 7 Are all coefficients;
t represents time;
thereby obtaining:
wherein, w 1 、w 2 、w 3 And w 4 Are all coefficients;
thermal error at time period t = τ to t = τ +1The difference is DeltaL τ+1 -ΔL τ And obtaining:
namely:
the hysteresis effect of the thermal error is taken into account, so as to obtain an expression of the LSTM neural network model:
2. the linear servo system thermal error modeling method based on energy balance as claimed in claim 1, wherein: the LSTM neural network model comprises seven layers and is sequentially as follows: the system comprises an input layer, a hidden layer of an input part, a first LSTM network layer, a second LSTM network layer, a hidden layer of an output part, a full connection layer and an output layer, wherein an activation function of the hidden layer of the input part adopts a tanh function, and an activation function of the hidden layer of the output part adopts a relu function.
3. The linear servo system thermal error modeling method based on energy balance as claimed in claim 1, wherein: in the step 2), the method for performing wavelet threshold denoising on the original operation data comprises the following steps:
a fixed threshold λ is used, and:
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
wherein, W j,k Representing wavelet coefficients;
the hard threshold function is defined as:
the soft threshold function is defined as:
wherein the content of the first and second substances,representing wavelet coefficients after threshold processing;
combining a hard threshold function and a soft threshold function, providing a threshold function with continuity, and preprocessing an armature current signal of a servo motor, wherein the expression is as follows:
wherein a is an adjustment factor and can be any normal number.
4. The linear servo system thermal error modeling method based on energy balance as claimed in claim 3, wherein: the value range of a is (0,15 ].
5. The utility model provides a straight line servo system thermal error compensation system based on energy balance which characterized in that: the system comprises a data acquisition system, a data processing system, a thermal error prediction system, a CNC control system and a servo control system;
the data acquisition system is used for acquiring original operation data of the linear servo system and comprises an infrared camera for acquiring temperature field data of the linear servo system, a current monitoring port for acquiring armature current of the linear servo system and an encoder for acquiring rotating speed of the linear servo system;
the data processing system comprises a filter, an amplifier and an A/D converter which are used for filtering, amplifying and carrying out analog-to-digital conversion on the original operation data in sequence;
the thermal error prediction system comprises a computer for operating a linear servo system thermal error model constructed by the linear servo system thermal error modeling method based on energy balance according to any one of claims 1 to 4, wherein the linear servo system thermal error model obtains a thermal error prediction value according to input original operation data processed by the data processing system;
the CNC control system comprises a PLC controller, and the PLC controller obtains error compensation quantities of the linear servo system in different directions according to the thermal error prediction value;
and the servo control system controls the linear servo system to act and perform error compensation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110355438.1A CN113093545B (en) | 2021-04-01 | 2021-04-01 | Linear servo system thermal error modeling method and compensation system based on energy balance |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110355438.1A CN113093545B (en) | 2021-04-01 | 2021-04-01 | Linear servo system thermal error modeling method and compensation system based on energy balance |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113093545A CN113093545A (en) | 2021-07-09 |
CN113093545B true CN113093545B (en) | 2022-11-04 |
Family
ID=76672819
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110355438.1A Active CN113093545B (en) | 2021-04-01 | 2021-04-01 | Linear servo system thermal error modeling method and compensation system based on energy balance |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113093545B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113885321B (en) * | 2021-09-28 | 2022-06-14 | 哈尔滨工业大学 | Memory-related Koopman-based dual-mode ultrasonic motor dead zone fuzzy compensation and linear prediction control method and system |
WO2023113729A1 (en) * | 2021-11-24 | 2023-06-22 | Kriptek Kripto Ve Bilişim Teknolojileri Sanayi Ve Ticaret Anonim Şirketi | High performance machine learning system based on predictive error compensation network and the associated device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111240268A (en) * | 2020-01-14 | 2020-06-05 | 重庆大学 | Axle system thermal error modeling method and thermal error compensation system based on SLSTM neural network |
WO2020168584A1 (en) * | 2019-02-20 | 2020-08-27 | 大连理工大学 | Method for calculating, based on deep neural network and monte carlo method, reliability of machine tool thermal error model |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107091737A (en) * | 2017-06-06 | 2017-08-25 | 太原理工大学 | A kind of study of typical faults of rotor systems combining diagnostic method based on current signal |
WO2019084948A1 (en) * | 2017-11-06 | 2019-05-09 | 大连理工大学 | Radial thermal drift error modeling and compensation method for main spindle of horizontal cnc lathe |
CN108334661B (en) * | 2017-12-29 | 2021-08-06 | 武汉华中数控股份有限公司 | Feed shaft thermal deformation prediction method |
CN110659755B (en) * | 2018-06-28 | 2024-03-05 | 比亚迪股份有限公司 | Modeling method, apparatus and storage medium for predicting motor temperature |
CN110039373B (en) * | 2019-04-04 | 2020-06-09 | 华中科技大学 | Method and system for predicting thermal deformation of spindle of numerical control machine tool |
JP7303065B2 (en) * | 2019-08-23 | 2023-07-04 | ファナック株式会社 | Machine learning device, control system and machine learning method |
CN112433507B (en) * | 2019-08-26 | 2022-10-14 | 电子科技大学 | LSO-LSSVM (least squares support vector machine) -based five-axis numerical control machine tool thermal error comprehensive modeling method |
CN111259498B (en) * | 2020-01-14 | 2021-11-02 | 重庆大学 | Axle system thermal error modeling method and thermal error compensation system based on LSTM neural network |
CN111310373B (en) * | 2020-02-11 | 2022-02-18 | 重庆大学 | Analytic method-based shaft system thermal characteristic analysis method, thermal error modeling method and thermal error compensation system |
-
2021
- 2021-04-01 CN CN202110355438.1A patent/CN113093545B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2020168584A1 (en) * | 2019-02-20 | 2020-08-27 | 大连理工大学 | Method for calculating, based on deep neural network and monte carlo method, reliability of machine tool thermal error model |
CN111240268A (en) * | 2020-01-14 | 2020-06-05 | 重庆大学 | Axle system thermal error modeling method and thermal error compensation system based on SLSTM neural network |
Non-Patent Citations (4)
Title |
---|
Thermal Error Modeling of a Machining Center using Grey System Theory and Adaptive Network-Based Fuzzy Inference System;Kun-chieh Wang等;《2006 IEEE Conference on Cybernetics and Intelligent Systems》;20061204;全文 * |
Thermal-Structure Interaction Characteristics of a High-Speed Spindle- Bearing System;Ma Chi等;《International Journal of Machine Tools & Manufacture》;20190209;第137卷;第42-57页 * |
基于BP神经网络的数控机床综合误差补偿方法;王洪乐等;《西安交通大学学报》;20170305(第06期);第138-146页 * |
大型数控成形磨齿机热误差建模及补偿;周宝仓等;《中南大学学报(自然科学版)》;20171026;第48卷(第10期);第2672-2677页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113093545A (en) | 2021-07-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113051831B (en) | Modeling method and thermal error control method for thermal error self-learning prediction model of machine tool | |
Zhang et al. | Machine tool thermal error modeling and prediction by grey neural network | |
CN113093545B (en) | Linear servo system thermal error modeling method and compensation system based on energy balance | |
CN109240204B (en) | Numerical control machine tool thermal error modeling method based on two-step method | |
CN114548368B (en) | Modeling method and prediction method of lithium battery temperature field prediction model based on multilayer nuclear overrun learning machine | |
CN106842922B (en) | Numerical control machining error optimization method | |
CN110096810B (en) | Industrial process soft measurement method based on layer-by-layer data expansion deep learning | |
Chen et al. | A data-driven model for thermal error prediction considering thermoelasticity with gated recurrent unit attention | |
Wang et al. | Thermal error modeling of a machining center using grey system theory and adaptive network-based fuzzy inference system | |
CN113051832B (en) | Spindle system thermal error modeling method, error prediction system, error control method and cloud computing system | |
CN103885386A (en) | Gray model thermal error data processing method based on Kalman filtering | |
CN115409067A (en) | Method for predicting residual life of numerical control machine tool assembly | |
Li et al. | Thermal error modeling of feed axis in machine tools using particle swarm optimization-based generalized regression neural network | |
Abdulshahed et al. | Application of GNNMCI (1, N) to environmental thermal error modelling of CNC machine tools | |
Li et al. | A wiener-based remaining useful life prediction method with multiple degradation patterns | |
Yao et al. | Synthetic error modeling for NC machine tools based on intelligent technology | |
CN113591020A (en) | Nonlinear system state estimation method based on axial symmetry box space filtering | |
CN113848876B (en) | Low-communication and low-calculation-consumption fault detection method for multi-AGV distance cruise system | |
CN114093433B (en) | Observer-based method and system for evaluating prediction precision of single-ton energy consumption in rectification process | |
CN115526424A (en) | Machine tool spindle Z-direction thermal deformation prediction method based on multi-source heterogeneous information fusion | |
Feng et al. | Thermal error modelling of the spindle using neurofuzzy systems | |
Pian et al. | Improved bee colony algorithm and its application in optimization of thermal expansion coefficient | |
CN111625995A (en) | Online time-space modeling method integrating forgetting mechanism and double ultralimit learning machines | |
CN113609772B (en) | Cement finished product specific surface area prediction method based on convolution quasi-cyclic neural network | |
CN114490596B (en) | Method for cleaning transformer oil chromatographic data based on machine learning and neural network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |