A green numerical control machining method based on a software system
By constructing a coupled model of energy consumption and vibration, and combining it with fuzzy logic judgment, a real-time balance between energy efficiency and quality in green CNC machining was achieved. This solved the problem of the separation between energy consumption optimization and quality assurance in existing technologies, and enabled low-cost, autonomous, and continuous optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-03-24
AI Technical Summary
In existing green CNC machining technologies, energy consumption control and quality assurance are separated, which makes it easy for workpiece accuracy to be lost when optimizing energy consumption. Static monitoring is difficult to cope with dynamic working conditions, and 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 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 a real-time balance between energy efficiency and quality without increasing hardware investment, improves the reliability of decision-making under dynamic operating conditions, avoids the imbalance caused by traditional optimization, and forms a low-cost autonomous continuous optimization system.
Smart Images

Figure CN120962437B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data analysis, more particularly, the present application relates to a green numerical control machining method based on a software system. BACKGROUND
[0002] Two independent technical paths are generally adopted in the current green numerical control machining field. On the one hand, a mathematical model of cutting parameters and energy consumption is established, and an intelligent optimization algorithm is used to calculate the theoretically optimal parameter combination, and the result is solidified as the preset machining parameter table of the numerical control system. On the other hand, based on external sensors to collect vibration or acoustic emission signals, a fixed threshold is set to implement machining state monitoring, or a machine learning model trained offline is used for quality evaluation and tool wear diagnosis. A few systems attempt to build a linear relationship model of surface roughness and cutting speed, feed rate and other parameters, but such models need to rely on a large amount of offline experimental data.
[0003] The existing method has systematic defects. The primary problem is that energy consumption control and quality assurance are handled separately, and the surface quality constraint is not considered when optimizing energy consumption, which easily leads to an imbalance phenomenon of excessive pursuit of energy saving at the expense of workpiece precision in actual machining. Static monitoring threshold is difficult to cope with dynamic working conditions such as gradual tool wear or material property fluctuations, resulting in a high misjudgment rate. The most critical limitation is that it cannot identify the balance critical point of energy consumption and quality, and when the machining parameters are in this sensitive interval, the traditional model loses its predictive effectiveness due to the neglect of the nonlinear interaction of multiple physical quantities. In addition, high-precision monitoring often requires the configuration of expensive external sensing equipment, which not only significantly increases the cost, but also can only provide post-analysis results, and cannot achieve real-time closed-loop regulation of machining parameters. Typical cases show that parameter combinations that simply pursue energy optimization often induce hidden quality defects. SUMMARY
[0004] In order to overcome the above-mentioned defects of the prior art, the present application provides a green numerical control machining method based on a software system, which solves the problems raised in the background art by the following scheme.
[0005] In order to achieve the above-mentioned purpose, the present application provides the following technical scheme: a green numerical control machining method based on a software system, comprising:
[0006] S1: Offline basic model construction and feature library generation: before machining, use historical machining data to construct a coupling relationship model of energy consumption, vibration, and surface roughness, and extract key features as a benchmark for real-time analysis;
[0007] S2: Real-time synchronous acquisition of multi-source data in the machining process: during machining operation, synchronously acquire internal data of the numerical control system and external sensor data, and perform time stamp alignment and data cleaning;
[0008] S3: Dynamic energy-efficiency-quality balance point analysis: Based on real-time data, the vibration characteristics and energy consumption characteristics under the current working condition are calculated, the coupling model and feature threshold library of S1 are combined, and the current parameters are judged by fuzzy logic whether they are close to the energy efficiency and quality critical point;
[0009] S4: Parameter adaptive adjustment and re-verification: When S3 detects critical risk, the system automatically fine-tunes the parameters within the safe range according to the current working condition, and immediately verifies the adjustment effect to form a closed-loop control.
[0010] Preferably, S1 first performs data acquisition, acquires spindle energy consumption through the power sensor built-in the numerical control system, acquires vibration acceleration signals by installing three-direction vibration sensors near the spindle box, and measures the surface roughness of the workpiece offline using a contact type roughness meter; then performs feature engineering, calculates time domain features of vibration signals: including effective value and peak-to-peak value, extracts main frequency band energy ratio of frequency domain signals, and calculates energy consumption fluctuation coefficient; further establishes a coupling model, uses random forest regression algorithm to build a surface roughness prediction model, and finally generates a feature threshold library, which, for each material and tool combination, statistics the boundary values that meet the target roughness: including the allowed maximum vibration effective value and energy consumption fluctuation coefficient threshold, forming a benchmark database for subsequent real-time comparison.
[0011] Preferably, S2 first performs hardware configuration, reads spindle power, actual feed rate, and spindle speed in real time through the OPC UA protocol of the numerical control system, acquires original signals of three-direction vibration sensors installed on the spindle box through a high-speed data acquisition card, and uses the precise time protocol to realize clock synchronization between the numerical control system and the DAQ card; then performs data preprocessing, applies 5Hz high-pass filter to vibration signals to eliminate equipment base vibration noise, and calculates moving average value of power data with 0.5s window; finally, mark key events, when the actual feed rate deviates from the set value by more than 5%, mark the time period as a feed abnormal state segment for subsequent analysis and exclusion.
[0012] Preferably, S3 first performs real-time feature extraction, calculates the effective value and energy consumption fluctuation coefficient of three-direction vibration signals every 10s time window, and analyzes the vibration spectrum and extracts the main frequency band energy ratio through fast Fourier transform; then performs dynamic fuzzy logic judgment, defines vibration relative deviation and energy consumption fluctuation deviation input variables, and maps them to fuzzy sets respectively; formulates a fuzzy rule library, and calculates the accurate risk level by defuzzification through the barycentric method; finally triggers critical point prediction, when it is determined that the current parameter combination is close to the energy efficiency and quality critical point, sends an optimization request to S4.
[0013] Preferably, the S4 firstly starts the parameter adjustment strategy, when receiving the optimization request of S3, the feed rate is preferentially reduced, and a new value is calculated, and the new value of the feed rate is constrained to be not lower than the minimum allowable feed rate of the material and the tool combination; then an effect verification mechanism is executed, the risk level is recalculated after the adjustment and continuous monitoring for 2 window periods, if the risk level Risk_Level_new<0.5, the new parameter is kept, otherwise, secondary adjustment is started; finally, the history learning update is completed, after each batch of machining is finished, the actual surface roughness measurement value and the optimization parameter are fed back to the coupling model of S1, and the maximum allowable vibration effective threshold value and the upper limit of the energy consumption fluctuation coefficient threshold value in the feature threshold value library are dynamically updated.
[0014] Technical effects and advantages of the present application:
[0015] The present application fundamentally solves the problem that energy efficiency optimization and quality guarantee are separated in the prior art by constructing a dynamic coupling model of energy consumption-vibration-surface quality, the correlation between spindle power fluctuation characteristics and multi-directional vibration signals is analyzed in real time, the change trend of surface roughness under the current parameter combination is accurately predicted, when it is detected that continuing to reduce energy consumption will cause quality deterioration risk, a fine adjustment mechanism of the feed rate or the cutting speed is automatically triggered, and the closed-loop control process ensures that the machining process is always maintained in the optimal balance interval of energy efficiency and quality, and imbalance caused by a single optimization target in the prior art is avoided.
[0016] In view of the defect that a static threshold value cannot respond to dynamic factors such as tool wear and material property fluctuation, the present application introduces a critical point judgment mechanism driven by fuzzy logic, the relative deviation degree of the vibration effective value, the energy consumption fluctuation coefficient and the preset safety threshold value is continuously calculated, the system quantitatively evaluates the degree to which the current working condition deviates from the optimal working zone in terms of risk level, the mechanism can sensitively identify the nonlinear state transition in the parameter sensitive interval, and the regulation instruction is issued before the quality actually deteriorates, compared with the fixed threshold value alarm, the decision reliability under complex working conditions is significantly improved.
[0017] The present application uses the data of the power sensor built in the numerical control system to replace high-cost special monitoring equipment, a low-cost surface quality indirect prediction channel is constructed by deeply mining the physical meaning of the energy consumption fluctuation coefficient, an effect verification process is started immediately after parameter adjustment, a closed-loop self-optimization system of'monitoring-analysis-adjustment-verification' is formed, and the data feedback mechanism after machining makes the basic model have continuous evolution ability, and gradually adapts to the current tool state and production line environment. The whole scheme realizes the full autonomous and continuous optimization of the machining process without increasing hardware investment. BRIEF DESCRIPTION OF DRAWINGS
[0018] Fig. 1 It is a whole structure schematic view of the present application.
[0019] Fig. 2A schematic diagram of the S3 structure of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present application.
[0021] Reference Figs. 1-2 The green numerical control machining method based on a software system shown comprises:
[0022] S1: Offline basic model construction and feature library generation: before machining, the coupling relationship model of energy consumption, vibration and surface roughness is constructed by using historical machining data, and key features are extracted as the benchmark for real-time analysis.
[0023] The S1 first performs data acquisition, acquires spindle energy consumption through the power sensor built in the numerical control system, acquires vibration acceleration signals by installing three-direction vibration sensors near the spindle box, and measures the surface roughness of the workpiece offline using a contact-type roughness meter; then performs feature engineering, calculates time-domain features of the vibration signal: including the effective value and the peak-to-peak value, extracts the main frequency band energy ratio of the frequency-domain signal, and calculates the energy consumption fluctuation coefficient; further establishes a coupling model, uses a random forest regression algorithm to construct a surface roughness prediction model, and finally generates a feature threshold library, which, for each material and tool combination, counts the boundary values when the target roughness is met: including the allowable maximum vibration effective value and the energy consumption fluctuation coefficient threshold, forming a benchmark database for subsequent real-time comparison.
[0024] The data acquisition is in the offline preparation stage before the start of machining, and three types of data acquisition devices work cooperatively; the standard power sensor integrated in the numerical control system is used to continuously monitor the actual energy consumption data P of the spindle, the sensor is directly connected to the data bus of the numerical control system to obtain current and voltage readings in real time and convert them into power values for storage; industrial-grade three-axis vibration acceleration sensors are installed on the outer surface of the machine tool spindle box in three orthogonal directions, and are fixed to the rigid structure surface of the spindle box through a magnetic base, the vibration signal is connected to an independent high-precision data acquisition card through a shielded cable, and the acquisition card continuously records three-direction vibration raw waveform data Vib_x, Vib_y, Vib_z at a sampling frequency of more than 1 kHz; the workpiece surface quality data is obtained offline by using a contact-type surface roughness measuring instrument, and after each batch of trial machining is completed, the operator selects three measurement points in the specified area of the workpiece according to the standard process to perform stylus scanning, and the measured arithmetic average value Ra of the surface profile is recorded as the actual measurement result of the roughness of this machining; the time marks of the three types of data acquisition processes correspond to the batch number of machining parameters.
[0025] The workpiece specified area selects the center area of the machined surface, specifically the flat machined surface at least 5 mm away from the workpiece edge and at least 3 mm away from any sharp corner or chamfer. The measurement area should avoid workpiece clamping marks, tool entry and exit marks, and edge parts that may have burrs. Straight lines or flat areas with stable tool paths and constant cutting parameters are preferred. For complex profile workpieces, the specified area should select a surface segment with relatively gentle curvature to ensure that the contact stylus of the contact profilometer can normally contact and complete the complete 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 of the surface quality of the area.
[0026] The feature engineering calculates the time-domain features of the collected original vibration signal. First, the effective value feature Vib_RMS of the vibration acceleration signal is extracted. This feature is obtained by averaging the square values of all sampling points in a fixed time window and then taking the square root. At the same time, the peak-to-peak value feature Vib_Peak of the vibration signal is calculated. This feature is obtained by identifying the absolute difference between the highest point and the lowest point of the vibration waveform in the same time window. The frequency-domain feature analysis of the vibration signal is performed. The time-domain signal is converted into frequency energy distribution using fast Fourier transform, and then the percentage of signal energy in the 500Hz to 2000Hz frequency band range to the total energy is calculated as the main frequency band energy ratio feature E_band. For the spindle power time series data collected by the numerical control system, the energy consumption fluctuation coefficient feature P_var=σ(P) / μ(P) is generated by calculating the ratio of the standard deviation and the average value of the power value in each machining stage. The standard deviation σ(P) reflects the power dispersion degree, and the average value μ(P) represents the power reference level.
[0027] The coupling model adopts a random forest regression algorithm to construct a surface roughness prediction model, the input features of the model include six key dimensions: vibration effective value features and main frequency band energy proportion features obtained by processing vibration signals, energy consumption fluctuation coefficient features generated by power data analysis, cutting speed parameter v, feed rate parameter f and cutting depth parameter ap actually applied in the machining process; the training data set is derived from the complete working condition data records synchronously collected in the historical machining tasks, each record contains the above six input features and the corresponding offline precise measurement surface roughness true value; in the model training stage, the dominant influence weight of the vibration effective value features and the main frequency band energy proportion features on the surface roughness prediction is automatically identified through feature importance analysis; after training, the output is the surface roughness prediction value Ra_predicted under the condition of any given machining parameter combination and real-time sensing data; the model performance verification uses an independent test set for evaluation, requiring the average absolute error between the predicted value and the measured value to be less than 0.15 microns to pass the deployment verification, and the final optimal model determined by cross-validation is solidified to the real-time analysis system for online quality prediction.
[0028] The feature threshold library selects all machining task records that are successfully completed and have surface roughness measurement values meeting the target roughness Ra_target from the historical machining database; for each specific combination of material type and tool type, 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 95% position after sorting is taken as the upper limit of the vibration effective value threshold Vib_RMS_max for this combination; the energy consumption fluctuation coefficient data set under this combination is simultaneously subjected to the same operation, and the value at the 95% position 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 type, and the corresponding relationship between the vibration effective value threshold and the energy consumption fluctuation coefficient threshold is persistently stored in the feature threshold library; when new successful machining records are added, the system automatically triggers the recalculation and dynamic update of the threshold values for the corresponding material and tool combination, so that the threshold library continuously reflects the actual machining capability boundary.
[0029] S2: Real-time synchronous acquisition of multi-source data in the machining process: During machining, synchronous acquisition of internal data of the numerical control system and external sensor data is performed, and time stamp alignment and data cleaning are performed.
[0030] The S2 first performs hardware configuration, reads the spindle power, actual feed rate, and spindle speed in real time through the OPC UA protocol of the numerical control system, simultaneously obtains the original signals of the three-direction vibration sensor installed on the spindle box through the high-speed data acquisition card, and realizes the clock synchronization of the numerical control system and the DAQ card by using the precise time protocol; then performs data preprocessing, applies a 5Hz high-pass filter to the vibration signal to eliminate the vibration noise of the equipment base, and calculates the moving average value of the power data with a 0.5s window; finally, the key events are marked, and when it is detected that the actual feed rate deviates from the set value by more than 5%, the time period is marked as an abnormal feed state period for subsequent analysis and exclusion.
[0031] First, the hardware connection is configured, the numerical control system reads the spindle power data P_real, the actual feed rate data f_real, and the 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, and the XYZ three-direction vibration original signals are collected at a sampling rate of 1000 times per second through a high-speed data acquisition card, and the precise time protocol is used to perform hard synchronization on the internal clock of the numerical control system and the clock of the data acquisition card;
[0032] After the original data acquisition is completed, the preprocessing stage is entered, a 5Hz high-pass digital filter is applied to the vibration signal to eliminate the low-frequency vibration noise transmitted by the equipment base; the moving average value P_avg of the spindle power data is calculated with a 0.5s time window to generate a smooth power sequence; the deviation of the actual feed rate from the set value is monitored in real time, and when it is detected that the absolute value of the feed rate deviation continuously exceeds the set value of 5%, the time period is automatically marked as an abnormal feed state period and the start and end times are recorded, and the vibration data, power data and processing state mark are stored in the time series database with a unified time reference.
[0033] S3: Dynamic energy efficiency-quality balance point analysis: based on real-time data, the vibration characteristics and energy consumption characteristics under the current working condition are calculated, the coupling model and feature threshold library of S1 are combined, and whether the current parameters are close to the energy efficiency and quality critical point is judged by fuzzy logic.
[0034] The S3 first performs real-time feature extraction, calculates the effective value of the three-direction vibration signal and the energy consumption fluctuation coefficient every 10s time window, simultaneously analyzes the vibration frequency spectrum by fast Fourier transform and extracts the main frequency band energy proportion; then, dynamic fuzzy logic judgment is performed, the vibration relative deviation and energy consumption fluctuation deviation input variables are defined, and are respectively mapped to fuzzy sets; a fuzzy rule library is developed, and the precise risk level is calculated by defuzzification through the barycentric method; finally, the critical point prediction is triggered, and 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.
[0035] The feature extraction stage system continuously processes the synchronously collected multi-source data in a fixed time window. Every 10s as a data window, the system first processes the three-way vibration sensor signal, and band-pass filters the raw vibration acceleration data of the X / Y / Z three axes respectively, with the filter range set to 500Hz to 2000Hz to shield the equipment base vibration noise, then calculates the vibration effective value Vib_RMS_real, which is obtained by taking the square root of the average value of the square sum of the filtered three-axis vibration signal, specifically: first calculate the three-axis combined acceleration value of each sampling point, then calculate the effective value of the combined acceleration in the entire time window; At the same time, the system processes the power data transmitted by the numerical control system, and pre-processes the real-time power value P_real of the main shaft collected at 0.5s intervals, calculates the fluctuation coefficient P_var_real of the moving average value P_avg of power in the 10s window, which is obtained by statistical method: first calculate the standard deviation of all P_avg values in the window, then divide by its arithmetic mean; Finally, execute frequency domain feature extraction, use fast Fourier transform to convert the vibration signal of the current window from time domain to frequency domain, calculate the percentage value of the total energy of the 500Hz to 2000Hz frequency band in the full spectrum energy as the main frequency band energy ratio E_band_real.
[0036] After calculating the vibration effective value Vib_RMS_real, the energy consumption fluctuation coefficient P_var_real and the main frequency band energy ratio E_band_real in the real-time feature extraction stage, the system starts the fuzzy logic judgment process; First, calculate two key input variables: vibration effective value deviation ΔVib, which is obtained by subtracting the maximum allowed vibration effective threshold Vib_RMS_max of the corresponding material-cutter combination in the feature library from the real-time data of the vibration effective value, and then dividing by the maximum allowed value to obtain the relative deviation amount, specifically: ΔVib=(Vib_RMS_real-Vib_RMS_max) / Vib_RMS_max; Energy consumption fluctuation deviation ΔP_var, which is obtained by subtracting the upper limit of the energy consumption fluctuation threshold P_var_threshold corresponding to the feature library from the real-time energy consumption fluctuation coefficient, and then dividing by the threshold to obtain the relative deviation amount, specifically: ΔP_var=(P_var_real-P_var_threshold) / P_var_threshold;
[0037] The system defines three fuzzy sets for ΔVib: negative big (NB) means the vibration is significantly below the safety threshold, negative small (NS) means the vibration is slightly below the safety threshold, zero (ZO) means the vibration is close to the critical point of the safety threshold; two fuzzy sets for ΔP_var: negative big means the energy consumption fluctuation is significantly below the safety threshold, negative small means the energy consumption fluctuation is slightly below the safety threshold; two fuzzy sets for E_band_real: normal (N) means the deviation from the historical benchmark value of the corresponding combination in the feature library is within ±20%, abnormal (A) means 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) means no optimization is necessary, medium (M) means monitoring and observation are needed, high (H) means immediate intervention is needed.
[0038] For the vibration effective value deviation ΔVib, when the value is < -0.15, it is defined as significantly below the safety threshold, when the value is ≥ -0.15 and < -0.05, it is defined as slightly below the safety threshold, when the value is ≥ -0.05 and ≤ 0.05, it is defined as close to the critical point of the safety threshold; for the energy consumption fluctuation deviation ΔP_var, when the value is < -0.2, it is defined as significantly below the safety threshold, when the value is ≥ -0.2 and < -0.05, it is defined as slightly below the safety threshold.
[0039] The fuzzy rule base contains multiple pieces of decision logic, and the core rule is: if ΔVib is in the zero state and ΔP_var is in the negative small state, and E_band_real shows abnormal, then the risk level Risk_Level is set to high.
[0040] Auxiliary rules:
[0041] If ΔVib is in the zero state but E_band_real is normal, Risk_Level is set to medium;
[0042] If ΔVib is in the negative big state and ΔP_var is in the negative big state, Risk_Level is set to low;
[0043] If ΔVib is in the negative small state and ΔP_var is in the negative small state, Risk_Level is set to medium.
[0044] Examples:
[0045] IF ΔVib is ZO AND E_band_real is N THEN Risk_Level is M
[0046] IF ΔVib is NB AND ΔP_var is NB THEN Risk_Level is L
[0047] IF ΔVib is NS AND ΔP_var is NS THEN Risk_Level is M
[0048] The system adopts the barycentric method to solve the fuzzification processing, and the output fuzzy set of all triggering rules is weighted and superimposed to calculate the accurate risk level Risk_Level value. When the value is greater than 0.7, it is determined that the current processing state is at the energy efficiency quality critical point, and a parameter optimization request is sent to S4.
[0049] S4: Parameter adaptive adjustment and re-verification: When S3 detects the critical risk, the system automatically fine-tunes the parameters within the safety range according to the current working condition, and immediately verifies the adjustment effect to form a closed-loop control.
[0050] The S4 first starts the parameter adjustment strategy, when receiving the optimization request of S3, the feed rate is preferentially reduced, and the new value is calculated, and the new value of the feed rate is constrained not to be lower than the minimum allowable feed rate of the material and tool combination; then the effect verification mechanism is executed, the risk level is recalculated after adjusting for 2 window periods, if the risk level Risk_Level_new<0.5, the new parameter is kept, otherwise the secondary adjustment is started; finally the historical learning update is completed, after each batch of processing is completed, the actual surface roughness measurement value and the optimization parameter are fed back to the coupled model of S1, and the maximum allowable vibration effective threshold and the upper limit of the energy consumption fluctuation coefficient threshold in the feature threshold library are dynamically updated.
[0051] When the parameter adjustment strategy is executed, the system preferentially selects the feed rate f as the adjustment object; the calculation of the adjustment amplitude is based on the actual feed rate f_current collected in real time 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 forcibly performs constraint checking, so that the calculated f_new value is not lower than the minimum allowable feed rate f_min corresponding to the material and 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 as f_min.
[0052] After the parameter adjustment strategy is executed, the system immediately starts the effect verification mechanism. First, two consecutive monitoring window periods are set as the verification period, and the length of each window period is 10 seconds, which is 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, which is calculated in the same way as the fuzzy logic judgment process defined in S3. When the two consecutive window periods end, the system makes a decision based on the newly calculated Risk_Level_new value: if Risk_Level_new is less than or equal to 0.5, it is determined that the adjusted parameters are effective, and the system maintains the adjusted feed rate f_new for continuous processing; if Risk_Level_new is still greater than 0.5, it is determined that the first adjustment has not achieved the expected result, and the system automatically triggers a secondary adjustment, which reduces the cutting speed v according to the same logic priority and risk assessment method as the first adjustment. Specifically, according to the current actual cutting speed v_current, the new value is calculated by the formula v_new = v_current x (1-0.03 x Risk_Level_new), and at the same time, it is ensured that v_new is not lower than the minimum allowed cutting speed v_min corresponding to the feature threshold library. The entire verification process is completed within 20 seconds and does not interrupt the processing flow.
[0053] After each batch of processing tasks is completely finished, the system automatically starts the historical learning update process. First, the last executed optimization parameter combination of the batch is extracted from the CNC system log, including the new cutting speed v_new, the new feed rate f_new, and the cutting depth ap. At the same time, the offline surface roughness real measurement value Ra_real of the finished workpiece is obtained, which is manually input into the system by the operator after being measured by a contact roughness meter. The system binds these data with the material type and tool number corresponding to the batch to form a complete learning record. Then, the random forest regression model constructed by S1 is called, and the new parameter combination and the measured Ra_real value are input into the model as training samples to trigger online fine tuning of the model to optimize the surface roughness prediction function. The vibration effective value upper limit Vib_RMS_max and the energy consumption fluctuation coefficient threshold P_var_threshold corresponding to the material-tool combination in the feature threshold library are updated synchronously. The update rule is: if the current Ra_real meets the target roughness Ra_target and is lower than the historical threshold corresponding to the predicted value, replace the original Vib_RMS_max with the currently actual monitored maximum Vib_RMS_real value, and replace the original P_var_threshold with the currently actual calculated P_var_real maximum 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 the same type of processing.
[0054] Secondly: the embodiment of the present application discloses only the structure related to the embodiment of the present application, other structures can refer to the general design, and in the case of no conflict, the same embodiment and different embodiments of the present application can be combined with each other;
[0055] Finally: the above only for the preferred embodiment of the present application, and does not limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A green NC machining method based on a software system, characterized by, Comprise: S1: Offline basic model construction and feature library generation: Before processing, use historical processing data to construct the coupling relationship model of energy consumption, vibration and surface roughness, and extract key features as the benchmark for real-time analysis; First, data collection is carried out, the spindle energy consumption is collected through the power sensor built-in the numerical control system, the three-direction vibration sensor is installed near the spindle box to collect vibration acceleration signal, and the contact type roughness meter is used to measure the workpiece surface roughness offline; Then perform feature engineering, calculate time domain features of vibration signal: including effective value and peak-to-peak value, and extract main frequency band energy ratio of frequency domain signal, and calculate energy fluctuation coefficient; Further, the coupling model is established, the random forest regression algorithm is used to construct the surface roughness prediction model, and finally the feature threshold library is generated, for each material and tool combination, the boundary value when meeting the target roughness is counted: including the maximum allowed vibration effective value and energy fluctuation coefficient threshold, forming the benchmark database for subsequent real-time comparison; S2: Real-time synchronous acquisition of multi-source data in processing: During processing, synchronous acquisition of internal data of numerical control system and external sensor data is carried out, and time stamp alignment and data cleaning are carried out; S3: Dynamic energy efficiency-quality balance point analysis: Based on real-time data, the vibration characteristics and energy consumption characteristics under the current working condition are calculated, the coupling model and feature threshold library of S1 are combined, and whether the current parameters are close to the energy efficiency and quality critical point is judged by fuzzy logic; First, real-time feature extraction is carried out, the effective value of three-direction vibration signal and energy fluctuation coefficient are calculated every 10s time window, and the main frequency band energy ratio is extracted by fast Fourier transform analysis of vibration spectrum; Then, dynamic fuzzy logic judgment is performed, the vibration relative deviation and energy fluctuation deviation input variables are defined, and are respectively mapped to fuzzy sets; Formulate fuzzy rule library, calculate accurate risk level by defuzzification method through barycenter method; Finally, trigger critical point prediction, when it is judged that the current parameter combination is close to the energy efficiency and quality critical point, send optimization request to S4; The feature extraction stage system continuously processes the synchronously collected multi-source data in a fixed time window, every 10s as a data window. The system first processes the three-way vibration sensor signals, and performs band-pass filtering on the raw vibration acceleration data of the X / Y / Z three axes, with the filtering range set to 500Hz to 2000Hz to shield the equipment base vibration noise. Then, the vibration effective value Vib_RMS_real is calculated, which is obtained by taking the square root of the average value of the square sum of the filtered three-axis vibration signals. Specifically, the three-axis combined acceleration value of each sampling point is first calculated, and then the effective value of the combined acceleration in the entire time window is obtained. At the same time, the system processes the power data transmitted by the numerical control system, and pre-processes the main shaft real-time power value P_real collected at 0.5s intervals to calculate the fluctuation coefficient P_var_real of the 10s window power moving average value P_avg. The coefficient is obtained by statistical method: first calculate the standard deviation of all P_avg values in the window, and then divide by the arithmetic mean. Finally, frequency domain feature extraction is performed, and the vibration signal of the current window is converted from time domain to frequency domain by using fast Fourier transform, and the percentage value of the total energy of the 500Hz to 2000Hz frequency band in the full spectrum energy is calculated as the main frequency band energy ratio E_band_real. S4: Parameter self-adaptive adjustment and re-verification: when S3 detects critical risk, the system automatically fine-tunes the parameters within the safety range according to the current working condition, and immediately verifies the adjustment effect to form a closed-loop control.
2. The method of claim 1, wherein, The S2 includes: First, perform hardware configuration, read the spindle power, actual feed rate, and spindle speed in real time through the OPC UA protocol of the numerical control system, and simultaneously obtain the original signals of the three-way vibration sensor installed on the spindle box through the high-speed data acquisition card, and realize the clock synchronization of the numerical control system and the DAQ card by using the precise time protocol; then, perform data preprocessing, apply 5Hz high-pass filtering to the vibration signals to eliminate the equipment base vibration noise, and calculate the moving average value of the power data with a 0.5s window; finally, mark the key events, and when the actual feed rate deviates from the set value by more than 5%, mark the time period as a feed abnormal state period for subsequent analysis and exclusion.
3. The method of claim 1, wherein, The fuzzy logic judgment includes: After calculating the vibration effective value Vib_RMS_real, the energy consumption fluctuation coefficient P_var_real and the main frequency band energy ratio E_band_real in the real-time feature extraction stage, the system starts the fuzzy logic judgment process; first, two key input variables are calculated: the vibration effective value deviation ΔVib is obtained by subtracting the maximum allowed vibration effective threshold Vib_RMS_max of the corresponding material cutter combination in the feature library from the real-time data of the vibration effective value, and then dividing by the maximum allowed value to obtain the relative deviation amount, which is specifically expressed as: Δ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 energy consumption fluctuation threshold P_var_threshold in the feature library from the real-time energy consumption fluctuation coefficient, and then dividing by the threshold to obtain the relative deviation amount, which is specifically expressed as: ΔP_var=(P_var_real-P_var_threshold) / P_var_threshold.
4. The method of claim 3, wherein, The fuzzy logic judgment further comprises: The system defines three fuzzy sets for ΔVib: negative big (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 critical point of the safety threshold; two fuzzy sets are defined for ΔP_var: negative big 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; two fuzzy sets are defined for E_band_real: normal (N) indicates that the deviation from the historical reference value of the corresponding combination in the feature library is within ±20%, and abnormal (A) indicates that the deviation from the historical reference 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 optimization is necessary, medium (M) represents monitoring and observation are needed, and high (H) represents immediate intervention is needed; For the vibration effective value deviation ΔVib, when the value is < -0.15, it is defined as significantly lower than the safety threshold, when the value is ≥ -0.15 and < -0.05, it is defined as slightly lower than the safety threshold, and when the value is ≥ -0.05 and ≤ 0.05, it is defined as close to the critical point of the safety threshold; for the energy consumption fluctuation deviation ΔP_var, when the value is < -0.2, it is defined as significantly lower than the safety threshold, and when the value is ≥ -0.2 and < -0.05, it is defined as slightly lower than the safety threshold.
5. The method of claim 4, wherein, The core rule of the fuzzy rule base is: If ΔVib is in the zero state and ΔP_var is in the negative small state while E_band_real shows abnormal, then the risk level Risk_Level is set to high.
6. The method of claim 5, wherein, The critical point prediction comprises: The system uses the barycentric method to solve the fuzzification process, weights and superimposes the output fuzzy sets of all triggered rules, and calculates the accurate risk level Risk_Level value. When the value is greater than 0.7, it is determined that the current processing state is at the energy efficiency quality critical point, and a parameter optimization request is sent to S4.
7. The method of claim 1, wherein, The S4 comprises: Firstly, the parameter adjustment strategy is started, when the optimization request of S3 is received, the feed rate is reduced preferentially, and the new value is calculated, and the new value of the feed rate is constrained to be not lower than the minimum allowable feed rate of the material and tool combination; subsequently, the effect verification mechanism is executed, the risk level is recalculated after the adjustment for 2 window periods, and if the risk level Risk_Level_new<0.5, the new parameter is kept, otherwise, secondary adjustment is started; finally, the historical learning update is completed, after each batch of machining is finished, the actual surface roughness measurement value and the optimization parameter are fed back to the coupling model of S1, and the maximum allowable vibration effective threshold and the upper limit of the energy consumption fluctuation coefficient threshold in the feature threshold library are dynamically updated.
Citation Information
Patent Citations
Machine tool controller
CN105446270A
Numerical control machine tool and adaptive control system based on deep learning
CN117348528A