3.4.1. UDF Implementation Logic

During the deflection of the flapper, the displacement of the main valve core will occur with the offset of the flapper. The interface between the valve core and the oil is the moving surface, and the moving distance should be linear with the displacement of the flapper. The moving surface is shown in Figure 18. In order to realize the above moving process, the mathematical model of the main spool motion should be written first.

The main valve mainly plays the role of a power amplifier. The main working process is to move to the side with weak pressure under the pressure difference between the two sides of the pilot valve, so as to realize the opening and closing of the working oil port and realize the function of promoting load movement. In the whole movement process, the main valve is an inlet throttle, which is mainly affected by the steady-state hydrodynamic force, transient hydrodynamic force of opening and closing the working oil outlet, and oil resistance and pressure on both sides of the valve core. Therefore, there is a feedback rod, so there is a feedback force acted by the feedback rod. Its formula is as follows:

$$m\frac{d^2\mathbf{x}(t)}{dt^2} + \mathbf{C}\_f \frac{d\mathbf{x}(t)}{dt} + F\_{Rt} - F\_{Rs} + F\_f = \mathbf{A}(p\_1 - p\_2) = \mathbf{A}\Delta p(t) \tag{1}$$

where *FRt* is a transient hydrodynamic force, *FRs* is a steady hydrodynamic force, and *Ff* is a feedback force exerted by the feedback rod. Its expressions are shown below and Table 5 shows the meaning and value of each parameter.

$$F\_{Rt} = C\_{q1} w L\_3 \sqrt{2 \rho p\_v} \frac{d\mathbf{x}}{dt} \tag{2}$$

$$F\_{Rs} = -2C\_{q1}C\_{v}upp\_{v} \propto \cos\theta \tag{3}$$

$$F\_f = (r+b)k\_f x \tag{4}$$

#### **Table 5.** Parameters for mathematical modeling of servo valves.


By substituting the above formulas and the values of each parameter into Equation (1), the following results are obtained:

$$\frac{d^2x(t)}{dt^2} + 3010\frac{dx(t)}{dt} + 3,566,600x(t) = 3.14 \times 10^{-4} \Delta p(t) \tag{5}$$

Let *u* = *dx*/*dt*, after Laplacian transformation, obtaining:

$$
\Delta I(s)s + 3010lI(s) + 3,566,600 \frac{lI(s)}{s} = 3.14 \times 10^{-4} \Delta P(s) \tag{6}
$$

$$\frac{\Delta l(s)}{\Delta P(s)} = \frac{3.14 \times 10^{-4} \text{s}}{s^2 + 3010 \text{s} + 35,666,000} \tag{7}$$

So the velocity curve of the spool in the time domain is:

$$
\Delta u(t) = 3.14 \times 10^{-4} e^{-1505t} \sin(5779t + 1.32) \Delta p(t) \tag{8}
$$

Then, the UDF logic block diagram is written as follows in Figure 18:

**Figure 18.** Execution logic block diagram of UDF program (the symbol T means time, and the value 0.012 is the time of the moving grid motion).
