# Improving Performance of a Resonant String-Based Pulsation Attenuator in Hydraulic Systems
## 3 Adaptive Particle Swarm Optimization (PSO) Algorithm
### Numerical Test of Adaptive Particle Swarm Optimization (APSO)  
The APSO algorithm is tested using two benchmark functions and compared with the conventional PSO (CPSO) algorithm and an improved PSO (IPSO) algorithm proposed in [20]. The IPSO was proposed for identifying the model parameters with different order of magnitudes. The geometry size of the expansion chamber and strings absolutely have a different order of magnitude. First, two benchmark functions are given as follows [19]:  
Figure 4: Flow chart of the adaptive particle swarm optimization (APSO) algorithm.  
* Six-hump camel-back function \[F_{1}(x)=\sum_{i=1}^{D}{(x_{i}\sin(\sqrt{|x_{i}|}))}.\] (22)
* Ackley function \[F_{2}(x)=-20\exp\left(-0.2\sqrt{\frac{1}{10}{\sum_{i=1}^{2}{x_{i}^{2}}}}\right) -\exp\left(\frac{1}{10}\sqrt{\sum_{i=1}^{2}{\cos(2\pi x_{i})}}\right)+20+e.\] (23)  
Schwefel and Ackley functions have one narrow global optimum and many shallow local optima. The global optimum of two benchmark functions and its corresponding variable values are given in Table 1. Note that the global optimum of two functions are both minimal values of the functions under given search ranges.  
Table 2 demonstrates the fundamental parameters used in APSO. The constant \(c_{1}\) and \(c_{2}\) are chosen to be 2, which proves to have performed well in many works in the literature [21]. The number of particles, the lower bound of particle number and the parameter \(W\) are empirically determined according to our repeated tests, which aim to improve the computational efficiency and simultaneously keep acceptable solution accuracy.  
Figure 5a demonstrates the variation process of OFV of the Six-Hump Camel-Back function. It is observed that although the conventional PSO algorithm has the best evolution speed at the most steps of iteration, APSO can still catch up with the OFV of CPSO when the iteration step is near 200. This result indicates that even if the number of particles is reduced, it would not affect the search ability of the APSO algorithm obviously. The search speed of the IPSO algorithm is lower than both CPSO and APSO because the algorithm focuses on global search ability to avoid missing the possible solution in complicated optimization problems. However, for common geometry parameter optimization, its computational efficiency is not satisfactory. The test results using the Ackley function (Figure 5b) are similar to that of Six-Hump Camel-Back function.  
Table 3 shows the average function calls for 10 repeated runs. Here, the function call refers to the process to analyze each particle's OFV during iteration. The test result shows that the APSO algorithm uses the least function calls in the benchmark function-based tests. More specifically, the APSO algorithm reduces the function calls by 20.6% and 65.0% compared to CPSO and IPSO, respectively, when using _Six-Hump Camel-Back_ function. In the test using the _Ackley_ function, the APSO algorithm reduces the function calls by 14.3% and 27.6% compared to the CPSO and IPSO algorithms. These results satisfy the OFV results given in Figure 5 and also meet the design objective of APSO.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \(F\) & **Name** & \(X^{*}\) & \(F(X^{*})\) & **Search Range** \\ \hline \multirow{2}{*}{\(F_{1}\)} & Six-Hump & \multirow{2}{*}{\([-0.0898,0.7126]\)} & \multirow{2}{*}{\(-1.0316\)} & \multirow{2}{*}{\([-50,50]\)} \\  & Camel-Back & & & \\ \hline \(F_{2}\) & Ackley & \([0,0]\) & \(0\) & \([-50,50]\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Fundamental information of the benchmark functions.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Parameter** & \(c_{1}\) & \(c_{2}\) & \(W\) & \(N\) & \(N_{\text{min}}\) \\ \hline Value & 2 & 2 & 3 & 20 & 10 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Fundamental parameters for APSO.