Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an...

65
Biomedical Signals Signals and Images in Medicine Lecture 1 Dr Nabeel Anwar

Transcript of Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an...

Page 1: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Biomedical SignalsSignals and Images in Medicine

Lecture 1

Dr Nabeel Anwar

Page 2: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Books

1. The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

This book is written in simple English with minimum mathematics. The examples are very easy to understand. Consult this book for understanding a topic.

2. Biomedical Signal Analysis: A Case-Study Approach by Rangaraj M. Rangayyan.

This book has case study approach, most of the practical examples would be taken from this book.

Page 3: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

What we know so far…..

• Living organisms are made up of many component systems: the human body includes several systems. Each system is made up of several subsystems that carry on many physiological processes. Most physiological processes are accompanied by signals of several types that reflect their nature and activities

• The first link in the biomedical measurement chain is typically a transducer or sensor, which measures signals (such as a heart valve sound, blood pressure, or X-ray absorption)

• Some such electrical signals occur “spontaneously” (e.g., the electroencephalogram, EEG, ECG, EMG); others can be observed upon stimulation (e.g., evoked potentials (EPs)).

Page 4: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Examples of Biomed Signals

1. The action potential: Action potential (AP): electrical signal from a single cell when stimulated by an electrical current (neural or external). Recording an action potential requires the isolation of a single cell, and microelectrodes with tips of the order of a few micrometers to stimulate the cell and record the response.

Page 5: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

The electro-neuro-gram (ENG)

• The ENG is an electrical signal observed as a stimulus and the associated nerve action potential propagate over the length of a nerve. Conduction velocity in a peripheral nerve measured by stimulating a motor nerve and measuring the related activity at two points at known distances along its course.

Examples of Biomed Signals

Page 6: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Examples of Biomed Signals

EEG/ECoG and Evoked Potentials (EPs)

• The electroencephalogram (EEG) represents overall brain activity recorded from pairs of electrodes on the scalp.

• In special cases, brain activity may also be directly measured via electrodes on the cortical surface (the electrocorticogram, ECoG,) or via depth electrodes implanted in the brain.

• Another common class of neurophysiological signals used for clinical tests are auditory-, visual-, and somatosensory-evoked potentials (AEP, VEP, and SSEP, respectively). These signals represent the brain’s response to a standard stimulus such as a tone burst, click, light flash, change of a visual pattern, or an electrical pulse delivered to a nerve.

Page 7: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Examples of Biomed Signals

ECG (EKG)

• The activity of the heart is associated with a highly synchronized muscle contraction preceded by a wave of electrical activity.

• The ECG is usually characterized by several peaks, denoted alphabetically P-QRS-T.

EMG

• The activity of the muscles. (for details use lecture slides from bioinstruments).

Page 8: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Examples of Biomed Signals

The electro-gastro-gram (EGG)

Electrical activity of the stomach: rhythmic waves of depolarization and repolarization of smooth muscle cells. Gastric myoelectric activity is composed of mainly two complementary rhythms; slow wave activity, responsible for muscle contraction timing, and electrical response activity, responsible for triggering peristaltic contractions.

Page 9: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Examples of Biomed Signals

• The phono-cardio-gram (PCG)

PCG: vibration or sound signal related to the contractile activity of the cardiohemic system (heart and blood). Recording the PCG requires a transducer to convert the vibration or sound signal into an electronic signal: microphones, pressure transducers, or accelerometers.

Page 10: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• The carotid pulse (CP)

• Carotid pulse: pressure signal recorded over the carotid artery as it passes near the surface of the body at the neck. Pulse signal indicating the variations in arterial blood pressure and volume with each heart beat.

Examples of Biomed Signals

Page 11: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• The speech signal

Speech produced by transmitting puffs of air from the lungs through the vocal tract as well as the nasal tract. Shape of vocal tract varied to produce different types of sound units or phonemes which form speech.

Speech signal of the word “safety” uttered by a male speaker. Approximate time intervals of thevarious phonemes in the word are /S/: 0.2 − 0.35 s; /E/: 0.4 − 0.7 s; /F/: 0.75 − 0.95 s; /T/: transient at 1.1 s;/I/: 1.1−1.2 s.

Examples of Biomed Signals

Page 12: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Objectives of Biomedical Signal Analysis

1. Information gathering—measurement of phenomena to interpret a system.

2. Diagnosis—detection of malfunction, pathology, or abnormality.

3. Monitoring— obtaining continuous or periodic information about a system.

4. Therapy and control—modification of the behavior of a system based upon the outcome of the activities listed above to ensure a specific result.

5. Evaluation—objective analysis to determine the ability to meet functional requirements, obtain proof of performance, perform quality control, or quantify the effect of treatment.

Page 13: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Suggested readings for Lecture 1.

• DSP guide, CH3 (35-49): main lecture

• DSP guide, CH2 (all) : for understanding few concepts of CH3

• Lecture slides

Homework: Chapter 2 of Rangaraj’s book.

Solve problem 2.2.1, 2.2.2, 2.3 using matlab

You are provided with the .dat file readable in the matlab, plus the code to read it.

Page 14: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

You need to have a basic background about mean, standard deviation and variance of a data. (read chapter 2 of DSPguide).

Page 15: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential
Page 16: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

The Measurement chain

Page 17: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• Converting a continuously changing waveform (analog) into a series of discrete levels (digital)

Analog and Digital

Page 18: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Analog and Digital

00.2

2 0.4

4 0.6

4 0.8

2 0.9

81.1

1

1.2 1.2

4

1.2

71.2

41.2

1.1

10.9

8

0.8

20.6

40.4

4

0.2

20

-0.2

2-0

.44

-0.6

4-0

.82

-0.9

8

-1.1

1-1

.2

-1.2

6-1

.28

-1.2

6

-1.2

-1.1

1

-0.9

8-0

.82

-0.6

4 -0.4

4 -0.2

2

0

-2

-1.5

-1

-0.5

0

0.5

1

1.5

21 3 5 7 9

11

13

15

17

19

21

23

25

27

29

31

33

35

37

Page 19: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Analog Signals

Analog signals – directly measurable quantities in terms of some other quantity

Examples:

• Thermometer – mercury height rises as temperature rises

• Car Speedometer – Needle moves farther right as you accelerate

• Stereo – Volume increases as you turn the knob.

Page 20: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Digital Signals – have only two states. For digital computers, we refer to binary states, 0 and 1. “1” can be on, “0” can be off.

Examples:

• Light switch can be either on or off

• Door to a room is either open or closed

Digital Signals

Page 21: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Parts of an Analog Signal

Amplitude(peak-to-peak)

Amplitude(peak)

Period

(T)

HzT

1F

Frequency:

Page 22: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Parts of a Digital Signal

Am

plit

ud

e

Time

High

(tH)

Time

Low

(tL)

Period (T)Rising Edge

Falling EdgeAmplitude:

For digital signals, this will ALWAYS be

5 volts.

Period:

The time it takes for a periodic signal to

repeat. (seconds)

Frequency:

A measure of the number of

occurrences of the signal per second.

(Hertz, Hz)

Time High (tH):

The time, when the signal is at 5 v.

Time Low (tL):

The time, when the signal is at 0 v.

Duty Cycle:

The ratio of tH to the total period (T).

Rising Edge:

A 0-to-1 transition of the signal.

Falling Edge:

A 1-to-0 transition of the signal.

HzT

1F

Frequency:

%100T

tDutyCycle H

Page 23: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Periodic Signals

• They repeat themselves.

• A periodic signal can be decomposed into

summation of harmonic sinusoids

• Summation of harmonic sinusoids results in a

periodic signal

• We can use harmonic sinusoidal components

to approximate any periodic signal.

Page 24: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Non-periodic Signals

• In order to synthesize a periodic signal, frequencies of the sinusoids must be harmonic, that is, integer multiples of a fundamental frequency;

• What happens if the sinusoids are not harmonic?

• A slight frequency change of a component will result in non-periodic signals

Page 25: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Non-periodic Signals

))5(20cos(5

2))3(20cos(

3

2)20cos(2)( ttttxh

)2720cos(5

2)820cos(

3

2)20cos(2)(1 ttttx

28.28810 69.512710

Example:

Frequencies are 10,30 and 50 respectively

Frequencies are 10,28.8 and 51.69 respectively

Page 26: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Periodic Signals

Page 27: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Non-periodic Signals

Page 28: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Non-periodic Signals

Spectra are very similar !!

Page 29: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Analogue to Digital

• Microphones - take your voice varying pressure waves in the air and convert them into varying electrical signals.

• Strain Gages - determines the amount of strain (change in dimensions) when a stress is applied.

• Thermocouple – temperature measuring device converts thermal energy to electric energy.

• What If we want to store/process the data with computers?

• We need to convert Analogue signal to Digital Signal.

Page 30: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

A to D conversion

Page 31: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• Analog-to-digital conversion (ADC) makes a continuous signal discrete, both in amplitude and time.

We need to digitize the signal both in

• Amplitude

• Time

A to D conversion

Page 32: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Analog Digital Conversion is a 2-Step Process:

1. Quantizing - breaking down analog value is a set of finite states

2. Encoding - assigning a digital word or number to each state and matching it to the input signal.

Page 33: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Step 1: QuantizingThe discretization of the signal

in the amplitude dimension is determined by the converter’s input voltage range and the analog amplification of the signal input to it

Example: You have 0-10V signals. Separate them into a set of discrete states with 1.25V increments. (How did we get 1.25V? See next slide…)

Output

States

Discrete Voltage

Ranges (V)

0 0.00-1.25

1 1.25-2.50

2 2.50-3.75

3 3.75-5.00

4 5.00-6.25

5 6.25-7.50

6 7.50-8.75

7 8.75-10.0

Page 34: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Quantizing

The number of possible states that the converter can output is:

N=2n

where n is the number of bits in the AD converter

Example: For a 3 bit A/D converter, N=23=8.

Analog quantization size:Q=(Vmax-Vmin)/N = (10V – 0V)/8 = 1.25V

Page 35: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Quantizing

• Quantization noise

At conversion, the amplitude of the analog signal is approximated by the discrete levels of the ADC. Depending on the type of converter, this approximation may behave numerically as a truncation or as a round-off of the continuous-valued signal to an integer. In both cases, one can consider the quantization as a source of noise in the measurement system, noise which is directly related to the resolution at the ADC.

Page 36: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Quantization

• Quantization errors can be reduced by increasing the number of bits

• Common for A-D converters to have 16 bit or better resolution

• However the accuracy of the reference voltage must be of the same precision

Page 37: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Encoding

• Here we assign the digital value (binary number) to each state for the computer to read.

Output

States

Output Binary Equivalent

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Page 38: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Quantization and encoding

Discrete Voltage Ranges (V)

0.00-1.25

1.25-2.50

2.50-3.75

3.75-5.00

5.00-6.25

6.25-7.50

7.50-8.75

8.75-10.0

Output

States

Output Binary Equivalent

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Page 39: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Accuracy of A/D Conversion

There are two ways to best improve accuracy of A/D conversion:

• increasing the resolution which improves the accuracy in measuring the amplitude of the analog signal.

• increasing the sampling rate which increases the maximum frequency that can be measured.

Page 40: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential
Page 41: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• Resolution (number of discrete values the converter can produce) = Analog Quantization size (Q)

(Q) = Vrange / 2^n, where Vrange is the range of analog voltages which can be represented

• In our previous example: Q = 1.25V, this is a high resolution. A lower resolution would be if we used a 2-bit converter, then the resolution would be 10/2^2 = 2.50V.

Resolution

Page 42: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Digitizing noise

Any one sample in the digitized signal can have a maximum error of ±½ LSB

(Least Significant Bit). With standard deviation of 1/ sqrt(12) LSB (0.29 LSB).

Example: Consider a signal of amplitude of 1.0 volt, and a random noise of 1.0

millivolt rms. Digitizing this signal to 8 bits results in 1.0 volt becoming digital

number 255, and 1.0 millivolt becoming 0.255 LSB. (The LSB will indicate ,

1/255 = 3.9215 millivolt change in the signal. And 1.0 millivolt of noise is 1/3.9215

= 0.255 LSB)

The total noise of the digitized signal is

Noise present inside the signal + quantization error =

The range of LSB will determine the efficiency of the Digitizer. For a 1 volt signal8 bit digitizer produce noise = 0.386*1/256 millivolt = 1.5 millivolt, it is 50% increase in the total noise.

Page 43: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Sampling

The continuous signal is also discretized (sampled) in time. To obtain a reliable sampled representation of a continuous signals, the sample interval (Ts) or sample frequency (Fs = 1/Ts) must relate to the type of signal that is being recorded.

Sampling at very fast rate and very slow rate, both cause problems.

Page 44: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Sampling: Ideally what we want is

But sampling rate can damage our required output.

Page 45: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential
Page 46: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

e.g. undersampling

Sampling a 20-Hz sine wave at different rates Fs = 1/Ts.

Page 47: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

This is called Aliasing…

It occurs when the input signal is changing much faster than the sample rate. In previous example, a 20 Hz sine wave being sampled at 24Hz would be reconstructed as a ~4 Hz (the aliased signal) sine wave.

Alias frequency is the absolute value of the differencebetween the frequency of the input signal and the closestinteger multiple of the sampling rate.

Nyquist Rule:For a band limited signal, use a sampling frequency at least twice as high as the maximum frequency in the signal to avoid aliasing.

Page 48: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Example: Assume fs, the sampling frequency, is 100 Hz and that the input signal contains the following frequencies: 25 Hz, 70 Hz, 160 Hz, and 510 Hz. These frequencies are shown in the following figure.

As shown in the following figure, frequencies below the Nyquist frequency (fs/2 = 50 Hz) are sampled correctly. Frequencies above the Nyquist frequency appear as aliases. For example, F1 (25 Hz) appears at the correct frequency, but F2 (70 Hz), F3 (160 Hz), and F4 (510 Hz) have aliases at 30 Hz, 40 Hz, and 10 Hz, respectively.

Alias F2 = |100 – 70| = 30 Hz Alias F3 = | (2)100 – 160| = 40 Hz Alias F4 =

| (5)100 – 510| = 10 Hz

Page 49: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Aliasing

Consider a band limited signal with maximum frequency content is 20 Hz.

Nyquist Rule:

The minimum sampling rate (in this example twice the maximum frequency, i.e. 40 Hz) is calledthe Nyquist limit. Thus, the sampling rate determines the highest frequency that can be represented by the sampled signal. This value (half the sample rate) is often indicated as the Nyquist frequency of the sampled signal.

Page 50: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Aliasing

• The Nyquist limit is a real bare minimum to capture the 20-Hz frequency component, and you can see in the figure (previous slides) that the wave morphology is already distorted at sample rates close to, but above, the Nyquist sampling frequency.

• Clearly the signal is seriously misrepresented below the Nyquist limit . This particular type of signal distortion is called aliasing.

Page 51: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

In summary

Aliasing occurs if

•Sampling below the Nyquist rate,

• Improper reconstruction, or

•Both

Page 52: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Antialiasing

• What can we do about aliasing?

• Sample more often

• Problem is huge dataset at the end

• Make the signal less “wiggly”

• Get rid of some high frequencies

• Will lose information

• But it’s better than aliasing

Page 53: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Preventing aliasing• Introduce lowpass filters:

• remove high frequencies leaving only safe, low frequencies

• choose lowest frequency in reconstruction (disambiguate)

Page 54: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

• To remove the effect of aliasing in digitized signals, the analog measurement chain must remove/attenuate all frequencies above the Nyquistfrequency by using a filter (anti-aliasing filter).

Preventing aliasing

Page 55: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Real life aliasing problems

consider a continuous signal that is a pure sinusoid:

x1t = cos (0.4ωt) where ω = 2 pi f

Now consider another signal

x2t = cos (2.4ωt)

X2 has 6 times X1’s frequency.

x2t = cos (0.4ωt+2ωt) , since

Which gives: x2t = cos (0.4ωt)

This means that given a pair of sampled versions of the signals, one with the low frequency sinusoid and one with higher, you will have no way of distinguishing these signals from one another.

Page 56: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Real life aliasing problems

Consider Two possible input sine waves are shown: one has a frequency of 110Hz, the other has a frequency of 1110Hz. Both are sampled at 1000Hz.

With 1000Hz sampling rate we can exactly reproduce 110Hz signal. But what will happen with 1110Hz signal? By definition in previous slides the 1110Hz will be aliased into 110Hz signal as well.

So we have a sampled signal consists of both 110Hz original signal and aliased signal of 1110Hz.

This aliased signal will not only destroy the time domain signal but also its frequency components. You will never know which part is real and which part is aliased.

Page 57: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Setting the sampling rate

So selecting a sampling rate is very critical.

• Intuitively, we are not capturing much information in the signal by only sampling at some random frequency

• Goal

• Capture a “sufficient” amount of information from the signal

• But: Don’t sample too fast-- will have too much data

Page 58: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Setting the sampling rate

Is Nyquist-Shannon rule is good enough?

Lets try to find out with these three examples

1. “I am going to sample at 8kHz, so I need to use a filter with a 4kHz cutoff.”

2. “I need to monitor the 60Hz power line, so I need to sample at 120Hz.”

3. “What is the spectrum of an EKG signal? I want to figure out the Nyquist rate.”

Page 59: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

1. “I am going to sample at 8kHz, so I need to use a filter with a 4kHz cutoff.”

Let’s take the human voice recording example, Human can hear upto 20k Hz sounds. However, the normal range of the usable frequency band of human speech is approximately 300 Hz to 4000 Hz. So the first step should be to use anti aliasing filter which can remove frequency components above 4000 Hz.

Figure shows a first order filter applied to the signal.

The solid curve shows the spectrum of the filtered speech, while the dashed curve shows the aliased speech.

There is a big component of aliased speech, Which is bad.

Page 60: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

1. “I am going to sample at 8kHz, so I need to use a filter with a 4kHz cutoff.”

Can we increase the filter order to improve the results?

The figure shows a sixth order filter, the situation improved but still aliasing is a problem.

If you go to filter order of 3500 hundred you can eliminate the aliasing considerably.

Question is whether that high order analogue filters are possible and feasible?

Page 61: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

1. “I am going to sample at 8kHz, so I need to use a filter with a 4kHz cutoff.”

Intelligible speech transmission is that you need to transmit frequencies up to 3kHz, and it gives a good quality sound.

Now lets redraw the figure with sampling frequency of 8kHz with frequency of interest is under 3kHz. The figure shows a sixth order filter.

The results are much better with almost negligible aliasing.

If you want to stuck with 4kHz then you should consider increasing sampling frequency.

Page 62: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

3. “What is the spectrum of an ECG signal? I want to figure out the Nyquist rate.”

If the signal is unknown then one can find out the Nyquist rate by taking the spectra of the signal.

In the case of ECG the spectra is mostly limited to 100Hz. So it seems OK if we apply a sharp low pass filter at 100Hz.

Now what happened after reconstruction (blue) of the EKG, there is a delayed QRS peak with higher amplitude and some non-linearity (ringing effect) at the dropping component.

Page 63: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

3. “What is the spectrum of an ECG signal? I want to figure out the Nyquist rate.”

If we change the type of filter, the ringing effect might be reduced, but still the amplitude difference remains.

What, then, do we do? One obvious solution is that if you are working with an application that cannot tolerate these effects is to sample your signal faster. This will allow you to use a more open anti-aliasing filter.

Page 64: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

3. “What is the spectrum of an EKG signal? I want to figure out the Nyquist rate.”

Consider a rectangular pulse passes (blue) thorough a Anti-aliasing filter. The resultant (black) has two evident effects: a time delayed signal and ringing effect.

The delay is constant then we can manage it by fitting it in overall delay of the system.

But ringing effect is still present.

Page 65: Biomedical Signals - bmes16.files.wordpress.com fileThe electro-neuro-gram (ENG) •The ENG is an electrical signal observed as a stimulus and the associated nerve action potential

Finally

you should be aware of the Nyquist rate when you’re designing systems.

First of all you must know your system and the limitations, e.g. decreasing sampling rate in the speech transfer over the phone might not be critical as compared to decreasing setting sampling rate for ECG.

To really determine an appropriate sampling rate for a system, or to determine the necessary antialias and reconstruction filters for a system, you have to understand aliasing and filtering.