1 Introduction

Over the decades, data traffic is growing enormously around the globe due to the ever increasing broadband network services. In order to handle the increasing demand for ultra-high speed data transmission and to provide the same for number of simultaneous users, novel transmission technologies have become essential in optical networks. In a network with bandwidth and signal-to-noise ratio constraints, according to Shannon’s capacity theorem, the capacity can be increased by accommodating more number of users within the available bandwidth by means of different techniques. For years, several multiple access techniques are used extensively in optical communication. Particularly Optical Code Division Multiple Access (OCDMA) is getting much attention mainly due to its potential for improved information security, bandwidth utilization and network flexibility [1, 2].

In OCDMA, each user is assigned with one address sequence for encoding and decoding and signals from different users may interfere in time and frequency. Multiple Access Interference (MAI) thus becomes a challenging issue in OCDMA. The address sequences need to be used in such a way that interference among multiple users must be minimal otherwise the number of simultaneous users will be less. Several OCDMA code sequences were proposed earlier with high autocorrelation and less cross correlation characteristics like optical orthogonal codes, prime codes and quadratic congruence codes [3,4,5,6]. Later, in order to improve the code cardinality, two-dimensional (2D) and three-dimensional (3D) codes were proposed [6,7,8,9,10,11,12,13]. The performances of multi-dimensional codes vary with respect to the number of concurrent users for the required bit error rate (BER), correlation properties, implementation complexity and flexibility [2].

In this paper we propose a novel encoding and decoding technique with the objective of increasing number of concurrent users and enhancing the data security against eavesdropping. In order to achieve the same we have constructed a 2D code set, using multiple frequency channels and modes, with partial utilization of third dimension parameter namely time. Simulation results confirm the possibility of utilizing the complete code set with very minimal interference among users. Moreover, the chances for data interception also can be reduced. This paper is organized as follows: In Sect. 2, construction of proposed code using prime sequences and group padded modified prime sequences is explained. Section 3 describes the transmitter and receiver model for the proposed system. Simulation results and comparison with other coding procedures are discussed in Sect. 4.

2 Code construction and correlation

Main objectives of OCDMA code construction are to properly identify the desired user’s data in midst of MAI and to accommodate more number of users in the system. For years, many optical spreading sequences for OCDMA networks have been proposed. One among them is prime sequences. Conventionally, prime sequences are mapped into binary sequences and binary sequences are used for encoding and decoding. The length of the binary sequence, known as the code length, plays a vital role in the performance of the OCDMA system and the compromise between BER and throughput need to be considered since larger code length reduces both MAI and data transmission rate. Mapping prime sequences into binary sequences thus limits the bandwidth utilization.

In our proposed work, we use prime sequences itself instead of binary sequences. Combinations of fiber modes and frequencies are used to obtain the address sequences thereby the issues related with time spreading can be avoided since in the case of the later, reducing the temporal overlap between signals from different users at the receiver will be a major challenge. The prime sequences are constructed from Galois Field, GF (P) = (0, 1, 2,.... P − 1) where P ≥ 3 is a prime number [4]. The elements of sequence Sx is obtained by,

$$S_{xj} = (x \times j)\bmod \left( P \right)$$

where x, j ∈ {0, 1 2,..., P−1}.

Each prime sequence can then be represented as,

$$S_{x} = \left[ {S_{x0} S_{x1} S_{x2} \ldots S_{xP - 1} } \right]$$

Similarly, using prime sequences modified prime sequences and then group padded modified prime (GPMP) sequences can be constructed by shifting and simple padding [14]. The general structure for GPMP code construction is shown below.

 

j

x

0

1

 

P-2

P-1

Padding

0

0

0

0

0

1

1

P-1

P-1

P-1

P-1

0

0

P-2

P-2

P-2

P-2

P-1

P-1

     

1

1

1

1

2

2

1

S10

S11

S1P-2

S1P-1

S1P-3

S1P-2

S11

S12

S1P-1

S10

S1P-2

S1P-1

     

S1P-1

S10

S1P-3

S1P-2

S1P-4

S1P-3

       

P-1

SP-1 0

SP-1 1

SP-1P-2

SP-1P-1

SP-1P-3

SP-1P-2

SP-1 1

SP-1 2

SP-1P-1

SP-1 0

SP-1P-2

SP-1P-1

     

SP-1P-1

SP-1 0

SP-1P-3

SP-1P-2

SP-1P-4

SP-1P-3

For each of the ‘x’ group, the first sequence is similar to the prime sequence except for the padding. The remaining P-1 sequences in each group are the shifted version of the first sequence and the shifting of elements varies from 1 to P-1. Padding is done using the last two elements of the previous sequence within the same group. Total number of GPMP sequence thus will become P2.

Using the above procedure, for P1 = 5 the prime sequences can be tabulated as given in Table 1.

Table 1 Prime sequences for P1 = 5

For P2 = 3 group padded modified prime sequences can be tabulated as given in Table 2.

Table 2 GPMP sequences for P2 = 3

Prime sequences and GPMP sequences are selected for their simple construction, good correlation characteristics and cardinality which are already proven for these sequences as time spreading codes [14]. They are used with P1 = 5 and P2 = 3, respectively, to construct the 2D code set for simulation. Here the prime sequence S0 is a trivial one and it can be excluded. Using remaining sequences, 36 codes, namely m1, m2,…., m36, can be obtained as S1G1, S1G2,……, S4G9. Sxj in prime sequences is represented as different fiber modes and the values of elements in GPMP sequences are represented as frequencies. Five lower order modes namely LP01, LP11, LP02, LP12 and LP03 and three frequencies 193.1 THz, 193.2 THz and 193.3 THz are used for the simulation. For example, the \(a \times b\) code matrix corresponding to S3G6 can be represented as follows:

Frequency

Mode

 

LP01

LP11

LP02

LP12

LP03

f1

0

0

1

1

0

f2

0

1

0

0

0

f3

1

0

0

0

1

User data is encoded using this code matrix assignment. The power of the signal corresponding to data bit 1 is divided across the five frequency-mode combinations with respect to the specific code matrix. The amount of power in each frequency-mode combination should be low in such a way that, data bit will be detectable only when all the five frequency-mode combinations are received properly, which is necessary to avoid data interception. It is understood from the code matrices that, each frequency-mode combination can have maximum 12 different user data, assuming all the 36 users are transmitting simultaneously.

Also, it is well known that if multiple users share some common frequency-mode combination, it is not possible to distinguish their data even with frequency-mode demultiplexer. In order to understand this further, the correlation characteristics between different code matrices were studied. For any code word \(X\in C\), where C is a set of binary \(a \times b\) matrices, the autocorrelation sidelobe of X is calculated using the following expression,

$$\sum_{i=0}^{a-1}\sum_{j=0}^{b-1}{x}_{i,j}{x}_{i,j\oplus \tau }$$

where τ is any integer \((0<\tau <b)\). Similarly the cross correlation of code words \(X, Y\in C\) is calculated using the following expression,

$$\sum_{i=0}^{a-1}\sum_{j=0}^{b-1}{x}_{i,j}{y}_{i,j\oplus \tau }$$

where τ is any integer \((0\le \tau <b)\).

Using the above-mentioned expressions, the correlation characteristics of the proposed code set was analyzed using MATLAB R2019b. Figure 1 shows the correlation between code matrices S1G1, S1G2 and S1G3 with all other codes and for other codes also similar plots have been obtained. It can be seen that for example, m1 and m6 have one common frequency-mode combination f1-LP11 and hence f1-LP11 will have both user 1 and user 6 data which means 20% of user 1 signal power is mixed with unintended signal. Also, Fig. 1 clearly shows, m1 is orthogonal with m2, m3, m14 and m32, m2 is orthogonal with m1, m3, m13 and m31, m3 is orthogonal with m1, m2, m15 and m33. m1, m2 and m3 thus can be formed as an orthogonal group and it has been observed that 12 such groups namely G0 S1, G1 S1, G2 S1, G0 S2, G1 S2, G2 S2, G0 S3, G1 S3, G2 S3, G0 S4, G1 S4 and G2 S4 can be formed.

Fig. 1
figure 1

Correlation between code matrices a S1G1 b S1G2 c S1G3 with other 36 code matrices

Each frequency-mode spread orthogonal group can also be made to hop among twelve time slots based on any random permutation algorithms such as Fisher–Yates shuffle, Sattolo's algorithm and their variant algorithms. Thus, it is possible that all 36 users can be made to transmit within the bit period, with the use of narrow pulses, and additionally data security against interception also can be enhanced due to time hopping. Frequency-mode combinations corresponding to all the 36 codes in the proposed code set along with their respective time slot for transmission are listed in Table 3.

Table 3 Frequency-mode combinations corresponding to the proposed code set

3 Simulation model for transmitter and receiver

The transmitter model for the proposed OCDMA system is shown in Fig. 2a. Each user data is modulated based on the respective code matrix generator which decides the spreading of frequency and mode for that user. Group of user’s data which are orthogonal, are combined and a time slot is assigned based on the time hop sequence. All the orthogonal groups thus formed are combined together before transmission through the fiber. The receiver model is shown in Fig. 2b. The signal from the fiber is given to 1 × 36 power splitter and each user’s data is decoded using the respective code matrix at the specific time slot which is decided by the time hop pattern followed in the system. The decoded optical signal is given to photo detector and BER is calculated using Gaussian approximation.

$$P_{{{\text{error}}}} = \frac{{N_{0} }}{{N_{0} + N_{1} }}P_{{{\text{err}}0}} + \frac{{N_{1} }}{{N_{0} + N_{1} }}P_{{{\text{err}}1}}$$

where N0, N1 denotes number of bit 0 and bit 1 samples, respectively, Perr0 is the probability that output voltage exceeds threshold when bit 0 is transmitted and Perr1 is the probability that output voltage is less than threshold when bit 1 is transmitted. Perr0 and Perr1 depend on mean and standard deviation of sampled signals and the threshold value.

Fig. 2
figure 2

a Transmitter and b Receiver model for the proposed OCDMA system with 36 users

Figure 3 shows the simulation layout of the transmitter section for 36 concurrent users. Each encoder in the layout corresponds to a group of three orthogonal users and each group’s data is transmitted in the specific time slot. Data from all the groups are combined before transmission through optical fiber. As an example, the encoder corresponding to the eighth time slot is shown in Fig. 4 which illustrates the modulation of three user data using code matrices S3G4, S3G5 and S3G6, respectively. The width of the pulse generator is set to be less than one twelfth of the bit period.

Fig. 3
figure 3

Simulation layout of the transmitter for the proposed system with 36 users

Fig. 4
figure 4

Simulation layout of t8 time slot encoder

The layout for code matrix generation is shown in Fig. 5. CW laser array, measured transverse mode generators and a power combiner are used for each code matrix generator. Each measured transverse mode component is loaded with LP01, LP11, LP02, LP12 and LP03 mode profiles, respectively. Specific code matrix is generated by properly connecting the particular CW laser array output port with the corresponding mode generator. For S3G6 code matrix, as explained earlier, LP01 mode at 193.3 THz, LP11 at 193.2 THz, LP02 at 193.1 THz, LP12 at 193.1 THz and LP03 at 193.3 THz are generated. All the five frequency-mode pair are then combined and given to Mach–Zehnder modulator.

Fig. 5
figure 5

Simulation layout of the S3G6 encoder

Figure 6 shows the simulation layout of the receiver section for all the 36 users. Each user has a dedicated decoder section, photo detector and low noise filter. Details of the decoder for orthogonal group of users are shown in Fig. 7. It is necessary to have exact code matrix and time slot decoding as that of transmitter. Frequency-mode demultiplexer is used for code matrix decoding as shown in Fig. 8. Time slot decoding can be done with the help of pulse generator and simple modulator working at 1 Gbps clock. Pulse position within the bit period need to be set in accordance with the time delay assigned for that user in the transmitter.

Fig. 6
figure 6

Simulation layout of the receiver for the proposed system with 36 users

Fig. 7
figure 7

Simulation layout of t8 time slot decoder

Fig. 8
figure 8

Simulation layout of the S3G6 decoder

For code matrix decoding, spatial demultiplexer component in optisystem 17.0 is used and it splits the composite signal and separates all the 15 frequency-mode combinations. At first it demultiplexes the three frequency channels (193.1 THz, 193.2 THz and 193.3 THz) and then separates out all the LP modes (LP01, LP11, LP02, LP12 and LP03) associated with each channel. Five frequency-mode pairs corresponding to the code matrix used in the transmitter are then combined and given to time slot decoder. For S3G6 decoder, LP01 mode at 193.3 THz, LP11 at 193.2 THz, LP02 at 193.1 THz, LP12 at 193.1 THz and LP03 at 193.3 THz are taken from spatial demultiplexer output ports and are combined. Different parameters used for the simulation of the proposed OCDMA system are listed in Table 4.

Table 4 Simulation parameters

4 Simulation results

The performance of the proposed code, as observed using MATLAB R2019b, is also verified using OptiSystem 17.0 simulation software. For simulation, Pseudo random sequence generators are used for all 36 users and the sequence length is kept as 1024. Each user’s data rate is kept at 1 Gbps and the 1 ns bit period is divided into 12 time slots so that 12 orthogonal groups can be accommodated within the bit period. Figure 9 shows the pulse sequence when all the 36 users transmit their data and it can be seen that each 1 ns bit period contains 12 pulses corresponding to different orthogonal groups. The difference in the pulse levels is due to the randomness in the generation of bit 1 or bit 0 at specific bit period for different users.

Fig. 9
figure 9

Pulse sequence with all the 12 orthogonal groups

The BER performance for one user, for example, when all the 36 users are transmitting concurrently in the proposed OCDMA system is shown in Fig. 10. The user data at the transmitter side is shown in Fig. 10a and the correctly received sequence after proper decoding at the respective time slot is shown in Fig. 10b. The corresponding eye diagram is given in Fig. 10c and the BER observed is 0. For all other users also similar results were obtained.

Fig. 10
figure 10

a Transmitted data b Received data c Eye diagram for one user when all 36 users transmit in the system

When decoding is done using incorrect code matrix or at incorrect time slot, it is not possible to retrieve the transmitted data and is shown in Fig. 11. Figure 11a shows a sample transmitted data sequence of one user and it is decoded using a code matrix which is not the intended one. The corresponding decoded data can be seen in Fig. 11b and the interference from other user’s data can be clearly understood. For another sample transmitted data sequence as shown in Fig. 11c, the decoding is done using correct code matrix but at incorrect time slot. It results in a decoded output with MAI as shown in Fig. 11d. For both the cases, the BER is 1 and the corresponding eye diagram can be seen in Fig. 11e. Thus it is clear that both code matrix and the decoding time slot need to be correct in order to distinguish the intended user from other users in the network.

Fig. 11
figure 11

a Transmitted data 1 b Decoded data for correct timeslot and incorrect code matrix c Transmitted data 2 d Decoded data for incorrect timeslot and correct code matrix e Eye diagram for incorrect decoding

As the proposed coding procedure spreads in frequency, propagation modes and time, it is effective to support maximum number of users with enhanced data security and it has been proved for 36 users when P1 = 5 and P2 = 3. The same can be expected for higher values of P1 and P2 when frequency spreading, mode spreading and time hopping (FS/MS/TH) is used as proposed.

For the proposed coding method, maximum number of users concurrently supported by the system can be represented as,

$${\text{No}}{.}\;{\text{of}}\;{\text{concurrent}}\;{\text{users}} = (P_{1} - 1)\,(P_{2} \times P_{2} )$$

Figure 12 shows the plot between the number of frequency channels required and the corresponding increase in the number of accommodated users for the proposed OCDMA system. It can be easily observed that with respect to slight increase in the required frequency channels, there is rapid rise in the number of supported users. This can be more effectively understood in terms of spectral efficiency as shown in Fig. 13.

Fig. 12
figure 12

No. of users in the proposed OCDMA system for different no. of frequency channels

Fig. 13
figure 13

Spectral efficiency with respect to no. of channels

The spectral efficiency for the proposed coding system can be calculated as [15],

$${\text{Spectral}}\;{\text{Efficiency}} = \frac{{(P_{1} - 1)\,P_{2} \times R_{b} }}{\Delta f}$$

where Rb is the bit rate per user and ∆f is the spacing between the frequency channels used. In Fig. 13, the spectral efficiency is plotted for various per user bit rate and frequency spacing. Sharp hike in the spectral efficiency for even a small change in the frequency channels used can be seen from the figure. Nearly 100 b/s/Hz spectral efficiency can be expected when the 2D code set is constructed using prime numbers 17 and 15 for prime sequences and GPMP sequences, respectively, and using per user bit rate as 10 Gbps, frequency spacing as 25 GHz.

In general, conventional prime code binary sequences require long code lengths to suppress MAI. Within the bit period thus more time slots need to be assigned which necessitates the use of very narrow optical pulses. For the proposed FS/MS/TH coding method, the number of time slots required within the bit period will be less compared to the wavelength hopping and time spreading (WH/TS) code. The comparison between both the coding methods is shown in Fig. 14. For the same prime numbers used for prime sequences and GPMP sequences, number of time slots required per bit period for WH/TS code set (P1P2) and the proposed FS/MS/TH code ((P1-1) P2) are plotted and it can be understood from Fig. 14 that FS/MS/TH will not necessitate the use of optical pulses as short as WH/TS. Hence in terms of narrow pulse width requirement also, the proposed coding method can perform better than the conventional 2D time spreading codes.

Fig. 14
figure 14

Required number of time slots for different code size

For the proposed FS/MS/TH coding procedure, the probability of detecting the correct code word will be less as the interceptor has to correctly identify both the code matrix and the time slot to which the user is allotted. Under the following assumption that the power in each frequency-mode combination is small so that the data bit can be correctly decoded only when all the frequency-mode combinations are properly received, the probability of intercepting user’s data Pdet can be calculated as,

$$P_{\det } = \frac{1}{{(P_{1} - 1)P_{2} }} \times \frac{{(P_{1} P_{2} - P_{1} )!}}{{(P_{1} P_{2} )!}}$$

The ability of the interceptor to distinguish bit 1 and bit 0 using proper threshold is not considered here and the code interception probability will decrease further if the interceptor is not able to distinguish the data bits. Figure 15 shows the probability of detecting the correct code word with respect to code size. It can be understood that when code size increases, the code interception probability decreases rapidly. Data security is reasonably high even with FS/MS alone and the added advantage due to time hopping of orthogonal groups can be clearly seen in the figure and it further enhances the data security. The correlation characteristics of the proposed code set along with the ability to shuffle the assigned time slot may not guarantee a cryptographic level of data security, but certainly will provide an additional level of signal obfuscation.

Fig. 15
figure 15

Code interception probability with code size

The performance of FS/MS/TH coding method can be compared with some of the works reported earlier and is given in Table 5. For WH/TS using prime codes, total number of distinct codes will be 110 when P = 11 for example, but it had been proved that only 20 users can transmit their data simultaneously with tolerable BER due to MAI limitation and a total of 11 wavelengths will be required for the 20 users [7]. Instead of prime codes, 2D OCDMA using modified pseudo-noise matrix codes (MPMC) was analyzed in [8] and in their work, 8 wavelengths were used to achieve a cardinality of 7. WH/TS using optical complementary code (OCC) and zero correlation code (ZCC) was reported in [9] and the authors have claimed that, the cardinality is 9 if 11 frequency channels are used and P = 3 is used for OCC generation. In a 3D OCDMA code using frequency, time and mode [16], it has been reported that when the cardinality is 8, the system supports 6 users (BER ~ 10–9) using 9 wavelengths. Also, when P = 11, the cardinality will be 120 and 121 wavelengths will be required according to their coding method. When 11 frequency channels are used, however, our proposed work will support 1452 users using 13 modes with the help of orthogonal group formation as mentioned earlier. The proposed system thus will guarantee more number of users, high spectral efficiency and also enhanced data security. Further, the proposed coding procedure is not only limited to prime code sequences and can be extended to other code family also. Number of frequency channels, number of modes and time slots required and hence the number of concurrent users will vary accordingly.

Table 5 Comparative analysis of some 2D/3D OCDMA systems

5 Conclusion

The coding method which utilizes the conventional prime sequences with novel approach was proposed in this paper. It has been proved that, with the use of frequency and mode spreading and partially using time domain, the drawbacks associated with time spreading can be avoided in the proposed method and all possible code words in the code set can be effectively utilized and assigned to different users. Also theoretical calculation assures further enhancement of data security with the inclusion of time hopping along with FS/MS. The obtained results show that all the 36 users in the proposed code set can simultaneously transmit and receive their data within the bit period without MAI using 3 frequencies, 5 modes and 12 time slots. Also it has been observed that the narrow pulse width requirement will be less in the proposed method compared to the existing time spreading coding methods. Simulation results using the proposed coding method hence strongly confirm the scope for improvement in spectral efficiency of OCDMA networks and the proposed coding set would find applications in synchronous access networks which demand high level of network security and flexibility.