Use PSpice to determine the Fourier coefficients of the signal in Fig. 17.1.
Figure 17.36 shows the schematic for obtaining the Fourier coefficients. With the signal in Fig. 17.1 in mind, we enter the attributes of the voltage source VPULSE as shown in Fig. 17.36. We will solve this example using both the DFT and FFT approaches.
■ METHOD 1 DFT Approach: (The voltage marker in Fig. 17.36 is not needed for this method.) From Fig. 17.1, it is evident that T = 2 s ,
f_{0} = \frac{1}{T} = \frac{1}{2} = 0.5 Hz
So, in the transient dialog box, we select the Final Time as 6 T = 12 s , the Print Step as 0.01 s, the Step Ceiling as 10 ms, the Center Frequency as 0.5 Hz, and the output variable as V(1). (In fact, Fig. 17.34 is for this particular example.) When PSpice is run, the output file contains the following result:(table1)
Comparing the result with that in Eq. (17.1.7) (see Example 17.1)
f(t) = \frac{1}{2} + \frac{2}{\pi} \sum\limits_{k=1}^{\infty }{\frac{1}{n} \ sin \ n \pi t, } \quad n = 2k – 1 \quad \quad (17.1.7)or with the spectra in Fig. 17.4 shows a close agreement. From Eq. (17.1.7), the dc component is 0.5 while PSpice gives 0.498995. Also, the signal has only odd harmonics with phase ψ_{n} = – 90° whereas PSpice seems to indicate that the signal has even harmonics although the magnitudes of the even harmonics are small.
■ METHOD 2 FFT Approach: With voltage marker in Fig. 17.36 in place, we run PSpice and obtain the waveform V(1) shown in Fig. 17.37(a) on the PSpice A/D window. By double clicking the FFT icon in the PSpice A/D menu and changing the X-axis setting to 0 to 10 Hz, we obtain the FFT of V(1) as shown in Fig. 17.37(b). The FFTgenerated graph contains the dc and harmonic components within the selected frequency range. Notice that the magnitudes and frequencies of the harmonics agree with the DFT-generated tabulated values.
(table 1) FOURIER COEFFICIENTS OF TRANSIENT RESPONSE V(1) DC COMPONENT = 4.989950E-01 |
|||||
HARMONIC NO |
FREQUENCY (HZ) |
FOURIER COMPONENT |
NORMALIZED COMPONENT |
PHASE (DEG) |
NORMALIZED PHASE (DEG) |
1 | 5.000E-01 | 6.366E-01 | 1.000E+00 | -1.809E-01 | 0.000E+00 |
2 | 1.000E+00 | 2.012E-03 | 3.160E-03 | -9.226E+01 | -9.208E+01 |
3 | 1.500E+00 | 2.122E-01 | 3.333E-01 | -5.427E-01 | -3.619E-01 |
4 | 2.000E+00 | 2.016E-03 | 3.167E-03 | -9.451E+01 | -9.433E+01 |
5 | 2.500E+00 | 1.273E-01 | 1.999E-01 | -9.048E-01 | -7.239E-01 |
6 | 3.000E+00 | 2.024E-03 | 3.180E-03 | -9.676E+01 | -9.658E+01 |
7 | 3.500E+00 | 9.088E-02 | 1.427E-01 | -1.267E+00 | -1.086E+00 |
8 | 4.000E+00 | 2.035E-03 | 3.197E-03 | -9.898E+01 | -9.880E+01 |
9 | 4.500E+00 | 7.065E-02 | 1.110E-01 | -1.630E+00 | -1.449E+00 |