Top Banner
Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1
31

Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Jan 11, 2016

Download

Documents

Kenneth Walker
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Discrete-Time and System(A Review)

SEB4233Biomedical Signal Processing

Dr. Malarvili Balakrishnan

1

Page 2: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Discrete – Time Signal

A discrete-time signal, also referred as sequence, is only defined at discrete time instances.

A function of discrete time instants that is defined by integer n.

x(t) x(n)

Continuous time signal Discrete time signal

2

Page 3: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Periodic signal isx(n) = x(n+N) -<n<

Non-periodic (aperiodic) signal isx(n) defined within -N/2 ≤ n ≤ N/2, and N <

Periodic and Non-Periodic

3

Page 4: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Examples Of Aperiodic Signals

Impulse functionx(n)=1 n=0

= 0 elsewhere

Step function 1)( nx 0n

0n = 0

Ramp Function anx )( 0n = 0 0n

Pulse function 1)( nx 10 nnn = 0 elsewhere

Pulse sinusoid )2cos()( 1 nfnx 10 nnn

= 0 elsewhere

4

Page 5: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Energy and Power

Energy

Power

where N is the duration of the signal

1

0

21

0

* )()()(N

n

N

nx nxnxnxE

x

N

n

N

nx E

Nnx

Nnxnx

NP

1)(

1)()(

1 1

0

21

0

*

5

Page 6: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

6

Systems

A system operates on a signal to produce an output.

System Impulse Response

h(n)

Input, x(n) Output, y(n)

Page 7: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Characteristics of systems time invariantshift invariantcausalstabilityLinearity

Time and shift invariant means that the system characteristics and shift do not change with time.

7

Page 8: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Characteristics of systems

8

h(n)0 n0 =0 n<0

Causality

Stability

n

nh )(

Linearity

)]()([)]([)]([ 1010 nxnxTnxTnxT

)]]([[)]]([[)( nxSTnxTSny

x0(n) & x1(n) are 2 different inputs

S[ ] and T[ ] are linear transformations

Page 9: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Convolution

If h(n) is the system impulse response, then the input-output relationship is a convolution.

It is used for designing filter or a system.

Definition of convolution:

)()()(*)()( nxhnxnhny

)()()(*)()( nhxnhnxny

Page 10: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

ExampleConsider a system with an impulse response of

h(n) = [ 1 1 1 1 ]If the input to the signal is

x(n) = [ 1 1 ]

Thus, the output of the system is

The result of the convolution procedure in its graphical form is :

)()()( nxhny

10

Page 11: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

0

x(n)

n1

1

0

h(n)

n1 2 3

1

0

x(0-)

-1

1

0

h()

1 2 3

1

0

h() x(0-)

1 2 3

1

-1

1)0()()0(

xhy

i) The definition of the system impulse response h(n) and the input signal x(n)

11

Example (Cont.)

Page 12: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

ii) The result at n=1.

0

x(1-)

1

1

0

h()

1 2 3

1

0

h() x(1-)

1 2 3

1

2)1()()1(

xhy

iii) The result at n=2.

x(2-)

1

1

0

h()

1 2 3

1

0

h() x(2-)

1 2 3

1

2

2)2()()2(

xhy

12

Example (Cont.)

Page 13: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

iV) At n=3x(3-)

2

1

0

h()

1 2 3

1

0

h() x(3-)

1 2 3

1

3

2)3()()3(

xhy

h(n)

n

1

10 2 3 4

2

.

v) At n=4

20

h()

1 3

1

21 30

h() x(4-)

1

4

x(4-)

1

3 4

1)4()()4(

xhy

Finally

131

Page 14: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Frequency Domain Representation

An alternative representation and characterization of signals. Much more information can be extracted from a signal. Many operations that are complicated in time domain become rather

simple.

Fourier Transforms: Fourier series – for periodic continuous time signals Fourier Transform – for aperiodic continuous time signals Discrete Time Fourier Transform (DTFT) – for aperiodic discrete time signals (frequency

domain is still continuous however)

Discrete Fourier Transform (DFT) – DTFT sampled in the frequency domain Fast Fourier Transform (FFT) – Same as DFT, except calculated very efficiently

14

x(t) X()F

x(n) X()F

Page 15: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

DTFT & its Inverse Since the sum of x[n], weighted with

continuous exponentials, is continuous, the DTFT X() is continuous (non-discrete)

Since X() is continuous, x[n] is obtained as a continuous integral of X(), weighed by the same complex exponentials.

x[n] is obtained as an integral of X(), where the integral is over an interval of 2pi.

X() is sometimes denoted as X(ej) in some books.

15

Page 16: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Example: DTFT of Impulse Function

16

Page 17: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Example: DTFT of constant function

17

Page 18: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Discrete Fourier Transform

DTFT does not involve any sampling- it’s a continuous function

Not possible to determine DTFT using computer

So explore another way to represent discrete-time signals in frequency domain

The exploration lead to DFT

18

Page 19: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

DFT

19

Page 20: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Energy and Power Spectrum

Energy

Power Spectrum

2)()( kXkE xx

2)(

1)( kX

NkS xx

20

Page 21: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Fast Fourier Transform

The computation complexity of the N length DFT is N2.

The FFT (Fast Fourier Transform) is developed to reduce the computation complexity to N ln (N).

Now can implement frequency domain processing in real-time.

21

Page 22: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

FFT

The two approaches for implementing the FFT:

Decimation in Time (DIT):

Decimation in Frequency (DIF):

22

Page 23: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

FFT in Matlab

23

Page 24: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Convolution in Frequency Domain

Convolution in time domain = multiplication in frequency domain

Multiplication in time domain = convolution in frequency domain

24

Page 25: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Sampling Sampling: Process of conversion from continuous-time to discrete-

time representation.

This is necessary if it is desired to process the signal using digital computers.

The discrete-time signal x(n) is obtained as a result of the product of the continuous-time signal with a set of impulse xd(t) with period Ts

nsnTttxtxtxnx )()()()()(

Page 26: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Sampling

Sampling Process

Page 27: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Spectrum of Sampled Signals If x(t) has a spectrum X(f), then the spectrum of a sampled signal

x(n) is

nsnTttxFTtxtxFTnxFTfjX )()()()()]([))2(exp(

ns

ns fnTjnxdtftjnTttx )2exp()()2exp()()(

nsnffX )(

Page 28: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Spectrum of Sampled Signals

f-fm fm

|X(f)|

-fm fm

|X(exp(2f)|

-fs fs 2fs-2fs f

Amplitude spectra of a signal before and after sampling.

Page 29: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Nyquist Sampling Theorem Increasing the sampling frequency will increase the storage space and

processing time.

Reducing the sampling frequency will result in aliasing due to the overlapping between the desired and replicate spectrum components.

The aliasing effect is minimized by using the Nyquist sampling theorem

max2 ff s

Page 30: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Difference Equations A continuous-time system can be described by differential

equations. Discrete-time systems are described by difference equations that can

be expressed in general form as

Constant coefficients ai and bi are called filter coefficients. Integers M and N represent the maximum delay in the input and output,

respectively. The larger of the two numbers is known as the order of the filter.

30

Page 31: Discrete-Time and System (A Review) SEB4233 Biomedical Signal Processing Dr. Malarvili Balakrishnan 1.

Difference Equations

31

MM

nxbnyany01

)()()()()(

(Infinite Impulse Response - IIR)

M

nxbny0

)()()(

(Finite Impulse Response - FIR)