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

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 ...

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 ...

The groceries datasetimagine 10000 receipts sitting on your

The groceries Dataset Imagine 10000 receipts sitting on your table. Each receipt represents a transaction with items that were purchased. The receipt is a representation of stuff that went into a customer's basket. That ...

You are in a real estate business renting apartments to

You are in a real estate business renting apartments to customers. Your job is to define an appropriate schema using SQL DDL in MySQL. The relations are Property(Id, Address, NumberOfUnits), Unit(ApartmentNumber, Propert ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

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 ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Relational database design a given the following business

Relational Database Design A) Given the following business rules, identify entity types, attributes (at least two attributes for each entity, including the primary key) and relationships, and then draw an Entity-Relation ...

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 ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

  • 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