Professional Documents
Culture Documents
DSP Interview Questions and Topics
DSP Interview Questions and Topics
Why should we go for digital signal processing where as the most of the real
world data is in analog mode?
Reconfiguration Reconfiguration of analog circuits require redesigning the
hardware followed by testing and verification where as DSP chips can be
easily reconfigured by changing the software.
Accuracy DSP has higher accuracy.
Storage Digital signals can be easily stored on magnetic disks hence
easily transported and stored for offline processing
Precision It is difficult to perform precise math operations on analog
signals but DSP algorithms are easier to implement and can attain
precision as well.
Cost DSP is cheaper than its analog counterpart.
In real world digital signals with only finite number of samples are available
therefore the signal samples are periodically repeated in order to generate
discrete periodic waveforms. Hence only DFT is applicable in DSPs
Zeros can be appended to finite length discrete signals thus producing discrete
aperiodic waveforms. But in that case the result waveform is made up of a sum of
infinite number of sinusoids. Therefore DTFT cannot be calculated by a computer
algorithm.
Q. What is use of windowing in digital filters?
The ideal filter impulse response is infinite (sinc function) where as for an FIR
filter, the impulse response should be finite and non causal (dependent on future
input). In order to accomplish the same, windows are used to truncate the
impulse response and then it is shifted to meet the FIR design requirements.
Window functions control the
Roll off rate at pass band and stop band edge
Stop band attenuation (ripples)
|r ( k )| r (0)
ACR is an even function.
r ( k )=r (k )
Linear phase filter means constant group delay i.e. all the input frequencies
appear at the output after a fixed time.
FIR filters have finite impulse response. The output signal is obtained from the
convolution of input signal and impulse response. Since impulse response is finite
hence linear phase is possible.
IIR filters have infinite impulse response. The IIR filter response may last
indefinitely due to feedback in the filter. Since input frequencies do not appear at
output at the same time therefore phase is not linear.
Help - http://www.gearslutz.com/board/mastering-forum/569408-linear-phaseversus-minimum-phase-eqs.html
Q. Whats basic difference b/w winer filter and kalman filter and lms filter
Q. What is the use of windowing in digital filters
FIR filters are expressed by the equation
N
y t = bi xt i
i=0
FIR filters are causal in nature i.e. output depends only on current and previous
inputs and not on future input and FIR filters have finite impulse response.
The impulse response of an ideal LPF is a sinc function which is infinite and the
values on the left hand axis correspond to future inputs. The finite impulse
response for FIR filter is obtained by
a. Truncating the infinite impulse response (rectangular window in default
case)
b. Shifting impulse response to right so that it is causal in nature.
Truncation in time domain leads to ripples in frequency domain (a discontinuous
signal cannot be expressed as the sum of finite terms in frequency domain. It is
in fact a sum of infinite terms. Therefore larger the number of terms used in
expression better is the approximation). This is known as Gibbs phenomenon. The
ripples can be removed by using windows. Hence truncation of impulse response
for the design of FIR filters is done using windows. Windows are smoothing
functions which softens the signal discontinuities (time domain) and thus
attenuate ripples in frequency domain.
Q. What are the pros and cons of Discrete Cosine Transform?
Q. What is Interpolation and decimation filters and why we need it?
Q. What is the simplest high pass filter ? write the equation?
C
R
x t= ai x t i+ t
i=0
The current output xt is a weighted sum of previous terms in the series. The
weighting factors used for the previous terms are called AR coefficients (a i). N is
the order of the AR model and
is WGN.
FIR
Impulse response is finite
Linear phase
Constant group delay
Q. What two PSK modulation orders differ exactly by a factor of two in spectral
efficiency?
Q. Under what conditions is the available bandwidth of a digital system Fs Hz
instead of Fs/2 Hz?
Q. What is the difference between DFT and DTFT?
DFT is applicable to discrete periodic signals whereas DTFT is applicable to
discrete aperiodic signals. DSP uses DFT only.
Q. FFT is in complex domain how to use it in real life signals optimally?
Imaginary input for the real signal is set to 0 and FFT is calculated just as in case
of complex signals.
Q. What is Gibbs phenomenon?
When signals with sharp discontinuities are transformed into frequency domain
then it leads to ringing effect known as Gibbs phenomena. This arises due to the
fact that sharp signal discontinuity implies infinite energy and hence it is
expressed as a sum of infinite terms. In reality we try to express the same as a
sum of finite terms therefore the Fourier transform serves only as an
approximation. The approximation gets better as the number of terms increases
i.e. the ripples get closer to the point of discontinuity but they never completely
die out.
The overshoot due to Gibbs phenomenon can be reduced by using suitable
window functions.
Q. Suppose we have a system with transfer function H(z) = 1 / ((z 1.1)*(z
0.9)). Is the system stable or unstable?
All poles should lie within the unit circle for the system to be stable. For the
above z = 1.1 and 0.9 hence system is unstable.
Q. Differences b/w butterworth chebyshev?
Butterworth Filter
Broader transfer region
Faster response
Flat pass band and stop band
Chebyshev Filter
Narrower transfer region
Slower response
Ripples in pass band and flat stop band
(Type I)
Ripples in stop band and flat pass band
(Type II)
apply a weighting to the signal amplitude such that signal samples smoothly
reduces to zero on either end, instead of the abrupt discontinuities as in the case
of default (rectangular) window.
Q. Why is FFT faster than DFT? What is the actual concept behind this?
FFT is carried out in the following manner
a. N point signal is split into N single point signals. This process takes place in
log2N stages and is termed as interlaced decomposition. At each stage the
even and odd numbered samples are placed in two separate groups. This
process can be simply carried out by bit reversal operation.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
1000
0100
1100
0010
1010
0110
1110
0001
1001
0101
1101
0011
1011
0111
1111
8
4
12
2
10
6
14
1
9
5
13
3
11
7
15
f s <2 f max
Then the sampling rate is not sufficient to capture the signal variations in time
and hence when the sampled signal is used to reconstruct the continuous signal,
it produces a false representation.
Aliasing can be avoided by either choosing sampling frequency to be
f s 2 f max
Or the maximum frequency is restricted by using BPF.
Q. What is the need of Digital Signal Processing?
Easy reconfiguration
High precision and accuracy
Easy implementation
Easy storage
A filter is said to be minimum phase if all its zeros and poles lie inside the unit
circle (excluding the unit circle).
Both the filter (poles inside unit circle) and its inverse filter (zeros of H(z)
are poles of 1/H(z)) are stable.
The filter is causal since non causal terms correspond to poles at infinity
sample). As the newest sample is acquired it gets placed at 20045 and the
pointer now points to 20045 as the latest sample. 20044 holds x[n-1].
Q. Name DSP Architectures
a. Von Neumann Architecture Single memory to store program instructions and
data. Simple in design but the processing speed is low. Most computers use this
architecture.
b. Harvard Architecture Separate memories to store program instructions and
data. Used in DSPs
c. Super Harvard Architecture (SHARC) Separate memories to store program
instructions and data like in Harvard architecture.
Special features of SHARC
Fixed Point
16
Smaller range Total
number of levels that can
be represented using 16
bits are 216 (unsigned
integers 0 to 65535 and
signed integers -32767 to
32768). The numbers
Floating point
32 (Single precision)
64 (Double precision)
The largest possible
number and the smallest
possible number that can
be represented is much
higher /smaller since the
spacing between
numbers is unequal.
Representation
2s complement
Impulse Response
Step Response
Frequency Response
Impulse and Step response describe a filter in time domain (Step function is
obtained from the integration of Impulse function) and frequency response
describes a filter in frequency domain. If anyone response is defined, the other
two are fixed.
Q. In which two domains can we evaluate the performance of a digital filter?
The performance of digital filter can be evaluated either in Time domain or in
Frequency domain.
Q. What parameters are used to analyze the filter performance in time domain?
Parameters for evaluating time domain performance are as follows:
Roll of rate The transition edge between pass band and stop band should
be sharp in order to effectively stop the undesired frequencies and pass
the desired ones.
Ripples in Pass band The pass band should not have ripples so that the
desired frequencies pass through the filter unaltered.
Stop band attenuation The stop band should have high attenuation in
order to effectively block the undesired frequencies.
Time Domain
Frequency Domain
Filters implemented by
convolution (FIR)
Moving Average Filter
Windowed Sinc Filter
Filters implemented by
recursion (IIR)
Single Pole Filter
Chebyshev Filter
y [i ]=
1
M
M 1
x [i j]
j=0
y [i ]=
1
M
(M 1)/2
x [i j]
j=(M 1)/2
y [ n ] =a0 x [ n ] +a 1 x [ n1 ] + a2 x [ n2 ] + a3 x [ n3 ]
+
+b1 y [ n1 ] + b2 y [ n2 ] + b3 y [ n3 ] .
Q=
V FSR
M
2 1
Resolution of ADC is limited by SNR of the digitized signal. An ADC can resolve a
signal to only certain number of bits of resolution called effective number of bits
(ENOB). If ENOB increases by 1 bit, the SNR increases by 6 dB.
b. Sources of error in ADC are as follows: Quantization Error is due to the finite resolution of ADC and is
unavoidable. It varies between 0 and LSB/2.
Non linearity is the non linear relation between input and output of
ADC. It reduces the dynamic range of ADC and also its possible
resolution. It can be corrected by calibration.
Aperture Error is due to clock jitter
Quadrature Modulation
Quadrature Modulation or IQ modulation can be used to alter the phase,
frequency and amplitude of carrier frequency.
I signal (0
phase shift)
Carrier
Frequency
Signal
Splitter
(Hilbert
Transform
)
Output Signal
Q signal (90
phase shift)
Q signals are mixed with cosine and sine components of the input signal
(frequency f). The resultant outputs are cosine and sine waves with
frequency
f offset
foffset.
FM
AM
components.
FIR Filters
Larger the number of filter coefficients, sharper the filter transition from PB to SB.
For designing LP FIR filter.
Choose cutoff frequency. This defines the LP filter response in frequency
domain i.e. FFT of the filter response. The number of FFT points should be
much larger than the number of filter coefficients. The larger the FFT size,
the more accurately the filter coefficients are calculated.
Choose number of filter coefficients.
Perform IFFT to obtain the filter coefficients.
Window function is applied to the filter coefficients in order to obtain better
stop band attenuation. Windows also alter the transfer region.
For designing HP FIR filter
High pass filter can be obtained from the LPF simply by multiplying the alternate
coefficients by -1.
For designing BP FIR filter
Choose cutoff frequency and number of filter coefficients like in LPF design.
Window the filter coefficients
Frequency shift the filter coefficients - Multiply by cosine wave in time
domain. The frequency of the cosine wave decides how much the LPF
response is shifted. If the frequency of the cosine is too high then we
obtain a HPF. Multiplication in time domain is convolution in frequency
domain. Therefore the frequency response of LPF is convolved with the
frequency response of cosine wave which is a dirac delta function. So the
convolution result i.e. the shape of BPF response is same as the LPF
response but only shifted in frequency.