[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnucap] howto use different phase and frequency in sources for

From: al davis
Subject: Re: [Help-gnucap] howto use different phase and frequency in sources for transient analysis?
Date: Tue, 27 Oct 2009 03:07:27 -0400
User-agent: KMail/1.12.2 (Linux/2.6.26-1-amd64; KDE/4.3.2; x86_64; ; )

Quick answer ..   I will get back with more details in a few 

What is the Pspice syntax for specifying phase on a "sin" 
source?  It's not in Berkeley spice.

It would be just another way to specify the delay ... the phase 
at time = 0.

I just did find a bug in the way the Fourier command computes 
relative phase.

"ap[2]" is the absolute phase of harmonic#2
"rp[2]" is the relative phase
hn is harmonic number

The way it is:
for (hn=0; hn<=stop; ++hn) {
    rp[hn] = ap[hn] - ap[1];
The way it should be:
for (hn=0; hn<=stop; ++hn) {
    rp[hn] = ap[hn] - (hn *ap[1]);
But that is not the problem you saw.

The absolute phase you see in a Fourier analysis is referenced 
to the start of the interval, so it will be different on 
different runs depending on the starting time.  It does appear 
to be correct, from that perspective.

That really doesn't matter.  It is just a time shift.

I think the reason your waveform built from the sum of sources 
doesn't match the signal you took the Fourier transform of  is 
that you are only using up to the fifth harmonic, so there is a 
lot missing.

Also, the circuit doesn't look correct, but that could be due to 
partial cut and paste errors.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]