Semi-physical real-time control of electro-hydraulic proportional position servo system based on Matlab/xPC

: A set of semi-physical simulation system based on real-time working simulation platform tools (Matlab/RTW) was established for electro-hydraulic proportional position servo system in the development of missile weapons and other equipment. The system is mainly composed of hydraulic system consisting of hydraulic actuators and Simulink simulation model. It is a closed-loop real-time simulation system of physical equipment in the loop. The simulation and experiment of proportional servo control system show that the system has high simulation real-time performance, the positioning accuracy and control stability. Two controllers are designed for different application conditions, which can obtain the good practicality and feasibility.


Introduction
Electro-hydraulic systems are widely used in many industrial and mobile applications, missile weapon system, robot manipulators [1], hydraulic excavators [2], and tunnel boring machines [3] because of their high power-to-weight ratio compared with electric drives [4,5]. However, the dynamic behaviours of electrohydraulic servo systems suffer from strong non-linearities, such as square-root relationship between pressure and flow, temperature and pressure depending on oil properties and friction. Therefore, it is of great significance to study the effective control of electrohydraulic systems.
Semi-physical simulation is to connect the actual device to the simulation system to form a closed loop, to reflect the actual situation as much as possible, and actually test the sensors, controllers etc. Therefore, in order to effectively verify the performance index of the electro-hydraulic proportional servo control system of missile weapon equipment, control the development of test risk, and reduce the development cost, the use of semi-physical simulation means for pre-testing is an effective verification approach [6].
Zhejiang University successfully developed a computer test bench for testing hydraulic components in China in 2001 [7]. When the Beijing Institute of Machinery Industry Automation carried out computer-aided test system research, it chose to cooperate with Yanshan University to complete the development of the system [8]. The hydraulic comprehensive test system incorporates microcomputer technology, and each test process can be controlled. The test program written by Labview is used. Xi'an Research Institute of High Technology and Lanzhou University of Technology jointly developed an electro-hydraulic proportional component performance test system and established a set of computer-aided testing system [9] consisting of industrial computer, CompactRIO controller, PLC programmable controller, data acquisition system, and Labview virtual instrument.
As Matlab has the characteristics of numerical calculation, visual modelling, and easy programming, it has become the main tool for carrying out simulation research on electro-hydraulic control and high-speed drone modelling of unmanned aerial vehicles [10]. RTW in Matlab is an important function module of graphical modelling and simulation environment. It is a set of visual code automatic generation environment based on Simulink, which can generate optimised, portable, and personalised code directly from the Simulink model. For this reason, based on the composition and working principle of the electro-hydraulic proportional position servo system to verify the effectiveness of the designed controller, which lays a solid foundation for the follow-up missile weapon ground equipment hydraulic system control.

Composition of simulation system
Real-time control semi-physical simulation system of electrohydraulic proportional position servo (valve-controlled hydraulic cylinder) uses Matlab RTW's 'dual-machine' mode with host-target machine. The host computer is a simulation control computer used to establish Simulink model and can be used for adjusting simulation parameters, which can complete the real-time collection, storage, and visualisation of simulation data; target machine runs the 32-bit protection mode by loading the real-time kernel, and achieves communication between the host and the target through the Ethernet connection, and the hardware is in the ring. The structure of the semi-physical simulation system is shown in Fig. 1.
The system is mainly composed of the simulation control computer, the target industrial control machine, a hydraulic oil source, the electro-hydraulic proportional directional valve, the servo hydraulic cylinder, the load, the pull-wire type sensor, and the pressure sensor. Among them, the simulation control computer is mainly used in the construction of dynamic model of electrohydraulic proportional position servo system, dynamic adjustment of control parameters and data record display; the target industrial computer is used as xPC target machine to load real-time simulation application program to control the hydraulic cylinder's movement, collecting hydraulic system output signal; the controller

Mathematical modelling
The electro-hydraulic proportional system principle is shown in Fig. 3. The control goal is to make the cylinder rod to track any smooth motion trajectory as closely as possible.
The control system mainly uses the valve-controlled cylinder as the actuator. A proportional directional valve is used to control the system displacement. The mathematical model of the valvecontrolled cylinder, the electro-hydraulic proportional directional valve, and the various amplifiers is mainly performed.

Valve-controlled cylinder
Set the hydraulic cylinder control chamber area to A, the cylinder piston displacement to y 0 , and the load pressure can be expressed as The throttling equation is as follows: where C d represents flow coefficient; w is the spool area gradient; x the main valve spool displacement; ρ denotes oil density; P S is source pressure, in P a .
In this system, the load flow is defined as follows: Traffic gain is Flow-pressure factor is Therefore, the linearised equation is obtained The load flow can be expressed as where c t is the hydraulic cylinder total leakage coefficient; V t denotes the total compression volume; β e is the system effective volumetric elastic modulus. The thrust of the hydraulic system overcomes the viscous resistance and the external load to move the piston of the hydraulic cylinder. The load pressure can be expressed simply as where m is piston and load converted to the total mass on the piston; B C the viscosity and piston load and damping coefficient; F the outer load.
As the system uses a ball slideway between the load weight carriage and the track, the form of friction is rolling friction. Therefore, the frictional effect is negligible. Therefore, the external load is mainly embodied in the movement of the hydraulic cylinder and the load spring compression or elongation to affect the system where k is the spring stiffness in units of N/m. Laplace transformation is performed for (6)-(8). As the system does not add damping cylinder, and the viscous damping coefficient is relatively small, it can ignore the piston and the load of the viscous damping coefficient, it can be obtained as follows: where k t denotes total flow-pressure coefficient; ω h is the hydraulic natural frequency; ξ h the hydraulic system damping ratio. Therefore, the hydraulic cylinder transfer function can be expressed as follows: The external load effect can be expressed as Rewrite this transfer function as a differential equation as follows:

Proportional amplifier
The voltage signal from the IPC is sensitive, which is converted into current signal and input to the proportional solenoid where i denotes the proportional amplifier output current; U is the voltage signal from industrial computer; K p1 the proportional amplifier coefficient.

Electro-hydraulic proportional directional valve
Electro-hydraulic proportional directional valve mainly consists of proportional solenoid, pilot valve, and main valve. The proportional solenoid in the reversing valve acts as an electro-mechanical conversion element for converting the received current signal into a force that pushes the movement of the pilot valve spool. The steady-state characteristics of the proportional electromagnet have good linearity, so its model can be expressed as where F m denotes thrust force acting on the spool of the pilot valve; K p2 is the current-force factor of the proportional solenoid.
Considering the influencing factors such as hydraulic pressure and hydraulic power, combined with the action of springs, viscous damping, feedback levers etc. of the pilot valve, the force balance equation on the pilot valve can be expressed as follows: where m 1 is the pilot valve core weight; y 1 denotes pilot valve core movement distance; c y1 is the pilot valve viscous damping coefficient; k y1s the pilot valve equivalent spring rate, including translation spring and feedback spring; y 1s the pre-pioneer spring preload compression amount; F ff the push on the feedback lever; F ff = K fR x, K fR is the force feedback coefficient; F y1 is the hydraulic force at the pilot valve outlet and the sum of the spool Coulomb force, and this value is extremely small. The incremental flow rate of the pilot valve is as follows: The pressure increment equation of the pilot valve is as follows: The difference in pressure acting on both sides of the main valve after passing through the pilot valve is where △p x denotes the pressure difference in the control chamber on both sides of the main valve; K p3 is the pressure gain of the fluid bridge in the pilot valve. Therefore, the output force of the pilot valve is where A c is main valve control cavity area. Similar to the pilot valve, considering the influencing factors, the main valve component force balance equation is as follows: where m 2 is the main valve spool weight; x the main valve spool displacement; c x the main valve spool viscous damping coefficient; k xs denotes main valve equivalent spring rate; x s0 the main valve spring pre-compression amount; F fx the hydraulic force of the oil circuit on the main valve spool; F x the sum of the hydraulic force at the outlet of the main valve and the Coulomb force on the spool, which is extremely small.

Feedback amplifier
The system uses the displacement sensor to collect the feedback signal. The feedback amplifier coefficient is set as K R , the input x v is the displacement of the hydraulic cylinder, and the output is the voltage U f The parameters of the system are shown in Table 1.
During the modelling, mathematical models of the doubleacting double-outlet valve control cylinder, the proportional amplifier, the electro-hydraulic proportional directional valve, and the feedback amplifier were separately performed. The system conditions were fully considered and various parameters were given for subsequent control simulation and the following experiment.

Simulation analysis
According to the above mathematical model establishment process, the Simulink module in Matlab is used to construct and debug the simulation system, and the common dynamic PID controller is used to adjust the system dynamic performance, so that the system operation tends to be stable. Among them, the load is set to inertial load. Electro-hydraulic proportional servo control system simulation block diagram is shown in Fig. 4.
Taking the step signal as the target signal, the step amount is 45 mm, the PID controller parameters are k p = 6.43, k i = 0.294, k d = 0.028, and the system response obtained is shown in Fig. 5a. When the sinusoidal signal is used as the target signal, the PID controller parameters k p = 6.43, k i = 0.294, k d = 0.028, and the system response is shown in Fig. 5b.
From the simulation results in Fig. 5, it can be seen that the PID controller can make the system to reach stability in a short time and the static error is small, which provides strong support for the next PID control test.

Pure inertial load:
According to the simulation results, reference is made to the simulation PID parameters to make appropriate adjustments to optimise the system lag, response speed, tracking effect, and process stability. Work pressure: 4 MPa, with inertial load. Track step signal, step amount is 57 mm. The PID parameters are k p = 6.231, k i = 0.294, k d = 0.011. The experimental curve is shown in Fig. 6.
It can be seen from Fig. 6 that the system has a better step response curve and a faster response speed. The tracking time is ∼0.3 s, but there is still a 0.1 s hysteresis.
Similarly, the working pressure is set to 4 MPa with inertial load. A sinusoidal signal with a range of (3-57) mm was tracked. The PID parameters were k p = 6.231, k i = 0.294, and k d = 0.011. The experimental curve is shown in Fig. 7.
From the above figure, after adding the traditional PID controller, the accuracy of system position response is relatively high, and the motion can be performed according to input signal, and the control effect is relatively good, but there is still a lag of 0.1 s, and the system error is ∼10 mm, with large fluctuations, significant vibration. Therefore, in the occasion with high positioning requirements, step signal input can be used, the system response is fast, the control accuracy is high, and it can be stabilised at the designated position, but there is hysteresis; when the system is required to reciprocate, the sine signal input is used. Will do reciprocating motion, the control effect is better, but the control process fluctuation is obvious, and there is hysteresis.

Compound load:
Based on inertial load, the system increases elastic load and adjusts the working pressure of the hydraulic power station to 7 MPa. The tracking step signal has a displacement of 54 mm. The PID parameters are k p = 6.687, k i = 0.258, and k d = 0.004. The experimental results are shown in Fig. 8.
As can be seen from the figure, after the elastic load is added, the good results with the PID controller are obtained in terms of hysteresis, response speed, and response error. The difference of this effect is not large when compared with the pure inertial load, but the controllable displacement range of the system is reduced when the step signal is input, and there is an impact phenomenon near the specified position. The sinusoidal signal is used as the target signal, and the experimental results can also obtain the same result. The curve is shown in Fig. 9.
Therefore, it can be seen that the inertial load plus elastic load has a significant effect on the system control effect. Compared with the pure inertial load, the most significant feature is the exacerbation of the step change shock and the decrease in the system stability. For this reason, there is a shortage of ordinary PID in places where the stability is required to be high, and the control method needs to be improved.

Incremental PID control principle
Under the traditional PID control algorithm, the control accuracy of the system is high, but in the continuous position control process, the system vibration is obvious. To eliminate this effect, an incremental PID controller is designed to optimise the motion process stability. Incremental PID control is a type of digital PID control. Its characteristic is that the output is just the increment △u(k) of the control quantity u(k). The formula can be expressed as follows: Laplace transformation is performed for (22); its transfer function can be expressed as follows: According to the above transfer function, the design of the incremental PID controller is shown in Fig. 10. Working pressure is set to 4 MPa with inertial and elastic loads. The displacement range of the sine signal is 3-57 mm, the PID parameter is k p = 7.97, k i = 0.004, k d = 4.69. The experimental curve is shown in Fig. 11. Comparing Figs. 9 and 11, it can be found that the incremental PID controller can effectively reduce the impact of switching, and can achieve the smooth switching, but its control accuracy is worse than the traditional PID controller, and the error reaches ∼30 mm. Therefore, an incremental PID controller can be used for a system that requires continuous control process stabilisation, and a conventional PID controller can be used for systems that require precise control of the motion position.

Conclusion
Based on Matlab/xPC, a real-time simulation platform was built to access equipment such as hydraulic cylinders, pressure, and position sensors for missile weapons and other equipment. The semi-physical real-time simulation was carried out by using the electro-hydraulic proportional position servo control platform.
After the actual use and test verification, the simulation verifies that the real-time performance and simulation fidelity of the platform can meet actual needs. Meanwhile, combining the advantages of visual modelling, it provides powerful support for further research on the electro-hydraulic proportional position servo control model.

Acknowledgment
This work was supported by the Shanxi Young Talent Lifting Plan Foundation (no. 20170512).