## 3 Dynamics Modeling and Parameter Optimization of Double Motors Driving System
### Parameter Optimization of Double Motors Drive System  
The super-heavy vertical milling lathe studied in this paper uses the master-slave control function of Siemens 840D (Munich, Germany) numerical control system to realize the clearance compensation. The master-slave relationship of the motor is established in the numerical control system. The master-slave control adopts two torque controllers to provide offset torque for the drive shaft and driven shaft, respectively. Superposition the feedback speed and the tension torque setting (system parameters: MD37264). The result data are passed to the master slave axis to ensure that the driven axis is consistent with the speed of the drive axis when the drive axis gets the speed instruction.  
The specific parameter setting and optimization steps of the function of eliminating mechanical clearance of master-slave dual drive are described, as follows.  
(1) Checking the parameter setting of the machine tool. In addition to the parameters that are related to master-slave control, the parameters of the drive axis and the driven axis are guaranteed to be consistent (including the parameters of the second order filter).  
(2) Optimizing the setting parameters of spindle current ring and speed ring, and set the same amplitude to drive shaft and driven shaft. The second order filter is added by adjusting the speed loop gain parameter and the spindle frequency response curve is adjusted to the best state.  
(3) When the current loop and the velocity loop are optimized, the response curves on the spectrum should basically coincide. If the difference is large, the mechanical fault should be investigated before the master-slave optimization.  
(4) The gain of the position loop is increased to the critical point of vibration under the condition that the dual-drive system runs smoothly and does not vibrate.  
(5) Check the transmission clearance between the feed box gear and the rack of the worktable. Appropriately increase the oil film thickness of the hydrostatic guide in order to reduce the friction of the worktable. Eliminate the mechanical hidden trouble that is caused by the shaking of the worktable in the closed-loop debugging. Adjust position loop gain \(K_{s}\), \(K_{s}\) = \(K_{1}\cdot K_{2}\cdot K_{3}\cdot K_{p}\). The measured data show that the reduction of position loop gain enhances the stability of the system, so \(K_{s}\) is set to 10.  
(6) In the optimization process, the parameters of feedforward coefficient, feedforward equivalent time, DSC (dynamic rigid response), acceleration, JERK (added acceleration), and SOFT (axial impact limit) should be consistent.  
(7) In the process of tension force adjustment, the IBN Tool can be used to monitor the torque setting value of the drive axis and the driven axis. When adjusting torque parameters, the gain coefficient of the torque balance controller, namely the tension force (MD37256), should be set to 0 and activated. Subsequently, change the settings of MD37256 and MD37258 (integration time of torque balance controller), and check the trace results, as shown in Figure 6.  
Figure 5: Tracking responses of unit step signal and sinusoidal signal after PID controller tuning.  
The purple curve is the torque curve of the driving axis and the green curve is the torque curve of the driven axis, as can be seen from Figure 6a. The fluctuation of the curve is the vibration frequency of the C-axis. In order to improve the accuracy of the C-axis and eliminate the gap between the gears, the curve needs to be adjusted until it is smooth, as shown in Figure 6b.  
(8) Trace tool is used to monitor the positioning of master and slave axes and adjust the parameters of acceleration, Jerk, and feedforward.  
The above are the optimal parameters after the adjustment of the machine tool. By following the torque curve of the master-slave motor through the master-slave axis optimization method, the torque balance is achieved and the curve is smooth, so as to improve the precision of the double-drive C-axis.