The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> How to calculate SNR & SNDR in cadence spectre?
https://designers-guide.org/forum/YaBB.pl?num=1144564815

Message started by chungmnig on Apr 8th, 2006, 11:39pm

Title: How to calculate SNR & SNDR in cadence spectre?
Post by chungmnig on Apr 8th, 2006, 11:39pm

Hi~~~

I design a sigma delta ADC , and simulate it power spectrum density like attached file.
How do i calculate the SNR and SNDR in cadence spectre environment?
Is SNR only just look the picture to find difference between highest and noise floor ?

thanks~~!!

Title: Re: How to calculate SNR & SNDR in cadence spectre
Post by sheldon on Apr 9th, 2006, 4:36pm

Chungming,

  There are currently no standard calculator functions for SNR
and SINAD. You will need to write your own calculator functions
to implement the functions. One other option would be to dump
the FFT magnitudes to Excel and perform the calculation there.

Calculating SINAD is easy you just
need to sum up all the FFT bins in the band of interest. Calculating
SNR and THD are more complex because you need to account for
frequency folding due to sampling, that is the distortion tones
are aliased back into the Nyquist bandwidth need to be correctly
accounted for in the calculation.

Title: Re: How to calculate SNR & SNDR in cadence spectre
Post by chungmnig on Apr 10th, 2006, 12:21am


thanks  sheldon
I think i prefer using excel to calculate it , because i hve already had the FFT magnitude from wavescan table.
But i am curious the distinction between SINAD and SNDR , i feel there are almost the same.
And could you please tell me where i can find the code for calculate SNR and SNDR or what reference i can see.
thanks a lot~~~!!

Title: Re: How to calculate SNR & SNDR in cadence spectre
Post by sheldon on Apr 10th, 2006, 1:33am

Chungming,

  SNR is Signal to Noise Ratio and does not include distortion
  SINAD is Signal to Noise and Distortion Ratio, also called, SNDR

  You will need to perform the calculations in the power domain
   or use RSS in the voltage domain.  Measure the power in the
   Fundamental, at the input frequency, and the total power.

  SINAD = 10 log | (Fundamental) / ( Total -Fundamental)|

  Use SINAD when calculating effective number of bits

  SNR is more difficult since you need to account for the distortion
  tones, 2*fin, 3*fin, ...

   SNR  = 10 log | ( Fundamental) / ( Total - Fundamental - Distortion)|

   Normally transient analysis only includes numerical noise and shaped
quantitazation noise. You will need to use Spectre's transient noise analysis
to include the effect of device noise on the SNR. You will also need to
create a "noisy" clock, use Verilog-A, to model the effect of clock jitter on
SNR and SINAD.  

Also, there is one other option, you can calculate the SINAD directly
using the Spectre's Fourier Analysis.  It is very accuracte but has two
limitations,
1) It is uses the Rectangular Window function, for a Sigma Delta
   you should use a windowing function. You can use Verilog-A
   to create your window function so this is not a big issue.
2) The analogLib implementation of the four component is incomplete
    so you will either need to run from the command line or edit  the
    CDF to add complete syntax to the component.

                                                                   Sheldon

Title: Re: How to calculate SNR & SNDR in cadence spectre
Post by chungmnig on Apr 10th, 2006, 4:51am

Hi~~  sheldon
I understand your suggest~~~
In calculator i can find snr function and it has many window function  ex: hamming , blackman .....
why you say it noly rectangular?
but except using retangular window , the SNDR result is very bad with other window function just about 11dB


I have another question about spectre calculator:
why i use spectre calculator function "psd" to plot PSD is differ from just only use fft function?
It seems  (fft reult)*2 =( psd result).
And i go to find power spectrum density theory in book, it seems the psd fuction is correct, is it?

thanks~~

Title: Re: How to calculate SNR & SNDR in cadence spectre
Post by gitarrelieber on Apr 11th, 2006, 4:18am

I use the fourier and fourier2ch components in the analogLib to calculate the SFDR and THD. The component will automatically invoke a FOURIER analysis and deliver the nonlinearity in term of THD. You only need to simulate one period of the sinusoid signal. The result is more accurate than the conventional method with FFT.

To automatically extract the SNR and SNDR, you can use OCEAN function of Cadence. It is actually very easy to program.

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by dafijido on Apr 14th, 2013, 1:22pm

gitarrelieber,

Could you elaborate more on OCEAN script to determine SNR/SNDR(SINAD)/SFDR all the parameters required to determine effective number of bits (ENOBs) for the delta sigma ADCs?

Thank you!

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by sheldon on May 23rd, 2013, 10:21pm

One comment,

  Gita is correct about the Fourier component, however, the Fourier
component does not support windowing. If you simulate a Delta Sigma
Converter and analyze the results with the Fourier, you will need to
include a window function in the simulation. You can use Verilog A
to create a window function behavioral model, then the model to
filter the Converter output before the Fourier component.

                                                                         Sheldon

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by ali_kourani on Jun 16th, 2013, 4:35pm

hello All
I hope u guys don't mind reviving the post in 2013 :)

I have a Question , I am doing a behavioral simulation on cadence for 2nd order switched cap sigma delta modulator,
I don't get the required 40 slope in the PSD
according to Schreier " understanding sigma delta ", it is best to use number of points for FFT = 64*OSR using a hann window
OSR = 256, FFT point = 2^13 , fsampling = 2.56KHz ,
signal is DC (PTAT and CTAT volatges with conversion time = 0.1s )

attached is the the PSD plot
I really don't know what is the problem
the 2 opamps, comparator and switches are designed using veriloga

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by sheldon on Jun 17th, 2013, 10:55pm

Ali,

 You might try using log for the x axis, that will make the results
look a little better. However, there is a large tone everywhere. Not
sure about the source, low order delta-sigma with dc input?

                                                                  Sheldon

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by ali_kourani on Jun 18th, 2013, 2:07am

it is 2nd order sigma delta (incremental ADC)
and the input is PTAT (DC)
the tones are every 10Hz ( the reset period of the integration cap to take new sample= 0.1 sec- BW of the DC signal)
ie : Time of conversion = 0.1sec

is there any comments about the way I do the windowing in the previous source ?

Regards,

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by sheldon on Jun 18th, 2013, 7:56am

Ali,

Some comments:

1) If you plot on a logarithmic scale the results will look better

2) Your circuit has a problem at low frequencies the transfer function
    continue to decrease as frequency decreases. In your case the
    transfer function flattens out. So there is a problem with your
    design that is preventing you from achieving the result you
    are expecting to see.

3) Is your sampling frequency 10Hz or 2.56kHz? Or why do you
   need the external S/H in this case? Since your trying to debug
   a problem, why don't you use a fixed input and skip the
   extra S/H to avoid the spikes everywhere, it will make it
   easier to identify and correct the issue.

4) 64 points * OSR = 64 * 256 = 2^6 * 2^8 = 2^14 = 16384
   in this case there are other problems so this is not really
   relevant

Title: Re: How to calculate SNR & SNDR in cadence spectre?
Post by ali_kourani on Jun 18th, 2013, 9:29am


attached is the ct. I am implementing
it's IDC (incremental data converter) not a conventional sigma delta due to the reset switches (not a continuous running ADC)
all the opamp are veriloga
sampling frequency is 2560 Hz
reset period = 100ms
OSR= 256

may that reset effect has something to do with psd ?

I 'll consider ur notes
Regards,

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.