BIOE 198MI Biomedical Data Analysis. Spring Semester Lab6: Signal processing and filter design

Similar documents
University of Bahrain

ECEGR Lab #8: Introduction to Simulink

Experiment 8: Sampling

Experiment 6: Multirate Signal Processing

Electrical & Computer Engineering Technology

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

Sampling and Reconstruction of Analog Signals

C.11 Sampling and Aliasing Solution

Armstrong Atlantic State University Engineering Studies MATLAB Marina Sound Processing Primer

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

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

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

Laboratory Assignment 4. Fourier Sound Synthesis

EGR 111 Audio Processing

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

FAST Fourier Transform (FFT) and Digital Filtering Using LabVIEW

Window Method. designates the window function. Commonly used window functions in FIR filters. are: 1. Rectangular Window:

Experiment 2 Effects of Filtering

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

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

Laboratory Assignment 5 Amplitude Modulation

Signal Processing. Introduction

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

Signal Processing Toolbox

CHAPTER 14. Introduction to Frequency Selective Circuits

Adaptive Filters Application of Linear Prediction

ECE 2713 Design Project Solution

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

Introduction to Simulink

Limitations of Sum-of-Sinusoid Signals

EBU5375 Signals and Systems: Filtering and sampling in Matlab. Dr Jesús Requena Carrión

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

PYKC 7 Feb 2019 EA2.3 Electronics 2 Lecture 13-1

Module 3 : Sampling and Reconstruction Problem Set 3

Additive Synthesis OBJECTIVES BACKGROUND

Lab S-8: Spectrograms: Harmonic Lines & Chirp Aliasing

EE 422G - Signals and Systems Laboratory

Sound synthesis with Pure Data

Brief Introduction to Signals & Systems. Phani Chavali

Comparison of a Pleasant and Unpleasant Sound

1 PeZ: Introduction. 1.1 Controls for PeZ using pezdemo. Lab 15b: FIR Filter Design and PeZ: The z, n, and O! Domains

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

AC : FIR FILTERS FOR TECHNOLOGISTS, SCIENTISTS, AND OTHER NON-PH.D.S

Lab 6 - MCU CODEC IIR Filter ReadMeFirst

Lab 4 Digital Scope and Spectrum Analyzer

Lab 4: Using the CODEC

EEL 4350 Principles of Communication Project 2 Due Tuesday, February 10 at the Beginning of Class

Discrete-Time Signal Processing (DTSP) v14

Advanced Audiovisual Processing Expected Background

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

SIGNALS AND SYSTEMS LABORATORY 3: Construction of Signals in MATLAB

LAB 2 Machine Perception of Music Computer Science 395, Winter Quarter 2005

1. page xviii, line 23:... conventional. Part of the reason for this...

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

Digital Filter Design using MATLAB

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

Fourier Series and Gibbs Phenomenon

Lecture 7 Frequency Modulation

Lecture 17 z-transforms 2

LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS

EE 470 Signals and Systems

ECE 3793 Matlab Project 4

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

Project 0: Part 2 A second hands-on lab on Speech Processing Frequency-domain processing

ECE 203 LAB 2 PRACTICAL FILTER DESIGN & IMPLEMENTATION

Signal processing preliminaries

ECEn 487 Digital Signal Processing Laboratory. Lab 3 FFT-based Spectrum Analyzer

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

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

Multirate Digital Signal Processing

DIGITAL SIGNAL PROCESSING (Date of document: 6 th May 2014)

Lab 3 FFT based Spectrum Analyzer

Lab 1 - Simulation of Communication System with ECG Signal Transmission

System analysis and signal processing

Post-processing data with Matlab

Lab 4 Fourier Series and the Gibbs Phenomenon

eegutils Documentation

Lowpass A low pass filter allows low frequencies to pass through and attenuates high frequencies.

Massachusetts Institute of Technology Dept. of Electrical Engineering and Computer Science Spring Semester, Introduction to EECS 2

Digital Signal Processing ETI

Digital Signal Processing ETI

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

Phase Vocoder Report for Audio Signal Processing. Gerald Leung V

ECE 5650/4650 MATLAB Project 1

Part II Data Communications

ELEC3104: Digital Signal Processing Session 1, 2013

Discrete Fourier Transform

DIGITAL SIGNAL PROCESSING TOOLS VERSION 4.0

SIGNALS AND SYSTEMS LABORATORY 13: Digital Communication

Final Exam Practice Questions for Music 421, with Solutions

Filters. Phani Chavali

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

Moving from continuous- to discrete-time

Reference Sources. Prelab. Proakis chapter 7.4.1, equations to as attached

DSP Laboratory (EELE 4110) Lab#11 Implement FIR filters on TMS320C6711 DSK.

EE25266 ASIC/FPGA Chip Design. Designing a FIR Filter, FPGA in the Loop, Ethernet

Laboration Exercises in Digital Signal Processing

APPENDIX A-5 THE CORRESPONDING FREQUENCY DOMAIN VALIDATION. APPENDIX A-5 shows plots for the corresponding time domain validation response

Memorial University of Newfoundland Faculty of Engineering and Applied Science. Lab Manual

Final Exam Solutions June 7, 2004

Transcription:

BIOE 198MI Biomedical Data Analysis. Spring Semester 2018. Lab6: Signal processing and filter design Problem Statement: In this lab, we are considering the problem of designing a window-based digital filter (lowpass, highpass, bandpass) using MATLAB function fir1. Section 1 Load the MATLAB built-in audio file chirp. look at the workspace and find out what s in the chirp file. Q1: What is the sampling frequency( Fs) of the data? What is the meaning of sampling? Based on y and Fs, how can we compute the time duration of y? Section 2 Use MATLAB functions to record 3 seconds of your own voice data. step 1: First create an audio block with specific sampling frequency, number of bits per sample and number of channels. recobj = audiorecorder(fs,numbit,numchannel); step 2: Use function recordblocking to record certain time of voice data recordblocking(recobj, Time); step3: Use function getaudiodata to store the audio signal into an array Q2: play the recorded audio signal and describe the effect of NumBit( bit depth). NumBit can be 8, 16 or 24. 1

Section 3 Combine the chirp and recorded data together. Notice that the chirp data y is a shorter variable than our recoreded data, therefore we can not directly add them together. Chirp signal (y) recorded Duplicate the chirp signal first, option 1: chirp = [y ; y] Q3: Why do we use a semicolon? option 2: chirp = repmat(y,2,1); duplicated Chirp signal (y) Then add same amount of elements together to create the combined signal. combined = chirp(1:length(recorded))+recorded; Q4: What if in Section 2 we recorded 4 seconds of audio signal instead of 3 seconds, how should we manipulate the chirp signal? Section 4 Play the recorded signal, the chirp signal and their combination. Plot all three signals in the time domain. In time domain, is there a way to separate each signal(the recorded and chirp signal) from the combined signal? Obviously no. Because both signals are on top of each other. In other words, they re overlapped with each other. That s why we need to introduce the Fourier transform. 2

Generally speaking, Fourier transform transfers a time domain signal into frequency domain, which allows you to tell what frequencies are present in your signal. The Fourier transforms (Matlab 1D Fourier transform function fft ) take a signal and express it in terms of the frequencies of the waves. t recorded fftshift(fft(recorded)) f RECORDED Q5: What is Nyqvist frequency? What does the function fftshift do? We only plot positive side of the frequency spectrum (0 to Nyquist frequency). Look at the frequency spectrum of the signals(figure 2) and find out which one has higher frequency. If we want to separate the chirp and recorded data in frequency domain, what is the cutoff frequency we should use? 3

%% Section 5 Design a window-based lowpass filter to filter out the chirp sound. fir1(order, CutOff/Nyquist, low ); To use the MATLAB built-in window filter, we need at least 3 inputs, the order of the filter, cutoff ratio, and filter type(low pass, high pass or bandpass). The cutoff ratio can be calculated with equation Cutoff ratio = Cutoff frequency Nyquist frequency = Cutoff frequency Sampling frequency/ 2 Q6: Use 10, 20, 50, 100, 500 as order number and describe the magnitude response of the filter. %% Section 6 Design a window-based highpass filter ( bhi ) to filter out the recorded sound. 4

Signal processing and filter design assignment You are given a MATLAB generated chord signal chord_sig.mat ; The variable sig contains multiple pitches in it. However, they are all summed together in time domain. Use what you learned in lab to separate each pitch. Describe how you extract each note from the signal and justify your answer. Create a small piece of audio song, for example Twinkle, Twinkle, Little Star, Mary had a little lamb, The wheels on the bus, etc. After creating the song, use MATLAB function audiowrite to export the song. (eg. audiowrite( TwinkleStar.wav,song,Fs)) Answer all the in-lab questions For your reference, here is a table of the frequencies for several notes. Note C4 (middle C) do 262 D4 re 294 E4 mi 330 F4 fa 349 G4 so 392 A4 la 440 B4 ti 494 C5 523 Frequency (Hz) 5