SDR Lec9

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 11

ECEN435 Autumn 2023

Lecture 8
Multipath fading

Software Defined Radio


Adiyabat Enkhjargal
Lecturer - School of Information Technology and
Electronics
Department of Electronics and Communication
Engineering
Outline
• Multipath
• Fading
• Simulating Rayleigh fading
• Mitigating Multipath Fading
Multipath
• All realistic wireless channels include many “reflectors”, given that RF
signals bounce. Any object between or near the transmitter (Tx) or
receiver (Rx) can cause additional paths the signal travels along.
• Each path experiences a different phase shift and attentuation
Transmitter
Fading
• We use the term “fading” when referring to the
effects of multipath channel changing over time.
That’s why we often refer to it as “multipath fading”
• it’s really the combination of constructive/destructive
interference and a changing environment.
Fading
• We use the term “fading” when referring to the effects of multipath
channel changing over time. That’s why we often refer to it as
“multipath fading”
• it’s really the combination of constructive/destructive interference and a
changing environment.
• Changes usually on the order of miliseconds to microseconds, depending
on how fast the Tx/Rx is moving
Fading
• There are two types of fading from a time domain perspective:
• Slow Fading - The channel doesn’t change within one packet’s worth of
data. That is, a deep null during slow fading will wipe out the whole
packet.
• Fast fading - The channel changes very quickly compared to the length of
one packet. Forward error correction, combined with interleaving, can
combat fast fading.

• There are two types of fading from a Frequency domain perspective:


• Frequency Selective Fading
• Flat fading
Fading
Simulating Rayleigh Fading
import numpy as np
import matplotlib.pyplot as plt
# Simulation Params, feel free to tweak these
v_mph = 60 # velocity of either TX or RX, in miles per hour
center_freq = 200e6 # RF carrier frequency in Hz
Fs = 1e5 # sample rate of simulation
N = 100 # number of sinusoids to sum
v = v_mph * 0.44704 # convert to m/s
fd = v*center_freq/3e8 # max Doppler shift
print("max Doppler shift:", fd)
t = np.arange(0, 1, 1/Fs) # time vector. (start, stop, step)
x = np.zeros(len(t))
y = np.zeros(len(t))
for i in range(N):
alpha = (np.random.rand() - 0.5) * 2 * np.pi
phi = (np.random.rand() - 0.5) * 2 * np.pi
x = x + np.random.randn() * np.cos(2 * np.pi * fd * t * np.cos(alpha) + phi)
y = y + np.random.randn() * np.sin(2 * np.pi * fd * t * np.cos(alpha) + phi)
# z is the complex coefficient representing channel, you can think of this as a phase shift and magnitude scale
z = (1/np.sqrt(N)) * (x + 1j*y) # this is what you would actually use when simulating the channel
z_mag = np.abs(z) # take magnitude for the sake of plotting
z_mag_dB = 10*np.log10(z_mag) # convert to dB
# Plot fading over time
plt.plot(t, z_mag_dB)
plt.plot([0, 1], [0, 0], ':r') # 0 dB
plt.legend(['Rayleigh Fading', 'No Fading'])
plt.axis([0, 1, -15, 5])
plt.show()
Simulating Rayleigh Fading
Mitigating Multipath Fading
• In modern communications, we have developed ways to combat
multipath fading.

You might also like