channel simulation in gnu radio - squarespace · gnu radio channel simulation...

25
GNU Radio Channel Simulation Trolling sub-par modem algorithms and implementations for fun and profit Tim O’Shea, Research Faculty Virginia Polytechnic Institute and University Arlington, VA 1 Oct 2013

Upload: others

Post on 18-Apr-2020

38 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

GNU Radio Channel SimulationTrolling sub-par modem algorithms and implementations for fun and profit

Tim O’Shea, Research FacultyVirginia Polytechnic Institute and UniversityArlington, VA1 Oct 2013

Page 2: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Why simulate channels?

I This is a fundamental strength of software radioI Better simulation allows for rapid iteration

Page 3: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

GNU Radio 2012: Channel modeling, where we were...I Timing offset: Fractional Interpolator at fixed rate (fixed)I Multipath: FIR Filter with fixed taps (fixed)I Freq Offset: Mix with fixed sinusoid generator (fixed)I Noise: Gaussian noise generator and adder (time varying)

This was a good start and allowed testing non-perfectlysynchronized signals under a variety of white noise SNR conditions

Page 4: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Dynamic behavior mattersI Most modems include some form of error feedback tracking

loop for recovery of symbol timing, carrier frequency, andchannel response

I Virtually all of these have a fundamental trade off betweentracking speed and sensitivity to estimation noise

I Tuning of these algorithms is an important piece of any overthe air system

I Static impulsive channel responses rarely exist in any realwireless system, tracking to fixed values is not realistic

I Model the channel coherence time consistently with yourtarget environment

I Do not assume perfect synchronization, do not pass go

Page 5: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Flat fading modelsI Provides a single complex tap channel responseI As the name indicates, is flat across the entire simulated band

of interestI Has a non-impulsive autocorrelation function, unlike the

AWGN channelI Allows for testing of synchronization routines through

fades/outages

Page 6: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

We are still just varying a simple channel amplitude

Page 7: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Sum of Sinusoids Implementation of the flat Rayliegh fading model

1. ci [m] =√

2N

N∑n=1

cos(2πfDTsmcos(αn[m]) + ϕn)

2. cq[m] =√

2N

N∑n=1

cos(2πfDTsmsin(αn[m]) + ψn)

3. αn[m] = 2πn−π+θ[m]4N

4. random walk parameter θ[m]iv ∼ Uniform[−π, π) updatedeach time step with δ ∼ U(0, δ0) where δ0 ∼ (1e − 5, 5e − 8)

use of the random walk parameter allows for reduced number ofsinusoids and increased entropyA Rician-K fading model can be produced the same way by simplyadding a LOS component

Page 8: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Diagram of flat fader portion

Digram from [1]

Page 9: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Flat fading model in GRC

Page 10: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Flat fading model in GRC

Page 11: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Extension to a frequency selective fading model1. define a fixed Power Delay Profile (PDP) in terms of

fractional sample times and powers2. generate a number of flat fading channel sequences3. interpolate and sum the flat fading responses onto each tap of

the PDP to form a set of FIR taps4. apply the resulting FIR filter to the incoming signal

Page 12: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Diagram of frequency selective fading extension

Digram from [1]

Page 13: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Our PDP can now reflect a more realistic set of discrete powersand delays

Page 14: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

What it looks like in GNU Radio

Page 15: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

What it looks like in GNU Radio

Page 16: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Performance OptimizationsI Selective model runs 500KSamp/sec on my laptop

(i5-2520M) (3 taps, 8 SoS model)I Highly dependent on number of taps and number of sinusoidsI Fast computation of Sin, Cos and Sinc (done)I Parallelization of independent flat fading generators (not

done)

Page 17: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

A Standard set of Power Delay Profiles for GNU RadioI Most wireless standards specify a set of channel models for

compliance testingI These typically represent expected channel responses in a

variety of different environments: rural, urban, dense urban,etc

I Shouldn’t we have a similar thing in GNU Radio?I Future work building a small library of "common" channel

conditions for rapid representative system testingI Would include expected PDP model, LO and sample rate

stability for device classI Allow for consistent rapid and reproducible comparison of

performance

Page 18: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Simulating dynamic oscillator drift (carrier frequency offset (cfo)and sample rate offset (sro))

I Simply introduce a random walk parameterI Apply updates to oscillator frequency for carrier frequency

offsetI Apply updates to interpolation rate in fractional interpolator

for sample rate offset

Page 19: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Simulating Center Frequency Offset in GRC

Page 20: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Simulating Center Frequency Offset in GRC

Page 21: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Simulating Sample Rate Offset in GRC

Page 22: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Simulating Sample Rate Offset in GRC

Page 23: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Both currently use the "fastnoise" gaussian noise generator.I Generates a pool of gaussian random variates with zero mean

and variance proportional to the clock stabilityI Randomly samples from the pools using a fast uniform

random variateI Applies a random sign perturbation to remove any bias

present in the pool

Page 24: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Putting it all together, the Dynamic Channel Model blockI Hier block that includes all of these dynamic behaviorsI Implemented as a C++ block but logically shown below

Page 25: Channel Simulation in GNU Radio - Squarespace · GNU Radio Channel Simulation Trollingsub-parmodemalgorithmsandimplementationsforfunandprofit TimO’Shea,ResearchFaculty VirginiaPolytechnicInstituteandUniversity

Most of the channel components have been merged into GNURadioThanks for using them!References:1. A LOW-COMPLEXITY HARDWARE IMPLEMENTATION

OF DISCRETE-TIME FREQUENCY-SELECTIVE RAYLEIGHFADING CHANNELS, Fei Ren and Yahong R. Zheng

2. Compact Rayleigh and Rician fading simulator based onrandom walk processes, A. Alimohammad S.F. Fard B.F.Cockburn C. Schlegel