Adsp Ws1415 Exercises

  • Upload
    stephan

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

  • 7/25/2019 Adsp Ws1415 Exercises

    1/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Initial Remarks

    Sebastian Rohde

    Digital Signal Processing and System Theory (DSS)Office: Audio LabPhone: 0431 880-6141e-mail: [email protected],Office hours: Vary. Please make an appointment by email!

    Course of the Exercise

    youll get hand-outs with problems and we recommend you tosolve them at home as preparation for the exam

    the solutions to the problems will be presented in the exercises

    at any time you can ask your questions on the material

    Exams

    see information in the lecture

    Literature

    see information in the lecture

    For updates and downloads please visit the course webpage

    http://www.dss.tf.uni-kiel.de/teaching/lecture/teaching_lectures.htmland click on Further details in the ADSP section.

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.deAdvanced Digital Signal Processing, Exercises WS 2014/2015

    http://www.dss.tf.uni-kiel.de/teaching/teaching_lectures.htmlhttp://www.dss.tf.uni-kiel.de/teaching/teaching_lectures.html
  • 7/25/2019 Adsp Ws1415 Exercises

    2/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Notation

    Symbol Meaning/Usage

    t Continuous time variable

    n Discrete time variable

    0(t) Continuous time impulse signal

    0(n) Unit impulse signal (discrete)

    1(n) Unit step signal (discrete)

    Analog frequency in radians per second

    = 2/T

    T Sampling period in seconds

    f Analog frequency in Hz

    fs Sampling frequency in Hz

    Digital frequency in radians

    = 2f/fs

    v(t) V(j) Continuous Time Fourier transform

    v(n) V(ej) Discrete Time Fourier Transform

    v(n) V() Discrete Fourier Transform

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

  • 7/25/2019 Adsp Ws1415 Exercises

    3/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 1 (relationship between continuous and discrete signals)

    A complex-valued continuous-time signal va(t) has the Fourier transform shown in figure1. This signal is sampled to produce the sequence v(n) =va(nT).

    Va(j)

    0 1 2

    Figure 1: Fourier transform ofva(t)

    (a) Sketch the Fourier transformV(ej) of the sequence v(n) for T = 2 .

    (b) What is the lowest sampling frequency that can be used without incurring anyaliasing distortion, i.e. so that va(t) can be recovered from v(n)?

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    1

  • 7/25/2019 Adsp Ws1415 Exercises

    4/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 2 (overall system for filtering a continuous-time signal in digital

    domain)Figure2 shows an overall system for filtering a continuous-time signal using a discrete-time filter. The frequency response of the ideal reconstruction filter Hr(j) and thediscrete-time filter are shown below.

    va(t)

    p(t) =

    n= 0(tnT)

    vi(t)

    Convert fromimpulse train

    to discrete-timesequence

    v(n)H(ej)

    Convert to

    impulse trainyi(t)

    Hr(ej)

    yr(t)

    Hr(ej)

    5105

    2104

    H(ej)

    /4 /4

    y(n)

    Figure 2: Overall system.

    (a) ForVa(j) as shown in figure3 and 1/T = 20kH z sketch Vi(j) and V(ej).

    Va(j)1

    2104 2104

    Heff(j)

    c c

    Figure 3: Spectrum ofVa(j) andHeff(j)

    For a certain range of values of T, the overall system, with inputva(t) and outputyr(t), isequivalent to a continuous-time lowpass filter with frequency response H

    eff(j) sketched

    in figure3.

    (b) Determine the range of values ofT for which the information presented above istrue, when Va(j) is bandlimited to|| 2104 as shown in figure3.

    (c) For the range of values determined in (b), sketch c as a function of 1/T.

    Note: This is one way of implementing a variable-cutoff continuous-time filter using fixedcontinuous-time and discrete-time filters and a variable sampling rate.

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    2

  • 7/25/2019 Adsp Ws1415 Exercises

    5/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 3 (quantization)

    A sinusoid signalv(n) = 5sin(0s n) withf= 5 Hz and fs= 10 kHz has to be quantized(vq= Q[v(n)]) with a midtreat quantizer. The range of the signal is5 V and the wordlength of the quantizer 4 bits. The quantizer at digital full scale.

    (a) How many quantization levelsL does the quantizer have? What is the value of ?

    (b) Sketch the input-output characteristic of the quantizer. How different is a midtreatquantizer to a midrise quantizer.

    (c) For time indexn= 1250 calculate the quantized value vq(n), the quantization error

    eq(n) and representvq(n) using bipolar code (sign and magnitude representation).

    The quantization error over time can be modeled as a noise that is added to the inputsignal.

    (d) Sketch the real system and the mathematical model of the system with the addedquantization noise.

    (e) Calculate the power Pn of the quantization noise.

    (f) Determine the SNR in dB and in linear scale.

    The signals amplitude is changed to1 V, while the range R of the quantizer remainsthe same as before.

    (g) How is SNR affected with this change?

    (h) What world length has to be chosen to achieve an SNR > 45 dB?

    Problem 4 (DFT and convolution)

    Leth(n) be the sequence{1, 1, 0, 0, 0, 0, 0, 0} and y (n) ={1, 1, 1, 1, 0, 0, 0, 0}.(a) Calculate the DFT of length 8 for both sequences.

    (b) Determine with help of the DFT a sequence v(n) such that y(n) =h(n) 8 v(n).(c) Letz(n) be the result of the linear convolution ofh(n) andv(n): z(n) =h(n)v(n).

    Is z (n) =y(n)?

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    3

  • 7/25/2019 Adsp Ws1415 Exercises

    6/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 5 (DFT)

    The time-limited signal

    v0(t) =

    sin(0t) f or 0t

  • 7/25/2019 Adsp Ws1415 Exercises

    7/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    (h) Sketchva(t), v(n), the Fourier transform V(ej) and the DFT VM() for L = 15

    and M= 30 (zero padding).

    Problem 7 (FFT)

    Letv (n) be a time-discrete signal

    v(n) = [v(0), v(1), v(2), v(3), v(4), v(5), v(6), v(7)].

    (a) Separate the signal v(n) into even and odd time-indices v1(n) and v2(n) respectivelyand find the DFT expression for each separated sequence.

    (b) Now compute the DFT ofv(n) using the above expressions.

    (c) Sketch the signal flow diagrams when DFT is directly applied tov(n) and as shownin part (b). Show the reduction in complexity by computing the number of complexmultiplications for each method.

    (d) Can the complexity be reduced further? If yes then find the final expression.

    (e) Sketch the complete signal flow for part (d).

    Problem 8 (FFT)

    The M-point DFT of the M-point sequence x(n) =e

    j(/M)n2

    , for Meven, is

    X() =

    M ej/4ej(/M)2

    .

    Determine the 2M-point sequence y(n) =ej(/M)n2

    , assuming that M is even.

    Problem 9 (FFT of real and complex sequences)

    Suppose that an FFT program is available that computes the DFT of a complex sequence.If we wish to compute the DFT of a real sequence, we may simply specify the imaginarypart to be zero and use the program directly. However, the symmetry of the DFT of areal sequence can be used to reduce the amount of computation.

    (a) Let x(n) be a real-valued sequence of length M, and let X() be its DFT withreal and imaginary parts denoted XR() andXI(), respectively; i.e.,

    X() =XR() +j XI().

    Show that ifx(n) is real, then XR() = XR(M) and XI() =XI(M)for = 1,...,M1.

    (b) Now consider two real-valued sequences x1(n) and x2(n) with DFTs X1() andX2(), respectively. Let g(n) be the complex sequence g(n) = x1(n) +j x2(n),

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    5

  • 7/25/2019 Adsp Ws1415 Exercises

    8/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    with corresponding DFT G() = GR() +j GI(). Also, let GOR(), GER(),GOI() and GEI() denote, respectively, the odd part of the real part, the evenpart of the real part, the odd part of the imaginary part, and the even part of the

    imaginary part ofG(). Specifically, for 1M1,GOR() = 1/2{GR() GR(M )},GER() = 1/2{GR() + GR(M )},GOI() = 1/2{GI() GI(M )},GEI() = 1/2{GI() + GI(M )},

    andGOR(0) =GOI(0) = 0, GER(0) =GR(0), GEI(0) =GI(0). Determine expres-sions for X1() andX2() in terms ofGOR(), GER(), GOI() andGEI().

    Problem 10 (signal flow graph)

    The signal flow graph in figure 4 describes the input-output relationship of v(k) andy(k).

    Figure 4: Signal flow graph of a filter

    Determine the differential equation, the transfer function H(z) = Y(z)V(z) and the impulse

    response h(k) of the system.

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    6

  • 7/25/2019 Adsp Ws1415 Exercises

    9/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 11 (signal flow graph)

    Show that the systems in figure5 are equivalent.

    Figure 5: Signal flow graph of two systems

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    7

  • 7/25/2019 Adsp Ws1415 Exercises

    10/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 12 (round-off effects in digital filters)

    The flow graph of a first-order system is shown in figure 6

    Figure 6: First order system

    (a) Assuming infinite-precision arithmetic, find the response of the system to the input

    v(n) =

    .5 for n00 for n

  • 7/25/2019 Adsp Ws1415 Exercises

    11/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 13 (round-off effects in digital filters)

    Determine the variance of the round-off noise at the output of the two cascade realizationsof the filter with system function

    H(z) =H1(z) H2(z) (1)H1(z) =

    1

    10, 5z1 , H2(z) = 1

    10, 25z1 (2)

    v(n)

    v(n)

    y(n)

    y(n)

    1/2

    1/2

    1/4

    1/4

    e1(n)

    e1(n)

    e2(n)

    e2(n)

    z1z1

    z1z1

    Figure 8: Two cascaded realizations of filters H1(z) and H2(z).

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    9

  • 7/25/2019 Adsp Ws1415 Exercises

    12/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 14 (filter design)

    Determine the unit sample response hi of a linear-phase FIR filter of length L = 4 forwhich the amplitude frequency responseH0() at = 0 and = /2 is specified as

    H0(0) = 1, H0(/2) = 1/2.

    Problem 15 (filter design)

    An ideal discrete-time Hilbert transformer is a system that introduces/2 radians ofphase shift for 0< < and /2 radians of phase shift for

  • 7/25/2019 Adsp Ws1415 Exercises

    13/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    (d) What is the delay of the system ifL = 21? Sketch (use matlab) the magnitudeof the frequency response of the FIR approximation for this case, assuming arectangular window.

    (e) What is the delay of the system ifL = 20? Sketch (use matlab) the magnitudeof the frequency response of the FIR approximation for this case, assuming arectangular window.

    Problem 16 (filter design)

    Consider a type III linear-phase FIR filter with an amplitude response given by

    H03() = 2S1i=0

    hisin((S i)).

    with Sas in the lecture. This equation can be rewritten as

    H03() =Si=1

    c(i) sin(i).

    Show that if the amplitude response is symmetric, i.e., H03() =H03(), then theeven-indexed impulse response samples hi are zero, ifS is even.

    Problem 17 (filter design)

    Digital filter specifications are often given in terms of the loss function,Hl() =20log10(|H(ej)|), in dB. In this problem the peak passband ripple p andthe minimum stopband attenuation s are given in dB, i.e., the loss specifications of thedigital filter are given by

    p = 20log10(1 1)dB,

    d = 20log10(2)dB.(a) Estimate the order of an optimal equiripple linear-phase lowpass FIR filter with the

    following specifications: passband edgeFp = 1.8kH z, stopband edge Fs = 2kH z,p= 0.1dB, s = 35dB, and sampling frequency FT = 12kH z.

    The estimation formula can also be used to estimate the length of highpass, bandpass,and bandstop optimal equiripple FIR filters. Then the width of the smallest transitionband is used to estimate the filter order.

    (b) Estimate the order of an optimal equiripple linear-phase bandpass FIR filter with

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    11

  • 7/25/2019 Adsp Ws1415 Exercises

    14/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    the following specifications: passband edges Fp1 = 0.35kH z and Fp2 = 1kH z,stopband edges Fs1= 0.3kH z and Fs2 = 1.1kH z, passband ripple 1 = 0.002,stopband ripple 2= 0.001, and sampling frequency FT = 10kH z.

    Problem 18 (Digital IIR Filter Design)

    The system function of a discrete-time system is

    H(z) = 2

    1 e0.2z1 1

    1 e0.4z1 .

    (a) Assume that this discrete-time filter was designed by the impulse invariance methodwith T= 2, i.e. hi=ha(iT), where ha(t) is real. Find the system function Ha(s)of a continuous-time filter that could have been the basis for the design. Is youranswer unique? If not, find another system function Ha(s).

    (b) Assume that H(z) was obtained by the bilinear transform with T = 2. Find thesystem functionHa(s) that could have been the basis for the design. Is your answerunique? If not, find another Ha(s).

    Problem 19 (Digital IIR Filter Design)

    A discrete-time lowpass filter is to be designed by applying the impulse invariance methodto a continuous-time Butterworth filter having magnitude-squared function

    |H(j )|2 = 11 + ( cut )

    2N

    The specifications for the discrete-time signal are

    0.89125 |H(ej)| 1, 0 || 0.2,|H(ej)| 0.17783, 0.3 || .

    Assume that aliasing will not be a problem, i.e., design the continuous-time Butterworthfilter to meet passband and stopband specifications as determined by the discrete-timefilter.

    (a) Sketch the tolerance bounds on the magnitude of the frequency response,|H(j )|,of the continuous-time Butterworth filter such that after application of the impulseinvariance method, the resulting discrete-time filter will satisfy the given designspecifications. Do not assume that T = 1.

    (b) Determine the integer orderNand the quantity cutTsuch that the continuous-

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    12

  • 7/25/2019 Adsp Ws1415 Exercises

    15/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    time Butterworth filter exactly meets the specifications determined in part (a) atthe passband edge.

    Problem 20 (Digital IIR Filter Design)

    Filter C is a stable continuous-time IIR-filter with system function H(s). Filter B isa stable discrete-time filter with system function H(z). Filter B is related to Filter Cthrough the bilinear transformation. Is it possible that filter B is an FIR-filter? Explainyour answer.

    Problem 21 (Digital IIR Filter Design)

    A digital lowpass filter is required to meet the following specifications:Passband ripple: 1dBPassband edge: 40HzStopband attenuation: 40dBStopband edge: 60HzSample rate: 240Hz

    The filter is to be designed by performing a bilinear transformation on an analog systemfunction. Determine what order Butterworth, Chebyshev, and Elliptic analog designmust be used to meet the specifications in the digital implementation. Use a table in amathematical handbook to solve the elliptic integrals. Show that for the Butterworth

    design the estimation formula for the filter order N (slide (4.129) in the lecture) can bewritten as

    N = log(/)

    log(s/p)

    with =

    1/221. The figure shows the characteristical parameters for the givenspecifications.

    Problem 22 (multirate digital signal processing)

    Consider the system shown in the figure. For each of the following input signals x(n),indicate whether the output y (n) =x(n).

    (a) x(n) =cos(n/4)

    (b) x(n) =cos(n/2)

    (c) x(n) = (sin(n/8)n )2

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    13

  • 7/25/2019 Adsp Ws1415 Exercises

    16/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    1

    11+2

    p s

    |H(ej)|2

    22

    1

    x(n) y(n)3 3

    H(ej)

    H(ej)

    3 3

    Problem 23 (multirate digital signal processing)

    Consider the systems shown in the figure. Suppose that H1(ej) is fixed and known.

    Find H2(ej), the frequency response of an LTI system, such that y2(n) =y1(n), if the

    inputs to the systems are the same.

    x(n)

    x(n) y1(n)

    y2(n)

    2 2H1(ej)

    H2(ej)

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015

    14

  • 7/25/2019 Adsp Ws1415 Exercises

    17/17

    TECHNICAL FACULTY,CHRISTIAN-ALBRECHTS-UNIVERSITYOF KIEL

    DIGITALSIGNAL PROCESSING AND

    SYSTEM THEORY

    Problem 24 (multirate digital signal processing)

    The system shown in the figure approximately interpolates the sequencex(n) by a factor

    L. Suppose that the linear filter has impulse response h(n) such thath(n) =h(n) andh(n) = 0 for|k| > RL1, where R and L are integers; i.e., the impulse response issymmetric and of length 2RL 1 samples.

    x(n) y(n)L v(n) H(ej)

    (a) In answering the following, do not be concerned about causality of the system; it

    can be made causal by including some delay. Specifically, how much delay mustbe inserted to make the system causal?

    (b) What conditions must be satisfied by h(n) in order that y(n) = x(n/L) forn= 0, L, 2L, 3L , . . . ?

    (c) By exploiting the symmetry of the impulse response, show that each sample ofy(n) can be computed with no more than RL multiplications.

    (d) By taking advantage of the fact that multiplications by zero need not to be done,show that only 2R multiplications per output sample are required.

    Problem 25 (multirate digital signal processing)

    Consider the noninteger sampling rate conversion in the figure. Develope step by stepan efficient structure for the sampling rate conversion, where most calculations are donein the lowest possible sampling rate.

    X(z)Y(z) 3 2G(z)

    Digital Signal Processing and System Theory, Prof. Dr.-Ing. Gerhard Schmidt, www.dss.tf.uni-kiel.de

    Advanced Digital Signal Processing, Exercises WS 2014/2015