## 4 Experiment  
In the experiment, we load the calculated 256-step phase distribution on an LCoS (liquid crystal on silicon) as a DOE. The parameters in the calculation and experiment are shown in Table 2. The target intensity pattern is a rectangle with a size of \(282\times 150\), as shown in Figure 3. In order to reduce the influence of the zero-order light on the experimental results, we use a lens to converge the zero-order light in the center, while placing the rectangle in the upper left corner to be far away from the zero-order light; this requires the use of the Fraunhofer diffraction equation to calculate the target plane light intensity distribution. Two 256-step phase distributions of the DOE are calculated by the GS algorithm and the SA-PSO hybrid algorithms, and then the simulated Fraunhofer diffraction results on the target plane are shown in Figure 4a,b, respectively. The calculation by the GS algorithm takes 20 s, and the one by the SA-PSO takes 1 h. The cost function values of the diffracted pattern in Figure 4a,b are 100.33 and 89.71, respectively, so the relative reduction by the SA-PSO algorithm is 10.59%. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline The size of the LCoS & 8.64 mm \\ Diffraction distance & 300 mm \\ Sampling points & \(1080\times 1080\) \\ Wavelength & 632 nm \\ \(C_{1}\), \(C_{2}\) & 1.6, 1.9 \\ \(\alpha\), \(\beta\) & \(5\times 10^{5}\), 1 \\ \(\omega\) & 0.9 \\ \(T_{s}\) & \(10^{-4}\) \\ \(T_{f}\) & \(10^{-7}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters in simulation. Figure 4: The simulated diffraction results of the diffractive optical elements (DOEs) designed by (**a**) the GS algorithm and (**b**) the SA–PSO algorithm. Figure 3: The target pattern. We also compared the convergence speed of the SA-PSO algorithm and SA algorithm. It can be seen from Figure 1 that, at each synthetic temperature, the particle swarm search is performed first, and then the optimal solution is used as the initial value to perform 100 simulated annealing searches, and finally the search at this synthetic temperature ends. Therefore, after removing the particle swarm search process, the simulated annealing process is obtained. Both the two algorithms start the search from the same initial value (obtained by the GS algorithm). In both the SA and SA-PSO algorithms, at a synthetic temperature, we record the cost function value when the simulated annealing process begins. The entire simulated annealing process experiences 31 synthetic temperatures. Each of the two algorithms is performed five times. The changes of the cost function values during the searching processes in the SA-PSO and the SA algorithm are shown in Figure 5,b, respectively. The initial cost function value is 99.93, and this value becomes 94.93 and 89.94 by a reduction of 5% and 10%, respectively. In order to compare the convergence speed of the two algorithms, the y = 94.93 and y = 89.94 lines are used as the baseline. In each figure, we pick out the curve with the fastest convergence speed and marked the data points that just passed the baseline. It can be calculated that the calculation numbers, to achieve a reduction of 5%, reduce by 29.7% with the SA-PSO algorithm,  
Figure 5: The convergence process of the SA–PSO hybrid algorithm (**a**) and the simulated annealing (**SA**) algorithm (**b**). and that value for a 10% reduction is even larger. Therefore, the convergence speed of the SA-PSO is faster, and the final cost function value of the SA-PSO is also smaller than SA. However, because the SA-PSO algorithm has an extra particle swarm search process than the SA algorithm, its program running time is longer than the SA algorithm. The program running times of the SA-PSO and the SA algorithms are 1 h and 15 min, respectively. The schematic of the experimental setup is shown in Figure 6. A Holoeye Pluto 2 NIR-11 LCoS is employed to load the DOEs designed by the GS algorithm and the SA-PSO algorithm.