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

Similar documents
UNIVERSITY OF CALIFORNIA. EECS 145M: Microcomputer Interfacing Lab

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

Chapter 7. Introduction. Analog Signal and Discrete Time Series. Sampling, Digital Devices, and Data Acquisition

Design IV. E232 Spring 07

Lecture #6: Analog-to-Digital Converter

Electronics A/D and D/A converters

Chapter 2 Analog-to-Digital Conversion...

PART I: The questions in Part I refer to the aliasing portion of the procedure as outlined in the lab manual.

Lab 8 D/A Conversion and Waveform Generation Lab Time: 9-12pm Wednesday Lab Partner: Chih-Chieh Wang (Dennis) EE145M Station 13

Data Acquisition Systems. Signal DAQ System The Answer?

Frequency Domain Representation of Signals

AD9772A - Functional Block Diagram

EECS 452 Midterm Exam (solns) Fall 2012

LAB #7: Digital Signal Processing

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2015 Lecture #5

ANALOG TO DIGITAL (ADC) and DIGITAL TO ANALOG CONVERTERS (DAC)

Theoretical 1 Bit A/D Converter

CENG4480 Lecture 04: Analog/Digital Conversions

Microprocessors & Interfacing

CHAPTER ELEVEN - Interfacing With the Analog World

Advanced Lab LAB 6: Signal Acquisition & Spectrum Analysis Using VirtualBench DSA Equipment: Objectives:

Analog Input and Output. Lecturer: Sri Parameswaran Notes by: Annie Guo

EE 215 Semester Project SPECTRAL ANALYSIS USING FOURIER TRANSFORM

Data acquisition and instrumentation. Data acquisition

FYS3240 PC-based instrumentation and microcontrollers. Signal sampling. Spring 2017 Lecture #5

EE390 Final Exam Fall Term 2002 Friday, December 13, 2002

Fundamentals of Data Converters. DAVID KRESS Director of Technical Marketing

System on a Chip. Prof. Dr. Michael Kraft

Analyzing A/D and D/A converters

New Features of IEEE Std Digitizing Waveform Recorders

The Fundamentals of Mixed Signal Testing

MAKING TRANSIENT ANTENNA MEASUREMENTS

SAMPLING THEORY. Representing continuous signals with discrete numbers

Sampling and Signal Processing

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

EET 223 RF COMMUNICATIONS LABORATORY EXPERIMENTS

Getting Started. MSO/DPO Series Oscilloscopes. Basic Concepts

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

Based with permission on lectures by John Getty Laboratory Electronics II (PHSX262) Spring 2011 Lecture 9 Page 1

Lab Exercise 6: Digital/Analog conversion

Chapter 5: Signal conversion

ELG3336: Converters Analog to Digital Converters (ADCs) Digital to Analog Converters (DACs)

Analog to Digital Conversion

Lab 4 Digital Scope and Spectrum Analyzer

Fourier Theory & Practice, Part II: Practice Operating the Agilent Series Scope with Measurement/Storage Module

Digital Communication Systems Third year communications Midterm exam (15 points)

Panasonic, 2 Channel FFT Analyzer VS-3321A. DC to 200kHz,512K word memory,and 2sets of FDD

PHYS225 Lecture 22. Electronic Circuits

Module 5. DC to AC Converters. Version 2 EE IIT, Kharagpur 1

Signal Processing for Digitizers

FFT Analyzer. Gianfranco Miele, Ph.D

Digital Processing of Continuous-Time Signals

Digital Signal Processing +

Cyber-Physical Systems ADC / DAC

Design IV. E232 Fall 07

ECE 2111 Signals and Systems Spring 2012, UMD Experiment 9: Sampling

Select the single most appropriate response for each question.

HY448 Sample Problems

DIGITAL IMAGE PROCESSING Quiz exercises preparation for the midterm exam

10. Chapter: A/D and D/A converter principles

6.111 Lecture # 15. Operational Amplifiers. Uses of Op Amps

Gentec-EO USA. T-RAD-USB Users Manual. T-Rad-USB Operating Instructions /15/2010 Page 1 of 24

Pulsed VNA Measurements:

Lecture Fundamentals of Data and signals

The counterpart to a DAC is the ADC, which is generally a more complicated circuit. One of the most popular ADC circuit is the successive

Lecture #20 Analog Inputs Embedded System Engineering Philip Koopman Wednesday, 30-March-2016

Physics 115 Lecture 13. Fourier Analysis February 22, 2018

National Instruments Flex II ADC Technology The Flexible Resolution Technology inside the NI PXI-5922 Digitizer

Introduction to Communications Part Two: Physical Layer Ch3: Data & Signals

ELT Receiver Architectures and Signal Processing Fall Mandatory homework exercises

Chapter 3 Data and Signals 3.1

Lecture 9, ANIK. Data converters 1

The Sampling Theorem:

SIGMA-DELTA CONVERTER

Chapter 2 Signal Conditioning, Propagation, and Conversion

PART II Practical problems in the spectral analysis of speech signals

Digital Processing of

Developer Techniques Sessions

The quality of the transmission signal The characteristics of the transmission medium. Some type of transmission medium is required for transmission:

EE 4440 Comm Theory Lab 5 Line Codes

FFT Use in NI DIAdem

EECS 452 Practice Midterm Exam Solutions Fall 2014

The Battle for Data Fidelity:Understanding the SFDR Spec

LLS - Introduction to Equipment

Final Exam Solutions June 14, 2006

II Year (04 Semester) EE6403 Discrete Time Systems and Signal Processing

Advanced Audiovisual Processing Expected Background

Review of Lecture 2. Data and Signals - Theoretical Concepts. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2. Review of Lecture 2

TSKS01 Digital Communication - Lecture 1

Chapter-2 SAMPLING PROCESS

Experiment No. 3 Pre-Lab Phase Locked Loops and Frequency Modulation

Direct Digital Synthesis

Measuring Stray Voltage. Steady state

TSKS01 Digital Communication - Lecture 1

ENGR 210 Lab 12: Sampling and Aliasing

Analog to Digital Converters

ELG4139: Converters Analog to Digital Converters (ADCs) Digital to Analog Converters (DACs)

Agilent 33220A Function Generator Tutorial

YEDITEPE UNIVERSITY ENGINEERING FACULTY COMMUNICATION SYSTEMS LABORATORY EE 354 COMMUNICATION SYSTEMS

EE251: Tuesday October 10

Transcription:

UNIVERSITY OF CALIFORNIA College of Engineering Electrical Engineering and Computer Sciences Department 145M Microcomputer Interfacing Lab Final Exam Solutions May 11, 2010 1.1 Handshaking steps: When the receiver is ready, it sets ready for data (RD) TRUE The sender detects RD TRUE and asserts the data After the data have settled, the sender sets data available (DA) TRUE The receiver detects DA true, reads the data, and sets RD FALSE The sender detects RD false, and sets DA FALSE [3 points off for asserting DA in a step before the step that asserts data] [5 points off if the sender never asserts data] 2.1 Flash 8-bit A/D converter: Vref R/2 V 255 R 255 Exclusive OR Address encoder logic V 1 2 Digital output (8 bits) R 1 R/2 Comparators V ref 145M Final Exam Solutions page 1 May 11, 2010 S. Derenzo

[4 points off for omitting the resistor chain that provides the 255 uniformly spaced reference voltages] [4 points off for omitting the 255 comparators] [8 points off for showing only 8 resistors, 8 comparators, and 8 output lines] [12 points off for showing only 255 comparators and 255 digital output lines] [4 points off for an output of 255 digital lines] 2.2 The analog input is send to the positive inputs of 255 comparators. A 255-resistor voltage divider provides an evenly spaced series of voltages for the negative input to the comparators. For a given analog input, the comparator output is one for all the divider voltages below the input and zero for all the voltages above. A series of exclusive or circuits identifies the highest comparator with an output of one and an encoder circuit determines the numerical value. 3 For f 1 < 10 khz, the filter gain G 1 > 0.99 Let f 2 be the frequency that can alias below f 1 with gain G 2 < 0.001 fs = 60 khz > f 1 + f 2 f 2 < fs f 1 = 50 khz Approximating fc ~ f 1, f 2 /fc ~ f 2 / f 1 < 5 Searching for the n value where f/fc <5 at G = 0.001, we find n = 6 To check At G 1 = 0.99, f 1 /fc = 0.723 so fc = 13.8 khz At G 2 = 0.001, f 2 /fc = 3.162, so f 2 = 43.7 khz f 1 + f 2 = 53.7 khz which is less than fs, so the sampling frequency of 60 khz is adequate. Solution is n = 6, fc = 13.8 khz [3 points off for n = 4] [3 points off for n = 10] [10 points off for a partial analysis that does not check if the gain requirements are met] 4.1 D/A glitches: When the input number changes in more than one bit, it is impossible for both bit switches to change exactly at the same time. During the brief time between the first switch change and the last switch change, an erroneous voltage will be produced. [4 points off for settling time and no mention of bit changes] [2 points off for not stating that the bits cannot change simultaneously] 4.2 145M Final Exam Solutions page 2 May 11, 2010 S. Derenzo

D/A S/H LSB S/H MSB inclusive OR time delay exclusive OR 4.3 When any input bit changes, the time delay will cause the exclusive OR to change state. The pulse produced has a width equal to the time delay. The output of the inclusive OR will be high whenever any bit changes. This puts S/H into hold mode during the glitch and the glitch will not appear at the output. [12 points off for connecting the analog output of the D/A to digital circuits] [5 points off for including a D/A, a circuit that detects changes in the digital D/A input without specifics, and uses the signal to control a S/H] [12 points off for a circuit that has no D/A and no analog signals- all multi-bit digital signals are briefly erroneous when more than one bit changes] [12 points off for connecting a D/A to an analog input port, not using a S/H, and not producing a deglitched analog signal] [12 points off for an attempt that did not show a S/H after the D/A] 5 This problem was intended to find out how well you could use the anti-aliasing and Fourier techniques from this course to sample a noisy periodic signal and recover the signal with the maximum signal-to-noise ratio. 5.1 Essential components for a complete solution were - Sensor 145M Final Exam Solutions page 3 May 11, 2010 S. Derenzo

- Amplifier - Low-pass filter - A/D converter (S/H not required for full credit) or analog input port - Digital input port (if no analog input port) - Digital output port - Trigger line between digital output port and sensor (1 Hz) - Start conversion line between digital output port and A/D converter (~5 khz) (not required if analog input port shown) - Analog lines connecting sensor, amplifier, filter, A/D converter or analog input port - Digital lines between A/D converter and digital input port (not required if analog input port shown) [2 points off for each element missing] 5.2 The first consideration is that most of the amplifier noise was outside of the 1 Hz to 1 khz frequency range of interest. So a low pass filter that had a gain G 1 = 0.99 at f 1 = 1 khz and a gain G 2 = 0.0001 at f 2 = 4 khz would effectively remove the noise from 4 khz to 1,000 khz. A low pass filter with n = 8 and fc = 1.27 khz would satisfy these requirements. A sampling frequency fs = f 1 + f 2 = 5 khz would avoid aliasing. A raised cosine window is not necessary, since all the data of interest are periodic. Since the sampling window was 100 s, a sampling frequency of 5,242.88 Hz would produce 524,288 = 2 19 samples for the FFT. The process for sampling is 1) The computer pulses the trigger line at exactly 1 Hz 2) The computer pulses the A/D start conversion line at exactly 5,242.88 Hz 3) The computer waits for conversion to be complete (typically < 10 microseconds) and reads the data (using the conversion complete would be good practice but was not necessary for full credit). Note that the sampling rate (5.2 khz) is much slower than the A/D converter or the digital input port (typically > 100 khz) 4) After 100 seconds, the computer stops sampling and takes the FFT of the 524,288 samples. [3 points off for not specifying low pass filter design] [3 points off for not specifying sampling frequency for triggering the analog input] [3 points off for not triggering the sensor at 1 Hz for 100 seconds] [3 points of for not calculating the FFT] 5.3 The FFT will have Fourier amplitudes H n where n = 0 to 524,287. The frequency index n corresponds to frequency n/100s = n (0.01 Hz). The signal of interest will appear at frequency indexes 100k (k = harmonic index of the signal) and the random amplifier noise will be spread over all Fourier amplitudes. The highest frequency of interest 1 khz will appear at n = 100,000 and at n = 424,287 (complex conjugate of amplitude at n = 100,000). The low pass filter will reduce the amplitude at higher frequencies, dropping to a gain below 0.01 at the center point n = 262,144 (2.62 khz) where f/fc = 2.06. Frequencies above 4.24 khz that could alias below 1 khz are reduced by the filter to below 0.0001. 145M Final Exam Solutions page 4 May 11, 2010 S. Derenzo

[4 points off for not showing range of FFT output in Hz or frequency index] [4 points off for not indicating harmonics of periodic signal on a noise background] [4 points off for not showing effect of low-pass filter] 5.4 The low pass filter removes most of the noise above 2 khz but Fourier techniques can remove almost all the noise in the 1 Hz to 1 khz frequency band of interest. Since only the Fourier amplitudes H 100k contain signal information (k = integer harmonic number) and all others contain pure noise, the latter can be set to zero. Each Fourier harmonic H 100k will also contain 1% of the noise which can be estimated by averaging the other Fourier amplitudes that contain only noise. Subtract the average noise from the harmonics H 100k and set all others to zero. This reduces the noise in the Fourier domain by a factor of 100. Take the inverse FFT which will contain 100 periodic identical replicas of the signal. Any one of them can be taken as the recovered signal. [5 points off for time averaging the signal + noise before taking the FFT; this approach only reduces the noise by the square root of the number of signal repetitions ] [5 points off for increasing the sampling window; this does not change the noise content in each Fourier amplitude but each harmonic will increase; but this is not as effective as setting the non-harmonics to zero and taking the inverse FFT] [10 points off for not averaging in the time domain and not zeroing the non-harmonic Fourier amplitudes] 6.1 145M Final Exam Solutions page 5 May 11, 2010 S. Derenzo

[3 points off for omitting the conversion input line if using an external A/D] [3 points off for omitting LEDs] 6.2 Process steps 1) User starts the program 2) The program prompts the user for f and f 3) The program asks the user to play the note 4) The low pass filter reduces amplifier noise and aliasing 4) The program continuously samples the filtered signal for a time window S to acquire M waveform amplitudes h k, k = 0 to M 1. 5) The sampled values are windowed to reduce spectral leakage (in general there will not be an whole number of cycles in time window S) 6) Apply 5 different digital filters to the windowed data 7) The output of each digital filter is compared to a threshold. If the threshold is exceeded, the corresponding digital line connected to an LED is asserted. Windowing in step 5 makes it easier to identify the LED to be lit. [3 points off for not prompting for f, f] [3 points off for omitting the A/D or analog input port sampling trigger] [a window would reduce spectral leakage but was not required since the first harmonic would still have a clear peak] [3 points off for doing entire FFT (about 20,000 frequencies) rather then 5 digital filters] 6.3 The Fourier amplitude H n at frequency f - f has index n = fs -100. The digital filtering that computes the real part of this amplitude is M Re(H n ) = h k cos(2πnk / M) k=0 The digital filtering that computes the imaginary part of this amplitude is 145M Final Exam Solutions page 6 May 11, 2010 S. Derenzo

M Im(H n ) = h k sin(2πnk / M) k=0 An even more efficient approach is to use the infinite impulse response filter shown on page 418 of the textbook (lecture slide 145M Final Exam Grades: Problem 1 2 3 4 5 6 Total Average rms Maximum 15 40 45 45 30 25 200 145M Numerical Grades: Short labs Long labs Lab Partic. Midterm #1 Midterm #2 Final Total Average 100 rms 0 Maximum 100 400 100 100 100 200 1000 145M Letter Grade Distribution Letter Grade A+ A A B+ B B- C+ C C D+ D D * Graduate student Course Totals (1000 max) 145M Final Exam Solutions page 7 May 11, 2010 S. Derenzo