2. Implementation and verification of the CDMA over fiber optics circuit

advertisement
EE 536 Spring 2011: Term Paper
CDMA over Optical Fiber
Camerin Hahn, Hector Reyes, Ahmed Rabbi, and Waqas Ahmad
Depart of Electrical Engineering
University of North Dakota
Grand Forks ND 58203-7165, USA
Phone: 701-770-6266 Email: camerin.hahn@gmail.com
Abstract
Spread spectrum multiple access communication, known commercially as CDMA (Code
Division Multiple Access), is a driving technology behind the rapidly advancing personal
communications industry [1], providing greater bandwidth efficiency and multiple access
capabilities. The applications of CDMA range from cellular mobile to wireless data transmission
as well as from personal computing to RF engineering. The increased robustness against various
kinds of interferences, such as multipath fading and narrow band interference are the prominent
features of CDMA. In this project, digital communication using CDMA over fiber will be
investigated. The goal of the project is to investigate the benefits and shortcomings of this
method in fiber optic communications as compared to other techniques. Besides the literature
survey and through study, attempts will be made to demonstrate the system for communication
between two devices.
1. Introduction
Code Division Multiple Access, CDMA, is a driving technology behind the rapidly
advancing personal communications industry [1]. The applications of CDMA range from cellular
mobile to wireless data as well as satellite communications. The term CDMA must not be
confused with the mobile standards cdmaOne and CDMA2000 that use CDMA in their
underlying levels to distribute the access to the channel. CDMA is used in other systems such as
IEEE802.11, Bluetooth, Zigbee, UMTS and in satellite navigation systems like GPS, Glonass,
and Galileo.
The success of CDMA in wireless communications awakened the interest of applying it
to optical fiber communications. Another reason is the high bandwidth available in fiber-optic
medium. The Spread Spectrum Technique can take advantage of this huge bandwidth as the
required processing gain to provide multiple access capability to the network [2]. An intensive
research work on optical CDMA (OCDMA) started two decades ago [3]. This work is mostly
related with the application of OCDMA to LAN (Local Area Network) networks since this
technique, CDMA,
is more flexible and scalable than WDM (Wavelength Division
Multiplexing) in these kinds of scenarios, LAN.
1
EE 536 Spring 2011: Term Paper
Code Division Multiple Access is a technique that allows several users to share the
spectral resources of a medium. This is accomplished by assigning special codes to each one of
the users. These codes have special properties that make it possible to differentiate the users
sharing the same channel. There several kinds of codes employed in CDMA systems such as msequences, Gold Codes and Hadamard-Walsh orthogonal codes [3]. These codes are used along
with the Spread Spectrum Technique to allow many users to communicate more effectively. In
fact, CDMA is an important application of the Spread Spectrum technology.
2. Implementation and verification of the CDMA over fiber optics circuit
2.1. CDMA Hardware
The CDMA over fiber optics was implemented by means of a Xilinx Spartan FPGA
demo board and an external XOR IC 74LS86. The FPGA was used to generate the spreading and
the de-spreading codes at the receiver and at the transmitter respectively. The spreading and despreading codes are 8 bits long and are entered to the system by means of external switches.
There 16 external switches, 8 switches for the transmitter and 8 switches for the receiver. The
FPGA circuit basically acts as parallel to serial converter allowing many custom spreading
codes. This circuit is described in VHDL by using the ISE 9.2i software. The bits of the
spreading code are called chips in order to differentiate them from the bits of the information
sequence; therefore, we have Rch and Rb, being the first the chip rate and the second the bit rate.
The VHDL description of the circuit sets the bit rate of the spreading at frequency about 8 times
bigger than the bit rate of the information. The figure 1 shows the transmitter.
Figure 1. Transmitter
2
EE 536 Spring 2011: Term Paper
The XOR (74LS86) gate spreads the information sequence Rb with the spreading code.
Then the spread information is sent on the optical system (This is the experimental kit found in
the Lab). The spread information, now converted to the optical domain, arrives in the receiver
system. In the receiver, the information sequence in recovered by mean of the de-spreading code,
which should coincide with the spreading code for proper dispreading. Figure 2 shows that the
receiver has the same structure as the transmitter. The XOR gate recovers (de-spreads) the
information sequence as mentioned before.
Figure 2. Receiver used with copper wire
2.2. Fiber Optics Kit
In order to verify the CDMA transmission through optical fiber, we used KOP-100 fiber
optics kit. It has the capability of modulating the data using pulse-width modulation (PWM) and
intensity modulation (IM).
For PWM data transmission, the input signal (Vin) is fed to a modulator which generates
a train of constant frequency, constant amplitude, duty-cycle modulated rectangular pulses.
These pulses are converted to light pulses by a LED and transmitted along the fiber. The
photodetector signal is fed into a current to voltage converter, the output of which feeds a
demodulator. The demodulator output signal’s amplitude (Vout) and pulse width are proportional
to the input signal [4]. PWM modulation can be chosen using the ‘mod’ switch on the fiber
optics kit.
For IM transmission, the input signal (Vin) directly modulates the LED current and
therefore the optical signal. The photodectector then converts the optical signal to a current
3
EE 536 Spring 2011: Term Paper
which is fed into a current to voltage converter. This output drives a loudspeaker [4]. IM
transmission can be chosen using the ‘dir’ switch on the fiber optics kit.
The key difference between the two systems is that the amplitude of the electrical signal
driving the LED is a constant in the case of PWM but is variable for the direct (IM) transmission
[4].
2.3. Implementation and verification
In order to test the system, the transmitter and the receiver were first connected by means
of a copper cable instead of an optical fiber. The objective of this test was to see if the transmitter
and the receiver were working and if it was possible to recover the information once it was
spread in the transmitter. For this test, a pulse generator was used as information source. The first
step was to test the system by using the same code at the transmitter and at the receiver. Figure 3
shows the results. As one can see when the spreading code (number 1) is equal to the despreading code (number 2), the signal obtained at the receiver (number 4) coincides with the
information sequence.
Figure 3. Results with spreading code equal to de-spreading code with a copper wire connecting TX and RX
4
EE 536 Spring 2011: Term Paper
Figure 4. Results with spreading code different from de-spreading code with a copper wire connecting TX and RX
On the other hand, figure 4 shows that when the spreading code and the de-spreading
codes are different, the signal obtained at the receiver is different from the information sequence;
therefore, under these circumstances, it is impossible to recover the signal at the receiver.
Figures 3 and 4 were obtained by means of a Tektronix TDS 2024B Four Channel Oscilloscope.
Figures 3 and 4 also allow us to see the difference in frequency between the spreading code and
the information. The spreading code frequency is greater than the information frequency as
required in any CDMA system. In figure 4, it is possible to see that when the information is not
recovered, the signal obtained at the receiver has a frequency close to the spreading code
frequency.
After knowing that the system was working with a copper cable, this copper was
substituted by the optical system as in figure 1 and 2. Because some undesired high frequency
components were obtained at the output signal, the receiver circuit was modified as in figure 5 in
order to filter out those components. In the receiver, two 2.2 μF send the undesired high
frequency components to ground. The XOR gate, with one of its inputs connected to logical 0
helps to recover the shape of the pulse, because it eliminates the fluctuations of the voltage.
Figure 6 shows the signal obtained at the receiver when the spreading and the de-spreading codes
coincide. Although, the shape of the signal is not as good as in figure 3, the data signals were
recovered satisfactorily. On the other hand, figure 7 shows that when the spreading and despreading codes are different, the signal obtained at the receiver is totally different from the
original data. This circuit was tested under the next conditions:
Rb= 30 bps
RCH = 250 chips/sec
5
EE 536 Spring 2011: Term Paper
The rate that travels through the fiber was 250 chips/sec. It was attempted to send higher
RCH; however, the signal obtained was not acceptable. Because of that, it was necessary to
reduce RCH in order to obtain an acceptable signal as in figure 6. Probably, this limitation is
imposed by the LED and the photo detector of the optical system. Because there was no
documentation of the optical system, we found out this limit empirically.
Figure 5. Receiver used when the optical fiber was connecting TX and RX
Figure 6. Results with spreading code equal to de-spreading code with an optical fiber connecting TX and RX
6
EE 536 Spring 2011: Term Paper
Figure 7. Results with spreading code different from de-spreading code with an optical fiber connecting TX and RX
3. Application of CDMA over Fiber Technology
CDMA over fiber is a method of spreading the bandwidth across many simultaneous
users cannel. By setting the Chip Rate at the maximum bit rate, one can then efficiently spread
the transfer speed across many users, without using extra channels. This method allows many
users to share the same bandwidth without a complex sharing scheme; simply mixing the signals
will allow the desired results. Along with the benefit of multiple accesses to the same single, the
use of CDMA allows for additional security. If multiple users are allowed to communicate ate
the same time on the same channel, this means that all users will have access to the parts
transmitted on those lines. With CDMA both sides must have the same spreading code to decrypt
the data. Without the proper codes, the fact that user has access to the raw data will not affect the
security of the transmission. The combination of these advantages makes the CDMA technology
ideal for Fiber Optic communication.
Due to a high bit rate allowed in fiber optics, the chip rate can be made very high. Earlier
the fact that a chip rat must be much higher than the data bit rate. By spreading the spectrum
using CDMA, this high data rate can be shared amongst many users.
4. Conclusion and Future Work
In this project, we used 8 bit numbers. Therefore, the system can detect one bit error.
However, we have done anything on error detection or correction due to time constraint. The
formula for error detection in a CDMA transmission system is given below.
𝑛
𝑡 = 4−1
where, 𝑡 = no. of errors and 𝑛 = 8, 16, 64 …
7
(1)
EE 536 Spring 2011: Term Paper
Table 1. shows the number of bits and corresponding error detection and correction capacity. The
more the bit numbers the error detection capacity increases. For our implementation, it would be
possible to incorporate error detection and correction for single bit. For 64 bit system, the error
detection and correction capacity increases to 15 bits.
Table 1. Number of bits and corresponding error detection and correction bit number
n (bits)
t (number of error correction bits)
8
1
16
3
64
15
Our CDMA system functions at very low frequencies. The highest operating frequency of our
CDMA system is limited by the speed of the transmission and receptions diodes. The current
transmission and reception diodes only function in the audio frequency domain. This limits our
transmission rates to that of a few kbs. With more work, and high frequency diodes, this system
could function much faster. At that point the limitation would be contained in the chip generator,
in our case the FPGA. A faster chip generator must be used to make the CDMA system work
well over a fiber system.
The final short coming of our system is the chip synchronization system. This system is
designed to align the receiving chip generator to the received encoded data. If the transmission
and reception chips are not aligned the signal will not be decoded, much like when the wrong
code is used to decrypt the data.
8
EE 536 Spring 2011: Term Paper
Appendix
A.1. The VHDL code for the FPGA parallel to serial converter:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity NRZI is port(clk: IN std_logic;
A: IN std_logic_vector (7 downto 0);
B: IN std_logic_vector (7 downto 0);
Y: OUT std_logic;
Z: OUT std_logic);
end NRZI;
architecture Behavioral of NRZI is
signal onesecond_clk:std_logic;
signal code:std_logic:='0';
signal codeB:std_logic:='0';
begin
-- This process is a clock divider
-- This divider provides a 250 hz clock
p1:process(clk)
variable cnt: integer;
begin
if rising_edge(clk) then
If cnt = 50000 then
onesecond_clk <= not onesecond_clk;
cnt := 0;
else
onesecond_clk <= onesecond_clk;
cnt := cnt +1;
end if;
end if;
end process;
-- This process performs the Parallel to serial conversion to
-- provide the spreading code.
p2: PROCESS (onesecond_clk)
variable i: integer:=0;
BEGIN
IF rising_edge(onesecond_clk) THEN
if i=7 then
IF A(i)='0' THEN code <= '0';
ELSE code<='1';
END IF;
i := 0;
ELSE
9
EE 536 Spring 2011: Term Paper
IF A(i)='0' THEN code <= '0';
ELSE code<='1';
END IF;
i := i+1;
END IF;
Y<=code;
END IF;
END PROCESS;
-- This process performs the Parallel to serial conversion to
-- provide the de-spreading code.
p3: PROCESS (onesecond_clk)
variable i: integer:=0;
BEGIN
IF rising_edge(onesecond_clk) THEN
if i=7 then
IF B(i)='0' THEN codeB <= '0';
ELSE codeB<='1';
END IF;
i := 0;
ELSE
IF B(i)='0' THEN codeB <= '0';
ELSE codeB<='1';
END IF;
i := i+1;
END IF;
Z<=codeB;
END IF;
END PROCESS;
End Behavioral;
REFERENCES
[1] A. J. Viterbi. CDMA, Principles and Applications. Addison-Wesley 1995.
[2] I. Fridyes. CDMA in Optics. Invited Paper. IEEE Ninth International Symposium on Spread
Spectrum and Applications. 2006.
[3] I. Fridyes. CDMA in Optics. Invited Paper. IEEE Ninth International Symposium on Spread
Spectrum and Applications. 2006. [4] S. Zahedi, J.A. Salehi,” Analytical Comparison of Various
[4] KOP-100 fiber optics kit manual.
[5] Fiber-Optic CDMA Receiver Structures, Journal of Lightwave Technology, Vol 18, No. 12,
December 2000.
10
Download