Technical Articles

Teaching Medical Instrumentation at the University of Washington

By Dr. Ceon Ramon, University of Washington

Students at the University of Washington (UW) use MATLAB® and other MathWorks products in one of our most popular courses—EE436: Medical Instrumentation. EE436 has been offered at UW in one form or another for almost 15 years. The growing demand for this course among upper-division undergraduates and first-year graduate students reflects the growth of bioengineering as a discipline.

Lectures and weekly three-hour laboratory sessions introduce topics including EEG and ECG amplifier design, biosensors, bioelectrodes, cell physiology and nerve conduction models, blood flow and cardiac electrophysiology, brain anatomy, EEG, and magnetic resonance imaging.

Lab Work Challenges and Solutions

There are several challenges in teaching a medical instrumentation course with a lab. First, there is the diversity of the subject material. Lab modules span electronic amplifier design, simulation of the electrical excitability of neuron membranes, and the analysis of electrocardiogram (ECG) and electroencephalogram (EEG) signals. The course also includes a medical imaging component in which students learn how magnetic resonance (MR) imaging works, how the MR signal is analyzed, and how the images are formed in the Fourier space.

A second challenge is incorporating work being done at other institutions. The neuronal membrane lab, for example, relies on a Hodgkin-Huxley simulator developed at Carnegie Mellon University. A third challenge is selecting computational tools that are familiar to our students and can provide an environment that encourages exploration and experimentation.

For the eight years that I have been involved with EE436, students have used MATLAB® and companion toolboxes to complete lab activities. MATLAB capabilities cover all the relevant disciplines, including electronics and filter design, image processing, and signal processing. UW students entering the course have been exposed to MATLAB throughout their academic careers and can rapidly learn and apply new functionality needed to complete the labs. The Hodgkin-Huxley simulator we use was also written in MATLAB. Reading and writing MATLAB code helps students gain insight into the principles that underpin the course material, while running the completed MATLAB applications illustrates the practical value of the medical instrumentation in action.

Signal Amplification and Neuron Simulation

In the first lab, students design amplifiers for ECG and EEG signals. This work is a first step into bioengineering for many of the students with an electrical engineering background. MATLAB is not required for this lab, but some students use it to simulate the signal amplification.

In the second lab, students study how action potentials (electrical impulses) are initiated and propagated in nerve cells. Using a MATLAB based implementation of the nonlinear ordinary differential equations in the Hodgkin-Huxley model, students change the concentration of the sodium, potassium, and calcium channels in the neuron. They then run simulations to examine the effect of these changes on the propagation of the electrical impulse along the nerve fiber and to see how the neuron fires.

Analyzing EEGs

An EEG measures electrical activity in the brain, typically by recording signals from electrodes placed on the scalp. In the third lab, students use MATLAB, Signal Processing Toolbox, and Filter Design Toolbox to analyze these signals by filtering in different bands, computing the power spectral densities of the EEG signals (Figure 1).

Figure 1. An EEG trace above the top of the head and its spectral characteristics. Click on image to see enlarged view.

In a typical experiment, students analyze 128- or 256-channel EEG data captured while a test subject silently names objects. The test starts with a one-second baseline measurement before the object is shown. The students then observe how this power spectral density changes as the test subject’s visual cortex (located in the back of the head) becomes more active. Increased visual cortex activity is immediately followed by increased activity in the language cortex located in the top-left region of the brain. The students visualize the data in contour plots that reference the location of the electrodes on the head (Figure 2).

Figure 2. A typical spatial plot of power spectral density (PSD) changes during an object-naming task. The subject’s nose is at the top of the plots. Click on image to see enlarged view.

The top row of plots is for baseline values, and the bottom row is for the PSD during the task. In each band, the PSD is higher during the task. In the essential language and visual cortex areas, the PSD values gradually increase from the lower band (25-30 Hz) to the higher band (35-40 Hz) and then decreases again in the 40-45 Hz band.

This lab is a favorite, as it brings students very close to the real-world application of medical electronics. Using MATLAB, students can visualize brain activity just as a doctor would in presurgical planning for epilepsy patients.

Building on Earlier Labs

The later labs in EE436 do not depend on work done in earlier labs, but the students do acquire more and more skills in filtering, signal processing, and power spectral computation throughout the semester.

The fourth lab involves analyzing the electrical activity of the heart using multichannel ECG data that covers the surface of the torso. As with the EEG lab, students use MATLAB to analyze the wave form of the ECG, calculate power spectral densities, and make contoured plots on the torso surface to see how the electrical activity vector of the heart changes from millisecond to millisecond. Students study the entire ECG tracing of a normal cardiac cycle, which consists of a P wave, a QRS complex, and a T wave. Analysis of the QRS complex lets them see how the electrical activity vector is rotating while the heart beats. Students write MATLAB code to compute the heart rate, variations in R-R interval, P-R interval, and the S-T interval. These interval values have clinical significance. In the ECG lab, students compute the power spectral densities of the normal and abnormal ECG signal (Figures 3 and 4).

Figure 3. A typical example of a normal and an abnormal ECG signal. Click on image to see enlarged view.
Figure 4. Power spectral densities describing how the power of the signal is distributed over the frequency and comparing signal power in a normal and an abnormal ECG. Click on image to see enlarged view.

Preparing for Further Research

By using MATLAB to analyze EEG and ECG signals, compute spatial profiles, simulate electrical impulses in neurons, and process MR signals and images, students in EE436 gain practical experience they can apply in real-world environments. Many students who have completed the course have gone on to receive advanced degrees before working for—or starting their own—medical device or medical imaging companies.

MATLAB enables engineering students to explore medical instrumentation in a familiar environment. Many students already have experience with MathWorks tools. The widespread use of these tools at other universities and companies makes it easy for us to take advantage of work being done elsewhere. MATLAB encourages experimentation and investigation of what-if scenarios while covering the wide range of disciplines needed for a career in bioengineering.

About the Author

Dr. Ceon Ramon is a senior research scientist in the Department of Electrical Engineering at University of Washington. He is also affiliated with the Regional Epilepsy Center and the integrated Brain Imaging Center at the University of Washington. His research interests include biomagnetics, MR image segmentation, and computer modeling of the electrical electrical (EEG) and magnetic (MEG, magnetoencephalogram) activity of the human brain.

Published 2007 - 91523v00

View Articles for Related Capabilities