^{-9}can also be reduced by several decibels. So the performance of OCDMA can be improved.

## 1.

## Introduction

Optical code division multiple access (OCDMA) technology is getting more and more attractive for its random asynchronous accessibility, simple network management, and high level of security. Recently, several schemes have been proposed for designing the encoders (decoders) in OCDMA systems. Among them, encoders (decoders) fabricated by super structure fiber Bragg grating (SSFBG) technology^{1} have the advantage of lower multiuser interference (MUI) and low cost, and they may have a promising application. To get higher signal-to-noise ratio (SNR) and enlarge the system’s soft capability simultaneously, the code length of the SSFBG encoder is always increasing from 7/63 (Ref. 1) to 127,^{2} 255,^{3} up to 511.^{4} Because these encoders use bipolar code, all of them are coded with a Gold sequence, which has been thoroughly studied. However, from research, we find that this code is not the best choice for SSFBG encoding. In this paper, the code used in SSFBG will be optimized. We will propose a new kind of code [multipolar inserting zeros (MIZ) code] to replace the conventional Gold sequence, then the MUI can be decreased further.

## 2.

## SSFBG Coding

SSFBG is defined as a standard fiber grating, that is, with a rapidly varying refractive index modulation of uniform amplitude and pitch, onto which an additional, slowly varying refractive index modulation profile has been imposed along its length. For a SSFBG encoder (decoder), the slow varying profile just represents the code sequence (as depicted in Fig. 1) and each code bit correlates with a chip of the fiber Bragg grating (FBG). In unipolar coded SSFBG, the code bit can only be 0 or 1, then only the amplitude of the FBG’s refractive index is modulated; while for bipolar coded SSFBG, the code bit can be 1 or $-1$ , so only the phase of the FBG’s refractive index is modulated.

Because bipolar coded SSFBG can significantly decrease the MUI compared with unipolar coded,^{1} until now all the work related to SSFBG coding used a Gold sequence, a mature bipolar code. However, as illustrated in Ref. 1, the decoded signal can be regarded as the spread of input signal in time domain by the linear convolution of the encoder (decoder) code sequences; then a Gold sequence may not be the best choice for SSFBG coding because it is designed for a circular convolution judgment system. So we proposed the MIZ code to correspond with SSFBG coding. The code bit in MIZ can be 0 or
$\mathrm{exp}(i\pi \u2215n)$
, so both the amplitude and phase of the FBG’s refractive index can be modulated.

## 3.

## Code Construction

We first present a simple MIZ example. In Table 1, four sequences constructed with 0, $\pm 1$ are given. These sequences have the following characteristics: (1) 0 appears in the same position; (2) in each sequence, the bit distance between each two nonzero bits is different; (3) the dot product of each two sequences is 0. In fact, these are the general characteristics of MIZ code. A MIZ code with length $n$ and weight $k$ can be constructed with the following steps: first, decide which $k$ bits should be set as nonzero, so as to satisfy characteristic 2; second, choose an appropriate Hadamard matrix of order $k$ and fill the code’s $k$ nonzero bits with the matrix’s rows, $k$ rows generate $k$ sequences, then characteristics 1 and 3 can be satisfied automatically. If the Hadamard matrix is of polar $r$ , we named the code as $\mathrm{MIZ}(r,k,n)$ . Then the code in Table 1 can be named as MIZ(2,4,7).

## Table 1

A simple MIZ code.

1 | 0 | −1 | 0 | 0 | −1 | −1 |
---|---|---|---|---|---|---|

$-1$ | 0 | 1 | 0 | 0 | $-1$ | $-1$ |

$-1$ | 0 | $-1$ | 0 | 0 | 1 | $-1$ |

$-1$ | 0 | $-1$ | 0 | 0 | $-1$ | 1 |

The two steps above for constructing $\mathrm{MIZ}(r,k,n)$ code can be described as find out the seed sequence, and polarize the seed sequence. The details are given below.

## 3.1.

### Find Out the Seed Sequence

Seed sequence refers to a sequence constructed of $n-k$ 0’s and $k$ 1’s, where the bit distances between each two 1’s are different. Let $q=k-1$ , when $q$ is a prime number or a prime number’s power, based on the theory of cyclic difference sets, the seed sequence can be constructed as follows:

1. Find a primitive polynomial of order 3 in finite field ${F}_{q}$ . Represent each nonzero element ${\alpha}^{i}(0\le i\le {q}^{2}+q)$ in ${F}_{{q}^{3}}$ as the linear combination of $1,\alpha $ , and ${\alpha}^{2}$ , where $\alpha $ is a primitive element in ${F}_{{q}^{3}}$ .

2. Find out all the elements ${\alpha}^{i}$ in the hyperplane generated by 1 and $\alpha $ , and then the exponents of these elements compose a cyclic difference set: $S$ .

3. For each $i$ , $0\le i\le {q}^{2}+q$ , do the shift operation $S+i$ (i.e., add $i$ to all the elements in $S$ ) under modulus ${q}^{2}+q+1$ . Find out the number ${i}^{*}$ that makes $\mathrm{max}\{S+i\}$ reach its minimum.

Finally, all the elements of $S+{i}^{*}$ denote the positions of bit 1’s in the seed sequence.

## Table 2

The minimum length of seed sequence for different q .

q | Primitive Polynomial | Code Length n | q | Primitive Polynomial | Code Length n |
---|---|---|---|---|---|

7 | ${x}^{3}+{x}^{2}+4$ | 36 | 19 | ${x}^{3}+{x}^{2}+18x+4$ | 284 |

9 | ${x}^{3}+{x}^{2}+\beta x+(\beta +1)$ | 56 | 23 | ${x}^{3}+{x}^{2}+17x+10$ | 426 |

11 | ${x}^{3}+{x}^{2}+5x+7$ | 86 | 25 | ${x}^{3}+{x}^{2}+2(\beta +2)x+4(\beta +1)$ | 493 |

13 | ${x}^{3}+{x}^{2}+7x+2$ | 128 | 27 | ${x}^{3}+{x}^{2}+{\beta}^{2}x+2({\beta}^{2}+1)$ | 586 |

16 | ${x}^{3}+{x}^{2}+({\beta}^{3}+1)x+({\beta}^{2}+\beta )$ | 202 | 29 | ${x}^{3}+{x}^{2}+7x+12$ | 681 |

17 | ${x}^{3}+{x}^{2}+12x+1$ | 217 | 31 | ${x}^{3}+{x}^{2}+28x+22$ | 785 |

Note: When q=9 , β is the root of x2+x+2=0 in F3 . When q=16 , β is the root of x4+x+1=0 in F2 . When q=25 , β is the root of x2+x+2=0 in F5 . When q=27 , β is the root of x3+2x+1=0 in F3 .

## 3.2.

### Polarize the Seed Sequence

The objective of polarization is to construct a Hadamard matrix of order $k$ and polar $r$ , and then fill the nonzero bits in the seed sequence with the rows of $H(r,k)$ . It should be noticed that not for any $k$ or $r$ , $H(r,k)$ can be constructed. Table 3 shows the order and polar of the 27 smaller order Hadamard matrices.

## Table 3

Hadamard matrices’ order and polar.

H(p,n) | H(p,n) | H(p,n) |
---|---|---|

(2,2) | (2,36) | (3,36) |

(2,4) | (2,40) | (4,4) |

(2,8) | (2,44) | (4,8) |

(2,12) | (2,48) | (4,12) |

(2,16) | (3,3) | (4,16) |

(2,20) | (3,6) | (5,5) |

(2,24) | (3,9) | (5,10) |

(2,28) | (3,18) | (6,12) |

(2,32) | (3,27) | (7,14) |

Their construction methods are illustrated in Refs. 5, 6. Using these matrices, we can polarize the seed sequence whose weight appears in Table 3 as the matrix’s order.

## 4.

## Correlation Property

From Sec. 3, it can be found that the self-correlation peak of $\mathrm{MIZ}(r,k,n)$ is $k$ since it has $k$ nonzero bits. Also because the bit distances between each two nonzero bits are different, its maximum self-correlation wing and cross-correlation peak are both 1. So the ratio of maximum autocorrelation wing to autocorrelation peak $(W\u2215P)$ and the ratio of cross-correlation peak to autocorrelation peak $(C\u2215P)$ for $\mathrm{MIZ}(r,k,n)$ are both $1\u2215k$ . On the other hand, as the Gold sequence is designed based on cycle convolution, an analytical expression for its $W\u2215P$ and $C\u2215P$ under linear convolution cannot be obtained and they can only be estimated from numerical calculation. In Table 4, $W\u2215P$ and $C\u2215P$ of the MIZ code and the Gold code with close code length are compared.

## Table 4

The correlation parameters for Gold and MIZ sequence at close code length.

W∕P | C∕P | |
---|---|---|

127 Gold | 0.126 to 0.2126 | 0.1339 to 0.2205 |

128 MIZ | 0.0714 | 0.0714 |

255 Gold | 0.1176 to 0.1725 | 0.1176 to 0.1725 |

284 MIZ | 0.05 | 0.05 |

511 Gold | 0.0802 to 0.1429 | 0.0802 to 0.1429 |

493 MIZ | 0.0385 | 0.0385 |

From this table, it can be seen that under close code length, the $W\u2215P$ and $C\u2215P$ of the MIZ code are much smaller than those of the Gold code. So the MIZ coded system will also have a much higher SNR than that coded with Gold.

## 5.

## Simulation Results

To give a further comparison between MIZ and Gold sequences, a simulation model of direct-sequence OCDMA (DS-OCDMA) system is proposed. For convenience, the dispersive and nonlinear effects in the fiber are ignored. The power loss within the channel is also not considered. We use a random signal that obeys Gaussian distribution to calculate all the noises in the channel, including the shot noise, thermal noise, quantum noise, and other noise sources. Six cases are considered: 127-chips, 255-chips, and 511-chips SSFBG coded by Gold sequence (G-127, G-255, and G-511), 128-chips, 284-chips, and 493-chips SSFBG coded by MIZ code (M-128, M-284, and M-493). The simulation results are given in Fig. 2 and Fig. 3.

In Fig. 2, with ${P}_{out}=500{P}_{n}$ ( ${P}_{out}$ is output power for each user’s optical source, and ${P}_{n}$ is the average noise power), the bit error rate (BER) of the system is calculated for different users. It can be seen that for each pair—G-127 and M-128, G-255 and M-284, G-511 and M-493 (because the pulse width of the input signal is limited by the code length, only the sequences with close length in the two kinds of codes have comparability)—the BER in MIZ is much lower than that in Gold, and several decuples of improvement can be achieved. In Fig. 3, the minimum ${P}_{out}$ for reaching the BER of $1\times {10}^{-9}$ with different number of users is given. It can be seen that for each comparable pair, both the output power and power penalty (denoted by the slope of the curves) in MIZ are much lower than that in Gold. From 1 to several decibels power reduction can also be achieved for different numbers of users.

## 6.

## Conclusions

We have proposed the MIZ code for SSFBG coding. With MIZ coded SSFBG in DS-OCDMA systems, the MUI can be significantly decreased compared with that coded by Gold, so a better BER performance can be achieved. Because MIZ code is designed basing on linear convolution, it can also be used for other systems that use linear convolution for signal recognition.