1 Introduction

With the advent of Pascal’s law, scientists have begun a large number of theoretical researches and related experimental works for hydraulic transmission technology [1]. Hydraulic transmission uses liquid pressure to transfer the energy of objects. It has the characteristics of wide speed range, compact structure, reliable operation and easy operation [2]. From the seventeenth century to the 1950s, in order to improve the hydraulic system and further optimize the system performance, people combined the principle of hydraulic control with the principle of electrical control, so that the system achieved better performance. But the manufacturing industry could not meet the demand of the electro-hydraulic device at that time. Because of the problems of high cost and high external environment requirements, servo valves cannot be widely used, while proportional valves are generally utilized in fact. At that time, open-loop control occupied a major position [3]. Until the 1980s, people began to use sophisticated proportional amplifiers and solenoid valve technology in electro-hydraulic systems. Electro-hydraulic control technology has entered a new era of closed-loop control. The control accuracy and dynamic response of electro-hydraulic control systems have been greatly improved [4]. Later, a proportional valve with internal feedback and correction control strategy was introduced in the control system, which further improved the dynamic and static response characteristics of the system [5]. After 1990, scientists further proposed to use servo proportional valves in electro-hydraulic servo systems [6]. The application of servo proportional valves solved the dead zone problem in hydraulic systems. The control precision and rapidity of modern electro-hydraulic servo control system have achieved ideal conditions, which are widely used in various fields.

2 State of the art

The traditional electro-hydraulic servo system is valve controlled. The system controls the flow and speed of the liquid through real-time adjustment of the gap size of the electro-hydraulic servo valve. It further completes the real-time control of the hydraulic cylinder movement. Valve-controlled closed-loop system is realized through the application of servo valve or proportional valve in the system. This system has the advantages of high control accuracy, high frequency response and large output power in actual industrial production. At the same time, there is a throttling overflow loss, oil pollution and low energy utilization. Aiming at the shortcomings of the valve control system, the pump control system came into being. The system is divided into two types according to the different control principles: variable displacement system and variable-speed system. The variable displacement system controls the system flow by changing the displacement of the variable displacement pump. The structure of the variable displacement pump in the variable displacement system is complex, and the process cost is high. The motor always rotates at the rated speed regardless of whether the hydraulic cylinder is in working condition or not. Therefore, there is a problem of unnecessary energy consumption and noise [7]. In the past two decades, with the rapid development of microelectronics technology and high-power electronic devices, variable-speed systems have rapidly developed. Scientists have successfully applied frequency-conversion technology and AC servo motor technology [8] to hydraulic drive systems and further proposed drive pump-controlled electro-hydraulic servo system concept [9]. Direct-drive pump control electro-hydraulic servo system can change the output flow of the pump by changing the speed of the servo motor by using a new type of motor that is different from the AC asynchronous motor and can achieve real-time physical quantities such as circuit pressure [10], position and speed. For the purpose of control, the system has the advantages of wide speed range, high resolution, low sensitivity to oil pollution, high energy efficiency, easy to implement computer control, stable and reliable system, and so on. Large occasions [11] have been widely used, such as anti-rolling, marine servos, hydraulic presses, hydraulic elevators, die casting machines, six-degree-of-freedom motion platforms and various material testing machines [12]. At the same time, due to the complex structure of the system [13], there is an adjustment time. The responsiveness of the response is slightly inferior to that of the valve control system [14].

3 Methodology

3.1 Establishment of the system

In this paper, the three parameters of the PID controller are optimized offline by using the genetic algorithm and the bacterial foraging optimization algorithm [8]. First, an orthogonal experiment table is established. Different PID parameters are used to obtain different response curves. Then the system is based on the orthogonal experiment table. The initial PID parameters of the system were tested by the established agent model. Finally, the system was optimized offline by the genetic algorithm and the bacterial foraging optimization algorithm.

First of all, the design of orthogonal experiment is carried out. Conclusions from the large number of simulation studies on the system with different PID parameters can be drawn. The bigger the kp proportional coefficient is, the more obvious the proportional link is, and the faster the system response is, but the system is steady at the same time. The error becomes larger with kp. The smaller the ki integral coefficient is, the more obvious the integral link function is, and the smaller the steady-state error of the system, but the speed of the system response will be suppressed and the adjustment time will become longer. The larger the kd differential coefficient is, the more obvious the effect is, the less the system oscillation can be attenuated. But the too large kd will restrain the response speed of the system. Therefore, it is necessary to select the appropriate parameter tuning method for the optimization of the parameters in the actual engineering application.

After a large number of simulation studies on the system with different PID parameters, the result shows that: kp is in the range of 0–50, ki is in the range of 0–1, and kd is in the range of 0–5.

This paper uses the genetic algorithm and bacterial foraging optimization algorithm to optimize the system PID parameters offline. According to the simulation results, this paper designs a three-factor three-level orthogonal test table to calculate the interpolation point of the system. If the three factors and three levels are fully tested, it takes 27 experiments to be time-consuming and laborious. Therefore, this article designs a three-factor three-level orthogonal experiment table. The orthogonal experimental scheme shown in Table 1 can be obtained.

Table 1 Orthogonal test scheme

Adjust the safety pressure of the system by adjusting the relief valve. Input the displacement target on the control panel with no external load in the system. Use the PID parameters to design the orthogonal experiment table to collect and process the experimental data. Part of the experimental curve is shown in Fig. 1, where e represents the steady-state error.

Fig. 1
figure 1

The step response curve of the traditional PID controller position servo system

As can be seen from Fig. 1, the experimental results and the simulation results in Sect. 4 are basically the same. Due to some uncertain nonlinear factors, the adjustment time of the system response to the step is greater than the simulation results. But still can be seen from the experimental results of the traditional that the selection of three parameters of the PID controller has a great influence on the controller, and the effect of the three parameters on the step response curve is not the same. In practical engineering applications, the parameter optimization must be used to obtain the best set of parameters for the system’s step response curve. Only in this way can the system respond faster, and the response be more stable. The overshoot is less, and the system steady-state error is less.

Following the establishment of the agent model, the above orthogonal experiment table was used as the interpolation point. The mapping model of the experimental system PID parameters was established using the linear superposition of the basis functions. The basic form of the radial basis model established in this paper is as follows:

$$ f(x) = \sum\limits_{i = 1}^{n} {w_{i} \cdot \phi (r^{i} )} = w^{T} \varphi $$
(1)

Among them, \( w = (w_{1} ,w_{2} , \ldots ,w_{n} )^{T} \) is the weight coefficient, \( \varphi = [\phi (r_{1} ),\phi (r_{2} ), \ldots ,\phi (r_{n} )]^{T} ,r^{i} = \left\| {x - x^{i} } \right\| \) is the Euclidean distance between the point x to be measured and the sample point \( x^{i} \), \( \phi (r) \) radial function, the radial function used in this paper is a Gaussian function:

$$ \phi (r) = \exp ( - \frac{{r^{2} }}{{c^{2} }}) $$
(2)

According to the interpolation condition \( f(x^{j} ) = y^{i} (j = 1, \ldots n) \), this paper gets the equations:

$$ \phi \cdot w = Y $$
(3)

Matrix \( \phi = [\phi_{ij} ] = [\phi \left\| {x^{i} - x^{j} } \right\|] \), vector \( Y = (y^{1} , \ldots y_{n} )^{T} (i,j = 1, \ldots ,n) \).

Because the sample points do not coincide, the equations have unique solutions:

$$ w = \phi^{ - 1} \cdot Y $$
(4)

The system property values of Table 2 are used as the interpolation points to bring the above equations into consideration. The weight coefficients are solved on the MATLAB platform, and an agent model of the experimental system is established.

Table 2 The effect of different PID parameters on the response characteristics of the system

According to the established agent model, the orthogonal experiment data of Table 2 are tested, and the results shown in Table 3 can be obtained:

Table 3 Comparison of predicted values and experimental values based on agent model calculation

As can be seen from Table 3, the maximum error of the predicted value and the error value is 0.0330 mm, the minimum error is 0.0003 mm. The PID controller’s parameters and performance have established a good mapping relationship, so the model can be used as a solution space for genetics algorithm and bacterial foraging optimization algorithm offline search optimization.

3.2 Feedforward PID control based on genetic algorithm optimization

The first is the establishment of the radial base agent model of the experimental system. In the previous section, an orthogonal experimental method was used to establish a reasonable mapping relationship for the system PID controller. After offline optimization, the optimal PID parameters of the experimental system can be obtained. The search range used by the algorithm and the bacterial foraging optimization algorithm is obtained through a large number of simulation studies using different PID parameters. It is based on the assumption that the experimental system is in an ideal state. But considering that the actual system is subject to determine the influence of nonlinear factors, the system cannot quickly respond to the target signal and the parameters are too large to bring a certain impact on the system and affect the system life. In the experimental study, the PID parameters can be optimized offline by genetic algorithm and bacterial foraging optimization algorithm by establishing an agent model. The parameters obtained by the optimization of genetic algorithm are: 22, 5 and 0.1. Parameters obtained by the bacterial foraging optimization algorithm are: 26, 13 and 0.08. Its step response curve is shown in Fig. 2.

Fig. 2
figure 2

Optimization of PID parameters based on intelligent optimization algorithm

The selected PID parameters are 22, 5 and 0.1. In the front panel of the feedforward PID controller, the feedforward coefficient is changed and the agent model of the feedforward PID control system is established. The interpolation point data are tested using the established agent model. The model is used to optimize the optimal feedforward coefficient of the system offline. The feedforward coefficients kv and kf can be optimized offline by applying the genetic algorithm, which are 0.002 and 0.018, respectively. The step-by-port response curve is shown in Fig. 3.

Fig. 3
figure 3

Feedforward PID controller based on genetic algorithm optimization, |e| = 0.0170

It can be seen from Fig. 3 that: (1) Due to the influence of some uncertain nonlinear factors such as system time lag, hydraulic cylinder dead zone and oil leakage, the system’s step response curve is not as smooth as the simulation curve of Sect. 4, and the system is rising. There is a certain amount of time oscillation, and the adjustment time is longer. (2) Consistent with the simulation results, the feedforward PID controller optimized based on genetic algorithm has significantly better response performance than the other two. The controller has a smaller adjustment time, overshoot and steady-state error.

Followed by the square wave response experimental curve, the square wave response characteristics of the system can be analyzed by applying the PID parameters obtained from offline optimization above. The square wave response experimental curve can be obtained. It can be seen that the square wave tracking curve obtained by PID parameter optimization based on the genetic algorithm has a longer adjustment time and the error is smaller. The adjustment time of the square wave tracking curve obtained by the PID parameter optimization based on the bacterial foraging optimization algorithm is short, but it cannot be accurate. In response to the target curve, there is a large overshoot. The feedforward PID control based on genetic algorithm optimization has a smaller response time, smaller steady-state error and overshoot, and it can basically track the target curve.

4 Result analysis and discussion

By using the agent model function and applying the genetic algorithm to offline optimize the PID parameters: 18, 12, and 0.5, the system response target pressure values are: 2 MPa, 3 MPa, 4 MPa, and 5 MPa, and the response curve shown in Fig. 4 can be obtained.

Fig. 4
figure 4

Optimization of jump response curve based on PID parameters based on genetic algorithm

It can be seen from Fig. 4 that the step response curve obtained by optimizing the PID parameters based on the bacterial foraging optimization algorithm for pressure servo system has the advantages of faster response speed and small adjustment time, but it brings certain overshoot to the system. The response of step response curve obtained by PID parameter optimization based on genetic algorithm is faster than the traditional PID controller. The steady-state error is smaller than the traditional controller. The response speed is slightly lower than the parameters obtained by the bacterial foraging optimization algorithm. Using a bacterial foraging optimization algorithm will give the system a large overshoot and a certain amount of oscillation.

On the basis of the experimental content in the previous section, this paper uses different feedforward coefficients to perform relevant experiments on the system. It established a system agent model and called the agent model program to use a genetic algorithm to optimize PID parameters offline and experimented with step response characteristics of the system. The results of the optimization study were: 0.0014 and 0.015. The target pressures of the system were: 2 MPa, 3 MPa, 4 MPa and 5 MPa. The experimental results are shown in Fig. 5.

Fig. 5
figure 5

Feedforward PID control pressure servo system jump response curve based on genetic algorithm optimization

It can be seen from Fig. 5 that the feedforward PID controller based on genetic algorithm optimization weakens the oscillation caused by the uncertain nonlinear factors in the servo system, and the response curve is smooth. The former is optimized based on the genetic algorithm for the pressure servo system. The step response curve obtained by the feed PID controller shows significant advantages such as fast response, small steady-state error and almost zero overshoot.

Based on the characteristics of the electro-hydraulic servo system, an experimental platform for position and pressure servo system was built. The hardware and software of the experimental system were designed on the basis of the original equipment. The PID controller and feedforward PID control were further completed in the LabVIEW environment.

The above analyzes and summarizes the structural composition and working principle of the electro-hydraulic position and pressure servo system controlled by a direct-drive pump. The modular idea is used to divide the system into a series of independent modules. A linear assumption is made for the nonlinear links of each module. In order to simplify the processing, the mathematical model of differential equations of motion for each module was established using analytical modeling methods, and the construction of transfer functions for position and pressure servo systems was completed. The stability of the system was correlated with the stability of the system based on the frequency domain characteristic curve using MATLAB software. The analysis shows that the open-loop transfer function Bode diagrams of the pressure servo system and position servo system both have large phase margins and amplitude margins. The system is closed-loop stable within a certain gain range. An orthogonal experiment was performed on the influence of the parameters of the feedforward PID controller on the system performance. The mapping relationship between the controller parameters and the performance index was established using a radial basis agent model, and the PID parameters and feedforward were taken offline by the intelligent optimization algorithm. The step response and square wave response characteristics of position and pressure servo system before and after optimization were compared and studied. The results show that due to the influence of uncertain nonlinear factors, there will be some oscillations in the initial stage of the system response. The steady-state error of the system response time in the experimental results is larger than that of the simulation result. The complexity of the pressure servo system is slightly higher than that of the position servo system. The response speed of the system to the target pressure is slightly lower than that of the position target. The feedforward PID control based on genetic algorithm optimization can effectively weaken the influence of nonlinear factors on the system response performance.

5 Conclusion

Electro-hydraulic servo drive technology has been widely used in aerospace, engineering machinery, machinery manufacturing and other fields for its advantages of high control accuracy, fast response speed and large output power. For the valve-controlled electro-hydraulic servo system which is widely used at present, there are problems such as throttling overflow loss, sensitive to oil pollution, complex structure and low efficiency. This paper uses a servo motor to directly drive a two-way quantitative pump to establish a new type of electricity liquid servo drive system. Based on an electro-hydraulic servo console, the experimental platform was established. The software development of the direct-drive pump-controlled electro-hydraulic servo system was completed on the LabVIEW platform. An experiment was performed on the influence of the parameters of the feedforward PID controller on the system performance. The mapping relationship between the controller parameters and the performance index was established using a radial basis agent model. The feedforward PID parameters were taken offline by the intelligent optimization algorithm. The step response and sine wave response characteristics of servo system before and after optimization were compared and studied. The results show that the feedforward PID control based on intelligent optimization algorithm can effectively improve the control accuracy of electro-hydraulic servo system controlled by direct-drive pump with less adjustment time and steady-state error.