Module 1
Module 1
Introduction
DSP is a technique of performing the mathematical operations on the
Aging
Scalability
Advantages and Disadvantages of DSP
Greater accuracy
Cheaper
signals
However DSP suffers from few limitations:
System complexity is increased because of the need to convert real-
life analog signals to digital and the processed digital signal back to
analog
Limited bandwidth due to constraint on sampling rate
Power consumption
Applications of DSP
Consumer electronic appliances - TV, music synthesizers, stereos,
recorders etc
Image processing techniques like image compression, image
Robotics
etc
Speech processing
fs≥2 fmax
periodic sequence
Consider a periodic sequence x (n) with period N
Also
, k = 0, 1, 2,...(N-1)
From the above expression it is clear that we can use DFT to find the
f=fs/N=1/NT=1/T0
factor e-j2/N
Those algorithms were called as Fast Fourier Transform
Algorithms
The following table depicts the complexity involved in the
divided successively
The complexity of computation will get reduced considerably in case
of FFT algorithms
Problem 6: Compute the 5-point DFT of the sequence x[n]=[1 2 4] and
hence plot its magnitude and phase spectra
Solution: x[n]=[1 2 4] is a 3-point sequence and hence 5-point DFT
can be applied
The 5-point DFT is computed as
where k=0, 1, 2, 3, 4 and N=5
x[0]=1; x[1]=2; x[2]=4
X[k]=x(0)e-j20k/N+ x(1)e-j2k/N+ x(2)e-j22k/N
=1+2xe-j2k/5+4x e-j4k/5
f=fs/N=8KHz/1024=7.8125Hz
complex multiplies
A number of algorithms have been developed to efficiently compute
4, 8, 16, etc
It is possible to show that the DFT requires N2 complex multiples
system and a system that has same input output relation at all times
is called a Time Invariant System
Systems, which satisfy both the properties, are called LTI systems
An LTI System
with first 2 samples 3.6 and 15.9 respectively to result 35.8 and 63.9
of circular convolution output
Z Transformation
Z Transformations are used to find the frequency response of the
system
The Z Transform for a discrete sequence x(n) is given by,
transfer function
The system function of a system is the ratio of the Z transformation
The general difference equation for an Nth order filter is given by,
filter
Design of a digital filter involves determining the filter coefficients
In FIR filters the present output depends only on the past and present
Also
The major drawback of FIR filters is, they require more number of
expression,
filter coefficients bk
IIR Filters
Unlike FIR filters, IIR filters have infinite number of impulse response
samples
They are recursive filters as the output depends not only on the past
Stability of IIR filters depends on the number and the values of the
filter coefficients
The major advantage of IIR filters over FIR is that, they require lesser
can be obtained
The filter specifications consist of passband and stopband ripples in
sampling theorem
The factor by which the signal is decimated is called as decimation
where
Decimation Process
Problem 14: Let x(n)=[3 2 2 4 1 0 –3 –2 –1 0 2 3] be decimated with a
factor of 2. Let the filtered sequence be w(n)=[2.1 2 3.9 1.5 0.1 –2.9 –2 –
1.1 0.1 1.9 2.9]. Obtain the decimated sequence y(m)
Sequence y(m) can be obtained by dropping every alternative sample of
w (n)
y(m) = [2 1.5 -2.9 -1.1 1.9]
Problem 15: Let x(n)=[1 0 2 4.1 5 6 7 3 5.2] and filter sequence h(n)=[0.2
1.2 -0.3 0.4] be decimated by a factor of 3. Obtain the decimated
sequence
Solution:
The output sequence after filter is w(n)=[0.2 1.2 0.1 3.62 5.2 6.77 8.74
Interpolation Process
Problem 16: Let x(n)= [0 3 6 9 12] be interpolated with L=3. If the
filter coefficients of the filters are bk=[1/3 2/3 1 2/3 1/3], obtain the
interpolated sequence
Solution:
bk=[1/3 2/3
↑ 1 2/3 1/3]
We have,
w(m-1)+ b2 w(m-2)
Substituting the values of m, we get
coefficients
There are various ways of representing these numbers, depending on
1. Fixed-point format
2. Floating-point format
Fixed point format
The simplest scheme of number representation is the format in which
as:
x = -s. 2n-1 + bn-2 .2n-2 + bn-3 .2n-3 + … + b1 .21 + b0 .20 ---- (1)
numbers that may require more bits to represent, and in the event of
a fixed number of available bits, it may create wraparound
The wraparound generates the most negative number after the most
The resulting fraction may use the same number of bits as the
Simply doubling the size and still using the fixed point format
may need double the number of accesses for the same size of data
bus of the DSP device
Floating point format
For DSP applications, if an algorithm involves summation of a large
x= Mx2Ex
If two floating point numbers x and y are multiplied, the product xy
is given by
xy= MxMy2Ex+ Ey
Implementation of a floating point multiplier must contain a
E is an integer
Further in determining the mantissa, an implied 1 is placed
bits
The value of E can be from 0 to 255
the minimum value that the signal can take in the given number
representation scheme
The dynamic range of a signal is proportional to the number of bits
with the speed of the processor, especially if its bus width is limited
For example, if the 32 bit product of a 16x16 multiplication has to be
Solution: a. Since each bit gives a dynamic range of 6dB, the total
dynamic range is 24x6 =144dB
Percentage resolution is (1/224)x100 = 6x10-6
b. Since each bit gives a dynamic range of 6dB, the total dynamic
range is 48x6 =288dB
Percentage resolution is (1/248)x100 = 4x10-13
For floating point representation, the dynamic range is determined by
the number of bits in the exponent. Since there are 8 exponent bits, the
dynamic range is (28-1)x6= 1530dB
The percentage resolution depends on the number of bits in the
(1/216)x100 = 1.5x10-3 %
converter
The accuracy of a DSP implementation depends upon a number of
factors contributed by the A/D and D/A conversions and how the
calculations are performed in the DSP device
The error in the A/D and D/A in the representation of analog signals
used
These errors depend upon how the algorithm is implemented in a
bit is given by
Δ=2-b
The maximum error due to quantization depends on b
of Fig is given by
ε = xq – x
where x is the input and xq is the quantized output
This error is called the truncation error if the signal value above the
integral multiple of Δ. This way the rounding limits the error to ±Δ/2
The signal to noise ratio (SNR) is a measure that is used to evaluate
complement form
The computation almost always involve multiplications or multiply
a D/A converter uses fewer bits in conversion than the number of bits
required by the computed result, produced by the DSP device
This is equivalent to the truncation or the rounding off error in the