# A Polygonal Model to Design and Fabricate Ion-Exchanged Diffraction Gratings
## 3 Characterization of the Two Dimensional Ion-Exchange Process by the Polygonal Model
We did the minimization task by using the function fmincon of the software Octave [15]. This minimization was made in two passes. In the first one, we let the four parameters vary freely, except for \(w\), which we constrained to values close to the real opening width (\(w=10\pm 1.5\)\(\upmu\)m). After this, several findings can be highlighted. First, all three minima of the RMSs were under 0.05%, which confirms the validity of the model. Second, \(w\) varied approximately between 8.5 and 10 \(\upmu\)m. Third, a good linear relationship was observed between \(s\) and \(\Delta\varphi_{0}\) and \(\sqrt{t}\). This behavior was expected because the penetration depth in ion-exchange processes, as well as the phase steps that ion-exchange yields depend linearly on the square root of time [14]. Finally, the dependence between \(\delta\) and \(\sqrt{t}\) was not clearly linear. However, it is reasonable to guess a linear dependence between these two magnitudes because \(\delta\) is a part of the maximum phase step (\(2\Delta\varphi_{0}+\delta\)), and this should depend linearly on \(\sqrt{t}\), at least for short times. Moreover, we checked that the minima of the RMSs were not too sensitive to changes in \(\delta\). With this in mind, we did a second minimization pass where the values of \(\delta\) were constrained to the best linear fit obtained in the first pass \(\pm\)10%, and \(w\) was fixed to the average of the three values resulting from this first fit, that is 9.1 \(\upmu\)m. Note that this value of the opening width is remarkably different from the real value (10 \(\upmu\)m) of the fabricated mask. This is a consequence of the coarse approximation of the phase profile that we obtained with the polygonal model. After the second minimization pass, the three minima of the RMSs were under 0.08%, and we obtained the linear dependencies shown in Figure 4.  
This figure confirms the linear dependencies already observed in the first pass. However, a closer examination reveals a slight departure from the linearity of \(\Delta\varphi_{0}\) and \(\delta\). This is a consequence of the saturation of the in-depth diffusion of ions for long times. Anyway, as we will see in the next section, it did not have any apparent impact on the design and  
Figure 4: Data points of the polygonal model that best predicted the experimental efficiencies of the three gratings fabricated to characterize the ion-exchange process; the lines of the best fit as functions of the square root of the ion-exchange time are also plotted. The parameter \(w\) was fixed to 9.1 \(\upmu\)m.  
fabrication of, at least, the two elements that we made. On the other hand, we checked that the inclusion of more than three gratings in the above characterization did not change the quality of the fits or the predictions. Now, if we insert in Equation (7) the linear equations shown in this figure, only the ion-exchange time remains as the independent variable. Therefore, we can represent the efficiencies of the diffraction orders (Equation (8)) as functions of \(\sqrt{t}\) (see Figure 5). This figure includes the efficiencies of the three gratings used in the characterization process, as well as those of the two grating elements that we designed and fabricated using such a characterization, as we will see in the next section.