# Numerical Estimation of Bending in Holographic Volume Gratings by Means of RCWA and Deep Learning
## 2 Theory
### Rigorous Coupled Wave Analysis--Shooting Method Approach  
The exposure of a material to an interference pattern results in a modulation of the medium's dielectric permittivity that can be expressed as  
\[\varepsilon(z,x)=\sum_{h}\varepsilon_{h}(z)\exp[jhK(x\sin\varphi+z\cos\varphi )], \tag{1}\]  
where \(K\) is the grating vector, and \(\varphi\) is the grating slant angle. We can parametrize a bending in this dielectric modulation pattern as a characteristic polynomial \(W(z)\) as follows:  
\[W(z)=a_{0}+a_{1}\Big{(}\frac{z}{d}\Big{)}+a_{2}\Big{(}\frac{z}{d}\Big{)}^{2}+a _{3}\Big{(}\frac{z}{d}\Big{)}^{3}, \tag{2}\]  
where \(d\) is the optical depth. Introducing it as an expansion factor in the dielectric permittivity expression embedded in \(\varepsilon_{h}(z)\), we have the following:  
\[\varepsilon_{h}(z)=\varepsilon_{h}\cdot\exp[jhW(z)], \tag{3}\]  
and then, the more specific formula for the permittivity can be written as  
\[\varepsilon(z,x)=\sum_{h=-1}^{1}\varepsilon_{h}\cdot\exp\{jh[W(z)+K(x\sin \varphi+z\cos\varphi)]\}. \tag{4}\]  
Figure 1 shows the model of the thick hologram used for the analysis where the bending in the interference fringes can be identified. The terms \(U_{x}^{(i)}\) and \(S_{y}^{(i)}\) are related to the amplitudes of the electromagnetic field, which is detailed next. Following a similar formalism to [33], we can describe the electromagnetic interaction as follows:  
Figure 1: Model of the thick hologram used for the analysis. \[\frac{d}{dz} \begin{bmatrix}\vdots\\ S^{(i)}_{y}\\ \vdots\\ U^{(i)}_{x}\\ \vdots\end{bmatrix} = \begin{bmatrix}\mathbf{k}_{z}&k_{0}\mathbb{I}\\ \mathbf{k}_{x}^{2}/k_{0}-k_{0}\boldsymbol{e}&\mathbf{j}\mathbf{k}_{z}\\ \vdots\end{bmatrix}\begin{bmatrix}\vdots\\ S^{(i)}_{y}\\ \vdots\\ U^{(i)}_{x}\\ \vdots\end{bmatrix}  \tag{5}\]  
where \(S^{(i)}_{y}\) and \(U^{(i)}_{x}\) represent the amplitudes of the \(i\)th space harmonic components of the electric and magnetic fields, respectively, \(\mathbb{I}\) is the identity matrix, \(\mathbf{k}_{z}= \begin{bmatrix}k^{(i)}_{gz}\hat{\epsilon}_{ij}\end{bmatrix} _{ ij}= \begin{bmatrix}k^{(i)}_{gz}\end{bmatrix} _{ij}\) and \(\mathbf{k}_{x}= \begin{bmatrix}k^{(i)}_{x}\end{bmatrix} _{i,j}\) are diagonal matrices, and the wave vector is \(k^{(i)}_{x}=k_{0}n\sin\theta-iK\sin\varphi\); the \(z\)-component of the grating wave vector is defined as follows:  
\[k^{(i)}_{g,z}= \begin{cases}\sqrt{n^{2}k_{0}^{2}-k^{(i)2}_{x}}&\text{if }nk_{0} \geq k^{(i)}_{x}\\ j\sqrt{-n^{2}k_{0}^{2}+k^{(i)2}_{x}}&\text{otherwise}\end{cases}  \tag{6}\]  
where \(k_{0}\) is the free-space wave number, \(n\) and \(\theta\) are the refractive index values of the recording medium and the angle of incidence in the recording medium, respectively, and \(\varphi\) is the grating slant angle. \[\mathbf{k}_{z}= \begin{bmatrix}\ddots&&&\cdot\cdot\cdot\\ &k^{(i-1)}_{gz}&0&\\ &0&k^{(i)}_{gz}&0\\ &0&0&k^{(i+1)}_{gz}\\ \cdot\cdot&&&\cdot\cdot\end{bmatrix} ,\ \mathbf{k}_{x}= \begin{bmatrix}\ddots&&& \cdot\cdot\cdot\\ &k^{(i-1)}_{x}&0&0\\ &0&k^{(i)}_{x}&0\\ &0&0&k^{(i+1)}_{x}\\ \cdot\cdot&&&\cdot\end{bmatrix} \]  
and \(\boldsymbol{e}=[\varepsilon_{i-j}]_{i,j}\) is a Toeplitz matrix, wherein we then have the following:  
\[\boldsymbol{e}= \begin{bmatrix}\ddots&&&\cdot\cdot\cdot\\ &\varepsilon_{0}&\varepsilon_{-1}&\varepsilon_{-2}\\ &\varepsilon_{1}&\varepsilon_{0}&\varepsilon_{-1}\\ &\varepsilon_{2}&\varepsilon_{1}&\varepsilon_{0}\\ \cdot\cdot&&&\cdot\cdot\end{bmatrix} \]  
with respect to the boundary conditions and letting \(R_{i}\) be the normalised electric-field amplitude of the \(i\)th reflected wave in region I and \(T_{i}\) be the normalised electric-field amplitude of the transmitted wave in region II:  
\[