From e16f191edb05e08eee4447f64d2ac5f24c1bc812 Mon Sep 17 00:00:00 2001 From: David Lenfesty Date: Sun, 25 Aug 2019 20:28:39 -0600 Subject: [PATCH] actually I think it's working but making impulse responses by hand is finnicky --- channel.py | 5 ++++- main.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/channel.py b/channel.py index bb4a05b..e2c3205 100644 --- a/channel.py +++ b/channel.py @@ -3,7 +3,10 @@ import scipy.interpolate import matplotlib.pyplot as plt -channel_response = np.array([-1 - 1j, 0, 0, 1, 0, 0, -1 - 1j]) +# Dirac delta function response, no change +#channel_response = np.array([0, 0, 0, 1, 0, 0, 0]) +channel_response = np.array([0, 0, 1, 0.5, 0.25, 0.125]) + # How do I sync this across two files? # figure it out later diff --git a/main.py b/main.py index b755c2b..a6bb168 100755 --- a/main.py +++ b/main.py @@ -59,11 +59,11 @@ if __name__ == '__main__': ofdm_time = np.fft.ifft(modulated) - tx = cp_add(ofdm_time, 4) + tx = cp_add(ofdm_time, 16) rx = channel.sim(tx) - ofdm_cp_removed = cp_remove(rx, 4) + ofdm_cp_removed = cp_remove(rx, 16) to_equalize = np.fft.fft(ofdm_cp_removed)