Spindle motor control method for CNC machine tools

CN122292996BActive Publication Date: 2026-08-14冈田精机(常州)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-27
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

该控制方式存在响应滞后的问题,当长主轴波动达到峰值时,电机负载转矩会突然增大,被动响应式控制难以及时调整电机输出,易导致电机转矩不足、转速抖动,并进一步加剧主轴波动;同时,电机励磁电流与转矩电流的匹配性较差,易造成电机发热严重、能耗增加,影响电机工作稳定性和使用寿命,进而导致数控机床加工精度下降,难以满足高精度加工需求

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122292996B_ABST
    Figure CN122292996B_ABST
Patent Text Reader

Abstract

This invention relates to the field of CNC machine tool control technology, and more particularly to a spindle motor control method for CNC machine tools. The method includes: acquiring preset machining parameters of the spindle and working feedback data of the spindle motor; inputting a fluctuation prediction model based on the periodic characteristics of spindle straightness deviation; analyzing the peak time of spindle fluctuation and the amplitude of magnetic flux fluctuation to determine the adjustment time node and adjustment amount of the motor's secondary magnetic flux; based on the adjustment time node and adjustment amount, adjusting the excitation current of the spindle motor in advance before the peak of spindle fluctuation to increase the motor's secondary magnetic flux reserve; during spindle fluctuation, collecting actual spindle fluctuation data in real time, dynamically matching the motor torque output based on the increased motor secondary magnetic flux reserve, and simultaneously adjusting the ratio of motor excitation current to torque current in real time to maintain the stability of the motor's secondary magnetic flux. This invention can improve the response speed and operational stability of the spindle motor, reduce motor heat generation and energy consumption, and improve the machining accuracy of CNC machine tools.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool control technology, and in particular to a method for controlling the spindle motor of a CNC machine tool. Background Technology

[0002] In machining long shaft parts and deep hole parts, a long spindle structure is usually required to meet the requirements of machining stroke and structural layout. Due to the large axial span of the long spindle, it is difficult to control the straightness of its axis. Even with high-precision machining, strict assembly process and process control, it is difficult to completely eliminate the straightness deviation of the long spindle axis, which causes the spindle to produce periodic oscillations, jumps and other fluctuations during rotation.

[0003] In existing technologies, the spindle and spindle motor are typically connected by a rigid transmission. Periodic fluctuations in the spindle are transmitted back to the spindle motor, causing periodic fluctuations in the motor load. Current spindle motor control often employs a passive response control mode, meaning that after detecting fluctuations in parameters such as motor load and speed, correction is made by adjusting the motor control parameters. This control method suffers from response lag. When the long spindle fluctuation reaches its peak, the motor load torque suddenly increases, and passive response control struggles to adjust the motor output in time, easily leading to insufficient motor torque, speed fluctuations, and further exacerbating spindle fluctuations. Simultaneously, the poor matching between the motor excitation current and torque current easily causes severe motor overheating and increased energy consumption, affecting motor operational stability and lifespan, ultimately leading to a decrease in the machining accuracy of the CNC machine tool and making it difficult to meet the demands of high-precision machining.

[0004] Therefore, there is an urgent need to provide a spindle motor control technology solution for CNC machine tools to solve the technical problems of spindle motor response lag, motor heating and increased energy consumption caused by periodic fluctuations due to axis straightness deviation of long spindles, so as to improve the working reliability and service life of spindle motors. Summary of the Invention

[0005] In view of at least one of the above technical problems, the present invention provides a spindle motor control method for CNC machine tools, which improves the spindle machining accuracy, motor operation stability and service life by adopting an improved control method.

[0006] According to a first aspect of the present invention, a spindle motor control method for a CNC machine tool is provided, applied to a spindle motor control system for a CNC machine tool, comprising the following steps: S1: Obtain the preset machining parameters of the spindle and the working feedback data of the spindle motor, and input the fluctuation prediction model based on the periodic characteristics of the spindle straightness deviation; S2: Based on the fluctuation prediction model, analyze the peak time of spindle fluctuation and the amplitude of magnetic flux fluctuation in real time, identify the working condition when the peak of spindle fluctuation arrives, and determine the adjustment time node and adjustment amount of the motor secondary magnetic flux; S3: Based on the aforementioned adjustment time point and adjustment amount, adjust the excitation current of the spindle motor in advance before the peak of spindle fluctuation arrives to increase the motor's secondary magnetic flux reserve. S4: Based on the increased secondary magnetic flux reserve of the motor, the motor torque output is dynamically matched, and the ratio of motor excitation current to torque current is adjusted in real time to maintain the stability of the motor secondary magnetic flux.

[0007] In some embodiments of the present invention, the fluctuation prediction model is constructed using a BP neural network algorithm; The input parameters of the BP neural network algorithm include the spindle preset speed, machining stroke, depth of cut, feed rate, cutting speed, actual spindle speed, motor excitation current, motor torque current, vibration amplitude at the spindle end, period value of the spindle straightness deviation, phase offset, and maximum deviation amplitude. The output parameters include the peak time of the spindle oscillation, the amplitude of the magnetic flux oscillation, and the adjustment time and amount of the secondary magnetic flux.

[0008] In some embodiments of the present invention, the BP neural network algorithm adaptively adjusts the learning rate based on the training mean square error at the peak of the principal axis fluctuation, including: When the training mean square error is greater than a first preset threshold, the learning rate is increased; When the training mean square error is between the first preset threshold and the second preset threshold, the current learning rate remains unchanged. When the training mean square error is less than a second preset threshold, the learning rate is reduced.

[0009] In some embodiments of the present invention, a preset magnetic flux adjustment threshold and a torque matching speed threshold are also included; When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model exceeds the magnetic flux adjustment threshold, the magnetic flux adjustment amount calculated based on the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is automatically increased, and the torque output response speed is switched from the preset normal level to the preset high response fixed level corresponding to the torque matching speed threshold. When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is lower than the magnetic flux adjustment threshold, the excitation current of the spindle motor is automatically reduced.

[0010] In some embodiments of the present invention, in step S1, vibration data of the spindle is acquired, and the vibration data, the preset machining parameters of the spindle, and the working feedback data of the spindle motor are combined and input into the fluctuation prediction model. The vibration data, including vibration frequency and vibration amplitude, is collected in real time by a vibration sensor installed at the end of the spindle.

[0011] In some embodiments of the present invention, in step S3, before the peak of spindle fluctuation arrives, a stepped magnetic flux adjustment method is adopted to gradually increase the secondary magnetic flux of the motor in stages.

[0012] In some embodiments of the present invention, the stage division of the stepped magnetic flux adjustment method is based on the time interval between the peak time and the current time, and the single-stage magnetic flux adjustment amount is inversely proportional to the time interval.

[0013] In some embodiments of the present invention, the total advance time t from the adjustment start time to the peak time is divided into three consecutive time intervals on average. When the time interval t1 between the peak time and the current time satisfies 2t / 3 < t1 ≤ t, 20% of the adjustment amount is executed; When the time interval t1 between the peak time and the current time satisfies t / 3 < t1 ≤ 2t / 3, 30% of the adjustment amount is executed; When the time interval t1 between the peak time and the current time satisfies 0 < t1 ≤ t / 3, 50% of the adjustment amount is executed.

[0014] In some embodiments of the present invention, a preset safety threshold and a normal range of motor operating parameters are also included; When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model exceeds the safety threshold, or when the collected work feedback data exceeds the normal range of the motor working parameters, an early warning signal is automatically issued and the spindle machining operation is suspended.

[0015] The beneficial effects of this invention are as follows: By combining the preset machining parameters of the spindle, the working feedback data of the spindle motor, and the periodic characteristics of the spindle straightness deviation, this invention constructs a fluctuation prediction model to pre-identify the period, peak time, and magnetic flux fluctuation amplitude of the spindle fluctuation. Before the peak of the spindle fluctuation arrives, the excitation current is adjusted in advance to form a reserve of secondary magnetic flux in the motor, giving the motor a better torque response foundation before sudden load changes. During spindle fluctuation, the torque output is dynamically matched based on the pre-reserved secondary magnetic flux of the motor, and the ratio of excitation current to torque current is adjusted in real time to maintain the stability of the motor's secondary magnetic flux. Compared with the reactive control in the prior art, this invention transforms passive adjustment into a control method that combines prediction and dynamic stabilization control. This allows for a more timely response to load changes caused by spindle fluctuations, suppressing the vicious cycle of mutual coupling and exacerbation between spindle fluctuations and motor load fluctuations, thereby reducing motor heat generation and energy consumption, and improving the operating stability of the spindle motor, the machining stability of the spindle, and the machining accuracy of the CNC machine tool. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the steps of the spindle motor control method for a CNC machine tool in an embodiment of the present invention. Figure 2 This is a schematic diagram of the spindle structure in the spindle motor control method of a CNC machine tool according to an embodiment of the present invention.

[0018] Attached label: 01, Motor connection end. Detailed Implementation

[0019] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0020] It should be noted that when an element is referred to as being "fixed to" another element, it can be directly attached to the other element or there may be an intervening element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or there may be an intervening element. The terms "vertical," "horizontal," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only possible implementation.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0022] This embodiment provides a spindle motor control method for CNC machine tools, applied to the spindle motor control system of CNC machine tools. This method is mainly suitable for machining scenarios such as long shaft parts and deep hole parts. In these machining scenarios, due to the long spindle structure and large axial span, it is difficult to completely eliminate the straightness deviation of the spindle axis. During the rotation process, the spindle is prone to periodic oscillations, jumps, and other fluctuations that repeat with the rotation cycle. Figure 2As shown, one end of the spindle includes a motor connection end 01, and the load is transmitted to the spindle motor through a rigid transmission relationship between the motor connection end 01 and the spindle motor, causing the spindle motor load to exhibit periodic changes. Based on this, this embodiment introduces the periodic characteristics of spindle straightness deviation into the spindle motor control logic, and adopts a control method that combines fluctuation prediction, advance magnetic flux reserve, and dynamic matching optimization during fluctuation. This ensures that the spindle motor has the corresponding torque response basis before the peak of spindle fluctuation arrives, thereby improving the spindle motor's response timeliness and operational stability to load fluctuations.

[0023] CNC machine tool spindle motor control methods, such as Figure 1 As shown, it includes the following steps: S1: Obtain the preset machining parameters of the spindle and the working feedback data of the spindle motor. Combine the periodic characteristics of the spindle straightness deviation and input the fluctuation prediction model. The fluctuation prediction model here has been trained offline and can be directly called to input the above real-time data. The preset machining parameters specifically include: preset spindle speed, machining stroke, depth of cut, feed rate, and cutting speed; the spindle motor's working feedback data specifically includes: actual spindle speed, motor excitation current, motor torque current, and vibration amplitude at the spindle end.

[0024] It should also be noted that the periodicity of the spindle straightness deviation is a fixed physical characteristic parameter corresponding to the inherent structural error of the spindle machinery. It is a priori physical constraint condition of the model, used to lock the inherent periodic law of the spindle mechanical fluctuation and clarify the coupling correlation benchmark between mechanical deviation and motor magnetic flux fluctuation. In this embodiment, it specifically includes: spindle straightness deviation period value, phase offset, and maximum deviation amplitude.

[0025] S2: Based on the fluctuation prediction model, analyze the peak time of spindle fluctuation and the amplitude of magnetic flux fluctuation in real time, identify the working condition when the peak of spindle fluctuation arrives, and determine the adjustment time node and adjustment amount of the motor secondary magnetic flux; Among them, the period of spindle fluctuation refers to the repetitive period of periodic oscillation and jumping caused by the straightness deviation of the spindle. Under theoretical conditions, this period is the same as the period corresponding to the periodic characteristics of the spindle straightness deviation. However, in actual processing, there will inevitably be deviations. The peak time of spindle fluctuation in this step corresponds to the actual value of the period of spindle fluctuation with deviation, which is the prediction quantity directly output by the model.

[0026] It should also be noted that the secondary magnetic flux of the motor refers to the reserve magnetic flux generated by the stator excitation current in the spindle motor, in addition to the main magnetic flux, used to cope with sudden load changes and improve torque response speed. Its core function is that when the spindle fluctuation causes a sudden increase in motor load, there is no need to wait for the lag adjustment of the excitation current. It can directly and quickly increase the motor output torque based on the pre-reserved secondary magnetic flux, thus solving the problem of passive response lag.

[0027] In this step, the peak moment is specifically the peak moment of the periodic fluctuation caused by the straightness deviation of the spindle; while the flux fluctuation amplitude is specifically the deviation amplitude between the actual flux of the motor and the rated flux caused by the sudden increase in load at the peak moment of the spindle fluctuation, which is predicted by the model and used to quantitatively characterize the degree of fluctuation of the motor load within this fluctuation cycle; by combining the pre-stored periodic characteristics of the spindle straightness deviation with the real-time collected work feedback data, the peak moment of the spindle fluctuation and the flux fluctuation amplitude can be obtained through comprehensive analysis, thereby directly identifying the working condition when the peak of the spindle fluctuation arrives, and correspondingly determining the adjustment time node and adjustment amount of the motor's secondary flux.

[0028] S3: Based on the adjustment time node and adjustment amount, adjust the excitation current of the spindle motor in advance before the peak of spindle fluctuation arrives to increase the motor's secondary magnetic flux reserve. Among them, the excitation current refers to the current component in the stator winding of the main spindle motor used to generate the main magnetic flux and secondary magnetic flux of the motor; the magnitude of the excitation current is positively correlated with the motor magnetic flux. Within the rated parameter range of the motor, the larger the excitation current, the higher the magnetic flux generated by the motor, including the secondary magnetic flux. It is a control variable used to adjust the secondary magnetic flux of the motor.

[0029] Specifically, when the control system reaches the adjustment time node determined in step S2, the CNC machine tool spindle motor control system sends an excitation current adjustment command to the spindle motor driver, and increases the excitation current according to the adjustment amount calculated in step S2, so as to complete the reserve of the motor's secondary magnetic flux before the peak of spindle fluctuation, and reserve torque response margin for the upcoming sudden increase in load.

[0030] In some implementations, the excitation current can be increased in a single adjustment; in others, it can be adjusted gradually to reduce the transient impact caused by changes in the excitation current. Regardless of the method used, the core of this step is to complete the pre-storage of the motor's secondary magnetic flux before the peak of the spindle fluctuation arrives, in order to reduce the response lag problem caused by adjusting the excitation current after a sudden increase in load in the prior art.

[0031] S4: Based on the increased secondary magnetic flux reserve of the motor, the motor torque output is dynamically matched, and the ratio of motor excitation current to torque current is adjusted in real time to maintain the stability of the motor secondary magnetic flux.

[0032] The stator current of the spindle motor is divided into an excitation current component used to generate magnetic flux and a torque current component used to generate output torque. The ratio of the two determines the magnetic flux stability and torque output capability of the motor. When the motor load changes suddenly, the ratio of the two needs to be dynamically adjusted to quickly match the torque output while ensuring magnetic flux stability, so as to avoid speed jitter and increased spindle fluctuation due to insufficient torque.

[0033] In this embodiment, the ratio of motor excitation current to torque current is adjusted in real time. Specifically, when the spindle fluctuation causes a change in the motor load torque, the required torque current is first directly supplemented by the secondary magnetic flux reserve to quickly match the load demand. At the same time, the control system detects the actual magnetic flux value of the motor in real time. If the magnetic flux drops due to torque output, the excitation current is adjusted synchronously according to the deviation between the actual magnetic flux and the target magnetic flux to compensate for magnetic flux loss, and the total magnetic flux of the motor is always maintained near the preset target value. In the above process, the ratio of motor excitation current to torque current is adjusted.

[0034] Specifically, when the spindle enters a fluctuation cycle and the load begins to change, the pre-stored secondary magnetic flux of the motor quickly responds to the load change and instantly adjusts the motor torque output to temporarily match the current sudden load demand, playing a role in buffering and stabilizing the voltage. During this process, the control system monitors the actual value of the motor's secondary magnetic flux in real time and dynamically adjusts the ratio of excitation current to torque current. While ensuring torque output, it maintains the motor's secondary magnetic flux within a preset stable range to avoid a decrease in torque response capability due to magnetic flux drops, thus maintaining continuous torque response capability. Steps S3 and S4 form a progressive and coordinated relationship. Step S3 provides the magnetic flux foundation required for rapid torque response in step S4, while step S4 provides a closed-loop guarantee for the pre-control effect of step S3. Together, they achieve advanced control and stable operation of the spindle motor.

[0035] In some embodiments of the present invention, the fluctuation prediction model is constructed using a BP neural network algorithm; The input parameters of the BP neural network algorithm include the spindle preset speed, machining stroke, depth of cut, feed rate, cutting speed, actual spindle speed, motor excitation current, motor torque current, vibration amplitude at the spindle end, period value of the spindle straightness deviation, phase offset, and maximum deviation amplitude. Among them, the three prior constraint parameters of spindle straightness deviation period value, phase offset amount, and maximum deviation amplitude are fixed values ​​obtained by the spindle factory inspection and remain unchanged throughout the entire service life of the same spindle, and do not need to be collected in real time during the machining process. The output parameters include the peak time of the spindle oscillation, the amplitude of the magnetic flux oscillation, and the adjustment time and amount of the secondary magnetic flux.

[0036] Spindle straightness deviation is an inherent mechanical structural error of the CNC machine tool spindle. It determines the periodicity of radial runout and axial movement during spindle rotation. The periodic mechanical deviation described here forms a periodically changing load torque through the rigid transmission structure between the spindle and the motor, and is directly transmitted to the spindle motor, causing the motor's excitation flux and torque output to exhibit periodic fluctuations synchronized with the spindle rotation cycle. Therefore, there is a definite mechanical-electromagnetic coupling mechanism between the periodic characteristics of spindle straightness deviation and the motor flux fluctuations.

[0037] The BP neural network algorithm constructed in this embodiment uses the above mechanical-electromagnetic coupling mechanism as a physical prior constraint and multi-source working condition data as input to learn and quantify the mapping relationship between mechanical deviation period, spindle fluctuation, magnetic flux fluctuation and control parameters.

[0038] In this embodiment, the basic model structure of the BP neural network algorithm is a 4-layer feedforward BP neural network, as detailed below: The input layer has 12 neurons, corresponding to a 12-dimensional final input vector. Among them, 9 neurons correspond to the real-time acquired operating parameters, and 3 neurons correspond to the prior physical constraint parameters of the principal axis straightness deviation. The first hidden layer consists of 18 neurons, which complete high-dimensional feature extraction. Specifically, the original input parameters are transformed into 18 combined features that can reflect the complex coupling relationship between the parameters through nonlinear weighted transformation. The second hidden layer consists of 9 neurons, which complete feature dimensionality reduction and key information extraction. Specifically, from the 18 high-dimensional features output by the first hidden layer, the core information that plays a decisive role in the prediction of the main axis fluctuation and the control of magnetic flux is selected and extracted, and redundant and interfering features are eliminated. The output layer consists of four neurons, corresponding to four-dimensional output parameters: the peak time of the main axis fluctuation, the amplitude of the magnetic flux fluctuation, and the adjustment time and adjustment amount of the secondary magnetic flux.

[0039] The first and second hidden layers use the Sigmoid function as the activation function to achieve nonlinear mapping; the output layer uses the Purelin linear function to ensure that the output is continuous, smooth, and can be directly used for control.

[0040] During implementation, the original physical quantities of each input parameter are uniformly normalized to the [0,1] interval to eliminate dimensional differences; the periodic value, phase offset, and maximum deviation amplitude of the spindle straightness deviation are used as prior physical constraints, namely the mechanical-electromagnetic coupling prior knowledge described above, and are spliced ​​and fused with the 9-dimensional input parameters to form the final input vector. The input vector is sequentially processed through input layer weighting, first hidden layer weighted summation and Sigmoid activation, second hidden layer weighted summation and Sigmoid activation, and finally through output layer Purelin linear transformation to obtain the peak time of principal axis oscillation, magnetic flux oscillation amplitude, and adjustment time node and adjustment amount of secondary magnetic flux.

[0041] In some embodiments of the present invention, the BP neural network algorithm is specifically optimized to address the problem of the fixed learning rate in traditional BP neural networks, resulting in an improved adaptive learning rate model. Specifically, while traditional BP neural networks use a fixed learning rate, the improved model dynamically adjusts the step size based on the training error. During implementation, the step size is increased when the error is large and decreased when the error is small, allowing the model to converge faster to a point where the error in the output parameters is less than a preset error threshold. Traditional BP neural networks are existing technology and will not be described in detail here.

[0042] As a specific implementation method, the BP neural network algorithm adaptively adjusts the learning rate based on the training mean square error at the peak of the principal axis fluctuation, thereby obtaining an improved BP neural network algorithm, including: When the training mean square error is greater than the first preset threshold, the learning rate is increased to accelerate the convergence speed. When the training mean squared error is between the first preset threshold and the second preset threshold, the current learning rate remains unchanged. When the training mean square error is less than the second preset threshold, the learning rate is reduced to improve the convergence accuracy.

[0043] In this preferred embodiment, the training mean square error M is calculated using the following formula: Where N is the number of samples in the current training batch; y i The model predicted output value at the peak of the principal axis fluctuation for the i-th sample; y i ' represents the measured value at the peak of the principal axis fluctuation of the i-th sample. The training mean square error M accurately reflects the prediction error level of the model's core control parameters.

[0044] As a specific implementation example, taking an initial learning rate α = 0.01, a first preset threshold = 0.1, and a second preset threshold = 0.01 as an example, the increase coefficient for each learning rate increase action can be set to 1.2, and the decrease coefficient for each learning rate decrease action can be set to 0.8. All of these parameters can be pre-set within the control system. Of course, as a further optimization of the above embodiment, an upper and lower limit for the learning rate can be set. Corresponding to the above parameters, the upper limit can be specifically set to 0.1, and the lower limit to 0.0001.

[0045] As an optimized implementation method for model training, this embodiment uses a sample set that is completely consistent with the dimensions of actual working data for training: the input of the training sample is a 12-dimensional vector consistent with the actual operation, namely 9 real-time working condition parameters and 3 prior constraint parameters of spindle straightness deviation, and the output is 4-dimensional label data obtained by actual measurement under the corresponding working condition, namely the peak time of spindle fluctuation, magnetic flux fluctuation amplitude, secondary magnetic flux adjustment time node, and secondary magnetic flux adjustment amount.

[0046] All sample data are first normalized to the [0,1] interval. Using the model structure described above, iterative training is performed using an adaptive learning rate mechanism based on the training mean square error until the model loss converges to a preset threshold. After training, the model can directly receive real-time running data of the same dimension and output control parameters.

[0047] During machining, if a fixed flux adjustment strategy and a fixed torque response strategy are always used, problems such as insufficient flux reserve and untimely torque response can easily occur when the spindle fluctuates significantly. This results in insufficient motor output torque tracking capability at the peak of spindle fluctuation, leading to speed fluctuations and decreased machining accuracy. Conversely, if a high excitation current and a fast torque response setting are maintained when the spindle fluctuation is small, unnecessary energy consumption and motor heating will occur. To solve the above problems, as a preferred embodiment, the above embodiment also includes preset flux adjustment thresholds and torque matching speed thresholds. When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model exceeds the magnetic flux adjustment threshold, the magnetic flux adjustment amount calculated based on the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is automatically increased, and the torque output response speed is directly switched from the preset normal level to the preset high response fixed level corresponding to the torque matching speed threshold. When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is lower than the magnetic flux adjustment threshold, the excitation current of the spindle motor is automatically reduced.

[0048] In this embodiment, the magnetic flux adjustment amount and the magnetic flux fluctuation amplitude output by the fluctuation prediction model are linearly positively correlated, that is, the magnetic flux adjustment amount is equal to the product of the magnetic flux fluctuation amplitude and the set coefficient. The set coefficient here can be the safety margin coefficient under normal working conditions, with a value range of 1.0-1.2, preferably 1.1.

[0049] This invention enables the control system to adaptively and hierarchically adjust the flux adjustment amount and torque output response speed of the spindle motor based on the flux adjustment amount calculated according to the flux fluctuation amplitude predicted by the fluctuation prediction model. When the predicted flux fluctuation amplitude exceeds the flux adjustment threshold, the flux adjustment amount is automatically increased. The increase is based on the flux adjustment amount calculated according to the flux fluctuation amplitude predicted by the fluctuation prediction model, and the increase ratio is determined by a preset flux adjustment boost coefficient, which ranges from 1.1 to 1.5, preferably from 1.2 to 1.3. The torque output response speed is then switched directly from a preset normal range to a preset high-response fixed range corresponding to the torque matching speed threshold to ensure that sufficient flux reserve can be established in time and the required torque can be output quickly under large load fluctuation conditions. When the predicted flux fluctuation amplitude is lower than the flux adjustment threshold, the excitation current is automatically reduced to maintain only the rated excitation current level required by the main flux, eliminating unnecessary secondary flux reserve to avoid maintaining an excessively high flux level under mild fluctuation conditions.

[0050] While relying on the spindle's preset machining parameters and the spindle motor's operating feedback data can reflect the spindle's operating status and motor load changes to some extent, the representation of the actual spindle fluctuation state remains relatively indirect. This is especially problematic in the early stages of spindle fluctuation or when operating conditions change rapidly, leading to issues such as insufficient timely identification and inadequate prediction accuracy. In light of these issues, step S1 involves acquiring the spindle's vibration data and combining it with the spindle's preset machining parameters and the spindle motor's operating feedback data to input into the fluctuation prediction model. Vibration data, including vibration frequency and amplitude, is collected in real time by a vibration sensor installed at the end of the spindle.

[0051] Since vibration data can directly reflect the oscillation and jumping state of the spindle during actual operation, inputting it into the vibration prediction model enables the model to simultaneously possess a comprehensive perception capability of machining condition parameters, motor operating status, and the actual vibration state of the spindle. This invention can capture the actual changing trend of spindle vibration more promptly and accurately, improving the prediction accuracy of the peak moment of spindle vibration, flux fluctuation amplitude, adjustment time node, and flux adjustment amount. This provides a more reliable data foundation for subsequent advance adjustment of excitation current and secondary flux reserve of the motor, improves the timeliness of the spindle motor's response to load fluctuations, reduces spindle vibration and speed jitter, and lowers motor heat generation and energy consumption.

[0052] To ensure sufficient torque response capability of the motor, this invention establishes a secondary magnetic flux reserve in advance before the peak of spindle fluctuation arrives. However, in practice, if the traditional method of rapidly increasing the excitation current in one go or using centralized magnetic flux compensation is adopted, although the magnetic flux can be established in advance to a certain extent, it is prone to current surges, magnetic flux fluctuations, and even additional speed disturbances due to sudden changes in the excitation current, thereby affecting the smooth operation of the spindle motor and potentially adversely affecting the stability of subsequent torque output.

[0053] Therefore, as a preferred embodiment, in step S3, before the peak of the spindle fluctuation arrives, a stepped flux adjustment method is adopted to gradually increase the secondary flux of the motor in stages. The stages of the stepped flux adjustment method are divided according to the time interval between the peak moment and the current moment, and the amount of flux adjustment in a single stage is inversely proportional to the time interval; the larger the time interval, the smaller the amount of flux adjustment in a single stage. This makes the flux increase process gradually stronger from far to near, ensuring that the required flux reserve is completed before the peak arrives, and avoiding excessive jumps in flux and current in a short period of time. Compared with the single-increase flux adjustment method, the present invention disperses the flux pre-reservation process into multiple stages, making the excitation current rise more smoothly and the control rhythm more in line with the time distribution pattern before the peak of the fluctuation arrives. This can ensure that the spindle motor establishes a torque response foundation in a timely manner, while reducing current impact and control disturbance, improving the stability and controllability of the flux establishment process, and reducing spindle speed jitter and spindle fluctuation.

[0054] As a preferred embodiment of the above, the total advance time t from the adjustment start time to the peak time is divided into three consecutive time intervals; the adjustment start time is the first node in the set of adjustment time nodes, which is the start time of the entire secondary magnetic flux pre-storage process; When the time interval t1 between the peak time and the current time satisfies 2t / 3<t1≤t, an adjustment of 20% is applied. When the time interval t1 between the peak time and the current time satisfies t / 3 < t1 ≤ 2t / 3, an adjustment of 30% is executed; When the time interval t1 between the peak time and the current time satisfies 0 < t1 ≤ t / 3, 50% of the adjustment amount is executed.

[0055] The current moment refers to the dynamic moment at which the control system makes time interval judgments and magnetic flux adjustment decisions during real-time operation, and it is continuously updated as the processing progresses.

[0056] When spindle oscillation increases abnormally, magnetic flux fluctuation significantly exceeds the normal control range, or abnormal operating parameters such as motor current, speed, temperature, and output torque occur, it indicates that the spindle motor may be under overload, instability, or abnormal vibration conditions. Continuing to operate under conventional control strategies in this situation may not only further exacerbate spindle oscillation, increase motor heating and energy consumption, but may also lead to a severe decrease in spindle machining accuracy, workpiece scrap, and even damage to the spindle, motor, and related transmission components. In some embodiments of this invention, preset safety thresholds and normal operating parameter ranges for the motor are also included. When the flux fluctuation amplitude predicted by the fluctuation prediction model exceeds the safety threshold, or when the collected work feedback data exceeds the normal range of motor operating parameters, an early warning signal is automatically issued, and the spindle machining operation is suspended. By linking anomaly prediction and machining suspension, this invention enables the control system to not only suppress fluctuations under normal operating conditions but also to switch to a safety protection mode in a timely manner under abnormal operating conditions. This invention can identify potential risks earlier, execute protective actions faster, prevent abnormal fluctuations from escalating further, reduce the risk of equipment damage and machining errors, and decrease scrap rates and maintenance costs.

[0057] Those skilled in the art should understand that this invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to this invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the invention as claimed. The scope of protection of this invention is defined by the appended claims and their equivalents.

Claims

1. A spindle motor control method for a CNC machine tool, characterized in that, Applied to the spindle motor control system of CNC machine tools, the following steps are included: S1: Obtain the preset machining parameters of the spindle and the working feedback data of the spindle motor, and input the fluctuation prediction model based on the periodic characteristics of the spindle straightness deviation; S2: Based on the fluctuation prediction model, analyze the peak time of spindle fluctuation and the amplitude of magnetic flux fluctuation in real time, identify the working condition when the peak of spindle fluctuation arrives, and determine the adjustment time node and adjustment amount of the motor secondary magnetic flux; S3: Based on the aforementioned adjustment time point and adjustment amount, adjust the excitation current of the spindle motor in advance before the peak of spindle fluctuation arrives to increase the motor's secondary magnetic flux reserve; the motor's secondary magnetic flux refers to the reserve of backup magnetic flux generated by the stator excitation current in the spindle motor, other than the main magnetic flux, used to cope with sudden load changes and improve torque response speed. S4: Based on the increased secondary magnetic flux reserve of the motor, the motor torque output is dynamically matched, and the ratio of motor excitation current to torque current is adjusted in real time to maintain the stability of the motor secondary magnetic flux. The fluctuation prediction model is constructed using a BP neural network algorithm; The input parameters of the BP neural network algorithm include the spindle preset speed, machining stroke, depth of cut, feed rate, cutting speed, actual spindle speed, motor excitation current, motor torque current, vibration amplitude at the spindle end, period value of the spindle straightness deviation, phase offset, and maximum deviation amplitude. The output parameters include the peak time of the spindle oscillation, the amplitude of the magnetic flux oscillation, and the adjustment time and amount of the secondary magnetic flux. It also includes preset flux adjustment thresholds and torque matching speed thresholds; When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model exceeds the magnetic flux adjustment threshold, the magnetic flux adjustment amount calculated based on the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is automatically increased, and the torque output response speed is switched from the preset normal level to the preset high response fixed level corresponding to the torque matching speed threshold. When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model is lower than the magnetic flux adjustment threshold, the excitation current of the spindle motor is automatically reduced. In step S3, before the peak of spindle fluctuation arrives, a stepped magnetic flux adjustment method is adopted to gradually increase the secondary magnetic flux of the motor in stages.

2. The spindle motor control method for CNC machine tools according to claim 1, characterized in that, The BP neural network algorithm adaptively adjusts the learning rate based on the training mean square error at the peak of the principal axis fluctuation, including: When the training mean square error is greater than a first preset threshold, the learning rate is increased; When the training mean square error is between the first preset threshold and the second preset threshold, the current learning rate remains unchanged. When the training mean square error is less than a second preset threshold, the learning rate is reduced.

3. The spindle motor control method for CNC machine tools according to claim 1, characterized in that, In step S1, the vibration data of the spindle is acquired, and the vibration data, the preset machining parameters of the spindle, and the working feedback data of the spindle motor are combined and input into the fluctuation prediction model. The vibration data, including vibration frequency and vibration amplitude, is collected in real time by a vibration sensor installed at the end of the spindle.

4. The spindle motor control method for CNC machine tools according to claim 1, characterized in that, The stage division of the stepped magnetic flux adjustment method is based on the time interval between the peak time and the current time, and the magnetic flux adjustment amount in a single stage is inversely proportional to the time interval.

5. The spindle motor control method for CNC machine tools according to claim 4, characterized in that, The total advance time t from the start of the adjustment to the peak time is divided into three consecutive time intervals on average. When the time interval t1 between the peak time and the current time satisfies 2t / 3 < t1 ≤ t, 20% of the adjustment amount is executed; When the time interval t1 between the peak time and the current time satisfies t / 3 < t1 ≤ 2t / 3, 30% of the adjustment amount is executed; When the time interval t1 between the peak time and the current time satisfies 0 < t1 ≤ t / 3, 50% of the adjustment amount is executed.

6. The spindle motor control method for CNC machine tools according to claim 1, characterized in that, It also includes preset safety thresholds and normal ranges for motor operating parameters; When the amplitude of magnetic flux fluctuation predicted by the fluctuation prediction model exceeds the safety threshold, or when the collected work feedback data exceeds the normal range of the motor working parameters, an early warning signal is automatically issued and the spindle machining operation is suspended.

Citation Information

Patent Citations

  • Method for determining dynamic error of spindle of numerical control machine tool and computer program product

    CN120561779A

  • Online measurement and suppression method and system for radial run-out error of spindle of numerical control machine tool and storage medium

    CN121143197A