The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Jul 22nd, 2024, 10:21am
Pages: 1 2 
Send Topic Print
Fourier analysis and DFT compare (Read 18622 times)
venki_vlsi
Junior Member
**
Offline



Posts: 29
warangal
Re: Fourier analysis and DFT compare
Reply #15 - May 30th, 2007, 5:43pm
 
hi driveforce and seldon.
I got result what i want.
I too added normharm in CDF and extracted the result.

Thanks
Regards
venkats
Back to top
 
 

s.venkat_nitw
View Profile   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Fourier analysis and DFT compare
Reply #16 - May 31st, 2007, 7:01pm
 
Hello,

The fourier component must have voltage input. Am I right? Is it feasible to do fourier analysis for a current?

I tried the following method in a spectre netlist, but it reported fatal error.

FOUR0 (I0:OUT_QN I0:OUT_QP) fourier fund=122.0703125K harms=4096 normharm=9

The error information in output log is shown below.

Error found by spectre during circuit read-in.
      "input.scs" 2249: No master specified for instance 'FOUR0'
      "input.scs" 2249: Unexpected signal or attribute name "I0:OUT_QN". Expected end of file or end of line.



Thanks
Yawei
Back to top
 
 
View Profile   IP Logged
venki_vlsi
Junior Member
**
Offline



Posts: 29
warangal
Re: Fourier analysis and DFT compare
Reply #17 - May 31st, 2007, 10:56pm
 
hi,

I didn't try with current node as input.

Please keep posting  messages if u got any new ideas on dac (measuring mismatch, modelling ..etc)and i too will do the same.

regards
venkats
Back to top
 
 

s.venkat_nitw
View Profile   IP Logged
RobertZ
Community Member
***
Offline

the art of analog

Posts: 55
San Diego, CA
Re: Fourier analysis and DFT compare
Reply #18 - Jun 4th, 2007, 12:17pm
 
hi, yawei,

Check this out.
insert a vdc = 0 into the branch you want to measure.
use a cvvs, and put fourier at cvvs output. This doesn't load your circuti at all.

regards,
Robert

ywguo wrote on May 31st, 2007, 7:01pm:
Hello,

The fourier component must have voltage input. Am I right? Is it feasible to do fourier analysis for a current?

I tried the following method in a spectre netlist, but it reported fatal error.

FOUR0 (I0:OUT_QN I0:OUT_QP) fourier fund=122.0703125K harms=4096 normharm=9

The error information in output log is shown below.

Error found by spectre during circuit read-in.
      "input.scs" 2249: No master specified for instance 'FOUR0'
      "input.scs" 2249: Unexpected signal or attribute name "I0:OUT_QN". Expected end of file or end of line.



Thanks
Yawei

Back to top
 
 

Thanks,
Robert
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2386
Silicon Valley
Re: Fourier analysis and DFT compare
Reply #19 - Jun 4th, 2007, 2:12pm
 
The fourier analysis component will directly analyze a current waveform if you use the term or refterm parameters. See spectre -h fourier for more information.

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



Posts: 943
Shanghai, PRC
Re: Fourier analysis and DFT compare
Reply #20 - Jun 4th, 2007, 7:41pm
 
Hi, Rorbert,

Quote:
Check this out.
insert a vdc = 0 into the branch you want to measure.
use a cvvs, and put fourier at cvvs output. This doesn't load your circuti at all.


Good idea. I will try your method. Thank you.


Yawei
Back to top
 
 
View Profile   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Fourier analysis and DFT compare
Reply #21 - Jun 4th, 2007, 7:53pm
 
Ken,

Ken Kundert wrote on Jun 4th, 2007, 2:12pm:
The fourier analysis component will directly analyze a current waveform if you use the term or refterm parameters. See spectre -h fourier for more information.

-Ken


The help on fourier is not very clear, which is shown below.
Instance Definition
Name [p] [n] [pr] [nr] ModelName parameter=value ...
Name [p] [n] [pr] [nr] fourier parameter=value ...
The signal between terminals p and n is the test or numerator signal. The signal between
terminals pr and nr is the reference or denominator signal. Fourier analysis is performed on
terminal currents by specifying the term or refterm parameters. If both term and p or n
are specified, then the terminal current becomes the numerator and the node voltages
become the denominator. By mixing voltages and currents, it is possible to compute large
signal immittances.


Does the instance definition look like the following?
Name fourier fund=122.0703125K harms=4096 normharm=9 term=I0:OUTP term=I0:OUTN,
where I0 is a current-steering DAC, OUTP and OUTN are plus/minus current outputs. However, I doubt that the parameter term supports differential current signals.


Thank you very much.
Yawei
Back to top
 
 
View Profile   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Fourier analysis and DFT compare
Reply #22 - Jun 11th, 2007, 1:02am
 
Hi, Ken,

The parameter term and refterm don't support differetial current. So I do fourier integral using the method proposed by Robert, which put CCVS sources to convert currents to voltages. I remember that you have mentioned that equally spaced time steps reduce the error of fourier. However, I cannot find that post again.

To reduce the interpolation error, I set the max step as 1 ps, a little smaller than the minimum step in the last output log. The simulation is running, much slower than before. Is it necessary? Or is it a good solution?


Thanks
Yawei
Back to top
 
« Last Edit: Jun 11th, 2007, 2:37am by ywguo »  
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Fourier analysis and DFT compare
Reply #23 - Jun 11th, 2007, 9:31am
 
ywguo wrote on Jun 11th, 2007, 1:02am:
Hi, Ken,
I remember that you have mentioned that equally spaced time steps reduce the error of fourier. However, I cannot find that post again.
To reduce the interpolation error, I set the max step as 1 ps, a little smaller than the minimum step in the last output log. The simulation is running, much slower than before. Is it necessary? Or is it a good solution?
Thanks
Yawei


The Fourier transform uses equally spaced samples to calculate the harmonics; if you do not have a point at the required time, the simulator does linear interpolation and this may be too inaccurate (especially for low-distortion systems).
If you limit the time step to 1 ps, you will be very slow, calculating at least 8M points for your 8 us simulation time, which is much more than you are likely to need...
I use the strobeperiod option of Spectre (set to 1/fsample) whenever I have to do a Fourier analysis to get samples that are correctly spaced for the Fourier analysis and run the Fourier transform as post-processing job over my data.
OK, then you need to calculate all the parameters for yourself, but you also know what you get. Smiley
BOE
Back to top
 
 
View Profile   IP Logged
ywguo
Community Fellow
*****
Offline



Posts: 943
Shanghai, PRC
Re: Fourier analysis and DFT compare
Reply #24 - Jun 11th, 2007, 7:22pm
 
Hi, BOE,

Quote:
I use the strobeperiod option of Spectre (set to 1/fsample) whenever I have to do a Fourier analysis to get samples that are correctly spaced for the Fourier analysis and run the Fourier transform as post-processing job over my data.


Do you mean that you run a DFT function in the calculator?

In spectre user guide, it reads that You can also dramatically improve the accuracy of external Fast Fourier Transform (FFT) routines. I think that means the parameter strobeperiod improves the accuracy of DFT function.

However, I am runing a transient simulation with a FOUR component from analogLib, which is a fourier integral immediately after the transient simulation.

Now the FOUR (fourier integral) result is much larger than that of DFT function at high frequency.  I want to know whether the FOUR result have large error due to intepolation error. Then I run a simulation with maxstep = 1ps. Now the simulation speed is unacceptable slow. Sad


Thank you.
Yawei
Back to top
 
 
View Profile   IP Logged
boe
Community Fellow
*****
Offline



Posts: 615

Re: Fourier analysis and DFT compare
Reply #25 - Jun 12th, 2007, 3:59am
 
Hi, Yawei,
ywguo wrote on Jun 11th, 2007, 7:22pm:
Do you mean that you run a DFT function in the calculator?

Yes.

ywguo wrote on Jun 11th, 2007, 7:22pm:
I think that means the parameter strobeperiod improves the accuracy of DFT function.

The DFT is sensitive to the accuracy of the samples used - so you use strobeperiod to force the simulator to produce exactly the time points you need and therefore eliminating the interpolation error.

ywguo wrote on Jun 11th, 2007, 7:22pm:
Now the FOUR (fourier integral) result is much larger than that of DFT function at high frequency.  I want to know whether the FOUR result have large error due to intepolation error. Then I run a simulation with maxstep = 1ps. Now the simulation speed is unacceptable slow.

Spectre uses a quadratic numerical integration algorithm to calculate the Fourier integrals for the requested frequency points (cf. Spectre User Guide). To get reasonable results for high frequencies, you will probably need small time steps. Unfortunately, Cadence tells you hardly anything about the algorithm (which is why I prefer the DFT method), but I suggest a minimum of 10 or 20 points per period (of your harmonic), i.e. maxstep = 0.05/f ... 0.1/f.

Did you try the suggestion of the Spectre User Guide ("If you are concerned about accuracy, perform an additional Fourier transform on a pure sinusoid generated by an independent source")? If you want to check harmonics, you might want to use a triangle wave (with you fundamental frequency).
BOE
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 
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.