Digital Signal Processing Reference
In-Depth Information
since the integral of a sinusoid over an integer number of periods is zero. In (4.6),
we used the trigonometric identity from Appendix A:
1
2
(1 - cos
2a).
sin
2
a =
From (4.5), the second derivative of the cost function is given by
T
0
2
J[e(t)]
0
0
2
T
0
L
sin
2
v
0
t
dt 7 0.
=
(4.7)
B
2
0
The second derivative is positive; thus if (4.6) is satisfied, the mean-square error is
minimized (not maximized).
Solving (4.6) for
B
1
yields
T
0
2
T
0
L
B
1
=
x(t) sin v
0
t
dt.
(4.8)
0
This value minimizes the mean-square error. Note that this result is general and is
not limited by the functional form of
x(t).
Given a periodic function
x(t)
with the
period
T
0
,
the best approximation, in a mean-square-error sense, of any periodic
function
x(t)
by the sinusoid
B
1
sin v
0
t
is to choose
B
1
to satisfy (4.8), where
v
0
= 2p/T
0
.
We next consider an example.
Mean-square minimization
EXAMPLE 4.1
We now find the best approximation, in a mean-square sense, of the square wave of
Figure 4.3(a) by a sine wave. From (4.8),
T
0
2
T
0
L
B
1
=
x(t) sin v
0
t
dt
0
T
0
/2
T
0
2
T
0
L
2
T
0
L
=
(1) sin v
0
t
dt +
(-1) sin v
0
t
dt,
0
T
0
/2
since
1, 0 6 t 6 T
0
/2
-1, T
0
/2 6 t 6 T
0
.
b
x(t) =
Therefore,
T
0
/2
T
0
d
2
T
0
-
cos
v
0
t
v
0
cos
v
0
t
v
0
B
1
=
c
+
0
T
0
/2
1
p
(-cos
p + cos
0 + cos
2p - cos
p) =
4
p
,
=
since
2p
T
0
T
0
2
¢
≤¢
≤
v
0
t
t =T
0
/2
=
= p,
v
0
T
0
= 2p.