# Comparative Analysis of the Methods for Fiber Bragg Structures Spectrum Modeling
## 2 Modeling Methods
### Layer Sweep Method
\begin{array}{l}E_{i}(z)=t_{i}\cdot\exp(-j(k_{i}z+\omega\tau))+r_{i}\cdot\exp(j (k_{i}z-\omega\tau))\;,\\ H_{i}(z)=\frac{t_{i}}{w_{i}}\cdot\exp(-j(k_{i}z+\omega\tau))-\frac{r_{i}}{w_{i} }\cdot\exp(j(k_{i}z-\omega\tau))\;,\;\;i=\overline{0,N+1}\;\;,\end{array}  \tag{9}\]  
where \(\tau\) is the time, \(t_{i}\) and \(r_{i}\) are the transmittance and reflectance of the \(i\)-th layer; \(k_{i}\) is the wavenumber and \(w_{i}\) is the impedance for the \(i\)-th layer. The first summand in (9) for both the electric and magnetic components describes the wave moving in the direction of propagation, and the second term describes the waves reflected from the interfaces of the media and moving against the direction of propagation. The wave number and wave impedance depend on the radiation wavelength, permittivity, and permeability of the medium:  
\[k_{i}=2\pi f\sqrt{\varepsilon_{*}\mu_{*}}=\frac{2\pi c\sqrt{\varepsilon_{*} \mu_{*}}}{\lambda}\sqrt{\varepsilon_{i}\mu_{i}}=\frac{2\pi}{\lambda}\sqrt{ \varepsilon_{i}\mu_{i}},\quad w_{i}=\sqrt{\mu_{i}\mu_{*}/\varepsilon_{i} \varepsilon_{*}}\;, \tag{10}\]  
where \(\lambda=c/f\) is the wavelength, \(\varepsilon_{i}\) is the permittivity and \(\mu_{i}\) is permeability of the \(i\)-th layer, respectively, \(\varepsilon_{*}\) and \(\mu_{*}\) are the permittivity and permeability of the vacuum, respectively, and \(c\) is the speed of light in vacuum. The condition for the continuity of electromagnetic waves in space presupposes the equality of electric and magnetic fields at every point in space, including the interfaces between the layers:  
\[\left\{ \begin{array}{l}t_{i}\cdot\exp(-jk_{i}z_{i})+r_{i}\cdot\exp(jk_{i}z_{i })=t_{i+1}\cdot\exp(-jk_{i+1}z_{i})+r_{i+1}\cdot\exp(jk_{i+1}z_{i})\\ \frac{t_{i}\cdot\exp(-jk_{i}z_{i})-r_{i}\cdot\exp(jk_{i}z_{i})}{w_{i}}=\frac{t _{i+1}\exp(-jk_{i}z_{i})-r_{i+1}\cdot\exp(jk_{i+1}z_{i})}{w_{i+1}}\end{array}  \right.\;,\;\;i=\overline{0,N}. \tag{11}\]  
where \(\lambda=c/f\) is the wavelength, \(\varepsilon_{i}\) is the permittivity and \(\mu_{i}\) is permeability of the \(i\)-th layer. It must be noted that the common multiplier \(\exp(-j\omega\tau)\), which describes the variations of the electric and magnetic waves over time, is reduced in the left and right parts of Equation (11). As a result, the relations (11) give a system of \(2(N+1)\) linear equations for determination of \(2(N+2)\) unknown transmission coefficients \(t_{i}\) and the reflection coefficients \(r_{i}\) in each of the \((N+2)\) layers. An additional analysis of the system of Equation (11) makes it possible to exclude from them the permittivity \(\varepsilon_{*}\) and permeability \(\mu_{*}\) of the vacuum, using the following relation:  
\[c\cdot\sqrt{\varepsilon_{*}\mu_{*}}\equiv 1\;, \tag{12}\]  
where \(c\) is the speed of light. In the system of Equation (11), the left and right parts are reduced by the square root of the product of the absolute permittivity and permeability, and the wave number is reformulated in terms of the wavelength. Permititivity \(\varepsilon\) and permeability \(\mu\) are related to the refractive index as follows:  
\[n=\sqrt{\varepsilon\mu}. \tag{13}\]  
In order to close the resulting system of equations, it is necessary to supplement the system (11) with two more relations. As we postulated above, all radiation coming from the source to the zeroth layer (\"Layer 0\") passes through it without loss, and the reflection from the second boundary of the last layer (\"Layer N + 1\") is absent due to the infinite remoteness of the boundary. These conditions make it possible to supplement the system of equations with two missing relations for the transmission coefficients of the zeroth layer and the reflection of the last layer, respectively:  
\[t_{0}=1,\;\;r_{N+1}=0\;. \tag{14}\]  
Figure 3: One-dimensional model of a layered structure. Combining (11) and (14) we obtain a closed system of \(2(N+1)\) linear equations for \(2(N+1)\) unknown transmission and reflection coefficients of each of the layers, which can be written in matrix form:  
\[