# Optical Code Construction of 2D Spectral/Spatial BIBD Codes for SAC-OCDMA Systems
## 4 2D-BIBD System Performance Analysis
\begin{split} I_{PD_{1}}=\mathcal{R}\int\limits_{0}^{\infty}G_{ 1}(\
u)dv=\frac{\mathcal{R}P_{sr}}{w_{2}(w_{1}-1)\Delta\
u}\int\limits_{0}^{ \infty}\sum\limits_{k=0}^{K}d(k)\sum\limits_{i=0}^{L_{2}-1}\sum\limits_{j=0}^{ L_{1}-1}c_{i,j}^{(2)}c_{\text{I}j}(k)u(\
u,i)\ =\frac{\mathcal{R}P_{sr}}{w_{2}(w_{1}-1)L_{1}}\Big{[}w_{2}(w_{1}-1)\frac{(K-1 )(L_{2}-1)}{L_{2}L_{1}-1}\Big{]}\\ =\frac{\mathcal{R}P_{sr}}{w_{2}L_{1}}\Big{[}w_{2}\frac{(K-1)(L_{ 2}-1)}{L_{2}L_{1}-1}\Big{]}\end{split}  \tag{19}\]  
where, \(\mathcal{R}\) represents the photodiode responsivity, which is the gain of the input-output detector  
\[\mathcal{R}=\frac{\lambda e}{hV_{c}} \tag{20}\]  
Here, \(\lambda\), \(e\), \(V_{c}\), and \(h\) represent the quantum efficiency, electron charge, central frequency of the original broadband optical pulse, and [PERSON]'s constant, respectively. The expression for the average received photocurrents (\(I_{rec}\)) is calculated as follows. \[ \begin{split} I_{\text{rec}}&=\mathcal{R}\int \limits_{0}^{\infty}[G_{0}(\
u)-G_{1}(\
u)]dv\\ I_{\text{rec}}&=I_{PD_{0}}-I_{PD_{1}}\\ I_{\text{rec}}&=\frac{\mathcal{R}P_{sr}w_{1}}{L_{1}} \end{split} \]  
PIIN current variance is expressed as  
\[\left\langle i_{PIN}^{2}\right\rangle=\ I^{2}B_{rec}\tau_{rec}\]  
\[\left\langle i_{PIN}^{2}\right\rangle=B_{rec}I_{rec}^{2}\frac{\int_{0}^{\infty} \left[G_{0}-G_{1}\right]^{2}dv}{\left[\int_{0}^{\infty}\left(G_{0}-G_{1}\right) dv\right]^{2}} \tag{21}\]  
Hence  
\[\left\langle i_{PIN}^{2}\right\rangle=B_{rec}\mathcal{R}^{2}\int\limits_{0}^{ \infty}\Big{[}G_{0}^{2}+G_{1}^{2}-2G_{0}G_{1}\Big{]}dv \tag{22}\]  
\[\left\langle i_{PIN}^{2}\right\rangle=B_{rec}\mathcal{R}^{2}\int\limits_{0}^{ \infty}\Big{[}\left(G_{0}-G_{1}\right)^{2}\Big{]}dv \tag{23}\]Incident power on photodiodes \(\big{(}G_{0}^{2}(v)\), \(G_{1}^{2}(v)\big{)}\) was derived from Equations (18) and (19). This can be written as:  
\[\int\limits_{0}^{\infty}G_{0}^{2}(v)dv=\frac{P_{\pi}^{2}}{w_{2}^{2}\Delta v^{2}} \int\limits_{0}^{\infty}\left[\sum\limits_{k=0}^{K-1}d(k)\sum\limits_{i=0}^{L _{2}-1}\sum\limits_{j=0}^{L_{1}-1}c_{ij}^{(0)}c_{ij}(k)u(v,i)\right]^{2}dv\]  
\[=\frac{P_{\pi}^{2}}{w_{2}^{2}\Delta v^{2}}\frac{\Delta v}{L_{1}}\left[\sum \limits_{k=0}^{K-1}d(k)\sum\limits_{i=0}^{L_{2}-1}\sum\limits_{j=0}^{L_{1}-1}c _{ij}^{(0)}c_{ij}(k)u(v)\right]^{2} \tag{24}\]  
\[=\frac{P_{\pi}^{2}}{w_{2}^{2}L_{1}w_{1}\Delta v}\left[w_{1}w_{2}+w_{2}\frac{(K -1)(L_{2}-1)}{L_{1}L_{2}-1}\right]^{2}=\frac{L_{1}I_{PD_{0}}^{2}}{\mathcal{R}^ {2}w_{1}\Delta v}\]  
\[\int\limits_{0}^{\infty}G_{1}^{2}(v)dv=\frac{P_{\pi}^{2}}{(w_{1}-1)^{2}w_{2}^ {2}\Delta v^{2}}\int\limits_{0}^{\infty}\left[\sum\limits_{k=0}^{K-1}d(k) \sum\limits_{i=0}^{L_{2}-1}\sum\limits_{j=0}^{L_{1}-1}c_{ij}^{(2)}c_{ij}(k)u(v,i)\right]^{2}dv\]  
\[=\frac{P_{\pi}^{2}}{(w_{1}-1)^{2}w_{2}^{2}w_{1}\Delta v^{2}}\frac{\Delta v}{L_ {1}}\left[\sum\limits_{k=0}^{K-1}d(k)\sum\limits_{i=0}^{L_{2}-1}\sum\limits_{ j=0}^{L_{1}-1}c_{ij}^{(2)}c_{ij}(k)u(v,i)\right]^{2} \tag{25}\]  
\[=\frac{P_{\pi}^{2}}{w_{1}(w_{1}-1)^{2}w_{2}^{2}L_{1}Av}\left[w_{2}(w_{1}-1) \frac{(K-1)(L_{2}-1)}{L_{1}L_{2}-1}\right]^{2}=\frac{L_{1}I_{PD_{1}}^{2}}{w_{ 1}\mathcal{R}^{2}\Delta v}\]  
The following section explains the single-sideband PSD from source multiplications. For PD\({}_{0}\) and PD\({}_{1}\) of the receiver.