Bradley University Department of Electrical and Computer Engineering Senior Capstone Project Presentation May 2nd, 2006 Team Members: Luke Vercimak Karl Weyeneth Advisors: Dr. In Soo Ahn Dr. Thomas L. Stewart Presentation Outline Karl Project Summary Functional Description Block Diagram Datasheet Equipment and Software Supporting Software RTDX Radio Design QAM Modulation OFDM Modulation Interpolation Quadrature Modulation Channel Quadrature Demodulation Luke Radio Design Continued Decimation OFDM Frame Synchronization Frame Timing Detail OFDM Demodulation Phase Compensation QAM Decoding DSP Board Implementation Results Synchronization Results and Analysis Future Projects Conclusions 1
Project Summary Using the IEEE 802.11a standard as a guideline, a software radio will be developed that will modulate and demodulate binary data. The goals are: Successful modulation and demodulation of digital data above baseband frequencies. Reasonable compensation for channel and receiver problems, focusing primarily on synchronization. Reliable communication link between DSP (Digital Signal Processing) board and a host computer. Functional Description Input Digital Data (text / computer data file) Output Digital Data (text / computer data file) Modes of Operation Transmitter Receiver Channel Simulation (when actual channel is not being used) 2
Block Diagram Parts of Software Radio: Transmitter Changes the data from the file into a signal that can be transmitted over the channel. Channel The path or medium that the transmitter and receiver are designed to transmit through. Receiver Recovers the data from the signal that was transmitted over the channel and converts it back into data. Datasheet The following are the final specifications for the software radio: The on board A/D converter s maximum sampling rate is 96KHz. Limits Parameter Sampling Rate Modulation Frequency Data Rate F samp F mod R Symbol Min Typical 96 24 5 Max Units KHz KHz Kbps 3
Equipment & Software List 2 Texas Instruments DSP Starter Kits (TMDSDSK6713) 2 Computers Matlab 7.0.4 Simulink 6.2 Code Composer Studio 3.1 Microsoft Visual Studio 2005 Supporting Software - RTDX Simulink blocks were developed to transmit and receive data to and from the board using RTDX (Real Time Data Exchange). A RTDX interface application was designed and implemented in C# to communicate with the DSP board. 4
1 Test_data Radio Design Buffer s^(t) g^(t) Quadrature Demodulator In Out QAM Encoder In1 Manual Switch In Out Decimation Image In Viewer s^(t) w s_b(t) OFDM Modulation In s^(t) Out s(t) Channel Frame Synch In g^(t) w^ OFDM Demodulation Out Interpolation In s_b(t) s(t) Quadrature Modulator Out QAM Decoder Discrete-Time Scatter Plot Scope In1 Image Out Viewer Radio Divided into subsystems: QAM Encoder OFDM Modulation Interpolation Quadrature Modulation Channel Quadrature Demodulation Decimation Frame Synchronization OFDM Demodulation Phase Compensation QAM Decoder QAM Modulation Four level QAM (Quadrature Amplitude Modulation) is used to modulate the data. Pairs of bits are mapped onto the complex plane and the resulting complex numbers are the desired QAM symbols. These QAM symbols are phasors that store the information of the bits in the amplitude and phase of a sinusoid. 1+ j = 1 j = 2 45 2 2 135 2 Phasors 5
OFDM Modulation... 1+j -1+j 1-j -1-j OFDM Spectrum -32-31-30-29-28-27 -26-25-24-23-22-21-20-19 -18-17 -16-15-14-13-12-11-10-9 -8-7 -6-5 -4-3 -2-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Fs/2 -Fs/2 QAM symbols are encoded in an OFDM (Orthogonal Frequency Division Multiplexing) symbol with an IFFT (Inverse Fast Fourier Transform). A guard interval is added to reduce multi-path interference. A raised cosine window function is also applied to reduce inter-symbol interference. Interpolation The sampling rate needs to be increased so that the signal can be modulated onto a carrier. Information encoded on the amplitude and phase of signal needs to be preserved during up-sampling. Filters need to be FIR (Finite Impulse Response). This increases the filter order, but allows for linear phase correction. Up-sampling is done in two phases in order to increase the filter transition region; reducing filter order. 1 In [96x1] [96x1] [96x1] [96x1] [96x1] [96x1] 2 4 8 Upsample FDATool Initial Upsampling Filter Second Upsample FDATool Second Upsampling Filter Upsampling Amplitude Correction 1 Out 6
Quadrature Modulation In-phase and quadrature components are modulated and mixed from baseband signals to an intermediate frequency. The intermediate frequency signals are summed together to form the transmitter output. 1 s_b(t) DSP Cosine Wave DSP Sine Wave Re(u) Im(u) Complex to Real-Imag Product Product2 Add 1 s(t) Channel Channel should model the environment that the radio signal will be transmitted through. The channel model includes noise sources, multi-path interference, and attenuation. The receiver was designed to accommodate for these problems. 0.8 Gain 0.15 Gain1 0.11 Gain2 z -53 Delay z -55 Delay1 z -57 Delay2 Add Gaussian Gaussian Noise Generator 7
Quadrature Demodulation In-phase and quadrature parts of incoming signal are detected and mixed back to baseband with quadrature demodulation. The real and imaginary parts are recombined into an imaginary signal. DSP Cosine Wave DSP 1 s^(t) Sine Wave Product1 Product2 2 2 InPhase Mixing Gain Quad Mixing Gain Re Im Real-Imag to Complex 1 g^(t) Presentation Outline Karl Project Summary Functional Description Block Diagram Datasheet Equipment and Software Supporting Software RTDX Radio Design QAM Modulation OFDM Modulation Interpolation Quadrature Modulation Channel Quadrature Demodulation Luke Radio Design Continued Decimation OFDM Frame Synchronization Frame Timing Detail OFDM Demodulation Phase Compensation QAM Decoding DSP Board Implementation Results Synchronization Results and Analysis Future Projects Conclusions 8
Decimation Extra information contained in the samples is eliminated so that OFDM frame can fit in one 64 point FFT (Fast Fourier Transform). The signal is filtered to remove high frequency interference and then down-sampled. OFDM Frame Synchronization The start of each OFDM frame needs to be determined in order to properly demodulate the OFDM frames. The pseudo-random short preamble defined in the IEEE 802.11a specification is sent before the OFDM frames to time the receiver. The receiver identifies the preamble using statistical analysis with cross and autocorrelations to identify the end of the preamble. Autocorrelation is used to find the general area of the preamble. Cross correlation is used for precise location of end of preamble. 9
Frame Timing Detail 1.5 Preamble Cross Correlation Preamble Auto Correlation 7 * Standard Deviation of Input Frame Timing Detail 1 Magnitude 0.5 0 2000 2500 3000 3500 4000 4500 Time (samples) OFDM Demodulation The FFT used to extract QAM symbols from an OFDM symbol. Phase effects of the channel and radio can be corrected in the frequency domain. 10
Phase Compensation θdelay dθ df dθ f df dθ θ ( f ) = θdelay + f df Delays in the radio and channel, as well as phase and frequency mismatches in modulation cause linear phase corruption. The known phase of the pilots are used to determine the correction needed for each sub-carrier. QAM Decoding The sign of the QAM symbols real and imaginary parts are used to determine the bits that they represent. The QAM symbols are decoded back to their original bit representations. 11
DSP Board Implementation The DSP board overruns Reduce Sampling Rate? Optimize Code? Increase Board speed? Fixed Point? Results This picture is our test data. The picture was changed to digital data and sent into the input side of the radio transmitter. 12
Results This signal represents part of the picture of Bradley hall after it is sent through the channel. 0.25 0.2 OFDM transmitted signal after channel corruption 0.15 0.1 Magnitude 0.05 0-0.05-0.1-0.15-0.2-0.25 0 100 200 300 400 500 600 700 800 900 1000 Time (t) Synchronization Results Unsynchronized Synchronized 13
Results Bradley hall then comes through the transmitter as QAM points and then out the other end of the receiver. Performance Analysis 3000 2500 S N R vs E rrors 9000 8000 7000 Effect of Frequency Offset Noise Power 0.001 No Channel Noise Power 0.003 Errors Per 10000 symbols 2000 1500 1000 Errors per 10000 symbols 6000 5000 4000 3000 500 2000 1000 0-10 -5 0 5 1 0 15 S N R Errors inversely proportional to SNR. Frequency offset marginally increases error. Noise interferes with synchronization lock. 0 5 10 15 20 25 30 35 40 Frequency Offset (Hz) 14
Project Conclusions A successful communication scheme was simulated using a variation of the IEEE 802.11a specification. Message and carrier synchronization problems were studied and solved. The software radio was reliable under reasonable noise and multi-path conditions. A reliable communication interface with Simulink blocks and the DSP board was designed and implemented. Future Projects or Extensions Figure out how to profile and optimize subsystems so that the code can be run on the 6713 DSK boards. Add coding to radio to provide robustness against errors. Create RF hardware for radio so that the signal can be transmitted over a real channel. Increase QAM level from four and add automatic gain control. 15
Questions, Comments? 16