Sei sulla pagina 1di 42

.

Electrocardiogram

(ECG) is a nearly periodic signal that reflects the activity of the heart. A lot of information on the normal and pathological physiology of heart can be obtained from ECG. However, the ECG signals being non-stationary in nature, it is very difficult to visually analyze them. Thus the need is there for computer based methods for ECG signal Analysis. One of the important technology used is simulation of ECG using MATLAB.

ECG

reflects the state of cardiac heart and hence is like a pointer to the health conditions of a human being. if properly analyzed, can provide us information regarding various diseases related to heart. However, ECG being a non-stationary signal, the irregularities may not be periodic and may show up at different intervals. studying ECG, Doctors can diagnose the disease and prescribe the required medications.

ECG,

By

An

ECG is a series of waves and deflections recording the hearts electrical activity from a certain view. Many views, each called a lead, monitor voltage changes between electrodes placed in different positions on the body. cardiac cell is surrounded by and filled with solutions of Sodium (Na+), Potassium (K+), and Calcium (Ca++). The interior of the cell membrane is considered to be negative with respect to outside during resting conditions.

Each

When

an electric impulse is generated in the heart, the interior part becomes positive with respect to the exterior. This change of polarity is called depolarization. After depolarization the cell comes back to its original state. This phenomenon is called repolarization. The ECG records the electrical signal of the heart as the muscle cells depolarize (contract) and repolarize.

Fig. The various views of ECG

Fig. Normal ECG Signal and its various components

The

impulses of the heart are recorded as waves called P-QRS-T deflections.


following is the description and significance of each deflection and segment :P wave indicates atrial depolarization (and contraction). PR Interval measures time during which a depolarization wave travels from the atria to the ventricles. QRS Interval includes three deflections following P wave which indicates ventricular depolarization (and contraction).

The

Q wave is the first negative deflection while R wave is the first positive deflection. S wave indicates the first negative deflection after R wave. ST Segment measures the time between ventricular depolarization and beginning of repolarization. T wave represents ventricular repolarization. QT Interval represents total ventricular activity.

Factors Affecting Nature Of ECG

In

routinely recorded ECGs, many types of noise and artefact are present. Noise is defined to be part of the real signal that confuses analysis (e.g. muscle movements) and artefact is defined to be any distortion of the signal caused by the recording process, such as electrode movement. problems in the environment have gained attention due to the tremendous growth of technology that has led to noisy engines, heavy machinery, high speed wind buffeting and other noise sources.

Noise

The

problem of controlling the noise level has become the focus of a tremendous amount of research over the years. types of predominant noise that commonly contaminate the signal are baseline wander (BW) noise, electromyographic (EMG) interference, and 50 or 60 Hz power line interference. Among them power line interference is a significant source of noise. Cables carrying ECG signals from the patients to the monitoring equipment are susceptible to electromagnetic interference (EMI) from the 50/60Hz power line noise.

Three

Many

attempts have been made to detect and eliminate noise sources and artefacts from the actual electrocardiographic signals. Analogue or digital filters are widely used to reduce the influence of interference superimposed on the ECG. goal for ECG signal enhancement is to separate the valid signal components from the undesired artifacts, so as to present an ECG that facilitates easy and accurate interpretation.

The

We

simulate the adaptive filter in MATLAB with a noisy tone signal and white noise signal and analyze the performance. MATLAB is used to get ECG to be filtered, hence takes less computational time and thus helpful to doctors for immediate medical prescriptions to heart patients.

Thus

The

name MATLAB stands for MATrix LABoratory. MATLAB was written originally to provide easy access to matrix software developed by the LINPACK (linear system package) and EISPACK (Eigen system package) projects. MATLAB is a high-performance language for technical computing. It integrates computation, visualization, and programming environment. Furthermore, MATLAB is a modern programming language environment: it has sophisticated data structures, contains built-in editing and debugging tools, and supports object-oriented programming. These factors make MATLAB an excellent tool for teaching and research.

Image processing involves changing the nature of an image in order to either 1. Improve its pictorial information for human interpretation, 2. render it more suitable for autonomous machine perception

Binary. Greyscale. True

colour, or RGB. Indexed.

Each

pixel is just black or white. Since there are only two possible values for each pixel, we only need one bit per pixel. very efficient in terms of storage.

Each pixel is a shade of grey Normally range from 0 (white) to 255(black) each pixel can be represented by eight bits, or exactly one byte Such images arise in medicine (X-rays), images of printed works

Here

each pixel has a particular colour Colour being described by the amount of red, green and blue in it. If each of these components has a range 0-255 the total number of bits required for each pixel is 24

Most

colour images only have a small subset of the more than sixteen million possible colours.

Imread Imshow Imaqhwinfo Size Imfinfo

to read the image to show the image information about the hardware install to know the size of image information about image

cat

- Concatenate matrices along the specified dimension horzcat - Horizontally concatenate matrices vertcat - Vertically concatenate matrices repmat - Create a new matrix by replicating and tiling existing matrices blkdiag - Create a block diagonal matrix from existing matrices

A scalar

is a 1-by-1 matrix A row vector of length say 5, is a 1-by-5 matrix. The program will start in a new window and once you see the prompt () you will be ready to begin MATLAB is case-sensitive, which means that a + B is not the same as a + b. x = [1 2 3 4 5] x=12345 we used the equal sign for assigning the variable name x to the vector, brackets to enclose its entries and spaces to separate them.

We

could have used commas ( , ) instead of spaces to separate the entries To create a column vector (MATLAB distinguishes between row and column vectors, as it should) we can either use semicolons ( ; ) We can suppress the output by using a semicolon ( ; ) at the end of the command line. MATLAB automatically assigns the variable name ans to anything that has not been assigned a name whos (is used to know the detail of variable we used) who, only provides the names of the variables that are active who

we

can erase it from memory using the command clear variable_name. the command save filename before exiting, causes all variables to be written to a binary file called filename.mat.

u = [0:8] v = [0:2:8] we specified the first entry 0, the increment value 2, and the last entry 8 To look at specific parts of the vector v(1:3) GIVES THE FIRST 3 ENTRIES OF THE VECTOR

Scalar Functions sin trigonometric sine cos trigonometric cosine tan trigonometric tangent asin trigonometric inverse sine (arcsine) acos trigonometric inverse cosine (arccosine) atan trigonometric inverse tangent (arctangent) exp exponential log natural logarithm abs absolute value sqrt square root

rem round floor ceil

remainder round towards nearest integer round towards negative infinity round towards positive infinity

max min length sort

sum
prod median mean std

largest component smallest component length of a vector sort in ascending order sum of elements product of elements median value mean value standard deviation

I=imread(pout.tif); level = graythresh(I); bw = im2bw(I,level); bw = bwareaopen(bw, 50); figure, imshow(bw) or figure, imhist(I) I2 = histeq(I); figure, imshow(I2) figure, imhist(I2) I2 = imadjust(I); figure, imshow(I2);

Eye Zeros ones diag Triu tril rand

identity matrix matrix of zeros matrix of ones extract diagonal of a matrix or create diagonal matrices upper triangular part of a matrix lower triangular part of a matrix randomly generated matrix

y m c r g b w k

yellow magenta cyan red green blue white black

. o x + * : -.

point circle x-mark plus solid star dotted dashdot

M-files:

Scripts and functions There are two types of m-files: script files and function files. Script files contain a sequence of usual MATLAB commands, that are executed (in order) once the script is called within MATLAB. Functions are files that can accept input arguments and return output arguments. The names of the file and of the function should be the same. Functions operate on variables within their own workspace, separate from the workspace you access at the MATLAB command prompt.

Potrebbero piacerti anche