Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
np
1. Discrete signals 5
1.1 Discrete signals – unit impulse, unit step, exponential 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
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 partial fraction expansion.
3.4 Z transform properties – delay advance, convolution, Parseval’s 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
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.jayaram.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.
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.
Digital Digital
input signal output signal
- 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.
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.jayaram.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.
Figure:
n
-2 -1 1 2
U(n) = 1 , n ≥ 0
= 0, n<0
0 1 2 3
∞
= ∑ δ (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)
* Exponential Sequence:-
The exponential signal is a sequence of the form x(n) = an 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
a< 1
0 < a < 1:
Eg a = ½
i.e (1/2)n = 0, ½ , ¼, 1/8 (exponential decreasing)
(see figure (i))
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 5
Downloaded from www.jayaram.com.np
a > 1,
E.g , a = 2
i.e (2)n = 1,2, 4, 8 (Exponential increasing)
(See figure (ii))
-1 < a <0
Eg.: -1/2
i.e (-1/2)n = 1, -1/2, ¼, -1/8
(See fig (iii) )
a <-1
E.g a = -2
(-2)n = 1, -2, 4, -8
(See figure(iv) )
Exponential sequence:-
When the parameter ‘a’ is complex values , it can be expressed as:
a = rejθ
Where r and θ are new parameters. Hence, we can express x(n) as:
X(n) = rn ejθ
= rn (cos θn + jsin θn)
Since, x(n) is now complex values, it can represented graphically by plotting the real part,
xe(n) = rncos θ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
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.
|x(n)| = A(n) = rn
And phase function
∠x(n) = ø(n) = θn
1) Functional representation:-
2) Tabular representation:
n ----- 2 -1 0 1 2 3 4
x(n) ----- 0 0 0 1 4 1 0
3) Sequence representation:
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 x 2 (n) → a1 y1 (n) + a 2 y 2 (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.jayaram.com.np
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,
y1 (n) = x 2 (n − n0 )
∴ y1 (n) = y (n − n0 )
Hence the system is shift invariant system.
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.
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 0 1 2 3
A discrete time sequence signal be represented by a sequence of individual impulses as shown in figure:
x(0)δ(n) x(1)δ(n-1)
1 2 3
-1
0 0 1
-2 0 -1 1 2
We can write,
X(n) = …………+x(-1)δ(n+1) +x(0) δ(n) +x(1) δ(n-1) +x(2) δ(n-2) + ………..
∞
= ∑ x(k )δ (n − k )
k = −∞
..........(i ) (convolution sum)
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 )
k = −∞
..........(ii )
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 = −∞
3 3
2 2 2
k k
3 0 1 2 3
1 1
-2
k
3
-1
1
∑ x(k )h(−k )
k =0
= x(0)h(0) + x(1)h(−1)
= 2+2 = 4
2 2
k
0 1
For n = -1
∞
y(-1) = ∑ x(k )h(−1 − k )
k = −∞
2
1
1 1
n(-1-k) x(k)n(-1-k)
-3 -2 -1 0
-2
For n = -2
∞
Y(-2) = ∑ x(k )h(−2 − k )
k = −∞
For n= 1
∞
Y(1) = ∑ x(k )h(1 − k )
k = −∞
= 1+4+3 = 8
2 4
1 1 1 3
x(k)(1-k)
-1
k k
0 1 2 0
-1
For n = 2
∞
Y(n) = ∑ x(k )h(2 − k )
k = −∞
= -1+2+6+1 = 8
3
6
2
1
1
2
0 0
k k
1 2 3 1 2 3
x(k)h(1-k)
-1 -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:
h(n) = an 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 = −∞
1 1 1 1 1
a
a2
1
k k
0 1 2 3 0 1 2 3
1
a
a2
h(-k)
a3
k
-3 -2 -1 0
For n =1:
∞
y(1) = ∑ x(k )h(1 − k )
n = −∞
=1+a
1 1
a a
a2 x(k)h(1-k)
h(1-k)
a2
k k
-1 0 1 2 0
For n = 2:
∞ a (1 − r n )
y(2) = ∑ x ( n ) h( 2 − n )
k = −∞
= 1+a+a 2 S=
1− r
For n > 0
1
y(n) = 1+a2 + …….+an
a 1− an
=
a2
x(k)h(2-k)
1− a
k
0 1 2
For n < 0
y(n) = 0
1 − a n +1
y(∞) = lim n → ∞ y(n) = lim n → ∞
1− a
1
=
1− a
y(n)
1
1-a
1+a+a 2
1 1+a
k
0 1 2
h1(n)*h2(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.
h1(n) = (1/2)n u(n)
h2(n) = (1/u)n u(n)
Solution:-
The overall impulse response is
h(u) = h1(n)* h2(n)
∞
= ∑ h (k )h (n − k )
k = −∞
1 2
1 1
1/2 h1(k) 1/4 h2(k)
1/4 1/6
k k
h2(-k) h(n-k)
1 1
1/4 1/4
n >0
1/6 1/6
k k
∑ (1 / 2) (1 / 4)k n−k
=
k =0
n
∑ (1 / 2) (1 / 4)
−k
= (1/4)n k
k =0
= (1/4) n
∑ (2) k
2 n +1 − 1
= (1/4)n
2 −1
= (1/4)n (2n+1-1)
= (1/2)n [ 2 – (1/2)n] , n ≥ 0
Note:- If we have ‘L’ LTI system is cascade with impulse responses h1(n) and h2(n) ……….hL(n) , the
impulse response of equivalent LTI system is
h(n) = h1(n) * h2(n)*h3(n) ……..*hL(n)
∞
= e jwn ∑ h ( k )e
k = −∞
− jwk
If we define,
∞
H|ejw| = ∑ h( k ) e
k = −∞
− jwk
H|ejw| describes the change in complex amplitude of complex exponential as a function of frequency w.
H(ejw) is called frequency response of the system.
In general H(ejw) is complex and can be expressed in terms of its real and imaginary parts as:
H (ejw) = HR (ejw)+j HI (ejw)
Or , In terms of magnitude and phase as,
H(ejw) = |H(ejw)|ej∠H(ejw)
Let,
x(n) = Acos(won +ø)
= A/2 ejwon.ejø +A/2 e-jwon. e-jø
The response to x1(n) = A/2 ejø ejwon is,
y1(n) = H(ejw) A/2 ejø ejwon
The response to x2(n) = A/2e-jø e-jwon is ,
y2(n) = H(e-jw) A/2 e-jø. e- jwon
Thus, total response is ,
y(n) = A/2 [H(ejwo)e-jø. ejwon +H(e-jwo)e-jø . e-jwon]
= A |H(e-jwo)| cos(won+ø+θ).
Where, θ = ∠ H(ejwo)
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).
# Determine the range of value of the parameter a for LTI system with impulse response.
h(n) = an u(n) is stable.
Solution,
∞
Sn = ∑ h( k ) < ∞
k = −∞
∞ ∞
= ∑ h( k ) = ∑ a k
k =0 k =0
= 1 + a + a + a 3 + .............
2
1
= Provided that a < 1
a− a
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.
h ( n) = a n n ≥ 0
= bn n < 0 is stable.
∞ −1 ∞
Sn = ∑ h( k ) = ∑ b
k = −∞ k = −∞
k + ∑ ak
k =0
The first sum coverage for a < 1 . The second sum can be manipulated as,
−1 ∞
1
∑b =∑
k
k
k = −∞ k =1 b
1 1 1
= + 2 + 3 + ..............
b b b
1
= 1 + 1 + 1 + ..........
b b
2
b
3
= 1 + β + β + β + ...........
2 3
Date: 2066/07/23
Solution:-
Assume that, BIBO =
|x(n)| < Mn < ∞ for all n. 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
Since, Mx is finite value , |y(n)| also finite. Hence the system is BIBO stable.
Solution:
Assume
y ( n) = r n x ( n )
= r n x(n)
With r >1, the multiplying factor rn diverges for increasing n and he=nce o/p not bounded. Hence the
system is BIBO unstable.
Figure;
=
1
[g (t ) + 2 g (t ) cos ws t + 2 g (t ) cos 2ws t + 2 g (t ) cos 3ws t + ......]
Ts
G ( w) =
1
[G (w) + G( w − ws ) + G (w + ws ) + .......]
Ts
∞
1
=
Ts
∑ G (w − nw )
n = −∞
s
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.
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
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.jayaram.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.
Date: 2066/07/26
Chapter:- 2
Discrete Fourier transform:-
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
0 kω 2π
ω
δω
Fig: Freq. domain sampling.
2πk N −1 2 N −1 3 N −1
= ...... + ∑ x(n)e + ∑ x(n)e − j 2πkn / N + ∑ x(n)e − j 2πkn / N + .......
− j 2πkn / N
X
N n=0 n= N n=2 N
∞ lN + N −1
= ∑ ∑ x ( n) e
l = −∞ n = ln
− j 2πkn / N
If we change the index in the inner summation form n to n-ln and integrating the order of summation we
obtained,
2πk N −1 N −1 − j 2πkn / N
X = ∑ ∑ x(n − nl ) e ………..(3)
N n =0 n =0
The signal
∞
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 N
xp(n)
N <L
n
L −1
In summary a final duration sequence x(n) of a length L as fourier transform X ( w) = ∑ x(n)e − 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,
2πK N −1
= ∑ x ( n )e
− j 2πkn / N
X (k ) = X …………. (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
1 1 1 1
x ( 0) X ( 0) 1 W 1 2 N −1
xN= x(1) = X (1) WN = N WN WN
XN
. W N2 W N4 W N2( N −1)
x(n − 1) X ( N − 1) N −1
1 W N W N2( N −1) W N( N −1)( N −1)
3
X (k ) = ∑ x(n)e − jπkn / 2
n=0
3
X (0) = ∑ x(n)e 0 = x(0) + x(1) + x(2) + x(3) = 6
n =0
3
X (1) = ∑ x(n)e − jπn / 2 = x(0) + x(1)e − jπ / 2 + x(2)e − jπ + x(3)e − j 3π / 2 = 6
n=0
X(2) = -2
X(3) = -2.4
By matrix method,
1 1 1 1
1 − j − 1 j
W4 =
1 − 1 1 − 1
1 j − 1 − j
0 X ( 0)
1 X (1)
xN = X4 =
2 X ( 2)
3 X (3)
X4 =W4 * x4
1 1 1 1 0
1 − j − 1 j 1
= *
1 − 1 1 − 1 2
1 j − 1 − j 3
0 + 1 + 2 + 3 6
0 − j − 2 + 3 j − 2 + 2 j
=
= 0 − 1 + 2 − 3 − 2
0 + j − 2 − 3 j − 2 − 2 j
Solution:-
xN =( WN*/N ) XN x4 =( W4*/4) X4
60 1 1 1 1
0 1 − j − 1 j
X4 = W4 =
− 4 1 − 1 1 − 1
0 1 j − 1 − j
x4 =( W4*/4) X4
1 1 1 1 60
1 − j −1 j 0
=¼
1 − 1 1 − 1 − 4
1 j − 1 − j 0
Properties of DFT:-
The notation used to denote N-point DFT pair x(n) and X(k) as x(n) DFT X(k)
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.
Proof:
N −1
X(k+N) = ∑ n( k ) e
n =0
j 2πk ( k + N ) / N
N −1
= ∑ X ( k )e
n =0
j 2πkn / N
e j 2πn
=X(k)
2) Linearity: -
If x1(n) DFT X1(k) and
x2(n) DFT X2(k) Then, for any real or complex valued constants a1 and a2
x(n) = a1x1(n) +a2x2(n) DFT X(k) = a1X1(k)+a2X2(k)
Proof:-
N −1
a1x1(n) +a2x2(n) DFT ∑ a x ( n) + a
n =0
1 1 2 x 2 (n) e − j 2πkn / N
N −1 N −1
= a1 ∑ x1 (n)e − j 2πkn / N + a 2 ∑ x 2 (n) e − j 2πkn / N
n=0 n=0
= a1X1(k) +a2X2(k)
Date:2066/08/01
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.
n
0 1 2 3
n
-4 -3 -2 -1 0 1 2 3 4 5 6 7
xp(n-2)
n
-6 -5 -4 -3 -2 -1 2 3 4 5
4
x’(n)
2
1
3
n
0 1 2 3
x(1)=2 x’(1)=4
x(3)=4 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.
N −1
XR(k) = = ∑ ( x R (n) cos 2πkn / N + x I (n) sin 2πkn / N ) ……..(3)
n =0
N −1
XI(k) = ∑ ( x R (n) sin 2πkn / N − x I (n) cos 2πkn / N ) ………(4)
n =0
Similary,
N −1
xR(n) = 1/N ∑(X
k =0
R (k ) cos 2πkn / N − X I (k ) sin 2πkn / N ) ………(5)
N −1
xI(n) = 1/N ∑ ( X R (k ) sin 2πkn / N + X I (k ) cos 2πkn / N ) ……….(6)
k =0
If x(n) is real,
X(N-k) = X*(k) = X(-k)
Proof:-
N −1
X(N-k) = ∑ x ( n )e
n =0
− j 2π ( N − k ) n / N
N −1
= ∑ x(n)e − j 2πn / N e − j 2πn
n =0
=X(-k) = X*(k)
IDFT Reduces to ,
N −1
x(n) = 1/N ∑ X (k ) cos 2πkn / N
k =0
0<=n<=N-1
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
k =0
3 (k )e j 2πkn / m
N −1
x3(n) = 1/N ∑X
k =0
1 (k ) X 2 (k )e j 2πkn / m
N −1 N −1 N −1
− j 2πkn / n − j 2πkl / N − j 2πkn / N
∑
= 1/N ∑ 1
k =0 n=0
x ( n ) e ∑ x 2 (l )e
l =0
e
N −1 N −1 N −1
= 1/N ∑ x1 (n)∑ x 2 (l ) ∑ e − j 2πk ( m − n −l ) / N
n =0 l =0 k =0
Now,
N −1
∑a
k =0
k
=N a =1
1− aN
= , a ≠1
a−a
Where, a = ej2π(m-n-l)/N
N −1
∑a
k =0
k
=N − l = m − n + pN = ((m − n)) N p is int eger
= 0 , otherwise
Hence,
N −1
x3(m) = 1/N ∑ x ( n) x
n =0
1 2 ((m − n)) N .N m = 0, 1, …..N-1
N −1
x3(m) = ∑ x ( n) x
n =0
1 2 ((m − n)) N
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.
Solution,
N −1
x3(m) = ∑ x ( n) x
n =0
1 2 ((m − n)) N
N = 4,
3
x3(m) = ∑ x ( n) x
n =0
1 2 ((m − n)) 4
3
x3(0) = ∑ x ( n) x
n =0
1 2 ((−n)) 4 = 14
x1(1)=1 x2(1)=2
x1(3)=1 x2(3)=4
4
4
x1(n)x2((-n))4=14
6 2
3 x2(-n) 1
2
2
3
x3(1) = ∑ x ( n) x
n =0
1 2 ((1 − n)) 4 = 16
1
1
x1(n)x2((1-n))4=16
8 4
4 x2((1-n))4 2
3
3
3
x3(2) = ∑ x ( n) x
n =0
1 2 ((2 − n)) 4 = 14
2
2
x1(n)x2((2-n)) 4=14
2 6
1 x2((2-n))4 3
4
4
3
x3(3) = ∑ x ( n) x
n =0
1 2 ((3 − n)) 4 = 16
3
3
x1(n)x2((3-n)) 4=16
4 8
2 x2((3-n))4 4
1
1
1 1 1 1 2 6
1 −j −1 j 1 0
X1 = * =
1 −1 1 − 1 2 2
1 j −1 − j 1 0
1 1 1 1 1 10
1 −j −1 j 2 − 2 − 2 j
X2 = =
1 −1 1 − 1 3 − 2
1 j −1 − j 4 − 2 − 2 j
60
0
X3 =
− 4
0
IDFT:
x3 = (W4*/4 )* X3
1 1 1 1 60
1 − j − 1 j 0
=¼
1 − 1 1 − 1 − 4
1 j − 1 − j 0
Parseval’s theorem:-
For complex valued sequence x(n) and y(n)
x(n) DFT X(k)
y(n) DFT Y(k)
Then,
N −1
1 N −1
∑
n =0
x ( n ) y * ( n ) = ∑ X (k )Y * (k )
N k =0
Proof:-
N −1
∑ x(n) y * (n) = r
n =0
xy
(0) Circular cross correlation sequence.
N −1
1
r xy (l ) =
N
∑R
k =0
xy (k )e j 2πkl / N
N −1
1
r xy (l ) =
N
∑ X (k )Y * (k )e
k =0
j 2 πkl / N
1 N −1
r xy (0) = ∑ X (k )Y * (k )
N k =0
In Special case, y(n) = x(n)
N −1 N −1
1 N −1
∑ x ( n ) y * ( n ) = ∑ x ( n) = ∑ X ( k )
22
n =0 n =0 N 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 j 2πk / N
n=0
The complex multiplication in direct computation of DFT is N2 and by FFT complex multiplication in
N/2 log2N. 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.
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 N −1
X (k ) = ∑ x(n) wNkn +
n even
∑ x ( n) w
n odd
kn
N
N / 2 −1 N / 2 −1
X (k ) = ∑ x(2m) wNk −2n +
m=0
∑ x(2m + 1)w
m=0
k ( 2 m +1)
N
But
(
W N2 = e − j 2π n / 2 )2
= e − j 2π /( n / 2) = W N / 2
N / 2 −1 N / 2 −1
X (k ) = ∑
m=0
f 1 (m) w Nkm/ 2 + W Nk ∑f
m =0
2 (m) wNkm/ 2
k
X(k) = F1(k) + W F2 (k ) n
Where F1(k) and F2(k) are N/2 point DFT of sequences f1(m) and f2(m) respectively.
F 1(0)
x(0) X(0)
F 1(1)
x(2) X(1)
N/2 point F1(2)
x(4) DFT X(2)
F1(3)
x(6) X(3)
F1(0)
x(1) X(4)
F1(1)
x(3) N/2 point X(5)
DFT F 1(2)
x(5) X(6)
F 1(3)
x(7) 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/4-1
And f2(n) would result.
v21(n) = f2(2n)
v22(n) = f2(2n+1) , n = 0, 1, …….N/4 -1
Then
x(0) X(0)
W N0 W N0 W N0
x(1) X(1)
W N4 W N2 W N1
X(2)
W N0 W N4 W N2
x(3) X(3)
W N4 W N6 W N3
x(4) X(4)
W N0 W N0 W N4
x(5) X(5)
W N4 W N2 W N5
x(6) X(6)
W N0 W N4 W N6
x(7) X(7)
W N4 W N6 W N7
Fig: 8-point DIT FFT algorithm
# 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)
W N0
x(2) X(2)
W N0
x(3) X(3)
W N2 W N0
x(4) X(4)
-1 W N0
x(5) X(5)
-1 W N1 W N0
x(6) X(6)
-1 W N2 W N0
x(7 ) X(7)
-1 W N3 W N0
Date:2066/08/11
Q. Compute 4-point DFT for the sequence x(n) = { 14, 16,14, 16} using FFT algorithm.
28 28
x(0)=14 X(0)=60
0 0
x(2)=14 X(1)=0
W N0=1
32
x(1)=16 X(2)=-4
6 X(3)=0
x(3)=16
W N0 =1 W N1
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) X(1)=0
WN0
x(1) X(2)=-4
-1 W40 =1
x(3) X(3)=0
-1 W41 WN0
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
n = −∞
−n
………..(1)
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)
= 1+2z-1+5z-2+7z-3+z-5
ROC: entire z-plane except z = 0 .
[
= δ (n) z − n n = 0 ]
=1
ROC: Entire z-plane.
[δ (n − k ) z ]
−k
−n z
n=k
ROC: Entire z-plane except z = 0
[
= δ (n − k ) z −n
]
n=k
−k
= z
ROC: Entire z plane except z = 0.
The problem of finding ROC for x(z) is equivalent to determining the range of values of r for which the
sequence x(n) r-n is absolutely sum able.
−1 ∞
X ( z) ≤ ∑
n = −∞
x ( n)r − n + ∑ x ( n) r − n
n=0
∞ ∞
x( n)
X ( z ) ≤ ∑ x( −n) r n + ∑ …………….(4)
n =1 n =0 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
product sequence x(-n) rn , 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 2nd term in equation (4) converges there must exists values of r large enough such that
x ( n)
product sequence n , …….. hence ROC for second sum in equation (4) consists of all points outside a
r
circle of radius r >r2 as shown in fig.
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:
Solution:
∞
X(z) = ∑ x( n) z
n = −∞
−n
∞
= ∑α
n = −∞
n
z −n
∞
= ∑ (αz
n = −∞
−1 − n
) = 1 + (αz −1 ) + (αz −1 ) 2 + ......
1
= for αz −1 < 1
1 − αz −1
x(n)
r
|α|
Re(z)
∑ (− α )z
−1
n −n
=
n = −∞
( )
∞
= − ∑ α −l z l
l =1
( ) [ ]
∞
= − ∑ α −l z = − (α −1 z ) + (α −1 z ) 2 + .........
l
l =1
α −1 z
= - for α −1 z < 1
−1
1− α z
1
= ROC : z < | α |
1 − α −1 z
x(n) Im(z)
z-plane
-3 -2 -1 |r|
Re(z)
∞
X(z) = ∑ x( n) z
n = −∞
−n
−1 ∞
= ∑ b n z −n + ∑ α n z − n
n = −∞ n=0
∞ ∞
= ∑ (b −1 z ) l + ∑ (αz −1 ) n
l =1 n=0
The first power series converges if |b-1z| < 1 i.e |z| < |b| and second power series converges if |αz-1| < 1
i,e |z| > |α|
z-plane
Re(z)
Im(z)
z-plane
|α |
Re(z)
1 1
X ( z) = − +
1 − bz −1
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)
∞
= ∑ ( a x ( n) + a
n = −∞
1 1 2 x 2 (n)) z − n
∞ ∞
= a1 ∑ x1 (n) z − n + a 2 ∑x 2 ( n) z − n
n = −∞ n = −∞
= a1X1(z)+a1X2(z)
X(z) = 3X1(z)-4X2(z)
1
X1(z) = Z {x1(n)} = ROC: |z| > 2
1 − 2 z −1
1
X2(z) = Z {x2(n)} = ROC: |z| > 3
1 − 3 z −1
The intersection of ROC of X1(z) and X1(z) is |z| > 3.
Now
3 4
X(z) = −1
− |z| > 3
1 − 2z 1 − 3 z −1
Solution:
x(n) = (coswon) u(n)
( )
= 1 / 2 e jw0 n + e − jw0 n u (n)
1 1
= e jw0 n u (n) + e − jw0 n u (n)
2 2
Using linearity property.
1 1
X(z) = Z {e jw0 n u (n)} + Z {e − jw0 n u (n)}
2 2
1 1
Z {e jw0 n u (n)} = = ROC: |z| > 1
1− e zjw0 n −1
1 − 2 z −1
1 1
Z {e − jw0 n u (n)} = − jw0 n −1
= ROC: |z| > 1
1− e z 1 − 2 z −1
1 1 1 1
X(z) = . jw0 n −1
+ . − jw0 n −1
2 1− e z 2 1− e z
−1
1 − z Cosw0
= ROC: |z| > 1
1 − 2 z −1 cos w0 + z − 2
1 jw0 n − jw0 n
(b) x(n) = (e e )u (n)
2j
1 − z −1 Sinw0
X(z) = ROC: |z| > 1
1 − 2 z −1 cos w0 + z − 2
Put n-k = m
∞
= ∑ x ( m) z
m = −∞
−( m + k )
∞
= z −k ∑ x ( m) z
m = −∞
−( m )
= z-k 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(n-2)
Now,
X2(z) = z2X1(n)
X1(z) = 1+2z-1+5z-1+7z-3+z-5
X2(z) = z2+2z+5+7z-1 +z-3
−1
= 1+ z + z −2 + z −3 ......... + z − ( N −1) = N if z = 1
1 − z −N
= 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 z −N
= −
1 − z −1 1 − z −1
1− z −N
= ROC: |z| > 1
1 − z −1
Next method
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 43
Downloaded from www.jayaram.com.np
u(n)
u(n-N)
0 N-1 N 0 N
Date:2066/08/25
Solution:
x(n) = an(coswon)u(n)
x1(n) = coswon u(n)
1 − z −1 cos w0
X1(z) = Z [cos w0 n u (n)] = ROC: |z| >1
1 − 2 z −1 cos w0 + z −1
Then,
X(n) = anx1(n)
1 − az −1 cos w0
X(z) = Z [a n x1 (n)] = X 1 (a −1 z ) = ROC: |z| >|a|
1 − 2az −1 cos w0 + a 2 z −1
Proof:
∞
Z [{x(− n)}] = ∑ x( − n) z
n = −∞
−n
Put , l = -n
∞
= ∑ x(l ) z
l = −∞
l
∞
= ∑ x(l )( z
l = −∞
−1 −l
)
= X(z-1)
If x(n) z X(z)
dX ( z )
Then n x(n) z -z
dz
Proof:-
∞
X ( z) = ∑ x ( n) z
n = −∞
−n
By differentiation,
dX ( z ) −∞
= ∑ x(n)(− n) z − n−1
dz n =∞
−∞
= − z −1 ∑ {nx(n) z − n
n =∞
−1
= − z Z {nx(n) }
dX ( z )
Z {nx(n)} = − z Note that both transform have same ROC.
dz
1
x1(n) = ROC; |z| >|a|
a − az −1
x(n) = n x1(n)
dX 1 ( z )
X(z) = Z{n x1(n)} =
dz
−1
= −z −1 2
az − 2
(1 − az )
az −1
= ROC: |z| >|a|
(1 − az −1 ) 2
Solution:
dX ( z ) 1
= −1
. − az − 2
dz (1 + az )
dX ( z ) az −1
−z = .
dz (1 + az −1 )
1
= az −1 −1
1 − (− a ) z
Taking inverse z-transform.
n x(n) = a(-a)n-1 u(n-1)
x(n) = (-1)n-1 . an/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) = ∑ x (k ) x
k = −∞
1 2 (n − k )
∞ ∞
X ( n) = ∑ ∑ x (k ) x
n = −∞ k = −∞
1 2 (n − k ) z −n
∞ ∞
X ( n) = ∑
k = −∞
x1 (k ) ∑ x 2 (n − k ) z − n
n = −∞
∞
X (n) = ∑ x (k ) z
k = −∞
1
−n
x2 ( z )
∞
X (n) = X 2 ( z ) ∑ x1 (k ) z − n
k = −∞
= X2(z)X1(z)
Inverse z-transform.
∞
X ( z) = ∑ x(k ) z
k = −∞
−k
………….(i)
Multplyign both sides of (i) by zn-1 and integrate both sides over a closed contour within the ROC of
X(z) which enclosed the origin .
Now,
∞
n −1
∫ X ( z ) z dz = ∫ ∑ x( k ) z n −1− k
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) .
∞
n −1
∫ X ( z ) z dz = ∑ x(k ) ∫ z
k = −∞
n −1− k
dz.........(3)
C
From Cauchy integral theorem ,
Figure:
1 1 k = n
∫ z n −1− k dz =
2πj C 0 k ≠ n
Then,
∫ X ( z) z
n −1
dz = 2πjx(n)
1
X ( z ) z n −1 dz ……..(4)
2πj C∫
x ( n) =
If x1(n) z X1(z)
x2(n) z X2(z)
Then
1 z
x(n) z x1(z)x2(z) zX(z) = ∫ X 1 (u ) X 2 v −1 dv
2πj C v
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 ( n) z
n = −∞
−n
∞
X ( z) = ∑ x ( n) x
n = −∞
1 2 (n) z − n
Where,
1
x1 (n) = ∫ X 1 (v)v n −1 dv
2πj C
* z −1
*
1
2πj C∫
x1 (n) = X 1 (v) X 2 v dv
v
−n
1 ∞ z −1
∑ 2
2πj C∫
X ( z) = X 1 ( v ) x ( n ) v dv
n = −∞ v
8) Parseval’s theorem:-
∞
1
∑ x ( n) x
n = −∞
1 2 * (n) =
2πj C∫
X 1 (v) X 2* (1 / v * )v −1 dv
X ( z ) = ∑ cn z −n
When
(a) ROC: |z| > 1
(b) ROC : |z| <0.5
Solution:
(a) ROC: |z| >1 , x(n) is causal signal.
-1 -2 -1 -2
1-0.5z +0.5z ) 1 (1-0.5z -0.25z
-1 -2
1-0.5z +0.5z
-1 -2
0.5z -0.5z
-1 -2 -3
0.5z -0.25z +0.25z
-2 -3
-0.25z -0.5z
-2 -3 -4
-0.25z +0.5z -0.125z
-3 -4
0.375z +0.125z
-3 -4 -5
-0.375z +0.18175z +0.18175z
-4 -5
-0.0625z +1.8175z
X ( z ) = 2 z 2 + 2 z 3 − 2 z 4 − 6 z 5 ……..
= …………. 6 z 5 − 2 z 4 + 2 z 3 + 2 z 2 + 0 + 0
∴ x(n) = {........ − 6,−2, 2 , 0, 0}
# The impulse response of relaxed LTI system is h(n) = α 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
X(z) = −1 −1
1 − z 1 − αz
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 49
Downloaded from www.jayaram.com.np
Now,
Lim n → ∞ y(n) = lim z →1 (z-1)Y(z)
z2
= lim z tends to 1 (z-1)
( z − 1)( z − α )
1
=
1−α
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.
N
M
Y ( z )1 + ∑ a k z − k = ∑ bk z − k X ( z )
k =1 k =0
M
Y ( z)
∑b z k
−k
H ( z) = = k =0
N
……….(2)
X ( z)
1 + ∑ ak z −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:
M
1. if ak = 0 , for 1 <= k<= N . Equation (2) reduces to H ( z ) = ∑ bk z − k (all zero system) such a
k =0
system has finite duration impulse response and it is called FIR system or moving average
(MA) system.
2. On the other hand if bk = 0 , for 1 <= k<= n the system function reduces to
b0
H ( z) = N
…….(4) (all pole system) Due the presence of poles the impulse
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 / 2 z −1 )Y ( z ) = 2 X ( z )
Y ( z) 2
H ( z) = =
X ( z ) 1 − 1 / 2 z −1
By inversion,
h(n) = 2 (1/2)n u(n)
Date: 2066/09/16
∑ bk z −k ∑ a k z − k ∑ y ( − n) z − n
Y + (z) = k =0
N
.X ( z) − k =0 n =1
N
1 + ∑ a k z −k 1 + ∑ a k z −k
k =1 k =1
N (z)
= H ( z) X (z) + o …………..(3)
A( z )
Where,
N k
N 0 ( z ) = −∑ a k z − k ∑ y (n) z n ………….(4)
k =1 n =1
From (3) the o/p of the system can be sub divided into two parts. The 1st 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
N ( z)
response of the system which is defined in z-domain as Yzi ( z ) = 0 …………(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 .
Yzs+ ( z ) z2 z2
= 2 =
z ( z − 0.9 z + 0.8 z )( z − 1) ( z − 0.9e jπ / 3 )( z − 1)
z2 k1 k1* k
jπ / 3 − jπ / 3
= jπ / 3
+ − jπ / 3
+ 2
( z − 0 .9 e
2
)( z − 0.9e )( z − 1) ( z − 0.9e ) ( z − 0 .9 e ) z −1
k1 = 1.098e − j 5.53
o
[ ]
y zs (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 k
N o ( z ) = ∑ a k z − k ∑ y (n) z − n
k =1 n =1
2 k
N o ( z ) = −∑ a k z − k ∑ y (− n) z − n
1 n =1
[ −1 −2
= a1 z y (−1) z + a 2 z ( y (−1) z + y (−2) z 2 ) ]
[
N 0 ( z ) = − − 0.9 × 1 + 0.81z −1
]
+ 0.81 × 1 = 0.09 – 0.81z-1
0.09 − 0.81z −1
Yzi ( z ) =
1 − 0.9 z −1 + 0.81z − 2
Y ( z ) = Yzs ( z ) + Yzi ( z )
1.099 0.568 + j 0.445 0.568 − j 0.445
= + +
1 − z −1 1 − 0.9e jπ / 3 z −1 1 − 0.9e jπ / 3 z −1
[
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
Y + ( z) = =
1 − z −1 − z − 2 z 2 − z − 1
Y + ( z) z 1+ 5 1 1− 5 1
= 2 = . + .
z z − z − 1 2 5 1 + 5 − 2 5 1− 5
z −
z −
2 2
1+ 5 1 1− 5 1
Y + ( z ) = +
− .
2 5 1 − 1 + 5 z −1 2 5 1 − 1 − 5 z −1
2 2
Taking inverse z-transformation.
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 53
Downloaded from www.jayaram.com.np
1 + 5 1 + 5 n 1 − 5 1 − 5 n
y (n) = − u ( n)
2 5 2 2 5 2
# Determine step response of the system y(n) = α y(n-1) + x(n) -1 < α < 1
When initial condition is y(-1) = 1.
Solution:
Taking one sided z-transform,
[ ]
Y + ( z ) = α z −1Y + ( z ) + y (−1) + X + ( z )
X + ( z ) = Z [u (n)] =
1
1 − z −1
1
Or , Y + ( z ) = αz −1Y + ( z ) + α +
1 − z −1
1
Or, Y + ( z )(1 − αz −1 ) = α +
1 − z −1
α 1
Y + ( z) = +
1 − αz −1
(1 − z )(1 − αz −1 )
−1
α 1 1 1 1
Y + ( z) = + −1
− −1
1 − αz 1 − α 1 − z 1 − α 1 − αz
−1
Taking inversion,
1 1 n
y (n) = αα n u (n).1 u (n) − α u (n)
1−α 1− α
α n +1 (1 − α ) + 1 − α 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
1
x(n) = δ (n) − δ (n − 1)
3
Solution:
Taking z-transform in both sides.
5 1
Y ( z ) = z −1Y ( z ) − z − 2Y ( z ) + X ( z )
6 6
1
X ( z ) = 1 − z −1
3
5 1 1
Y ( z ) = z −1 − z − 2Y ( z ) + 1 − z −1
6 6 3
5 1 1
= 1 − z −1 + z − 2 Y ( z ) = 1 − z −1
6 6 3
1 −1
1 − z
Y ( z) = 3
5 −1 1 − 2
1 − z + z
6 6
1
Y ( z) =
1
1 − z −1
2
Taking inverse z-transform,
n
1
y ( 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 it’s ROC.
Indeed, Since
∞
H ( z) = ∑ h ( n) z
n = −∞
−n
∞
H ( z) ≤ ∑ h( n ) z
n = −∞
−n
Hence if the system is BIBO, the unit circle is contained in the ROC of H(z).
3 − 4 z −1
H ( z) =
1 − 3.5 z −1 + 1.5 z − 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.
Solution:-
1 2
H ( z) = +
1 1 − 3 z −1
1 − z −1
2
The system has poles at z = ½ and z = 3.
(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
h(n) = u (n) − 2.(3) n u (−n − 1) ( The system is unstable).
2
n
1
(b) Since the system is causal , its ROC is |z| >3. In this case h(n) = u (n) + 2(3) n u (n) ( The
2
system is unstable).
(c) Since the system is anticausal it’s ROC is |z| <1/2 . In this case,
n
1
h(n) = u (− n − 1) + 2.(3) n u (− n − 1) . (The system is unstable).
2
Date: 2066/09/22
# 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.5 z −1Y ( z ) + X ( z )
Y ( z) 1
=
X ( z ) 1 − 0.5 z −1
1 − z −1 cos wo
Z (cos wo n u (n)) =
1 − 2 z −1 cos wo + z − 2
−1 π 101 − 1 z −1
1 − z cos
X ( z ) = 10 4 = 2
1 − 2 z −1 cos π + z − 2 1 − 2 z + z
−1 − 2
( )
4
1 −1
1 − z
Y ( z) =
1 2
−1
(1 − 0.5 z )
.10
(
1 − 2 z + z −2
−1
)
1
10(1 − z −1 )
= 2
jπ / 4
−1
(1 − 0.5 z )(1 − e z −1 )(1 − e − jπ / 4 z −1 )
63 6.78e − j 2.870 6.78e j 28.7
= + +
1 − 0.5 z −1 1 − e jπ / 4 z −1 1 − e − jπ / 4 z −1
Im(z)
j0.5
-1 0.75 1 2 Re(z)
-j0.5
Zeroes at z = 0, 2, -1
Poles at z = 0.75, 0.5 ± j 0.5
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 .4 e j π = − 0 .4
z = 0.9e j1.0376 = 0.45 + j 0.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.jayaram.com.np
Im(z)
j0.77
j0.522
H(ejwt )
0.478
Notch filter:
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.
H(ejwt )
0 ω0 ω1 ωΤ
(null)
To create a null in frequency response of filter at frequency w0 we simply introduce a pair of complex
conjugate zero on the unit circle. z1, 2 = e ± jwo
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
∑ h(k )[Ae ]
∞
jw ( n − k )
y ( n) =
k = −∞
∞
= ∑ h(k ) Ae − jwk e jwn ………………..(3)
k = −∞
∞
H ( w) = ∑ h ( k )e
k = −∞
− jwk
……………….(4)
∑ h(n) < ∞
n = −∞
………………….(5)
n
1
# Determine the o/p sequence of the system with impulse response h(n) = u (n) When the input is
2
jπn / 2
complex exponential sequence x(n) = Ae u ( n) −∞ < n < ∞.
Solution:-
1
H ( z) =
1.
1 − z −1
2
1
H ( w) =
1
1 − e − jw
2
π
At w = ,
2
π 1 2
H = π
= e − j 26.6
2 1 −j 5
1− e 2
2
And therefore the o/p is
π
2 − j 26.6 jn 2
y (n) = A e e
5
n
2 j (π − 26.6 )
y ( n) = Ae 2 , −∞ < n < ∞
5
n
1
# Determine the response of the system with impulse response h(n) = u (n) to the input signal
2
π
x(n) = 10 − 5 sin n + 2 cos πn −∞ < n < ∞
2
Solution:-
1
H ( z) =
1
1 − z −1
2
1
H ( z) =
1
1 − e − jw
2
The first term in a input signal is a fixed signal component corresponding to w = 0. Thus,
1
H (0) = =2
1
1−
2
π
The second term in x(n) has frequency . Thus ,
2
π 1 2
H = π
= e − j 26.6
2 1 −j 5
1− e 2
2
2
Finally the third term in x(n) has a frequency w = π . Thus H (π ) = .
3
Hence the response of the system to x(n) is,
10 π 40
y (n) = 20 − sin n − 26.6 + cos πn, −∞ < n < ∞
5 2 3
Date: 2066/09/25
Chapter:- 5
bko + bk1 z −1 + bk 2 z −1
H k (k ) =
1 + a k 1 z −1 + a k 2 z − 2
yk(n)=xk+1(n)
xk(n)
+ +
z -1
-a k1 bk1
+ +
z -1
-a k2 bk2
H1(z) +
x(n)
H2(z) +
Hk(z) +
y(n)
# Determine the cascade parallel realization for the system described by the system function
1 2
(
101 − z −1 1 − z −1 1 − 2 z −1 )
H ( z) = 2 3
3 −1 1 −1 1 1 −1 1 1 −1
1 − z 1 − z 1 + + j z 1 − − j z
4 8 2 2 2 2
Cascade form:-
2 −1 2
1− z 1 − z −1
H1 z = 3 = 3
3 −1 1 −1 1 − 7 z −1 + 3 z − 2
1 − z 1 − z
4 8 8 32
1 − z (1 + 2 z )
1 −1 −1
H 2 ( z) = 2
1 1 −1 1 1 −1
1 − 2 + j 2 z 1 − 2 − j 2 z
3
1 + z −1 − z − 2
= 2
1
1 − z −1 + z − 2
2
H ( z ) = 10 H 1 ( z ) H 2 ( z )
The cascade relationship is
x(n) 1 10
+ + + +
y(n)
z-1 z-1
1
7/8 -2/3 1 -3/2
+ + +
z-1 z-1
-3/32 -1/2 -1
Parallel form:-
1 2
10 z − z − ( z + 2 )z
H ( z) = 2 3
3 1 1 1 1 1
z − z − z − + j z − − j
4 8 2 2 2 2
1 2
10 z − z − ( z + 2 )
H ( z)
= 2 3
z 3 1 1 1 1 1
z − z − z − + j z − − j
4 8 2 2 2 2
k1 k2 k3 k 3*
= + + +
z−
3
z−
1 1 1 1 1
z − + j z − − j
4 8 2 2 2 2
k1 = 2.93, k 2 = −17.68 , k3 = 12.25 − j14.57, k 3* = 12.25 + j14.57
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 63
Downloaded from www.jayaram.com.np
h(2) h(m-1)
h(1)
+ + + + +
yk(n)
H ( z ) = Π kk =1 H k ( z )
H k ( z ) = bko + bk1 z −1 + bk 2 z −2 k = 1, 2 ..........k
z-1 z-1
xk(n)
bk1 bk2
bk0
+ +
yk(n)
m
Am ( z ) = 1 + ∑ α m (k ) z − k m ≥1
k =1
Ao (m) = 1
hm ( z ) = 1, hm (k ) = α m (k ), k = 1,2..............m
m
→ deg ree of polynomial.
m
y ( n) = x ( n) + ∑ α m ( k ) x ( n − k )
k =1
1 αm(1) αm(2)
+ + + +
y(n)
x(n)
go(n) g1(n)
z-1 +
go(n-1)
f 0 ( n ) = x ( n)
g 0 ( n) = x( n)
f 1 (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)
f1(n) f2(n)=y(n)
fo(n)
+ +
k1 k2
x(n) k1 k2
go(n)
z-1 + z-1 +
go(n-1) g1(n) g1(n-1) g2(n)
Direct form filter coefficient {α m (k )} can be obtained form lattice coefficients {k i } using the relations.
A0 ( z ) = B0 ( z ) = 1
Am ( z ) = Am −1 ( z ) + k m z −1 Bm −1 ( z ) m = 1, 2, ..............m − 1
Bm ( z ) = z − m Am ( z −1 ) m = 1, 2, .....................m − 1
Bm (z ) → Reverse polynomial of Am (z ).
1 1 1
# A given 3-stage lattice filter with coefficient k1 = , k 2 = , k 3 = . Determine FIR filter
4 2 3
coefficient for direct form structure.
A1 ( z ) = A0 ( z ) + k1 z −1 B0 ( z )
1
= 1 + z −1
4
1
α 1 (0) = 1, α 1 (1) = , Corresponding to single stage lattice filter.
4
1 1
β1 ( z ) = z −1 A1 ( z −1 ) = z −1 1 + z = + z −1
4 4
A2 ( z ) = A1 ( z ) + k 2 z β1 ( z )
−1
3 1
= 1 + z −1 + z − 2
8 2
3 1
α 2 (0) = 1, α 2 (1) = , α 2 (2) = Corresponding to 2nd order lattice form.
8 2
1 3 −1
β 2 ( z ) = + z + z −2
2 8
A3 ( z ) = A2 ( z ) + k 3 z −1 β 2 ( z )
13 −1 5 − 2 1 −3
= 1+ z + z + z
24 8 3
13 5 1
α 3 (0) = 1, α 3 (1) = , α 3 ( z) = , α 3 (3) =
24 8 3
Date: 2066/09/27
A3 ( Z ) − k3 B3 ( z ) 3 1
A2 ( z ) = = 1 + z −1 + z −2
1 − k32
8 2
1 1 3
K 2 = α 1 ( 2) = , B2 ( z ) = + z −1 + z − 2
2 2 8
A ( z ) − K 2 B2 ( z ) 1
A1 ( z ) = 2 = 1 + z −1
1 − k22
4
1
k1 = α 1 (1) =
4
k =1
Difference equation for this system is
N
y (k ) = ∑ a m (k ) y (n − k ) + x(k ) ……………. (2)
k =1
When N = 1.
x(n) fO(n)
+ y(n)
f1(n)
-
K
+ z-1
g1(n) g1(n-1) go(n)
x(n) = f1(n)
fo(n) = f1(n) – k1go(n-1)
g1(n) = k1f0(n)+go(n-1)
y(n) = fo(n)
= f1(n)+k1go(n-1)
y(n) = x(n) –k1y(n-1)
y1(n) = k1y(1)+y(n-1)
k2 k1
+ z-1 + z-1
g2(n) g1(n-1) g1(n) g0(n-1) go(n)
Fig: Two stage lattice structure
fo(n) = x(n)
f1(n) =f2(n) – k2g1(n-1)
g2(n) = k2f1(n)-k1g2(n-1)
fo(n) = f1(n) – k1g0(n-1)
g1(n) = k1fo(n) +go(n-1)
y(n) = fo(n) = go(n)
= f2(n) – k2g1(n-1) – k1go(n-1)
= - k1 (1+k2) y(n-1) – k2 y(n-2) + x(n)
∑C m (k ) z − k
Cm ( z)
H ( z) = k =0
N
=
Am ( z )
1 + ∑ a N (k ) z − k
k =0
Ladder Co-efficient,
v m = C m (m) m = 0, 1, 2, 3, ………M
C m−1 ( z ) = c n ( Z ) − v m / Bm ( z )
x(n) fO(n) fO(n)
+ + y(n)
f2(n)
- -
k2 k1
k2 k1
+ z-1 + z-1
g2(n) g1(n-1) g1(n) g0(n-1) go(n)
v1 vo
v2
+ +
Ladder coefficient:-
C3 ( z ) = 1 + 3 z −1 + 3 z −2 + z −3
v3 = C3 (3) = 1
C2 ( z ) = C3 ( z ) − v3 B3 ( z )
= 1.576 + 2.36 z −1 + 3.9 z −2
C1 ( z ) = C2 ( z ) − v2 B2 ( z )
= 0.866 + 5.46 z −1
v1 = 5.46
C0 ( z ) = C1 ( z ) − v1 B1 ( z )
= 4.538
v0 = C0 (0) = 4.538
+ + +
Date: 2066/09/30
∑b z k
−k
H ( z) = k =0
N
………………….(1)
1 + ∑ ak z −k
k =1
With quantized coefficient coefficient the system function.
m
∑b z k
−k
H ( z) = k =0
N
1 + ∑ ak z −k
k =1
Where quantized coefficient {bk } can be released to the unquatized coefficients {ak } & {bk } by the
relation,
ak = ak + ∆ak , k = 1, 2 , 3 .................N ---------(3)
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.
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
Ax < ∞ ………………… (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
Ax < m −1 …………..(5)
∑ hk (m)
m =0
Another approach to scaling is to scale the input so that,
∞ 2 ∞
∑ yk ( n) ≤ C 2 ∑ x ( n) = C 2 E x ……….. (6)
2
n = −∞ n = −∞
From parsavals theorem,
π
1
∞ 2
∑ = ∫
2
y ( n ) H ( w) X ( w)
2π −π
k
n = −∞
1
≤ Ex ∫ H ( w)
2
dw ………….. (7)
2π
π
1
C Ex ≤ Ex ∫π H ( w)
2 2
dw
2π −
π
1
C2 ≤ ∫π H (w)
2
dw ……………. (8)
2π −
Chapter: 6
∞
H ( z ) = ∑ h( n ) z − n
n =0
∞
M
= ∑ ∑ Ai e pi nT u a (nT )z −1
n = 0 i =1
( )
M ∞
= ∑∑ Ai e piT z −1 u a (nT )
n
i =1 n = 0
M
1
= = ∑ Ai
i =1 1 − e piT z −1
Hence,
1 1
→
s − pi 1 − e piT z −1
s + 0 .1
Q. Convert the analog filter with the system function H a ( s ) = into a digital IIR by means
(s + 0.1)2 + 9
of impulse invariance method.
Solution:
s + 0 .1 s + 0 .1
H a (s) = =
(s + 0.1) + 9 (s + 0.1 + j3)(s + 0.1 − j 3)
2
k1 k1*
= +
( s + 0 .1 + j 3 ) ( s + 0 .1 − j 3 )
1 1
k1 = , k1* =
2 2
1 1
H a (s) = 2 + 2
( s + 0 .1 + j 3 ) ( s + 0 .1 − j 3 )
Then using impulse invariance method,
1 1
H ( z) = 2 2
(− 0.1− j 3 )T −1 + (− 0.1− j 3 )T −1
1+ e z 1− e z
1 − (e −0.1T
cos 3T )z −1
=
1 − (ze − 0.1T
cos 3T )z −1 + e −0.2T z −1
If r <1, then σ < 0 and if r >1, then, σ > 0 consequently, the LHP is S maps into inside a unit circle in
z-plane and RHP in s maps into outside a unit circle.
When, r = 1, σ = 0 ,
2 2 sin w
Ω=
T 2 + 2 cos w
Ω = tan (w 2 )
2
T
ΩT
w = 2 tan −1
2
-1
ω = 2tan (ΩT/2)
π/2
0 2 4 ΩT
− π /2
−π
Fig: mapping between frequency variables w and Ω resulting from bilinear transformation.
s + 0 .1
# Convert the analog filter with system H a ( s ) = into digital IIR filter by means of
(s + 0.1)2 + 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
2
Ω r = tan wr / 2
T
2 π
4 = tan
T 4
1
∴T =
2
1 − z −1 1 − z −1
Now , s = 2 / T
−1
= 4
−1
1 + z 1 + z
1 − z −1
4 + 0 .1
−1
Using bilinear, the system function of digital filter becomes H ( z ) = 1+ z
2
1 − z −1
4 + 0.1 + 16
−1
1+ z
0.125 + 0.006 z −1 − 0.118 z −2
=
1 + 0.0006 z −1 + 0.95 z −1
0.125 + 0.006 z −1 − 0.118 z −2
H ( z) =
1 + 0.95 z − 2
Q. Design a single pole low pass digital filter factor with 3 dB bandwidth of 0.2 π using the bilinear
Ωc
transformation apply to the analog filter H ( s ) = . Where, Ω c is a 3dB bandwidth analog filter.
s + Ωc
Solution:
wc = 0.2π ,
For analog filter.
2
Ω c = tan wc / 2
T
= tan (0.1Ω( ))
2
T
0.65
=
T
Analog filter has system function
0.65 T
H ( s) =
s + 0 .6 T
2 1 − z −1
Now, s =
T 1 + z −1
Then,
0.65 T
H ( z) =
2 1 − z −1 0.65T
+
T 1 + z −1 T
0,65(1 + z −1 )
=
2.65 − 1.35 z −1
0.245(1 + z −1 )
H ( z) =
1 − 0.509 z −1
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.
Π kM=1 ( s − z k )
H ( s) = N
Π k =1 ( s − p k )
Where, {z k } and {p k } are zeroes and poles of the analog filter.
Then system function for digital filter is
Π M (1 − e zk T z −1 )
H ( s ) = Nk =1
Π k =1 (1 − e pkT z −1 )
Thus each factor of the form (s-a) in H(s) is mapped into the factor (1 − e aT z −1 ) . This mapping is called
matched z-transformation.
s + 0 .1
# Convert the analog filter with system function H a ( s ) = into digital IIR filter by matched
( s + 0.1) 2 + 9
z-transformation method.
H a (s) =
s + 0 .1 (s + 0.1)
( )
=
( s + 0.1) − 3 j )
2 2
( s + 0.1 + 3 j )( s + 0.1 − j 3)
Using matched z-transformation method.
H ( z) =
(1 − e −0.1T
z −1 )
(1 − e ( −0.1−3 j )T
z −1
)(
1 − e ( −0.1+ j 3)T z −1 )
−1
(1 − e z ) 0.1T
= − 0.1T − j 3T
(1 − e e z −1 )(1 − e −0.1T e j 3T z −1 )
Date: 2066/10/7
Butter worth filter:
1
We have, Tn ( jw) =
2
1 + ε 2ω 2 n
When ε 2 = 1
1
Tn ( jw) =
2
1 + ω 2n
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 has zero at infinity (ω → ∞ ) .
(2) Tn ( j 0) = 1 for all n.
1
(3) Tn ( j1) = = 0.707 for all n. corresponding to 3 dB.
2
(4) For large ω , Tn ( jω ) exhibits n-pole roll-off.
Tn(j ω)
n=1
n=2
n=3
ω
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,
100.1α s − 1
log 0.1α p
10 − 1
n=
2 log(Ω s Ω p )
3-dB cutoff frequency,
Ωp
Ωc =
( )
1
0.1α p
10 −1 2n
Chebyshev filter:
We have chebyshev magnitude response,
1
Tn ( jw) =
2
……………… (1)
1 + ε Cn (ω )
2 2
(2) At ω = 1 , Cn (1) = 1
1
Tn ( j 0) = for all n.
1+ ε 2
0.1α s
−1 10 −1
cosh 0.1α p
10 − 1
n=
cosh −1 (Ω s Ω p )
- equal ripple filter.
- High attenuation in stop band and steeper roll-off near the cut-off frequency.
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.
Ωp
Q. Transform the single pole low pass butterworth filter with the system function H ( s ) = into
s + Ωp
band pass filter with upper and lower band edge frequency Ωu and Ω L respectively.
Solution:
s 2 + Ω L Ωu
S = Ωp
s (Ωu − Ω L )
Ωp
H (s) =
s + Ω L Ωu
2
Ωp + Ωp
s (Ω u − Ω L )
s (Ωu − Ω L )
= 2
s + (Ωu − Ω L )s + Ω L Ωu
cos
2
Band pass z −2 − a1 z −1 + a 2 ω L = Lower band edge frequency
z −1 → −
a 2 z − 2 − a1 z −1 + 1 ω u = Upper band edge frequency
2αk
a1 =
k +1
k −1
a2 =
k +1
ω + ω L'
cos u
2
a=−
ω − ω L'
cos u
2
ω + ω L'
k = cot u . tan (ω p / 2 )
2
Band stop z −2 − a1 z −1 + a 2 2α 1− k
z −1 → a1 = − , a2 =
a 2 z − 2 − a1 z −1 + 1 k +1 1+ k
ω + ω L
'
cos u
2
a=
ω − ω L
'
cos u
2
ω − ω L'
k = tan u . tan (ω p / 2 )
2
Solution:
Ω p = 2π × 30 = 188.4 rad / sec
Ω s = 2π × 75 = 471.2 rad / sec
α p = −20 log(0.89) = 1.01dB
α s = −20 log(0.20) = 13,98dB
100.1α s − 1
log 0.1α p
10 − 1
n= = 2.466 ≈ 3
2 log(Ω p / Ω s )
3 –dB cut off frequency,
Ω
Ω c = 0.1α pp = 23.55 rad / sec
( 10 )
−1
From table for N = 3, and Ω c =1, we have
1
H ( s) =
( )
s + 1) /( s 2 + s + 1
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) s / Ωc2 + s / Ωc + 1
2
)
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 = tan (ω p / 2) = tan (0.2π / 2) = 0.649(T = 1) )
2 2
T T
Ω s = tan (ωs / 2 ) = 3.263
2
T
Order of filter,
100.1α s − 1
log 0.1α p
10 − 1
n= = 1.783 ≈ 2
2 log(Ω p / Ω s )
3 –dB cut off frequency,
Ωp
Ωc = = 1.164
( )
1
0.1α p
10 −1 2n
Ω 2c
=
s 2 + 1.414 sΩ c + Ω 2c
Ω
=
s + 1 . 414 s Ω c + Ω 2c
2
0 .2
Q. Convert a given H p ( s ) = 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:
Ω p Ω 'p 0.2 × 0.5 0.1
S→ = =
s s s
Ω Ω
'
0 .2 0.25
H n ( s ) = H p p p = =
s 0.1 / s + 0.2 0.25 + 0.1
s
H n (s) =
s + 0 .5
Q. Use bilinear transformation to obtained digital low pass filter to approximate H (s ) = 2
1
.
s + 2s + 1
Assume cut off frequency of 100 Hz and sampling frequency of 1 khz.
Solution:
2π × 100
ωc = (Normalizing with f s )
1000
= 0.2π rad/sec
Ω c = tan (ωc / 2 ) = 0.65 (T = 1)
2
T
Now, denormalizing H(s) with Ω c = 0.65 we get,
1
H L ( s) = H ( s) =
s = s / Ωc
s
2
+ 2 (s / 0.65) + 1
0.65
0.4225
= 2
s + 0.919 s + 0.4225
2 z −1 z −1
Now we substitute, s = = 2 (T = 1)
T z + 1 z + 1
0.4225
H ( s) = 2
z − 1 z − 1
2 z + 1 + 0.919 2 z + 1 + 0.4225
Q. Using bilinear transformation design a butterwoth filter which satisfy the following condition.
0.8 ≤ H (e jw ) ≤ 1 0 ≤ ω ≤ 0.25
H (e jw ) ≤ 0.2 0 .6 ≤ ω ≤ π
Solution:
Tn(j ω)
Transition band
1
Stop band
0.8
Pass band
0.2
ω
ωs = 0.2π ωs = 0.6π
tan (ω p / 2 ) = 0.65
2
αp =
T
α s = tan (ωs / 2) = 0.75
2
T
100.1α s − 1
log 0.1α p
10 − 1
n=
2 log(Ω p / Ω s )
Ωp
Ωc = = 0.75
(10 )
1
0.1α p
−1
2n
0.56
= 2
s + 1.065 + 0.56
Using bilinear transformation,
2 z −1
s= (r = 1) )
T z +1
0.56
H ( s) = 2
z − 1 z − 1
2 z + 1 + 1.06 2 z + 1 + 0.56
0.245(1 + z −1 )
Q. Convert low pass butterworth filter with system function H ( s ) = into bandpass filter
1 − 0.509 z −1
with upper and lower cut off frequency ωu and ωc respectively. The low pass filter has 3 dB bandwidth
ω p = 0.2π . (ωu = 3π / 5, ωL = 2π / 5)
Solution:
ω − ωL
k = cot u tan(ω p / 2)
2
=1
ω + ωL
cos u
α= 2 = 0
ω − ωL
cos u
2
− 2α k
a1 = =0
k +1
k −1
a2 = =0
k +1
Now, z −1 → − z −2
TF becomes,
0.245(1 − z −2 )
H ( z) =
1 + 0.509 z − 2
Date: 2066/10/9
Chapter: 7
As in example let us consider the unit sample response given in figure for M = 6 sample.
h(n)
6 6
4
4
2 2
0 1 2 3 4 5 n
h(n) = h (5-n)
h(0) = h(5) =2
h(1) = h(4) = 4
h(2) = h(3) = 6
6
4
0 1 2 3 4 5 n
-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.
# 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?
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
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.
# A linear phase filter has a phase function e-j2w. What is the order of the filter.
Solution:
The phase of linear phase filter is given by,
M −1
− jω
=e 2
Comparing with e j 2 w
M −1
= 2⇒ M =5
2
Where, the fourier coefficients hd(n) are the impulse response sequence of the filter given by,
π
hd (n) = ∫ H d (e jω )e jωn dω …………… (2)
−π
Also, z-transform of the sequence is given by,
- By Er. Manoj Basnet (Ass. Lecturer Eastern College of Engineering, Biratnagar)/ - 87
Downloaded from www.jayaram.com.np
∞
H(z) = ∑ h (n) z
n = −∞
d
−n
…………… (3)
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.
N −1
hd (n) for n ≤
h ( n) = 2 …………… (4)
0 otherwise
Then we have,
N −1
2
H ( z) = ∑ h( n ) z −1
……………..(5)
N −1
n =−
2
N −1
N − 1 − N − 1 ( N −1 2 )
= h z
2
+ h(1) z −1 + .........h(0) + ...... + h − z
2 2
N −1
[ ]
2
H ( z ) = h ( 0) + ∑ h ( n ) z − n + h ( − n ) z n ………… (6)
n =1
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) z n + z − n ………….. (8)
n =1
1
N−
2
This TF is not physically realizable. Realizability can be brought by multiplying the equation (8) by z .
N −1
Where, is delay in samples.
2
We have,
1
− N − H ( z )
H ' ( z) = z 2
N −1
1
[ ]
− N −
h ( 0) + h ( n ) z n + z − n ………….. (9)
2
=z 2
∑
n =1
1 π /2
= ∫π 1.e jωn dω
2π − /2
Ηd(e ω)
j
−π/2 0 π/2
π
sin n
= 2 , −∞< n<∞
nπ
Now truncating hd(w) to 11 samples, we get,
π
sin n 2
h ( n) = for n ≤ 5
π n
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
∑ h(n)[z ]
2
TF, H(z) = h(0) + n
+ z −n
n =1
[ ]
5
= 0 .5 + ∑ h ( n ) z n + z − n
n =1
(
= 0.5 + 0.3183( z1 + z −1 ) − 0.106( z 3 + z −3 ) + 0.06366 z 5 + z −5 )
TF, of realizable filter will be,
1
− N +
H ( z) = z
' 2
H ( z) = z −5 H ( z)
= 0.06366 − 0.106 z −2 + 0.318 z −4 + 0.5 z −5 + 0.318 z −6 − 0.106 z −8 + 0.06366 z −10
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
∞
H d (ω ) = ∑ hd (n)e − jωn ………… (1)
n =0
Where,
1 π
hd (n) = ∫πH (ω )e jωn dω ………….. (2)
2π
d
−
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 ,
hd n = 0,1........M − 1
h(n) = hd (n)ω (n) = ………. (4)
0 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
n =0
− jωn
…….. (5)
Thus the combination of Hd( ω ) with W (ω ) yields the frequency response of FIR filter.
1 π
H (ω ) = ∫πH (v)W (ω − v)dv
2π
d
−
1 − e − jωM
=
1 − e − jω
sin (ωM 2)
= e − jω (M −1 / 2 )
sin (ω 2 )
The window function has a magnitude response,
sin(ωM 2
W (ω ) = −π ≤ω ≤π
sin (ω 2 )
And a piece wise linaer phase .
M −1
Θ(ω ) = ω When, sin(ωM / 2) ≥ 0
2
M −1
= −ω + π When, sin (ωM 2) <0
2
Date: 2066/10/11
Rectangular
kaiser
1
Hamming
Hanning
0 M-1 n 0 M-1
M=31
Magnitude
M=61
0 frequency
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.
Suppose that we specify the frequency response of the filter at the frequency given by equation (i).
2π
H (k + α ) = H (k + α )
M
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:
2π × 0.5 π
f c = 0.25khz ωc = =
1 2
Η(ω)
−π −π/2 0 π/2 π
1 π / 2 j ωn
1.e dω
2π ∫−π / 2
hd (n) =
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 −5≤ n ≤5
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:
2πn M −1 M −1
Wham(n) = 0.54+0.46 cos − ≤n≤
M −1 2 2
2πn
= 0.54+0.46cos −5≤π ≤5
10
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
H(z) …………..
Q. A low pass filter is required to be design with design frequency response which is expressed as follows, as we
jω
e − j 2ω −π /2 ≤ ω ≤π /4
H d (e ) =
0 for π / 4 ≤ ω ≤ π
Obtain the filter coefficient hd (n) if the window function is defined as,
1 0 ≤ n ≤ 4
W ( n) =
0 otherwise
Q. Design a low pass filter having desire frequency response given as,
jω e − j 3ω 0 ≤ω ≤π /2
H d (e ) =
0 π / ≤ω ≤π
Obtain filter coefficient h(n) for M = 7 using frequency sampling method.
Solution:
2π
Wk = (k + α )
M
α =0
1 6
h(n) = ∑ e − j 32πk / 7 e j 2πkn / 7 n = 0, 1, ……. 6.
7 k =0
1 6
h(0) = ∑ e − j 6πk / 7 =
7 k =0