Spectrum Software
spacer
Industrial Strength Simulation
select:

divider

 

News:

Spectrum Software has released Micro-Cap 11, the eleventh generation of our SPICE circuit simulator.

For users of previous Micro-Cap versions, check out the new features available in the latest version. For those of you who are new to Micro-Cap, take our features tour to see what Micro-Cap has to offer.

 

divider

 

Fourier Theory and Phase

 

A general misconception about Fourier theory is that a Fourier analysis returns the magnitude and phase of the waveform as it would be represented by pure sine waves. However, true Fourier representation of a waveform consists of both sine and cosine waves which will give much different results, especially for phase, than if it consisted of just sine waves. The following article discusses the expressions and theory that MC5 uses for its Harm and Phase operators in DSP analysis.

The general expression for a Fourier series is as follows:

V(t) = A0 + A1*Cos(w*t) + A2*Cos(2*w*t) + ... + An*Cos(n*w*t)
     B0 + B1*Sin(w*t) + B2*Sin(2*w*t) + ... + Bn*Sin(n*w*t)

where w is the fundamental frequency in radians/sec and is equal to 2*PI/T. In MC5, T will be the specified simulation time. The above equation can also be represented as:

V(t) = SUMMATION(An*Cos(n*w*t) + Bn*Sin(n*w*t))    or
V(t) = SUMMATION(Mn*Cos(n*w*t + Pn))    n=0,1,2...,n
 
The magnitude and phase values in the above equation are calculated by the equations:

Mn = sqrt(An*An + Bn*Bn)    ;magnitude     
Pn = -Tan-1(Bn/An)    ;phase n=0,1,2...,n
 
As can be seen from the equations, both the An coefficients of the cosine terms and the Bn coefficients of the sine terms are used to calculate the magnitude and phase of the Fourier series.

The circuit below consists of a single nonlinear function voltage (NFV) source. This circuit is available as the example circuit FFT1.CIR in the DATA directory. The NFV source has its VALUE attribute defined as:

1.5+1.0*SIN(2*PI*T*1E6)+2.0*COS(2*PI*T*2E6)+3.0*SIN(2*PI*T*3E6)

This equation will produce a voltage waveform which has a DC term, a pure sine term at 1MHz, a pure cosine term at 2MHz, and a pure sine term again at 3MHz.

Fourier Analysis Circuit
The transient analysis of this voltage source appears below. The three waveforms plotted were V(1), the voltage waveform, HARM(V(1)), the harmonics of the V(1) waveform, and PHASE(FFT(V(1))), the phase of the FFT spectrum of the V(1) waveform. The harmonics waveform returns the expected 1.5V at DC, 1V at 1MHz, 2V at 2MHz, and 3V at 3MHz. For the phase waveform, the sine terms return -90 degrees at 1MHz and 3MHz and the cosine term returns 0 degrees at 2MHz. The -90 degrees for the sine terms is due to the fact that the Fourier phase calculation will divide the sine wave magnitude by 0 producing an infinite value for the inverse tangent operation.

Fourier Analysis Results
The PHASE operator was not used in conjunction with the HARM operator because the HARM operator will return the absolute value of the magnitude which will always produce positive phases. If the waveform PHASE(HARM(V(1))) was used, it would have returned the incorrect value, in terms of Fourier theory, of 90 degrees at 1MHz and 3MHz instead of -90 degrees.

 
Return to the main Newsletter page