Create an xy plot of ecg vs. time

Assignment Help Database Management System
Reference no: EM13969506

I. Background

In this project we will use Excel to analyze some simulated electrocardiogram (ECG) data for premature beats.

II. Procedure

As you work on your solution, save the file often so that you will not lose work previously done if there is a system failure.

Start a new Excel workbook, and save it immediately under the name uuuuuP4.xls, where uuuu is the first five characters of your cougarnet account username. You must format your spreadsheet to look professional.

You should create two worksheets for use as described below. Label the sheets "Data" and "Plots," and follow the steps below to set up the worksheets.

Step 1: Set up areas in the Data sheet for the TITLE (including your name and email)

Step 2: Set up DESCRIPTION of the task.

Step 3: Set up an area labeled PARAMETERS. In this area, place any parameters (perhaps in named cells) that your calculations will be using.

Step 4: Finally, follow all of this with the CALCULATIONS area where you begin computations for each task.

Save your work often so that you do not accidentally lose hours of work!

Objective:

You will import a data file of ECG data and process it looking for premature beats. You will do this by first detecting the times of occurrence of the large R-wave peaks in the data. Then you will measure the time duration between consecutive R-wave peaks. Any R-wave peak that occurs after a duration that is unusually short will be considered premature. You will detect the first such premature beat and report its time of occurrence and duration.

Data File: The initial data set you will work with is named p1inputdata.txt and is located in the assignment directory on the course website. The file contains a simulated ECG sample. (These sample values are not particularly close to true ECG values. For one thing, there are only about 40 samples per "heart beat", representing a sample rate approximately 1/3 of what it should be. But an accurate ECG data set would have been larger than we would want to work with; and you must admit, the simulated data doesn't look too bad!) Copy the file to your MyProj1 directory. You will import that data into your worksheet; however, your worksheet must be kept sufficiently general so that when we import a different file when grading your project, it will still execute correctly--without anybody making additional changes. We will execute your workbook with a different set of values! Both columns of data will be different.

The format of the data file is : Each line of the file has two values, separated by a tab. The first value is a time in milliseconds (ms); the second value is the ECG value in millivolts (mV).

Important: In each of the tasks below, when you are asked to create a column of data:

- Label the column appropriately at the top.

- Color the column as requested in the task.

- Consistency: Please be consistent with using BLANK or 0. If you start with BLANK, use that till the end.

- You may wish to insert additional columns with intermediate results that help you compute the requested column. For any such intermediate columns, color them the same as the requested column and group them side-by-side. Place the label over the requested column.

Task 1: (Import the data) On the Data worksheet in the Calculations area, import the data from p1inputdata.txt. Label the first column "Time (ms)" and the second column "ECG (mV)". Color both of them light gray. They will be the first two columns in a series of columns, so make them columns A and B. As stated above, when we grade your project, we will use a similarly organized, but different file. However, you may assume that the file will always have the same number of rows as p1inputdata.txt, so you can structure your spreadsheet accordingly.

Task 2: (Plot the ECG data) Create an XY plot of ECG vs. time, and place the plot on the Plots worksheet. Give the plot an appropriate title and labels for axes, and adjust various parameters of the plot to make it look pleasing and professional. Resize it to approximately the width of the screen.

Task 3: (Filter the ECG) As you can see from the plot, the ECG has a wandering baseline. You will first need to filter the ECG to remove that low frequency component. A simple (though imperfect) algorithm to use is to subtract from each value the mean of the values in a "window" around it. This works if the undesired baseline component is fairly constant over the window, but the ECG itself varies positive and negative and does not contribute much to the mean. For example, for a window of 2M+1 values, the filtered value of yn (the value of output y at data index n) would be:

A reasonable window width for this exercise would be 7, and thus a value of M=3. To the right of the ECG column add a yellow column that produces the filtered ECG. You will have to take care of the endpoints. The first and last three values cannot use the formula above exactly. Instead, you will have to adjust the window so that it is not centered over the data point being filtered. If you make the correct adjustments, you should be able to filter the entire ECG column in a reasonable way.

Task 4: (Plot the filtered ECG data) On the Plots worksheet, place a second plot showing the filtered ECG directly under the first plot. Make it look professional in the same way as the first plot.
Pause for Problem Solving: Now study the data carefully. Reread the Objective above. Can you figure out an algorithm for meeting the objective before reading the steps outlined below?

Task 5: (Find local peaks) The next step is to find peaks, or local maxima, of the data. (We do this so that we can find from among these the tall peaks in the next task.) In a light purple (lilac) column to the right of the filtered data, enter a formula that will display one result (perhaps 1, or the filtered value itself) if the current filtered value is a local maximum, or another result (perhaps 0, or BLANK) if the current filtered value is not a local maximum. Again, you will have to take care of the end points; it is reasonable in this case to skip the first and last values in the column, since it is not possible to determine if they are local maxima.

Task 6: (Find R-wave peaks) We will say that a local peak is an R-wave peak if it is at least 5 times larger than the median value of all of the local peaks. Compute the median value of the local peaks and store it in a named labeled cell called "MedianPeak" in the Parameters area. Next, in a light blue column to the right of the local peaks, enter a formula that will display one result (perhaps 1) if the current filtered value is an R-wave peak, or another result (perhaps 0, or BLANK) if the current filtered value is not an R-wave peak.

Task 7: (Compute durations) We now need to compute the durations between consecutive R-wave peaks. Do this by creating two pink columns to the right of the R-wave peaks. In the first column, create a counter that starts at 1 in the row following each R-wave peak and increments for each row (i.e., for each time index), reaching a maximum at the next R-wave peak. There is one exception: Since the ECG data begins somewhere in the middle of a duration, the first duration will appear to be artificially short; therefore, start the first counter at a high value, say, 1000, so that the computed first duration cannot possibly be detected as premature.

In the second column, enter a formula that will display one result ( the duration value itself) on each row corresponding to an R-wave peak, or another result (perhaps 0,BLANK) if the current row does not correspond to an R-wave peak.

Note: The description above refers to counting by ones, so that duration would be in units of "number of samples." However, in Task 9 below you must report the final premature duration in units of milliseconds. You can choose either to convert to milliseconds in Task 9 if you wish, or in this task you can do the counting in milliseconds. Therefore, either in this task or in Task 9, create a named labeled cell called "Interval" in the parameters area that stores the sample time interval in milliseconds. Since the time intervals in the first column of data are assumed to be uniform, simply take the difference between the first two time values to obtain the sample time interval.

Task 8: (Find premature beats) We will say that an R-wave peak is premature if its duration since the previous R-wave peak is less than 85% of the median value of all the durations (why median, and not mean?). First, compute the median value of the durations and store in a named labeled cell called "MedianDuration" in the Parameters area. Next, in a green column to the right of the durations, enter a formula that will display "premature" for each row with a premature R-wave peak, "normal" for each non-premature R-wave, and BLANK for the other rows.

Task 9: (Detect first premature beat) The previous task should have produced a column indicating which beats were premature and which were normal. In a few labeled cells to the right of that column, with a heavy red border around these cells, compute and report the following:

- The time value (from the first column) of the R-wave peak corresponding to the first premature beat.

- The actual duration in milliseconds of the first premature beat.

III. Turn in Your Project

Submit your final Excel file to Project 1 on Blackboard Learn. Projects delivered by email will not be accepted. You should always verify files have uploaded properly after submission.

Remember that projects turned in after the due date will not be accepted.

Reference no: EM13969506

Questions Cloud

Examine the impact of the media on gender socialization : Examine the impact of the media on gender socialization and stereotypes. In this discussion forum, students are required to provide a reaction or brief summary and analysis of a selected supplementary material (e.g. professional web-site, journal ..
What is the profit that studio expects to make : How many CDs should Top Gun expect to sell at a discount? What is the profit that studio expects to make?
Problem regarding the issue of debentures : As Secretary of Ouse Ltd write a memorandum for the Board explaining the differences between raising finance: (a) by an issue of shares;
Analyze the itil service management guidelines and principle : Describe the software engineering process, the challenges in managing software development activities, and the potential interface issues from the software development perspective.
Create an xy plot of ecg vs. time : Create an XY plot of ECG vs. time, and place the plot on the Plots worksheet. Give the plot an appropriate title and labels for axes, and adjust various parameters of the plot to make it look pleasing and professional. Resize it to approximately..
How many books does borders expect to sell at a discount : The marginal production cost for the publisher is $1 per book. How much profit does the publisher make given Borders actions?
Explain to jane what action she should take : Jane, who is a minority shareholder not on the board, gets no dividends and wishes to do something about this state of affairs. Explain to Jane what action she should take.
What are the central beliefs of islam : What are the central beliefs of Islam, and how are they reflected in the Five Pillars? What is the origin and importance of the Qur'an? What are the Islamic understandings of the Judaic and Christian traditions
Proceed in practical terms : Write a letter to Eric advising him and telling him how the group should proceed in practical terms.

Reviews

Write a Review

Database Management System Questions & Answers

  Determining the matrix form of game

Assume a game with two players, A and B, who raise one or both hands concurrently. A wins if total number of hands raised is odd, and B wins in other way.Write down the matrix form of the game. Is there a pure strategy solution? Explain your answer..

  Create database management system for bike shop

Your job is to create a database management system for bike shop who ‘buys' and ‘sells' new and second-hand bikes, and also parts of bike. Bike is constructed with parts while part can be fitted to different bikes.

  Draw relationship diagram for arrays

Information Gathering Component is very important to a shopping cart system. You really want to develop a good algorithm for it. As a professional practice, you decided to first make a working plan in pseudocode before putting hands.

  List different entities-objects-logical processes-data flows

List the different entities or objects, logical processes, data flows, and data stores that are involved, starting from the time you submitted your time sheet.

  Discuss optimization techniques specific to data warehousing

Demonstrate the basic mechanisms for accessing relational databases from various types of application development environments.

  How to set title criteria for more than one title position

I am having a problem with criteria range. I do not know how to set two different criterias in one column. I need to ADVANCE FILTER all of the Clerks (1 and 2) and the Sect. 1 workers who make more than $5.50/hr

  Modify oracle table data using the correct sql statements

Explain how you could delete the IT department without deleting all the employees who work for that department.

  First - second or third normal form

How many entities are shown by this relation?

  Web server vulnerabilities

Describe at least three web server vulnerabilities and how they are typically exploited. Provide unique answers here, posting early will help.

  Create a relational database schema

Draw the ER diagram for the database described above and create a relational database schema for this model assuming

  Find three different standards practices from entities

Find at least 3 different standards / best practices from entities that you consider authoritative in this field for both Server and Database securing and hardening (that is 6 standards in total).

  Database management system

Should define, explain, and discuss one of the following: Database management system

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd