Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FFT from eda software output

Status
Not open for further replies.

hr_rezaee

Advanced Member level 3
Advanced Member level 3
Joined
Oct 6, 2004
Messages
747
Helped
109
Reputation
218
Reaction score
24
Trophy points
1,298
Location
Iran-Mashhad
Activity points
4,025
Hi
As you know eda software (such as hspice) output is not in a constant sample rate.
so,How I can get FFt from it in Matlab?
regards
 

resample it with a uniform function. For spectre, there is a function called: sample(waveform from to "linear" by);

Hope that helps....
 

    hr_rezaee

    Points: 2
    Helpful Answer Positive Rating
hi
thanks
but can this resampling effects the results?
I have anaother question :
in for example spectre we have no sample rate.
I want to get FFT from a analog output.
so, How I can determine DFT points and how many periods of signal is needed.
If you answer this question you will solve a lot of my problems.
Thanks
 

In theory, the sampling will affect the result, however, when you resample, you need to use very small sampling step, i.e., your sampling frequency will be much higher than your nyquist. If you have a periodic signal that you are trying to generate the DFT for, then all what you need is just couple of cycles (periods) of that signal. If your signal is NOT periodic, then you have to be careful when you pick the signal length in time, because, the simulation time that you take for FFT will have the same effect as when you multiply your signal by a pulse whose width equals to your simulation time. In frequency, this will result in a sinc function convolved with the original spectrum of your circuit.
To reduce the impact of simulation time on nonperiodic signals, you need to apply a filter or so called a windowing function. Examples of windows are the Hanning window, or the Hamming window ...etc. You can consult some DSP books about that.
Another thing that people use to smooth out the FFT is something called periodograms.
If you are looking for accurate measurements from the FFT, then you really have to understand the above very well and their effect on your FFT.
Best sources on this are the DSP books....

Hope that helps....
 

    hr_rezaee

    Points: 2
    Helpful Answer Positive Rating
Hi
Can you introduce me a book that exactly discussed this subject.
regards
 

Discrete-Time Signal Processing by Alan V. Oppenheim, Ronald W. Schafer, John R. Buck
Designers and Scientists guide for Digital signal processing..
Those are the ones I can think of now..

Hope that helps....
 

Hi
Can you explain more about "sample(waveform from to "linear" by)"
regards
 

"sample" is the name of the function.
"waveform" is the name of the signal that you want to sample.
"from" is the time you want to start sampling.
"to" is the time you want to stop the sampling.
"linear" is the type of sampling. Compare this to logscale, for example.
"by" is the sampling step.
Example: Lets say that you want to sample a sinusoidal singal that has a 100MHz frequency. This signal will have a period of 10ns.
Lets say that to avoid some simulations convergance at start up, you want start the sampling at 2ns. So your "from" is 2ns.
Lets also assume that you want to sample 20 cycles of the signal, so, your "to" should be 2ns+20*10ns = 22ns.
If you want to take 100 samples in each period, then your step will be 10ns/100 = 100ps.
So, to call the function, you do this:
SampledWaveform = sample("out" 2ns 22ns "linear" 100ps)


Hope that helps....
 

    hr_rezaee

    Points: 2
    Helpful Answer Positive Rating
Hi
thanks
now I want to take DFT.
is it true:
dft(sample("out" 2ns 22ns "linear" 100ps) 2ns 22ns 128 ...)
wil this calculate fft?
rehards
 

Most probably not.
First, In cadence, you may want to start the dft from the second sampled point. I do not know why cadence will require that, but that is what I found out.
Second, you need to provide a window type; hanning, blackmann or any othertype. If you have a periodic signal that you are trying to look at its DFT and you are taking integer mutiple of cycles, then the window type will not matter, however, if you are trying to look at thd DFT of aperiodic signal, then you should use one of the filters; I use hanning....

hope that helps....
 

hi
thanks
I asked this question to check the accuracy of fft or dft in eda softwares.
assume that I have a noisy sine wave in output and freq. is 24Mhz, max simulation step size is 10ps and I have a lots of periods.
please send a good setting for dft.
I must see freq. below 250Mhz.
regards
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top