# Spindle Bearing Preload Control Using NI MyRIO
## 6 MyRIO Application
The tare button allowed for zeroing the read measurement values. It was also possible to manually set the initial bearing tension value by specifying the piezo actuator extension (12). Items (8, 14, 16) were used as ready-made modules from the LabVIEW library using the PID controller. The control application used the PID controller module available from the dedicated LabVIEW library. This module, apart from the possibility of selecting the control algorithm, also allowed for automatic selection of PID controller settings according to one of four criteria (15): Zeigler-Nichols, Cohen-Coon, Chien-Hrones-Reswick, or Internal Model Control. A detailed description of each of these models can be found in publications [21; 22; 23] or directly in the Help module of LabVIEW. The author of the publication decided to use the Zeigler--Nichols model in his research. Due to its simplicity and reliability, it is one of the most commonly used models in such applications. Determination of the optimal controller settings is carried out automatically. After pressing the autotune button (10) in the application, the controller tuning process begins, i.e., selection of its appropriate P, I, D coefficients. The selection of settings is made within a specified range and their values could be observed in the table (13). Individual values were defined as P = 2.5, I = 0.55, D = 0.02. The correct functioning of the control algorithm with such selected parameters was confirmed by conducting tests during which the spindle was started at 1000 rpm,  
Figure 6: Complete connection diagram for the test stand: 1—amplifier for piezo actuators type SVR 150/3 by Piezomechanik GmbH (Munich, Germany), 2—amplifier of vibration exciter type PA 100E by Data Physics Corporation (San Jose, CA, USA), 3—vibration exciter type GW V20 by Data Physics Corporation (San Jose, CA, USA), 4—piezo actuators type PSt 150/40/10 by Piezomechanik GmbH (Munich, Germany) with built-in strain gauge system, 5—PC computer with control application in LabVIEW program, 6—MyRIO, 7—non-contact displacement sensor (design IPPT PAN Warsaw [20], 8—tested spindle, 9—high-speed motor C5160D-DB-PER32 by Teknomotor (Quero Vas, Italy), 10—inverter type Sinamics V20 3 AC380-480V 7.5 kW by Siemens (Munich, Germany), 11—switches (on/off, left/right, brake on/off). with random forcing on the front end, and active regulation of the bearing preload was switched off and then on. The sampling frequency of the signal and the control algorithm was assumed at 1000 Hz. The correct functioning of the algorithm was tested five times for each of the three different equivalent masses. In each case, a reduction in the spindle vibration amplitude was observed compared to the system without active control of the bearing support. The obtained results are presented in Table 2.  
The visualization of the results from Table 2 is presented in a bar chart (Figure 8). The value in the table and on the chart should be understood as the average value of five measurements. Additionally, the dispersion of measurements was also determined, marked graphically with a red line for each measurement section. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Ginding Wheel** & **Displacement Vibration** & **Displacement Vibration** & **Percentage Decrease in** \\
**Mass [kg]** & **Amplitude Without Control [\(\upmu\)m]** & **Amplitude with Control [\(\upmu\)m]** & **Displacement Vibration Amplitude** \\ \hline
3 & 18.16 & 14.62 & 19.49 \\ \hline
2.25 & 17.65 & 14.38 & 18.52 \\ \hline
1.5 & 16.99 & 14.82 & 12.77 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Values of the maximum vibration amplitude of the spindle tip of the spindle system without control and with control for three different equivalent masses. Figure 7: Front panel of the control and measurement application in LabVIEW.