The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Dec 4th, 2020, 2:55am
Pages: 1 2 3 
Send Topic Print
SAR ADC SNR variations for different FFT numbers (Read 11276 times)
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #15 - Oct 04th, 2017, 11:59pm
 
sheldon wrote on 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?


I use power as I said above:

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

When I use a Hann Window (which reduces signal discontinuity) there is negligible SNR variations, I guess it is something to do with that, If the calculations were wrong, ideal sine (only containing quantization noise) would also give wrong results.
Back to top
 
 
View Profile   IP Logged
RobG
Community Fellow
*****
Offline



Posts: 569
Bozeman, MT
Re: SAR ADC SNR variations for different FFT numbers
Reply #16 - Oct 8th, 2017, 4:43pm
 
With coherent (prime) sampling and rectangular window I see only a dB or so of SNDR variation as I increase the number of samples. Perhaps it is your "integer sampling" instead of prime sampling that is throwing it off.

I suppose the first few samples of your ADC could also be bad.
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #17 - Oct 8th, 2017, 9:57pm
 
RobG wrote on Oct 8th, 2017, 4:43pm:
With coherent (prime) sampling and rectangular window I see only a dB or so of SNDR variation as I increase the number of samples. Perhaps it is your "integer sampling" instead of prime sampling that is throwing it off.


Thanks RobG, I stated above that by "integer cycles" I mean integer/prime number of cycles. For example I use 7 cycles for N=64.

RobG wrote on Oct 8th, 2017, 4:43pm:
I suppose the first few samples of your ADC could also be bad.

I have checked the digital output codes both manually and by Matlab, I don't see much difference between the first samples and the rest but maybe you are right I must try.
Back to top
 
« Last Edit: Oct 9th, 2017, 4:44am by niloun »  
View Profile   IP Logged
RobG
Community Fellow
*****
Offline



Posts: 569
Bozeman, MT
Re: SAR ADC SNR variations for different FFT numbers
Reply #18 - Oct 9th, 2017, 9:21am
 
Sorry I missed that you were doing what I call prime sampling. I did not see where you told us how much it is varying - what is the change you are seeing?

You seem to be doing everything correct as far as I can tell.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re: SAR ADC SNR variations for different FFT numbers
Reply #19 - Oct 10th, 2017, 11:37am
 
Hi Niloun,

Can you post pictures of what your FFT's look like before and after increasing the number of bins? (say number of points > 1024). The examples where you say increasing the number of bins helps the ENOB.

I am suspecting you might be getting spectral leakage. That might be why changing bins with a Hann Window does not change much.
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #20 - Oct 10th, 2017, 12:14pm
 
RobG wrote on Oct 9th, 2017, 9:21am:
Sorry I missed that you were doing what I call prime sampling. I did not see where you told us how much it is varying - what is the change you are seeing?

You seem to be doing everything correct as far as I can tell.


For N=64 cycles=7

without windowing: SNR=22.7184 ENOB=3.4815
with windowing:     SNR=41.6099 ENOB=6.6196

For N=4096 cycles=409

without windowing SNR=38.1335 ENOB=6.0421
with windowing:     SNR=40.0398 ENOB=6.3588
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re: SAR ADC SNR variations for different FFT numbers
Reply #21 - Oct 10th, 2017, 12:21pm
 
Hey Niloun,

I asked for the pictures because it will tell us if you have spectral leakage or not. I can't just tell from the numbers.

Basically, I am guessing your 64 pt FFT with rectangular window (what you are calling no window) looks like the 2nd picture on this page (triangular towards the bottom of the fundamental tone).

https://www.maximintegrated.com/en/app-notes/index.mvp/id/1040
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #22 - Oct 10th, 2017, 12:34pm
 
DanielLam wrote on Oct 10th, 2017, 11:37am:
Hi Niloun,

Can you post pictures of what your FFT's look like before and after increasing the number of bins? (say number of points > 1024). The examples where you say increasing the number of bins helps the ENOB.

I am suspecting you might be getting spectral leakage. That might be why changing bins with a Hann Window does not change much.


For N=64 cycles=7 without windowing




For N=64 cycles=7 with a Hann window




For N=4096 cycles=409 without windowing




For N=4096 cycles=409 with a Hann window






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



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #23 - Oct 10th, 2017, 12:35pm
 
DanielLam wrote on Oct 10th, 2017, 12:21pm:
Hey Niloun,

I asked for the pictures because it will tell us if you have spectral leakage or not. I can't just tell from the numbers.

Basically, I am guessing your 64 pt FFT with rectangular window (what you are calling no window) looks like the 2nd picture on this page (triangular towards the bottom of the fundamental tone).

https://www.maximintegrated.com/en/app-notes/index.mvp/id/1040


I was preparing your answer.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re: SAR ADC SNR variations for different FFT numbers
Reply #24 - Oct 10th, 2017, 12:52pm
 
Just to double check, your Fin has as many digit precision as possible right? For example, for Fin = 7/64 * Fs. That is the Fin input, and you are not using 0.11 * Fs as your Fin.

Otherwise, I am a little stumped. Best advice I can give is to make an ideal ADC in matlab, and make sure that works. If that works fine, I'd suspect a rounding issue somewhere. I'm assuming these measurements were from a Cadence sim?
Back to top
 
 
View Profile   IP Logged
RobG
Community Fellow
*****
Offline



Posts: 569
Bozeman, MT
Re: SAR ADC SNR variations for different FFT numbers
Reply #25 - Oct 10th, 2017, 6:30pm
 
Yeah, something's messed with the 64 pt sim. You shouldn't need windowing to get the noise floor down. My best guess is that the first few samples are corrupted (either the ADC or the way you are processing the data). Sometimes this can happen if your reference is settling, but that usually produces a skirt. It is really hard to debug from here. Let us know what you find out.
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #26 - Oct 11th, 2017, 12:45am
 
DanielLam wrote on Oct 10th, 2017, 12:52pm:
Just to double check, your Fin has as many digit precision as possible right? For example, for Fin = 7/64 * Fs. That is the Fin input, and you are not using 0.11 * Fs as your Fin.

Yes exactly, for instance when using N=64 and cycles=7 for Fs=200K, I choose Fin to be => 200k*7/64=21.875K


DanielLam wrote on Oct 10th, 2017, 12:52pm:
Otherwise, I am a little stumped. Best advice I can give is to make an ideal ADC in matlab, and make sure that works. If that works fine, I'd suspect a rounding issue somewhere.


I have simulated an ideal sine (only including quantization noise) and this SNR decline didn't happen at all(with and without a window).

DanielLam wrote on Oct 10th, 2017, 12:52pm:
I'm assuming these measurements were from a Cadence sim?

Yes, I have imported data from Cadence to Matlab.

Sounds that RobG is totally right, the first samples are corrupted, I will post the results below. Thanks so much for your help.
Back to top
 
 
View Profile   IP Logged
niloun
Community Member
***
Offline



Posts: 47

Re: SAR ADC SNR variations for different FFT numbers
Reply #27 - Oct 11th, 2017, 1:09am
 
RobG wrote on Oct 10th, 2017, 6:30pm:
Yeah, something's messed with the 64 pt sim. You shouldn't need windowing to get the noise floor down. My best guess is that the first few samples are corrupted (either the ADC or the way you are processing the data).

Thank you so much, your suggestion worked, I simulated the ADC for N=64 and cycles=7, I ran it for a longer time (640u instead of 320u) then I used output data from 320u to 640u :

N=64, cycles=7, Fin=20K, Fs=200K





RobG wrote on Oct 10th, 2017, 6:30pm:
Sometimes this can happen if your reference is settling, but that usually produces a skirt. It is really hard to debug from here. Let us know what you find out.

One of the professors in our department said that the circuit is trying to wake up in the first conversion cycles that's why the first few samples are corrupted. I don't understand "Circuit's trying to wake up"!

I am very thankful.
Back to top
 
 
View Profile   IP Logged
RobG
Community Fellow
*****
Offline



Posts: 569
Bozeman, MT
Re: SAR ADC SNR variations for different FFT numbers
Reply #28 - Oct 11th, 2017, 7:23am
 
Glad that worked. Waking up just means initial transients in the reference and/or bias currents are settling out.
Back to top
 
 
View Profile   IP Logged
DanielLam
Community Member
***
Offline



Posts: 76

Re: SAR ADC SNR variations for different FFT numbers
Reply #29 - Oct 11th, 2017, 9:49am
 
Nice one Rob. The good old transient startup times.
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 3 
Send Topic Print
Copyright 2002-2020 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.