Samplingrate BW
Samplingrate BW
Samplingrate BW
Like if I have a 2,000 Hz and 1,999 Hz sine wave, how would I determine the length of FFT needed to
accurately tell the difference between those two waves?
The frequency resolution is dependent on the relationship between the FFT length and the sampling
rate of the input signal.
If the sampling rate of the signal is 10khz and we collect 8192 samples for the FFT then we will have:
FSN
where FS is the input signal's sampling rate and N is the number of FFT points used.
We can see from the above that to get smaller FFT bins we can either run a longer FFT or decrease our
sampling rate.
The Catch:
There is always a trade off between temporal resolution and frequency resolution.
In the example above, we need to collect 8192 samples before we can run the FFT, which when
sampling at 10khz takes 0.82 seconds.
If we tried to get smaller FFT bins by running a longer FFT it would take even longer to collect the
needed samples.
That may be OK, it may not be. The important point is that at a fixed sampling rate, increasing frequency
resolution decreases temporal resolution. That is the more accurate your measurement in the frequency
domain, the less accurate you can be in the time domain. You effectively lose all time information inside
the FFT length.
In this example, if a 1999Hz tone starts and stops in the first half of the 8192 sample FFT and a 2002Hz
tone plays in the second half of the window, we would see both, but they would appear to have
occurred at the same time.
You also have to consider processing time. A 8192 point FFT takes some decent processing power. A way
to reduce this need is to reduce the sampling rate, which is the second way to increase frequency
resolution.
In your example, if you drop your sampling rate to something like 4096 Hz, then you only need a 4096
point FFT to achieve 1hz bins and can still resolve a 2khz signal. This reduces the FFT bin size but also
reduces the bandwidth of the signal.
Ultimately with an FFT there will always be a trade off between frequency resolution and time
resolution. You have to perform a bit of a balancing act to reach all goals.
The ability to differentiate two very closely spaced signals depends strongly on relative amplitudes and
the windowing function used.
You may find that playing with the Baudline signal analyzer is a good way to develop some intuition on
this matter - and no, running some FFTs and plotting one spectrum at a time in Matlab or
Python/Numpy is really not the same.
EDIT: There is also a trick to pad the input with zeros and taking a bigger FFT. It will not improve your
differentiation ability but may make the spectrum more readable. It is basically a trick similar to
antialiasing in vector graphics.
It's worth noting that an FFT is an alternative to computing a number of separate pairs of sums
(k=0..sample_length-1) of Sample[k]*SineRefWave[j][k] and Sample[j]*CosRefWave[j][k], for all j up to
half the sample length. If one needs amplitude readouts at all those frequencies, an FFT will compute
them all in O(NlgN) time, whereas computing them individually would take O(N^2) time. On the other
hand, if one only needs amplitude readouts at a few frequencies, one will often be better off simply
computing them individually, especially if one is using a processor or DSP which can efficiently compute
that style of sum.
The frequency resolution does not depend on the length of FFT, but the length of the total sampling
time T, i.e. it's 1/T, which is also the lowest frequency component you obtained.
Note, zero padding does not increase the frequency resoltuion; DFT of the zero padding signal is merely
a better approximation of the DTFT of the orginal signal.
The value for N depends on what you are trying to do. Why are you taking an FFT?
If you are trying to analyze a signal, the size of your FFT will dictate the frequency resolution and one's
ability to distinguish neighboring tones.
If you are trying to filter in the frequency domain, the size of your FFT will be dictated by the length of
the filter. If you are trying to process Multi-Carrier modulated signals, your FFT will be some multiple of
a fundamental length dictated by the communication system. FFT has many purposes and the reasons
for choosing N will depend on why you are using an FFT in the first place.
I was following the chart below to understand the basics of LTE bandwidth configuration and put me in
total confusion.
I want to understand 20Mhz FDD to start with and hopefully the rest will be easily followed. As seen in
the chart below
Let me first give you the thumb rule of OFDM system: The symbol period is reciprocal of the sub-carrier
spacing. So in case of LTE where 15KHz is sub-carrier spacing the symbol length is 1/(15KHz).
2048 time samples from IFFT module fit into symbol period of 1/(15KHz). The sampling frequency hence
is (15KHz * 2048) for 20 MHz.
Similarly by changing the number of sub-carriers you will get the sampling freq for other band-widths.
2) how does sampling rate 30.72( 2048*15Hz) fit within 20Mhz bandwidth ?
3) 100 Resource blocks = 100*180( 12*15khz) = 18Mhz.. Where is the remaining 2 Mhz( 20-18mhz)
gone?
Yes total sub-carriers are 2048 but only 1200 are occupied. Rest are zero padded.
6) 1200 number of occupied subcarriers. What are the unoccupied carriers (Is it 2048-1200 = 848 ?)
>> Occupied carriers correspond to number of Physical resource elements. In 20MHz there are 1200
PREs. Unoccupied sub-carriers are zero padded.
7) if I imaging that the 20Mhz bandwidth allocated as 1760-1780(Rx) and 2160-2180( Tx). The
subcarriers generated by IFFT operation should be integral multiples . Therefore what will be the
individual frequencies in time domain if 2048 subcarriers are generated.