Digital Signal Processing
Digital Signal Processing
(n) follows:
Discrete Fourier Transform
4. The relationship between k th number in the
discrete Fourier transform and analog value of the
frequency is given by:
If we want to avoid shifting of the discrete Fourier
transform for k = N/2 1 we can multiply input
signal x(n) by (1).
Proof:
The discrete Fourier transform of the (1)x(n)
is:
Discrete Fourier Transform
for k N/2 1 we have:
Thus we have:
For the case k > N/2 1 follows:
Thus we have
Illustration additionally can show results of this
transformation.
Z
Z
Transform
Transform
The z-transform can be understood as a
generalization of the Fourier transform.
Applications of this transform are mainly for
description and realization of systems.
Definition of the z-transform
Z-transform of the signal x(n) is defined as:
where z is complex.
Z
Z
Transform
Transform
X(z) is defined for z where previous sum converges.
The region of convergence of the z-transform is
defined by two annular ring with r
1
and r
2
which
contain the poles of the function X(z).
The values r
1
and r
2
depend from the behavior
of the signal x(n) in the cases when n tends plus
infinity and minus infinity.
Z
Z
Transform
Transform
Example 1
Find the z-transform of the signal x(n)=u(n)
Solution:
According to definition we have:
We know that previous sum converge for
|z
1
| <1 i.e. |z| > 1.
Z
Z
Transform
Transform
Thus the region of convergence is exterior (to the
pole location z = 1) of the unit circle |z| = 1. The
poles are denoted by x , while the zeros by o .
Z
Z
Transform
Transform
Example 2
Find the z-transform of the signal x(n) = u(n 1).
Solution:
According to definition we have:
where the region of convergence is defined by
|z| < 1.
Z
Z
Transform
Transform
From the previous two examples we can conclude
that either have the same X(z).
Thus we can conclude that by using z-transform a
signal is not uniquely determined. However if we
have also the region of convergence uniquely will
be satisfied.
Consider now, four important sequence and find
their z-transform.
1. Causal series x(n) = 0 for n < 0
The z-transform of this signal is:
Z
Z
Transform
Transform
We see that z belong to the region of
convergence.
Thus we can conclude that region of convergence
will be annular ring exterior to the pole location
with the longest distance R from origin, so we
have: R < |z| < .
Z
Z
Transform
Transform
2. Non causal series x(n) = 0 for n > 0.
We se that sum converge for z = 0. The region
of convergence is the disk centered at the origin
and interior to the pole location R. Where R is the
pole the nearest to the origin, 0 |z| < R.
Z
Z
Transform
Transform
3. Sum of the causal and anticausal series
For this case we have:
From the previous considerations we have
concluded that first series converge for:
0 |z| < R1
and second one for:
R2 < |z| <
Z
Z
Transform
Transform
The resultant region of convergence is:
R2 < |z| < R1
This is the annular ring. If R2 > R1 than the region
of convergence is .
Z
Z
Transform
Transform
Example
Find the z-transform and the region of
convergence for the series:
X(n) = a
n
u(n) b
n
u(n 1).
Solution
The first sum converge for |z| >a, while the
second one for |z| < b. thus the region of
convergence is:
a < |z| < b
Z
Z
Transform
Transform
4. Finite length sequences x(n) = 0 for n n1 and
n n2
We conclude that sum converge for any z except 0
and/or what depends from conditions are
n
1
and n
2
positive or negative numbers.
Z
Z
Transform
Transform
Inverse z-transform
The inverse z-transform is defined by:
If we multiply right and left side of the previous
equations by: z
k1
and if we perform integration
along restricted closed path C which resides
within the region of convergence, we obtain:
Z
Z
Transform
Transform
Since integral on the right side of the equation is
different from zero only for k = n, we
have:
This is the general form for determination of the
inverse z-transform. The previous integral can
be calculated by using the theorem of residuum:
The residuum of the function F(z) in the pole
z = z
0
, that is pole of order k, can be calculated
with:
Z
Z
Transform
Transform
The inverse z-transform will be calculated on the
base of expansion of X(z) in the series with
respect z1. In that case we write X(z) in the form:
Than by comparing the previous equation and
definition of the inverse z-transform we see that
X(n) = X
n
.
Z
Z
Transform
Transform
Example 1.
Find the inverse z-transform for:
Solution:
Expanding the previous equations into series for
|z| > 1/4 we have:
Thus we can conclude:
X(n) = (1/4)
n
u(n)
Z
Z
Transform
Transform
In the case when the region of convergence is
|z| < 1/4 coefficients of series must be less
than 1, so X(z) has to be transformed in the form:
Thus,
Z
Z
Transform
Transform
Example 2.
Find x(n) if
Solution
Consider first:
thus we have:
x(n) = a
n
u(n)
Z
Z
Transform
Transform
If we find differential of X
1
(z), we obtain:
Now we have:
x(n) = a
n-1
u(n)
Z
Z
Transform
Transform
Table of the z-transform
Z
Z
Transform
Transform
Properties of the z-transform
Derivations of the properties of the z-transform are
analogy with the properties of the Fourier
transform.
1. Linearity
If we have y(n) = ax(n) + bh(n) than
Y(z) = aX(z) + bY(z).
2. Shifting in the time domain
For the signal x(n n
0
), we have:
Z
Z
Transform
Transform
Example
Consider the difference equation
x(n 1) 2x(n 2) = y(n)+ y(n + 1)
and represent its in z domain.
Solution:
Z
Z
Transform
Transform
3. Multiplication by complex exponential sequence
4. Convolution
If we have y(n) = x(n) h(n) than follows:
Z
Z
Transform
Transform
Example
By using z-transform find convolution of the
signals:
x(n) = u(n) and h(n) = (1/3)
n
u(n)
Solution
By using property 3, we obtain:
Z
Z
Transform
Transform
Now, we have:
The region of convergence is |z| >1. y(n) will
be obtain by using inverse z-transform. First we
will write previous equation in the following form:
where B = 3/2 and C = 1/2.
Thus we can write:
Z
Z
Transform
Transform
Relationship between z-transform, Fourier
transform and discrete Fourier transform
If we compare definition of the Fourier transform
of discrete signals and z-transform definition we
see that Fourier transform is equal to the z-
transform for |z| = 1. Thus the values of the z-
transform on the |z| = 1 in z domain are the values
of the Fourier transform of the sequence.
By expressing the complex variable z in polar form
as z = re
j
, we obtain:
Z
Z
Transform
Transform
taking r = 1 follows:
In general case the z-transform on the circuits
defined by r is equal to the Fourier transform of
the sequence x(n) multiplied by rn.This is
reason why the z-transform exist in the some cases
when the Fourier transform does not exist.
Z
Z
Transform
Transform
One example that confirm the previous
statement is x(n) = u(n).
The Fourier transform of this sequence does not
converge, but the z-transform converge for r > 1.
From the previous considerations we know that
the values of discrete Fourier transform are the
samples of the Fourier transform of discrete
signals.
This means that the values of
discrete Fourier transform are equal to the samples
of the z-transform for |z| = 1.
Z
Z
Transform
Transform
Example
Find the z-transform of the sequence:
x(n) = u(n) u(n 4)
and in the case N = 8 find the Fourier transform
and the discrete Fourier transform by using result
obtained for z-transform.
Solution:
Z
Z
Transform
Transform
System function
Consider a system where is:
y(n) = x(n) h(n)
Having in mind properties of the z-transform
follows:
Y(z) = X(z)H(z)
Z
Z
Transform
Transform
The z-transform of the impulse response is referred
to as the system function.
The system function evaluated on the unit circle
(|z| = 1) is the frequency impulse response of the
system.
From the previous considerations we know that
stable system must satisfied condition:
Z
Z
Transform
Transform
Consider now the z-transform of the h(n):
From the previous equation follows that in the
case of stabile systems unit circle |z| = 1
must belong to the region of convergence of the
function H(z).
For causal system the region convergence must be
exterior of a circle passing through the pole of
H(z) that is farthest from the origin.
Z
Z
Transform
Transform
Example
Check the causality of the system:
Solution
We see that the region of convergence is |z| > 1/2.
Thus the system is causal.
Z
Z
Transform
Transform
Consider now the system described by a linear
Constant coefficient difference equation, i.e.
the system that satisfy the general N th order
difference equation:
Applying the z-transform to each side of
previous equation, we have:
Z
Z
Transform
Transform
where the property of the z-transform:
is used.
Now, we can write:
In the case where A
j
= 0 for j > 0, the system
with finite impulse response is obtained (FIR) and
in that case we have:
Z
Z
Transform
Transform
Example
Find the impulse response of the causal system
described by:
and check its stability.
Solution:
Z
Z
Transform
Transform
Poles of this function are: z
1
= 1 and z
1
= 1/4.
Since the system is causal the region of
convergence is |z| > 4. This means that the
system is not stabile (unit circle does not belong to
the region of convergence).
In order to determinate h(n), write H(z) in the form:
Z
Z
Transform
Transform
Examples:
1. Find the z-transform of the sequence
x(n) =(n 5).
Solution:
2. If X(z) is the z-transform of x(n), find the z-
transform of:
Z
Z
Transform
Transform
By substitution n + k = m, we have:
Y(z) = X(z)X(1/z)
3. Find the impulse response of the system with z-
transform:
Solution:
Having in mind expansion in the series:
we can write:
Z
Z
Transform
Transform
Thus,
4. Find the causal sequence x(n), if its z-transform
has the form:
Solution:
Write X(z) in the form:
Z
Z
Transform
Transform
Thus we have:
x(n) =[ 1.25 0.25(0.2)
n
]u(n)
Z
Z
Transform
Transform
5. For the system shown in Figure, find system
function, check stability, and determine response
on the signal
x(n) = (n) 2 (n 1).
Solution:
From the Figure we have:
Z
Z
Transform
Transform
The system function is:
The pole of this system is z = 2, this fact means if
the system is causal it is not stabile.
If x(n) = (n) 2 (n 1) than:
ESTIMATION THEORY
Introduction to random signals
At the beginning, we will give some important
definitions:
Mean of the process is defined as:
The operator of mean value E is linear, i.e.:
If the random variables are independent or
uncorrelated then:
ESTIMATION THEORY
A sufficient condition for independence is:
In this case the random variables are statistically
independent.
Mean square value of x(n) is:
ESTIMATION THEORY
Correlations and covariances
The autocorrelation is defined as:
or,
where denotes complex conjugation.
The cross-correlation of two random processes x(n)
and y(n) is defined as:
ESTIMATION THEORY
The autocovariance is defined as:
If n = m the variance is obtained:
In the case of stationary process, the variance is
independent of time and denoted as
In the case of random processes that are
stationary in the wide sense we have:
ESTIMATION THEORY
In this case autocorrelation depends only on the
time difference m n, thus:
Also we have:
ESTIMATION THEORY
White noise
The signal that has the autocorrelation in the form:
is called white noise.
The name comes from the fact that the Fourier
transform of this is constant
It means that power density spectrum of this
function is constant, what is the property of the
white light.
In the case of real noise w we have:
ESTIMATION THEORY
Power density spectrum
Consider the z-transform of the autocorrelation
r
zz
(n) (in the case of stationary signals):
Define now S
xx
() as values of the z-transform
on the unit circle:
Note that S
xx
() is a real-valued function, since
ESTIMATION THEORY
From the above equation we
can write:
Having in mind the definition of r
xx
(n), we have:
Thus, the expected signal power is equal to the
integral of S
xx
() . This is the reason why S
xx
() is
called power spectral density. Later, it will be
shown that the signal energy within the frequency
region [
1
,
2
] is equal to the integral of S
xx
()
from
1
to
2.
ESTIMATION THEORY
Linear systems and random signals
For a linear system we know that:
If the signal x(n) is stationary, i.e. E{x(n k)}= MI
x
,
we can write:
ESTIMATION THEORY
The auto-correlation of the output signal is
defined as:
In the case of stationary signal when
r
xx
(n i,m k)= r
xx
(n m k i), we have:
We can conclude,if the signal x(n) is stationary
in the wide sense, then the signal at the output of
the linear system is stationary in the wide sense,as
well.
ESTIMATION THEORY
Find, now, the z-transform of the r
yy
(n,m).
We have:
By substitution l=p k + i, we obtain:
If h(n) is real:
ESTIMATION THEORY
Power spectral density is:
Therefore if |H(e
j
)|2 is an ideal band-pass
filter for the interval [
1
,
2
] then the expected
power of the output signal is:
since S
xx
(
1
) could be considered as a constant
within [
1
,
2
] for small
2
1
. This proves
that S
xx
(
1
) is the spectral power density.
ESTIMATION THEORY
Optimal filtering
Consider the signal in the form:
x(n) = s(n) + w(n)
where s(n) is desired signal and w(n) is the noise.
If we assume that the signal and noise are
uncorrelated we can write:
ESTIMATION THEORY
For the case when the power spectral density of
the signal and noise are not overlapped, we
can easily obtain denoised signal..
Namely, passing the signal through the
bandpass Filter which passes only the frequency
components of S
ss
(), denoised signal is obtained.
However, if the noise is white (existing in the
whole frequency range) by using previous method
it is possible to obtain only partial denoised signal.
In the general case the problem is in determination
of d(n) = s(n + m) in the most accurate
way.
ESTIMATION THEORY
If m = 0 we have the case of optimal filtering.
In some cases, it is necessary to predict the values
of the signal in the future, then m > 0.
However, in some cases we need to determine
some previous value of the signal. In this case we
have optimal smoothing, and m < 0.
Processing by using IIR system
Consider an IIR system defined by:
ESTIMATION THEORY
The mean square error is:
From this we have:
Define, now, correlation functions:
From the above equations we have:
If the signal and noise are uncorrelated, we have:
ESTIMATION THEORY
Fourier domain form of the optimal filter, when
d(n) s(n), is:
ESTIMATION THEORY
Power spectrum estimation
The mean value of the n th sample of the
sequence x(n) can be estimated by:
where x
i
(n) is the n th sample in the i th
measurement.
The special class of the random processes are
ergodic processes. In this case probability
averages are equal to time average, i.e.
ESTIMATION THEORY
The process is ergodic if we can estimate its
statistically properties on the base of only one
random signal.
In previous equation
x
is random value
because we have finite number of samples 2N + 1.
In the case N the value of
x
will be
sufficiently accurate.
Estimate, now, autocorrelation function (which
is the mean value of the product
x(n + m)x
(n)):
ESTIMATION THEORY
In the case of stationary process we have:
If we know x(n) only within the interval
N n N, then x(n + m) will be known only for
n N m for positive number m, and
n N |m| for negative number m.
If we want to avoid calculations for positive and
negative value of m, we will introduce symmetric
product:
ESTIMATION THEORY
In this sum we have 2N + 1 |m| terms, but we
average it with 2N + 1. This is the reason why
we have systematic error that can be avoided by:
Thus is the biased estimate of the
autocorrelation
ESTIMATION THEORY
Definition and variance of the Periodogram
Define the Fourier transform of the biased
autocorrelation function:
Since
it can be shown that:
ESTIMATION THEORY
The spectrum estimate I
N
() is called the
periodogram. The expected value of the
periodogramis:
Taking
ESTIMATION THEORY
Thus, the periodogramis a biased estimate of
the power spectrum S
xx
(). The previous
equation can be written, using convolution, in the
form:
where W
B
is the Fourier transform of the so called
Bartlett window ( for
|m| < 2N 1) given by:
ESTIMATION THEORY
Variance of the Periodogram
Express the periodogramin the form:
The covariance at frequencies
1
and
2
of I
N
() is:
ESTIMATION THEORY
In the case of white Gaussian process we have:
Thus,
ESTIMATION THEORY
Therefore, we have:
The variance is:
ESTIMATION THEORY
Smoothed spectrum estimators
If the sequence x(n), 0 n N 1, is divided
into K segments of M samples, the periodogram
will be:
If we assume that periodograms are independent
of one another, we have
ESTIMATION THEORY
By assumption that K periodograms are
statistically independent, then B
xx
() is the
mean of the set of K independent observations of
the periodogramI
M
() :
From previous equation it is clear that as K
becomes large, the variance approaches zero, so
this smoothed estimate is a consistent estimate.
ESTIMATION THEORY
EFFECTS OF FINITE REGISTER LENGTH
Signal values in digital signal processing are
stored in a binary format, using registers with
a finite length. This can cause the error.
Namely, if we have number with b bits
multiplied by another one with b bits, the result
will be data with 2b bits. If the length of register is
less than2b we will have truncation error. This
error is:
where Q[x] and x are numbers after and before the
truncation.
ESTIMATION THEORY
If we consider, now, effects of quantizations of
analog signal, we know:
Every samples must be represent by finite
length number, so we will have truncation or
rounding to the nearest quantization level and it
will cause quantization error. This error can be
expressed by noise e(n), than we have:
where x(n) is exact value and e(n) quantization
error.
ESTIMATION THEORY
In the case of rounding the errors is in the range:
/2 e(n) /2
while in the case of truncation it is:
e(n) 0,
where is quantization width = 2
b
.
If we want to give a model to describe the effects
of quantization we will assume:
1. The sequences of error samples {e(n)} is a
sample sequence of stationary random process.
2. The error sequence is uncorrelated with the
sequence of exact samples {x(n)} .
ESTIMATION THEORY
3. The error is a white-noise process.
4. The probability distribution of the error process
is uniform over the range of quantization
error.
Find signal to noise ratio in the case of rounding.
According assumption 4, we have that probability
distribution p
en
(e) = 1/.
Thus:
ESTIMATION THEORY
Now we have:
Multidimensional discrete signals and systems
Discrete N-dimensional signal can be defined as:
where n
1
, n
2
,.....,n
N
are integers.
Multidimensional discrete signals and systems
By analogy with the one-dimensional case we can
define:
1. Unite impulse:
2. Unite step:
Multidimensional discrete signals and systems
3. Complex exponential series
Discrete multidimensional system can be defined
by:
with x(n) and y(n) are defined input and output
signal, respectively.
Multidimensional discrete signals and systems
System is linear if:
If we denote multidimensional unite impulse
response with:
Where . The previous equation is
N-dimensional convolution denoted by:
Multidimensional discrete signals and systems
Causality and stability are defined in full analogy
with the one-dimensional case.
Fourier transform of N-dimensional discrete signals
The Fourier transform of an N-dimensional
discrete signal is defined by:
The inverse Fourier transform is given by:
Multidimensional discrete signals and systems
In the case of two-dimensional signal we have:
Example:
Find the Fourier transform of the signal:
Multidimensional discrete signals and systems
Solution:
Also, by analogy with the one dimensional
sampling theorem, it is easy to show that:
Multidimensional discrete signals and systems
where it has been assumed:
Multidimensional discrete signals and systems
Multidimensional discrete Fourier transform and
FFT algorithms
Consider two-dimensional discrete Fourier
transform: the simplest 2D FFT algorithm are
based on the FFT algorithm for one-dimensional
case. Namely:
We see that for a fixed value n1, the second
sum presents one-dimensional discrete Fourier
transform which can be calculated by using some
of the FFT algorithms.
Multidimensional discrete signals and systems
Thus:
This procedure should be repeated for all n1.
Two-dimensional discrete Fourier transform
will be obtained as:
Calculations should be performed for all k
2
.
Multidimensional discrete signals and systems
Ratio of number of additions and summations
for discrete Fourier transform by using
definition and FFT algorithm is given by:
In the case of M = 128 this ratio is 1170 ( if need
one second with the FFT than 19,5 minutes would
be needed by using calculation based on the
definition).
Multidimensional discrete signals and systems
Radon transform and computers Tomography
Integral along line AB is:
where AB is defined by:
The previous integral can be written in the form:
Multidimensional discrete signals and systems
The previous integral can be written in the form:
Previous integral defines projection of function
f(x, y) with respect to variable t for an arbitrary
angle .
Is it possible to reconstruct function f(x, y) on
the base projections?
Answer is yes.
Multidimensional discrete signals and systems
Proof:
Consider the Fourier transform F(u, v) of the
function f(x, y):
Multidimensional discrete signals and systems
The Fourier transform of a projection is:
Consider as a special case the value of the F(u, v),
along the line v = 0, then we have:
Multidimensional discrete signals and systems
Thus, we have obtained that the Fourier
transform of the function f(x, y) along axis v = 0
is equal to the Fourier transform of projection for
the angle = 0.
This result can be generalized. It can be shown
that the Fourier transform of f(x, y) along an
arbitrary line defined by angle with respect to u
axis is equal to the Fourier transform of the
projection defined by angle with respect to x
axis.
Multidimensional discrete signals and systems
The previous claim can be proved. Denote with
f(s, t) the function f(x, y) rotated in the coordinate
system. Relationship between variables
(x, y) and (s, t) is:
Since:
The Fourier transform of the projection is:
Multidimensional discrete signals and systems
In x, y coordinate system we obtain:
Thus, the previous claim is proved.
Multidimensional discrete signals and systems
Finally, we can conclude:
Function f(x, y) can be obtained on the following
way:
1. Find the projection for 0 .
2. Determine the Fourier transforms of the
projections which give the Fourier transform of
the function f(x, y).
3. Compute the inverse Fourier transform and it if
function f(x, y).
Multidimensional discrete signals and systems
Note that the Fourier transform of function
f(x,y) will be obtained in polar raster. If we
want to use FFT algorithms it is necessary to have
the Fourier transform in rectangular raster.
One possible solution is interpolation of values
from the polar to the values on the rectangular
raster.