Assignment 4 Solutions
Assignment 4 Solutions
4 5.1 For each case below, find the Fourier series representation (in complex exponential form) of the function x,
explicitly identifying the fundamental period of x and the Fourier series coefficient sequence c.
(a) x(t) = 1 + cos(πt) + sin2 (πt);
(b) x(t) = cos(4t) sin(t); and
ax
(c) x(t) = |sin(2πt)|. [Hint: eax sin(bx)dx = e [a sin(bx)−b cos(bx)]
+C, where a and b are arbitrary complex and
R
a2 +b2
nonzero real constants, respectively.]
4 Answer (a).
We can rewrite x in the form of a Fourier series by simple algebraic manipulation as follows:
∞
x(t) = ∑ ck e jkω0 t ,
k=−∞
3
2 k=0
1
k = ±1
ck = 2
−1 k = ±2
4
0 otherwise.
4 Answer (c).
x(t) = |sin(2πt)| .
1 2π 2π
The function x is periodic with period T = 2 and frequency ω0 = T = 1/2 = 4π. From the Fourier series
Since the integral table entry given (i.e., for the integral eax sin(bx)dx) is valid for the case of a = 0, we did
R
not need to assume that k 6= 0 in the above integration. Therefore, the above expression is valid for all k. Thus,
we have that
∞
x(t) = ∑ ck e jkω0 t ,
k=−∞
where ω0 = 4π and
2
ck = .
π(1 − 4k2 )
4 5.2 For each of the periodic functions shown in the figures below, find the corresponding Fourier series coefficient
sequence.
x(t)
1 1
··· ···
t
−4 −3 −2 −1 1 2 3 4
− 12 − 12
(a)
x(t)
1
··· ···
t
−T − A2 −T −T + A2 − A2 0 A
2 T − A2 T T + A2
(b)
x(t)
2
1
··· ···
t
−7 −6 −5 −4 −3 −2 −1 0 1 2 3 4 5 6 7
(c)
x(t)
1
··· ···
t
−3 −2 −1 1 2 3
−1
(d)
4 Answer (c).
2π
The function x is periodic with period T = 5 and frequency ω0 = 5 . From the Fourier series analysis equation,
we can write
Z
ck = 1
T x(t)e− jkω0 t dt
T
Z 5/2
= 1
5 x(t)e− j2πkt/5 dt
−5/2
Z −1 Z 1 Z 2
= 1
5 e− j2πkt/5 dt + 2e− j2πkt/5 dt + e− j2πkt/5 dt
−2 −1 1
Z 2 Z 1
= 1
5 e− j2πkt/5 dt + e− j2πkt/5 dt
−2 −1
h i2 h i1
1 1 − j2πkt/5 1 − j2πkt/5
= 5 − j2πk/5 e + − j2πk/5 e for k 6= 0
−2 −1
2 1
1 − j2πkt/5 − j2πkt/5
= − j2πk e + e
−2 −1
h i
− j4πk/5
= 1
− j2πk e − e j4πk/5 + e− j2πk/5 − e j2πk/5
1
= − j2πk [−2 j sin(4πk/5) − 2 j sin(2πk/5)]
1
= πk [sin(4πk/5) + sin(2πk/5)]
sin(4πk/5) sin(2πk/5)
= +
πk πk
= 45 sinc(4πk/5) + 52 sinc(2πk/5).
In the above derivation, we assumed that k 6= 0. So, now we must consider the case of k = 0. From the Fourier
series analysis equation, we have
Z
1
c0 = T x(t)dt
T
Z 5/2
1
= 5 x(t)dt
−5/2
Z −1 Z 1 Z 2
1
= 5 dt + 2dt + dt
−2 −1 1
= 51 [1 + 4 + 1]
= 56 .
4 5.3 Find the Fourier series coefficient sequence c of each periodic function x given below with fundamental pe-
riod T .
(a) x(t) = 2δ (t − 3) + 2δ (t − 5) + δ (t − 7) − δ (t − 9) + 3δ (t − 12) and T = 16; express c in terms of sin and
cos to whatever extent is possible; and
(b) x(t) = δ (t) + 6δ (t − 1) + 6δ (t − 2) and T = 3; express c in terms of sin and cos to whatever extent is
possible.
4 Answer (a).
We are given the T -periodic function x, where
4 5.7 A periodic function x with period T and Fourier series coefficient sequence c is said to be odd harmonic if
ck = 0 for all even k.
(a) Show that if x is odd harmonic, then x(t) = −x(t − T2 ) for all t.
(b) Show that if x(t) = −x(t − T2 ) for all t, then x is odd harmonic.
4 Answer (a,b).
∞
x(t) = ∑ ck e jkω0 t . (5.1)
k=−∞
∞ ∞ ∞
x(t − T2 ) = ∑ ck e jkω0 (t−T /2) = ∑ ck e jkω0 t e− jkω0 T /2 = ∑ ck e jkω0 t e− jπk
k=−∞ k=−∞ k=−∞
∞
= ∑ (−1)k ck e jkω0 t .
k=−∞
T
(Note that, in simplifying the above equation, we used the fact that 2 = π
ω0 and e− jπk = (−1)k .) Thus, we have
∞
x(t − T2 ) = ∑ (−1)k ck e jkω0 t . (5.2)
k=−∞
x(t) = −x t − T2
∞ ∞
⇔ ∑ ck e jkω0 t = − ∑ (−1)k ck e jkω0 t
k=−∞ k=−∞
∞ ∞
⇔ ∑ ck e jkω0 t = ∑ (−1)k+1 ck e jkω0 t
k=−∞ k=−∞
(
ck k odd
⇔ ck = (−1)k+1 ck =
−ck k even
⇔ ck = 0 for even k.
Thus, we have shown that x is odd harmonic if and only if x(t) = −x(t − T2 ) for all t.
4 Answer (b[alternative]).
Now, we employ a change a variable in the second integral. Let λ = t + T /2 so that t = λ − T /2 and dλ = dt.
Applying this change of variable, we obtain
T /2 Z 3T /2
Z
ck = 1
T x(t)e− jkω0 t dt +x(λ − T2 )e− jkω0 (λ −T /2) dλ
0 T
Z T /2 Z 3T /2
1 − jkω0 t − jkω0 (λ −T /2)
=T x(t)e dt + −x(λ )e dλ
0 T
Z T /2 Z 3T /2
1 − jkω0 t jkω0 T /2 − jkω0 λ
=T x(t)e dt − x(λ )e e dλ
0 T
Z T /2 Z 3T /2
= T1 x(t)e− jkω0 t dt − e jkπ x(λ )e− jkω0 λ dλ .
0 T
Now, we rename the dummy variable of integration in the second integral from λ to t. This yields
T /2 Z 3T /2
Z
ck = 1
T x(t)e− jkω0 t dt − e jπk x(t)e− jkω0 t dt
0 T
T /2 Z T /2
Z
1 − jkω0 t k − jkω0 t
= T x(t)e dt − (−1) x(t)e dt
0 0
Z T /2
= T1 (1 − (−1)k ) x(t)e− jkω0 t dt
0
2 T /2
( R
x(t)e− jkω0 t dt k odd
= T 0
0 k even.
4 Answer (b[alternative]).
A LTERNATIVE SOLUTION . From the Fourier series analysis equation, we have
Z
ck = 1
T x(t)e− jkω0 t dt
T
Z
= 1
T (−x(t − T /2))e− jkω0 t dt
T
Z
= − T1 x(t − T /2)e− jkω0 t dt
T
Z α+T
= − T1 x(t − T /2)e− jkω0 t dt.
α
Now, we employ a change of variable. Let v = t − T /2 so that t = v + T /2 and dv = dt. Applying the change
of variable, we obtain
Z α+T /2
ck = − T1 x(v)e− jkω0 (v+T /2) dv
α−T /2
Z
= − T1 x(v)e− jkω0 v e− jkω0 T /2 dv
T
Z
= − T1 x(v)e− jkω0 v e− jk(2π/2) dv
T
Z
k 1 − jkω0 v
= (−1) − T x(v)e dv
T
= (−1)k (−ck )
= (−1)k+1 ck .
So, we have that ck = (−1)k+1 ck . If k is even, then ck = −ck . This implies, however, that ck = 0. Therefore, for
even k, we have that ck = 0.
4 5.9 Find the Fourier series coefficient sequence c of the periodic function x shown in the figure below. Plot the
frequency spectrum of x, including the first five harmonics.
x(t)
1
··· ···
t
−2 −1 0 1 2 3
4 Answer.
2π 2π
The signal x is periodic with period T = 2 and frequency ω0 = T = 2 = π. From the Fourier series analysis
equation, we have
Z
ck = 1
T x(t)e− jkω0 t dt
T
Z 2
= 1
2 x(t)e− jπkt dt
0
Z 1
= 1
2 e− jπkt dt
0
h i 1
1 1 − jπkt
= 2 − jπk e 0
for k 6= 0
h i1
−1
= j2πk e− jπkt
0
h i
1
= j2πk 1 − e− jπk
h i
1
= j2πk 1 − (−1)k
− πkj k odd
(
=
0 k even, k 6= 0
Since we assumed that k 6= 0 in the derivation above, we must now consider the case of k = 0. From the Fourier
series analysis equation, we have
Z
1
c0 = T x(t)dt
T
Z 2
1
= 2 x(t)dt
0
Z 1
1
= 2 dt
0
= 12 [t]|10
= 21 .
Thus, we have
1
2
k=0
ck = − πkj k odd
0 k even, k 6= 0
Calculating the first several Fourier series coefficients yields the following:
k |ck | arg ck
1
0 2 0
1
1 π − π2
2 0 0
1
3 3π − π2
4 0 0
1
5 5π − π2
|ck |
1
2
··· ···
ω
−4ω0 −3ω0 −2ω0 −ω0 0 ω0 2ω0 3ω0 4ω0
∠ck
π
2
···
ω
−4ω0−3ω0 −2ω0 −ω0 ω0 2ω0 3ω0 4ω0
···
− π2
Using frequency-domain methods, find the output y of the system if the input x is given by
4 Answer.
We begin by finding the Fourier series representation of x. Using Euler’s relation, we can rewrite x as
where ω0 = 2 and
1 k=0
1 k = ±1
ak = 1 k = ±2
1
k = ±3
4
0
otherwise.
Since the system is LTI, we know that the output y has the form
∞
y(t) = ∑ bk e jkω0 t ,
k=−∞
where bk = ak H(kω0 ). Using the results from above, we can calculate the bk as follows:
b0 = a0 H([0][2]) = 0,
b1 = a1 H([1][2]) = 0,
b−1 = a−1 H([−1][2]) = 0,
b2 = a2 H([2][2]) = 0,
b−2 = a−2 H([−2][2]) = 0,
b3 = a3 H([3][2]) = 41 (1) = 41 , and
1 1
b−3 = a−3 H([−3][2]) = 4 (1) = 4 .
Thus, we have
1
(
4 k = ±3
bk =
0 otherwise.
4 5.201 Consider the periodic function x shown in Figure B of Exercise 5.2, where T = 1 and A = 21 . We can show that
x has the Fourier series representation
∞
x̂(t) = ∑ ck e jkω0 t
k=−∞
where ck = 12 sinc πk
2 and ω0 = 2π. Let x̂N (t) denote the above infinite series truncated after the Nth harmonic
(a) Use MATLAB to plot x̂N (t) for N = 1, 5, 10, 50, 100. You should see that as N increases, x̂N converges to
x. [Hint: You may find the sym, symsum, subs, and ezplot functions useful for this problem. Note that the
MATLAB sinc function does not compute the sinc function as defined herein. Instead, the MATLAB sinc
function computes the normalized sinc function as defined by (3.21).]
(b) By examining the graphs obtained in part (a), answer the following: As N → ∞, does x̂N converge to x
uniformly (i.e., at the same rate everywhere)? If not, where is the rate of convergence slower?
(c) The function x is not continuous everywhere. For example, x has a discontinuity at 14 . As N → ∞, to what
value does x̂N appear to converge at this point? Again, deduce your answer from the graphs obtained in part (a).
4 Answer (a,b,c).
(a) The graphs necessary in this problem can be generated using the code given below.
syms k t;
% Define the sinc function in a manner that avoids division by zero when
% the function is evaluated at the origin.
mysinc = @(t) ( sin (t) + delta (t )) / (t + delta (t ));
w = 2 * pi ;
for n = [1 5 10 50 100]
% Pause for a moment so that the graph does not disappear too quickly.
pause (1);
end
1.2
1.2
1
1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0
0
−0.2
−0.2
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
t t
x10(t) x50(t)
1.2 1.2
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
−0.2 −0.2
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
t t
x (t)
100
1.2
0.8
0.6
0.4
0.2
(b) The function x̂N (t) does not converge to x(t) uniformly (i.e., at the same rate everywhere). The rate of
convergence is (relatively) lower at/near the points of discontinuity of x(t).
(c) At the point of discontinuity of x(t) located at t = 14 , the function x̂N (t) appears to converge to the average
of the left and right limits of x(t) at that point, namely the value of 21 .