Assignment 4 Solutions 10
Assignment 4 Solutions 10
Assignment 4 Solutions 10
Chapter 3
4.1 Find the Fourier series representation (in complex exponential form) of each of the signals given below. In each
case, explicitly identify the fundamental period and Fourier series coefficient sequence ck .
(a) x(t) = 1 + cos π t + sin2 π t;
(b) x(t) = [cos 4t][sint]; and
ax
(c) x(t) = |sin 2π t|. [Hint: eax sin bxdx = e [a sina2bx−b cos bx]
R
+b2
+ C, where a and b are arbitrary complex and
nonzero real constants, respectively.]
Solution.
(a) We can rewrite x(t) in the form of a Fourier series by simple algebraic manipulation as follows:
= 1 + 12 e jπ t + 12 e− jπ t − 41 [e j2π t − 2 + e− j2π t ]
= − 41 e− j2π t + 21 e− jπ t + 32 + 21 e jπ t − 41 e j2π t .
∞
x(t) = ∑ ck e jkω0t ,
k=∞
3
for k = 0
12
2 for k = ±1
ck =
−1 for k = ±2
4
0 otherwise.
2π 2π
(c) The signal x(t) is periodic with period T = 1
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 bxdx) is valid for the case of a = 0, we did not
R
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.2 For each of the signals shown in the figure below, find the corresponding Fourier series coefficient sequence.
x(t)
1 1
··· ···
t
−4 −3 −2 −1 1 2 3 4
− 21 − 21
(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)
Solution.
2π 2π
ω0 = T = 4 = π2 .
2π
(So, we have T = π /2 = 4.) From the Fourier series analysis equation, we have
Z
ck = 1
T x(t)e− jkω0 t dt
T
Z 2
= 1
4 [δ (t − 1) − 21 δ (t + 1)]e− jπ kt/2 dt
−2
Z 2 Z 2
= 1
4 δ (t − 1)e− jπ kt/2 dt − 12 δ (t + 1)e− jπ kt/2 dt
−2 −2
1 − jπ k/2
= 4 [e − 21 e jπ k/2 ]
1 − jπ k/2
= 4e − 81 e jπ k/2 .
2π
(c) The signal x(t) is periodic with period T = 5 and frequency ω0 = 5 . From the Fourier series analysis
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
1
= 5 [1 + 4 + 1]
6
= 5.
4.6 A periodic signal x(t) with period T and Fourier series coefficient sequence ck is said to be odd harmonic if
ck = 0 for all even k.
(a) Show that if x(t) 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(t) is odd harmonic.
Solution.
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
− jkω0 t − jkω0 (λ −T /2)
=T 1
x(t)e dt + −x(λ )e dλ
0 T
Z T /2 Z 3T /2
− jkω0 t jkω0 T /2 − jkω0 λ
=T 1
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
1 − jkω0 t jπ k − jkω0 t
ck = T x(t)e dt − e x(t)e 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
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
= (−1)k − T1 x(v)e− jkω0 v dv
T
k
= (−1) (−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.8 Find the Fourier series coefficient sequence ck of the periodic signal x(t) shown in the figure below. Plot the
frequency spectrum of this signal including the first five harmonics.
x(t)
1
··· ···
t
−2 −1 0 1 2 3
Solution.
The signal x(t) is periodic with period T = 2, and frequency ω0 = 2Tπ = 22π = π . 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
1
− jπ kt
h i
1 1
= 2 − jπ k e 0
i1
− jπ kt
h
= j2−1
πk e 0
− jπ k
h i
1
= j2π k 1 − e
h i
= j21π k 1 − (−1)k
(
− πjk for odd k
=
0 for even k
Since we assumed that k 6= 0 in the derivation above, we must now consider the case of k = 0. From the Fourier
Thus, we have
1
2
for k = 0
ck = − πjk for odd k
0 for even k, 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
3 31π − π2
4 0 0
5 51π − π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(t) of the system if the input x(t) is given by
Solution.
We begin by finding the Fourier series representation of x(t). Using Euler’s relation, we can rewrite x(t) as
where ω0 = 2 and
1 for k = 0
for k = ±1
1
ak = 1 for k = ±2
1
for k = ±3
4
0 otherwise.
Since the system is LTI, we know that the output y(t) has the form
∞
y(t) = ∑ bk e jkω0 t ,
k=−∞
where bk = ak H( jkω0 ). Using the results from above, we can calculate the bk as follows:
b0 = a0 H( j[0][2]) = 0,
b1 = a1 H( j[1][2]) = 0,
b−1 = a−1 H( j[−1][2]) = 0,
b2 = a2 H( j[2][2]) = 0,
b−2 = a−2 H( j[−2][2]) = 0,
b3 = a3 H( j[3][2]) = 41 (1) = 41 , and
1 1
b−3 = a−3 H( j[−3][2]) = 4 (1) = 4 .
Thus, we have
(
1
4 for k = ±3
bk =
0 otherwise.
4.101 Consider the periodic signal x(t) shown in Figure B of Problem 4.2 where T = 1 and A = 21 . We can show that
this signal x(t) has the Fourier series representation
∞
x̂(t) = ∑ ck e jkω0 t
k=−∞
where ck = 21 sinc π2k and ω0 = 2π . Let x̂N (t) denote the above infinite series truncated after the Nth harmonic
component. That is,
N
x̂N (t) = ∑ ck e jkω0 t .
k=−N
(a) Use MATLAB to plot x̂N (t) for N = 1, 5, 10, 50, 100. You should see that as N increases, x̂N (t) converges to
x(t). [HINT: You may find the sym, symsum, subs, and ezplot functions useful for this problem. Please note
that the MATLAB sinc function is NOT defined in the same way as in the lecture notes. The MATLAB sinc
function is defined as sinc x = (sin(π x))/(π x). So, it might be wise to avoid the use of this MATLAB function
altogether.]
(b) By examining the graphs obtained in part (a), answer the following: As N → ∞, does x̂N (t) converge to x(t)
uniformly (i.e., equally fast) everywhere? If not, where is the rate of convergence slower?
(c) The signal x(t) is not continuous everywhere. For example, the signal has a discontinuity at t = 41 . As
N → ∞, to what value does x̂N (t) appear to converge at this point? Again, deduce your answer from the graphs
obtained in part (a).
Solution.
(a) The graphs necessary in this problem can be generated using the code given below.
for n = [1 5 10 50 100]
% Sum the appropriate number of terms.
f = symsum ( sym ( ’0.5 * mysinc ( pi * k / 2) * exp (j * k * w * t) ’), ...
’k ’, -n , n );
% Plot the result.
ezplot ( subs (f , ’w ’, 2 * pi ), [ -1 1]);
title ( sprintf ( ’x_ {% d }( t) ’, n ));
% Pause for a moment so that the graph does not disappear too quickly.
pause (1);
% Print the graph to a file.
eval ( sprintf ( ’ print -dps data / sqrwav_ %d. ps ’, n ));
end
x (t) x (t)
1 5
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) x (t)
10 50
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
x100(t)
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 = 41 , 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 12 .