SP.718 Special Topics at Edgerton Center: D-Lab Health: Medical Technologies for the Developing World

Similar documents
SGN Bachelor s Laboratory Course in Signal Processing Audio frequency band division filter ( ) Name: Student number:

Frequency Selective Circuits

Lab 4 An FPGA Based Digital System Design ReadMeFirst

ECEGR Lab #8: Introduction to Simulink

ELEC3104: Digital Signal Processing Session 1, 2013

Internal Sound Denoising for Traditional Stethoscope Using Inverse Chebyshev IIR Bandstop Filter

ELEC3104: Digital Signal Processing Session 1, 2013

Multirate DSP, part 1: Upsampling and downsampling

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

Plot frequency response around the unit circle above the Z-plane.

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

PHYS225 Lecture 15. Electronic Circuits

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

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

Lab 0: Introduction to TIMS AND MATLAB

Pre-Lab. Introduction

STANFORD UNIVERSITY. DEPARTMENT of ELECTRICAL ENGINEERING. EE 102B Spring 2013 Lab #05: Generating DTMF Signals

Appendix B. Design Implementation Description For The Digital Frequency Demodulator

Sampling and Reconstruction

MAE143A Signals & Systems - Homework 9, Winter 2015 due by the end of class Friday March 13, 2015.

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

Signal Processing Toolbox

ECE 5655/4655 Laboratory Problems

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

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

EE 422G - Signals and Systems Laboratory

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

Lab 1B LabVIEW Filter Signal

Laboratory Assignment 2 Signal Sampling, Manipulation, and Playback

Lab P-4: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: ) X

MFJ-752C SIGNAL ENHANCER II

Brief Introduction to Signals & Systems. Phani Chavali

Filters. Phani Chavali

Build Your Own Bose WaveRadio Bass Preamp Active Filter Design

Butterworth Active Bandpass Filter using Sallen-Key Topology

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

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Neurophysiology. The action potential. Why should we care? AP is the elemental until of nervous system communication

ADSP ADSP ADSP ADSP. Advanced Digital Signal Processing (18-792) Spring Fall Semester, Department of Electrical and Computer Engineering

Additive Synthesis OBJECTIVES BACKGROUND

Auntie Spark s Guide to creating a Data Collection VI

DSP First Lab 03: AM and FM Sinusoidal Signals. We have spent a lot of time learning about the properties of sinusoidal waveforms of the form: k=1

EEO 401 Digital Signal Processing Prof. Mark Fowler

IIR Filter Design Chapter Intended Learning Outcomes: (i) Ability to design analog Butterworth filters

Lab 4: Using the CODEC

George Mason University Signals and Systems I Spring 2016

Lab 4: Static & Switched Audio Equalizer

Laboratory Assignment 4. Fourier Sound Synthesis

Signal Processing. Introduction

F I R Filter (Finite Impulse Response)

Best case scenario for recording with the 8M MOTU sound card and Audacity

6.555 Lab1: The Electrocardiogram

EGR 111 Audio Processing

A Guitar Overdrive/Distortion Effect of Digital Signal Processing

Princeton ELE 201, Spring 2014 Laboratory No. 2 Shazam

Analog Lowpass Filter Specifications

THE NEXT GENERATION AIRBORNE DATA ACQUISITION SYSTEMS. PART 1 - ANTI-ALIASING FILTERS: CHOICES AND SOME LESSONS LEARNED

Electrical & Computer Engineering Technology

Set-up. Equipment required: Your issued Laptop MATLAB ( if you don t already have it on your laptop)

Application Note 7. Digital Audio FIR Crossover. Highlights Importing Transducer Response Data FIR Window Functions FIR Approximation Methods

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

Fourier Series and Gibbs Phenomenon

Design and Implementation of Digital Stethoscope using TFT Module and Matlab Visualisation Tool

Digital Filters IIR (& Their Corresponding Analog Filters) Week Date Lecture Title

EEE - 321: Signals and Systems Lab Assignment 3

Denoiser Box. Analog signal processing device STC-L254. Technical Description

Question 1 Draw a block diagram to illustrate how the data was acquired. Be sure to include important parameter values

USBPRO User Manual. Contents. Cardioid Condenser USB Microphone

EE477 Digital Signal Processing Laboratory Exercise #13

A Finite Impulse Response (FIR) Filtering Technique for Enhancement of Electroencephalographic (EEG) Signal

Spring 2014 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

PYKC 13 Feb 2017 EA2.3 Electronics 2 Lecture 8-1

EECS 452 Midterm Exam Winter 2012

MFJ-722 INSTRUCTIONS

ELEC-C5230 Digitaalisen signaalinkäsittelyn perusteet

HST.582J / 6.555J / J Biomedical Signal and Image Processing Spring 2007

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

Spring 2018 EE 445S Real-Time Digital Signal Processing Laboratory Prof. Evans. Homework #2. Filter Analysis, Simulation, and Design

Experiment 6: Multirate Signal Processing

Lab S-5: DLTI GUI and Nulling Filters. Please read through the information below prior to attending your lab.

ECE 2713 Design Project Solution

Islamic University of Gaza. Faculty of Engineering Electrical Engineering Department Spring-2011

MAS.160 / MAS.510 / MAS.511 Signals, Systems and Information for Media Technology Fall 2007

D94 Series. 1 Hz to 400 khz* Low Noise Fixed Frequency. 4 - Pole Single Power Supply Anti-Aliasing Low-Pass Filters

Laboratory Assignment 1 Sampling Phenomena

AUDL Final exam page 1/7 Please answer all of the following questions.

Signal Processing of DC/DC converter inductor current measurement

Discretization of Continuous Controllers

Lab 2: Designing a Low Pass Filter

Tinysizer. Anyware Instruments Tinysizer Analog Modular System

Performance Evaluation of Mean Square Error of Butterworth and Chebyshev1 Filter with Matlab

D92 Series. 1 Hz to 400 khz* Low Noise Fixed Frequency. 2 - Pole Single Power Supply Anti-Aliasing Low-Pass Filters

C.8 Comb filters 462 APPENDIX C. LABORATORY EXERCISES

D98 Series. 1 Hz to 400 khz* Low Noise Fixed Frequency. 8- Pole Single Power Supply Anti-Aliasing Low-Pass Filters

D61 Series. 32-Pin DIP 4 - Pole Filters Hz to 1.00 Hz Fixed Frequency

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

CHAPTER 14. Introduction to Frequency Selective Circuits

Acoustic Echo Cancellation using LMS Algorithm

NOISE REDUCTION TECHNIQUES IN ECG USING DIFFERENT METHODS Prof. Kunal Patil 1, Prof. Rajendra Desale 2, Prof. Yogesh Ravandle 3

Final Project Report E3990 Electronic Circuits Design Lab. Wii-Lock. Magic Wand Remote Unlocking Device

Transcription:

MIT OpenCourseWare http://ocw.mit.edu SP.718 Special Topics at Edgerton Center: D-Lab Health: Medical Technologies for the Developing World Spring 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

Notes on Matlab processing of vital signs data D-lab Health Feb 2009 Brian Tracey

Data Acquisition Plug an audio cable from the output jack on the heart sounds monitor to the laptop mic in Use the software tool of your choice to make a recording Audacity is a good choice: other options are Mac SimpleSound or Windows Sound Recorder Save the recording as a.wav file Repeat this process but transmit the heart sounds over the baby monitor (to add noise) Some things to try or think about: Experiment with holding your breath while recording, so lung sounds will not be present. Does this make a big difference? Does background noise in the room make a big difference? If you do deep breathing (1 breath / 10 sec) while recording, can you still hear the heart sounds?

Loading / saving wav files in Matlab The wavread command will load a.wav file for example, for file hbeat.wav : [hbdata,fsamp]=wavread( hbeat ); this command returns the heart sounds data in a vector hbdata, and the sampling rate used by the recording in fsamp If your software gave 2 channels (stereo recording), throw one away as the stethoscope is mono You can save and load your Matlab workspace using save and load commands After processing the data, you may want to save the output waveform into another.wav file For example, to save the vector hbfilt into a file filteredheartbeat.wav : wavwrite(hbfilt, fsamp, filteredheartbeat );

Plotting and playing back sound in Matlab Based on your sampling rate, set up a vector t of times that correspond to each sample Then, you can plot the data: plot(t,hbdata) plot(hbdata) will plot the data without a time axis You can play the sounds using the sound or soundsc commands: sound(hbdata, fsamp); % plays whole recording sound(hbdata(1:fsamp*5), fsamp); % plays first 5 sec

Filtering the data Heart sounds are low frequency, while noise may be higher-frequency which suggests we try filtering Butterworth filters are a common choice for biomedical applications Parameters are filter cutoff frequencies and filter order (higher order -> more suppression); see next page For convenience, functions LPfilterWrapper.m and BPfilterWrapper.m are included at end of this PPT Example call for a 500 Hz lowpass filter is: filteredhb = LPfilterWrapper(hbData,fSamp,500);

Example of Butterworth filter parameters Passband: < 3 db suppression (0 db = no amplitude change) 5 0 Cutoff frequency: Signals suppressed by 3 db (half) Attenuation, db -5-10 -15-20 2nd order Butterworth 4th order Butterworth -25 0 500 1000 1500 2000 Frequency, Hz Higher-order filter has more suppression of high frequencies

Main lab involves using filtering to clean up signals For some additional ideas, see following slides -

Additional challenge #1: Downsampling the data During sampling, the analog signals are sampled at a frequency = 2x the highest frequency of interest (http://www.dspguide.com/ch3/2.htm for why) The sound recorder on your laptop samples at a rate which is appropriate for music, but heart sounds are lower in frequency Question: how much can you downsample the acquired data to reduce the file size, without losing information? How could this help in a telemedicine application?

Additional challenge 1, con t You need to filter out any high-frequency noise before reducing the sampling rate, or it will distort your signal Option 1: you can use the filtered data from before, then just discard alternate samples hbnew = hbfilt(1:2:end); % discards every 2 nd sample fsnew = fsamp/2; Option 2: use the Matlab command resample, which internally applies filtering hbnew = resample(hbdata,1,3); % reduces rate by 1/3 fsnew = fsamp/3 Check your work by plotting and replaying the new signals*. Do you hear/see significant differences in the signal? You can save the output as a.wav file to see the file size reduction* * Remember to use the new sampling rate in any function calls

Some more ideas Heart-rate: can you devise an algorithm for estimating heart-rate from the signals you ve acquired? Background noise: did conversations or other noises in the room cause problems for your recording? Do you think that may be a problem in a health clinic? If so, do any of your filter approaches help with the problem? Are there other solutions (mechanical, DSP) that you can imagine?

Useful matlab codes

Low-pass filter wrapper code function y = LPfilterWrapper(data, fsamp, fcutoff, norder) % function y = LPfilterWrapper(data, fsamp, fcutoff, norder) % does LOW-PASS filtering of an input signal 'data' using a Butterworth % filter % Inputs: % data - vector of input data % fsamp - sampling rate of input data, Hz % fcutoff - desired lowpass cutoff frequency, Hz % norder (optional) - filter order. If not specified, defaults to '2' % set default filter order if needed if nargin ==3, norder = 2; end % normalize cutoff frequency by sample rate Wn = fcutoff/(fsamp/2); % get filter coefficients [b,a]=butter(norder,wn,'low'); % filter the input data y = filter(b,a,data); return

Band-pass filter wrapper code function y = BPfilterWrapper(data, fsamp, fcutofflow, fcutoffhi, norder) % function y = BPfilterWrapper(data, fsamp, fcutofflow, fcutoffhi,, norder) % does BAND-PASS filtering of an input signal 'data' using a Butterworth % filter; pass band is from % Inputs: % data - vector of input data % fsamp - sampling rate of input data, Hz % fcutofflow - desired lowpass cutoff frequency, Hz % fcutoffhi - desired hipass cutoff frequency, Hz % norder (optional) - filter order. If not specified, defaults to '2' % set default filter order if needed if nargin ==3, norder = 2; end % normalize cutoff frequenciesby sample rate W1 = fcutofflow/(fsamp/2); W2 = fcutoffhi/(fsamp/2); % get filter coefficients [b,a]=butter(norder,[w1 W2]); % two cutoff frequencies means bandpass % filter the input data y = filter(b,a,data); return