Introduction

The ecological environment problem has always been considered a prominent bottleneck restricting the sustainable development of manufacturing industry (Xiao et al. 2019b; Liu et al. 2021). At the same time, the outbreak of coronavirus disease (COVID-19) ravaged the world and caused great damage to the world economy in recent years (Wei et al. 2021; Negrete-Cardoso et al. 2022). The greater instability and uncertainty have brought a series of risks and challenges to the sustainable development of the manufacturing industry (Ullah et al. 2022; Yip et al. 2022). In this situation, human awareness of environmental protection and energy conservation is also growing (Gulistan et al. 2020). As a very important advanced manufacturing technology, numerical control machining has been widely used in various fields of the manufacturing industry, which is very important to improve the quality of product production, shorten the production cycle, and reduce the production cost (Jia et al. 2019). However, many statistical survey results show that the average energy utilization rate of machine tools is very low, averaging less than 30% (Tuo et al. 2018). Thus, improving the energy efficiency of machine tools is a basic scientific problem that needs to be solved urgently under the background of sustainable manufacturing (Li et al. 2017c).

Cutting parameter optimization is an important research direction to improve the energy utilization rate of machine tools (Xiao et al. 2019a, 2021). The selection of cutting parameters directly affects the processing efficiency, processing energy consumption, processing quality, and tool life of machine tools (Bhushan 2013; Bilga et al. 2016; He et al. 2017; Gürgen et al. 2022). However, in the actual machining process, technologists often determine the final cutting parameters based on the machining process manual and machining experience (Jia et al. 2021b). This empirical method is simple and practical, and can quickly obtain the available cutting parameters to meet the needs of normal computer numerical control ( CNC) machining (Chen et al. 2021). However, due to the lack of theoretical support and optimization tools, this method is difficult to fully consider the constraints of machine tool capability, tool life, and workpiece material, thus affecting the overall performance of the machine tool (Moreira et al. 2019). If the cutting parameters are selected improperly, it will even damage the machine tool, cutting tools, and workpieces, resulting in unnecessary waste of resources (Li et al. 2016). To solve this problem, this paper proposed a multi-objective cutting parameter optimization method of CNC plane milling for sustainable manufacturing (Fig. 1). Through the detailed analysis of energy consumption characteristics in the milling process, a more accurate milling energy model was established. On this basis, a multi-objective optimization model of milling parameters was further established, which takes cutting parameters as optimization variables, processing efficiency, processing energy consumption, and processing quality as optimization objectives, and comprehensively considers various complex constraints. With the support of an accurate energy model, the optimization results will be more realistic and then guide the machine’s energy-saving operation.

Fig. 1
figure 1

Framework of the proposed CNC plane milling parameter optimization method

The layout of the rest of this article is summarized as follows: the literature review is presented in the next section. The section “Analysis of energy consumption in CNC milling” discusses the modeling method of milling energy consumption through a typical milling process; the optimization model and method of milling parameters are given in the section “Multi-objective parameter optimization model of CNC plane milling,” followed by experiment and case studies to verify the proposed model and method in the section “Experimental and case studies.” Finally, the main conclusions and future research directions are summarized in the section “Conclusion.”

Literature review

In the past, compared with steel, chemical, and other process industries, the energy consumption and environmental emissions of machine tools in the discrete manufacturing industry have not been paid enough attention (Liu et al. 2013). Nowadays, with the rapid increase in the number of machine tools and the increasingly serious environmental problems, the energy consumption and energy efficiency of machine tools have gradually attracted the attention of scholars at home and abroad (Jia et al. 2021a). The energy efficiency optimization of CNC machine tools can be carried out from two aspects: machine tool design energy-saving and machine tool use management energy-saving (Kroll et al. 2011). Among them, lightweight design and selection of energy-saving components are commonly used in machine tool design energy-saving methods (Dietmair et al. 2011). However, this energy-saving method may require companies to retrofit existing manufacturing systems and invest a lot of money (Bi and Wang 2012), so companies often tend to save energy by managing machine tools. For example, Meng et al. (2019) studied the flexible job shop scheduling problem to minimize total energy consumption. Yan and Li (2013) studied the energy optimization of CNC machine tools from the perspective of cutting parameter optimization. There are also some studies focused on CNC machine tool equipment power and energy consumption real-time monitoring (Liu et al. 2017; Palasciano et al. 2016). It can be seen that the development of a new generation of science and technology has accelerated the process of sustainable development, making the traditional manufacturing industry gradually shift from labor-intensive to high-value and high-quality production (Zheng et al. 2020).

After reading some literature, it was found that establishing an accurate machine energy consumption model is the premise and foundation to solve the problem of energy efficiency (Jia et al. 2016). Therefore, many scholars have modeled and analyzed the energy consumption in machine tool processing from different perspectives (Zhou et al. 2016). Li et al. (2020) proposed a data-driven energy consumption prediction method of CNC turning based on meta-action to solve the problems of low prediction accuracy and poor generalization of conventional energy consumption models. Kara and Li (2011) put forward a new specific energy consumption (SEC) model for machining processes to describe the relationship between energy consumption and process variables in the material cutting process, and the model was tested and validated on several turning and milling machine tools. Luan et al. (2018) proposed a generalized mathematical power prediction model of the face milling process and verified the reliability of the proposed model through experiments. To reduce drilling costs and achieve high-performance drilling, Kliuev et al. (2019) studied the energy distribution of electro discharge machining process. Jia et al. (2021c) proposed an improved rapid power and energy prediction method for the drilling process to solve the problems of high computational complexity and low practicability of conventional drilling power and energy consumption models. In addition, Jia et al. (2018a) further established a novel energy model of machine-operator systems to assess the energy efficiency of machining processes and initially proposed energy-saving strategies. Lv et al. (2017) modeled the energy consumption of the spindle acceleration process, which often occurs in machine tool processing, and explored potential methods to reduce this energy consumption. Wang et al. (2020) conducted in-depth research on advanced grinding processes for parts. At the same time, some scholars have studied the modeling of carbon emissions in the machining process (Kong et al. 2021). The above research has accumulated many research results, which have become an important and popular research field and laid a solid foundation for energy-saving optimization of machine tools (Jia et al. 2017b).

Under the foundation of energy modeling, some scholars have done extensive research on the energy-saving technology of machine tools (Khanna et al. 2022). Cutting parameter optimization has been recognized as a powerful and effective way to save energy for machine tools (Pavanaskar et al. 2015). For this reason, Camposeco-Negrete (2015) used the response surface method to optimize the cutting parameters in the turning process and used contour plots to analyze the relationship between cutting parameters and the response variables. Sukumar et al. (2014) used the Taguchi method and artificial neural network method to solve the optimal combination of processing parameters with the roughness in the CNC milling process as the optimization objective. Nguyen et al. (2020) improved the energy efficiency, product quality, and productivity of the electrical discharge drilling (EDD) process by optimizing various parameters in the EDD process. Wang et al. (2014) used the NSGA-II algorithm to solve the optimal combination of cutting parameters, and the research has shown that the optimization of cutting parameters is beneficial to energy saving in the machining process, but it will increase the cost. Similarly, Li et al. (2019) proposed a comprehensive approach to parameter optimization of energy-aware CNC milling, and the experimental results have shown that the cutting depth and cutting width specific energy consumption (SEC) have the greatest impact, and the spindle speed has the greatest impact on the production time.

Based on cutting parameter optimization, some integrated optimization studies have emerged gradually (Edem et al. 2017). For example, Chen et al. (2019) proposed an integrated optimization method of machining tools and cutting parameters to reduce energy consumption in the CNC milling process. Tian et al. (2020) proposed an integrated optimization method for cutting parameters and process routes, which can effectively reduce carbon emissions in CNC production. To realize energy-saving optimization of CNC face milling processing parameters and the number of passes, Li et al. (2017a) proposed a multi-objective optimization model of machining parameters in multi-step CNC milling for energy efficiency and solved the model using a multi-objective particle swarm optimization algorithm based on the adaptive mesh. In addition, to reduce the energy consumption of CNC machine tools, Wu et al. (2017) deeply studied the optimization of tool combinations in the process of 2.5D cavity CNC milling. Li et al. (2021) found through research that energy saving and efficiency improvement can be achieved by optimizing the tool path. Similarly, Li et al. (2017b) proposed an integrated method of process planning and cutting parameter optimization to reduce the total energy consumption of CNC machining and balance the workload of machine tools in the workshop.

Throughout the existing literature, these studies rarely consider the impact of cutting parameters on tool life, making the final optimization results difficult to apply in practice. Secondly, these studies rarely consider the energy consumption of transient processes such as spindle acceleration, resulting in a large difference between the optimization results and the actual situation. Therefore, the multi-objective optimization of milling parameters based on an accurate milling energy model and considering complex constraints such as tool life is worthy of further study.

Analysis of energy consumption in CNC milling

As shown in Fig. 2, the power profile of a typical milling process is presented. After the machine is powered on, the startup process of the CNC system, lubrication system, display, and lighting equipment needs to consume part of the energy, and the energy consumption of these devices will continue throughout the processing process; Before the cutting process, the machine tool has been in a standby state, to adjust the numerical control program, workpiece clamping, and other processing preparations; this stage of the machine energy consumption is closely related to the length of standby time; subsequently, the spindle and feed shaft of the machine tool start and enter the cutting stage. The energy consumption of the machine tool in this stage includes not only the material milling energy consumption used to remove the excess material of the workpiece, but also the no-load energy consumption driving the spindle rotation and feed axis movement, as well as the energy consumption of various auxiliary systems related to the cutting process. As can be seen, the energy consumption of the CNC milling process is complex, and the energy consumption characteristics of each processing stage are different. The following chapters will analyze the energy consumption in each stage of CNC milling.

Fig. 2
figure 2

Power profile of a typical milling process

Startup and standby energy consumption

The power variation of the machine tool during startup is large and short, and the energy consumption characteristics are complex. The energy consumption and startup time of the machine tool startup process are mainly determined by the performance of the machine tool itself and have little relationship with the process parameters. Therefore, the energy consumption of the machine tool startup is not considered in this paper. After the machine tool is started, it is in the standby state. The standby energy consumption is related to the standby power (the minimum power necessary to maintain the machine tool operation) and the standby time. The standby power of the machine tool is stable and can be measured through experiments. After the machine tool is started, make it in the standby state, and then use the power data acquisition experimental device to collect N machine tool standby power values and take the average value (Jia et al. 2014). Therefore, the standby power of the machine tool can be expressed as:

$$P_{standby}=\sum_{i=1}^NP_{standby\_i}/N$$
(1)

where \(P_{standby}\) is the standby power of the machine tool, W; \(P_{standby\_i}\) is the standby power value of the ith acquisition, W; N is the number of data collected.

Standby power is continuous after the machine tool is turned on, whether the machine tool is in a cutting or non-cutting state. The standby time of the machine tool mainly refers to the preparation time before the processing of the workpiece. During this period, it is mainly used for preheating the machine tool, adjusting the zero return of the machine tool table, clamping the workpiece, adjusting the position of the tool and fixture, and viewing and transferring the CNC machining program. It can be seen that the length of the standby time is mainly related to the operation level of the workshop workers, which can be treated as a constant. Therefore, the machine tool standby time can be expressed as:

$$t_{standby}=C$$
(2)

where \(t_{standby}\) is the standby time of the machine tool, s; \(C\) is a constant.

According to Eqs. (1) and (2), the standby energy consumption can be further expressed as:

$$E_{standby}=\int_0^{t_{standby}}P_{standby}dt=\int_0^CP_{standby}dt$$
(3)

where \(E_{standby}\) is the standby energy consumption of the machine tool, J.

Spindle acceleration energy consumption

Spindle acceleration energy consumption refers to the machine tool spindle under the condition of no cutting load, from static or low-speed state accelerated to high-speed process consumed energy. The energy consumption of spindle acceleration is related to the power and corresponding acceleration time of the machine tool spindle. Spindle acceleration power is mainly composed of three parts (Jia et al. 2017a): (i) the power to maintain the operation of basic equipment such as machine tool numerical control system, lubrication system, display, and lighting, \(P_{standby}\); (ii) the power to maintain the spindle rotation, \(P_{spindle}\left(n\right)\); (iii) the power to overcome the inertia of the spindle mechanical transmission system to accelerate the spindle, \(P_{accelerate}\).

Assuming that the spindle accelerates from speed n1 to speed n2, the spindle acceleration time can be expressed as (Jia et al. 2017a):

$$t_{accelerate}=\frac{2\pi\left(n_2-n_1\right)}{60\alpha}$$
(4)

where \(t_{accelerate}\) is the spindle acceleration time, s; n1 is the initial speed before the spindle acceleration; n2 is the final speed when the spindle acceleration is completed, r/min; \(\alpha\) is the angular acceleration of machine tool spindle, rad/s2.

Therefore, the spindle rotation acceleration energy consumption can be further expressed as:

$$E_{accelerate}=\int_0^{t_{accelerate}}P_{standby}+P_{spindle}\left(n\right)+P_{accelerate}dt$$
(5)

where \(E_{accelerate}\) is the spindle rotation acceleration energy consumption, J; \(P_{spindle}\left(n\right)\) is the rotation power of the spindle at speed n, W; \(P_{accelerate}\) is the spindle rotation acceleration power, W.

Air cutting energy consumption

In the process of machining, to ensure the safety of machine tools and cutting tools, an air cutting distance is generally set in the cutting process. At this stage, the machine tool spindle system and feed system will be turned on. The energy consumed in the air cutting process of the machine tool is related to the air cutting power and the corresponding air cutting time. In the actual machining process, the air cutting power includes two parts: (i) the basic power to maintain the machine tool operation, \(P_{standby}\); (ii) the unload power to drive the machine tool spindle rotation and feed system movement, \(P_{unload}\). According to the previous research results of our research group (Lv et al. 2014), the spindle rotation power can be written as a linear function of speed, as shown in Eq. (6):

$$P_{spindle}=A_{sp}+B_{sp}\times n$$
(6)

where \(P_{spindle}\) is the spindle rotation power, W; n is the spindle speed, r/min; \({A}_{sp}\) is the constant term of function formula; \({B}_{sp}\) is the coefficient of function formula; \({A}_{sp}\) and \({B}_{sp}\) can be obtained by linear fitting of experimental data.

Reference (Lv et al. 2016) pointed out that the feed power and feed speed of the machine tool have a quadratic function relationship, which can be expressed as:

$$P_{feed}=C_{feed}\times f_v+D_{feed}\times f_v^2$$
(7)

where \(P_{feed}\) is the feed power, W; \({f}_{v}\) is the feed speed, mm/min; \(C_{feed}\) is the first term coefficient of the function formula; \(D_{feed}\) is the second term coefficient of the function formula; \(C_{feed}\) and \(D_{feed}\) can be obtained by fitting the experimental data.

The air cutting time is related to the length of the air cutting path and the feed rate. The calculation formula is as follows:

$${t}_{air}=60\times \frac{{L}_{air}}{{f}_{v}}=60\times \frac{{L}_{air}}{n\times f}$$
(8)

where \({t}_{air}\) is the air cutting time, s; \({L}_{air}\) is the length of the air cutting path, mm; \({f}_{v}\) is feed speed, mm/min; n is the spindle speed, r/min; \(f\) is the feed rate, mm/r.

Therefore, the air cutting energy consumption can be further expressed as:

$$E_{air}=\int_0^{t_{air}}\left(P_{standby}+P_{spindle}+P_{feed}\right)dt=\int_0^{t_{air}}\left(P_{standby}+P_{unload}\right)dt$$
(9)

where \({E}_{air}\) is the air cutting energy consumption, J; \(P_{unload}\) is the unload power that drives the spindle rotation and feed system movement of the machine tool, W.

Cutting energy consumption

In the cutting process, the cutting tool contacts the workpiece and removes the excess material, the process of machine power consumption is cutting energy consumption. The cutting energy consumption is related to the cutting power and the corresponding cutting time. In the cutting process, cutting power mainly includes four parts: (i) the basic power to maintain the machine tool operation, \(P_{standby}\); (ii) the unload power to drive the machine tool spindle rotation and feed system movement, \(P_{unload}\); (iii) the auxiliary system power related to the cutting process, \(P_{auxiliary}\); (iv) the material milling power to remove excess material from the workpiece, \(P_{material}\). The power of the auxiliary system related to the cutting process is stable (such as the spraying cutting fluid power), which is regarded as a constant in this paper and can be obtained by experimental measurement. The material milling power is one of the most complex parts of the power composition of machine tools. According to the previous research results of our research group (Lv et al. 2021), the material milling power can be expressed as an exponential function of cutting parameters, as shown in Eq. (10):

$$P_{material}=\lambda\times n^{\alpha_m}\times f^{\beta_m}\times a_p^{\gamma_m}\times a_e^{\delta_m}$$
(10)

where \(P_{material}\) is the material milling power, W; n is the spindle speed, r/min; \(f\) is the feed rate, mm/r; ap is the milling depth, mm; ae is the milling width, mm; \(\lambda\), \({\alpha }_{m}\), \({\beta }_{m}\), \({\gamma }_{m}\), and \({\delta }_{m}\) are the correlation coefficients of the material milling power function formula, \(\lambda\), \({\alpha }_{m}\), \({\beta }_{m}\), \({\gamma }_{m}\) and \({\delta }_{m}\) can be obtained through experimental analysis and statistical methods.

The cutting time can be calculated according to the material removal volume \(V_{material}\) and the material removal rate MRR, as shown in Eq. (11):

$$t_{cutting}=\frac{V_{material}}{MRR}=60\times\frac{V_{material}}{n\times f\times a_p\times a_e}$$
(11)

where \(t_{cutting}\) is the cutting time, s; \(V_{material}\) is the material removal volume, mm3; MRR is the material removal rate, mm3/s.

Therefore, the cutting energy consumption can be further expressed as:

$$E_{cutting}=\int_0^{t_{cutting}}\left(P_{standby}+P_{unload}+P_{auxiliary}+P_{material}\right)dt$$
(12)

where \(E_{cutting}\) is the cutting energy consumption, J; \(P_{unload}\) is the unload power of machine tool, W; \(P_{auxiliary}\) is the auxiliary system power, W.

Replacing worn tool energy consumption

During the machining process, the friction between the tool and the workpiece will cause tool wear. When the wear degree of the tool reaches the blunt standard, the tool needs to be replaced, and this process needs to be completed manually under the standby state of the machine tool (Chen et al. 2018). Due to tool wear, the time consumed when the machine tool needs to replace the tool manually is allocated to each processing process, which is related to the tool life, the time for a single manual tool change of the machine tool, and the cutting time. It can be expressed as:

$$t_{toolchange\_1}=60\times t_{toolchange}\frac{t_{cutting}}{T_{toollife}}$$
(13)

where \({t}_{{{toolchange}}\_1}\) is the time consumed by the machine tool to manually change the tool allocated to each machining process, s; \({t}_{\text{toolchange}}\) is the single manual tool change time, min; \({T}_{\text{toollife}}\) is the tool life, min.

At present, the widely used tool life model is the generalized Taylor tool life formula, as shown in Eq. (14):

$$T_{toollife}=\frac{C_T}{n^{\alpha_t}\times f^{\beta_t}\times a_p^{\gamma_t}\times a_e^{\delta_t}}$$
(14)

where \({C}_{T}\) is a constant term of the formula, which is related to the tool and workpiece materials. \({\alpha }_{t}\), \({\beta }_{t}\), \({\gamma }_{t}\), and \({\delta }_{t}\) are the correlation coefficients of the tool life function formula. \({\alpha }_{t}\), \({\beta }_{t}\), \({\gamma }_{t}\), and \({\delta }_{t}\) can be obtained by experimental analysis combined with statistical methods.

Therefore, due to tool wear, the energy consumption of the machine tool when it is necessary to manually replace the tool is distributed to the energy consumption of each machining process can be expressed as:

$$E_{toolchange\_1}=\int_0^{t_{toolchange\_1}}P_{standby}dt$$
(15)

where \(E_{{toolchange}\_1}\) is the energy consumption allocated to each machining process when the machine needs to manually replace the tool due to tool wear, J.

In addition, the spindle deceleration time is generally short and the energy consumption is very small, which can be ignored in the calculation of energy consumption. Therefore, based on the above discussion, a complete CNC milling process’s total energy consumption can be expressed as:

$$E_{process}=E_{standby}+E_{accelerate}+E_{air}+E_{cutting}+E_{{toolchange}\_1}$$
(16)

where \({E}_{{process}}\) is the total energy consumption, J.

Multi-objective parameter optimization model of CNC plane milling

Problem statement

The selection of cutting parameters (spindle speed n, feed rate f, milling depth ap, and milling width ae) is one of the most important links in the process of CNC plane millings, such as the processing of step surface, large plane, and cavity surface. Reasonable cutting parameters play a significant role in reducing processing time, and energy consumption and improving the quality of the workpiece. In addition, plane milling often adopts the parallel reciprocating tool path, which can effectively reduce the air cutting distance and improve processing efficiency, as shown in Fig. 3.

Fig. 3
figure 3

CNC plane milling schematic diagram

To sum up, the multi-objective parameter optimization problem of CNC plane milling can be described as follows: based on the dimensional feature parameters of the plane to be machined (Lp, Wp, Hp), select the optimal cutting parameters (n, f, ap, ae) for the CNC plane milling process and comprehensively consider various complex constraints (machine tool capacity, cutting tool life, processing technical requirements, workpiece materials, etc.), so that the final processing scheme can achieve the comprehensive optimization in the three goals of processing efficiency, processing energy consumption and processing quality. In this paper, the flow chart of multi-objective parameter optimization of CNC plane milling is shown in Fig. 4.

Fig. 4
figure 4

The flow chart of multi-objective parameter optimization of CNC plane milling

Optimization variables

There are many changing parameters involved in the CNC milling process, such as workpiece material, machine tool performance, cutting tools, process route, and other production conditions that will have a significant impact on the optimization objectives of the milling process. In the actual production and processing, the production conditions such as workpiece material, machine tool model, tool type, and process route have been determined when enterprises make production plans, and the optimization of production conditions is no longer considered in the optimization process of this paper. Therefore, in theory, when the production conditions are determined, the main impact of milling optimization objectives is the cutting parameters, namely spindle speed n, feed rate f, milling depth ap, and milling width ae.

Optimization objective functions

Machinery manufacturing enterprises in the actual production process often pay more attention to processing costs, processing efficiency, and processing quality, and little attention to the process of energy consumption and environmental issues. However, with global warming and increasingly serious energy problems, people pay more and more attention to the energy consumption of the machinery manufacturing industry (Cai et al. 2019; Hu et al. 2019). Therefore, in the mechanical manufacturing industry, how to reduce processing energy consumption while ensuring the requirements of processing efficiency and processing quality has gradually become a hot topic of current research. In this paper, the processing efficiency, processing energy consumption, and processing quality in milling are selected as the optimization objectives. The details are as follows:

  1. (1)

    Processing efficiency objective function

    In the CNC milling process, the processing time of the workpiece can be used as a measure of machine efficiency indicators. According to the machine running state, the CNC milling process can be generally divided into the machine startup stage, standby stage, spindle acceleration stage, air cutting stage, cutting stage, spindle deceleration stage, and blunt tool replacement state. Among them, the machine startup phase and spindle deceleration phase are not within the scope of this study. Therefore, the objective function of milling process efficiency can be expressed as:

    $${T}_{process}={t}_{standby}+{T}_{accelerate}+{T}_{air}+{T}_{cutting}+{T}_{toolchange\_1}=C+\frac{2\pi \left({n}_{2}-{n}_{1}\right)}{60\alpha }+\frac{60\times {L}_{air}}{n\times f}+\frac{60\times {V}_{material}}{n\times f\times {a}_{p}\times {a}_{e}}+60\times +{T}_{toolchange}\frac{{T}_{cutting}}{{T}_{toollife}}$$
    (17)

    where \({T}_{{process}}\) is the total processing time, s.

  2. (2)

    Processing energy consumption objective function

    The section “Analysis of energy consumption in CNC milling” has made a detailed elaboration of the numerical control milling each processing stage energy consumption model, this section will not repeat. According to the previous analysis, the energy consumption objective function of the milling process can be expressed as:

    $${E}_{process}={E}_{standby}+{E}_{accelerate}+{E}_{air}+{E}_{cutting}+{E}_{toolchange\_1}={\int }_{0}^{{\mathrm{t}}_{\text{standby}}}{P}_{\text{standby}}dt+{\int }_{0}^{{t}_{accelerate}}\left({P}_{standby}+{P}_{spindle}\left(n\right)+{P}_{accelerate}\right)dt+{\int }_{0}^{{t}_{\text{air}}}\left({P}_{standby}+{P}_{spindle}+{P}_{feed}\right)dt+{\int }_{0}^{{t}_{\text{cutting}}}\left({P}_{standby}+{P}_{spindle}+{P}_{feed}+{P}_{auxiliary}+{P}_{material}\right)dt+{\int }_{0}^{{t}_{\text{toolchange\_1}}}{P}_{\text{standby}}{\text{dt}}$$
    (18)
  3. (3)

    Processing quality objective function

In the process of CNC milling, the surface roughness of the workpiece can be used as an index to measure the processing quality of the machine tool. Surface roughness refers to the uneven and staggered peaks on the outer surface of the workpiece, which is an important index to reflect the micro-geometric shape error of the part surface (Bal and Dumanoğlu 2019). To avoid the prediction error caused by the theoretical calculation model, the empirical model of workpiece surface roughness can be established by experimental fitting. For example, with cutting parameters as factor variables, the exponential roughness function model can be expressed as:

$${R}_{a}=k\times {n}^{{\alpha }_{a}}\times {f}^{{\beta }_{a}}\times {{a}_{p}}^{{\gamma }_{a}}\times {{a}_{e}}^{{\delta }_{a}}$$
(19)

where \({R}_{a}\) is the surface roughness of the workpiece, μm; \(k\) is the correction factor, depending on the workpiece material; \({\alpha }_{a}\), \({\beta }_{a}\), \({\gamma }_{a}\), and \({\delta }_{a}\) are coefficients of roughness function formula; \({\alpha }_{a}\), \({\beta }_{a}\), \({\gamma }_{a}\), and \({\delta }_{a}\) can be obtained by experimental analysis and statistical method.

Optimization model

In the CNC milling process, to ensure the safety of machine tools and cutting tools, while meeting the processing quality and economic requirements, the choice of cutting parameters must meet the relevant technical requirements, such as machine capability and tool performance. According to the optimization variables and optimization objective functions defined above, considering a variety of complex constraints, the multi-objective parameter optimization model of CNC plane milling is established as follows:

$$minF\left(n,f,a_p,a_e\right)=\left(minT_{process},minE_{process},minR_a\right)$$
(20)

Subject to:

$${n}_{\mathrm{min}}\le n\le {n}_{\mathrm{max}}$$
(21)
$${f}_{\mathrm{min}}\le f\le {f}_{\mathrm{max}}$$
(22)
$${a}_{p\_min}\le {a}_{p}\le {a}_{p\_max}$$
(23)
$${a}_{e\_min}\le {a}_{e}\le {a}_{e\_max}$$
(24)
$$\frac{{P}_{{spindle}}+{P}_{{material}}}{\eta }\le {P}_{\mathrm{max}}$$
(25)
$$T_{toollife}\geq T_{economiclife}$$
(26)
$${H}_{p}=\sum_{i=1}^{x-1}{a}_{p}+{\Delta }_{H}$$
(27)
$${W}_{p}=\sum_{i=1}^{m-1}{a}_{e}+{\Delta }_{W}$$
(28)

Constraints (21)–(24) control the selected optimum spindle speed n, feed rate f, milling depth ap, and milling width ae within the feasible range recommended by the tool manufacturer; Constraint (25) controls the power required in the machining process not to exceed the rated power of the machine tool spindle motor \({P}_{max}\); Constraint (26) ensures that the tool life \({T}_{\text{toollife}}\) is not less than the minimum economic tool life \(T_{economiclife}\); Constraint (27) represents the functional relationship between the milling layer number x and the milling depth ap and the height dimension feature Hp of the plane to be machined; similarly, Constraint (28) represents the functional relationship between the number of tool paths m of each layer and the milling width ae and the width dimension feature Wp of the plane to be machined.

Optimization solution via NSGA-II

The evolutionary algorithm represented by the genetic algorithm has the characteristics of generating multiple points and searching in multiple directions, which is very suitable for dealing with the multi-objective optimization problem with a very complex search space. The genetic algorithm is a global optimization adaptive probability search algorithm developed by referring to the natural selection and genetic evolution mechanism of organisms. The basic idea comes from Darwin’s evolution theory and Mendel’s genetics theory. Its basic concepts and basic theories were first proposed by Professor J Holland of the University of Michigan in 1975. In the study of multi-objective optimization based on the genetic algorithm, Srinivas and Deb (1994) proposed NSGA in 1994, namely non-dominated sorting genetic algorithm. The advantages of NSGA are that the number of optimization objectives is not limited, the non-inferior optimal solution is evenly distributed and multiple different equivalent solutions are allowed. However, NSGA also has many shortcomings. First, there is no optimal individual retention mechanism, and there may be a loss of optimal solution. Second, the time complexity of constructing the Pareto optimal solution set is high. Each generation of evolution needs to construct a non-dominated set. When the size of the evolutionary population is large, the execution time of the algorithm will be large. The third is the problem of shared parameters. In the process of evolution, the shared parameter \(\sigma_{share}\) is mainly used to maintain the distribution of the solution population, but the size of the shared parameters is not easy to determine, and the dynamic modification and adjustment of the parameters is a difficult task. Therefore, in 2000, Deb et al. (2000) proposed NSGA-II, a non-dominated sorting genetic algorithm with an elitist strategy. The main improvements are as follows: First, the elite strategy is introduced to merge the parent population and the intermediate offspring population to compete for the next generation, which is conducive to ensuring that the excellent individuals in the parent generation will not be discarded, and the optimization performance of the algorithm is improved. Secondly, a non-dominated sorting method based on classification is proposed to reduce the complexity of the algorithm. The third is to use the crowding degree and crowding degree comparison operator, which not only overcomes the defect of prespecified shared parameters in NSGA, but also takes it as the decisive criterion of peer comparison, effectively ensuring the diversity of the population. The flow chart of NSGA-II is shown in Fig. 5.

Fig. 5
figure 5

The flow chart of NSGA-II

From Fig. 5, four main steps are used in the NSGA-II, which are initialization, determination, selection, and reproduction. The initialization step is composed of solution representation and solution initialization. It is used to code the cutting parameters and generate the initial cutting parameter solutions. The initialization solutions are generated randomly within the cutting parameter ranges. The determination step is set to calculate the fitness values (such as processing time, energy consumption, surface roughness, etc.) of each cutting parameter solution and identify the termination of the algorithm. The selection step is used to choose a portion of the existing solution for a new generation. Each optimization algorithm has its unique mechanism for solution selection. For the NSGA-II, nondominated sorting and crowding distance are usually used. The reproduction step is used to produce new generations and varies with different algorithms. In the NSGA-II, crossover and mutation are adopted to realize the production of new generations.

Experimental and case studies

To obtain some parameters in the milling energy model established above, an experimental study was carried out on the XHK-714F vertical machining center. Detailed information is shown in the section “Parameters identification of the milling energy model.” During the milling process, power and energy data are synchronously measured and collected by the power-energy data collection system built by our research group (see Fig. 6). For more information about the power-energy collecting system, see Reference (Jia et al. 2018b). In addition, to verify the effectiveness and feasibility of the multi-objective optimization method of plane milling parameters proposed in this paper, a case study is carried out. Detailed information is shown in the section “Multi-objective parameter optimization of CNC plane milling case studies.” The technical specifications of the selected machine tool and cutting tool are listed in Table 1.

Fig. 6
figure 6

Experimental setup of the power-energy collecting system

Table 1 Technical specifications of the selected machine tool and cutting tool

Parameters identification of the milling energy model

According to the energy consumption modeling method introduced in the section “Analysis of energy consumption in CNC milling,” the plane milling experiment is carried out to obtain the relevant parameters involved in the energy consumption function model of each machining process. The Taguchi orthogonal table L16(44) is used to design the milling experiment. The four factors of cutting speed vc, feed per tooth fz, milling depth ap, and milling width ae are selected as experimental factors. The level of each factor is given by the material characteristics and the performance of the CNC machine tool, as shown in Table 2. The experimental results are shown in Table 3. The cutting speed vc, feed per tooth fz, milling depth ap, and milling width ae are selected according to the orthogonal table. The spindle speed n and feed rate f are obtained by the corresponding conversion formula.

Table 2 Factors and levels
Table 3 Experimental results

According to the experimental data shown in Table 3, the experimental data are further processed by linear fitting, nonlinear curve fitting, and polynomial fitting with the help of graphic visualization and data analysis software OriginPro 9.1, and then the power model of each machining process in CNC milling process is obtained, as shown in Table 4. In addition, the correlation coefficient R2 of each process power model is close to 1, indicating that the fitted power model is good.

Table 4 Power models of each process in the milling process

Multi-objective parameter optimization of CNC plane milling case studies

Basic information of milling parameter optimization case

The case to be optimized is described as follows: H manufacturing plant workshop plans to use XHK-714F vertical machining center, plane milling a piece of material for 45# steel workpiece. The size of the workpiece is 150 mm × 80 mm × 52 mm, which is made into a rectangular flat bar with a size of 150 mm × 80 mm × 50 mm. Due to the small machining allowance in the milling depth, it is often processed in one step, and the optimization space of the milling depth is not large. To improve the processing efficiency, milling depth ap is directly set as the machining allowance of the process, and it is no longer further optimized. The milling tool is W400F-FS coated tungsten steel tool with a parallel reciprocating tool path (zig-zag), as shown in Fig. 7. The processing condition is wet cutting, and the cutting fluid is an ordinary water-based emulsion. The surface roughness of the machined workpiece is required to be less than 2.5 μm, and the expected tool life \(T_{toollife}\) is greater than 30 min.

Fig. 7
figure 7

Tool path of CNC plane milling process

The path of the milling cutter relative to the workpiece is described as follows: The milling cutter first feeds quickly to the plane to be machined from the initial position and then drops a milling depth distance along the − Z axis ( where the milling depth is directly set to the machining allowance of the process, that is, ap = 2 mm). Then, the spindle rotates at the speed n, and at the same time, it cuts 170 mm along the + X axis at the cutting feed speed vf to complete the first cutting; then moves a cutting width distance along the − Y axis with the same cutting feed speed vf, and then cuts 170 mm along the − X axis with the same cutting feed speed vf again to complete the second cutting, repeat the above steps until the plane milling is completed.

Milling parameter optimization model

Processing efficiency objective function

According to the description of the tool path and case information of the CNC plane milling process in Fig. 7, the objective function of the machining process efficiency is modeled. The workpiece clamping process machine standby state time \(t_{standby}=60\mathrm s\), workshop workers single manual tool change time \({t}_{{toolchange}}=2min\), milling process tool life formula from reference (Zhou 2018), as follows in Eq. (29):

$$T_{toollife}=\frac{e^{17.287}}{n^{1.786}\times f^{0.211}\times a_p^{0.450}\times a_e^{0.150}}$$
(29)

In summary, the total time of the milling process can be calculated as:

$$T_{process}=\begin{bmatrix}60+1.00\times10^{-4}\times n+60\times\frac{\left(10+10\right)}{n\times f}\times\lceil\frac{80}{a_e}\rceil\\+60\times\frac{80}{n\times f}+60\times\frac{150\times80\times2}{n\times f\times2\times a_e}\\+60\times2\times\frac{150\times80\times2}{n\times f\times2\times a_e}\times\frac{n^{1.786}\times f^{0.211}\times2^{0.450}\times a_e^{0.150}}{e^{17.287}}\end{bmatrix}$$
(30)

where \(\lceil\cdot \rceil\) denotes the upward rounding.

Processing energy consumption objective function

According to the power model table of each sub-process of the machining center shown in Table 4, the energy consumption objective function of the case milling process can be calculated by combining the above case milling process time objective function Eq. (30):

$${E}_{process}=\left[\begin{array}{c}60\times {P}_{standby}+(1.00\times {10}^{-4}\times n)\times ({P}_{standby}+{P}_{spindle}(n)+{P}_{accelerate})\\ +(60\times \frac{(10+10)}{n\times f}\times \lceil\frac{80}{{a}_{e}}\rceil)\times ({P}_{standby}+{P}_{spindle}+{P}_{feed\_X})\\ +(60\times \frac{80}{n\times f})\times ({P}_{standby}+{P}_{spindle}+{P}_{feed\_Y})\\ +(60\times \frac{150\times 80\times 2}{n\times f\times 2\times {a}_{e}})\times ({P}_{standby}+{P}_{spindle}+{P}_{feed}+{P}_{auxiliary}+{P}_{material})\\ +(60\times 2\times \frac{150\times 80\times 2}{n\times f\times 2\times {a}_{e}}\times \frac{{n}^{1.786}\times {f}^{0.211}\times {{a}_{p}}^{0.450}\times {{a}_{e}}^{0.150}}{ \, {e}^{17.287}})\times {P}_{standby}\end{array}\right]$$
(31)

Processing quality objective function

To obtain the prediction model of surface roughness, the spindle speed n, feed rate f, milling depth ap, and milling width ae were selected as experimental factors for the orthogonal experiment. The surface roughness model (R2 = 0.928) of the workpiece in the milling process is obtained by fitting the experimental data with OriginPro 9.1 software:

$${R}_{a}=25.234{n}^{-0.327}\times {f}^{0.322}\times {{a}_{p}}^{0.027}\times {{a}_{e}}^{0.259}$$
(32)

Optimization results and analysis

Using the non-dominated sorting genetic algorithm with the elite strategy introduced above, the case is solved by Python language programming. The parameters of the NSGA-II algorithm are set as follows: “RI” coding method is adopted, that is, mixed coding of real number and integer; the population size is set to 100; the algorithm termination condition is set to the maximum number of iterations 300 generations; the fitness function is the objective function to be optimized, and the fitness calculation adopts the fitness distribution calculation method based on grade division. The crossover probability of the crossover operator is set to 0.9; The mutation probability of the mutation operator is set to 0.1; after the parameter setting is completed, the algorithm is called many times to solve the objective function. The partial Pareto optimal solution set and the corresponding objective function value obtained by the optimization calculation are shown in Table 5, and the Pareto optimal front is shown in Fig. 8.

Table 5 Partial Pareto optimal solution
Fig. 8
figure 8

Pareto optimal front

It can be seen from Table 5 that the Pareto optimal solution set provides a flexible and diverse decision space for managers. Managers can not only according to the current specific processing requirements to select a single target better processing scheme, but can also be considered in many aspects, taking into account the objectives, and select a comprehensive better processing scheme. It can be seen from Fig. 8 that optimizing one of the objectives will inevitably weaken the other objective, and there is no case of obtaining the optimal solution together. In practical applications, the multi-objective optimization model can be appropriately modified according to different processing conditions and requirements. If the workpiece processing quality requirements are not high, the workpiece surface roughness constraints can be appropriately relaxed; when machining thin-walled workpieces, cutting force constraints need to be further considered. The excessive cutting force will cause machining deformation of thin-walled parts. When machining advanced alloy materials such as nickel-based alloys and titanium alloys, cutting temperature constraints need to be considered. Because the thermal conductivity of these materials is extremely low, most of the cutting heat flows to the tool during machining, which will cause serious thermal stress and aggravate the fatigue and wear process of the tool.

Table 6 and Fig. 9 show the comparison between the target values under empirical cutting parameters and the target values under optimal cutting parameters. It can be seen that the processing efficiency of the workpiece is improved by 21.0%, the processing energy consumption is reduced by 15.3% and the surface roughness is reduced by 5.5% through cutting parameter optimization, which verifies the effectiveness and feasibility of the proposed method.

Table 6 Empirical cutting parameters and optimal cutting parameters
Fig. 9
figure 9

Comparison between empirical value and optimal value. a Total processing time. b Total energy consumption. c Surface roughness

Influence of cutting parameters on optimization objectives

To explore the influence of cutting parameters on the optimization index, two-factor plane milling experiments were carried out on XHK-714F vertical machining center. With the help of OriginPro 9.1 software, 3D surface maps are drawn to show the internal relationship between cutting parameters and optimization indicators in detail and intuitively, as well as the significance of the impact on optimization indicators.

Parametric influence on processing efficiency

Figure 10 shows the influence of cutting parameters on processing efficiency. It can be seen from the figure that within the given range of process parameters, the total processing time decreases with the increase of spindle speed n, feed rate f, and milling width ae. The main reason is that, on the one hand, higher spindle speed and feed rate are conducive to reducing the air cutting time in the machining process; On the other hand, higher spindle speed, feed rate, and milling width will increase the material removal rate MRR in the machining process, while MRR is conducive to reducing the material cutting time in the machining process, thereby reducing the total time in the machining process. In addition, it can be seen from the diagram that compared with the spindle speed n and feed rate f, the milling width ae has the most significant effect on the total time of the machining process. The main reason is that the value of the milling width is directly related to the tool’s radial cutting times m in the machining process. The larger the milling width, the smaller the radial cutting times of the tool, and the smaller the total machining time. On the contrary, the smaller the milling width, the greater the number of radial cutting times of the tool, and the greater the total processing time.

Fig. 10
figure 10

3D surface map of processing efficiency. a Influence of feed rate f and spindle speed n on processing time Tprocess. b Influence of milling width ae and spindle speed n on processing time Tprocess. c Influence of milling width ae and feed rate f on processing time Tprocess

Parametric influence on processing energy consumption

Figure 11 shows the influence of cutting parameters on processing energy consumption. It can be seen from the figure that within the given range of process parameters, the total energy consumption of the machining process decreases with the increase of spindle speed n, feed rate f, and milling width ae. Although large spindle speed, feed rate, and milling width will increase the power of each motion stage of the machine tool, it can be seen from the previous analysis that large spindle speed, feed rate, and milling width will greatly reduce the running time of each processing stage of the machine tool. Compared with the reduction of processing time, the increase in power is very small, so the total energy consumption of the machining process is still decreasing. In addition, it can also be seen from the figure that compared with the spindle speed n and feed rate f, the milling width ae has the most significant effect on the total energy consumption of the machining process. The main reason is that the value of the milling width is directly related to the tool’s radial cutting times m in the machining process. The larger the milling width, the smaller the radial cutting times of the tool, and the smaller the total machining time, and thus the smaller the total energy consumption of the machining process.

Fig. 11
figure 11

3D surface map of processing energy consumption. a Influence of spindle speed n and feed rate f on processing energy consumption Eprocess. b Influence of spindle speed n and milling width ae on processing energy consumption Eprocess. c Influence of feed rate f and milling width ae on processing energy consumption Eprocess

Parametric influence on processing quality

Figure 12 shows the influence of cutting parameters on processing quality. It can be seen from the figure that within the given range of process parameters, with the increase of spindle speed n, the surface roughness value shows a downward trend. This is because high-speed milling will increase the temperature of the contact surface between the machine tool and the workpiece so that the parts to be processed are thermally softened, the cutting deformation coefficient becomes smaller, the cutting process is smoother, and the surface roughness is smaller. With the increase of feed rate f and milling width ae, the workpiece surface roughness is on the rise, this is because the large feed and milling width will produce a larger cutting force, resulting in cutting vibration, which affects the processing quality, resulting in poor workpiece surface roughness value. In addition, it can be seen that the feed rate has the most significant effect on the surface roughness of the workpiece.

Fig. 12
figure 12

3D surface map of processing quality. a Influence of spindle speed n and feed rate f on surface roughness Ra. b Influence of spindle speed n and milling width ae on surface roughness Ra. c Influence of feed rate f and milling width ae on surface roughness Ra

Conclusion

Improving the energy efficiency of machine tools is a basic scientific problem that needs to be solved urgently under the background of sustainable manufacturing. CNC milling is one of the most common machining methods. Energy modeling and cutting parameter optimization of the milling process have been recognized as powerful and effective energy-saving methods. Therefore, this paper proposed a multi-objective parameter optimization method of CNC plane milling for sustainable manufacturing. The main research results were summarized as follows: first, a precise milling energy model considering transient processes such as spindle acceleration was established; then, a multi-objective parameter optimization model of CNC plane milling was further established, which takes cutting parameters as optimization variables, processing efficiency, processing energy consumption and processing quality as optimization objectives, and comprehensively considers various complex constraints. Finally, multiple 3D surface maps were drawn, which directly reflected the internal relationship between cutting parameters and optimization objectives in the process of machining. The results of the research showed that the processing efficiency of the workpiece was improved by 21.0%, the processing energy consumption was reduced by 15.3% and the surface roughness was reduced by 5.5% through cutting parameter optimization, which verified the effectiveness and feasibility of the proposed method. Moreover, the advantages of the proposed approach can be summarized as follows:

  1. (i)

    A more accurate milling energy model was established, which considers transient processes such as spindle acceleration.

  2. (ii)

    The established multi-objective parameter optimization model of CNC plane milling takes into account the tool life constraint, which will make the optimization results more realistic.

  3. (iii)

    The internal relationship between cutting parameters and optimization objectives in the process of machining was intuitively reflected by drawing 3D surface diagrams.

Milling energy modeling and cutting parameter optimization were the focus of this research. The main limitation of this research was that this paper only studied the optimization of milling cutting parameters and did not cover all kinds of machining processes (such as turning and grinding). Therefore, the next step will be to expand the scope of research and select more types of processing technology to improve the proposed models and methods, thus providing comprehensive technical support for the energy efficiency improvement of machine tools.