Application of combined optimization strategy and system of CNC machining parameter

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.


Introduction
For many years, off-line 1-7 and on-line [8][9][10][11][12] optimization 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][14][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: (1) The basic parameters set in the system program are the reference cutting conditions. (2) The reference cutting conditions are optimized based on Pareto genetic algorithm and TRIZ theory of off-line optimization. (3) The program feed speed set is optimized by the off-line optimization algorithm fed to the CNC controller of the machine tool.
(4) The measured spindle motor current is sent to the fuzzy adaptive control system. (5) 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. (6) When the cutting conditions change, repeat (1)-(5) until all cutting is completed.
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.
Realization of system software and hardware structure

Software implementation of optimization system
Based on the overall structure of CNC system software 17,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   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.
(1) CNC system. TDNC-W200 CNC milling machine is used in the experiment. The system is self-developed TDNC-SX system. (2) Current sensor. The current sensor model is I412F21, the input specification is 30A, the output specification is 0-5 A, and the power supply is 24 V . The AC current of the spindle motor is measured in real time and converted into DC voltage output of the spindle. Assuming that within the range of the sensor, an input value of any measured value I r , then the output voltage value is U Z = 5V 3 I r =30A.

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.

Single-process traditional processing experiments of variable cutting depth
The experimental parameters of traditional singleprocess 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.5mm, 1mm, 1:5mm, 2mm. Moreover, the feed speed of traditional milling remains constant, the processing process and results are shown in Figure 8.
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 mm=min, and the current value does not reach the allowable maximum during the whole cutting process, the cutting force does not reach the maximum, and the machine tool processing efficiency is low.

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.5mm, 1mm, 1:5mm, 2 mm. The range of feed per tooth is 0:1mm=tooth ł x 2 ł 0:2mm=tooth. Firstly, the optimal cutting speed and feed per tooth is obtained by the off-line optimization. For example, when the cutting depth is 0.5mm, the optimization results are obtained by using the method described in reference, 19 as shown in Figure 9 and Table 3. 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 ł 300( min ) and processing efficiency ł 2(min À1 ), as shown in Table 4. Then, the optimal solution is decided by combining TRIZ theory. According to the principle of processing efficiency priority, tool durability, and processing cost, the 41 parameters meet the requirements and are determined to be the final optimal processing parameters. Similarly, the optimal solution set is shown in Figure 10 when the cutting depth is 1mm and 1:5mm, and then based on TRIZ theory, the optimal solution set is determined, as shown in Table 5.
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 A. Taking the change of cutting depth as the variable factor, the off-line and on-line optimization system is adopted to carry out the   processing experiment. The basic parameters and results are shown in Table 6. The processing process and effect are shown in Figure 11. 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 mm=min by off-line optimization, the feed rate is 100, and the current value is 7.2A. Through on-line adaptive optimization, the output feed rate is adjusted to 50, that is, the system feed speed is adjusted to 240 mm=min, the current value is 7.8 A, close to the set value, and the processing time is 30 s. And the surface processing accuracy is 8 mm by measuring. The processing experiments of other processes are the same.
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 mm, the current value is 8.2 A, which exceeds the set value. And the system can reduce the feed speed to 100 mm=min through on-line adaptive adjustment. At this time, the current value decreases to 7.6 A, and returns to the set value. Although the processing time increases slightly, it protects the machine and tool. 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 online 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 20m=min ł x 1 ł 70m=min, the feed per tooth is 0:08mm=tooth ł x 2 ł 0:1mm=tooth, cutting depth is 0.2 mm, and total outline length of the aircraft is 318 mm. As shown in Figure 12, the specific experimental parameters are shown in Table 7.
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 multiobjective. As shown in Figure 13 and Table 8.
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.
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.9A, exceeding the set value, it is adjusted to the set value under the function of fuzzy control, which ensures not only processing efficiency and cost, but also the stability and processing quality. And the feasibility of the offline and on-line optimization method is verified. The experimental process and effect are shown in Figure 16.

Conclusions
In this article, according to the characteristics of offline 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.

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).