## 5 System Simulation and Analysis
### Simulation Results and Analysis  
Based on indirect speed control of the variable motor, the effects of different variable motor swashplate deflection angle conversion factors and different quantitative pump-speed inputs on the constant speed output of variable motor are investigated separately. (1) The effects of different variable motor swashplate deflection angle conversion factors  
For simulation, a constant speed input of 400 r/min is given to the quantitative pump, and other parameters are kept constant. The pendulum angle conversion factors are 0.001, 0.00105, and 0.0011, respectively. The speed response of variable motor is investigated by fuzzy PID, PSO fuzzy PID, and enhanced CPSO fuzzy PID control approaches. The response curves are presented in Figures 9(a), 9(a) and 9(a). The corresponding deflection angle variations are presented in Figures 9(b), 9(b) and 9(b). Figure 11: Deflection angle conversion factor 0.00105. Figure 10: Deflection angle conversion factor 0.001. As can be seen from Figures 10-12, when the variable motor deflection angle conversion factor varies in a small range from 0.001 to 0.0011, the variable motor output speed curves are basically the same in the three control modes. And the final stabilization values can all reach 1500 r/min, which meets the variable motor-speed requirements. This factor has an insignificant impact on the speed of the variable motor. The speed-response curves of the variable motor are analyzed for the three control approaches in Figure 10:  
The ascension time, settling time, and overshoot for the three control approaches in Figure 10a are presented in Table 4. According to the calculations, the enhanced CPSO fuzzy PID control approach reduces the ascension time by 40% and 76%, and the settling time by 80% and 76%, compared to the fuzzy PID and PSO fuzzy PID control, respectively. At the same time, the system exhibits no overshoot from this control approach. In Figure 10b, the variable motor deflection angle by PSO fuzzy PID control varies the most at 0-2 s. Theoretically, it has the shortest ascension time, but because the hydraulic fluid transfer takes some time, the drastic change in the deflection angle currently affects the stability of the system. The enhanced CPSO fuzzy PID is fast and stable at the same time, so that the variable motor speed can be well controlled with this control approach. Based on the response curves in Figures 13-15, the following analysis is made of the variable motor-speed response for different quantitative pump-speed inputs in the three control modes:  
The ascension time, settling time, and overshoot for the three control approaches in Figure 13a are presented in Table 5. According to the calculations, the enhanced CPSO fuzzy PID control approach reduces the ascension time by 40% and 76%, and the settling time by 80% and 76%, compared to the fuzzy PID and PSO fuzzy PID control, respectively. At the same time, the system exhibits no overshoot with the PSO fuzzy and enhanced CPSO fuzzy control approaches. In Figure 13b, the variable motor deflection angle in PSO fuzzy PID control varies the most at 0-2 s. When the rotational speed of the quantitative pump steps up to 500 r/min at 3 s, the deflection angle of the variable motor increases with it, and the rotational speed does not change significantly. Combining the analysis in Figure 10b with the data from the three control approaches in this case, the enhanced CPSO fuzzy PID control proves to be the best. Figure 14: Step input of 500–600 r/min. Figure 13: Step input of 400–500 r/min. The ascension time, settling time, and overshoot for the three control approaches in Figure 13(a) are presented in Table 6. According to the calculations, the enhanced CPSO fuzzy PID control approach reduces the ascension time by 25% and 72%, and the settling time by 80% and 72%, compared to the fuzzy PID and PSO fuzzy PID control, respectively. At the same time, the system exhibits no overshoot with the PSO fuzzy and enhanced CPSO fuzzy control approaches.