1
$\begingroup$

I've read an interesting paper called FingerIO that transmits audio waves in OFDM,
and I wanted to implement and generate sounds using MATLAB.

(I am quite new to signal processing, so please understand my lack of background knowledge!)

In OFDM, there are 64 subcarriers, each with their own frequency band and holding a symbol.
OFDM applies IFFT on the symbols and converts them into time domain with 64 time domain samples.
The 64 time domain samples are sent to the receiver. The receiver then applies FFT on the received signal and recovers the 64 transmitted symbols.

Below is the snippet of my code to test the data.
I first created a 64X1 matrix that represents subcarriers in the frequency domain, put data in the subcarriers, and applied IFFT.

for i=1:64
   X_Freq = zeros(1,64);
   X_Freq(i) = 1;
   x_Time = ifft(X_Freq);
end

My anticipation was that the frequency of the signal will increase with the value of i since higher subcarriers have higher frequencies.
However, when I ran the code, the frequency increased with the i during the first half (when i=64/2) of the subcarriers, but it began to decrease after the half point.

So I thought, since an FFT returns a symmetric positive and negative frequencies data, I've added the code below before the IFFT operation to create the positive frequency data.

for i=1:64
   X_Freq = zeros(1,64);
   X_Freq(i) = 1;

   X_Freq = [X_Freq X_Freq(end:-1:1)];

   x_Time = ifft(X_Freq);
end

After revision, the frequency now increases with the value of i, but the problem is that the output of the IFFT is now 128 samples.

Does anyone know how I can use 64 samples and use up to 64 subcarriers?
I would appreciate any comments/advises!
Thanks in advance!

$\endgroup$
2
$\begingroup$

You forgot to mix or heterodyn the complex FFT output up to the carrier frequency. Then the negative index FFT bins will be below the carrier in frequency. FingerIO appears to use a very high audio frequency carrier.

$\endgroup$
  • $\begingroup$ Thank you for your suggestion! I will look into heterodyning! The paper does mention that "acoustic devices don't use oscillators to transmit a carrier frequency because audio sampling rate of 48kHz is sufficient to cover the entire frequency range of typical speaker and microphones". So transmitting 128 samples seems to work as of now. This has something to do with the mixing right? Anyway thank you so much! $\endgroup$ – danielle Aug 9 '17 at 4:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.