0% found this document useful (0 votes)
803 views14 pages

Assignment 4 Solutions

Uploaded by

vbweuhvbw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
803 views14 pages

Assignment 4 Solutions

Uploaded by

vbweuhvbw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

54 Continuous-Time Fourier Series (Chapter 5)

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 are given the function

x(t) = 1 + cos(πt) + sin2 (πt).

We can rewrite x in the form of a Fourier series by simple algebraic manipulation as follows:

x(t) = 1 + cos(πt) + sin2 (πt)


h  i2
= 1 + 12 [e jπt + e− jπt ] + 21j e jπt − e− jπt
= 1 + 12 e jπt + 12 e− jπt − 14 [e j2πt − 2 + e− j2πt ]
= − 41 e− j2πt + 12 e− jπt + 32 + 12 e jπt − 14 e j2πt .

Thus, we have that


x(t) = ∑ ck e jkω0 t ,
k=−∞

where ω0 = π (i.e., T = 2) and

3

 2 k=0
1

k = ±1
ck = 2
−1 k = ±2
 4



0 otherwise.

4 Answer (c).

We are given the function

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

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


55

analysis equation, we have


Z
ck = 1
T x(t)e− jkω0 t dt
T
Z 1/2
= 1
1/2 |sin(2πt)| e− jk4πt dt
0
Z 1/2
=2 e− j4πkt sin(2πt)dt
0
 1/2
e− j4πkt [− j4πk sin(2πt) − 2π cos(2πt)]

=2
(− j4πk)2 + (2π)2 0
i 1/2
2(2π)
h
− j4πkt
= −16π 2 k2 +4π 2 e [− j2k sin(2πt) − cos(2πt)]
0
h i
1 − j4πk/2
= π(1−4k2 ) e [− j2k sin(2π/2) − cos(2π/2)] − [− cos 0]
= 1
π(1−4k2 )
[e− j2πk [− j2k sin(π) − cos(π)] + cos(0)]
1
= π(1−4k2 )
[2]
2
= .
π(1 − 4k2 )

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 )

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


56 Continuous-Time Fourier Series (Chapter 5)

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).


The function x is periodic with period T = 5 and frequency ω0 = 5 . From the Fourier series analysis equation,

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


57

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 .

Therefore, we have that


6
(
5 k=0
ck = 4
5 sinc(4πk/5) + 25 sinc(2πk/5) otherwise
= 45 sinc(4πk/5) + 25 sinc(2πk/5).

The first few coefficients are approximately as follows:

c0 = 1.2, c1 = c−1 ≈ 0.489828, and c2 = c−2 ≈ −0.057816.

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


58 Continuous-Time Fourier Series (Chapter 5)

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

x(t) = 2δ (t − 3) + 2δ (t − 5) + δ (t − 7) − δ (t − 9) + 3δ (t − 12) and T = 16.

From the Fourier series analysis equation, we have


Z T
ck = 1
T x(t)e− j(2π/T )kt dt
0
Z 16
= 1
16 [2δ (t − 3) + 2δ (t − 5) + δ (t − 7) − δ (t − 9) + 3δ (t − 12)] e− j(2π/16)kt dt
0
Z ∞
= 1
16 [2δ (t − 3) + 2δ (t − 5) + δ (t − 7) − δ (t − 9) + 3δ (t − 12)] e− j(π/8)kt dt
−∞
Z ∞ Z ∞ Z ∞
= 1
16 2δ (t − 3)e− j(π/8)kt dt + 2δ (t − 5)e− j(π/8)kt dt + δ (t − 7)e− j(π/8)kt dt
−∞ −∞ −∞
Z ∞ Z ∞ 
− δ (t − 9)e− j(π/8)kt dt + 3δ (t − 12)e− j(π/8)kt dt
−∞ −∞
h i
1 − j(π/8)k(3) − j(π/8)k(5) − j(π/8)k(7) − j(π/8)k(9) − j(π/8)k(12)
= 16 2e + 2e + e − e + 3e
h i
1 − j(3π/8)k − j(5π/8)k − j(7π/8)k − j(9π/8)k − j(3π/2)k
= 16 2e + 2e + e − e + 3e
h     i
− j(4π/8)k
= 1
16 2e e j(π/8)k + e− j(π/8)k + e− jπk e j(π/8)k − e− j(π/8)k + 3e− j(3π/2)k
h i
1 k k k
2(− j) 2 cos k 2 j sin k 3 j
 π
  π

= 16 8 + (−1) 8 +
h i
1 k k k
16 4(− j) cos 8 k + 2 j(−1) sin 8 k + 3 j
π
 π

=
1 k
 j k
 3 k
4 (− j) cos 8 k + 8 (−1) sin 8 k + 16 j .
π π
=

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


59

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).

Using the Fourier series synthesis equation, we can write


x(t) = ∑ ck e jkω0 t . (5.1)
k=−∞

Substituting t − T2 for t in the preceding equation, we obtain

∞ ∞ ∞
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=−∞

Using (5.1) and (5.2), we can write

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]).

A LTERNATIVE SOLUTION . From the Fourier series analysis equation, we have


Z
ck = 1
T x(t)e− jkω0 t dt
T
T /2 Z T
Z 
1 − jkω0 t − jkω0 t
= T x(t)e dt + x(t)e dt .
0 T /2

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


60 Continuous-Time Fourier Series (Chapter 5)

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.

Therefore, ck = 0 for even k.

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 .

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


61

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.

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


62 Continuous-Time Fourier Series (Chapter 5)

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

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


63

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

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


64 Continuous-Time Fourier Series (Chapter 5)

4 5.10 Consider a LTI system with frequency response


(
1 |ω| ≥ 5
H(ω) =
0 otherwise.

Using frequency-domain methods, find the output y of the system if the input x is given by

x(t) = 1 + 2 cos(2t) + 2 cos(4t) + 21 cos(6t).

4 Answer.
We begin by finding the Fourier series representation of x. Using Euler’s relation, we can rewrite x as

x(t) = 1 + 2 cos(2t) + 2 cos(4t) + 21 cos(6t)


h i
= 1 + 2 12 (e j2t + e− j2t ) + 2 21 (e j4t + e− j4t ) + 21 12 (e j6t + e− j6t )
   

= 1 + e j2t + e− j2t + e j4t + e− j4t + 41 e j6t + 14 e− j6t .

Thus, we have that the Fourier series representation of x is given by



x(t) = ∑ ak e jkω0 t ,
k=−∞

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.

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


65

Therefore, the output y is given by

y(t) = 14 e− j6t + 41 e j6t


= 14 [e− j6t + e j6t ]
= 14 [2 cos(6t)]
= 21 cos(6t).

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams


66 Continuous-Time Fourier Series (Chapter 5)

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


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 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.

Listing 5.1: main.m


clear all

syms k t;

% Define a function that is one at the origin and zero elsewhere.


delta = @(t) 1 - abs ( heaviside (-t) - heaviside (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]

% Sum the appropriate number of terms.


f = symsum (0.5 * mysinc ( pi / 2 * k) * exp (j * k * w * t), k , -n , n );

% Plot the result.


ezplot (f , [ -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 ));

Copyright © 2012–2023 Michael D. Adams Edition 2023-08-27


67

end

Using the above code, we obtain the graphs given below.


x1(t) x5(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

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

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1


t

(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 .

Edition 2023-08-27 Copyright © 2012–2023 Michael D. Adams

You might also like