Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

How to perform FFT analysis

Status
Not open for further replies.

skythunder

Junior Member level 3
Joined
Jul 2, 2007
Messages
28
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,281
Activity points
1,548
Hello, everyone,

can anyone tell me how to perform FFT (fast fourier transform) analysis with HSPICE integrated in Cadence analog artist development environment. Is there any special option within this tool ? I only find four analysis options : DC ,AC, Noise and Transient .
I want to check the output frequency components of my bandpass switched capacitor filter .

Thanks in advance
 

skythunder

Junior Member level 3
Joined
Jul 2, 2007
Messages
28
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,281
Activity points
1,548
Hi, renwl,

Thanks for your attention.
what kind of data do i export from HSPICE, I only got output data in terms of transient waveforms and netlist .

can you explain it more explicitly. cheers!
 

naalald

Full Member level 4
Joined
Dec 2, 2006
Messages
216
Helped
30
Reputation
54
Reaction score
5
Trophy points
1,298
Activity points
2,624
Why not using .FFT syntax for fft analysis?
 

sankudey

Full Member level 3
Joined
Sep 6, 2005
Messages
177
Helped
37
Reputation
74
Reaction score
11
Trophy points
1,298
Location
India
Activity points
3,523
There are two methods known to me as also mentioned in earlier posts. Just to elaborate them.

1. On cadence
----------
You select the waveform in the waveform window and do the FFT from the calculator available from the analog Design Environment (ADE). The function name is DFT. There you can specify the portion (in time) of the waveform to be taken for analysis and also the type (rectengular/hamming window etc.). This will give you the spectrum directly.

2. Exporting to do FFT in MATLAB
------------------------
You can export the waveform data to a text file by 'printvs' command available in the calculator. This textfile data could now be analysied in MATLAB to give the FFT.

sankudey
 

    skythunder

    points: 2
    Helpful Answer Positive Rating

skythunder

Junior Member level 3
Joined
Jul 2, 2007
Messages
28
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,281
Activity points
1,548
yes, I tried the first method you mentioned , and it works , thank you so much~!
 

abcyin

Full Member level 4
Joined
Apr 15, 2005
Messages
237
Helped
12
Reputation
24
Reaction score
3
Trophy points
1,298
Activity points
2,855
sankudey said:
There are two methods known to me as also mentioned in earlier posts. Just to elaborate them.

1. On cadence
----------
You select the waveform in the waveform window and do the FFT from the calculator available from the analog Design Environment (ADE). The function name is DFT. There you can specify the portion (in time) of the waveform to be taken for analysis and also the type (rectengular/hamming window etc.). This will give you the spectrum directly.

2. Exporting to do FFT in MATLAB
------------------------
You can export the waveform data to a text file by 'printvs' command available in the calculator. This textfile data could now be analysied in MATLAB to give the FFT.

sankudey
other than the mentioned two methods above, you can use .fft analysis directly in hspice, and the syntax of it can be got in the user's manual.

hope it helps!
 

finalvolition

Newbie level 4
Joined
Nov 3, 2006
Messages
6
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,306
you cna .fft syntax in HSPICE manual
fft is based on DFT, so you need to take care about
transient step for consistence to resolution.
Generally speaking, Fres (frequency resolution) is smaller with long simulation time due to larger window size. The analyzed frequency range is up to NP* fres ( NP is point set in FFT)
 

northeast1

Full Member level 2
Joined
Jun 21, 2007
Messages
147
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,296
Activity points
1,812
skythunder said:
Hello, everyone,

can anyone tell me how to perform FFT (fast fourier transform) analysis with HSPICE integrated in Cadence analog artist development environment. Is there any special option within this tool ? I only find four analysis options : DC ,AC, Noise and Transient .
I want to check the output frequency components of my bandpass switched capacitor filter .

Thanks in advance

Hi,

Using skill to write the progame
 

skythunder

Junior Member level 3
Joined
Jul 2, 2007
Messages
28
Helped
4
Reputation
8
Reaction score
0
Trophy points
1,281
Activity points
1,548
sankudey said:
There are two methods known to me as also mentioned in earlier posts. Just to elaborate them.

1. On cadence
----------
You select the waveform in the waveform window and do the FFT from the calculator available from the analog Design Environment (ADE). The function name is DFT. There you can specify the portion (in time) of the waveform to be taken for analysis and also the type (rectengular/hamming window etc.). This will give you the spectrum directly.

2. Exporting to do FFT in MATLAB
------------------------
You can export the waveform data to a text file by 'printvs' command available in the calculator. This textfile data could now be analysied in MATLAB to give the FFT.

sankudey
Hi, sankude, I have tried the first FFT method you mentioned on Cadence. However ,I met a new question. I don't know what the meaning of time portion and the sampling point number. When I increase the sampling point number, I got a larger frequency range. While I set up different portion of time ( the start time and the end time of analysis from waveform) , I would get different frequency sprectrum.
Can you please explain how to set up the analysis portion of time from waveform in order to get the correct frequency analysis ?
 

sankudey

Full Member level 3
Joined
Sep 6, 2005
Messages
177
Helped
37
Reputation
74
Reaction score
11
Trophy points
1,298
Location
India
Activity points
3,523
skythunder said:
Hi, sankude, I have tried the first FFT method you mentioned on Cadence. However ,I met a new question. I don't know what the meaning of time portion and the sampling point number. When I increase the sampling point number, I got a larger frequency range. While I set up different portion of time ( the start time and the end time of analysis from waveform) , I would get different frequency sprectrum.
Can you please explain how to set up the analysis portion of time from waveform in order to get the correct frequency analysis ?
Ok! I thought you can find it out by few trials and going by the help/manuals. Any way. The answear is following:

The DFT form asks for three important paramaters.
1. Time : from - to
2. No. of samples
3. Window type

The third one is known and may be found in any relevant book/literature. The first one is the portion of wave form on which the DFT will be performed. And the second one tells the DFT engine how many samples it would take from the portion of the waveform that is mentioned in the param-1. The samples are uniformly spaced.

Now, your observation is correct. The spectrum is related strongly to the first two paramemetrs (others as well!). This is explanied below:

Relation to param-1&2:
The number of output frequency points from DFT is related to the number of input sample points (from time domain voltage / current. N-no of samples of an wave will give you N-no of frequency points at DFT output (by basic DFT algo, go thru any book). In hard-ware, this N- is generally set to be power of 2 (16,32, -- 1024 etc.) to get implimentation advantage and called as 1024 -point DFT. In cadence, if you give a number which is power of two, it would be better. But not necessarily. I prefer to give 1024 or so. Thus when you increase the no. of points, it gives you larger spectrum.

Now, time portion, which the portion of the wave form, contains the direct information of the signal to be analysed. If you change it, the spectrum is going to be changed hugely as you are changing the input information only and not the DFT procssing accuracy etc.

How to choose them:

Setting the values are very important to ensure the results are correct.

To talk about the time portion, it is mandatory that you give at least one complete cycle of the wave-form to be analysed. Now, there will be some inherent delay of the circuit, i.e., if are measuring the ADC output, you definitely don't get the output code valid from time time zero. Thus it is preferable that the initial time is given after zero from where the output is valid. As a good practise, you can give a little delay at the input waveform such that you can visualise the change at the output too. Now, giving multiple cysles helps to increase the accuracy as random errors will be averaged out. But it will take more simulation time. So it is up to you to decide on this. for reference: you could go thru book of Walt Kester on Data Converter handbook (available in this board). This will make you even more clear.

To talk about the no. of samples, you atleast ensure that no siginificant information is lost or omitted due to less sampling, i.e., if one complete cycle of your ADC output contains X-output codes (not necessarily be distinct), you give X for onle cycle, 2X for two cycles etc. So, if Fsample/Fsig = X, give atleast X for onle cycle of waveform.


I guess now it is clear to you how it works. To add to that, please do mind that the first sample is taken on the initial time you mentioned. Thus, ensure that is a stable output stae, i.e., not the edge of two changing codes.

several other factors, e.g., coherent and non-coherent sampling, windowing etc., affect this measurement method and accuracy of the output. If you can find time, can go through the book mentioned above and also some good topics on this in this board.


All the best,
sankudey
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top