Abstract
This paper presents an efficient optimization method of combining off-line optimization with on-line adaptive control for CNC (Computerized Numerical Control) machining parameter, and develops the corresponding system, aims to multi-objective optimization and cutting force stability. Firstly, the multi-objective optimization solution of machining parameters is obtained by off-line optimization based on Pareto genetic algorithm and TRIZ theory. Then, on this basis, feed speed is adjusted online based on adaptive control system. Next, current is used as feedback to control cutting force, and cutting force can be kept at a set value by the on-line adjusting. We obtain the relationship between off-line optimization and on-line adaptive control. Finally, we build the combined optimization module and embed the self-developed CNC machining system. Based on the system, the experimental results verify that the optimized process parameters make the processing time reduced by 14 s, and no matter how cutting conditions change, cutting force can be stabilized as soon as possible by adjusting feed speed online for keeping the cutting process stability. From the perspective of building the parameter optimization function module, it provides a new idea for the self-development of CNC machining system.
Keywords
Introduction
For many years, off-line1–7 and on-line8–12optimization methods are researched respectively by scholars according to the optimization of CNC machining process, but the basic theory and application of the combination of the two optimization methods are relatively limited.13–15 But in the actual processing process, there are many factors affecting the processing, in addition to the off-line optimization parameters, but also by the motor current, tool temperature, cutting force, and other online factors. At the same time, the effect of controlling cutting force is not ideal by self-adaptive control method. The controller cannot respond quickly enough to eliminate the big abrupt change of cutting force because of the abrupt change of cutting parameters. 16 Therefore, the research on the combination of off-line and on-line optimization technology can overcome the disadvantages of a single optimization method, ensure the stability of on-line cutting while achieving the off-line optimization goal, and give full play to the maximum efficiency of the machine tool. It has important theoretical and practical application value for the optimization of the whole NC machining process.
Combined optimization strategy and system principle
Optimization strategy
The optimization strategy mainly combines off-line optimization of feed speed with on-line adaptive optimization of cutting process, as shown in Figure 1. Compared with the traditional method, the goal of the new optimal control system is to keep the cutting rate as high as possible, make the cutting force as close as possible to the set value, and ensure the smooth processing. The optimization system automatically adjusts the feed speed to a stable state by self-adapting adjustment. When the load of the spindle decreases, the system increases the feed speed and achieves the set value, which reduces the processing time and cost. When the load of the spindle increases, the feed speed decreases and the cutting tool are prevented from being damaged and damaged. The off-line and on-line optimization processes are as follows:
The basic parameters set in the system program are the reference cutting conditions.
The reference cutting conditions are optimized based on Pareto genetic algorithm and TRIZ theory of off-line optimization.
The program feed speed set is optimized by the off-line optimization algorithm fed to the CNC controller of the machine tool.
The measured spindle motor current is sent to the fuzzy adaptive control system.
Fuzzy adaptive control system adjusts the optimized feed speed and feeds it back to the machine tool, and cuts according to the feed speed value.
When the cutting conditions change, repeat (1)–(5) until all cutting is completed.

Off-on line combined optimization scheme.
Based on the measured peak of the current (Figure 1), the fuzzy adaptive controller assigns a percentage of feed rate to the CNC controller to adjust the feed rate. The actual feed rate is produced by the percentage feed rate and the feed rate value set in the program. If the optimizing system is functional and reliable, the optimized feed rate will remain constant at the reference value, in this case, the correct rate is 100%. In order to make the controller adjust to the peak value of the current value, the sampled current value must be transferred to the Fuzzy Control Algorithm within a certain sampling interval time. The data accuracy of off-line and on-line optimization algorithms and the reliability of software system are the guarantee of accurate information collection. The feed rate of each step is optimized off-line first, and then it is optimized on-line by adaptive control to generate machining parameters. The current value returns to the desired value at step 4 or at the latest before the cycle.
System principle
The main modules of off-line and on-line optimization system for CNC milling process are as follows:
Off-line optimization module
It includes: basic parameter setting unit, mainly cutting tool, workpiece material, pre-cutting shape and size, roughness value, etc. Optimizing unit, the basic parameters obtained are conveyed to the optimization unit, through the internal calculation of the system program, the optimal cutting parameters are obtained, and conveyed to the numerical control system.
On-line optimization module
Including: signal acquisition and characteristic current extraction, extracting current signal values from the spindle motor; load comparison unit, comparing the extracted current values with the set values, if exceeding the set values, then starting the fuzzy controller, otherwise, no action; The parameter operation unit combines the obtained current values with sampling time, and obtains the input language variables by numerical calculation. Fuzzy control unit based on control rules and fuzzy operation, the output language variables are obtained, and the results are transmitted to the CNC system to realize on-line adaptive optimization.
Figure 2 shows the overall structure of the system, which mainly includes two parts: upper and lower computers. The upper computer is the main part of the CNC system, which mainly controls the processing action; The functions of the lower computer are mainly data acquisition, transmission, and signal monitoring and recognition.

Off-line and on-line combined optimization system.
Realization of system software and hardware structure
Software implementation of optimization system
Based on the overall structure of CNC system software17,18 and visual programing software, the software module of off-line and on-line optimization system is developed and embedded in the self-developed TDNC-H8 and TDNC-SX CNC systems. Figure 3 is the optimization module in TDNC-H8 CNC system, and Figure 4 is the optimization module in TDNC-SX CNC system.

Optimization module of TDNC-H8 system.

Optimization module of TDNC-SX system: (a) oscilloscope function and (b) load display.
The off-line optimization module is embedded in the TDNC-H8 CNC system, and the parameters in the program are optimized according to the setting conditions and basic cutting parameters, and displayed on the main interface. At the same time, in the “machine tool” working area, there is a “monitoring” unit, which obtains real-time data from sensors through high-speed bus and displays them on the interface. The third channel is the spindle motor current, which is displayed intuitively in the form of numerical cylinder graphics. The extracted current value is transmitted to the fuzzy control program for judgment and calculation. If it exceeds the set value, the fuzzy control program is started, the feed rate is adjusted, and the change of the feed rate value is displayed on the main interface accordingly, which makes the current value return to the set value as soon as possible and on-line optimization is realized. At the same time, the load rate is get through the compare of actual current value and the set value, which is displayed on the main interface in a cylindrical form.
System hardware
The hardware structure of off-line and on-line optimization system for CNC milling parameters mainly includes the system hardware platform and the current extraction device of on-line adaptive optimization module. Figure 5 is the hardware platform of TDNC-SX system based on self-development, and also the hardware platform of off-line and on-line optimization system. It consists of the following parts.
CNC system. TDNC-W200 CNC milling machine is used in the experiment. The system is self-developed TDNC-SX system.
Current sensor. The current sensor model is I412F21, the input specification is 30
Data acquisition card. Based on the consideration of function expansion, 8-channel ADC conversion chip ADS8568 is selected to meet the needs of high-speed and continuous data acquisition.

TDNC-SX system hardware platform.
Experimental verification
Taking the CNC program generated by CAM (Computer Aided Manufacturing) software as the research object, traditional method and off-line and on-line optimization system milling experiments are carried out respectively. The cutting load changes before and after optimization is compared; the constant force cutting and machining stability are checked. And the processing efficiency is compared by the change of processing time, the processing accuracy is compared by the measuring the surface roughness.
TDNC-W200 CNC milling machine developed independently is selected as the experimental equipment for optimization experiments, as shown in Figure 6. The CNC system is a self-developed TDNC-SX system, and the current extraction and monitoring device is shown in Figure 7. The basic experimental conditions and parameters are shown in Table 1. Planar milling is carried out with the change of axial cutting depth as the variable factor.

Machine tool in experiment.
Off-on line optimization experimental parameters.

Current extraction.
Single-process traditional processing experiments of variable cutting depth
The experimental parameters of traditional single-process milling with variable cutting depth are shown in Table 2. With the change of cutting depth as the variable factor, plane milling is carried out respectively according to the cutting depth parameters of 0.5
Traditional processing experimental parameters of single process.

Traditional processing experiment of single process.
Through calculation, the whole processing time is 176 s, and the surface processing accuracy is 10. When the cutting depth changes, the feed speed value is 200
Single-process optimized milling experiment of variable cutting depth
With the change of cutting depth as the changing factor, the plane milling experiments are carried out respectively according to the cutting depth parameters of 0.5

Pareto set of 0.5 mm.
Optimization results of 0.5 mm.
It can be seen that when the tool durability increases, the processing efficiency decreases and the processing cost decreases. Based on experience, a compromise choice is generally made, that is, to select the parameters of tool durability
Machining parameters set of 0.5 mm.

Pareto set based on different the cutting depth: (a) 1 mm cut depth, (b) 1.5 mm cut depth, and (c) 2 mm cut depth.
Machining parameters based on different the cutting depth.
Then, the on-line optimization cutting is carried out adapting the off-line optimal results according to the method in reference.
20
According to the actual situation of the processing platform, in order to protect the machine tool, cutting tool and workpiece, the allowable maximum current value is set at 8
Off-on line optimized processing experimental parameters.

Off-on line optimized machining process.
Table 6 shows that the first process is to milling the plane with 0.5 cutting depth. At this time, the initial feed rate is 230
From the numerical point of view, when the actual current is less than the set current value, the system can make the current return to the set value through on-line adaptive adjustment, the cutting force is guaranteed to be near the maximum value and the maximum efficiency is brought into play. When the cutting depth is 2
The basic parameters and cutting conditions of traditional and optimization methods are the same. However, when the cutting depth is changed, the feed speed is constant in traditional machining, and the current and cutting force never reach the allowable maximum. In the process of optimization, the feed speed is adjusted online to ensure the maximum current and cutting force within the allowable range, and the feed speed based on adaptive control system is larger than that of traditional processing. Therefore, the on-line adaptive optimization system improves the processing efficiency. By calculating the processing time, for each process, the processing time of the adaptive optimization system reduced 14 s than that of the traditional processing time. If 15 processes are needed to complete in the whole process, the processing time of a workpiece will be shortened by 210 s. At the same time, when the current value exceeds the set value, that is, the cutting force suddenly increases and exceeds the set value, the current value can be reduced by adjusting the feed speed adaptively, the cutting force can be reduced, and the machine tools, workpiece and cutting tools can be protected.
Application
Aircraft model is machined based on off-line and on-line optimization module and function of the system, the module is mainly used in rough processing stage. According to the actual situation of the experimental machine tool, the cutting speed is

Processing aircraft model.
Off-line and on-line optimization experimental parameters of model plane.
Based on Pareto genetic algorithm and TRIZ theory, the off-line optimization method is used to obtain the optimal combination of cutting parameters with the maximum machining efficiency, the maximum tool durability and the minimum processing cost as the multi-objective. As shown in Figure 13 and Table 8.

Pareto set machining parameters for aircraft model.
Off line optimization experimental parameters of model plane.
Programing and processing are carried out according to the off-line optimized parameters. Under the on-line fuzzy self-adaptive regulation of the system, when the cutting current exceeds or fails to reach the set value, the system will adjust the feed rate, and then adjust the feed speed to make the current return to the set value, so as to ensure the stability of the processing process. The maximum power of the machine tool is brought into play, and the efficiency and quality of the processing is improved too. On-line optimization parameters of aircraft model processing are shown in Figure 14 and Table 9.

Online optimization of machining parameters interface display of model plane: (a) before online optimization and (b) after online optimization.
On line optimization experimental parameters of model plane.
As can be seen from Figure 15, the current value begins to approach the set value 7.6 at 40 s, and the fluctuation range is small, and basically stabilizes at the set value at 100 s. Due to the delay of starting fuzzy adaptive on-line optimization as processing, and the motor displaying the current before adjustment is 7.9

On-line adjustment of model plane machining.

Model plane machining process.
Conclusions
In this article, according to the characteristics of off-line and on-line optimization of CNC machining parameters, an optimization scheme combining off-line optimization with on-line adaptive adjustment is determined, and an optimization strategy is formed based on feed speed off-line optimization and on-line adaptive control of cutting process. The process of parameter transfer and optimization between off-line and on-line optimization is elaborated in detail. The optimization system module is developed based on the software and hardware architecture of the CNC machining platform independently developed. Experiments are carried out on the platform to verify the feasibility and correctness of the combined optimization scheme.
Footnotes
Handling Editor: Chenhui Liang
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The authors acknowledge the financial support of Tianjin Science and Technology Planning Project (Grant No. 20YDTPJC00120).
