Real-Time Hybrid Test Control Research Based on Improved Electro-Hydraulic Servo Displacement Algorithm

Real-time hybrid testing (RTH) is a test method for dynamic loading performance evaluation of structures, which is divided into digital simulation and physical testing, but the integration of the two may lead to problems such as time lag, large errors, and slow response time. The electro-hydraulic servo displacement system, as the transmission system of the physical test structure, directly affects the operational performance of RTH. Improving the performance of the electro-hydraulic servo displacement control system has become the key to solving the problem of RTH. In this paper, the FF-PSO-PID algorithm is proposed to control the electro-hydraulic servo system in real-time hybrid testing (RTH), which uses the PSO algorithm to operate the optimized PID parameters and the feed-forward compensation algorithm to compensate the displacement. First, the mathematical model of the electro-hydraulic displacement servo system in RTH is presented and the actual parameters are determined. Then, the objective evaluation function of the PSO algorithm is proposed to optimize the PID parameters in the context of RTH operation, and a displacement feed-forward compensation algorithm is added for theoretical study. To verify the effectiveness of the method, joint simulations were performed in Matlab/Simulink to compare and test FF-PSO-PID, PSO-PID, and conventional PID (PID) under different input signals. The results show that the proposed FF-PSO-PID algorithm effectively improves the accuracy and response speed of the electro-hydraulic servo displacement system and solves the problems of RTH time lag, large error, and slow response.


Introduction
The real-time hybrid test (RTH) [1] is a test method to study the performance of testing the response of large structures under dynamic loading. The whole test structure consists of a numerical substructure and a physical substructure, the former is calculated by a computer for numerical simulation, and the latter act as the displacement on the physical experimental structure by communicating with the electro-hydraulic servo displacement system through the computer [2,3]. As a test system with high requirements for real-time, RTH, during the numerical simulation calculation, signal output, and signal acquisition, the hydraulic cylinder actuator detects the displacement and the desired displacement. There are problems with hysteresis and errors, and the electro-hydraulic servo system, as an actuator, affects the performance of the whole RTH system.
In the development of the real-time hybrid test, Nakashima et al., 1992;Horiuchi et al., 1999;Horiuchi et al., 2001 [24-26] found that the hysteresis and errors of the electrohydraulic servo actuator directly affect the test results of the real-time hybrid test in the experiment. In order to achieve the test results, control algorithms must be introduced to improve the system's performance. With the development of electro-hydraulic servo systems in the past 20 years, the research of electro-hydraulic control algorithms has been continuously advanced, and sliding mode control [27,28], robust control [29], and PID control [30] have become the main research content of scholars. In comparison, PID control algorithms are widely used in electro-hydraulic servo system control. With the development of artificial intelligence science, the combination of artificial intelligence algorithms [31][32][33] and PID control algorithms has become the mainstream trend and Hao et al. [34] proposed an improved particle swarm optimization for the trajectory tracking accuracy problem to optimize the proportional-integral differential (PID) controller coefficients of the PSO algorithm, which obtained high accuracy and fast convergence of the electro-hydraulic servo system; nevertheless, the problem of system lag and slow response exists. Fan [35] and Ma et al. [36] improved the control performance by improving the objective evaluation function of the PSO algorithm, but the proposed objective evaluation function is too simple for the system performance index requirements, which may be ineffective or inefficient for processing complex signals, and has not been validated and tested in various situations. Guo et al. [37] proposed a new objective evaluation function in genetic algorithm rectified PID with a penalty mechanism. However, excessive pursuit of response rate leads to oscillation in the early stage, and the introduction of other control algorithms combined with PID control is worthy of reference.
From the above work, it can be seen that scholars have extensively used the PSO algorithm to modify the PID parameters and improve the PSO algorithm from different perspectives to improve its performance. The main focus has been on modifying the objective evaluation function of the PSO algorithm, introducing other control algorithms, and resetting the parameters of the algorithm. However, none of them effectively solves the system response lag problem, and the application environment of the algorithm is not related to real-time hybrid testing (RTH) and performs poorly under complex input signals. The main contribution of this paper is to propose the FF-PSO-PID algorithm to optimize the electro-hydraulic servo system in real-time hybrid testing (RTH), which uses the PSO algorithm to optimize the PID parameters and the feed-forward compensation algorithm to compensate the displacement, and the FF-PSO-PID algorithm is a combination of two different algorithms. In this paper, the objective evaluation function of the PSO algorithm is proposed, and a penalty mechanism considering the system error and the system response speed is added. Based on the optimized PID of PSO algorithm, a feedforward compensation algorithm is introduced and combined with PSO-PID algorithm for hybrid control, which improves the system response speed, convergence speed, and tracking performance and effectively solves the problem of system response lag. In this paper, the algorithm is applied to various complex input signals to verify its excellent performance, and it is also verified that the algorithm meets the performance requirements of real-time hybrid testing (RTH).

Real-Time Hybrid Test System
In this paper, as shown in Figure 1, the electro-hydraulic servo system, as a subsystem of the hybrid test system, is the most important part in the context of the hybrid test. This paper focuses on the electro-hydraulic servo system as the research object to improve the performance of the whole real-time hybrid test (RTH) by improving the control algorithm of the electro-hydraulic servo system. The electro-hydraulic servo system is mainly composed of eight parts, such as controller, servo valve, hydraulic cylinder and displacement sensor. As shown in Figure 2, the main working principle is to send a voltage signal from the controller, through the amplifier into current, the size of the valve port of the electrohydraulic servo valve to control, so as to determine the flow direction and flow of oil into the hydraulic cylinder, the oil in the hydraulic cylinder to push the actuator piston rod, and the load for movement. The displacement sensor at the actuator end feeds back the displacement signal to form the closed-loop control of the electro-hydraulic servo system.   Using the four-sided slide valve as a prototype, the four-way valve load flow equation is linearizable, as shown in Figure 2.
According to the physical properties of the four-sided slide valve and the literature proof [37], the hydraulic cylinder can be approximated as a third-order oscillating system. The formula is as follows: where ω r = 4β e A 2 p m t V t , ω r is the hydraulic inherent frequency; as B p is small and negligible, it is simplified to δ r = K ce A p m t V t , which is the hydraulic damping ratio.

Servo Valve Model
Using the G761 series electro-hydraulic servo valve made by Moog as a prototype, the servo valve can be approximated as a second-order oscillating system when the servo valve bandwidth is close to the hydraulic inherent frequency [37].
where K sv is the electro-hydraulic servo valve proportional gain; ω n is the intrinsic frequency; ξ n is the damping ratio.

Servo Amplifier and Displacement Sensor Model
The servo amplifier can be simplified to a proportional link, and we let this proportional link be K a . The input displacement signal is the voltage value, the range is ±10 V, and the input current range of the electro-hydraulic servo valve is 0-±40 mA.
The feedback signal is the displacement signal. Similarly, the displacement range is 220 mm, the input is voltage ±10 V, and we set the feedback amplifier as K s .

PID Control Algorithm
A controller with a proportional-integral-derivative control law is called a PID controller. This combination has the characteristics of each of the three basic laws, and its equation of motion is: The corresponding transfer function is: As shown in Figure 3, the PID algorithm can effectively perform closed-loop control of the electro-hydraulic servo system for real-time hybrid test, but the three parameters are very difficult to determine, and it is difficult to find the specific parameters accurately, causing the control system to fail to operate efficiently.

FF-PSO-PID Control Algorithm
The algorithm in this paper is a combination of PSO-optimized PID parameters and a feed-forward compensation algorithm (FF-PSO-PID). While improving the tracking error and response rate of the electro-hydraulic servo system for real-time hybrid testing, the system response hysteresis is further addressed.

PSO Algorithm Optimizes PID Parameters
In this paper, the objective evaluation function of the PSO algorithm is improved to accurately calculate the three parameters of the PID applicable to the real-time hybrid test to ensure that the system error, response speed, and tracking performance meet the test requirements.

PSO Update Rules
The PSO is initialized as a group of random particles (random solutions). The optimal solution is found by iteration.
The particle updates its velocity and position by the following equation [36]: In Equation (5), i = 1, 2, · · · , N, N is the total number of particles in the population. v i is the velocity of the particle, rand() is a random number between (0,1), and c 1 and c 2 are learning factors.
Introducing the inertia weighting factor ω based on the standard form of the above base PSO, the following equation is obtained: where ω is the inertia weight factor, the magnitude of its value affects the ability of global search and local search, and a dynamic ω can obtain better search results.

Design of the Objective Evaluation Function
According to the characteristics of electro-hydraulic servo displacement control, the following objective evaluation function is proposed: where ω 1 , ω 2 , ω 3 , and ω 4 are the weights of the performance indicators, and different weights affect different system performance effects. σ% is the overshoot, ∞ 0 t|e(t)|dt is the time integral of the absolute value of the error multiplied by time, t s is the regulation time, and t r is the rise time. A penalty factor is placed in the objective function J, and when the regulation time is greater than 0.3, it is no longer calculated. When overshoot occurs, the amount of overshoot is used as one of the optimal indicators.
In the simulation test process, ω 1 , ω 2 , ω 3 and ω 4 in equations are 0.8, 0.3, 0.7, and 0.5, respectively, to take into account both the ability of the system to respond quickly, to be accurate without errors, to have good tracking performance, and to converge quickly. In this engineering test, the smaller the value of the target value J, the better the performance effect of the system is indicated.

Feed-Forward Compensation Control
In order to achieve direct control without hysteresis, improve the response rate of the system, obtain the corresponding increased accuracy to know the controlled object model and system characteristics, the introduction of feed-forward control on the basis of PID control. Feedback control requires deviations to occur before regulation, with hysteresis. A compound control system with input compensation is shown in Figure 4. The G f (s) in Figure 4 is the transfer function of feed-forward compensation, G A (s) and G B (s) are the control objects of servo valve and hydraulic cylinder respectively, and K a and K s are the servo amplifiers. From the figure, it can be seen that the system output is: The errors caused by the system are as follows: The following can be obtained: In order to make the system error zero, E(s) = 0. Suppose E(s) = R(s) = 0, substitution into Equations (10) and (11) yields G f (s) = A p K a K s K sv (a 1 s 5 + a 2 s 4 + a 3 s 3 + a 4 s 2 + a 5 s) in the formula a 1 = 1 ω 2 n ω 2 r , a 2 = 2 ξ n ω n +ξ r ω r ω 2 n ω 2 r a 3 = ω 2 n +4ω n ω r ξ n ξ r +ω 2 r ω 2 n ω 2 r , a 4 = 2 ω n ξ r +ω r ξ n ω r ω n a 5 = 1 The sixth-order system greatly increases the hardware requirements and is not easily implemented at a high cost. Thus, here, the simplification process is performed and the second-order term is retained to achieve compensation for the system. Therefore, the feed-forward compensation function after simplification is Simplifying from the data in Table 1 yields

Hybrid Algorithm for Feed-Forward Compensation and Improved PSO-Optimized PID
In this paper, the FF-PSO-PID algorithm is proposed to control the electro-hydraulic servo system in the real-time hybrid test (RTH), which uses the PSO algorithm to optimize the PID parameters and the feed-forward compensation algorithm to compensate the displacement. As shown in Figure 5, on the basis of the PSO algorithm, to rectify the PID parameters and reduce the system displacement error and response time, feedforward displacement compensation is introduced to reduce the system error through feed-forward compensation of the direct control system, while improving the response speed and reducing the unnecessary system lag phenomenon.

Simulation and Analysis
In this section, the performance of the conventional PID algorithm, PSO-PID, and FF-PSO-PID are compared through three different displacement input signals with the control objective of making the electro-hydraulic servo system respond quickly and track the reference trajectory with satisfactory tracking accuracy.
The electro-hydraulic servo control model is established in Matlab/Simulink with the physical models of servo valve G A , hydraulic cylinder G B and servo amplifiers K a and K s as transfer functions, and the models of servo valve and hydraulic cylinder are encapsulated using Matlab function module, and the specific parameters are shown in Table 1. The parameters of the PSO algorithm are shown in Table 2, and its adaptive degree value is shown in Figure 6, when the optimal value is reached at the 16th iteration, the value is 0.0149. The parameters of the conventional PID and PSO-PID are shown in Table 3.

Parameters Value
Learning factor C 1 2 Learning factor C 2 2 Inertia coefficientω 0.6 Population size m 100 Number of iterations K 30 Particle dimension D 3 Figure 6. Adaptive degree value of the PSO algorithm. A step signal of 110.011 mm is used as the reference trajectory of the electro-hydraulic displacement servo system, and the conventional PID and PSO-PID are compared and analyzed. Modeled in Simulink, the simulation plots of the two control algorithms are shown in Figure 7, Figure 8a shows the input voltage, and the response curves under the step signal are shown in Figure 8b. The error response curves of the two algorithms under the step signal are shown in Figure 9.   From the comparison results in Table 4 and Figures 8 and 9, it can be seen that the response performance of the conventional PID algorithm is poor. The maximum response of the conventional PID control curve is 110.224 mm, the peak time is 0.46 s, and the overshoot is 0.2%, while the maximum response of the PSO-PID control curve is 110.039 mm, the peak time is 0.36 s, and the overshoot is 0.036%, which is 0.164% lower than that of the conventional PID. The regulation time t s of conventional PID is 0.109 s, and the t s of PSO-PID is 0.093 s, which is 0.016 s lower than that of conventional PID, and PSO-PID has to enter the steady-state value earlier than conventional PID. Taking the rise time of the output response from 10% of the target value to 90% of the target value, the rise time t r of the common PID control curve is 0.007 s, while the rise time t r of the PSO-PID control curve is 0.006 s, which shows that the response of PSO-PID is faster than that of the conventional PID. As shown in Figure 10, the error between PSO-PID and the target value is close to 0 after 0.2 s, while the conventional PID takes 0.246 s and has a larger error with the target value. The overshoot of PSO-PID is reduced by 0.164% compared with the conventional PID algorithm, and the peak time is only 0.36 s. The steady-state displacement error of PSO-PID algorithm is reduced by 0.174 mm compared with the conventional PID algorithm. Therefore, it is verified that the performance of PSO-PID is better than the conventional PID and effectively reduces the displacement error, but the improvement in response speed is smaller, as seen by the rise time and peak time performance. The conventional PID, PSO-PID, and FF-PSO-PID are compared and analyzed under sinusoidal and random signals.
A sinusoidal signal with an amplitude of 110.011 mm and a frequency of 0.4 Hz is used as the reference trajectory of the electro-hydraulic displacement servo system, which is modeled in Simulink, and the simulation plots of the three algorithms are shown in Figure 10. The input voltage is shown in Figure 11a for a sinusoidal signal with a voltage value of 10 V, which can be converted by the amplifier to obtain a sine wave with an amplitude of 110.011 mm, and the sinusoidal response curves of the three algorithms are shown in Figure 12a,c,e.  From the response curves, there were significant differences among the three algorithms, with the largest error occurring at the same position of the sinusoidal signal, at the crest or trough, when the hydraulic cylinder was in the reversing phase. Among the three controllers, the maximum error of the traditional PID algorithm is 0.177 mm, and the response is the slowest with a lag of 0.04 s. The error of the PSO-PID algorithm is smaller than that of the traditional PID, and the displacement error is reduced by 0.15 mm. The maximum error and lag time of the FF-PSO-PID algorithm are approximately zero, which is the best performance among the three algorithms, verifying that the FF-PSO-PID algorithm is able to meet the requirements of the control after the feed-forward compensation. It is verified that the FF-PSO-PID algorithm can meet the control requirements after the feed-forward compensation effect.
The stochastic signal is used as the reference trajectory of the electro-hydraulic displacement servo system, and the simulation plots of the three algorithms are shown in Figure 10. Figure 11b shows the input voltage signal, and the random signal response curves of the three algorithms are shown in Figure 12b,d,f.
From the three tracking curves, the FF-PSO-PID algorithm has the fastest response and the highest tracking accuracy. Since the simulation is a random signal, considering the response time, the response delay of FF-PSO-PID algorithm is 0.001 s, while the response time of traditional PID and PSO-PID algorithms are 0.027 s and 0.026 s, respectively. FF-PSO-PID improves the response time by 96.3% and 96.2% compared with the other two algorithms. Considering the maximum tracking error, the FF-PSO-PID algorithm is only 0.1 mm, while the conventional PID and PSO-PID algorithms are 4.456 mm and 3.866 mm, which cannot achieve the tracking accuracy required by the system. The average error of the FF-PSO-PID algorithm is 0.08 mm at the peak or trough of the random signal, while the average errors of the conventional PID and PSO-PID algorithms are 3.967 mm and 3.596 mm. In terms of displacement error, FF-PSO-PID improved by 97.75% and 97.41% compared with the other two algorithms. The superiority of the FF-PSO-PID algorithm was verified, which effectively improved the system tracking performance and reduced the displacement error and response time. The FF-PSO-PID algorithm solves the problem of system response hysteresis.
In order to verify the applicability and effectiveness of the algorithm for different input signals, based on the verification by step signal, sinusoidal signal, and random signal, simulation tests were conducted under the signals such as ramp and triangle wave as in Figure 13, respectively. As shown in Figure 13a, the input signal is a ramp signal with a slope of 0.1, and the tracking error and time hysteresis of the FF-PSO-PID algorithm are close to 0, while the errors of PSO-PID and conventional PID are 0.002 mm and 0.004 mm, and the hysteresis times are 0.024 s and 0.05 s, respectively. As shown in Figure 13c, at the crest of the wave under the triangular wave signal, the tracking error and time lag of FF-PSO-PID algorithm are close to 0. The error and time lag of PSO-PID and conventional PID algorithms are more obvious, the displacement error reaches 0.01 mm and 0.009 mm, and the time lag is 0.028 s and 0.031 s, respectively. In comparison, FF-PSO-PID algorithm has applicability and effectiveness for various input signals. The tracking performance is superior to that of the other two algorithms.

Conclusions
In this paper, to improve the response speed and tracking performance of the real-time hybrid test (RTH) system and to solve the problems of test system response lag and complex input signals, a mathematical model of the servo valve-controlled hydraulic cylinder is developed for the nonlinearity and uncertainty of the electro-hydraulic servo system in the real-time hybrid test (RTH). The FF-PSO-PID algorithm is proposed and simulated under a variety of input signals. The results of the study show that: (1) The conventional PID relies on manual experience requiring a lot of time for debugging, it cannot find the appropriate parameters accurately, and it has the disadvantages of large displacement error and long response time. Therefore, for the application background of a real-time hybrid test, the control algorithm of PSO-PID for improving electro-hydraulic servo system is proposed accordingly. In the experiments, the PSO-PID algorithm effectively reduces the displacement error, but the response speed is not improved much, and the hysteresis problem still exists. (2) In order to improve the tracking performance and response speed of the real-time hybrid test (RTH) system and solve the problems of the system in response lag and complex input signal, displacement feed-forward compensation control is introduced based on the PSO-PID algorithm. Through experimental comparison, the proposed FF-PSO-PID algorithm effectively improves the response speed of the electro-hydraulic servo system, reduces the displacement error, and solves the problem of system response hysteresis. The superior tracking accuracy is obtained under multiple input signals, verifying that the FF-PSO-PID algorithm can work effectively under complex signals. The effectiveness and superiority of the FF-PSO-PID algorithm is verified. It can effectively solve the problems of time lag, large error, and slow response of real-time hybrid tests (RTH).