MATLAB FIGURES & PROGRAM LOGIC: Transmitter: The figures and the logic used for the MATLAB are given below. Binary Data Sequence: For our project we assume that we have the digital binary data stream. We are randomly generating a binary data stream of 20 bits. The binary data generated is plotted as shown, Polar Non Return to Zero (NRZ) Encoding: In Polar NRZ format a bit is represented between two levels (1and -1). So we are appending 15 ones for the bit 1 & 15 negative ones for the bit 0. In this way we are getting a square NRZ waveform, which is plotted to get the following figure. Demultiplexer: The major purpose of Demultiplexer is to divide the NRZ bit stream I and Q components. The odd bits will go to I components and even bits will go to Q components. For our project, we have taken the first 15 bits from the NRZ bit stream and appended in the I bit stream. Then bits form the 31 45 are taken and appended in the I Component. Whereas
the even bits (16-30 and 46 60 etc) are taken from the NRZ bit stream and appended into Q components stream. The duration of both the I and Q components are doubled, so that both the streams have equal duration. Carrier Generation: Two carriers (sine and Cosine) are generated having the same duration as of I and Q components bit stream. The carrier waves generated are plotted as, Modulation: In modulation, we are multiplying (bit by bit) the I and Q components and the carrier waves generated. The cosine wave is multiplied with the I component whereas the sine wave is multiplied with the Q component. The resulting wave form is plotted as.
The waveforms obtained from I and Q component multiplied with the carrier is then added to get the final QPSK transmitted signal. As clear from the waveform the phase of the modulated signal is changed where as the frequency and amplitude remains the same. Channel Effects: For channel effects we are adding AWGN (Additive white Gaussian Noise). The transmitted signal is some what distorted which is shown below.
Receiver: Serial to Parallel Block & Demodulation: The serial to parallel block is simply we are copying our received signal to 2 bit stream so the we can recover I and Q components. After that we are doing Demodulation by multiplying the bit stream with the same carrier as used in transmitter. The resulting waveform can be easily detected as the waveform above the zero represents the bit stream of fifteen 1 s whereas the waveform below zero represents the bit stream of fifteen -1 s. Integrator & Detection Block: This block is basically used to make detection easy. From the bit stream of 15 bits we will use integrator to get a single value on the basis of which we will decide what we have received. So we will detect the bit stream. For integration we are using the Numerical Analysis method (Trapozoidal Integration). The algorithm followed for the detection is, If (Integrated_value > 0) Then Detected_signal = 1 Else Detected_signal = -1
Multiplexer: Multiplexer will basically be bringing bit steam from I and Q component back to NRZ form. NRZ is made by appending the first 15 form I component and next 15 bits form Q component and so on. The recovered NRZ waveform is plotted as, NRZ Decoder: The NRZ decoder will recover the received bit stream. Instead of the 15 ones we write single 1 where as instead of fifteen -1 s we will write single zero. The recovered NRZ is shown below. COMPARISION OF SENT AND RECEIVED BITS: The graph is plotted between the original message bit stream and the received detected bit stream. The numbers of bits that are transmitted were 20 and all are detected correctly. The original bits are represented by blue circle (o) where as the detected bit stream is represented by blue lines.