Improvement of SNR by sampling different number of cycles using FFT of a fixed length singal

My question relates to Fourier transform of signals with different lengths in time but the same fixed length of the digitized signal with different sampling rates.

Specifically, how does the number of cycles recorded effect the SNR of the FFT spectrum of a signal given a fixed number of NFFT points(the number of samples recorded is kept constant)?

My first signal(square wave of frequency 500 Hz) was sampled at a sampling rate of 100 kilosamples/sec and the signal was sampled for 10 sec, so a total of 1000001 samples.

The second signal(square signal of frequency 500 Hz) i used was sampled for 0.02 seconds at a sampling rate of 50,000 kilo-samples/second. So again the data vector length was 1000001 samples.

The FFT spectrum that i got for signal 1 was much sharper and had a high SNR compared to signal 2(second signal). intuitively it makes more sense that the signal with more cycles would give a better result.

Is this correct ? more importantly can anyone help me in finding a quantitative relationship for this behavior?

your help will be much appreciated.

Thanks.

• What do you mean by SNR? – MBaz May 28 '18 at 17:56
• @MBaz Signal-to-Noise ratio – PDuarte May 28 '18 at 21:22
• But what is the noise in your case? You don't mention any noise. – MBaz May 28 '18 at 21:51
• Apologies, what i have not explained clearly is the fact that, there is no noise added to the signal. 'SNR' was a bad choice of words. What i meant simply was that the FFT of signal 2 is not the same as FFT of signal 1 and the values of FFT at frequencies like 1000 or 250 Hz etc is much higher than the FFT of signal 1. – Mohsin.A May 29 '18 at 11:38