# Comparative Analysis of the Methods for Fiber Bragg Structures Spectrum Modeling
## 3 Results and Discussion
### Results of Homogeneous FBG Modeling  
An important note should be made regarding the choice of the partitioning interval used in the Layer Sweep method, since the modeling results using the LS method may significantly vary \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **Value** \\ \hline Grating length \(H\), m & \(6\times 10^{-3}\) \\ Refractive index of the fiber \(n_{0}\), RIU & \(1.4682\) \\ Induced refractive index \(\Delta n\), RIU & \(2\times 10^{-4}\) \\ Grating period \(\Lambda\), m & \(5.278213\times 10^{-7}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Modeling parameters of the homogeneous non-apodized FBG. depending on the chosen partition interval. In order to establish the optimal interval, the following approach can be taken. A decreasing sequence of partition intervals \(\{\Delta z_{n}\}\) is assigned so that  
\[\Delta z_{n}=\frac{1}{2^{n}}\Delta z_{0}\;. \tag{27}\]  
We require that two spectra obtained with different partition intervals \(\Delta z_{n}\) and \(\Delta z_{n+1}\) differ from each other by an amount not exceeding a small arbitrary pre-defined value \(\epsilon\). The spectrum obtained with the partition interval \(\Delta z_{n}\) is denoted as a function depending on the wavelength and the partition interval \(\Phi(\lambda,\Delta z_{n})\). Then, there is an integer number \(N\) such that for all \(n\) greater than \(N\), and for any partition \(\{\lambda\}\) of an arbitrary interval \([\lambda_{\rm Br}-\Delta\lambda,\lambda_{\rm Br}+\Delta\lambda]\), where \(i\) takes the values from 1 to \(M\), the norm of the relative differences of the two spectra obtained for partitions \(z_{n}\) and \(z_{n+1}\) differ by an amount not exceeding the given value \(\epsilon\). \[ \begin{array}{c}\exists N,M\in\mathbb{Z};\forall\epsilon,\lambda_{\rm Br}, \Delta\lambda\in\mathbb{R}:\\ \Delta z_{n}=2^{-n}\Delta z,\forall n\geq N;\lambda_{i}=\Delta_{\rm Br}-\Delta \lambda+i\frac{2\Delta}{M},i=\overline{0,M}\Rightarrow\\ \Rightarrow\sum\limits_{i=0}^{M}\|\frac{\Phi(\lambda_{i},\Delta z_{n+1})- \Phi(\lambda_{i},\Delta z_{n})}{\Phi(\lambda_{i},\Delta z_{n})}\|\,\leq\, \epsilon\;.\end{array}  \tag{28}\]  
In other words, the partition interval is successively halved each time until the difference between the spectra obtained for two successive intervals becomes less than the pre-defined small value \(\epsilon\). However, as it will be shown further, the difference between the modeled and the reference spectra does not always monotonically decrease with the decrease of the partition interval, especially in non-homogeneous FBG structures, such as \(\pi\)-phase-shifted FBGs. In such cases, it is required to take into account additional criteria of the structure partitioning. Figure 4 presents the results of the homogeneous FBG modeling with the parameters listed in the Section 3.1 and the partition interval \(\Delta z\) = 0.04 \(\times\)\(\Lambda\). As it can be seen from Figure 4, the results of both methods were very close to the spectrum obtained using the proprietary software, although having slightly lower reflectance values in general. For further illustration, the deviations of spectra obtained using each method were plotted against the wavelength, which is presented in Figure 5. The root-mean-square deviations (RMSD) were calculated for both methods according to the equation  
\[\text{RMSD}=\sqrt{\frac{1}{N}\sum\limits_{i=1}^{N}(R(\lambda_{i})-R_{\rm ref} (\lambda_{i}))^{2}}, \tag{29}\]  
where \(N\) = 201 is the number of wavelength values for which the reflectance \(R\) is estimated using LS or TM methods, and \(R_{\rm ref}\) is the reference values of FBG reflectance derived from the OptiGrating software. In this case, \(\text{RMSD}_{\rm LS}\) = 0.0043 and \(\text{RMSD}_{\rm TM}\) = 0.0024 for the LS and TM methods, respectively. Figure 4: Simulated spectra of the homogeneous FBG obtained using the Layer Sweep method (red solid line), Transfer Matrix method (green solid line), OptiGrating software (blue dotted line), and amplified spectra near the reflectance peak (insert).