dsp laboratory guide 20feb2012

44
Digital Signal Processing Laboratory Guide http://sp.utcluj.ro/html/Teaching.html 3rd Year AE Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 1 / 44

Upload: anamaria-buda

Post on 28-Oct-2014

44 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: DSP Laboratory Guide 20feb2012

Digital Signal Processing

Laboratory Guide

http://sp.utcluj.ro/html/Teaching.html

3rd Year AE

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 1 / 44

Page 2: DSP Laboratory Guide 20feb2012

Outline

1 Laboratory 1 - Introduction to MATLAB

2 Laboratory 2 - Discrete-Time Signals

3 Laboratory 3 - Sampling of Analog Signals

4 Laboratory 4 - Discrete-Time Linear Time-Invariant Systems

5 Laboratory 5 - Linear and Circular Convolution

6 Laboratory 6 - Discrete Fourier Transform

7 Laboratory 7 - Finite Impulse Response Filters

8 Laboratory 8 - Discrete-Time Linear Time-Invariant Systems as FrequencySelective Filters

9 Laboratory 9 - Infinite Impulse Response Filters. Indirect Design Methods

10 Laboratory 10 - Infinite Impulse Response Filters. Direct Design Methods

11 Laboratory 11 - Structures for the Realization of Finite Impulse ResponseSystems

12 Laboratory 12 - Structures for the Realization of Infinite Impulse ResponseSystems

13 Laboratory 13 - Quantization of Digital Filter Coefficients

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 2 / 44

Page 3: DSP Laboratory Guide 20feb2012

Laboratory 1

L1. Introduction to MATLABAppendix A — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: To be acquainted with MATLAB programming environment,respectively with the main commands and functions that will be used in thenext laboratories, read Appendix A: Notiuni MATLAB (pp. 139-165) and enterthe described examples in the command line.

Exercises

1 Consider the matrices: A =

3 2 18 4 50 2 0

, B =

2 3 41 1 12 3 2

and the

scalar m = 4. Evaluate using MATLAB: C = A + B; D = A− B; E = C + m;F = A · B; G = B ·m; H = A′; I = B ′; J = A/B; K = A \ B; L = C m. Verify

if J = A · B−1 and if K = A−1 · B. Use the long e format.2 Generate a linearly spaced vector between 3 and 9 with the increment 2.3 Generate a 13 element linearly spaced vector between 3 and 9.4 Generate a 9 point logarithmically spaced vector between decades 10−3 and

103.5 Evaluate the scalar product of: a =

[1 2

]and b =

[−3 3

].

6 y = 3:0.9:123 is the given vector. Find the length of the vector and generateanother vector of the same length, with only 1s elements.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 3 / 44

Page 4: DSP Laboratory Guide 20feb2012

Laboratory 1

7 Evaluate the element by element product of the matrices: A =

9 8 76 5 43 2 1

and B =

1 0 11 0 11 0 1

.

8 Graph x(n) = sin

(2π

1

5n

), n = 0, 10, using stem . The graph should be

represented by red stars; label the axes and write a title.

9 Generate a function named bplusa.m : function sumab = bplusa(a, b) in

order to evaluate the sum of two variables a and b .

10 Generate a function named bproducta.m :

function prodab = bproducta(a, b) in order to evaluate the product of two

vectors a and b .

11 Generate a function: function geometricmean = GeomMean(a, b) in order to

evaluate the geometric mean of two scalars a and b .

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 4 / 44

Page 5: DSP Laboratory Guide 20feb2012

Laboratory 2

L2. Discrete-Time SignalsChapter 1 — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: In this laboratory the discrete time sequences (definition,classification and properties) are presented. It will be also illustrated the wayto represent discrete-time signals using MATLAB. To be acquainted withsignals and sequences, read Chapter 1: Semnale si secvente, paragraphs1.1.1-1.1.2 (pp. 1-4), respectively paragraphs 1.2.1-1.2.2 (pp. 8-10) to seethe MATLAB functions used in the sequences description. Run scripts1.3.1-1.3.12 (you can find the MATLAB examples in Lab2 DSP Examples as:

L2 1, impulse, L2 3÷L2 4, UnitStep, L2 6÷L2 12).

Exercises1 Generate and graph (using stem function) the sequence:

x(n) = {0, 1, 2, 1, 0,−1,−2,−1, 0}, n = 0, 8.2 Generate the complex sequence: x(n) = δ(n) + ju(n), n = 0, 10, and graph the

real, respectively the imaginary part of the generated sequence, in the same

figure, using subplot(m, n, p) command.

3 Generate the ramp sequence, with initial value 0 and final value 100, of length

20: x(n) =100

19n, n = 0, 19.

4 Graph the sequence: x(n) = 3 sin (4πn) + 2 cos (0.72πn), n = 0, 100. Is thissequence periodic? If yes, which is the period?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 5 / 44

Page 6: DSP Laboratory Guide 20feb2012

Laboratory 2

5 Plot the discrete sequence, of length 20: x(n) =

{sin (0.2n), n > 10,

0, n ≤ 10.6 Generate the complex sequence, of length 50:

x(n) = exp[−0.1n + j

(2π0.1n +

π

4

)]. Plot the sequence attenuated by sine,

respectively by cosine functions: x1(n) = exp (−0.1n) sin(

2π0.1n +π

4

);

x2(n) = exp (−0.1n) cos(

2π0.1n +π

4

).

7 Graph the attenuated sine sequence of length 100, given by:

x(n) =

{sin (0.1n)

0.1n, n 6= 0,

1, n = 0.8 Generate and plot next sequences (abscissa n must include only the indicated

range):

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 6 / 44

Page 7: DSP Laboratory Guide 20feb2012

Laboratory 2

x1(n) = 0.5δ(n), n = −5, 10; x2(n) = 0.8δ(n − 5), n = −5, 1S0;

x3(n) = 1.5δ(n + 100), n = −150, 0; x4(n) = 2u(n), n = −20, 20;

x5(n) = 1.5u(n − 10), n = −10, 20;

x6(n) = 2.5u(n + 10), n = −15, 15;

x7(n) = 1.2δ(n + 5) + 1.3 [u(n)− u(n − 20)] , n = −15, 25;

x8(n) = 2.2 sin(

2π0.1n +π

4

), n = 0, 49;

x9(n) = 1.5 sin(π

4n +

π

3

), n = 0, 20;

x10(n) = 2 cos

(π√5

n +π

6

), n = −20, 20;

x11(n) = ln∣∣∣sin

( π10

n)− cos

( π10

n)∣∣∣, n = −20, 20;

x12(n) = exp (3n), n = 0, 9; x13(n) = (−3)n sin(π

8n), n = 0, 20;

x14(n) = 10 sin(

2π0.1n +π

6

), n = −5, 20.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 7 / 44

Page 8: DSP Laboratory Guide 20feb2012

Laboratory 2

9 Generate and plot next sequences:

x1(n) =

{n(2− n), n = −5, 10

10, otherwise− 10 ≤ n ≤ 20;

x2(n) =

8∑

i=0

a(n − 2i);

(a =

{n + 3, n = 0, 5

0.5, otherwise

), n = 0, 10

50, otherwise

0 ≤ n ≤ 15;10 Generate 3 sinusoidal sequences of different amplitude, frequency and phase

and plot them simultaneously on the screen (minimum 1 period).11 Generate 16 periods of a periodic sequence; every period consists in 5 samples

of 1 and 10 samples of 0.12 Generate an uniformly distributed random sequence, between 0 and 10. Plot

this sequence for n = 0, 49.Hint: To generate an uniform distributed random sequence on a specified interval

[a, b], you have to multiply the output of rand function by (b − a), and then to add

a. In the case of this example a = 0 and b = 10.13 Generate a normally distributed random sequence (gaussian), between 0 and

10. Graph this sequence for n = 0, 49.Hint: This sequence has a specific mean (5) and variance (5). To generate a gaussian

sequence with these parameters multiply the output of randn function by the

standard deviation (√

5) and then add the desired mean (5).

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 8 / 44

Page 9: DSP Laboratory Guide 20feb2012

Laboratory 2

14 Generate and plot the sequences of length 100:x1(n) = δ(n)− δ(n − 5); x2(n) = u(n − 5);

x3(n) = n [u(n)− u(n − 10)] ; x4(n) = exp [(−0.2 + j0.3) n];

x5(n) = n [u(n)− u(n − 10)] + exp [(−0.2 + j0.3) n];

x6(n) = n [u(n)− u(n − 10)] + exp (0.3n) [u(n − 10)− u(n − 20)] .

15 Add an uniformly distributed random sequence of mean 0 and maximumamplitude 0.2, to the 100 length sequences, generated at exercise 14.

16 Repeat exercise 15, for a gaussian sequence of mean 0 and variance 0.1.17 Plot using stem function, the sequence obtained by summing a sine sequence

by an uniform noise with the amplitude 10 times lower.18 Generate and graph a rectangular sequence and a sawtooth one having 15

samples per period. You have to represent graphically 5 periods.19 Generate 101 samples of a ramp sequence with the initial value 0 and the

increment equal by 0.01. Plot this sequence between 20 and 30.Hint: For plotting this sequence you can use the syntax: stem(20:30, x(21:31))

assuming that the generated sequence was denoted by x .

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 9 / 44

Page 10: DSP Laboratory Guide 20feb2012

Laboratory 2

20 Create a MATLAB function to generate a finite length sinusoidal sequence.The function must have 5 input arguments: 3 for the sinusoid’s parametersand 2 to specify the first and the last index of the finite sequence. Thefunction will return a colon vector that will contain the sinusoid values.

Hint: function seq = gensin(ampl, freq, phase, ninitial, nfinal) .

Use the created function in a MATLAB script to evaluate the minimum, themaximum, the mean and the standard deviation of a sinusoidal sequence with

parameters: ampl = 1.5 , freq = 1/15 , phase = pi/6 , n = 0, 50.

21 Modify the function generated at 20, to return 2 output arguments: a vectorthat contains the sequence’s values and a vector with the sequence’s indices.

Hint: function [seq, n] = gensin1(ampl, freq, phase, ninitial, nfinal) .

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 10 / 44

Page 11: DSP Laboratory Guide 20feb2012

Laboratory 3

L3. Sampling of Analog SignalsChapter 1 — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The aim of this laboratory is the introduction of analog signals,the way to obtain a discrete-time sequence from an analog signal (samplingof analog signals) and the way to reconstruct analog signals from samples.To be acquainted with analog signals, their way of sampling and theirreconstruction from samples see Chapter 1: Semnale si secvente, paragraphs1.1.1-1.1.5 (pp. 1-8). In paragraph 1.2.3 (p. 11) the MATLAB functionsused for interpolation are presented. Run scripts 1.3.13-1.3.15 (you can find

the MATLAB examples in Lab3 DSP Examples as: L3 1÷L3 3). Study theproblem 1.3.16.

Exercises1 Plot an amplitude modulated signal, sampled by 1MHz, whose carrier is of

100kHz and modulation signal of 10kHz, for a modulation index m = 1.2.Graph on the same figure, but in a different pane the suppressed carrieramplitude modulated sequence.

2 From all sequences obtained after sampling analog sinusoidal signals by 50kHz,which one has the major variation?

3 Generate 101 samples of a sequence obtained from an analog sinusoidal signalsampled by 1kHz; the analog sinusoid has unitary amplitude, zero phase and afrequency of 100Hz.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 11 / 44

Page 12: DSP Laboratory Guide 20feb2012

Laboratory 3

From the previous sequence generate a full-wave rectified one ( abs );

Perform the arithmetic mean of the previously obtained sequences;

Graph the three sequences in the same figure, but in different panes.

4 Consider an analog sinusoidal signal with frequency F = 200Hz. This signal issampled by Fs = 800Hz. Plot the analog signal, the discrete-time sequenceobtained after sampling and the analog signal that can be recovered fromsamples (Fsim = 8kHz).

5 Consider the analog sinusoids with frequencies: 300Hz, 400Hz, 500Hz, 700Hz,900Hz. All of them are sampled by 900Hz (don’t forget the simulationfrequency). Plot the analog sinusoidal signals, the sequences obtained aftersampling, the analog signals that can be recovered from the correspondingsamples and also the corresponding spectra. Is there any alias error? Why?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 12 / 44

Page 13: DSP Laboratory Guide 20feb2012

Laboratory 4

L4. Discrete-Time Linear Time-Invariant SystemsChapter 2 — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The aim of this laboratory is to present discrete-time LTIS. Theway to evaluate the system response to arbitrary input signals, with zeroinitial conditions, is illustrated. In this laboratory, the usage of z-transform toLTIS characterization is also presented. To be familiar with LTIS read Chapter

2: Semnale discrete, paragraphs 2.1, 2.1.1-2.1.3 (pp. 43-46). The MATLABfunctions used to evaluate the output, the impulse response of a LTIS,respectively the functions used to characterize the discrete-time systems aredescribed in paragraphs 2.2.1-2.2.2 (pp. 48-50). Run scripts 2.3.1-2.3.9 (you

can find the MATLAB examples in Lab4 DSP Examples as: L4 1÷L4 9). Studyproblems 2.3.10÷2.3.13.

Exercises1 Demonstrate through a MATLAB scrip (as L4 1.m) that the system

H{x(n)} = x2(n) is nonlinear. Consider: x1(n) = sin (2π0.1n),x2(n) = sin (2π0.15n), a = 3, b = −3.

2 A discrete LTIS is characterized by the constant-coefficient difference equation:

y(n)− 1.5 cosπ

8y(n − 1) + 0.95y(n − 2) = x(n) + 0.4x(n − 1).

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 13 / 44

Page 14: DSP Laboratory Guide 20feb2012

Laboratory 4

Determine the poles of the system’s transfer function, which are the roots of

the polynomial A(z) = 1 +N∑

k=1

ak z−k using the roots command. If these roots

are complex-conjugate, the response of the system contains harmoniccomponents. Represent the real and the imaginary part of the complexsequences pn

k u(n), for n = 0, 30, where pk are the system’s poles;Accordingly to the difference equation, the impulse response sequence is:h(n) = (a1pn

1 + a2pn2 ) u(n). Determine the constants a1 and a2. Evaluate the

impulse response using the MATLAB command impz (see L4 8.m);

Determine the steady-state response of the system to the complex exponential

input sequence (see L4 9.m): x(n) = e jω0n, for n = 0, 60, ω0 =π

6, using the

relation:y(n) = |H (ω0)| e jω0n+∠H(ω0).

3 Analyze the effect of poles and zeros of a system function H(z) on themagnitude of the frequency response function |H(ω)|, for the systems:

H1(z) =(1− z1z−1

) (1− z2z−1

)where:

1) z1,2 = 1; 3) z1,2 = e±j π3 ; 5) z1,2 = e±j 2π

3 ; 7) z1,2 = −1;

2) z1,2 = e±j π6 ; 4) z1,2 = e±j π

2 ; 6) z1,2 = e±j 5π6 ;

Analyze how |H(ω)| is modifying accordingly to the zeros position, andrepresent the zeros in z-plane. What do you observe? Comment on the results.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 14 / 44

Page 15: DSP Laboratory Guide 20feb2012

Laboratory 4

H2(z) =0.3(

1− p1z−1) (

1− p2z−1) where:

1) p1,2 = 0.3; 2) p1,2 = e±j π4 ; 3) p1,2 = e±j π

2 ; 4) p1,2 = −0.3;

Analyze how |H(ω)| is modifying accordingly to the poles position, andrepresent the poles in z-plane. What do you observe? Comment on the results.

4 Find the impulse response of the system described by the transfer function:

H(z) =1 + z−1 + z−2 + z−3

1− 0.5z−1 − 4z−2 + 2z−3.

5 Evaluate the first 50 samples of the impulse response sequence of the system:

H(z) =z2 + 1

z3 − 1.9z2 + 1.55z − 0.425.

6 Evaluate the first 100 samples of the impulse response of the system:

H(z) =z

z − 1.

7 Next transfer functions of some discrete LTIS are considered:

H1(z) = 1− 4z−1 + 4z−2; H4(z) =

(1 + z−1

)2

1− z−1 + 0.25z−2;

H2(z) = 1 + 4z−1 + 4z−2; H5(z) =

(1− z−1

)2

1− z−1 + 0.25z−2;

H3(z) = 1− z−1 + 0.25z−2; H6(z) =1

1− z−1 + 0.25z−2;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 15 / 44

Page 16: DSP Laboratory Guide 20feb2012

Laboratory 4

Using the zplane command represent the pole-zero diagrams for the system

functions Hi (z), i = 1, 6;

Using the freqz command represent the frequency response characteristics for

each system. Specify what type of system is described by each transfer function;Evaluate and plot the unit impulse and the unit step response for H5(z).

8 Find the impulse response of the system: H(z) =0.5z2 + 0.5z

z2 − z − 0.5.

9 A LTIS is characterized by the system function:

H(z) =(z + 0.2)

(z2 + 5

)(z − 0.7) (z2 − z + 0.49)

.

Represent the poles and the zeros in the z-plane;Evaluate and plot the phase response characteristic. Is this system alinear-phase one?

10 Two causal systems are considered. Determine which one is stable. Commenton your answer.

H1(z) =1− 0.6z−1 + 1.15z−2 − 0.98z−3 + 0.98z−4

1 + 1.27z−1 + 2.02z−2 + 1.54z−3 + 0.98z−4;

H2(z) =2− 2.54z−1 + 5z−2 − 4.3z−3 + 3.27z−4

1− 0.77z−1 + 0.82z−2 + 0.41z−3 + 0.51z−4.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 16 / 44

Page 17: DSP Laboratory Guide 20feb2012

Laboratory 4

11 For the sequence:

x(n) = (0.9)n sin (0.2n), n = 0, 99,

find the impulse response after you evaluate X (z).Hint: The z-transform of the sequence

x(n) = an sin (ω0n)u(n)

is

H(z) =az−1 sinω0

1− 2az−1 cosω0 + a2z−2, |z| > |a|.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 17 / 44

Page 18: DSP Laboratory Guide 20feb2012

Laboratory 5

L5. Linear and Circular ConvolutionChapters 2 and 3 — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The aim of this laboratory is to present the linear and thecircular convolution. You can find the theoretical aspects regarding the linearconvolution in Chapter 2: Semnale discrete, paragraph 2.1.4 (pp. 47-48),respectively in 2.2.3 (p. 50) the MATLAB commands used for linearconvolution evaluation. In Chapter 3: Transformata Fourier discreta, paragraph3.1.3 (pp. 95-96) you can find the aspects regarding the circular convolution.The MATLAB functions used are presented in 3.2.2 (p. 99). Run scripts2.3.14, respectively 3.3.6-3.3.8, 3.3.11 (you can find the MATLAB examples in

Lab5 DSP Examples as: L5 1÷L5 5). Study problems 2.3.15÷2.3.16.

Exercises1 Determine the linear convolution of the sequences: x1(n) = |10− n| and

x2(n) = 1.5 cos(

2π0.1n +π

4

), for n = 0, 20. Plot the two sequences and the

sequence obtained after convolution. Which is the fundamental period of thelinear convolution?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 18 / 44

Page 19: DSP Laboratory Guide 20feb2012

Laboratory 5

2 The impulse response of a LTIS is:

h(n) =

{exp (−0.1n), n = 0, 31,

0, otherwise.At the input of the system the sequence x(n) = u(n)− u(n − 20) is applied(u(n) is the unit step sequence). Determine the system output using the linearconvolution.

3 The impulse response of a LTIS is:

h(n) =

{exp (−0.15n), n = 0, 31,

0, otherwise.At the input of the system the sequence x(n) = u(n)− u(n − 30) is applied(u(n) is the unit step sequence). Determine the system output using the linearconvolution.

4 Consider the system described by the z-domain transfer function:

H(z) =z − 1

(z − 0.25)(z − 0.5).

Determine the first 100 samples of the unit step response sequence;Express the system function as: H(z) = H1(z) + H2(z);Determine the unit step response of the individual blocks and then add theresults. Compare the obtained result with the one obtained in the first part.

5 Consider the system: H(z) =z

z − 0.5. Evaluate:

The unit step response;The unit ramp response;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 19 / 44

Page 20: DSP Laboratory Guide 20feb2012

Laboratory 5

The response to the sequence: x(n) = 10 · cosπn

3· u(n);

The response to the sequence: x(n) = 10 · 0.5n · u(n).

6 Two linear systems are connected in cascade:

h1(n) = { 2� , 3, 2, 1,−0.5, 1, 2, 4},h2(n) = { 3� ,−1, 5, 0, 2, 6}.

Generate an arbitrary input sequence x(n) (i.e., a sinusoidal sequence);Evaluate the output sequence of the first system, using the linear convolution,and then evaluate the output sequence of the cascade formed by the twosystems;If the cascade order is changed, repeat the operations involved in the precedentpart. What can you conclude?Suppose that the second system is characterized by the input-output relation:y(n) = 0.01 [x(n)]2, and the first system remains unchanged. Repeat theprecedent parts and compare the output resultant sequences.

7 Evaluate the circular convolution of the sequences: x1(n) = (−2)n and

x2(n) = 1.1 cos(π0.25n +

π

6

), for n = 0, 10. Plot the two sequences and the

sequence obtained after the evaluation of the circular convolution. Which isthe fundamental period of the circular convolution?

8 Consider the sequences: x1(n) = 1.1 sin(

2π0.05n +π

4

)and x2(n) = (−1)n,

for n = 0, 15. Write a MATLAB script to evaluate:

The linear convolution;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 20 / 44

Page 21: DSP Laboratory Guide 20feb2012

Laboratory 5

The 16-point circular convolution in two ways (using circonv and, respectively

fft );

The circular convolution in minimum number of points required in order toobtain the same result as in the case of the linear convolution, in two ways

(using circonv and, respectively fft ).

9 Evaluate the linear and the circular (using minimum length DFT required)convolution of the sequences: x1(n) = u(n)− u(n − 20) (n = 0, 30) andx2(n) = (−0.7)n (n = 0, 20). Which is the minimum length for the period Nsuch that the values of the two convolutions to be the same? Graph the twosequences and also those obtained after the evaluation of linear, respectivelycircular convolution.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 21 / 44

Page 22: DSP Laboratory Guide 20feb2012

Laboratory 6

L6. Discrete Fourier TransformChapter 3 — L. Grama, C. Rusu, Prelucrarea numerica a semnalelor - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The aim of this laboratory is to present the Discrete FourierTransform (DFT): its definition, its properties and also its implementation inMATLAB. To become familiar with DFT read Chapter 3: Transformata Fourier

discreta, paragraphs 3.1.1-3.1.2 (pp. 90-95), respectively paragraph 3.1.4 forthe sampling in the frequency domain (pp. 96-97). The MATLAB functionsused to implement the DFT are presented in 3.2.1 (pp. 98-99). Run scripts3.3.1÷3.3.5, 3.3.9÷3.3.10, 3.3.12 (you can find the MATLAB examples in

Lab6 DSP Examples as: L6 1÷L6 8). Study problems 3.3.13÷3.3.16.

Exercises1 Plot the magnitude and the phase of the corresponding DFT for:

x(n) =

{1, n = 0, 5,

0, n = 6, 10.2 Consider the sequence given in exercise 1; pad it by 116 zeros. Plot the

magnitude and the phase of the DFT for the zero-padded sequence.3 Generate a MATLAB program to verify the Parseval relationship for:

x(n) =

{n + 2j , n = 0, 63,

0, otherwise.y(n) =

{−n + 3j , n = 0, 63,

0, otherwise.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 22 / 44

Page 23: DSP Laboratory Guide 20feb2012

Laboratory 6

4 An amplitude modulated signal, sampled by 1MHz, whose carrier is of 100kHzand modulation signal of 10kHz is considered. For a modulation index ofm = 0.7 graph the magnitude and the phase spectra.

5 Consider the sequences: x1(n) = 0.2 sin(2π0.1n + π

8

), x2(n) = 2e−0.2n,

n = 0, 49. Plot the considered sequences and their product. Evaluate themagnitude and the phase spectra of the DFTs for x1(n), x2(n) and x1(n)x2(n).Plot the results.

6 Evaluate the N-point DFTs of: x1(n) = u(n)− u(n − 20) (n = 0, 30),

x2(n) =

{n − 1, n = 0, 5,

(−1)n, n = 6, 10.Graph the sequences and their DFTs (real

and imaginary parts, magnitude and phase) for ω ∈ [−π, π] andN = 32; 128; 256; 512; 1024.

7 Consider the sequences: x1(n) = { 3� , 4.2, 11, 0, 7,−1, 0, 2},x2(n) = { 1.2� , 3, 0,−0.5, 2},

Evaluate the linear convolution (using conv ) between x1(n) and x2(n). Whichis the length of the result?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 23 / 44

Page 24: DSP Laboratory Guide 20feb2012

Laboratory 6

In some cases, it should be convenient to evaluate the linear convolution usingthe Fourier transform. At the beginning, evaluate the linear convolution in asome way inconsistent manner. Extend x2(n) with three zeros, so that bothsequences to have the same length. Evaluate then the 8-point DFT for the twosequences. After multiplying the two DFTs, evaluate the IDFT of the productX1(k)X1(k). Take into account only the real part of the result, imaginary partbeing the result of the roundoff errors. In what measure the result is identicalwith the one obtained through the linear convolution. How many samples areaccurate? Why?Which is the minimum length DTF that must be used, so that through thepreceding procedure to obtain the same result as in the case of linearconvolution? Pad both sequences by zeros, till both of them are of length equalby the minimum required to evaluate accurate the linear convolution using theDFT. Repeat the previous part.Pad with five zeros the two sequences, so that their length is greater than theminimum required. Repeat the previous part and specify to what extent agreater number of samples affect the result.

8 Consider the sequence: x(n) = { 3� , 2, 7, 1, 4}.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 24 / 44

Page 25: DSP Laboratory Guide 20feb2012

Laboratory 6

Evaluate the 5-point DFT for the sequence x(n). Multiply the DFT by a

complex exponential: e−j 2πk5 . Compute the IDFT of the product, that is to find

the sequence x1(n): x1(n) = IDFT{X (k)e−j 2πk5 }. Take into account only the

real part of the sequence x1(n), the imaginary part being the result of theroundoff errors. Compare x1(n) by x(n). Are these sequences obtained bycircular translation?

Repeat the previous part to obtain a circular shift by 3 samples.

How can you modify this technique so that to be possible to evaluate the linearconvolution?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 25 / 44

Page 26: DSP Laboratory Guide 20feb2012

Laboratory 7

L7. Finite Impulse Response FiltersChapter 2 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The subject of this laboratory are FIR filters. In the first partsome theoretical aspects regarding the digital filters are presented, theiradvantages and disadvantages toward the analog ones. The FIR filterscharacteristics are illustrated and some design methods are described:windowing method, sampling in the frequency domain method and theoptimal method. To be acquainted with the digital filters read Chapter 2:

Filtre cu raspuns finit la impuls, paragraphs 2.1-2.1.1 (pp. 41-42), respectively2.1.2-2.1.3 (pp. 42-48) to become familiar with the FIR filters (theircharacteristics and approximation methods). The MATLAB functions used toimplement FIR filters are presented in 2.2.1-2.2.4 (pp. 48-54). Run scripts2.3.1÷2.3.4 (you can find the MATLAB examples in Lab7 DSP Examples as:

L7 1÷L7 4). Study problems 2.3.5÷2.3.6.

Exercises1 Design a 21 FIR LPF, with the cutoff frequency of 0.2.2 Redesign the previous filter for a larger transition band.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 26 / 44

Page 27: DSP Laboratory Guide 20feb2012

Laboratory 7

3 Graph the rectangular, triangular, Blackman, Hamming, Hanning, Kaiser(different β) windows, and also their magnitude frequency responsecharacteristics. Note the principal lobes’ values and the maximum amplitudesof the secondary lobes [dB]. Verify the results by those given in Table 2.3. For

N = 20 study demowindows.m . What happens if you modify the window’slength (N = 50)? What can you say about the windows effect in the FIRfilters design?

4 Design a FIR band-reject filter, of order 21, using the windowing method (usethe windows generated in exercise 3), with the stop band limits Fs1 = 10kHz,Fs2 = 15kHz. The sampling frequency considered is Fs = 90kHz. Plot thefrequency response characteristic, the zeros distribution and the impulseresponse of the filter, for each window.

5 Design a FIR LPF, of order 36, using the sampling in the frequency domainmethod, with the pass band limit Fp = 15kHz and the sampling frequencyFs = 50kHz. Sketch the frequency response characteristics of the filter, thezeros distribution and the impulse response.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 27 / 44

Page 28: DSP Laboratory Guide 20feb2012

Laboratory 7

6 Design a FIR BPF, of minimum order, with the frequencies Fs1 = 10kHz,Fp1 = 12kHz, Fp2 = 60kHz, Fs2 = 62kHz and the sampling frequencyFs = 130kHz, the minimum attenuation in the stop bands of 40dB and themaximum attenuation in the pass band of 3dB. Sketch the frequency responsecharacteristics of the filter.Hint: In order to evaluate the pass and stop band deviations use:

APB = 20 lg1 + δp

1− δp⇔ δp =

10APB

20 − 1

10APB

20 + 1

ASB = −20 lg δs ⇔ δs = 10−ASB

20 .

7 Redesign the FIR PBF from exercise 6, using the SPTool graphical interface.8 Consider the FIR filter described by the input-output relationship:

y(n) =1

4[x(n) + x(n − 1) + x(n − 2) + x(n − 3)]. Evaluate and sketch the

impulse response and the frequency response characteristics.9 Design a 33 order Hilbert transformer, with optimum response, such that the

normalized frequency to be within 0.05 and 0.45.10 Design a 55 linear phase FIR LPF, with the transition frequencies 0.2 and 0.3.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 28 / 44

Page 29: DSP Laboratory Guide 20feb2012

Laboratory 7

11 Design a FIR filter that approximate the magnitude characteristic:

|H(ω)| =

0, 0 < ω < 0.2π,1, 0.25π < ω < 0.45π0, 0.5π < ω < π.

Evaluate and sketch the impulse response and the frequency responsecharacteristics.

12 Design a linear phase LPF, of order 51, to approximate the characteristic of anideal LPF. The cutoff frequency is considered to be 0.2π. Graph the frequencyresponse characteristics for the designed filter. You should observe thepresence of the Gibbs phenomenon.

13 Design a linear phase BPF, of order 40, to approximate the characteristic of anideal BPF (rectangular window) with the cutoff frequencies: 0.2π and 0.6π.

14 Repeat exercise 13 for a Hamming window. Why the Gibbs phenomenondoesn’t appear anymore? What can you say about the transition band?

15 Design a filter to approximate the characteristic of a differentiator,H(ω) = ω/π, considering a Blackman window. The order of the filter shouldbe 40.

16 Consider the moving average filter described by the constant-coefficient

difference equation: y(n) =1

3[x(n) + x(n − 1) + x(n − 2)].

Evaluate and plot the magnitude and the log-magnitude frequency response forthis filter;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 29 / 44

Page 30: DSP Laboratory Guide 20feb2012

Laboratory 7

At the input of this filter a signal mixed up with noise is applied. What do youobtain at the output? Comment on the result;

Repeat the previous parts for a five order moving average filter, described by thedifference equation:

y(n) =1

5[x(n) + x(n − 1) + x(n − 2) + x(n − 3) + x(n − 4)].

17 Using a rectangular window, design a FIR BPF, of order 55, with thenormalized cutoff frequencies 0.18 and 0.33. Plot the impulse response andthe frequency response characteristics.

18 Design a 55 order FIR filter, of equal ripple, to approximate the frequencyresponse:

H(ω) =

0, 0 < ω < 0.2π,1, 0.22π < ω < 0.43π0, 0.5π < ω < π.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 30 / 44

Page 31: DSP Laboratory Guide 20feb2012

Laboratory 8

L8. Discrete-Time Linear Time-Invariant Systems as Frequency SelectiveFiltersChapter 1 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To de done: The aim of this laboratory is to present the LTIS as selectivefilters in the frequency domain. In the firs part the ideal filters’ characteristicsare illustrated, and then some particular classes of selective filters are shown:digital resonators, comb filters, notch filters, all-pass filters and digitalsinusoidal oscillators. The theoretical aspects are illustrated in Chapter 1:

Filtrari selective paragraph 1.1 (pp. 1-20), respectively in paragraph 1.2 (p.20) the MATLAB functions are described. Run scripts 1.3.1÷1.3.9 (you can

find the MATLAB examples in Lab8 DSP Examples as: L8 1÷L8 9).

Exercises

1 Redo example L8 9, for the other values of the frequency f0.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 31 / 44

Page 32: DSP Laboratory Guide 20feb2012

Laboratory 9

L9. Infinite Impulse Response Filters. Indirect Design MethodsChapter 3 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: This laboratory is focused on designing, analyzing andimplementing IIR filters. In some applications, the IIR filters are moreadvantageously than the FIR filters because they can realize excellentselectivity characteristics with a lower order of the transfer function. Incontrast with the FIR filters, the IIR ones cannot have linear phase. Tobecome familiar with the IIR filters read Chapter 3: Filtre cu raspuns infinit la

impuls, paragraphs 3.1, 3.1.1 (pp. 70-77), respectively paragraph 3.1.3 (pp.83-84) about the IIR filters advantages. The MATLAB functions used toimplement the IIR filters are presented in 3.2.1-3.2.3 (pp. 84-88). Run scripts3.3.1÷3.3.4 (you can find the MATLAB examples in Lab9 DSP Examples as:

L9 1÷L9 4). Study problems 3.3.5÷3.3.6.

Exercises1 Using the impulse invariance method design a digital Butterworth band-pass

filter, for which:

The attenuation is lower than 1dB at 4kHz and 6kHz;The attenuation is greater than 40dB at 3kHz and 8kHz;The sampling frequency is 20kHz.

1 Evaluate and sketch the frequency response characteristics for the analog BPFand for the corresponding digital one.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 32 / 44

Page 33: DSP Laboratory Guide 20feb2012

Laboratory 9

2 Evaluate and sketch the impulse response of the digital BPF and the pole-zerodiagram in the z-plane.

3 Is the obtained digital filter stable?

Repeat the problem using the bilinear transformation method.2 Repeat exercise 1 for a Cebısev I filter. Comment on the differences.3 Repeat exercise 1 for a Cebısev II filter. Comment on the differences.4 Repeat exercise 1 for an Elliptic filter. Comment on the differences.5 Repeat exercises 1÷4 and design these filters using the graphical interface

SPTool.6 Consider the analog filter described by the system function:

H(s) =2

s + 2

s2 + 2

2s2 + 3s + 2. Using the bilinear transformation method, obtain

the corresponding digital filter; the sampling period is equal by T = 0.8. Whatkind of filter is the obtained one? Is this filter stable?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 33 / 44

Page 34: DSP Laboratory Guide 20feb2012

Laboratory 10

L10. Infinite Impulse Response Filters. Direct Design MethodsChapter 2 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: In this laboratory the direct design methods for IIR filters aredescribed. The theoretical aspects regarding the direct design methods for IIRfilters are presented in Chapter 3: Filtre cu raspuns infinit la impuls in paragraph3.1.2 (pp. 78-83), respectively in 3.2.4 (pp. 88-91) the MATLAB functionsare illustrated. Run scripts 3.3.7÷3.3.11 (you can find the MATLAB examples

in Lab10 DSP Examples as: L10 1÷L10 5). Study problems 3.3.12÷3.3.13.

Exercises1 Consider a Cebısev II digital HPF, with 4 poles and 4 zeros, with the system

function: Hd (z)

=0.076945− 0.19009z−1 + 0.25374z−2 − 0.19009z−3 + 0.076945z−4

1 + 0.80034z−1 + 0.73056z−2 + 0.17774z−3 + 0.035329z−4

Using the Pade approximation method for Hd (z), and considering the impulseresponse length equal by 50, compare the method’s performances for:M = {2; 5; 7} and N = {2; 5; 7}.

2 Consider the filter given in exercise 1; approximate it using the least squaresdesign method.

3 Consider the filter given in exercise 1; approximate it using Prony’s designmethod.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 34 / 44

Page 35: DSP Laboratory Guide 20feb2012

Laboratory 10

4 Consider the filter given in exercise 1; approximate it using Shank’s designmethod.

5 Using Yule-Walker method, synthesize a BRF, with the stop band between 0.3and 0.6 and the cutoff pass band frequencies 0.25 and 0.65.

6 Design a 5 order Butterworth LPF, which satisfies the condition:0.9 < H(ω) < 1, for 0 < f < 0.2.

7 Consider a LTIS described by the transfer function:

H(z) =0.05634(1 + z−1)(1− 1.01666z−1 + z−2)

(1− 0.68z−1)(1− 1.4461z−1 + 0.7957z−2). Sketch the pole-zero

diagram, the frequency response characteristics and the group delaycharacteristic.

8 Design a minimum order Butterworth LPF, which satisfies the conditions:0.99 < |H(f )| < 1 for 0 < f < 0.22 and 0 < |H(f )| < 0.01 for 0.25 < f < 0.5.

Plot the frequency response characteristics and the group delay characteristic;Find the poles and the zeros of the system function and write the systemfunction expression in a compact manner.

9 Repeat exercise 8 for a Cebısev filter.10 Design a Cebısev BRF which must reject the frequency f = 0.22. The design

must satisfy the next requirements:

The order of the filter is ten;The stop band width is 0.04;The widths of the transition bands are 0.03;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 35 / 44

Page 36: DSP Laboratory Guide 20feb2012

Laboratory 10

The stop band attenuation must be at least 20dB, and the ripple in the passband is 1dB.

Evaluate the output of this filter to the excitation x(n) = sin (2π0.22n), forn = 0, 299. Comment on the result.

11 A LTIS is described by the transfer function: H(z) =z

z − 0.9.

Evaluate and sketch the impulse response;Evaluate and sketch the frequency response characteristics (the magnitude andthe phase);Evaluate the output of this filter to the excitation x(n) = sin 2π0.05n, forn = 0, 499. Compare the excitation with the output sequence. How are affectedthe amplitude and the phase of the input sinusoid?Repeat the previous part for x(n) = sin (2π0.1n), for n = 0, 499.

12 Two continuous-time signals are considered, xa(t) and ya(t), which are in an

integral relationship: ya(t) =

∫ t

0

xa(t)dt. The integral can be approximated

using the trapezoidal rule as follows: ya(t) ' ya(t0) +t − t0

2[xa(t) + xa(t0)].

A discrete integrator can be represented by the finite difference equation:

y(n) = y(n − 1) +T

2[x(n) + x(n − 1)], where x(n) and, respectively y(n)

represent the sampled signals derived from xa(t) and ya(t).

Determine the transfer function H(z) of the discrete integrator;Generate two vectors to describe the discrete integrator. Chose T = 0.1s;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 36 / 44

Page 37: DSP Laboratory Guide 20feb2012

Laboratory 10

Consider the signal: xa(t) = 0.9t sin (2t). Its integral can be approximated bydiscrete integrator. For this purpose, this signal is sampled by T = 0.1s and itis passed through the integrator. Evaluate the first 100 samples for the outputsequence and compare them by the theoretical result;

Repeat previous parts for T = 0.05s.

13 Consider the LTIS described by the system function: H(z) =1

1− z−N.

Create a variable to describe this system, and then generate 100 samples of thesystem’s impulse response (N = 10);

Evaluate and sketch the frequency response characteristics (the magnitude andthe phase);

Generate 10 samples of the sequence: x(n) = 9− n, for n = 0, 9. Pad x(n) by90 zeros. Pass this new sequence through the filter and evaluate the first 100samples of the response sequence.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 37 / 44

Page 38: DSP Laboratory Guide 20feb2012

Laboratory 11

L11. Structures for the Realization of Finite Impulse Response SystemsChapter 2 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: This laboratory is dedicated to the realization of discrete-timeLTIS with finite impulse response. The direct form, the cascade structure,and the lattice one will be presented. It is also described the frequencysampling implementation for a FIR system – its advantage consists in thecomputational efficiency toward other implementations. The theoreticalaspects regarding discrete-time LTIS implementation are presented in Chapter

4: Structuri pentru implementarea sistemelor discrete paragraph 4.1 (pp.122-123), respectively in 4.1.1. (pp. 123-132) the structures for therealization of FIR systems are described. Study problems described in theexamples 4.3.1-4.3.3 (you can find the MATLAB scripts in Lab11 DSP Examples

as: L11 1÷L11 4).

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 38 / 44

Page 39: DSP Laboratory Guide 20feb2012

Laboratory 11

Exercises1 Next FIR systems are considered:

H1(z) = 1− 5

6z−1 +

1

6z−2;

H2(z) =(

1− 2z−1)(

1− 0.8e j π6 z−1

)(1− 0.8e−j π

6 z−1)

;

H3(z) = 1− 1.27z−1 + 1.19z−2 + 1.18z−3 + 0.4z−4;

H4(z) = 0.5 + 0.2z−1 − 0.3z−2 + z−3;

Synthesize and draw the structures corresponding to the direct form, cascadeand respectively lattice implementations.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 39 / 44

Page 40: DSP Laboratory Guide 20feb2012

Laboratory 12

L12. Structures for the Realization of Infinite Impulse Response SystemsChapter 2 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: In this laboratory the direct, the cascade, the parallel and thelattice structures for the IIR systems are presented. To be acquainted withthe theoretical aspects regarding discrete-time IIR systems implementationstructures read Chapter 4: Structuri pentru implementarea sistemelor discrete, theparagraph 4.1.2 (pp. 132-141), respectively the paragraph 4.2 (pp. 141-143),where the used MATLAB functions for IIR systems implementation arepresented. Run script 4.3.8 (you can find the MATLAB example in

Lab12 DSP Examples as: L12 1). Study problems 4.3.4÷4.3.7.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 40 / 44

Page 41: DSP Laboratory Guide 20feb2012

Laboratory 12

Exercises1 Next IIR systems are considered:

H1(z) =3(1− z−1

) (1 +√

2z−1 + z−2)

(1 + 0.3z−1) (1− 0.7z−1 + 0.49z−2);

H2(z) =

(1− 0.3e j π

4 z−1)(

1− 0.3e−j π4 z−1

)(1− 0.6e j π

6 z−1) (

1− 0.6e−j π6 z−1

) ;

H3(z) =3

1− 1.27z−1 + 1.19z−2 + 1.18z−3 + 0.4z−4;

H4(z) =0.5 + 0.2z−1 − 0.3z−2 + z−3

1− 0.3z−1 + 0.2z−2 + 0.5z−3;

Synthesize and draw the structures corresponding to the direct forms I and II,cascade, parallel and respectively lattice implementations. Specify for eachsystem if it is stable or not.

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 41 / 44

Page 42: DSP Laboratory Guide 20feb2012

Laboratory 13

L13. Quantization of Digital Filter CoefficientsChapter 2 — L. Grama, A. Grama, C. Rusu, Filtre numerice - aplicatii si probleme, Ed. UTPRES, 2008

To be done: The aim of this laboratory is the analysis of the word-lengtheffects in representing numerical values on systems performances, in differentstructures. Finite-word-length effects report on quantization consequencesthat are present in the digital implementations of systems, either in hardwareor in software. We want to analyze the round-off quantization effects todigital filters. Theoretical aspects regarding quantization of digital filterscoefficients are illustrated in Chapter 5: Cuantizarea coeficientilor filtrelor

digitale, paragraphs 5.1, 5.1.1-5.1.3 (pp. 169-174). The round-offquantization effects in digital filters are illustrated in the paragraph 5.1.4 (pp.174-184). The MATLAB functions used in this laboratory are described inthe paragraph 5.2 (pg. 185-187). Run scripts 5.3.1÷5.3.13 (you can find the

MATLAB examples in Lab13 DSP Examples as: L13 1÷L13 13).

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 42 / 44

Page 43: DSP Laboratory Guide 20feb2012

Laboratory 13

Exercises1 Next IIR systems are considered:

H1(z) =1− 2 cos 2π

6z−1 + z−2

1− 1.4 cos 2π6

z−1 + 0.49z−2·

1− 2 cos 2π4

z−1 + z−2

1− 1.2 cos 2π4

z−1 + 0.36z−2;

H2(z) =0.5 + 0.2z−1 − 0.3z−2 + 0.1z−3 + z−4

1 + 0.1z−1 − 0.3z−2 + 0.2z−3 + 0.5z−4;

Determine the numerator’s and denominator’s coefficients and sketch thepole-zero diagram and the frequency response characteristics;For the direct form quantize (using truncation) the transfer function coefficientson 15, 8 and 4 bits. Note the values obtained for each case;1. Sketch the pole-zero diagram and the frequency response characteristics forthe transfer functions with quantized coefficients;2. Compare the frequency response characteristics of the filters withunquantized coefficients with those with quantized coefficients. How many bitsare necessarily for the coefficients’ representation such that this limitation donot affect much the magnitude characteristic?Determine the parallel form of the given transfer functions;1. Quantize the coefficients of each function from the structure on 15, 8 and 4bits. Note the values obtained for each case;2. Evaluate the global transfer function summing all the transfer functions withquantized coefficients and plot the global frequency response and compare theresults with the one previously obtained;

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 43 / 44

Page 44: DSP Laboratory Guide 20feb2012

Laboratory 13

Determine the cascade form of the given transfer functions;1. Quantize the coefficients of each function from the structure on 15, 8 and 4bits. Note the values obtained for each case;2. Evaluate the global transfer function multiplying all the transfer functionswith quantized coefficients;3. Sketch the pole-zero diagram and the global frequency response andcompare the results with the one obtained for the direct form;

Determine the lattice structure of the given transfer functions;1. Quantize the coefficients of each function from the structure on 15, 8 and 4bits. Note the values obtained for each case;2. Evaluate the global transfer function and plot the pole-zero diagram and theglobal frequency response; compare the results with the one previously obtained.

2 Redo example L13 12, for L∞ and L1 norms. What can you notice?3 Redo example L13 13, for L∞ and L2 norms. What can you notice?

Laboratory Guide (sp.utcluj.ro) Digital Signal Processing 3rd Year AE 44 / 44