Anda di halaman 1dari 59

OFDM Implementation in

GNU Radio
Matt Ettus, Thomas W. Rondeau, and
Robert McGwier
Wireless@VT Symposium, 2007

OFDM: Basic Principles

Transmitter Flow Graph

Receive Flow Graph

Signal Acquisition

Signal Detection
Two methods implemented:
Maximum Likelihood
Correlate with cyclic prefix
J. van de Beek, M. Sandell, P. Ola. Borjesson, ML
Estimation of Time and Frequency Offset in OFDM
Systems, IEEE Trans. On Signal Processing, vol. 45,
no. 7, pp. 18001805, July 1997.

PN Sequence correlation
Transmit known symbol with repetition in the time
domain
T. M. Schmidl and D. C. Cox, Robust Frequency and
Timing Synchronization for OFDM, IEEE Trans.
Communications, vol. 45, no. 12, pp. 16131621, Dec.
1997.

ML Estimation
Delay to
CP

Peak to 0

Gate symbol
Correlate to
delayed CP

Hold angle
for frequency
correction

ML Performance
Correlation
Peaks

Correlations occur every OFDM symbol

ML Performance
Correlation
Peaks

Peaks should occur every FFT length + CP length

ML Performance
Histogram of Peak Timing

Missing a peak inside a packet will cause a


rotation in versus the other symbols

PN Correlation
Create sample in frequency with 0s in every other bin:

IFFT
Repeated Known Symbol in time: ABCDABCD

Synchronizer Flow Graph


Delay
first half

Signal Power

Detects edge
Regenerate for
each symbol

Correlate to
preamble

Hold angle
for frequency
correction

Gate symbol

PN Sync Performance
Correlation
Match Filtered
Regen. Peaks

Correlations occur every packet

PN Sync Performance
Correlation
Match Filtered
Regen. Peaks

Regenerating peaks by a known amount

PN Sync Comparison

Noise and multipath affects against a perfect signal

PN Sync Performance
Histogram of Peak Timing

Differences do not affect this method as much


because the rotation is constant in the packet

Frame Detection
Uses known symbols to correlate and find
beginning of frame
Once correlated, use the known symbols
and receive symbols to generate a 1-tap
equalizer
Use the equalizer to correct phase shifts
and multipath

Fine Frequency compensation


PN Frequency ambiguity

-3.5

-2.5

-1.5

-0.5

0.5

1.5

ML Frequency
ambiguity

2.5

3.5

Frequency

Coarse Frequency compensation


corrected in frame detector
Shifted full FFT bin

-3.5

-2.5

-1.5

-0.5

0.5

1.5

2.5

3.5

Frequency

Fine Frequency Error from PN Sync

Frequency error calculated once per packet; does


not fix for clock offset drift throughout packet.

Implementation Results

QPSK

QPSK

Repeated Preamble

(1/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Known Preamble 1

(2/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Known Preamble 3

(3/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(4/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(5/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(6/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(7/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(8/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(9/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(10/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(11/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Data

(12/13)

FFT length=512, Occupied Tones=200, CP Length=128

QPSK

Repeated Preamble (13/13)

FFT length=512, Occupied Tones=200, CP Length=128

QAM16

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

QAM16 Repeated Preamble (1/1)


FFT length=512, Occupied Tones=200, CP Length=128

Profiling Support
Use OProfile
Collects amount of processing done by
each component of a process
Used to tune performance
Started at 100 kHz bandwidth
1.5 hours of profiling increased to 600 kHz

Profiling Support QPSK Receiver


%
29.2
11.5
6.05
5.14
4.31
4.10
3.80
3.15
2.44
1.81

symbol name
.loop2
.loop2
gr_fast_atan2f
gr_fft_filter_ccc::work
gr_single_threaded_scheduler::main_loop
gr_ofdm_correlator
.cleanup
gr_multiply_cc::work
gr_fir_ccf_simd::filter
gr_fir_fff_simd::filter

Profiling Support QPSK Receiver


1.7259
1.5111
1.4963
1.4815
1.3111
1.2667
1.0593
1.0222
0.9556
0.8963
0.8593
0.8593

gr_divide_ff::work
gr_frequency_modulator_fc::work
gr_block_detail::input
gr_peak_detector_fb::work
gr_ofdm_correlator::coarse_freq_comp
.loop1
gr_complex_to_mag_squared::work
.loop1
gr_fft_vcc::work
gr_ofdm_sampler::general_work
gr_add_const_cc::work
gr_ofdm_correlator::general_work

GNU Radio Interface


Command-line options allow selection of
FFT bins (any value, odd or even)
Occupied bins (must be < fft bins)
Cyclic prefix length (< fft bins)

Flow graphs are built at runtime


./benchmark R A f 2411M --fft-length=512 \
--occupied-tones=300 --cp-length=128

Should tie directly in with current method


to use an PHY/MAC interface card

Future Work and Goals

Hit 1 MHz in receiver


More modulations
Implement a variation of the PN sync
Implement adaptive equalizer over the
entire packet
SINR calculation
Forward Error Correction
Performance tuning

Thank You

Questions?