Digital Signal Processing

hopefulrebelΤεχνίτη Νοημοσύνη και Ρομποτική

24 Νοε 2013 (πριν από 3 χρόνια και 11 μήνες)

103 εμφανίσεις


1

Digital Signal Processing

Applications of DSP

?

Speech processing

?

Enhancement


noise filtering

?

Coding

?

Text
-
to
-
speech (synthesis)

?

Recognition

?

Image processing

?

Enhancement, coding, pattern recognition (e.g. OCR)

?

Multimedia processing

?

Media transmission, digital TV, video conferencing

?

Communications

?

Biomedical engineering

?

Navigation, radar, GPS

?

Control, robotics, machine vision




What is a
signal?

A
signal
is defined as any physical quantity that varies with time, space
,

or any

other independent variable or variables. Mathematically, we
describe a signal as

a function of one or more independent variables. For
example
,

the functions











Describe

two signals
,

one that varies linearly with the indepen
dent
variable
t

(time)

and a second that varies quadratically with
t .
As another
example, consider the





This function describes a signal of two independent variables x and
y
that could

represent the two spatial coordin
ates in a plane.

The signals
described
above

belong to a class of signals that

are precisely defined by
specifying the functional dependence on the independent

variable.
However, there are cases where such a functional relationship is unknown

or too highly

complicated to be of any practical use.


2




For example, a speech signal (see Fig. 1.1) cannot be described
functionally

by expressions such as (1.1.1). In general, a segment of
speech may be represented

to a high degree of accuracy as a sum of
several sin
usoids of different amplitudes

and frequencies, that is, as






Where

(A
i
(t), F
i
(t), and (O
i
(t)) are the sets of (possibly time
-
varying)
amplitudes,

frequencies, and phases, respectively, of the sinusoids. In
fact, one way to interpret

the information co
ntent or message conveyed
by any short time segment of the speech signal is to measure the
amplitudes
,

frequencies, and phases contained in

the short time segment
of the signal.

Speech, electrocardiogram. and electroencephalogram signals are
examples

of in
formation
-
bearing signals that evolve as functions of a
single independent

variable.
Namely
. time. An example of a signal that is
a function of two independent

variables is an ima
g
e signal. The
independent variables in this case are

the spatial coordinates
. These are
but a few examples of the countless number of

natural signals
encountered in practice.

Associated with natural signals are the means by which such signals are
generated.

For
example
,

speech signals are generated by forcing air
through the vocal

cords. Images are obtained by exposing a photographic
film to a scene or an object.

Thus signal generation is usually associated
with a
system
that responds to a

stimulus or force. In speech signal
,

the
system consists of the vocal cords and

the vocal tra
ct, also called the
vocal cavity. The stimulus in combination with the

system is called a
signal source.
Thus,

we have speech sources, images sources
,

a
nd

various
other types of signal sources.








Figure 1.1 Example of a speech signal.


Mu
ltichannel and Multidimensional Signals


3


A

signal is described by a function of one or more

independent
variables. The value of the function (
i
.e.. the dependent va
ri
able) can

be a
real
-
valued scalar quantity, a complex
-
valued quantity. or perhaps a
vector
.

For example
,

the signal




is a real
-
valued signal. However, the signal





is complex valued.


In some applications, signals are generated by multiple sources or
multiple

sensors. Such signals. in turn. can be represented in vector form.
We refer to s
uch a vector of signals as a
miilrichannel signal.
In
electrocardiography
,
for example
,

3
-
lead and 12
-
lead electrocardiograms
(ECG) are often used in

practice
,

which result in 3
-
channel and 12
-
channel signals.



If the signal is

a function of a single inde
pendent variable. the
signal is called a
one
-
dimensional

signal. On the other hand. a signal is
called
M
-
dimensional
if its value is a function

of M independent
variables.


The picture is an example of a two
-
dimensional signal. Since

the
intensity or brigh
tness
I ( x
,

y
) at each point is a function of two
independent

variables. On the other hand. a black
-
and
-
white television
picture may be represented

as
I ( x ,
y
,
t

) since the brightness is a
function of time. Hence the TV

picture may be treated as a thr
ee
-
dimensional signal. In contrast. a color TV picture

may be described by
three intensity functions of the form
I
r

( x
,

y
,

t
).
I
g
(x
,

y
,

t

),

and
I
b ( x
,

y
,

t

) , corresponding to the brightness of the three principal colors
(red
,
green, blue) as functions

of time. Hence the color TV picture is a
three
-
channel.

three
-
dimensional signal, which can be represented by the vector





What is a System?


A
system
may also be defined as a physical device that performs an
operation

on a signal. For example, a filte
r used to reduce the noise and
interference

corrupting a desired information
-
bearing signal is called a
system. In this case the

filter performs some operation(s) on the signal,

4

which has the effect of reducing

(filtering) the noise and interference
from t
he desired information
-
bearing signal.

When we pass a signal through a system, as in filtering. we say that
we have

processed the signal. In this case the processing of the signal
involves filtering the

noise and interference from the desired signal. In
ge
neral, the system is characterized

by the type of operation that it
performs on the signal. For example
,

if

the operation is linear, the system
is called linear. If the operation on the signal

is nonlinear, the system is
said to be nonlinear, and so forth.

Such operations are

usually referred to
as
signal processing.


It is convenient to broaden the definition of a system to

include not
only

physical

devices
,

but also software realizations of operations on

a
signal. In digital processing of signals on a dig
ital computer
,

the
operations performed

on a signal consist of a number of mathematical
operations as specified by

a software
program
. In this case, the program
represents an implementation of the

system in
so
ftw
are
,

t
hus we have a
system that is realized
on a digital computer

by means of a sequence of
mathematical operations: that is, we have a
digital

signal processing
system realized in software. For example. a
digital

computer can

be
programmed to perform digital filtering. Alternatively, the
digital

pr
ocessing

on the signal map be performed by digital
hardware
(logic
circuits) configured to

perform the desired specified operations. In such a
realization, we have a physical

device that performs the specified
operations. In a broader sense, a digital syst
em

can be implemented as a
combination of digital hardware and software
,

each of

which performs its
own set of specified operations.


Types of signals

The independent variable may be either continuous

or
discrete
.

1
-
Continuous
-
time signals

Continuous
-
time
signals
or
analog signals
are defined for every
value of time and

they take on values in the continuous interval (a. b)
,

where

a

can be
-


and
b

can be

.
Mathematically
,

these

signals can be
described by functions of a continuous

variable. The speech waveform in
Fig. 1.1 and the signal
x
1
( t )
= cos

t are examples of analog signals.



(i) Periodic functions

(ii) Nonperiodic functions

(iii)

Random functions

PERIODIC FUNCTIONS


A signal v(t) is periodic with period T if


5





Four types of periodic functions which are specified for one period T and
corresponding graphs are

as follows:


(a)

Sine wave:



(b)

Periodic pulse:



(c)

Periodic tone burst:



where T = KA and K is an integer.





6






Periodic signals may be very complex. They may be

represented by a
sum of sinusoids. This type of function will be developed in the following
sections.

SINUSOIDAL FUNCTIONS

A sinusoidal
signal
v(t)

is given by




where V
0

is the amplitude,


is the angular velocity, or angular
frequency, and


is the phase angle.

The angular
velocity



may be expressed in terms of the period T
or the frequency f, where f
=

1
/
T.

The frequency is given in hertz, Hz, or cycles/s. S
ince cos

t
=

cos
(

t
+
2

)
,


and T are related by


T
=

2

. And since it takes T seconds for
v
(t)

to return to its original value, it goes through 1
/
T cycles

in one
second.

In summary, for sinusoidal functions we have


EXAMPLE: Graph each of the following

functions and specify period
and frequency.




7













8



TIME SHIFT AND PHASE SHIFT

If the function
v(t) =

cos

t is delayed by




seconds, we get
v(t
-

)
=

cos

(t
-

)
=

cos
(

t
-

)
where


=


.
The delay shifts the graph of
v(t)

to the right by an
amount of


seconds, which

corresponds to a phase lag
of


=


=2



.
A time

shift of


seconds to the left on the graph
produces

v(t
+

)
, resulting in a leading phase angle called an advance.

Conversely, a phase shift of


corresponds to a time shift of

. Therefore,
for a given phase shift the

higher is the frequency, the smaller is the
required time shift.

EXAMPLE: Plot








This is a cosine function with period of 12s, which is advanced in time by
1s. In other words, the graph is shifted to

the left

by 1 s or 30


as shown

below.


9



COMBINATIONS OF PERIODIC FUNCTIONS

The sum of two periodic functions with respective periods
T
1

and
T
2

is a periodic function if a

common period
T
=

n
1
T
1

=

n
2
T
2
, where
n
1

and
n
2

are integers, can be found. This requires

T
1
/
T
2

=

n
2
/
n
1

to be a
rational number. Otherwise, the sum is not a periodic function.


EXAMPLE: Find the period of
v(t) =

cos5t
+
3 sin
(3
t

+

45

).

The period of cos5t is T1
=
2

/5
and
t
he period of
3sin
(3
t

+

45

)
,
is T2
=

2

/
3. Take T
=

2


=

5T1
=

3T2

which i
s the smallest common integral
multiple of T1 and T2. Observe that
v(t+


T
) =

v
(t)

since

Therefore, the period of v
(t)

is 2

.


QUESTION1

:

Is v
(t) =

cost
+


cos2

t periodic? Discuss.

QUESTION2:

Given p
=

3
.
14, find the period of
V(t) =

cos t
+


cos2pt.



NONPERIODIC FUNCTIONS

A nonperiodic function cannot be specified for al
l times by simply
knowing a finite segment. Example
s

of nonperiodic functions are




10



Several of these functions are used as mathematical models and building
blocks for actual signals in

analysis and design of
sytem
s. Examples are
discussed in the follow
ing sections.




THE UNIT STEP FUNCTION



The dimensionless
unit step function
, is defined by



















THE UNIT IMPULSE FUNCTION



Consider the function s
T
(t)

of Fig.
below
(a), which is zero for t < 0 and
increases uniformly from 0 to

1 in T sec
onds. Its derivative d
T
(t)

is a
pulse of duration T and height 1
/
T, as seen in Fig. (b).





11


If the transition time T is reduced, the pulse in Fig. (b) becomes narrower
and taller, but the

area under the pulse remains equal to 1. If we let T
approach zero
, in the limit function s
T
(t) be
come
a unit step u
(t)

and its
derivative d
T
(t)

becomes a unit pulse


(t)
with zero width and infinite

height. The unit impulse


(t)
is shown in Fig. (c). The unit impulse or
unit delta function is defined

by









12

THE E
XPONENTIAL FUNCTION

The function f(t) = e
st

with
s

a complex constant is called exponential. It
decays with time if the

real part of s is negative and grows if the real part
of
s

is positive. We will discuss exponential

s
a
t

in

which the constant
a

is
a rea
l number.


The inverse of the constant
a

has the dimension of time and is
called the time constant


=

1/
a. A

decaying exponential
e
-
t/


is plotted
versus t as shown
below
. The function decays from one at

t
=

0 to zero at
t
=

. After


seconds the function
e
-
t/


is reduced to e
-
1
=

0
.
368. For

=
1,
the

function e
-
t

is called a normalized exponential
.





DAMPED SINUSOIDS

A damped sinusoid, with its amplitude decaying exponentially has the
form



13






RANDOM SIGNALS

So far we have dealt with signals which are

completely specified. For
example, the values of a

sinusoidal waveform, such as the line voltage,
can be determined for all times if its amplitude, frequency,

and phase are
known. Such signals are called deterministic.

There exists another class of signals which can be specified only partly
through their time averages,

such as their mean, rms value, and frequency
range. These are called random signals. Random signals

can carry
information and should not be mistaken with
noise, which normally
corrupts the information

contents of the signal.


EXAMPLE
:

Samples from a random signal
x(t)

are recorded every 1 ms
and designated by x
(n)
. Approximate

the mean and rms values of x
(t)

from samples given in Table
below
.






14




EXAM
PLE : A binary signal v
(t)

is either at 0.5 or
-
0
.
5 V. It can change
its sign at 1
-
ms intervals. The sign

change is not known a priori, but it has
an equal chance for positive or negative values. Therefore, if measured
for a

long time, it spends an equal a
mount of time at the 0.5
-
V and
-
0
.
5
-
V
levels. Determine its average and effective

values over a period of 10 s.

During the 10
-
s period, there are 10,000 intervals, each of 1
-
ms duration,
which on average are equally divided

between the 0.5
-
V and
-
0
.
5
-
V
lev
els. Therefore, the average of v
(t)

can be approximated as




The effective value of v
(t)

is