# New Algorithm for a Fixed Right Shift Code to Support Different Quality of Services in Smart and Sustainable Optical Networks

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{*}

## Abstract

**:**

## 1. Introduction

- Proposing a new algorithm for a fixed right shift code (FRS) that can support different quality of services (video, audio, and data) to be used in optical fiber communication systems.
- Mitigating the interference that exists in the code by using different detection techniques such as direct detection (DD) and SPD.
- Solving the problem of using VW codes that require a complicated structure of encoder and decoder for transmitting different services.
- Studying the performance of our proposed model analytically.
- Making a simulation of a small optical fiber communication network that uses our proposed model.

## 2. Related Work

## 3. Code Construction

**Start**- Select integer values for L, P, U
**If**P is odd**go to step**4, else**go to step**5**If**U is odd**go to step**6, else**go to step**7- If P is even, go to step 8
- Construct FRS for odd–odd case
- Construct FRS for odd–even case
**If**U is even, construct FRS code for even–even case, else construct FRS code for even–odd case**End**

- Example 1 (even–even case)
- P = 4, U = 4
**Step 1:**- First, we observe the position of FNE (PFNE) using (1).
**For**r = 1 PFNE = (1,1)**For**r = 2 PFNE = (2,3)**For**r = 3 PFNE = (3,5)**For**r = 4 PFNE = (4,7)**Step 2:**- Now, we calculate the position of LNE (PLNE) using (2).
**For**R = 1 PLNE = (1,6)**For**R= 2 PLNE = (2,8)**For**R = 3 PLNE = (3,10)**For**R = 4 PLNE = (4,12)**Step 3:**Fill “1 s” just after at P − 2 = 4 − 2 = 2 places and “0 s” just before at P − 2 = 2 places.**Step 4**: Calculate the length of the code using (3), L = 4(4 − 2) + 4 = 12

- Example 2 for the odd–odd case, P = 5, U = 5, so, L = 5(5 − 2) + 5 = 20.

## 4. Variable Weight (VW) FRS Algorithm for Quality of Services

## 5. Proposed System Design

#### 5.1. VFRS/SAC-OCDMA Transmitter

#### 5.2. Channel

#### 5.3. Receiver

#### 5.3.1. DD Technique

#### 5.3.2. SPD Technique

## 6. Results and Discussion

#### 6.1. Analytical Results

#### 6.2. Simulation Results

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Dat, P.T.; Kanno, A.; Yamamoto, N.; Kawanishi, T. Seamless convergence of fiber and wireless systems for 5G and beyond networks. J. Light. Technol.
**2018**, 37, 592–605. [Google Scholar] [CrossRef] - Shiraz, H.G.; Karbassian, M.M. Optical CDMA Networks: Principles, Analysis and Applications; Wiley: Hoboken, NJ, USA, 2012. [Google Scholar]
- Osadola, T.B.; Idris, S.K.; Glesk, I.; Kwong, W.C. Network scaling using OCDMA over OTDM. IEEE Photon. Technol. Lett.
**2012**, 24, 395–397. [Google Scholar] [CrossRef] - Huang, J.-F.; Yang, C.-C. Permuted M-matrices for the reduction of phase-induced intensity noise in optical CDMA Network. IEEE Trans. Commun.
**2006**, 54, 150–158. [Google Scholar] [CrossRef] - Stok, A.; Sargent, E.H. Lighting the local network: Optical code division multiple access and quality of service provisioning. IEEE Netw.
**2000**, 14, 42–46. [Google Scholar] - Kitayama, K.; Wang, X.; Wada, N. OCDMA over WDM PON-solution path to gigabit-symmetric FTTH. J. Light. Technol.
**2006**, 24, 1654–1662. [Google Scholar] [CrossRef] - Matsumoto, R.; Kodama, T.; Shimizu, S.; Nomura, R.; Omichi, K.; Wada, N.; Kitayama, K.-I. 40G-OCDMA-PON System with an Asymmetric Structure Using a Single Multi-Port and Sampled SSFBG Encoder/Decoders. J. Light. Technol.
**2014**, 32, 1132–1143. [Google Scholar] [CrossRef] - Bhanja, U.; Khuntia, A.; Swati, A. Performance analysis of a SAC-OCDMA FSO network. In Proceedings of the 2017 4th International Conference on Signal Processing, Computing and Control (ISPCC), Solan, India, 21–23 September 2017. [Google Scholar]
- Smith, E.; Blaikie, R.; Taylor, D. Performance enhancement of spectral-amplitude-coding optical CDMA using pulse-position modulation. IEEE Trans. Commun.
**1998**, 46, 1176–1185. [Google Scholar] [CrossRef] - Chen, K.-S. Label Stacking Scenarios in Hybrid Wavelength and Code-Switched GMPLS Networks. Electronics
**2018**, 7, 251. [Google Scholar] [CrossRef] - Bakarman, H.A.; Eltaif, T.; Menon, P.S.; Muqaibel, M.; Shaari, S. OCDMA optical access network based on OCDMA systems: Transmission and security performance. Int. J. Commun.
**2013**, 7, 35–41. [Google Scholar] - Ahmed, H.Y.; Zeghid, M.; Imtiaz, W.A.; Sharief, Y.; Abdalla, O.M. A configurable transmitter-receiver structure to support QoS for spectral amplitude coding-optical code division multiple access. Opt. Fiber Technol.
**2020**, 58, 102232. [Google Scholar] [CrossRef] - Alayedi, M.; Cherifi, A.; Hamida, A.F.; Bouazza, B.S.; Aljunid, S.A. Performance Improvement of Optical Multiple Access CDMA Network Using a New Three-Dimensional (Spectral/Time/Spatial) Code. Wirel. Pers. Commun.
**2021**, 118, 2675–2698. [Google Scholar] [CrossRef] - El-Mottaleb, S.A.A.; Fayed, H.A.; El-Aziz, A.A.; Metawee, M.A.; Aly, M.H. Enhanced Spectral Amplitude Coding OCDMA System Utilizing a Single Photodiode Detection. Appl. Sci.
**2018**, 8, 1861. [Google Scholar] [CrossRef] - SEl-Mottaleb, S.A.A.; Fayed, H.A.; Ismail, N.E.; Aly, M.H.; Rizk, M.R.M. MDW and EDW/DDW codes with AND subtraction/single photodiode detection for high performance hybrid SAC-OCDMA/OFDM system. Opt. Quantum Electron.
**2020**, 52, 239–259. [Google Scholar] [CrossRef] - Mostafa, S.; Mohamed, A.E.-N.A.; El-Samie, F.E.A.; Rashed, A. Performance Evaluation of SAC-OCDMA System in Free Space Optics and Optical Fiber System Based on Different Types of Codes. Wirel. Pers. Commun.
**2017**, 96, 2843–2861. [Google Scholar] [CrossRef] - Anuar, M.; Aljunid, S.; Saad, N.; Hamzah, S. New design of spectral amplitude coding in OCDMA with zero cross-correlation. Opt. Commun.
**2009**, 282, 2659–2664. [Google Scholar] [CrossRef] - Fadhil, H.A.; Aljunid, S.; Ahmad, R. Performance of random diagonal code for OCDMA systems using new spectral direct detection technique. Opt. Fiber Technol.
**2009**, 15, 283–289. [Google Scholar] [CrossRef] - Ahmed, H.Y.; Zeghid, M.; Bouallegue, B.; Chehri, A.; Abd El-Mottaleb, S.A. Reduction of Complexity Design of SAC OCDMA Systems by Utilizing Diagonal Permutation Shift (DPS) Codes with Single Photodiode (SPD) Detection Technique. Electronics
**2022**, 11, 1224. [Google Scholar] [CrossRef] - Ahmed, H.Y.; Nisar, K.S. Eigenvalue unity (DEU) code for spectral amplitude coding-optical code division multiple access. Opt. Fiber Technol.
**2013**, 19, 335–347. [Google Scholar] [CrossRef] - Nasaruddin; Tsujioka, T. Design of strict variable-weight optical orthogonal codes for differentiated quality of service in optical CDMA networks. Comput. Netw.
**2008**, 52, 2077–2086. [Google Scholar] [CrossRef] - Nisar, K.S.; Ahmed, H.Y.; Zeghid, M.; Imtiaz, W.A.; Sarangal, H.; Thapar, S.S. The multi-service schemes for SAC-OCDMA systems with variable code weight. Opt. Quantum Electron.
**2021**, 53, 293. [Google Scholar] [CrossRef] - Anas, S.A.; Abdullah, M.; Mokhtar, M.; Aljunid, S.; Walker, S. Optical domain service differentiation using spectral-amplitude-coding. Opt. Fiber Technol.
**2009**, 15, 26–32. [Google Scholar] [CrossRef] - Seyedzadeh, S.; Pour Rahimian, F.; Glesk, I.; Kakaee, M.H. Variable weight spectral amplitude coding for multiservice OCDMA networks. Opt. Fiber Technol.
**2017**, 37, 53–60. [Google Scholar] [CrossRef] - Kakaee, M.H.; Essa, S.I.; Abd, T.H.; Seyedzadeh, S. Dynamic quality of service differentiation using fixed code weight in optical CDMA networks. Opt. Commun.
**2015**, 355, 342–351. [Google Scholar] [CrossRef] - Ahmed, H.Y.; Nisar, K.S.; Zeghid, M.; Aljunid, S.A. Numerical Method for Constructing Fixed Right Shift (FRS) Code for SAC-OCDMA Systems. Int. J. Adv. Comput. Sci. Appl.
**2017**, 8, 246–252. [Google Scholar] - Moghaddasi, M.; Mamdoohi, G.; Noor, A.S.M.; Mahdi, M.A.; Anas, S.B.A. Development of SAC–OCDMA in FSO with multi-wavelength laser source. Opt. Commun.
**2015**, 356, 282–289. [Google Scholar] [CrossRef] - Anuar, M.; AlJunid, S.; Arief, A.; Junita, M.; Saad, N. PIN versus Avalanche photodiode gain optimization in zero cross correlation optical code division multiple access system. Optik
**2013**, 124, 371–375. [Google Scholar] [CrossRef] - Ahmed, Y.H.; Zeghid, M.; Imtiaz, W.A.; Sharma, T.; Chehri, A.; Fortier, P. Two-Dimensional Permutation Vectors’ (PV) Code for Optical Code Division Multiple Access Systems. Entropy
**2020**, 22, 576. [Google Scholar] [CrossRef] - Sharma, T.; Chehri, A.; Fortier, P.; Ahmed, Y.H.; Zeghid, M.; Imtiaz, W.A. Optical Code Construction of 2D Spectral/Spatial BIBD Codes for SAC-OCDMA Systems. Appl. Sci.
**2021**, 11, 783. [Google Scholar] [CrossRef]

**Figure 9.**BER versus the simultaneous number of users for the VWFRS/SAC-OCDMA-based OFC system using different detection schemes at different data rates for P = 4.

**Figure 10.**BER versus the simultaneous number of users for the VWFRS/SAC-OCDMA-based OFC system using different detection schemes at different data rates for P = 5.

**Figure 11.**SNR versus the simultaneous number of users for the VWFRS/SAC-OCDMA-based OFC system using different detection schemes at different data rates for P = 4.

**Figure 12.**SNR versus the simultaneous number of users for the VWFRS/SAC-OCDMA-based OFC system using different detection schemes at different data rates for P = 5.

**Figure 13.**BER versus the number of users for the VWFRS/SAC-OCDMA-based OFC system for different services.

**Figure 16.**BER versus transmission distance for the proposed system using the SPD detection-based OFC system for different services.

**Figure 17.**Q-factor versus transmission distance for the proposed system using the SPD detection-based OFC system for different services.

Parameters | Ref. [22] | Ref. [23] | Ref. [24] | Ref. [25] |
---|---|---|---|---|

Code | VZCC | VW KS | VWRD | MS |

Detection technique | DD | Complementary | DD | AND |

Cross-correlation | 0 | 1 | 1 | 1 |

Code weights | Video: 4 Audio: 3 Data: 2 | Video: 2 Audio: 4 Data: 6 | Video: 3 Audio: 4 Data: 5 | Video: 5 Audio: 2 Data: 4 |

Number of users | Video: 4 Audio: 3 Data: 5 | Video: 3 Audio: 4 Data: 6 | Video: 3 Audio: 3 Data: 3 | Video: 5 Audio: 4 Data: 4 |

Total code length | 35 | 41 | 24 | 31 |

Drawbacks | Variable weight leads to larger code length | Valid for even number of code weights | Fixed number of users with variable weight | Need code weight optimization if number of users is not equal for the different quality of services. |

VWFRS $\mathbf{Code}(\mathit{U}=5;\mathit{P}=5;{\mathit{\lambda}}_{\mathit{F}}=1)$ | Code Length | Data Rate (Gbits/s) | $\mathbf{Tc}=\frac{1}{\mathbf{d}\mathbf{a}\mathbf{t}\mathbf{a}\mathbf{r}\mathbf{a}\mathbf{t}\mathbf{e}\times \mathbf{c}\mathbf{o}\mathbf{d}\mathbf{e}\mathbf{l}\mathbf{e}\mathbf{n}\mathbf{g}\mathbf{t}\mathbf{h}}\mathbf{in}\mathbf{ns}$ at Partially Loaded | |||||
---|---|---|---|---|---|---|---|---|

Partially Load | Full Load | 0.622 | 1.25 | 2.5 | ||||

11110001000000 | 8 | 14 | √ | √ | √ | 0.20096 | 0.1 | 0.05 |

00011110001000 | 11 | 14 | √ | √ | √ | 0.1461 | 0.0727 | 0.0363 |

00000011110001 | 14 | 14 | √ | √ | √ | 0.1148 | 0.0571 | 0.0285 |

VWFRS $\mathbf{Code}(\mathit{U}=5;\mathit{P}=3;{\mathit{\lambda}}_{\mathit{F}}=1)$ | Code Length | Data Rate (Gbits/s) | $\mathbf{Tc}=\frac{1}{\mathbf{d}\mathbf{a}\mathbf{t}\mathbf{a}\mathbf{r}\mathbf{a}\mathbf{t}\mathbf{e}\times \mathbf{c}\mathbf{o}\mathbf{d}\mathbf{e}\mathbf{l}\mathbf{e}\mathbf{n}\mathbf{g}\mathbf{t}\mathbf{h}}\mathbf{in}\mathbf{ns}$ at Partially Loaded | |||||
---|---|---|---|---|---|---|---|---|

Partially Load | Full Load | 0.622 | 1.25 | 2.5 | ||||

1110010000 | 6 | 10 | √ | √ | √ | 0.26795 | 0.1333 | 0.0666 |

0011100100 | 8 | 10 | √ | √ | √ | 0.20096 | 0.1 | 0.05 |

0000111001 | 10 | 10 | √ | √ | √ | 0.16077 | 0.08 | 0.04 |

VWFRS $\mathbf{Code}(\mathit{U}=5;\mathit{P}=3;{\mathit{\lambda}}_{\mathit{F}}=1)$ | Code Length | Data Rate (Gbits/s) | $\mathbf{Tc}=\frac{1}{\mathbf{d}\mathbf{a}\mathbf{t}\mathbf{a}\mathbf{r}\mathbf{a}\mathbf{t}\mathbf{e}\times \mathbf{c}\mathbf{o}\mathbf{d}\mathbf{e}\mathbf{l}\mathbf{e}\mathbf{n}\mathbf{g}\mathbf{t}\mathbf{h}}\mathbf{in}\mathbf{ns}$ at Partially Loaded | |||||
---|---|---|---|---|---|---|---|---|

Partially Load | Full Load | 0.622 | 1.25 | 2.5 | ||||

110100 | 4 | 6 | √ | √ | √ | 0.4019 | 0.2 | 0.1 |

011010 | 5 | 6 | √ | √ | √ | 0.3215 | 0.16 | 0.08 |

001101 | 6 | 6 | √ | √ | √ | 0.26795 | 0.1333 | 0.0666 |

Users/Wavelengths | ${\mathit{\lambda}}_{1}$ | ${\mathit{\lambda}}_{2}$ | ${\mathit{\lambda}}_{3}$ | ${\mathit{\lambda}}_{4}$ | ${\mathit{\lambda}}_{5}$ | ${\mathit{\lambda}}_{6}$ |
---|---|---|---|---|---|---|

User 1 | 1 | 1 | 0 | 1 | 0 | 0 |

User 2 | 0 | 1 | 1 | 0 | 1 | 0 |

User 3 | 0 | 0 | 1 | 1 | 0 | 1 |

**Table 6.**Logical representation of MAI cancellation between two users using VWFRS code and the SPD technique.

User 1 Code M (Decoder) | 110100 |
---|---|

User 2 Code N | 011010 |

$\mathrm{Interference}$ bit: M × N | 010000 |

Cross-correlation between M and N | 1 |

Sub-D: (MN) × M | $\left(010000\right)\times $ 110100 = 010000 |

Cross-correlation between Sub-D and M | 1 |

Applying subtraction | 1–1 = 0 (Interference cancelled) |

Received Power, R_{p} | −10 dBm |
---|---|

$\mathrm{Responsivity},\mathcal{R}$ | 1 A/W |

Data rate | 622 Mbps, 1.25 Gbps, and 2.5 Gbps |

$\mathrm{Optical}\mathrm{bandwidth},\mathsf{\Delta}\upsilon $ | 3.75 MHz |

$\mathrm{Electrical}\mathrm{bandwidth},{B}_{electric}$ | 0.75× data rate |

$\mathrm{Receiver}\mathrm{load}\mathrm{resistance},{R}_{L}$ | 1030 Ω |

$\mathrm{Absolute}\mathrm{receiver}\mathrm{noise}\mathrm{temperature},T$ | 300 K |

Data Rates | Detection Technique | Even Value of P | Odd Value of P |
---|---|---|---|

622 Mbps | SPD | 250 | 119 |

DD | 79 | 79 | |

1.25 Gbps | SPD | 138 | 107 |

DD | 55 | 55 | |

2.5 Gbps | SPD | 73 | 55 |

DD | 38 | 37 |

LED Power | 9 dBm |
---|---|

Data rate | 622 Mbps, 1.25 Gbps, and 2.5 Gbps |

Fiber attenuation | 0.25 dB/km |

Fiber slope | $0.075\mathrm{ps}/{\mathrm{nm}}^{2}$/km |

Fiber dispersion | 17 ps/nm/km |

PIN responsivity | 1 A/W |

Thermal noise density | $1.8\times {10}^{-23}$ W/Hz |

$\mathrm{Absolute}\mathrm{receiver}\mathrm{noise}\mathrm{temperature},T$ | 300 K |

Data Rate | $\mathbf{Video}(\mathbf{BER}={10}^{-12})$ | $\mathbf{Data}(\mathbf{BER}={10}^{-9})$ | $\mathbf{Audio}(\mathbf{BER}={10}^{-3})$ |
---|---|---|---|

1.25 Gbps | 30 km | 44 km | 80 km |

2.5 Gbps | 6 km | 13 km | 30 km |

Data Rate | 622 Mbps | 1.25 Gbps | 2.5 Gbps |
---|---|---|---|

Q-factor | 11.7 | 6.64 | 3.04 |

Ref. [22] | Ref. [23] | Ref. [25] | Present Work | ||
---|---|---|---|---|---|

Code | VZCC | VWKS | VWMS | VFRS | |

Code weight | Video | 6 | 6 | 5 | 5 |

Audio | 4 | 4 | 4 | 4 | |

Data | 2 | 2 | 2 | 3 | |

Number of users at 1.25 Gbps | Video | 90 | - | 24 | 151 |

Audio | 81 | - | 24 | 300 | |

Data | 100 | - | 24 | 162 | |

Detection technique | DD | CD | AND | SPD | |

Transmission distance at 1.25 Gbps | Video | - | - | - | 30 |

Audio | - | - | - | 80 | |

Data | - | - | - | 44 | |

Transmission distance at 2.5 Gbps | Video | - | - | - | 6 |

Audio | - | - | - | 30 | |

Data | - | - | - | 13 | |

Complexity | High, as it requires a number of FBGs equal to number of bit “1” | High, as its receiver consists of two branches. Upper branch has FBGs equivalent to number of bit “1” and PD, while lower branch has FBGs equivalent to number of bit “0” and PD | High, as its receiver consists of two branches. Upper branch has FBGs equivalent to number of bit “1” and PD, while lower branch has FBGs equivalent to number of interference bits with other code words and PD | Low, as its receiver has only one branch with a decoder, subtractive decoder, and one PD | |

Cost | Expensive | Expensive | Expensive | Less expensive |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Abd El-Mottaleb, S.A.; Métwalli, A.; Chehri, A.; Ahmed, H.Y.; Zeghid, M.; Khan, A.N.
New Algorithm for a Fixed Right Shift Code to Support Different Quality of Services in Smart and Sustainable Optical Networks. *Sustainability* **2022**, *14*, 10337.
https://doi.org/10.3390/su141610337

**AMA Style**

Abd El-Mottaleb SA, Métwalli A, Chehri A, Ahmed HY, Zeghid M, Khan AN.
New Algorithm for a Fixed Right Shift Code to Support Different Quality of Services in Smart and Sustainable Optical Networks. *Sustainability*. 2022; 14(16):10337.
https://doi.org/10.3390/su141610337

**Chicago/Turabian Style**

Abd El-Mottaleb, Somia A., Ahmed Métwalli, Abdellah Chehri, Hassan Yousif Ahmed, Medien Zeghid, and Akhtar Nawaz Khan.
2022. "New Algorithm for a Fixed Right Shift Code to Support Different Quality of Services in Smart and Sustainable Optical Networks" *Sustainability* 14, no. 16: 10337.
https://doi.org/10.3390/su141610337