Digital Signal Processing Notes
Digital Signal Processing Notes
avscomputer.blogspot.com 1
Created by Amit S
INTRODUCTION
A SIGNAL is defined as any physical quantity that changes with time, distance, speed,
position, pressure, temperature or some other quantity. A SIGNAL is physical quantity
that consists of many sinusoidal of different amplitudes and frequencies.
Ex x(t) = 10t
X(t) = 5x2+20xy+30y
A System is a physical device that performs an operations or processing on a signal. Ex
Filter or Amplifier.
2) DSP (Digital signal Processing) : If the input signal given to the system is digital then
system does digital signal processing. Ex Digital Computer, Digital Logic Circuits etc. The
devices called as ADC (analog to digital Converter) converts Analog signal into digital and
DAC (Digital to Analog Converter) does vice-versa.
Most of the signals generated are analog in nature. Hence these signals are converted to
digital form by the analog to digital converter. Thus AD Converter generates an array of
samples and gives it to the digital signal processor. This array of samples or sequence of
samples is the digital equivalent of input analog signal. The DSP performs signal
processing operations like filtering, multiplication, transformation or amplification etc
operations over this digital signals. The digital output signal from the DSP is given to the
DAC.
avscomputer.blogspot.com 2
Created by Amit S
7. Digital signal processing systems are upgradeable since that are software
controlled.
8. Possibility of sharing DSP processor between several tasks.
9. The cost of microprocessors, controllers and DSP processors are continuously going
down. For some complex control functions, it is not practically feasible to construct
analog controllers.
10. Single chip microprocessors, controllers and DSP processors are more
versatile and powerful.
CLASSIFICATION OF SIGNALS
1. Single channel and Multi-channel signals
2. Single dimensional and Multi-dimensional signals
3. Continuous time and Discrete time signals.
4. Continuous valued and discrete valued signals.
5. Analog and digital signals.
6. Deterministic and Random signals
7. Periodic signal and Non-periodic signal
8. Symmetrical(even) and Anti-Symmetrical(odd) signal
9. Energy and Power signal
avscomputer.blogspot.com 3
Created by Amit S
a techogenerator feedback or Sine or systems uses discrete time signals.
exponential waveforms.
Note: Digital signals (DISCRETE TIME & DISCRETE AMPLITUDE) are obtained by
sampling the ANALOG signal at discrete instants of time, obtaining DISCRETE TIME
signals and then by quantizing its values to a set of discrete values & thus generating
DISCRETE AMPLITUDE signals.
Sampling process takes place on x axis at regular intervals & quantization process takes
place along y axis. Quantization process is also called as rounding or truncating or
approximation process.
avscomputer.blogspot.com 4
Created by Amit S
The signal x(n) is said to be periodic if x(n+N)= x(n) for all n where N is the fundamental
period of the signal. If the signal does not satisfy above property called as Non-Periodic
signals.
Discrete time signal is periodic if its frequency can be expressed as a ratio of two integers.
f= k/N where k is integer constant.
X(n)= + + -
X(n) + X(-n) X(n) - X(-n)
2 2
Rearranging the above terms we have
X(n)= +
X(n) + X(-n)
Thus X(n)= Xe(n) + Xo(n)
2
Even component of discrete time signal is given by
Xe(n) =
X(n) - X(-n)
2
Odd component of discrete time signal is given by
Xo(n) =
Test whether the following CT waveforms is periodic or not. If periodic find out the
fundamental period.
a) 2 sin(2/3)t + 4 cos (1/2)t + 5 cos((1/3)t Ans: Period of x(t)= 12
b) a cos(t √2) + b sin(t/4) Ans: Non-Periodic
a) Find out the even and odd parts of the discrete signal x(n)={2,4,3,2,1}
b) Find out the even and odd parts of the discrete signal x(n)={2,2,2,2}
avscomputer.blogspot.com 5
Created by Amit S
If Energy is finite and power is zero for x(n) then x(n) is an energy signal. If power is
finite and energy is infinite then x(n) is power signal. There are some signals which are
neither energy nor a power signal.
n=0
δ (n) = 1 n=0
0 n=0 i.e δ(n)={1}
2) Unit step signal
u(n) = 1 n≥0
0 n<0
3) Unit ramp signal
ur (n) = n n≥0
0 n<0
4) Exponential signal
x(n) = a n = (re j Ø ) n = r n e j Ø n = r n (cos Øn + j sin Øn)
5) Sinusoidal waveform
x(n) = A Sin wn
n=0
avscomputer.blogspot.com 6
Created by Amit S
Delayed by 2 samples : X(n-2)= { 1, -1 , 0 , 4 , -2 , 4 , 0 ,……}
n=0
Advanced by 2 samples : X(n+2) = { 1, -1 , 0 , 4 , -2 , 4 , 0 ,……}
n=0
2) Folding / Reflection : It is folding of signal about time origin n=0. In this case
replace n by –n.
Original signal:
X(n) = { 1, -1 , 0 , 4 , -2 , 4 , 0}
n=0
Folded signal:
X(-n) = { 0 , 4 , -2 , 4 , 0 , -1 , 1}
n=0
3) Addition : Given signals are x1(n) and x2(n), which produces output y(n) where y(n)
= x1(n)+ x2(n). Adder generates the output sequence which is the sum of input
sequences.
4) Scaling: Amplitude scaling can be done by multiplying signal with some constant.
Suppose original signal is x(n). Then output signal is A x(n)
x(n)
Z-1 y(n) = x(n-1)
2. Unit advance
Z+1
x(n) y(n) = x(n+1)
3. Addition
x1(n)
+ y(n) =x1(n)+x2(n)
x2(n)
4. Multiplication
x1(n)
×
y(n) =x1(n)*x2(n)
x2(n)
5. Scaling (constant multiplier)
A
x(n) y(n) = A x(n)
avscomputer.blogspot.com 7
Created by Amit S
CLASSIFICATION OF DISCRETE TIME SYSTEMS
It is very easy to find out that given system is static or dynamic. Just check that output of
the system solely depends upon present input only, not dependent upon past or future.
It is very easy to find out that given system is Shift Invariant or Shift Variant.
Suppose if the system produces output y(n) by taking input x(n)
x(n) y(n)
If we delay same input by k units x(n-k) and apply it to same systems, the system
produces output y(n-k)
x(n-k) y(n-k)
avscomputer.blogspot.com 8
ANALOG
SYSTEM
Created by Amit S
the system is said to be linear if and only if
T[a1x1(n) + a2x2(n)]=a1T[x1(n)]+a2T[x2(n)]
a1
x1(n)
x1(n) a1
SYSTEM
y(n)=T[a1x1(n)+a2x2(n)]
x2(n) SYSTEM a2
It is very easy to find out that given system is causal or non-causal. Just check that
output of the system depends upon present or past inputs only, not dependent upon
future.
Sr No System [y(n)] Causal /Non-Causal
1 x(n) + x(n-3) Causal
2 X(n) Causal
3 X(n) + x(n+3) Non-Causal
4 2 x(n) Causal
5 X(2n) Non-Causal
6 X(n)+ x(n-2) +x(n+2) Non-Causal
avscomputer.blogspot.com 9
Created by Amit S
5) STABLE v/s UNSTABLE SYSTEMS
Sr STABLE UNSTABLE
No (Stability Property)
1 A System is BIBO stable if every bounded A System is unstable if any bounded
input produces a bounded output. input produces a unbounded output.
2 The input x(n) is said to bounded if there
exists some finite number Mx such that |
x(n)| ≤ Mx < ∞
The output y(n) is said to bounded if
there exists some finite number My such
that |y(n)| ≤ My < ∞
avscomputer.blogspot.com 10
Created by Amit S
Step 2) y(n)= { y(-1) , y(0) , y(1), y(2), ….} It goes up to length(xn)+ length(yn) -1.
X1 x2 x3
h1
h1x1 h1x2 h1x3
y(-1) = h1 x1
y(0) = h2 x1 + h1 x2
y(1) = h1 x3 + h2x2 + h3 x1 …………
avscomputer.blogspot.com 11
Created by Amit S
avscomputer.blogspot.com 12
Created by Amit S
∞
|y(n)| ≤ ∑ h(k) x(n–k)
k=-∞
∞
|y(n)| ≤ ∑ |h(k)| |x(n–k)|
k=-∞
The input x(n) is said to bounded if there exists some finite number M x such that |x(n)| ≤
Mx < ∞. Hence bounded input x(n) produces bounded output y(n) in the LSI system only
if ∞
∑ |h(k)| < ∞
k=-∞
With this condition satisfied, the system will be stable. The above equation states that the
LSI system is stable if its unit sample response is absolutely summable. This is necessary
and sufficient condition for the stability of LSI system.
CORRELATION:
It is frequently necessary to establish similarity between one set of data and
another. It means we would like to correlate two processes or data. Correlation is closely
related to convolution, because the correlation is essentially convolution of two data
sequences in which one of the sequences has been reversed.
Applications are in
1) Images processing for robotic vision or remote sensing by satellite in which data
from different image is compared
2) In radar and sonar systems for range and position finding in which transmitted
and reflected waveforms are compared.
3) Correlation is also used in detection and identifying of signals in noise.
4) Computation of average power in waveforms.
5) Identification of binary codeword in pulse code modulation system.
TYPES OF CORRELATION
Under Correlation there are two classes.
1) CROSS CORRELATION: When the correlation of two different sequences x(n) and
y(n) is performed it is called as Cross correlation. Cross-correlation of x(n) and y(n)
is rxy(l) which can be mathematically expressed as
∞
rxy(l) = ∑ x (n) y(n – l )
n= -∞
OR
∞
rxy(l) = ∑ x (n + l) y(n)
n= -∞
PROPERTIES OF CORRELATION
1) The cross-correlation is not commutative.
rxy(l) = ryx(-l)
2) The cross-correlation is equivalent to convolution of one sequence with folded version
of another sequence.
rxy(l) = x(l) * y(-l).
3) The autocorrelation sequence is an even function.
rxx(l) = rxx(-l)
Examples:
Q) Determine cross-correlation sequence
x(n)={2, -1, 3, 7,1,2, -3} & y(n)={1, -1, 2, -2, 4, 1, -2 ,5}
Answer: rxy(l) = {10, -9, 19, 36, -14, 33, 0,7, 13, -18, 16, -7, 5, -3}
avscomputer.blogspot.com 14
Created by Amit S
Q) Determine autocorrelation sequence
x(n)={1, 2, 1, 1} Answer: rxx(l) = {1, 3, 5, 7, 5, 3, 1}
A/D CONVERSION
BASIC BLOCK DIAGRAM OF A/D CONVERTER
SAMPLING THEOREM
It is the process of converting continuous time signal into a discrete time signal by taking
samples of the continuous time signal at discrete time instants.
Thus Sampling Theorem states that if the highest frequency in an analog signal is
Fmax and the signal is sampled at the rate fs > 2Fmax then x(t) can be exactly recovered
from its sample values. This sampling rate is called Nyquist rate of sampling. The imaging
or aliasing starts after Fs/2 hence folding frequency is fs/2. If the frequency is less than or
equal to 1/2 it will be represented properly.
Example:
Case 1: X1(t) = cos 2∏ (10) t Fs= 40 Hz i.e t= n/Fs
x1[n]= cos 2∏(n/4)= cos (∏/2)n
Thus the frequency 50 Hz, 90 Hz , 130 Hz … are alias of the frequency 10 Hz at the
sampling rate of 40 samples/sec
QUANTIZATION
The process of converting a discrete time continuous amplitude signal into a digital signal
by expressing each sample value as a finite number of digits is called quantization. The
error introduced in representing the continuous values signal by a finite set of discrete
value levels is called quantization error or quantization noise.
avscomputer.blogspot.com 15
Created by Amit S
2 4.05 4.0 4.0 -0.05
3 3.645 3.6 3.6 -0.045
4 3.2805 3.2 3.3 0.0195
CODING/ENCODING
Each quantization level is assigned a unique binary code. In the encoding operation, the
quantization sample value is converted to the binary equivalent of that quantization level.
If 16 quantization levels are present, 4 bits are required. Thus bits required in the coder is
the smallest integer greater than or equal to Log2 L. i.e b= Log2 L
Thus Sampling frequency is calculated as fs=Bit rate / b.
ANTI-ALIASING FILTER
When processing the analog signal using DSP system, it is sampled at some rate
depending upon the bandwidth. For example if speech signal is to be processed the
frequencies upon 3khz can be used. Hence the sampling rate of 6khz can be used. But the
speech signal also contains some frequency components more than 3khz. Hence a
sampling rate of 6khz will introduce aliasing. Hence signal should be band limited to avoid
aliasing.
The signal can be band limited by passing it through a filter (LPF) which blocks or
attenuates all the frequency components outside the specific bandwidth. Hence called as
Anti aliasing filter or pre-filter. (Block Diagram)
SAMPLE-AND-HOLD CIRCUIT:
The sampling of an analogue continuous-time signal is normally implemented using a
device called an analogue-to- digital converter (A/D). The continuous-time signal is first
passed through a device called a sample-and-hold (S/H) whose function is to measure the
input signal value at the clock instant and hold it fixed for a time interval long enough
for the A/D operation to complete. Analogue-to-digital conversion is potentially a slow
operation, and a variation of the input voltage during the conversion may disrupt the
operation of the converter. The S/H prevents such disruption by keeping the input voltage
constant during the conversion. This is schematically illustrated by Figure.
After a continuous-time signal has been through the A/D converter, the quantized output
may differ from the input value. The maximum possible output value after the quantization
process could be up to half the quantization level q above or q below the ideal output
value. This deviation from the ideal output value is called the quantization error. In order
to reduce this effect, we increases the number of bits.
avscomputer.blogspot.com 16
Created by Amit S
Q) The following four analog sinusoidal are sampled with the fs=40Hz. Find out
corresponding time signals and comment on them
X1(t)= cos 2∏(10)t
X2(t)= cos 2∏(50)t
X3(t)= cos 2∏(90)t
X4(t)= cos 2∏(130)t
Q) Signal x1(t)=3 cos 600∏t+ 2cos800∏t. The link is operated at 10000 bits/sec and
each input sample is quantized into 1024 different levels. Determine Nyquist rate,
sampling frequency, folding frequency & resolution.
DIFFERENCE EQUATION
avscomputer.blogspot.com 17
Created by Amit S
Convolution Sum Method. generally based on Difference
Method.
Zero state response (Forced response) : Consider initial condition are zero. (System
is relaxed at time n=0) i.e y(-1) =0
Q) Determine zero input response for y(n) – 3y(n-1) – 4y(n-2)=0; (Initial Conditions are
y(-1)=5 & y(-2)= 10) Answer: y(n)= 7 (-1)n + 48 (4)n
avscomputer.blogspot.com 18
Created by Amit S
INTRODUCTION TO Z TRANSFORM
For analysis of continuous time LTI system Laplace transform is used. And for
analysis of discrete time LTI system z transform is used. Z transform is mathematical tool
used for conversion of time domain into frequency domain (z domain) and is a function of
the complex valued variable Z. The z transform of a discrete time signal x(n) denoted by
X(z) and given as
∞
X(z) = ∑ x (n) z –n z-Transform.……(1)
n=-∞
Z transform is an infinite power series because summation index varies from -∞ to ∞. But
it is useful for values of z for which sum is finite. The values of z for which f (z) is finite
and lie within the region called as “region of convergence (ROC).
ADVANTAGES OF Z TRANSFORM
1. The DFT can be determined by evaluating z transform.
2. Z transform is widely used for analysis and synthesis of digital filter.
3. Z transform is used for linear filtering. z transform is also used for finding Linear
convolution, cross-correlation and auto-correlations of sequences.
4. In z transform user can characterize LTI system (stable/unstable, causal/anti-
causal) and its response to various signals by placements of pole and zero plot.
Z TRANSFORM PLOT
Imaginary Part of z
Im (z)
Z-Plane
|z|>a
|z|<a
Fig show the plot of z transforms. The z transform has real and imaginary parts. Thus a
plot of imaginary part versus real part is called complex z-plane. The radius of circle is 1
called as unit circle. This complex z plane is used to show ROC, poles and zeros. Complex
variable z is also expressed in polar form as Z= rejω where r is radius of circle is given by
|z| and ω is the frequency of the sequence in radians and given by ∟z.
Then z
a1 x1(n) + a2 x2(n) a1 X1(z) + a2 X2(z)
z Transform of linear combination of two or more signals is equal to the same linear
combination of z transform of individual signals.
avscomputer.blogspot.com 20
Created by Amit S
2) Time shifting
The Time shifting property states that if
z
x(n) X(z) And
z
Then x(n-k) X(z) z–k
Thus shifting the sequence circularly by ‘k’ samples is equivalent to multiplying its z
transform by z –k
3) Scaling in z domain
This property states that if
z
x(n) X(z) And
z
Then an x(n) x(z/a)
Thus scaling in z transform is equivalent to multiplying by an in time domain.
5) Differentiation in z domain
The Differentiation property states that if
z
x(n) X(z) And
z
Then n x(n) -z d/dz (X(z))
6) Convolution Theorem
The Circular property states that if
z
x1(n) X1(z) And
z
x2(n) X2(z) Then
z
Then x1(n) * x2(n) X1(z) X2(z)
N
Convolution of two sequences in time domain corresponds to multiplication of its Z
transform sequence in frequency domain.
7) Correlation Property
The Correlation of two sequences states that if
z
x1(n) X1(z) And
z
avscomputer.blogspot.com 21
Created by Amit S
x2(n) X2(z) Then
∞ z
then ∑ x1 (l) x2(-l) X1(z) x2(z-1)
n=-∞
jw
X(z) z=e = x(ω) at |z| = unit circle.
Thus, X(z) can be interpreted as Fourier Transform of signal sequence (x(n) r–n). Here r–n
grows with n if r<1 and decays with n if r>1. X(z) converges for |r|= 1. hence Fourier
transform may be viewed as Z transform of the sequence evaluated on unit circle. Thus
The relationship between DFT and Z transform is given by
j2∏kn
X(z) z=e = x(k)
avscomputer.blogspot.com 22
Created by Amit S
The frequency ω=0 is along the positive Re(z) axis and the frequency ∏/2 is along the
positive Im(z) axis. Frequency ∏ is along the negative Re(z) axis and 3∏/2 is along the
negative Im(z) axis.
Im(z)
ω=∏/2
z(0,+j)
z=rejω
ω=∏ ω=0
z(-1,0) z(1,0) Re(z)
ω=3∏/2
z(0,-j)
avscomputer.blogspot.com 23
Created by Amit S
1 (-1)n u(n) for |z| > 1 causal sequence
2
1+z-1 -(-1)n u(-n-1) for |z| < a anti-causal sequence
-2(3)n u(-n-1) + (0.5)n u(n) stable system
for 0.5<|z|<3
2(3)n u(n) + (0.5)n u(n) causal system
3 3-4z-1
for |z|>3
1- 3.5 z-1+1.5z-2
-2(3)n u(-n-1) - (0.5)n u(-n-1) for | anti-causal system
z|<0.5
-2(1) n u(-n-1) + (0.5)n u(n) stable system
for 0.5<|z|<1
4 2(1)n u(n) + (0.5)n u(n) causal system
1
for |z|>1
1- 1.5 z-1+0.5z-2
-2(1)n u(-n-1) - (0.5)n u(-n-1) for | anti-causal system
z|<0.5
5 1+2 z-1+ z-2 2δ(n)+8(1)n u(n)- 9(0.5)n u(n) causal system
1- 3/2 z-1+0.5z-2 for |z|>1
avscomputer.blogspot.com 24
Created by Amit S
X(z) = ∑ x (n) z –n (1)
n=-∞
Expanding the above terms we have
x(z) = …..+x(-2)Z2+ x(-1)Z+ x(0)+ x(1) Z-1 + x(2) Z2 +….. (2)
This is the expansion of z transform in power series form. Thus sequence x(n) is given as
x(n) ={ ….. ,x(-2),x(-1),x(0),x(1),x(2),…………..}.
Power series can be obtained directly or by long division method.
SOLVE USING “POWER SERIES EXPANSION“ METHOD
Sr No Function (ZT) Time domain Sequence
1 z For causal sequence an u(n)
z-a For Anti-causal sequence -an u(-n-1)
2 1 {1,3/2,7/4,15,8,……….} For |z| > 1
1- 1.5 z-1+0.5z-2 {….14,6,2,0,0} For |z| < 0.5
2
3 z +z {0,1,4,9,…..} For |z| > 3
z3 -3z2+3z -1
4 z2(1-0.5z-1)(1+z-1) (1-z-1) X(n) ={1,-0.5,-1,0.5}
-1
5 log(1+az ) (-1)n+1an/n for n≥1 and |z|>|a|
4. RECURSIVE ALGORITHM
The long division method can be recast in recursive form.
a0 + a1 z-1+ a2 z-2
X(z) =
b0 + b1 z-1+ b2 z-2
Their IZT is give as
n
x(n) = 1/b0 [ an - ∑ x(n-i) bi] for n=1,2,…………….
i=1
Thus
X(0) = a0/b0
X(1) = 1/b0 [ a1- x(0) b1]
X(2) = 1/b0 [ a1- x(1) b1 - x(0) b2] ……………
SOLVE USING “RECURSIVE ALGORITHM“ METHOD
Sr No Function (ZT) Time domain Sequence
1 1+2z-1+z-2 X(n) = {1,3,3.6439,….}
1-z-1 +0.3561z2
2 1+z-1 X(n) = {1,11/6,49/36,….}
1-5/6 z-1+ 1/6 z-2
3 z4 +z2 X(n) = { 23/16,63/64,………}
z2-3/4z+ 1/8
2. ROC dos not contain any poles of X(z). This is because x(z) becomes infinite at
the locations of the poles. Only poles affect the causality and stability of the
system.
avscomputer.blogspot.com 25
Created by Amit S
3. CASUALTY CRITERIA FOR LSI SYSTEM
LSI system is causal if and only if the ROC the system function is exterior to
the circle. i. e |z| > r. This is the condition for causality of the LSI system in terms
of z transform. (The condition for LSI system to be causal is h(n) = 0 ….. n<0 )
Im(z)
z-Plane
Re(z)
Poles inside unit circle gives stable system. Poles outside unit circle gives unstable
system. Poles on unit circle give marginally stable system.
6. A causal and stable system must have a system function that converges for
avscomputer.blogspot.com 26
Created by Amit S
|z| > r < 1.
STANDARD INVERSE Z TRANSFORMS
Properties of one sided z transform are same as that of two sided z transform except
shifting property.
1) Time delay
z+
x(n) X+(z) And
z+ k
–k
Then x(n-k) z [ X (z) + ∑ x(-n) zn]
+
k>0
n=1
2) Time advance
z+
x(n) X+(z) And
avscomputer.blogspot.com 27
Created by Amit S
z+ k-1
k
Then x(n+k) z [ X+(z) - ∑ x(n) z-n] k>0
n=0
Examples:
Q) Determine one sided z transform for following signals
1) x(n)={1,2,3,4,5} 2) x(n)={1,2,3,4,5}
One sided Z transform is very efficient tool for the solution of difference equations with
nonzero initial condition. System function of LSI system can be obtained from its
difference equation.
∞
Z{x(n-1)} = ∑ x(n-1) z-n (One sided Z transform)
n=0
= x(-1) + x(0) z-1 + x(1) z-2 + x(2) z-3 +………………
Similarly
1. Difference equations are used to find out the relation between input and output
sequences. It is also used to relate system function H(z) and Z transform.
2. The transfer function H(ω) can be obtained from system function H(z) by
putting z=ejω. Magnitude and phase response plot can be obtained by putting
various values of ω.
avscomputer.blogspot.com 28
Created by Amit S
Q) A difference equation of the system is given below
Y(n)= 0.5 x(n) + 0.5 x(n-1)
Determine a) System function
b) Pole zero plot
c) Unit sample response
d) Transfer function
e) Magnitude and phase plot
A digital filter with a system function H(z) is stable, if and only if it passes the following
terms.
a. D(Z)|Z=1 >0
b. (-1)N D(Z)|Z=-1 >0
c. |b0|>|bN|, |C0|>|CN-1|
avscomputer.blogspot.com 29
Created by Amit S
3.1 INTRODUCTION
avscomputer.blogspot.com 30
Created by Amit S
3.1 INTRODUCTION
Time domain analysis provides some information like amplitude at sampling instant but
does not convey frequency content & power, energy spectrum hence frequency domain
analysis is used.
For Discrete time signals x(n) , Fourier Transform is denoted as x(ω) & given by
∞
X(ω) = ∑ x (n) e –jωn FT….……(1)
n=-∞
DFT is denoted by x(k) and given by (ω= 2 ∏ k/N)
N-1
X(k) = ∑ x (n) e –j2 ∏ kn / N DFT…….(2)
n=0
IDFT is given as
N-1
x(n) =1/N ∑ X (k) e j2 ∏ kn / N IDFT……(3)
k=0
For calculation of DFT & IDFT two different methods can be used. First method is using
mathematical equation & second method is 4 or 8 point DFT. If x(n) is the sequence of N
samples then consider WN= e –j2 ∏ / N (twiddle factor)
k=0 W4 0 W4 0 W4 0 W4 0
[WN] = k=1 W4 0 W4 1 W4 2 W4 3
k=2 W4 0 W4 2 W4 4 W4 6
k=3 W4 0 W4 3 W4 6 W4 9
1 1 1 1
[WN] = 1 –j -1 j
1 -1 1 -1
1 j -1 -j
avscomputer.blogspot.com 32
Created by Amit S
Examples:
Q) Compute DFT of x(n) = {0,1,2,3} Ans: x4=[6, -2+2j, -2, -2-2j ]
Q) Compute DFT of x(n) = {1,0,0,1} Ans: x4=[2, 1+j, 0, 1-j ]
Q) Compute DFT of x(n) = {1,0,1,0} Ans: x4=[2, 0, 2, 0 ]
Q) Compute IDFT of x(k) = {2, 1+j, 0, 1-j } Ans: x4=[1,0,0,1]
4 Thus DFT is given by In DFT and IDFT difference is of factor 1/N &
X(k)= [WN][xn] sign of exponent of twiddle factor.
Thus
x(n)= 1/N [ WN]-1[XK]
2. Linearity
The linearity property states that if
DFT
x1(n) X1(k) And
N
DFT
x2(n) X2(k) Then
N
Then DFT
a1 x1(n) + a2 x2(n) a1 X1(k) + a2 X2(k)
avscomputer.blogspot.com 33
Created by Amit S
N
DFT of linear combination of two or more signals is equal to the same linear combination
of DFT of individual signals.
A) A sequence is said to be circularly even if it is symmetric about the point zero on the
circle. Thus X(N-n) = x(n)
B) A sequence is said to be circularly odd if it is anti symmetric about the point zero on
the circle. Thus X(N-n) = - x(n)
D) Anticlockwise direction gives delayed sequence and clockwise direction gives advance
sequence. Thus delayed or advances sequence x`(n) is related to x(n) by the circular
shift.
This property states that if the sequence is real and even x(n)= x(N-n) then DFT becomes
N-1
X(k) = ∑ x(n) cos (2∏kn/N)
n=0
This property states that if the sequence is real and odd x(n)=-x(N-n) then DFT becomes
N-1
X(k) = -j ∑ x(n) sin (2∏kn/N)
n=0
This property states that if the sequence is purely imaginary x(n)=j XI(n) then DFT
becomes
N-1
XR(k) = ∑ xI(n) sin (2∏kn/N)
n=0
N-1
XI(k) = ∑ xI(n) cos (2∏kn/N)
n=0
5. Circular Convolution
The Circular Convolution property states that if
avscomputer.blogspot.com 34
Created by Amit S
DFT
x1(n) X1(k) And
N
DFT
N x2(n) X2(k) Then
N
DFT
Then x1(n) x2(n) x1(k) x2(k)
N
It means that circular convolution of x1(n) & x2(n) is equal to multiplication of their DFT’s.
Thus circular convolution of two periodic discrete signal with period N is given by
N-1
y(m) = ∑ x1 (n) x2 (m-n)N ……….(4)
n=0
DFT
x(n) x(k) x(k)*h(k) x(n)*h(n)
IDFT
*
DFT h(n) h(k)
There are two different methods are used to calculate circular convolution
1) Graphical representation form
2) Matrix approach
avscomputer.blogspot.com 35
Created by Amit S
Q) The two sequences x1(n)={2,1,2,1} & x2(n)={1,2,3,4}. Find out the sequence x3(m)
which is equal to circular convolution of two sequences. Ans: X3(m)={14,16,14,16}
Q) Perform Linear Convolution of x(n)={1,2} & h(n)={2,1} using DFT & IDFT.
Q) Perform Linear Convolution of x(n)={1,2,2,1} & h(n)={1,2,3} using 8 Pt DFT & IDFT.
6. Multiplication
The Multiplication property states that if
DFT
X1(n) x1(k) And
N
DFT
X2(n) x2(k) Then
N N
DFT
Then x1(n) x2(n) 1/N x1(k) x2(k)
N
It means that multiplication of two sequences in time domain results in circular
convolution of their DFT’s in frequency domain.
This means multiplication of DFT of one sequence and conjugate DFT of another sequence
is equivalent to circular cross-correlation of these sequences in time domain.
N-1 N-1
∑ X(n) y*(n) = 1/N ∑ x (k) y*(k)
n=0 n=0
This equation give energy of finite duration sequence in terms of its frequency
components.
Consider that input sequence x(n) of Length L & impulse response of same system is h(n)
having M samples. Thus y(n) output of the system contains N samples where N=L+M-1. If
DFT of y(n) also contains N samples then only it uniquely represents y(n) in time domain.
Multiplication of two DFT’s is equivalent to circular convolution of corresponding time
domain sequences. But the length of x(n) & h(n) is less than N. Hence these sequences
are appended with zeros to make their length N called as “Zero padding”. The N point
circular convolution and linear convolution provide the same sequence. Thus linear
convolution can be obtained by circular convolution. Thus linear filtering is provided by
DFT.
When the input data sequence is long then it requires large time to get the output
sequence. Hence other techniques are used to filter long data sequences. Instead of
finding the output of complete input sequence it is broken into small length sequences.
The output due to these small length sequences are computed fast. The outputs due to
these small length sequences are fitted one after another to get the final output response.
Step 1> In this method L samples of the current segment and M-1 samples of the
previous segment forms the input data block. Thus data block will be
Step2> Unit sample response h(n) contains M samples hence its length is made N by
padding zeros. Thus h(n) also contains N samples.
Step3> The N point DFT of h(n) is H(k) & DFT of m th data block be xm(K) then
corresponding DFT of output be Y`m(k)
Step 4> The sequence ym(n) can be obtained by taking N point IDFT of Y`m(k). Initial
(M-1) samples in the corresponding data block must be discarded. The last L samples are
the correct output samples. Such blocks are fitted one after another to get the final
output.
avscomputer.blogspot.com 38
Created by Amit S
X(n) of Size N
Size L
X1(n)
M-1 Size L
Zeros
X2(n)
Size L
X3(n)
Y1(n)
Y3(n)
Y(n) of Size N
Step 1> In this method L samples of the current segment and M-1 samples of the
previous segment forms the input data block. Thus data block will be
X1(n) ={x(0),x(1),…………….x(L-1),0,0,0,……….}
X2(n) ={x(L),x(L+1),x(2L-1),0,0,0,0}
X3(n) ={x(2L),x(2L+2),,,,,,,,,,,,,x(3L-1),0,0,0,0}
Step2> Unit sample response h(n) contains M samples hence its length is made N by
padding zeros. Thus h(n) also contains N samples.
Step3> The N point DFT of h(n) is H(k) & DFT of m th data block be xm(K) then
corresponding DFT of output be Y`m(k)
Step 4> The sequence ym(n) can be obtained by taking N point IDFT of Y`m(k). Initial
avscomputer.blogspot.com 39
Created by Amit S
(M-1) samples are not discarded as there will be no aliasing. The last (M-1) samples of
current output block must be added to the first M-1 samples of next output block. Such
blocks are fitted one after another to get the final output.
X(n) of Size N
Size L
M-1
X1(n) Zeros
Size L
M-1
X2(n) Zeros
Size L
M-1
X3(n) Zeros
Y1(n)
M-1
Points add Y2(n)
together
Y3(n)
Y(n) of Size N
avscomputer.blogspot.com 40
Created by Amit S
DFT of the signal is used for spectrum analysis. DFT can be computed on digital computer
or digital signal processor. The signal to be analyzed is passed through anti-aliasing filter
and samples at the rate of Fs≥ 2 Fmax. Hence highest frequency component is Fs/2.
2. The radix-2 FFT algorithms are based on divide and conquer approach. In this
method, the N-point DFT is successively decomposed into smaller DFT’s. Because of this
decomposition, the number of computations are reduced.
N point sequence x(n) be splitted into two N/2 point data sequences f1(n) and f2(n). f1(n)
contains even numbered samples of x(n) and f2(n) contains odd numbered samples of
x(n). This splitted operation is called decimation. Since it is done on time domain
sequence it is called “Decimation in Time”. Thus
N-1
X(k) =∑ x (n) WNkn (1)
n=0
Since the sequence x(n) is splitted into even numbered and odd numbered samples, thus
N/2-1 N/2-1
2mk
X(k) =∑ x (2m) WN + ∑ x (2m+1) WNk(2m+1) (2)
m=0 m=0
X(k) =F1(k) + WNk F2(k) (3)
X(k+N/2) =F1(k) - WNk F2(k) (Symmetry property) (4)
avscomputer.blogspot.com 41
Created by Amit S
Fig 1 shows that 8-point DFT can be computed directly and hence no reduction in
computation.
x(0) X(0)
x(1) X(1)
x(2) 8 Point X(2)
x(3) X(3)
DFT
x(7) X(7)
Fig 3 shows N/2 point DFT base separated in N/4 boxes. In such cases equations become
g1(k) =P1(k) + WN2k P2(k) (5)
g1(k+N/2) =p1(k) - WN2k P2(k) (6)
x(0) F(0)
N/4 Point
x(4) F(1)
DFT
a A= a + WNr b
avscomputer.blogspot.com 42
Created by Amit S
b WN r B= a - WNr b
x(0) A X(0)
x(2) w8 0 B X(1)
x(1) C w8 0 X(2)
x(3) w8 0 D w8 1 X(3)
x(0) A1 A2 X(0)
x(4) w8 0 B1 B2 X(1)
x(2) C1 w8 0 C2 X(2)
x(6) w8 0 D1 w8 2 D2 X(3)
x(1) E1 E2 w8 0 X(4)
x(5) w8 0 F1 F2 w8 1 X(5)
x(3) G1 w8 0 G2 w8 2 X(6)
x(7) w8 0 H1 w8 2 H2 w8 3 X(7)
Combine
4 Point
DFT
Combine 2
2 Point Point DFT’s
DFT avscomputer.blogspot.com 43
Created by Amit S
2 Point
DFT
2 Point
DFT Combine 2
Point DFT’s
2 Point
DFT
Each butterfly operation takes two addition and one multiplication operations. Direct
computation requires N2 multiplication operation & N2 – N addition operations.
a A= a + WNr b
b WNr B= a - WNr b
From values a and b new values A and B are computed. Once A and B are computed,
there is no need to store a and b. Thus same memory locations can be used to store A
avscomputer.blogspot.com 44
Created by Amit S
and B where a and b were stored hence called as In place computation. The advantage of
in place computation is that it reduces memory requirement.
Thus for computation of one butterfly, four memory locations are required for storing two
complex numbers A and B. In every stage there are N/2 butterflies hence total 2N
memory locations are required. 2N locations are required for each stage. Since stages are
computed successively these memory locations can be shared. In every stage N/2 twiddle
factors are required hence maximum storage requirements of N point DFT will be (2N +
N/2).
BIT REVERSAL
For 8 point DIT DFT input data sequence is written as x(0), x(4), x(2), x(6), x(1), x(5),
x(3), x(7) and the DFT sequence X(k) is in proper order as X(0), X(1), X(2), X(3), X(4),
x(5), X(6), x(7). In DIF FFT it is exactly opposite. This can be obtained by bit reversal
method.
Table shows first column of memory address in decimal and second column as binary.
Third column indicates bit reverse values. As FFT is to be implemented on digital computer
simple integer division by 2 method is used for implementing bit reversal algorithms. Flow
chart for Bit reversal algorithm is as follows
DECIMAL NUMBER
B TO BE REVERSED
avscomputer.blogspot.com 45
Created by Amit S
I=1
B1=B
BR=0
B2=Int(B1/2)
BR=(2*BR)+ B1- (2 * B2)]
B1=B2;
I++
Is
I > log2N
Store BR as Bit
reversal of B
In DIF N Point DFT is splitted into N/2 points DFT’s. X(k) is splitted with k even and k odd
this is called Decimation in frequency(DIF FFT).
N/2-1 N/2-1
X(k) =∑ x (n) WNkn + ∑ x (n + N/2) WNk(n+N/2) (2)
m=0 m=0
N/2-1 N/2-1
kn kN/2
X(k) =∑ x (n) WN + WN ∑ x (n + N/2) WNkn
m=0 m=0
N/2-1 N/2-1
X(k) =∑ x (n) WNkn + (-1)k ∑ x (n + N/2) WNkn
m=0 m=0
N/2-1
X(k) =∑ x (n) + (-1)k x(n + N/2) WNkn (3)
avscomputer.blogspot.com 46
Created by Amit S
m=0
N/2-1
X(2k) =∑ x (n) + (-1)2k x(n + N/2) WN2kn (4)
m=0
N/2-1
X(2k+1) =∑ x (n)+(-1)(2k+1) x(n + N/2)WN(2k+1)n (5)
m=0
a A= a + b
b W Nr B= (a –b)WNr
Fig 2 shows signal flow graph and stages for computation of radix-2 DIF FFT algorithm of
N=4
x(0) A X(0)
Fig 3 shows signal flow graph and stages for computation of radix-2 DIF FFT algorithm of
N=8
avscomputer.blogspot.com 47
Created by Amit S
x(0) A1 A2 X(0)
GOERTZEL ALGORITHM
FFT algorithms are used to compute N point DFT for N samples of the sequence x(n). This
requires N/2 log2N number of complex multiplications and N log2N complex additions. In
some applications DFT is to be computed only at selected values of frequencies and
selected values are less than log2N, then direct computations of DFT becomes more
efficient than FFT. This direct computations of DFT can be realized through linear filtering
of x(n). Such linear filtering for computation of DFT can be implemented using Goertzel
algorithm.
avscomputer.blogspot.com 49
Created by Amit S
∞
yk(n) = ∑ x (m) WN-k(n-m) u(n–m) (3)
m=-∞
N-1
yk(n) = ∑ x (m) WN-k(n-m) (4)
m=0
Thus DFT can be obtained as the output of LSI system at n=N. Such systems can give
X(k) at selected values of k. Thus DFT is computed as linear filtering operations by
Goertzel Algorithm.
avscomputer.blogspot.com 50
Created by Amit S
4.1 INTRODUCTION
4.1 INTRODUCTION
avscomputer.blogspot.com 51
Created by Amit S
To remove or to reduce strength of unwanted signal like noise and to improve the
quality of required signal filtering process is used. To use the channel full bandwidth we
mix up two or more signals on transmission side and on receiver side we would like to
separate it out in efficient way. Hence filters are used. Thus the digital filters are mostly
used in
In signal processing, the function of a filter is to remove unwanted parts of the signal,
such as random noise, or to extract useful parts of the signal, such as the components
lying within a certain frequency range.
There are two main kinds of filter, analog and digital. They are quite different in their
physical makeup and in how they work.
An analog filter uses analog electronic circuits made up from components such as
resistors, capacitors and op amps to produce the required filtering effect. Such filter
circuits are widely used in such applications as noise reduction, video signal enhancement,
graphic equalizers in hi-fi systems, and many other areas.
In analog filters the signal being filtered is an electrical voltage or current which is the
direct analogue of the physical quantity (e.g. a sound or video signal or transducer
output) involved.
The analog input signal must first be sampled and digitized using an ADC (analog to
digital converter). The resulting binary numbers, representing successive sampled values
of the input signal, are transferred to the processor, which carries out numerical
calculations on them. These calculations typically involve multiplying the input values by
constants and adding the products together. If necessary, the results of these
calculations, which now represent sampled values of the filtered signal, are output
through a DAC (digital to analog converter) to convert the signal back to analog form.
avscomputer.blogspot.com 52
Created by Amit S
In a digital filter, the signal is represented by a sequence of numbers, rather than a
voltage or current.
Analog signal
Sampler Quantizer Digital
Xa (t) & Encoder Filter
1. Samplers are used for converting continuous time signal into a discrete time signal
by taking samples of the continuous time signal at discrete time instants.
2. The Quantizer are used for converting a discrete time continuous amplitude signal
into a digital signal by expressing each sample value as a finite number of digits.
3. In the encoding operation, the quantization sample value is converted to the binary
equivalent of that quantization level.
4. The digital filters are the discrete time systems used for filtering of sequences.
These digital filters performs the frequency related operations such as low pass,
high pass, band pass and band reject etc. These digital Filters are designed with
digital hardware and software and are represented by difference equation.
ω
-ωc ωc
2. Highpass Filter
A highpass filter is made up of a stopband and a passband where the lower frequencies
of the input signal are attenuated while the higher frequencies are passed.
|H(ω)|
ω
-ωc ωc
3. Bandpass Filter
A bandpass filter is made up of two stopbands and one passband so that the lower and
higher frequencies of the input signal are attenuated while the intervening
frequencies are passed.
avscomputer.blogspot.com 54
Created by Amit S
|H(ω)|
ω
-ω2 -ω1 ω2 ω1
4. Bandstop Filter
A bandstop filter is made up of two passbands and one stopband so that the lower and
higher frequencies of the input signal are passed while the intervening frequencies are
attenuated. An idealized bandstop filter frequency response has the following shape.
|H(ω)|
5. Multipass Filter
A multipass filter begins with a stopband followed by more than one passband. By
default, a multipass filter in Digital Filter Designer consists of three passbands and
four stopbands. The frequencies of the input signal at the stopbands are attenuated
while those at the passbands are passed.
6. Multistop Filter
A multistop filter begins with a passband followed by more than one stopband. By
default, a multistop filter in Digital Filter Designer consists of three passbands and
two stopbands.
1. Ideal filters have a constant gain (usually taken as unity gain) passband
characteristic and zero gain in their stop band.
avscomputer.blogspot.com 55
Created by Amit S
2. Ideal filters have a linear phase characteristic within their passband.
3. Ideal filters also have constant magnitude characteristic.
4. Ideal filters are physically unrealizable.
4 FIR systems has limited or finite memory IIR system requires infinite memory.
requirements.
5 FIR filters are always stable Stability cannot be always guaranteed.
6 FIR filters can have an exactly linear phase IIR filter is usually more efficient design
response so that no phase distortion is in terms of computation time and
introduced in the signal by the filter. memory requirements. IIR systems
usually requires less processing time and
storage as compared with FIR.
7 The effect of using finite word length to Analogue filters can be easily and readily
implement filter, noise and quantization transformed into equivalent IIR digital
errors are less severe in FIR than in IIR. filter. But same is not possible in FIR
because that have no analogue
counterpart.
8 All zero filters Poles as well as zeros are present.
9 FIR filters are generally used if no phase IIR filters are generally used if sharp
distortion is desired. cutoff and high throughput is required.
Example: Example:
System described by System described by
Y(n) = 0.5 x(n) + 0.5 x(n-1) is FIR filter. Y(n) = y(n-1) + x(n) is IIR filter.
h(n)={0.5,0.5} h(n)=an u(n) for n≥0
4. 3 STRUCTURES FOR FIR SYSTEMS
avscomputer.blogspot.com 56
Created by Amit S
2. Cascade Form Structure
3. Frequency-Sampling Structures
4. Lattice structures.
The convolution of h(n) and x(n) for FIR systems can be written as
M-1
y(n)=∑ h(k) x(n–k) (1)
k=0
Implementation of direct form structure of FIR filter is based upon the above equation.
+ + + +
h(0)x(n) h(0)x(n)+
h(1)x(n) y(n)
1) There are M-1 unit delay blocks. One unit delay block requires one memory
location. Hence direct form structure requires M-1 memory locations.
2) The multiplication of h(k) and x(n-k) is performed for 0 to M-1 terms. Hence M
multiplications and M-1 additions are required.
3) Direct form structure is often called as transversal or tapped delay line filter.
In cascade form, stages are cascaded (connected) in series. The output of one system is
input to another. Thus total K number of stages are cascaded. The total system function
'H' is given by
k
H(z)=π Hk(z) (3)
k=1
avscomputer.blogspot.com 57
Created by Amit S
FIG- CASCADE FORM REALIZATION OF FIR SYSTEM
Each H1(z), H2(z)… etc is a second order section and it is realized by the direct form as
shown in below figure.
x(n) x(n-1)
+ + y(n)
Z transform is given as
M N
H(z) = ∑ bk z / 1+ ∑ ak z–k
–k
(2)
K=0 k=1
M N
Here H1(z) = ∑ bk z–k And H2(z) = 1+ ∑ ak z–k
K=0 k=0
avscomputer.blogspot.com 58
Created by Amit S
Overall IIR system can be realized as cascade of two function H1(z) and H2(z). Here
H1(z) represents zeros of H(z) and H2(z) represents all poles of H(z).
DIRECT FORM - I
b0
x(n) + + y(n)
Z-1 Z-1
b1 -a1
+ +
Z-1 Z-1
b2 -a2
+ +
bM-1 + -aN-1
+
Z-1 Z-1
bM -aN
2. There are M+N-1 unit delay blocks. One unit delay block requires one memory
location. Hence direct form structure requires M+N-1 memory locations.
DIRECT FORM - II
2. Two delay elements of all pole and all zero system can be merged into single delay
element.
avscomputer.blogspot.com 59
Created by Amit S
4. The direct form II requires same number of multiplications(M+N+1) and additions
(M+N) as that of direct form I.
X(n) b0
+ + y(n)
Z-1
-a1 b1
+ +
Z-1
-a2 b2
+ +
-aN-1 bN-1 +
+
Z-1
-aN bN
In cascade form, stages are cascaded (connected) in series. The output of one system is
input to another. Thus total K number of stages are cascaded. The total system function
'H' is given by
k
H(z)=π Hk(z) (3)
k=1
Each H1(z), H2(z)… etc is a second order section and it is realized by the direct form as
shown in below figure.
avscomputer.blogspot.com 60
Created by Amit S
where HK(z) = bk0 + bk1 z-1 + bk2 z-2 / 1 + ak1 z-1 + ak2 z-2 (2)
X(n) bk0
+ + y(n)
Z-1
-ak1 bk1
+ +
Z-1
-ak2 bk2
+ +
H1(z)avscomputer.blogspot.com
+
61
k
H12(z)
(z) ++
Created by Amit S
X(n) y(n)
Z-1
-ak1 bk1
+ +
Z-1
-ak2
+
1. IMPULSE INVARIANCE
2. BILINEAR TRANSFORMATION
3. BUTTERWORTH APPROXIMATION
Impulse Invariance Method is simplest method used for designing IIR Filters.
Important Features of this Method are
1. In impulse variance method, Analog filters are converted into digital filter just by
replacing unit sample response of the digital filter by the sampled version of
impulse response of analog filter. Sampled signal is obtained by putting t=nT
hence
h(n) = ha(nT) n=0,1,2. ………….
where h(n) is the unit sample response of digital filter and T is sampling interval.
2. But the main disadvantage of this method is that it does not correspond to simple
algebraic mapping of S plane to the Z plane. Thus the mapping from analog
frequency to digital frequency is many to one. The segments
avscomputer.blogspot.com 62
Created by Amit S
(2k-1)∏/T ≤ Ω ≤ (2k+1) ∏/T of jΩ axis are all mapped on the unit circle ∏≤ω≤∏.
This takes place because of sampling.
4. Because of these factors, its application is limited to design low frequency filters
like LPF or a limited class of band pass filters.
Z is represented as rejω in polar form and relationship between Z plane and S plane is
given as Z=eST where s= σ + j Ω.
Z= eST (Relationship Between Z plane and S plane)
Z= e (σ + j Ω) T
= eσT . ejΩT
Comparing Z value with the polar form we have.
r= e σ T and ω = Ω T
Here we have three condition
1) If σ = 0 then r=1
2) If σ < 0 then 0 < r < 1
3) If σ > 0 then r> 1
Thus
1) Left side of s-plane is mapped inside the unit circle.
2) Right side of s-plane is mapped outside the unit circle.
3) jΩ axis is in s-plane is mapped on the unit circle.
Im(z) jΩ
1
Re(z) σ
avscomputer.blogspot.com 63
Created by Amit S
Im(z) jΩ
1
Re(z) σ
where pk are the poles of the analog filter and ck are the coefficients of partial fraction
expansion. The impulse response of the analog filter ha(t) is obtained by inverse Laplace
transform and given as
n
ha(t) = Σ Ck epkt (2)
k=1
The unit sample response of the digital filter is obtained by uniform sampling of ha(t).
h(n) = ha(nT) n=0,1,2. ………….
n
h(n) =Σ Ck epknT (3)
k=1
avscomputer.blogspot.com 64
Created by Amit S
System function of digital filter H(z) is obtained by Z transform of h(n).
N ∞
H(z) =Σ Ck Σ epkT z-1 n
(4)
k=1 n=0
Using the standard relation and comparing equation (1) and (4) system function of digital
filter is given as
1 1
s - pk 1- epkT z-1
The method of filter design by impulse invariance suffers from aliasing. Hence in order to
overcome this drawback Bilinear transformation method is designed. In analogue domain
frequency axis is an infinitely long straight line while sampled data z plane it is unit circle
avscomputer.blogspot.com 65
Created by Amit S
radius. The bilinear transformation is the method of squashing the infinite straight analog
frequency axis so that it becomes finite.
3. There is one to one correspondence between continuous time and discrete time
frequency points. Entire range in Ω is mapped only once into the range -∏≤ω≤∏.
5. But the main disadvantage of frequency warping is that it does change the shape
of the desired filter frequency response. In particular, it changes the shape of the
transition bands.
Z is represented as rejω in polar form and relationship between Z plane and S plane in
BZT method is given as
S= 2 z-1
T z+1
S= 2 rejω - 1
T rejω + 1
S= 2 r (cos ω + j sin ω) -1
T r (cos ω + j sin ω) +1
S= 2 r2 -1 + 2r j 22 r sin ω
2
T 1+r +2r cos ω p11+r +2r cos ω
σ= 2 r2 -1
T 1+ r2+2r cos ω
avscomputer.blogspot.com 66
Created by Amit S
Ω= 2 2 r sin ω
T 1+ r2+2r cos ω
When r =1
Ω= 2 sin ω
T 1+cos ω
Ω=
= (2/T) tan (ω/2)
ω= 2 tan -1
(ΩT/2)
The above equations shows that in BZT frequency relationship is non-linear. The
frequency relationship is plotted as
-1
ω 2 tan (ΩT/2)
ΩT
avscomputer.blogspot.com 67
Created by Amit S
Sr Impulse Invariance Bilinear Transformation
No
1 In this method IIR filters are designed This method of IIR filters design is based on
having a unit sample response h(n) that is the trapezoidal formula for numerical
sampled version of the impulse response of integration.
the analog filter.
2 In this method small value of T is selected The bilinear transformation is a conformal
to minimize the effect of aliasing. mapping that transforms the j Ω axis into
the unit circle in the z plane only once, thus
avoiding aliasing of frequency components.
3 They are generally used for low frequencies For designing of LPF, HPF and almost all
like design of IIR LPF and a limited class of types of Band pass and band stop filters this
bandpass filter method is used.
4 Frequency relationship is linear. Frequency relationship is non-linear.
Frequency warping or frequency
compression is due to non-linearity.
5 All poles are mapped from the s plane to All poles and zeros are mapped.
the z plane by the relationship
Zk= epkT. But the zeros in two domain does
not satisfy the same relationship.
3 3 1 / s3 + 2 s2 + 2s +1 s3 / s3 + 2 s2 + 2s +1
METHOD FOR DESIGNING DIGITAL FILTERS USING BZT
step 2. Find out the value of frequency scaled analog transfer function
Apply BZT. i.e Replace s by the ((z-1)/(z+1)). And find out the desired transfer
function of digital function.
Example:
Q) Design first order high pass butterworth filter whose cutoff frequency is 1 kHz at
sampling frequency of 104 sps. Use BZT Method
avscomputer.blogspot.com 68
Created by Amit S
ωc = 2∏f
= 2000 rad/sec
Step 4. Find out the digital filter transfer function. Replace s by (z-1)/(z+1)
H(z)= z-1
1.325z -0.675
Q) Design second order low pass butterworth filter whose cutoff frequency is 1 kHz at
sampling frequency of 104 sps.
Q) First order low pass butterworth filter whose bandwidth is known to be 1 rad/sec . Use
BZT method to design digital filter of 20 Hz bandwidth at sampling frequency 60 sps.
Q) Second order low pass butterworth filter whose bandwidth is known to be 1 rad/sec .
Use BZT method to obtain transfer function H(z) of digital filter of 3 DB cutoff frequency of
150 Hz and sampling frequency 1.28 kHz.
Q) The transfer function is given as s2+1 / s2+s+1 The function is for Notch filter with
frequency 1 rad/sec. Design digital Notch filter with the following specification
(1) Notch Frequency= 60 Hz
(2) Sampling frequency = 960 sps.
The filter passes all frequencies below Ωc. This is called passband of the filter. Also
the filter blocks all the frequencies above Ωc. This is called stopband of the filter. Ωc is
called cutoff frequency or critical frequency.
No Practical filters can provide the ideal characteristic. Hence approximation of the
ideal characteristic are used. Such approximations are standard and used for filter design.
Such three approximations are regularly used.
a) Butterworth Filter Approximation
b) Chebyshev Filter Approximation
c) Elliptic Filter Approximation
Butterworth filters are defined by the property that the magnitude response is
maximally flat in the passband.
avscomputer.blogspot.com 69
Created by Amit S
|H(Ω)|2
ΩC Ω
1
|Ha(Ω)| = 2
1 + (Ω/Ωc)2N
The squared magnitude function for an analog butterworth filter is of the form.
|Ha(Ω)|2= 1
1 + (Ω/Ωc)2N
N indicates order of the filter and Ωc is the cutoff frequency (-3DB frequency).
At s = j Ω magnitude of H(s) and H(-s) is same hence
Ha(s) Ha(-s) = 1
1 + (-s2/Ωc2)N
To find poles of H(s). H(-s) , find the roots of denominator in above equation.
-s2 = (-1)1/N
Ωc2
j(2k+1) ∏
As e = -1 where k = 0,1,2,…….. N-1.
j(2k+1) ∏ / N
pk = + √-1 Ωc [ e ]1/2
j(2k+1) ∏ / 2N
Pk = + j Ωc e
j∏/2
As e =j
j∏/2 j(2k+1) ∏ / 2N
Pk = + Ωc e e
avscomputer.blogspot.com 70
Created by Amit S
Pk = + Ωc e j(N+2k+1) ∏ / 2N (1)
This equation gives the pole position of H(s) and H(-s).
The frequency response characteristic of |Ha(Ω)|2 is as shown. As the order of the filter N
increases, the butterworth filter characteristic is more close to the ideal characteristic.
Thus at higher orders like N=16 the butterworth filter characteristic closely approximate
ideal filter characteristic. Thus an infinite order filter (N ∞) is required to get ideal
characteristic.
|Ha(Ω)|2 N=18
N=6
N=2
|Ha(Ω)|
Ap
0.5
As
Ω
Ωp Ωc Ωs
1 + (Ωp/Ωc)2N
1 ≤ As2
1 + (Ωs/Ωc)2N
(Ωp/Ωc)2N = (1/Ap2) - 1
(Ωs/Ωc)2N = (1/As2) - 1
2N
Ωs = (1/As2)-1
Ωp (1/Ap2)-1
As (DB) = - 20 log As
-As/20
As = 10
(As)-2 = 10 As/10
(As)-2 = 10 0.1 As
DB
Example
|Ha(Ω)|
0.89125
0.17783
0.2∏ 0.3∏ Ω
N= 5.88
avscomputer.blogspot.com 73
Created by Amit S
Hence N=6
Ωc = Ωp
[(1/Ap2) -1]1/2N
j(N+2k+1) ∏ / 2N
Pk = + Ω c e
K Poles
j13∏/12
3 P3= + 0.7032 e -0.679 - j 0.182
0.679 + j 0.182
4
j15∏/12 -0.497 - j 0.497
P4= + 0.7032 e
0.497 + j 0.497
5
j17∏/12 -0.182 - j 0.679
P5= + 0.7032 e
0.182 + j 0.679
For stable filter all poles lying on the left side of s plane is selected. Hence
Ha(s) = Ωc6
(s-s1)(s-s1 ) (s-s2)(s-s2*) (s-s3)(s-s3*)
*
Hence
Ha(s) = (0.7032)6
avscomputer.blogspot.com 74
Created by Amit S
(s+0.182-j0.679)(s+0.182+j0.679) (s+0.497-j0.497)
(s+0.497+j0.497) (s+0.679-j0.182)(s+0.679-
j0.182)
Ha(s) = 0.1209
[(s+0.182)2 +(0.679)2] [(s+0.497)2+(0.497)2] [(s+0.679)2-(0.182)2]
Q) Design second order low pass butterworth filter whose cutoff frequency is 1 kHz at
sampling frequency of 104 sps. Use BZT and Butterworth approximation.
When the cutoff frequency Ωc of the low pass filter is equal to 1 then it is called
normalized filter. Frequency transformation techniques are used to generate High pass
filter, Bandpass and bandstop filter from the lowpass filter system function.
s
1 Low Pass
ωlp
ωlp - Password edge frequency of another LPF
2 High Pass
avscomputer.blogspot.com 75
Created by Amit S
ωhp
s
ωhp = Password edge frequency of HPF
Band Pass
(s2 + ωl ωh )
3 s (ωh - ωl )
ωh - higher band edge frequency
ωl - Lower band edge frequency
Band Stop
s (ωh - ωl)
4 s2+ ωh ωl
ωh - higher band edge frequency
ωl - Lower band edge frequency
z-1 - a
1 Low Pass
1 - az-1
- (z-1+ a)
2 High Pass
1 + az-1
Example:
Q) Design high pass butterworth filter whose cutoff frequency is 30 Hz at sampling
frequency of 150 Hz. Use BZT and Frequency transformation.
Step 4. Find out the digital filter transfer function. Replace s by (z-1)/(z+1)
H(z)= z-1
1.7265z - 0.2735
avscomputer.blogspot.com 76
Created by Amit S
Q) Design second order band pass butterworth filter whose passband of 200 Hz and 300
Hz and sampling frequency is 2000 Hz. Use BZT and Frequency transformation.
Q) Design second order band pass butterworth filter which meet following specification
Lower cutoff frequency = 210 Hz
Upper cutoff frequency = 330 Hz
Sampling Frequency = 960 sps
Use BZT and Frequency transformation.
1. FIR filter always provides linear phase response. This specifies that the signals in
the pass band will suffer no dispersion Hence when the user wants no phase
distortion, then FIR filters are preferable over IIR. Phase distortion always
degrade the system performance. In various applications like speech processing,
data transmission over long distance FIR filters are more preferable due to this
characteristic.
2. FIR filters are most stable as compared with IIR filters due to its non feedback
nature.
3. Quantization Noise can be made negligible in FIR filters. Due to this sharp cutoff
FIR filters can be easily designed.
4. Disadvantage of FIR filters is that they need higher ordered for similar magnitude
response of IIR filters.
System is stable only if system produces bounded output for every bounded input. This is
stability definition for any system.
Here h(n)={b0, b1, b2, } of the FIR filter are stable. Thus y(n) is bounded if input
x(n) is bounded. This means FIR system produces bounded output for every bounded
input. Hence FIR systems are always stable.
The various method used for FIR Filer design are as follows
1. Fourier Series method
2. Windowing Method
3. DFT method
4. Frequency sampling Method. (IFT Method)
GIBBS PHENOMENON
Consider the ideal LPF frequency response as shown in Fig 1 with a normalizing angular
cut off frequency Ωc.
2. Consider the example of LPF having desired frequency response Hd (ω) as shown
in figure. The oscillations or ringing takes place near band-edge of the filter.
avscomputer.blogspot.com 78
Created by Amit S
response W(ω) of the window function. This oscillatory behavior is called "Gibbs
Phenomenon".
W[n]
WINDOWING TECHNIQUE
Windowing is the quickest method for designing an FIR filter. A windowing function
simply truncates the ideal impulse response to obtain a causal FIR approximation that is
non causal and infinitely long. Smoother window functions provide higher out-of band
rejection in the filter response. However this smoothness comes at the cost of wider
stopband transitions.
Various windowing method attempts to minimize the width of the main lobe (peak)
of the frequency response. In addition, it attempts to minimize the side lobes (ripple) of
the frequency response.
=1 for 0 ≤ n ≤ N
=0 otherwise
avscomputer.blogspot.com 79
Created by Amit S
Kaiser Window: This windowing method is designed to generate a sharp central peak. It
has reduced side lobes and transition band is also narrow. Thus commonly used in FIR
filter design.
Hamming Window: This windowing method generates a moderately sharp central peak.
Its ability to generate a maximally flat response makes it convenient for speech
processing filtering.
Hanning Window: This windowing method generates a maximum flat filter design.
avscomputer.blogspot.com 80
Created by Amit S
Filters can be designed from its pole zero plot. Following two constraints should be
imposed while designing the filters.
1. All poles should be placed inside the unit circle on order for the filter to be stable.
However zeros can be placed anywhere in the z plane. FIR filters are all zero filters hence
they are always stable. IIR filters are stable only when all poles of the filter are inside unit
circle.
2. All complex poles and zeros occur in complex conjugate pairs in order for the filter
coefficients to be real.
In the design of low pass filters, the poles should be placed near the unit circle at points
corresponding to low frequencies ( near ω=0)and zeros should be placed near or on unit
circle at points corresponding to high frequencies (near ω=∏). The opposite is true for
high pass filters.
A notch filter is a filter that contains one or more deep notches or ideally perfect nulls in
its frequency response characteristic. Notch filters are useful in many applications where
specific frequency components must be eliminated. Example Instrumentation and
recording systems required that the power-line frequency 60Hz and its harmonics be
eliminated.
To create nulls in the frequency response of a filter at a frequency ω0, simply
introduce a pair of complex-conjugate zeros on the unit circle at an angle ω0.
comb filters are similar to notch filters in which the nulls occur periodically across
the frequency band similar with periodically spaced teeth. Frequency response
characteristic of notch filter |H(ω)| is as shown
avscomputer.blogspot.com 81
Created by Amit S
ωo ω1 ω
DIGITAL RESONATOR
A digital resonator is a special two pole bandpass filter with a pair of complex
conjugate poles located near the unit circle. The name resonator refers to the fact that the
filter has a larger magnitude response in the vicinity of the pole locations. Digital
resonators are useful in many applications, including simple bandpass filtering and speech
generations.
Ideal filters are not physically realizable because Ideal filters are anti-causal and as only
causal systems are physically realizable.
Proof:
Let take example of ideal lowpass filter.
H(ω) = 1 for - ωc ≤ ω ≤ ωc
= 0 elsewhere
The unit sample response of this ideal LPF can be obtained by taking IFT of H(ω).
1_ ∞
h(n) =2∏ ∫ H(ω) ejωn dω (1)
-∞
ωc
1_
h(n) =
2∏
∫ 1 ejωn dω (2)
-ωc
ωc
1_ ejωn
h(n) = 2∏ jn
-ωc
1___
[ejωcn - e-jωcn ]
2∏jn
i.e
sin (ωcn )
∏n for n≠0
h(n) =
ωc
n for n=0
LSI system is causal if its unit sample response satisfies following condition.
h(n) = 0 for n<0
In above figure h(n) extends -∞ to ∞. Hence h(n) ≠0 for n<0. This means causality
condition is not satisfied by the ideal low pass filter. Hence ideal low pass filter is non
causal and it is not physically realizable.
avscomputer.blogspot.com 83
Created by Amit S
The order of a digital filter can be defined as the number of previous inputs (stored in the
processor's memory) used to calculate the current output.
This is illustrated by the filters given as examples in the previous section.
Example (1): yn = xn
This is a zero order filter, since the current output yn depends only on the current
input xn and not on any previous inputs.
Q) For each of the following filters, state the order of the filter and identify the values of
its coefficients:
(a) yn = 2xn - xn-1 A) Order = 1: a0 = 2, a1 = -1
(b) yn = xn-2 B) Order = 2: a0 = 0, a1 = 0, a2 = 1
(c) yn = xn - 2xn-1 + 2xn-2 + xn-3 C) Order = 3: a0 = 1, a1 = -2, a2 = 2, a3 = 1
avscomputer.blogspot.com 84
Created by Amit S
TOPIC 5. DSP PROCESSOR AND APPLICATIONS OF DSP
1. SPEECH RECOGNITION
2. SOUND PROCESSING
3. ECHO CANCELLATION
4. VIBRATION ANALYSIS
5. IMAGE PROCESSING
6. LINEAR PREDICTION OF SPEECH SYNTHESIS
avscomputer.blogspot.com 85
Created by Amit S
5.1 REQUIREMENTS OF DSP PROCESSORS
The most fundamental mathematical operation in DSP is sum of products also called as
dot of products.
Y(n)= h(0)*x(n) + h(1)*x(n-1) +………+ h(N-1)*x(n-N)
This operation is mostly used in digital filter designing, DFT, FFT and many other DSP
applications. A DSP is optimized to perform repetitive mathematical operations such as
the dot product. There are five basic requirements of s DSP processor to optimize the
performance They are
1) Fast arithmetic
2) Extended precision
3) Fast Execution - Dual operand fetch
4) Fast data exchange
5) Fast operations
6) Circular buffering
4 Fast data Exchange Multiple registers, Separate program and data memory and
Multiple operands fetch capacity
5 Fast Operations Program and data memories are on chip memory and
extendable off-chip
avscomputer.blogspot.com 86
Created by Amit S
Powerful instruction set and various addressing modes.
1) Von-Neumann Architecture
General purpose microprocessors uses the Von-Neumann Architectures. (named after the
American mathematician John Von Neumann)
1. It consists of ALU, accumulator, IO devices and common address and data bus. It
also consists of a single memory which contains data and instructions, a single bus for
transferring data and instructions into and out of the CPU.
2. Multiplying two numbers requires at leased three cycles, two cycles are required to
transfer the two numbers into the CPU and one cycle to transfer the instruction.
3. This architecture is giving good performance when all the required tasks can be
executed serially.
1. Data and program instructions each have separate memories and buses as shown.
Program memory address and data buses for program memory and data memory address
and data buses for data memory.
2. Since the buses operate independently, program instructions and data can be fetched
at the same time. Therefore improving speed over the single bus Von Neumann design.
3. In order to perform a single FIR filter multiply-accumulate, an instruction is fetched
from the program memory, and during the same cycle, a coefficient can be fetched from
the data memory. A second cycle is required to fetch the data word from data memory.
1. In these architectures, program and data are allowed in the program memory. For
example in case of digital filter coefficients are stored in program memory and data
samples are in data memory. A coefficient and data sample can thus be fetched in a single
cycle. At the same time, instruction is also fetched from program memory.
2. Analog devices modified architecture can handle this is two ways. In the first method ,
the program memory is accessed twice in an instruction cycle. (As in case of ADSP-218x)
In the second method program cache is provided.
3. The DSP caches the instruction in cache memory and when the next time the
instruction is called, the program sequence obtains it from the cache. (In case of ADSP-
219x)
Fig 1 shows Harvard Architecture Common to many DSP processors. The processor can
simultaneously access two memory blanks using two independent sets of buses allowing
operands to be loaded while fetching instructions.
Fig 2 shows Von-Neumann memory architecture common among microcontrollers Since
there is only one data bus, operands can not be loaded while instructions are fetched.
PROCESSOR PROCESSOR
CORE CORE
Data Bus 2
MEMORY A MEMORY B
88
Created by Amit S
5.3 CORE ARCHITECTURE OF ADSP-21xx
ADSP-21xx family DSP's are used in high speed numeric processing applications.
ADSP-21xx architecture consists of
Instruction
Data Register
Data
Address Address Cache Program
Generator1 Generator 2 Memory Sequencer
PMA BUS
DMA BUS
PMD BUS
Bus
Exchange
DMD BUS
R BUS
• Three Computational Units
Arithmetic logic unit (ALU)
Multiply-accumulate (MAC)
Shifter
• Two Data Address generators (DAG)
• Program sequencer
• On chip peripheral Options
RAM or ROM
Data Memory RAM
Serial port
Timer
Host interface port
DMA Port
BUSES:
The ADSP-21xx processors have five internal buses to ensure data transfer.
89
Created by Amit S
1. PMA and DMA buses are used internally for addresses associated with Program and
data memory. The PMD and DMD are used for data associated with memory
spaces. Off Chip, the buses are multiplexed into a single external address bus and a
single external data bus. The address spaces are selected by the appropriate
control signal.
2. The result (R) bus transfers the intermediate results directly between various
computational units.
3. PMA bus is 14-bits wide allowing direct access of up to 16k words of code and data.
PMD bus is 24 bits wide to accommodate the 24 bit instruction width.
The DMA bus 14 bits wide allowing direct access of up to 16k words of data.
The DMD bus is 16 bit wide.
4. The DMD bus provides a path for the contents of any register in the processor to be
transferred to any other register or to any external data memory location in a
single cycle. DMA address comes from two sources. An absolute value specified in
the instruction code (direct addressing) or the output of DAG (Indirect addressing).
The PMD bus can also be used to transfer data to and from the computational units
thro direct path or via PMD-DMD bus exchange unit.
COMPUTATIONAL UNITS:
The processor contains three -independent computational units. ALU, MAC (Multiplier-
accumulator) and the barrel shifter. The computational units process 16-bit data directly.
ALU is 16 bits wide with two 16 bit input ports and one output port. The ALU provides a
standard set of arithmetic and logic functions.
ALU Features
1. Add, subtract, Negate, increment, decrement, Absolute value, AND, OR, EX-OR, Not
etc.
2. Bitwise operators, Constant operators
3. Multi-precision Math Capability
4. Divide Primitives and overflow support.
MAC:
The MAC performs high speed single-cycle multiply/add and multiply/subtract
operations. MAC has two 16 bit input ports and one 32 bit product output port. 32 bit
product is passed to a 40 bit adder/subtractor which adds or subtracts the new product
from the content of the multiplier result (MR). It also contains a 40 bit accumulator which
provides 8 bit overflow in successive additions to ensure that no loss of data occurs. 256
overflows would have to occur before any data is lost. A set of background registers is
also available in the MAC for interrupts service routine.
SHIFTER:
The shifter performs a complete set of shifting functions like logical and arithmetic
shifts (circular or linear shift) , normalization (fixed point to floating point conversion),
demoralization (floating point to fixed point conversion) etc
90
Created by Amit S
ALU, MAC and shifter are connected to DMD bus on one side and to R bus on other side.
All three sections contains input and output registers which are accessible from the
internal DMD bus. Computational operations generally take the operands from input
registers and load the result into an output register.
DAG1 can supply addresses to data memory only. DAG2 can supply addresses to
either data memory or program memory. When the appropriate mode bit is set in mode
status register (MSTAT), the output address of DAG1 is bit-reversed before being driven
onto the address bus. This feature facilitates addressing in radix-2 FFT algorithm.
PROGRAM SEQUENCER:
The program sequencer exchanges data with DMD bus. It can also take from PMD
bus. It supplies instruction address to program memory. The sequencer is driven by the
instruction register which holds the currently executing instruction. The instruction
register introduces a single level of pipelining into the program flow. Instructions are
fetched and loaded into the instruction register during one processor cycle, and executed
during the following cycle while the next instruction is pre-fetched. The cache memory
stores up to 16 previously executed instructions. Thus data memory on PMD bus is more
efficient because of cache memory. This also makes pipelining and increase the speed of
operations.
Various development tools such as assembler , linker, debugger, simulator are available
for ADSP-21xx family.
SYSTEM BUILDER
91
Created by Amit S
The system builder is the software development tool for describing the
configuration of the target system's memory and I/O. The ranges for program
memory(PM) and data memory(DM) are described.
The program memory space is allotted with 16 K of memory for instructions and
16K for data. The data memory space is also divide into two blocks. The lowest 2K is the
dual -port memory that is shared by both processors. Each processor has an additional
14K of private data memory.
.SYSTEM
.ADSP2108
.ENDSYS
The sample system configuration file (.SYS) is shown. .SEG directive is used to declare
the system's physical memory segments and its characteristics. .PORT directive declares
the memory mapped IO port. .ENDSYS indicates the end of .SYS file.
ASSEMBLER
The assembler translated source code into object code modules. The source code is
written in assembly language file (.DSP) Assembler reads .DSP file and generates four
output filed with the same root name. Object file(.OBJ), Code File(.CDE), Initialization File
(.INT), List File(.LST) etc. The file can be assembled by the following command.
ASM21 FILTER
LINKER
92
Created by Amit S
The linker is a program used to join together object files into one large object file.
The linker produces a link file which contains the binary codes for all the combined
modules. The linker uses .INT, .CDE, .OBJ and .ACH file and generates three files. Map
listing file (.MAP), Memory Image File (.EXE) and Symbol table (.SYM).
Here Filter is the input file name, sample.ACH file is system architecture file name and
FILTER.EXE is output file name.
DEBUGGER
A debugger is a program which allows user to load object code program into system
memory, execute the program and debug it. The debugger allows the user to look at the
contents of registers and memory locations etc. We can change the contents of registers
and memory locations at run time, generates breakpoints etc.
SIMULATOR
1. SPEECH RECOGNITION
1. In speech recognition system using microphone one can input speech or voice. The
analog speech signal is converted to digital speech signal by speech digitizer. Such
digital signal is called digitized speech.
3. Voice operated consumer products like TV, VCR, Radio, lights, fans and voice
operated telephone dialing are examples of DSP based speech recognized devices.
93
Created by Amit S
Impulse
Train Voiced
Generator Synthetic
speech
× Time
varying
digital filter
Random
number
generator Unvoiced
1. For voiced sound, pulse generator is selected as signal source while for unvoiced
sounds noise generator is selected as signal source.
2. The linear prediction coefficients are used as coefficients of digital filter. Depending
upon these coefficients , the signal is passed and filtered by the digital filter.
3. The low pass filter removes high frequency noise if any from the synthesized
speech. Because of linear phase characteristic FIR filters are mostly used as digital
filters.
Pitch Period
Pulse Voiced
Generator
Synthetic
speech
Time
Digital varying
filter digital
filter
White Noise
generator Unvoiced
Filter Coefficients
3. SOUND PROCESSING
94
Created by Amit S
2. The time domain waveform is transformed to the frequency domain using a filter
bank. The strength of each frequency band is analyzed and quantized based on
how much effect they have on the perceived decompressed signal.
3. The DSP processor is also used in digital video disk (DVD) which uses MPEG-2
compression, Web video content application like Intel Indeo, real audio.
4. Sound synthesis and manipulation, filtering, distortion, stretching effects are also
done by DSP processor. ADC and DAC are used in signal generation and recording.
4. ECHO CANCELLATION
In the telephone network, the subscribers are connected to telephone exchange by two
wire circuit. The exchanges are connected by four wire circuit. The two wire circuit is
bidirectional and carries signal in both the directions. The four wire circuit has separate
paths for transmission and reception. The hybrid coil at the exchange provides the
interface between two wire and four wire circuit which also provides impedance matching
between two wire and four wire circuits. Hence there are no echo or reflections on the
lines. But this impedance matching is not perfect because it is length dependent. Hence
for echo cancellation, DSP techniques are used as follows.
1. An DSP based acoustic echo canceller works in the following fashion: it records the
sound going to the loudspeaker and substract it from the signal coming from
the microphone. The sound going through the echo-loop is transformed and
delayed, and noise is added, which complicate the substraction process.
2. Let be the input signal going to the loudspeaker; let be the signal picked up by
the microphone, which will be called the desired signal. The signal after
substraction will be called the error signal and will be denoted by . The adaptive
filter will try to identify the equivalent filter seen by the system from the
95
Created by Amit S
loudspeaker to the microphone, which is the transfer function of the room the
loudpeaker and microphone are in.
3. This transfer function will depend heavily on the physical characteristics of the
environment. In broad terms, a small room with absorbing walls will origninate
just a few, first order reflections so that its transfer function will have a short
impulse response. On the other hand, large rooms with reflecting walls will have a
transfer function whose impulse response decays slowly in time, so that echo
cancellation will be much more difficult.
5. VIBRATION ANALYSIS
1. Normally machines such as motor, ball bearing etc systems vibrate depending upon
the speed of their movements.
2. In order to detect fault in the system spectrum analysis can be performed. It shows
fixed frequency pattern depending upon the vibrations. If there is fault in the
machine, the predetermined spectrum is changes. There are new frequencies
introduced in the spectrum representing fault.
3. This spectrum analysis can be performed by DSP system. The DSP system can also
be used to monitor other parameters of the machine simultaneously.
96
Created by Amit S
97
Created by Amit S
A) -90 constant
+90 constant
C) -90 to 0 linear
D) +90 to 0 linear
E) 0 to +90 linear
F) 0 to -90 linear
98