Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 -...

15
Spring 2015 ME579 - Final - 1 - Fourier Methods in Digital Signal Processing Final Exam ME 579, Spring 2015 Instructions for this CLOSED BOOK EXAM 2 hours long. Monday, May 8th, 8-10am in ME1051 Answer FIVE Questions, at LEAST ONE from each section. Allow just over 20 minutes per question. No calculators, nor any other electronic devices allowed. No crib sheets allowed. Allowed: pencil, straight edge, eraser. Additional paper is provided by the exam proctor. Write on one side of the paper only. Use a ruler/straight edge when drawing graphs. Label graphs as fully as possible including label axes and units and clearly indicating location and values of important features. Show all workings so it is clear where your answer came from. On completion: Leave exam at the front of the class with exam proctor. Make sure you solution is in order, and sheets paper-clipped or stapled together. Leave room quickly and quietly, so that people still working on the exam are not disturbed. NAME ____________________________ I certify that all the work in this examination that I am turning in for grading is my own work, and I have not copied or received information from anyone, or from prepared notes, books or texts, electronic or in other forms (paper, voice, etc.), during this exam. I have not used any electronic storage and communications devices to help me during this exam. Signed:_______________________________ Of your 5 questions, there must be at least one from each section Identify the 5 problems you want to be graded. Max Score Your Score Section 1 PROB 1 20 Section 1 PROB 2 20 Section 2 PROB 3 20 Section 2 PROB 4 20 Section 2 PROB 5 20 Section 3 PROB 6 20 Section 3 PROB 7 20 Total 100

Transcript of Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 -...

Page 1: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 1 -

FourierMethodsinDigitalSignalProcessing

FinalExamME579,Spring2015

InstructionsforthisCLOSEDBOOKEXAM2hourslong.Monday,May8th,8-10aminME1051AnswerFIVEQuestions,atLEASTONEfromeachsection.Allowjustover20minutesperquestion.Nocalculators,noranyotherelectronicdevicesallowed.Nocribsheetsallowed.Allowed:pencil,straightedge,eraser.Additionalpaperisprovidedbytheexamproctor.Writeononesideofthepaperonly.Usearuler/straightedgewhendrawinggraphs.Labelgraphsasfullyaspossibleincludinglabelaxesandunitsandclearlyindicatinglocationandvaluesofimportantfeatures.Showallworkingssoitisclearwhereyouranswercamefrom.

Oncompletion: Leaveexamatthefrontoftheclasswithexamproctor.Makesureyousolutionisinorder,andsheetspaper-clippedorstapledtogether.Leaveroomquicklyandquietly,sothatpeoplestillworkingontheexamarenotdisturbed.

NAME ____________________________

I certify that all the work in this examination that I am turning in for grading is my own work, and I have not copied or received information from anyone, or from prepared notes, books or texts, electronic or in other forms (paper, voice, etc.), during this exam. I have not used any electronic storage and communications devices to help me during this exam.

Signed:_______________________________

Of your 5 questions,

there must be at least one from each

section

Identify the 5 problems you want to be graded.

Max Score

Your Score

Section 1 PROB 1 20

Section 1 PROB 2 20

Section 2 PROB 3 20

Section 2 PROB 4 20

Section 2 PROB 5 20

Section 3 PROB 6 20

Section 3 PROB 7 20

Total 100

Page 2: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 2 -

PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the frequency domain definition of the power spectral density (average distribution of signal power

across frequency), Sxx(f), where x(t) is a zero-mean, weakly stationary random process whose units are Volts. Be precise in this definition including defining XT(f).

(b) Describe how you would estimate the power spectral density from a single time history that is T seconds long by using segment averaging? Include some discussion on windowing, overlap and power compensation.

(c) A Chi-squared random variable with n degrees of freedom is defined as,

χn2 = P1

2 + P22 + P3

2 + ......+ Pn2 = Pi

2

i=1

n∑

where the Pi are independent, zero mean, Gaussian distributed random variables, each with a standard deviation (as well as the variance and mean square value because the mean is 0) equal to 1, i.e., the Pi are N(0,1) distributed.

(i) What is the mean of χn2 , i.e., E χn

2!"#

$%&?

(ii) What is the mean square value of χn2 , i.e., what is E χn

2( )2!

"#

$

%& ? [Note E[ Pi

4 ] = 3.]

(iii) Thus what is the variance of χn2 .

(d) 2.Nseg. Sxx ( f )Sxx( f )

!

"#

$

%& is distributed as χ2.Nseg

2 . What is the variance of Sxx ( f ) , the smoothed estimate of the

power spectral density generated from averaging Nseg raw estimates of the power spectral density.

(e) Explain why making improvements in bias errors works against making improvements in variance when you estimate the power spectral density from a finite length signal. SOLUTION

Page 3: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 3 -

Page 4: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 4 -

PROBLEM No. 2– Random, Weakly Stationary Signals, Linear Time Invariant Systems. Consider the following two-input, one-output system. x1(t) and x2(t) are zero-mean, weakly stationary, random processes that may be correlated with one another, i.e., they may not be independent random processes. G and H are linear time-invariant systems. Everything is operating at steady state.

y(t) = y1(t)+ y2(t) = h(t) * x1(t)+ g(t) * x2(t);

YT ≈ H ( f ).X1T ( f )+G( f ).X2T ( f ).

(a) Write down the convolution y1(t) = h(t)*x1(t) in its full integral form, where the variable in the integral that contains t is x1. Use this to show that E[y1(t)] is zero, where E[.] means average value of.

(b) Starting with the definition of Rx1y1 (τ ) = E[x1(t)y1(t +τ )] , derive the following relationship:

Rx1y1(τ )= h(τ1)Rx1x1

(τ −−∞

∫ τ1)dτ1.

(c) Derive expressions for Sx1y and Sx2y in terms of H(f), G(f), Sx1x1 , Sx1x2 and Sx2x2

[You should give a detailed derivation of the Sx1y calculation and then, if you wish, you can just write

down the result for Sx2y .]

(d) How would you find G and H if you had measurements of x1(t), x2(t) and y(t). Here assume x1(t) and x2(t) are correlated. No need to do it, just explain how you would do it.

(e) Assume now that x1(t) and x2(t) are uncorrelated. The input signal you have is x1(t) and the output signal you have is y(t). If we can assume that the estimates of Sx1y , Sx1x1 and Syy are very accurate

(bias and variance errors are small), would the H1 estimate or the H2 estimate of H(f) be better?

SOLUTION

x1(t)

x2(t)

h(t),H(f)

g(t),G(f)

y(t)

y1(t)

y2(t)

Page 5: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 5 -

Page 6: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 6 -

PROBLEM No. 3 – z-transforms, Spectra of Digital Signals, Digital systems

(a) Calculate the z transform of the following digital signal:

xn = (2)n for n < 0;

xn = (0.5)n for n ≥ 0.

Draw the pole-zero map, and indicate the region of convergence. (b) A digital system that is being used to differentiate a signal is described by the following difference

equation:

where xn are the input samples, yn are the output samples and Δ is the sampling interval in seconds. (i) What is the frequency response of this digital system? (ii) The frequency response of an ideal continuous-time differentiator is H ( j2π f ) = j2π f . Show (mathematically) why the digital filter works well at low frequencies, i.e., by low we mean low compared to the sampling rate so that f.Δ is small.

(c) A causal digital system has a transfer function given by:

H (z) = 1+ z−2

1+0.99z−2, | z |> 0.99.

(i) What is the difference equation relating yn to previous values of the output and current and previous values of the input? (ii) Describe how would you use this difference equation to generate the impulse response of this system?

SOLUTION

yn =xn+1− xn−12Δ

Page 7: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 7 -

Page 8: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 8 -

PROBLEM No. 4 - FIR Filter Design A continuous system that is a zero-phase, low-pass filter has a frequency response:

H(f) = G(f)*P(f) where * denotes convolution. where: G(f) = 1 for | f | < 105 Hz and is zero elsewhere; and P(f) = 0.1 for | f | < 5 Hz and is zero elsewhere. [ Note, recall that if Q(f) = A for | f | < B/2, and is zero at all other frequencies, q(t)=A.B sinc(πBt). ] (a) Sketch H(f). Annotate fully.

(b) What is the relationship between h(t), g(t) and p(t), the inverse Fourier transforms of H(f), G(f) and P(f), respectively? Thus, what is the impulse response of this continuous-time filter?

(c) Describe, using Method 1 (as described in class), how you would design a 63 point finite impulse response (FIR) zero-phase digital low-pass filter, with characteristics similar to the continuous filter H(f) described above, for signals with a sample rate of 1000 Hz.

(d) How would you obtain a detailed, finely resolved picture of the frequency response of this filter?

(e) What features are you looking for in the impulse response and the frequency response to determine if the filter will work well.

(f) If the digital filter does not have all the features that you require for it to work well, how would you alter the design (still using Method 1) so that it is better.

SOLUTION

Page 9: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 9 -

Page 10: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 10 -

PROBLEM No. 5 - IIR Digital Filter Design

(a) Why is a bilinear transform: s = 2Δ1− z−1

1+ z−1 used more often to map a continuous filter design into a digital

filter design, than an impulse invariant mapping? Recall that an impulse invariant mapping is when the impulse response of the continuous system design is sampled and scaled by Δ and the transfer function of the digital filter is the z-transform of the scaled and sampled impulse response.

(b) What is pre-warping and when is it done in IIR filter design? Give details of the pre-warping procedure. (c) A continuous-time Butterworth low-pass filter has a transfer function H(s) where

H (s)H (−s) = 1

1+ sj2π fc

"

#$$

%

&''

2N

where N is the filter order and fc is the cut-off frequency in Hz (3dB down point in the filter gain in dB). If N=2, where in the s-plane are the poles of H (s)H (−s) , and which of these are the poles of H(s)?

(d) If the continuous-time design was just a first order filter: H (s) = 1

1+ sωc

!

"##

$

%&&

,

what is the transfer function of the digital filter? Remember to put it in its standard form.

(e) Why are there sometimes stability issues with high order digital Butterworth filters?

SOLUTION

H (z) = H1.H2.H3.....HN =b0 +b1z

−1+b2z−2 + ....+bN z

−N

1+ a1z−1+ a2z

−2 + ....+ aN z−N.

Page 11: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 11 -

Page 12: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 12 -

PROBLEM No. 6 – Fourier Transforms, Windowing and Convolution A signal is described over region –0.5T to +0.5T to be:

p(t) = 2cos 2π tT

!

"#

$

%& Volts.

Consider the following signals that are related to p(t):

(1) Periodic signal: x(t) = p(t) for |t| ≤ 0.5T, and x(t) = x(t+qT) for any integer q. (2) Transient signal: y(t) = p(t) for |t| ≤ 0.5T, and y(t) = 0 elsewhere. Note that y(t)=x(t).wT(t) where wT(t) is a rectangular window of height 1 and width T centered on t=0 seconds.

(3) Transient signal: q(t) = y(t) + y(t-T) + y(t+T) = x(t).w3T(t) where w3T(t) is a rectangular window of height 1 and width 3T centered on t=0 seconds.

(a) Sketch all three signals: x(t), y(t) and q(t). (b) Derive the Fourier Transform of x(t) using the property of the dirac delta function:

(c) Show how a delay of a signal, s(t), of t0 seconds affects the Fourier Transform of the signal?

To do this, set m(t)=s(t-t0) and derive the relationship between M(f) and S(f). (d) Using your result in part (c), derive the relationship between Q(f) and Y(f) (the Fourier transforms of

signals (3) and (2) described above, respectively) and express Q(f) in the form Y(f).[…..]. Simplify the expression you come up with in the square brackets as much as possible.

(e) What is δ(f-f0)*W(f), where * denotes convolution, and W(f) is some function of frequency?

(f) What does 3T sinc π ( f −1/T )3T( )+3T sinc π ( f +1/T )3T( )T sinc π ( f −1/T )T( )+T sinc π ( f +1/T )T( )

simplify to?

SOLUTION

e± j2π ( f −r)t dt = δ( f − r)−∞

Page 13: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 13 -

Page 14: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 14 -

PROBLEM No. 7 – Sampling and Discrete Signals and Systems (a) Write down the formula for the Discrete Fourier Transform (Xk) of finite length sequence (sampled

signal): xn, n=0, 1, 2, …N-1? What frequency goes with each Xk?

(b) What is the relationship between the z-transform of the finite length sequence in part (a) and the Discrete Fourier Transform of this finite length sequence?

(c) If you wanted to examine the spectrum of the N-point sampled signal at frequencies fs/8192 Hz where N << 8192, how would you do it efficiently?

(d) The Fourier transform of a signal: p(t) = A exp(-αt) for t ≥ 0, and p(t) = 0 for t < 0, is

P( f ) = Aj2π f +α

.

If this spectrum was sampled every 0.5 Hz, what would happen in the time-domain as a result of this sampling in the frequency domain? You may assume that α is large enough that the signal dies away quickly in the time domain and is very small after 0.5 seconds. Sketch the inverse Fourier transform of the sampled spectrum.

(e) hn and xn are two sequences both 64 points long. yn is the result of convolving hn and xn. A student decides to do the convolution in time via the frequency domain using a fast algorithm for computing the DFTs and IDFT. In his Matlab program, after defining xn and hn and their start times xstart and hstart, respectively the student writes: …… Yk=fft(hn,64).*fft(xn,64); yn=ifft(Yk); yn=real(yn); tn=hstart + xstart + (0:length(yn)-1)/fs; plot(tn,yn)

Explain why the result will be wrong? What should the student have done? (f) Convolve the following two sequences, both start at t=0. The sample rate is 1 sample/second. xn: 1,1,1,1,1,1, 0, 0, …..; hn: 0.5, 0.5, 0 , 0, …. Plot the result. SOLUTION

Page 15: Fourier Methods in Digital Signal Processing Final Exam ME ...Spring 2015 ME579 - Final - 2 - PROBLEM No. 1 – Spectral Densities, Statistics and Estimation of Spectra (a) Give the

Spring 2015 ME579 - Final

- 15 -