The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 11:22pm
Pages: 1 2 3 
Send Topic Print
SAR ADC SNR variations for different FFT numbers (Read 16633 times)
niloun
Community Member
***
Offline



Posts: 53

SAR ADC SNR variations for different FFT numbers
Sep 30th, 2017, 1:51am
 
Hi everyone

I would like to calculate the dynamic specifications of an SAR ADC that I have designed in Cadence. I have imported the output data (D0~D8) of my SAR ADC from Cadence into Matlab to calculate the FFT.

I have done this process for N=64 , N=512 and N=4096, and I don’t understand why the SNR is increased when the number of FFT points is increased?

I have used an integer number of cycles, however, when I use a Hann window the extent to which the SNR varies for N=64 , N=512 and N=4096 declines considerably.

1- Does SNR change when we increase N (FFT number)? I think it shouldn’t change because total noise power is constant.

2- Are we allowed to use both integer number of cycles and a Hann window?

Thanks in advance
Back to top
 
 
View Profile   IP Logged
carlgrace
Senior Member
****
Offline



Posts: 231
Berkeley, CA
Re: SAR ADC SNR variations for different FFT numbers
Reply #1 - Oct 2nd, 2017, 8:50am
 
The noise floor of the FFT itself declines when you use a longer FFT. If the SNR is improving as you increase the length of the FFT, that means that you are being limited by the FFT and not the ADC. When you get to the point the ADC is limiting SNR using a longer record won't improve SNR.

You should consider using a prime number of cycles rather than just an integer. An integer is OK, but you may get some samples landing on top of each other which will make it appear like you have less data.

Also, if you are using coherent sampling correctly (integer/prime number of cycles) using a Hann window should be needed (all your input power should fall into a single FFT bin).
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #2 - Oct 3rd, 2017, 1:17am
 
Thanks so much for the answer.
carlgrace wrote on Oct 2nd, 2017, 8:50am:
The noise floor of the FFT itself declines when you use a longer FFT. If the SNR is improving as you increase the length of the FFT, that means that you are being limited by the FFT and not the ADC. When you get to the point the ADC is limiting SNR using a longer record won't improve SNR.

I understand that noise floor declines when FFT size increases because of the formula below (-10log(n/2)):


But what I don’t understand is that the noise power must be distributed between noise bins (either 62 or 510) and the total power of the noise bins should be constant hence the snr must remain constant. I don’t find any theoretical reasons for total noise power variations and it is confusing me. What do you exactly mean by SNR being limited to FFT?

carlgrace wrote on Oct 2nd, 2017, 8:50am:
You should consider using a prime number of cycles rather than just an integer. An integer is OK, but you may get some samples landing on top of each other which will make it appear like you have less data.

Yes I totally understand what you mean and I have used prime/integer number of cycles, “integer number of cycle” is a term used in Stanford lecture notes meaning the same thing you just explained:




carlgrace wrote on Oct 2nd, 2017, 8:50am:
Also, if you are using coherent sampling correctly (integer/prime number of cycles) using a Hann window should be needed (all your input power should fall into a single FFT bin).

Fine, but according to Stanford lecture notes, windowing will distribute the sigbin power between some bins:



Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #3 - Oct 3rd, 2017, 9:02am
 
Niloun,

 Comments:
1) Carl's approach includes an integer number of clock and signal
   periods, for example: 13 periods of the signal and 256 periods
   of the clock. So, the signals will be periodic in the data record
   used for the FFT
2) The reason for using the approach Carl suggest is to assure that
   the clock and signal are not harmonically related. For example,
   if the clock is 100MHz and the signal is 10MHz, there are only
   10 lsb levels tested in the simulation. So the SNDR/SINAD will
   be correct, but the SNR and THD will be incorrect. Since all the
   energy will be concentrated in 10 bins of the FFT
3) If you follow the guidelines that Carl suggests, you can use the
   Rectangular window which means that there is no signal spreading
4) For Delta Sigma, #1 is still applied but you will need to use a
   window function

                                                                    Sheldon
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #4 - Oct 3rd, 2017, 9:53am
 
Thanks Sheldon
sheldon wrote on Oct 3rd, 2017, 9:02am:
Niloun,

1) Carl's approach includes an integer number of clock and signal
   periods, for example: 13 periods of the signal and 256 periods
   of the clock. So, the signals will be periodic in the data record
   used for the FFT
2) The reason for using the approach Carl suggest is to assure that
   the clock and signal are not harmonically related. For example,
   if the clock is 100MHz and the signal is 10MHz, there are only
   10 lsb levels tested in the simulation. So the SNDR/SINAD will
   be correct, but the SNR and THD will be incorrect. Since all the
   energy will be concentrated in 10 bins of the FFT

I totally understand, I had done my calculations as you and Carl said, for example, when using 64 FFT points I choose Fin according to the formula below:
(Fin/Fs)=(cycles/FFTpoints)
If Fs=200K and I have 64 FFT points I choose cycles to be 7 so I will have: Fin=7/64*200K=21.875K
And if I choose 512 points and 51 cycles Fin will be 51/512*200K
But it’s not helping and ENOB improves when FFT number is increased.
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #5 - Oct 3rd, 2017, 10:13am
 
Which goes back to Carl's other comment, that the noise floor of the FFT is above the noise floor due to quantization noise. You need to increase the
number of FFT points until the noise floor is constant.
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #6 - Oct 3rd, 2017, 10:35am
 
sheldon wrote on Oct 3rd, 2017, 10:13am:
Which goes back to Carl's other comment, that the noise floor of the FFT is above the noise floor due to quantization noise. You need to increase the
number of FFT points until the noise floor is constant.  


As I know the noise floor of the FFT is the sum of SQNR (obligatory noise due to quantization) and processing gain(10log(N/2)), so theoretically FFT noise floor is always under SQNR. How is it even possible for the FFT noise floor to go beyond SQNR?
What kind of FFT limitation forces noise floor to go beyond SQNR?
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #7 - Oct 3rd, 2017, 4:05pm
 
Niloun,

   Oops, misspoke. You are confused. You are assuming that the FFT
noise floor is the same as the total noise. The SNR calculation uses
the total integrated noise across the Nyqvist band, from 0 to Fsample/2.
As you increase and decrease the number of FFT points, you are raising
and lowering the noise in the individual FFT bins. However, the total
noise, calculated by integrating across the band is constant.

                                                                        Sheldon
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #8 - Oct 3rd, 2017, 4:12pm
 
In answer to the last question, you can't do better than the quantization
limited noise floor for the total noise of the  ADC. The resolution of the
FFT is limited by the number of bits. However, by increasing the number
of FFT bins, you can decrease the FFT noise floor. So, you can lower the
FFT noise floor to as much as you want at the cost of increased simulation
time. However, the SNR won't change because every time you make the
FFT bin size smaller, you more bins.

                                                                      Sheldon  
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #9 - Oct 4th, 2017, 12:02am
 
I move the answer below.
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #10 - Oct 4th, 2017, 12:03am
 
A plot to illustrate the point. Two FFTs: 256 point and 16384 points, the
noise floor is different, however, the total integrated noise is the same
and roughly equal to the expected quantization noise floor of a 10 bit
ADC

                                 
Back to top
 

Screen_Shot_2017-10-03_at_11_51_31_PM.png
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #11 - Oct 4th, 2017, 12:07am
 
sheldon wrote on Oct 3rd, 2017, 4:05pm:
Niloun,

   Oops, misspoke. You are confused. You are assuming that the FFT
noise floor is the same as the total noise. The SNR calculation uses
the total integrated noise across the Nyqvist band, from 0 to Fsample/2.
As you increase and decrease the number of FFT points, you are raising
and lowering the noise in the individual FFT bins. However, the total
noise, calculated by integrating across the band is constant.

                                                                        Sheldon


No I am not confused about that part, I know that noise floor is not the sum of noise bins.
Let me repeat the question I asked in the first place:
If the total noise power is constant and the SNR formula is :

%noise = [s(1:sigbin-1);s(sigbin+1:end)];
%snr = 10*log10( s(sigbin)^2/sum(noise.^2) )


Why does the practical SNR of my designed ADC increase when the number of bins is increased?
It is just the same amount of noise spread among more bins.
Carl said that I am being limited by FFT, I don't understand "being limited by FFT".


Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #12 - Oct 4th, 2017, 12:16am
 
sheldon wrote on Oct 4th, 2017, 12:03am:
A plot to illustrate the point. Two FFTs: 256 point and 16384 points, the
noise floor is different, however, the total integrated noise is the same
and roughly equal to the expected quantization noise floor of a 10 bit
ADC

                                 


Thanks, so is it the output of an practical ADC simulation or an Ideal sine or an oscilloscope?

I see that your total noise is roughly constant (Not much SNR variations).
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 53

Re: SAR ADC SNR variations for different FFT numbers
Reply #13 - Oct 4th, 2017, 12:40am
 
[quote author=niloun link=1506761516/0#12 date=1507101368]sheldon wrote on Oct 4th, 2017, 12:03am:
A plot to illustrate the point. Two FFTs: 256 point and 16384 points, the
noise floor is different, however, the total integrated noise is the same
and roughly equal to the expected quantization noise floor of a 10 bit
ADC

                                 



when I simulate an ideal sine in Matlab I see the same results and snr variations are negligible for N=64,128,25,...
But as I import the Cadence data into Matlab with the same code, I have SNR improvements with N increment, however, when I use a hann window these variations are vanished.


Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: SAR ADC SNR variations for different FFT numbers
Reply #14 - Oct 4th, 2017, 12:58pm
 
Niloun,

  The noise should not increase with the number of bins, just guess,
but there must be something in the way you do the calculation. Are
you adding noise voltage or noise power?
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 3 
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.