You are on page 1of 223

C atalog

BioD S P1.pdf ················································································································································································································ 1


BioD S P2.pdf ·············································································································································································································· 34
BioD S P Lec 3.pdf ······································································································································································································ 58
BioD S P Lec 4.pdf ······································································································································································································ 99
BioD S P Lec 5.pdf ···································································································································································································· 133
BioDsp6.pdf ············································································································································································································· 150
S S BM E Lec.7 Intramuscular E M G .pdf ···································································································································································· 162
BioDsp Lec 8.pdf ····································································································································································································· 189
S S BM E Lec.9 Adaptive and O ptimal filters.pdf ······················································································································································· 205
BioDSP LEC 1
This isn’t the Original Lecture , It’s just a copy of the
original one filled with the Lecture notes mentioned
during the Lecture time.

Filled by : Rami Ammar




Ex/Rehabilitation Device that takes the EMG (Elec-
tromyography) signal by the electrodes and begin to
function ( It moves to train the original arm parts for
movement )

The hearing aid receives sound through a microphone, which converts the

sound
waves to electrical signals and sends them to an amplifier that increas-
es the power of the signals and then sends them to the ear through a speaker.

The main application of signal processing here is to perform filtering and noise
reduction .

Transcranial magnetic Transcranial Direct current


 
stimulation stimulation
 
 Stress EMG Treadmill
type

Central monitoring to monitor the


EEG (Electroencephalography) biological function of the patient and stress ECG (Electrocardiography)
used to diagnose patients with could be also used during medical let you stress yourself by walking in
eplipsy procedures or surgery. different speeds and take the signals .
the vital signals include: heart rate , ECG It is used for patients having Angina
, resparation rate pectoris that can’t be diagnosed at rest
therefore they should be stressed

The scientist Stephen Hawkings was a patient of


locked-in syndrome which makes the patient unable to prosthetic hand for ampute patient
communicate with the surrounding and can just move
  Magnetoencephalography, or MEG
uses EMG      
signals  
his eye in these cases EEG is used to let him perform  scan, is used for bipolar diseases and

some simple function like moving his wheel chair ,telling
 psycological diseases such as
his feelings. These signals must be filtered and denoised depression .
   

 ECG (Heart attack)


ECG




 


pacemaker prosthetic hand



 

    

             


  
 

   

    Ex/ Intramuscular EMG


Needle or electrode penetrate the ECoG(electrocorticography)
skin and takes signal from inside
the bodypart
    Ex/ EMG,EEG,ECG
Signals are taken directly by electrodes on skin sur-
face without breaking the skin.This represents a re-
flection of secrets because diagnosing becomes possi-
ble without any surgery to see the covered organs of

  
  noninvasive
Invasive 1-a little bit lesser signal quality than
1- Higher quality of signal because It Invasie due to interference and distance
records signals directly from the source from the source increase
2- more dangerous and difficult and must be 2- Safe and easy to perform
performed by specialists
generated sweat after while as a result of effort and stress
causes noise in the signal . Therefore , The signal must be
filtered to let the medical specialist diagnose the case
Stress EMG bicycle
type depending on the filtered signal

BIOELECTRICAL SIGNAL PROCESSING Leif Sörnmo EVICAB, 2010


CHALLENGE WITH
BIOMEDICAL SIGNALS
1. .

2. .

3. .

Expensive equipments in ( Astrology , military ,


medical ) applications because the normal com-
4. . mercial prodcut are not quite exact and has its
own internal noise

knowledge in device installation and its specific conditions such as using gel and removing
hair from parts the electrodes would be attached to.





Ex/ locked in syndrome  


stroke 

Brain computer interface


 

BCI


Electrodes 

Cables

Sensor A/D Conversion Computer


amplifier and filter Arduino Microcontroller
 
1- Guess what is the signal shown from your
own background information?

2- What is the physiological system body


organ that we use to take the measurement?

3-Do you any health problems or diseases


that are associated with this signal?
Hand Dynamometer : mechanical
sensor that measures hand strength

EMG
Action potential (AP)
EEG
ECG : Periodic signal
Sound

Phonocardiography (PCG)
Carotid pulse (mechanical)
Visual Evoked Potential
(VEP)
considered as a type of EEG

 
   
 Spontaneous

EEG

ECG

EMG

             


  Stimulating

Evoked potential
recording signal
of bodypart after
stimulation


Electroneurography
by connecting two
electrodes to the nerve


and stimulating it by short
electrical pulse and the
nerve conduction velocity
(NCV) is calculated depending
on conduction time and dis-
tance between
electrodes


Electroretinography
 
 

   
     

    

also :vibroarthrography (VAG)



 

1- BD OF BCI APPLICATION BASED ON EEG
AND ECOG
EEG
ECog
Local field
potential

 
       
      

  
 
1

0.5
Feature
0

Windowing Extraction
Classification
-0.5

-1
(TD-AR)
-1.5
0 2 4 6 8 10 12
4
x 10
LDA
EMG Board (sensor) A/D conversion. motor drive board.
amplify and filter Arduino also also SP.
processes signal.




    

  


 
protection sensor

EEG

Robotic arm Cursor


Speller

Wheel chair
+
BCI
CCU : coronary care unit (Heart diseases)
ICU : Intensive care unit ( General diseases )

  


  
COURSE ON SIGNALS AND SYSTEMS FOR BME
SEMESTER 2

YEAR 3 BIOMEDICAL ENGINEERING

Lecture. 2
Specifications of Biomedical Signals
Dr Ali Hussein
BioDSP LEC 2
This isn’t the Original Lecture , It’s just a copy of the
original one filled with the Lecture notes mentioned
during the Lecture time.

Filled by : Rami Ammar


FOR EACH BIOMEDICAL SIGNAL, WE NEED TO KNOW
Students Number of samples per second

 1- .
Band width
A/D Conversion + Filtering
lower than 2 fmax will cause aliasing of the signal
Higher than 2 fmax will make a high resolusion signal
 2- . but very large in size, Thys , difficult to transfer
Balance must be maintained 0.5
Original Data

when exceeding 2fmax


Voltage mV

 3- .
-0.5
0 2 4 6 8 10 12 14 16
Determine gain in Operational Time(s)

amplifier 80

60
Magnitude

40

20

0
0 200 400 600 800 1000 1200 1400 1600 1800 2000

Mirror Image in FT Frequency(Hz)

Intramuscular, ECoG,Local field potential ... etc Example- EMG signal and its frequency
spectrum
NOTE Electrodes depends
on Ag/AgCl

Cohen, A. “Biomedical Signals: Origin and Dynamic Characteristics; Frequency-Domain Analysis”


The Biomedical Engineering Handbook: Second Edition. Ed. Joseph D. Bronzino, Boca Raton: CRC Press LLC, 2000
sensation
THE NAME OF BIOMEDICAL
SIGNALS
 Electro – tn d t e d t Graphy

 Examples

 Electro - Myo – graphy


 Electro – Encephalo – graphy

 ----------- - Cardio -------------

 VAG
1- ELECTROMYOGRAPHY (EMG)
USES AND APPLICATIONS

1. Diagnosis of muscle disease (intramuscular


EMG)

2. Nerve conduction studies.

3. Prosthesis Control
(FES) is a treatment that applies small electrical charges to a muscle , that has become paralysed or
weakened , to stimulates the muscle to make its usual movement.
4. Functional electrical stimulation (Stroke
CVA patients) - Exoskeleton
Cerebrovascular accident
BD OF EMG BASED UPPER LIMB EXOSKELETON
Students

1-
Training
NN

NN

2- Testing

http://www.mdpi.com/sensors/sensors-14-06677/article_deploy/html/images/sensors-
14-06677f3-1024.png
2- ELECTROCARDIOGRAPHY (STUDENT)
Students

1. Diagnosis of heart disease


A. -Normal ECG
B. Stress ECG

2. Continuous monitoring of the


patients in the CCU

3. Treatment??
1. Pacemaker DC Shock (Defibrillator)
BIOELECTRICAL SIGNAL PROCESSING Leif Sörnmo EVICAB, 2010
NOTE
4-MAGNETOENCEPHLOGRAPHY
 Diagnosis of the psychological disease (Bipolar, depression,
Schizophrenia)
 Understand the brain??

 Understand the cognition behaviour

http://www.medgadget.com/img/3
6658324.jpg

noncontact/
noninvasive

http://ilabs.washington.edu/sites/default/files/magneticfield-origin.jpg
(STUDENT)
 1- Respiratory signals

 Heart Sound (Phonocardiography)

 VAG

 EGG electrogastrography
 Living organisms are made up of many
component tem :
 Each tem ill do a eci ic ta k

 The human body includes several


systems.
 For example:
1.the nervous system,
Function: (control various activity of the body)
2. the cardiovascular system, (heart and
arteries),

Function: circulate blood and give nutrition


and gas to tissues and take back the
waste product and harmful gases)

3. the musculoskeletal system. (Limbs)

Function: Facilitate locomotion and


movement.
 Collection of systems
 We can make the following assumptions about a system

A describable relationship between


 Linear ? input and output exists
 Stationary ? system characteristics are constant with
time

 But this may not be true !!

-Most of the human body systems are nonlinear and


non stationary
-cardiac system is stationary because It’s periodic
 Each system is made up of several
b tem that
carry on many h iological roce e .

 e
un t n d s ste Student

.rh thmic m ing of blood throughout the body to


facilitate the delivery of nutrients,
2.and pumping blood through the pulmonary system
for oxygenation of the blood itself.
BETWEEN THE
PHYSIOLOGICAL SYSTEM AND THE
CORRESPONDING PHYSIOLOGICAL SIGNAL ?
NOTE:

Analyse to
Process
System Signal understand
Phenomena
the normal

Students
1-Example- Normal System

Pump ECG
Heart Blood or Signal Analyse?
function • Normal

2- Example- Abnormal System


 Fat in the Coronary artery, blood will decrease and tissue will die
and cause ischemia. Over time, Angina
ischemia : Decrease of blood
supply to a specific organ

http://upload.wikimedia.org/wikipedia/commons/d/d1/Blaus
http://upload.wikimedia.org/wikipedia/commons/8/8a/Blausen_0168 en_0257_CoronaryArtery_Plaque.png
_CardiovascularSystem.png

Musculoskeletal system and nervous


system signals are picked up by EMG
PROCESSES PHENOMENA
1.nervous or hormonal stimulation and control;
2.inputs and outputs that could be in the form of
physical material, neurotransmitters, or information;

Example on Information,

Retina capture light, current to frequency modulated


signal that is transmitted to the brain

Light is input electrical signal is output


Auditory process is similar to vision , vibration of eardrum is converted to frequency modulated signals
that are sent to the brain to be explained there in a specific regions .
PHYSIOLOGICAL PROCESSES SIGNALS

 In doing action, the systems generate signals (very important for us !!! )
 e cardiovascular system generate arotid pulse signals when
the heart pumps.
 Student the patient is diagnosed by comparing the picked
up signal to previous normal signals
1.Biochemical, hormones and neurotransmitters,
!"#$%&"'(&)*#
2.Electrical signals, ECG
3.Physical signals, CP

=
Mechanical signals : Carotid pulse( from neck ) , Other mechani-
cal signal : Mechanomyography (MMG)
Also there are Audio signals : PCG
ABNORMAL ECG

http://192.185.141.126/~lifecare/new/wp- http://en.ecgpedia.org/images/thumb/a/a7/Stelevat
content/uploads/2015/02/ECG-tracing-pic.jpg ie_en.png/300px-Stelevatie_en.png

Need a good unde st nd n s ste of interest to observe the


es nd n s n s and assess the state of the system
Abnormal ECG

ST Elevated and elongated


defect in Ventricular repolarization
Course on Signals and systems for BME

Semester 2

2019-2020

Year 3 Biomedical Engineering

Lecture. 3
Temperature and Pressure Signals

Dr Ali Hussein
BioDSP LEC 3
This isn’t the Original Edition , It’s just a copy
of the original one filled with the Lecture notes
mentioned during the Lecture time.

Filled by : Rami Ammar


Example on simple scalar Medical
measurements
• Most infections cause a rise in the temperature
( give example) of the body: is a Measurement and not a
signal
• Common methods of temperature measurements
(Students)

1. Sensed easily, in a relative and qualitative or subjective


because it differs
manner,
depending on the
via the palm of one’s hand. persons who is doing
the measurement

2. Objective or quantitative measurement (engineer ) of


temperature requires an instrument,
such as a thermometer.
A B
• A single measurement of temperature is a scalar p
represents the thermal state of the body at a particular
or single instant of time t
and a particular position.

• If we record the temperature continuously,


- in CCU, FS is few samples /sec not 100 sample/s

• we obtain a signal as a function of time


• expressed in continuous time

or analog form as (t) vector


B- When the temperature is measured at discrete
points of time,
r
• It may be expressed in discrete time form as (n ) or
(n),

• n: index or measurement sample number


of the array of values, (sample number)

• : uniform interval between the time


instants of measurement (sampling
interval which is assumed to be uniform)
T=1/FS ( In signals )
Task: give e amples of s
se quist rate
Students
Ex





Sampling frequency: hardware and
computational cost trade-off
Example. Fs 10000 EMG good but need fast
processor and big storage.
• A discrete time signal that can take amplitude
values only from a limited list of quanti e levels
is calle a igital signal
• Sampling: We will review and discuss that in the
next lectures (S/H) 8 bit
• X (Scalar) -----x(t) (Contiguous or analogue)-
x(n) Discrete.
Examples of Biomedical Measurements

I- Example Temperature
• At time 4:00 PM 37 C
- Periodic increase in
temperature could be
• At time 6:00 PM 36 diagnosed as malaria
disease

• If number, it is difficult to see patterns or trends.


• How we can see a pattern or a trend in the
temperature signal?
Matlab demo of digital
temperature sample
• Task:
- Students will plot these real temp on a paper.

- Point the maximum temperature in the graph


- Application: ICU and CCU units
Note
Students

Figure 1.1: Measurements of the temperature of a patient presented as (a) a scalar with one
temperature measurement x at a time instant t; (b) an array x(n) made up of several
measurements at different instants of time; and (c) a signal x(t) or x(n). The horizontal axis
of the plot represents time in ours t e vertical a is gives temperature in egrees elsius
ata courtes of oot ills ospital, algar
II- Another basic measurement in health care and
monitoring:
Example Blood pressure (BP)
• Each measurement consists of two
values —
1. the systolic pressure
2. and the diastolic pressure.
Students

• Question 1: What is the device used to measure


the BP?
noninvasive
1. .
2. .
The cuff should close the
brachial artery( make
• Question 2: How?occlusion )
– .
(when you stop
you will hear sound of the first beat (sound heard during hearing the sound )
measurment is known as Korotkoff)
• Question 3: What are the units of BP:
– .

• although the international standard unit for


pressure is the
ascal
Direct BP measurment

p
und )

http://www.medicine.mcgill.ca/physio/vlab/c
ardio/images/directtech.GIF
• A single BP measurement:
a vector x = [x1, x2]T it t o components
– x1 indicating the systolic pressure and
– x2 indicating the diastolic pressure.

– Question: Vector versus matrix


• E.g. Vector – Temp. Measurement over time
• E.g. Matrix – Multichannel EMG or EEG

When BP is measured at a few instants of time:


an array of vectorial values x(n)
or a function of time x(t).

Example:
At 3.30 PM, the BP for patient XX is
Task-2
• Plot the following BP parameters versus time?

• Did you notice any strange trend or dangerous


measurement ?
Answer
Students
i
Read this at home
A- Diagram showing the steps of
indirect blood pressure measurement

B- Diagram showing systolic and diastolic


Blood pressure and Korotkoff sounds

http://faculty.pasadena.edu/dkwon/chapter%20
15/chapter%2015_files/images/image8.png

https://voer.edu.vn/file/57023
Brief History on DSP
• Historical roots of digital signal
processing are very old. •
• According to several researchers
(Prandoni and Veterli,2008). •
• They date back to the 25th century BC
and they are related to the ”Palermo
stone” with earliest records of Nile’s
floods observed on the time base of 12
months (naive sampling). 1
• Processing of these records was
concentrated to prediction of floods Palermo stone (25th cent.BC)
fundamental for watering fields. with records of the water level 2
A. Proch´azka and O. Vyˇsata ‘HISTORY AND BIOMEDICAL APPLICATIONS
OF DIGITAL SIGNAL AND IMAGE PROCESSING, 2014
A. Proch´azka and O. Vyˇsata ‘HISTORY AND BIOMEDICAL
APPLICATIONS
OF DIGITAL SIGNAL AND IMAGE PROCESSING, 2014

• Nilometer designed by Abu'l


'Abbas al-Farghani
• ”Nilometers” used later were
Arabic buildings with
instruments measuring the Nilometers on the Rawda
Island Cairo (861 AD)
water level
1. to predict climate conditions
and
2. to calculate taxes related to
the prosperity of the country. http://www.waterhistory.org/
histories/cairo/
Nile level data for 700 years
• This is similar to what ? (student)
1. Temperature
2. Blood pressure.

A
A
co
similar to
Cos wave M
fu

1.
2.
3.
4.
5.
Biological Systems

o Physiological o
i ls ys sos

Example: 1- Heart
2- Muscle

As we said earlier,
A system is a collection of processes or
components that interact
Elsevier, New York, NY, 2012.
Many systems of the human body are based on
function such as

1. the cardiovascular system,


2. pulmonary system,
3. renal system,
4. or an endocrine system,
5. and the nervous system.
Biosignals
• Irrespective of the type of biological system, its scale, or its
function, we must have some way of interacting with that
system.
• Interaction or communication with a biological system is
done through biosignals.

• The stimulus refers to signals directed at a specific physiological


process, and the output signal evoked by these inputs is the
response.

• Signals are variations in energy that carry information.

• The variable that carries the information (the specific energy


fluctuation) depends upon the type of energy involved (as
shown in the Table on the next slide)
Galvanic Skin Response (GSR) The Galvanic Skin Response
(GSR) is the measure of the continuous variations in the electri-
Biosignals (Energy Types) cal characteristics of the skin, i.e. for instance the conductance,
caused by the variation of the human body sweating. which is
related to emotional arousal (used in polygraph- lie detection
test -)
Table 1-1 Energy Forms and Associated Information-Carrying Variables

gy a ia l s ci ic l c a io o o as s
1 h ical
Chemical h ical ac i i y a o loo io ho o al
co c a io co c a io s a o h ch is y

2 Mechanical
cha ical Posi io scl o
oc o o ss a io asc la ss s scl
co ac ili y
al a o h ca iac so s
3 Electrical
l c `ical ol ag o ial gy o
cha g ca i s
cha g ca i lo
4 Thermal
h al a o y a h og a hy
Infrared (IR)
Biotransducers
• A “transducer”: is a device that converts energy from one
form to another.
• In measurement systems, all transducers are so-called
input transducers, they convert non-electrical energy
into an electronic signal Why?
• We need electrical signal for computers.
#Q Analogue or digital?
pcg (signal)
A cardiac microphone is a biotransducer
that converts the
Mechanical electrical
XXXX into an XXXX.

The device uses a XXXX

that produces a voltage when it is


deformed by movement of the patient’s
chest.
Answer (student)

The white foam pad covers the piezoelectric disk and is specially
designed to improve the coupling of energy between the chest
and the piezoelectric disk.

M
Piezoelectric effect.
• In 1880, French physicists Pierre and
Jacques Curie discovered the piezoelectric
effect.

Mechanical energy Electrical Energy

http://www.pixelandight.com/images/clien
ts/silverplatter/hammer_bulb.gif
25
6/1/2020
Lithotripsy is a medical procedure that uses shock
waves to break down stones in the kidney or
gallbladder.
Both effects are used in the ultra sound
transducer

http://itersnews.com/wp-content/uploads/2014/01/Epson-Electrical-Characteristics_piezoelectric-effect.jpg
26 6/1/2020 Lec.2 Ultrasound
Waves
Example on blood pressure
measurement
• Non invasive • Invasive: How??
• What is the device

Invasive Arterial blood pressure


measurement
Bio-electric Transducers.
• Physiological electrical activity is monitored with
a transducer that converts electrical energy from
ionic to electronic current termed and electrode.

• These sources are usually given the term ExG,


where the “x” represents the physiological
process that produces the electrical energy:
ECG—electrocardiogram (heart)
Ag/AgCl + Gel
EEG—electroencephalogram (brain)
are used in the
electrodes now EMG—electromyogram (muscle)
EOG—electrooculogram (eye)
ERG—electroretinogram (retina)
EGG— ??

An exception to this terminology is the GSR, the


electrical activity generated by the skin.

- Galvanic Skin Response measured in Ohm(impedance)


Signal Encoding (continuous and iscrete)

• Encoding schemes vary in complexity:


 human speech is very complex,

 yet the same information could be encoded into the


relatively simple series of long and short pulses known as
Morse code.

• Most encoding strategies can be divided into two broad


categories or domains:
continuous (analog )
2. and iscrete. ( igital)

These two domains are also termed analog and igital.


Continuous or Analog Domain Signals Tu

An analog signal and is mathematically encodes


information as fluctuations in time.
Such time-varying signals can be described by the
equation:

(t) = f(t)

where f(t) is some function of time and can be quite complex. For an
electronic signal, this could be the value of the voltage or current at
a given time.

Reminder: How we can encode


temperature information from the body?
Tutorial Tutorial
How we can get How
an accurate
we can reading from your
get an accurate force from
reading
sensor ? sensor ?

• By doing a calibration
• By doing a calibration
• We have force• sensor,
We have 4 forces, 4 voltages
force sensor, known.
4 forces, 4 voltages know
1. Plot the sensor1.output forsensor
Plot the a known few measurements
output for a known few measurem
2. Then we can use curvewe
2. Then fitting
can to find
use the fitting
curve equation.
to find the equation

The equation of the10


curve can 10

be either given to9the buyer or 9

built-in installed 7in the sensor


8 8
7

to calculate the final


6 output of 6
Voltage
the needed quantity depending
5 5 Voltage

4 4 Linear (Voltage) Linear (Voltage)

on projection techniques
3 from 3

the given curve 1


2 2
1
0 0
18 23 28 18 33 23 28 33
Task
• Encoding equation for change:
(10.0 mV/°C scale)

• Convert the following measurements taken


from the transducer to temp and plot them
with time
02:00 2:00
Time AM 04:00 06:00 08:00 10:00 12:00 PM
Voltage
(V) 0.2 0.21 0.22 0.18 0.14 0.25 0.15
Task 2
Example 2 An 16-bit analog-to-digital
converter (ADC) advertises an accuracy
of ± the least significant bit (LSB). If the
input range of the ADC is 0 to 10 volts,
what is the accuracy of the ADC in
analog volts?
0.000152 – 16 bits

Vmax / VLSB =2 number of bits


0.0024 - 12 bits

h
The two main processes involved in A/D
conversion are 1. sampling and 2.
quantization.

1 2
Read voltage as
integers

http://www.wbuttutorials.com/images/network/analog-digital-15.jpg
Analogue-to-digital conversion
Encoding ( 3rd stage )
ADC

DAC
DAC

DAC
Course on Signals and systems for BME

Semester 2

2019-2020

Year 3 Biomedical Engineering


Lecture. 4
Noise, Variability and SNR

Dr Ali Hussein
BioDSP LEC 4
This isn’t the Original Edition , It’s just a copy
of the original one filled with the Lecture notes
mentioned during the Lecture time.

Filled by : Rami Ammar


es

The Holter monitor is a type


of portable electrocardiogram
(ECG)
New topic Noise
What is Noise?
How we can get an accurate reading from
your force sensor ?
• Buy doing a calibration
• We have force sensor, 4 forces, 4 voltages known.
1. Plot the sensor output for a known few measurements
2. Then we can use curve fitting to find the equation.
Noise and Variability
Noise is what you do not want and signal is what
you do want (noise is unwanted variability). Noise
often limits the usefulness of a signal and the
diagnostic accuracy of a medical device.
Useful such as indirect
blood pressure & pulse Table. Sources of Variability
oximeter
Source Cause Potential Remedy
(treatment)
1- Physiological Measurement only indirectly Modify overall approach
variability relate to variable of interest
2- Environmental Other source of similar energy Noise cancellation and/or
Disadvantages

or interference form transducer design


3- Artifact Transducer responds to other Transducer design
energy forms
4- Electronic Thermal or shot noise Transducer or electronic
noise design
1- Physiological variability:
It is due to the fact that the information you desire is based on
measurements subject to biological influences other than
those of interest.

Example:
Assessment of respiratory function based on the
measurement of blood (pO2) by pulse oximeter (transmission of light
through blood in the finger tip to measure
partial pressure of oxygen oxygen presence and heart beats )
Q/ Can you give us more examples:
indirect blood pressure measurement (BPM)
2-Environmental noise
• Environmental noise can come from
Power line interference or termed electricity interference or also termed 50 Hz
sources noise is the most common in biomedical signals (ECG ,EMG and other electrical
signals ) {A peak will appear with the required signal at f=50 Hz or 60 Hz} solu-

1. external ortion : Band stop (reject) filter or called notch filter .


Sometimes the peak apears periodically in the overall signal at each f =n50 Hz ,
n= 1,2,3 ... etc. this is called powerline noise with harmonics
2. internal to the body.

(e.g. fetal ECG is corrupted by the mother’s ECG.)


Fetal ECG is useful in some emergency cases during last period of pregnancy such
as nuchal cord - wrapping of the umbilical cord around baby’s neck - which can be
diagnosed by fetal ECG . Thus , a decision of caesarean delivery (C-Section) will be
made
Other Case : when requiring ECG while holding breath and deep breath the
EMG signal that results from deep breath will cause the contamination of ECG
signal
3- Measurement artifact
• Artifact is produced when the biotransducer
responds to energy modalities other than
those desired.

-Example:
Electrodes susceptible to motion artifact.
4- Electronic noise
• It is the only noise that has well known
source and characteristics.
the only noise that can be quantified

(Sources are either thermal activity and/or semiconductor


junctions.)

- Types of Electronic noise:


A. Thermal or Johnson Noise
B. Shot Noise
4- Electronic Noise
0.03 Frequency Spectrum of Electronic Noise
Spectrum of White Noise

0.025

0.02

0.015

0.01

0.005

0
20 40 60 80 100 120
Relative Frequency

Students- Electronic noise has energy at all frequencies. This leads


to the term white noise.
To give a number to the amount of noise present, a range of
frequencies (i.e., bandwidth) must be specified.
Question
• How we can filter this noise?
none of the filters can be used . Instead , the component must be
replaced . Spectrum of White Noise
0.03

0.025

0.02

0.015

0.01

0.005

0
20 40 60 80 100 120
Relative Frequency
4-A Thermal or Johnson Noise
• Johnson or thermal noise is produced by resistance
Revision print
sources ( resistors) and the amount of noise generated is
related to 1)the resistance and to 2) the temperature as well
as the 3) bandwidth. A-Thermal or Johnson Noise (R)

VJ = 4kT R BW volts

where R is the resistance IinJ ohms,


= 4 kT BW R amps
T the temperature in degrees Kelvin,
where R is the resistance in ohms, T the temperature in degrees Kelvin, BW is the range
BW is the range of frequencies in Hz (a.k.a. cycles/sec),
frequencies in Hz (a.k.a. cycles/sec), and k is Boltzman’s constant (k = 1.38 x 10-23 J/OK)
and k istemperature
Boltzman’s constant (k =used
1.38forx room
10-23temperature,
J/OK).
of 310 K is often
Revision print
in which case 4kT = 1.7X10-20 J
A temperature of 310 K is often used for room temperature, in which
A-Thermal or Johnson Noise (R
case 4kT = 1.7X10-20 J. B- Shot Noise (Semiconductor)
V = 4kT R BW volts
Note: If noise current is of interest, the equation for Johnson noise
J
current can be
Is =the above
2q Id equation
BW amps T = Ohm’s I += V42kT+BW
V3R2 +amps
2 2
obtained from in conjunctionVwith V1 law: J
...VN2
where q is the charge on an where R is the resistance in ohms,
electron
frequencies in(1.662 X 10-19T and
Hz (a.k.a. cycles/sec),
the temperature in degrees
coulomb
k is Boltzman’s consta
which equals 1 amp-sec), and Id is the baseline semiconductor
temperature of 310 K is often used for room temperature, in whi

current. B- Shot Noise (Semiconductor

Is = 2q Id BW amps VT = V1 2 +
where q is the charge on an electron (1.662 X
which equals 1 amp-sec), and Id is the baseline
current.
Revision print
A-Thermal or Johnson Noise (R)

VJ = 4kT R BW volts
4-B Shot Noise IJ = 4 kT BW R amps

• Shot noisewhere
is R is the resistance in ohms, T the temperature in degrees Kelvin, BW
defined as a current noise and is
frequencies in Hz (a.k.a. cycles/sec), and k is Boltzman’s constant (k = 1.38
proportional to the baseline
temperature of 310 K iscurrent
often usedthrough a
for room temperature, in which case 4kT
semiconductor junction (e.g. diodes and transistors) :
B- Shot Noise (Semiconductor)

Is = 2q Id BW amps VT = V1 2 + V22 + V3
where q is the charge on an electron (1.662 X 10-19 coulo
where q is the chargewhich
on anequals 1 amp-sec),
electron (1.662 and
X 10Id-19
is coulomb
the baseline semicond
current.
which equals 1 amp-sec), and I is the baseline semiconductor
d
current.
Sumarry - Noise and Variability

Sources of Variability

Source Cause

1- Physiological Measurement only indirectly


Good variability relate to variable of interest

2- Environmental Other source of similar energy


or interference form

3- Artifact Transducer responds to other


Unwanted energy forms

4- Electronic Thermal or shot noise


noise
Revision print
A-Thermal or Johnson Noise (R)

VJ = 4kT R BW volts

IJ = 4 kT BW R amps
where R is the resistance in ohms, T the temperature in degrees Kelvin, BW is the range of
frequencies in Hz (a.k.a. cycles/sec), and k is Boltzman’s constant (k = 1.38 x 10-23 J/OK). A
temperature of 310 K is often used for room temperature, in which case 4kT = 1.7X10-20 J.

B- Shot Noise (Semiconductor)

Is = 2q Id BW amps VT = V1 2 + V22 + V3 2 + ...VN2


where q is the charge on an electron (1.662 X 10-19 coulomb
which equals 1 amp-sec), and Id is the baseline semiconductor
current.
Example Online
A 20 mA current flows through a both a diode
and a 200 Ω resistor. What is the total current
noise? Assume a bandwidth of 1 MHz and
room temperature .

k is Boltzman’s constant (k = 1.38 x 10-23 J/OK)


A
q is the charge on an electron (1.662 X 10-19 coulomb)
Solution (Students)
• Solution. Find the shot noise contributed
by the diode and the Johnson noise
contributed by the resistor, then combine
them.
Question

How to compare 2 signals


such as EMG and Noise ?
New Topic
Decibels

It is common to compare the intensity of two signals


using a ratio:

(Student)

Such ratios are often expressed in decibels.


high SNR = low noise
low SNR = high noise
Decibels for the Power (cont.)
• When used to measure power ratios, decibels are
defined as 10 times the log of the power ratio:

(Student)

• When used in voltage measurements, the decibel


is 20 times the log of voltage:

• Task: Proof that the decibel is 20


times the log of voltage:
2
Since: P = VRMS R as will be shown later.
Solution
Signal-to-Noise Ratio (SNR) or S/N
• The Signal-to-noise ratio or SNR is simply the ratio of signal
to noise, both measured in RMS (root-mean-squared)
amplitude. The SNR is often expressed in “db” where:

(Student)

• To convert from db scale to a linear scale:

(Student)

• Question: How to convert VPeak into VRMS ?


RMS Voltage Equivalent

http://www.electronics-
tutorials.ws/accircuits/rms-voltage.html
Example:
VRMS Signal = 100 mv
VRMS Noise= 10 mv
1) Calculate the SNR in DB?
2) Calculate the SNR in linear scale

Task: For example, a SNR of:


Application: SNR for comparing 2
filtering techniques
• Example: ECG filtering
• If I have 2 filters (filter 1 and filter 2), and
noisy ECG signals, SNR can be used to
decide which filter is better.
comparing 2 signals using
SNR is objective and quan-
Filter 1
titative analysis instead of
subjctive and qualititative
analysis
Filter 2

https://www.researchgate.net/profile/Tingting_Zhu6/publication/259462637/figure/fig2/AS:297251311243265@
1447881643119/Fig-2-An-example-of-a-5-second-noisy-ECG-segment-of-a-patient-with-myocardial.png
Task
Signal and XXXX
• 0 db means the XXXX Noise are
…….
Equal

• - 3 db means that the ratio is Low


XXXX( 0.707 =707/1000)

• -20 db means the signal is XXXX


0.1 of the
noise in RMS units.
Decibels (cont)

To convert a voltage from dB to RMS, use the inverse of


the defining equation:

vRMS = 10 XdB 20

Putting units in dB is particularly useful when


comparing ratios of signal and noise to determine the
“signal-to-noise ratio” (SNR) as described later.
Example on comparing signals

• A sinusoidal signal is fed into an attenuator that


reduces the intensity of the signal. The input
signal has a peak amplitude of 2.8 V and the
output signal is measured at 2 V peak.

1. Find the ratio of output to input voltage in dB.


2. Compare the power-generating capabilities of
the two signals in linear units.
2
V
P = RMS R
Student - Solution: Convert each peak voltage to RMS, then apply
Equation 1.9 to the given ratio. Also calculate the ratio without taking
the log.

• The ratio of the amplitude of a signal coming out of a process to


that going into the process is known as the ?????
• “Gain,” and is often expressed in dB.

• When the gain is < 1, as it is here, it means there is actually a


Increase or reduction?, in signal amplitude.
In this case half the power was lost.
SIGNAL-TO-NOISE RATIO

• Most waveforms consist of signal plus noise mixed


together.

• The relative amount of signal and noise present in a


waveform is usually quantified by the SNR,

• Simply the ratio of signal to noise, both measured in


RMS (root mean squared) amplitude.
Signal-to-Noise Ratio (cont)
To convert from dB scale to a linear scale:

(Student)

(Student)

❖When expressed in dB, a positive number means the


signal is greater than the noise

❖and a negative number means the noise is greater than


the signal.
o e t pi tios t ei o espo i i e
v es e ive i t e e
(Student)

SNR in dB SNR Linear

10
1.412
1
0.7079

0.1
SNR A sinusoid with added noise at 4 levels of SNR (in dB).

1. SNR = 3 dB 100 SNR = ? 50 SNR = ?


2. SNR = -10 dB
3. SNR = -3 dB 50

4. SNR = 10 dB
0 0

-50

-100
10
SNR: +10db
-50
3
SNR: +3db
0 100 200 300 400 500 0 100 200 300 400 500
Time (msec.) Time (msec.)
Q./ How many
seconds? 50
SNR = ? 50
SNR = ?
0.5 S
Q/ Which figure
has less noise
and which one 0 0

has more
noise than the
others? -3
SNR: -3db -10
SNR: -10db
-50 -50
+10 less noise 0 100 200 300 400 500 0 100 200 300 400 500
Time (msec.) Time (msec.)
-10 more noise
6/15/2020

Course on SSBME
BioDSP LEC 5
Lecture 5: Basic Biomedical measurements
and statistics

Dr Ali Hussein

Filled by : Rami Ammar

This isn’t the Original Edition , It’s just a copy of the original one filled with

the Lecture notes mentioned during the Lecture time.

Basic Biomedical Signal


Measurements:

1.Can you give some examples ?

2.Why Biomedical signal measurements ?

1
6/15/2020

Examples
• Mean

• Max

2
6/15/2020

Applications of SP to improve
people’s life

https://cnet2.cbsistatic.com/img/0ORi-
Ot0VhhPHejBBT4TegGrGxM=/fit-
in/270x0/2016/01/18/9448be6e-89d8-
49b4-ad27-3f5976588c5b/arm1.jpg

http://web.mit.edu/jlramos/www/Imagen
s/Exo_real.png

Application:
BD of EMG Controlled Prosthesis

feature
0.5

segmentation
0

extraction
-0.5

classification
-1

(TD)
-1.5
0 2 4 6 8 10 12
4
x 10

LDA

3
6/15/2020

Pattern Recognition
EEG

4 2
3

http://www.degruyter.com/view/j/revneuro.2013.24.issue-5/revneuro-
2013-0032/graphic/revneuro-2013-0032_fig1.jpg

BCI Application based on EEG and ECOG

(classify)

https://www.etsu.edu/cas/bcilab/pictures/Leuthardt.jpg

4
6/15/2020

Pattern recognition steps

such as filtering

or termed ‘‘windowing’’

if signal processing takes more than 300 ms the patient will


feel the delay
Thus , segmentation should be done
for less than 300 ms of each window

Application:
BD of EMG Controlled Prosthesis

Segmentation
1

0.5

-0.5

-1

-1.5
0 2 4 6 8 10 12
4
x 10

5
6/15/2020

Why Biomedical measurements


• Example
1. EMG signal: IEMG
2. EEG signal: RMS
• Types of segmentation schemes
A- Detached or disjointed
windows ( window size x)

Original Data
0.5
Voltage mV

-0.5
0 2 4 6 8 10 12 14 16
Time(s)



Why Biomedical measurements


• Example
• EMG signal: IEMG
• EEG signal: RMS
B- Overlapped windows (window
size x, window overlap y)

Original Data Increment + overlap = window size


0.5
Voltage mV

-0.5
0 2 4 6 8 10 12 14 16
Time(s)



6
6/15/2020

https://www.researchgate.net/profile/Houtan_Jebelli2/publication/325455360/figure/fig5/AS:735077755535360@1552267602279/EEG-windowing-
approaches-a-fixed-windowing-approach-b-sliding.ppm

https://encrypted-
tbn0.gstatic.com/images?q=tbn%3AANd9GcSNxM0F4LTrtUFra1upwhZzIkA3ztiy
oYmyT05xty0mgKRMn7OU&usqp=CAU

Detached versus overlapped

ze

https://www.frontiersin.org/files/Articles/215913/fnins-10-00445-HTML/image_m/fnins-10-00445-g006.jpg

 overlap segmentation is used in prosthesis application because


it gives more and faster decisions

7
6/15/2020

Application:
BD of EMG Controlled Prosthesis

Feature
extraction

0.5

-0.5

-1

-1.5
0 2 4 6 8 10 12
4
x 10

I- Basic Measurements: Mean or average


One of the most straightforward of signal measurements is
the assessment of its average or mean value.

A- For an analog signal, x(t)

(Student)

B- In the digital domain, integration becomes summation


and the continuous signal, x(t), becomes the a discrete
signal xn, and T becomes N:

(Student)

8
6/15/2020

III- Basic Measurements: Integrated


EMG (IEMG)
• It is the absolute value of the mean
Steps (Students)
1. Take the absolute value
2. Then, take the sum of the samples.

• Example: IEMG for [10 3 -4 5 -2 -1 6 7]

IV-Basic Measurements: Variance

• A statistical measure related to the RMS value is


the “variance,” 2.
• The variance is a measure of signal variability
irrespective of its average.
• The calculation of variance for both discrete and
continuous signals is given as:

Dividing by N-1 gives a


Students better estimate of variance
if the signal is Gaussian.

9
6/15/2020

V-Basic Measurements: Standard Deviation


The “standard deviation” is another measure of a
signal’s variability and is simply the square root of
the variance:
Students

The average standard deviation of multiple sources is


equal to the average of the individual standard deviation
divided by N.

Averaging can be used to enhance SNR by N

II-Basic Measurements: RMS


Although the average value is a basic property of a
signal, it does not provide any information about the
variability (???) of the signal.

The root mean squared (RMS) value is a measurement


that includes both the signal’s variability and its average.

(Student)

Note: Last year we did some measurements


such as the mean, IEMG and RMS for a whole
signal, now we will do it for short segments but
many times

10
6/15/2020

Basic Measurements: RMS

The discrete form of the equation is obtained by


following the same rules used for the mean:

(Student)

The RMS is calculated by following the acronym (RMS)


backward: R M S
1. first squaring the signal (S),
2. then taking its average (M),
3. and finally taking the square root of this average (R).



Example: Basic preprocessing on EMG

https://bretcontreras.com/wp-content/uploads/EMG.png



11
6/15/2020

Task: Calculate the 1) mean, 2) IEMG, 3) RMS , 4) Variance


and 5) STD values for the following signal? -6 12 5 4 -8 -2 3

Answer
(Student)

12
6/15/2020

Task
abductor pollicis brevis

VI-Basic Measurements: Waveform Length (WL)

• WL is defined as the cumulative sum of the


differences over the time segment. It used for
the EMG signal. The formula for calculating WL
is given by,

Students

• where xi represents the EMG signal and N


denotes number of samples of the EMG signal.
• Example:

13
6/15/2020

VII- Basic Measurements:


Number of Zero crossing (ZC)
• ZC is a time domain measure of the frequency information
of the EMG signal. It is estimated by calculating the number
of times the values of the amplitude cross the zero
amplitude level.
• A threshold condition (alpha) is usually applied to avoid
voltage background noise and voltage fluctuations

• An increment of zero crossing count is done for two


consecutive samples xk and xk+1 if

Students and

VIII- Basic Measurements: Number of Slope


or
Sign changes (SSC)
• SSC is another feature that represents the frequency
information of the EMG signal, and it is related to the ZC
feature. It counts how many times the slope of the EMG
signal changes sign
• A threshold function is applied to avoid the background
noise of the signal.
• The SSC is incremented for three consecutive samples
(xk-1 , xk and xk+1) if

and
Students

14
6/15/2020

ZC and SSC
10 3 -4 5 -2 -1 6 7

ZC= 4
SSC= 3

Summary .

.
Group 1
.

Biomedical .
signal
measurements .

.
Group 2
.

15
6/15/2020

How to do segmentation and


features extraction together ?
A. Detached: Window size (ms) and (ms)
and FS. Sampling rate (FS in Hz)

B. Overlapped, Window size (ms), window


increment
Original Data
0.5
Voltage mV

-0.5
0 2 4 6 8 10 12 14 16
Time(s)

Multichannel segmentation and


feature extraction

https://www.frontiersin.org/files/Articles/215913/fnins-10-00445-HTML/image_m/fnins-10-00445-g006.jpg

16
6/15/2020

https://www.researchgate.net/profile/Fernando_Sciascio/publication/257690526/figure/fig3/AS:297570170621988@1447957665997/
The-EMG-channel-is-segmented-into-sliding-windows-of-256-samples-with-overlapping-of-128.png

Pattern recognition steps

I. .

II. .

III. .

IV. Classification

17
SSBME
LEC. 7
EXAMPLES OF BIOMEDICAL SIGNALS
APPLICATIONS

CLINICAL USE OF INTRAMUSCULAR


EMG
Dr Ali Hussein
The Biomedical Engineering Department,
Al-Khawarzmi College of Engineering, Baghdad University

Biomedical Signal Processing


New Biomedical signal
 The Electromyogram (EMG): The electrical activity of
the muscles.
Surface EMG
0.5
Amplitude(mV)

-0.5
0 1 2 3 4 5 6 7 8 9 10

0.5
Amplitude(mV)

-0.5
0 1 2 3 4 5 6 7 8 9 10

0.5
Amplitude(mV)

-0.5
0 1 2 3 4 5 6 7 8 9 10
Time(sec)

http://www.emg-eeg.com/wp-content/uploads/2011/05/emg.jpg
The electromyogram (EMG)
 Skeletal muscle fibers are twitch fibers:

 produce a mechanical twitch response for a single


stimulus and generate a propagated action
potential.

 Twitch: Little contraction.


 Muscle fibre=muscle cell

 When muscle fibres twitch collectively, they will


produce a force of sustained contraction.
The primary function of muscle (quick review)

 The primary function of muscle, regardless of the


kind,
 is to convert chemical energy to mechanical work, and
in so doing, the muscle shortens or contracts.
 What is the Building Block of a Muscle?

 Skeletal muscles made up of collections of motor


units (MUs), each of which consists of:

1. motoneuron or motor neuron, its axon,


2. and all muscle fibers innervated by that axon.
What is a Motor unit- (review)

 The combination of a single motor neuron and all of


the muscle fibres it controls is called

Reference BioPac student Lab book


Motor Unit (students) Motor Unit and
Action Potential
(MUAP)
1. Motor unit
2. Action potential

•How to increase EMG


amplitude (inc. muscle
force)?

1-The recruitment of
additional MU.
2- Increase in the firing
Schematic illustration of two
rate of already active
motor units in a muscle. MUs.
Spatiotemporal
Recruitment of MU
Students

Figure 1.17 Schematic representation of spatiotemporal recruitment of motor units and the
resulting EMG signals assuming that the MUAPs do not overlap.
Schematic representation of a motor unit and
model for the generation of EMG signals.

A-

B-

C-
Figure 1.6: Schematic representation of a motor unit and model for the generation of EMG
signals.

A- Top panel: A motor unit includes an anterior horn cell or motor neuron (illustrated in a
cross-section of the spinal cord), an axon, and several connected muscle fibers. The hatched
fibers belong to one motor unit; the non-hatched fibers belong to other motor units. A
needle electrode is also illustrated.
B- Middle panel: The firing pattern of each motor neuron is represented by an impulse
train. Each system hi(t) shown represents a motor unit that is activated and generates a train
of SMUAPs. The net EMG is the sum of several SMUAP trains.
C- Bottom panel: Effects of instrumentation on the EMG signal acquired. The observed
EMG is a function of time t and muscular force produced F.
Reproduced with permission from C.J. de Luca, Physiology and mathematics of myoelectric signals, IEEE Transactions on Biomedical
Engineering, 26:313–325, 1979. c IEEE.
Gradation of muscular contraction: I

 How muscle contraction is graded?


 Muscular contraction levels are controlled in two

ways:
1. Temporal recruitment—increasing the frequency of
discharge or firing rate of each MU, with
increasing effort.
From (5-6) pps to 40 pps

2. Spatial recruitment —activating new MUs,


Gradation of muscular contraction: II
 MUs activated at different times and at different
frequencies: This is known as (asynchronous
contraction).

 A- Weak volitional effort: MUs fire at about 5 − 15


pps.
 B- As greater tension is developed, an interference
pattern
 EMG is obtained (not MUAPT), with the active MUs
firing at 25−50 pps.
 Spatio-temporal summation of the MUAPs of all
active MUs gives rise to the EMG of the muscle.

 EMG signals recorded using surface electrodes:


 But complex signals including interference patterns

of several MUAP trains —difficult to analyze.

 EMG may be used to diagnose neuromuscular


diseases such as neuropathy and myopathy.
Engineering analysis-review
1) Mean of the EMG:2) IEMG:
Can you give more examples on Engineering analysis ?

Innervations Ratio
 Number of muscle fibers per motor nerve fiber:
innervation ratio.

A-Large muscles for gross movement have 100s of


fibers/MU;

B- muscles for precise movement have fewer fibers per MU.


Q/ Is the innervation ratio is fixed
for all muscles?
 Example-1:
Platysma muscle of the neck: 1, 826 large nerve
fibers controlling 27, 100 muscle fibers; innervation
ratio of XXXX.
 Students: Answer:

 First dorsal interosseus (finger) muscle:

199 large nerve fibers and 40, 500 muscle fibers;


innervation ratio of XXXX.

 Students: Answer
 Thus, Innervation ratio varies from muscle to
muscle

 Mechanical output (contraction) of a muscle = net


result of stimulation and contraction of several of
its motor units.
Single Motor Unit Action Potential (SMUAP)
 When stimulated by a neural signal, each MU
contracts and causes an electrical signal that is the
summation of the action potentials of all of its
constituent cells:

 this is known as the single motor unit action potential.


SMUAP or MUAP recorded using needle electrodes.

 Normal SMUAPs usually


1. biphasic
2. or triphasic;

Plot of the examples of SMUAPs
1. Monophasic

2. Biphasic

3. or Triphasic;
The shape of the
SMUAP is important
for medical diagnosis !
Factor affecting the shape of a
recorded SMUAP
 The shape of a recorded SMUAP depends upon

1. the type of the needle electrode used, its positioning


with respect to the active motor unit,

2. and the projection of the electrical field of the activity


onto the electrodes.

Example: Parallel or perpendicular to the fibre.


-It can be reversed or smaller in amplitude
EMG and diagnosis of Diseases
 The shape of SMUAPs is affected by disease. There
are two major types of disease

 (Students)
I- Neuropathy:
a) Nervous system is affected while the muscular system
is ok.
b) slow conduction,
c) desynchronized activation of fibers (muscle fibers
are activated with some delay),which will lead to:
d) polyphasic SMUAP with an amplitude larger
than normal (only one muscle fibre is activated).

 The same MU may fire at higher rates than normal


before more MUs are recruited.
 In order to compensate, MF fire at a higher level
and higher rate.
 In order to compensate, MF fire at a higher level
and higher rate for compensation

 This is because a conduction problem, How we


diagnosis(conduction problem) ?

 Answer: ENG
II-Myopathy:
 Nervous system is ok while the muscular system is
affected= loss of muscle fibers in the muscle, with the
neurons presumably intact.

a) Splintering of SMUAPs occurs due to


b) asynchrony in activation
c) as a result of patchy destruction of fibers
(muscular dystrophy),

 leading to splintered SMUAPs.


 More MUs recruited at low levels of effort.
Figure 1.8: Examples of SMUAP trains. (a) From the right deltoid of a normal subject, male, 11 years; the SMUAPs are mostly
biphasic, with duration in the range 3−5 ms. (b) From the deltoid of a six-month-old male patient with brachial plexus injury
(neuropathy); the SMUAPs are polyphasic and large in amplitude (800 μV ), and the same motor unit is firing at a relatively
high rate at low-to-medium levels of effort. (c) From the right biceps of a 17-year-old male patient with myopathy; the SMUAPs
are polyphasic and indicate early recruitment of more motor units at a low level of effort. The signals were recorded with
gauge 20 needle electrodes. The width of each grid box represents a duration of 20 ms; its height represents an amplitude of
200 μV . Courtesy of M. Wilson and C. Adams, Alberta Children’s Hospital, Calgary.
Pattern Recognition for
neuromuscular disease
classification
7/13/2020

SSBME
Lecture 9
The Wiener Filter and Adaptive Filter

Dr Ali Hussein
The Biomedical Engineering Department,
Al-Khawarzmi College of Engineering,
Baghdad University

Biomedical Signal Processing

40

Potential solutions to the previous problems


Filtering techniques

I- Frequency Domain filters:

A. Removal of High Frequency Noise: Butterworth Low pass


filters
B. Removal of Low Frequency Noise: Butterworth High pass
filters
C. Removal of periodic artifacts: Notch and Comb filters

II- Optimal filter


III-Adaptive filters for Removal of Interference
Combined case study
41

1
7/13/2020

Lecture plan
– Optimal filter: Wiener filter

– Adaptive filters for Removal of Interference

– Combined noise case study

– STFT

42

Optimal Filter
The Wiener
Filter

43

2
7/13/2020

3.5 Optimal Filtering: The Wiener


Filter
• Problem: Design an optimal filter to remove noise from a
signal, given that the signal and noise processes are
1. independent, Stationary (Periodic ??) random processes.
• You may assume the “desired” or ideal characteristics of
the uncorrupted signal to be known.
• The noise characteristics may also be assumed to be known
• Solution: Wiener filter theory provides for optimal
filtering by taking into account the statistical characteristics
of the signal and noise processes.
• The filter parameters are optimized with reference to a
performance criterion.

44

• Single input, single output, FIR filter with real


input signal values and real coefficients.

• Figure 3.46: signal flow diagram of a


transversal filter with coefficients or tap
weights wi, i = 0, 1, 2, . . . ,M − 1, input x(n),
and output ˜ d(n).

45

3
7/13/2020

• Output ˜ d(n) = an esmate of some “desired”


signal d(n) that represents the ideal, uncorrupted
signal.

• If we assume that the desired signal is available,


estimation error between the output and the
desired signal

Eq. 1

Eq. 2
46

Winner filter signal Flow diagram

Figure 3.46: Block diagram of the Wiener filter.

47

4
7/13/2020

Applications to
Wiener filter

48

Illustration of application: Wiener filter

Wiener filter theory estimates the


tap weight sequence that
minimizes the mean squared value
of the estimation error;

output = minimum mean squared


error (MMSE) estimate of the
desired response: optimal filter.
Figure 3.5: ECG signal with
high-frequency noise.

one cycle of the noisy ECG signal in Figure 3.5


(labeled as Original);
49

5
7/13/2020

Estimating the model ??


• Piecewise linear model of the desired version of the signal obtained by
concatenating linear segments similar to P, QRS, and T waves in amplitude,
duration, and interval in given noisy signal.

piece-wise linear model of the desired noise-free signal (Model);

and the output of the Wiener filter (Restored).

50

Filtered signal

51

6
7/13/2020

Adaptive
Filters

52

III- Adaptive Filters for Removal of


Interference

• An adaptive filter is essentially a digital filter with self-adjusting


characteristics.
• It adapts, automatically, to changes in its input signals [EI]

• Filters with fixed characteristics, tap weights, or coefficients are suitable


when the characteristics of the signal and noise are stationary and
known.

• Such filters are not applicable when the characteristics of the signal
and/or noise vary with time: when they are nonstationary.

• They are also not suitable when the spectral contents of the signal
and the interference overlap significantly.

53

7
7/13/2020

When to use adaptive filters [1]


• Conventional digital filters, with fixed coefficients, are used when the signal
and noise occupy fixed and separate frequency bands.

• We use adaptive filters :


1. –when there is a spectral overlap between the signal and noise;
2. –when the band occupied by the noise is unknown or varies with time;
3. –when it is necessary for the filter characteristics to be variable or to adapt
to changing conditions.

• •Because of their self-adjusting performance and in-built flexibility adaptive


filters are widely used.

54

• Problem: Design an optimal filter to remove a


nonstationary interference from a nonstationary signal.

• An additional channel of information related to the


interference is available for use.

• The filter should continuously adapt to the changing


characteristics of the signal and interference.

55

8
7/13/2020

3.6.1 The adaptive noise canceller


• “Primary input” or observed signal x(n) is a mixture of the signal of
interest v(n) and the “primary noise” m(n):
• It is desired that the interference or noise m(n) be estimated and
removed from x(n) in order to obtain the signal of interest v(n).
• ANC requires a second input: “reference input” r(n) to be closely related
to or correlated with the interference or noise m(n) in some manner
that need not be known.
• The ANC filters or modifies the reference input r(n) to obtain a signal
y(n) as close to noise m(n) as possible.

Figure 3.49: Block diagram of a generic adaptive noise canceller (ANC) or adaptive filter.
56

Adaptive Vs. to Winner filter signal


Flow diagram

Figure 3.46: Block diagram of the Wiener filter.

57

9
7/13/2020

• Assume that the signal of interest v(n),


• the primary noise m(n),
• the reference input r(n), and the
• primary noise estimate y(n)
are statistically stationary and have zero means.
v(n) is uncorrelated with m(n) and r(n), and
r(n) is correlated with m(n).

y(n) = ˜m(n): esmate of the primary noise


obtained at the output of the adaptive filter.
58

Applications to
Adaptive Filters

59

10
7/13/2020

1- Adaptive cancelation of ocular 2- Fetal monitoring - cancellation of


artefact from human EEG- share the maternal ECG from fetal ECG. [1]
same frequency band [1]

E. Ifeachor and Davies, Practical Approach to Digital Signal Processing.

60

Last Application:
Removal of combined
Artifacts in the ECG
using traditional filters

61

11
7/13/2020

• Last Application: Removal of Artifacts in the ECG


Problem: Figure 3.8 (top trace) shows an ECG signal
with a combination of baseline drift, high frequency
noise, and power line interference.

• Design filters to remove the artifacts.

62

Figure 3.56 ECG signal with a combination of artifacts and its filtered versions. The
duration of the signal is10.7 s.
63

12
7/13/2020

Solution: HPF, LPF, and comb filter in series (cascade).

Figure 3.57 Top and bottom plots: Power spectra of the ECG signals in the top and bottom
traces of Figure 3.8. Middle plot: Frequency response of the combination of lowpass, highpass,
and comb filters. The cutoff frequency f the highpass filter is 2 Hz; the highpass portion of the
frequency response is not clearly seen in the plot.

64

Review of
Transform
Domain methods

65

13
7/13/2020

Transform Domain methods

Transforms

Short time
Time Frequency
Fourier
domain FFT
Transform

66

Example- EMG signal and its frequency


spectrum
Original Data
0.5
Voltage mV

-0.5
0 2 4 6 8 10 12 14 16
Time(s)

80

60
Magnitude

40

20

0
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Frequency(Hz)

67

14
7/13/2020

II- Short-Time Fourier Transform (STFT)


1.Time domain
-You see e signal in time domain.

2. Frequency domain
-You convert the signal to frequency domain.

Limitation:
-You can not localize specific frequency for a specific
time.

68

Example- STFT Heart Surgery of an


Infant

69

15
7/13/2020

Short Time Fourier Transform (STFT)

70

EEG

http://d29qn7q9z0j1p6.cloudfront.net/content
/roypta/369/1952/3884/F1.large.jpg
71

16
7/13/2020

72

EMG

https://i.ytimg.com/vi/jWZ5Cug9yyY/maxresd
efault.jpg

73

17
7/13/2020

Event
detection

74

Event detection
Example: QRS detection

75

18

You might also like