# Optimization of Redundant Degrees of Freedom in Robotic Flat-End Milling Based on Dynamic Response
## 2 Redundant Degrees of Freedom Optimization in Robotic Milling
### Solution of Redundant Degree of Freedom Optimization Model
#### 2.3.2 Dynamic Model of a Robotic Milling System  
Due to the higher stiffness of the tool in the axial direction compared to the other orthogonal directions [38; 39], axial vibration is neglected. As shown in Figure 2, the dynamic model of the robot milling system is simplified to a two-degree-of-freedom (2-DoF) vibration system in the x and y directions. For a given configuration \(\theta\) in joint space, the dynamic model of the robot can be expressed as:  
\[\mathbf{M}(\theta)\ddot{\mathbf{x}}(t)\mathbf{+C}(\theta)\dot{\mathbf{x}}(t) \mathbf{+K}(\theta)\mathbf{x}(t)\mathbf{=F}(t) \tag{10}\]  
where \(\mathbf{M}(\theta)\), \(\mathbf{C}(\theta)\) and \(\mathbf{K}(\theta)\) are the posture-dependent modal mass, damping, and stiffness matrix, with  
\[\mathbf{M}(\theta)=\begin{bmatrix}m_{x}(\theta)&\\ &m_{y}(\theta)\end{bmatrix},\mathbf{C}(\theta)=\begin{bmatrix}c_{x}(\theta)&\\ &c_{y}(\theta)\end{bmatrix},\mathbf{K}(\theta)=\begin{bmatrix}k_{x}(\theta)& \\ &k_{y}(\theta)\end{bmatrix} \tag{11}\]  
Here, \(m_{x}(\theta),m_{y}(\theta),c_{x}(\theta),c_{y}(\theta),k_{x}(\theta),k_{y}(\theta)\) are the modal mass, damping and stiffness matrices of the system along the \(x\) and \(y\) direction, respectively; \(\mathbf{x}(t)=\begin{bmatrix}x(t)&y(t)\end{bmatrix}^{T}\) is the displacement vector; and \(\mathbf{F}(t)\) represents the cutting force and is calculated based on the cutting theory [40] as follows  
\[\mathbf{F}(t)=a_{p}\mathbf{A}(t)[\mathbf{q}(t)-\mathbf{q}(t-T)]+\mathbf{G}(t) \tag{12}\]  
where \(a_{p}\) is the axial cutting depth; and \(\mathbf{A}(t)\) is the specific directional coefficients matrix, which can be calculated by the following equation:  
\[\mathbf{A}(t)=\begin{bmatrix}\alpha_{xx}&\alpha_{xy}\\ \alpha_{yx}&\alpha_{yy}\end{bmatrix} \tag{13}\]  
Figure 2: Robotic milling dynamic model.  
with  
\[\left\{\begin{array}{l}\alpha_{xx}=\sum\limits_{j=1}^{N}g_{j}\big{(}\varphi_{j}(t) \big{)}\sin\varphi_{j}\big{(}K_{tc}\cos\varphi_{j}+K_{rc}\sin\varphi_{j}\big{)} \\ \alpha_{xy}=\sum\limits_{j=1}^{N}g_{j}\big{(}\varphi_{j}(t)\big{)}\cos\varphi_{ j}\big{(}K_{tc}\cos\varphi_{j}+K_{rc}\sin\varphi_{j}\big{)}\\ \alpha_{yx}=\sum\limits_{j=1}^{N}g_{j}\big{(}\varphi_{j}(t)\big{)}\sin\varphi_ {j}\big{(}-K_{tc}\sin\varphi_{j}+K_{rc}\cos\varphi_{j}\big{)}\\ \alpha_{yy}=\sum\limits_{j=1}^{N}g_{j}\big{(}\varphi_{j}(t)\big{)}\cos\varphi_ {j}\big{(}-K_{tc}\sin\varphi_{j}+K_{rc}\cos\varphi_{j}\big{)}\end{array}\right. \tag{14}\]  
where \(g(\varphi_{j})\) is a unit step function used to judge whether each cutter tooth participates in the milling process; \(K_{tc}\) and \(K_{rc}\) represent the tangential force coefficient and radial force coefficient, respectively; and \(\varphi_{j}\) is the angular position of \(j\)-th tooth. The time delay \(T\) satisfies \(T=60/N\Omega\), \(N\) is the number of teeth and \(\Omega\) is the spindle speed (r/min). The stationary cutting force vector \(\mathbf{G}(t)\) can be expressed as  
\[\left\{\begin{array}{l}G_{x}(t)=a_{p}f_{z}a_{xx}(t)\\ G_{y}(t)=a_{p}f_{z}a_{yx}(t)\end{array}\right. \tag{15}\]  
where \(f_{z}\) denotes the feed per tooth.