DSP
DSP
DSP
t4
f/
F-l
Reg No.:
PART A
(Answer all questions; each question carries 3 marks) Marks
Discuss the need for FFT. Justify your answer in terms of computational J
TRACE KTU
a
6 Analog transfer function of a digital filter is given by (") = *. Comment J
on the stability of the filter. Obtain the digital transfer function of the same
using impulse invariance method. Where sampling time is T.
What is Multirate signal processing? Obtain interpolated and decimated
versions for the sequence x[n] : {1, 2, 3, 4, 5, 6, 7, 8} by a factor 2.
I
8 Obtain the direct form structure for the FIR filter with transfer function J
"10 The effect of ADC quantization noiq=e plays very important role in DSP r3
processors. Justifu.
Module -1
I I a) State the following properties of DFT (i) Linearity (ii) Time Reversal
(iii) Parseval's theorem
b) Jllustrate the concept of circular convolution property of a DFT sequence
for the discrete time sequences x[n] : {1,2, I, 2}, h[n] : {2, 4, 6,8}
Page 1 of 3
11008CT303122204
(i) Left of the signal (ii) Right of the signal. Comment on its effect on the
sPectrum.
b) Find the linear convolution sum of the sequence x[n] = {1,2, -1,2,3, -2, 8
-3, -L, l, 1,2, -l ) and h[n] : {1,2\ using overlap add method'
Module -2
- 13 a) Write down the principle of in-place computation in FFT. 4
b) Compute the IDFT of the sequence X[k] = {1, -1, l, -1, 1, -1, l, -1} using l0
DIT algorithm.
14 a) Explain the principle of DIF FFT algorithm and obtain the final flow graph 10
lH(w)l <
<1;
3TI
0.2, 4 =w 3II
0t*'Z
n
(.^3n3n
----:- Ha(a) = < a <Z'
le-t",-T
( 0, otherwise
Y Determine for N = 7 using rectangular window. t
b) Explain the principle of fr.qu.nry*?rnpling technique for FIR filter 6
design.
Module -4
17 a) Obtain direct form I, direct form II and parallel form structure for the 10
system
L7
- t) + |t(n - 2) + x(n) + x(n - L)
y(n) =
1t("
b) Write a short note on anti-aliasing filter and anti-imaging filter 4
Page 2 of 3
*,
tr#csmt?;E's4
H(z) =
r 2+z-1 +z-2
b) Write down the principle of line,ar phsse in FIR filts with a struchue. 7
Moduh -5
19 a) With a detailed block diag.attu explain the architecture of typioal DSF l0
proccssor family TMS3 2rc67XX.
s., Writc a short note on truncation and rounding with examples? 4
2$ a) fu are the variqrs data form*s in DSP pnocessors? Exphia wifh t
sui8t*e o<amples.
b) MAC # .'kt sfffi P processor. Justiff .
'l
TRACE KTU
Page3d3
DSP – December 2022 (Solutions)
2)
Input is an analog signal . Analog input signal is fed to a sample and hold device which basically consists of a
switch which samples the analog input at periodic intervals and holds the sampled value constant for some time
so that it can be converted to a digital form, because conversion from analog to digital requires time.
Input to the A/D converter is a staircase type analog signal from the S/H circuit. After the A/D conversion, we get
a coded signal, whose usual form is binary. This is then processed by a digital processor. DSP combine the
signals by multiplication, addition and by recalling past signals, through delays. There are basically three
operations: delay, multiplication, and addition.
The output of the digital processor is also digital, a sequence of numbers or a binary data stream, and in order for
that output to be useful, we must convert it back to analog form. So you have a D/A or digital to analog converter.
The undesired high frequency components present in the signal will be removed by an analog low pass filter, and
finally the desired processed analog output is the one that is delivered at its output.
3)
The N – point DFT values can be computed only in a total of N2 complex mul plica ons and N(N-1) complex
addi ons
Direct computa on of DFT is basically inefficient primarily because it does not exploit the symmetry and
periodicity proper es of the phase factor Wn
FFT is a highly efficient procedure for compu ng the DFT of a finite series and requires less number of
computa ons than that of direct evalua on of DFT
FFT is based on decomposi on and breaking the transform into smaller transforms and combining them to
get the total transform
FFT reduces the computa on me required to compute DFT and improves the performance by a factor 100
or more over direct evalua on of the DFT .FFT algorithm makes use of the symmetry and periodicity property
of twiddle factor and reduces the number of complex mul plica ons required to perform DFT from N2 to
𝑵 /𝟐 𝒍𝒐𝒈𝟐𝑵 and the number of complex addi ons from N(N – 1) to 𝑵𝒍𝒐𝒈𝟐N
5)
FIR
FIR filters have a finite impulse response, meaning that their output se les to zero in a finite amount of me
a er the input signal is removed.
FIR filters are characterized by a feedforward structure without feedback. They only use present and past
inputs to calculate the current output.
Common design methods for FIR filters include windowing, frequency sampling, and op miza on
techniques.
Computa onal complexity: Typically higher due to larger number of taps (coefficients)
FIR filters are inherently stable because they lack feedback loops, making them less prone to stability issues
compared to IIR filters
FIR filters can achieve linear phase responses, which means that all frequency components of the input
signal experience the same delay, making them suitable for applica ons sensi ve to phase distor on, like
audio processing.
IIR
IIR filters have an infinite impulse response, meaning that their output can have an infinite dura on even a er
the input signal is removed.
IIR filters have feedback loops in their structure, allowing past outputs to affect the current output, making them
more computa onally efficient for achieving a desired response with fewer coefficients.
Common design methods for IIR filters include Bu erworth, Chebyshev designs, which are based on analog filter
prototypes and transformed into the digital domain.
Computa onal complexity: Lower due to fewer taps required to achieve similar responses
IIR filters can be more suscep ble to stability issues, especially in certain configura ons or when not designed
carefully due to the presence of feedback loops
IIR filters o en introduce phase distor on due to their feedback structure, resul ng in non-linear phase
responses across different frequency components
7) Mul rate signal processing involves manipula ng signals at different rates. This can include opera ons such as
upsampling (interpola on) and downsampling (decima on).
Interpola on involves inser ng zeros between the original samples and then applying a low-pass filter to reconstruct
the signal. The interpolated sequence, xi[n], is obtained by inser ng a zero between each pair of original samples:
xi[n]={1,0,2,0,3,0,4,0,5,0,6,0,7,0,8}
Decima on involves reducing the number of samples in a sequence. The decimated sequence, xd[n], is obtained by
selec ng every second sample from the original sequence:
xd[n]={1,3,5,7}
9) Pipelining a processor means breaking down its instruc on into a series of discrete pipeline stages which can be
completed in sequence by specialized hardware. Because an instruc on's Lifecycle consists of four dis nct phases,
the instruc on execu on process is divided into a sequence of four discrete pipeline stages, where each pipeline
stage corresponds to a phase in the standard instruc on Lifecycle. Note that the number of pipeline stages is referred
to as the pipeline depth.
Pipelining leads to drama c improvements in system performance. The more stages that we can break the pipeline
into, the more theore cal speed we can get from it.
Increased Throughput
Reduced Latency
Efficient Resource Utilization
Improved Instruction-Level Parallelism
Optimized Hardware Utilization
Support for Real-Time Processing
Scalability
Parallelism Exploitation
10) Effects of adc quan sa on errors are :
Signal Accuracy: ADC quan za on introduces errors due to the finite number of representable levels, impac ng
the accuracy of the digi zed signal in DSP applica ons.
Dynamic Range Limita on: Quan za on limits the dynamic range of the signal, affec ng the ability to represent
both small and large amplitude components accurately.
Noise Introduc on: Quan za on noise is inherent and introduces undesired components into the signal,
influencing the quality of subsequent signal processing opera ons.
Signal-to-Noise Ra o (SNR): Quan za on affects the SNR, a cri cal metric in DSP, as the ra o between the signal
power and quan za on noise power determines the fidelity of the processed signal.
Distor on in Signal Processing: The quan za on error contributes to distor on during signal processing,
impac ng applica ons such as audio processing and communica on systems.
Bit Resolu on Impact: The number of bits in the ADC determines the resolu on, and a lower bit resolu on
results in coarser quan za on, reducing the precision of digi zed signals.
Error Accumula on: In cascaded processing stages, quan za on errors accumulate, poten ally degrading the
overall performance of DSP algorithms over me.
11 a) LINEARITY :
b) Time reversal:
C) PARSEVALS THEOREM :
12 A)
Zero padding involves adding zeros to the beginning or end of a signal to adjust its length
Zero padding reduces spectral leakage, a phenomenon where energy from one frequency leaks into adjacent
frequencies during the DFT computa on. This is par cularly beneficial in obtaining more accurate frequency
informa on.
Both le and right zero padding contribute to enhanced frequency resolu on, allowing for be er iden fica on and
localiza on of frequency components in the signal.
While zero padding improves spectral analysis, it comes with a trade-off in terms of computa onal cost. Longer
signals require more computa on, so the choice of zero padding should consider the balance between resolu on
improvement and computa onal efficiency.
Le zero padding does not alter the original part of the signal but extends it by adding zeros at the beginning.In
the frequency domain (spectrum), le zero padding shi s the spectrum to the right, effec vely increasing the
resolu on of the spectral analysis.
Right zero padding extends the signal by adding zeros at the end.In the frequency domain, right zero padding
does not alter the posi on of the original spectrum but increases the length of the frequency representa on.
13 a)
FFT is based on decomposi on and breaking the transform into smaller transforms and combining them to get
the total transform
FFT reduces the computa on me required to compute DFT and improves the performance by a factor 100 or
more over direct evalua on of the DFT
FFT algorithm makes use of the symmetry and periodicity property of twiddle factor and reduces the number of
complex mul plica ons required to perform DFT from N2 to 𝑵/ 𝟐 𝒍𝒐𝒈𝟐𝑵 and the number of complex addi ons
from N(N – 1) to 𝑵𝒍𝒐𝒈𝟐𝑵
There are basically 2 classes of FFT algorithms:
1. Decima on in Time (DIT) FFT algorithm
2. Decima on in Frequency (DIF) FFT algorithm
By adop ng a divide and conquer approach, a computa onally efficient algorithm can be developed This
approach depends on the decomposi on of an N – point DFT into successively smaller size DFTs
An N – point sequence, if N can be expressed as N = r1 r2 r3 ,…..,rm where r1 = r2 = r3 = …. = rm, then N = r m ,
can be decimated into r – point sequences ➢ For each r-point sequence, r-point DFT can be computed
The number r is called radix of the FFT algorithm and the number m indicates the number of stages in
computa on
From r-point DFT, the r 2 - point DFT are computed from which r 3 – point DFTs are computed and so on un l r m
– point DFT is computed
14 a)
14 b)
15 a)
15 b)
16 b)
FREQUENCY SAMPLING:
In this method, the desired frequency response is sampled at sufficient number of points (N points)
These samples are the DFT coefficients of impulse response of the filter.
Hence impulse response of the filter is determined by taking inverse DFT
17 b)
ALIASING EFFECT:
The spectrum obtained a er downsampling will overlap if the original spectrum is not band limited to 𝝎 = 𝝅/𝑴
This overlap causes aliasing. Therefore aliasing due to downsampling a signal by a factor of M is absent if and
only if the signal x(n) is band limited to ± 𝝅 /𝑴
If the signal x(n) is not band limited to ± 𝝅/ 𝑴 , then a low pass filter with a cut-off frequency 𝝅/ 𝑴 is used prior
to downsampling This filter is known as an – aliasing filter . The complete process i.e., filtering and then
downsampling is referred to as decima on.
IMAGING EFFECT :
The frequency spectrum of upsampled signal y(n) with a factor L, contains (L- 1) addi onal images of the input
spectrum. These (L-1) images are due to the addi on of L -1 zero samples between successive samples of x(n).
Since we are not interested in image spectrum, a lowpass filter with a cut off frequency of 𝝎𝑪 = 𝝅 /𝑳 can be used
a er upsampler
This filter which is used to remove the image spectrum is known as an -imaging filter. ➢ The complete process
of upsampling and filtering is known as interpola on.
18 b)
19 a)
The C6000 devices come with program memory, which, on some devices, can be used as a program cache. The
devices also have varying sizes of data memory. Peripherals such as a direct memory access (DMA) controller, power-
down logic, and external memory interface (EMIF) usually come with the CPU, while peripherals such as serial ports
and host ports are on only certain devices. Central Processing Unit (CPU)
19 b)
Trunca on: In ADC (Analog-to-Digital Conversion), the con nuous amplitude of an analog signal is represented by a
finite number of bits. Trunca on in this context involves discarding the frac onal bits, leading to a loss of precision. For
example, in an 8-bit ADC, if the output is 10101011.101 (in binary), trunca on results in 10101011.000.
Rounding: Rounding in ADC involves selec ng the nearest representable digital value to the analog signal. This helps
reduce quan za on errors but introduces some level of bias. The rounding method used can affect the distribu on of
errors.
Consider a con nuous- me signal with values in the range [−1,1]. In the process of digi zing this signal with a 4-bit
ADC:
Trunca on: If the signal has an amplitude of 0.75, trunca on discards the frac onal bits, resul ng in a digital value of
0.
Rounding: Rounding the same amplitude to the nearest representable digital value would yield 1.
20 b)
The Mul ply-Accumulate (MAC) opera on is the basis of many digital signal processing algorithms, notably
digital filtering. The term "digital filter" refers to an algorithm by which a digital signal or sequence of numbers is
transformed into another sequence of numbers termed the output digital signal.
Digital filter involves signals in the digital domain (discrete- me signals) and are used extensively in applica ons
such as digital image processing, pa ern recogni on, and spectral analysis. In general FIR filters are preferred in
lower order solu ons, and since they do not employ feedback, they exhibit naturally bounded response. They are
simpler to implement, and require one RAM loca on and one coefficient for each order.
For FIR filters the output of the filter is given by
where x(n) is the input to the filter, h(n) is the impulse response of the filter and y(n) is output of the filter. The
output of an FIR filter is simply a finite length weighted sum of the present and previous inputs to the filter. Hence to
perform filtering through above equa on, the minimum requirement is to quickly mul ply two values, and add the
result.
To make it possible, a fast dedicated hardware MAC, using either fixed point or floa ng-point arithme c is
mandatory. Characteris cs of a typical fixed-point MAC include
The MAC speed applies both to finite impulse response (FIR) and infinite impulse response (IIR) fi1ters. The
complexity of the filter response dictates the number MAC opera ons required per sample period. A mul ply-
accumulate step performs the following:
1. Reads a 16-bit sample data (pointed to by a register)
2. Increments the sample data-pointer by 2
3. Reads a. 16-bit coefficient (pointed to by another register)
4. Increments the coefficient register pointer by 2
5. Sign Mul ply (16-bit) data and coefficient 'to yield a 32~bit resu1t
6. Adds the result to the contents of a 32-bit register pair for accumulate
12 b)