The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 3:20pm
Pages: 1
Send Topic Print
Cadence ICFB crash with increased DFT sample numbers (Read 134 times)
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Cadence ICFB crash with increased DFT sample numbers
Aug 15th, 2011, 7:52am
 
Hi All,

I need help here! I am trying to use the DFT function of the calculator
on a switching waveform. Now as I increase the time-window I need to increase the number of samples. But beyond a sample number of 2^20 say with 2^22 Cadence is crashing! I am using IC6.1, 64 bit, and using AMS simulator.

Can anybody help here please? The worst part is that the calculator doesnt give any warning that I am exceeding a certain number limit, if that is the case.

Thanks
Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #1 - Aug 15th, 2011, 8:40am
 
I came across the book by Ken Kundert "The Designers Guide to Spice & Spectre". And it appears to me I better run fourier analysis rather than use the DFT function. But I dont see any such analysis in CAdence ADE. Can anyone help me finding it please?

Thanks
Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Cadence ICFB crash with increased DFT sample numbers
Reply #2 - Aug 15th, 2011, 10:03am
 
Rajdeep,

I don't know if Cadence has a limit in their DFT function - you will have to ask Cadence about that.

Quote:
... on a switching waveform. ...
And it appears to me I better run fourier analysis rather than use the DFT function. But I dont see any such analysis in CAdence ADE.
You can do a Fourier analysis with the fourier component (see Spectre User Guide). Note that this component does not sample your waveform.

B O E
Back to top
 
 
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #3 - Aug 15th, 2011, 11:45am
 
Thanks BOE!

I have started using it .... for the first time and I am no fourier analysis expert! Thanks to Kens book that I could at least know these things exist!!

I have specified the fundamental freq which is 6MHz and nothing else.
Do you recommend to specify other parameters as well? I mean in general, is it required?

Can I plot the final frequency spectrum like I could do it using DFT?

I could find almost no information in the cadence documentation, just one page for each of those 2 modules.

Thanks,
Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #4 - Aug 16th, 2011, 3:44am
 
Hi Guys,

I have been a bit impatient here. I got the result using spectre fourier analysis. It outputs a table reporting absolute and relative amplitude of the fundamental and the other harmonics (upto 9th). It also mentions the DC amplitude. But I was expecting a low frequency component as well i.e. lesser than the fundamental freq but higher than DC. I cant see any mention of it. So with Spectre Fourier Analysis, cant we see what is the amplitude of a freq component that is less than the fundamental freq?

Or do I choose the fundamental to be small? Its a bit confusing that it asks the fundamental freq rather than finding itself!

Thanks
Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #5 - Aug 16th, 2011, 8:33am
 
Why is it that you want to know the Fourier components at non-zero frequencies less than fundamental? By definition the fundamental frequency should be the lowest frequency of interest.

You have to specify the fundamental because there are times when it cannot determine it, such as if your circuit exhibits subharmonics (think frequency divider) or if you stimulate the circuit with a Verilog-A source.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #6 - Aug 17th, 2011, 12:51am
 
Thanks for the reply Ken!

I will explain what I am doing. I have a periodic clock with freq f0. I want to spread the freq spectrum of this clock by applying modulating signal that has a much lower freq. I can see in the transient that the clock period is not fixed now. Probably you have recognized already that is the well know spread spectrum thing I am trying. So I would ideally like to see the final freq spectrum of the final dithered clock.

So I would like to see some of the subharmonic terms as well as the higher harmonic terms. The subharmonic term to see whether I am creating anything in the audio bandwidth.

Do you reckon spectre fourier is a good choice for this? I see better result using the DFT tool (when it doesnt crash), i.e. I can see the spread etc. at the fundamental and higher harmonics but not much at sub-harmonics. I only see a term at around 500Hz which I am assuming the DC term only! I see that 500Hz peak for both the periodic clock and the dithered clock!
I was expecting to see another peak due to the slow modulation at a lower freq around 200KHz (according to my calculations). But I dont see that!

Rajdeep
Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Cadence ICFB crash with increased DFT sample numbers
Reply #7 - Aug 17th, 2011, 2:32am
 
Rajdeep,

Sorry about the late reply.

True, Cadence documentation is very short on this...
Here is my understanding:
Without going into details on the differences between Fourier integral and DFT, the fourier component essentially calculates the first N points of your DFT.
So if you want to use Spectre's fourier component, you'd have to use the modulating clock frequency as fundamental. This would probably push your N (no of harmonics) too high to be useful.

B O E
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #8 - Aug 17th, 2011, 4:14pm
 
Spectre's built-in Fourier analyzer component is only intended to compute a small number of harmonics. For this reason you would probably be better off using an FFT.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
RFICDUDE
Community Fellow
*****
Offline



Posts: 323

Re: Cadence ICFB crash with increased DFT sample numbers
Reply #9 - Aug 18th, 2011, 4:13am
 
How are you increasing the number of points for the DFT?

- If you are entering bigger numbers into the DFT form then the calculator interpolates the waveform to give you (tstop-tstart)/numpoints samples before taking the DFT. All this does is artificially raises the sample frequency of the DFT. It will not improve the low frequency resolution of the DFT.

- If, on the other hand, you are lengthening your simulation time duration (i.e. make tstop bigger) then you will increase the frequency resolution of the DFT fres=1/(num_sim_points*tstep). This will help you resolve lower frequency components.

- If you have good low frequency resolution, but the apparent floor of the DFT is too high to see the components then you may have spectral leakage in the DFT due to some transient or settling energy in the waveform result. If this is the problem then you can try using a window function in the DFT form (Hanning is my favorite) and see if it improves the dynamic range of the DFT result. If it improves, then you have a transient or settling issue with the waveform. You can reduce the transient/settling in the waveform by simulating longer and only take the DFT over the part of the waveform that has settled, or you can possibly use a steady state simulator like PSS shooting methods to give you a steady state answer. If you are using random dithering on the clock then a window function may be the most helpful solution.

Good luck.
Back to top
 
 
View Profile   IP Logged
rajdeep
Senior Member
****
Offline



Posts: 220
UK
Re: Cadence ICFB crash with increased DFT sample numbers
Reply #10 - Aug 19th, 2011, 3:17am
 
Hi Guys!

Thanks for helping out here!

RFICDUDE! The DFT form directly asks to enter number of samples. So thats what I enter using a simple (my own) formula: NoS = (4/T)*(tstop-tstart) whre T  is the smallest time period of the switching waveform. This is like 4 sampling per time-period T multiplied by the total transient window over which I want to see the DFT result.

So with T ~ 166nS, and tstop - tstart ~ 200mS Nos ~ 2^23 which is huge and cadence crashes.

What I understood that using more number of samples is safer than using less no. of samples since under-sampling can cause aliasing?
I thought more no. of samples means higher resolution.

So my question would be if I increase tstop-tstart, shouldn't I increase the number of samples as well?

Thnx!
Rajdeep

Back to top
 
 

Design is fun, verification is a requirement.
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Cadence ICFB crash with increased DFT sample numbers
Reply #11 - Aug 19th, 2011, 4:50am
 
Rajdeep,

Frequency resolution (spacing between bins): 1/(Tstop-Tstart).
max. frequeny (highest bin): fsample/2, with fsample=N/(Tstop-Tstart).

So yes, if you use too few points, you will get undersampling.

Also note that, as RFICDUDE pointed out, the calculator interpolates the simulation output to get equidistant time points as input of the DFT. If you have high SNR requirements, this can add significant error too. If you are unsatisfied with your accuracy ("DFT noise floor"), also consider forcing simulation timesteps at your DFT sample points.

B O E

PS: How much of the frequency range is actually of interest to you? If you talk about audio range and 5 Hz resolution, it seems only some 10 thousand frequency points of your millions of DFT points are relevant.
Back to top
 
 
View Profile   IP Logged
sheldon
Community Fellow
*****
Offline



Posts: 751

Re: Cadence ICFB crash with increased DFT sample numbers
Reply #12 - Oct 8th, 2011, 9:08pm
 
Rajdeep,

   It usually helps to provide context, that is, information about the
problem you are trying to solve. From reading through the e-mail,
you are trying to simulate a circuit with a 6 MHz clock, and look for
the low frequency subharmonics. In addition, you want to avoid
aliasing since high frequency harmonics aliasing into the audio band
might corrupt the results.

  So some suggestions:

1) In this case the DFT [FFT] is not the best choice for converting
   from time to frequency since it is susceptible to aliasing.

2) Use the Fourier Integral is since it is not susceptible to aliasing

3) To use the Spectre Spectre Fourier Integral in ADE add a fourier
    component from analogLib to the schematic.

4) You will need to modify the CDF to add support for the normalizing
   harmonic, that is, to define the harmonic to normalize the results
   too. Unfortunately, this Spectre Fourier analysis function has not
   been enabled in ADE.

   Let me know and I can provide guidelines for updating the CDF.

5) I would add a window function, Typically I use a Cosine2 VerilogA
   module to window the data for the Fourier Integral and this
   approach works well

6) Since your clock is 6MHz and the tones are ~500Hz, you will need
   to set the transient stop time as ((ratio of clk to tones)/clock
   frequency or about ~12,000/6MHz

7) I would actually add more frequency resolution since you are
   windowing the data, for example, 131072/6MHz. The increased
   frequency resolution will allow you to distinguish between the
   offset and a tone at 500Hz for example.

8) Note: the calculation in #6 & #7is actually the calculation for the
            Fourier fundamental frequency. You may need to add some
            additional time so that the circuit is at steady-state. The
            Fourier analysis will report on the periodicity.

9) Only keep the number of output tones you actually need. The
   Fourier Integral is more expensive numerically than the DFT,
   that is, it can take a long time to run.

10)  I am simulating a Class D Audio Amp and I am running a DFT
      in IC615 with 2^24 points without any issues (with the DFT).
      Not sure what the issues might be, you might want to talk to
      your customer support engineer.
     
                                                              Best Regards,

                                                                 Sheldon
Back to top
 
 
View Profile   IP Logged
Pages: 1
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.