Plotting frequency spectrum for a signal with 20MHz bandwidth and sampling frequency of 12.5GHz

I am new to Matlab and I am trying to plot the frequency spectrum of an OFDM signal with bandwidth of $20 \text{ MHz}$ and DAC sampling rate of $12.5 \text{ GHz}$. The number of samples is $400,000$. Plotting the signal I am only able to see the Nyquist bandwidth but not the $20 \text{ MHz}$.

I would appreciate any help. Link to the data file.

Here is the frequency spectrum plotted via Matlab :

Below are my line of codes:

BW = 20MHz;
f_DAC = 12.5GHz;
Nfft = 32;
Sig_fft = abs(fftshift(fft(Data_signal)/length(Data_signal))).^2;
Freq = ((0: length(Sig_fft)-1)-length(Sig_fft)/2)*(f_DAC/length(Sig_fft));
figure();
plot(Freq, 10*log10(Sig_fft/1e-4));
title('Signal Spectrum');
• Why are you sampling that fast? You should be sampling at 50-60 MHz. – MBaz Sep 7 '17 at 18:58

1 Answer

Your fundamental limitation is the (comparatively) short window length of $M=400,000$ samples, at such a prohibitively high sampling frequency of $12.5$ GHz. This will roughly yield a few hundred kHz of effective FFT resolution per bin of the FFT spectral samples.

Using the formula for the spectral resolution of various windows we can deduce the following resolution, for example, for a standard Hamming window as

$$\Delta w = 8\pi / M$$ where $M$ is the window's length, that is $M=400,000$, which yields $$\Delta w = 8\pi / 400,000 = 6.2832 \times 10^{-5}$$ radians.

This resolution is determined by the window length, and its frequency equivalent under the sampling rate of $f_s = 12.5 \times 10^9$ Hz is

$$\Delta f = \frac{\Delta w}{2\pi} f_s = \frac{6.2832 \times 10^{-5}}{2\pi} 12.5 \times 10^9 = 125,000 Hz$$ i.e., the effective frequency resolution of your window is $\Delta f = 125$ kHz. Now given your bandwdith of $B=20$ MHz, this equates to a number of $20 \times 10^6 / 125\times 10^3 = 160$ samples.

On the other hand the apparent count of the number of FFT samples (apparent resolution) inside the $20$ MHz region yields something about $k = 4\times 10^5 \times 12.5\times 10^9 / 20\times 10^6 = 640$ samples, which however does not carry more information than those inferred from $160$ subsamples.

Hence a bandwidth of about $20$ MHz would yield about less than 200 true-samples of a spectral region inside $400,000$ many apparent-FFT samples. This is quite narrow. You would either use a much longer observation interval or use a much reduced sampling frequency as @MBaz commented.

• please ingnore my lack of knowledge, can you please explain how 20 MHz would yield about less than 200 samples of a spectral region inside 400,000 many FFT samples – Jombo Sep 11 '17 at 9:06
• Let me elaborate. I will correct the numbers, but the main figure remians the same. – Fat32 Sep 11 '17 at 12:13
• Thank you so much clearly explain will appreciate it if you recommend resource materials for these derivations and further understanding @MBaz – Jombo Sep 13 '17 at 15:52
• You can look at ch.10 of Discrete-Time Signal Processing_Oppenheim. – Fat32 Sep 13 '17 at 17:19
• I want to zero pad the signal in the frequency domain.Not sure if I am on the right track. Fs=12.5GHz N1=40000samples BW=20MHz resolution df for 20MHz bandwidth df = BW/N1 = 20MHz/40,000 = 500Hz --eq1 time interval dt dt = 1/Fs = 1/12.5e9 = 8e-11 resolution df1 for Nyquist frequency df1 = 1/N1*dt = 1/(40000*8e-11) = 312500Hz --eq2 Therefore N2 = 1/df*dt = 1/(500*8e-11) = 25000000 samples number of samples needed for 20MHz N2-N1 = 25000000-40000 = 24960000 samples Not sure if I have done it well any recommendation will be appreciated. Thanks – Jombo Sep 19 '17 at 9:14