Você está na página 1de 123

Tue 11 30

Fri 11.00
Two assignments 5+5
First test 6-9 sep

marks 20

Second test 5-10 oct 20 marks


End sem 10-15 nov 50 marks

Digital signal processing by Emmanual C


Ifechar , Barrie W Jervis
Digital signal processing by John G Proakis ,
Dimitris G Manolakis
Digital signal processing by Alan V
Oppenheim , Roland W Schafer

It was suggested that the term signal recovery


implies some prior knowledge of a signal and
that this knowledge is used to advantage at the
point of detection. The use of signal
conditioning filters is an example of how prior
knowledge of the signal can aid the process of
detection.

Temperature variations
(Region of flicker noise and burst noise)
In electronic circuits transformers and inductors
with ferromagnetic core operate nonlinearly
when the current through them is large enough
to drive core materials into saturations.
In general we may classify all sources of noise
into two categories those which are man made
and those which are not.
Shot noise exists because phenomena such as
light and electric current consists of the
movement of discrete( also called quantized)
packets

ADC noise This is the familiar ADC


quantization noise which results when the filter
input is derived from analog signals.
Thermal noise This type of noise arises from
the random motion of free electrons in a
conductor and constitute a large source of noise
in electronic amplifier.

White noise A noise source whose spectrum is


independent of the frequency is often referred to
as impulse or white noise. White noise will
have a spectral density that is an infinite average
power. Page 34 John c Hancook

We would find an essential difference in that


demodulators for signal recovery are almost
invariably supplied with a reference signal
which is precisely synchronized with the signal
of interest. Page 13 M L Meade
Digital signal processing

Thermo couple( Chromel alumel, K type, 1 C


change 39 V(emf) /for TC Ltd PO BOX 130
UXBRIDGE UBB 2YS
Lecroy LT 322

After 3/4 times filtering

At A2 op-amp, the output at 2 is E2 , because


the difference between the two inputs is zero.
At the output of op-amp A1 at 1 is E1 volts .
The difference of this voltage E1 E2 / aR
would pass through the resistance R and the
voltage across op-amp A2 is E2 - ( E1 E2
/aR ) x R
Or E2 (E1-E2/a) .
In the second op amp the voltage is
E1 + (E1-E2/a)
The total voltage is E1 + (E1-E2/a) E2 + (E1E2/a)
2 (E1-E2/a)+ ( E1 - E2 )
= ( E1 - E2 ) (1 + 2/a)
Suppose E1 = 43 x 10 -6 and E2 = 42.99999 x
10 -6

at room temperature
Then ( E1 - E2 ) (1 + 2/a)
1 x 10 -5 x 10 -6 ( 1 +2 / 2/9)
If aR= 2 k

and R = 9 k

= 10 x 10 -11 volts

20 x 10 -3 / 10 x 10 -11 = 2 x 10 8
If you give 100 gain

2 x 10 8 = 0.5 x10
2

x 0.5x 10 2 x0.5x
10 2 x

0.5x10 2
then cascading

f = 1/ T
=1/8
=0.125
This is the first period
0.125 x2 =0.25
For the second period
0.125x 3= 0.375
For the third period
0.125 x 4 = 0.5 and so on
We find that by making the transformation from
time domain to frequency domain we can often
sort the signal and noise into their respective
categories

We define noise as all unwanted signals. The


Spectrum analyser approach gives a more
explicit and graphical interpretation of the
relationship between signals and noise in a
system.( repetition)
.
Modulation is defined as a process by which a
high frequency carrier is made vary in some
manner as a function of the instantaneous value
of the message to be transmitted.

A signal is described by a function of one or


more independent variables.
The value of the function (i.e the dependent
variable ) can be a real valued scalar quantity , a
complex valued quantity or perhaps a vector.
S1(t) = A sin 3
Convolution
Page 5
Emmanual C Ifechar , Barrie W Jervis
Convolution is one of the most frequently used
operation in DSP. It is the basic operation in
digital filtering. Given two finite and causal
sequences x(n) and h(n) of lengths N1 and N2
respectively their convolution is defined as
k=

k=

Y(n) = h(n)

x(n) = h(k) x(n-k) =

h(k) x(n-k)
k= -

k= 0

In this example h(n) n=0,1,2 , can be viewed as


the impulse response of digital system and y(n)
the systems response to the input sequence
x(n).

Linear convolution
Convolution - Given two finite length sequences
x(k) and h(k) of lengths N1 and N2
respectively , their linear convolution is
Y(n) = h(n) * x(n) =

h(k) x(n-k)

M-1
=

h(k) x(n-k), n= 0,1M-1


k=0

where M=N1 +N2 -1


In this example h(n) , n =0,1,2 can be viewed
as the impulse response of a digital system and
y(n) the systems response to the input sequence
x(n).
y(1) = h(0) x(1) + h(1) x(0)+ h(2) x(-1) +
h(12x(-11)

=0x1 + (-0.02) x1 + 0x0 + + 0x0


=-0.02
Fourier series, Euler Formulas
Erwin Kreyszic

Page 464

Let us assume that f(x) is a periodic function of


period 2 which can be represented by a
trigonometric series

f(x) = a0 + (an cosnx + bn sin nx) ------1


n=1
Now we like to determine the coefficients a0 , an
, bn
To determine we integrate both the sides 1

f(x)dx = [a0 + (an cosnx + bn sin nx)]dx


-

f(x)dx

= a0 dx
-

-
The first term is given below and all other terms
are zero

(an cosnx dx + bn sin nx)]dx


-

an /n

[
-

Sin nx ] + bn /n [ - cos nx]


-

an /n

( 2Sin n ) - bn /n

( cos nx cos nx)


an /n

x 0

- bn /n x 0 =0

a0 = 1/2 f(x)dx
-
We now determine an , multiplying eqn 1 by
cos mx

cos mx f(x)dx = [a0 + (an cosnx + bn sin


nx)] cosmx dx
-

a0 cos mx dx = a0 [sin mx / m ] = a0 /m . 2
sin mx ] =0
-
-

an cos nx cos mx dx = an 1/2 cos (n+m)x


dx + an 1/2 cos(n-m)x dx
-
-
-

0
cos A cos B = [cos ( A+B) + cos (A-B)]

sin A cos B = sin(A+B) + sin (A B) ]

bn sin nx cosmx dx = bn sin(n+m)x dx +


bn sin(n-m)x dx
-

0
0
When n=m

1/2 an cos(n-m)x dx = [ x = an
-
-


an = 1/ cos mx f(x)dx

We now determine bn , multiplying eqn 1 by


sin mx

f(x) sin mx dx =a0 sin mx + (an cosnx sin


mx dx + bn sin nx sin mx)]dx
-
-

bn sin nx sin mxdx = b n cos(n-m)x


dx + bn cos(n+m)x dx
-
-
-

When n=m
0

bn = 1/ f(x) sin mx dx
-

bn

Example

1 page 467 Erwin K

Find the Fourier coefficients of the periodic


function f(x) given below.
The analytic representation is
-k when -
<x<0
f(x) = {
k when

a0 = 1/2 f(x)dx
-

1/2 (-k + k) dx = 0

0<x<


an = 1/ cos nx f(x)dx
-

0
= 1/ [ -k cos nx dx + k cos nx dx

-
0

0
1/ [ (-k/n) sin nx ] + [ (k/n) sin nx]
-

=0
0

bn = 1/ f(x) sin mx dx
-

=1/ [ -k sin nx dx + k sin


nx dx
-
0
0

1/ [ k/n cos nx] - 1/ [ k/n con nx]


-

k/n [ cos0- cos(-n )- cos(n ) +cos0]


= 2k/n ( 1- cos n )
cos = -1

cos 2 = 1

-1

for

odd n
cos n =
1 for
even n

2 for odd n
Then ( 1- cos n )=
0 for even n
b 1 = 4k/
since a

b2 = 0 b3 = 4k/3
,a

are 0

the corresponding Fourier series is

4k/ ( sin x + 1/3 sin3x+ /


5sin5x+------)
The partial sums are
x

= 4k/ sin

S2 = 4k/ ( sin x + 1/3 sin3x )


S3 = 4k/ ( sin x + 1/3 sin3x+
1/5sin5x)

ICL 7650 or dual switch 4066


The basic difference between these
two types convolution is that in
circular convolution the folding and

shifting operations are performed in a


circular fashions by computing the
index of one of the sequences modulo
N . In linear convolution there is no
modulo N operation.
With a few very rare exceptions we
do not choose circular convolution We
almost always want linear convolution
. The reason
Anjali shukla

Complex numbers
X 2 +3 =0
X = - 3
i 2 = -1
X=i2 3
=i3

X 2 -10 x + 40=0

For the second


- (-10 )
40
X=

(-10) 2 - 4 .1.

-----------------------2.1

= (10 100 - 160 ) /2


= (10 -60 )/ 2
= ( 10 i 2 60) / 2
= (10 i 7.74)/2
R1= (10 + i 7.74)/2 R2 = (10
i7.74)/2
= 5+ i3.87

=5-i3.87

|z| = r
In the polar form

X = r cos

y= r sin

Z = r(cos + i sin )

From Eulers formula

e iy = cos y + i sin y

From Taylors series

e z = 1 + z + Z2 / 2 ! + Z3 / 3 !
+ ----------

e iz = 1 + iz - Z 2 / 2 ! -i Z 3 / 3 ! +
---------Cos z =
---------

1 - Z2 / 2 ! + Z4 / 4 ! +

Sin z = Z - Z 3 / 3 ! + Z 5 / 5 ! + -----

Cos z + i sin z =
1 - Z 2 / 2 ! + Z 4 / 4 ! + --------- + i
(Z - Z 3 / 3 ! + Z 5 / 5 ! + )
= 1+ iz - Z 2 / 2 ! - i Z 3 / 3 !

--------------

e i = cos + i sin
e -i = cos - i sin
-------------------------------Adding e i + e -i

= 2 cos

Cos = ( e i + e -i
By subtracting
2i sin = e i - e -i
sin = 1/2i (e i - e -i )

cos nx = ( e inx + e
i ( e inx - e -inx )

-inx

sin nx =

f(x) = a0 + (an cosnx + bn sin nx)


f(x) = c0 + (cn e inx + kn e

-inx

c0 = a0 cn = (an - i bn )/2
2

kn = (an + i bn ) /

a0 = 1/2 f(x)dx
-

an = 1/ cos nx f(x)dx
-


bn = 1/ f(x) sin mx dx
-
cn = (an - i bn )/ 2

= 1/2 [

f(x)( cos nx - i sin mx) dx ]

= 1/2 [
-

f(x) e -inx dx

kn = (an

i bn )/ 2

= 1/2 [

f(x)( cos nx + i sin mx) dx ]

-+

= 1/2 [

f(x) e inx dx

-
cn = k n

f(x) = cn e inx

n= -

Example 5.2.1 page 417 Proakis and Manolakis


Perform the circular convolution of the
following two sequences
X1(n) = {2,1,2,1}
X2(n) = { 1,2,3,4}
Solutions
Each sequence consists of four nonzero points.
For the purposes of illustrating the operations
involved in circular convolutions , it is
desirable to graph each sequence as points on a
circle. Thus the sequences x1(n) and x2(n) are
graphed fig 5.8(a). We note that the sequences
are graphed in a counterclockwise direction on a
circle. This establishes the reference direction in
rotating one of the sequences relative to other.
Now x3(m) is obtained by circularly convolving
x1(n) with x2(n) as specified
by

N-1
X3(m) =

m=0,1.N-1

x1(n) x2((m-n))

n=0
Beginning with m=0 we have
3
X3(0) =

x1(n) x2(( -n)) N


n=0

x2((-n)) 4 is simply the sequence x2(n) folded(


time reversing) and graphed on a circle as
illustrated in fig 5.8(b). In other words , the
folded sequence is simply x2(n) graphed in a
clockwise direction.
The product sequence is obtained by
multiplying x1(n) with x2((-n)) 4

point by point . This sequence is also illustrated


in fig 5.8(b). Finally we sum the values in the
product sequence to ob
tain x3(0) =14
For m=1 we have
3
X3(1) =

x1(n) x2(( -n)) N


n=0

It is easily verified that x2((1-n)) 4 is simply the


sequence x2((-n)) rotated counterclockwise by
one unit in time as illustrated in fig 5.8 ( c). This
rotated sequence multiplies x1(n) to yield the
product sequence to obtain x3(1).Thus
X3(1) = 16
For m=2 we have
3
X3(2) =

x1(n) x2((2 -n)) N

n=0
Now x2((2-n)) 4 is the folded sequence in fig
5.8(b) rotated two units of time in the
counterclockwise direction. The resultant
sequence is illustrated in fig 5.8(d) along with
the product sequence
x1(n) x2((2 -n)) 4
By summing the four terms in the product
sequence we obtain
X3(2) =14
For m=3 we have

3
X3(3) =

x1(n)

x2((3 -n)) 4
n=0
The folded sequence x2((-n))
by three units in time to yield

is now rotated

x2((3-n)) 4 and the resultant sequence is


multiplied by x1(n) to yield the product
sequence as illustrated in fig 5.8(c ).The sum of
the values in the product sequence is
x3(3) =16.
The circular convolution of the two sequences
x1(}n) and x2(n) yields the sequence
X3(n) = { 14,16,14,16}
Binary floating point representation of
numbers
Page 561
Proakis and Manolakis
Floating point digital signal processors \page
757
Ifechor and Jervis

Multiplication of two DFTs and circular


convolution
Suppose that we have two finite duration
sequances of length N , x1(n) and x2(n)
Their respective N point DFTs are
N-1
X1(k) = x1(n) e -j2nk/N
1
eq No 1

k=0,1 .N-

n=0
N-1
X2(k) =
1 eq No 2

x1(n) e -j2nk/N

k=0,1 .N-

n=0
If we multiply the two DFTs together , the result
is a DFT, say x3(k) of a sequence x3(n) of
length N. Let us determine the relationship

between x3(n) and the sequences x1(n) and


x2(n).
We have x3(k) = x1(k) x2(k)

k=0,1, N-1

The IDFT of {x3(k)}is


N-1

X3(m) = 1/N

x3(k) e j2mk/N

k=0
N-1
= 1/N
No 3

x1(k)x2(k) e j2mk/N

eq

k=0
Suppose that we substitute for x1(k) and x2(k)
in eq No 3, using the DFTs given
In eq No 1 and 2
Thus we obtain

N-1 N-1
N-1
X3(m) = 1/N [ x1(n) e
x1(n) e -j2nk/N ] e j2mk/N

-j2nk/N

k=0 n=0
n=0

complex form of the Fourier series


complex Fourier coefficients
cos nx = ( e inx + e inx )
sin nx = 1/2i (e inx - e inx )

cos nx + sin nx = e inx + 1/2i e inx


=

e inx

(1+ 1/i)

From Eulers formula


e iy = cos y + i sin y

f(x) = a0 + ( a n cos nx + b n Sin nx )


n=1

f(x)

= C0 +

(C n e inx + Kn e inx )

n=1

C0 +

(C n e inx + Kn e inx )

where C0 = a0 C n = ( an - i bn )/2 Kn =
( an + i bn )/2
For a periodic function C0 = a0 =0, we
would prove this by an example as
follows
Example 2 - Find the Fourier
coefficients of the periodic function f(x)


a0 = 1/ 2

f(x) dx

-
0

= 1/2
-

= 1/2

[| f(x) dx + f(x) dx ]
0
0

[ -k dx + k dx

= -k[0+ ]
+ k[ -0]
= -k + k
=0
Next
f(x) = a0 + ( a n cos nx + b n Sin nx )
= 0 + a n ( e inx + e inx ) + b n /2i( e
inx
- e inx )

| C n | = an 2 + b n 2

C n = 1/2 f(x) e -inx dx


f(x) e inx dx

Kn =1/2
-

-
Introducing the Kn

= C

-n

f (x) = C n e inx
f(x) e -inx dx
-
-

where C n = 1/2

From this equation we get another


equation in terms of

f (t) = C n e int
n= -
for digital signal processing .
e int = twiddle factor.

An alternative way of displaying the


characteristics of the signal by using a spectrum
analyser. By making the transformation from
time domain to frequency domain we can often
sort the signal and noise into their respective
categories, a process which overcomes the
confusing superposition of the time domain
picture.

DFT and its inverse In practice the Fourier


components of data are obtained by digital
computation rather than by analog processing.
Because the analog waveform consists of an
infinite number of contiguous ( touching one
another) points, The representation of all their
values is a practical impossibility. Thus the
anlog values have to be sampled at regular
intervals and the sample values are then
converted to a digital binary representation. This
is achieved using a sample and hold circuit
followed by an analog to digital converter.
Provided the number of samples recorded per
second is high enough the waveform will be
adequately represented. The
Harmonics - We define harmonics as voltage or
currents at frequencies that are multiples of the
fundamental frequency. In most systems the
fundamental frequency is 60 Hz . Therefore

harmonic order is 120 Hz , 180 Hz , 240 Hz and


so on.
The importance of the harmonics is like in a
bridge and a train. The moves on its track and it
produces a vibration. This vibration of the track
vibrates the bridge. Now the bridge has got its
natural vibration. If the natural vibration of the
bridge matches with the train vibration a
resonance occours and the bridge vibrates in
maximum undulations and the bridge breaks.
Fouriers Series
Any periodic waveform f(t) can be represented
as the sum of

f(t) = a0 + an cos (nt) + bn sin(nt)

n=1
where t is an independent variable which often
represents time but could for example represent
distance or any other quantity , f(t) is often a
varying voltage versus time waveform but could
be any other waveform = 2 / T p is known as
the first harmonic or fundamental angular
frequency.
related to the fundamental frequency f by = 2
f , T p is the repetition period of the
waveform.
T p/2

a0 = 1/ T p f(t) dt
- T p/2

Is a constant equal to time average of f(t) taken


over one period which might represent for
example a dc voltage level.
T p/2

an = 2 / T p f(t) cos (nt) dt


- T p/2
T p/2

bn = 2 / T p f(t) sin (nt) dt


- T p/2
Example 1, page 473, Kreyszig

T=4
2
a0 = f (t) dt
-2
1
= k dt
-1
= k/4 [1+1]
= ( k/4) x2

= k/2
1
an = 2 / 4 k cos (nt/2) dt
-1
1
= 1 / 2 k cos (nt/2) dt
-1
1
= k/2
[ sin(nt/2) / n /2]
-1
= k/ n [ sin n/2
- sin ( - n/2 )]

=
2 k / n sin (n/2)
Thus
an =0 when n is even and a n =
2k/n when n= 1,5,9

an = - 2k/n

when n= 3,7, 11,

1
bn = 2 / 4 k sin (n 2 t/4) dt
-1
1
= k sin (n t/2)
dt
-1
1
=k/2 [ - cos n
t/2 ]

-1
= k/2 [ - cosn
/2 + cosn /2]
=0
for n= 1,2,3 ---

f(t) = k/2 + 2k / ( cos ( t/2) - 1/3 cos 3 t/2


-----)

f(t) = a0 + an cos (nt) + bn sin(nt)

Any periodic waveform f(t) can be

W N - Twiddle factor

Page 122

Emmanual , Barrie
In another book W N is the matrix of the linear
transformation.
Page 405
Proakis , Manolakis
In the third book , for convenience in notation
these equations are often written in terms of the
complex quantity W N
WN = e

- J(2/N)

Page -516
Oppenheim , Schafer
Cov[v(i)] is seen to be the zero mean
autocorrelation function of V(i) at lag n.
Page -265

Emmanual , Barrie
Correlation of discrete time signals
Let us suppose that we have two signal
sequences x(n) and y(n) that we wish to
compare. In radar and active sonar
applications , x(n) can represent the sampled
version of the transmitted signal and y(n) can
represent the sampled version of the received
signal at the output of the analog to digital A/D
converter. If a target is present in the space
being searched by the radar or sonar the
received signal y(n) consists of a delayed
version of the transmitted signal reflected from
the target and corrupted by additive noise.
We can represent the received signal sequence
as y(n) = x(n-D) + w(n) where is some
attenuation factor representing the signal loss
involved in the round trip transmission of the
signal x(n) , D is the round trip delay which is

assumed to be integer multiple interval and w(n)


represents the additive noise.
Page 118, Proakis , Manolakis
There are two forms of correlation : auto and
cross correlation.
The cross correlation function (CCF) is a
measure of the similarities or shared properties
between two signals. Application of CCFs
include cross spectral analysis , detection
/recovery of signals buried in noise.
The autocorrelation function ( ACF) involves
only one signal and provides information about
the structure of the signal or its behavior in the
time domain.It is a special form of CCF and is
used in similar applications. It is particularly
useful in identifying hidden periodicities.
Determination of the signal to noise ratio for
a periodic noisy signal

Page 265
By
Convolution description

Convolution is one of the most frequently used


operations in DSP. For example it is the basic
operation in digital filtering. Given two finite
and causal sequences , x(n) and h(n) of lengths
N1 and N2 respectively , their convolutionis
defined as

Y(n) = h(n) x(n) = h(k) x(n-k)


k= -

Here n is the time index and k is a parameter


showing the location of the input impulse.
Page 75 prokakis ,manolakis
x k(n) = (n-k) where k represents the delay of
the unit sample sequence. Page 74 prokakis
manolakis
The term convolution describes amongst other
things , how the input to a system interacts with
the system to produce the output y(n). Examples
of discrete time systems are digital controllers ,
digital spectrum analyzers and digital filters.

A discrete time system is said to be time


invariant if its output is independent of the time
the input is applied. Page 173 Emmanual and
Barrie
The input output relationship of an LTI ( Linear
time invariant)

y(n) = h(k) x(n-k)


k= -
where h(k) is the impulse response of the
system.
The Z transform
The z transform of a sequence x(n) which is
valid for all n is defined as
The inverse z transform

The inverse z transform (IZT) allows us to


recover the discrete time sequence x(n) given
its z transform . Page 179
Example 4.2 Page 181
Either way the Z-transform is now expanded
into the familiar power series , that is
X(z) = 1 + 3z -1 + 3.6439 z -2 + 2.5756 z -3 +
The inverse z transform can now be written
down directly
X(0) =1; x(1) =3; x(2)= 3.6439; x(3) = 2.5756
Example 3.4.2 page 186 from Proakis ,
Manolakis
1
X(z) =
-----------------------------------

1 3/2 z -1 + z -2
= 1+ 3/2 z -1 + 7/4 z -2 + 15/8 z -3 + 31/16 z
-4
+ --------By compairing this relation with

X(z) = x(n) z n
n= -
x(n) = { 1, 3/2, 7/4,
15/8,31/16 ------}

Emmanual and Barrie

Normalization
In statics and application of statics
normalization can have a range of meaning s . In
the simplest cases normalization of ratings
means adjusting values measured on different
scales to a notionally common scale often prior
to averaging. In more complicated cases
normalization may refer to more sophisticated
adjustment where the intension is to bring the
entire probability distributions of adjusted
values into alignment. In the of normalization
of scores in educational assessment there may
be an intension to align distribution to a normal
distribution.
Cos nx = ( e inx + e -inx ) Sin nx = ( e inx
- e -inx ) Page 482 Erwin kreyzig

Linear first order differential equation


A first order differential equation is said to be
linear if it can be wtitten
y + f(x) y = r(x)
the characteristics feature of this equation is that
it is linear in y and y.
S 2 + 4 =0 is it a linear or non linear . It is non
linear because s 2 +s + 4=0 because the second
term is absent.
Y = e x + e x
= e x +1/ e x
= (e 2x + 1) / e x
For x= 0 y = 2
x=

( e x +1/ e x = e + 1/ e

= +0
=

The value of e in natural logarithms is 2.71


Then x= 2 y= 8.3

9
8
7

Y Axis

6
5
4
3
2

Graph of y =
-x
+e

A detailed design example of an IIR digital filter


Page 530,

Emmanual and Barrie

This example will be used to illustrate some of


the many concepts presented in this chapter. In
particular we shall see how the five stage design
procedure is applied.
Stage 1- filter specification
Design and implement a lowpass IIR digital
Sampling frequency 15 KHz
Passband 0-3 kHz transition width 450 Hz
Pass ripple 0.5 dB
Stopband attenuation 45 dB
Note The target board has 12 bit ADC and 12
bit DAC

Stage 2 coefficient calculation


Using the software Design program ( on the CD
in the companion hand book ) for IIR filters , it
was found that a fourth order elliptic filter via
the bilinear transform method would be
required to satisfy the specifications. The output
of the design program is summarized below.
Denominator

Numerator
A1

B1
1
5.846399E-02

1.000000E+00

2
1.359507E-01

-1.325263E+00

3
1.820297E-01

1.480202E+00

4
1.359506E-01

-7.841098E-01

5
5.846398E-02

2.339270E-01

Poles
Coefficients
Real
Z -1

imaginary

Z-2
0.247967

-0.495935

0.836885

0.761864
0.414664
0.367559
0.307046

-0.829328

Zeros
coefficients

Real

Z -1

imaginary

Z-2
-0.337859

0.675718

1.000000

0.941197

-0.824828
1.649656

0.565383

1.000000

From the listing, the transfer function of the filter in


direct form is given by
0.05846399 + 0.1359507 Z -1 + 0.1820979 Z
-2
+ 0.1359506 Z-3 + 0.05846398 Z -4
H(Z)
=-----------------------------------------------------------------------------------1-1.325263 Z
Z-3 + 0.233927 Z-4

-1

+ 1.480202 Z -2 0.7841098

Stage 3 : realization
As explained earlier direct realization of H(z) is very
sensitive to many adverse effects of finite
wordlength such as coefficients quantization errors ,
so it is important to break

H(Z) down into smaller sections and then connect


these up for example in cascade or parallel structure.
Assuming cascade structure H(Z) is broken down
into two second order sections H1(Z) and H2(Z)
H(Z) = H1(Z) H2(z)
Where
b01 + b11Z-1+ b12Z-2
H1(Z) = ------------------------- .
1+a11 Z-1 + a21Z-2
b02 +b12 Z-1 + b22Z-2
H2(Z) = ----------------------------1+ a 12 Z -1 +a22Z-2
The realization diagram is depicted in Fig 8.31
X(n)

Decibels, Chap 8, Page 120, Allen Mottershed


The reaction of the individual either in the field of
seeing or hearing is nonlinear.
In music an octave or perfect octave is the interval
between one musical pitch another with half or
double its frequency. At night for example the glare
of a headlight can be almost blinding, yet in midday
is hardly noticeable in the presence of the sun. Two
headlights would double the effect on vision at night
but it would take two suns to double the effect on
brightness during the day.
The same is true

Example 7.3 Page 359 Emmanual and Barrie


Problem - Obtain the coefficients of an FIR lowpass
filter to meet the specification given below using
the window method.
Passband edge frequency

1.5 kHz

Transition width 0.5 kHz


Stopband attenuation > 50 dB
Sampling frequency 8 kHz
Solution - From Table 7.2 Page 353 for lowpass
filter which is given by
Sin(n c )
h D (n) =
n0

2 f c -------n c

h D (n) = 2 f

n=0

Table 7.3 page 357 that the Hamming window


will satisfy the stopband attenuation requirements.
Now f =0.5/8 =0.0625. From N= 3.3/ f = 3.3 /
0.0625 = 52.8 , Let N= 53
The filter coefficients are obtained from
h D (n) w(n)

-26 n 26

where
Sin(n c )
h D (n) =
n0

2 f c -------n c

h D (n) = 2 f

n=0

Cos nx = ( e inx + e -inx ) Sin nx = ( e inx


- e -inx ) Page 482 Erwin kreyzig
Z=x+iy
In polar form x = r cos,

y = r Sin

r =1
x= cos y = Sin
Euler formula e iy = cos y + i sin y
e iT = cos T + i sin T
Z = e jT

=(e
( e inx - e

-inx

inx

+e

-inx

The bilinear z transform

) +i

In the IIR filter design , two methods


approximation derivatives and impulse
invariance have a severe limitation in that they
are appropriate only for lowpass filters and a
limited class of bandpass filters..
In this section we describe a mapping from the s
plane to the z plane called the bilinear
transformations that overcomes the limitation of
the other two design methods. The bilinear
transformation is a conformal mapping ( a
function that preserves angles locally in the
most common case) that transforms the j axis
into the unit circle in the z plane only once.
Error
If = a +
True value = Approximation + correction

For instance , if = 10.5 is an approximation


to a = 10.2 , its error is = 0.3
The RELATIVE ERROR r = /a = (
-a)/a = Error / True value
Truncation errors are errors corresponding to the
fact that a sequence of computational steps
necessary to produce an exact result is truncated
prematurely after a certain number of
steps(automatically cut off after certain digit).

Round of errors are errors arising from the


process of rounding off during computation.
Floating point
In the decimal notation every real number is
represented by a finite or infinite sequence of
digital digits. For machine computation the
number must be replaced by a number of

infinitely many digits. Most digital computers


have two ways of representing numbers called
fixed point and floating point. In a fixed point
system the numbers are represented with a fixed
number of decimal places eg 62.358 . 0.013
1.000 .
In a floating point system the numbers are
represented with a fixed number of significant
digit
for instance 0.6238 x 10 3 or 06238E03 or
0.6238+03

Determination of the signal to noise ratio for a


periodic noisy signal
By measuring the correlation coefficient of a
noisy periodic signal its signal to noise ratio

may be determined as well as the signal and


noise powers.
Let the signal be represented by V(i) and the
noise as Vn (i) when the noisy signal
V(i) = Vs(i) + Vn (i) Then for the periodic
signal of period n sampling intervals
V(i) = V(i+ n)
Method of Least squares
Method of least mean square algorithm is a
relative filter ( Wikipedia) related to the least
square method (page 818)Kreyszic
Covariance
This topic has come from distribution of several
random variables (page 934) Kreyszic.

Basis A set of elements in a vector space V


is called a basis.

Spectrum estimation and analysis


Page 682, Emmanual and Barrie
The principles and practice of the estimation and
analysis of spectra in the frequency domain and
consequently by selecting certain harmonics on
some suitable criterion and rejecting others
significant data reduction may be possible. Spectrum
analysis has found various application such as the
study of communication engineering signals of event
related or stimulated responses of the human
electroencephalogram (EEG) in the diagonosis brain
diseases of other biological signals , of metrological
data and in industrial process control and the
measurement of noise spectra for the design of
optimal linear filter.

The spectrum estimation technique available may be


categorized as nonparametric and parametric. The
non parametric methods include the periodogram

DCT Discrete cosine transform


In addition to their uses in speeding correlation and
convolution computation and in spectral analysis
transform methods are also used to achieve data
compression in for example speech and video
transmission and fro recording biomedical signals
such as EEGs and ECGs.

Computational complexity of the DFT page 120


A large number of multiplication and additions are
required for the calculations of DFT. For an 8 point
DFT the expansion for x(k) becomes
N-1
X(k) = F D [x(nT)] = x(nT) e -jknT k =0,1 N1
n=0
7
X(k) = x(nT) e jk2n/8 k =0,1 7
n=0
1/t =T

And letting

k 2 /8

=K

this expands to

X(k) = x(0) e -jK0 + x(1) e -jK1 + x(2) e -jK2 + x(3) e


-jK5
+ x(6) e -jK6 + x(7) e -jK7
e N-3.40

-jK3

+ x(5) e

Equation 3.40 contains eight terms on the right hand side. Each term
consists of a multiplication of an exponential term which is always
complex by another term which is real or ccomplex( for example real for
a voltage time series). Each of the product term is added together. There
are therefore eight complex multiplication and seven complex additions
to be calculated. For an N point DFT there will be N and N-1 of them
respectively.There are also eight harmonic to be evaluated. (k= 0,
.7).This number becomes N for an N point DFT. Therefore the
calculation of the eight point DFT requires 8 2 =64 comples
multiplications and 8x7 =56 complex additions. For an N point DFT
these become N 2 and N(N-1) respectively . If N= 1024 then
approximately one million complex multiplications and one million
complex additions are required. Clearly some means of reducing these
numbers is desirable.
The amount of computation involved may be reduced if we note that
there is a considerable amount of built in redundancy in equations 3.40
For example if k=1 and n=2, e

and if k=2 and n=1

-j k 2

n/8

-j k 2

n/8

-j 2 2

-j 1 2

1/8

The decimation in time fast Fourier transform

2/8

=e

-j /2

-j /2

X(k) = F D [x(nT)] = x(nT) e -jknT k =0,1 N1

1024 x 1024 = 1048576 ( 10 lakhs or 1 million)


F

CT Scan --- CT stands for - computed tomography Detailed images


of internal organs are obtained by this type of sophisticated xray
device .
The CT scan can reveal anatomic details of internal organs that can not
be seen in conventional x rays. The x ray tube spins rapidly around the
patient and the x rays strike numerous detectors after passing through
the body. These detectors are connected to sophisticated computers
which generate images after image processing. The radiation dose of a
CT scanner is much higher than a conventional x ray but the
information obtained from a CT scan is much greater.

MRI scan ( magnetic resonance imaging) - nuclear magnetic resonance


imaging (NMRI) or magnetic resonance tomography MRI is based upon
the science of nuclear magnetic resonance . Certain atomic nuclei Cn
absorb and emit radio frequency energy when placed in an external
MAGNETIC FIELD. In clinical and research MRI hydrogen atoms are
most often used to generate a detectable radio frequency signal that is
received by antennas in close proximity to the anatomy being examined .
Hydrogen atoms exists naturally in people and other biological
organisms in abundance particularly in water and fat. For this reason
most MRI scans essentially map the location of water and fat in the
body.

Example 8.1 Page 460

Pole zero placement method of coefficient


calculation
Basic concepts and illustrative design example
.
If a function f(z) is analytic in a domain D and
is zero at a point Z= a in D then f(Z) is said to
have a zero at that point.

If f(Z) has an isolated singularity at a point Z=a


in
f(Z) = b n (Z-a) n + c1 / Z-a + ---- + cm / (Z-a)
m

and the f(Z) goes to infinity for Z=a. Then Z=a is


called a pole. Page 714-715 Irvin Kreyszig.

When a zero is placed at a given point on the z


plane, the frequency response will be zero at the
corresponding point. A pole on the other hand
produces a peak at the corresponding frequency
point. This can be seen from the definition of
zero and pole also in the down figure.

Poles that are close to the unit circle give rise to large peaks whereas
zeros close to or on the circle produce troughs or minima. Thus by
strategically placing poles and zeros on the z plane we can obtain
simple lowpass or other frequency selective filters.
An important point to bear in mind is that for the coefficients of the filter
to be real and poles and zeros must either be real ( that is lie on the
positive or negative real axes) or occur in complex conjugate pairs. We
will illustrate the method with examples.
Example 8.1 - illustrating the simple pole zero method of calculating
filter coefficients. A band pass digital filter is required to meet the
following specifications;
1. Complete signal rejection at DC and 250Hz
2. A narrow pass band centered at 125 Hz
3. A 3dB bandwidth of 10 Hz

Assuming a sampling frequency of 500Hz obtain the transfer


function of the filter by suitably placing Z plane poles and zeros
and its difference equations.
Solutions

First we must determine where to place the poles and

zeros on the Z plane. Since a complete rejection is required at 0


and at 250 Hz, we need to place zeros at corresponding points on
the Z plane. These are at angles of 0 deg and 360 deg 250 /500 =
180 deg on the unit circle. To have the pass band centered at 125
Hz requires us to place poles at 360 deg x 125 /500 = 90. To
ensure that the coefficients are real it is necessary to have a
complex conjugate pole pair.
The radius r of the poles is determined by the desired bandwidth.
An approximate relationship between r for r > 0.9 and bw is given
by
r 1 (bw/ Fs)
For the problem bw 10 Hz and Fs =500 Hz giving r =1 (10/ 500)
= 0.937.
The pole zero diagram is given in
Fig 8.4a

From the pole zero diagram the transfer function can be written
down by inspection
(Z-1 ) (Z+1)
H(z) = ---------------------------------------------( Z r e j/2 ) ( Z r e -j/2 )
Z 2 -1
= -------------------------Z 2 Zre -j/2 - Zre j/2 + r 2 e -j/2 e j/2
Z 2 -1
= ---------------------------

Z 2 -1
= ----------------

Z 2 Zre -j/2 - Zre j/2 + r 2 e -j/2 e j/2

Z 2 + 0.877969

1- Z -2
= -------------------1+ 0.877969 Z -2

The difference equation is


Y(n) = - 0.877969 y(n-2) +x(n) x(n-2)

From Eulers formula

e iT = cos T + i sin T
- Zre -j/2 = - Zr [cos(- /2 ) + j sin(-/2) = - Zr [0 j 1] = Zr

- Zre j/2 = - Zr [cos( /2 ) + j sin(/2) = - Zr [0 + j 1] = - Zr


And r 2 e -j/2 e j/2 = r 2 (e -j/2 + j/2) = r 2 (e 0) = r 2

Parametric method - page 369 Kreyszig

Non parametric method page 980

Page 459

Você também pode gostar