## 4 Conclusions  
In this paper, a new general near-field (NF) multi-frequency optimization technique has been presented. It relies on the proper definition of the magnitude and phase figures of merit (FoM) to be optimized in the region of interest. By employing a full-wave technique based on local periodicity, the full electromagnetic response of the reflectarray unit cell is obtained at a number of frequencies where the NF and the associated FoM are calculated. Then, by applying an iterative multi-stage procedure based on the Levenberg-Marquardt algorithm, a direct layout optimization is carried out. This procedure was applied to obtain a reflectarray that acts as a plane-wave generator for a compact antenna test range within the 5G FR n257 band. Typical plane-wave specifications of a maximum magnitude \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{4}{c}{**Compliance (\%)**} & \multicolumn{4}{c}{**Ripple**} \\ \cline{2-9}
**Frequency (GHz)** & \multicolumn{2}{c}{**Pol. X**} & \multicolumn{2}{c}{**Pol. Y**} & \multicolumn{2}{c}{**Pol. X**} & \multicolumn{2}{c}{**Pol. Y**} \\ \cline{2-9}  & **Mag.** & **Phase** & **Mag.** & **Phase** & **Mag. (dB)** & **Phase (*)** & **Mag. (dB)** & **Phase (*)** \\ \hline
27 GHz & 97.16 & 96.53 & 100 & 94.01 & 1.19 & 11.31 & 0.94 & 11.63 \\
28 GHz & 90.85 & 99.68 & 91.17 & 96.53 & 1.39 & 10.19 & 1.35 & 10.94 \\
29 GHz & 66.88 & 94.01 & 63.41 & 92.43 & 1.93 & 11.18 & 2.48 & 11.46 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Performance of the reflectarray after wideband multi-frequency optimization at a plane 0.5 m away from the antenna employing a multi-frequency version of the technique used in [28] with specifications imposed by upper and lower templates. Compliance (%) indicates percentage of surface in \(\Omega_{1}\) that complies with specifications. ripple of 1 dB and a phase ripple of 10\({}^{\circ}\) were imposed. The optimized reflectarray fully complies with the imposed requirements in a frequency range between 27 GHz and 29 GHz, corresponding to a relative bandwidth of 7.14%. Compared with other techniques described in the literature for the NF-beam-shaping of spatially fed arrays, the proposed technique is able to carry out a general NF multi-frequency optimization, while other techniques only perform the synthesis at a single frequency. In addition, due to the direct optimization of the relevant FoM instead of relying on the use of upper and lower templates, better results are achieved in fewer iterations, demonstrating superior computational performance. Moreover, the memory footprint is also greatly reduced compared with other techniques described in the literature. This work was supported in part by the Ministerio de Ciencia, Innovacion y Universidades under project IJC2018-035696-I; by the Ministerio de Ciencia e Innovacion and the Agencia Estatal de Investigacion within project ENHANCE-5G (PID2020-114172 RB-C21/AEI/10.13039/501100011033); by Gobiermo del Principado de Asturias under project AYUD/2021/51706. Not applicable. The author would like to thank [PERSON], [PERSON] and [PERSON] for providing the MoM-LP software. The author has received permission to use the MoM-LP software to obtain the results shown in this research article.