Lecture 4: Digital representation and data analysis

Similar documents
Lecture 2: Sensors. Zheng-Hua Tan

Lecture 3: Sensors, signals, ADC and DAC

Statistics, Probability and Noise

CS101 Lecture 18: Audio Encoding. What You ll Learn Today

Digital Audio. Lecture-6

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

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

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

Media Devices: Audio. CTEC1465/2018S Computer System Support

Q A bitmap file contains the binary on the left below. 1 is white and 0 is black. Colour in each of the squares. What is the letter that is reve

Qäf) Newnes f-s^j^s. Digital Signal Processing. A Practical Guide for Engineers and Scientists. by Steven W. Smith

Chapter 2: Digitization of Sound

ECE 556 BASICS OF DIGITAL SPEECH PROCESSING. Assıst.Prof.Dr. Selma ÖZAYDIN Spring Term-2017 Lecture 2

Analog-Digital Interface

Digital Sampling. This Lecture. Engr325 Instrumentation. Dr Curtis Nelson. Digital sampling Sample rate. Bit depth. Other terms. Types of conversion.

2: Audio Basics. Audio Basics. Mark Handley

Sound/Audio. Slides courtesy of Tay Vaughan Making Multimedia Work

Fundamentals of Digital Audio *

! Where are we on course map? ! What we did in lab last week. " How it relates to this week. ! Sampling/Quantization Review

MULTIMEDIA SYSTEMS

Communications IB Paper 6 Handout 3: Digitisation and Digital Signals

CS 262 Lecture 01: Digital Images and Video. John Magee Some material copyright Jones and Bartlett

Frequency Domain Representation of Signals

!"!#"#$% Lecture 2: Media Creation. Some materials taken from Prof. Yao Wang s slides RECAP

ANALOGUE AND DIGITAL COMMUNICATION

Mech 296: Vision for Robotic Applications. Vision for Robotic Applications

COS Lecture 7 Autonomous Robot Navigation

Introduction of Audio and Music

Introduction to Computer Vision

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

EXPERIMENTAL INVESTIGATION INTO THE OPTIMAL USE OF DITHER

USE OF BASIC ELECTRONIC MEASURING INSTRUMENTS Part II, & ANALYSIS OF MEASUREMENT ERROR 1

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

UNIT 7C Data Representation: Images and Sound Principles of Computing, Carnegie Mellon University CORTINA/GUNA

! Multi-Rate Filter Banks (con t) ! Data Converters. " Anti-aliasing " ADC. " Practical DAC. ! Noise Shaping

ESE 531: Digital Signal Processing

DIGITAL IMAGE PROCESSING

UNIT 7B Data Representa1on: Images and Sound. Pixels. An image is stored in a computer as a sequence of pixels, picture elements.

Biomedical Signals. Signals and Images in Medicine Dr Nabeel Anwar

UNIT 7C Data Representation: Images and Sound

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

Digital Signal Processing +

Computer Vision. Howie Choset Introduction to Robotics

EE482: Digital Signal Processing Applications

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

EE 351M Digital Signal Processing

TE 302 DISCRETE SIGNALS AND SYSTEMS. Chapter 1: INTRODUCTION

Chapter 4. Digital Audio Representation CS 3570

CHAPTER 4. PULSE MODULATION Part 2

Chapter 5: Signal conversion

Understanding Digital Signal Processing

SOME PHYSICAL LAYER ISSUES. Lecture Notes 2A

Lab.3. Tutorial : (draft) Introduction to CODECs

Computer Vision, Lecture 3

Introduction to Electronic Circuit for Instrumentation

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

Lecture Outline. ESE 531: Digital Signal Processing. Anti-Aliasing Filter with ADC ADC. Oversampled ADC. Oversampled ADC

Measuring the complexity of sound

Contents. Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2

Analyzing A/D and D/A converters

Analogue Interfacing. What is a signal? Continuous vs. Discrete Time. Continuous time signals

DIGITAL COMMUNICATION

Comm 502: Communication Theory

Low frequency sound reproduction in irregular rooms using CABS (Control Acoustic Bass System) Celestinos, Adrian; Nielsen, Sofus Birkedal

ESE 531: Digital Signal Processing

Image Processing for feature extraction

Pulse Code Modulation

Signal Processing. Introduction

Analogue Signals. M J Brockway. February 5, 2018

Chapter 3 Data Transmission COSC 3213 Summer 2003

8-channel Cirrus Logic CS4382 digital-to-analog converter as used in a sound card.

EITF25 Internet Techniques and Applications L2: Physical layer. Stefan Höst

What is an image? Bernd Girod: EE368 Digital Image Processing Pixel Operations no. 1. A digital image can be written as a matrix

Armstrong Atlantic State University Engineering Studies MATLAB Marina Sound Processing Primer

Digital Signal Processing Lecture 1

Digital Design Laboratory Lecture 7. A/D and D/A

Cyber-Physical Systems ADC / DAC

UNIT III Data Acquisition & Microcontroller System. Mr. Manoj Rajale

Sampling and Reconstruction

Waveform Encoding - PCM. BY: Dr.AHMED ALKHAYYAT. Chapter Two

Lab 12 Laboratory 12 Data Acquisition Required Special Equipment: 12.1 Objectives 12.2 Introduction 12.3 A/D basics

PHYS225 Lecture 22. Electronic Circuits

DISCRETE FOURIER TRANSFORM AND FILTER DESIGN

Fundamentals of Data Converters. DAVID KRESS Director of Technical Marketing

Lecture #6: Analog-to-Digital Converter

Chapter 1: Introduction to audio signal processing

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Design IV. E232 Spring 07

Discrete-time Signals & Systems

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Sampling and Reconstruction of Analog Signals

Automotive three-microphone voice activity detector and noise-canceller

MATLAB for Audio Signal Processing. P. Professorson UT Arlington Night School

PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture PYKC 27 Feb 2017 EA2.3 Electronics 2 Lecture 11-2

ELG3336 Design of Mechatronics System

Lecture 7 Frequency Modulation

Biosignal Analysis Biosignal Processing Methods. Medical Informatics WS 2007/2008

Multirate DSP, part 3: ADC oversampling

CG401 Advanced Signal Processing. Dr Stuart Lawson Room A330 Tel: January 2003

10. Noise modeling and digital image filtering

Transcription:

Instrumentation and data acquisition Spring 010 Lecture 4: Digital representation and data analysis Zheng-Hua Tan Multimedia Information and Signal Processing Department of Electronic Systems Aalborg University, Denmark zt@es.aau.dk Thanks to Christian Fischer Pedersen for providing some of the slides. Instrumentation and data acquisition, IV, 010 1 Acquire, process and output data Part 1Sensors Part Computers Part 1 Actuators Acquire and Store and/or Act on physical convert measured process the input parameter/world phys. parameter to signal/data to based on electrical signal obtain information signal/data Examples Examples Examples -Light intensity -Temperature -Sound -Pressure -Humidity -ph -Radiation -Motion -Etc. ADC -PC -Calculator -Mobile phone -PDA -DVD player -Industrial robot -Digital camera -Toys -Etc. DAC -Electrical motor -Loud speaker -Pump -Lifting columns -Valve -Switch -Display (LCD,CRT) -Light bulb -Etc. Instrumentation and data acquisition, IV, 010 1

Part I: Digital representation of information Digital representation of information Audio and image Acquired signal and noise Mean, standard deviation and SNR Histogram, PMF and PDF Instrumentation and data acquisition, IV, 010 3 Representation of digital audio Temporal resolution, i.e. sampling frequency Audible frequency range: ~ 0Hz-0kHz Nyquist-Shannon theorem: *0kHz = 40kHz Actual frequency due to production: 44.1 khz Bit depth, i.e. amplitude quantization 16-bit linear PCM Digital audio stored in computers: Windows WAV, Apple AIF, Sun AU Compact Disc Digital Audio 16 bit/sample per channel ~ ^16 = 65,536 Instrumentation and data acquisition, I, 010 4

Representation of digital audio Bit-rate stereo 16**44100 ~ 1.4 Mbit/s A CD can store up to 74 minutes of music Total amount of data = 44,100 samples/(channel*second) * bytes/sample * channels * 60 seconds/minute * 74 minutes = 783,16,000 bytes There are CD-Rs that can hold 700 megabytes (734,003,00 bytes) of error corrected data, or 80 minutes of stereo 16 bit 44.1 khz audio (846,739,00 bytes) (807.51 megabytes) without error correction code. Instrumentation and data acquisition, I, 010 5 Representation of digital audio Instrumentation and data acquisition, I, 010 6 3

Rep. of digital grayscale bitmap image Spatially mapped array, e.g. Resolution: 51x51x1 [uint8]; Bit-depth=8 => ^8 = 56^1 = 56 intensities/pixel Space as independent variables.: I(x,y) Instrumentation and data acquisition, I, 010 7 Rep. of digital colour bitmap image Spatially mapped array of bits, e.g. Resolution: 300x300x3 [uint8]; Bit-depth=4 th => ^4=56^3=16,777,1656^3 16 colors/pixel l Space as independent vars.: {r(x,y),g(x,y),b(x,y)} = + + Instrumentation and data acquisition, I, 010 8 4

Rep. of digital colour bitmap image Instrumentation and data acquisition, I, 010 9 Part II: Acquired signal and noise Digital representation of information Acquired signal and noise Mean, standard deviation and SNR Histogram, PMF and PDF Instrumentation and data acquisition, IV, 010 10 5

Acquired signals Instrumentation and data acquisition, VII, 009 11 Acquired signal vs. generating process Noise Generating process + Acquired signal Instrumentation and data acquisition, VII, 009 1 6

Acquired signal vs. generating process Example: Coin flip Generating process Assign: Head=1, Tail=0 Constant probability: P(H)=P(T)=50% => μ=0.5 Acquired signal Flip a coin 1000 times Create a signal: (flip_no,outcome) Varying statistical mean: μ 0.5 but μ~0.5 Statistical dispersion: variance, standard deviation Instrumentation and data acquisition, VII, 009 13 Acquired signal vs. generating process Figure: Courtesy of Shivan Bird Instrumentation and data acquisition, VII, 009 14 7

Data analysis Inference, noise and other undesirable components exist in acquired data. Imperfections in the data acquisition system Inherent part of the signal being measured By-product of some DSP operation There is a need to reduce them and characterise signals and the processes that generate them -> statistics and probability theory Instrumentation and data acquisition, VII, 009 15 Part III: Mean, standard deviation and SNR Digital representation of information Acquired signal and noise Mean, standard deviation and SNR Histogram, PMF and PDF Instrumentation and data acquisition, IV, 010 16 8

Sample indexing in discrete-time time signals Number of samples in a signal: N Each element in the set x is a sample The samples can be indexed in two ways n [ 0; N 1] or n [1; N] We will use the first indexing range n [ 0; N 1] In MATLAB n [ 1; N] Instrumentation and data acquisition, VII, 009 17 Mean and deviations Mean the average value of a signal 1 1 N xi N i0 Average deviation amplitude fluctuation AD 1 1 N xi N i0 Standard deviation power fluctuation 1 N N 1 ( xi i0 ) 1/ Variance power of fluctuation 1 1 N ( xi N i0 ) Instrumentation and data acquisition, VII, 009 18 9

Unbiased estimator If the underlying distribution is not known, then the sample variance may be computed as S 1 1 1 N N ( xi N i0 ) Note that the sample variance defined above is not an unbiased estimator for the population variance. In order to obtain an unbiased estimator t for, it is necessary to instead define a "biascorrected sample variance" S N 1 1 N 1 ( xi ) N 1 Instrumentation i0 and data acquisition, VII, 009 19 Mean and deviations From: S. W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997 Instrumentation and data acquisition, VII, 009 0 10

Mean and deviations Vpp: peak-to-peak value From: S. W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997 Instrumentation and data acquisition, VII, 009 1 Signal-to-noise ratio (SNR) where P is average power and A is root mean square (RMS) amplitude SNR = 0 log (Signal RMS / Noise RMS) Instrumentation and data acquisition, VII, 009 11

Part IV: Histogram, PMF and PDF Digital representation of information Acquired signal and noise Mean, standard deviation and SNR Histogram, PMF and PDF Instrumentation and data acquisition, IV, 010 3 Histogram 18 samples from a 56k sample sequence M 1 Hi i 0 { x ( n )} N N: No. of samples H i : No. of occurrence in i th histogram bin M: No. of histogram bins From: S. W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997 Instrumentation and data acquisition, VII, 009 4 1

Histogram and statistics Histogram based (for the histogram in previous slide) Variance Mean 1 1 M N i0 1 1 M N i0 0 i H i ( i ) H i Sample based Mean Variance 1 1 N xi N i0 1 1 N ( xi N i0 ) For very large data sets it is computationally more effective to bin the data in histograms and base the statistics upon these Histogram s applications in image segmentation and enhancement. The need for PDF for modelling and classification applications. Instrumentation and data acquisition, VII, 009 5 Histogram, PMF and PDF infer Histogram PMF PDF P(139)? P(10 X 130) 130 10 f ( x ) dx - For discrete data/signals - From acquired signal - Number of samples finite - For discrete data/signals - From generating process - Number of samples infinite - Estimated from histogram - For continuous data/signals - From generating process - Continuous thus inf. domain - Estimated from histogram -Y-axis: No. of occur: H i [ 0; N 1] -Y-axis: Frequency: H i / N [0;1] -Y-axis Prob. density: f : R R -Area under histogram { x( n)} N M 1 Hi i0 - Area under PMF 1 M 1 i0 H -Area under PMF From: S. W. Smith, The Scientist and Engineer's Instrumentation Guide to Digital and Signal data Processing, acquisition, California VII, 009Technical Publishing, 1997 6 i / N 1 f ( x) dx 13

Histogram, PMF and PDF cont. From: S. W. Smith, The Scientist and Engineer's Guide to Digital Signal Processing, California Technical Publishing, 1997 Instrumentation and data acquisition, VII, 009 7 Binned histograms When to use? If the levels each sample can take on is much larger than the number of samples in the signal, i.e. sample space >> {x(n)} =N. For example, Matlab double: 64bit = ^64 = 1.84*10^19 Signal: 10.000 samples => sample space >> No. of samples Why? Cannot count No. samples corresponding to each quantization level as No. of quantization level very high computationally ineffective. Many quantization levels have no corresponding sample. Instrumentation and data acquisition, VII, 009 8 14

Binned histograms cont. How many bins to use? It is a compromise! Too many bins Difficult to estimate amplitude of underlying PMF, because only few samples (if any) fall within each bin Too few bins Difficult to estimate the domain of underlying PMF, because of crude resolution Instrumentation and data acquisition, VII, 009 9 Binned histograms cont. Signal: 10000 samples --- Sample space: ^64=1.84*10^19 Instrumentation and data acquisition, VII, 009 30 15

Summary Digital representation of information Acquired signal and noise Mean, standard deviation and SNR Histogram, PMF and PDF Instrumentation and data acquisition, IV, 010 31 16