Question
Asked 26th May, 2017

How to determine the sampling frequency?

I have the following data from measurements:
Number of points =1000
frequency span =80 MHz
start frequency= 2.38 GHz
stop frequency= 2.46 GHz
sweep time/measurement duration= 90.09 ms
How can I determine the sampling frequency for FFT or IFFT to use in Matlab?
I heard the sampling frequency must be at least 2 times higher than the highest frequency?

Most recent answer

3rd Sep, 2019
Tareq Abuaisha
Technische Universität Bergakademie Freiberg
Or if your time vector is regular, i.e. you have a fixed time step over all you time vector, then you may also apply the following command:
Ts = (time(end)-time(1))/(numel(time)-1);
Fs = 1 / Ts ;

Popular Answers (1)

4th Jul, 2018
Abdelhalim abdelnaby Zekry
Ain Shams University
Dear Colleagues,
The answer of this question is as follows:
The no of points which is the same time the number of samples= 1000,
These samples are taken in a measuring time of 90.09 mseconds,
Then by definition the sampling rate fs= no of samples/ sampling time,
It results in fs= 11.1 kSample per seconds.
So, as an interpretation, this sampling rate is sufficient to sample the frequency envelope of the signal in its pass band. The highest frequency content in the envelope is assumed to be fs/2= 5.55 kHz.
My answer is late but can be useful for colleagues having similar questions
Best wishes
19 Recommendations

All Answers (16)

26th May, 2017
Henri Cloetens
blueice BVBA, Zaventem, Belgium
Dear Madam,
- The Nyquist criterium determines that your sampling frequency needs to be at least 2x the bandwidth of interest. Means here the minimum is 160 Mhz.
- In theory, you need a little higher, so that the lowest or highest  frequency of interest is equal to  an integer number times the sampling frequency.  This brings the lowest here to 164 Mhz.
- In practice, ADCs with a 164 Mhz sampling frequency cannot tolerate the very high input frequencies. You need a mixer in front, end then apply these principles after the mixer. (So, you could mix with eg 2379 Mhz, and have the band of interest from 1 Mhz to 81 Mhz, and then use an ADC with a sampling frequency of 162 Mhz.)
- Usually, in practice, there is a requirement to have a certain stopband rejection. In this case, the stopband rejection is usually provided by a SAW filter in front of the mixer. Now, this SAW filter is not infinitely steep, to pass 2380-2460, it can provide rejection up to 2350 and from 2490 (This is just an example. Its your task to design the stopband filter.) Now, in this case, you would mix to have the end of the stopband alias at the band of interest. Means the band of interest starts at 2380, the stopband ends at 2350, so I mix with the average of both,  2365 Mhz. In doing so,
the transition band low is mixed to 0-15 Mhz (not interested), the band of interest is mixed to 15-95, and the transition band high is mixed to 95-125 Mhz. Now, the sampling frequency of the ADC is chosen so that the end of the transition band aliases to the end of the passband, Fsample = 95+125 Mhz = 220 Mhz.
- Note: You can also mix I/Q, and then get away with 2 ADCs at half the sample frequency. I would not do this here. Go for the straight solution, select a decent SAW filter, and the ADC will be running at around 220 Mhz.
Best Regards,
Henri
7 Recommendations
26th May, 2017
Geetanjali Choudari
Delft University of Technology
Thanks for the reply but this data I got from a vector network analyzer and I have to do an FFT on it so i was wondering how to determine the sampling frequency and does it satisfies the requirement?
1 Recommendation
29th May, 2017
Hugh Lachlan Kennedy
Technical Knockout Systems Pty. Ltd.
2x the highest frequency of any component in your input. So you need to have some prior knowledge of what the signal you are analysing contains. 
2 Recommendations
5th Jun, 2017
Mahmoud Elgenedy
Qualcomm
Hi,
The sampling frequency should be at least double the maximum frequency.
If your measurement is done in the pass-band (2.38 GHz-2.46 GHz), so the maximum frequency is 2.46 GHz which means that the sampling frequency should be at least 2x2.46 GHz = 4.92 GHz.
However, if a demodulation is done first and the measured signal is in the baseband, so the maximum frequency is 80/2 MHz which means that the sampling frequency should be at least 80 MHz.
In both cases, if your time span is 90.09 msec, the number of samples (1000) is very small to satisfy any of the two sampling frequencies!
I.e., if your signal is passband and your time span is 90.09 msec, you need to capture at least [(90e-3)*(4.92e9) = 442.8e6 samples].
However, if your signal is baseband and your time span is 90.09 msec, you need to capture at least [(90e-3)*(80e6) = 7.2e6 samples].
Finally, if you adjusted the number of samples to satisfy the Nyquist sampling condition, you can do the FFT with the same size of the captured number of points. In this case, to map the FFT output sample number to a frequency, you just multiply the sample-number by the sampling frequency and then divide the output by the total number of captured samples (FFT size).
Regards,
Mahmoud
2 Recommendations
15th Jun, 2017
Rahis Kumar Yadav
Sharda University
You may use following code as an example.
Fs = 1000; % sampling rate of 1000 Hz
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*100*t)+randn(size(t));
xdft = fft(x);
xdft = xdft(1:length(x)/2+1);
DF = Fs/length(x); % frequency increment
freqvec = 0:DF:Fs/2;
plot(freqvec,abs(xdft))
2 Recommendations
15th Jun, 2017
Geetanjali Choudari
Delft University of Technology
thanks
1 Recommendation
17th Oct, 2017
Sunil RAJ KUMAR Yathati
Birla Institute of Technology and Science Pilani
No of Samples = 1000;
t = (0:No of Samples-1)* Tsamp
t = measurement duration
90.09ms = (0:No of Samples-1)* Tsamp
Tsamp = 90.09ms/(0:No of Samples-1)
Fsamp = 1/Tsamp
FsampMax = 1/2Tsamp
1 Recommendation
13th Feb, 2018
Safa Najjar
École Supérieure des Communications de Tunis
Could you find the solution? I have a similar problem but I don't know the measurement duration ! Thanks for your answer.
1 Recommendation
20th Mar, 2018
Costin Vasile
Schneider Electric
As far as I can see, it is 11.1kHz. And it does not appear enough in terms of the Shannon sampling theorem.
1 Recommendation
4th Jul, 2018
Abdelhalim abdelnaby Zekry
Ain Shams University
Dear Colleagues,
The answer of this question is as follows:
The no of points which is the same time the number of samples= 1000,
These samples are taken in a measuring time of 90.09 mseconds,
Then by definition the sampling rate fs= no of samples/ sampling time,
It results in fs= 11.1 kSample per seconds.
So, as an interpretation, this sampling rate is sufficient to sample the frequency envelope of the signal in its pass band. The highest frequency content in the envelope is assumed to be fs/2= 5.55 kHz.
My answer is late but can be useful for colleagues having similar questions
Best wishes
19 Recommendations
17th Apr, 2019
Adheem Naeem
University of Al-Qadisiyah
All the best for your project dear
1 Recommendation
23rd Apr, 2019
Maha Alshemmari
University of Kerbala
F sampling =1000/No of sample-1
1 Recommendation
29th Apr, 2019
Mahmood Khalid Hadi Zarkani
University of Kerbala
The sampling frequency for the digital systems must be at least double of the maximum me frequency
30th Apr, 2019
Ehsan Alhamdawee
Southern Technical University -Iraq
It is better to be four times the switching frequency to avoid the resonance
3rd Sep, 2019
Tareq Abuaisha
Technische Universität Bergakademie Freiberg
Just do the following:
Ts = mean(diff(t));
Fs = 1/Ts;

Similar questions and discussions

Related Publications

Article
When frequency of harmonics is near to that of interharmonics, serious interference from main lobe will affect precise parameter estimation of harmonics and interharmonics. By comprehensive utilization of all-phase FFT, spectrum correction and spectrum zoom technology, a new method was proposed in this paper to analyze harmonics and interharmonics...
Technical Report
Full-text available
Signals of unknown origin can be detected in the SG gravity data only after the interfering tidal oscillations are removed. The inverse FFT filtering method, unlike the usual high-pass filters, can handle the huge differences in amplitudes without additional noise. The procedure is described in detail.
Got a technical question?
Get high-quality answers from experts.