EECS 452 Practice Midterm Exam Solutions Fall 2014

Similar documents
EECS 452 Midterm Exam Winter 2012

EECS 452 Midterm Exam (solns) Fall 2012

EECS 452 Midterm Closed book part Winter 2013

The University of Texas at Austin Dept. of Electrical and Computer Engineering Midterm #1

Team proposals are due tomorrow at 6PM Homework 4 is due next thur. Proposal presentations are next mon in 1311EECS.

Final Exam Solutions June 14, 2006

The University of Texas at Austin Dept. of Electrical and Computer Engineering Final Exam

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Improving Signal Quality 3 24 Filter Bank Design 4 24 Potpourri Total 100

y(n)= Aa n u(n)+bu(n) b m sin(2πmt)= b 1 sin(2πt)+b 2 sin(4πt)+b 3 sin(6πt)+ m=1 x(t)= x = 2 ( b b b b

Problem Point Value Your score Topic 1 28 Filter Analysis 2 24 Filter Implementation 3 24 Filter Design 4 24 Potpourri Total 100

Electrical & Computer Engineering Technology

Discrete Fourier Transform, DFT Input: N time samples

Signal Processing Summary

PROBLEM SET 6. Note: This version is preliminary in that it does not yet have instructions for uploading the MATLAB problems.

Signals. Continuous valued or discrete valued Can the signal take any value or only discrete values?

Laboratory Assignment 4. Fourier Sound Synthesis

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

CS3291: Digital Signal Processing

Discrete Fourier Transform (DFT)

Final Exam. EE313 Signals and Systems. Fall 1999, Prof. Brian L. Evans, Unique No

HW 1 is due on tuesday. PPI is due on Thurs ( to hero by 5PM) Lab starts next week.

ECE 5650/4650 Exam II November 20, 2018 Name:

SMS045 - DSP Systems in Practice. Lab 1 - Filter Design and Evaluation in MATLAB Due date: Thursday Nov 13, 2003

Subtractive Synthesis. Describing a Filter. Filters. CMPT 468: Subtractive Synthesis

DSP Based Corrections of Analog Components in Digital Receivers

Lab 4 Digital Scope and Spectrum Analyzer

Final Exam Solutions June 7, 2004

Lecture 17 z-transforms 2

EE 403: Digital Signal Processing

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

EC6502 PRINCIPLES OF DIGITAL SIGNAL PROCESSING

Project 2. Project 2: audio equalizer. Fig. 1: Kinter MA-170 stereo amplifier with bass and treble controls.

B.Tech III Year II Semester (R13) Regular & Supplementary Examinations May/June 2017 DIGITAL SIGNAL PROCESSING (Common to ECE and EIE)

FFT Analyzer. Gianfranco Miele, Ph.D

DSP Laboratory (EELE 4110) Lab#10 Finite Impulse Response (FIR) Filters

Final Exam Practice Questions for Music 421, with Solutions

(i) Understanding of the characteristics of linear-phase finite impulse response (FIR) filters

Project 2 - Speech Detection with FIR Filters

1. In the command window, type "help conv" and press [enter]. Read the information displayed.

EE 470 Signals and Systems

Concordia University. Discrete-Time Signal Processing. Lab Manual (ELEC442) Dr. Wei-Ping Zhu

6.02 Practice Problems: Modulation & Demodulation

f o Fig ECE 6440 Frequency Synthesizers P.E. Allen Frequency Magnitude Spectral impurity Frequency Fig010-03

Digital Processing of Continuous-Time Signals

Signal Processing. Naureen Ghani. December 9, 2017

Signal Processing for Speech Applications - Part 2-1. Signal Processing For Speech Applications - Part 2

FX Basics. Filtering STOMPBOX DESIGN WORKSHOP. Esteban Maestre. CCRMA - Stanford University August 2013

Suggested Solutions to Examination SSY130 Applied Signal Processing

ECE 429 / 529 Digital Signal Processing

Digital Processing of

Design IIR Filters Using Cascaded Biquads

Lecture 3 Review of Signals and Systems: Part 2. EE4900/EE6720 Digital Communications

Outline. EECS 3213 Fall Sebastian Magierowski York University. Review Passband Modulation. Constellations ASK, FSK, PSK.

ECE503: Digital Filter Design Lecture 9

ECE438 - Laboratory 7a: Digital Filter Design (Week 1) By Prof. Charles Bouman and Prof. Mireille Boutin Fall 2015

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

Data Acquisition Systems. Signal DAQ System The Answer?

1. Find the magnitude and phase response of an FIR filter represented by the difference equation y(n)= 0.5 x(n) x(n-1)

SCUBA-2. Low Pass Filtering

Multirate DSP, part 3: ADC oversampling

ASN Filter Designer Professional/Lite Getting Started Guide

The Case for Oversampling

E Final Exam Solutions page 1/ gain / db Imaginary Part

Topic 2. Signal Processing Review. (Some slides are adapted from Bryan Pardo s course slides on Machine Perception of Music)

APPLIED SIGNAL PROCESSING

ece 429/529 digital signal processing robin n. strickland ece dept, university of arizona ECE 429/529 RNS

Signal processing preliminaries

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

ELT COMMUNICATION THEORY

AN2182 Application note

DSP First. Laboratory Exercise #7. Everyday Sinusoidal Signals

Problem Point Value Your score Topic 1 28 Discrete-Time Filter Analysis 2 24 Upconversion 3 30 Filter Design 4 18 Potpourri Total 100

zt ( ) = Ae find f(t)=re( zt ( )), g(t)= Im( zt ( )), and r(t), and θ ( t) if z(t)=r(t) e

Design of FIR Filters

Signals and Filtering

Summary Last Lecture

Multirate Digital Signal Processing

6 Sampling. Sampling. The principles of sampling, especially the benefits of coherent sampling

Design of Bandpass Delta-Sigma Modulators: Avoiding Common Mistakes

UNIT II IIR FILTER DESIGN

Digital Signal Processing

ESE531 Spring University of Pennsylvania Department of Electrical and System Engineering Digital Signal Processing

LLRF4 Evaluation Board

UNIVERSITY OF SWAZILAND

Lecture 2 Review of Signals and Systems: Part 1. EE4900/EE6720 Digital Communications

F I R Filter (Finite Impulse Response)

Music 270a: Fundamentals of Digital Audio and Discrete-Time Signals

Basic Signals and Systems

PROBLEM SET 5. Reminder: Quiz 1will be on March 6, during the regular class hour. Details to follow. z = e jω h[n] H(e jω ) H(z) DTFT.

Filter Banks I. Prof. Dr. Gerald Schuller. Fraunhofer IDMT & Ilmenau University of Technology Ilmenau, Germany. Fraunhofer IDMT

145M Final Exam Solutions page 1 May 11, 2010 S. Derenzo R/2. Vref. Address encoder logic. Exclusive OR. Digital output (8 bits) V 1 2 R/2

Lecture 3, Multirate Signal Processing

Understanding Digital Signal Processing

Advanced Digital Signal Processing Part 2: Digital Processing of Continuous-Time Signals

Midterm 1. Total. Name of Student on Your Left: Name of Student on Your Right: EE 20N: Structure and Interpretation of Signals and Systems

DSP First Lab 08: Frequency Response: Bandpass and Nulling Filters

CMPT 318: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

Project I: Phase Tracking and Baud Timing Correction Systems

Continuous vs. Discrete signals. Sampling. Analog to Digital Conversion. CMPT 368: Lecture 4 Fundamentals of Digital Audio, Discrete-Time Signals

GEORGIA INSTITUTE OF TECHNOLOGY. SCHOOL of ELECTRICAL and COMPUTER ENGINEERING. ECE 2026 Summer 2018 Lab #8: Filter Design of FIR Filters

Transcription:

EECS 452 Practice Midterm Exam Solutions Fall 2014 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Points Section I /40 Section II /30 Section III /30 Total /100 NOTES: Open book, open notes. There are 8 pages including this one. Calculators are allowed, but no PDAs, Portables, Cell phones, etc. You have 120 minutes for the exam. Be sure to show work and explain what you ve done when asked to do so. You will not receive partial credit without showing work. Unless otherwise specified all signed numbers are two s complement numbers. 1

Section I -- Short answer 40 points 1) Convert the Hexadecimal value 0xC3 into base 10 assuming it is: [4] a) An unsigned binary number: 195 b) A 2 s complement number: -61 c) An unsigned Q6 number: 3.0469 d) A signed (two s complement) Q6 number -0.9531 2) A FIR filter has the impulse response shown below [6] a) Find and plot the magnitude and phase of this filter s transfer function? [3] H(z)=z -6-2z -7+ z -8 = z -7 (z+z -1-2). Therefore H(f)= e -j2π f 7 (e j2π f + e -j2πf -2)= e -j2π f 7 (2cos(2π f)-2)= 4sin 2 -j2π f 7+j (π f)e π Plot the magnitude 4sin 2 (π f) over f and see that it is a bandpass filter characteristic with zero magnitude at f=0 and f=1/2 Hz. Plot the magnitude over f and see that it is a bandpass filter characteristic with zero magnitude at f=0 and f=1/2 Hz. b) Is this filter linear phase? If so what is its group delay? [3] 2

Yes. The filter is linear phase since arg(h(f))=2π f 7+ π. Group delay is d/df (arg(h(f)))/2π=7, which can also be seen directly from the plot for h[n]. 3) If you add together the following Q7 two s complement numbers (without saturation) from left to right will there ever be overflow? If so when does it occur and will it affect the final result? Here is the addition: 0x81+0xFD+0x10. [3] 0x81+0xFD=10000001+11111101=01111110 (overflow) 0x81+0xFD+0x10=01111110+00010000=10001110 which is -0.8906 in decimal The result of adding these numbers in infinite precision (decimal) is also -0.8906; the same result as obtained above. Thus overflow did not affect the final result. This is simply confirmation of the two s complement overflow property discussed in Lecture 3. 4) A waveform is sampled using a sample rate of 48 khz. What is minimum size of the FFT required (minimum number of points in the FFT) to achieve a frequency spacing of less than 100Hz in the DFT spectrum of the samples? [6] The DFT analysis frequencies are Fs/N. Therefore Fs/N<100 implies that N>Fs/100=480 samples. Hence 512 would work. 5) A compensated quantizer has an input range from -8V to +8V. Assuming the signal amplitudes are distributed uniformly over any quantization interval, what is the minimum number of bits required to guarantee that the maximum quantization error is less than 0.01V? What are the fewest bits required to guarantee that the root mean squared quantization error is less than 0.01V? [6] The max quantization error is Delta/2 which (Lec 6) is given by 2Vref/2^{B} where Vref=8. Therefore for Delta/2<0.01V require: 2^{B}>8/0.01=800, or B>log2(800)-1=9.6. At least 10 bits are needed. The RMSQE is given by sqrt(delta^2/12)=\delta/2*sqrt(4/12)=delta/2 sqrt(1/3). Hence for this to be less than 0.01V we require (8/2^{B})sqrt(1/3) <0.01 or B> log2(800*sqrt(1/3)) =8.85. Hence require at least 9 bits. 3

6) In Lab 6 we needed to perform an FFT on collected audio data and collect audio data at the same time. How can we use interrupts and two buffers to help us perform FFTs on data without missing data samples? [5] We can use interrupts to collect data samples and store them in one of the buffers while using the other buffer as input to our FFT function. Then once the sample buffer is full we switch the two buffers. 7) Write the transfer function of the following filter. [5] This is an all zero filter. H(z)=Y(z)/X(z)= a+b z^{-1}+c z^{-2} 8) A filter has impulse response of the form form h[n]=(0.9) n for n=0,2,4 and h[n]=0 for n=1,3,5 Draw the pole zero constellation and classify the filter as to FIR vs IIR, LP vs HP vs BP vs BS (band stop). [5] The pole zero constellation has no zeros and two poles, one at -0.9 and one at 0.9. To see this find the transfer function from the Z-transform of h[n]: H(z)=Σn=0 infinity h[n] z -n =Σn=0 infinity h[2n] z -2n =Σn=0 infinity (0.81 z -2 ) n =1/(1-0.81 z -2 ) Where we have used the fact the h[2n+1]=0 and we have applied the geometric series formula. This is an IIR filter and it is neither a lowpass, highpass or bandpass. 4

Section II longer answers 30 points 1) Consider the discrete time signal x[n]= sin(2π f1 n+φ)+cos(2π f2 n- φ), n=0,,7. [10] a) What is the DFT of x[n] if φ=60 degrees, f1=1/8 and f2=1/4? Carefully plot the magnitude and phase being sure to label and quantify the ranges of the axes. [5] DFT is comprised of 8 frequencies total as it is N=8 point. f1 and f2 are equal to the DFT analysis frequencies 1/N and 2/N. Hence the DFT will have four non-zero components each having magnitude N/2 located at DFT indices (bins( 1,2,6,7. Use the identity sin(x)=cos(x-pi/2) to see that the phase of these components will be the following (60 degrees is equal to pi/3): Bin 1: -pi/2+\pi/3 =-pi/6 Bin 2:-pi/3 Bin 6: pi/3 Bin 7: pi/6 b) If x[n] corresponded to a continuous-time signal x(t) sampled at 20kHz what frequencies (Hz) are present in the original signal x(t)? [3] The frequencies are F1=Fs/8 = 2500Hz and F2=Fs/4=5000Hz.. c) Is there spectral leakage in this example? Why or why not? [2] No spectral leakage here as the sinusoidal frequencies are equal to k/n for k=1,2. 2) A 32 bit PIPO register is implemented using 32 D flip flops. Assuming that the average number of bit transitions per second are equal to half the clock frequency for all bits, what is the total power dissipation of this register and how does it depend on the logic voltage and the clock frequency? [10] The power dissipation of one flip flop was given in lecture as Pff=(1+3α/2) C fclk V 2 d where α is the average number of bit transitions per clock cycle. Let q be the average number of bit transitions per second, which you are given: q= fclk/2. Now since transitions/sec=(transitions/cycle) x (cycle/sec) we have q=αfclk and therefore α=1/2. As in the lecture notes we make the additional assumption that the capacitance seen by each flip flops is identical. Thus, the total power of the PIPO register is Ptot=32*Pff=32(1+3/4) C fclk V 2 d=56c fclk V 2 d 5

The power scales linearly in the clock frequency and quadratically in the logic voltage. 3) Using one complex FFT to compute two real FFTs a) Let {x[n]} and {y[n]} be sets of N samples, i.e. n=0,,n-1, of real signals x(t) and y(t) sampled at identical sampling rates fs. Explain how you can compute the DFTs X[k] and Y[k] simultaneously with a single FFT. [5] First form the complex signal z[n]=x[n]+jy[n]. Next recall that if Z[k] = DFT(z[n]) then DFT(z*[n])=Z* [N-k]. Note: unlike for the case of real valued inputs to the FFT, for a complex valued input z[n] the FFT output Z[k] does not satisfy the conjugate symmetry relation, i.e. Z[N-k] is not equal to Z*[k]. Now, as we can represent x[n]=(z[n]+z*[n])/2 and y[n]=(z[n]-z*[n])/(2j), by linearity of the FFT we obtain the FFTs of x and y from the FFT of z by the formulas: DFT(x[n])= (Z[k]+Z*[N-k])/2 and DFT(y[n])= (Z[k]-Z*[N-k])/(2j). b) Now let {x[n]} and {y[m]} be sets of samples of different lengths, i.e., n=0,,nx-1 and m=0,, Ny -1. Show how you can compute their DFTs with a single FFT by using zero padding. How do you interpret the DFT frequencies for X[k] and Y[k] in terms of Herzian frequency if the sampling rates on the two signals are not identical? [5] Without loss of generality assume Ny>Nx and define the zero padded version of x={x[n]:n=0,, N-1} as xpadded={x[0],x[1],,x[nx-1],0,,0} where there are Ny-Nx zeros appended to x. Now y and xpadded are of the same length and their N=Ny point DFT s (Y[k] and Xpadded[k]) can be computed simultaneously using the method of part (a). The interpretation of the DFT frequencies of Y[k] is as usual: the k-th DFT index of Y corresponds to Hz frequency kfy/ny where fy is the sampling frequency used to obtain the samples {y[n]}. On the other hand, the k-th index of the DFT Xpadded[k] will correspond to to Hz frequency k fx/ny. To see this recall that the DFT Xpadded(k) is obtained as Ny uniform samples of the frequencies in the DTFT Xpadded(f) of xpadded[n] Xpadded[k]= Xpadded(fk) =Σ n=0 Νy 1 xpadded[n] e -j2πf k n where fk =kfx/ny. Now, by definition of xpadded[n], this is equivalent to the DTFT of x[n] evaluated at these Ny frequencies: Xpadded[k]= Xpadded(fk) =X(fk)=Σ n=0 Νx 1 x [n] e -j2πf k n 6

Section III Longer answers 30 points ADC Waveform table Register 1) An arbitrary waveform synthesizer uses the DDS system above to generate a periodic waveform using a waveform table containing samples of a single period of a waveform s[0],,s[2 B -1] where B=BA. Assume that s[n] is a ramp, s[n]=n 2 -B in the following.[10] a) Assume a clock rate fs = 10MHz, BA = BFTV =16, and FTV=1. Also assume an ideal ADC (e.g., cardinal series reconstruction) and plot three or four periods of the analog output over time. Be careful to label your axes and indicate the amplitude and period of the waveform on your plot. Repeat for FTV=2. [5] Period T=1/(2 fs 2 -B ) =3.3ms 7

b) Assuming the same parameters as above explain what would happen if FTV=-1? Plot three or four periods of the waveform. Repeat for FTV=-2. [5] Period T=1/(2 fs 2 -B ) =3.3ms 8

2) A pole zero constellation of a filter is shown below. [10] Pole/Zero Plot 1 0.8 0.6 0.4 Imaginary Part 0.2 0-0.2-0.4-0.6-0.8-1 -1.5-1 -0.5 0 0.5 1 1.5 Real Part 2 a) It is desired to implement this filter using a cascade of biquad s as you did in Labs 5 and 6. How many biquads are required to implement it? [3] 4 biquads are needed. b) Circle the pole-zero combinations that you would use for for each biquad in order to minimize the likelihood of overflow in your finite precision filter implementation. Label each combination 1,2, corresponding to the order (from left to right) in which you would cascade the biquads. [4] 9

c) Would you need to normalize any of the denominator coefficients of any of the biquads in order to implement this filter in 16 bit Q15?. If so which biquad(s) would you need to normalize in this manner? [3] Yes. The angles theta of the pole pair nearest the unit circle has magnitude less than pi/3. Hence the biquad coefficient a_1 associated with this pole will be a_1=2 r cos(theta) which is greater than 1. You can also look directly at the condition Re(pole)>1/2 as a criterion for when normalization is necessary and come to the same conclusion. Will need to normalize a_1 by dividing by 2 as discussed in class. 10