## 4 Steady Flow Force Compensation Optimization
### Optimization of Compensation Structure Parameters  
The steady flow force optimization design for the spool of a slide valve involves multiple objectives and constraints. The mathematical model for this optimization can be expressed as follows:  
\[\text{min}\underset{i}{\sum}\frac{W_{i}}{SF_{i}}\times F_{i}(X),i=1,2,\dots, n_{obj} \tag{13}\]  
\[\left(h_{j}(X)-\text{Target}\right)\times\frac{W_{j}}{SF_{j}}=0,\ j=1,2,\dots, n_{con} \tag{14}\]  
where \(F_{i}(X)\) represents the \(i\)-th objective function, \(h_{j}(X)\) denotes the \(j\)-th constraint function, and \(X=[\theta_{1},\theta_{2},d_{1}]\) is the vector of design variables. \(SF\) is the scaling factor, with a default value of 1.0, and \(W\) is the weighting factor, also set to 1.0 by default. Objective function: in the optimization process, the magnitude of the steady flow force serves as a direct indicator of the superiority of the compensation structure. Design variables: the primary parameters involved in the optimization include the cone angle of the guiding shoulder \(\theta_{1}\), the cone angle of the throttling shoulder \(\theta_{2}\), and the diameter of the stem \(d_{1}\), as illustrated in Figure 22. To highlight the advantages of the optimization of the superimposed inner ring cavity over the conventional convex shoulder optimization, two optimization schemes were performed: one involving \(\theta_{1}\) and \(\theta_{2}\) and the other involving \(\theta_{1}\), \(\theta_{2}\), and \(d_{1}\). Figure 21: Jet angle and flow rate at unthrottled valve port before and after compensation. Figure 20: Compensating effect of three shoulder structures on steady flow force. Constraints: the compensation for steady flow force must not come at the expense of a reduced flow rate. Constraints on the structural parameters are determined based on the geometric interference relationships of the slide valve and the results of the flow field analysis: \(10^{\circ}<\theta_{1}<35^{\circ}\), \(1^{\circ}<\theta_{2}<15^{\circ}\), and \(10\) mm \(<d_{1}<13\) mm. The initial values of \(\theta_{1}\), \(\theta_{2}\), and \(d_{1}\) are \(21^{\circ}\), \(10^{\circ}\), and \(12\) mm, respectively. This paper implements the automatic optimization of flow force compensation structure parameters based on CFD and parametric optimization techniques. The iSIGHT platform is utilized to integrate the flow field simulation software Fluent 17.0, the 3D modeling software ProE 5.0, and the mesh generation software Gambit 2.4, coordinating the processes of 3D dimension design, mesh generation, and flow field analysis. Built-in optimization algorithms are employed to optimize structural parameters, and the automated optimization process is illustrated in Figure 23.  
Two optimization algorithms are selected: Sequential Quadratic Programming (SQP) and the Multi-Island Genetic Algorithm (MIGA). The SQP method utilizes the gradient of the objective function for optimization, which enhances efficiency and classifies it as a numerical optimization algorithm. The MIGA is a global exploration optimization algorithm that demonstrates good adaptability for discrete problems, although it requires a larger number of iterations to achieve convergence. Figure 24 illustrates the relationship curves between the objective function and design variables under two-parameter optimization. In both optimization algorithms, the relationship between the angle of the guiding convex shoulder and steady flow force appears nearly linear, while the angle of the throttling shoulder does not exhibit a clear relationship with steady flow force. Thus, variable \(\theta_{1}\) is identified as the primary factor influencing hydraulic dynamics. Table 1 presents the results of the two-parameter structural optimization, indicating that the maximum error in the steady flow force obtained from both optimization algorithms is 8%. Figure 23: Automatic optimization of structural parameters for flow force compensation. Figure 22: Parameters of the compensation structure.