Green numerical control machining method based on software system
By constructing a coupled model of energy consumption and vibration, and combining it with fuzzy logic judgment, a dynamic balance between energy efficiency and quality in green CNC machining is achieved. This solves the problem of the separation between energy consumption optimization and quality assurance in existing technologies, and realizes real-time closed-loop control and adaptive parameter adjustment.
Patent Information
- Application Number
- CN202511505396.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-10-21
AI Technical Summary
In existing green CNC machining technologies, energy consumption control and quality assurance are disconnected. When optimizing energy consumption, it is easy to sacrifice workpiece accuracy by excessively pursuing energy saving. Static monitoring is difficult to cope with tool wear or fluctuations in material properties. Traditional models cannot identify the critical point of balance between energy consumption and quality. Furthermore, high-precision monitoring requires expensive equipment and cannot achieve real-time closed-loop control.
By constructing a coupled relationship model of energy consumption, vibration and surface roughness, multi-source data is collected in real time. Fuzzy logic is used to determine whether the current parameters are close to the critical point of energy efficiency and quality, and the parameters are automatically fine-tuned when a risk is detected, thus forming a closed-loop control.
It achieves the ability to maintain the optimal balance between energy efficiency and quality in the processing process in real time without increasing hardware investment, improves the reliability of decision-making and the stability of processing quality under complex working conditions, and avoids the imbalance caused by a single optimization objective in traditional methods.
Smart Images

Figure CN120962437A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and more specifically, to a green CNC machining method based on a software system. Background Technology
[0002] Currently, the field of green CNC machining generally employs two independent technical approaches. One approach involves establishing mathematical models of cutting parameters and energy consumption, using intelligent optimization algorithms to calculate the theoretically optimal parameter combinations, and then embedding the results into a preset machining parameter table for the CNC system. The other approach relies on external sensors to collect vibration or acoustic emission signals, setting fixed thresholds to monitor machining status, or using offline-trained machine learning models for quality assessment and tool wear diagnosis. A few systems attempt to construct linear relationship models between surface roughness and parameters such as cutting speed and feed rate, but these models require extensive offline experimental data.
[0003] Existing methods suffer from systemic flaws. The primary problem lies in the disconnect between energy consumption control and quality assurance. Surface quality constraints are not considered when optimizing energy consumption, leading to an imbalance in actual machining where excessive energy saving sacrifices workpiece accuracy. Static monitoring thresholds are ill-suited to dynamic conditions such as progressive tool wear or material property fluctuations, resulting in a high false alarm rate. The most critical limitation is the inability to identify the critical balance point between energy consumption and quality. When machining parameters fall within this sensitive range, traditional models lose their predictive effectiveness due to neglecting the nonlinear interactions of multiple physical quantities. Furthermore, high-precision monitoring typically requires expensive external sensors, significantly increasing costs and providing only post-analysis results, failing to achieve real-time closed-loop control of machining parameters. Typical cases demonstrate that parameter combinations solely focused on energy consumption optimization often induce hidden quality defects. Summary of the Invention
[0004] In order to overcome the above-mentioned defects of the prior art, the present invention provides a green CNC machining method based on a software system, which solves the problems mentioned in the background art through the following solution.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a green CNC machining method based on a software system, comprising: S1: Offline basic model construction and feature library generation: Before processing, a coupled relationship model of energy consumption, vibration and surface roughness is constructed using historical processing data, and key features are extracted as the benchmark for real-time analysis; S2: Real-time synchronous acquisition of multi-source data during machining: During machining, data from the CNC system and external sensors are acquired synchronously, and timestamp alignment and data cleaning are performed. S3: Dynamic Energy Efficiency-Mass Balance Point Analysis: Based on real-time data, the vibration characteristics and energy consumption characteristics under the current working conditions are calculated. Combined with the coupling model and feature threshold library of S1, fuzzy logic is used to determine whether the current parameters are close to the energy efficiency and mass critical point. S4: Parameter adaptive adjustment and re-verification: When S3 detects a critical risk, the system automatically fine-tunes the parameters within a safe range based on the current operating conditions and immediately verifies the adjustment effect, forming a closed-loop control.
[0006] Preferably, step S1 first involves data acquisition. Spindle energy consumption is collected using a power sensor built into the CNC system. A three-dimensional vibration sensor is installed near the spindle box to collect vibration acceleration signals. The surface roughness of the workpiece is measured offline using a contact roughness meter. Subsequently, feature engineering is performed to calculate the time-domain characteristics of the vibration signal, including the effective value and peak-to-peak value. The energy percentage of the main frequency band is extracted from the frequency-domain signal, and the energy consumption fluctuation coefficient is calculated. A coupled model is then established, and a surface roughness prediction model is constructed using a random forest regression algorithm. Finally, a feature threshold library is generated. For each material and tool combination, boundary values that meet the target roughness are statistically analyzed, including the maximum allowable effective vibration value and the energy consumption fluctuation coefficient threshold, forming a benchmark database for subsequent real-time comparison.
[0007] Preferably, step S2 first performs hardware configuration by reading the spindle power, actual feed rate, and spindle speed in real time through the OPC UA protocol of the CNC system. Simultaneously, it acquires the raw signals from the three-dimensional vibration sensor installed in the spindle box through a high-speed data acquisition card and uses a precise time protocol to synchronize the clocks of the CNC system and the DAQ card. Subsequently, data preprocessing is performed by applying a 5Hz high-pass filter to the vibration signal to eliminate vibration noise from the equipment base, and calculating the moving average of the power data with a window of 0.5s. Finally, key events are marked. When the actual feed rate is detected to deviate from the set value by more than 5%, the time period is marked as an abnormal feed state segment for subsequent analysis and elimination.
[0008] Preferably, step S3 first performs real-time feature extraction, calculating the effective value of the three-dimensional vibration signal and the energy consumption fluctuation coefficient every 10-second time window, and simultaneously analyzing the vibration spectrum and extracting the energy proportion of the main frequency band through fast Fourier transform; then, it performs dynamic fuzzy logic judgment, defining vibration relative deviation and energy consumption fluctuation deviation input variables, and mapping them to fuzzy sets respectively; it formulates a fuzzy rule base, and calculates the accurate risk level by defuzzifying using the centroid method; finally, it triggers critical point prediction, and when it is determined that the current parameter combination is close to the energy efficiency and quality critical point, it sends an optimization request to step S4.
[0009] Preferably, S4 first initiates a parameter adjustment strategy. When an optimization request is received from S3, the feed rate is reduced first, and a new value is calculated. The new feed rate is constrained to be no less than the minimum allowable feed rate of the material and tool combination. Then, an effect verification mechanism is executed. After adjustment, the system continuously monitors for two window periods and recalculates the risk level. If the risk level Risk_Level_new < 0.5, the new parameters are maintained; otherwise, a second adjustment is initiated. Finally, the historical learning update is completed. After each batch of processing is completed, the actual surface roughness measurement value and the optimized parameters are fed back to the coupled model of S1, and the maximum allowable effective vibration threshold and the upper limit of the energy consumption fluctuation coefficient threshold in the feature threshold library are dynamically updated.
[0010] The technical effects and advantages of this invention are as follows: This invention fundamentally solves the problem of the disconnect between energy efficiency optimization and quality assurance in existing technologies by constructing a dynamic coupling model of energy consumption, vibration, and surface quality. The system analyzes the correlation between spindle power fluctuation characteristics and multi-directional vibration signals in real time, accurately predicts the trend of surface roughness changes under the current parameter combination, and automatically triggers a fine-tuning mechanism for feed rate or cutting speed when it detects that further reduction of energy consumption will lead to the risk of quality deterioration. This closed-loop control process ensures that the machining process is always maintained in the optimal balance range between energy efficiency and quality, avoiding the imbalance caused by traditional single optimization objectives. To address the shortcomings of static thresholds in responding to dynamic factors such as tool wear and material property fluctuations, this invention introduces a fuzzy logic-driven critical point determination mechanism. By continuously calculating the relative deviation between the effective value of vibration, the energy consumption fluctuation coefficient, and the preset safety threshold, the system quantifies the degree to which the current working condition deviates from the optimal working area based on risk level. This mechanism can sensitively identify nonlinear state transitions within the parameter sensitive range and issue control commands before the actual quality deteriorates. Compared with fixed threshold alarms, it significantly improves the reliability of decision-making under complex working conditions. This invention utilizes data from the power sensor built into the CNC system to replace high-cost dedicated monitoring equipment. By deeply exploring the physical meaning of the energy consumption fluctuation coefficient, it constructs a low-cost indirect prediction channel for surface quality. After parameter adjustments, an effect verification process is immediately initiated, forming a closed-loop self-optimization system of "monitoring-analysis-adjustment-verification." The data feedback mechanism after machining enables the basic model to continuously evolve, gradually adapting to the current tooling status and production line environment. The entire solution achieves fully autonomous continuous optimization of the machining process without requiring additional hardware investment. Attached Figure Description
[0011] Figure 1 This is a schematic diagram of the overall structure of the present invention.
[0012] Figure 2 This is a schematic diagram of the S3 structure of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] refer to Figure 1-2 The green CNC machining method based on a software system, as shown, includes: S1: Offline basic model construction and feature library generation: Before processing, a coupled relationship model of energy consumption, vibration and surface roughness is constructed using historical processing data, and key features are extracted as the benchmark for real-time analysis.
[0015] S1 first performs data acquisition, collecting spindle energy consumption through the built-in power sensor of the CNC system, collecting vibration acceleration signals through a three-dimensional vibration sensor installed near the spindle box, and measuring the workpiece surface roughness offline using a contact roughness meter. Then, feature engineering is performed to calculate the time-domain characteristics of the vibration signal, including the effective value and peak-to-peak value, and to extract the energy proportion of the main frequency band from the frequency-domain signal, while simultaneously calculating the energy consumption fluctuation coefficient. Next, a coupled model is established, and a surface roughness prediction model is constructed using a random forest regression algorithm. Finally, a feature threshold library is generated, statistically analyzing the boundary values that satisfy the target roughness for each material and tool combination, including the maximum allowable effective vibration value and the energy consumption fluctuation coefficient threshold, forming a benchmark database for subsequent real-time comparison.
[0016] The data acquisition process involves three types of data acquisition devices working collaboratively during the offline preparation phase before machining begins. A standard power sensor integrated within the CNC system continuously monitors the actual spindle energy consumption data P. This sensor is directly connected to the CNC system's data bus to acquire current and voltage readings in real time and convert them into power values for storage. Industrial-grade triaxial vibration accelerometers are installed on the outer surface of the machine tool spindle box in the XYZ orthogonal directions. These sensors are fixed to the rigid structure of the spindle box via magnetic bases. Vibration signals are connected to an independent high-precision data acquisition card via shielded cables. This card continuously records the original triaxial vibration waveform data Vib_x, Vib_y, and Vib_z at a sampling frequency of 1kHz or higher. Workpiece surface quality data is acquired offline using a contact surface roughness measuring instrument. After each batch of trial machining is completed, the operator selects three measurement points in a designated area of the workpiece according to a standard procedure and performs stylus scanning. The arithmetic mean Ra of the measured surface profile is recorded as the actual roughness measurement result for that machining operation. The time stamps for the three types of data acquisition processes correspond to the batch number of the machining parameters.
[0017] The designated area for measuring the workpiece is selected in the central region of the machined surface. Specifically, it is a flat machined surface at least 5 mm from the edge of the workpiece and at least 3 mm from any sharp corner or chamfer. The measurement area should avoid workpiece clamping marks, tool entry and exit marks, and edge areas where burrs may exist. Linear or planar areas with stable tool paths and constant cutting parameters are preferred. For workpieces with complex shapes, the designated area should be a surface segment with relatively gentle curvature changes to ensure that the stylus of the contact roughness meter can make normal contact and complete the full scanning stroke. The interval between each measurement point should be no less than 2 mm, and the three measurement points should be distributed in an equilateral triangle to obtain representative data on the surface quality of the area.
[0018] The feature engineering process performs time-domain feature calculations on the acquired raw vibration signals. First, it extracts the effective value feature Vib_RMS of the vibration acceleration signal, which is obtained by averaging the squares of all sampling points of the vibration signal within a fixed time window and then taking the square root. Simultaneously, it calculates the peak-to-peak value feature Vib_Peak of the vibration signal, which is obtained by identifying the absolute difference between the highest and lowest points of the vibration waveform within the same time window. Frequency-domain feature analysis is then performed on the vibration signal. A fast Fourier transform is used to convert the time-domain signal into a frequency-domain energy distribution. Subsequently, the percentage of signal energy in the 500Hz to 2000Hz frequency band is calculated as the main frequency band energy proportion feature E_band. For the spindle power time-series data acquired by the CNC system, the energy consumption fluctuation coefficient feature P_var=σ(P) / μ(P) is generated by statistically analyzing the ratio of the standard deviation to the average value of the power value in each machining stage. Here, the standard deviation σ(P) reflects the degree of power dispersion, and the average value μ(P) represents the power baseline level.
[0019] The coupled model employs a random forest regression algorithm to construct a surface roughness prediction model. The model's input features include six key dimensions: the effective vibration value and dominant frequency band energy ratio characteristics obtained from vibration signal processing; the energy consumption fluctuation coefficient generated from power data analysis; and the actual cutting speed parameter v, feed rate parameter f, and depth of cut parameter ap applied during machining. The training dataset consists of complete working condition data records synchronously collected from historical machining tasks. Each record contains the aforementioned six input features and their corresponding offline precision measured surface roughness values. During model training, feature importance analysis automatically identifies the dominant influence weights of the effective vibration value and dominant frequency band energy ratio characteristics on surface roughness prediction. After training, the output is the predicted surface roughness value Ra_predicted for any given combination of machining parameters and real-time sensing data conditions. Model performance verification uses an independent test set for evaluation. The average absolute error between the predicted and measured values must be less than 0.15 micrometers to pass deployment verification. Finally, the optimal model determined through cross-validation will be integrated into the real-time analysis system for online quality prediction.
[0020] The feature threshold library filters all successfully completed machining task records from the historical machining database whose surface roughness measurements meet the target roughness Ra_target. For each specific combination of material type and tool model, the corresponding vibration effective value feature sequence and energy consumption fluctuation coefficient feature sequence are extracted. The vibration effective value data set under each material and tool combination is sorted in ascending order, and the feature value at the 95th percentile after sorting is taken as the upper limit of the vibration effective value threshold Vib_RMS_max for that combination. The same operation is performed on the energy consumption fluctuation coefficient data set under the same combination, and the value at the 95th percentile after sorting is taken as the upper limit of the energy consumption fluctuation coefficient threshold P_var_threshold. Finally, a structured storage index is established according to the dual dimensions of material type and tool model, and the correspondence between the vibration effective value threshold and the energy consumption fluctuation coefficient threshold is persistently stored in the feature threshold library. Subsequently, when a new successful machining record is added, the system automatically triggers the recalculation and dynamic update of the corresponding material and tool combination threshold, so that the threshold library continuously reflects the actual machining capability boundary.
[0021] S2: Real-time synchronous acquisition of multi-source data during machining: During machining, data from the CNC system and external sensors are acquired synchronously, and timestamp alignment and data cleaning are performed.
[0022] S2 first performs hardware configuration, reading spindle power, actual feed rate, and spindle speed in real time via the CNC system's OPC UA protocol. Simultaneously, it acquires raw signals from the three-dimensional vibration sensor installed in the spindle box via a high-speed data acquisition card, and uses a precise time protocol to synchronize the clocks of the CNC system and the DAQ card. Next, data preprocessing is performed, applying a 5Hz high-pass filter to the vibration signal to eliminate equipment base vibration noise, and calculating a moving average for the power data with a 0.5s window. Finally, key events are marked; when the actual feed rate deviates from the set value by more than 5%, that time period is marked as an abnormal feed state segment for subsequent analysis and troubleshooting.
[0023] First, configure the hardware connection. The CNC system reads the spindle power data P_real, actual feed rate data f_real, and spindle speed data v_real in real time through the OPC UA communication protocol. At the same time, a three-axis vibration sensor is installed near the machine tool spindle box. The high-speed data acquisition card collects the original vibration signals in the XYZ directions at a sampling rate of 1000 times per second. A precise time protocol is used to perform hard synchronization between the internal clock of the CNC system and the clock of the data acquisition card. After acquiring the raw data, the process enters the preprocessing stage. A 5Hz high-pass digital filter is applied to the vibration signal to eliminate low-frequency vibration noise transmitted from the equipment base. The moving average value P_avg of the spindle power data is calculated with a time window of 0.5 seconds to generate a smooth power sequence. The deviation between the actual feed rate and the set value is monitored in real time. When the absolute value of the feed rate deviation is detected to continuously exceed 5% of the set value, the time period is automatically marked as an abnormal feed state segment and the start and end times are recorded. The vibration data, power data, and processing status markings of the entire process are stored in the time series database with a unified time base.
[0024] S3: Dynamic Energy Efficiency-Mass Balance Point Analysis: Based on real-time data, the vibration characteristics and energy consumption characteristics under the current operating conditions are calculated. Combined with the coupling model and feature threshold library of S1, fuzzy logic is used to determine whether the current parameters are close to the energy efficiency and mass critical point.
[0025] S3 first performs real-time feature extraction, calculating the effective value and energy consumption fluctuation coefficient of the three-dimensional vibration signal every 10-second time window. Simultaneously, it analyzes the vibration spectrum and extracts the energy proportion of the main frequency band through fast Fourier transform. Then, it performs dynamic fuzzy logic judgment, defines the vibration relative deviation and energy consumption fluctuation deviation input variables, and maps them to fuzzy sets respectively. It formulates a fuzzy rule base and calculates the accurate risk level by defuzzifying using the centroid method. Finally, it triggers critical point prediction. When it is determined that the current parameter combination is close to the energy efficiency and quality critical point, it sends an optimization request to S4.
[0026] The feature extraction stage system continuously processes synchronously acquired multi-source data within a fixed time window. Every 10 seconds serves as a data window. The system first processes the triaxial vibration sensor signals, performing bandpass filtering on the raw vibration acceleration data along the X, Y, and Z axes. The filtering range is set to 500Hz to 2000Hz to shield against vibration noise from the equipment base. Next, the system calculates the effective vibration value Vib_RMS_real, which is obtained by taking the square root of the average of the sum of squares of the filtered triaxial vibration signals. Specifically, the system first calculates the triaxial composite acceleration value at each sampling point, and then obtains the effective value of this composite acceleration over the entire time window. Simultaneously, the system processes the power data transmitted by the CNC system. According to the data, the real-time spindle power value P_real acquired at 0.5-second intervals is preprocessed, and the fluctuation coefficient P_var_real of the moving average power value P_avg within the 10-second window is calculated. This coefficient is obtained through statistical methods: first, the standard deviation of all P_avg values within the window is calculated, and then divided by its arithmetic mean. Finally, frequency domain feature extraction is performed, and the vibration signal of the current window is converted from the time domain to the frequency domain using a fast Fourier transform. The percentage of total energy in the 500Hz to 2000Hz frequency band in the frequency domain is calculated as the main frequency band energy proportion E_band_real.
[0027] After calculating the vibration effective value Vib_RMS_real, energy consumption fluctuation coefficient P_var_real, and main frequency band energy proportion E_band_real during the real-time feature extraction stage, the system initiates the fuzzy logic judgment process. First, two key input variables are calculated: the vibration effective value deviation ΔVib is obtained by subtracting the maximum allowable vibration effective threshold Vib_RMS_max for the corresponding material and tool combination in the feature library from the real-time vibration effective value data, and then dividing by this maximum allowable value. Specifically, ΔVib = (Vib_RMS_real - Vib_RMS_max) / Vib_RMS_max; the energy consumption fluctuation deviation ΔP_var is obtained by subtracting the upper limit of the corresponding energy consumption fluctuation threshold coefficient P_var_threshold in the feature library from the real-time energy consumption fluctuation coefficient, and then dividing by this threshold. Specifically, ΔP_var = (P_var_real - P_var_threshold) / P_var_threshold. The system defines three fuzzy sets for ΔVib: negative large (NB) indicates that the vibration is significantly lower than the safety threshold, negative small (NS) indicates that the vibration is slightly lower than the safety threshold, and zero (ZO) indicates that the vibration is close to the safety threshold critical point; it defines two fuzzy sets for ΔP_var: negative large indicates that the energy consumption fluctuation is significantly lower than the safety threshold, and negative small indicates that the energy consumption fluctuation is slightly lower than the safety threshold; it defines two fuzzy sets for E_band_real: normal (N) indicates that the deviation from the historical benchmark value of the corresponding combination in the feature library is within ±20%, and abnormal (A) indicates that the deviation from the historical benchmark value of the corresponding combination in the feature library exceeds ±20%; the output variable risk level Risk_Level defines three fuzzy sets: low (L) represents no need for optimization, medium (M) represents that monitoring and observation are required, and high (H) represents that immediate intervention is required.
[0028] For vibration effective value deviation ΔVib, a value < -0.15 is defined as significantly below the safety threshold, a value ≥ -0.15 and < -0.05 is defined as slightly below the safety threshold, and a value ≥ -0.05 and ≤ 0.05 is defined as close to the safety threshold critical point. For energy consumption fluctuation deviation ΔP_var, a value < -0.2 is defined as significantly below the safety threshold, and a value ≥ -0.2 and < -0.05 is defined as slightly below the safety threshold.
[0029] The fuzzy rule base contains multiple judgment logics. The core rule is: if ΔVib is in a zero state and ΔP_var is in a negative small state, while E_band_real shows an anomaly, then the risk level Risk_Level is set to high.
[0030] Auxiliary rules: If ΔVib is in a zero state but E_band_real is normal, set Risk_Level to medium. If both ΔVib and ΔP_var are in a negative state, Risk_Level is set to low. If ΔVib is in a negative small state and ΔP_var is in a negative small state, Risk_Level is set to medium.
[0031] Example: IF ΔVib is ZO AND E_band_real is N THEN Risk_Level is M IF ΔVib is NB AND ΔP_var is NB THEN Risk_Level is L IF ΔVib is NS AND ΔP_var is NS THEN Risk_Level is M The system uses the centroid method to defuzzify the data, weights and superimposes the output fuzzy sets of all triggering rules, and calculates the accurate risk level (Risk_Level) value. When this value is greater than 0.7, the system determines that the current processing state is at the energy efficiency and quality critical point and sends a parameter optimization request to S4.
[0032] S4: Parameter adaptive adjustment and re-verification: When S3 detects a critical risk, the system automatically fine-tunes the parameters within a safe range based on the current operating conditions and immediately verifies the adjustment effect, forming a closed-loop control.
[0033] S4 first initiates a parameter adjustment strategy. When it receives an optimization request from S3, it prioritizes reducing the feed rate and calculates a new value, while constraining the new feed rate to be no less than the minimum allowable feed rate for the material and tool combination. Subsequently, an effect verification mechanism is executed. After adjustment, it continuously monitors for two window periods and recalculates the risk level. If the risk level Risk_Level_new < 0.5, the new parameters are maintained; otherwise, a second adjustment is initiated. Finally, the historical learning update is completed. After each batch of processing is completed, the actual surface roughness measurement value and the optimized parameters are fed back to the coupled model of S1, dynamically updating the maximum allowable effective vibration threshold and the upper limit of the energy consumption fluctuation coefficient threshold in the feature threshold library.
[0034] When the parameter adjustment strategy is executed, the system prioritizes reducing the feed rate f as the adjustment target. The adjustment range is calculated based on the real-time acquired actual feed rate f_current and the Risk_Level value output by S3, and the new feed rate value is determined according to the formula f_new=f_current×(1-0.03×Risk_Level). At the same time, the system enforces constraint verification to ensure that the calculated f_new value is not lower than the minimum allowable feed rate f_min corresponding to the material tool combination recorded in the feature threshold library generated by S1. If the calculated f_new is lower than f_min, the system automatically sets f_new to f_min.
[0035] After the parameter adjustment strategy is executed, the system immediately initiates an effect verification mechanism. First, two consecutive monitoring window periods are set as verification periods, each lasting 10 seconds, consistent with the dynamic analysis window of S3. During this period, the system continuously collects real-time data and recalculates the new risk level, Risk_Level_new, using a calculation method that fully reuses the fuzzy logic judgment process defined in S3. After the two consecutive window periods end, the system makes a decision based on the latest calculated Risk_Level_new value: if Risk_Level_new is less than or equal to 0.5, the adjusted parameters are deemed effective, and the system maintains the adjusted parameters. The adjusted feed rate f_new continues processing; if Risk_Level_new is still greater than 0.5, it is determined that the first adjustment did not meet expectations. At this time, the system automatically triggers a second-level adjustment, reducing the cutting speed v according to the same logical priority and risk assessment method as the first adjustment. Specifically, the new value is calculated based on the current actual cutting speed v_current using the formula v_new=v_current×(1-0.03×Risk_Level_new), while ensuring that v_new is not lower than the corresponding minimum allowable cutting speed v_min in the feature threshold library; the entire verification process is completed within 20 seconds without interrupting the processing flow.
[0036] After each batch of machining tasks is completed, the system automatically initiates a history learning and update process. First, it extracts the optimized parameter combination from the CNC system log for the last execution of that batch, including the actual new cutting speed v_new, new feed rate f_new, and depth of cut ap. Simultaneously, it acquires the offline measured surface roughness value Ra_real of the finished workpiece for that batch. This data is manually entered into the system by the operator after measurement using a contact roughness meter. The system binds these data with the material type and tool number corresponding to that batch of machining, forming a complete learning record. Then, it calls the random forest regression model built in S1, inputting the new parameter combination and the measured Ra_real value as incremental training samples into the model, triggering the model to... Fine-tuning is performed to optimize the surface roughness prediction function. Simultaneously, the upper limit of the effective vibration value Vib_RMS_max and the energy consumption fluctuation coefficient threshold P_var_threshold for the tool combination corresponding to this material are updated in the feature threshold library. The update rule is: if the current Ra_real meets the target roughness Ra_target and is lower than the predicted value corresponding to the historical threshold, then the original Vib_RMS_max is replaced with the currently monitored maximum Vib_RMS_real value, and the original P_var_threshold is replaced with the currently calculated maximum P_var_real value. The entire update process is executed asynchronously in the background, and the updated model and threshold library will take effect immediately in the next batch of similar machining operations.
[0037] Secondly: The accompanying drawings of the embodiments disclosed in this invention only involve the structures involved in the embodiments disclosed in this invention. Other structures can refer to the general design. In the absence of conflict, the same embodiment and different embodiments of this invention can be combined with each other. In conclusion, the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A green CNC machining method based on a software system, characterized in that, include: S1: Offline basic model construction and feature library generation: Before processing, a coupled relationship model of energy consumption, vibration and surface roughness is constructed using historical processing data, and key features are extracted as the benchmark for real-time analysis; S2: Real-time synchronous acquisition of multi-source data during machining: During machining, data from the CNC system and external sensors are acquired synchronously, and timestamp alignment and data cleaning are performed. S3: Dynamic Energy Efficiency-Mass Balance Point Analysis: Based on real-time data, the vibration characteristics and energy consumption characteristics under the current working conditions are calculated. Combined with the coupling model and feature threshold library of S1, fuzzy logic is used to determine whether the current parameters are close to the energy efficiency and mass critical point. S4: Parameter adaptive adjustment and re-verification: When S3 detects a critical risk, the system automatically fine-tunes the parameters within a safe range based on the current operating conditions and immediately verifies the adjustment effect, forming a closed-loop control.
2. The method according to claim 1, characterized in that, S1 includes: First, data acquisition is performed. Spindle energy consumption is collected using the power sensor built into the CNC system, and vibration acceleration signals are collected by a three-dimensional vibration sensor installed near the spindle box. The surface roughness of the workpiece is measured offline using a contact roughness meter. Then, feature engineering is performed to calculate the time-domain characteristics of the vibration signal, including the effective value and peak-to-peak value. The energy proportion of the main frequency band is extracted from the frequency domain signal, and the energy consumption fluctuation coefficient is calculated. Next, a coupled model is established, and a surface roughness prediction model is constructed using a random forest regression algorithm. Finally, a feature threshold library is generated. For each material and tool combination, the boundary values that meet the target roughness are statistically analyzed, including the maximum allowable effective vibration value and the energy consumption fluctuation coefficient threshold, forming a benchmark database for subsequent real-time comparison.
3. The method according to claim 1, characterized in that, S2 includes: First, hardware configuration is performed. The spindle power, actual feed rate, and spindle speed are read in real time via the CNC system's OPC UA protocol. Simultaneously, the raw signals from the three-dimensional vibration sensor installed in the spindle box are acquired via a high-speed data acquisition card, and a precise time protocol is used to synchronize the clocks of the CNC system and the DAQ card. Then, data preprocessing is performed. A 5Hz high-pass filter is applied to the vibration signal to eliminate vibration noise from the equipment base, and a moving average is calculated for the power data with a 0.5s window. Finally, critical events are marked. When the actual feed rate deviates from the set value by more than 5%, that time period is marked as an abnormal feed state segment for subsequent analysis and troubleshooting.
4. The method according to claim 1, characterized in that, S3 includes: First, real-time feature extraction is performed, calculating the effective value and energy consumption fluctuation coefficient of the three-dimensional vibration signal every 10-second time window. Simultaneously, the vibration spectrum is analyzed and the energy proportion of the main frequency band is extracted through fast Fourier transform. Next, dynamic fuzzy logic judgment is executed, defining vibration relative deviation and energy consumption fluctuation deviation as input variables, which are mapped to fuzzy sets respectively. A fuzzy rule base is formulated, and the accurate risk level is calculated by defuzzification using the centroid method. Finally, critical point prediction is triggered. When it is determined that the current parameter combination is close to the energy efficiency and quality critical point, an optimization request is sent to S4.
5. The method according to claim 4, characterized in that, The feature extraction includes: The feature extraction stage system continuously processes synchronously acquired multi-source data within a fixed time window, with each 10-second window serving as a data window. The system first processes the triaxial vibration sensor signals, performing bandpass filtering on the raw vibration acceleration data along the X, Y, and Z axes. The filtering range is set to 500Hz to 2000Hz to shield against vibration noise from the equipment base. Next, the system calculates the effective vibration value Vib_RMS_real, which is obtained by taking the square root of the average of the sum of squares of the filtered triaxial vibration signals. Specifically, the system first calculates the triaxial composite acceleration value at each sampling point, and then obtains the effective value of this composite acceleration over the entire time window. The system processes the power data transmitted from the CNC system, preprocesses the real-time spindle power value P_real acquired at 0.5-second intervals, and calculates the fluctuation coefficient P_var_real of the moving average power value P_avg within the 10-second window. This coefficient is obtained through statistical methods: first, the standard deviation of all P_avg values within the window is calculated, and then divided by its arithmetic mean. Finally, frequency domain feature extraction is performed, and the vibration signal of the current window is converted from the time domain to the frequency domain using a fast Fourier transform. The percentage of total energy in the 500Hz to 2000Hz frequency band in the frequency domain is calculated as the main frequency band energy proportion E_band_real.
6. The method according to claim 5, characterized in that, The fuzzy logic determination includes: After calculating the vibration effective value Vib_RMS_real, energy consumption fluctuation coefficient P_var_real, and main frequency band energy proportion E_band_real during the real-time feature extraction stage, the system initiates the fuzzy logic judgment process. First, it calculates two key input variables: vibration effective value deviation ΔVib, which is obtained by subtracting the maximum allowable vibration effective threshold Vib_RMS_max of the corresponding material tool combination in the feature library from the real-time vibration effective value data, and then dividing by the maximum allowable value, specifically expressed as: ΔVib=(Vib_RMS_real-Vib_RMS_max) / Vib_RMS_max; and energy consumption fluctuation deviation ΔP_var, which is obtained by subtracting the upper limit of the corresponding energy consumption fluctuation threshold coefficient P_var_threshold in the feature library from the real-time energy consumption fluctuation coefficient, and then dividing by the threshold, specifically expressed as: ΔP_var=(P_var_real-P_var_threshold) / P_var_threshold.
7. The method according to claim 6, characterized in that, The fuzzy logic determination also includes: The system defines three fuzzy sets for ΔVib: negative large (NB) indicates vibration is significantly below the safety threshold, negative small (NS) indicates vibration is slightly below the safety threshold, and zero (ZO) indicates vibration is close to the safety threshold critical point; two fuzzy sets are defined for ΔP_var: negative large indicates energy consumption fluctuation is significantly below the safety threshold, and negative small indicates energy consumption fluctuation is slightly below the safety threshold; two fuzzy sets are defined for E_band_real: normal (N) indicates deviation from the historical benchmark value of the corresponding combination in the feature library is within ±20%, and abnormal (A) indicates deviation from the historical benchmark value of the corresponding combination in the feature library is greater than ±20%; the output variable risk level Risk_Level is defined with three fuzzy sets: low (L) indicates no optimization is necessary, medium (M) indicates monitoring and observation are required, and high (H) indicates immediate intervention is required; For vibration effective value deviation ΔVib, a value < -0.15 is defined as significantly below the safety threshold, a value ≥ -0.15 and < -0.05 is defined as slightly below the safety threshold, and a value ≥ -0.05 and ≤ 0.05 is defined as close to the safety threshold critical point. For energy consumption fluctuation deviation ΔP_var, a value < -0.2 is defined as significantly below the safety threshold, and a value ≥ -0.2 and < -0.05 is defined as slightly below the safety threshold.
8. The method according to claim 7, characterized in that, The core rules of the fuzzy rule base are: If ΔVib is in a zero state and ΔP_var is in a negative small state, while E_band_real shows an anomaly, then the risk level Risk_Level is set to high.
9. The method according to claim 8, characterized in that, The critical point prediction includes: The system uses the centroid method to defuzzify the data, weights and superimposes the output fuzzy sets of all triggering rules, and calculates the accurate risk level (Risk_Level) value. When this value is greater than 0.7, the system determines that the current processing state is at the energy efficiency and quality critical point and sends a parameter optimization request to S4.
10. The method according to claim 1, characterized in that, S4 includes: First, the parameter adjustment strategy is initiated. When an optimization request is received from S3, the feed rate is reduced first, and a new value is calculated. The new feed rate is constrained to be no less than the minimum allowable feed rate for the material and tool combination. Then, the effect verification mechanism is executed. After adjustment, the system is continuously monitored for two window periods and the risk level is recalculated. If the risk level Risk_Level_new < 0.5, the new parameters are maintained; otherwise, a second adjustment is initiated. Finally, the historical learning update is completed. After each batch of machining is completed, the actual surface roughness measurement value and the optimized parameters are fed back to the coupled model of S1 to dynamically update the maximum allowable effective vibration threshold and the upper limit of the energy consumption fluctuation coefficient threshold in the feature threshold library.
Citation Information
Patent Citations
Machine tool controller
CN105446270A
Numerical control machine tool and adaptive control system based on deep learning
CN117348528A
Machining control method, device and system based on five-axis machining machine tool and medium
CN119644920A
High-precision multi-axis machining composite numerical control machine tool control system
CN119871091A
Intelligent numerical control machine tool automatic programming path optimization method based on workpiece modeling
CN120523132A