ECE III II DSP Content

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

DSP Tutorial # 1

1) Explain the system properties with suitable examples.

2) Explain the concept of stability and causality in LTI systems. Derive an expression for
Convolution Sum
3) Determine the unit impulse and step response of the system described by the difference
equation y(n) = 0.9 y(n-1) – 0.81 y(n-2) + x(n)
4) a) A signal is defined as x[n]={-1,2,3,4,-5,3,-2}.
Draw the signals x[-n],x[2n],x[n/2] & x[-n+3]
b) The unit-sample response of a linear-shift-invariant system is known to be zero except in
the interval . The input x (n) is known to be zero except in the interval
. As a result, the output is constrained to be zero except in some interval
. Determine N4andN5 in terms of N0, N1, N2 and N3.
5) a) Determine the impulse response of the system described by the second order
difference equation
b) Find the response of above system for the input
6) An LTI system has impulse response h (n) = u (n). Determine the response of this system to
the input x(n) described as follows
x(n) = 0 n<0
= an 0  n  N1
=0 N1  n  N2
. = an-N2 N2  n  N2+N1
=0 N1+ N2 < n
7) The input output relation of an LTI system is given by . Verify the
System properties
8) a) Two LTI systems are connected in cascade with impulse response
respectively. Compute the impulse response of
the overall system.
b) Explain the frequency domain representation of discrete time signals and systems
9) a) Represent the following sequence graphically
x(n) = δ(n + 3) − 2δ(n + 2) +3δ(n + 1) + δ(n − 1) − 4δ(n − 3)
b) If the above x (n) is given as input to a system with h(n) = u(n) - u(n-5). Plot the
Output y (n).
10) a) By direct evaluation of the convolution sum, determine the step response of a Linear shift-
invariant system whose unit-sample response h(n) is given by h(n) = a−nu(−n), 0 < a < 1.
b) has same energy. Suppose where „ is positive
real number. Assume
11) Classify DT Signals and Systems with suitable examples
12) Make use of the input output relation of an DT LTI system verify the system properties y[n]=
g[n] x[n]
13) Examine the response of an DT LTI system when
x[n] = an u[n] and h[n] = bn u[n] for both the conditions (i) a ≠ b (ii) a = b
14) a) Examine the impulse response of the system described by the second order difference
equation
b) Examine the response of above system for the input

DSP Tutorial # 2

1) Define DFT of a sequence x(n). Obtain the relationship between DFT and DTFT.
2) Consider a rectangular pulse defined as

Find the DTFT of x[n] and draw its spectrum

3) a) State and prove the following properties of DTFT.


i) Frequency shifting ii) Parseval‟s theorem
b) Compute the circular convolution of the sequences
x1 (n) = {1, 2, 0, 1} and x2 (n) = {2, 2, 1, 1} Using DFT approach.
4) Find the 8-pt DFT of the sequence x[n]={2,2,2,2,1,1,1,1} using Radix-2 DIF-FFT
Algorithm and draw its spectrum.
5) Find the 8-pt DFT of the sequence x[n]={2,2,2,2,1,1,1,1} using Radix-2 DIT-FFT
Algorithm and draw its spectrum.
6) Given the 8-point DFT of the sequence x[n]={1,1,1,1,0,0,0,0}. Compute the DFT of
x1[n]={1,0,0,0,0,1,1,1} and x2[n]={0,0,1,1,1,1,0,0}
7) a) Prove the following properties of the discrete Fourier series for periodic
Sequences.
Sequences Discrete Fourier Series
(i) x(n+m) WN−Km X(K)
(ii) x*(n) X*(-K)
(iii) x*(-n) X*(K)
(iv) Re[x(n)] Xe (K)
(v) j lm[x(n)] Xo (K)
8) a) State and prove the following properties of DFT
i) Circular shift of a sequence ii) Convolution
b) The first five points of the 8-point DFT of a real-valued sequence are
.
Determine the remaining 3 points
9) Find the circular convolution of the two sequences
x1[n]={1,2,2,1} x2[n]={1,2,3,1} using
a) Concentric circles method b)Matrix multiplication method
10) In an LTI system the input x[n] = {1,1,1} and the impulse response h[n]={-1,-1}
Determine the response of LTI system using Radix 2 DIT FFT algorithm
11) Make use of the properties of the Discrete Fourier Series Solve the following for
periodic Sequences.
(i) Time Shifting Property
(ii) Time Reversal Property
(iii)Conjugation Symmetry Property
(iv) Parsevals Relation
12) Make use of the properties of the Discrete Time Fourier Transform Solve the following for
Aperiodic Sequences.
(i) Frequency Shifting Property
(ii) Differentiation in Frequency Domain Property
(iii)Conjugation Symmetry Property
(iv) Convolution Property
13) Make use of the properties the Discrete Fourier Transform Solve the following
(i) Periodicity Property
(ii) Circular shift of a sequence
(iii)Conjugation Symmetry Property
(iv) Convolution Property
14) Examine the response of DT LTI system when input and impulse response is given by
x[n]={1,1,1,1} and h[n]= {1,1} using (i) circular convolution (ii) DFT

DSP Tutorial # 3

1. Define Region of Convergence. Determine the Z-transform of the signal


and sketch its ROC.
2) Determine the Z-transform of the signal
a) b)
3) a) Give the properties of Region of Convergence
b) State and prove the following properties of Z-Transform
i) Time Shifting ii) Convolution
4) Determine the inverse Z-transform of X[z]= For all possible ROCs

5) a) Determine the system function and the unit sample response of the system described by the
difference equation
6) Determine the direct form II realization of the LTI system defined by the difference
equation
7) Consider the system . Compute its poles and
design the cascade and parallel realization of the system.
8) Obtain the direct form I and direct form II for the system described by

9) Consider the system


. Realize the
system using Direct form I, Direct form II, cascade and parallel realization.
10) Consider the Z-transform of X[z]= Examine x[n] for all possible ROCs

11) Make use of the properties the Z-Transform Solve the following
(i) Time Shifting Property
(ii) Diffrentiation in Z-domain
(iii)Conjugation Symmetry Property
(iv) Convolution Property
12) Determine the response of the system

To the input x[n]=n u[n] , is this the system stable.

13) a) If the input to the LTI system is and then output is

where „a‟ is real

b) If then
Examine the system function H(z).

DSP TUTORIAL # 4

1) Distinguish IIR and FIR filters.

2) Apply bilinear transformation to H(s) with T=1sec and find H(z).


1
H ( s) 
( s  1)(s  2)
3) Design a third order Butterworth filter using impulse invariant technique. Assume sampling
period T=1s.

4) Design a low pass Butterworth filter using the bilinear transformation method for satisfying
the following constraints: Pass band:0-400 Hz; Stop band: 2.1-5KHz; Pass band ripple: 2dB;
Stop band attenuation : 20dB; Sampling frequency:10 KHz

5) Compare Butterworth and Chebyshev filters.

6) Compare Bilinear and Impulse Invariant transformations.

7) Design an analog Butterworth filter that has a -2dB pass band attenuation at a frequency of 20
rad/sec an atleast -10dB stop band attenuation at 30 rad/sec.

8) Derive the expression for bilinear transformation method. And explain frequency Warping.

9) Use the bilinear transformation to convert the analog filter with system function
1
H ( s) 
( s  1)(s  2) into digital IIR filter. Select T=0.1 and compare the location of
zeros in H(z) with the location of zeros obtained by applying the impulse invariance method
in the conversion of H(s).

10) Using the bilinear transformation, design a HPF, monotonic in passband with cutoff
frequency of 1000 Hz and down 10 dB at 350 Hz. The Sampling frequency is 5000Hz.

11) Design a Digital IIR low pass filter with pass band edge at 1000 Hz and stop band edge at
1500 Hz for a sampling frequency of 5000 Hz. The filter is to have a pass band ripple of 0.5
db and stop band ripple below 30 db. Design Butter worth filler using both impulse invariant
and Bilinear transformations.

12) Explain butterworth filter approximation and show that pole location lies on a circle.

13) Compare Analog and Digital Filters

14) Design an analog band pass filter with the following characteristics

(i) A -3dB upper and lower cutoff frequency of 50 hz and 20khz

(ii) A dtop band attenuation of atleast 20 db at 20hz and 45khz

(iii) A monotonic frequency response.

15) The normalized transfer function of an analog filter is given by Make use of analog to
digital transformation technique convert the analog filter to digital filter with a cutoff of 0.4
using Bilinear transformation technique

16) Show that the pole location of Chebyshev filter lies on circumference of an ellipse.

DSP Tutorial # 5

1) Explain the characteristics of FIR digital filters.

2) Examine the frequency response of FIR filter defined by y[n] = 0.25x[n] + x[n-1] + 0.25x[n-1]
calculate group delay and phase delay.

3) Design an ideal Low Pass Filter with a frequency response


H d (e i )  1 ,   /4
Find the values of h[n] for N=11 and plot the Magnitude response.

4) Design an ideal High Pass Filter with a frequency response


H d ( e i )  1 ,   /3
Find the values of h[n] for N=11 and plot the Magnitude response.

5) Design an ideal Band Pass Filter with a frequency response


H d ( e i )  1 ,  / 4    3 / 4

Find the values of h[n] for N=11 and plot the Magnitude response.

6) Design an ideal Band Stop Filter with a frequency response


H d ( e i )  1 ,    / 4 &   3 / 4

Find the values of h[n] for N=11 and plot the Magnitude response.

7) Design an ideal High Pass Filter with a frequency response using Hamming window.

H d (e i )  1 ,   /2
Find the values of h[n] for N=11.Find H[z].

8) Design an ideal Low Pass Filter with a frequency response using Hanning window.

H d ( e i )  1 ,   /3
Find the values of h[n] for N=11, Find H[z]

9) Design an ideal Band Pass Filter with a frequency response using Bartlett Window
H d ( e i )  1 ,  / 3    2 / 3
Find the values of h[n] for N=11, Find H[z]

10) Design an ideal Band Pass Filter with a frequency response using Rectangular Window

H d (ei )  e-j3 ,    / 4
Find the values of h[n] for N=7, Find H[z]

11) Design an ideal Band Stop Filter with a frequency response using Blackman window

H d ( e i )  1 ,    / 3 &   2 / 3

Find the values of h[n] for N=11, Find H[z].

12) Realize the following system using min. no of multipliers, direct form and cascade form
1 1 1 1
realization H (z)  1  z -1  z -2  z -3  z -4  z -5
3 4 4 3
13) Design an ideal High Pass Filter with a frequency response using Rectangular Window
Find the values of h[n] for N=11 and plot the Magnitude response.

14) Explain Frequency Sampling Method

15) Compare IIR and FIR filters

DSP Tutorial # 6

1) What is the need of sampling rate conversion? Explain in detail.

2) Explain Down Sampling and Up Sampling

3) Explain sampling rate conversion process by a factor I/D

4) For a given sequence x[n]={1,2,3,4,5,6,7,8,9}.Determine and sketch the up-sampling and


down-sampling sequences for k=2.

5) Determine and sketch the up-sampling and down-sampling sequences for Ramp Function k=3.

6) Obtain the necessary expressions for Decimation and Interpolation process.

7) Describe addressing modes of TMS320C54xx processors.

8) What are the advantages of DSP processors over conventional microprocessors?

9) Explain the concept of pipelining in DSP processors.

10) Explain with the help of a block diagram the architecture of TMS320C5X processor.

11) Discuss various interrupt types supported by TMS320C5X processor.

12) Consider a multi rate system shown in figure. Determine y[n] in terms of x[n].

x[n] 5 20 4 y [n]

13) Consider a multi rate system shown in figure. Determine y[n] in terms of x[n].

x[n]
2 2

Z-1 Z-1
Z-1

2 2
3 y [n]
GATE BITS ON DTFT, DFT and FFT

1. Let (𝑛) = (1/2) 𝑢(𝑛), 𝑦(𝑛) = 𝑥2(𝑛) 𝑎𝑛𝑑 𝑌(𝑒𝑗𝜔) be the Fourier Transform of 𝑦(𝑛). Then
𝑦(𝑒𝑗0 ) is [ ]
(a) 1/4 (b) 2 (c) 4 (d) 4/3
2. A signal (𝑛) = sin(𝜔0𝑛 + 𝑓) is the input to a linear time-invariant system having a
frequency response 𝐻(𝑒𝑗𝜔). If the output of the system (𝑛 − 𝑛0 ), then the most general
form of ∠𝐻(𝑒𝑗𝜔) will be [ ]
(a) −𝑛0𝜔0 + 𝛽 for any arbitrary real 𝛽
(b)−𝑛0𝜔0 + 2𝜋𝑘 for any arbitrary integer k
(c) 𝑛0𝜔0 + 2𝜋𝑘 for any arbitrary integer k
(d)−𝑛0𝜔0
3. A 5-point sequence 𝑥[𝑛] is given as 𝑥[−3]=1, 𝑥[−2]=1, 𝑥[−1]=0, 𝑥[0]=5, 𝑥[1]=1

Let (𝑒𝑗𝜔) denote the discrete-time Fourier Transform of [𝑛].


 X (e
j
The value of )dw 𝑖𝑠 [ ]

(a) 5 (b) 10 π (c) 16 π (d) 5+𝑗 10𝜋


4. The 4-point discrete Fourier Transform (DFT) of a discrete time sequence {1, 0, 2, 3}
is [ ]
(a)[0, −2 + 2𝑗, 2, −2 − 2𝑗] (b)[2, 2 + 2𝑗, 6, 2 − 2𝑗]
(c)[6, 1 − 3𝑗, 2, 1 + 3𝑗] (d)[6, −1 + 3𝑗, 0, −1 − 3𝑗]

5. For an N-point FFT algorithm with 𝑁 = 2𝑚, which one of the following statements is
TRUE? [ ]
(a) It is not possible to construct is signal flow graph with both input and output in
normal order
(b) The number of butterflies in the mth state is N/m
(c) In-place computation requires storage of only 2N node data
(d) Computation of a butterfly requires only one complex multiplication
6. The first six points of the 8-point DFT of a real valued sequence are 5, 1 − 𝑗3, 0, 3 − 4𝑗, 0
and 3 + 𝑗4. The last two points of the DFT are respectively [ ]

(a) 0, 1 − 𝑗3 (b)0, 1 + 𝑗3 (c) 1 + 𝑗3, 5 (d)1 − 𝑗3, 5

7. Consider a discrete time periodic signal [𝑛] = sin ( 𝑛 5 ). Let ak be the complex. Fourier
series coefficients of [𝑛]. The coefficients { } are nonzero when 𝑘 = 𝐵𝑚 ± 1, where m is
any integer. The value of B is ______.
QUIZ ON Z TRANSFORMS

1. Which of the following justifies the linearity property of z-transform?[x(n)↔X(z)]. [ ]


a) x(n)+y(n) ↔X(z)Y(z) c) x(n)+y(n) ↔X(z)+Y(z)
b) x(n)y(n) ↔X(z)+Y(z) d) x(n)y(n) ↔X(z)Y(z)
2. According to Time shifting property of z-transform, if X(z) is the z-transform of x(n)
then what is the z-transform of x(n-k)? [ ]
a) z^k X(z) c) z^-k X(z)
b) X(z-k) d) X(z+k)
3. What is the set of all values of z for which X(z) attains a finite value? [ ]
a) Radius of convergence c) Radius of divergence
b) Feasible solution d) None of the mentioned
4. What is the z-transform of the finite duration signal {2,4,5,7,0,1} origin is at 5 [ ]
a) 2 + 4z + 5+ 7z^3 + z^4
b) 2 + 4z + 5z^2 + 7z^3 + z^5
c) 2 + 4z^-1 + 5z^-2 + 7z^-3 + z^-5
d) 2z^2 + 4z + 5 +7z^-1 + z^-3
5. What is the z-transform of the finite duration signal {2,4,5,7,0,1} origin is at 1 [ ]
a) 2 + 4z + 5z^2 + 7z^3 + z^4
b) 1 + 4z + 5z^2 + 7z^3 + z^5
c) 1 +7z^2 + 5z^3 + 4z^4 + 2z^5
d) 2z^2 + 4z + 5 +7z^-1 + z^-3
6. What is the z-transform of the finite duration signal {2,4,5,7,0,1} origin is at 2 [ ]
a) 2 + 4z + 5z^2 + 7z^3 + z^4
b) 2 + 4z^-1 + 5z^-2 + 7z^-3 + z^-5
c) 1 +7z^2 + 5z^3 + 4z^4 + 2z^5
d) 2z^2 + 4z + 5 +7z^-1 + z^-3
7. What is the ROC of the signal x(n)=δ(n-k),k>0? [ ]
a) z=0 c) Entire z-plane, except at z=0
b) z=∞ d) Entire z-plane, except at z=∞
8. What is the ROC of the signal x(n)=δ(n+k),k>0? [ ]
a) z=0 c) Entire z-plane, except at z=0
b) z=∞ d) Entire z-plane, except at z=∞
9. What is the ROC of the signal x(n)=δ(n)? [ ]
a) z=0 c) Entire z-plane, except at z=0
b) z=∞ d) Entire z-plane, except at z=∞
10. What is the ROC of the z-transform of the signal x(n)= a^n u(n)+b^n u(-n-1)? [ ]
a) |a|<|z|<|b| c) |a|>|z|>|b|
b) |a|>|z|<|b| d) |a|<|z|>|b|
11. What is the ROC of z-transform of finite duration anti-causal sequence? [ ]
a) z=0 c) Entire z-plane, except at z=0
b) z=∞ d) Entire z-plane, except at z=∞
12. What is the ROC of z-transform of an two sided infinite sequence? [ ]
a) |z|>r1 c) |z|<r1
b) r2<|z|<r1 d) None of the mentioned
13. What is the ROC of the system function H(z) if the discrete-time LTI system is BIBO stable?
a) Inside the unit circle b) Outside the unit circle
14. The ROC of z-transform of any signal cannot contain poles. [ ]
a) True b) False
15. Is the discrete time LTI system with impulse response h(n)=a^n u(n) (|a| < 1) BIBO stable?
a) True b) False

Quiz on IIR

1. Bilinear Transformation Technique is also called [ ]


(a) Many to One mapping technique
(b) One to One Mapping technique
(c) Many to Many mapping technique
(d) One to Many mapping technique
2. Impulse Invariant Transformation Technique is also called [ ]
(a) Many to One mapping technique
(b) One to One Mapping technique
(c) Many to Many mapping technique
(d) One to Many mapping technique
3. The poles of the Chebyshev filter are located on [ ]
(a) Circle (b) Hyperbola (c) Parabola (d) Ellipse
4. The poles of the Butterworth filter are located on [ ]
(a) Circle (b) Hyperbola (c) Parabola (d) Ellipse
5. The magnitude response of the Chebyshev filter of type-I exhibits ripple in [ ]
(a) Pass band (b) Stop band (c) Both (d) None
6. The magnitude response of the Chebyshev filter of type-II exhibits ripple in [ ]
(a) Pass band (b) Stop band (c) Both (d) None
7. Which of the following methods are used to convert analog filter into digital filter? [ ]
(a) Approximation of Derivatives
(b) Impulse invariance
(c) Bilinear transformation
(d) All of the above
8. What is the transfer function of Butterworth low pass filter of order 2? [ ]
(a) 1/(s2+√2 s+1)
(b) 1/(s2-√2 s+1)
(c) s2-√2 s+1
(d) s2+√2 s+1
9. For an analog LTI system to be stable, where should the poles of system function H(s)
lie? [ ]
(a) Right half of s-plane
(b) Left half of s-plane
(c) On the imaginary axis
(d) At origin
10. In IIR Filter design by the Bilinear Transformation, the Bilinear Transformation is a
mapping from [ ]
(a) Z-plane to S-plane (c) S-plane to Z-plane
(b) S-plane to J-plane (d) J-plane to Z-plane
11. For an analog LTI system to be stable, the poles of system function H(s) lie? [ ]
a) Right half of s-plane b) Left half of s-plane
c) On the imaginary axis d) At origin
12. Chebyshev polynomials of odd orders are: [ ]
a) Even functions b) Odd functions
c) Exponential functions d) Logarithmic functions
2
13. If H(s)= 1/(s +s+1) represent the transfer function of a low pass filter with a pass band of
1 rad/sec, then what is the system function of a low pass filter with a pass band 10
rad/sec? [ ]
a) b) c) d) None of the mentioned

14. What is the lowest order of the Butterworth filter with a pass band gain KP= -1 dB at
ΩP= 4 rad/sec and stop band attenuation greater than or equal to 20dB at ΩS= 8 rad/sec?
[ ]
a) 4 b) 5 c) 6 d) 3
15. The magnitude frequency response of a Butterworth filter of order N and cutoff
frequency ΩC is [ ]
a) b)1+ c) d) None of the mentioned

16. What is the Butterworth polynomial of order 1? [ ]


a) s-1 b) s+1 c) s d) None of the above
17. When σ=0, then what is the condition on „r‟? [ ]
a) 0<r<1 b) r=1 c) r>1 d) None of the above

Quiz on FIR

1. The advantage of FIR filters over IIR filters is [ ]


(a) less stable (b) more stable
(c) more memory (d)more circuitry
2. For a FIR filter, the poles should be always at [ ]
(a) Origin (b) Outside the Unit circle
(c) On the Unit circle (d) at Infinity
3. Which of the following condition should the unit sample response of a FIR filter satisfy to
have a linear phase? [ ]
(a) h(N-1-n) n=0,1,2…N-1
(b) ±h(N-1-n) n=0,1,2…N-1
(c) -h(N-1-n) n=0,1,2…N-1
(d) None of the above
4. What is the value of h(M-1/2) if the unit sample response is anti-symmetric? [ ]
(a) 0 (b) 1 (c) -1 (d) None of the above
5. For a linear phase FIR filter, phase delay and group delay are independent of [ ]
(a) Frequency (b) phase (c) Time (d) None of the above
6. FIR systems are also called as [ ]
(a) Recursive systems (b) Non Recursive systems
7. IIR systems are also called as [ ]
(a) Recursive systems (b) Non Recursive systems
8. IIR systems are also called as [ ]
(a) All Pole systems (b) All Zero systems
(c)Pole Zero systems (d) None of the Above
9. FIR systems are also called as [ ]
(a) All Pole systems (b) All Zero systems
(c)Pole Zero systems (d) None of the Above
10. FIR filter design techniques [ ]
(a) Fourier Series Method (b) Windowing Method
(c) Frequency Sampling Method (d) All of the Above
11. The main lobe length of the Blackman window is [ ]
a) 12π/M b) 2π/M c) 4π/M d) 8π/M

12. The main lobe of the frequency response of a rectangular window of length M? [ ]
a) π/M b) 2π/M c) 4π/M d) 8π/M
13. To reduce side lobes, in which region of the filter the frequency specifications has to be
optimized? [ ]
a) Stop band b) Pass band c) Transition band d) None of the above

Quiz on MSP
1. Sampling rate conversion by the rational factor I/D is accomplished by what connection of
interpolator and decimator? [ ]
a) Parallel b) Cascade c) Convolution d) None of the mentioned
2. What is the process of converting a signal from a given rate to a different rate? [ ]
a) Sampling b) Normalizing c) Sampling rate conversion d) None of the above.
3. In which of the following, sampling rate conversion are used? [ ]
a) Narrow band filters b) Digital filter banks
c) Quadrature mirror filters d) All of the above
4. Which of the following is the disadvantage of sampling rate conversion by converting the
signal into analog signal? [ ]
a) Signal distortion b) Quantization effects
c) New sampling rate can be arbitrarily selected d) Both a & b
5. What is the equation for normalized frequency? [ ]
a) F/Fs b) F.Fs c) Fs/F d) None of the mentioned
6. How is the sampling rate conversion achieved by factor I/D? [ ]
a. By increase in the sampling rate with (I)
b. By filtering the sequence to remove unwanted images of spectra of original signal
c. By decimation of filtered signal with factor D d. All of the above
7. Decimation is a process in which the sampling rate is __________. [ ]
a) Enhanced b) Stable c) Reduced d) Unpredictable
8. Interpolation is a process in which the sampling rate is __________. [ ]
a) Enhanced b) Stable c) Reduced d) unpredictable
9. What is the process of converting a signal from a given rate to a different rate? [ ]
a) Sampling b) Normalizing
c) Sampling rate conversion d) None of the mentioned
10. Which of the following methods are used in sampling rate conversion of a digital signal?
a) D/A convertor and A/D convertor b) Performing entirely in digital domain
c) None of the mentioned
d) D/A convertor, A/D convertor & Performing entirely in digital domain
11. Which of the following is the advantage of sampling rate conversion by converting the signal
into analog signal? [ ]
a) Less signal distortion b) Quantization effects
c) New sampling rate can be arbitrarily selected d) None of the mentioned
12. Which of the following is the disadvantage of sampling rate conversion by converting the
signal into analog signal? [ ]
a) Signal distortion b) Quantization effects
c) New sampling rate can be arbitrarily selected d) Signal distortion & Quantization effects
13. What is the process of reducing the sampling rate by a factor D? [ ]
a) Sampling rate conversion b) Interpolation c) Decimation d) None
14. What is the process of increasing the sampling rate by a factor I? [ ]
a) Sampling rate conversion b) Interpolation c) Decimation d) None
15. A factor-of-2 sampling rate expansion leads to a compression of by a factor of 2 and
a 2-fold repetition in the baseband [0, 2 ]. This process is called……… [ ]
a. imaging b. sampling c. decimation d. none of above
16. A ……..is formed by an interconnection of the up-sampler, the down-sampler, and the
components of an LTI digital filter. [ ]
a. complex multirate system b. complex single-rate system
c. a & b d. none of above
QUIZ ON DSP PROCESSORS

1. In DSP Processor, what kind of queuing is undertaken/executed through instruction


register and instruction cache? [ ]
a. Implicate b. Explicate c. Both a and b d. None of the above
2. The basic process that's going on inside a DSP chip is [ ]
a) quantization b) MAC
c) logarithmic transformation d) vector calculations
3. Programmable DSP with …….can be used to implement digital filters. [ ]
a. MAC b. MAA c. ADD d. none of above
4. For high-bandwidth signal processing applications………can provide multiple MACs to
achieve the desired thoughput. [ ]
a. FPGA technology b. Nanotechnology
c. MEMS technology d. none of above
5. The filter coefficients are stored in: [ ]
a. binary registers b. digital system c. binary memory d. none
6. Truncation or rounding of the data results in [ ]
a. degradation of system performance
b. increase system performance
c. grow power d. none
7. The process of quantization is introduce [ ]
a. error b. noise c. power d. none
8. Drawbacks of DSP is [ ]
a. Digital processing needs pre and post processing devices
b. high cost c. No memory storage d. none of above
9. Drawbacks of DSP is [ ]
a. Digital processing needs A/D and D/A converters and associated reconstruction filters
b. high cost c. No reliable d. none of above
10. Advantages of DSP are: [ ]
a. low cost b. stable c. reliable d. all of above
11. Advantages of DSP are: [ ]
a. predictable b. repeatable
c. Sharing a single processor among a number of signals by time sharing
d. all of above
12. Application of DSP: [ ]
a. Military b. telecommunication
c. consumer electronics d. all of above
13. Application of DSP: [ ]
a. medicine b. seismology c. signal filtering d. all of above
INTRODUCTION
FINITE IMPULSE RESPONSE FILTERS
 Finite impulse response (FIR) filters are the most popular type of filters implemented in
software.
 Filters are signal conditioners. Each functions by accepting an input signal, blocking pre-
specified frequency components, and passing the original signal minus those components to
the output.
For example, a typical phone line acts as a filter that limits frequencies to a range
considerably smaller than the range of frequencies human beings can hear. That's why listening
to CD-quality music over the phone is not as pleasing to the ear as listening to it directly.

 A digital filter takes a digital input, gives a digital output, and consists of digital components.
In a typical digital filtering application, software running on a digital signal processor (DSP)
reads input samples from an A/D converter, performs the mathematical manipulations
dictated by theory for the required filter type, and outputs the result via a D/A converter.
 An analog filter, by contrast, operates directly on the analog inputs and is built entirely with
analog components, such as resistors, capacitors, and inductors.

There are many filter types, but the most common are low pass, high pass, band pass, and band
stop.

 A low pass filter allows only low frequency signals (below some specified cut-off) through to
its output, so it can be used to eliminate high frequencies. A low pass filter is handy, in that
regard, for limiting the uppermost range of frequencies in an audio signal; it's the type of
filter that a phone line resembles.
 A high pass filter does just the opposite, by rejecting only frequency components below some
threshold.

An example high pass application is cutting out the audible 60Hz AC power "hum", which
can be picked up as noise accompanying almost any signal in the U.S.

 The designer of a cell phone or any other sort of wireless transmitter would typically place an
analog band pass filter in its output RF stage, to ensure that only output signals within its
narrow, government-authorized range of the frequency spectrum are transmitted.

Note:Engineers can use bandstop filters, which pass both low and high frequencies, to
blockpredefinedrange of frequencies in the middle.

FREQUENCY RESPONSE:

 Simple filters are usually defined by their responses to the individual frequency components
that constitute the input signal.
 There are three different types of responses. A filter's response to different frequencies is
characterized as passband, transition band, or stopband.
 The passband response is the filter's effect on frequency components that are passed through
(mostly) unchanged.
 Frequencies within a filter's stopband are, by contrast, highly attenuated. The transition band
represents frequencies in the middle, which may receive some attenuation but are not
removed completely from the output signal.

In Figure 1, which shows the frequency response of a low pass filter, ω p is the passband ending
frequency, ωs is the stopband beginning frequency, and As is the amount of attenuation in the
stopband. Frequencies between ωp and ωs fall within the transition band and are attenuated to
some lesser degree.

Figure 1. The response of a low pass filter to various input frequencies

 Given these individual filter parameters, one of numerous filter design software packages can
generate the required signal processing equations and coefficients for implementation on a
DSP.
 Ripple is usually specified as a peak-to-peak level in decibels. It describes how little or how
much the filter's amplitude varies within a band. Smaller amounts of ripple represent more
consistent response and are generally preferable.
 Transition bandwidth describes how quickly a filter transitions from a passband to a
stopband, or vice versa. The more rapid this transition, the higher the transition bandwidth;
and the more difficult the filter is to achieve. Though analmost instantaneous transition to full
attenuation is typically desired, real-world filters don't often have such ideal frequency
response curves.

There is, however, a trade-off between ripple and transition bandwidth, so that decreasing either
will only serve to increase the other.

FINITE IMPULSE RESPONSE:

 A Finite Impulse Response (FIR) filter is a filter structure that can be used to implement
almost any sort of frequency response digitally. An FIR filter is usually implemented by
using a series of delays, multipliers, and adders to create the filter's output.
 In signal processing, a Finite Impulse Response (FIR) filter is a filter whose impulse
response (or response to any finite length input) is of finite duration, because it settles to zero
in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have
internal feedback and may continue to respond indefinitely.
 The impulse response of an Nth-order discrete-time FIR filter lasts exactly N + 1 samples
before it then settles to zero.
 FIR filters can be discrete-time or continuous-time, and digital or analog.

Figure 2 shows the basic block diagram for an FIR filter of length N. The delays result in
operating on prior input samples. The hk values are the coefficients used for multiplication, so
that the output at time n is the summation of all the delayed samples multiplied by the
appropriate coefficients.

Figure 2. The logical structure of an FIR filter

The process of selecting the filter's length and coefficients is called filter design. The goal is to
set those parameters such that certain desired stopband and passband parameters will result from
running the filter. Most engineers utilize a program such as MATLAB to do their filter design.
But whatever tool is used, the results of the design effort should be the same:

 A frequency response plot, like the one shown in Figure 1, which verifies that the filter
meets the desired specifications, including ripple and transition bandwidth.
 The filter's length and coefficients.
 The longer the filter (more taps), the more finely the response can be tuned.

With the length, N, and coefficients, float h[N] = { ... }, decided upon, the implementation of the
FIR filter is fairly straightforward. Listing 1 shows how it could be done in C. Running this code
on a processor with a multiply-and-accumulate instruction (and a compiler that knows how to
use it) is essential to achieving a large number of taps.

As you can see, an FIR filter simply produces a weighted average of its N most recent input
samples. All of the magic is in the coefficients, which dictate the actual output for a given pattern
of input samples.

Other digital filter structures are possible, including infinite impulse response (IIR), which uses
feedback to keep more historical information active in the calculation.

GENERAL FORMULAE:
 The term finite impulse response arises because the filter output is computed as a weighted,
finite term sum, of past, present, and perhaps future values of the filter input, i.e.,

 In general, the class of causal FIR filters has difference equation of the form

CHARACTERISTICS OF LINEAR PHASE FIR FILTERS


If the impulse response h(n) is complex-valued, then to have linear-phase the impulse response
should be conjugate symmetric or conjugate-anti-symmetry.

Type Frequency Magnitude Phase Applicati


Response Response Response ons

Symmetrical Lowpass ,
impulse high pass ,
response N Band pass ,
where
odd Band stop

Symmetrical Lowpass ,
impulse
Band pass ,
response N
even

asymmetrical Differentiat
impulse or, Hilbert-
response N Transformer
odd
asymmetrical Differentiat
impulse or, Hilbert-
response N Transformer
even

FREQUENCY RESPONSE OF FIR FILTERS


In digital signal processing, an FIR is a filter whose impulse response is of finite period, as a
result of it settles to zero in finite time. This is often in distinction to IIR filters, which can have
internal feedback and will still respond indefinitely. The impulse response of an Nth order
discrete time FIR filter takes precisely N+1 samples before it then settles to zero. FIR filters are
most popular kind of filters executed in software and these filters can be continuous time, analog
or digital and discrete time.

The term FIR abbreviation is “Finite Impulse Response” and it is one of two main types of
digital filters used in DSP applications. Filters are signal conditioners and function of each filter
is, it allows an AC components and blocks DC components.

Frequency Response of an FIR Filter

The frequency response plot of the filter is shown below, where ωp is the passband ending
frequency, ωs is the stopband beginning frequency, As is the amount of attenuation in the
stopband. Frequencies b/n ωp and ωs drop in the transition band and are reduced to some lesser
degree. That confirms that the filter meets the preferred specifications includes transition
bandwidth, ripple, filter‟s length and coefficients. The longer the filter, the more finely the
response can be tuned. With the N length and coefficients, float h[N] = {…………}, decided
upon, the FIR filter implementation is fairly straightforward.
Z Transform of an FIR Filter is
H(z)=h(0)z-0 + h(1)z-1 + h(2)z-2 + ……… h(N-1)z-(N-1) or

Transfer Function of FIR Filter

FIR filter design using windowing techniques:


The windowing method requires minimum amount of computational effort; so window method is
simple to implement. For the given window, the maximum amplitude of ripple in the filter
response is fixed. Thus the stop band attenuation is fixed in the given window, but there is some
drawback also of this method. The design of FIR filter is not flexible. The frequency response of
FIR filter shows the convolution of spectrum of window function & desired frequency response
because of this; the pass band & stop band edge frequency cannot be precisely specified.

Peak side Lobe Approximate Width Peak approximation


amplitude(Relative,dB) Of Main Lobe error , 20 log(
Window Type
(dB)

Rectangular -13 4π/(M+1) -21

Bartlett -25 8π/M -25

Hanning -31 8π/M -44

Hamming -41 8π/M -53


Blackman -57 12π/M -74

Popular window functions and their properties


RECTANGULAR WINDOW

Example

Rectangular window sequence is given by

for -(N-1)/2 ≤ n ≤ (N-1)/2

=0 otherwise

The spectrum of rectangular window is given by

Frequency spectrum for N=25


Bartlett Window:

for -(N-1)/2 ≤ n ≤ (N-1)/2

Fourier Transform of Bartlett window

Hanning Window
The hanning window sequence is obtained by substituting α=0.5 in Raised cosine Window
sequence

Raised Cosine Window Sequence

for -
0 Otherwise

Hanning Window Sequence

for -

0 otherwise

The frequency response of hanning Window is

Hamming Window
Hamming window sequence

for -

0 otherwise

The Frequency response of Hamming Window is


Blackman Window
The Blackman Window Sequence is

for -

0 otherwise
Kaiser Window
The Kaiser Window is given by

for | n | ≤ (N-1)/2

0 Otherwise

Alternate Kaiser window equation


FIR filter using rectangular window

Step 1:
Type of filter – low-pass filter
Filter specifications:
Filter order – N=10
Sampling frequency – fs=20KHz
Passband cut-off frequency – fc=2.5KHz
Step 2:
Method – filter design using rectangular window
Step 3:
Filter order is predetermined, N=10;
A total number of filter coefficients is larger by one, i.e. N+1=11; and
Coefficients have indices between 0 and 10.
Step 4:
All coefficients of the rectangular window have the same value equal to 1.
w[n] = 1 ; 0 ≤ n ≤10
Step 5:
The ideal low-pass filter coefficients (ideal filter impulse response) are expressed as:
where M is the index of middle coefficient.

Normalized cut-off frequency ωc can be calculated using the following expression:

The values of coefficients (rounded to six digits) are obtained by combining the values of M and
ωc withexpression for the impulse response coefficients of the ideal low-pass filter:

The middle element is found via the following expression


Step 6:
The designed FIR filter coefficients are obtained via the following expression:

The FIR filter coefficients h[n] rounded to 6 digits are:

Step 7:
The filter order is predetermined.
There is no need to additionally change it.

Filter design using Bartlett window


Step 1:
Type of filter – low-pass filter
Filter specifications:
Filter order– Nf=9

Sampling frequency – fs=20KHz

Passband cut-off frequency – fc=2.5KHz


Step 2:
Method – filter design using Bartlett window
Step 3:
Filter order is predetermined, Nf=9;
A total number of filter coefficients is larger by 1, i.e. N=Nf+1=10; and
Coefficients have indices between 0 and 8.
Step 4:
The coefficients of Bartlett window are expressed as:

Step 5:
The ideal low-pass filter coefficients (ideal filter impulse response) are given in the expression
below:

where M is the index of middle coefficient.

Since the value of M is not an integer, the middle element representing a center of coefficients
symmetry doesn‟t exist.
Normalized cut-off frequency ωc can be calculated using expression:

The values of coefficients (rounded to six digits) are obtained by combining the values of M and
ωc with expression for the impulse response coefficients of the ideal low-pass filter:

St
ep 6:
The designed FIR filter coefficients are found via expression:
h[n] = w[n] * hd[n] ; 0 ≤ n ≤9

The FIR filter coefficients h[n] rounded to 6 digits are:


Step 7:
The filter order is predetermined.
There is no need to additionally change it.

Filter design using Hanning window


Step 1:
Type of filter – low-pass filter
Filter specifications:
Filter order – Nf=10;

Sampling frequency – fs=20KHz; and

Passband cut-off frequency – fc=2.5KHz.


Step 2:
Method – filter design using Hann window
Step 3:
Filter order is predetermined, Nf=10;
A total number of filter coefficients is larger by 1, i.e. N=Nf+1=11; and
Coefficients have indices between 0 and 10.
Step 4:
The Hann window function coefficients are found via expression:

Step 5:
The ideal low-pass filter coefficients (ideal filter impulse response) are expressed as:

where M is the index of middle coefficient.

Normalized cut-off frequency ωc can be calculated using expression:


The values of coefficients (rounded to six digits) are obtained by combining the values of M and
ωc with expression for the impulse response coefficients of the ideal low-pass filter:

Step 6:
The designed FIR filter coefficients are found via expression:
h[n] = w[n] * hd[n] ; 0 ≤ n ≤ 10

The FIR filter coefficients h[n] rounded to 6 digits are:

Step 7:
The filter order is predetermined.
There is no need to additionally change it.

Filter design using Hamming window


Step 1:
Type of filter – low-pass filter
Filter specifications:
Sampling frequency – fs=22050Hz;

Passband cut-off frequency – fc1=3KHz;

Stopband cut-off frequency – fc2=6KHz; and

Minimum stopband attenuation – 40dB.


Step 2:
Method – filter design using Hamming window
Step 3:
For the first iteration, the filter order can be determined from the table .
MINIMUM
NORMALIZED MINIMUM
TRANSITION STOPBAND
WINDOW LENGTH OF THE STOPBAND
REGION FOR ATTENUATION OF
FUNCTION MAIN LOBE FOR ATTENUATION OF
N=20 WINDOW
N=20 DESIGNED FILTER
FUNCTION

Rectangular 0.1π 0.041π 13 dB 21 dB


Triangular
0.2π 0.11π 26 dB 26 dB
(Bartlett)
Hann 0.21π 0.12π 31 dB 44 dB
Bartlett-
0.21π 0.13π 36 dB 39 dB
Hanning
Hamming 0.23π 0.14π 41 dB 53 dB
Bohman 0.31π 0.2π 46 dB 51 dB
Blackman 0.32π 0.2π 58 dB 75 dB
Blackman-
0.43π 0.32π 91 dB 109 dB
Harris

Comparison of window functions


Using the specifications for the transition region of the required filter, it is possible to compute
cut-off frequencies:

The required transition region of the filter is:

The transition region of the filter to be designed is approximately twice that of the filter given in
the table above. For the first iteration, the filter order can be half of that.

Filter order is Nf=10;

A total number of filter coefficients is larger by 1, i.e. N=Nf+1=11; and

Coefficients have indices between 0 and 10.


Step 4:
The Hamming window function coefficients are found via expression:
Step 5:
The ideal low-pass filter coefficients (ideal filter impulse response) are expressed as:

where M is the index of middle coefficient.

Normalized cut-off frequency ωc can be calculated using expression:

The values of coefficients (rounded to six digits) are obtained by combining the values of M and
ωc with expression for the impulse response coefficients of the ideal low-pass filter:

S
tep 6:
The designed FIR filter coefficients are found via expression:
h[n] = w[n] * hd[n] ; 0 ≤ n ≤ 10

The FIR filter coefficients h[n] rounded to 6 digits are:

Different Windows
The table below gives the equations for different window types.
Window Type
Weight Equation

Rectangular

Bartlett

Hanning

Hamming

Blackman

The plots below show the effect on the filter's frequency response before applying the Hamming
Window (green) and after (red). The trick is to select the window type and filter length that will
give a filter with the correct rate of roll-off and level of attenuation in the stop band

The image below shows the effect of different windows on the frequency response of a 28th
Order (29 weights) low pass filter, with a cut-off frequency of 5000Hz and sampling frequency
of 44100Hz.
FIR FILTERS USING FOURIER SERIES

This is historically the first approach to FIR filters and can still be used when combined with
windows.

First the continuous frequency response A(f) is decided ie LP, HP etc.

 Next the Fourier series of this frequency response is found using the equation below. This is
a discrete function in the time domain and is the impulse response I(k) of the filter, f s is the
sampling frequency.
The impulse response I(k) is of infinite length. In order to be able to realize the filter, the impulse
response must be truncated. If N is the desired length(also referred to as the number of taps of
the filter) of the filter then

-(N - 1)/2 <= k <= ((N - 1)/2.

This truncation means that the impulse response of the filter is of finite length and the filter is
referred to as an FIR filter.

 For verification the frequency response of the system with the impulse response is calculated
using the Discrete Time Frequency Transform.
 For implementation the impulse response is shifted to the right so it starts from time zero.
There are 4 different types of FIR filters described in the literature. In these pages only Type
1, (N is odd and the impulse response is symmetric) is considered. This is the most flexible
type.
 A(f) is a low pass filter frequency response shown by the yellow line. I(k) is the impulse
response shown in pink.
 The magnitude of the frequency response calculated from I(k) using the DTFT is shown in
red(linear scale) and green(log scale). Because the impulse response used contains only a
finite number of terms, then the frequency response contains ripples.
 This is the frequency domain equivalent of the Gibbs phenomenon and limits the attenuation
which is achievable in the stop band. The magnitude of the frequency response is symmetric
about half the sampling frequency and the impulse response is symmetric about its maximum
value.
 The sharp drops to zero in the stop band indicates that the transfer function has zeros on the
unit circle in the stop band. Although the green curve does not look like it, it is in fact
nothing more than a logarithmic plot of the Gibbs phenomenon shown by the red curve.

The output y(n) from the filter can be calculated from the input x(n) and the impulse response
I(m) by the following equation. This is a convolution equation.
The block diagram below containing delay elements, multipliers and adders can be used to
realize the filter. This is essentially a circuit for calculating the convolution sum. For a
symmetric impulse response, it is possible to reduce the diagram below, so the number of
multipliers is reduced by 2. The circuit does not use any feedback, so is described as Non
Recursive and is always stable. For long filter lengths it is more efficient to realize the filter in
the frequency domain using the FFT.

Analytical expressions can be fould for some simple cases.


 For low pass with cut off frequency  the impulse response is:-

 For high pass with cut off frequency  the impulse response is:-

 For band pass with cut off frequencies  and  the impulse response is:-

 For band stop with cut off frequencies  and  the impulse response is:-

 FIR filters have 2 important features. They contain only zeros (poles which do not affect the
frequency response are included at the origin to make the filter causal) and they are linear
phase filters.
 The latter being a consequence of the symmetric impulse response.
When summing the Fourier series with a finite number of terms, a convergence factor may be
added.
 This factor reduces the contribution of the higher harmonics in order to get a time function
where the Gibbs phenomenon is minimised. Here a similar problem arises.
 In order to get a frequency response which minimises the effect of the Gibbs phenomenon,
then a 'convergence' factor has to be added to reduce the effect of the higher terms in the
impulse response. This factor is called a window and the shape of this window is the main
issue in the design of FIR filters using the Fourier series.
 In the following applets, the frequency and impulse respose as well as the phase response and
zero locations are shown for the different FIR filter types.
 The applets are only approximate and are here for illustrative and educational purposes. The
filters they produce are not accurate enough for practical applications.
Frequency sampling method:
The frequency sampling method allows us to design recursive and non recursive FIR filters for
both standard frequency selective and filters with arbitrary frequency response.

A. No recursive frequency sampling filters:


The problem of FIR filter design is to find a finite–length impulse response h (n) that
corresponds to desired frequency response. In this method h (n) can be determined by uniformly
sampling, the desired frequency response HD (ω) at the N points and finding its inverse DFT of
the frequency samples.

where H (k), k = 0, 1, 2,……., N-1, are samples of the HD (ω) . For linear phase filters, with
positive symmetrical impulse response, we can write

where α = (N-1)/2. For N odd, the upper limit in the summation is (N - 1)/2, to obtain a good
approximation to the desired frequency response, we must take a sufficient number of the
frequency samples

B. Recursive frequency sampling filter :

In recursive frequency sampling method the DFT samples H (k) for an FIR sequence can be
regarded as samples of the filters z– transform, evaluated at N points equally spaced around the
unit circle.

thus the z–transform of an FIR filter can easily be expressed in terms of its DFT coefficients
The above equation is reduced to

Example problem
Determine the impulse response of FIR filter of length 7 to meet the following specifications.

0 otherwise

Solution: For M=7

0 otherwise

0 otherwise

0 otherwise

7/4 = 1.75 2

0 otherwise
when M is odd

H(0) = =1

h(0) = 0

h(1) = 0

h(2) = 0

h(3) = 1

Hence

h(4) = h(2) = 0
h(5) = h(1) = 0

h(6) = h(0) = 0

COMPARISION OF FIR AND IIR FILTERS

IIR systems FIR systems

IIR stands for infinite impulse response FIR stands for finite impulse response
systems systems

IIR filters are less powerful than FIR filters,


FIR filters are more powerful than IIR filters,
& require less processing power and less but also require more processing power and
work to set up the filters more work to set up the filters
They are more easy to change "on the fly”. They are also less easy to change "on the fly"
as you can by tweaking (say) the frequency
setting of a parametric (IIR) filter
These are less flexible. Their greater power means more flexibility
and ability to finely adjust the response of
your active loudspeaker.
It cannot implement linear-phase filtering. It can implement linear-phase filtering.
It cannot be used to correct frequency- It can be used to correct frequency-response
response errors in a loudspeaker errors in a loudspeaker to a finer degree of
precision than using IIRs
IIRs can provide good resolution even at low FIRs can be limited in resolution at low
frequencies. frequencies, and the success of applying FIR
filters depends greatly on the program that is
used to generate the filter coefficients
Usage is generally more easier than FIR Usage is generally more complicated and
filters. time-consuming than IIR filters
IIR filter need more power due to more FIR filter consume low power
coefficients in the design.
IIR filters have analog equivalent FIR have no analog equivalent
IIR filters are more efficient FIR filters are less efficient
IIR filters are used as notch(band stop),band FIR filters are used as anti-aliasing,low pass
pass functions and baseband filters

You might also like