Вы находитесь на странице: 1из 0

Downloaded from www.bhawesh.com.

np

DIGITAL SIGNAL PROCESSING


BEG 433 EC
.Year: IV
Teaching Schedule
Hours/Week
Theory
Tutorial Practical
3
3/2

Semester: II
Examination Scheme
Internal Assessment
Theory Practical*
20
25

Final
Theory
Practical**
80
-

Total
125

* Continuous
** Duration: 3 hours
Course objectives: To provide
1.

Discrete signals
5
1.1
Discrete signals unit impulse, unit step, ex ponential sequences
1.2
Linearity, shift invariance, causality
1.3
Convolution summation and discrete systems, response to discrete inputs
1.4
Stability sum and convergence of power series
1.5
Sampling continuous signals spectral properties of sampled signals

2.

The discrete Fourier transforms


2.1
The discrete Fourier transform (DFT) derivation
2.2
Properties of the DFT, DFT of non-periodic data
2.3
Introduction of the fast fourier transform (FFT)
2.4
Power spectral density using DFT/FFT algorithms

3.

Z transform
8
3.1
Definition of Z transform one sided and two sided transforms
3.2
Region of convergence relationship to causality
3.3
Inverse Z transform by long division, by par tial fraction expansion.
3.4
Z transform properties delay advance, convol ution, Parsevals theorem
3.5
Z transforn transfer function H (Z) transient and steady state
sinusoidal response pole zero relationships, stability
3.6
General form of the linear, shift invariant constant coefficient
difference equation
3.7
Z transform of difference equation.

4.

Frequency response
4.1
Steady state sinusoidal frequency response derived directly from the
difference equation
4.2
Pole zero diagrams and frequency response
4.3
Design of a notch filter from the pole zero diagram.

5.

Discrete filters
6
5.1
Discrete filters structures, second order sections ladder filters frequency response
5.2
Digital filters finite precision implementations of discrete filters
5.3
Scaling and noise in digital filters, finite quantized signals quantization error
linear models.

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 1

Downloaded from www.bhawesh.com.np

6.HR Filter Design


7
6.1
Classical filter design using polynomial approximations Butterworth Chebishev
6.2
HR filter design by transformation matched Z transform impulse, invariant transform
and bilinear transformation
6.3
Application of the bilinear transformation to HR low pass discrete filter design
6.4
Spectral transformations, high pass, band pass and notch filters.
7.

FIR Filter Design


3
7.1
FIR filter design by fourier approximation the complex fourier series
7.2
Gibbs phenomena in FIR filter design approximations, applications of window
Functions to frequency response smoothing rectangular hanning Hamming and
Kaiser windows.
7.3
FIR filter design by the frequency sampling method
7.4
FIR filter design using the Remez exchange algorithm

8.

Digital filter Implementation


8.1
Implementations using special purpose DSP processors, the Texas Instruments TMS320.
8.2
Bit serial arithmetic distributed arithmetic implementations, pipelined implementations

Laboratory:
1. Introduction to digital signals sampling properties, aliasing, simple digital notch filter behaviour
2. Response of a recursive (HR) digital filter comparison to ideal unit sample and frequency
response coefficient quantization effects.
3. Scaling dynamic range and noise behaviour of a recursive digital filter, observation of
nonlinear finite precision effects.

Downloaded from www.bhawesh.com.np/ -2

Downloaded from www.bhawesh.com.np

Digital Signal processing:Application:1) Speech recognition.


2) Telecommunication.
Digital Signal processing over analog signal processing:
1) Accuracy.
2) Offline processing.
3) Software control.
4) Cheaper than analog counterpart.
Basic element of D.S.P system:Analog
input signal

A/D
Converter

Digital
signal
processing

Digital
input signal

D/A
Converter
Analog
output signal
Digital
output signal

Fig: Block diagram of DSP


-

Most of the signal encountering science and engineering are analog in nature i.e the signals are
function of continuous variable substance in usually take on value in a continuous range.
To perform the signal processing digitally, there is need for interface between the analog signal and
digital processor. This interface is called analog to digital converter. The o/p of A/D converter is
digital signal i.e appropriate as an i/p to the digital processor.
Digital signal processor may be a large programmable digital computer or small microprocessor
program to perform the desired operation on i/p signal.
It may a also be a hardwired digital processor configure to perform a specified set of operation on
the i/p signal.
Programming machine provide the flexibility to change the signal processing operation through a
change in software whereas hardwired m/c are difficult to reconfigure.
In application where the distance o/p from digital signal processor is to be given to the user in analog
form, we must provide another interface on the digital domain into analog domain. Such an interface
is called D/A converter.

Advantage of Digital over analog signal processing:1. A Digital programmable system allows flexibility in reconfiguring the digital signal processing
operation simply by changing the program. Reconfiguration of analog system usually implies
redesign of hardware followed by testing and verification to see that if operates properly.
2. Digital system provide much better control of accuracy requirements.
3. Digital system are easily stored on magnetic media without loss of signal beyond that
introduce in A/D conversion. As a consequence, the signals become transportable and can be
processed offline in a remote laboratory.
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 3

Downloaded from www.bhawesh.com.np


4. Digital signal processing method also allows for the implementation of more sophisticated.
5. In some cases a digital implementation of signal processing system is cheaper than its analog counter
part.
* Signal:
It is defined as any physical quantity which is a function of one or more independent variable and
contains some information.
In electrical sense, the signal can be voltage or current. The voltage or current is a function of time
as an independent variable.
The independent variable in the mathematical representation of a signal may be either continues or
discrete.
Continues time signals are defined analog continues times. Contineous time signals are often
referred to as analog signals.
Discrete time signals are defined as certain time instant. Digital
signals are those for which both time and amplitude discrete.
Discrete- time signals or sequence:D.T.S are re. mathematically as a sequence of numbers. A sequence of numbers x in which
th
the n no in the sequence is denoted by x(n) and written as:
x = { x(n)}
- infinity < n < infinity
Figure:

unit sample or unit impulse sequence:


It is denoted by (n) and defined as:
0
n0
(n) =

n=1

n -2 -1 1 2

* Unit step sequence:


It is denoted by U(n) and is defined as:
U(n) = 1 , n 0
= 0, n<0

U(n) = (n) + (n-1) + (n-2)+

Downloaded from www.bhawesh.com.np/ -4

Downloaded from www.bhawesh.com.np

= (n k )
0

U(n) =

(k )
k =

i.e the value of unit step sequence at time n is equal to the accumulated sum of value at index n and all
prvious value of impulse sequence.
Conversely the impulse sequence can be expressed as the first backward difference of unit step
sequences.
i.e. (n) = u(n) u(n-1)
* Unit ramp sequence:It is denoted by ur(n) and defined as
ur(n) = n n 0
=0 n<0
4
3
2

* Exponential Sequence:n
The exponential signal is a sequence of the form x(n) = a for all n.
If the parameter a is real, then x(n) is real signal. Fig illustrate x(n) for various values of parameter
a.

a>1
0<a<1
n

a< 1

Fig: Graphical representation of Exponential signals.


0 < a < 1:
Eg a =
n
i.e (1/2) = 0, , , 1/8 (exponential decreasing)
(see figure (i))
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 5

Downloaded from www.bhawesh.com.np

a > 1,
E.g , a = 2
n
i.e (2) = 1,2, 4, 8 (Exponential
increasing) (See figure (ii))
-1 < a <0
Eg.: -1/2
n
i.e (-1/2) = 1, -1/2, , -1/8
(See fig (iii) )
a <-1
E.g a = -2
n
(-2) = 1, -2, 4, 8 (See figure(iv) )
Exponential sequence:When the parameter a is complex values , it can be expressed as:
j
a = re
Where r and are new parameters. Hence, we can express x(n) as:
n j
X(n) = r e
n
= r (cos n + jsin n)
Since, x(n) is now complex values, it can represented graphically by plotting the real part,
n
xe(n) = r cos n as a function of n and separately plotting the imaginary part.
xi(n) = rsin n as a function of
n. Fig. illustrates the graphs fo
Xe(n) and xi (n) .

Downloaded from www.bhawesh.com.np/ -6

Downloaded from www.bhawesh.com.np


We observe that the signals xe(n) and xi(n) are damaged (decaying exponentially, i.e r <r ) cosine
function and damped sine function.
If r =1 , the damping disappears and xe(n) , xi(n) and x(n) have fixed amplitude which is unity.
Alternatively, the signal x(n) can be represented graphically by the amplitude function.
n
|x(n)| = A(n) = r
And phase function
x(n) = (n) = n
Representation of discrete-time signal: 1) Functional representation:E.g x(n) = 1 , for n = 1,3
= 4, for n = 2
= 0 elsewhere,
2) Tabular representation:
n
x(n)

----- 2 -1
----- 0 0

0 1 2 3 4
0 1 4 1 0

3) Sequence representation:
X(n) = { 0 , 0, 1, 4, 1, 0, .} Infinite durat
ion .
X(n) = { 0, 1, 4, 1) finite duration (4- point sequence)
4) Graphical representation:Figure:
Date: 2066/05/23

Linearity: A system is called liner of superposition principal applies to that system. This means that the
liner system may be defined as one whose response to the sum of weighted inputs is same as the sum of
weighted response.
Let us consider a system. If x1(n) is the input and y1(n) is the output. Similarly y2(n) is the response to
x2(n) . Then for liner system.
a1 x1 (n) + a1 x2 (n) a1 y1 (n) + a2 y2 (n) ..(1)
For any nonlinear system the principle of superposition doesnot hold true and equation (i) is
not satisfied.
Numerical:
For the following system, determine whether the system is liner or not.
(1) y(n) = 2x(n) +3
Solution:
y1(n) = 2x1(n)+3
y2(n) = 2x2(n)+3
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 7

Downloaded from www.bhawesh.com.np


Applying superposition principle
suppose, x(n) = a1x1(n)+a2x2(n)
Then,
y3(n) = 2[a1x1(n)+a2x2(n)]+3
= 2a1x1(n)+ 2a2x2(n)+3
y4(n) = a1y1(n)+ a2y2(n)
= a1 [2x1(n)+3]+ a2[2x2(n)+3]
= = 2x1(n)a1 +2a2x2(n)+3a1+3a2

Since,
y3 (n) y4 (n) . The system is nonlinear.
2

(ii) y(n) = x (n)


Solution:
2

y1 (n) = x1 (n)
2

y2 (n) = x2 (n)

Applying input such that,


x(n) = a1x1(n)+a2x 2(n)
The response will be, y3(n)
2
= [a1x1(n)+a2x2(n)] and
again,
y4(n) = a1y1(n)+a2y2(n)
2
2
= a1 x1 (n) + a2 y2 (n)
y3 (n) y4 (n) The system is nonlinear.

Shift invariance:A system is shift invariant, if the input output relationship doesnot vary with shift. In other words for a
shift invariant system shift in the input signal results in corresponding shift in output. Mathematically,
x(n) y(n)
Which means that y(n) is the response for x(n). If x(n) is shifted by n0, then output y(n) will also
be shifted by same shift n0 i.e
x(n n0 ) y(n n0 )
Where n0 is an integer.
If the system doesnot satisfy above expression, then the system is called shift variant system.
The system shifting both linearly and time invariant properties are popularly known as liner time
invariant system or simply LTI systems.
Numerical:
Check whether the system are shift invariant or not.
(i) y(n) = x 2 (n)
Solution:
Let us shift in input by n0, then the output will be,
Downloaded from www.bhawesh.com.np/ -8

Downloaded from www.bhawesh.com.np


2

y1 (n) = x (n n0 )
y1 (n) = y(n n0 )

Hence the system is shift invariant system.


(ii) y(n) = x(mn)
Let us shift in input by n0 then, response will
be, y1(n) = x(mn n 0)
and the shift in output by n0 will
yields. y(n n0 ) = x[mn mn0 ]
The system is shift variant.
Causality:A system is causal of the response does not begin before the input function is applied. This means that of
input is applied at n= n0 , then for causal system output will depend on values of input x(n) for n n0 .
Mathematically,
y(n0 ) = T[ x(n), n n0 ]
..(i)
The response of causal system to an input doesnot depend on future values of that input but depends
only on present or past values of input.
On the other hands, of the response of the system to an input depends on future values of the input,
the system is noncausal. A non causal system doesnot satisfy equation (i).
Causal system are physically realizable whereas non causal system cannot be implemented practically.
There is no system possible practically which can produce its output before input is applied.
The equation,
y(n) = x(n 1) describes the causal system and
y(n) = x(n) x(n +1) describe the non causal system.

Memory less system:A system is referred to as memory less if the o/p y(n) at every value of n depends only on the i/p x(n) at
the same value of n.

Date: 2066/05/25
* Response of LTI system to Arbitrary input convolution solution:Consider any arbitrary discrete time signal x[n] as shown in fig:

n
-1

A discrete time sequence signal be represented by a sequence of individual impulses as shown in figure:
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 9

Downloaded from www.bhawesh.com.np


x(0)(n)

x(1)(n-1)

-1
-2

1
0

-1

We can write,
X(n) = +x(-1)

(n+1) +x(0) (n) +x(1) (n-1) +x(2) (n-2) + ..

x(k ) (n k )

..........(i) (convolution sum)

k =

Suppose h(n) is the o/p of LTI system when (n) is i/p. Therfore, the o/p for i/p x(-1) (n+1) is x(-1)
h(n+1). Then the o/p y(n) for the i/p x(n) given in equation (i) will be,

y(n) = x(k )h(n k )

..........(ii)

k =

Symbolically,
y(n) = x(n)* h(n) (iii)
y(n) = h(n)*x(n) .(iv)

Numericals:
* The impulse response of invalid time response is: h(n) = {1, 2, 1, -1} x(n) = {1,2,3, }
Solution:
The response of the LTI system is ,

y(n) =

x(k )h(n k )
k =

For n = 0 ,

y(0) =

x(k )h(k )
k =

Downloaded from www.bhawesh.com.np/ -10

Downloaded from www.bhawesh.com.np


3

3
2

1
k

-2

k
3
-1

x(k )h(k )
k =0

= x(0)h(0) + x(1)h(1)
=2+2=4
2

For n = -1

y(-1) =

x(k )h(1 k )
k =

2
1
1

1
n(-1-k)

-3

-2

-1

x(k)n(-1-k)

-2

For n = -2

Y(-2) =

x(k )h(2 k )
k =

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 11

Downloaded from www.bhawesh.com.np


Again testing for +ve side:
For n= 1

x(k )h(1 k )

Y(1) =

= 1+4+3 = 8

k =

3
x(k)(1-k)

-1
0

-1

For n = 2

Y(n) =

x(k )h(2 k )

= -1+2+6+1 = 8

k =

k
1

-1

k
1

2
3
x(k)h(1-k)

-1

For n = 6 = 0
Y(n) = { .0, 1, 4, 8, 8, 3,-2, -1, 0 .)
Figure:

* Determine the o/p y(n) of relaxed linear time invariant system with impulse response:
n
h(n) = a u(n) , |u| < 1
When the i/p is unit step sequence
ie; x(n) = u(n)
Solution:

y(n) =

x(k )h(n k )
k =

For n = 0 ,

y(0) =

x(k )h(k )
k =

Downloaded from www.bhawesh.com.np/ -12

Downloaded from www.bhawesh.com.np


1

a
a2
1

1
a
a2

h(-k)

a3
-3

-2
-1

For n =1:

y(1) =

x(k )h(1 k ) =1+a


n=

1
a

a
a2

x(k)h(1-k)

h(1-k)

a2
-101

k
0

For n = 2:

y(2) =

x(n)h(2 n) = 1+a+a

S = a(1 r

x(k)h(2-k)

n
= 1a
1a

1 r
For n > 0
2
y(n) = 1+a + .+a

k =

a2

For n < 0
y(n) = 0
y( ) = lim n y(n) = lim n 1 a
1a
1
= 1a

n+1

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 13

Downloaded from www.bhawesh.com.np


y(n)
1
1-a

2
1+a+a

1+a
k

* Interconnection of LTI system:h1(n)

h2(n)

h1(n)*h2(n)

y(n)

y(n)

When two LTI systems with impulse response h1(n) and h2(n) are in cascade form the overall impulse
response for the cascaded 2 impulse system will be,
h(n) = h1(n) * h2(n) (i)
* The parallel combinations of LTI systems and equivalent system is shown below:
h1(n)
x(n)

y(n)
h2(n)

h1(n)+h2(n)

y(n)

Determine the impulse response for the cascade of two LTI systems having impulse responses.
n
h1(n) = (1/2) u(n)
n
h2(n) = (1/u) u(n)
Solution:The overall impulse response is
h(u) = h1(n)* h2(n)

h1 (k )h2 (n k )

k =

1/2

1/4

h1(k)
1/4

h2(k)
1/6

Downloaded from www.bhawesh.com.np/ -14

Downloaded from www.bhawesh.com.np


h2(-k)
1

h(n-k)
1

1/4

1/4
n>0

1/6

1/6
k

= (1/ 2)

(1/ 4)nk

k =0

= (1/4)
= (1/4)

n
n

(1/ 2) k (1/ 4)k

k =0

(2)k
2

n
= (1/4)

n+1

2 1

n n+1
= (1/4) (2 -1)
n

= (1/2) [ 2 (1/2) ] , n

Note:- If we have L LTI system is cascade with im pulse responses h1(n) and h2(n) .h L(n) ,
the
impulse response of equivalent LTI system is
h(n) = h1(n) * h2(n)*h3(n) ..*h
L(n)
Discrete system response to discrete input:jwn
For a discrete-time system, consider as input sequence x(n) = e , for - <n<
system with impulse response h(n) is,

the output of LTI

y(n) =

h(k ) x(n k )
k =

h(k )e jw( nk )

k =

= e jwn

h(k )e

If we define,
jw

H|e | =

jwk

k =

h(k )e jwk
k =

jw jwn

Then, y(n) = H|e | e


jw

H|e | describes the change in complex amplitude of complex exponential as a function of frequency
jw
w. H(e ) is called frequency response of the system.
jw
In general H(e ) is complex and can be expressed in terms of its real and imaginary parts
jw
jw
jw
as: H (e ) = HR (e )+j H I (e )
Or , In terms of magnitude and phase as,
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 15

Downloaded from www.bhawesh.com.np


jw

jw

H(e ) = |H(e )|e

j H(ejw)

Let,

x(n) = Acos(won +)
= A/2 ejwon.ej +A/2 e-jwon. e-j The
j jwon

response to x1(n) = A/2 e e

jw

is,

j jwon

y1(n) = H(e ) A/2 e e


-j -jwon
The response to x2(n) = A/2e e
-jw
-j
jwon
is , y2(n) = H(e ) A/2 e . eThus, total response is ,
jwo -j jwon
-jwo -j
+H(e
)e .
y(n) = A/2 [H(e )e . e
-jwon
-jwo
e
] = A |H(e
)| cos(won++ ).
Where,

H(e

jwo

)
Date: 2066/05/31

Stability: We defined arbitrary relaxed system as BIBO stable. If an only if o/p sequence y(n) is
bounded for every bounded i/p x(n).
If x(n) is bounded their exist a constant Mx such that,
x(n) M x <
Similarly if o/p is bounded their exists a constant My such
that y(n) M y < for all n,
Now given such a bounded input sequence x(n) to LTI system with convolution formula.

y(n) = h(k )x(n k )


k =

h(k )x(n k )

k =

h(k ) x(n k )
k =

Mx

h(k )

k =

From this expression we observe that the system is bounded if the impulse response of the system
satisfied condition,

Sn = h(k ) <
k =

That is linear time invariant system is stable if its impulse response is absolutely summable.
# Determine the range of value of the parameter a for LTI system with impulse response.
n
h(n) = a u(n) is stable.
Solution,

Downloaded from www.bhawesh.com.np/ -16

Downloaded from www.bhawesh.com.np

Sn = h(k ) <
k =

h (k ) = ak

k =0

k =0

= 1 + a + a + a + .............
1
Provided that a < 1
=
aa
Therefore the sytem is stable if a < 1 otherwise it is unstable.
# Determien range of value of a,b for which LTI system with impulse response.
n
h(n) = a
n0
=b
S =
n

n < 0 is stable.

h(k ) = bk + ak
k =

k =

k =0

The first sum coverage for a < 1 . The second sum can be manipulated as,

k =

k =1

1
k
b

= 1 + 1 + 13 + ..............
b2 b
b
=1 1+
b

1 + 1 + ..........
b 2 b3

= 1 + + 2 + 3 + ...........
= (1/1 ) Provided that , < 1 or b > 1
Hence the system is stable is both a < 1 or b > 1
Date: 2066/07/23
# Determine whether the given system is BIBO stable or not.
y (n) = 1/3 [ x(n) +x(n-1) +x (n-2)]
Solution:Assume that,
|x(n)| < Mn < for all n.

BIBO =
Bounded input
bounded output.

Then | y(n)| = 1/3 [ x(n) +x(n-1) +x (n-2)]


1/3 [ |x(n)| +|x(n-1)| +|x (n-2)|]
1/3 [ Mx + Mx + Mx ]
Mx
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 17

Downloaded from www.bhawesh.com.np


Since, Mx is finite value , |y(n)| also finite. Hence the system is BIBO stable.
# # Determine whether the given system is BIBO stable or not.
n
Y(n) = r x(n) where r>1.
Solution:
Assume
n
y(n) = r x(n)
=r

x(n)
n

With r >1, the multiplying factor r diverges for increasing n and he=nce o/p not bounded. Hence
the system is BIBO unstable.
Nyquist Sampling theorem:A signal whose spectrum is band limited to B Hz (G(w) = 0 for |w| > 2 B ) can be reconstructed
exactly form its samples taken uniformly at the rate R > 2BHz (sample/sec) . In other words,
minimum sampling frequency fs = 2Bhz.
Consider a signal g(t) whose spectrum is band limited to Bhz. Sampling g(t) at the rate of fs hz can
be accomplished by multiplying g(t) by impulse Ts (t) consisting of unit impulses repeating
periodically every Ts second. Where, Ts = 1/fs
Figure;

Trigonometric fourier series of impulse train,


Ts (t) = 1 [1 + cos ws t + 2 cos 2ws t + 2 cos 3ws t + .............]
Where, Ws = 2 /Ts
Ts
g (t) = g (t)Ts (t)
=

[g (t) + 2g (t) cos ws t + 2g (t) cos 2ws t + 2g(t) cos 3ws t + ......]

Ts
Using modulation property,
2g(t) coswst
G (w) =
=

1
T

(F.T) G(w-ws)+G(w+ws)

[G(w) + G(w ws ) + G(w + ws ) + .......]

Ts

G(w nws )
s n=

If we want to reconstruct g(t) from g(t) bar we should be able to recovered G(w) form G (w) . This is
possible if there is no overlap between successive cycle of G (w). Figure (e) shows that this requires
fs greater then 2B.
Downloaded from www.bhawesh.com.np/ -18

Downloaded from www.bhawesh.com.np


From figure we see that g(t) can be recovered form sample g (t) by passing sampled signal through
ideal low pass filter with bandwidth B hz.

Date:2066/7/26
Sampling of analog signals:
There are many ways to sample analog signal. We limit our discussion to periodic or uniform sampling
which is he types of sampling used most often in topic in practice . This is described by the relation.
X(n) = xa(nT), - < n <
Where x(n) is discrete-time signal obtained by talking samples of analog signal xn(t) every T
second. T = sampling period or sample interval.
Fs = 1/T = damping frequency or sampling rate (sample/sec or
Hz) t = nT = n/Fs
In general the smapling of continuous time sinusoidal signal
xa (t) = A cos(2f 0 t + )
With sampling rate f s =
x(n) = A cos(2ft + )
Where, f =

f0

results discrete time signal.

= Relative frequency of sinusoid. f s

Q. Consider the analog signal xa(t) = 3cos100 t


a) Determine the minimum sapling rate require to avoid aliasing.
b) Suppose that the signal is sampled at the rate Fs= 200 hz What is the discrete time signal
obtained after sampling.
c) Suppose that the signal is sample at the rate Fs= 75 hz what is the discrete time signal obtained
after sampling.
d) What is the frequency 0< f< Fs/2 of a sinusoids that yields samples identical to those obtained in part
c.
Solution:Xk(t) = 3cos100 t
2 f0 = 100
F0 = 50 hz
b) Mininum sampling rate = 100 hz
c) Fs= 200 hz
d) Fs = 75 hz
X(n) = 3cos(100 n/fs) = 3cos(100 n/75) = 3cos(4 n3)
= 3cos2 (2/3)n
=3cos2 (1 -1/3)n
= 3cos2 (1/3)n
e) Fs = 75 hz , f= 1/3
f = F0/Fs , F0 = f Fs = 25 hz
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 19

Downloaded from www.bhawesh.com.np


y(t) = 3cos50 t
Q. Consider the analog signal at xa(t) = 3cos50 t + 10sin300 t-cos100 t. What is the Nequest
rate for this signal.
Solution: Frequency present in the signal,
F1 = 25hz, F2 = 150 hz , F3 = 50
hz Fmax = 150 hz
Nyquest rate = 2Fmax = 300 hz.
Q. Consider the analog signal at xa(t) = 3cos 2000t+5sin6000 t+10cos2000 t.
a) What is the Nyquest rate for the signal.
b) Assume now that we sample the signal using sampling rate Fs = 5000 samples per second. What
is the discrete time signal obtained after sapling.
Solution:
a) F1 = 1khz F2 = 3khz F3 = 6khz
Nyquest rate = 12 khz
b) Fs = 5000 hz = 5khz
x(n) = 3cos(2000 n/Fs) + 5sin(6000 n/Fs)+10cos(12000 n/Fs)
= 3cos(2 n/5) +5sin(6 n/5) + 10cos(12 n/5)
= 3cos(2 n/5)+ 5sin2 (3/5)n+10cos2 (6/5)n
=3cos(2 n/5)+ 5sin2 (12/5)n+10cos2
(1+1/5)n =3cos(2 n/5)- 5sin2 (2/5)n+10cos2
(1/5)n =13cos(2 n/5)-5sin2 (2/5)n

Date: 2066/07/26
Chapter:- 2
Discrete Fourier transform:Frequency domain sampling: Discrete Fourier transform. (DFT)
Let us consider aperiodic discrete-time signal x(n) with Fourier transform

X (w) = x(n)e

jwn

.(i)

n=

Suppose that we sample X(w) periodically in frequency at a spacing of (w) radian between the
successive samples. Since X(w) is periodic with period 2 only samples in the fundamental frequency
range are necessary. We take N equidistant sample in the interval 0 <= w <=2 . With sample spacing
w = 2 /N

Fig: Freq. domain sampling.


Downloaded from www.bhawesh.com.np/ -20

Downloaded from www.bhawesh.com.np

If we evaluate, equation (i) we get,


W = 2 /N. K, k = 0 to N-1
2k
j 2kn / N

= x(n)e

N n=
Summing in equation (2) can be subdivided into infinite number of summations where each
sum contains N terms Thus,
X

2k

= ...... + x(n)e

N 1

j 2kn / N

n=0

2 N 1

j 2kn / N

+ x(n)e

n=N

3 N 1

j 2kn / N

+ x(n)e

+ .......

n=2 N

lN +N 1

x(n)e j 2kn / N

l =

n=ln

If we change the index in the inner summation form n to n-ln and integrating the order of summation we
obtained,
2k N 1 N 1
j 2kn / N
X

N
The signal

x(n nl) e

..(3)

n=0 n=0

Xp(n) =

x(n nl) ..(4)

l =

Obtained by period representation of x(n) every N samples is clearly period with fundamental period N.
Since xp(n) is period extension of x(n) given by equation (4) it is clear that x(n) can be
recovered from xp(n) if there is no alising in the time domain that is x(n) is limited to less than the
period N of xp(n)
x(n)
1

n
L
xp(n)
N>L

n
L

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 21

Downloaded from www.bhawesh.com.np

xp(n)
N<L
n

In summary a final duration sequence x(n) of a length L as fourier transform X (w) = x(n)e

L1

jwn
n=0

for 0 <= w <= 2 .(5)


When we sample X(w) at equal space frequency wk = 2 K/N , k = 0,1, 2
N-1 Where, N L,
The resultant sample are,
2K N 1
j 2kn / N
X (k ) = X

= x(n)e

. (6)

N n=0
Where, k = 0, 1, N-1
The relation in equation (6) is a formula for transforming sequence x(n) of length L <= N into a
sequence of frequency samples {X(k)} of length L. Since the frequency samples are obtained by
evaluating the fourier transform X(w) at a set of N equally spaced discrete frequencies. The relation
in equation (6) is called discrete fourier transform (DFT) of x(n).

Date:- 2066/7/27
xp(n) can be written as,
N 1

xp(n)= ak e j 2kn / N

n = 0, 1, N-1 .(7)

k =0

With Fourier coefficient,


N 1

ak = 1/N x p (n)e j 2kn / N k = 0, 1, ..N-1 .(8)


k =0

Form equation (3) and (8)


2k
ak = 1/N

k = 0, 1, ..N-1 .(9)

Therefore ,
N 1

xp(n) = 1/N X

2k

j 2kn / N

n = 0, 1, ..N-1 .(10)

N
This relation allows us to recover the sequence x(n) from frequency sample.
k =0

N 1

x(n) = 1/N X (k )e

j 2kn / N

n = 0, 1 .N-1 .(11)

k =0

This is called inverse DFT (IDFT) (

DFT as linear transformation:Downloaded from www.bhawesh.com.np/ -22

Downloaded from www.bhawesh.com.np


The formula for DFT and IDFT is given by
X (k ) = x(n)wNkn

, k = 0, 1 .N-1 ..(1)

1 N 1
x(n) = X (k )wNkn

n = 0, 1, .N-1 ..(2)

k =0

-j2 /N

Where WN = e
.(3)
Let us define N-point vector xN of signal sequence x(n) , n = 0, 1, N-1 and N-p oint vector Xn of
frequency samples and N*n matrix WN as
x(0)
x N=

X (0)
XN =

x(1)

X (1)

WN =

WN
2
. WN N

1W

x(n 1)

X (N

1)

N 1

WN

WN

WN

WN2( N 1)

WN2( N 1) WN( N 1)( N 1)

With there definition N-point DFT may be expressed in matrix


XN = WN xN ..(4)
Where, WN = matrix of liner transformation.
-1
-1
Equation (4) can be inverted by per multiplying both side by WN . Thus we can obtained xN = wN XN
..(5)
Which is expression for IDFT
x
xN = 1/N WN XN ..(6)
*
Where, WN = complex conjugate of matrix
-1
*
WN WN = WN /N ..(7)
Q. Compute DFT of 4-point sequence x(n) = { 0, 1, 2, 3}
Solution:N 1

X (k ) = x(n)e

j 2kn / N

n=0
3

X (k ) = x(n)e

jkn / 2

n=0
3

X (0) = x(n)e = x(0) + x(1) + x(2) + x(3) = 6


0

n=0
3

X (1) = x(n)e

j n / 2

n=0

= x(0) + x(1)e

j / 2

+ x(2)e j + x(3)e j 3 / 2 = 6

X(2) = -2
X(3) = -2.4
By matrix method,
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 23

Downloaded from www.bhawesh.com.np


1 1
1 j
W4 =
1 1
j

1
1

j
X (0)

xN =

X4 =
2

(1)
(2)

3
X (3)
X4 =W4 * x4
1
1
1
1
0
1 j
1 j
1
=1
*
2
1 1
1
3
1j
1 j
0+1+2+3
6
0

j2+3j =

2+

1 + 2

0+j23j

2j

2j

Q. Compute IDFT for the frequency component X(k) = { 60, 0, -4, 0}


Solution:*
xN =( WN /N ) XN
60

x4 =( W4 /4) X4
1
1
11
1 j 1j

0
X4 =

W4

x4 =( W4 /4) X4
1
1
1
1 j 1
= 1
1 1

1
j

1 j

1j

160
j0
1 4

j 0

Downloaded from www.bhawesh.com.np/ -24

Downloaded from www.bhawesh.com.np


60 4
60 + 4
=

56

64

16

60

14
=

56

60 + 4

14

64

16

Properties of DFT:The notation used to denote N-point DFT pair x(n) and X(k) as x(n)
1) Periodicity:
If x(n) DFT X(k)
Where, x(n+N) = x(n) for all n.
X(k+N) = X(k) for all k.

DFT X(k)

Proof:
x(n+N) = 1/N X (k )e
N 1

= 1/N X (k )e

j 2k ( n+ N ) / N

j 2kn / N

j 2k

K =0

= x(n)
N 1

X(k+N) = n(k )e

j 2k ( k + N ) / N

n=0
N 1

X (k )e j 2kn / N e j 2n
n=0

=X(k)

2) Linearity: If x1(n)DFTX1(k)
and
x2(n)DFTX2(k)
Then, for any real or complex valued constants a1 and a2
x(n) = a1x1(n) +a2x2(n)DFTX(k) = a1X1(k)+a2X2(k)
Proof:N 1

a1x1(n) +a2x2(n)DFTa1 x1 (n) + a2 x2 (n) e


N 1

= a1 x1 (n)e

j 2kn / N

n=0

N 1

j 2kn / N

n=0

+ a2 x2 (n) e j 2kn / N
n=0

= a1X1(k) +a2X2(k)
Date:2066/08/01
Circular Symmetries of sequence:
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 25

Downloaded from www.bhawesh.com.np


N-point DFT of finite duration sequence x(n) of length L N is equivalent to N-point DFT of
periodic sequence x p (n) of period N which is obtained by periodically extending x(n) i.e

x p (n) = x(n lN )
l =

x p (n) = x(n k ) = x(n k lN )


l =

Finite duration sequence,


x(n) = xp(n) 0<= n<=N-1
= 0 otherwise
Is related to original sequence by x(n) by circular shift. This relationship is shown graphically
as follows.
This relationship is shown in figure
x(n)

-4 -3 -2 -1 0

3 4

xp(n-2)

-6

-5

-4

-3

-2

-1
4

x(n)

2
1

Downloaded from www.bhawesh.com.np/ -26

Downloaded from www.bhawesh.com.np


x(1)=2

x(2)=3

x(n)

x(1)=4

x(0)=0

x(2)=1

x(3)=4

x(n)

x(0)=3

x(3)=2

In general the circular shift of the sequence is represented as index modulo N. i.e x(n) = x((n-k))N
For example,
K = 2, N = 4
That implies,
x(0) = x((-2)) 4
x(1) = x((-1)) 4
x(2) = x((0)) 4
x(3) = x((1)) 4

Hence x(n) is shifted circularly by 2 units in time. where the counter clock wise direction is selected as
the +ve direction. Thus we conclude that circular shift of N- point sequence is equivalent to linear shift
of its period extension and vise versa.

Symmetry properties of DFT:Let us assume that N-point sequence x(n) and its DFT are both complex valued. Then the sequence can
be respresented as
0 <= n<=N-1 ..(1)
x(n) = xR(n)+jxI(n)
X(k) = X R(k)+jXI(k)
0<=k<=N-1 ..(2)
N 1

X(k) = = x(n)e j 2n / N

k = 0, 1, N-1

n=0
N 1

( xR (n) + jxI (n))(cos 2kn / N j sin 2kn / N )

n=0
N 1

N 1

n=0

n=0

( xR (n) cos 2kn / N + xI (n) sin 2kn / N ) j(xR (n) sin 2kn / N xI (n) cos 2kn / N )

= XR(k)+jXI(k)
N 1

XR(k) = = ( xR (n) cos 2kn / N + xI (n) sin 2kn / N ) ..(3)


n=0
N 1

XI(k) = ( xR (n) sin 2kn / N xI (n) cos 2kn / N ) (4)


n=0

Similary,

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 27

Downloaded from www.bhawesh.com.np


N 1

xR(n) = 1/N ( X R (k ) cos 2kn / N X I (k ) sin 2kn / N ) (5)


k =0
N 1

xI(n) = 1/N ( X R (k ) sin 2kn / N + X I (k ) cos 2kn / N ) .(6)


k =0

1) Real valued signal:If x(n) is real,


X(N-k) = X*(k) = X(-k)
Proof:N 1

X(N-k) = x(n)e

j 2 ( N k ) n / N

n=0
N 1

= x(n)e j 2n / N e j 2n
n=0

=X(-k) = X*(k)
2) Real and even sequence:x(n) = x(N-n)
Than, XI(0) = , DFT reduces to
N 1

X(k) = x(n) cos 2kn / N

0<= k<=N-1

n=0

IDFT Reduces to ,
N 1

x(n) = 1/N X (k ) cos 2kn / N

0<=n<=N-1

k =0

3) Real and odd sequence:If x(n) = x(N-n) 0<=n<=N-1


Than, XR(k) = 0, DFT reduces to ,
N 1

X(k) = -j x(n) sin 2kn / N

, 0 <=k<= N-1

n=0

IDFT reduces to,


N 1

x(n) = j 1/N X (k ) sin 2kn / N 0 <= n<= N-1


k =0

4) Purely Imaginary sequence:x(n) = jxI(n)


N 1

XR(k) = xI (n) sin 2kn / N


n=0
N 1

XI(k) = xI (n) cos 2kn / N


n=0

If xI(n) is odd, then XI(k) = 0 and hence X(k) is purely real.


If xI(n) is even then, XR(k) = 0 and hence X(k) is purely imaginary.
Downloaded from www.bhawesh.com.np/ -28

Downloaded from www.bhawesh.com.np

Multiplication of two DFTs and circular convolution:Support we have two finite duriaotn sequences of length N, x1(n), x2(n). Their respective DFTs are,
N 1

X1(k) = x1 (n)e

j 2kn / N

k = 0, 1, N-1 ..(1)

n=0
N 1

X2(k) = x2 (n)e

j 2kn / N

k = 0, 1, .N-1 .(2)

n=0

If we multiply two DFTs together the result in DFT say X3(k) of a sequence x3(n) of length N. Let
us determine the relationship between x3(n) and the sequence x1(n) and x2(n) .
We have X3(k) = X1(k)X2(k)
N 1

x3(n) = 1/N X 3 (k )e j 2kn / m


k =0
N 1

x3(n) = 1/N X 1 (k ) X 2 (k )e j 2kn / m


k =0
N 1 N 1

= 1/N

N 1

x1 (n)e j 2kn / n x2 (l)e j 2kl / N

k =0 n=0
N 1
N 1

N 1

l =0

e j 2kn / N

l =0

k =0

= 1/N x1 (n) x2 (l) e j 2k ( m nl ) / N


n=0

Now,

N 1

a k
k =0

=N

a=1
N

= 1a , a1
aa

Where, a = ej2 (m-n-l)/N


N 1
a k = N l = m n + pN = ((m n)) N

p is int eger

k =0

= 0 , otherwise
Hence,
N 1

x3(m) = 1/N x1 (n)x2 ((m n)) N .N


N 1

x3(m) =

m = 0, 1, ..N-1

n=0

x1 (n)x2 ((m n)) N


n=0

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 29

Downloaded from www.bhawesh.com.np


The expression has the form of convolution sum. The convolution sum involves index ((m-n))N is
called circular convolution. Thus we conclude that multiplication of DFT of two sequences is
equivalent to the circular convolution of two sequences in time domain.
Q. perform the circular convolution of the following two sequences.
x1(n) = {2, 1, 2, 1}
x2(n) = { 1, 2, 3, 4}
Solution,

N 1

x3(m) = x1 (n) x2 ((m n)) N


n=0

N = 4,
3

x3(m) = x1 (n) x2 ((m n)) 4


n=0
3

x3(0) = x1 (n)x2 ((n)) 4 = 14


n=0

x1(1)=1

x1(2)=2

x2(1)=2

x (n)

x (0)=2

x (n)

x1(3)=1

x2(0)=1

x2(3)=4
4

4
x1(n)x2((-n))4=14

6
x2(-n)

2
2
3

x3(1) = x1 (n) x2 ((1 n)) 4 = 16


n=0

1
1
x1(n)x2((1-n))4=16

8
x2((1-n))4

33
3

x3(2) = x1 (n) x2 ((2 n)) 4 = 14


n=0

Downloaded from www.bhawesh.com.np/ -30

Downloaded from www.bhawesh.com.np


2
2
x1(n)x2((2-n))4=14

2
x2((2-n))4

4
3

x3(3) = x1 (n)x2 ((3 n)) 4 = 16


n=0

3
3
x1(n)x2((3-n))4=16

4
x2((3-n))4

1
1

x3(n) = { 14, 16, 14, 16}


Solution by DFT and IDFT method:
1

1
X1 =

1
X2 =

1
j

1
*

0
2

=
2

1 1 1
1
0
1 j
j
1 1
11 10
j
1j2 2 2 j

1
60
X3 =

1
1j

1 1 1 3
1 j 4

2
22j

0
IDFT:
*
x3 = (W4 /4 )* X3

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 31

Downloaded from www.bhawesh.com.np


1
1
1 j
=

1
1

160
j0

1 1

1 4

1 j 0
1j
Parsevals theorem:For complex valued sequence x(n) and
y(n) x(n) DFT X(k)
y(n) DFT Y(k)
Then,
N 1
N 1
x(n) y * (n) = 1 X (k )Y * (k )
N

n=0

k =0

Proof:N 1

x(n) y * (n) = r xy (0)

Circular cross correlation sequence.

n=0

r xy (l) =

1 N 1
N

Rxy (k )e j 2kl / N

k =0

N 1

r xy (l) = 1 X (k )Y * (k )e j 2kl / N

k =0
N 1

r xy (0) = 1 X (k )Y * (k )
N

k =0

In Special case, y(n) = x(n)


N 1

N 1

x(n) y * (n) =
n=0

x (n)
n=0

1
N

N 1

X (k ) 2

n=0

Which expresses the energy is finite duration sequence x(n) in term of frequency component {X(k)}

Date: 2066/08/04
Fast Fourier Transform (FFT):N 1

X (k ) = x(n)e
n=0

j 2k / N

The complex multiplication in direct computation of DFT is N and by FFT complex multiplication in
N
N/2 log2 . When number of points is equal to 4, the complex multiplication in direction computation
of DFT is 16 and for FFT its value is 4. Hence the increment factor is 4.

Downloaded from www.bhawesh.com.np/ -32

Downloaded from www.bhawesh.com.np


Radix-2 FFT algorithm:-

N 1

If x(n) be the discrete time sequence then its DFT is given by X (k ) = x(n)wN

kn

k = 0, 1,.N-1

n=0

Divide N-point data sequence into two N/2 data sequence f1(n) and f2(n) corresponding to the
even number and odd number samples of x(n) respectively.
f1(n) = x(2n)
f2(n) = x(2n+1) n = 0, 1, N/2-1
Thus f1(n) and f1(n) are obtained by decimating x(n) by a factor of 2 and hence the resulting FFT
algorithm is called decimation in time algorithm.
N 1

X (k ) =

N 1

+ x(n)wN

kn
x(n)wN

kn

n even

n odd

N / 21

N / 21

m=0

m=0

X (k ) = x(2m)wNk2n + x(2m + 1)wNk( 2 m+1)

But
WN2 = (e j 2 n / 2 ) = e j 2 /( n / 2) = WN / 2
2

N / 21

X (k ) = f1 (m)wN

N / 21

km
/2

m=0

X(k) = F1(k) +W

f 2 (m)wNkm/ 2

k
WN

m=0

k
n

F (k )
2

Where F1(k) and F2(k) are N/2 point DFT of sequences f1(m) and f2(m) respectively.

x(0)

F1(0)

X(0)

x(2)

F1(1)

X(1)

F1(2)

X(2)

F1(3)

X(3)

x(4)

N/2 point

DFT

x(6)

F1(0)

x(1)
x(3)
x(5)
x(7)

N/2 point
DFT

X(4)

F1(1)

X(5)

F1(2)

X(6)

F1(3)

X(7)

Having performed that DIT once, we can repeat the processor for each of sequence f1(n) and f2(n)
. Thus f1(n) would result in two N/4 point sequence.
v11(n) = f1(2n)
v12(n) = f1(2n+1) , n = 0, 1,N/41 And f2(n) would result.
v21(n) = f2(2n)
v22(n) = f2(2n+1) , n = 0, 1,
.N/4 -1 Then
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 33

Downloaded from www.bhawesh.com.np


F1(k) = v11(k)+ wN

/ 2 v12

(k )

x(0)
W

x(1)
W

W
W

W
W

x(5)
W

X(2)

2
N

6
W

X(3)

X(4)

X(1)

X(0)

4
N

x(4)

0
N

x(3)

X(5)

x(6)

X(6)
W0

W4

W6

W4

W6

W7

x(7)

X(7)
N

Fig: 8-point DIT FFT algorithm


Xm(p)

Xm+1(p)

Xm+1(q)

Xm(q)

Xm(p)

Xm+1(p)

Xm(q)

Xm+1(q)

r
WN -1

WNr+N/2

Fig: Basic butterfly computation in DIT FFT


algorithm.

Xm+1(p) = Xm(p)+WN Xm(q)


r+N/2
Xm+1(q) = Xm(p)+WN
Xm(q)
r
N/2
= Xm(p) - WN Xm(q)
[WN
= -1]
# Compute 8 point DFT for the sequence x(n) = { 1,2, 3, 4,5 ,6 } . Using DITFFT algorithm or DIF
FFT algorithm.
x(0)

X(0)

x(1)

X(1)

x(2)

X(2)

0
N

x(3)

W0

x(4)
-1

X(3)

X(4)

0
N

x(5)
-1

-1

x(6)

2
N

X(5)

X(6)

0
N

x(7 )

X(7)
-1

W3
N

Downloaded from www.bhawesh.com.np/ -34

W0
N

Downloaded from www.bhawesh.com.np

Date:2066/08/11
Q. Compute 4-point DFT for the sequence x(n) = { 14, 16,14, 16} using FFT algorithm.
28

x(0)=14
x(2)=14

28

X(0)=60
X(1)=0

WN =1

32

x(1)=16

X(2)=-4

x(3)=16

WN

X(3)=0

WN

=1

Q. Compute 4 point DFT for the sequence x(n) = { 14, 16, 14, 16 } using FFT algorithm.
28

x(0)

X(0)=60

32

x(2)

W 0

X(1)=0

x(1)
x(3)

-1
-1

W 0 =1

X(2)=-4

W1

X(3)=0

Date: 2066/08/11
Chapter: - 3
Z-transform:The z-transform of a discrete-time signal x(n) is defined as the power series.

X ( z) = x(n) z

..(1)

n=

When z is complex variable.


- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 35

Downloaded from www.bhawesh.com.np


The inverse procedure( i.e obtaining x(n) from X(z) ) is called inverse z-transform . z-tranasform of a
singal x(n) is denoted by
X(z) = Z{x(n)} .(2)
Where as the relationship between x(n) and X(z) is indicated by
x(n) z X(z) ..(3)
ROC (Region of convergence):
ROC of X(z) is the set of all values of z for which X(z) attins a finite values.
# Determine z-transform of following finite duration signals.
x1 (n) = { 1,2, 5, 7, 0, 1}

X ( z) = x(n) z
n =

-1

-2

-3

-5

= 1+2z +5z +7z +z


ROC: entire z-plane except z = 0 .
(2) x2(n) = {2,4, 5, 7, 0, 1}

X2(z) = X ( z) = x2 (n)z

= 2z + 4z 2 + 5 + 7z 1 + z 3

n=

ROC: Entire z-plane. Except z = 0 and z =


(3) x3(n) = (n)

X3(n) =

x3 (n) z n
n=

= (n)z n n=0
=1
ROC: Entire z-plane.

(4) x4(n) = (n-u) k > 0

X (z) = x4 (n)z
X4(z) =

= 2z + 4z

n=

[ (n k )z n ]nz = k
k

ROC: Entire z-plane except z = 0


(5) x5(n) = (n+k) k>0

X5(n) = X (z) = x5 (n)z

n =

= (n k )z n n=k
= z k
ROC: Entire z plane except z = 0.
ROC relationship to casusality:Downloaded from www.bhawesh.com.np/ -36

Downloaded from www.bhawesh.com.np


Let us express complex z-variable in polar form as.
j
z = re ..(1)
Where r = |z| = angle z . Then X(z) can be expressed as,

= x(n)r

X(z)|z= rej = X ( z)

j n

.(2)

n=

X
(z) <

In the ROC of X(z) .


But,

X ( z) =

x(n)r n e jn
n=

x(n)r n ..(3)
n=

Hence X (z) is finite of the sequence x(n)r n is absolutely summable.

The problem of finding ROC for x(z) is equivalent to determining the range of values of r for which the
-n
sequence x(n) r is absolutely sum able.

X ( z) x(n)r n + x(n)r n
n=

X ( z)

n=0

x(n)r

n +

n=1

n=0

x(n)
.(4)

rn

If x(z) converges in some region of complex plain both summation in equation (4) must be finite in
that region.
If the first sum in equation (4) converges their must exists values of r small enough such that the
n
product sequence x(-n) r , 1 <= n < is absolutely summable. Therefore ROC for the first sum consists
of all points in a circle of some radius r1 where r1 < as illustrated in the figure.
Im(z)

z-plane
Re(z)

Date: 2066/08/15

Now if the 2

nd

term in equation (4) converges there must exists values of r large enough such that

product sequence

x(n)

, .. hence ROC for second sum in equation (4) consi sts of all points outside a r

circle of radius r >r2 as shown in fig.


- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 37

Downloaded from www.bhawesh.com.np


Im(z)

r
Re(z)

Since the convergence of X(z) requires that both sums in equation (4) be finite it follows that ROC of
X(z) is generally specified as the annual region in the z plane r2 <r<r1 which is common region where
both sums are finite. Which is shown in figure.
Im (z)

r2

r1
Re(z)

If r2 >r1 there is no common region of convergence for the two sums and hence X(z) does not exist.
Im(z)

r2

r1
Re(z)

Numerical:
# Determine z-transform of the signal.
n
n
X(n) = u(n) = , n => 0
=0 , n<0
Solution:
Downloaded from www.bhawesh.com.np/ -38

Downloaded from www.bhawesh.com.np

X(z) =

x(n)z n
n =

n z n

n=

= (z

= 1 + (z

) + (z

+ ......

n=

1
for z
= 1
<1
1 z 1
ROC: |z| > | |
Im(z)
x(n)

r
||

Re(z)

# Determine z-transform of the signal.


n
n
X(n) = - u(-n-1) = - , n <= -1
=0 , n>0
Solution:

X(z) =

x(n)z n
n =

( n )z
n=
1

= ( l )z l
l =1

= ( l z )l = ( 1 z) + ( 1 z) 2 + .........
l =1

==

1 z
1
1
1

1 z

for z < 1

z
ROC : z <| |

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 39

Downloaded from www.bhawesh.com.np


Im(z)

x(n)

z-plane
|r|

-3 -2 -1

Re(z)

# Determine z-transform of the signal.


n
n
X(n) = u(n)+ b u(-n-1)
Solution:

X(z) =

x(n)z n
n=
1

= b n z
n=

= (b

l =1

+ n z n

n=0

z) + (z
l

n=0

-1

-1

The first power series converges if |b z| < 1 i.e |z| < |b| and second power series converges if | z | < 1
i,e |z| > | |
Case I: |b| < | |
Im(z)

z-plane

Re(z)

Case II: |b| > | |

Downloaded from www.bhawesh.com.np/ -40

Downloaded from www.bhawesh.com.np


Im(z)

z-plane
||

Re(z)

1
1
1
X ( z) = 1 bz + 1 z 1
b

+ b z bz 1
ROC: | | <|z| < |b|

Date: 2066/08/24
(1) linearity :
If , x1(n) z X1(z) ,
x2(n) z X2(z)
Then x(n) = a1x1(n)+ a2x2(n) = a1X1(z)+a1X2(z)
Proof:

X(z) =

x(n)z n

n =

(a1 x1 (n) + a2 x2 (n)) z n


n=

= a1

x1 (n)z

+ a2

n=

x2 (n) z n
n=

= a1X1(z)+a1X2(z)
# Determine z-transform and ROC of the signal
n
n
x[n] = [ 3(2 )-4(3 )]
Proof:
n
Let, x1(n) = 2 u(n)
n
x2(n) = 3 u(n)
Then,
x(n) = 3x1(n) -4x2(n)
Accordign to linearity property.
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 41

Downloaded from www.bhawesh.com.np

X(z) = 3X1(z)-4X2(z)
1
ROC: |z| > 2
1
1 2z
1
X2(z) = Z {x2(n)} =
ROC: |z| > 3
1
1 3z
X1(z) = Z {x1(n)} =

The intersection of ROC of X1(z) and X1(z) is |z| > 3.

Now
3

4
1

X(z) = 1 2z

1 3z

|z| > 3

# Determine z-transform of the signals:


(a) x(n) = (coswon) u(n)
(b) x(n) = (sinwon) u(n)
Solution:
x(n) = (coswon) u(n)
jw n jw n
=1/ 2 e 0
e 0 u(n)
1
1
(

jw n

X(z) =

Z{e

jw n
0 u(n)

u(n) +

2
2
Using linearity property.
jw0n

u(n)} +

jw0n

Z{e

u(n)}

2
1

1
1
Z{e 0 u(n)} = 1 e jw n z 1 = 1 2z
ROC: |z| > 1
jw0n
1
1
Z{e
u(n)} =
=
ROC: |z| > 1
1 e jw n z 1
1 2z 1
1
1
X(z) = 1 .
+1 .
jw n 1
2 1 e z
2 1 e jw0n z 1
1 z 1Cosw
0
= 1 2z 1 cos w + z 2 ROC: |z| > 1
jw n

jw n jw n
(b) x(n) = 1 (e 0 e 0 )u(n)
2j
1 z 1 Sinw

X(z) =

1 2z

cos w 0 + z 2 ROC: |z| > 1

(2) Time Shifting:If x(n)zX(z)


-k
Then , x(n-k)zz X(z)
Proof:

x(n-k)z x(n k )z

n=

Put n-k = m
Downloaded from www.bhawesh.com.np/ -42

Downloaded from www.bhawesh.com.np

x(m)z ( m+k )
m=

=z

x(m) z ( m)

m=

-k

= z X(z)
# By applying the time-shifting property determine z-transform of x2(n) and x3(n) form z-transform
of x1(n) given as,
5

x1(n) = { 1,2, 5,7, 0, 1} , x2(n) = {1,2, , 7, 0, 1}


x3(n) = {0,0,1,2,5,7,0,1}
Solution:
X2(n) = x1(n+2), x3(n) = x1(n2) Now, 2
X2(z) = z X1(n)
-1
-1
-3 X1(z) = 1+2z +5z +7z +z
5
2
-1 -3
X2(z) = z +2z+5+7z +z
ROC: Entire z-plane except z = 0 and z =
-2
X3(z) = z X1(z)
-2
-3
-4
-5 -7
= z +2z +5z +7z +z
Roc: entire z-plane except z = 0.

# Determine the z-transform of the signal .


1
0 n N 1
x(n) =
0
otherwise
Solution:
N 1

X(z) = 1.z n
n=0

= 1 + z 1 + z 2 + z 3 ......... + z ( N 1) = N if z = 1
1zN
=
if z 1
1 z 1
Alternative method:X(n) = u(n) u(n-N)
Using linearity and time shifting property.
X(z) = Z{u(n)} Z{u(n-N)}
1 zN
1
1 z 1 1 z
1zN

=
=

ROC: |z| > 1

1 z 1
Next method
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 43

Downloaded from www.bhawesh.com.np


u(n)
u(n-N)

N-1 N

Date:2066/08/25
(3) Scaling in z-domain:X(z) ROC, r1 <|z| <r2
If x(n) z
-1
-1
Then a x(n) z X(a z) ROC: |a|r1 <|z| <|a|r2 For
any real constant a real or complex.

Z[a x(n)] = a x(n) z


n

n=

x(n)(a

z) n = X (a 1 z)

n=

-1

ROC : r1<|a z| <r2


a r1 < z < a r2

# Determine z-transform of the signals.


n
(a) x(n) = a (coswon)u(n)
n
(b) x(n) = a (sinwon)u(n)
Solution:
n
x(n) = a (coswon)u(n)
x1(n) = coswon u(n)
X1(z) = Z[cos w0 n u(n)] =

1z
1 2z

Then,
n
X(n) = a x1(n)
X(z) = Z[a

x1 (n)] = X 1 (a

z) =

cos w
0

cos w + z 1

ROC: |z| >1

1 az

cos w
0

1 2az

cos w0 + a 2 z 1

ROC: |z| >|a|

(b) x(n) = a (sinwon)u(n)


az 1 sin w
0
X(z) = = 1 2az 1 cos w + a 2 z 1 ROC: |z| >|a|
0

(4) Time reversal:


If x(n) zX(z)
-1
Then x(-n)z X(z )

ROC, r1 <|z| <r2

ROC: 1/r2 <|z| <1/r1

Proof:

Downloaded from www.bhawesh.com.np/ -44

Downloaded from www.bhawesh.com.np

Z[{x(n)}] = x(n)z

n=

Put , l = -n

= x(l) z

l =

= x(l)( z
l =

-1

= X(z )
-1

ROC of X(z ) is r1 <|z| <r2 or, 1/r2 <|z| <1/r1


Note that ROC of x(n) is the inverse of that for x(-n)
# Determine the z-transform of the signal.
x(n) = u(-n)
Solution:
1
1 z 1 |z| > 1
u(n)z
Using time reversal property.
1
u(-n)z
|z| < 1
1 z
(5)

Differentiation in z- transform

If x(n)

X(z)

Then n x(n) z -z
Proof:-

dX (z)

X ( z) = x(n) z

dz

n=

By differentiation,
dX (z)

= x(n)(n)z
dz
n1

n=

= z

= z

{nx(n)z n

n =

Z{nx(n) }

Z{nx(n)} = z

dX ( z)

Note that both transform have same ROC.

dz

# Determine z-trnasform of the signal.


n
x(n) = na u(n)
Proof:
n
x1(n) = a u(n)
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 45

Downloaded from www.bhawesh.com.np


1
x1(n) = a az 1

ROC; |z| >|a|

x(n) = n x1(n)
X(z) = Z{n x1(n)} = dX 1 (z)
dz
1
=z
az 2
1 2
(1 az )

az 1
1
(1 az )

ROC: |z| >|a|

# Determine the signal x(n) whose z-transform is given


-1
by X(z) = log(1+az ), |z| >|a|
Solution:
dX (z) =

. az 2
(1 + az 1 )
dz
z dX (z) = az 1
.
1
(1 + az )
1

dz
= az 1

(a)z
Taking inverse z-transform.
n-1
n x(n) = a(-a) u(n-1)
n-1 n
x(n) = (-1) . a /n u(n-1)
Date: 2066/08/26
If x1(n) z
X1(z)
x2(n) z X2(z)
Then
X(n) = x1(n).x2(n) z X(z) = X1(z) X2(z)
The ROC of X(z) is at least the intersection of the for X1(z) and X2(z).
Proof:
The convolution of x1(n) and x2(n) is defined as

x(n) = x1 (k )x2 (n k )
k =

z-transform of x(n) as,

X (n) = x(n)z

n=

Downloaded from www.bhawesh.com.np/ -46

Downloaded from www.bhawesh.com.np

X (n) =

x1 (k )x2 (n k )zn

n = k =

X (n) = x1 (k ) x2 (n k )z
k =

n=

X (n) = x1 (k ) z
k =

x2 (z)

X (n) = X 2 ( z) x1 (k ) z

k =

= X2(z)X1(z)
# Compute convolution x(n) of the
signals X(n) = { 1,-2, 1}
10n5
x2 (n) =
0
otherwise

Inverse z-transform.

X ( z) = x(k ) z

.(i)

k =

n-1

Multplyign both sides of (i) by z and integrate both sides over a closed contour within the ROC
of X(z) which enclosed the origin .
Now,

X (z) z

n1

dz = x(k )z

n1k

dz.........(2)

C k =

Where C denotes closed counter in the ROC of X(z) .


We can interchanged the order of integration and summation on right hand side of (2) .

X ( z)z

n1

dz = x(k ) z

n1k

k =

dz.........(3)
C

From Cauchy integral theorem ,

1
z

2j C
Then,

X ( z) z
x(n) =

dz =

n1k

1
0

k=n

Figure:

kn

dz = 2jx(n)

n1

1
n1
C X (z)z dz ..(4)
2j

7) Multiplication of two sequences:- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 47

Downloaded from www.bhawesh.com.np


If x1(n) zX1(z)
x2(n)z X2(z)
Then
1
x(n)z x1(z)x2(z)z X(z) =

2j C

z
X (u) X

dv

1
2v
Where C is sthe closed counter that encloses the origin and lies within the ROC of common to both
X1(v) and X2(1/v)

X ( z) =
X ( z) =

x(n) z n
n=

x1 (n) x2 (n)z n

n=

Where,
x1 (n) =

1
2j C

x1 (n) =

X 1 (v)v

2j C
1
X ( z) =
X
2j

n1

(v) X

z
*

dv
* 1

dv

v
(v)

z
x

n=

(n)
2

v 1dv

8) Parsevals theorem:If x1(n) and x2(n) are complex valued sequence, then,

x1 (n) x2 * (n) =

X 1 (v) X 2 (1/ v )v dv

2 j C

n=

X ( z) = cn z n
X(n) = cn for all n.
Where X(z) is rational, the expansion can be performed by long division.
# Determine inverse z-transform of
X ( z) =

1+

1 0.5z 1

0.5z
When
(a) ROC: |z| > 1
(b) ROC : |z| <0.5

Downloaded from www.bhawesh.com.np/ -48

Downloaded from www.bhawesh.com.np

Solution:
(a) ROC: |z| >1 , x(n) is causal signal.
-1

-2

1-0.5z

-1

+0.5z ) 1

(1-0.5z

-1

-0.25z

-2

-2

1-0.5z +0.5z
-1
0.5z

-2
-0.5z

-1

-2

-3

0.5z -0.25z +0.25z


-2

-3

-2

-3

-0.25z -0.5z

-4

-0.25z +0.5z -0.125z


-3

-4

0.375z +0.125z

-4

-3

-5

-0.375z +0.18175z +0.18175z


-4

-0.0625z

-1

-2

-5

+1.8175z

-3

X(z) = {1+0.5z -0.25z -0.375z ..}


x(n) = { 1, 0.5, -0.25, -3.75, ..}

(b) ROC : |z| <0.5 x(n) is anticausal signal.


-2

0.5z -0.5z

-1

+1) 1
2
1-z+2z

34

(2 z + 2z - 2z

z - 2z

z - z + 2z
2

z - 2z

- z + z - 2z
3

-3z + 2z

-3z + 3z - 6z
4

-z + 6z

X (z) = 2z + 2z 2z 6z ..
6z 5 2z 4 + 2z 3 + 2z 2 + 0 + 0
= .
x(n) = {........ 6,2, 2 , 0, 0}

Initial value theorem:


X(z)
X(0) = lim z
Final value theorem:Lim n
x(n) = lim z 1 (z-1) X(z)
# The impulse response of relaxed LTI system is h(n) = u(n) < 1 . Determine the step response
of the system where n tends to
infinity. Solution:y(n) = x(n)*h(n)
x(n) = u(n)
h(n) = n u(n)
Y(z) = X(z) H(z)
1
1
n

X(z) =

1
1 z 1 1 z
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 49

Downloaded from www.bhawesh.com.np


Now,
Lim n

y(n) = lim z

= lim z tends to 1 (z-1)

1 (z-1)Y(z)
2
z
(z 1)(z )

1
1

System function (transfer function) of LTI System:The o/p of LTI system to an input sequence x(n) can be obtained by comparing the convolution of x(n)
with unit sample of the system. i.e y(n) = x(n)*h(n)
We can express this relationship in z-domain as
Y(z) = X(z) H(z)
When, Y(z) = z-transform of y(n)
X(z) = z-transform of x(n)
H(z) = z-transform of h(n)
Y (z)
Now, H(z) =
X ( z)

H ( z) = h(n) z

n=

H(z) represent the z-domain characteristics of the system where as h(n) is corresponding time domain
characteristics of the system. The transform H(z) is called the system function or transfer function.
General form of liner constant coefficient difference equation:The system is described by liner constant coefficient difference form.
N

k =1

k =0

y(n) = ak y(n k ) + bk x(n k ) .(1)

Taking z transform on both sides,


N

Y (z) = ak z
k =1
N

Y (z) + bk z k X (z)
k =0

Y (z) 1 + ak z k =

bk z k X (z)

k =1

k =0
M

H ( z) = Y (z) =
X ( z)

bk z k
k =0
N

1 + ak z

.(2)
k

k =1

Therefore a LTI system described by constant coefficient difference equation has a rational system
function from this general form we obtained two important special forms:
1. if ak = 0 , for 1 <= k<= N . Equation (2) reduces to H ( z) = bk z

(all zero system) such a

k =0

system has finite duration impulse response and it is called FIR system or moving
average (MA) system.

Downloaded from www.bhawesh.com.np/ -50

Downloaded from www.bhawesh.com.np


2. On the other hand if bk = 0 , for 1 <= k<= n the system function reduces to
b0
H ( z) =
.(4) (all pole system) Due the presence of pol es the impulse
N
1 + ak z k
k =1

response of such a system is infinite in duration and hence it is IIR system.


# Determine the system function and unit sample response of the system describe by the difference
equation y(n) = y(n-1) +2x(n).
Solution:
Taking z-transform on both
sides, Y (z) = 1/ 2Y ( z) + 2 X ( z)
1

(1 1 / 2 z )Y ( z) = 2 X ( z)
2
H ( z) = Y ( z) =

1
X (z) 1 1/ 2 z
By inversion,
n
h(n) = 2 (1/2) u(n)

Date: 2066/09/16
Response of pole zero system with Non-zero initial condition:The difference equation,
N

k =1

k =0

y(n) = ak y(n k ) + bk x(n k ) (i)

Suppose that the signal x(n) is applied to the pole zero system at n = 0 . Thus the signal x(n) is assume to
be a causal. The effects of all previous input signal to the system are reflected in the initial condition y(1), y(-2) ..y(-N). Since the input x(n) is causal and since we are interested in terminating the o/p
signal y(n) for n 0 we can use one sided z-transform which allows us to deal with initial condition. Now,
N

Y (z) = ak z
+

Y (z) + y(n) z
+

k =1

+ bk z k X + ( z) ..(2)

n=1

k =0

Since x(n) is causal, We can set X ( z) = X ( z)


M
N
k
bz
k
k k
ak z y(n) z n
+
n=1
Y (z) = k =0
.X ( z) k =0
N
N
1 + ak z k

1 + ak z k

k =1

k =1

= H ( z) X (z) + N o (z)

..(3)

A(z)
Where,
N

N 0 ( z) = ak z
k =1

y(n)z n

.(4)

n=1

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 51

Downloaded from www.bhawesh.com.np


st

From (3) the o/p of the system can be sub divided into two parts. The 1 part is zero state response of
the system defined in z-domain as Yzs (z) = H (z) X (z) .. (5).
The second component corresponding to o/p resulting form initial condition. This o/p is zero input
response of the system which is defined in z-domain as Yzi ( z) =

N 0 ( z)

(6)
A( z)
Since the total response is the sum of the two o/p component which can be expressed in time domain by
determining inverse z-transform of Yzs ( z) = Yzi ( z) . Seperately and adding the result.
y(n) = yzs(n) + yzi(n) ..(7)

# Determine the unit step response of the system described by the difference equation y(n) = 0.9y(n-1)
0.81 y(n-1) + x(n). Under the following initial condition.
(a) y(-1) = y(-2) = 0.
(b) y(-1) = y(-2) = 1 .
Taking one-side z-trnasfrom.
Y + (z) = 0.9z 1 Y + ( z) + y(1) z 0.8z 2 Y + ( z) + y(1) z + y(2) z 2 + X + ( z)
For y(-1) = y(-2) = 0

1 +

2 +

Y (z) = 0.9z Y ( z) 0.81z Y ( z) + X ( z)


+
Y ( z)
1
=
1
2
+
x (z) 1 0.9z 0.81z
+
Yzs ( z) =
z2
z2
=
j / 3
2
)( z 1)
z
( z 0.9z + 0.8z)(z 1) ( z 0.9e
2
k
z
1

( z 0.9e

j / 3

)( z 0.9e

k1

= 1.098e j 5.53

k*

= 1.098e j 5.53

j / 3

)(z 1) = ( z 0.9e

j / 3

) + ( z 0.9e

j / 3

) + z 1

, k2 = 1.1
j 5.53

1.1
1.098e j 5.53 + 1.098e
+
j / 3 1
1
j / 3 1
(1 0.9e
z ) (1 0.9e
z )1z
By inversion,
Yzs (z) =

yzs (n) = 1.098e j 5.53 (0.9e j / 3 ) n + 1.098e j 5.53 (0.9e j / 3 ) n +1.1 + y(n)

= 1.1 + 1.098(0.9) n cos(n / 3 5.53) u(n)


(b) y(-1) = y(-2) = 1.
N ( z)
Yzi ( z) = o
A(z)
N

N o (z) = ak z
k =1

y(n) z n
n= 1

Downloaded from www.bhawesh.com.np/ -52

Downloaded from www.bhawesh.com.np


2

N o (z) = ak z

= a1 z

y(n)z

n=1

y(1) z + a2 z

( y(1) z + y(2) z )

N 0 (z) = 0.9 1 + 0.81z

+ 0.811 = 0.09 0.81z

-1

0.09 0.81z 1
1
+ 0.81z 2
1 0.9z
Y (z) = Yzs ( z) + Yzi ( z)
= 1.099 +0.568 + j0.445 +0.568 j0.445
1 z 1 1 0.9e j / 3 z 1 1 0.9e j / 3 z 1
zi

( z) =

y(n) = 1.099 +1.44(0.9) n cos(n / 3 + 38) u(n)

Date: 2066/09/20
# Determine well known fibanacci sequence of integer numbers is obtained by computing each term as
the sum of two previous ones, the first few terms of the sequences are
1, 1, 2, 3, 5, 8 ..
Determine a close form expression for the nth term of Fibonacci series.
Solution:Let y(n) be the nth term. Then,
Y(n) = y(n-1) + y(n-2) (i)
With initial condition ,
y(0) = y(-1)+y(-2) = 1
y(1) = y(0)+y(-1) = 1
y(-1) = 1-1 = 0, y(-2) = 1 .
Taking one sided z-tranzsform on both sides of (i).
Y + (z) = z 1Y + ( z) + y(1) + z 2Y + (z) + Y ( z) + y(1)z 1
Y + (z) = z 1Y + ( z) + z 2Y + ( z) +1
1
z2
2 = 2
1 z 1 z
z z 1
Y + (z)
z
5
1+
=
= 25
2
z
z z 1

Y + (z) =

1
1+

1 5
2 5

1
1 5

2
+
Y

(z)

1+ 5

2 5

+
1

1 + 5

2
5
.

2 5

1
1 5

Taking inverse z-transformation.


- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 53

Downloaded from www.bhawesh.com.np


1+ 5 1+
y(n) =

1 51 5

u(n)

# Determine step response of the system y(n) =


When initial condition is y(-1) = 1.
Solution:
Taking one sided z-transform,

Y (z) = z

y(n-1) + x(n)

-1 < < 1

Y ( z) + y(1) + X (z)
1
+
X ( z) = Z [u(n)]=
1 z 1
1
Or , Y + (z) = z 1Y + ( z) + + 1 z 1
1
+
1
Or, Y (z)(1 z ) = + 1 1
z
+
Y ( z) =
+1
1
1
1
(1 z )(1 z )
1 z
1
1

Y + (z) =
+

1
1
1 z
1 1z
1
Taking inversion,
1
1 n
n
y(n) = u(n).1

n+1

=
1

u(n)

1
1 z

1
1

u(n)

n+1

(1 ) + 1

n+2

y(n) =
u(n)
1
# Determine the response of the system y(n) = 5/6. y(n-1) 1/6 y(n-2) + x(n) to the input signal
x(n) = (n) 1 (n 1)
3
Solution:
Taking z-transform in both sides.
5
1 2
1
Y (z) = 6 z Y ( z) 6 z Y (z) + X (z)
1

X ( z) = 1 1 z 1
3
5 z 1 1 z 2Y ( z) +
Y (z) =
6
6
5
1 2
1
= 1

1 1
z
3

Y ( z) = 1

1
3

Downloaded from www.bhawesh.com.np/ -54

Downloaded from www.bhawesh.com.np


1

Y (z) =

5z

1
3

+1
6

6
1
Y (z) =
1 1 z 1
2
Taking inverse z-transform,
= 1 y(n)
n

u(n)

2
Causality and stability:A causal LTF system is one where unit sample response u(n) satisfies the condition h(n) = 0, for n
< 0. We have also shown that ROC of z-transform of a causal sequence is exterior of a circle.

A necessary and sufficient condition for a LTI system to be BIBO stable is

h(n) < . In turn this


n=

condition implies that H(z) must contain the unit circle within its
ROC. Indeed, Since

H ( z) = h(n) z

H ( z) h(n)z

n=

n=

When evaluating on the unit circle i.e z = 1

H ( z) h(n)
n=

Hence if the system is BIBO, the unit circle is contained in the ROC of H(z).

# A LTI system is characterized by the system function.


3 4z 1
1 3.5z 1 +1.5z 2
Specify the ROC of H(z) and determine h(n) for the following condition.
(a) The system is stable.
(b) The system is causal.
(c) The system is anticausal.
H ( z) =

Solution:1
2
H ( z) = 1 1 z 1 + 1 3z 1
2
The system has poles at z = and z = 3.
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 55

Downloaded from www.bhawesh.com.np


(a) Since the system is stable, its ROC must include the unit circle and hence it is < |z| <3.
Consequently h(n) is non-causal.
n
1
n
h(n) =

u(n) 2.(3) u(n 1) ( The system is unstable).

(b) Since the system is causal , its ROC is |z| >3. In this case h(n) =

u(n) + 2(3) u(n) ( The


n

2
system is unstable).
(c) Since the system is anticausal its ROC is |z| <1/2 . In this case,
1n
n
h(n) =

u(n 1) + 2.(3) u(n 1) . (The system is unstable).

Date: 2066/09/22
Transient and steady state response:
# Determine the transient and steady state response of the system characterized by the difference
n
equation y(n) = 0.5y(n-1) +x(n). When the input signal is x(n) = 10cos

u(n) . The system is

4
initially at a rest (i.e it is relaxed ).
Solution:
Taking z-transform,
Y (z) = 0.5z 1Y (z) + X ( z)
Y (z) =
1
1
X ( z) 1 0.5z
1 z 1 cos w
o
Z (cos wo n u(n)) =

+z

1 2z 1 cos w

1 z 1 cos
X ( z) = 10

1 2z

cos

10 1

+ z

(1

1
2

2z 1 + z 2 )

4
1

1
1

(1

1
z

1
2
2z + z
10(1 1 z 1 )
2
=
1
j / 4
z 1 )(1 e j / 4 z 1 )
(1 0.5z )(1 e
j 28.7
63
=
+ 6.78e j 2.870 + 6.78e

Y (z) = (1 0.5z

1 0.5z 1

) .10

1 e j / 4 z 1 1 e j / 4 z 1
Downloaded from www.bhawesh.com.np/ -56

Downloaded from www.bhawesh.com.np


The natural or transient response is
n
ynr (n) = 6.3(0.5) u(n) and forced or steady response is
[
]
=

j 28.7 jn / 4

y fr (n) 6.78e
= 13.56 cos n

j 28.7 jn / 4

6.78e

u(n)

28.7 u(n)

4
Pole-zero diagram:1 z 1 2z 2
H ( z) =
1
2
3
1 1.75z
+ 1.4z
0.375z
3
2
z z 2z
= 3
z 1.75z 2 + 1.25z 0.375
z(z 2)(z +1)
=
( z 0.75)( z 0.5 j0.5)(z 0.5 + j0.5)
Im(z)

j0.5

-1

0.75

Re(z)

-j0.5

Fig: pole-zero diagram


Zeroes at z = 0, 2, -1
Poles at z = 0.75, 0.5 j0.5

# A filter is characterized by following poles and zeroes on z-plane.


Zeroes at
Poles at
Radius Angle Radius Angle
0.4
rad 0.5
0 rad
0.9
1.0376 0.892
2.5158 rad
Shows z-plane plot and plot magnitude response (not to scale
). Solution:Zeroes are,
z = 0.4e j = 0.4
z = 0.9e j1.0376 = 0.45 +
j0.77 Poles are:
z = 0.5e j 0 = 0.5
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 57

Downloaded from www.bhawesh.com.np


z = 0.892e

2.5158

= 0.728 + j0.522
Im(z)

j0.77
j0.522

-0.722

0.45

-0.4

0.5

Re(z)

Fig: z-plane plot


H (z) = (z + 0.4)(z 0.45 j0.77)
(z 0.5)(z + 0.77 j0.522)
jwT
Put, z = e
,
jwT
jwT + 0.4)(e
0.45 j0.77)
H (z) = (e
jwT
jwT 0.5)(e
+ 0.77 j0.522)
jwT(e
H (e
)

H (e

jwT

)
W
T =3 / 4 =3.438

WT =0

H (e

jwT

) WT = / 4=0.319

H (e
jwt

H(e

jwT

) WT = =1.11

0.478

/4

/2

3/4

Fig: magnitude response

Notch filter:

Downloaded from www.bhawesh.com.np/ -58

Downloaded from www.bhawesh.com.np


It is a filter that contain one or more deep notches or ideally perfect nulls in its frequency response
characteristics. Notch filter are useful in many application where specific frequency component must
be illuminates for example, instrumentation in recording system requires that power line frequency of
50 Hz and its harmonics be illuminated.
jwt

H(e

(null)

To create a null in frequency response of filter at frequency w0 we simply introduce a pair of


jw

complex conjugate zero on the unit circle. z1,2 = e o


System function is given by ,
H ( z) = b0 (1 e jw0 z 1 )(1 e jw0 z 1 )(1 e jw0 z 1 )

Date: 2066/09/23
Response to complex exponential signal: Frequency response function:

The input-output relationship for LTI system is u(t) = h(k ) x(n k ) ..(i)
k =

To develop a frequency domain characteristics of the system.


Let us excite the system with complex exponentials.
< n < .(2)
x(n) = Ae jwn
Where, A is amplitude and w is orbitrary frequency confined to the frequency interval [ ,
] Now,

y(n) = h(k )[Ae jw( nk ) ]


k =

jwk

h(k ) Ae

jwn

..(3)

k =

H (w) = h(k )e jwk

.(4)

k =

The function H(w) exists if the system is BIBO stable, that is

h(n) <

.(5)

n=

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 59

Downloaded from www.bhawesh.com.np


The response of the system to complex exponential is given by
jwn
, y(n) = AH (w)e
.(6)
We note that the response is also in the form of complex exponential with the same frequency as the
input but altered by multiplicative factor H(w). The multiplicative factor is called eigen value of the
system in this case a complex exponential of the form (2) is an eigen function of LTI system and
H(w) evaluated at frequency of input signal is corresponding eign value.
= 1
# Determine the o/p sequence of the system with impulse response h(n)

n
u(n) When the input is

2
complex exponential sequence x(n) = Ae
Solution:1
H ( z) =
1 1. z 1
2
1
H (w) =
1 1 e jw
2

w= ,
At
2
1
2 j 26.6

=
H
e
=
1 j 2
5
2
1 e
2
And therefore the o/p is

2
jn
y(n) =

j 26.6 e

jn / 2

u(n)

<n<.

5
y(n) =

2
5

j ( n 26.6)

Ae

<n<
= 1

Determine the response of the system with impulse response h(n)

x(n) = 10 5sin

n + 2 cosn
2

u(n) to the input signal

2
<n<

Solution:H ( z) = 1
1 1 z 1
2
1
H ( z) =
1
1 2 e jw
The first term in a input signal is a fixed signal component corresponding to w = 0. Thus,

Downloaded from www.bhawesh.com.np/ -60

Downloaded from www.bhawesh.com.np


H (0) =

1
=2
1 1
2

The second term in x(n) has frequency

. Thus ,

2
1
2
=
1 j
5
1 e 2
2

j 26.6
e

Finally the third term in x(n) has a frequency w = . Thus H ( ) = 2 .


3
Hence the response of the system to x(n) is,

10
40
y(n) = 20

cosn,

n 26.6 +

sin

<n<

# A LTI system is described by following difference equation y(n) = ay(n 1) + bx(n)


0<a<1.
(a) Determine the magnitude and phase of frequency response H(w) of the system.
(b) Choose the parameter b so that the maximum value of H (w) and phase of H(w) for a= 0.9.

(c) Determine the o/p of the system to signal for x(n) = 5 +


n 20 cos n +

12 sin

Date: 2066/09/25
Chapter:- 5
Discrete filter structure:Cascade form structure:H ( z) =

k 1

H ( z)
k

Where k is integer part of (N+1)/2


H k (k ) =

b ko + b k1 z 1
1 + ak1 z

+ b z 1

k2

+ ak 2 z

2
x (n)

x (n)

H1(z)

y1(n)

H2(z)

y2(n)

xk(n)
Hk(z)

y(n)

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 61

Downloaded from www.bhawesh.com.np


yk(n)=xk+1(n)

xk(n)
+

z-1
b
-ak1

k1

z-1
-a

b
k2

k2

Parallel form structure:


N
Ak
H (z) = c +
k 1 1 p z 1
=

H1(z)

H2(z)

Hk(z)

x(n)

y(n)

# Determine the cascade parallel realization for the system described by the system function
1
2
1
z 1 (1 2z
10 1 z 1 1
2
3
H (z) =
3
1 1
1
1 1
1
1 1

z 1 1

1+

+j

Cascade form:-

Downloaded from www.bhawesh.com.np/ -62

Downloaded from www.bhawesh.com.np


1 2
3

H1 z =

z 1
1

H 2 (z) =

1
2

+j

2
1
z

z 1

32

(1 + 2z )
1

1 2 z 1
3
7 z 1 + 3

1
z

1 + 2 z 1 z 2

1
1 z 1 + z 2
2
H (z) = 10H1 (z)H 2 (z)
The cascade relationship is
x(n)

1
+

10

+
y(n)

z-1

z-1

1
7/8

-2/3

-3/2

z-1

z-1

-3/32

-1/2

-1

Parallel form:-

H (z) =

4
H (z) =
z

2
z

3
1

10 z

( z + 2)z

+j

8
10 z

3
4

= k1

1
8

+ k2 +
1
z
z
4
8
3

2
k3
1

+j

+j

2
2

2
z

1
2

( z + 2)

3
1

z
2
1

+
z

2
2
*
k3
1
1
j

2
2
2
k1 = 2.93, k2 = 17.68 , k3 = 12.25 j14.57,
k3* = 12.25 + j14.57
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 63
2

Downloaded from www.bhawesh.com.np


H ( z) = 2.93 + 17.68 + 12.25 + j14.57 + 12.25 + j14.57
3 1
1 1
1
1 1
1
1
1 z
1 z
z
1
+j
z
1
j
4
82
22
2

z-1

z-1

z-1

z-1

h(2)

h(1)
+

h(m-1)

+
yk(n)

Cascade form structure:H ( z) = kk =1 H k ( z)


H ( z) = b
k

ko

k = 1, 2
..........k

+ b z 1 + b z 2
k1

k2

H1(z)

H2(z)

Hk(z)

x(n) = x1(n)

y(n)

z-1

xk(n)

z-1
bk2

b1
k

bk0
+

+
yk(n)

Lattice form structure:


Fir filter with system function
H m ( z) = Am (z)

m = 0,1 ...........m 1

Am ( z) = 1 + m (k ) z k
k =1

m1

Ao (m) = 1
hm ( z) = 1, hm (k ) = m (k ), k = 1,2..............m
m deg ree of polynomial.

Downloaded from www.bhawesh.com.np/ -64

Downloaded from www.bhawesh.com.np


m

y(n) = x(n) + m (k ) x(n k )


k =1

z-1

z-1

z-1

x(n)
m

(2)

(1)

+
y(n)

Figure: Direct form realization.


For m = 1.
y(n) = x(n) + 1 (1)x(n 1)
st
1 order lattice filter.
f1(n)=y(n)

fo(n)

x(n)

go(n)

g1(n)

z-1
go(n-1)

f 0 (n) = x(n)
g 0 (n) = x(n)
f1 (n) = f 0 (n) + k1 g 0 (n 1)
y(n) = x(n) + k1 x(n 1)
g1 (n) = k1 f 0 (n) + g 0 (n 1)
= k1 x(n) + x(n 1)
k1 = reflection coefficient
k1 = 1 (1)
fo(n)

f1(n)

k2

k
1

x(n)

k2

k
1

go(n)

z-1
go(n-1)

f2(n)=y(n)
+

g (n)

z-1
g1(n-1)

g2(n)

y(n) = x(n) + 2 (1)x(n 1) + 2 (2)x(n 2)


f 2 (n) = f1 (n) + k2 g1 (n 1)
= x(m + k1 (1 + k2 )x(n 1) + k2 x(n 1)
= 2 (2) = k2 , 2 (1) = k1 (1 + k2 )
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 65

Downloaded from www.bhawesh.com.np

Conversion of lattice coefficient to direct form filter coefficients:Direct form filter coefficient { m (k )} can be obtained form lattice coefficients {ki } using the
relations. A0 (z) = B0 (z) = 1
1
1
A (z) = Am (z) + k z B (z)
m

B ( z) = z

A (z

m1

m = 1, 2, ..............m 1
m = 1, 2, .....................m 1

Bm ( z) Reverse polynomial of Am ( z).


# A given 3-stage lattice filter with coefficient k1 = 1 , k2 = 1 ,
4
2
coefficient for direct form structure.
A1 ( z) = A0 ( z) + k1 z 1 B0 ( z)
=1+

k
3

= 1 . Determine FIR filter


3

1 (0) = 1, 1 (1) = 1 , Corresponding to single stage lattice filter.


4
1
1
1
1
1
1 (z) = z A1 (z ) = z 1 + z = + z 1
4
4
A ( z) = A ( z) + k z 1 (z)
2

= 1 + 3 z 1 + 1 z 2
8
2
2 (0) = 1,
2 (1) = 3 ,
8
2 (z) = 1 + 3 z 1 + z 2
2

2 (2) = 1 Corresponding to 2
2

nd

order lattice form.

A (z) = A (z) + k z 1 ( z)
3

=1+

3 (0) = 1,

13 z 1 + 5 z 2 + 1 z 3
24
8
3

3 (1) = 13 ,
24

3 ( z) = 5 , 3 (3) = 1
8
3
Date: 2066/09/27

Conversion of direct form FIR filter coefficient to lattice coefficient:


A ( z) = Am (z) + km Bm (z)
m = m 1,......... 1
1 + km2
m+1
km = m = m (m)

Downloaded from www.bhawesh.com.np/ -66

Downloaded from www.bhawesh.com.np


# Determine lattice Coefficient Corresponding to FIR filter with system function.
2
3
H ( z) = A ( z) = 1 + 13 z 1 + 5 z + 1 z + 13 z 3 + z 3
3
24
8
3
24
Solution:
1
1 5 1 13
k1 = 1 (3) = ,
B3 (z) = + z + z 2 + z 3
3
3 8
24
1
A ( z) = A3 (Z ) k3 B3 ( z) = 1 + 3 z + 1 z 2
2
1 k3
8
2
2
1
1 3
K 2 = 1 (2) =
,B2
( z) = + z 1 + z 2

A (z) = A2 (z) K 2 B2 (z) = 1 + 1


2
1
1 k2
4
k = (1) = 1
1

z 1

4
Lattice and lattice ladder structure for IIR system:Let us begin with all-pole system with system function.
1
H (z0 =
= 1 .. (1)
N

1 + am (k )z
k =1

m(z)

Difference equation for this system is


N

y(k ) = am (k ) y(n k ) + x(k ) . (2)


k =1

When N = 1.
fO(n)

x(n)
+
f1(n)

y(n)

K
K

g (n)
1

g1(n-1)

z-1

g (n)
o

x(n) = f1(n)
fo(n) = f1(n) k 1go(n1) g1(n) = k1f0(n)+go(n1) y(n) = fo(n)
= f1(n)+k1go(n-1)
y(n) = x(n) k 1y(n-1)
y1(n) = k1y(1)+y(n-1)

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 67

Downloaded from www.bhawesh.com.np


x(n)

fO(n)

+
f2(n)

fO(n)

+
-

k2

y(n)

k
1

k2

k1

+
g2(n)

z-1

g1(n-1)

g (n)
1

z-1

g (n-1)
0

g (n)
o

Fig: Two stage lattice structure


fo(n) = x(n)
f1(n) =f2(n) k 2g1(n-1)
g2(n) = k2f1(n)-k1g2(n-1)
fo(n) = f1(n) k 1g0(n-1)
g1(n) = k1fo(n) +go(n-1)
y(n) = fo(n) = go(n)
= f2(n) k 2g1(n-1) k 1go(n-1)
= - k1 (1+k2) y(n-1) k 2 y(n-2) + x(n)
m

Cm (k )z k

H (z) = N
k =0

k =0

1 + aN (k )z

A (z)

Cm (z)

Ladder Co-efficient,
vm = Cm (m)

m = 0, 1, 2, 3, M

Cm1 (z) = cn (Z ) vm / Bm (z)


x(n)

fO(n)

f2(n)

fO(n)

+
-

y(n)

k
2

+
g2(n)

g1(n-1)

z-1

+
g (n)

g (n-1)

z-1

g (n)
o

v1

v2

vo
+

# Obtain the lattice ladder structure.


1 + 3z 1 + 3z 2 + z 3
H (z) = 1 0.9z
C (z)
= 3

+ 0.64z 2 0.576z 3

A3 ( z)

Solution:
Lattice coefficient:-

Downloaded from www.bhawesh.com.np/ -68

Downloaded from www.bhawesh.com.np


A3 ( z) = 1 0.3z

+ 0.64z 2

0.576z 3 k3 = 3 (3) = 0.576


1
2
3
+z
B (z) = 0.576 + 0.64z 0.9z
3

1
2
A ( z) = A3 (z) k3 B3 (z) = 1 0.795z + 0.1819z
2
1 k3
2
k2 = 2 (z) = 0.1819
B2 (z) = 0.1819
1
B ( z) = A2 ( z) k2 B2 (z) = 1 0.6726z
2
1 k2
2
k1 = 1 (1) = 0.6726

Ladder coefficient:C3 (z) = 1 + 3z 1 + 3z 2 + z 3


v3 = C3 (3) = 1
C2 ( z) = C3 (z) v3 B3 ( z)
= 1.576 + 2.36z 1 + 3.9z 2
C1 (z) = C2 (z) v2 B2 (z)
= 0.866 + 5.46z 1
v1 = 5.46
C0 ( z) = C1 ( z) v1B1 ( z)
= 4.538
v0 = C0 (0) = 4.538
+

k
3=-0.576

3=1

k
1=0.6782

z-1

1=-0.6782
2=-0.1819

2=0.1819

3= 0.576

z-1

z-1

v
2=3.9

v
0=4.538

1=5.46
+

Fig: Lattice ladder structure.

Date: 2066/09/30
Analysis of sensitivity to quantization of filter coefficient:- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 69

Downloaded from www.bhawesh.com.np


Let us consider a general FIR filter with system ,
m
bz

H (z) =

k =0
N

1 + ak z k

.(1)

k =1

With quantized coefficient coefficient the system function.


m
bz

k =0
N

H (z) =

1 + ak
k =1

z
k

Where quantized coefficient {bk } can be released to the unquatized coefficients {ak } & {bk } by the
relation,
a k = a k + ak ,

k = 1, 2 , 3 .................N

bk = bk + bk ,

k = 1, 2 , 3 .................m

---------(3)
--------- (4)

Where { a k } represents the quantization errors.


The denominator of H(z) may be expressed to the form ,
N

D( z) = 1 + ak z k = kN=1 (1 pk z

) .(4)

k =1

Where, { pk } are the poles of H(z)


Similarly we can express the denominator of H ( z) as,
D (z) = kN=1 (1 pk z 1 ) .(5)
Where, pk = pk + pk ,
k = 1, 2 .........N
And pk is the error or perturtation resulting form the quantization of filter coefficients.
We shall relate the perturtation errors in the {ak } .
The perturtation error pi can be expressed as,
N

pi =

pi

. (6)

k =1

k
(z) / a

ak = (D(z) / z )z= pi . (7)


The total perturtatio error,
pi =

p N k

k =1

l =1,l i

(p p )
i

qk . (8)

The error can be minimized by maximizing the lengths pi pl . This can be accomplished by realizing
the high order filter with either single pole or double pole filter sections.

Downloaded from www.bhawesh.com.np/ -70

Downloaded from www.bhawesh.com.np


Limit cycle oscillation in recursive system:In the realization of digital filter either in digital hardware or software on a digital computer, the
quantization inherent in the finite precision arithmetic operation render the system non linear. In
recursive system the non linearities due to finite precision arithmetic operation often cause periodic
oscillation to occur in o/p even when the input sequence is zero or some non zero constant value. Such
oscillation in recursive system are called limit cycle and are directly attributable to round off errors in
multiplication and overflow error in addition.
Scaling to prevent overflow:In order to limit the amount of non linear distortion it is important to scale the input signal and unit
sample response between the input and any internal summing mode in the system such that overflow
becomes a rare event.
For fixed point arithmetic let us first consider the extra condition that overflow is not permitted at any
th
node of the system. Let yk (n) denote the response of the system at k node when input sequence is x(n) and
unit sample response between the node and the input in hk ( z) .

hk (m) x(n m)

yk (n) =

m=

hk (m) x(n m)

(1)

m=

Suppose that x(n) is upper bounded by Ak.


Then,

A
k
yk (n)
hk (m) for all n (2)
m=

Now, if the dynamic range of the computer is limited to (-1, 1) the condition,
yk (n) < 1 (3)
Can be satisfied by requiring that the input x(n) can be such that,
1
A <
x

(4)

hk (m)

m=

For all possible nodes in the system. The condition in (4) is both necessary and sufficient to prevent
coefficient.
For FIR filter, (4) become,
1
A <
..(5)
x

m1

hk (m)
m=0

Another approach to scaling is to scale the input so that,

yk (n)

n=

x(n)

= C 2 Ex .. (6)

n=

From parsavals theorem,

n=

yk (n)

1
2

H (w) X (w)

1
Ex 2 H (w)

dw .. (7)

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 71

Downloaded from www.bhawesh.com.np


From (6) and (7)
1

C Ex Ex

H (w)

dw

H (w) 2

dw . (8)

Read the following topics your self: Representation of Number.


Fixed point representation.
Floating point representation.
Rounding and truncation error.

Chapter: 6

Design of IIR filter form analog filters:Impulse invariance method:


M
Ai
H a (s) =
s
pi
i =1
Taking inverse laplace transform
M

ha (t) = Ai e pit ua (t)


i =1

Put t = nT
M

ha (nT ) = Ai e pi nT ua (nT )
i =1

H ( z) = h(n)z n
n=0

Ai e p

n= 0
M

nT

ua (nT ) z

i =1

= Ai (e piT z 1 )n ua (nT )
i =1 n=0
M

= = Ai
i =1

Hence,
1

1
p T 1

1e z
i

1e z
pT
i

s pi

Downloaded from www.bhawesh.com.np/ -72

Downloaded from www.bhawesh.com.np


s + 0.1
Q. Convert the analog filter with the system function H a (s) =
(s + 0.1)2 + 9 into a digital IIR by means
of impulse invariance method.
Solution:
s + 0.1
s + 0.1
H a (s) =
=
s + 0.1 2 + 9

( s + 0.1 + j3)( s + 0.1 j3)

k1
k1
= ( s + 0.1 + j3) + ( s + 0.1 j3)
*
k1 = 1 , k1 = 1
2

1
1
2
2
H a (s) =
+
( s + 0.1 +
( s + 0.1 j3)
j3)
Then using impulse invariance method,
1
1
2
2
H ( z) = 1 + e( 0.1 j 3)T z 1 + 1 e( 0.1 j 3)T z 1
1 (e0.1T cos 3T )z 1

= 1 (ze

0.1T

cos 3T )z

0.2T 1

+e

IIR filter design by bilinear transformation:


IIR filter deign using impulse invariance and approximation of derivative method have a sever
limitation in that they are approximate only for low pass filter and limited calls of bandpass filter.
In this we describe a mapping from s-plane to z-plane called bilinear transformation that
overcomes the limitation of other two design method describe previously.
Let us consider the analog filter with system function.
b
H (s) =
.. (1)
s+a
Y (s) = b
X (s) s + a
Or, sY (s) + aY (s) = bX (s)
Taking inverse laplace transform, we get,
du(t) +
=
ay(t) bx(t)

dt
Taking integration on both sides.

du(t) dt + a

nT

nT

y(t)dt =

dt
mT
Using Trapezoidal rule,

x(t)dt
nT T

nT

nT T

g(t)dt = T / 2[g (nT ) + g (nT T )]

Then,
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 73

Downloaded from www.bhawesh.com.np


y(nT ) y(nT T ) + aT / 2[y(nT ) + y(nT T )] = bT / 2[x(nT ) + x(nT T ))]
Taking z-transform on both sides,
1
1`
1
Y (z) z Y (z) + aT / 2[Y (z) + z Y (z) = bT / 2 X (z) + z X (z)

bT / 2(1 + z

)
1
X (z) = 1 z + aT / 2(1 + z )
b
H (z) =
2 1 z 1
1 + a
T1+z
2 z 1
Hence, s =
1
1
T +z
It gives the mapping form s-plane to z-plane. This is called bilinear
transformation. To investigate the characteristics of bilinear transformation let,
z = re jw
s = + j
2 z 1
Now , s =
T z+1
jw
1
=
jw
+1
re
2 2 1 + j2r sin w
= r 2
T
+ 2r cos w +1
Comparing with,
s = + j
Y (z)

re

2
T

r
r

+ 2r cos w +1
2r sin
w

T r 2 + 2r cos w + 1

If r <1, then < 0 and if r >1, then, > 0 consequently, the LHP is S maps into inside a unit circle in zplane and RHP in s maps into outside a unit circle.
When, r = 1, = 0 ,
2
2 sin w
=
T 2 + 2 cos w
= 2 tan( w 2)
T
w = 2 1 T
tan
2

Downloaded from www.bhawesh.com.np/ -74

Downloaded from www.bhawesh.com.np

-1

=2tan (T/2)

/2

/2

Fig: mapping between frequency variables w and resulting from bilinear transformation.
# Convert the analog filter with system H a (s) =

s + 0.1

( s + 0.1)2

into digital IIR filter by means of

+ 16
bilinear transformation the digital is to have resonant frequency of wr = / 2 .
Solution:
The resonant frequency of analog filter is r = 4 . & resonant frequency of digital filter is
r =
4=

tan wr / 2

T
tan

T
T =

1
2

Now , s =

2/T

z
+z

1
1

=4

z 1
+z

Using bilinear, the system function of digital filter becomes H ( z) =

1 z
4

1 +z

+z
1

+ 0.1
2

+ 16
1 + 0.1

0.125 + 0.006z 0.118z


1 + 0.0006z 1 + 0.95z 1
0.125 + 0.006z 1 0.118z 2
=

H ( z) =

z 1

1 + 0.95z

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 75

Downloaded from www.bhawesh.com.np


Q. Design a single pole low pass digital filter factor with 3 dB bandwidth of 0.2 using the bilinear
c
. Where, c is a 3dB bandwidth analog filter.
transformation apply to the analog filter H (s) =
s + c
Solution:
wc = 0.2 ,
For analog filter.
= 2 tan w / 2
c
c
T
= 2 tan(0.1( ))
T
= 0.65
T
Analog filter has system function
0.65 T
H (s) =
s + 0.6 T
2

Now, s =

1
1

T1 +z

Then,
0.65 T
2 z 1 0.65T
+
1
T1 +z
T
1
0,65(1 + z )
=
2.65 1.35z

H (z) =

H ( z) =

0.245(1 + z
1 0.509z

Matched z-transformation:Another method for converting analog filter into equivalent digital filter is to map the poles and
zeroes of H(s) directly into poles and zero in z-plane.
Suppose the transfer function of analog filter is expressed in the factored formed.
M

k =1

H (s) =

(s z )
k

N= (s p )
k 1

Where, {zk } and {pk } are zeroes and poles of the analog
filter. Then system function for digital filter is
(1 e z )
H (s) = k =1 pk T1
N

k =1

z T 1

(1 e k z )

Thus each factor of the form (s-a) in H(s) is mapped into the factor (1 eaT z 1 ) . This mapping is
called matched z-transformation.

Downloaded from www.bhawesh.com.np/ -76

Downloaded from www.bhawesh.com.np


# Convert the analog filter with system function H a (s) =

s + 0.1
into digital IIR filter by matched
(s + 0.1) 2 + 9

z-transformation method.
s + 0.1

H a (s) =

(s + 0.1)

(s + 0.1 + 3 j)(s + 0.1


2
2
(s + 0.1) (3 j) )
j3)
Using matched z-transformation method.

(1 e

0.1T

z 1

H ( z) = (1 e( 0.13 j )T z 1 )(1 e( 0.1+ j 3)T z 1 )


0.1T 1
(1 e
z )
=
(1 e0.1T e j 3T z 1 )(1 e0.1T e j 3T z 1 )
Date: 2066/10/7
Butter worth filter:
We have, T ( jw)
n

When

1
1 + 2n
2

=1

1
2n
1+
This function is known as Butterworth response. From this equation we observe some interesting
properties of Butterworth response,
(1) The Butterworth filter is an all pole filter. It h as zero at infinity ( ).
(2) Tn ( j0) = 1 for all n.
T ( jw)
n

(3) T ( j1) = 1 = 0.707 for all n. corresponding to 3 dB.


2
(4) For large , Tn ( j) exhibits n-pole roll-off.
n

Tn(j)

n=1
n=2
n=3

Fig: Maximally flat response.

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 77

Downloaded from www.bhawesh.com.np


Butterwoth filter: () = 20 log T ( jw) dB
Low pass filter specifications,
Passband frequency = p
Stopband frequency = s
Passband attenuation = p
Stopband attenuation = s
Order of filter,
0.1
1
10
s

log

n=

10

0.1 p

2 log(s p )
3-dB cutoff frequency,
p
c =
1

(10 1)
Chebyshev filter:
0.1

2n

We have chebyshev magnitude response,


1
T ( jw) 2 =
(1)

1 + Cn ()

Cn () = cos(n cos1 ) for


1
n

= cosh(n cosh ) for > 1 (2)


With equation (2), the transfer function magnitude in (1) is determined for all values of . The function
is plotted for n = 6.
n odd begin here

n even begin here

Fig: Sixth order chebyshev TF magnitude


(1) Cn (0) = 0 for odd and Cn (0) = 1 for n even.
Tn ( j0) = 1 for n odd.
Tn ( j0) = 1
for n even.
1+2
Downloaded from www.bhawesh.com.np/ -78

Downloaded from www.bhawesh.com.np


Cn (1) = 1
1
Tn ( j0) =
for all n.
2
1+
0.1
1
1 10

(2) At = 1 ,

n=

cosh

10 0.1 p

cosh (s p )
equal ripple filter.
High attenuation in stop band and steeper roll-off near the cut-off frequency.
1

* For p = 1, s = 3.33 and p = 0.3dB s = 22dB Which filter is best.


Solution,
For butterworth filter n = 5. for chebyshev filter n = 3.
Greater efficiency of chebyshev filter compared with Butterworth filter.

Frequency transformation:If we wish to design a high pass or bandpass or bandstop filter it is a simple method to take a low
pass prototype filter (butterwoth , chebyshev) perform a frequency transformation.
One possibility is to perform the frequency transformation in analog domain and then to convert
analog filter into corresponding digital filter by a mapping of s-plane into z-plane and alternative
approach is first to convert the analog low pass filter into digital low pass filter into a desired digital
filter by a digital transformation.
In general, these two approaches yields different results except for bilinear transformation in which
case the resulting filter designs are identical.

Frequency transformation in analog domain:Type of transformation Transformation


Low pass
S ps

Band edge freq. of new filter.

p'

p'

High pass
Band pass
Band stop

p'

p'

s
s2 + L u

L , u

S p s ( u L )
s ( L ) ,
S p 2 u
L
u
s + Lu

p
Q. Transform the single pole low pass butterworth filter with the system function H (s) = s + p into
band pass filter with upper and lower band edge frequency u and L respectively.
Solution:
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 79

Downloaded from www.bhawesh.com.np


s2
+ Lu
S = p s( u L )
p
H (s) =
+ Lu
s

p
s(u L )
+p
= s(u L )
2

s + (u L )s + L u
2

Frequency transformation in digital domain (spectra transform):


Conversion of prototype digital low pass filter into either band pass, band stop, high
pass, or another low pass digital filter.
Need of spectral transformation:Impulse invariance method and mapping of derivative are inappropriate to use in designing
high pass and many band pass filter due to a aliasing problem.
Consequently one could not employ an analog frequency transformation followed by
conversion of the result into digital domain by use of this two mapping instead it is much better to
perform the mapping analog low pass filter into digital low pass filter by either of these mapping and
then to perform frequency transformation in digital domain.
The problem of aliasing is avoided.
Type of transformation Transformation
1
Low pass
z 1 z a
1 az 1

parameter
'
p = band edge frequency of new filter

'
p

p[

sin

2
a=

'
p

+ p

sin

2
High pass

z 1

z 1

+a

1 + az

'

cos

p + p[

2
a=

'
p p
cos

2
Band pass

z 1 z 2 a1 z 1 + a2
a 2 z 2 a z 1 + 1
1

L = Lower band edge frequency


u = Upper band edge frequency
a = 2k
1
k +1
k 1
a2 =
k+1

Downloaded from www.bhawesh.com.np/ -80

Downloaded from www.bhawesh.com.np


'

+
u

cos

a=

'

cos

k = cot

'

+ L

. tan( p / 2)

2
Band stop

z 1

a 1 z + a2
a1 =
,a2
2
1
k+1
a2 z a1 z +1
z

1
= k
1+k
'

+
u

cos

a=

cos

k = tan

'

'
. tan( p / 2)

# Design a low pass butterworth filter to meet the following specifications:Passband gain = 0.89
Passband frequency = 30 hz.
Attenuation = 0.20 Stopband
edge = 75 Hz.
Solution:
p = 2 30 = 188.4 rad / sec
s = 2 75 = 471.2 rad / sec
p = 20 log(0.89) = 1.01dB

= 20 log(0.20) = 13,98dB
0.1
1
10
s

log

10 0.1 p 1

n = 2 log( p / s ) = 2.466 3
3 dB cut off frequency,
p
= 23.55 rad / sec

c =
(100.1 p 1)
From table for N = 3, and c =1, we have

H (s) = ( ) s +1) /(s +


s+1
2

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 81

Downloaded from www.bhawesh.com.np


This function is normalized for c =1. However c = 235.55, we need to denormalized H(s) by
c =235.55 rad/sec.
1
H (s) s = s / L = ( s / c +1)(s2 / c2 + s / c +1)
Where, c = 235.55 rad/sec.
# Design a low pass FIR filter with specification p = 0.2 , s = 0.65 , p = 0.4dB , s = 1.5dB . Use

bilinear transformation method.


Solution:
p = 2 tan(p / 2)= 2 tan(0.2 / 2) = 0.649(T = 1))
T
T
2 tan( / 2) = 3.263

Order of filter,
10
log

0.1

10

0.1 p

n = 2 log( p / s ) = 1.783 2
3 dB cut off frequency,
p
c =
= 1.164
1
2n
(100.1 1
From table for n = 2 and c = 1 , we have
1
2
H (s) = s + 1.4145 + 1
Now denormalizing with c = 1.164
p

1
H (s) s = s / c = s / + 1.41s / c + 1
2

2c
= s2 + 1.414s + 2
c

s + 1 .414 s

+2

Now using bilinear transformation,


2 z 1
z 1
s=

T z +1

H (z) =
2

=2

z 1
z+1

z +1
2

, (T

= 1)

1.354
z 1

+ 1.645 2

z +1

+ 1.3548

Downloaded from www.bhawesh.com.np/ -82

Downloaded from www.bhawesh.com.np

0.2
of band edge frequency p = 0.2 into a high pass filter H n (s)
s + 0.2
'
with pass band edge frequency p = 0.5
Solution:

Q. Convert a given H p (s) =

'

p p
s

0.2 0.5 0.1


=
s
s
'
p p
0.2
=

H n (s) = H p

0.25
=

0.1/ s + 0.2 0.25 + 0.1

s
H n (s) =
s + 0.5
1
Q. Use bilinear transformation to obtained digital low pass filter to approximate H ( s) = s + 2 s + 1 .
Assume cut off frequency of 100 Hz and sampling frequency of 1 khz.
Solution:
c = 2 100 ( Normalizing with fs )
1000
= 0.2 rad/sec
= 2 tan( / 2) = 0.65 (T = 1)
2

Now, denormalizing H(s) with c = 0.65 we get,


H L (s) = H (s)

1
s = s / c =

+ 2 (s / 0.65)+1
0.65
0.4225
2
+ 0.919s + 0.4225
=s
2 z 1
z 1

Now we substitute, s = T z + 1 = 2 z + 1
0.4225
H (s) =
z
z 1
1
2
+ 0.919 2

( T = 1)

+ 0.4225

z+
+1
1
z
Q. Using bilinear transformation design a butterwoth filter which satisfy the following condition.
0.8 H (e

jw

) 1

H (e jw ) 0.2
Solution:

0 0.25
0.6

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 83

Downloaded from www.bhawesh.com.np


Tn(j)

Transition band
1
Stop band

0.8
Pass band
0.2
= 0.2
s

= 0.6

p = 20 log(0.8) = 0.93dB
s = 20 log(0.2) = 13.97dB
p = 0.2 , s = 0.6
p = 2 tan(p / 2)= 0.65
T
2 tan( / 2) = 0.75
s =
s
T
0.1
1
10

0.1 p

1
2 log( p / s )
p
log

n=

10

= 0.75

(10 1)
From table, for n = 2 and c = 1
1
2
H (s) = s +1.414s + 1
Now, denormalizing with c = 0.75
c

0.1

2n

1
H (s) s = s / c = ( s / 0.75) + 1.414(s / 0.75) +1
0.56
2
= s + 1.065 + 0.56
Using bilinear transformation,
2 z 1
(r = 1))
s=
T z +1
0.56
H (s) =
z 1
z 1
2
2
+ 1.06 2
+ 0.56
z +1
z+1
2

Downloaded from www.bhawesh.com.np/ -84

Downloaded from www.bhawesh.com.np


0.245(1 + z 1 )
into bandpass filter
1 0.509z 1
with upper and lower cut off frequency u and c respectively. The low pass filter has 3 dB bandwidth
Q. Convert low pass butterworth filter with system function H (s) =

p = 0.2 . (u = 3 / 5, L = 2 / 5)
Solution:
L
k = cot
tan( p
/ 2)
2
=1
+
cos u
L
2
=0
=
cos u L
2
u

a=

a2 =

k +1
k 1
k +1

=0

=0

Now, z1 z2
TF becomes,
0.245(1 z2 )
H ( z) =
2
1 + 0.509z
Date: 2066/10/9

Chapter: 7
FIR filter design:FIR filter:- The digital filters can be classified either as finite duration unit impulse response (FIR)
filters or infinite duration unit impulse response (IIR) filters depending upon the form of unit impulse
response of the system. In FIR system the impulse response sequence is of finite duration.
For example the system with impulse response,
2
for n is FIR system
h(z) =
0
otherwise
FIR filters are generally implemented using structures with no feedback (i.e non recursive structure). An
FIR filters of length N can be d escribe by the following difference equation.
y(n) = b0 x(n) + b1x(n 1) + ........bn 1 x(n m +1)
M 1

or, y(n) = bk x(n k ) Where, bk is filter coefficient.


k =0

Symmetric and antisymmetric FIR filters:


The unit sample response of FIR filter is symmetric if it satisfies the following condition.
h(n) = h(M 1 n) , n = 0, 1, 2, M-1.
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 85

Downloaded from www.bhawesh.com.np


As in example let us consider the unit sample response given in figure for M = 6 sample.
h(n)

0 1

h(n) = h (5-n)
h(0) = h(5) =2
h(1) = h(4) = 4
h(2) = h(3) = 6

This is symmetric FIR filter.


The unit sample response of FIR filter is antisymmetic if it satisfies the following condition.
h(n) = -h (m-1-n) , n = 0, 1,M-1
As an example let us consider the unit sample response shown in figure for M = 6 samples.
h(n)

6
4

2
0

5
-2

-4
-6

h(n) = -h(5-n)
h(0)=-h(5) =2
h(1)=-h(4)=4
h(2)=-h(3)=6
This is antisymmetric FIR filter.
Note: The condition for linearity phase FIR filters is h(n) = h(M 1 n)
j

The phase of linear phase filter is e

M 1
2

# Show that the digital FIR filter with impulse response h(n).
h(n) = {2,4,6,6,4,2} is liner phase system. Is this antisymmetric?
Downloaded from www.bhawesh.com.np/ -86

Downloaded from www.bhawesh.com.np


Solution:
h(n) = h(M 1 n)
Here, M = 6.
h(n) = h(5
n) Where,
h(0) = 2, h(1) = 4, h(2) = 6, h(3) = 6 h
(4) = 4, h(5) = 2,
h(0) = h(5) = 2
h(1) = h(4) = 4
h(2) = h(3) = 6
Hence the system has linear phase and h(n) is not antisymmetric since h(n) = h(M-1-n)
# A digital filter has impulse response given by h(n) = { 1, 0, 0, 0, 0, 0, -1}. What is its system function.
Which class of linear phase filter does this system belong to ? Justify.
Solution:
System function,
6

H ( z) = h(n)z

n =0

= 1 z 6
Linear phase FIR filter satisfies the
conditions, h(n) = h(M 1 n)
Here, M= 7, h(n) = h(6-n)
h(0) = -h(6) = 1
h(1) = - h(5) = 0
h(2) = -h(4) = 0
h(3) = -h(3) = 0
Hence, this system belong to antisymmetric.
-j2w

# A linear phase filter has a phase function e . What is the order of the filter.
Solution:
The phase of linear phase filter is given by,
j

M 1

=e 2
j2w
Comparing with e
M 1
=2
M=5
2

Design of FIR filter using fourier series method:jw


The frequency response Hd (e ) of a system is periodic in 2 .We know that , periodic function can be
expressed as linear combination of complex exponentials. Therefore the desire frequency response of FIR filter
may be represented by fourier series.
H d (e

j n

) = hd (n)e

. (1)

n =

Where, the fourier coefficients hd(n) are the impulse response sequence of the filter given by,
j j n
h (n) = H (e )e d (2)
d
d
Also, z-transform of the sequence is given by,

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 87

Downloaded from www.bhawesh.com.np

H(z) =

hd (n) z

(3)

n =

Equation (3) represents a non-causal digital filter of infinite duration to get an FIR filter transfer function
the series can be truncated by assigning.
h (n) for

h(n) =

N 1
2

(4)

otherwise

Then we have,
N 1
2

h(n)z

H (z) =

1 ..(5)

N 1

n =

N 1
2

=h

N 1
2

+ h(1)z

+ .........h(0) + ...... + h

N 1
2

( N 1 2 )
z

N 1

2
n
n
H ( z) = h(0) + h(n)z + h(n) z
n =1

(6)

For symmetrical impulse response symmetrical at n = 0.


h(-n) = h(n) (7)
Therefore equation (6) becomes,
N 1
2

H ( z) = h(0) + h(n)[zn + z

n =1

..

(8)

This TF is not physically realizable. Realizability can be brought by multiplying the equation (8) by
Where,

N 1

is delay in samples.

2
We have,

H '( z) = z
=z

1
H(z)

2
N

N 1
2

1
2

h(0)

+ h(n) z
n =1

+z

] .. (9)

# Design ideal lowpass filter with following frequency response.


1
for / 2 / 2

H d (e j ) =

for / 2
0
Determine the values of h(n) for N = 11. Find frequency response.
Solution:
hd (n) = 2

jn
jn
H d (e )e d

Downloaded from www.bhawesh.com.np/ -88

Downloaded from www.bhawesh.com.np


=2

/ 2
jn
/ 21.e

d
j

d(e )

sin n
=

/2

/2

, <n<

Now truncating hd(w) to 11 samples, we get,

sin n

h(n) =

for n 5

0
otherwose
h(0) =
h(1) = h(-1) = 0.3183
h(2) = h(-2) = 0
h(3) = h(-3) = -0.106
h(4) = h(-4) = 0
h(5) = h(-5) = 0.06366
N 1

TF, H(z) = h(0) + h(n) z


2

n =1

+z

= 0.5 + 5 h(n) z n + z n
n =1

]
]

= 0.5 + 0.3183(z1 + z 1 ) 0.106( z3 + z 3 ) + 0.06366(z5 + z 5 )

TF, of realizable filter will be,


N +

5
H ( z) = z 2 H (z) = z H ( z)
2
4
5
6
8
10
= 0.06366 0.106z
+ 0.318z
+ 0.5z + 0.318z 0.106z + 0.06366z
'

From above, the filter coefficients of causal filer are given


as, h(0) = h(10) = 0.06366
h(1) = h(9) = 0
h(2) = h(8) = -0.106
h(3) = h(7) = 0
h(4) = h(6) = 0.013183
h(5) = 0.5
Window techniques for designing FIR filters:
In this method we begin with the design frequency response specification Hd(w) and determine the
corresponding unit sample Hd(n) indeed Hd(n) is related to Hd(w) by the fourier transform relation.

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 89

Downloaded from www.bhawesh.com.np

H d () = hd (n)e jn (1)
n =0

Where,

hd (n) =

1
2

H d ()e jn d .. (2)

In general unit sample response H d (n) obtained form equation (2) is infinite in duration and must be truncked at
some point say at n = M-1, to yield FIR filter of length L. Truncation of H d (n) to a length M-1 is equivalent
to multiplying H d (n) rectangular window defined as,
1
n = 0,1,2..........M 1
(w) =
(3)
0

otherwise

This unit sample response of FIR filter becomes ,

n = 0,1........M 1

= h (n)(n) = d
0
d

h(n)

. (4)

otherwise

It is instructive to consider the effect of window function on the desire frequency response H d () . The
multiplication of the window function (w) with hd (n) is equivalent to convolution of H d () with W () .
Where W () is the frequency domain representation of window function.
M 1

W () = W (n)e

jn

.. (5)

n =0

Thus the combination of Hd( ) with W () yields the frequency response of FIR filter.

H () =

H (v)W ( v)dv
d

Fourier transform of rectangular window is ,


M 1

W () = e

jn

n =0

1 e
= j
1 e
j M

= e j ( M 1 / 2 )
( 2)sin

sin M 2
( )

The window function has a magnitude response,

sin(M
2
W ( ) =
sin(
2)

And a piece wise linaer phase .


M 1

() =

= M 1 +

sin(M / 2) 0

When,
When,

sin(M 2)<0
Date: 2066/10/11

Downloaded from www.bhawesh.com.np/ -90

Downloaded from www.bhawesh.com.np


Name of window Time domain sequence

(n), 0 n 1
Rectangular
Hamming

Hanning

2n
M 1
cos 2n
M 1

0.54-0.46cos
1

2
Kaiser
I0

M 1

I0

M 1

2
Where Io is zero order Bessel function.

M 1
2

Rectangular
kaiser
1
Hamming
Hanning
0

M-1

Name of window

Window function.

(n), n

Hamming
Hanning

M-1

M 1

2
2n
0.54-0.46cos
M 1
1
2n
1 + cos

M 1

Gibbs phenomenon in FIR filter design:


M=31
Magnitude
M=61

frequency

Fig: frequency response of filter.

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 91

Downloaded from www.bhawesh.com.np


We observe that relatively large oscillation or ripple occur near the band edge of filter the oscillation increases in
the frequency as N increases but they do not diminish in amplitude. Large oscillation are direct result of large
side lobes existing in frequency characteristics of W () of rectangular window. Fourier series representation of

H d (), multiplication of hd () with rectangular window is identical to trunked in fourier series representation
of desire filter characteristic H d () . The truncation of fourier series is known to introduce in frequency
response characteristic H () due to non uniform convergence of fourier series at discontinuity. The oscillatory
behavior near the band edge of the filer is called Gibbs phenomenon.
To alleviate the presence of large oscillation in both the pass band and stop band we should use a window
function that contains a taper and decay towards zero gradually instead of abruptly.
Design of FIR filter by Frequency sampling method:In the frequency sampling method of IIR filter design we specified the desire frequency response H d () at a
set of equally spaced frequency.
Namely k = 2 (k + ) . (1)

M
Where, k = 0, 1, ..
K = 0, 1 .

= 0, or

M 1 for M odd.
2
M
1 for M even.
2

2
And solve the unit sample respose n/w of the FIR filter from these equally spaced frequency specification. Now
the desire frequency response is
M 1

H(w) = h(n)e

jn

n =0

Suppose that we specify the frequency response of the filter at the frequency given by equation (i).

H (k + ) = H

(k + )

M
H (k + ) = h(n)e

j 2

( k + )n / M

(2)

Where, k = 0, 1, . M-1
It is simple matter to invert (2) and express h() in terms of H (k + )
1 M 1
h(n) =
H (k + )e j 2 ( k + ) n / M . (3)
M
k =o

Where, n = 0, 1 M-1
This relationship in (3) allows us to compute the values of unit sample response h(n) from the specification of
frequency sample H (k + ) , k = 0, 1, ..M-1. Note that when = 0 (2) reduces to discrete fourier transform
(DFT) of the sequence h(n) and the expression (3) reduces to IDFT.
# Design a low pass FIR filter with 11 coefficient for the following specification.
Passband frequency = 0.25 khz
Sampling frequency = 1 khz.
Use rectangular window, Hamming window and hanning window.
Solution:

Downloaded from www.bhawesh.com.np/ -92

Downloaded from www.bhawesh.com.np


fc = 0.25khz

c = 2 0.5 =
1

()

hd (n) = 2

/ 2
jn
/ 21.e

/2

/2

= 1 sin(n / 2)
2 (n / 2)
hd(0) =
hd(1) = hd(-1) = 0.3148
hd(2) = hd(-2) = 0
hd(3) = hd(-3) = -0.0162
hd(4) = hd(-4) = 0
hd(5) = hd(-5) = 0.06369
Rectangular window:-

w(n) = 1

5n5

h(n) = hd(n) w(n)


h(0) = hd(0) w(n) = 0.5
h(1) = hd(-1) = 0.3184
h(2) = hd(-2) = 0
h(3) = hd(-3) = -0.1062
h(4) = hd(-4) = 0
h(5) = hd(-5) = 0.06369
Hamming window:

2n

Wham(n) = 0.54+0.46 cos

= 0.54+0.46cos

M 1
2n
10

M 1
2

M 1
2

55

h(n) = hd (n)Wham (n)


Wham (0) = 1
Wham (1) = Wham (1) = 0.9121
Wham (2) = Wham (2) = 0.6828
Wham (3) = Wham (3) = 0.3970
Wham (4) = Wham (4) = 0.1679
Wham (5) = Wham (5) = 0.08

- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 93

Downloaded from www.bhawesh.com.np


h(0) = hd (0)Wham (0) =
0.5 h(1) = h(1) = 0.2904
h(2) = h(2) = 0
h(3) = h(3) = 0.04225
h(4) = h(4) = 0
h(5) = h(5) = 0.005095
H(z) ..
Similarly Hanning window
Q. A low pass filter is required to be design with design frequency response which is expressed as follows, as we
e
j

H d (e

j 2

/ 2 /4
for / 4

)=

Obtain the filter coefficient hd (n) if the window function is defined as,
W (n) =

1 0n4
0

otherwise

Q. Design a low pass filter having desire frequency response given as,

H d (e

j 3

)=

0/2
/

Obtain filter coefficient h(n) for M = 7 using frequency sampling method.


Solution:

W k = 2 (k + )
M

=0
6

h(n) = 1 e j 32k / 7e j 2kn / 7


7

n = 0, 1, . 6.

k =0

h(0) = 1 e j 6k / 7 =

k =0

# Remez exchange algorithm (prokish book )

Reference for chapter (8)


- TMS 320 Texas instrument (Sanjaya sharma)
- Bit serial arithmetic (Digital logic book)
- Serial adder.
- Distributed arithmetic and pipelined implementation.

Downloaded from www.bhawesh.com.np/ -94

Вам также может понравиться