## 5 Conclusions  
A method for the nonlinear characterization of a mmW PIN diode has been proposed. It is based on X-parameters measurements obtained using a test set composed of a nonlinear network analyzer, a one-port on-wafer probe station and a CPW test fixture. The proposed method has been applied to characterize a commercial PIN diode commonly used in reconfigurable antenna applications spanning a frequency range from 1 to 48 GHz. The measured X parameters have been validated by good agreement obtained between the harmonic rejection derived from X parameters to independent harmonic measurements, as well as from measurements in the small signal regime, where nonlinear X-parameters converge to measured S parameters. The X parameters model is used to assess the possible nonlinearities on a reconfigurable antenna, showing consistency with experimental results. Guidelines for the design of Reconfigurable Antennas in general and particular application to Parasitic Layers have been presented accounting for a new performance metric related to the power efficiency and possible emergence of nonlinearities. Optimum tradeoffs for the separation of the basic antenna and a reconfigurable parasitic layer to attaining particular objectives related to port match, nonlinearity, and beam-steering have been discussed. A complete methodology for the design of minimum nonlinearity reconfigurable antennas has been presented, accounting also for port match and beam-steering. The methodology is based on (i) Determining the optimal PL distance to the basic antenna. (ii) Determine the optimum switch configurations. (iii) Based on nonlinear load models, accurately calculate the nonlinearities and system-related parameters only for the optimum configurations. A design example of a parasitic-layer-based reconfigurable-antenna suitable for 5G NR communications in the 3.5 GHz band, from the port match, beam-steering and nonlinear distortion is presented. The particular antenna design is a suitable alternative for 5G-NR EMB usage scenarios in the 3.5 GHz band, bearing 2 ports with a 11% bandwidth, 9 beams pointing in \((\theta_{0},\phi_{0})=\{(0^{\circ},0^{\circ})\), and \(\{(40^{\circ},\{0^{\circ},45^{\circ},90^{\circ},135^{\circ},180^{\circ},225^{ \circ},270^{\circ},315^{\circ})\})\}\}\), and an average realized gain of 6.1 dB. The whole structure fits within a compact size of \(0.76\times 0.87\times 0.1\) wavelengths. The presented antenna has an average Error Vector Magnitude (EVM) of 4% at an input power of 35 dBm. With the application of this new design methodology an improvement of 12 and 6 dB of the EVM and power efficiency, respectively, were obtained when compared with conventional reconfigurable antenna design strategies. Conceptualization, All authors; methodology, All authors; software, G.A.R.A., J.L.A.Q. and L.P.; validation, L.P., A.B., J.L.A.Q., B.A.C. and L.J.-R.; formal analysis, G.A.R.A., A.B. and L.P.; investigation, All authors; resources, L.P., A.B., B.A.C. ; data curation, G.A.R.A. ; writing--original draft preparation, G.A.R.A. ; writing--review and editing, All authors; visualization, G.A.R.A. ; supervision, L.J.-R.; project administration, L.J.-R.; funding acquisition, L.J.-R. All authors have read and agreed to the published version of the manuscript. This research was supported by the Spanish \"Comision Interministerial de Ciencia y Tecnologia\" (CICYT) under projects TEC2013-47360-C3-1-P/ AEI/10.13039/501100011033, TEC2016-78028-C3-1-P/ AEI/10.13039/501100011033, and MDM2016-O6 OO, and Catalan Research Group 2017 SGR 219, and by the Colombian \"Departamento Administrativo de Ciencia, Tecnologia e Innovacion\" (Colicencias) through convocatoria 727 de 2015. The datasets generated during the current study are available from the corresponding authors on reasonable request. To the technical staff of the AntennaLAB for their manufacturing and assembling of prototypes. Conflicts of Interest: The authors declare no conflict of interest.