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