## 4 CPS Framework Implementation and Experimentation
### Case 1: The Prediction of Spindle Motor Rotation Error  
As complex systems integrating mechanical, electrical, hydraulic, and pneumatic aspects, spindle motors are the CTC of SPL. The rotation error of a spindle is closely related to the geometric error, surface quality, and roughness of the workpiece, which is an important index used to reflect the reliability of machine tools [52; 53]. Therefore, the accurate prediction of spindle rotation error is of great significance for improving machining precision and efficiency. The existing rotation error measurement methods are usually implemented with the aid of a standard ball in the case of idle conditions [54; 55; 56], which makes it difficult to reflect the real error in the actual machining process. The derivation of the method used for predicting the rotation error based on the physical dynamics model is complicated and inaccurate [36; 57]. It is difficult to achieve real-time condition monitoring and real-time rotation error compensation. The spindle rotation error can be affected by the speed [55] and wear state [36; 57]. Fortunately, the spindle vibration data contain information related to the speed [58] and wear state [59]. Therefore, it is possible to predict the rotation error through vibration data. As shown in Figure 8, the spindle reliability experiment platform of Tsinghua University was established based on CPS. A loading experiment was carried out through the spindle load spectrum [60] to ensure that the spindle load was close to the actual machining. The spindle rotation error was collected by the spindle check machine capability tester every 10 h, and the wear test was carried out during the rest time. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**CNN** & **LeNet** & **MSCNN** & **ResNet10** & **ResNet18** \\ \hline \(\begin{bmatrix}3\times 3\\ 8,62,62\end{bmatrix}\) & \(\begin{bmatrix}5\times 5\\ 6,60,60\end{bmatrix}\) & \(\begin{bmatrix}3\times 3\\ 16,62,62\end{bmatrix}\) & \(\begin{bmatrix}7\times 7\\ 64,32,32\end{bmatrix}\) & \(\begin{bmatrix}7\times 7\\ 64,32,32\end{bmatrix}\) \\ \(\begin{bmatrix}3\times 3\\ 16,60,60\end{bmatrix}\) & \(\begin{bmatrix}\text{MP}\\ 6,60,60\end{bmatrix}\) & \(\begin{bmatrix}3\times 3\\ 32,60,60\end{bmatrix}\) & \(\begin{bmatrix}\text{MP}\\ 64,16,16\end{bmatrix}\) & \(\begin{bmatrix}\text{MP}\\ 64,16,16\end{bmatrix}\) \\ \(\begin{bmatrix}3\times 3\\ 25,58\end{bmatrix}\) & \(\begin{bmatrix}5\times 5\\ 64,26,26\end{bmatrix}\) & \(\begin{bmatrix}\text{MP}\\ 32,30,30\end{bmatrix}\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 64,16,16\end{bmatrix}\times 1\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 64,16,16\end{bmatrix}\times 2\) \\ \(\begin{bmatrix}\text{MP}\\ 32,29,29\end{bmatrix}\) & \(-\) & \(\begin{bmatrix}3\times 3,5\times 5,7\times 7\\ 192,30,30\end{bmatrix}\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 128,16,16\end{bmatrix}\times 1\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 128,16,16\end{bmatrix}\times 2\) \\ \(\begin{bmatrix}3\times 3\\ 64,27,27\end{bmatrix}\) & \(-\) & \(\begin{bmatrix}3\times 3,5\times 5,7\times 7\\ 768,30,30\end{bmatrix}\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 256,16,16\end{bmatrix}\times 1\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 256,16,16\end{bmatrix}\times 2\) \\ \(\begin{bmatrix}3\times 3\\ 128,25,25\end{bmatrix}\) & \(-\) & \(-\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 512,16,16\end{bmatrix}\times 1\) & \(\begin{bmatrix}\text{RBU},3\times 3\\ 512,16,16\end{bmatrix}\times 2\) \\ \(\begin{bmatrix}\text{AMP}\\ 128,6,6\end{bmatrix}\) & \(\begin{bmatrix}\text{AMP}\\ 128,5,5\end{bmatrix}\) & \(\begin{bmatrix}\text{AMP}\\ 768,4,4\end{bmatrix}\) & \(\begin{bmatrix}\text{GAP}\\ 512,1,1\end{bmatrix}\) & \(\begin{bmatrix}\text{GAP}\\ 512,1,1\end{bmatrix}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Feature size output by each layer of the DL algorithm. Sensors: The vibration sensors were installed on the base, bearing, and spindle to collect vibration signals.