PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

276 Practical MATLAB® Applications for Engineers


Example 3.8

Given the following periodic functions defi ned over one period (T):
a. f 1 (t) = 5 cos((2π/3)t), with T = 3 s
b. f 2 (t) = t, for 0 ≤ t ≤ 1, with T = 1 s
c.ft
t

(^3) tT
10 05
005 1 1
()
.
.s

with 



Create the script fi le ave_rms_sym that returns the following plots over the range
− 1 ≤ t ≤ 3 :
a. f 1 (t) versus t
b. f 2 (t) versus t
c. f 3 (t) versus t
Also evaluate the average and the RMS (effective) value for each one of the preceding
functions using
a. a symbolic approach by creating the script fi le ave_rms_sym (use int)
b. a numerical solution by creating the script fi le ave_rms_num (use trapz)
Recall that the average value of the arbitrary f(t) is given by
F
T
AVE ftdt
T

1
0
∫ ()
and its RMS value is given by
F
T
RMS ft dt
T

(^12)
0
∫ ()
FIGURE 3.57
Plots of Example 3.7.
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
− 5
− 4
− 2
0
2
4 v(t) versus t
i(t) versus t
Amplitude [i(t)]
Amplitude [v(t)]
5
× 105
time in seconds
time in seconds

Free download pdf