Ecet345- what is the fundamental frequency of the ecg


Assignment: Signals and Systems

Class Room Activity Observation of wave-shapes and their spectrum

Objective of the lab experiment:

The objective of this experiment is to observe the shapes of different kinds of signals such as sine waves, square waves, and so on and to study how the shape of a signal alters its spectrum.
Equipment list:

• MATLAB

Theory:

In this lab, you will observe some experimentally recorded signals and examine their wave shapes and their spectrum. Jean Baptiste Joseph Fourier has shown that virtually any waveform regardless of its wave-shape can be recreated by adding together sinusoids of appropriate amplitudes, frequencies, and phase. The spectrum of a signal is a mathematical or graphical description of all the sinusoids which, when added together, will recreate the original waveform whose spectrum is given. In this lab we concentrate on periodic signals. These are signals that repeat themselves at regular intervals. Such periodic signals are often observed in nature; an example is the ECG or electrocardiogram signal, which displays the electrical activity that occurs in some specialized cells in the human heart and causes the heart to contract and relax at regular intervals (typically 60 times per minute in a healthy human being). As a historical side note, in ancient Mesopotamia, time was measured as a function of human heart beats. This idea caught on and spread to other places and that is why time in clocks is, to this day, measured to base 60 (60 seconds in a minute, etc.) while most other units of measurements are base 10.

Procedure:

For your convenience, the many signals which we will be studying, have already been experimentally recorded using a sampling rate of 1024 samples per second and are available in waves.mat file. The .mat extension is used for binary files which are quite compact (compared to ASCII files) and contains numerical data that can be conveniently read by MATLAB. We shall load the .mat file into MATLAB, as described below, and then plot the wave shapes and spectrum of various signals.

Step 1:

Copy the file waves.mat (or its zipped version and unzip it) from the Doc Sharing or the lab area of the shell onto the desktop of the computer you are working on. Then log on to Citrix and open MATLAB version 7. Once in MATLAB, change the directory to the desktop of your local computer. The procedure for logging on to MATLAB and changing the directory is given in Appendix A in step-by-step detail.

Step 2:Load the data file waves.mat

To load the data file , go to the command window of MATLAB and give the command load waves.mat as shown below.

>> load waves.mat

This will cause the data to be loaded into MATLAB.
Then give the command "whos" as shown below.

Your workspace should show an output as shown below. From this information, one can deduce how many data points are in each signal.

>> whos
Name Size Bytes Class
AM_signal 7168x1 57344 double array
ECG 24576x1 196608 double array
sawtooth_wave 3072x1 24576 double array
sinc_function 24576x1 196608 double array
sine_wave 4096x1 32768 double array
square_wave 45056x1 360448 double array
time 45056x1 360448 double array
Grand total is 1536,00 elements using 1,228,800 bytes

At this point, the data is loaded in MATLAB memory and we are ready to observe the wave shapes of different signals.

Step 3:

Our next step is to plot the data in MATLAB and observe the waveform. This is achieved by using the plot command. To see how this command is used, copy the file graph_sine_square.m from Doc Sharing onto your desktop, open it in MATLAB editor (Note: this file, and indeed all .m files, must be run through the editor and are not to loaded directly into the workspace, as we did with the waves.mat file), and run it by pressing F5 or by choosing the run (or save and run) command in the editor located in the Debug menu.

You will see figures as shown below showing the sine wave and the square wave.

Step 4:

Now proceed as follows:

1. Read the comments given in the program and write a new program (or modify this program) so that we plot the ECG and the sawtooth signal first in separate figures and then in a single figure with the sawtooth wave at the top. Choose an appropriate number of data points so that at least 4 cycles but no more than 10 cycles of either signal should show in the graph. Paste the program you created below followed by the three asked-for figures.

2. Now using the figures plotted by MATLAB, determine the frequency of the sawtooth and ECG signal. To do so, go to the Tools in the menu bar in the figure and choose Data Cursor. The cursor will change shape to a plus sign. Place the cursor, successively, on two adjacent peaks of the signal you are trying to measure and left click. When the cursor is on the signal, the x and y axis values of the point on which you have clicked will appear on the graph. If desired, you can create more than one data tip by right clicking on the data point. Using this method, determine the frequencies of the sawtooth and ECG signal and enter the answer below.

3. As the next part of the exercise, plot the AM_signal and the Sinc_function in two different graphs only and paste them below. Be sure to label the axes appropriately. The AM_signal displays what an amplitude-modulated signal looks like. In amplitude modulation, the amplitude of a high-frequency signal (called a carrier) is changed according to the instantaneous value of a low-frequency signal. AM is used extensively in radio broadcasting. In the data we are observing in this lab, a 100 Hz carrier wave is amplitude modulated by a 10 Hz signal. So in your figure you will see a high frequency signal whose amplitude is changing slowly (at 10 Hz rate). Choose an appropriate number of data points so that your plot shows approximately four cycles of 10 Hz wave.

The Sinc function is a very important function in signal processing, So it is important to become familiar with it. Once again, plot about four cycles of Sinc function.

Step 5:

As the next part of the lab, we examine the spectrum of the signals. As noted earlier, the spectrum of a signal is a graphical or mathematical description of all the sinusoids that are present in the signal or that constitute the signal. The spectrum of a signal is obtained, in MATLAB, by using the key word fft, which stands for Fast Fourier Transform. This transform is used to convert a periodic time domain signal into its equivalent representation in frequency domain, i.e. its spectrum. We shall be studying this transform in detail at a later time in this course but for now we simply use MATLAB to apply this transform to experimentally measured data. To see how MATLAB is used for this purpose, install the file "spectrum_of_waves.m" on your desktop (it is available in Doc Sharing or the lab area of the shell) and open it in MATLAB editor. When you run this program you will see the figure below, which represents the spectrum of the sine wave.

Now using the data cursor in the tools menu of the figure plotted by MATLAB, determine the frequency and amplitude of the dominant spectrum component visible in the graph and enter them below.

Frequency of the dominant component of the spectrum = 50Hz

Amplitude of the dominant component of the spectrum =

Now answer the questions below.

1. Does the frequency and amplitude of the dominant component agree with the values obtained from the graph of the sine wave that you obtained when you ran the file graph_sine_square.m? Briefly explain what the results are teaching you about this spectrum plotting tool.

Step 6:

Now modify the spectrum determination program to determine the spectrum of ECG signal and paste the spectrum below. Use the "zoom in" tool, shown as a magnifying glass with a plus sign in it just below the menu bar, to draw a rectangle around the first 20 harmonics such that it covers the entire y axis scale of the figure but only the desired part of the x axis, and magnify it so that you can easily see the first 20 harmonics separately.

Now using the data cursor tool,answer the questions below.

1. What is the fundamental frequency of the ECG signal?

2. Why are there so many components in the spectrum of the ECG signal compared to the sine wave signal? What is this result teaching you about the effect of wave shapes on the spectrum of the signal?

Solution Preview :

Prepared by a verified Expert
Other Engineering: Ecet345- what is the fundamental frequency of the ecg
Reference No:- TGS02174533

Now Priced at $35 (50% Discount)

Recommended (91%)

Rated (4.3/5)