Method and device for compensating thermal errors of a spindle of a machine tool
By establishing a spindle thermal error prediction model in CNC machine tools and using spindle speed and thermal elongation for error compensation, the problems of high sensor cost and hysteresis are solved, and the machining accuracy of machine tools is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2026-04-07
AI Technical Summary
In the existing technology, the machine tool spindle thermal error compensation method relies on sensors to detect temperature changes, which is costly and ignores the hysteresis phenomenon between thermal error and temperature, affecting the compensation effect.
By acquiring the spindle speed and thermal expansion of the CNC machine tool electric spindle, a spindle thermal error prediction model is established. The prediction results output by the model are used for error compensation, avoiding dependence on sensors and taking into account the hysteresis phenomenon between thermal error and temperature.
It eliminates the need for dedicated sensors to detect temperature changes, reduces costs, improves machining accuracy during cold starts, effectively compensates for thermal errors, and enhances machining precision.
Smart Images

Figure CN116900792B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine tool processing technology, and in particular to a method and apparatus for compensating for spindle thermal errors in machine tool processing. Background Technology
[0002] CNC machine tools are subject to various interferences during machining, the most significant of which is temperature variation. During operation, the machine tool generates heat due to power consumption, mechanical friction, and ambient temperature, causing continuous temperature fluctuations that affect its accuracy and stability. The spindle is one of the core components of the machine tool, directly impacting machining accuracy and efficiency. However, the spindle is also affected by temperature during machining, resulting in thermal errors that influence machining outcomes. Therefore, compensating for thermal errors in the machine tool spindle is crucial.
[0003] In related technologies, the machine tool spindle thermal error compensation method requires the use of sensors to detect the temperature change of the machine tool spindle, and then the use of mathematical models to establish the functional relationship between the thermal error of the machine tool spindle and the temperature distribution of the machine tool.
[0004] However, the sensors in the relevant technologies are expensive, operate in harsh environments, and ignore the "hysteresis phenomenon" between thermal error and temperature. That is, the change of thermal error lags behind (or leads) the change of temperature value. This means that the change of thermal error is not immediately reflected in the temperature, but has a certain delay, which increases the difficulty of thermal error compensation and needs to be improved. Summary of the Invention
[0005] This application provides a method and apparatus for compensating for thermal errors in machine tool spindles, in order to solve the technical problems in related technologies, such as the high cost and harsh operating environment of relying on sensors to detect temperature changes in machine tool spindles, and the neglect of the hysteresis phenomenon between thermal error and temperature, which affects the compensation effect of thermal error.
[0006] The first aspect of this application provides a method for compensating for spindle thermal errors in machine tool processing, comprising the following steps: acquiring the spindle speed and thermal expansion of the electric spindle of a CNC machine tool at the same moment, and obtaining thermal error data of the electric spindle at the same moment based on the spindle speed and current thermal expansion; establishing a spindle thermal error prediction model of the CNC machine tool using spindle speed and thermal error data at multiple moments within a preset time period; obtaining a spindle thermal error compensation value using the prediction results output by the spindle thermal error prediction model, and performing error compensation based on the spindle thermal error compensation value.
[0007] Optionally, in one embodiment of this application, the step of establishing a spindle thermal error prediction model using spindle speed and thermal error data at multiple times within a preset time period includes: generating a thermal deformation curve of the electric spindle based on the thermal elongation at multiple times within the preset time period; and analyzing the thermal deformation law of the electric spindle using the thermal deformation curve to obtain analysis results for model training.
[0008] Optionally, in one embodiment of this application, the step of analyzing the thermal deformation law of the electric spindle using the thermal deformation curve to obtain the analysis result for model training includes: fitting the thermal elongation as a first fitting function of time; fitting the thermal elongation as a second fitting function of the spindle speed; and calculating a three-dimensional fitting surface based on the first and second fitting functions to obtain the analysis result.
[0009] Optionally, in one embodiment of this application, obtaining the spindle speed and thermal expansion of the CNC machine tool's electric spindle at the same moment includes: obtaining the spindle speed using the encoder of the electric spindle while simultaneously collecting the thermal expansion using a dial indicator.
[0010] A second aspect of this application provides a spindle thermal error compensation device for machine tool processing, comprising: an acquisition module for acquiring the spindle speed and thermal expansion of an electric spindle of a CNC machine tool at the same moment, and obtaining thermal error data of the electric spindle at the same moment based on the spindle speed and current thermal expansion; a modeling module for establishing a spindle thermal error prediction model of the CNC machine tool using spindle speed and thermal error data at multiple moments within a preset time period; and a compensation module for obtaining a spindle thermal error compensation value using the prediction result output by the spindle thermal error prediction model, and performing error compensation based on the spindle thermal error compensation value.
[0011] Optionally, in one embodiment of this application, the modeling module includes: a generation unit, configured to generate a thermal deformation curve of the electric spindle based on the thermal elongation at multiple time points within the preset time period; and an analysis unit, configured to analyze the thermal deformation law of the electric spindle using the thermal deformation curve to obtain analysis results for model training.
[0012] Optionally, in one embodiment of this application, the analysis unit includes: a first fitting subunit for fitting the thermal elongation to a first fitting function of time; a second fitting subunit for fitting the thermal elongation to a second fitting function of the spindle speed; and a calculation subunit for calculating a three-dimensional fitting surface based on the first and second fitting functions to obtain the analysis result.
[0013] Optionally, in one embodiment of this application, the acquisition module includes: an acquisition unit, used to acquire the spindle speed using the encoder of the electric spindle and to collect the thermal elongation using a dial indicator.
[0014] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the spindle thermal error compensation method for machine tool processing as described in the above embodiments.
[0015] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to perform the spindle thermal error compensation method for machine tool machining as described in the above embodiments.
[0016] This application's embodiments can obtain the thermal error data of the electric spindle at the same moment based on the spindle speed and thermal expansion of the electric spindle of a CNC machine tool at the same time. Then, within a preset time period, a spindle thermal error prediction model for the CNC machine tool is established using spindle speed and thermal error data from multiple moments. The prediction results output by the spindle thermal error prediction model are used to obtain the spindle thermal error compensation value. Error compensation is performed based on the spindle thermal error compensation value. This eliminates the need for dedicated sensors to detect temperature changes in the electric spindle, saving costs. Furthermore, it fully considers the hysteresis phenomenon between thermal error and temperature, improving machining accuracy during cold starts. Therefore, it solves the technical problem in related technologies where the hysteresis phenomenon between thermal error and temperature is ignored, thus affecting the thermal error compensation effect.
[0017] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0018] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0019] Figure 1 This is a flowchart of a spindle thermal error compensation method for machine tool processing according to an embodiment of this application;
[0020] Figure 2 This is a schematic diagram of a spindle thermal elongation fitting surface according to an embodiment of this application;
[0021] Figure 3 This is a schematic diagram illustrating the thermal error compensation effect of an electric spindle at 3000 rpm according to an embodiment of this application;
[0022] Figure 4This is a schematic diagram illustrating the thermal error compensation effect of an electric spindle at 5000 rpm according to an embodiment of this application;
[0023] Figure 5 This is a flowchart of a spindle thermal error compensation method for machine tool processing according to an embodiment of this application;
[0024] Figure 6 This is a schematic diagram of the structure of a spindle thermal error compensation device for machine tool processing according to an embodiment of this application;
[0025] Figure 7 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0026] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0027] The following description, with reference to the accompanying drawings, illustrates a method and apparatus for compensating the thermal error of a machine tool spindle according to an embodiment of this application. Addressing the technical problems mentioned in the background art, where relying on sensors to detect temperature changes in the machine tool spindle is costly, operates in harsh environments, and ignores the hysteresis phenomenon between thermal error and temperature, thus affecting the compensation effect of thermal error, this application provides a method for compensating the thermal error of a machine tool spindle. In this method, thermal error data of the electric spindle at the same moment can be obtained based on the spindle speed and thermal elongation at the same moment. A spindle thermal error prediction model for the CNC machine tool is then established using spindle speed and thermal error data from multiple moments within a preset time period. The spindle thermal error compensation value is obtained using the prediction results output by the model. Error compensation is then performed based on the spindle thermal error compensation value. This eliminates the need for dedicated sensors to detect temperature changes in the electric spindle, saving costs, and fully considers the hysteresis phenomenon between thermal error and temperature, improving machining accuracy during cold starts. Therefore, this method solves the technical problem in the related art where the hysteresis phenomenon between thermal error and temperature is ignored, thus affecting the compensation effect of thermal error.
[0028] Specifically, Figure 1 This is a flowchart illustrating a spindle thermal error compensation method for machine tool processing provided in an embodiment of this application.
[0029] like Figure 1 As shown, the spindle thermal error compensation method for this machine tool includes the following steps:
[0030] In step S101, the spindle speed and thermal expansion of the electric spindle of the CNC machine tool at the same moment are obtained, and the thermal error data of the electric spindle at the same moment is obtained based on the spindle speed and current thermal expansion at the same moment.
[0031] Taking a precision vertical grinding machine as an example, the electric spindle speed range of the precision vertical grinding machine is 0-5000 r / min. During the grinding machine's program operation, only the spindle and Z-axis rotate, and the elongation change of the spindle end face is detected. In this embodiment, after each program operation, the elongation of the spindle end face can also be detected once at a fixed position (such as Z-500mm coordinate), thereby obtaining the real-time thermal error data of the electric spindle.
[0032] Optionally, in one embodiment of this application, obtaining the spindle speed and thermal expansion of the electric spindle of the CNC machine tool at the same moment includes: obtaining the spindle speed using the encoder of the electric spindle while simultaneously collecting the thermal expansion using a dial indicator.
[0033] Understandably, in related technologies, sensors can be used to detect temperature changes in machine tool spindles, and then mathematical models can be used to establish a functional relationship between the thermal error of the machine tool spindle and the temperature distribution of the machine tool. However, taking temperature sensors as an example, temperature sensors are prone to damage, require precise installation and calibration, have high environmental requirements, low efficiency, and high sensor costs. As a result, the established mathematical models are difficult to achieve reasonable and efficient thermal compensation prediction.
[0034] The embodiments of this application can obtain the spindle speed by means of the encoder of the electric spindle itself, and use a dial indicator that is kept fixed to measure the change of thermal expansion of the precision electric spindle in real time to obtain real-time thermal error data of the electric spindle, thereby effectively reducing costs and equipment barriers.
[0035] In step S102, a spindle thermal error prediction model for the CNC machine tool is established using spindle speed and thermal error data from multiple time points within a preset time period.
[0036] In actual implementation, the embodiments of this application can use spindle speed and time as input variables and spindle thermal error data as output variables. A spindle thermal error prediction model is established by using data from multiple time points. The thermal error data is predicted by the spindle thermal error prediction model, and corresponding compensation is performed. It does not rely on additional sensors, has lower costs, and fully considers the phenomenon that changes in thermal error lag (or lead) the changes in temperature values. It has a higher level of intelligence and higher compensation efficiency, thereby effectively improving the machining accuracy during cold start.
[0037] Optionally, in one embodiment of this application, a spindle thermal error prediction model is established using spindle speed and thermal error data from multiple time points within a preset time period, including: generating a thermal deformation curve of the electric spindle based on the thermal elongation at multiple time points within a preset time period; analyzing the thermal deformation law of the electric spindle using the thermal deformation curve to obtain analysis results for model training.
[0038] In some embodiments, this application can collect data on the thermal elongation of the Z-axis of a CNC machine tool during a preset time (e.g., 100 minutes) from cold to hot, and generate a thermal deformation curve of the electric spindle to obtain the thermal deformation trend of the CNC machine tool, thereby analyzing the thermal deformation law of the electric spindle in the Z direction.
[0039] Optionally, in one embodiment of this application, the thermal deformation law of the electric spindle is analyzed using a thermal deformation curve to obtain analysis results for model training, including: fitting the thermal elongation as a first fitting function of time; fitting the thermal elongation as a second fitting function of the spindle speed; and calculating a three-dimensional fitting surface based on the first and second fitting functions to obtain the analysis results.
[0040] Furthermore, in this embodiment of the application, based on the trend of the sensorless measurement time t and the thermal deformation displacement data, i.e., the thermal deformation trend, the deformation data s can be fitted as a function of time t and the rotational speed variable n, respectively, to obtain a first fitting function and a second fitting function. Thus, through fitting and numerical calculation, a three-dimensional fitting surface can be obtained. The three-dimensional fitting surface can be as follows: Figure 2 As shown.
[0041] In step S103, the spindle thermal error compensation value is obtained by using the prediction result output by the spindle thermal error prediction model, and error compensation is performed based on the spindle thermal error compensation value.
[0042] As one possible approach, embodiments of this application can utilize the prediction results output by the spindle thermal error prediction model to obtain the spindle thermal error compensation value, thereby performing error compensation based on the spindle thermal error compensation value to eliminate the influence of thermal deformation on the CNC machine tool and improve the machining accuracy during cold start-up.
[0043] Here, the implementation effects of the embodiments of this application can be verified.
[0044] For example, after compensation based on the prediction results of the spindle thermal error prediction model according to the embodiments of this application, the thermal compensation effect of the electric spindle running at 3000 rpm can be as follows: Figure 3 As shown, after compensation, the thermal elongation tends to be gradual, with a maximum elongation of 11 μm, which is significantly lower than the maximum value of 50.1 μm before compensation. This indicates that the spindle thermal error prediction model based on rotational speed can reduce the spindle thermal elongation by 78%.
[0045] The thermal error compensation effect of the electric spindle running at 5000 rpm can be as follows: Figure 4 As shown, the maximum elongation after compensation is 9.9 μm, which is 82% less than the maximum thermal elongation of 55.3 μm without compensation.
[0046] In summary, the embodiments of this application can effectively compensate for spindle thermal errors in actual production, thereby improving machining accuracy during cold start-up.
[0047] Combination Figures 2 to 5 As shown, the working principle of the spindle thermal error compensation method for machine tool processing according to an embodiment of this application is explained in detail. Figure 5 As shown, using a precision vertical grinding machine as the main body, the embodiments of this application may include the following steps:
[0048] Step S501: The spindle speed is obtained by using the encoder of the electric spindle itself, and the thermal expansion of the precision electric spindle is measured in real time by using a dial indicator to obtain the real-time thermal error data of the electric spindle.
[0049] The test was conducted using a precision vertical grinding machine with an electric spindle speed range of 0–5000 r / min. During measurement, only the spindle and Z-axis moved while the precision vertical grinding machine was running the program, and the dial indicator remained stationary. The indicator needle detected and measured the change in elongation of the spindle end face.
[0050] After each program runs, the dial indicator is used to probe once at a fixed position (Z-500mm coordinate), and the actual value read is the elongation in the spindle direction.
[0051] Step S502: Using spindle speed and time as input variables and spindle thermal error data as output variables, establish a spindle thermal error prediction model.
[0052] In practical implementation, this embodiment of the application can collect data on the thermal elongation of the Z-axis of a grinding machine during the 100-minute transition from cold to hot operation to form a curve. Based on the thermal deformation trend of a precision vertical grinding machine, the thermal deformation law of the grinding machine spindle in the Z-axis is analyzed. According to the trend of the sensorless measurement time t and the thermal deformation displacement data, the deformation data s is fitted as a function of time t and the rotational speed variable n. Through fitting and numerical calculation, a three-dimensional fitted surface can be obtained. The three-dimensional fitted surface can be as follows: Figure 2 As shown.
[0053] Step S503: Use the CNC system to compensate for the predicted spindle thermal error, thereby improving the machining accuracy during cold start.
[0054] The embodiments of this application can use the prediction results output by the spindle thermal error prediction model to obtain the spindle thermal error compensation value, and then perform error compensation based on the spindle thermal error compensation value to eliminate the influence of thermal deformation on CNC machine tools and improve the machining accuracy of cold start.
[0055] Here, the implementation effects of the embodiments of this application can be verified.
[0056] For example, after compensation based on the prediction results of the spindle thermal error prediction model according to the embodiments of this application, the thermal compensation effect of the electric spindle running at 3000 rpm can be as follows: Figure 3 As shown, after compensation, the thermal elongation tends to be gradual, with a maximum elongation of 11 μm, which is significantly lower than the maximum value of 50.1 μm before compensation. This indicates that the spindle thermal error prediction model based on rotational speed can reduce the spindle thermal elongation by 78%.
[0057] The thermal error compensation effect of the electric spindle running at 5000 rpm can be as follows: Figure 4 As shown, the maximum elongation after compensation is 9.9 μm, which is 82% less than the maximum thermal elongation of 55.3 μm without compensation.
[0058] In summary, the embodiments of this application can effectively compensate for spindle thermal errors in actual production, thereby improving machining accuracy during cold start-up.
[0059] The spindle thermal error compensation method for machine tool processing proposed in this application can obtain the thermal error data of the electric spindle at the same moment based on the spindle speed and thermal elongation at the same moment. Then, within a preset time period, a spindle thermal error prediction model of the CNC machine tool is established using the spindle speed and thermal error data at multiple moments. The spindle thermal error compensation value is obtained using the prediction results output by the spindle thermal error prediction model. Error compensation is performed based on the spindle thermal error compensation value. This eliminates the need for dedicated sensors to detect temperature changes in the electric spindle, saving costs. Furthermore, it fully considers the hysteresis phenomenon between thermal error and temperature, improving the machining accuracy during cold starts. Therefore, it solves the technical problem in related technologies where the hysteresis phenomenon between thermal error and temperature is ignored, thus affecting the thermal error compensation effect.
[0060] Next, with reference to the accompanying drawings, the spindle thermal error compensation device for machine tool processing proposed according to the embodiments of this application is described.
[0061] Figure 6 This is a block diagram of a spindle thermal error compensation device for machine tool processing according to an embodiment of this application.
[0062] like Figure 6 As shown, the spindle thermal error compensation device 10 for this machine tool includes: an acquisition module 100, a modeling module 200, and a compensation module 300.
[0063] Specifically, the acquisition module 100 is used to acquire the spindle speed and thermal expansion of the electric spindle of the CNC machine tool at the same moment, and to obtain the thermal error data of the electric spindle at the same moment based on the spindle speed and current thermal expansion at the same moment.
[0064] The modeling module 200 is used to establish a spindle thermal error prediction model for CNC machine tools using spindle speed and thermal error data from multiple time points within a preset time period.
[0065] The compensation module 300 is used to obtain the spindle thermal error compensation value by using the prediction result output by the spindle thermal error prediction model, and to perform error compensation based on the spindle thermal error compensation value.
[0066] Optionally, in one embodiment of this application, the modeling module 200 includes a generation unit and an analysis unit.
[0067] The generation unit is used to generate a thermal deformation curve of the electric spindle based on the thermal elongation at multiple time points within a preset time period.
[0068] The analysis unit is used to analyze the thermal deformation law of the electric spindle using thermal deformation curves, and obtain analysis results for model training.
[0069] Optionally, in one embodiment of this application, the analysis unit includes: a first fitting subunit, a second fitting subunit, and a calculation subunit.
[0070] The first fitting subunit is used to fit the thermal elongation to a first fitting function of time.
[0071] The second fitting subunit is used to fit the thermal elongation to a second fitting function of the spindle speed.
[0072] The computational sub-unit is used to calculate the three-dimensional fitted surface based on the first and second fitting functions to obtain the analysis results.
[0073] Optionally, in one embodiment of this application, the acquisition module 100 includes: an acquisition unit.
[0074] The acquisition unit is used to acquire the spindle speed using the encoder of the electric spindle and simultaneously collect the thermal expansion using a dial indicator. It should be noted that the foregoing explanation of the spindle thermal error compensation method embodiment for machine tool machining also applies to the spindle thermal error compensation device for machine tool machining in this embodiment, and will not be repeated here.
[0075] The spindle thermal error compensation device for machine tool processing proposed in this application can obtain the thermal error data of the electric spindle at the same moment based on the spindle speed and thermal elongation of the electric spindle at the same moment. Then, within a preset time period, a spindle thermal error prediction model of the CNC machine tool is established using the spindle speed and thermal error data from multiple moments. The spindle thermal error compensation value is obtained using the prediction results output by the spindle thermal error prediction model. Error compensation is performed based on the spindle thermal error compensation value. This eliminates the need for dedicated sensors to detect temperature changes in the electric spindle, saving costs. Furthermore, it fully considers the hysteresis phenomenon between thermal error and temperature, improving the machining accuracy during cold starts. Therefore, it solves the technical problem in related technologies where the hysteresis phenomenon between thermal error and temperature is ignored, thus affecting the thermal error compensation effect.
[0076] Figure 7 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include:
[0077] The memory 701, the processor 702, and the computer program stored on the memory 701 and executable on the processor 702.
[0078] When the processor 702 executes the program, it implements the spindle thermal error compensation method for machine tool processing provided in the above embodiments.
[0079] Furthermore, the vehicle also includes:
[0080] Communication interface 703 is used for communication between memory 701 and processor 702.
[0081] The memory 701 is used to store computer programs that can run on the processor 702.
[0082] The memory 701 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0083] If the memory 701, processor 702, and communication interface 703 are implemented independently, then the communication interface 703, memory 701, and processor 702 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0084] Optionally, in a specific implementation, if the memory 701, processor 702, and communication interface 703 are integrated on a single chip, then the memory 701, processor 702, and communication interface 703 can communicate with each other through an internal interface.
[0085] The processor 702 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0086] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described spindle thermal error compensation method for machine tool machining.
[0087] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0088] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0089] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0090] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0091] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0092] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0093] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0094] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A method for compensating for thermal errors in a machine tool spindle, characterized in that, Includes the following steps: The spindle speed and thermal expansion of the electric spindle of the CNC machine tool at the same moment are obtained, and the thermal error data of the electric spindle at the same moment is obtained based on the spindle speed and current thermal expansion at the same moment. A spindle thermal error prediction model for the CNC machine tool is established using spindle speed and thermal error data from multiple time points within a preset time period. The spindle thermal error compensation value is obtained by using the prediction results output by the spindle thermal error prediction model, and error compensation is performed based on the spindle thermal error compensation value. The step of establishing a spindle thermal error prediction model using spindle speed and thermal error data from multiple time points within a preset time period includes: Data on the thermal elongation of the Z-axis of the CNC machine tool during a preset time period from cold to hot is collected to obtain corresponding thermal elongation data, and a thermal deformation curve of the electric spindle is generated based on the thermal elongation data. Based on the thermal deformation curve, the thermal deformation trend of the CNC machine tool is determined, and the thermal deformation law of the electric spindle in the Z direction is analyzed according to the thermal deformation trend to obtain the analysis results for model training. The analysis of the thermal deformation pattern of the electric spindle using the thermal deformation curve to obtain analysis results for model training includes: The thermal elongation is fitted to a first fitting function of time; The thermal elongation is fitted to a second fitting function of the spindle speed; The three-dimensional fitted surface is calculated based on the first fitting function and the second fitting function to obtain the analysis results; The acquisition of the spindle speed and thermal expansion of the CNC machine tool's electric spindle at the same moment includes: The spindle speed is obtained using the encoder of the electric spindle, and the thermal expansion is collected using a dial indicator.
2. A spindle thermal error compensation device for machine tool processing, characterized in that, include: The acquisition module is used to acquire the spindle speed and thermal expansion of the electric spindle of the CNC machine tool at the same moment, and to obtain the thermal error data of the electric spindle at the same moment based on the spindle speed and current thermal expansion at the same moment; The modeling module is used to establish a spindle thermal error prediction model for the CNC machine tool using spindle speed and thermal error data from multiple time points within a preset time period. The compensation module is used to obtain the spindle thermal error compensation value using the prediction result output by the spindle thermal error prediction model, and to perform error compensation based on the spindle thermal error compensation value. The modeling module includes: The generation unit is used to collect data on the thermal elongation of the Z-axis of the CNC machine tool within a preset time period from cold to hot, so as to obtain the corresponding thermal elongation data set, and generate the thermal deformation curve of the electric spindle based on the thermal elongation data. The analysis unit is used to determine the thermal deformation trend of the CNC machine tool based on the thermal deformation curve, and to analyze the thermal deformation law of the electric spindle in the Z direction according to the thermal deformation trend, so as to obtain the analysis results for model training. The analysis unit includes: The first fitting subunit is used to fit the thermal elongation as a first fitting function of time; The second fitting subunit is used to fit the thermal elongation to a second fitting function of the spindle speed; A computational subunit is used to calculate a three-dimensional fitted surface based on the first fitting function and the second fitting function to obtain the analysis results; The acquisition module includes: The acquisition unit is used to acquire the spindle speed using the encoder of the electric spindle and to collect the thermal elongation using a dial indicator.
3. An electronic device, characterized in that, include: The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the spindle thermal error compensation method for machine tool machining as described in claim 1.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the spindle thermal error compensation method for machine tool machining as described in claim 1.
Citation Information
Patent Citations
Sensorless error compensation method for realizing thermal deformation of machine tool
CN115328023A