Sliding Mode Control of Electro-Hydraulic Servo System Based on Optimization of Quantum Particle Swarm Algorithm

: This paper investigates a sliding mode controller based on quantum particle swarm optimization algorithm (QPSO) to solve the nonlinearity of electro-hydraulic servo systems, external disturbance problems, and jitter of sliding mode controller. The electro-hydraulic servo system state space equations are established, constructing the sliding surface according to the tracking error and obtaining the output of the sliding mode controller. The ITAE metric is used as an adaptation function of the QPSO algorithm to evaluate the parameters in the sliding mode controller, which has good engineering utility and parameter selectivity. The QPSO algorithm is used to increase the randomicity of the search and to expand the search space, which can effectively prevent falling into a local optimum solution. Finally, a comparative simulation is presented to illustrate global search performance of QPSO algorithm and the effectiveness and applicability of the proposed control method.


Introduction
Electro-hydraulic servo systems are widely used in hydraulic robots [1], vehicle suspension systems [2], machine tool tables [3], ship's rudders, aerospace [4], and various other applications [5] due to their high control accuracy, fast response time, high output power, and other characteristics. The electro-hydraulic servo system is a typical nonlinear system, which contains many nonlinear characteristics and modeling uncertainties. There is room to improve the control accuracy of PID controller [6,7] for nonlinear systems and the parameters are complicated to adjust. With the continuous development of the control discipline, many methods have emerged that can provide effective control of nonlinear systems, such as H∞ control [8], adaptive control [9], and adaptive robust control [10].
In recent years, many studies have been proposed to address the problems of poor tracking effect, low control accuracy, and influence of nonlinear terms in electro-hydraulic servo systems. An adaptive error symbolic integral robust control method [11] was proposed to eliminate the effect of model uncertainty on the system. The value of the integral robust gain can be adjusted online, and thus the system can achieve asymptotic stabilization of the method without requiring an exact bound on the model uncertainty. A self-turbulent adaptive control scheme based on full-state feedback was proposed in [12] to solve the motion control problem of a hydraulic servo system with parameter uncertainty and uncertain nonlinearity. The control method combines adaptive and extended state observer, the adaptive control deals with the parameter uncertainty problem, and the extended observer estimates the remaining uncertainty. In [13], the adaptive inverse sliding mode controller has been investigated for interference immunity and control accuracy in electro-hydraulic servo systems. Adaptive control method is used to estimate the uncertainties of the system, such as modeling errors and applied disturbances. The inverse sliding mode controller improves the accuracy of system. In [14], RBF-based (Radial Basis 2 of 15 Function) radial basis control model and adaptive sliding mode algorithm are proposed to improve the robustness. This design can resolve the uncertainty of model parameters and external disturbances due to nonlinearity.
Sliding mode control is a nonlinear variable structure control strategy, so this controller is often used to solve the nonlinearity of a electro-hydraulic servo system. In [15], the sliding mode controller was proposed to solve the nonlinearities with a friction model in electrohydraulic servo system. An adaptive fuzzy sliding mode control method was proposed in [16] to ensure asymptotic reference signal tracking of bounded system signals. A fuzzy self-tuning mechanism is introduced to adapt the parameters of the sliding controller, which reduces the chattering problem. The slipform observer has been investigated in [17] for the matching and mismatching model uncertainty of electro-hydraulic position servo systems. This design has a strong robustness and good tracking effect.
It is worth noting that the above-mentioned studies mainly focus on the optimization of the jitter problem of the sliding mode controller. However, the parameters in the controller are also an important factor in determining whether the controller will have good control accuracy. The Particle Swarm Optimization algorithm (PSO) is proposed in [18] to solve the problem of complex parameter adjustment of sliding mode controller. The tracking error is selected as the fitness function, and the algorithm is optimized to effectively shorten the time to reach the sliding surface, which improves the dynamic characteristics of the sliding phase. In [19], the improved algorithm based on the Corsi variance and adaptive speed update strategy is used to optimize the parameters of the sliding mode controller. However, optimization algorithms such as PSO algorithm and genetic algorithm can theoretically optimize the parameters and improve the system operation results, but they usually fall into local optimal solutions, thus making the optimization effect useless to reach the best. The QPSO algorithm is a new algorithm proposed based on the improvement of the PSO algorithm [20]. Compared with the PSO algorithm and other algorithms that have been improved, QPSO algorithm requires only the shrinkage-expansion factor. QPSO algorithm improves the update formula of the algorithm so that the search area of the particle increases.
Based on the above discussion, in this paper we propose a control strategy based on the QPSO algorithm to optimize the parameters of the sliding mode controller. Compared with the PSO algorithm, the QPSO algorithm requires only one parameter and improves the position update formula. The improvement is to cancel the relationship between the position update and the current position. Thus, particles can appear anywhere in the search area, which effectively extends the search range and prevents the algorithm from falling into a local optimum, increasing the global search performance of the algorithm. The QPSO algorithm combined with the ITAE metrics of high engineering practicality can effectively obtain the appropriate system parameters. The use of QPSO algorithm in the control of electro-hydraulic servo system by sliding mode controller can effectively improve the accuracy and performance of the system. Finally, a simulation example is performed to illustrate effective design of this paper.

Mathematical Model and Problem Description
The system model of the valve-controlled motor is built according to the actual needs. The flow into and out of the motor is controlled by electro-hydraulic servo valves, and the motor can track the given signal. The model is shown in Figure 1.
The structure of the electro-hydraulic position servo system is shown in Figure 1. According to Newton's second law, the force balance equation of the load can be obtained as: where J is the rotational inertia of the motor, D m is the displacement of the hydraulic motor, θ is the angle of rotation of the valve motor, P L = P 1 − P 2 is the hydraulic motor load pressure, P 1 and P 2 are the hydraulic motor two cavity pressure, B is the coefficient of viscous friction, and F is the load force. The structure of the electro-hydraulic position servo system is shown in Fi According to Newton's second law, the force balance equation of the load can be ob as: where J is the rotational inertia of the motor, is the displacement of the hy motor, is the angle of rotation of the valve motor, = − is the hydraulic load pressure, and are the hydraulic motor two cavity pressure, B is the coe of viscous friction, and F is the load force.
The hydrodynamic model of the servo valve is nonlinear. There is a mathe relationship between the output of the load flow and the spool displacement can pressed as [21] ρ ω is the output fluid, is the servo valve orifice flow coefficient, servo valve throttle area gradient, is the displacement of the servo valve spoo the pressure of the fluid, and is the density of the fluid.
The continuity equation between the load flow and the hydraulic oscillating flow is is the total leakage coefficient of the hydraulic motor, is the total vol the two chambers connected to the main pipe, is the effective volume elastic mo The hydrodynamic model of the servo valve is nonlinear. There is a mathematical relationship between the output of the load flow and the spool displacement can be expressed as [21] where Q L is the output fluid, C d is the servo valve orifice flow coefficient, ω is the servo valve throttle area gradient, x v is the displacement of the servo valve spool, P S is the pressure of the fluid, and ρ is the density of the fluid. The continuity equation between the load flow and the hydraulic oscillating motor flow is where C t is the total leakage coefficient of the hydraulic motor, V is the total volume of the two chambers connected to the main pipe, β e is the effective volume elastic modulus, and Q(t) is the time-varying uncertain flow in the servo system. The servo valve in this paper operates at a much higher frequency than the hydraulic oscillating motor. To simplify the connection between the motor and the servo valve, the dynamics of the servo valve can be simplified to a proportional relationship [22].
where k i is dynamic proportional coefficient of the servo valve, u t is the control voltage. Then Equation (2) can be expressed as where K t = C d ωk i 1/ρ.
To simplify controller design, the system state variable is chosen as: According to Equations (1)-(5), the state space expression of the electro-hydraulic servo system is where In order to make the derivation and design of the system convenient, the following assumptions are made: The pressure in each chamber of the hydraulic rotary motor is equal everywhere.

2.
The total amount of liquid leakage is negligible that is Q(t) = 0.

3.
Ignoring the non-linear interference such as friction and the influence of fluid quality.

Sliding Mode Controller Design
The design of the slide controller can be divided into two steps, including the design of the slide surface and the design of the control law.

Design of Slide Surface
Defining the electro-hydraulic position servo system position tracking error e, velocity tracking error . e, acceleration tracking error .. e, acceleration derivative tracking error ... e , θ d is the given signal, according to the Equations (6) and (7) can be expanded as .. . ...
Designing the sliding mode surface of the controller is s: where c 1 > 0, c 2 > 0, and the derivative of Equation (13) can be obtained: Simplifying and combining Equations (8)-(14) will obtain: The exponential convergence law [23] is used as the convergence law for designing the sliding mode controller as: where β and η are the controller discontinuity term gain, and β > 0, η > 0. According to Equations (15) and (16), the controller output u t can be designed as: where Based on this controller, the sliding surface of the system can be made to converge to 0, which is the steady state.

System Stability Analysis of Sliding Mode Control
According to the stability analysis of the system in control theory, the Lyapunov function is defined as: Derivation of Equation (18) and substitution of Equation (15) can be obtained: The above equations show that the Lyapunov function L is positive definite and its derivative is negative definite, thus the system will reach a steady state. This means that the sliding mode surface s will be stable in finite time, and thus the system can be proved to be asymptotically stable.

Quantum Particle Swarm Algorithm to Optimize Parameters
Although the sliding mode controller has good control performance for electrohydraulic servo system, if the selected parameters are not suitable it will lead to failure to track, large tracking error, jitter, etc. Therefore, in this paper the optimization algorithm is chosen to optimize the parameters of the controller.
The QPSO algorithm removes the relationship between the update of the particle position and the previous position of the particle. This relationship will lead to a limited search space and trap in a locally optimal solution. Removing these restrictions will increase the particle search space and improve randomness, as the particle can appear at any position in the search interval as far as possible. The adaptation value of this random point will be compared with the current best adaptation value to make a choice, and finally the algorithm gets the global optimal solution through continuous iterations. There is only one parameter to choose in the algorithm which also makes it easier to implement.
The QPSO algorithm has the above effect, so QPSO algorithm is used in this paper to optimize the parameters of the system.

Evolution Equation of Particle Swarm Algorithm
The PSO algorithm performs a parameter search mainly by updating its own velocity and position. The particle searches for the local optimal solution and continuously updates the global optimal solution to obtain the optimal fitness value in each iteration.
Velocity update formula: Position update formula: where vel n is the velocity of the particle, rand() is a random number between (0, 1), x n is the position of the particle, pbest and gbest are the best position of individual and the best position of the group respectively, and r 1 and r 2 are the learning coefficient; usually taking two can obtain better results.

Flow of Quantum Particle Swarm Algorithm
Supposing a particle swarm containing M particles is searched in an N-dimensional target space, and M potential problems form the population: Then the position of the i-th particle is indicates the best position of the group.
The individual best position of particle i depends on the objective function. The individual best position of particle i: The global best position of the population is determined by Equations (22) and (23): Evolutionary equations for the quantum particle swarm algorithm: where g and u are random numbers within [0,1], which are used to represent the average distribution law. From Equations (26)-(28), we can get a randomness in the position update of the QPSO algorithm, which can make the particles perform global search in the whole search range. Compared with the evolutionary equations of PSO algorithm, QPSO algorithm can perform a better global search to avoid getting trapped in local optimal solutions.
The steps of the quantum particle swarm algorithm are as follows: 1.
Setting the initial data, including population size, maximum number of iterations, dimension, parameter search range, range of scaling factors, etc.

2.
Calculating the average best position of the particle population according to Equation (28).

4.
Calculating the adaptation value of the current position of particle i and update the individual best position of the particle according to Equation (23).

5.
Comparing the individual best position of particle i P i (t) with the adaptation value of the global best position G(t−1).
Calculating the position of a random point according to Equation (27) for each dimension of particle i.

7.
Updating the new position of the particle according to Equation (26). The only parameter that needs to be set during the search of the quantum particle swarm algorithm is the contraction-expansion factor in Equation (26), which is taken as where α max = 1, α min = 0. The shrink-expansion coefficient α can affects the speed of search. At the beginning of the algorithm, a faster searching speed is needed to approach the global optimum, so a larger value of α is needed at this time. After the algorithm obtains the global optimum, it is necessary to strengthen the local search ability so that it can further improve the effect of the parameters, so the searching speed can be reduced at this time. In choosing the method of linear decrease of Equation (29) to search, the value of α from large to small is suitable for the search of the algorithm.
The QPSO algorithm performs a global search in the initial stage and local search in the later stage under the influence of the contraction-expansion factor. This ensures that the algorithm has the advantage of searching both the global and local search.

Fitness Function
The fitness function is an important indicator for the algorithm to evaluate the superiority of the parameters, so a suitable function should be selected for evaluation. The fitness function chosen in this paper is the ITAE indicator: The fitness function Z chosen in this paper is the ITAE indicator: where e(t) is the tracking error of the system. This indicator can reflects the overall error accumulation of the system in operation, and effectively screens out parameters in the experiment. The cumulative error in the whole period of time and the error of each time are significantly reduced when fitness value is smaller, so the system can get better tracking performance. The index is effective in considering the system stability and performance, it is a kind of control system performance evaluation index with good engineering practicality and selectivity. The transient response oscillations of the system evaluated by this index will be reduced, and the indicator has good selectivity for parameters.

Simulation Analysis
To verify the proposed control strategy, the system simulation model is built in Matlab/Simulink, the simulation step is set to 0.001 s, and the load force F is set to 10 N. Due to the actual engineering of the electro-hydraulic servo system structures are easy to damage when subjected to excessive voltage and current, control torque, so the output of controller in the simulation is limited to between (−10, +10). The data for the electrohydraulic servo system parameters are shown in Table 1. The parameters of the hydraulic system are as follows: In order to verify the effectiveness of the design for the electro-hydraulic servo system, three working conditions are investigated for comparative simulation experiments. Selecting the given signal as θ d = sin(t), the amplitude is ±3 rad/s.

Working Condition I
Selecting the controller parameters as c 1 = 100, c 2 = 10, β = 10, η = 10. Figure 2 shows the inability to track a given signal when the parameters are not properly selected, the error between the amplitude of the output curve, and the given signal is large. The sliding mode controller is unable to control the system, and the maximum error reaches 3.62 rad/s. In order to verify the effectiveness of the design for the electro-hydraulic ser tem, three working conditions are investigated for comparative simulation exper Selecting the given signal as = ( ), the amplitude is ±3 rad/s.

Working Condition I
Selecting the controller parameters as = 100, = 10, = 10, = 10. Figure 2 shows the inability to track a given signal when the parameters properly selected, the error between the amplitude of the output curve, and th signal is large. The sliding mode controller is unable to control the system, and th mum error reaches 3.62 rad/s.  Selecting the controller parameters as c 1 = 15,000, c 2 = 10, β = 10, η = 10. From Figure 3, it can be observed that the tracking accuracy may not be accurate enough when the parameters are not selected properly, and the phase of the tracking curve lags behind the given curve. The tracking error is between ±0.21 rad/s, which is poor tracking for systems that require high precision control.
Machines 2021, 9, x FOR PEER REVIEW 9 of 17 From Figure 3, it can be observed that the tracking accuracy may not be accurate enough when the parameters are not selected properly, and the phase of the tracking curve lags behind the given curve. The tracking error is between ±0.21 rad/s, which is poor tracking for systems that require high precision control.  Selecting the controller parameters as = 13,000, = 400, = 2600, = 20,000. From Figure 4, it can be obtained that the jitter may occur when the parameters are not selected properly. The output curve has obvious jitter phenomenon, which may make the system unstable and lead to damage of the machine. The tracking error is between ±0.128 rad/s, and the curve has a jitter amplitude of 0.1 rad/s. Selecting the controller parameters as c 1 = 13,000, c 2 = 400, β = 2600, η = 20,000. From Figure 4, it can be obtained that the jitter may occur when the parameters are not selected properly. The output curve has obvious jitter phenomenon, which may make the system unstable and lead to damage of the machine. The tracking error is between ±0.128 rad/s, and the curve has a jitter amplitude of 0.1 rad/s. Selecting the controller parameters as = 13,000, = 400, = 2600, = 20,000. From Figure 4, it can be obtained that the jitter may occur when the parameters are not selected properly. The output curve has obvious jitter phenomenon, which may make the system unstable and lead to damage of the machine. The tracking error is between ±0.128 rad/s, and the curve has a jitter amplitude of 0.1 rad/s.  From the above situation, it can be deduced that the sliding mode controller may produce several situations before the parameters are properly selected: it cannot track the upper signal, the tracking error is large, and the tracking curve and the jitter of the controller output are problems. It shows that the selection of parameters has a large impact on the control performance. From the above situation, it can be deduced that the sliding mode controller may produce several situations before the parameters are properly selected: it cannot track the upper signal, the tracking error is large, and the tracking curve and the jitter of the controller output are problems. It shows that the selection of parameters has a large impact on the control performance.

Working Condition II
It can be seen from Working condition I that the control effect of the sliding mode controller without parameter optimization is not satisfactory. Thus, the PSO algorithm is added to optimize the parameters of the sliding mode controller in this case.
From Figure 5, it can be obtained that the controller parameters take the values c 1 = 50,000, c 2 = 100, β = 1827.8, η = 100 after the optimization of the PSO algorithm. It can be seen that the parameters fall into the local optimal solution after the tenth iteration and it is difficult to jump out of the local optimal solution resulting in the optimal parameters not being updated.
From Figure 6, it can be seen that the fitness value curve gradually falls into the local optimal solution after the 10th iteration. The optimal fitness value is not effectively reduced due to the fact that the subsequent local search capability is not strong, which is detrimental to the search for parameters.
From Figures 6-8, it can be found that the sliding mode controller can track the given signal after optimizing the parameters by PSO algorithm. The problems of not being able to track the upper signal, large tracking error, tracking curve, and jitter of the controller output that appear in working condition I have been greatly improved. However, there are still problems in the details of optimization. After the 10th iteration of the PSO algorithm, the algorithm falls into a local optimum solution and the fitness value hardly improves. This problem indicates that the particle finds a locally optimal solution and then starts a region search near that solution, thus the particle misses other better solutions.
From Figure 5, it can be obtained that the controller parameters take the values = 50,000, = 100, β = 1827.8, η = 100 after the optimization of the PSO algorithm. It can be seen that the parameters fall into the local optimal solution after the tenth iteration and it is difficult to jump out of the local optimal solution resulting in the optimal parameters not being updated. From Figure 6, it can be seen that the fitness value curve gradually falls into the local optimal solution after the 10th iteration. The optimal fitness value is not effectively reduced due to the fact that the subsequent local search capability is not strong, which is detrimental to the search for parameters. From Figures 6-8, it can be found that the sliding mode controller can track th signal after optimizing the parameters by PSO algorithm. The problems of not be to track the upper signal, large tracking error, tracking curve, and jitter of the co output that appear in working condition I have been greatly improved. Howeve are still problems in the details of optimization. After the 10th iteration of the PS rithm, the algorithm falls into a local optimum solution and the fitness value har to track the upper signal, large tracking error, tracking curve, and jitter of the co output that appear in working condition I have been greatly improved. Howeve are still problems in the details of optimization. After the 10th iteration of the PS rithm, the algorithm falls into a local optimum solution and the fitness value ha proves. This problem indicates that the particle finds a locally optimal solution a starts a region search near that solution, thus the particle misses other better solu

Working Condition III
From Case 2, it can be seen that the sliding mode controller can better ach position tracking of the given signal after the optimization of the parameters by algorithm. However, the PSO algorithm is easy to fall into the local optimal solut trol and the control accuracy needs to be further improved, so the QPSO algorithm to optimize the parameters of the sliding mode controller in Case 3.
From Figure 9, it can be obtained that the controller parameters take the valu = 9590.215, = 100.04, β = 1653.069, η = 9950.2 after the optimization of the QPS rithm. It can be seen that after the global search in the first stage, the QPSO algori better performance in the later stages of the search.
The algorithm continuously performs a global search and updates the global

Working Condition III
From Case 2, it can be seen that the sliding mode controller can better achieve the position tracking of the given signal after the optimization of the parameters by the PSO algorithm. However, the PSO algorithm is easy to fall into the local optimal solution control and the control accuracy needs to be further improved, so the QPSO algorithm is used to optimize the parameters of the sliding mode controller in Case 3.
From Figure 9, it can be obtained that the controller parameters take the values of c 1 = 9590.215, c 2 = 100.04, β = 1653.069, η = 9950.2 after the optimization of the QPSO algorithm. It can be seen that after the global search in the first stage, the QPSO algorithm has better performance in the later stages of the search.
better performance in the later stages of the search.
The algorithm continuously performs a global search and updates the global optimal solution several times in the first stage of the search, while the QPSO algorithm finds the parameters that better fit the system near the optimal solution at a later stage of the algorithm. Comparing with Figure 6, the optimal adaptation degree is improved by 25%, which illustrates that the PSO algorithm falls into the local optimal solution. From Figures 10-12, compared with the traditional sliding mode control, the complex operation of manually adjusting the system parameters can be omitted and the jitter problem of the system and controller output can be effectively eliminated. Compared with the parameters optimized by the particle swarm algorithm, the QPSO algorithm can go beyond the local optimal solution to obtain the global optimal solution, and the optimized parameters can achieve better performance of the system.
Because the electro-hydraulic servo system is a high-precision system, the evaluation function selected in this paper is the ITAE metric, so the selection for the parameters is based on the magnitude of the error and the accumulated value of the error. The final results show that the accuracy of the system has been greatly improved and the jitter of the system based on the QPSO algorithm still exists, but it has been improved compared to the jitter in Figure 4. The algorithm continuously performs a global search and updates the global optimal solution several times in the first stage of the search, while the QPSO algorithm finds the parameters that better fit the system near the optimal solution at a later stage of the algorithm. Comparing with Figure 6, the optimal adaptation degree is improved by 25%, which illustrates that the PSO algorithm falls into the local optimal solution.
From Figures 10-12,compared with the traditional sliding mode control, the complex operation of manually adjusting the system parameters can be omitted and the jitter problem of the system and controller output can be effectively eliminated. Compared with the parameters optimized by the particle swarm algorithm, the QPSO algorithm can go beyond the local optimal solution to obtain the global optimal solution, and the optimized parameters can achieve better performance of the system.
Because the electro-hydraulic servo system is a high-precision system, the evaluation function selected in this paper is the ITAE metric, so the selection for the parameters is based on the magnitude of the error and the accumulated value of the error. The final results show that the accuracy of the system has been greatly improved and the jitter of the system based on the QPSO algorithm still exists, but it has been improved compared to the jitter in Figure 4.
In Figure 13, the tracking error after the system is controlled by the PID controller is added for comparison. The values of the PID controller parameters are P = 800, I = 100, D = 0.
Because the electro-hydraulic servo system is a high-precision system, the evaluation function selected in this paper is the ITAE metric, so the selection for the parameters is based on the magnitude of the error and the accumulated value of the error. The final results show that the accuracy of the system has been greatly improved and the jitter of the system based on the QPSO algorithm still exists, but it has been improved compared to the jitter in Figure 4.   In Figure 13, the tracking error after the system is controlled by the PID controller is added for comparison. The values of the PID controller parameters are P = 800, I = 100, D = 0.  In Figure 13, the tracking error after the system is controlled by the PID controller is added for comparison. The values of the PID controller parameters are P = 800, I = 100, D = 0. From Figure 13 and Table 2, it can be concluded that the error range of the system after being controlled by the PID controller is −9.5 × 10 ~9.5 × 10 , and the tracking error range of the system after the optimization of the PSO algorithm is −1.14 × 10 ~1.05 × 10 . The tracking error range of the system after optimization by the QPSO algorithm is −9.22 × 10 ~6.63 × 10 and the margin of error is reduced 36.8% compared to PSO algorithm. The fitness value reduced by 25% reflects a reduction in the overall error accumulation, a more stable system, a faster rate of reaching stability, and a significant increase in tracking accuracy. According to the above three working conditions, it can be observed that compared with the traditional sliding mode control and PSO algorithm optimized sliding mode control, the sliding mode controller optimized by QPSO algorithm has a greater improvement in all aspects of control performance, which reflects that the method has a better control effect for the system under the operation with load force.

Conclusions
In this paper, the sliding mode controller based on QPSO algorithm for parameter optimization was proposed to address the nonlinear problem of electro-hydraulic servo systems, external disturbance, and the problem of controller parameter selection. The sliding mode controller with strong robustness can track a given signal, and then QPSO algorithm based on ITAE metric is used to optimize the parameters of the sliding mode controller. This design expands the search space of parameters, diminishes the effect of jitter, and achieves the global optimal solution; thus, the control performance of electro-hydraulic servo system is improved. The experiments show that compared with the PSO algorithm, the fitness value is reduced by 25% and the tracking accuracy of the system is improved by 36.8% after optimization by QPSO algorithm. The algorithm not only eliminates the complexity of manually adjusting parameters but also effectively performs a From Figure 13 and Table 2, it can be concluded that the error range of the system after being controlled by the PID controller is −9.5 × 10 −3 ∼ 9.5 × 10 −3 , and the tracking error range of the system after the optimization of the PSO algorithm is −1.14 × 10 −3 ∼ 1.05 × 10 −3 . The tracking error range of the system after optimization by the QPSO algorithm is −9.22 × 10 −4 ∼ 6.63 × 10 −4 and the margin of error is reduced 36.8% compared to PSO algorithm. The fitness value reduced by 25% reflects a reduction in the overall error accumulation, a more stable system, a faster rate of reaching stability, and a significant increase in tracking accuracy. According to the above three working conditions, it can be observed that compared with the traditional sliding mode control and PSO algorithm optimized sliding mode control, the sliding mode controller optimized by QPSO algorithm has a greater improvement in all aspects of control performance, which reflects that the method has a better control effect for the system under the operation with load force.

Conclusions
In this paper, the sliding mode controller based on QPSO algorithm for parameter optimization was proposed to address the nonlinear problem of electro-hydraulic servo systems, external disturbance, and the problem of controller parameter selection. The sliding mode controller with strong robustness can track a given signal, and then QPSO algorithm based on ITAE metric is used to optimize the parameters of the sliding mode controller. This design expands the search space of parameters, diminishes the effect of jitter, and achieves the global optimal solution; thus, the control performance of electro-hydraulic servo system is improved. The experiments show that compared with the PSO algorithm, the fitness value is reduced by 25% and the tracking accuracy of the system is improved by 36.8% after optimization by QPSO algorithm. The algorithm not only eliminates the complexity of manually adjusting parameters but also effectively performs a global search; finally the electro-hydraulic servo system achieves improved tracking performance under load forces.