0% found this document useful (0 votes)
44 views

Test Sem 1

1. The document discusses digital signals and systems, including definitions of the Dirac impulse, unit step function, and their properties. 2. It provides examples of computing the z-transform of signals such as the unit step function and delayed impulse. 3. Methods for computing the discrete-time Fourier transform (DTFT) of signals like the unit step function and its difference with a delayed unit step are presented.

Uploaded by

Hidden One
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Test Sem 1

1. The document discusses digital signals and systems, including definitions of the Dirac impulse, unit step function, and their properties. 2. It provides examples of computing the z-transform of signals such as the unit step function and delayed impulse. 3. Methods for computing the discrete-time Fourier transform (DTFT) of signals like the unit step function and its difference with a delayed unit step are presented.

Uploaded by

Hidden One
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

O?

O
o - �·tu - 2;J c,.)
22. e +A·-€ +z. e 2

0(w) , -w =) �\ cr,,;;t.,;J tr-� t�


J.icr N z3 t. 2? f- I � 'f Z- 1 � 'ld
�of ev
}
µ 0( cD) Z- I +4 · U//) (w)

,lf
I

-? ........
Example: Digital Oscillator
A discrete system should generate the signal :
y (n) = sin ( 0 n ) x(n) =δ(n) y(n) =h(n)
h(n)
+ causal system, results:

h(n) = sin ( 0 n ) u (n) h ( n ) = T  ( n )

1
  
H ( z ) = Z h ( n ) =  Z e jn0 u ( n ) − Z e − jn0 u ( n ) 
2j


Z e  jn0

u (n) =  e jn0 −
z =n
1 − e
1
j0 z −1
n =0
with the convergence condition: z  e j0 = 1


Z e − jn0

u (n) =  e − jn0 −
z =n 1
1 − e− j0 z −1
z  e− j0 = 1
1
n =0
Example: Digital Oscillator
1  1 1  sin 0 z −1
H ( z) =  
−  =
2 j 1− e 0 z
j −1 1 − e 0 z  1 − 2cos 0 z −1 + z −2
− j  −1

Im{z}
– poles: p1,2 = e
 j0
p1 = e j0
– zeros: z = 0 0 Re{z}
z = 0 −0
The finite difference equation: p2 = e− j0

M N
y (n) =  bk x ( n − k ) −  ak y ( n − k ) M
 bk z −k
k =0 k =1
B( z )
H (z) = = k =0
b0 = 0, b1 = sin 0 A( z ) N

a0 = 1, a1 = −2cos 0 , a2 = 1
1+  ak z − k
k =1

y (n) = sin ( 0 ) x(n − 1) + 2cos ( 0 ) y (n − 1) − y (n − 2) 2


Example: Digital Oscillator
y (n) = sin ( 0 ) x(n − 1) + 2cos ( 0 ) y (n − 1) − y (n − 2)
 1, n = 1
x(n − 1) = (n − 1) =  x(n)=δ(n) y(n)=h(n)
0, in rest h(n)
Causal system, y(n)=0, n<0
n=0 y (0) = sin ( 0 ) (−1) + 2cos ( 0 ) y (−1) − y (−2) = 0

n=1 y (1) = sin ( 0 ) (0) + 2cos ( 0 ) y (0) − y (−1) = sin ( 0 )

n≥2 y (n) = 2cos ( 0 ) y (n − 1) − y (n − 2)

y (2) = 2cos ( 0 ) y (1) − y (0) = 2cos ( 0 ) sin ( 0 ) = sin ( 20 )


y (3) = 2cos 0 y (2) − y (1) = 2cos 0 ( 2cos 0 sin 0 ) − sin 0 =
= sin 0 ( 4cos 2 0 − 1) = 3sin 0 − 4sin 2 0 = sin ( 30 )
3
Example: Digital Oscillator

For n≥2: y (n) = 2cos ( 0 ) y (n − 1) − y (n − 2)


Let us prove by induction that, if it is true that :
y (n) = sin ( n0 )
then also: y (n + 1) = sin ( ( n + 1) 0 )

y (n + 1) = 2cos ( 0 ) sin ( n0 ) − sin ( (n − 1)0 )

2sin ( a ) cos ( b ) = sin ( a + b ) + sin ( a − b )

2sin ( n0 ) cos ( 0 ) = sin ( (n + 1)0 ) + sin ( ( n − 1)0 )

y (n + 1) = sin ( (n + 1)0 )

4
DIGITAL SIGNAL PROCESSING
Discrete signals and systems

1. The Dirac impulse is defined by:


1, 𝑛=0
𝛿(𝑛) = {
0, 𝑟𝑒𝑠𝑡
1, 𝑛=2
𝛿(𝑛 − 2) = {
0, 𝑟𝑒𝑠𝑡
and a delayed impulse
1, 𝑛=𝑘
𝛿(𝑛 − 𝑘) = {
0, 𝑟𝑒𝑠𝑡
The unit step is defined as:
1, 𝑛≥0
𝑢(𝑛) = {
0, 𝑛<0
1, 𝑛≥𝑘
𝑢(𝑛 − 𝑘) = {
0, 𝑛<𝑘
Let’s illustrate the gate signal (or the window signal):
𝑢(𝑛) − 𝑢(𝑛 − 3) = 𝛿(𝑛) + 𝛿(𝑛 − 1) + 𝛿(𝑛 − 2)
2. Compute the Z transform for the following signals:
𝒵{𝛿(𝑛)} = 1
𝒵{𝛿(𝑛 − 𝑘)} = 𝒵{𝛿(𝑛)} ∙ 𝑧 −𝑘 = 𝑧 −𝑘
∞ ∞
−𝑛
1
𝒵{𝑢(𝑛)} = ∑ 𝑢(𝑛) ∙ 𝑧 = ∑ 1 ∙ 𝑧 −𝑛 = , |𝑧 −1 | < 1 ↔ |𝑧| > 1, 𝑧∈ℂ
1 − 𝑧 −1
𝑛=−∞ 𝑛=0

Notice that:
𝑁−1
1 − 𝑎𝑁 (1 − 𝑎)(1 + 𝑎 + 𝑎2 +. . . +𝑎𝑁−1 )
𝑛
∑𝑎 = =
1−𝑎 1−𝑎
𝑛=0


1 − 𝑎∞ 1
∑ 𝑎𝑛 = = 𝑤𝑖𝑡ℎ 𝑡ℎ𝑒 𝑐𝑜𝑛𝑣𝑒𝑟𝑔𝑒𝑛𝑐𝑒 𝑐𝑜𝑛𝑑𝑖𝑡𝑖𝑜𝑛 |𝑎| < 1 ⇒ 𝑎∞ → 0
1−𝑎 1−𝑎
𝑛=0

3. Compute the Z transform for the signal:


x(n) = 𝑢(𝑛) − 𝑢(𝑛 − 3) = 𝛿(𝑛) + 𝛿(𝑛 − 1) + 𝛿(𝑛 − 2)
1 𝑧 −3 1 − 𝑧 −3
𝒵{𝑥(𝑛)} = 𝒵{𝑢(𝑛)} − 𝒵{𝑢(𝑛 − 3)} = − = = 1 + 𝑧 −1 + 𝑧 −2
1 − 𝑧 −1 1 − 𝑧 −1 1 − 𝑧 −1
since 1 − 𝑧 −3 = (1 − 𝑧 −1 )(1 + 𝑧 −1 + 𝑧 −2 )
DIGITAL SIGNAL PROCESSING
Discrete signals and systems
4. Compute the DTFT for the following signals:
a) 𝑢(𝑛)
b) 𝑢(𝑛) − 𝑢(𝑛 − 𝑁)
c) 𝛿(𝑛)
Solution:
a) By applying the definition:

∞ ∞
𝑗𝜔 −𝑗𝑛𝜔
1
𝑋(𝑒 ) = ∑ 𝑢(𝑛) 𝑒 = ∑ 𝑒 −𝑗𝑛𝜔 =
1 − 𝑒 −𝑗𝜔
𝑛=−∞ 𝑛=0

b) Using the delay theorem:


1 − 𝑒 𝑗𝑁𝜔
𝑋(𝑒 𝑗𝜔 ) = 𝑈(𝑒 𝑗𝜔 )(1 − 𝑒 𝑗𝑁𝜔 ) = =
1 − 𝑒 −𝑗𝜔
𝑗𝑁𝜔 𝑗𝑁𝜔 𝑗𝑁𝜔
𝑒− 2 (𝑒

2 −𝑒 2 ) 𝑁
𝑁−1 𝑠𝑖𝑛 ( 𝜔)
= =𝑒 −𝑗
2
𝜔 2
𝑗𝜔 𝑗𝜔 𝑗𝜔 1
𝑒 − 2 (𝑒 − 2 − 𝑒 2 ) 𝑠𝑖𝑛 (2 𝜔)

c)

𝑗𝜔
𝑋(𝑒 ) = ∑ 𝛿(𝑛)𝑒 −𝑗𝑛𝜔 = 1
𝑛=−∞

5. Let 𝑥(𝑛) = 𝑠𝑖𝑛(𝜔0 𝑛), where 𝐹0 = 1𝑘𝐻𝑧, 𝐹𝑠 = 3𝑘𝐻𝑧. Compute the DFT of 𝑥(𝑛) in 𝑁 = 12 points
and draw the amplitude spectrum obtained.
𝐹0 2𝜋
𝜔0 = 2𝜋 =
𝐹𝑠 3
The DFT of the input signal 𝑥(𝑛) is given by:
𝑁−1
2𝜋
𝑋(𝑘) = 𝐷𝐹𝑇{𝑥(𝑛)} = ∑ 𝑠𝑖𝑛(𝜔0 𝑛) ∙ 𝑒 −𝑗 𝑁 𝑘𝑛 , 𝑤ℎ𝑒𝑟𝑒 𝑘 = 0,1, . . . , 𝑁 − 1
𝑛=0

Considering that:
𝑒 𝑗𝜔0 𝑛 − 𝑒 −𝑗𝜔0 𝑛
𝑠𝑖𝑛(𝜔0 𝑛) =
2𝑗
the previous relation becomes:
𝑁−1 𝑁−1
2𝜋 2𝜋
1 −𝑗 𝑘𝑛 1 −𝑗 𝑘𝑛
𝑋(𝑘) = ∑ 𝑒 𝑗𝜔0 𝑛 ∙ 𝑒 𝑒 𝑁 − ∑ 𝑒 −𝑗𝜔0 𝑛 ∙ 𝑒 𝑒 𝑁
2𝑗 2𝑗
𝑛=0 𝑛=0

Let’s compute separately, the first sum (in blue color) and the 2nd sum (in red):
DIGITAL SIGNAL PROCESSING
Discrete signals and systems
𝑁−1 𝑁−1 𝑁−1
1 2𝜋
𝑗(𝜔 − 𝑘)𝑛 1 2𝜋 2𝜋
𝑗( − 𝑘)𝑛 1 𝑁−3𝑘
𝑠𝑢𝑚1 = ∑ 𝑒 0 𝑁 = ∑𝑒 3 𝑁 = ∑ 𝑒 2𝜋𝑗 3𝑁 𝑛
2𝑗 2𝑗 2𝑗
𝑛=0 𝑛=0 𝑛=0
𝑁−3𝑘 4−𝑘
It is easier to denote 𝑏 = 3𝑁
and knowing that 𝑁 = 12, we will have 𝑏 = 12
. The first sum is

then:
𝑁−1 4−𝑘
1 2𝜋𝑗𝑏𝑛
1 1 − 𝑒 2𝜋𝑗𝑏𝑁 1 1 − 𝑒 2𝜋𝑗 12 12
𝑠𝑢𝑚1 = ∑ 𝑒 = ∙ = ∙ 4−𝑘
2𝑗 2𝑗 1 − 𝑒 2𝜋𝑗𝑏 2𝑗
𝑛=0 1 − 𝑒 2𝜋𝑗 12
0 , 𝑓𝑜𝑟 𝑘 ≠ 4
={
𝑠𝑜𝑚𝑒𝑡ℎ𝑖𝑛𝑔 ?, 𝑓𝑜𝑟 𝑘 = 4
For the term 𝑒 2𝜋𝑗 (4−𝑘) =? = 1, because (4 − 𝑘) ∈ ℤ and I am actually going along the unity circle
several times, a multiple of 2𝜋.
11
1 12 𝑁
𝑠𝑢𝑚1 |𝑘=4 = ∑ 𝑒 2𝜋𝑗 0 𝑛 = =
2𝑗 2𝑗 2𝑗
𝑘=0
0, for k ≠ 4
So, 𝑠𝑢𝑚1 = { N .
2j
, for k = 4

The second sum (in red color) is:


𝑁−1 𝑁−1
1 2𝜋 1 −𝑁−3𝑘 1 1 − 𝑒 2𝜋𝑗 (−4−𝑘)
𝑠𝑢𝑚2 = ∑ 𝑒 −𝑗𝜔0 𝑛 ∙ 𝑒 −𝑗 𝑁 𝑘𝑛 = ∑ 𝑒 2𝜋𝑗 3𝑁 𝑛 = ∙ −4−𝑘
2𝑗 2𝑗 2𝑗 2𝜋𝑗 ( )
𝑛=0 𝑛=0 1−𝑒 12

0, 𝑘≠8
𝑠𝑢𝑚2 = { 𝑁
, 𝑘=8
2𝑗
A situation of un-determination could be generated by 𝑘 = −4, but the values for k are positive: 0,
1, …, N-1. For 𝑘 = 8, we will reach 𝑒 −2𝜋𝑗 = 1.
The DFT is then given by:
0, 𝑓𝑜𝑟 𝑘 ≠ 4, 8
𝑁
, 𝑓𝑜𝑟 𝑘 = 4
𝑋(𝑘) = 𝑠𝑢𝑚1 − 𝑠𝑢𝑚2 = 2𝑗
𝑁
− , 𝑓𝑜𝑟 𝑘 = 8
{ 2𝑗
Obviously 𝑋(𝑘) ∈ ℂ. In order to represent the amplitude spectrum, we will compute the absolute
value:
DIGITAL SIGNAL PROCESSING
Discrete signals and systems
0, 𝑓𝑜𝑟 𝑘 ≠ 4, 8
𝑁
|𝑋(𝑘)| = , 𝑓𝑜𝑟 𝑘 = 4
2
𝑁
{+ 2 , 𝑓𝑜𝑟 𝑘 = 8

What is the frequency value corresponding to a bin of k = 4 or 8 in the previous amplitude spectrum?

2𝜋
𝜔𝑘 = 𝑘
𝑁

2𝜋 2𝜋 𝜔4
𝜔4 = 4= ⇒ 𝐹[𝐻𝑧] = ∙ 𝐹 = 1 𝑘𝐻𝑧
12 3 2𝜋 𝑠

2𝜋 4𝜋
𝜔8 = 8=
12 3

6. Compute the impulse response function for the following filters:


a) an ideal LPF with the cutoff frequency 𝑓𝑐 = 𝑓0;
b) an ideal HPF with the cutoff frequency 𝑓𝑐 = 𝑓0 ;
c) an ideal BPF with the pass band between 𝑓1 and 𝑓2;
d) an ideal SBF with the stop band between 𝑓1 and 𝑓2;

Solution:

a) An ideal analog LPF is described by the transfer function:


1, |𝜔| ≤ 𝜔0
𝐻𝐿𝑃𝐹 (𝜔) = {
0, |𝜔| > 𝜔0
In discrete time and for a period, the transfer function is:
1, |𝜔| ∈ [0; 𝜔0 ]
𝐻𝐿𝑃𝐹 (𝑒 𝑗𝜔 ) = {
0, |𝜔| ∈ [𝜔0 ; 𝜋]
DIGITAL SIGNAL PROCESSING
Discrete signals and systems
By applying the inverse Fourier transform:
2𝜋
1
ℎ𝐿𝑃𝐹 (𝑛) = ∫ 𝐻𝐿𝑃𝐹 (𝑒 𝑗𝜔 ) 𝑒 𝑗𝑛𝜔 𝑑𝜔
2𝜋
0

and so
1 𝜔 1 1 𝜔0
ℎ𝐿𝑃𝐹 (𝑛) = 2𝜋 ∫−𝜔0 𝑒 𝑗𝑛𝜔 𝑑𝜔 = 2𝜋 𝑗𝑛 (𝑒 𝑗𝑛𝜔0 − 𝑒 −𝑗𝑛𝜔0 ) = 𝑛𝜋 𝑠𝑖𝑛(𝑛𝜔0 ) = 𝜋
𝑠𝑖𝑛𝑐(𝑛𝜔0 ).
0

b) Notice that :
𝐻𝐻𝑃𝐹 (𝑒 𝑗𝜔 ) = 1 − 𝐻𝐿𝑃𝐹 (𝑒 𝑗𝜔 )

which in time corresponds to:

𝜔0
ℎ𝐻𝑃𝐹 (𝑛) = 𝛿(𝑛) − ℎ𝐿𝑃𝐹 (𝑛) = 𝛿(𝑛) − 𝑠𝑖𝑛𝑐(𝑛𝜔0 )
𝜋

c) Observe that:

𝐻𝐵𝑃𝐹 (𝑒 𝑗𝜔 ) = 𝐻𝐿𝑃𝐹 (𝑒 𝑗(𝜔−𝜔𝑝 ) ) + 𝐻𝐿𝑃𝐹 (𝑒 𝑗(𝜔+𝜔𝑝 ) )


𝜔1 +𝜔2 𝜔2 −𝜔1
using the notation 𝜔𝑝 = 2
and 𝜔𝑜 = 2
and the modulation theorem

ℎ𝐵𝑃𝐹 (𝑛) = 2ℎ𝐿𝑃𝐹 (𝑛) 𝑐𝑜𝑠(𝑛𝜔𝑝 )


we will obtain
𝜔2 − 𝜔1 𝜔2 − 𝜔1 𝜔1 + 𝜔2
ℎ𝐵𝑃𝐹 (𝑛) = 𝑠𝑖𝑛𝑐 (𝑛 ) 𝑐𝑜𝑠 (𝑛 )
2𝜋 2 2
d)

𝐻𝑆𝐵𝐹 (𝑒 𝑗𝜔 ) = 1 − 𝐻𝐵𝑃𝐹 (𝑒 𝑗𝜔 )

And so

𝜔2 − 𝜔1 𝜔2 − 𝜔1 𝜔1 + 𝜔2
ℎ𝑆𝐵𝐹 (𝑛) = 𝛿(𝑛) − ℎ𝐵𝑃𝐹 (𝑛) = 𝛿(𝑛) − 𝑠𝑖𝑛𝑐 (𝑛 ) 𝑐𝑜𝑠 (𝑛 )
2𝜋 2 2
,d,,,,,GUM 1 tJ>vi'j""'c.R , / a-i'\ (. i, =) )z-\ > a.,

� Xfc) -z f x(II)) -i� - f.. ;_�' -i� ±_ o-"'. i�


z + f
V)ZO
a_ n_ � � :z

� te a>v, "c!™ct COMJ.,j,;,,.,., : / - / a � >- 0 C"') Ia. cf < � %) 1-d < �


CV1L&_: 1-)cx i•/ '70 (-:1 !Qi'l < 1 �) l-cl > Cl
c.;.,,;..,_,_,, x ( "') U> aw..,,,J, 1 rm iwJl --t,.1,-t ➔ -ft � ~� 1/\ ;-a

:c,-,+' Joe,;, J � F �Jp -tt._


r
?C/ d,.,,h_ 0--, '2f ;,,�,u,1,:m
J
'¥.le � to_\/( � z rw,ik,,,, H,_, fk -2, e <t a,,,)_ !c:.2 .,_C, .

�o-1U DR-,j_J I{ f;' o..u.d. .!c-2. o.M iJ.u. �j �- J_p CI .

�� � �:

--,,,c<1l z - ' { X rc·l,. i7�


r
X r-iJ t'Jc 1<� {XI i). 1"
1 ]{
--

rr
z �
J c., k,-2k.�Jmtt -2�

f o't °' i,;_,rf) J � heJ,tJ.u ¼ ;

lk1\xC�) 2•-
1
1/ Jk. z -&m f(j-12k)XfiJ.:l,-,7.
,2 -) l k l' J

Qe2: {xr:i)t-•�1.z� � a_
z ;_,;,,, �).
r -> °'--
c"''. r"
Cy6)C �---b)
'vVu� � 4Jicm !
X (l) z l{x(V\) j 2 L
'i>"'

nzo

A
� l>fW C'.<W1 �eh � � �"""""
,-a·'t-_,
�� � }a_.:[' I< i &) l �l >-[�(

(,-o i�·(t-t> i)

tv,;J£_ & CPv> � t{' du.,,_<¼,_ � -,,,,if/M.eJr �


1 /h Z w-,..d,
� D -z { iec } r-2l > lb I j
:fa.z! ,f,-..,;,. ,.0
r
\
"'-""M.U!Wl.A
� PbS: - FiR, �

,-- r��,)
�H:t) z_ t � . � (i)
�i 1 H Ii) · [,- tt ()
rrw.21.
H(i'): 0- �i�)
fnm �
1 Ak t.� r�
=O (<>) lz -2,-1 => c}�


Jw,,Jf�
�(r\ -
�v{ �
� 1 roe lw bl©
--- mdl. I ,u,e

o1t
'F-f1c � � P;�,
""°'� _ f--1'e rt= I

f� OOY) !Jot k mu"� -r �


G,°j-� �� : b{w) z - J�/U) 2 eqj,.,.:;I;
0 Jw
/

(i- Ct �') ( I - c; i 1} z � + ti 2

ri -, ,. 1\(
\\ - c, � ) \ - (c-/) 'i, J + 4 · 22
iE �
1
2 {

(t- ?:z 'f') ( \ - c: i') 2 1- {i. !2:_, + i?


'2

1
1--H c) , H \ - ·t) ( 1 + 0, 2 s- . i � )( 1 t 4 - f2 ) ( , - re - ; + /-)

-2D 11 <.?
/.j(e_j ,)/ z - c,,, (=) 1-J (e iVfi,) • 0

N•I 2 ';/- (,l �J ? I? ( = P...n.!-- 1 "--1:ir I, F{R..)


7� eumJJ� : 2:. °' +- J·· b r - ei �
:::
2-

-r � �'l+ b '" �- / 2:-[

0 Tl._� ceA- :i:lic. � J.,.·M.(.A,r r (JM,_l £


-L
= r;---rrr I
H (i) �?
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications

1. Design a linear phase BPF using the window method and a rectangular window, having the
following parameters: 1st cut-off frequency 𝐹1 = 3 𝑘𝐻𝑧 , 2nd cut-off frequency 𝐹2 = 6 𝑘𝐻𝑧 and
sampling frequency 𝐹𝑠 = 24 𝑘𝐻𝑧. The filter’s length is 𝑁 = 17 and the impulse response function
is anti-symmetrical. What type of linear-phase FIR filter can be used?

Solution:

BPFs can be implemented in any of the 4 types of linear phase FIR filters. The odd length 𝑁 = 17
is possible in types 1 and 3. An anti-symmetrical impulse response is present for types 3 and 4.
Our BPF is then a type 3 linear phase FIR filter.

The normalized angular frequencies corresponding to the cut-off frequencies are:


𝐹1 𝜋 𝐹2 𝜋
𝜔1 = 2𝜋 = , 𝜔2 = 2𝜋 =
𝐹𝑠 4 𝐹𝑠 2
The zero-phase function 𝐻0 (𝜔), for a type 3, is an odd function with a 𝜋 anti-symmetry.

𝐻0 (𝜔)

−𝜔2 −𝜔1 𝜔
−𝜋 0 𝜔1 𝜔2 𝜋 2𝜋 3𝜋

The desired zero phase function, assessed from −𝜋 up to 𝜋 is:


1, 𝜔1 < 𝜔 < 𝜔2
𝐻𝑑0 (𝜔) = {−1, −𝜔2 < 𝜔 < −𝜔1
0, 𝑟𝑒𝑠𝑡
The linear phase term in a type 3 filter is:
𝜋 𝑁−1
𝜃(𝜔) = − 𝜔
2 2
The desired transfer characteristic is:
𝜋 𝑁−1 𝑁−1
𝐻𝑑 (𝑒 𝑗𝜔 ) = 𝐻𝑑0 (𝜔) ∙ 𝑒 𝑗𝜃(𝜔) = 𝐻𝑑0 (𝜔) ∙ 𝑒 𝑗 2 ∙ 𝑒 −𝑗 2
𝜔
= 𝑗𝐻𝑑0 (𝜔)𝑒 −𝑗 2
𝜔

The reverse discrete-time Fourier transform will result then in the desired impulse response
function:
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
𝜋
1
ℎ𝑑 (𝑛) = ∫ 𝐻𝑑 (𝑒 𝑗𝜔 ) 𝑒 𝑗𝑛𝜔 𝑑𝜔 =
2𝜋
−𝜋
−𝜔1 𝜔2
1 𝑁−1 1 𝑁−1
= ∫ (−𝑗) 𝑒 −𝑗 2 𝜔 𝑒 𝑗𝑛𝜔 𝑑𝜔 + ∫ 𝑗 𝑒 −𝑗 2 𝜔 𝑒 𝑗𝑛𝜔 𝑑𝜔 =
2𝜋 2𝜋
−𝜔2 𝜔1

−𝜔2 𝜔2
1 𝑗(𝑛−
𝑁−1
)𝜔 𝑗 𝑗(𝑛−
𝑁−1
)𝜔
= ∫ 𝑗𝑒 2 𝑑𝜔 + ∫ 𝑒 2 𝑑𝜔
2𝜋 2𝜋
−𝜔1 𝜔1

𝑁−1
By denoting with 𝑝 = 𝑛 − :
2

1 −𝜔2 𝜔2
ℎ𝑑 (𝑛) = ∙ [𝑒 𝑗𝑝𝜔 |−𝜔 + 𝑒 𝑗𝑝𝜔 |𝜔 ] =
2𝜋𝑝 1 1

1
= ∙ [𝑒 −𝑗𝑝𝜔2 − 𝑒 −𝑗𝑝𝜔1 + 𝑒 𝑗𝑝𝜔2 − 𝑒 𝑗𝑝𝜔1 ] =
2𝜋𝑝
1
= ∙ [cos(𝑝𝜔2 ) − cos(𝑝𝜔1 )]
𝜋𝑝
The general formula for the desired impulse response function in types 3 and 4 is then:

1 𝑁−1 𝑁−1
ℎ𝑑 (𝑛) = ∙ [cos ((𝑛 − ) 𝜔2 ) − cos ((𝑛 − ) 𝜔1 )] , 𝑛 ∈ ℤ
𝑁−1 2 2
𝜋 (𝑛 − 2 )

Our real impulse response function, ℎ(𝑛), is obtained by multiplying ℎ𝑑 (𝑛) with a rectangular window:

ℎ (𝑛), 𝑛 = ̅̅̅̅̅̅̅̅̅̅
0, 𝑁 − 1
ℎ(𝑛) = ℎ𝑑 (𝑛) ∙ 𝑤𝑟 (𝑛) = { 𝑑
0, 𝑟𝑒𝑠𝑡

2. Compute the symmetric impulse response function ℎ(𝑛) of a HPF – FIR filter with a linear phase
characteristic, length 𝑁 = 19, using a rectangular window. The cut-off frequency is 𝐹𝑡 = 8 𝑘𝐻𝑧
and the sampling frequency is 𝐹𝑠 = 24 𝑘𝐻𝑧.

Solution:

The only possible type for a symmetrical ℎ(𝑛) with an odd length is type 1.
The normalized angular frequency corresponding to the cut-off frequency is:
𝐹𝑡 2𝜋
𝜔𝑡 = 2𝜋 =
𝐹𝑠 3
The linear-phase component for a type 1 FIR filter is:
𝑁−1
𝜃(𝜔) = − 𝜔
2
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
𝐻𝑑0 (𝜔)

𝜔
−𝜋 −𝜔𝑡 0 𝜔𝑡 𝜋 2𝜋 − 𝜔𝑡 2𝜋 2𝜋 + 𝜔𝑡 3𝜋

The desired zero phase function, assessed from −𝜋 up to 𝜋 is:


1, |𝜔| > 𝜔𝑡
𝐻𝑑0 (𝜔) = {
0, 𝑟𝑒𝑠𝑡
while the corresponding desired transfer function:
𝑁−1
𝐻𝑑 (𝑒 𝑗𝜔 ) = 𝐻𝑑0 (𝜔) ∙ 𝑒 𝑗𝜃(𝜔) = 𝐻𝑑0 (𝜔) ∙ 𝑒 −𝑗 2
𝜔

The reverse discrete-time Fourier transform is then used to obtain the desired impulse response function:
𝜋
1
ℎ𝑑 (𝑛) = ∫ 𝐻𝑑 (𝑒 𝑗𝜔 ) 𝑒 𝑗𝑛𝜔 𝑑𝜔 =
2𝜋
−𝜋
−𝜔𝑡 𝜋
1 𝑗(𝑛−
𝑁−1
)𝜔 1 𝑗(𝑛−
𝑁−1
)𝜔
= ∫ 𝑒 2 𝑑𝜔 + ∫ 𝑒 2 𝑑𝜔
2𝜋 2𝜋
−𝜋 𝜔𝑡

𝑁−1
The last formula can be simplified with the following notation 𝑝 = 𝑛 − :
2

1 −𝜔 𝜋
ℎ𝑑 (𝑛) = ∙ [𝑒 𝑗𝑝𝜔 | 𝑡 + 𝑒 𝑗𝑝𝜔 |𝜔 ] =
2𝜋𝑗𝑝 −𝜋 𝑡

1
= ∙ [𝑒 −𝑗𝑝𝜔𝑡 − 𝑒 −𝑗𝑝𝜋 + 𝑒 𝑗𝑝𝜋 − 𝑒 𝑗𝑝𝜔𝑡 ] =
2𝜋𝑗𝑝
1
= ∙ [sin(𝑝𝜋) − sin(𝑝𝜔𝑡 )] =
𝜋𝑝
𝜔𝑡
= 𝑠𝑖𝑛𝑐(𝑝𝜋) − 𝑠𝑖𝑛𝑐(𝑝𝜔𝑡 )
𝜋
𝑁−1 𝜔𝑡 𝑁−1
ℎ𝑑 (𝑛) = 𝑠𝑖𝑛𝑐 ((𝑛 − ) 𝜋) − 𝑠𝑖𝑛𝑐 ((𝑛 − ) 𝜔𝑡 ) , 𝑛∈ℤ
2 𝜋 2

The real impulse response function, ℎ(𝑛), is obtained by multiplying ℎ𝑑 (𝑛) with a rectangular window:

ℎ (𝑛), 𝑛 = ̅̅̅̅̅̅̅̅̅̅
0, 𝑁 − 1
ℎ(𝑛) = ℎ𝑑 (𝑛) ∙ 𝑤𝑟 (𝑛) = { 𝑑
0, 𝑟𝑒𝑠𝑡
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
3. Design a LPF with real coefficients, having a linear phase, and using the frequency characteristic
sampling method. The cutoff frequency is 8 𝑘𝐻𝑧 , sampling rate of 24 𝑘𝐻𝑧 and the length is 16.
What type of linear phase FIR filter can be used?

Solution:

The low-pass filters having an even length (𝑁 = 16) can be implemented only in a type 2
configuration. The general cases of low-pass characteristics can be designed only in types 1 and
2. The types 3 and 4 have a mandatory zero in 𝜔 = 0 , which makes impossible a band pass for
low frequencies (band pass for low frequencies implies an amplitude of at least 1 in the transfer
function, in contradiction with the zero for 𝜔 = 0 that demands a rejection).
The normalized cutoff frequency is:
𝐹𝑐 8 1
𝑓𝑐 = = =
𝐹𝑠 24 3
while the corresponding normalized angular frequency:
2𝜋
𝜔𝑐 = 2𝜋𝑓𝑐 =
3
In a type 2 linear phase FIR filter, the zero-phase function 𝐻0 (𝜔) is an even function with a 𝜋
antisymmetric characteristic:

𝐻𝑑0 (𝜔)

2𝜋−𝜔𝑐 2𝜋+𝜔𝑐 𝜔
−𝜋 −𝜔𝑐 0 𝜔𝑐 𝜋 2𝜋 3𝜋

−1

For 𝜔 ∈ [0,2𝜋] we have then the desired zero-phase function:


1 , 𝜔 ∈ [0, 𝜔𝑐 ]
𝐻𝑑0 (𝜔) = {−1 , 𝜔 ∈ [2𝜋 − 𝜔𝑐 , 2𝜋]
0 , 𝑟𝑒𝑠𝑡
The linear phase term for a type 2 FIR filter is:
𝑁−1
𝜃(𝜔) = − 𝜔 = −7.5𝜔
2
and so, the desired transfer function is:
𝐻𝑑 (𝑒 𝑗𝜔 ) = 𝐻𝑑0 (𝜔) ∙ 𝑒 𝑗 𝜃(𝜔)
2𝜋
We will impose for N samples of equally spaced frequencies 𝜔𝑘 = 𝑘 in the interval [0,2𝜋] that
𝑁
the desired characteristic is equal to the designed filter:
𝐻(𝑒 𝑗𝜔𝑘 ) = 𝐻𝑑 (𝑒 𝑗𝜔𝑘 ), 𝑘 = 0, … , 𝑁 − 1
It is necessary to compute the value of the index 𝑘 corresponding to the cutoff angular frequency:
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
2𝜋 2𝜋 𝑁 16
𝜔𝑐 = = 𝑘1 ⇒ 𝑘1 = = = 5,3
3 𝑁 3 3
2𝜋 2𝑁
2𝜋 − 𝜔𝑐 = 𝑘2 ⇒ 𝑘2 = = 10,6
𝑁 3
The desired zero-phase function points will then be:

1 , 𝑘 = ̅̅̅̅
0,5
𝐻0 (𝑘) = { −1 , ̅̅̅̅̅̅̅
𝑘 = 11,15
0 , 𝑟𝑒𝑠𝑡 𝑜𝑓 𝑘 𝑣𝑎𝑙𝑢𝑒𝑠

𝐻0 (𝑘)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 𝑘
−𝜋 −𝜔𝑐 0 𝜔𝑐 𝜋 2𝜋 3𝜋

−1

The desired characteristic for the set of N equally spaced frequencies becomes:
2𝜋
𝑒 −𝑗7,5∙ 16 ∙𝑘 , 𝑘 = ̅̅̅̅
0,5
𝐻𝑑 (𝑒 𝑗𝜔𝑘 ) = 𝐻0 (𝑘) ∙ 𝑒 𝑗∙𝜃(𝜔) = { −𝑗7,5∙2𝜋∙𝑘
−𝑒 16 , 𝑘 = ̅̅̅̅̅̅̅
11,15
0 , 𝑟𝑒𝑠𝑡
Our designed FIR filter will have the impulse response function computed as a reverse Discrete Fourier
Transform:
𝑁−1
1 2𝜋
ℎ(𝑛) = ∑ 𝐻(𝑘) ∙ 𝑒 𝑗𝑛 𝑁 𝑘
𝑁
𝑘=0

with 𝐻(𝑘) equal with the desired 𝐻𝑑 (𝑒 𝑗𝜔𝑘 ).


5 15
1 2𝜋 2𝜋 1 2𝜋 2𝜋
ℎ(𝑛) = ∑ 𝑒 −𝑗7,5∙ 16 ∙𝑘 ∙ 𝑒 𝑗𝑛 16 𝑘 − ∑ 𝑒 −𝑗7,5∙ 16 ∙𝑘 ∙ 𝑒 𝑗𝑛 16 𝑘 =
16 16
𝑘=0 𝑘=11

For the last summation term written in blue, a change of variable can simplify that term: instead of k, it
will be used 16 − 𝑘 ( 𝑘 → 𝑁 − 𝑘).
5 5
1 1 2𝜋 2𝜋 1 2𝜋 2𝜋
(16−𝑘)
ℎ(𝑛) = + ∑ 𝑒 −𝑗7,5∙16 ∙𝑘 ∙ 𝑒 𝑗𝑛 16 𝑘 − ∑ 𝑒 −𝑗7,5∙ 16 ∙(16−𝑘) ∙ 𝑒 𝑗𝑛 16 =
16 16 16
𝑘=1 𝑘=1
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
5 5
1 1 2𝜋 2𝜋 1 2𝜋 2𝜋
= + ∑ 𝑒 −𝑗7,5∙ 16 ∙𝑘 ∙ 𝑒 𝑗𝑛 16 𝑘 + ∑ 𝑒 +𝑗7,5∙16 ∙𝑘 ∙ 𝑒 −𝑗𝑛 16 𝑘
16 16 16
𝑘=1 𝑘=1

By conveniently grouping the complex exponentials, the designed filter has the symmetrical
impulse response of a type 2 linear-phase FIR:
5
1 1 2𝜋
ℎ(𝑛) = + ∑ cos ((7,5 − 𝑛)𝑘 )
16 8 16
𝑘=1

4. Design a HPF with real coefficients, having a linear phase, and using the frequency characteristic
sampling method. The cutoff frequency is 8 𝑘𝐻𝑧 , sampling rate of 24 𝑘𝐻𝑧 and the length is 19.
What type of linear phase FIR filter can be used? Represent the designed filter coefficients and
the frequency response.

Solution:

The frequency sampling method enforces the condition:


2𝜋
𝐻(𝑒 𝑗𝜔𝑘 ) = 𝐻𝑑 (𝑒 𝑗𝜔𝑘 ), 𝜔𝑘 = 𝑘, 𝑘 = 0, … , 𝑁 − 1
𝑁
The desired transfer function is:
𝑁−1
𝑗 (𝛽− 𝜔)
𝐻𝑑 (𝑒 𝑗𝜔 ) = 𝐻𝑑0 (𝜔) ∙ 𝑒 2

The normalized cutoff frequency is:


𝐹𝑐 8 1
𝑓𝑐 = = =
𝐹𝑠 24 3
while the corresponding normalized angular frequency:
2𝜋
𝜔𝑐 = 2𝜋𝑓𝑐 =
3
For an odd length (𝑁 = 19) the high-pass filter can be designed only in a type 1 linear-phase FIR filter. In
this case 𝛽 = 0, and the zero-phase function is even. For the interval [0,2𝜋) the zero-phase function is:
0, 𝜔 < 𝜔𝑐 𝑎𝑛𝑑 2𝜋 − 𝜔𝑐 < 𝜔 < 2𝜋
𝐻𝑑0 (𝜔) = {
1, 𝜔𝑐 ≤ 𝜔 ≤ 2𝜋 − 𝜔𝑐
It is necessary to compute the order 𝑘 that corresponds to the frequencies:
2𝜋 2𝜋 𝑁
𝜔𝑐 = = 𝑘, 𝑘= = 6,33
3 𝑁 3
4𝜋 2𝜋 2𝑁
2𝜋 − 𝜔𝑐 = = 𝑘, 𝑘= = 12,66
3 𝑁 3
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications
The resulting zero-phase characteristic (sampled) of the filter is:
0, 𝑘 = 0, … ,6 𝑎𝑛𝑑 𝑘 = 13, … ,18
𝐻0 (𝑘) = {
1, 𝑘 = 7, … ,12

Figure 4. The zero-phase function for the frequency characteristic sampling method

The transfer function, in the Discrete Fourier Transform domain, of the digital filter with linear-phase
characteristic is:
𝑁−1 2𝜋 𝑘 𝑘
𝐻(𝑘) = 𝐻0 (𝑘)𝑒 −𝑗 2 𝑁
𝑘
= 𝐻0 (𝑘)𝑒 −𝑗𝜋𝑘+𝑗𝑁𝜋 = (−1)𝑘 𝐻0 (𝑘) 𝑒 𝑗𝑁𝜋
The impulse response coefficients will be computed with the Inverse Discrete Fourier Transform:
𝑁−1
1 2𝜋
ℎ(𝑛) = 𝐼𝐷𝐹𝑇{𝐻(𝑘)}(𝑛) = ∑ 𝐻(𝑘) ∙ 𝑒 𝑗𝑛 𝑁 𝑘
𝑁
𝑘=0
𝑁−1 𝑁−1
1 𝜋 2𝜋 1 1 2𝜋
𝑗𝑘(𝑛+ )
ℎ(𝑛) = ∑(−1)𝑘 𝐻0 (𝑘) 𝑒 𝑗𝑁𝑘 𝑒 𝑗 𝑁 𝑘𝑛 = ∑ (−1)𝑘 𝐻0 (𝑘) 𝑒 2 𝑁
𝑁 𝑁
𝑘=0 𝑘=0

Let it be denoted 𝑁 = 2𝑝 + 1
𝑝 2𝑝
1 1 2𝜋
𝑗𝑘(𝑛+ )
1 2𝜋
𝑗𝑘(𝑛+ )
ℎ(𝑛) = [𝐻0 (0) + ∑(−1)𝑘 𝐻0 (𝑘)𝑒 2 𝑁 + ∑ (−1)𝑘 𝐻0 (𝑘)𝑒 2 𝑁]
𝑁
𝑘=1 𝑘=𝑝+1

In the second sum we will change the variable 𝑙 = 𝑁 − 𝑘 ( with 𝑁 = 2𝑝 + 1 )


𝑁−2𝑝 𝑝
1 2𝜋 1 1 2𝜋
𝑗(𝑛+ ) (𝑁−𝑙) 𝑗 2𝜋(𝑛+ ) −𝑗(𝑛+ ) 𝑙
∑ (−1)𝑁−𝑙 𝐻0 (𝑁 − 𝑙)𝑒 2 𝑁 = ∑(−1)2𝑝+1−𝑙 𝐻0 (𝑁 − 𝑙)𝑒 2 𝑒 2 𝑁
𝑙=𝑁−𝑝−1 𝑙=1
DIGITAL SIGNAL PROCESSING
Linear phase FIR filters applications

Taking into consideration that:


1
𝐻0 (𝑁 − 𝑙) = 𝐻0 (𝑙), (−1)2𝑝+1−𝑙 = −(−1)𝑙 𝑎𝑛𝑑 𝑒 𝑗2𝜋(𝑛+2) = 𝑒 𝑗𝜋 = −1

the result is:


𝑝 𝑝
1 1 2𝜋
𝑗𝑘(𝑛+ )
1 2𝜋
−𝑗𝑘(𝑛+ )
ℎ(𝑛) = [𝐻0 (0) + ∑(−1)𝑘 𝐻0 (𝑘)𝑒 2 𝑁 + ∑(−1)𝑘 𝐻0 (𝑘)𝑒 2 𝑁]
𝑁
𝑘=1 𝑘=1

𝑝
1 2𝜋 1
ℎ(𝑛) = [𝐻0 (0) + 2 ∑(−1)𝑘 𝐻0 (𝑘) 𝑐𝑜𝑠 ( (𝑛 + ) 𝑘)]
𝑁 𝑁 2
𝑘=1

By replacing the values of 𝐻0 (𝑘) it results:


9
2 2𝜋 1
ℎ(𝑛) = ∑(−1)𝑘 𝑐𝑜𝑠 ( (𝑛 + ) 𝑘)
19 19 2
𝑘=7
@ Gnr,� Af.t -r u.) ::fu.
oorJ1i.i.,.-t, eMt/llt 2 r -p,{<

�, �I"' rts w cf!,n>, t.d � uair!f �de,,


�(>fl�

Fc. 1 d i �t: ) fa i. .,_ (,/, /Jt 1 1j ,_ %, ft1r, . 0�,,._ � � � �


I\W,,/¼w � � <l, nut ..A r ,,,;,,. du-..r .
a
°') �s � Nz A(; ) .f./�) /4 d�-�
/,) �\ � N • 1+ , -fJv,) ;.;, Mi,-t"""' d.,·c--£
1.0Ll' t�-� 'FIR � 1F � k . ,_,1?

0
0 I/
If
<D �
-t
1 .. ?f .t Q) i,,, 1 t � zS,S

211-W,_
\,
Nt--r:- 'Yf

t 1i'fb z ;!'.
V
t2 z) {2. < � do,C
1.

-" - -- - - - - --

-T

You might also like