DSP Chapter 2 part 1

45
1 Chapter 2 part 1 1. Discrete-Time Signals and Systems 1. Discrete-Time Signals and Systems A discrete time signals are represented as sequences of numbers, called samples. Sample value of a typical signal or sequence denoted as x[n] with n being an integer in the range -∞ ≤ n ≤∞ . Discrete-time signal represented by {x[n]} is a function of an independent variable that is an integer. x[n] defined only for integer values of n and undefined for non-integer values of n

Transcript of DSP Chapter 2 part 1

Page 1: DSP Chapter 2 part 1

1

Chapter 2 part 1

1. Discrete-Time Signals and Systems1. Discrete-Time Signals and SystemsA discrete time signals are represented as sequences of numbers, called samples. Sample value of a typical signal or sequence denoted as x[n] with n being an integer in the range -∞ ≤ n ≤∞ . Discrete-time signal represented by {x[n]} is a function of an independent variable that is an integer. x[n] defined only for integer values of n and undefined for non-integer values of n

Page 2: DSP Chapter 2 part 1

2

2. Representation of Discrete time 2. Representation of Discrete time signalssignals

1. Graphical Representation1. Graphical Representation

Page 3: DSP Chapter 2 part 1

3

2. Functional representation

3. Tabular representation

850432

nnnnxe ,

,][

n -2 -1 0 1

x(n) 1 2 4 0

Page 4: DSP Chapter 2 part 1

4

4. Sequence representationa. Infinite duration sequence

x(n) = { …, 1, 4, 1, …}

The arrow is placed under the sample at time index n = 0

b. Finite duration sequencex(n) = { 1, 4, 1 }

No arrow means the sample at time index n = 0 is at the first leftmost number. Consist of 3 samples or points (in time) often called as a 3 point sequence (depending on the number of points or samples given).

Page 5: DSP Chapter 2 part 1

5

Some Elementary Discrete time signalsSome Elementary Discrete time signals

Singularity Functions - are used to represent more complicated signals. The unit impulse function – delta function, is the basic singularity function and all singularity functions can be derived by repeated integration or differentiation of the delta function. The other common singularity functions are the unit step and the unit ramp functions.

Page 6: DSP Chapter 2 part 1

6

1. Unit Sample Sequence or Delta or Unit Impulse function δ(t)

Is a signal that is zero everywhere except at n = 0 where its value is unity.

2. Unit Step Function u(n) – mu(n)

0 ,0

0 ,1)(

nfor

nforn

0 ,0

0 ,1)(

nfor

nforn

Page 7: DSP Chapter 2 part 1

7

3. Unit-ramp Function ur(n)

A ramp signals starts at t = 0 and increases linearly with time, t. in discrete time domain, the unit ramp signal is defined as

0 ,0

0 ,)(

nfor

nfornn

Page 8: DSP Chapter 2 part 1

8

4. Exponential Signalx(n) = an for all n

if the parameter a is real, then x(n) is a real signal. When the parameter a is complex valued, it can be expressed as:

a ≡ rejθ where r and θ are now the parameters

and x(n is now expressed asx(n) = rnejθ

= rn (cos θn + jsin θn)

Page 9: DSP Chapter 2 part 1

9

Advantage of singularity functions

The advantage of singularity function is that any arbitrary signal that is made up of straight line segment can be represented in terms of step and ramp functions.

Page 10: DSP Chapter 2 part 1

10

Simple Manipulations of Discrete time signalsSimple Manipulations of Discrete time signals

When a signal is processed, the signal undergoes many manipulations involving the independent variable and the dependent variable. For discrete time signal, the independent variable is time, n. 3 methods for the transformation of the Independent variable:

a) Shifting

b) Folding

c) Scaling

Page 11: DSP Chapter 2 part 1

11

Shifting A signal x(n) may be shifted in time (either advanced or delayed in the time axis). The shifted signal is represented by x(n-k) where, k is an integer. If k is positive, the signal is delayed by k units of time. If the k is negative, the time shift results in advancing the signal in the time axis, which is not always possible. If the signal is available in a magnetic disk or other storage units, then the signal can be delayed or advance at any variable. But in real time, advancing the signal is not possible since such operation involves samples that have not been generated therefore is physically unrealistic for real time signals.

Page 12: DSP Chapter 2 part 1

12

Folding The operation is done by replacing the independent variable n by –n. This results in the folding of the signal about the origin, if n = 0. Folding is also known as the reflection of the signal about the time origin n = 0. Folding of a signal is done while convolution of the signal with another signal

Note: the operation of folding and shifting a signal is not commutative. If we denote the time-delay operation by TD and the folding operation as FD

Page 13: DSP Chapter 2 part 1

13

Proof of non commutative property

TDk [x(n)] = x (n-k) k > 0

FD [x(n)] = x ( -n)

Now,TDk {FD [x(n)]} = TDk [x( -n)] = x (- n + k)

WhereasFD {TDk [x(n)]} = FD [ x (n-k)] = x (-n – k)

Clearly not equal

Page 14: DSP Chapter 2 part 1

14

Time Scaling

This involves replacing the independent variable n by kn, where k is an integer. This process is also called down sampling. If x9n) is the discrete time signal obtained by sampling the analog signal, x(t), then x(n) = x(nT) where T is the sampling period. If time scaling is done, then the time scaled signal, y(n) = x (kn) = x (knT). This implies that the sampling rate is change from 1/T to 1/kT. This decreases the sampling rate by a factor k.

Page 15: DSP Chapter 2 part 1

15

Addition, multiplication and Addition, multiplication and scaling of sequencesscaling of sequences

Are amplitude modifications of discrete time Are amplitude modifications of discrete time signals. signals.

a. Amplitude scaling by a constant A y(n) = Ax(n) -∞< n <∞

b. Sum of two signalsy(n) = x1(n) + x2(n) -∞< n <∞

c. Product of 2 signalsy(n) = x1(n)*x2(n) -∞< n <∞

Page 16: DSP Chapter 2 part 1

16

Sample Problem

elsewhere

nn

n

nx

,0

51,4

40,4

)(

1.Plot the signal x(n) and get the sequence form2.Shift the signal by delaying x(n) by 3 units [x(n-3)]3.Shift the signal by advancing x(n) by 2 units

[x(n+2)]4.Show y(n) = x(-n)5.Show y(n) = x(-n + 2)6.Show y(n) = x(2n)7.Show y(n) = x(n/2)

Page 17: DSP Chapter 2 part 1

17

Discrete time systemsDiscrete time systems

Is a device or algorithm that performs some prescribed operation on a discrete-time signal, called the input or excitation, according to some well defined rule to produce another discrete time signal called the output or response of the system.

y(n) = Τ [x(n)]

where the symbol T denotes the transformation (also called the operator) or processing

performed by the system on x(n) to produce y(n).

Page 18: DSP Chapter 2 part 1

18

Block Diagram Representaion

General input-output relationship notation

Discrete Time System (T)

)()( nynxT

X(n) Y(n)

Input signal

Or excitation

Outout signal

Or response

Page 19: DSP Chapter 2 part 1

19

Example:Determine the response of the following systems to the

input signal

1. y(n) = x(n)2. y(n) = x(n - 1)3. y(n) = x(n + 1)4. y(n) = 1/3 [ x(n+1) + x(n) + x(n – 1)]5. y(n) = max [x(n+1), x(n), x(n – 1)]6. y(n) = ∑ n x(k) = x(n) + x(n – 1) + x(n - 2) + …. k = -∞

elsewhere

nnnx

,0

33|,|)(

Page 20: DSP Chapter 2 part 1

20

Accumulatorcomputes the running sum of all the past input

values up to the present time. Given a system:

y(no) = y(no - 1) + x(no)y(no + 1) = y(no) + x(no + 1)

The problem in computing y(no) since it is dependent on y(no - 1). The additional information required to determine y(n) for n ≥ no is the initial condition y(no - 1). If the accumulator had no excitation prior to no, the initial condition is a cased said to be initially relaxed which is a general condition

Page 21: DSP Chapter 2 part 1

21

Block Diagram representation of Block Diagram representation of Discrete Time SystemsDiscrete Time Systems

Block Diagrams - A useful tool for visual representation of systems, using various components and symbols of the system.

Continuous time system Discrete Time system

= T[x(t)] IdealC-D

converter

X9n) X9n)Y(n)Y(n)

TsSampling period.

Page 22: DSP Chapter 2 part 1

22

Basic building blocks that can be connected to form complex systems.

1. Adder - Addition operation. The sum sequence and is memoryless.

Page 23: DSP Chapter 2 part 1

23

2. Constant Multiplier - Multiplication operation. Represents applying a scale factor on the input x(n) and is also memoryless.

Page 24: DSP Chapter 2 part 1

24

3. Signal Multiplier – forms a product sequence and is also memoryless.

y(n) = x(n) w(n)

X

w(n)

x(n) y(n)

Page 25: DSP Chapter 2 part 1

25

4. Unit delay element – Simply delays the signal passing through by one sample. Uses the z transform form to represent the delay operation.

y(n) = x(n - 1)

Page 26: DSP Chapter 2 part 1

26

5. Unit Advance element – Contrast to the unit delay element. Simply advances the signal passing through by one sample and also is denoted by the z transform.

Zy[n]x[n]

y(n) = x(n + 1)

Page 27: DSP Chapter 2 part 1

27

6. Branching -•Used to provide multiple copies of a sequence

x[n] x[n]

x[n]

Page 28: DSP Chapter 2 part 1

28

Sample Problem

Using building blocks sketch the block diagram of the discrete time system described by the input output sequence relation:

y(n) = ¼ y(n – 1) + ½ x(n) ½ x(n – 1)

where: x(n) is the input and y(n) is the output of the system.

Page 29: DSP Chapter 2 part 1

29

Classification of Discrete Time Systems

Generally, systems are classified as either continues or discrete time systems. And both can be further classified into the following types:

1. Static versus dynamic systems

2. Linear versus non-linear systems

3. Time variant versus time-invariant systems

4. Causal versus non-causal systems

5. Stable versus unstable systems.

Page 30: DSP Chapter 2 part 1

30

Static systemIs a Memoryless if and only if its output at any instant n depends at the

most on the input sample at the time, but not on the past or future samples of the input.

• The output at any specific time depends on the input at that particular time.

• Does not depend on past or future values of the input. • It is a system with no memory or energy storage element.• The input/output relation of the system does not involve integrals or

derivatives.Example. A simple resistive network.• Sample equations

y(n) = ax(n)y(n) = nx(n) + bx3(n)

• General form y(n) = T [x(n),n] and does not contain delay elements (memory)

Page 31: DSP Chapter 2 part 1

31

Dynamic System• Dynamic System or with memory and maybe infinite

or finite memory.• The output at any specified time depends on the inputs

at that specific time and at other times.• Have memory or storage elements• The equation will always be a differential equation for

continues time system or a difference equation for a discrete time system.

Example. Any electrical circuit consisting of a capacitor or inductor.

Sample equations:y(n – 1) + 2y(n) = 4x(n) – x(n - 1) (finite)

y(n) = Σ x(n – k) (infinite)

Page 32: DSP Chapter 2 part 1

32

Linear Systems

• The principle of superposition holds. • Is a system whose response to the sum of

the weighted inputs is the same as the sum of the weighted responses (outputs) of the system to each of the individual input signals.

Definition:

T[a1x1(n) + a2x2(n)] = a1T[x1(n)] + a2T[x2(n)]

Page 33: DSP Chapter 2 part 1

33

• For any arbitrary input sequence x1(n) and x2(n), and any arbitrary constants a1 and a2.

+T

x1(n)

x2(n)

y(n)

a1

a2

a2

a1

T

Tx1(n)

x2(n) +y’(n)

Page 34: DSP Chapter 2 part 1

34

• Graphical representation of superposition principle. T is linear is and only if y(n) = y’(n)

Can be separated into 2 parts:(1) First a2 = 0 then

T[a1x1(n)] = a1T[x1(n)] = a1y1(n)Where: y1(n) = T[x1(n)]

• The relation shows multiplicative scaling or scaling property of a linear system. That is, if the response of the system to the input x1(n) is y1(n), the response of a1x1(n) is simply a1y1(n). Any scaling in the input results in an identical scaling of the corresponding output.

(2) Second, suppose a1 = a2 = 1 then:

T[x1(n) + x2(n)] = T[x1(n)] + T[x2(n)]= y1(n) + y2(n)

Page 35: DSP Chapter 2 part 1

35

Non-linear Systems

• The system does not satisfy the given equations for linearity.

• Does not satisfy the superposition principle.• A relaxed linear system with zero input produces

zero output. If a system produces a nonzero output with a zero input, the system may either be non-relaxed or non-linear.

Page 36: DSP Chapter 2 part 1

36

Time invariant systems• The input output relationship does not vary with

time. Also called a fixed system.• General form: y(n) = T [x(n)] is time invariant or

shift invariant if and only ifx(n) T y(n)

implies that x(n - k) T y(n - k)for every input signal x(n) and every time shift k.

• Is also called shift-invariance where k is an integer.

• A system satisfying both linearity and time invariant conditions are called Linear, time invariant systems or LTI systems.

Page 37: DSP Chapter 2 part 1

37

• A test is performed to verify if our system is time invariant

a. Excite the system with an arbitrary input sequence x(n) that produces an output y(n).

b. Delay the input sequence by the same amount of k and recomputed the output. In general:

y(n) = T[x(n – k)]

Page 38: DSP Chapter 2 part 1

38

c. If the output y(n, k) = y(n - k), for all the possible values of k, the system is time invariant. If not, the system is time variant.

• Example: Differentiator:

x(n) (n) = x(n) – x(n - 1)

+

z-1

Page 39: DSP Chapter 2 part 1

39

Time Variant System

• An equation not satisfying Time invariant system equations are time variant systems.

• Example: 1. Time multiplier

xX(n)

n

y(n)

Page 40: DSP Chapter 2 part 1

40

2. Folder

3. Modulator

T

X(n) Y(n)=X(-n)

+X(n) y(n) = x(n) coswon

coswon

Page 41: DSP Chapter 2 part 1

41

Causal Systems• Non-anticipatory. The response of the system

to the input does not depend on future values of that input [x(n + 1), x(n + 2), …], but depends only on the present and/or past values of the input [ x(n), x(n – 1) , x(n – 2) …].

• In mathematical terms:y(n) = F[x(n), x(n – 1), x(n – 2), …]

where F[ ] is some arbitrary function• Sample equations

1. y(n) = 0.5 x(n) – x(n - 2)2. y(n) = x(n)3. y(n - 2) + y(n) = n(n) + 0.98 x(n – 1)

Page 42: DSP Chapter 2 part 1

42

Non-causal Systems

• Anticipatory. The response of the system to an input depends on the future values of the input.

• Are unrealistic (cannot be implemented). It is apparent that for real time signal processing applications, we cannot obtain future values of the signal. But if the signal is pre-recorded so that the processing is done off-line (non-real time), then it becomes realistic.

• Does not satisfy the condition for causal.• Sample equations

y(n-1) = x (n)y(n) = 0.11x(n – 1)+x(n) –0.8x(n+1)

Page 43: DSP Chapter 2 part 1

43

Stable Systems

• Stability is an important property for any practical application of a system.

• An arbitrary relaxed system is said to be BIBO – Bounded input, bounded output stable, if every bounded input produces a bounded output. A bounded signal has an amplitude that remains finite. Therefore, a BIBO stable system will have a bounded output for any bounded input so that its output does not grow unreasonably large. Conditions are:

• If the system transfer function is a rational function, the degree of the numerator must be no larger than the degree of the denominator.

Page 44: DSP Chapter 2 part 1

44

• The poles of the system must lie in the left half of the s-plane or within the unit circle in the z-plane.

• If a pole lies on the imaginary axis, it must be a single order one. I.e. no repeated poles must lie on the imaginary axis.

• Mathematically a bounded input sequence x(n) and a bounded output sequence y(n) means that there exist some finite numbers say Mx and My such that :

|x(n)| ≤ Mx < ∞ |y(n)| ≤ My < ∞• for all n. If for some bounded input sequence x(n), the

output is unbounded (infinite). The system is unstable.

Page 45: DSP Chapter 2 part 1

45

Unstable system

• Unstable systems display erratic and extreme behavior and cause overflow in any practical implementation.

• The system not satisfying the stable system conditions are unstable.