## 5 Conclusions  
In this paper, an NLPID controller is used instead of a PID controller to improve the control performance of a CNC system, and an improved PSO algorithm based on GOBL is proposed for tuning the NLPID controller parameters, resulting in a satisfying control effect. With the simulation and experimental results, the following conclusions can be draw:  
(1) The PSO algorithm has been optimized by GOBL, effectively expanding the particle search range and enhancing the search potential.  
(2) By introducing the natural selection mutation, adaptive inertia weight, and dynamic learning coefficients into G-PSO algorithm, the global search capacity and convergence speed can be improved greatly.  
(3) The dynamic performance of the system can be evaluated by introducing real-time error, overshoot, rise time and the output of NLPID controller into the fitness function.  
(4) Simulation and experimental results prove the advantages of the proposed G-PSO algorithm based NLPID controller in accelerating system response and suppressing overshoot.  
The main goal of this paper is to propose a better PSO algorithm for tuning the NLPID controller, but the complexity of the algorithm will be increased when the PSO algorithm is improved. In future work, we should focus on giving consideration to the simplicity and effectiveness of the algorithm.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Indicators** & **INIT PID** & **G-PSO PID** & **G-PSO NLPID** \\ \hline Rise time/s & 0.269 & 0.27 & 0.21 \\ Settling time/s & 0.389 & 0.314 & 0.237 \\ Overshoot/\% & 5.3 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Detailed indicators of response curves for experiments.  
Figure 9: Experimental response curves of different controllers.  
**Author Contributions:** Conceptualization, X.S. ([PERSON]) and X.S. ([PERSON]); methodology, X.S. ([PERSON]); validation, K.W. and Z.Z.; formal analysis, X.S. ([PERSON]); investigation, X.S. ([PERSON]) and N.L.; resources, X.S. ([PERSON]); data curation, X.S. ([PERSON]) and R.S.; writing--original draft preparation, X.S. ([PERSON]); writing--review and editing, N.L. and X.S. ([PERSON]); visualization, Z.Z.; project administration, [PERSON] ([PERSON]). All authors have read and agreed to the published version of the manuscript.  
**Funding:** This research received no external funding.  
**Institutional Review Board Statement:** Not applicable.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** Not applicable.  
**Conflicts of Interest:** The authors declare no conflict of interest.  
**Abbreviations**  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} ABC & Artificial bee colony \\ ALO & Ant lion optimizer \\ CNC & Computer numerical control \\ DE & Differential evolution \\ GA & Genetic algorithm \\ GOBL & Generalized opposition-based learning \\ G-PSO & Particle swarm optimization based on generalized opposition-based learning \\ IAE & Integral absolute error \\ ISE & Integral square error \\ ITAE & Integral time absolute error \\ ITSE & Integral time square error \\ MRAC & Model reference adaptive control \\ NLPID & Nonlinear PID \\ OBL & Opposition-based learning \\ PID & Proportion integral differential \\ PSO & Particle swarm optimization \\ \end{tabular}