## 3 Theoretical Modeling
### Steady-State Response and Optimization Method  
Since the robot drives the tool to move slowly along the milling path, we can use the steady-state response of the cutter tool offset to evaluate the quasi-static performance of robotic milling in a given position. The cutter tool offset can be solved from Equations (1) and (2) in the time domain if the external forces are given. For a specific milling task, we select \(n_{p}\) points along the path and obtain the amplitudes \(d_{i}\) (\(i\) = 1, 2, \(\dots\), \(n_{p}\)) of the steady-state responses of the cutter tool offset at these points. The steady-state response amplitudes \(d_{i}\) can also be obtained from Equation (1). Then, we calculate the mean value of all these amplitudes \(d_{m}\) to quantify the overall quasi-static performance for this task. Then we have the following Equation:  
\[d_{m}=\frac{\sum\limits_{i=1}^{n_{p}}d_{i}}{n_{p}} \tag{6}\]  
If a local coordinate system \(\{o_{w}\_x_{w}y_{w}z_{w}\}\) is established on the workpiece, the position vectors \(\mathbf{p}_{mi}\) (\(i\) = 1, 2, \(\dots\), \(n_{p}\)) of the selected points and the milling forces \(\mathbf{F}_{EI}\) (\(l\) = 1, 2, \(\dots\), \(n_{p}\)) exerted on the cutter at these points in the inertial coordinate system can be expressed as  
\[\begin{array}{l}\mathbf{p}_{mi}=\mathbf{p}_{c}+\mathbf{p}_{w}+\mathbf{p}_{ni }\\ \text{and }\mathbf{F}_{EI}=\mathbf{R}_{ni}\mathbf{F}^{\prime}\ \big{(}i\ =\ 1,\ 2,\dots,n_{p}\big{)}, \end{array} \tag{7}\]  
where \(\mathbf{p}_{c}\) and \(\mathbf{p}_{w}\) represent the position vectors of the work table and workpiece coordinate systems respectively and both vectors are written in the inertial coordinate system. In particular, vector \(\mathbf{p}_{w}\) can be obtained by \(x_{p}\) and \(y_{p}\) as \(\mathbf{p}_{w}\) = [\(x_{p}\), \(y_{p}\), \(z_{w}\)]\({}^{T}\) in which \(z_{w}\) is a constant and represents the height of the origin of workpiece coordinate system \(o_{w}\). Vectors \(\mathbf{p}_{mi}\) (\(i\) = 1, 2, \(\dots\), \(n_{p}\)) represent the position vectors of the selected points in the inertial coordinate system and can be calculated as \(\mathbf{p}_{ni}\) = \(\mathbf{R}_{wz}(\theta_{p})\mathbf{p}^{\prime}_{ni}\) in which \(\mathbf{p}^{\prime}_{ni}\) are the position vectors of the selected points in the workpiece coordinate system and \(\mathbf{R}_{wz}(\theta_{p})\) represents the rotation matrix from the workpiece coordinate system to the inertial coordinate system. Vector \(\mathbf{F}^{\prime}\) represents the cutting force in the tool coordinate system and can be obtained with the cutting force model presented in Section 3.2, and the 3 \(\times\) 3 matrices \(\mathbf{R}_{ni}\) (\(i\) = 1, 2 \(\dots\), \(n_{p}\)) represent the rotation matrices from the tool coordinate system of the selected points to the inertial coordinate system. Now, the process to calculate \(d_{m}\) is illustrated in Figure 4.  
The workpiece has three degrees of freedom relative to the work table in this robotic milling system, which can be denoted by a parameter vector \(\mathbf{p}=[x_{p},y_{p},\theta_{p}]^{T}\). Then we aim at minimizing the mean value of the amplitudes of the cutter tool offset along the machining path by adjusting these parameters. The optimization problem can be expressed as  
\[Minimized_{m}\big{(}x_{p},y_{p},\theta_{p}\big{)}, \tag{8}\]  
where \(d_{m}\) is computed with the steps described in Figure 4. Once this optimization problem is solved, we find the optimal pose of the workpiece relative to the robot for the milling.