CN113093545A - 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 PDF

Info

Publication number
CN113093545A
CN113093545A CN202110355438.1A CN202110355438A CN113093545A CN 113093545 A CN113093545 A CN 113093545A CN 202110355438 A CN202110355438 A CN 202110355438A CN 113093545 A CN113093545 A CN 113093545A
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.)
Granted
Application number
CN202110355438.1A
Other languages
Chinese (zh)
Other versions
CN113093545B (en
Inventor
马驰
刘佳兰
桂洪泉
王时龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University
Original Assignee
Chongqing University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Chongqing University filed Critical Chongqing University
Priority to CN202110355438.1A priority Critical patent/CN113093545B/en
Publication of CN113093545A publication Critical patent/CN113093545A/en
Application granted granted Critical
Publication of CN113093545B publication Critical patent/CN113093545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric
    • G05B13/04Adaptive 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/042Adaptive 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 with 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

Linear servo system thermal error modeling method and compensation system based on energy balance
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 not only depends on the current input, but also has a memory characteristic for the historical thermal effect 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 the standard RNN, this repeated structure block has only a 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:
Figure BDA0003003560200000011
wherein, Δ Lτ+1Representing the thermal error, I, of the linear servo system at τ +1 run timeτ+1Representing straight linesArmature current of servo system in tau +1 running time; n isτ+1The 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 is0Represents 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 with 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 with
Figure BDA0003003560200000021
nτ+1
Figure BDA0003003560200000022
T(x,τ+1)、T4(x, τ +1) and T0As 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:
Figure BDA0003003560200000023
wherein Q represents an amount of energy increase inside the linear servo system, and:
Figure BDA0003003560200000024
m represents mass, c represents specific heat capacity, α represents coefficient of thermal expansion, Δ L represents thermal expansion,
Figure BDA0003003560200000025
is a coefficient;
Qbindicating shaftBearing heat generated by friction, and:
Figure BDA0003003560200000026
n represents the rotational speed of the linear servo system, a6And a7Are all coefficients;
QMrepresenting the heat generated by the servo motor; and is
Figure BDA0003003560200000027
I denotes the armature current of the linear servo system, a1、a2And a3Are all coefficients;
Qnheat generated by friction of the ball screw; and is
Figure BDA0003003560200000028
a4And a5Are all coefficients;
Qdheat dissipation capacity of the linear servo system; and is
Figure BDA0003003560200000029
QtrIndicating radiation heat dissipation, QchtShowing convective heat dissipation, w6And w7Are all coefficients;
t represents time;
thereby obtaining:
Figure BDA00030035602000000210
wherein, w1、w2、w3And w4Are all coefficients;
the thermal expansion at time t τ +1 is Δ Lτ+1-ΔLτObtaining:
Figure BDA00030035602000000211
namely:
Figure BDA00030035602000000212
and (3) considering the hysteresis effect of the thermal error, so as to obtain an expression for establishing an LSTM neural network model:
Figure BDA00030035602000000213
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:
Figure BDA0003003560200000031
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
Figure BDA0003003560200000032
wherein, Wj,kRepresenting wavelet coefficients;
the hard threshold function is defined as:
Figure BDA0003003560200000033
the soft threshold function is defined as:
Figure BDA0003003560200000034
wherein the content of the first and second substances,
Figure BDA0003003560200000035
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:
Figure BDA0003003560200000036
wherein a is an adjustment factor and can be any normal number.
Further, the value range of a is [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 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, 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 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, constructing an expression of an LSTM neural network model by utilizing an energy balance equation of a linear servo system, and because armature current of a servo motor has obvious uncertainty and complexity, denoising the armature current in original operation 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 thereof, so that the information can be stably and reversely transmitted 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 precision and the 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) to (f) are graphs of thermal error compensation when t is 30min, t is 60min, t is 90min, t is 120min, t is 180min, and t is 240min, respectively.
Detailed Description
The present invention is further described with reference to the following drawings and specific examples so that those skilled in the art can better understand the present invention and can practice the present invention, but the examples are not intended to limit 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:
Figure BDA0003003560200000051
wherein, Δ Lτ+1Representing the thermal error, I, of the linear servo system at τ +1 run timeτ+1Representing the armature current of the linear servo system at the running time of tau + 1; n isτ+1The 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 is0Represents 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 with 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 with
Figure BDA0003003560200000052
nτ+1
Figure BDA0003003560200000053
T(x,τ+1)、T4(x, τ +1) and T0As 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 motorMThe equation is:
QM=Pcopper+Piron+Pair+Pmech+Peddy+Paddtional
wherein, PcopperRepresents copper loss; pironRepresents the iron loss; pairRepresents an air resistance loss; pmechRepresents mechanical losses; peddyRepresents the eddy current loss; paddtionalRepresenting hysteresis losses. PcopperIs the major part of the electrical heating, which is proportional to the square of the armature current I:
Pcopper=k1I2
wherein k is1Is a coefficient;
Piron、Pair、Pmechand PeddyAre all proportional to the square of the speed n, PaddtionalProportional to the speed n, i.e.:
Piron=k2n+k3n2
Pair=k4n2
Pmech=k5n2
Peddy=k6n2
Paddtional=k7n
wherein k is2、k3、k4、k5、k6And k7Are all coefficients.
The total electrical heating equation can be obtained as follows:
QM=k1I2+(k2n+k3n2)+k4n2+k5n2+k6n2+k7n
=k1I2+(k2+k7)n+(k3+k4+k5+k6)n2
the generalized form of total heat is expressed as:
QM=a1I2+a2n+a3n2
wherein, a1、a2And a3Are all coefficients.
During the τ operating period, the generalized form of the total heat of the electric heat is expressed as:
Figure BDA0003003560200000061
where τ denotes the running time and t denotes time.
2) Heat generated by friction of ball screw
Friction of ball screwThermal QnWith friction torque M2Proportional to the speed n, i.e.:
Qn∝nM2
M2=k8+k9n23
wherein k is8And k9Are coefficients, i.e.:
Qn∝n(k8+k9n23)
a general expression for frictional heat can be found:
Qn=a4n+a5n53
wherein, a4And a5Are coefficients.
Total frictional heat Q of ball screw during tau running periodnThe generalized expression of (1) is:
Figure BDA0003003560200000062
3) heat generated by friction of bearings
Friction heat and friction torque M generated by bearing1Proportional to the angular velocity ω, i.e.:
Qb∝M1·ω=M1·2πn
M1=k10n23+k11
wherein k is10And k11Are coefficients.
The total heat of friction generated by the bearing is as follows:
Qb=M1·ω=(k10n23+k11)·2πn
the general expression for the total heat of friction generated by a bearing is:
Qb=a6n+a7n53
wherein, a6And a7The coefficients are represented.
During the tau running period, the generalized expression of the total heat of friction generated by the bearing is as follows:
Figure BDA0003003560200000071
4) heat dissipation property
The heat dissipated by convective heat transfer is proportional to the temperature difference Δ T (x, T), i.e.:
Qcht∝ΔT(x,t)=[T(x,t)-T0]
wherein, T0Is ambient temperature.
The generalized expression for the amount of heat dissipated by convective heat transfer during the τ operating period is:
Figure BDA0003003560200000072
the heat radiation of the heat radiation is:
Figure BDA0003003560200000073
the generalized expression for the amount of heat dissipated by thermal radiation during the τ operating period is:
Figure BDA0003003560200000074
then during the τ operation period, the total heat dissipated is expressed as:
Figure BDA0003003560200000075
the energy balance equation of the linear servo system is as follows:
Figure BDA0003003560200000076
wherein Q represents an amount of energy increase inside the linear servo system, and:
Figure BDA0003003560200000081
wherein m represents mass and c represents specific heat capacity.
Thermal expansion delta L and coefficient of expansion alpha, length L of screw shaft and average temperature rise
Figure BDA0003003560200000082
In direct proportion, namely:
Figure BDA0003003560200000083
the following results were obtained:
Figure BDA0003003560200000084
wherein the content of the first and second substances,
Figure BDA0003003560200000085
is a coefficient;
5) thermal error modeling
Then, during the period τ, the energy balance equation of the linear servo system can be expressed as:
Figure BDA0003003560200000086
during the τ +1 operation period, the linear servo system energy balance equation can be expressed as:
Figure BDA0003003560200000087
the thermal expansion of the linear servo system in the period from tau to tau +1 can be obtained:
Figure BDA0003003560200000088
namely:
Figure BDA0003003560200000089
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:
Figure BDA00030035602000000810
i.e. thermal error Δ Lτ+1Armature current I of servo motorτ+1Rotational speed nτ+1Temperature T (x, τ +1) at time τ +1, thermal error Δ L at time ττThermal error Δ L at time τ -1τ-1At Δ Lτ-2Thermal error Δ L of timeτ-2And the ambient temperature T0It 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, wherein
Figure BDA00030035602000000811
nτ+1,
Figure BDA00030035602000000812
T(x,τ+1),T4(x,τ+1),ΔLτ,ΔLτ-1,ΔLτ-2,and T0The isoparameters are arguments. For the more general case, the mapping relationship is defined as:
Figure BDA00030035602000000813
the input of the model is a
Figure BDA00030035602000000814
nτ+1,
Figure BDA00030035602000000815
T(x,τ+1),T4(x,τ+1),ΔLτ,ΔLτ-1,ΔLτ-2,and T0And (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τ+1Thermal error Δ L dependent on time ττThermal error Δ L at time τ -1τ-1And thermal error Δ L at time τ -2τ-2Indicating 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 take 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 a problem 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 the long-term state, as shown in FIG. 2, x in the figuretAnd htRepresenting 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, LSTThe M neural network model can record the thermal error delta Lτ,ΔLτ-1,andΔLτ-2Then the thermal error Δ L is calculatedτ,ΔLτ-1,andΔLτ-2As part of the next thermal error calculation input. Therefore, Δ L can be deleted from the right sideτ,ΔLτ-1,andΔLτ-2And reserve the item of
Figure BDA0003003560200000091
nτ+1,
Figure BDA0003003560200000092
T(x,τ+1),T4(x,τ+1),and T0The 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:
Figure BDA0003003560200000093
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 T0
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:
Figure BDA0003003560200000094
input unitThe weight vector of the hidden layer 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 _ out 1. The weight vector for the fully connected layer is w _ out2 and the threshold vector is b _ out 2. This means that the model input contains eight variables (a)
Figure BDA0003003560200000101
nτ+1,
Figure BDA0003003560200000102
T(x,τ+1),T4(x,τ+1),T(x,τ),T4(x,τ),and T0) 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 htThen 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 removed by setting an appropriate threshold. It is important to select an appropriate threshold. A fixed threshold λ is typically used, and:
Figure BDA0003003560200000103
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
Figure BDA0003003560200000104
wherein, Wj,kRepresenting wavelet coefficients;
the hard threshold function is defined as:
Figure BDA0003003560200000105
the soft threshold function is defined as:
Figure BDA0003003560200000106
wherein the content of the first and second substances,
Figure BDA0003003560200000107
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:
Figure BDA0003003560200000108
wherein a is an adjustment factor and can be any normal number.
When a → + ∞, the limit value of the above expression approaches Wj,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 approaches 0, the above expression approaches Wj,kIt is equivalent to a hard threshold function. The conclusion is that the threshold function can be made to have a hard threshold function sum by adjusting the value of aThe characteristics of the soft threshold function, so that different threshold functions are obtained. When a is 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 generally larger to facilitate noise reduction. That is, the value range of a is preferably [0,15]]。
As shown in fig. 3, the thermal error compensation system of the linear servo 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 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, 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 describes the thermal error model of the linear servo system obtained by modeling by using the thermal error modeling method of the linear servo system based on energy balance and the effect of thermal error compensation of the linear servo system by using a specific example.
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 and temperature needs to be measured.
TABLE 1 working conditions
Figure BDA0003003560200000111
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 of
Figure BDA0003003560200000121
And taking X as 0 as a reference point. The measurement separation distance was 68 mm. The temperatures of these 11 marked points are then extracted. T (x, τ +1) is:
Figure BDA0003003560200000122
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 performed 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 beta10.9, the second moment estimated exponential decay rate is beta2=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 the 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.
Figure BDA0003003560200000131
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 respectivelyi|min、|ei|max
Figure BDA0003003560200000132
RMSE and R2. Further, the predictive power is η. Then, the goodness-of-fit was calculated as shown in table 3. Determining the coefficient R2Having a value of [0,1]Is not limited byA domain. 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.
Figure BDA0003003560200000133
Figure BDA0003003560200000134
Figure BDA0003003560200000135
Figure BDA0003003560200000136
Figure BDA0003003560200000141
Figure BDA0003003560200000142
Wherein, yiIs a predicted value of thermal error;
Figure BDA0003003560200000143
the actual thermal error value is n, and the number of samples is n.
TABLE 3 goodness of fit of thermal errors
Figure BDA0003003560200000144
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 time sequence 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 are 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
Figure BDA0003003560200000145
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 (6)

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:
Figure FDA0003003560190000011
wherein, Δ Lτ+1Representing the thermal error, I, of the linear servo system at τ +1 run timeτ+1Representing the armature current of the linear servo system at the running time of tau + 1; n isτ+1The 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 is0Represents 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 with 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 with
Figure FDA0003003560190000012
nτ+1
Figure FDA0003003560190000013
T(x,τ+1)、T4(x, τ +1) and T0As 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
2. The linear servo system thermal error modeling method based on energy balance as claimed in claim 1, wherein: in the step 1), the energy balance equation of the linear servo system is as follows:
Figure FDA0003003560190000014
wherein Q represents an amount of energy increase inside the linear servo system, and:
Figure FDA0003003560190000015
m represents mass, c represents specific heat capacity, α represents coefficient of thermal expansion, Δ L represents thermal expansion,
Figure FDA0003003560190000016
is a coefficient;
Qbrepresents the heat generated by the friction of the bearing, and:
Figure FDA0003003560190000017
n represents the rotational speed of the linear servo system, a6And a7Are all coefficients;
QMrepresenting the heat generated by the servo motor; and is
Figure FDA0003003560190000018
I denotes the armature current of the linear servo system, a1、a2And a3Are all coefficients;
Qnheat generated by friction of the ball screw; and is
Figure FDA0003003560190000019
a4And a5Are all coefficients;
Qdheat dissipation capacity of the linear servo system; and is
Figure FDA00030035601900000110
QtrIndicating radiation heat dissipation, QchtShowing convective heat dissipation, w6And w7Are all coefficients;
t represents time;
thereby obtaining:
Figure FDA0003003560190000021
wherein, w1、w2、w3And w4Are all coefficients;
the thermal expansion at time t τ +1 is Δ Lτ+1-ΔLτObtaining:
Figure FDA0003003560190000022
namely:
Figure FDA0003003560190000023
the hysteresis effect of the thermal error is taken into account, so as to obtain an expression of the LSTM neural network model:
Figure FDA0003003560190000024
3. 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.
4. 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:
Figure FDA0003003560190000025
where N represents the length of the signal, σ represents the standard deviation of the noise, and:
Figure FDA0003003560190000026
wherein, Wj,kRepresenting wavelet coefficients;
the hard threshold function is defined as:
Figure FDA0003003560190000027
the soft threshold function is defined as:
Figure FDA0003003560190000028
wherein the content of the first and second substances,
Figure FDA0003003560190000029
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:
Figure FDA0003003560190000031
wherein a is an adjustment factor and can be any normal number.
5. The linear servo system thermal error modeling method based on energy balance as set forth in claim 4, wherein: the value range of a is [0,15 ].
6. 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 5, 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.
CN202110355438.1A 2021-04-01 2021-04-01 Linear servo system thermal error modeling method and compensation system based on energy balance Active CN113093545B (en)

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 true CN113093545A (en) 2021-07-09
CN113093545B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885321A (en) * 2021-09-28 2022-01-04 哈尔滨工业大学 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 (11)

* Cited by examiner, † Cited by third party
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
CN108334661A (en) * 2017-12-29 2018-07-27 武汉华中数控股份有限公司 A kind of feed shaft thermal deformation prediction technique
CN109800537A (en) * 2019-02-20 2019-05-24 大连理工大学 A kind of machine tool thermal error model reliability degree calculation method based on deep neural network and Monte Carlo method
CN110039373A (en) * 2019-04-04 2019-07-23 华中科技大学 A kind of main shaft of numerical control machine tool thermal deformation prediction technique and system
CN110659755A (en) * 2018-06-28 2020-01-07 比亚迪股份有限公司 Modeling method, device and storage medium for predicting motor temperature
US20200064810A1 (en) * 2017-11-06 2020-02-27 Dalian University Of Technology A modeling and compensation method for the spindle's radial thermal drift error in a horizontal cnc lathe
CN111240268A (en) * 2020-01-14 2020-06-05 重庆大学 Axle system thermal error modeling method and thermal error compensation system based on SLSTM neural network
CN111259498A (en) * 2020-01-14 2020-06-09 重庆大学 Axle system thermal error modeling method and thermal error compensation system based on LSTM neural network
CN111310373A (en) * 2020-02-11 2020-06-19 重庆大学 Analytic method-based shaft system thermal characteristic analysis method, thermal error modeling method and thermal error compensation system
US20210055240A1 (en) * 2019-08-23 2021-02-25 Fanuc Corporation Machine learning device, control system, and machine learning method
CN112433507A (en) * 2019-08-26 2021-03-02 电子科技大学 LSO-LSSVM (least squares support vector machine) -based five-axis numerical control machine tool thermal error comprehensive modeling method

Patent Citations (12)

* Cited by examiner, † Cited by third party
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
US20200064810A1 (en) * 2017-11-06 2020-02-27 Dalian University Of Technology A modeling and compensation method for the spindle's radial thermal drift error in a horizontal cnc lathe
CN108334661A (en) * 2017-12-29 2018-07-27 武汉华中数控股份有限公司 A kind of feed shaft thermal deformation prediction technique
CN110659755A (en) * 2018-06-28 2020-01-07 比亚迪股份有限公司 Modeling method, device and storage medium for predicting motor temperature
CN109800537A (en) * 2019-02-20 2019-05-24 大连理工大学 A kind of machine tool thermal error model reliability degree calculation method based on deep neural network and Monte Carlo method
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
CN110039373A (en) * 2019-04-04 2019-07-23 华中科技大学 A kind of main shaft of numerical control machine tool thermal deformation prediction technique and system
US20210055240A1 (en) * 2019-08-23 2021-02-25 Fanuc Corporation Machine learning device, control system, and machine learning method
CN112433507A (en) * 2019-08-26 2021-03-02 电子科技大学 LSO-LSSVM (least squares support vector machine) -based five-axis numerical control machine tool thermal error comprehensive modeling method
CN111240268A (en) * 2020-01-14 2020-06-05 重庆大学 Axle system thermal error modeling method and thermal error compensation system based on SLSTM neural network
CN111259498A (en) * 2020-01-14 2020-06-09 重庆大学 Axle system thermal error modeling method and thermal error compensation system based on LSTM neural network
CN111310373A (en) * 2020-02-11 2020-06-19 重庆大学 Analytic method-based shaft system thermal characteristic analysis method, thermal error modeling method and thermal error compensation system

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
KUN-CHIEH WANG等: "Thermal Error Modeling of a Machining Center using Grey System Theory and Adaptive Network-Based Fuzzy Inference System", 《2006 IEEE CONFERENCE ON CYBERNETICS AND INTELLIGENT SYSTEMS》 *
MA CHI等: "Thermal-Structure Interaction Characteristics of a High-Speed Spindle- Bearing System", 《INTERNATIONAL JOURNAL OF MACHINE TOOLS & MANUFACTURE》 *
刘颖超: "直流电机电枢绕组电流采集系统的研究", 《中国优秀博硕士学位论文全文数据库(硕士) 工程科技Ⅱ辑》 *
吴汉夫等: "加工中心热误差综合预测模型的研究", 《组合机床与自动化加工技术》 *
周宝仓等: "大型数控成形磨齿机热误差建模及补偿", 《中南大学学报(自然科学版)》 *
王洪乐等: "基于BP神经网络的数控机床综合误差补偿方法", 《西安交通大学学报》 *
马驰等: "基于分形理论及蒙特卡罗法的电主轴热特性分析", 《上海交通大学学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113885321A (en) * 2021-09-28 2022-01-04 哈尔滨工业大学 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

Also Published As

Publication number Publication date
CN113093545B (en) 2022-11-04

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
Abdulshahed et al. Thermal error modelling of a gantry-type 5-axis machine tool using a grey neural network model
CN111240268B (en) Axle system thermal error modeling method and thermal error compensation system based on SLSTM 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
CN110908364B (en) Fault detection method based on robust interval estimation
CN114548368A (en) Modeling method, prediction model and prediction method of lithium battery temperature field prediction model based on multilayer nuclear overrun learning machine
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
Hausmann et al. Managing the uncertainty in data-acquisition by in situ measurements: a review and evaluation of sensing machine element-approaches in the context of digital twins
Li et al. Thermal error modeling of feed axis in machine tools using particle swarm optimization-based generalized regression neural network
CN114237154B (en) Thermal error prediction model based on ONT-GCN space-time model, modeling method and haze-edge-fog-cloud error compensation system
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
CN113553677B (en) Method for predicting service life of gas turbine containing measurement error two-dimensional vibration parameters
Feng et al. Thermal error modelling of the spindle using neurofuzzy systems
Shanthi et al. Machine Learning Architecture in Soft Sensor for Manufacturing Control and Monitoring System Based on Data Classification
Pian et al. Improved bee colony algorithm and its application in optimization of thermal expansion coefficient
CN113609772B (en) Cement finished product specific surface area prediction method based on convolution quasi-cyclic neural network
Wei et al. Thermal error compensation of CNC machine based on data-driven

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