+ Post New Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 23
  1. #1
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    MASH ( SD modulator) power spectrum dc term

    I am trying to plot the power spectrum of the quantization noise for a MASH topology(for frequency synthesizer) , but i have an offset of about 20 dB from the ideal curve.

    On a last paper that i read , it was written that the desired power spectrum is given from the output of the SD modulator after removing the dc term.
    What is the dc term that is mentioned? Is it the mean value of the sequence? ( in the case of frequency synthesizer, the fractional word)
    Or just the term at frequency 0?

    Thank you in advance,
    Nikos

  2. #2
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Quote Originally Posted by NikosTS View Post
    On a last paper that i read,
    it was written that the desired power spectrum is given from the output of the SD modulator after removing the dc term.
    What is the dc term that is mentioned?
    Error due to resolution of data path.



    •   Alt15th February 2017, 16:39

      advertising

        
       

  3. #3
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Could you explain it a bit more extensively please?
    Does it depend on the number of accumulator bits ( N ) or the fractional input?

    Thank you



  4. #4
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Quote Originally Posted by NikosTS View Post
    Does it depend on the number of accumulator bits ( N ) or the fractional input?
    Yes........



  5. #5
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Well, as long as the initial condition is odd , fractional input should have no impact on the curve.
    As far as the accumulator bits are concerned, they should add just a small difference on the magnitude. For any number of bits that i tried though, the difference between my curve and the ideal is a constant 20 dB difference.

    Why does this constant difference exists? I am pretty sure my plot is correct ( spectrum analysis on Cadence Virtuoso)



  6. #6
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term




  7. #7
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Click image for larger version. 

Name:	virtuoso_psd.jpg 
Views:	5 
Size:	211.3 KB 
ID:	136170Click image for larger version. 

Name:	scilab_psd.jpg 
Views:	2 
Size:	50.4 KB 
ID:	136169Click image for larger version. 

Name:	ideal.jpg 
Views:	4 
Size:	41.9 KB 
ID:	136171

    OK so , the first image is the power spectrum as plotted from Cadence Virtuoso.
    The second one is the power spectrum ( same configuration as in Virtuoso ), this time plotted in Scilab
    The third one is the ideal curve, as it is written in the literature.



  8. #8
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Use correct terminology.
    Quote Originally Posted by NikosTS View Post
    OK so , the first image is the power spectrum as plotted from Cadence Virtuoso.
    This plot is a result of dfft() of Cadence OCEAN function.

    Quote Originally Posted by NikosTS View Post
    The second one is the power spectrum ( same configuration as in Virtuoso ), this time plotted in Scilab
    It seems spectrum results are same between dfft() of Cadence OCEAN function and Scilab ?

    What function do you apply in Scilab ?
    Even in Cadence OCEAN, two functions exist for evaluating Spectrum, dfft() and psd().

    Do you use psd() or dfft() in Scilab ?

    In MathWorks MATLAB, fft(), psd(), pwelch(), etc. exist.
    http://www.designers-guide.org/Forum...1405235104/2#2

    Definition of fft() is different between Keysight ADS PostProcessing and MathWorks MATLAB.

    Definition of fft() is same between Keysight ADS PostProcessing and Cadence ADE PostProcessing.
    http://www.designers-guide.org/Forum...1484736874/8#8

    Quote Originally Posted by NikosTS View Post
    On a last paper that i read,
    it was written that the desired power spectrum is given from the output of the SD modulator after removing the dc term.
    What is the dc term that is mentioned?
    There is no DC term in your plot.
    On the other hand, DC term surely exist in my plot.
    http://www.designers-guide.org/Forum...1361756819/3#3

    Quote Originally Posted by NikosTS View Post
    but i have an offset of about 20 dB from the ideal curve.
    Your issue has no relation to DC term.

    Simply constant deviation between spectrum from time domain and Z-domain transfer function.

    Quote Originally Posted by NikosTS View Post
    The third one is the ideal curve, as it is written in the literature.
    Do you mean this is a result of Z-Domain Transfer function plot ?
    Cadence OCEAN function, dfft() is not Z-domain tranfer function.
    Last edited by pancho_hideboo; 16th February 2017 at 11:44.



  9. #9
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Thank you for your reply,

    This plot is a result of dfft() of Cadence OCEAN function.

    It seems spectrum results are same between dfft() of Cadence OCEAN function and Scilab ?

    What function do you apply in Scilab ?
    Even in Cadence OCEAN, two functions exist for evaluating Spectrum, dfft() and psd().

    Do you use psd() or dfft() in Scilab ?
    Yes, the plots from dfft() in Cadence OCEAN function and scilab are the same.
    The plot from Scilab is also the result of using fft() ( and afterwards squaring the output).

    If i use the equivalent of psd() function in Scilab ( it is named pspect) i get the following curve, which is way off ( going to positive dBs)
    Click image for larger version. 

Name:	pspect.jpg 
Views:	1 
Size:	58.3 KB 
ID:	136176

    If , on the other hand, I use the psd() function in Cadence i get the following curve ( dBs dropped lower than the ideal curve, that is impossible i think).

    Click image for larger version. 

Name:	cadence_psd.jpg 
Views:	2 
Size:	276.1 KB 
ID:	136177


    Do you mean this is a result of Z-Domain Transfer function plot ?
    The ideal curve is simply the plot of the formula : Noise spectral density = (1/12*Sequence_length)* (1-z^-1)^6
    (found in numerous papers, like Reduced Complexity MASH Delta-Sigma Modulator, Zhipeng Ye and Michael Peter Kennedy)

    If i didn't make something clear, please tell me.



  10. #10
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Quote Originally Posted by NikosTS View Post
    If i didn't make something clear, please tell me.
    Still, you can not understand things correctly and also not understand correct terminologies.

    Consider frequency bin width of result of dft() and definition of dft().

    Surely consider what units are applied for y-axis of your plot each other.
    In your setting, they are different each other.

    fs ; Sampling Frequency
    Nfft = 2^17
    BinWidth=fs/Nfft

    (1) db20( dft() ) - db10(BinWidth) gives dBV/Hz
    (2) db10( psd() ) gives dBV/Hz
    (3) db10( (1/12)/(fs/2)*abs((1-z^-1)^3)^2 ) which gives dBV/Hz

    You can plot these three in Cadence ViVA.
    http://www.designers-guide.org/Forum...1444923186/6#6
    Last edited by pancho_hideboo; 16th February 2017 at 16:51.


    1 members found this post helpful.

    •   Alt16th February 2017, 16:31

      advertising

        
       

  11. #11
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    fs ; Sampling Frequency
    Nfft = 2^17
    BinWidth=fs/Nfft
    For N=14 bits, the full sequence length is Ls=2^(N+1)=15. And i sample for 2 full Ls, that is 2^16 points.
    My question is that , if i sample for let's say 16 full Ls, the binWidth according to your formula will be 2^(N+1) * 16= 2^19?
    So according to this
    Code:
    (1) db20( dft() ) - db10(BinWidth) gives dBV/Hz
    that means, there will be difference to the output spectrum if I sample more periods of the periodic signal?





    (1) db20( dft() ) - db10(BinWidth) gives dBV/Hz
    That one gives an output spectrum that peaks at around -60dB ( yet, as i mentioned above , it changes for longer sampling time )

    (2) db10( psd() ) gives dBV/Hz
    This one gives almost the same as above, so I guess it is ok.

    (3) db10( (1/12)/(fs/2)*abs((1-z^-1)^3)^2 ) which gives dBV/Hz
    According to the literature, (1-z^-1)^3)^2 expands to (2*sin(pi*f/fs))^6 right?
    The thing that confuses me is the factor (1/12)/(fs/2). On almost every paper I came across, this factor is (1/12)/Ls.
    If i plot your equation ( in SciLab ) , i get the peak at -80 dB ( big enough difference from the measured data ).
    If i plot my variation ( that is substituting fs/2 with Ls ), i get the peak at -40 dB (still 20 dB difference from measured data ).

    Thank you for your time



  12. #12
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Tottally, I can not understand what you want to mean at all.
    Before posting, study basic mathematic.

    Quote Originally Posted by NikosTS View Post
    For N=14 bits, the full sequence length is Ls=2^(N+1)=15.
    I can not understand what you want to mean at all.

    Full sequence length is 2^Nbit - 1 = 16383, Nbit=14

    Quote Originally Posted by NikosTS View Post
    I And i sample for 2 full Ls, that is 2^16 points.
    I can not understand what you want to mean at all.

    There is no direct constraint between Nfft and Nbit.

    Show me the followings.
    fs ; Sampling Frequency
    Tstart ; argument for dft()
    Tstop ; argument for dft()
    Nfft ; argument for dft()

    Nfft have to be (Tstop-Tstart)*fs.
    delta_f = 1/(Tstop-Tstart)

    Quote Originally Posted by NikosTS View Post
    My question is that , if i sample for let's say 16 full Ls, the binWidth according to your formula will be 2^(N+1) * 16= 2^19?
    I can not understand what you want to mean at all.

    Quote Originally Posted by NikosTS View Post
    that means, there will be difference to the output spectrum if I sample more periods of the periodic signal?
    I can not understand what you want to mean at all.

    Normalized Spectrum(dBV/Hz) is not so dependent on sample periods as far as delta_f is relative small.

    Show me results of following and setting.
    (1) db20( dft() ) - db10(BinWidth)
    (2) db10( psd() )

    Quote Originally Posted by NikosTS View Post
    According to the literature, (1-z^-1)^3)^2 expands to (2*sin(pi*f/fs))^6 right?
    Maybe right.

    Quote Originally Posted by NikosTS View Post
    The thing that confuses me is the factor (1/12)/(fs/2).
    On almost every paper I came across, this factor is (1/12)/Ls.
    Rather I don't see such expression.
    I think your expression is normalized as unitless, so its denominator is not Hz.
    Surely read your every paper.

    Attached is a extract from very famous book.
    https://www.amazon.com/Understanding...4826787&sr=1-1

    Also see Eq.(23) the following.
    http://www.adv-radio-sci.net/5/313/2...5-313-2007.pdf
    This is phase noise PSD not delta_N PSD
    See http://www.designers-guide.org/Forum...1444923186/6#6

    Quote Originally Posted by NikosTS View Post
    If i plot your equation ( in SciLab ),
    i get the peak at -80 dB ( big enough difference from the measured data ).
    If i plot my variation ( that is substituting fs/2 with Ls ), i get the peak at -40 dB (still 20 dB difference from measured data).
    Show me your results and fs.
    Last edited by pancho_hideboo; 17th February 2017 at 12:09.



  13. #13
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    OK, as it seems i have trouble explaining what i mean, so i am attaching the script that i run for the plots ( i have added as many comments as necessary i think, but if you need more info on any line of the code tell me.)
    The script is written in Scilab ( the syntax is almost identical to Matlab, so you won't have trouble understanding it ).
    Click image for larger version. 

Name:	script1.jpg 
Views:	6 
Size:	128.3 KB 
ID:	136205
    Click image for larger version. 

Name:	scripts2.jpg 
Views:	3 
Size:	22.1 KB 
ID:	136206

    The plots generated are the following.
    Click image for larger version. 

Name:	plots.jpg 
Views:	3 
Size:	139.8 KB 
ID:	136207



  14. #14
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Quote Originally Posted by NikosTS View Post
    OK, as it seems i have trouble explaining what i mean
    Simply you can not understand basic mathematic especially fft.

    Surely read your every paper.

    Show me informations I requested in #12.

    You don't show at all.

    Quote Originally Posted by pancho_hideboo View Post
    Show me the followings.
    fs ; Sampling Frequency
    Tstart ; argument for dft()
    Tstop ; argument for dft()
    Nfft ; argument for dft()
    ........................................
    Show me results of following and setting.
    (1) db20( dft() ) - db10(BinWidth)
    (2) db10( psd() )
    These are for Cadence ViVA using time-domain data.

    Quote Originally Posted by pancho_hideboo View Post
    Show me your results and fs.
    This is for Plot using frequency-domain data in Scilab.
    Last edited by pancho_hideboo; 17th February 2017 at 13:44.



  15. #15
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    For both plots, Fs=1 GHz

    db20( dft()) - db10(binWidth)
    Click image for larger version. 

Name:	cadenceFFT.jpg 
Views:	5 
Size:	258.1 KB 
ID:	136208

    db10(psd())
    Click image for larger version. 

Name:	cadencePSD.jpg 
Views:	8 
Size:	315.1 KB 
ID:	136209



  16. #16
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    fs=1GHz
    Nfft=65536=2^16
    Tstart=2.125002nsec
    Tstop=Tstart+2*32768/fs=Tstart+Nfft/fs

    BinWidth=fs/Nfft
    db10(BinWidth)=41.8dB


    (1) db20( dft() ) - db10(BinWidth) gives -64.2481dB at 493.713MHz
    (2) db10( psd() ) gives -58.578dB at 473.419MHz

    Show me (3) db10( (1/12)/(fs/2)*abs((1-z^-1)^3)^2 )

    Quote Originally Posted by NikosTS View Post
    Ok, for all cases N=14 and input 2037 as before.
    .................................................
    "Cout" is the output carry sequence with range [-3,4] from the 3rd order SD modulator
    Are your outputs in Spectre truely [-3,4] ?
    I think they are 2^Nbit*[-3,4].
    Last edited by pancho_hideboo; 17th February 2017 at 14:32.



  17. #17
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Show me (3) db10( (1/12)/(fs/2)*abs((1-z^-1)^3)^2 )
    I wasn't sure how to plot it in Virtuoso , so i plotted this one in Scilab.
    Click image for larger version. 

Name:	ideal.jpg 
Views:	2 
Size:	51.0 KB 
ID:	136211

    Are your outputs in Spectre truely [-3,4] ?
    I think they are 2^Nbit*[-3,4]
    Yes they are in the range [-3,4]



    •   Alt17th February 2017, 14:40

      advertising

        
       

  18. #18
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    Quote Originally Posted by NikosTS View Post
    Yes they are in the range [-3,4]
    Show me time domain waveform as a result of Cadence Spectre.



  19. #19
    Junior Member level 3
    Points: 202, Level: 2

    Join Date
    Jan 2017
    Posts
    27
    Helped
    0 / 0
    Points
    202
    Level
    2

    Re: MASH ( SD modulator) power spectrum dc term

    Click image for larger version. 

Name:	timedomain.jpg 
Views:	5 
Size:	257.2 KB 
ID:	136212

    That is a small segment of the waveform



  20. #20
    Advanced Member level 5
    Points: 10,725, Level: 24
    pancho_hideboo's Avatar
    Join Date
    Oct 2006
    Location
    Real Homeless
    Posts
    1,506
    Helped
    419 / 419
    Points
    10,725
    Level
    24

    Re: MASH ( SD modulator) power spectrum dc term

    >> fs=1e6;
    >> f=fs/2=0.5e6;
    >> Se=(1/12)/(fs/2);
    >> Sq=Se*(2*sin(pi*f/fs))^6;
    >> 10*log10(Sq)
    ans = -49.7197

    See result of order=3 of the following.
    http://www.designers-guide.org/Forum...s/hoge_001.jpg

    Here order=3, fs=1MHz
    You can see -50dB/Hz Spectrum at f=fs/2=0.5MHz.

    My results from Cadence Spectre Transient Analysis using Verilog-A DSM Model is very close to Sq.

    You set fs=1e9, so Se is fairy small.
    Sq=-79.7dB/Hz at f=fs/2 is reasonable.

    Raw_Spectrum is a result of db20( dft() ) with hanning window.
    See Appendix-A of the followings.
    https://www.amazon.com/Understanding...4826787&sr=1-1

    Smoothed_Spectrum is a db10( circ_smooth( mag(inv_db20(Raw_Spectrum))**2, 16 ) ).
    I ported "circ_smooth()" of delta-sigma toolbox of MATLAB to Cadence ADE as Skill function.
    https://jp.mathworks.com/matlabcentr.../circ_smooth.m

    Now you apply window size=Nfft.
    Try to reduce window size of psd(), such as Nfft/2, Nfft/4, Nfft/8, .....

    Quote Originally Posted by NikosTS View Post
    I am trying to plot the power spectrum of the quantization noise for a MASH topology(for frequency synthesizer)
    Why do you use fs=1GHz ?

    I can not believe such high frequency clock for Delta-Sigma-Fractional-N Frequency Synthesizer.

    Assume fvco=10GHz.
    fs=1GHz means average divide-ratio is around 10.

    3rd-Order-DSM perturb divide-ratio from 10-3 to 10+4.
    Generally unless average divide-ratio is enough large compared to delta_N range, e.g. [-3, 4], DSM-PLL can not work.
    Last edited by pancho_hideboo; 17th February 2017 at 18:50.



--[[ ]]--