# Optimization of the Control Algorithm for an Active Bearing Support
## 4 Active Adjustment of Bearing Preload  
At a further stage of the research, the author assumed that the change in the bearing preload would depend on the amplitude value for the front end of the spindle. A non-contact sensor was used to measure this displacement (design IPPT PAN Warsaw [25]). This sensor was placed in such a way as to directly measure the vibration amplitude of the spindle tip, not the substitute mass. This mass was mounted on the shaft using an additional bearing type 61903 from FAG to ensure the ability of the spindle to operate and the possibility of connecting the exciter. The bearing used may partially dampen the vibrations of the shaft itself, which would result in measurement inaccuracies, and the results themselves would not reflect the behavior of the spindle tip. Based on model tests, which in the case of the first mode of natural vibrations presented the behavior of the shaft as a rigid body, it should be noted that the shaft vibrations at the place of sensor application will be smaller than those observed at its tip. A view of the spindle (1) with the mounted displacement sensor (2), the substitute mass (3) and the exciter connected to the substitute mass (4) is shown in Figure 5.  
Figure 4: The idea of creating applications for HBM devices in the LabVIEW environment (1—initialization, 2—scanning (device recognition), 3—connection, 4—reading signals, 5—selection of signals, 6—measurement and saving measured values, 7—termination of work) [24]. The active adjustment of the preload was performed using an application developed in LabVIEW. It had the ability to visualize the operation of the bearing in the active support (1), manually set the advance of the piezoactuators (2), display the relative values of the displacement of the bearing race (3), set the spindle speed (4) and read it (5), measure the temperature for the front and rear bearing support (6), zero the measurement values (7) and end the measurement (8). The application uses functions that were not available in its earlier version, which was used for preliminary research [20]. These functions include switching on the control (9), monitoring the parametric value of the spindle tip displacement on the basis of which the active support preload values (10) were selected, the ability to save measurement data (11), load the spindle work program (12) and an additional amplitude chart displacements for the front end of the spindle (13). The front view of the LabView application panel is shown in Figure 6.  
The control algorithm was based on a typical PID controller, and its settings were selected based on an experiment. This experiment consisted of repeatedly starting the spindle at a speed of 500 rpm and with forcing generated by a GW-V20 type exciter from Data Physics. The forcing was performed using a sweeping signal in the frequency range 150-450 Hz. The test time was set at two minutes. First, the P parameter was selected with the remaining controller elements turned off (I = 0, D = 0). An initial value of \(p\) = 1 was adopted, which was then increased by 0.1 until there was no improvement in the control quality, calculated as a percentage of the decrease in the spindle tip displacement amplitude. An identical principle was adopted when selecting the I parameter, with the difference that in this case the value increased from 0 to 0.01. Due to the lack of significant improvement in control quality after adding the D parameter, it was decided to abandon it. Figure 5: View of the test stand during measurements using active preload regulation: 1—tested spindle, 2—non-contact displacement sensor (IPPT PAN Warszawa [25] design), 3—substitute mass, 4-GW-V20 type exciter from the company Data Physics. The research assumed that the optimized value of the control parameters will be the best overall when over the entire excitation area, the largest percentage decrease in the spindle tip displacement amplitude is achieved.