PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

388 Practical MATLAB® Applications for Engineers


***************** Check results *****************
**************************************************
The total % power in the first 10 harmonics is =
ans =
100.0000
percent
**************************************************

FIGURE 4.38
Plot of power concentration in harmonics of Example 4.3.


[% of total power in each harmonic] versus harmonics
80

70

60

50

40

30

20

10

0

% of total power in each harmonic

− 1 012345678910
harmonics in rad/sec

Example 4.4

Given the function f(t) shown in Figure 4.39, defi ned over the range − 1 ≤ t ≤ 1,

ft

t
t
t

()

..
...
..



05 1 05
15 05 05
05 05 1

 









  1. Evaluate by hand the coeffi cients of the exponential FS of f(t).

  2. Create the script fi le Fourier_ series that returns the following:
    a. Plots of up to the fi fth harmonic of f(t) versus t (including the DC)
    b. Plots on one graph showing the components of f(t) of part 2a
    c. Plots showing the partial sums of the Fourier components of f(t) up to the sixth
    component
    d. The line spectrum plot of f(t)
    e. The power spectrum plot of f(t)
    f. Verify Parseval’s theorem. Recall that
    P T f t dt F


T
n
n

ave


(/ ) 0 ()1^22
0

6
∫ ∑ , and
determine the error
g. Evaluate the percentage error for part f when using time versus frequency
Free download pdf