dr. paul a. wetzel department of biomedical engineering virginia commonwealth university march 10...

30
Dr. Paul A. Wetzel Dr. Paul A. Wetzel Department of Biomedical Engineering Department of Biomedical Engineering Virginia Commonwealth University Virginia Commonwealth University March 10 March 10 th th , 2004 , 2004 Signal Processing Basics Signal Processing Basics

Upload: bonnie-owens

Post on 23-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Dr. Paul A. WetzelDr. Paul A. Wetzel

Department of Biomedical Engineering Department of Biomedical Engineering Virginia Commonwealth UniversityVirginia Commonwealth University

March 10March 10thth, 2004, 2004

Signal Processing BasicsSignal Processing Basics

Page 2: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

ConceptsConcepts

• Origin of SignalsOrigin of Signals• Representation of SignalsRepresentation of Signals• Data AcquisitionData Acquisition• Sampling Theorem (Nyquist)Sampling Theorem (Nyquist)• Analog to Digital ConversionAnalog to Digital Conversion• Digital to Analog ConversionDigital to Analog Conversion• Signal Processing TechniquesSignal Processing Techniques• ExamplesExamples

Page 3: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Signals and Systems Signals and Systems (cont)(cont)

• Signals contain information that can be used to explain the underlying Signals contain information that can be used to explain the underlying physiological mechanisms of a specific event or system.physiological mechanisms of a specific event or system.

• Signals must generally be acquired then analyzed to extract the desired Signals must generally be acquired then analyzed to extract the desired informationinformation

• Interpretation of a physical process based on observation of a signal or how Interpretation of a physical process based on observation of a signal or how a process affects the characteristic of the signal.a process affects the characteristic of the signal.

Page 4: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Characteristics of SignalsCharacteristics of Signals

• Signals can be defined as:Signals can be defined as:• ContinuousContinuous

– A continuum of space or timeA continuum of space or time– Continuous variable functionsContinuous variable functions

• DiscreteDiscrete– Discrete points in time or spaceDiscrete points in time or space– Represented as sequences of numbersRepresented as sequences of numbers

• Biological signals are almost always continuousBiological signals are almost always continuous

Page 5: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Characteristics of Signals Characteristics of Signals (cont)(cont)

Biological signals can be:Biological signals can be:• DeterministicDeterministic

– Defined by mathematical functions or rulesDefined by mathematical functions or rules• Periodic signals are deterministic (sums of sinusoids)Periodic signals are deterministic (sums of sinusoids)• Transient signals can be deterministicTransient signals can be deterministic

• RandomRandom– Are described by statistical or distribution propertiesAre described by statistical or distribution properties– Stationary signals remain the same over timeStationary signals remain the same over time

• StatisticalStatistical• Frequency spectraFrequency spectra

Page 6: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Characteristics of Signals Characteristics of Signals (cont)(cont)

Periodic Sinusoid

Damped Sinusoidal/Transient

Page 7: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Characteristics of Signals Characteristics of Signals (cont)(cont)

Real biological signals are not necessarily deterministicReal biological signals are not necessarily deterministic• Unpredictable noiseUnpredictable noise• Non-stationaryNon-stationary

– Change in cardiac waveform over timeChange in cardiac waveform over time• Identification of stationary segments of random signals is an Identification of stationary segments of random signals is an

important part of signal processing and pattern analysisimportant part of signal processing and pattern analysis

Page 8: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Time and Frequency Domain RelationshipsTime and Frequency Domain Relationships

• All signals have frequency domain componentsAll signals have frequency domain components• Physiological and time domain signals can often be decomposed Physiological and time domain signals can often be decomposed

into a summation of sinusoidal frequency component waveforms.into a summation of sinusoidal frequency component waveforms.• Time domain waveforms can be synthesized by proper addition of Time domain waveforms can be synthesized by proper addition of

frequency domain components.frequency domain components.

• The frequency content of a signal contributes to the shape and time The frequency content of a signal contributes to the shape and time domain behavior of the signal.domain behavior of the signal.

• Modification of a signal in the time domain will affect the Modification of a signal in the time domain will affect the frequency content of the signal in the frequency domain.frequency content of the signal in the frequency domain.

• Modification of the frequency domain components or frequency Modification of the frequency domain components or frequency spectra will affect the shape/characteristics of a signal in the time spectra will affect the shape/characteristics of a signal in the time domain.domain.

Page 9: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Fourier Fourier AnalysisAnalysis

• Decomposition of a periodic signal into a sum of Decomposition of a periodic signal into a sum of sinusoidal functions. sinusoidal functions.

The resulting The resulting complex but periodic complex but periodic waveformwaveform

Summation of Summation of sinusoidal components sinusoidal components results in a complex results in a complex waveformwaveform

Page 10: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Fourier Fourier SynthesisSynthesis

• A square wave function with sharp edges can be synthesized by A square wave function with sharp edges can be synthesized by summing an infinite number of odd harmonic sinusoidal waveforms summing an infinite number of odd harmonic sinusoidal waveforms of differing amplitudes and phases. of differing amplitudes and phases.

Page 11: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Frequency Content of Biomedical SignalsFrequency Content of Biomedical Signals

• Electroencephalogram (EEG)Electroencephalogram (EEG)• Frequency range: DC – 100 Hz Frequency range: DC – 100 Hz

• Electromyogram (EMG)Electromyogram (EMG)• Frequency range: 10 – 200 Hz Signal range: Dependant on Electrode Frequency range: 10 – 200 Hz Signal range: Dependant on Electrode

PlacementPlacement • Electrocardiogram (ECG)Electrocardiogram (ECG)

• Frequency range: 0.05 – 200 Hz Signal range: Fetal 10Frequency range: 0.05 – 200 Hz Signal range: Fetal 10uuV, 5 mV AdultV, 5 mV Adult• Heart Rate Heart Rate

• Frequency range: 45 – 200+ beats/minFrequency range: 45 – 200+ beats/min• Blood Pressure Blood Pressure

• Frequency range: DC – 200 Hz 40 – 300 mm Hg (arterial) 0 – 15 mm Hg Frequency range: DC – 200 Hz 40 – 300 mm Hg (arterial) 0 – 15 mm Hg (venous)(venous)

• Breathing RateBreathing Rate• Frequency range: 12 – 40 breaths/minFrequency range: 12 – 40 breaths/min

Page 12: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

FiltersFilters

Filters allow signals of certain frequencies to pass but attenuate the Filters allow signals of certain frequencies to pass but attenuate the passing of other frequencies. Filters are an important aspect of signal passing of other frequencies. Filters are an important aspect of signal processing.processing.

• Low Pass Filters – pass low frequencies and attenuate high Low Pass Filters – pass low frequencies and attenuate high frequency components above a cutoff frequency.frequency components above a cutoff frequency.

• High Pass Filters – pass high frequencies and attenuate low High Pass Filters – pass high frequencies and attenuate low frequency components less than the cutoff frequency.frequency components less than the cutoff frequency.

• Band Pass Filters – pass frequencies between a lower and upper Band Pass Filters – pass frequencies between a lower and upper frequency cutoff point. Signals with frequencies above and below frequency cutoff point. Signals with frequencies above and below the cutoff are attenuated.the cutoff are attenuated.

• Notch Filters – Attenuate or reject frequencies between a lower Notch Filters – Attenuate or reject frequencies between a lower cutoff and an upper cutoff frequency. cutoff and an upper cutoff frequency.

Page 13: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Filters Filters (cont)(cont)

• A Low Pass Filter (LPF) removes or attenuates high frequency A Low Pass Filter (LPF) removes or attenuates high frequency components from the signal. components from the signal.

• Sharp transitions become more rounded and smoothedSharp transitions become more rounded and smoothed• Rapid transitions become slowerRapid transitions become slower

VVinin

VVoutout

Circuit Diagram of a Circuit Diagram of a First Order LPFFirst Order LPF

LPF Frequency ResponseLPF Frequency Response

Page 14: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Filters Filters (cont)(cont)

• A High Pass Filter (HPF) removes or attenuates low frequency A High Pass Filter (HPF) removes or attenuates low frequency components from the signal. components from the signal.

• Steady state portions decay to zeroSteady state portions decay to zero• Rapid transitions are accentuatedRapid transitions are accentuated• Acts as a differentiatorActs as a differentiator

VVinin

Vout

Circuit Diagram of a Circuit Diagram of a First Order HPFFirst Order HPF

HPF Frequency Response

Page 15: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Signal Processing Basics Signal Processing Basics

• Effects of measuring devices and noise on characterization and Effects of measuring devices and noise on characterization and interpretation of the signal.interpretation of the signal.

• Developing skills for identifying and separating the desired and Developing skills for identifying and separating the desired and unwanted components of a signal. unwanted components of a signal.

• Uncovering the nature of the phenomena responsible for generating Uncovering the nature of the phenomena responsible for generating the signal based on identification and interpretation of an appropriate the signal based on identification and interpretation of an appropriate model for the signal.model for the signal.

• An understanding of the properties of a physical system based on a An understanding of the properties of a physical system based on a signal used to stimulate the system and the response of the system.signal used to stimulate the system and the response of the system.

Page 16: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Data Acquisition and Recovery SystemData Acquisition and Recovery System

TransducerTransducerAnti-Alaising Anti-Alaising

FilterFilterAmplifierAmplifierAnalog Analog

MultiplexorMultiplexorSample & Sample &

HoldHold

Program Program SequencerSequencer

QuantizerQuantizer

CoderCoder

A/D ConverterA/D Converter

Digital Digital Output Output SignalSignal

Analog Analog Input Input SignalSignal

uPuP Control Control

Additional Additional Analog Analog SignalsSignals

Analog Analog Output Output SignalSignal

D/A ConverterD/A ConverterData Recovery FilterData Recovery FilterAmplifierAmplifier

Page 17: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Data Acquisition StagesData Acquisition Stages• Transducer

• Convert from some physical modality to some electrical signal• Linearity/Calibration effects

• Amplifier• Linear, Logarithmic, Computational• Input impedance• Common mode rejection • Amplify signal to maximize range of A/D

• Anti-Aliasing Filter (LPF)• Limit high frequency components• Noise reduction

• Analog Multiplexor• Sequentially switch between multiple signal inputs

• A/D Converter (Successive approximation type most common for biomedical signal acquisition) • Sample and Hold• Quantizer – Transform a CT signal into a set of discrete output states

– Resolution (FSV/2n) where n = number of bits– Quantization errors – minimize by increasing nit number

• Coder – Process of assigning a digitally coded word to each of the output states• Converter errors• Converter speed

Page 18: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Sampling TheoremSampling Theorem

• The signal must be bandlimitedThe signal must be bandlimited• When sampling a continuous time signal it must be sampled at a When sampling a continuous time signal it must be sampled at a

frequency at least twice the signal’s highest frequency component.frequency at least twice the signal’s highest frequency component.• The minimum sampling frequency is called the Nyquest sampling The minimum sampling frequency is called the Nyquest sampling

rate or the Nyquist sampling frequency.rate or the Nyquist sampling frequency.– If the highest frequency in a signal is 50 Hz the signal must be If the highest frequency in a signal is 50 Hz the signal must be

sampled at a minimum rate of 100 Hz.sampled at a minimum rate of 100 Hz.• Sampling at less than the Nyquist rate results in alaising and Sampling at less than the Nyquist rate results in alaising and

distortion of the signal.distortion of the signal.– If a signal with a 100 Hz component is sampled at 150 Hz an If a signal with a 100 Hz component is sampled at 150 Hz an

alias frequency of 50 Hz will result. alias frequency of 50 Hz will result.

Page 19: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Effects of Sampling Rate on Sinusoidal SignalsEffects of Sampling Rate on Sinusoidal Signals

• Accuracy of waveform reproduction increases with higher sampling Accuracy of waveform reproduction increases with higher sampling rates.rates.

• A minimum of two samples per cycle are required to completely A minimum of two samples per cycle are required to completely reproduce the sinusoidal waveform.reproduce the sinusoidal waveform.

• The Nyquest theorem states that to accurately reproduce a signal:The Nyquest theorem states that to accurately reproduce a signal:• The signal must be bandlimitedThe signal must be bandlimited• The sampling rate must be at least twice the highest frequency The sampling rate must be at least twice the highest frequency

component of the signal.component of the signal.

Page 20: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Alaising Due to UndersamplingAlaising Due to Undersampling

• Inadequate sampling rates results in aliasing and frequency Inadequate sampling rates results in aliasing and frequency folding in the frequency domain. folding in the frequency domain.

• To minimize alaising, the input signal must be bandlimited To minimize alaising, the input signal must be bandlimited and a sufficient sampling frequency must be used.and a sufficient sampling frequency must be used.

Page 21: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Antialaising PrefiltersAntialaising Prefilters

Ideal Low Pass Prefiltering StageIdeal Low Pass Prefiltering Stage

Page 22: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

An Ideal SamplerAn Ideal Sampler

• The analog signal is periodically sampled every The analog signal is periodically sampled every TT seconds. seconds.• Time is discretized in units of the sampling interval Time is discretized in units of the sampling interval T.T.• Sampling results in a severe chopping of the original signal.Sampling results in a severe chopping of the original signal.• The accuracy of reproduction of the signal is highly dependent on the The accuracy of reproduction of the signal is highly dependent on the

sampling rate. Where sampling rate. Where ffss = 1/ = 1/T T

Page 23: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Sampling ProcessSampling Process

Ideal SamplingIdeal Sampling Practical SamplingPractical Sampling

Changes in aperture width can lead to measurement uncertainty

Page 24: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Quantization of DataQuantization of Data

Only discrete Only discrete values are codedvalues are coded

• The quantized sample can take only one of 2The quantized sample can take only one of 2bb possible values possible values• The spacing between levels is called the quantization resolution. The spacing between levels is called the quantization resolution. • Quantization error is the error that results from using the quantized Quantization error is the error that results from using the quantized

signal instead of the true signal.signal instead of the true signal.• Quantization can be reduced by increasing resolution.Quantization can be reduced by increasing resolution.

Page 25: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Frequency Domain Effects Due to Sampling Frequency Domain Effects Due to Sampling

Frequency Foldover Effects Due Frequency Foldover Effects Due to to InadequateInadequate Sample Rate Sample Rate

Elimination of Foldover Elimination of Foldover Due to Due to AdequateAdequate

Sampling RateSampling Rate

Page 26: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Analysis Techniques Analysis Techniques

• Fourier AnalysisFourier Analysis• Spectral AnalysisSpectral Analysis• CorrelationCorrelation• Signal Averaging/SmoothingSignal Averaging/Smoothing• Differentiation/IntegrationDifferentiation/Integration• Digital FilteringDigital Filtering• System IdentificationSystem Identification• Wavelet AnalysisWavelet Analysis• Neural NetworksNeural Networks• Fuzzy LogicFuzzy Logic

Page 27: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Fourier AnalysisFourier Analysis

Pure 100 Hz Pure 100 Hz sinusoidal signal sinusoidal signal w/o noise.w/o noise.

Fourier analysis of the signal reveals the 100 Hz component.

ConditionsConditions• Function should be Function should be

periodicperiodic• Finite number of Finite number of

discontinuitiesdiscontinuities• Finite number of Finite number of

min/maxmin/max• Integral < infinityIntegral < infinity

Page 28: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Fourier AnalysisFourier Analysis

Noisy signal with Noisy signal with 100 Hz component100 Hz component

Fourier analysis of the Fourier analysis of the signal reveals the 100 signal reveals the 100 Hz component.Hz component.

Page 29: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Ensemble AveragingEnsemble Averaging

Ensemble Average

Signal w/Noise

Fiducial Marks

• Signal to Noise Ratio (SNR) improves by Signal to Noise Ratio (SNR) improves by m where m is m where m is equal to the size of the ensemble average. equal to the size of the ensemble average.

• Assumptions:Assumptions:• Signal must be repetitive but not necessarily periodic Signal must be repetitive but not necessarily periodic • Noise must be random and not correlated to the signalNoise must be random and not correlated to the signal• The temporal position of each waveform must be The temporal position of each waveform must be

knownknown

Page 30: Dr. Paul A. Wetzel Department of Biomedical Engineering Virginia Commonwealth University March 10 th, 2004 Signal Processing Basics

Ensemble AveragingEnsemble Averaging