You are on page 1of 39

Home Assignment 1

Due on May 20, 2008


Exercise 1
In this problem we derive the Fourier transforms of the sign function and the
unit-step function.
Part A
Find the Fourier transform of the signal (for > 0)
x(t) =

e
t
, t > 0,
0, t = 0,
e
t
, t < 0.
Part B
The sign function sign(t) is dened by
sign(t) =

1, t > 0,
0, t = 0,
1, t < 0.
Find the Fourier transform of the sign function.
Part C
The unit-step function u(t) is dened by
u(t) =

1, t > 0,
0.5, t = 0,
0, t < 0.
1
Find the Fourier transform of the unit-step function. Hint: Express u(t) in
terms of sign(t) and another signal.
Exercise 2
Part A
For a real signal x(t) we dene
x
e
(t) =
x(t) + x(t)
2
,
x
o
(t) =
x(t) x(t)
2
.
The signals x
e
(t) and x
o
(t) are called the even and the odd parts of x(t),
respectively. Prove that
X
F
e
() = {X
F
()}, X
F
o
() = {X
F
()},
with and denoting the real and the imaginary parts of the Fourier
transform, respectively.
Part B
Let
x(t) = cos(
m
t) (1)
and
y(t) = [1 + ax(t)] sin(
c
t) (2)
where 0 < a < 1 and
m

c
1
. In this problem we assume, for simplicity,
that
c
= M
m
, where M is an integer much larger than 1.
Show that y(t) is periodic with period 2/
m
.
Dene
2
z(t) =

y(t), y(t) 0,
0, y(t) < 0.
(3)
1
The operation of constructing y(t) from x(t) is called amplitude modulation (AM).
2
The signal z(t) is called half-wave rectication of y(t).
2
Since a < 1, we also have
z(t) =

y(t), sin(
c
t) 0,
0, sin(
c
t) < 0.
(4)
Show that z(t) is periodic with period 2/
m
.
Suggest a way to extract the signal x(t) from z(t).
3
Solutions to Assignment #1
Exercise 1:
(a)
XF(w) =-
J
" ,'.-J."d'+ r",-'..'."d'. ,,= +-'-0- "t j2w~
.." Jo a JW a+Jw a'+w2
(b) Wehave
sign(t) =limx(t),
,,-0
where xU) is the signal in part a. Therefore. assuming that the order of the limit and integral operations
can be interchanged, we get
.
~
' \ . - - j2w - 2-
(fslgn,(w) -, ') -. .
a- + W' JW
(c) We have
uW = O.5sign(t) 0,5Hn.
Therefore,
Exercise 2:
Part A
.If x(i) Ps rea\ .fhfh '* 15 '"~ ~ I:ts (DJ1J~~) ..S;o
,,(-1:\ = J- r"" X"(W)e-Jwi: dw =.L ('" XF(;';~;.rt41o!
):1(, j~ m J-~
So 1:ke fa~lft irOJ\S~"" of x{-t) I~ -Xf(w), Th~e
)t~(w) =D\5XF(W) + f),S'Xf(W)j=R\ }('F(W))
~P\d }
X:Cw) ~ (?,S,xt(w) - CA5X f(IAJ);:: J ~ {X1w)J
po< J ,
13
f~ 2 1- ;$
~Mt g ~
'1ft') = [H-~x{t)J .;i.I/llJct-= [,+ a t03.(Wm-t)]~1'n(A1~-t)
(f)
~'In( M 1N1>1-t)-T IA Ws WP1-t sf.-. (M ~1t )
<;m(MW)I'I-t) --t O'Ja ~I'.-,[(MTf)~-tJ --r Glra -;)),[(tv1-I)~tJ
2(T) = yet) ~ r~ct
(
.:! (-t-.l) - 3S.k
)
I vvc- 2- t1Je. /C.=-{)C>
i,vtt)= ::f (-eLf ( ~ tt-f) - ~f')
/L::::-K>
-
-rL<;
ytt-) is
Jz~f7D~'c
~
[P-t
b lQV. LV(-t)
fM~
ph '0 d
2T[
~
~nI (Wd-) ~ 0
.;~ (tvc"t) ~ D
2Jcn L
-t
~
We -
(2/~"1'J)~
lNc
k6-~
0 d<.erIM}P
,;;hews
I J1 F{}oI
">
1;
(2)
I
ytn
23ft) -=-
0
tt)=
{
yet)
0
tJV-e f
w{-t) is
pN'VC
od
27[
C1U1 '2P..f'
We.
c1
,",-+ is
Pri CJe wtA
pr-'od
j\A.
27{ 27{
COU1'.
We = /AJM
<;'>1 ytt-)
ocL'c
IM"'J"
roJ
-
2l{
2ft)
I
r'oJi'c
tur.,
.
;is
p~e ~ ~ s
q~ltR 2?tt) 00 ym wet) =,~ ';Ifj) 5 ;5{t- -;.rr /C) ~
.
red
(
1[ (T- -1
)
\\
. ~ k:.-J VVC: tv: z)
IN-f lwv-.
;zsflw) =
P<::/ 2. ~ jj,ck
~~2 y~w) 7f L ~fVlC ( :~:) -e-j? o(vv- wck)
/t.;=-/IO
-
:l. ;<:> . :? -. lvck
. W\:2- L;~VI( ( We ~ ~ ~ J:? y( Uv- tvc/c) 2.j( It:. ==-PO 2{[
Al1d
ytt) = [1-+ ~ xtt)] .c;~ wet
~o
y F(IN) ~ ;1c [H- 4 XCi(J)]
* [~( S( V1i-wc)- 6 (tv+lvc)j] J
,W-' , S>
'( F{lA-) =
J [ l-ra TC ( (j(ltHv.,)-+ 'sDv+W>"1))] ?\' }
( 2)( iN-we) - S( lv+ We) )
Y(Iii)
1R.f7 cu::
~~
---
b
~w
Wc-W"" we. WC+WW)
-W,,-WM -Lv~ ~wc~
Ncrthe ht
/01
jUf~lcy
~'11 g(w)
15
J'u ~-t
1t-eJ tte+tsY
it
C8Uf.fn+,t a... J ~lv,ft>{} /\ t't-!'-tJ,1
X(-t) ~ 2ft) , ~ vJIPt
Is J~ tI I Wov- f"'" f//tor l w"'-tJ, qr - '1f
~d w.. .- 1tJt~ by <~ "';"'fe ~caL,(; p~
'" ., ..
l/IA
fj211 '0 d
;gr
-
U)
X.ro
xc-r)
jrvm
2ft)
,
(f)t/'t!
ytw)
,
Ccd,(; I-t lNt'-th
VI
jW1t1'Jod
We C;o -to t?'Th1
- We
d
Home Assignment 2
Due on May 29, 2008
Exercise 1
Given a continuous-time signal x(t) with X
F
() = 0 for || >
m
determine
the minimum sampling rate f
s
for a signal y(t) dened by:
a) x
2
(t), b) x(2t), c) x(t) cos(6
m
t).
Exercise 2 (Natural Sampling)
Suppose the signal x(t) is band-limited with X
F
() = 0 for || B. Instead
of sampling with a train of s we sample x(t) with a train of very narrow-
supported pulses. The pulse is given by a function p(t), we sample at a rate
T, and the sampled signal then has the form
g(t) = x(t)

k=
T p(t kT)
Is it possible to recover the original signal x(t) from the signal g(t)?
If not, why not. If it is possible, what conditions on the parameters T
and B, and on the pulse p(t) make it possible.
Exercise 3
Reconstruction of continuous-time signals from their samples using the clas-
sical formula is impractical, since the sinc function cannot be implemented as
a causal ler. Hence, developing dierent reconstruction methods has been
1
a topic of intensive research. One of the possible methods is so-called zero-
order hold that interpolates the signal over [nT, nT +T] by a constant value
equal to x(nT). Formally it can be represented by the following formula:
x
ZOH
(t) =

x(nT)h
T
(t nT),
where
h
T
(t) =

1, if t [0, T),
0, otherwise.
The gure below shows an output of a reconstructor (i.e., D/A converter)
which linearly interpolates between successive samples:
Figure 1: Pertaining to Exercise 3.
Suppose the impulse response of this D/A converter is h
a
(t), i.e.
x
a
(t) =

n=
x(nT)h
a
(t nT)
Plot the impulse response h
a
(t) and determine whether this reconstruc-
tion can be performed as a causal operation.
Is there a lter, by using which the result of the above reconstruction
can be transformed to the original signal x(t) (assuming the latter is
band-limited and sampled well above its Nyquist rate)? If there is, nd
the frequency response of this analog lter.
2
solutlfJ1,\~ -to 4~~~h~t
::/::12
F-~U~ L:
a)
)I(j) = x~)
;>
yi(W) = .J x1-/W)* X~w)
w.e ~<?
yet) is b~d - [,~'-tr;J IM~
T
Y ItA/) = 0
-}r IIN} > 2vJhy,
~o ~ }~ )~IH~ <;;~~'cJ )'ItR
f~ ( /'7'1 iAA'?t
~tP )
1M/) ~
;z1{f~ = 4W~
1',.e .
j~ =
2
?(Wm
fKJ
b)
y (T) = )( (2t)
~
,f/w) = -J- Xf( ~)
~o
'jtr) /3.
bc:<..d- ()"IJ'tPJ ~
y~W) =()
-pr I VvI > 2Wp-,
T/wts
IV/) u iSf 'Nttp
is
is.
f~ = ~ Whl
!Xl
t)
'1ft) =- X[f-) bUS( 61CWnit)
~
7f-tfA-) = '7[, [X=F(IN- 61[~) +
X+( IN+ 6l( it!)..,)J
YtrJ is
b~J - [,i'lrtRd LM(;t.
Y1)w)
,(Flw) =:: 0
frr
f iN I > (67[fI)w~
0Mc/ ( w ,< (61[-1) Ww,
w
- 67CLVJYI
b
.:;"
bll~'fhvt /. 61lJA/11I~
()T[W}YI
TI1M~ ::gfj -rkc J'ZA1>14~
5cvr~'1J ~
f$ =
(67(-r/)~
7[, L (67L-t/)~ (
~-
/11 TU/-uma! :3 )
_.
67(+/ vtJ,
'lC
l ~.e Prvb~ 44:s
~(T) =
pO PQ
X[-r) L T P{T-tcT)= XtI) T::?- &(-t- /c.T)-If-peT)
JC=-tO Ic:.=-IC>
xtrJ r ( ftr) * ;S(t-kT))
-
Now c10
f~'r ~r
~
bo~ <;;;k5
GFtw) =~X~w) * T ( f~W) ~ 2: l :;cw-1")
t1=--IO
;;::Jt'2J( xftW)-J~ pF(2hT[) f)(vv- ;2/(11
)
'
)
'\"" t1=-po T T
pC>
~::; pF( .?J11() X F{W- 27[A)
11=-pe> T --r
C\) C;O we ~f! ~ 'J ~ct" Lt'~ v,;-t;h I\~( ~~b1!' ~ F~r
T~r oj k g~fRJ <;!y~ i> th1 )~/VlItP gV0>1 1- ~klftRJ
~r~ l' trl'!5~ ~!JJ1af~ f&1M1'er-~~. 7V &41b dJjj~ffi1cP
1'~1-vl\- t'tf?R ~ )"~f>-tt(: fwl'i{? avR ~d 15 -tI1t?t -0tct aJ
~ C&ff,eg /?> <;(cded b)' * value 1 fw/s-els, fdwrt'r ~r
tAT -tf,..e {et:-er jT.t2!~'M5Yaf ~ Wf/. )(air'{J ~<; are:
~(lo4,)1-co b -ta/~ ~It t>y adj~-tAYJ ~ Y&l4'n 1- -tAU! terv-
rlM.<; t'(~ (AI-' u'lR -to v~ C1PI rt;tucu 1 xtr). :;0 11.e5 J I '
LllAder cevtt?/1, UfJ1J'--tt~ i'-t /?;. ?tJSS~b& -W i'(f7V.er !J{t) rJtt)
t.:x-aGl' 2."
l:
Tle
--t;t-Ik -w
s
fT'Vh
2:>
rw&
-t
)'1aa1
5tf' rct"
is
p..0r Iv cLt'
aj
fwlw
d
cav. }zp
.f2;XprU:. d
as
t? Cf"YIlt-D [,vm 6{T)
V1A
in-y &iNZJI
-r1 V\
b)
As ~ I\~ c;at/Uf"(} , Lv<? ~-eJ
!T~~I s:v-ry'>N~?io
-v~< (he 'N) w)tJ/-tt~
t!J41 ~ tuL~ ptt) t}(S tcJ ~ It
k
~~
tA
f~/er -bt'~~r
~D ~
a -tJw <;,ttr5 W.e 7;{)f) k
~/C{? 5 e-h <;.R .
t=.X8T'.il Cf~ S ::
rwlSR
~) ~$,'der -w: (AM1't "" rf26>f~ l' w t>Ill. TIcP ~\~-ar
.,n-tar fD {tr1A~ " L ,'s --clt.crt- t:4.Rlt-IY>f~ '2P (h Pj (-t) ) tA4(/ lzR a
-bn~t.e jtM1 ~ ~ - T -fA) T 1Mph h.e!Jh+I. iT is
"'atr)
/
ff
I
Vi
"*
- 7f
-T
T
.I
- ;z..
..I
;z..
_I
z
.I
?
)10[~ <;;/'.tLR
b) l/!Ie J1R.e c/
hatt) >0 , p.r -t.co
- '
~ f/lt/Jr 7 fa~c}& -vh~I ~'ch.
-tJi<..RlM1~ ,'rab ~
-1f-ed
1- ~~ ~tWe
r.e~('-wr- Ct2M ~ O(j.ar~ .
S}\I (J?
#
jr1~)' ve,5.f~~ 1-
haft) is
f.
+-ItA/iN) =
T
wT 2
I
(
<;:,>1 2
)
-" 2
{
WT
)
- - T 5,.u.{
T /NT TJT
2
G~tv) tAt -iN &o/"t '1 -N t>Il}.. "",J /I jf,,?""'9
(~cab 1- -Jw-two f,y~
)n.Ab
LAt;~'il a j N-tar
V..er~ZR ) -c0
G'f/w) - fftJofrw) =
ke an ,'..rkt DI/j
7(
[
T (fA)1 T
15 G l'ckM (w) ~
0 ~{W
GftW) =-
f
t
~T _
)
2
<; /'., l-tIT
?
Iw/c: l
T
b
~J'2R
lX1
T
(WT;>.
IIN/
-
:?)
H f:.{I.V)
.s:> 6Ftw) =
.e) .
0
So
{-y , 1
-AA is (lM
1Nte('
c;t{LASf ;YI(J
o.PO-VP
t$1tJI-b
a-.d
"
j'-1u cy
IS
f
I-:-5
)'f&rt<;.R
G (IN)
Home Assignment 3
Due on June 9, 2008
Exercise 1
Consider the nite-length sequence
x[n] = 2[n] + [n 1] + [n 3],
We perform the following operation on this sequence:
We compute the ve-point DFT X
d
[k].
We compute a ve-point inverse DFT of Y
d
[k] = (X
d
[k])
2
to obtain a
sequence y[n].
a) Determine the sequence y[n] for n = 0, 1, 2, 3, 4.
b) If N-point DFTs are used in the two-step procedure, how should we
choose N so that y[n] = {x x}[n] for 0 n N 1 ?
Exercise 2 (Inverse DFT)
A sequence x[n] with n = 0, 1, 2, . . . , N 1 is zero-padded to 2N points (i.e.,
N zeros are appended to x[n]). Let x
a
[n] be this 2N-point sequence and let
X
d
a
[k] be the 2N-point DFT of x
a
[n].
a) Determine the inverse N-point DFT of a N-point sequence consisting
of the even-index components of X
d
a
[k].
b) Determine the inverse N-point DFT of a N-point sequence consisting
of the odd-index components of X
d
a
[k].
1
Exercise 3 (Circular Convolution)
Let X
1
and X
2
be two N N circulant matrices corresponding to nite-
dimensional sequences x
1
[n] and x
2
[n] of length N, respectively. Find a
general expression for the (k, n)-th element of matrix Y that is equal to the
product of X
1
and X
2
, viz. Y = X
1
X
2
.
2
Home Assignment 4
Due on June 16, 2008
Exercise 1
Let
0
=

16
. Consider three values N = 16, N = 64, and N = 256. Let
x
N
[n] = cos(
0
n) for n = 0, . . . , N 1, and X
N
[k] be its N-point DFT
coecients.
a) Plot |X
N
[k]| for the above three values of N. Use subplot() to com-
pare the results for dierent values of N.
b) Explain the behavior of |X
N
[k]| as a function of N.
Exercise 2
In some applications in coding theory, it is necessary to compute a 63-point
circular convolution of two 63-points sequences x[n] and h[n]. Suppose that
the only computational devices available for us are multipliers, adders and
processors that compute N-point DFTs, and N restricted to be a power of
2.
a) Create two 63-length random sequences x[n] and h[n] using the MAT-
LAB function randn() and write a matlab program to compute an
M-point circular convolution of two sequences by computing their lin-
ear convolution in time domain. Verify your program by computing
the 63-point circular convolution of x[n] and h[n].
b) Write a MATLAB program that computes the 63-point circular convo-
lution of the above random sequences x[n] and h[n] using two 128-point
DFTs and one 128-point inverse DFT. Compare the results and com-
putation complexity (in terms of multiplications) of this method with
1
that in (a). (Assume that one complex multiplication requires four real
multiplications and both x[n] and h[n] are real.)
Exercise 3 (Zero Padding in frequency domain)
Assume we are given the DFT of a length-N sequence (where N is odd), and
dene the zero-padded in frequency domain as
X
d
i
[k] =

LX
d
[k], 0 k
N1
2
,
LX
d
[k M +N], M
N1
2
k M 1,
0, otherwise.
(1)
for M = LN and L > 0. The new DFT has zero values at high frequencies
and conjugate symmetry is preserved if processed by X
d
[k].
a) Modify the denition of zero padding in the frequency domain (1) to
the case of even N.
b) Write a MATLAB program that implements interpolation of a nite
sequence x[n] by zero padding in the frequency domain. The program
should treat both even and odd lengths of x[n] and not be limited to
M which is an integer multiple of N.
Note:
Remember to attach the MATLAB code and the generated plots to
your homework submission.
To get info about MATLAB functions, type help function_name at
the MATLAB command prompt.
2
ECE 413 Solution to assignment 4
Page 1 of 3
Solutions to assignment 4

ote: The following answers are not unique, we hereby provide referenced code.

Exercise 1

close all;
clear all;
omega = pi/16;
j = [16, 64, 256];
for i = 1:1:length(j)
N = j(i);
x(i, 1:N) = ones(1, N) .* cos(omega .*(0:1:N-1));
y(i, 1:N) = fft(x(i, 1:N));
end
figure;
subplot(3, 1, 1),
plot(x(1, 1:j(1)), 'o');
xlabel('k+1');
ylabel('x_1_6[n]');
subplot(3, 1, 2)
plot(x(2, 1:j(2)), 'o');
xlabel('k+1');
ylabel('x_6_4[n]');
subplot(3, 1, 3)
plot(x(3, 1:j(3)), 'o');
xlabel('k+1');
ylabel('x_2_5_6[n]');
figure;
subplot(3, 1, 1);
plot(abs(y(1, 1:j(1))), 'o');
xlabel('k+1');
ylabel('|X_1_6[k]|');
subplot(3, 1, 2)
plot(abs(y(2, 1:j(2))), 'o');
xlabel('k+1');
ylabel('|X_6_4[k]|');
subplot(3, 1, 3)
plot(abs(y(3, 1:j(3))), 'o');
xlabel('k+1');
ylabel('|X_2_5_6[k]|');

ECE 413 Solution to assignment 4
Page 2 of 3

Figure 1: Figure for Problem 1

Exercise 2
(a) function z=circonv(x,y)
%synopsis: z=circonv(x,y)
%performs circular convolution by means of linear convolution
% input: x,y are two vectors; output: z the result of the circular
% convolution
N=length(x);
if (length(y)~=N)
error('Vectors of unequal lengths in circonv');
else
z=conv(reshape(x,1,N),reshape(y,1,N));
z=z(1:N)+[z(N+1:2*N-1),0];
end
(b) function z=circonv63(x,y)
% Implement 63-point cicular convolution using 128-point DFT
N=length(x); M=length(y);
if (length(y)~=N)
error('Vectors of unequal lengths in circonv63');
elseif (M~=63)&&(N~=63)
error('input vector length does not equal to 63');
else
% zero padded to 128 points sequences
ECE 413 Solution to assignment 4
Page 3 of 3
Xa=[reshape(x,1,N),zeros(1,128-N)];
Ya=[reshape(y,1,M),zeros(1,128-M)];
Za=ifft(fft(Xa,128).*fft(Ya,128),128);
z=Za(1:63)+[Za(64:125),0];
end

Complexity: in terms of multiplications
Part (a) implement it using linear convolution: # mult=
63
2
1
2 63 3969
n
n
=
=


Part (b) implement it using 128-point DFTs: # mult=
2
4 3 (128log 128) 10752 =

Exercise 3
(a) when N is even,
[ ] 0 1
2
[ ]
[ ] 1 1
2
d
d
i
d

LX k k
X k

LX k M M k M

+ +



(b)
function z=zero_pad_freq(x,M)
% Implement zero padding in frequency domain
% x is input vector with length N
% M length of zero padded sequence in frequency domain
N=length(x);
L=M/N;
Xk=fft(x,N);
if (N-2*floor(N/2)==0)
% when N is even
Zk=[L*Xk(1:N/2),zeros(1,M-N),L*Xk(N/2+1:N)];
else
% when N is odd
Zk=[L*Xk(1:(N+1)/2),zeros(1,M-N),L*Xk((N+1)/2+1:N)];
end
z=ifft(Zk,M);
Home Assignment 5
Due on June 30, 2008
Exercise 1
Consider the window
w[n] = sin
4

n
N 1

.
Explore the properties of this window: main-lobe width and side-lobe level.
How is this window related to the Hann window?
Exercise 2
We are given 128 samples of the signal
x[n] = sin

2
6.3
128
n

+ 0.001 sin

2
56
128
n

.
a) Explain why a rectangular window is not adequate for detecting the
second component.
b) Of the Hann and Hamming windows, which one is better in this case
for detecting the second component? Explain you answer and illustrate
it on a computer.
Exercise 3
Consider the system of Figure 1 with input x(t) = e
j
0
t
that is sampled with
period T
1
.
1
T is chosen such that no aliasing occurs during the sampling process.
1
Figure 1: System gure for Exercise 3.
Suppose that now N = 32, Figure 2 and Figure 3 show the magnitude of
the sequence X
w
[k] for k = 0, 1, . . . , 31 for the following two dierent choices
of w[n]:
w
1
[n] =

1, 0 n 31,
0, otherwise.
w
2
[n] =

1, 0 n 7,
0, otherwise.
Figure 2: Pertaining to Exercise 3.
Figure 3: Pertaining to Exercise 3.
2
a) Indicate which gure corresponds to which choice of w[n]. State your
reasoning clearly.
b) For the input signal and system parameters in part (A), we would like
to estimate the value of
0
from Figure 2 when the sampling period is
T = 10
4
. Assuming that
w[n] =

1, 0 n 31,
0, otherwise.
and that the sampling period is sucient to ensure that no aliasing
occurs during sampling, estimate the value of
0
. Is your estimate
exact? If it is not, what is the maximum possible error of your frequency
estimate?
c) Suppose you were provided with exact values of the 32-point DFT
X
w
[k] for the windows choices w
1
[n] and w
2
[n]. Briey describe a pro-
cedure to obtain a precise estimate of
0
.
3
ECE 413 Solution to assignment 5
Solutions to assignment' J
Exercise 1
tj
5
N
Page I of3
ECE 413 Solution to assignment 5
Exercise 2
!?
T
Exercise 3
t
a)
The rectanglIl;:u' wincklws, 7J)1 [n] and Ul2[n], differ only in their lengths, which an) ~:i2
and 8 reSI)ectively. Recall that the Fourier transform of a shorter window has a wider
mainlobe rmd higher sidelobn'\ compared to durt of a longer window. Since the DFT is a
sarnplec! version of the DTFT, we try to use these features to distinguish the two plots.
\Ve notice that the second plot, Figure_:1, a,ppears to have a wider mainlobe and
higher sidelobes. As a result, we conclude that Figure _-2 corresponds tou/dnL and
FigureB-S corresponds to lL'2[n].
b)
A simple technique to estimate the value of w'ois to find the value of k where IXw[k]i is
largest. Call this index ko. The estimate is then:
A 2Jrko
Wn= N
The corresponding value of no is
c
'J1f /.;0
.
()
(
'
) = -CF
T h 1,'..
ThL"estirnate is not exact, since the peak of the Fourier transform rnagnitnde IX,,-, (eI") I
c()uld occur bet\Vef~lltwo DFT sampln'\. The ma;ximum possible error Llflmax in the
estimate is one half of the frequency resolution of the DFT.
.. 1 271 Jr
~P
![J
">V = .,--,--- = -
. "" 2NT NT
From Figure P8f-2, k = 6, and with the system parameters N = 32 and T = 10-4,
~
nO:J:~QHmx = 11781::1::982 rad/s =1875::1::15GHz
Page2 of3
ECE 413
Solution to assignment 5
c)
The following proeedure provides a precise c\<;timate of no, starting from the coarse esti-
mate in part (c). Other procedures are also possible.
\\le seek an algebraic expression for the N-point DFT Xw[k].We first find the Fburier
trall;sf()rUl of :Tu,[n] = :r[n]w[n], wherew[n] is an Ai-point rectangular windc)w and 1\1 is
not necessarily equal t() N. SiIlce :r[n] is a })111;e eomplex exponetttial with frequency (I.;'U,
X,,,(cjW) is equal to the Fourier tran,sJonn of ~u Ai-point rectangular window shifted in
frequeney l)y ('(.1():
.
(
'(w-""o )
Al'
)
"Ill '
, .~ ? ,(w'-c.' oHM -11
v ' !&J
)
--) , ,
.'1.to(e,=
,
(
'
)
' :3
" l"l-wl))
15m ~
Note that Xw(ejW) has generalized linear phase. \Ve find X'w[k] by evaluating the above
""' .' 'n' , , '
\
j' '" ' , " .'. , , - 27rk
f
" , L -
(
'
)
'
I
:
\
T '
I
'
CXpH:~SSlOl1a, In,qUllClCS W - N Ol h - ',',.., ,,, -.
((
'2"" , '
)
sin ,r:r-WI) )M
:2 i 2"k .,
X11'[k]= ",-I I,",-w'o)(M-l)
(
e"k , ' )
)
' c. '2
sin fr2-vJO
\\Toknow the ,,,rapped phase of Xw [k], given by:
(
27fk'
)(
AI - 1
)
LXw[k]= . "-Jo - N . z- .. + !niT
where the rn7f term <:counts for possible sign changes in the amplitude of Xw[k] 8.'3well
a.s phase wrapping, so that LX".[!.:] stays in the range [-iT,1f].
Ft.'ompart we know roughly where WI)should lie, Substituting Ie = into the ph8.'3e
expression,
LXw[A:o]
(
27rko
)
(
AI - 1
)
;"':0 - --:-
,
- . + ln7f
, N 2
,~ ,
(
Ai -1
)
-",-JOI - +m1f
! "
..
The magnitude of the (~rr()r levo- iUolis bounded hy N, so tJl(~first term lies within
the range [-7f, 7f] even for the case 11/1=N. In addition, lies within the Inain lobe of
Xw(ej,,-,) hOlmded by (.(Jo - iT and wo+ iT, so the amplitude at w = is positive. "Ve
can therefore set m = 0 in the phase equation,
Solving the phase equation for k!Owith 'In =0,
:""0=
2LX~u[ko]
+ A1-1
and no = ':If. 'N'e can obtain two estimates of no for the two window choices IUl[n]
(AI = 32) and wz[n] (AI =8), using the values of and Anfrom part (c) in both C8.'3es,
and check that tJley are consistent.
Page3 of3
Home Assignment 6
Due on July 9, 2008
Exercise 1
A causal LTI system has impulse response h[n], for which the z-transform is
H(z) =
1 +z
1
(1
1
2
z
1
)(1 +
1
4
z
1
)
a) What is the region of convergence of H(z)?
b) Is the system stable? Explain.
c) Find the z-transform X(z) of an input x[n] that will produce the output
y[n] =
1
3

1
4

n
u[n]
4
3
2
n
u[n 1].
Exercise 2
If the input to an LTI system is x[n] = u[n], the output is
y[n] =

1
2

n1
u[n + 1].
a) Find H(z), the z-transform of the system input response.
b) Find the input response h[n].
c) Is the system causal? Is it stable?
1
Exercise 3
In Figure 1, H(z) is the system function of a causal LTI system.
a) Using z-transform of the signals show in the gure, obtain an expression
for W(z) in the form
W(z) = H
1
(z)X(z) +H
2
(z)E(z),
where both H
1
(z) and H
2
(z) are expressed in terms of H(z).
b) For special case H(z) =
z
1
1z
1
, determine H
1
(z) and H
2
(z).
Figure 1: Pertaining to Exercise 3.
2
ECE 413 Solutions to assignment 6
Page 1 of 3
Solutions to assignment 6


Solution:


Solution:
ECE 413 Solutions to assignment 6
Page 2 of 3



Solution:
ECE 413 Solutions to assignment 6
Page 3 of 3




Home Assignment 8
Due on July 17, 2008
Exercise 1
Design a symmetric FIR lter with group delay N/2 according to the ideal
magnitude response
|H
f
d
()| =

1, 0 ||

3
,
0,

3
< || <
2
3
,
0.5,
2
3
|| .
A. Compute h
d
[n].
B. If the lter is designed with the Hamming window and its order is
N = 40, what are the values of

p,1
,
s,1
,
s,2
,
p,2
,
p,1
,
s
,
p,2
?
C. Suppose we want to have
p,1
=
p,2
= 0.01, and = 0.005. Is it possible
to achieve this with a Hamming window lter of order N = 39?
Exercise 2
Fig.1 shows the ideal magnitude and phase responses of a lter that is a
dierentiator at low frequencies and high pass at high frequencies.
A. Compute the desired impulse response h
d
[n]. Does the truncated im-
pulse response have linear phase? Explain why or why not.
B. Design an FIR lter of order N = 128 and having
0
= 0.5, using: (1)
a rectangular window; (2) a Hamming window; (3) a Kaiser window
with = 6; (4) a Kaiser window with = 12. Compute and plot the
magnitude and phase responses of the four lters.
1
Figure 1: Pertaining to Exercise 2.
2
Assignment #7 Solutions Page 1 of 2
Exercise 1
(A) From the general multiband filter formula we get
N n
N n
N n
N n
N n
n h
d
5 . 0 ,
) 5 . 0 (
)] 3 / 2 )( 5 . 0 sin[{
5 . 0
) 5 . 0 (
)] 3 / ( 0 5 . 0 sin[(
] [ =


and
5 . 0 ] 5 . 0 [ = N h
d
(B) Using the Hamming window parameters, we get
. 0011 . 0 , 0022 . 0
,
41
4
3
2
,
41
4
3
2
,
41
4
3
,
41
4
3
2 , 1 ,
2 , 2 ,
1 , 1 ,
= = =
+ = =
+ = =
p s p
p s
s p

(C) No, since a type II filter cannot meet the pass-band specifications near = .
Exercise 2
(A) The desired frequency response is

>
s
=
0
0
0
| | , 1
| | ,
) (

j
H
f
d
Therefore, the desired impulse response is
(


+
(

|
.
|

\
|

=
+ + =
} } }

) 5 . 0 (
] 5 . 0 [
)) 5 . 0 ( cos(
) 5 . 0 (
) 5 . 0 (
1
2
1
2 2
1
] [
0 1
0
0
0
0
0
0
0
N n
Sinc N n
N n
N n
Sinc
N n
d e d e
j
d e n h
n j n j n j
d
The impulse response is neither symmetric nor antisymmetric, therefore the IRT
filter does not have linear phase. This is also evident from ) (
f
d
H , since this
frequency response is neither purely real nor purely imaginary.
Assignment #7 Solutions Page 2 of 2
(B) The following MATLAB code performs the required computations and plots the
results. The line computing the window w should be edited as needed. Note that
the phase is advanced by (n-0.5N) before plotting, to compensate for the filters
group delay.
w = window(129, 'rect'); % change as needed to 'hamm'; 'kais',6;
'kais',12.
theta0 = 0.5*pi
n = -64:64;
h = (sinc((theta0/pi)*n)-cos(theta0*n)) ./ (pi*n) - ...
theta0/pi)*sinc((theta0/pi)*n);
h(65) = 1 - (theta0/pi);
h = h.*w';
H = frqresp(h,1,501);(in the textbook P235)
theta = (1/500)*(0:500);
plot(theta,abs(H)),grid,figure(1),pause
plot(theta,(180/pi)*angle(H.*exp(j*64*pi*theta))),grid,figure(1)
Home Assignment 8
Due on July 30, 2008
Exercise 1
A Chebyshev-I lter of order N = 3 and
0
= 1 is known to have a pole at
s = 1 rad/s.
a) Find the other two poles of the lter and its parameter .
b) The lter is transformed to the z domain using a bilinear transform
with T = 2. Compute the transfer function of the digital lter H
Z
(z).
Exercise 2
A rst-order analog lter H
L
(s) has a zero at s = 2, a pole at s = 2/3,
and its DC gain is H
L
(0) = 1. Bilinear transformation of H
L
(s) yields the
digital lter H
Z
(z) = K/(1 z
1
). Find K, , and the sampling interval
T.
1
ECE 413 Solutions to assignment 8
Solutions to Assignment #8

Exercise 1

Exercise 2

Page 1 of 1

You might also like