Biomedical Digital Signal Processing Final Project
Project Description
You are given two sets of biomedical signals. The first set of data (erp00.txt) is an Event Related Potential (ERP) signal recorded intracortically from an awake and conscious rat's primary visual cortex in response to bright and brief (5 msec in duration) flashes of blue light. The second set of data (erp08.txt) is an ERP signal recorded from the same rat at the point of loss of conscious (LOC) when the anesthetic concentration was raised to 0.8% halothane. Each data set consists of five columns of data (five single-trial ERP's), where each column represents a single-trial ERP recorded in response to a single flash. The units are µV.
The ERP data were acquired at a sampling frequency (Fs) of 500 Hz. The signals were appropriately band-limited to 0.1-100 Hz.
1. Filtering
Both ERP data sets contain electrical interference 60 Hz noise. Hence, your job is to design and implement a digital notch filter to filter out the 60 Hz noise from each column of the two ERP datasets, i.e. you need to filter each column of data in each of two datasets.
You will design your filter using an advanced filter design functionality of the MATLAB DSP Systems Toolbox and object-oriented programming. Specifically, you will create a fdesign filter specification object, will then design your filter using design function, and will then implement filtering of the given signals using the function filter. In this assignment, you are required to use this particular filter design methodology.
Your filter must achieve at least 150 to 200 dB attenuation at 60 Hz, and 0 dB attenuation at 50 and 70 Hz. You are required to investigate four different filter designs and select the best one based on quantitative assessment of the filter's performance. Display the frequency response plots (magnitude and phase responses as a function of cyclic frequency) and quantitatively assess each filter's performance. Create a table summarizing the quantitative performance of all tested filters and identify the best filter to meet your specifications. In your table, make it clear which is the selected filter. It is up to you to identify the key assessment criteria of your filters but it is imperative that you quantitatively show that your design specifications have been met. The comments in your code must clearly describe the specifications of your filter and must describe the choice of input parameters used in your implementation.
Use fvtool or similar to display and assess the performance of your filters.
Select the best performing filter and use it to filter your ERP signals in the waking and LOC states. You are to filter each column of data in the waking and LOC datasets. Plot the unfiltered and filtered ERP signals as a function of time in the waking and LOC conditions. To do so, you may want to create a 5x1 display where each subplot corresponds to a single column of ERP data in each of two conditions (waking and LOC). Two figures would be needed here: one before and one after filtering.
2. Magnitude Spectrum
Compute and plot the magnitude spectra of the waking and LOC ERP signals before and after filtering as a function of cyclic frequency. Use either the fft or dsp.fft functions for spectral computations. The spectrum must be computed for each column of ERP data and then averaged across five resultant spectra. As such, the final spectral plot must be an average of five spectra of the given ERP dataset. You are to use this method for both ERP datasets.
Is the 60 Hz component still present in the filtered signals? What is the attenuation at 50 and 70 Hz? Make quantitative measurements to support your answer.
3. Gamma (25-45 Hz) ERP Analysis
Now design the bandpass filter to filter the original waking and LOC ERP datasets such that only 25-45 Hz frequencies remain in the signals. Both filters must have 0 dB attenuation at 25 and 45 Hz, and at least 100 dB attenuation at 15 and 55 Hz (if possible). The passband ripple cannot exceed 0.01 dB. You must implement Chebychev Type I digital filter to meet these specifications. Here, you are required to test two Chebychev Type I filters (different orders, cutoffs, etc.) and identify the best performing filters. In this part of the assignment, you are required to use the functions cheby1 and filtfilt from Signal Processing Toolbox.
The filtering is to be performed on each column of the original ERP signals in the waking and LOC conditions. Plot the filtered ERP signals as a function of time. Similar 5x1 display may be a good option here as well.
Now write a MATLAB program to compute the average power in each column of the filtered gamma-ERP signals in the waking and LOC conditions. The average power integral was described in BE3800 as Px = limT→∞0∫T |x(t)|2. Write a MATLAB program to approximate this integral; T corresponds to the entire duration of each column in the given ERP dataset. Feel free to use trapz.m or polyarea.m MATLAB functions to compute a numerical integral. You may want to re-visit your MATLAB assignments in BE3800 to remind yourselves of this methodology.
Average the computed power values across all columns in the waking and LOC signals. Create a bar chart to display the average of the average power in the filtered gamma-ERP signals in the waking and LOC states. Did they power differ in the two conditions?
4. Final Document
Submit a Word document (PDF will not be accepted!) containing a title page, all MATLAB figures (ERP data plots (filtered and unfiltered), all frequency response plots, magnitude spectra of filtered and unfiltered signals, gamma ERP signals, and the power bar chart.), and data tables with quantitative measurements in support of your observations. The figure and table legends must provide a complete description of what is being plotted, along with concise description of your results and conclusions, and brief methodological descriptions. Data tables must present quantitative comparison data in support of your observations.
Next to the figure or table include a corresponding well-commented MATLAB code. Each section of your code must be commented with clear explanations of your implemented methodology and your design choices. In your comments, also include the name of the student responsible for this section.
If completed with a partner, your document must also contain a table describing the division of responsibilities. Each partner must perform an equal share of both technical and non-technical (report) work.
The document must be professionally written. It should be free of spelling and grammatical errors. All figures and tables must be appropriately captioned and presented under corresponding text headers.
It is highly recommended that the document be divided into logical sections with the corresponding headers.
Attachment:- Assignment Files.rar