Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

hw7 Sol-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

ECE-314, Fall 2012

Homework 7, Due date: Nov. 8, 2012

Special Problem 1: As discussed in class, the Fourier series representation of any T -



periodic signal x is given by x(t) = ∞ k=−∞ ck exp(jω0 kt), where ω0 = 2π/T , and ck is the

kth Fourier series coefficient associated with x given by ck = T −1 0T x(t) exp(−jω0 kt)dt. Now

consider specifically a periodic rectangular pulse defined by x(t) = ∞ k=−∞ p(t − 2k), where
p(t) = u(t) − u(t − 1).

(a) Plot x, determine its periodicity and find its power.


p(t) is a square pulse of hight 1 and duration 1. Now based∫ on its definition,

x extends p
periodically with period T = 2; ω0 = 2π/2 = π. Next, P = 12 02 |x(t)|2 dt= 21 01 |1|2 dt = 0.5.

(b) Find the∫ Fourier series representation of x. ∫


c0 = 0.5 01 1dt = 0.5. Next, for k ̸= 0, ck = 0.5 01 e−jπkt dt. After some simplifications
1
(see class notes for details) we find that ck = jπk , when k is odd, and ck = 0, when k is even.
(c) Use Matlab to reconstruct x(t) from its Fourier series coefficients. Start by considering
10 coefficients in the series, then increase it to 50, 100, 500, etc., until you find a satisfactory
result. Plot the reconstructions for each case.
Use the following code for this part and part (d):

clear all
T=4;
t=[-T:0.01:T];
M=1001;
I=[-M:2:M];
c=1./(I*i*pi);
f=exp(i*pi*I’*t);
x=c*f+0.5;
figure(1)
plot(t,x)
xlabel(’t’)
ylabel(’FS representation of x’)
figure(2)
semilogy(I,abs(c),’o’,0,0.5,’o’);
xlabel(’k’)
ylabel(’FS coefficient, |c k|’)

Note that when M = 1001 the reconstruction is almost flawless while M = 11 gives poor
reconstruction.

(d) Plot the magnitude and phase of the Fourier series coefficients.

(e) Find the trigonometric form of the Fourier series representation of x.

1

Write x(t) = a0 + ∞ ∗
k=1,k odd ak cos(πkt)+bk sin(πkt), where a0 = c0 = 0.5, ak = (ck +ck )/2 = 0
and bk = (ck − ck ∗)/2j = 1/πk.
∫ ∑
(f) Recall that Parserval’s Theorem states that T −1 0T |x(t)|2 dt = ∞ k=−∞ |ck | . Use your
2
∑∞ 1
knowledge of (b) to calculate k=0 (2k+1) 2 without resorting to any known series formulas.
∑ ∞
By Parserval’s theorem, 0.5 = 0.5 + k=−∞,k odd | jπk
2
| . But the summation is equivalent to
1 2
∑∞ 1 ∑∞ 1 2
2 k=0 π2 (2k+1)2 ; hence, k=0 (2k+1)2 = π /8.

(g) Use Matlab to verify that the answer you obtained in (f) is correct. This can be

done by approximating ∞ 1
k=0 2k+1 in Matlab. (You may find these useful: N=[0:1000];
sum(1./((2*N+1).ˆ 2).)
When we select 10000 points, Matlab gives 1.2337 for the summation, which is equal to π 2 /8.

(h) Re-state Parserval’s theorem in terms of the power of x and energy of the signal ck .
Discuss.
The energy per period for a continuous-time periodic signal x is the same as the energy of
the discrete-time signal (sequence) ck . Namely, whether we think of a signal in the time
domain or the frequency domain, energy is conserved.

Special Problem 2: Recall the definition of the discrete-time Fourier series (DTFT) of a

discrete energy signal x: X(ejΩ ) = ∞
n=−∞ x(n) exp(−jΩn), −∞ < Ω < ∞.

(a) Find the DTFT of the signals described text problems 3.52(a), 3.52(b), 3.52(c) and
3.52(d).

(b) Plot the magnitude and phase of the DTFTs in part (a).

2
ECE 314 – Signals and Communications SPRING 2006
Fall/2004

Solutions to Homework 10

3.52
n
(a) x[n] = 34 u[n − 4]
Solution: x[n] can be written as
 4
3
x[n] = y[n − 4],
4
3 n

where y[n] = 4
u[n]. The Fourier transform of x[n] is
 4
3
jΩ
Y ejΩ e−j4Ω
 
X e =
4
 4
3 e−j4Ω
= .
4 1 − 34 e−jΩ

(b) x[n] = a|n| , |a| < 1.


Solution: x[n] can be written as

x[n] = an u[n] + a−n u[−n − 1].

The Fourier transforms of each of the components of x[n] are:


1
F {an u[n]} =
1 − ae−jΩ
and

F a−n u[−n − 1] = aF a−n−1 u[−n − 1]


 

= aejΩ F a−n u[−n]




aejΩ
= .
1 − aejΩ

1
Hence,

1 aejΩ
X ejΩ

= +
1 − ae−jΩ 1 − aejΩ
1 − a2
= .
1 − 2a cos(Ω) + a2

1
+ 12 cos π
 
2
, |n| ≤ N
N
n
(c) x[n] =
0, otherwise.
Solution: x[n] can be written as
  π 
1 1
x[n] = + cos n wN [n],
2 2 N

where wN [n] = 1, for |n| ≤ N , and wN [n] = 0, otherwise.


The Fourier transform of wN [n] is
N
X
jΩ
e−jΩn

WN e =
n=−N

ejΩN − e−jΩ(N +1)


=
1 − e−jΩ
Ω 1 1
e−j 2 ejΩ(N + 2 ) − e−jΩ(N + 2 )
= Ω Ω Ω
e−j 2 ej 2 − e−j 2
sin Ω(N + 12 )
=
sin Ω2


Hence,
1  1  1
X ejΩ WN ejΩ + WN ej(Ω−π/N ) + WN ej(Ω+π/N )
 
=
2 4 4
1
1 sin (Ω − π/N )(N + 12 )
  
1 sin Ω(N + 2 )
= +
sin Ω2
  
2 4 sin Ω−π/N
2

1 sin (Ω + π/N )(N + 12 )


 
+   .
4 sin Ω+π/N
2

2
Special Problem 3:

(a) Show that the DTFT, X(ejΩ ), of an energy signal x(n) is always a 2π-periodic function
of Ω.

Pick any integer k and note that



X(ej(Ω+2πk) ) = ∞ n=−∞ x(n) exp(−j(Ω + 2πk)n)
∑∞
= n=−∞ x(n) exp(−jΩn) exp(−j2πkn) and the second exponential is 1. Thus, X(ej(Ω+2πk) ) =
X(ejΩ ).
(b) Assume further that x(n) is real valued. Use the fact in (a) to represent X(ejΩ ) by its

Fourier series. Namely, prove that X(ejΩ ) = ∞k=−∞ x(−k)e
jΩk
.

First observe that X(ejΩ ) has the FS representation X(ejΩ ) = ∞ k=−∞ ck exp(jkΩ) since
it is 2π periodic. But we can re-write this sum, using a simple change of variable, as

X(ejΩ ) = ∞ k=−∞ c−k exp(−jkΩ). By comparing this latter expression to the defintion of
jΩ
X(e ) we conclude that c−k = x(k), or ck = x(−k), which we can insert back into the FS
∑∞
representation to obtain X(ejΩ∫
) = k=−∞ x(−k)e
jΩk
.
−1 2π jΩ
(c) Show that x(n) = (2π) 0 X(e ) exp(jΩn)dΩ. ∫
We know that the∫
Fourier series coefficients are given by cn = (2π)−1 02π X(ejΩ ) exp(−jΩn)dΩ,
or c−n = (2π)−1 02π X(ejΩ ) exp(jΩn)dΩ. Now use the fact c−n = x(n) to complete the proof.

(d) In light of the above, describe the relationship between x(n) and X(ejΩ ) in the language
of Fourier series.
x(−n) is simply the FS coefficients associated with X(ejΩ ).

(e) Now work problems 3.53(a) and 3.53(c) of the text.

3
3.53

(a) X ejΩ = cos(2Ω) + j sin(2Ω)
Solution: The expression above can be rewritten as

X ejΩ = ej2Ω .


Hence,
x[n] = δ[n + 2].


jΩ 1, π/4 < |Ω| < 3π/4,

(c) |X e |=
  0, otherwise
arg X ejΩ = −4Ω.

Solution: X ejΩ can be written as

X ejΩ = e−j4Ω P3π/4 ejΩ − Pπ/4 ejΩ ,


   

where 
jΩ
 1, |Ω| < Ωo
PΩ o e =
0, otherwise.

The time-domain signal that corresponds to PΩo ejΩ is
Z π
1
PΩo ejΩ ejΩn dΩ

pΩo [n] =
2π −π
Z Ωo
1
= ejΩn dΩ
2π −Ωo
1 1 jΩo n
− e−jΩo n

= e
2π jn
sin (Ωo n)
= .
πn
Hence,

x[n] = p3π/4 [n − 4] − pπ/4 [n − 4]


   
3π(n−4) π(n−4)
sin 4
− sin 4
= .
π(n − 4)

3
Special Problem 4: Consider an LTI system with impulse response h(t) = e−t u(t).

(a) Find an electrical circuit that is represented by the above system. Make sure that you
identify the input and output clearly.

Look at the RC circuit in the handout ODE available on the class website.
(b) Assume that the input is the periodic signal described in Special Problem (1) above.
Follow the notes in class to write the Fourier series representation of the output.

Using superposition and homogeneity, we can write the output in response to any peri-

odic input as y(t) = ∞ k=−∞ ck H(jkω0 ) exp(jω0 kt), where ∫H(jω) is the frequency response

(or Fourier transform) associated with h, namely H(jω) = −∞ h(t)e−jωt dt. In this example,

ωo = 2π and H(jω) = 1+jω1
[derive this]. Thus, y(t) = 0.5+ ∞ 1 1
k=−∞,k odd jπk 1+j2πk exp(jω0 kt).

(c) Use Matlab to plot the magnitudes of the input and the output of the system on the
same plot. Comment on the effect of the system on the harmonics of the input.
To see compute and plot the output, execute the following code:
h=1./(1+(2*pi*i*I));
f2=exp(i*pi*I’*t);
y=(c.*h)*f2+0.5;
figure(3)
plot(t,y);
xlabel(’t’)
ylabel(’Output, y(t)’)
Note that the out is no longer a rectangular periodic pulse; it is now more-or-less a
triangular pulse train. This is because the higher order harmonics in x have been heavily
attenuated by the action of the filter H(j2πk). In fact, the Fourier series coefficients of the
output are approximately of the form 1/k 2 , which correspond to a triangular pulse train.
You should repeat the same calculation starting from a different h, say h(t) = e−10t u(t),
1
or H(jω) = 10+jω . Your output will look like a distorted pulse but not quite triangular. Now
if you try h(t) = e−100t u(t), or H(jω) = 100+jω
1
, then the output will look like a rectangular
pulse since the filter is leaving most of the harmonics almost intact.

You might also like