Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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.

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91644449
  • Price:- $50

Guranteed 36 Hours Delivery, In Price:- $50

Have any Question?


Related Questions in DBMS

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

We can represent a data set as a collection of object nodes

We can represent a data set as a collection of object nodes and a collection of attribute nodes, where there is a link between each object and each attribute, and where the weight of that link is the value of the object ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

Analytic reportpurpose the purpose of this task is to

Analytic Report: Purpose: The purpose of this task is to provide students with practical experience in working in teams to write a Data Analytical report to provide useful insights, pattern and trends in the chosen/given ...

Question as explained throughout this course entity

Question: As explained throughout this course, entity relationship modeling is a critical element of database design. If the database is not properly modeled, it is unlikely that the database will be properly developed. ...

The relation memberstudentid organizationid roleid stores

The relation Member(StudentId, OrganizationId, RoleId) stores the membership information of student joining organization. For example, ('S1', 'O2', 'R3') indicates that student with Id 'S1' joined the organization with i ...

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As