## 2 Materials and Methods
### Power Consumption Modeling
#### 2.1.1 Power Consumption Modeling in Feed and Spindle Subsystems  
A schematic diagram of the feed unit motion structure for micro-milling machining equipment is illustrated in Figure 3. The power source for the feed system is synchronous permanent magnet motors, which transmit driving force (torque) to the worktable through couplings, bearings, and ball screws. For the horizontal feed drive unit, the load refers to the friction of the ball screw pair, and for the vertical feed drive unit, the effect of gravity should also be considered. It should be noted that the cutting force load is not included. Similarly, the load of the spindle system does not consider the influence of the cutting force torque.Synchronous permanent magnet motors convert input electrical energy into mechanical energy, and the motor's output power can be obtained via force analysis. The relationship between the motor's output torque and the forces on the ball screw, bearings, and couplings can be described using Equations (3)-(5). \[T_{\rm m}=J_{\rm m}\frac{d\omega_{\rm m}}{dt}+C_{\rm m}\omega_{\rm m}+T_{\rm c} \tag{3}\]  
\[T_{\rm c}=J_{\rm c}\frac{d\omega_{\rm c}}{dt}+C_{\rm c}\omega_{\rm c}+T_{\rm bs }+2T_{\rm b} \tag{4}\]  
\[T_{\rm bs}=J_{\rm bs}\frac{d\omega_{\rm bs}}{dt}+C_{\rm bs}\omega_{\rm bs}+T_{ \rm t} \tag{5}\]  
where \(T\), \(J\), \(C\), and \(\omega\) represent the output torque, moment of inertia, viscous damping, and angular velocity, and subscripts m, c, bs, b, and t represent the motor, coupling, ball screw, bearing, and worktable.Under the assumption of a negligible angular velocity difference, the relationship between the motor output torque and the workbench output torque can be expressed as Equation (6). \[T_{\rm m}=J\frac{d\omega}{dt}+C\cdot\omega+T \tag{6}\]  
Figure 2: Power spectrum of different machining states. where \(T\), \(J\), and \(C\) represent the output torque, moment of inertia, viscous damping, and angular velocity of the feed system, which can be expressed as Equation (7). \[\left\{ \begin{array}{c}J=J_{\rm m}+J_{\rm c}+J_{\rm bs}\\ C=C_{\rm m}+C_{\rm c}+C_{\rm bs}\\ T=T_{\rm t}+2T_{\rm b}\end{array} \right. \tag{7}\]  
After obtaining the motor's output torque, the power output of the driving motor can be represented as Equation (8). \[P_{\rm output}=T_{\rm m}\cdot\omega=J\cdot\frac{d\omega}{dt}\cdot\omega+C \cdot\omega^{2}+T\cdot\omega \tag{8}\]  
Apart from the motor output power, permanent magnet synchronous motors also have internal energy losses, which can generally be classified into the following categories: copper loss, iron loss, mechanical loss, additional loss, and electromagnetic loss, as shown in Figure 4.Prior research has indicated that the power loss of a motor can be represented as a quadratic function of the motor's rotational speed, as shown in Equation (9) [25]. \[P_{\rm loss}=k\omega^{2}+b\omega+P_{\rm c} \tag{9}\]  
where \(k\) and \(b\) are coefficients determined by the motor itself, and \(P_{\rm c}\) represents the fixed power loss.Therefore, the expression for the power consumption of the feed system can be obtained by combining Equations (8) and (9). \[P_{\rm feed}=P_{\rm output}+P_{\rm loss}=F_{0}\cdot\alpha\cdot\omega+F_{1} \cdot\omega^{2}+F_{2}\cdot\omega+F_{3} \tag{10}\]  
where \(\alpha\) represents the angular acceleration, and the coefficients can be expressed as Equation (11). \[\left\{ \begin{array}{c}F_{0}=J\\ F_{1}=C+k\\ F_{2}=T+b\\ F_{3}=P_{c}\end{array} \right.