# Development of a Small CNC Machining Center for Physical Implementation and a Digital Twin
## 4 Materials and Methods
### Positioning Regime  
For single-axis rapid positioning, the motions of the moving elements of the system were usually along a trapezoidal velocity profile that included an acceleration phase, a constant-velocity phase, and a deceleration phase, as shown in Figure 6.  
The notations employed in Figure 6 were defined as follows:  
\(\
u_{\text{max}}\) is the maximum speed during the positioning cycle;  
\(t_{\text{a}}\) is the duration of the acceleration phase;  
\(t_{\text{ct}}\) is the duration of the constant speed travel phase;  
\(t_{\text{d}}\) is the duration of the deceleration phase;  
T is the total positioning cycle time. The value of the parameters used to simulate the behavior of the system during the positioning regime are presented in Table 4.  
Figure 7 shows the comparative evolution of the imposed and actual speeds. It can be seen that the actual velocity followed the imposed velocity relatively closely, and most importantly, the maximum imposed value was reached. The shape of the variation of the effective velocity also ensured that jerking was avoided. Figure 5: Modifications in the simulation diagram: (**a**) implementation of the digital PID subsystem; (**b**) saturation block placed just after the PID subsystem. Figure 6: Trapezoidal velocity profile. Figure 8 shows the comparative evolution of the imposed and actual positions. It can be seen that there was a difference in the time axis between the two positions, but it should be noted that this was only an instantaneous deviation and not a real positioning error. The fact that in the end, the two positions, imposed and actual, coincided shows that the positioning was carried out without error. \begin{table}
\begin{tabular}{c c} \hline
**Parameter** & **Values** \\ \hline \(\mathrm{v_{max}}\) & 0.0083 m/s (500 mm/min) \\ \(\mathrm{t_{a}}\) & 0.0167 s \\ \(\mathrm{t_{ct}}\) & 4.8 s \\ \(\mathrm{t_{d}}\) & 0.0167 s \\ \(\mathrm{T}\) & 4.8333 s \\ \(\mathrm{K_{P}}\) & 140 \\ \(\mathrm{K_{I}}\) & 0 \\ \(\mathrm{K_{D}}\) & 0.05 \\ \(\mathrm{T_{s}}\) & 0.0028 s \\ \hline \end{tabular}
\end{table} 
Table 4: Parameters of the positioning regime. Figure 7: Comparison of the evolution of the imposed and actual velocities. Another feature of the motion control system that could be studied by simulation in this case was its behavior in the presence of disturbances. In the simulations presented so far, the value of the disturbance torque was assumed to be zero, with only the resisting torque due to the load drive (the rotating or translating masses driven by the axis drive servo motor) acting in the system. Figure 9a-c shows the evolution of the effective velocity for three values of the disturbance torque, 1% (0.0014 Nm), 2% (0.0028 Nm), and 5% (0.007 Nm), respectively, of the nominal torque developed by the axis drive servo motor (0.14 Nm). It can be seen that in all three cases, although the resistant torque disturbance had a significant effect on the way in which the effective velocity varied, the system was eventually able to cancel its effect. To determine whether the disturbance also affected the positioning accuracy, the evolution of the actual position in the presence of a resistive torque disturbance equal to 5% of the rated motor torque was plotted in Figure 9d. From Figure 9d, it can be seen that the time evolution of the position signal was apparently insignificantly affected by the occurrence of the disturbance, but the final position value was different from the imposed value, \(\chi_{\text{imp}}=40.1\) mm = 0.0401 m, so there was a positioning error in this case. The amount of positioning error in this case was also  
Figure 9: Positioning regime simulation results: (**a**) evolution of the actual velocity in the presence of the disturbance torque [1%]; (**b**) evolution of the actual velocity in the presence of the disturbance torque [2%]; (**c**) evolution of the actual velocity in the presence of the disturbance torque [5%]; (**d**) evolution of the positioning error in the presence of the disturbance torque [5%].