+ Post New Thread
Results 1 to 13 of 13

16th February 2017, 10:46 #1
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Difference between PSD ( power density spectrum ) and Spectrum measurement in Cadence
Hello there,
I am doing a transient analysis on a 3rd order SD modulator ( MASH topology ) and i want to plot the power spectrum of the quantization noise.
Thing is, that i am confused on how to do that.
My first try was sending the output sequence to Measurement tab> Spectrum and ploting the curve.
My second try was sending the output sequence to the calculator and using the psd() function , afterwards use db10() function and finally plotting.
The 2 above mentioned curves have the same slope but a constant difference between them of about 40 dB ( e.g the first curve has peak at 20 dB and the second at 60 dB).
Could you enlighten me as to which is the correct way?
Thank you

16th February 2017, 12:12 #2
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Use correct terminology.
There is no tool Cadence.
You use db20( dfft() ) not db10( psd() ) there.
However they have to be almost same if you use Cadence OCEAN functions.
The second plot is dB10(psd()) and is generated if I send the output data to the calculator and use the psd() function.
The 2 plots are far from same though, they have around 40 dB constant difference.

16th February 2017, 12:12

16th February 2017, 12:23 #3
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Use correct terminology.
There is no tool Cadence.
Surely answer my questions in your previous thread.
http://www.edaboard.com/thread364412.html#8
You use db20( dfft() ) not db10( psd() ) there.
However they have to be almost same if you use Cadence OCEAN functions, if you set parameters correctly.
http://www.designersguide.org/Forum...1242749411/3#3
Surely answer my questions in your previous thread.
http://www.edaboard.com/thread364412.html#8
Show us all results and their settings correctly with including the following.
http://www.edaboard.com/thread364219.htmlLast edited by pancho_hideboo; 16th February 2017 at 12:28.

16th February 2017, 14:13 #4
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
I post again in case my previous posts weren't submitted correctly.
For all the following plots , the number of accumulator bits are N=14 and the input fractional word is 2037.
1) Scilab , using fft.
2)Scilab, using pspect() function ( equivalent to periodogram function in Matlab )
3) Cadence Virtuoso, using fft() ( from Measurement tab> Spectrum )
4) Cadence Virtuoso, using psd() function ( from calculator )
5) Ideal curve, plotted in Scilab

16th February 2017, 14:13

16th February 2017, 15:43 #5
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Show us arguments of all functions.

16th February 2017, 16:16 #6
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Ok, for all cases N=14 and input 2037 as before. Also sampling frequency is 1Ghz (10^9), let's call it Fs.
"Cout" is the output carry sequence with range [3,4] from the 3rd order SD modulator and length 2*2^(N+1)=65536 samples ( 2 full sequence cycles as with an odd input , max sequence 2^(N+1) is guaranteed).
For SciLab:
Frequency construction : f=Fs*(1:length/2)/length  ( frequency vector from 0 to Fs/2)
1) SciLab plot using fft()
spectrum=abs(fft(Cout)/(length/2))
spectrum=spectrum(1:length/2)^2
plot2d("ln",f(1:length1),10*log10(spectrum))  (argument "ln" means that the x axis is logarithmic and the y axis is normal )
2) SciLab plot using pspect() function
spectrum=pspect(length/2,length,'hn',Cout)
plot2d("ln",f,10*log10(Cout(1:length)))
The arguments in pspect() function are : offset of each data window,number of points in window, window type (here Hanning), sampled vector)
3) Cadence Virtuoso using fft()
Start time : x ns
Stop time : (x + 2*length) ns
sample count/Freq= 2*length  ( same result if i chose "length" sample count , but the maximum frequency would be Fs/2 )
Start/end Freq= 15.26k to 1G
Window type : Rectangular  ( little to no difference with Hanning)
4) Cadence Virtuoso using psd()
Start/Stop : Same as above
Number of samples : 2*length
Window : Hanning
Smoothing factor : 1
Windows size : 2*length
Detrending Mode : Mean
Coherent gain : default
Coherent gain factor : 1
5) Ideal curve
spectrum= 1/(12*2^(N+1))* (2*sin(pi*f/Fs))^6  ( 3rd order SD modulator )
plot2d("ln",f,10*log10(spectrum))

16th February 2017, 16:16

16th February 2017, 16:43 #7
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
See http://www.edaboard.com/thread364412.html#9
Sorry, I don't have Scilab, so I don't know definition of psd functions of Scilab correctly.

16th February 2017, 16:50 #8
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
http://https://searchcode.com/codesearch/view/25398262/
This is the source code of pspect() function in SciLab ( that as far as i understand is the equivalent to psd())

16th February 2017, 17:06 #9
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Currently psd() is not recommended to use in MATLAB.
https://jp.mathworks.com/matlabcentr...psdandpwelch
http://www.designersguide.org/Forum...1405235104/2#2
pwelch() give dBV/Hz, on the other hand psd does not.Last edited by pancho_hideboo; 16th February 2017 at 17:12.

17th February 2017, 13:54 #10
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
Last edited by pancho_hideboo; 17th February 2017 at 14:02.

17th February 2017, 13:54

17th February 2017, 14:03 #11
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1

17th February 2017, 19:08 #12
 Join Date
 Oct 2006
 Location
 Real Homeless
 Posts
 1,438
 Helped
 398 / 398
 Points
 10,321
 Level
 24
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad

20th February 2017, 09:07 #13
 Join Date
 Jan 2017
 Posts
 26
 Helped
 0 / 0
 Points
 134
 Level
 1
Re: Difference between PSD ( power density spectrum ) and Spectrum measurement in Cad
As you can see on the screenshot that i uploaded on the other thread, i have the correct values on the required fields.
( Start time : 2.125 ns
Stop time : (2.215 + 2*2^15) ns )
+ Post New Thread
Please login