0% found this document useful (0 votes)
85 views51 pages

Aau/Aait Center of Biomedical Engineering Digital Signal Processing

This document discusses digital signal processing (DSP) and its applications in biomedical engineering. It provides 3 key points: 1) DSP involves changing or analyzing information measured as discrete sequences of numbers, as opposed to continuous analog signals. It has applications in biomedical areas like ECG analysis, EEG analysis, speech processing, and image processing. 2) To implement DSP, systems must be able to perform numerical operations like addition and multiplication, as well as analog-to-digital and digital-to-analog conversion. This allows capturing analog signals digitally and reconstructing analog outputs. 3) Sampling is the process of converting continuous signals to discrete samples by taking values at time intervals. The Ny

Uploaded by

Surafel Tadesse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views51 pages

Aau/Aait Center of Biomedical Engineering Digital Signal Processing

This document discusses digital signal processing (DSP) and its applications in biomedical engineering. It provides 3 key points: 1) DSP involves changing or analyzing information measured as discrete sequences of numbers, as opposed to continuous analog signals. It has applications in biomedical areas like ECG analysis, EEG analysis, speech processing, and image processing. 2) To implement DSP, systems must be able to perform numerical operations like addition and multiplication, as well as analog-to-digital and digital-to-analog conversion. This allows capturing analog signals digitally and reconstructing analog outputs. 3) Sampling is the process of converting continuous signals to discrete samples by taking values at time intervals. The Ny

Uploaded by

Surafel Tadesse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 51

AAU/AAIT

CENTER OF BIOMEDICAL ENGINEERING


DIGITAL SIGNAL PROCESSING

Chapter 1:
Sampling and Reconstruction of Continuous-
Time Signals
Introduction
to Digital Signal Processing (DSP)
?What is Digital Signal Processing (DSP)

• Digital: Operating by the use of discrete signals to represent


data in the form of numbers.
• Signal: A parameter (Electrical quantity or effect) that can
be varied in such a way as to convey information.
• Processing: A series operations performed according to
programmed instructions.

 Changing or analyzing information which is measured as


discrete sequences of numbers.
Application of DSP-Biomedical

 Biomedical: Analysis of biomedical signals, diagnosis, patient


monitoring, preventive health care, artificial organs.
Examples:
1. Electrocardiogram (ECG) signal-provides doctor
with information about the condition of the
patient heart.

2. Electroencephalogram (EEG) signals- provides


information about the activity of the brain
…Cont

 Speech Applications

Examples:
1. Noise reduction-reducing background noise in the sequence
produced by a sensing device (Microphone)
2. Speech recognition-differentiating between various speech
sounds.
3. Synthesis of artificial speech- text to speech system for blind.
…Cont

 Image Processing

1. Content based image retrieval- browsing, searching and


retrieving images from database.
2. Image enhancement
3. Compression- reducing the redundancy in the image data
to optimize transmission/storage
DSP Implementation

 To Implement DSP we must be able to

1) Perform Numerical operations including for example


additions, multiplications, data transfers and logical
operations
 Either using computer or special-purpose hardware
• DSP chip- a programmable device with its own native
instruction code.
• Designed specifically to meet numerically-intensive
requirements of DSP.
…Cont

 To Implement DSP we must be able to

2) Convert analog signals into the digital information


 sampling & involves analog-to-digital conversion

e.g: touchtone system of telephone dialing (when button is


pushed two sinusoid signals are generated (tones) and
transmitted, a digital system determines the frequencies
and uniquely identifies the button – digital (1 to 12) output.
…Cont

 To Implement DSP we must be able to

3) Convert the digital information, after being processed back


to an analog signal
 involves digital to analog conversion & reconstruction

e.g: text-to-speech signal (characters are used to generated


artificial sound).
…Cont

 To Implement DSP we must be able to

 Perform both A/D and D/A Conversions

e.g: digital recording and playback of music (Signal is sensed


by microphones, amplified, converted to digital, processed,
and converted back to analog to be played.
Limitations of DSP

Most signal are analog in nature and have to be sampled


Loss of information: We only take samples of signals at
intervals and don’t know what happens in between.
Aliasing: Can’t distinguish between higher and lower
frequencies.
Limited frequency resolution: We only take samples for a
limited period of time does not pick up “relatively” slow changes.

Sampling Theorem: to avoid aliasing sampling rate must be at


least twice the maximum frequency component (bandwidth) of
signal
Advantages of Digital over Analog Signal
Processing
Why we Still do it?
1)Digital system can be simply reprogrammed for other
applications/ported to different
hardware/duplicated(Reconfiguring Analog system means
hardware redesign, testing, verification)
2)DSP provides better control of accuracy requirements (Analog
system depends on strict components tolerance, response may
drift with temperature)
…Cont

3) Digital signals can be easily stored without deterioration


(Analog Signal are not easily transportable and often can’t be
processed offline)
4) More Sophisticated signal processing algorithms can
Implemented (Difficult to perform precise mathematical
operations in analog form)
Sampling and
Reconstruction
Sampling

• Sampling is the processes of converting continuous by taking


the “samples” at discrete-time intervals
 Sampling analog signals makes them discrete in time but
still continuous valued
 If done properly (Nyquist theorem is satisfied), sampling
does not introduce distortion
• Sampled values:
 The value of the function at the sampling points
…Cont

•Sampling interval:
 The time that separates sampling points (interval b/w
samples), Ts
 If the signal is slowly varying, then fewer samples per second
will be required than if the waveform is rapidly varying
 So, the optimum sampling rate depends on the maximum
frequency component present in the signal.
•Sampling Rate (or sampling frequency fs): The rate at which the
signal is sampled, expressed as the number of samples per second
reciprocal of the sampling interval), 1/Ts = fs
…Cont

• Nyquist Sampling Theorem (or Nyquist Criterion): the


sampling is performed at a proper rate, no info is lost
about the original signal and it can be properly
reconstructed later on
Statement:
• “If a signal is sampled at a rate at least, but not exactly
equal twice the max frequency to component of the
waveform, then the waveform can be exactly
reconstructed from the samples without any distortion”
Periodic Sampling
• In this method x[n] obtained
from xc(t) according to the
relation :
x [n ]  x c (nT )    n  
T  sampling period f s  1/T  sampling frequency

• The sampling operation is generally not invertible i.e.,


given the output x[n] it is not possible in general to
reconstruct xc(t). Although we remove this ambiguity by
restricting xc(t).
Sampling with a Periodic Impulse
Train
• Figure(a) is not a representation of
any physical circuits, but it is
convenient for gaining insight in both
the time and frequency domain.

s (t )    (t  nT )
n 

(a) Overall system

(b) xs(t) for two sampling rates

(c) Output for two sampling


rates
Frequency Domain Representation
of Sampling

x s (t )  x c (t )s (t )  x c (t )   (t  nT ) (Modulation )
n 

x s (t )  x
n 
c (nT ) (t  nT ) (Shifting property )

• Let us now consider the Fourier transform of xs(t):


• If s (t )  S ( j ) and x c (t )  X C ( j )
Fourier Fourier

2 
S ( j) 
T
  (   k )
k  
s where  s  2 / T is the sampling rate in radians/s.


1 1
X s ( j ) 
2
X c ( j ) * S ( j  ) 
T
 X  j (  k  ) 
k 
c s
Frequency Domain Representation
of Sampling
• By applying the continuous-time Fourier transform to
equation 
x s (t )  x
n 
c (nT ) (t  nT )
We obtain 
X S ( j )  
n 
x c (nT )e  j Tn

x [n ]  x c (nT ) and X (e j
) 
n 
x [n ]e  j  n

consequently

X s ( j )  X (e j
 X (e j T 1 
)  X (e )   X c 
j    2k  
)
 T
j  
T k    T T 
Exact Recovery of Continuous-Time
from Its Samples
• (a) represents a band
limited Fourier
transform of xc(t)
Whose highest nonzero
frequency is  N .

• (b) represents a
periodic impulse train
with S frequency.

• (c) shows the output of


impulse modulator in
the case
S   N   N  S  2 N
Exact Recovery of Continuous-Time
from Its Samples
• In this case X C ( j )
don’t overlap
• therefore xc(t) can be
recovered from xs(t)
with an ideal low pass
filter H r ( j ) with gain
T and cutoff frequency
 N  C  S   N
• It means X r ( j )  X C ( j )

=
Aliasing Distortion
• (a) represents a band
limited Fourier
transform of xc(t)
Whose highest nonzero
frequency is  N .

• (b) represents a
periodic impulse train
with S frequency.

• (c) shows the output of


impulse modulator in
the case
S   N   N  S  2 N
Aliasing Distortion

• In this case the copies of X C ( j ) overlap and is not longer


recoverable by lowpass filtering therefore the reconstructed signal
is related to original continuous-time signal through a distortion
referred to as aliasing distortion.
Example: The effect of aliasing in the
sampling of cosine signal
• Suppose x c (t )  cos(0t )
Example
Nyquist Sampling Theorem
• Sampling theorem describes precisely how much information is
retained when a function is sampled, or whether a band-limited
function can be exactly reconstructed from its samples.
• Sampling Theorem: Suppose that x c (t )  X C ( j ) is band-limited
to a frequency interval   N ,  N  , i.e., X C ( j )

X C ( j )  0 for    N

 N 0 N

Then xc(t) can be exactly reconstructed from equidistant samples


x [n ]  x c (nT s )  x c (2 n / s ) s  2N
where Ts  2 /  s is the sampling period, f s  1 / Ts is the sampling
frequency (samples/second),  s  2 / Ts is for radians/second.
Oversampled
• Suppose that x c (t )  X C ( j is) band-limited:
X C ( )
A

0 
• Then if is sufficiently N
small, N
appears
j as:

TS X (e )
A X (e j  )
Ts


 N T S 0 N T S
 2   2
• Condition:
2   N T S  N T S or  N T S   or S  2 N
Critically Sampled
:Critically sampled N T S   or S  2N
A
X (e j  )
Ts

 2  0  2
According to the Sampling Theorem, in general the signal cannot be
reconstructed from samples at the rate T S   /  N .
This is because of errors will occur if X c ( N )  0 , the folded
frequencies will add at   .
Consider the case: x c (t )  A sin( N t )  Aj    (   N )   (   N )
and note that for T S   /  N .
x (nT s )  A sin(c nT s )  A sin(n  )  0 (for all n )
Undersampled (aliased)
If sampling theorem condition is not satisfied N T S   or S  2 N
A
X (e j  )
Ts

 2  0  2

• The frequencies are folded - summed. This changes the shape of the
spectrum. There is no process whereby the added frequencies can be
discriminated - so the process is not reversible.
• Thus, the original (continuous) signal cannot be reconstructed exactly.
Information is lost, and false (alias) information is created.
Reconstruction of a Band limited Signal
from Its Samples
• Figure(a) represents an ideal
reconstruction system.
• Ideal reconstruction filter has
the gain of T and cutoff
frequency c
 N  C  S   N

we choice C  S / 2   /T .
This choice is appropriate for
any relationship between S
and  N .
Reconstruction of a Bandlimited
Signal from Its Samples
• Therefore


x S (t )   x [n ] (t  nT )
n 

x r (t )   x [n ]h (t  nT )
n 
r

sin( t /T )
hr (t ) 
 t /T

sin( (t  nT ) /T )
x r (t )   x [n ]
n   (t  nT ) /T
Reconstruction of a Bandlimited
Signal from Its Samples

x r (t )   x [n ]h (t  nT )
n 
r

hr (0)  1  x r (mT )  x c (mT )For all integer


values of m. independent from the
hr (nT )  0 n  1, 2,... sampling period T.

Therefore the resulting signal is an exact reconstruction of xc(t)


at the sampling times. the fact that, if there is no aliasing, the
low pass filter interpolates the correct reconstruction between
the samples, and if there is aliasing, it can’t interpolate them
correctly.
Ideal D/C Converter

• The properties of the ideal D/C converter are most easily seen in the frequency
domain.
 
x r (t )  
n 
x [n ]hr (t  nT )  X r ( j )  
n 
x [n ]H r ( j )e  j Tn 

X r ( j )  H r ( j )  x [n ]e  j Tn 
n 
X r ( j )  H r ( j )X (e j T )
Changing the sampling rate using
discrete-time processing
• We have seen that a continuous-time signal can be
represented by a discrete-time signal.
x [n ]  x c (nT )
• It is often necessary to change the sampling rate of x[n]
and obtain a new discrete-time signal such that
x [n ]  x c (nT )
• One approach is to reconstruct x c (t ) and then resample
it with period T , but it is of interest to consider methods
that involve only discrete time operations.
Basic Sampling Rate Alteration

• Up-sampler (expander)- Used to increase the sampling


rate by an integer factor.
• Down-sampler (compressor)- Used to decrease the
sampling rate by an integer factor
• Changing the Sampling Rate by a Non-integer Factor:
which is achieved by cascading an interpolator and
decimator.
Down-Sampler: Time-Domain
Characterization
• An down-sampler with a down-sampling factor M, where
M is a positive integer, develops an output sequence y[n]
with a sampling rate that is (1/M)-th of that of the input
sequence x[n]
• Block-diagram representation

x[n] M y[n]
…Cont

• Down-sampling operation is implemented by keeping


every M-th sample of x[n] and removing M-1 in-between
samples to generate y[n].
• Input-output relation
y[n] = x[nM]

x[ n ]  xa ( nT ) M y[ n ]  xa ( nMT )

Input sampling frequency Output sampling frequency


1 ' FT 1
FT  FT  
T M T'
Frequency domain relation between the
input and output of the compressor/downsampler

1 
 2 k
x [n ]  x c ( nT )  X (e j
)
T

k 
X C ( j (
T

T
))

1   2 r
x d [n ]  x c (nMT )  X d (e )  j

MT r 
X C ( j ( 
MT MT
))

r  i  kM    k  , 0  i  M  1
1 M 1
1 
 2 k 2 i 
X d (e j  ) 
M
 
i  0 T

k 
XC(j(
MT

T
 )) 
MT 
M 1
1
j
X d (e ) 
M

 X
i 0
(e j (  / M  2 i / M )
) 
Downsampling without Aliasing
Downsampling with aliasing
Downsampling with prefiltering to
avoid aliasing
Up-sampler: Time-Domain
Characterization
• An up-sampler with an up-sampling factor L, where L is
a positive integer, develops an output sequence
with a sampling rate that is L times larger than that of
the input sequence x[n].
• In practice, the zero-valued samples inserted by the up-
sampler are replaced with appropriate nonzero values
using some type of filtering process called interpolation

• Block-diagram representation

x[n] L xu [n ]
…Cont

• Up-sampling operation is implemented by inserting L-1


equidistant zero-valued samples between two
consecutive samples of x[n]

Input sampling frequency Output sampling frequency


1 ' 1
FT  FT  LFT 
T T'
Increasing the sampling rate
by an integer factor

• We will refer to the operation of increasing the sampling rate


upsampling x i [n ]  x [n / L ]  x c (nT / L ) n  0,  L , 2L ,...
• The system on the left is called a sampling rate expander. Its output
is x [n / L ], n  0,  L , 2L ,...
x e [n ]  
 0, otherwise

x e [n ]   x [k ] [n  kL ]
k 

• The system on the right is a lowpass discrete-time filter with cutoff


frequency  / L and gain L.
Increasing the sampling rate
by an integer factor

    j n 
X e (e j
)     x [k ] [n  kL ] e   x [k ]e  j  Lk  X (e j  L )
n   k   k 

This system is an interpolator


because of it fills in the missing
samples.
Increasing the Sampling Rate
By an Integer Factor
 x [n / L ], n  0,  L , 2L ,...
x e [n ]  
 0, otherwise

x e [n ]   x [k ] [n  kL ]
k 

sin( n / L )
h i [n ] 
n /L

sin( (n  kL ) / L )
x i [ n ]   x [k ]
k   (n  kL ) / L
therefore x i [n ]  x [n / L ]  x c (nT / L )  x c (nT ) n  0,  L , 2L ,...
If the input sequence x [n ]  x c (nT ) was obtained by sampling
without aliasing then x i [n ]  x c (nT ) is correct for all n, And x i [n ]
is obtained by oversampling of x c (t ) .
Reading Assignment
Changing the Sampling Rate
by a Noninteger Factor
• By combining decimation and interpolation it is possible to change
the sampling rate by a noninteger factor.

• The interpolation and decimation filter can be combined together.


Changing the Sampling Rate
by a Non-integer Factor

You might also like