Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete-Time Signals and Systems

Similar presentations


Presentation on theme: "Discrete-Time Signals and Systems"— Presentation transcript:

1 Discrete-Time Signals and Systems
Chapter 2 Discrete-Time Signals and Systems

2 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Signals 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  x[n] defined only for integer values of n and undefined for noninteger values of n Discrete-time signal represented by {x[n]}

3 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Discrete-time signal may also be written as a sequence of numbers inside braces: {x[n]}={…,-0.2,2.2,1.1,0.2,-3.7,2.9,…} In the above, x[-1]= -0.2, x[0]=2.2, x[1]=1.1, etc. The arrow is placed under the sample at time index n = 0

4 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Graphical representation of a discrete-time signal with real-valued samples is as shown below:

5 §2.1.1 Discrete-Time Signals: Time-Domain Representation
In some applications, a discrete-time sequence {x[n]} may be generated by periodically sampling a continuous-time signal xa(t) at uniform intervals of time

6 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Here, n-th sample is given by x[n]=xa(t) |t=nT=xa(nT), n=…,-2,-1,0,1,… The spacing T between two consecutive samples is called the sampling interval or sampling period Reciprocal of sampling interval T, denoted as FT , is called the sampling frequency:

7 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Unit of sampling frequency is cycles per second, or hertz (Hz) , if T is in seconds Whether or not the sequence {x[n]} has been obtained by sampling, the quantity x[n] is called the n-th sample of the sequence {x[n]} is a real sequence, if the n-th sample x[n] is real for all values of n Otherwise, {x[n]} is a complex sequence

8 §2.1.1 Discrete-Time Signals: Time-Domain Representation
A complex sequence {x[n]} can be written as {x[n]}={xre[n]}+j{xim[n]} where xre and xim are the real and imaginary parts of x[n] The complex conjugate sequence of {x[n]} is given by {x*[n]}={xre[n]}-j{xim[n]} Often the braces are ignored to denote a sequence if there is no ambiguity

9 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example - {x[n]}={cos0.25n} is a real sequence {y[n]}={ej0.3n} is a complex sequence We can write {y[n]}={cos0.3n + jsin0.3n} ={cos0.3n} + j{sin0.3n} where {yre[n]}={cos0.3n} {yim[n]}={sin0.3n}

10 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example – {w[n]}={cos0.3n}- j{sin0.3n}={e-j0.3n} is the complex conjugate sequence of {y[n]} That is, {w[n]}= {y*[n]}

11 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Two types of discrete-time signals: - Sampled-data signals in which samples are continuous-valued - Digital signals in which samples are discrete-valued Signals in a practical digital signal processing system are digital signals obtained by quantizing the sample values either by rounding or truncation

12 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example – Amplitude Digital signal Boxedcar signal Time,t

13 §2.1.1 Discrete-Time Signals: Time-Domain Representation
A discrete-time signal may be a finite-length or an infinite-length sequence Finite-length (also called finite-duration or finite-extent) sequence is defined only for a finite time interval: N1 n N2 where - < N1 and N2 <  with N1 N2 Length or duration of the above finite-length sequence is N= N2 - N1+ 1

14 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example – x[n]=n2, -3 n  4 is a finite-length sequence of length 4 -(-3)+1=8 y[n]=cos0.4n is an infinite-length sequence

15 §2.1.1 Discrete-Time Signals: Time-Domain Representation
A length- N sequence is often referred to as an N-point sequence The length of a finite-length sequence can be increased by zero-padding, i.e., by appending it with zeros

16 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example – is a finite-length sequence of length 12 obtained by zero-padding x[n] =n2, -3≤n≤4 with 4 zero-valued samples

17 §2.1.1 Discrete-Time Signals: Time-Domain Representation
A right-sided sequence x[n] has zero-valued samples for n < N1 A right-sided sequence If N1 0, a right-sided sequence is called a causal sequence

18 §2.1.1 Discrete-Time Signals: Time-Domain Representation
A left-sided sequence x[n] has zero-valued samples for n > N2 N 2 n A left-sided sequence If N2≤0, a left-sided sequence is called a anti-causal sequence

19 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Size of a Signal Given by the norm of the signal Lp - norm where p is a positive integer

20 §2.1.1 Discrete-Time Signals: Time-Domain Representation
The value of p is typically 1 or 2 or ∞ L2 –norm is the root-mean-squared (rms) value of {x[n]}

21 §2.1.1 Discrete-Time Signals: Time-Domain Representation
L1 - norm is the peak absolute value of {x[n]} L∞ - norm is the peak absolute value of {x[n]}, i.e.

22 §2.1.1 Discrete-Time Signals: Time-Domain Representation
Example – Let {y[n]}, 0≤n≤N-1, be an approximation of {x[n]}, 0≤n≤N-1 An estimate of the relative error is given by the ratio of the L2 -norm of the difference signal and the L2 -norm of {x[n]}:

23 §2.1.2 Operations on Sequences
A single-input, single-output discrete-time system operates on a sequence, called the input sequence, according some prescribed rules and develops another sequence, called the output sequence, with more desirable properties x[n] y[n] Input sequence Output sequence Discrete-time system

24 §2.1.2 Operations on Sequences
For example, the input may be a signal corrupted with additive noise Discrete-time system is designed to generate an output by removing the noise component from the input In most cases, the operation defining a particular discrete-time system is composed of some basic operations

25 §2.2.1 Basic Operations Product (modulation) operation:
x[n] y[n] w[n] y[n]=x[n].w[n] -Modulator An application is in forming a finite-length sequence from an infinite-length sequence by multiplying the latter with a finite-length sequence called an window sequence Process called windowing

26 §2.2.1 Basic Operations Addition operation: + Multiplication operation
y[n]=x[n]+w[n] Adder x[n] y[n] w[n] + Multiplication operation A x[n] y[n] y[n]=A.x[n] Multiplier

27 §2.2.1 Basic Operations Time-shifting operation: y[n]=x[n-N] where N is an integer If N>0, it is delaying operation y[n] x[n] y[n]=x[n-1] Unit delay If N<0, it is an advance operation y[n] x[n] y[n]=x[n-1] Unit advance

28 §2.2.1 Basic Operations Time-reversal (folding) operation: y[n]=x[n-1]
Branching operation: Used to provide multiple copies of a sequence x[n]

29 §2.2.1 Basic Operations Example - Consider the two following sequences of length 5 defined for 0n4 : {a[n]}={3 4 6 –9 0} {b[n]}={2 –1 4 5 –3} New sequences generated from the above two sequences by applying the basic operations are as follows:

30 §2.2.1 Basic Operations {c[n]}={a[n].b[n]}={6 –4 24 –45 0}
{d[n]}={a[n]+b[n]}={ –4 -3} {e[n]}=(3/2){a[n]}={ – } As pointed out by the above example, operations on two or more sequences can be carried out if all sequences involved are of same length and defined for the same range of the time index n

31 §2.2.1 Basic Operations However if the sequences are not of same length, in some situations, this problem can be circumvented by appending zero-valued samples to the sequence(s) of smaller lengths to make all sequences have the same range of the time index Example - Consider the sequence of length 3 defined for 0n 2: {f[n]}={-2, 1, -3}

32 §2.2.1 Basic Operations We cannot add the length-3 sequence to the length-5 sequence {a[n]} defined earlier We therefore first append {f[n]} with 2 zero-valued samples resulting in a length-5 sequence {fe[n]}={-2 1 –3 0 0} Then {g[n]}={a[n]}+{f[n]}={1 5 3 –9 0}

33 §2.2.1 Basic Operations Ensemble Averaging
A very simple application of the addition operation in improving the quality of measured data corrupted by an additive random noise In some cases, actual uncorrupted data vector s remains essentially the same from one measurement to next

34 §2.2.1 Basic Operations While the additive noise vector is random and not reproducible Let di denote the noise vector corrupting the i-th measurement of the uncorrupted date vector s: xi=s+di

35 §2.2.1 Basic Operations The average data vector, called the ensemble average, obtained after K measurements is given by For large values of K, xave is usually reasonable replica of the desired data vector s

36 §2.2.1 Basic Operations Example

37 §2.2.1 Basic Operations We cannot add the length-3 sequence {f[n]} to the length-5 sequence {a[n]} defined earlier We therefore first append {f[n]} with 2 zero-valued samples resulting in a length-5 sequence {fe[n]}={− } Then {g[n]}= {g[n]}+{fe[n]}={ }

38 §2.2.1 Combinations of Basic Operations
Example - y[n]=1x[n]+ 2x[n-1]+ 3[n-2]+ 4x[n-3]

39 §2.2.2 Sampling Rate Alteration
Employed to generate a new sequence y[n] with a sampling rate F’T higher or lower than that of the sampling rate FT of a given sequence x[n] Sampling rate alteration ratio is R= F’T / FT If R>1, the process called interpolation If R<1, the process called decimation

40 §2.2.2 Sampling Rate Alteration
In up-sampling by an integer factor L>1, L−1 equidistant zero-valued samples are inserted by the up-sampler between each two consecutive samples of the input sequence x[n]: x[n] xu[n] L

41 §2.2.2 Sampling Rate Alteration
An example of the up-sampling

42 §2.2.2 Sampling Rate Alteration
In down-sampling by an integer factor M>1, every M-th samples of the input sequence are kept and M-1 in-between samples areremoved: x[n]=x[nM] x[n] y[n] M

43 §2.2.2 Sampling Rate Alteration
An example of the down-sampling operation

44 Classification of Sequences Based on Symmetry
Conjugate-symmetric sequence: x[n]=-x*[n] If x[n] is real, then it is an even sequence

45 Classification of Sequences Based on Symmetry
Conjugate-antisymmetric sequence: x[n]=-x*[-n] If x[n] is real, then it is an odd sequence

46 Classification of Sequences Based on Symmetry
It follows from the definition that for a conjugate-symmetric sequence {x[n]}, x[0] must be a real number Likewise, it follows from the definition that for a conjugate anti-symmetric sequence {y[n]}, y[0] must be an imaginary number From the above, it also follows that for an odd sequence {w[n]}, w[0]=0

47 Classification of Sequences Based on Symmetry
Any complex sequence can be expressed as a sum of its conjugate-symmetric part and its conjugate-antisymmetric part: x[n]=xcs[n]+ xca[n] where xcs[n]=1/2(x[n]+x*[-n]) xca[n]=1/2(x[n]-x*[-n])

48 Classification of Sequences Based on Symmetry
Example – Consider the length-7 sequence defined for -3≤n≤3 Its conjugate sequence is then given The time-reversed version of the above

49 Classification of Sequences Based on Symmetry
Therefore Likewise It can be easily verified that and

50 Classification of Sequences Based on Symmetry
Any real sequence can be expressed as a sum of its even part and its odd part: x[n]=xev[n]+ xod[n] where xev[n]=1/2(x[n]+x[-n]) xod[n]=1/2(x[n]-x[-n])

51 Classification of Sequences Based on Symmetry
A length-N sequence x[n], 0≤n≤N-1, can be expressed as x[n]=xpcs[n]+ xpca[n] where xpcs[n]=1/2(x[n]+x*[<-n>N]), 0≤n≤N-1, is the periodic conjugate-symmetric part and xpca[n]=1/2(x[n]-x*[<-n>N]), 0≤n≤N-1, is the periodic conjugate-antisymmetric part

52 Classification of Sequences Based on Symmetry
For a real sequence, the periodic conjugate- symmetric part, is a real sequence and is called the periodic even part xpe[n] For a real sequence, the periodic conjugate- antisymmetric part, is a real sequence and is called the periodic odd part xpo[n]

53 Classification of Sequences Based on Symmetry
A length-N sequence x[n] is called a periodic conjugate-symmetric sequence, if x[n]=x*[<-n>N ]=x*[<N-n>N ] and is called a periodic conjugate-antisymmetric sequence if x [n]=-x*[<-n>N])=- x*[<N-n>N ]

54 Classification of Sequences Based on Symmetry
A finite-length real periodic conjugate- symmetric sequence is called a symmetric sequence A finite-length real periodic conjugate- antisymmetric sequence is called a antisymmetric sequence

55 Classification of Sequences Based on Symmetry
Example - Consider the length-4 sequence defined for 0≤n≤3: {u[n]}={1+j4, -2+j3, 4-j2, -5-j6} Its conjugate sequence is given by {u*[n]}={1-j4, -2-j3, 4+j2, -5+j6} To determine the modulo-4 time-reversed version {u*[<-n>4]} observe the following:

56 Classification of Sequences Based on Symmetry
u*[<-0>4]=u*[0]=1-j4 u*[<-1>4]=u*[3]=5+j6 u*[<-2>4]=u*[2]=4+j2 u*[<-3>4]=u*[1]=-2-j3 Hence {u*[<-n>4]}={1-j4, -5+j6, 4+j2, -2-j3}

57 Classification of Sequences Based on Symmetry
Therefore {upcs[n]}=1/2(u[n]+u*[<-n>4]) ={1, -3.5+j4.5, 4, -3.5-j4.5} Likewise {upca[n]}=1/2(u[n]-u*[<-n>4]) ={j4, 1.5-j1.5, -2, -1.5-j1.5}

58 Classification of Sequences Based on Symmetry
A sequence satisfying is called a periodic sequence with a period N where N is a positive integer and k is any integer Smallest value of N satisfying is called the fundamental period

59 §2.2.3 Classification of Sequences based on periodicity
Example – A sequence satisfying the periodicity condition is called an periodic sequence

60 §2.2.4 Classification of Sequences Energy and Power Signals
Total energy of a sequence x[n] is defined by An infinite length sequence with finite sample values may or may not have finite energy A finite length sequence with finite sample values has finite energy

61 §2.2.4 Classification of Sequences Energy and Power Signals
The average power of an aperiodic sequence is defined by Define the energy of a sequence x[n] over a finite interval -K n  K as

62 §2.2.4 Classification of Sequences Energy and Power Signals
Then The average power of a periodic sequence with a period N is given by The average power of an infinite-length sequence may be finite

63 §2.2.4 Classification of Sequences Energy and Power Signals
Example –Consider the causal sequence defined by Note: x[n] has infinite energy Its average power is given by

64 §2.2.4 Classification of Sequences Energy and Power Signals
An infinite energy signal with finite average power is called a power signal Example - A periodic sequence which has a finite average power but infinite energy A finite energy signal with zero average power is called an energy signal Example - A finite-length sequence which has finite energy but zero average power

65 Other Types of Classiffications
A sequence x[n] is said to be bounded if Example - The sequence x[n]=cos(0.3n) is a bounded sequence as

66 Other Types of Classiffications
A sequence x[n] is said to be absolutely summable if Example - The sequence is an absolutely summable sequence as

67 Other Types of Classiffications
A sequence x[n] is said to be square-summable if Example - The sequence is square-summable but not absolutely summable

68 §2.3 Basic Sequences Unit sample sequence - Unit step sequence -

69 §2.3 Basic Sequences Real sinusoidal sequence - x[n]=Acos(0n+)
where A is the amplitude, 0 is the angular frequency, and  is the phase of x[n] Example -

70 §2.3 Basic Sequences Exponential sequence -
where A and  are real or complex numbers If we write then we can express where

71 §2.3 Basic Sequences xre[n] and xim[n] of a complex exponential sequence are real sinusoidal sequences with constant (0=0), growing (0>0) , and decaying (0<0) amplitudes for n > 0 Real part Imaginary part

72 §2.3 Basic Sequences Real exponential sequence -
x[n]=An, -< n <  where A and a are real numbers =1.2 =0.9

73 §2.3 Basic Sequences Sinusoidal sequence Acos(0n + ) and complex exponential sequence Bexp(j0n) are periodic sequences of period N if 0N=2r where N and r are positive integers Smallest value of N satisfying 0N=2r is the fundamental period of the sequence To verify the above fact, consider x1[n]= Acos(0n + ) x2[n]= Acos(0 ( n+N) + )

74 §2.3 Basic Sequences Now x2[n]= cos(0 ( n+N) + )
= cos(0n+)cos0N - sin(0n+)sin0N which will be equal to cos(0n+)=x1[n] only if sin0N= 0 and cos0N = 1 These two conditions are met if and only if 0N= 2r or 2/0 = N/r

75 §2.3 Basic Sequences If 2/0 is a noninteger rational number, then the period will be a multiple of 2/0 Otherwise, the sequence is aperiodic Example is an aperiodic sequence

76 §2.3 Basic Sequences Here 0=0 Hence period N=2r/0=20 for r=0

77 §2.3 Basic Sequences 0 = 0.1 Here 0=0.1 Hence N=2r/0=20 for r=1

78 §2.3 Basic Sequences Property 1 - Consider x[n]=exp(j1n) and y[n]=exp(j2n) with 0≤ 1< and k≤ 2<2(k +1) where k is any positive integer If 2= 1+2k, then x[n]= y[n] Thus, x[n] and y[n] are indistinguishable

79 §2.3 Basic Sequences Property 2 - The frequency of oscillation of Acos(0n) increases as 0 increases from 0 to  ,and then decreases as 0 increases from  to 2 Thus, frequencies in the neighborhood of =0 are called low frequencies, whereas, frequencies in the neighborhood of =  are called high frequences

80 §2.3 Basic Sequences Because of Property 1, a frequency 0 in the neighborhood =2k is indistinguishable from a frequency 0-2k in the neighborhood of ω=0 and a frequency 0 in the neighborhood of =(2k+1) is indistinguishable from a frequency 0- (2k+1) in the neighborhood of ω=π

81 §2.3 Basic Sequences Frequencies in the neighborhood of ω=2πk are usually called low frequencies Frequencies in the neighborhood of ω=π(2k+1) are usually called high frequencies v1[n]=cos(0.1πn)= cos(0.9πn) is a low frequency signal v2[n]=cos(0.8πn)= cos(1.2πn) is a high frequency signal

82 §2.3 Basic Sequences An arbitrary sequence can be represented in the time-domain as a weighted sum of some basic sequence and its delayed (advanced) versions

83 §2.4 The Sampling Process Often, a discrete-time sequence x[n] is developed by uniformly sampling a continuous-time signal xa(t) as indicated below The relation between the two signals is x[n] =xa(t)|t=nT=xa (nT), n=…, -2, -1, 0, 1, 2, …

84 §2.4 The Sampling Process Time variable t of xa(t) is related to the time variable n of x[n] only at discrete-time instants tn given by with FT=1/T denoting the sampling frequency and T= 2πFT denoting the sampling angular frequency

85 §2.4 The Sampling Process Consider the continuous-time signal
The corresponding discrete-time signal is where is the normalized digital angular frequency of x[n]

86 §2.4 The Sampling Process If the unit of sampling period T is in seconds The unit of normalized digital angular frequency 0 is radians/sample The unit of normalized analog angular frequency 0 is radians/second The unit of analog frequency f0 is hertz (Hz)

87 §2.4 The Sampling Process The three continuous-time signals
of frequencies 3Hz, 7Hz, and 13Hz, are sampled at a sampling rate of 10Hz, i.e. with T = 0.1 sec. generating the three sequences

88 §2.4 The Sampling Process Plots of these sequences (shown with circles) and their parent time functions are shown below: Note that each sequence has exactly the same sample value for any given n

89 §2.4 The Sampling Process This fact can also be verified by observing that As a result, all three sequences are identical and it is difficult to associate a unique continuous-time function with each of these sequences

90 §2.4 The Sampling Process The above phenomenon of a continuous-time signal of higher frequency acquiring the identity of a sinusoidal sequence of lower frequency after sampling is called aliasing

91 §2.4 The Sampling Process Since there are an infinite number of continuous-time signals that can lead to the same sequence when sampled periodically, additional conditions need to imposed so that the sequence {x[n]}={xa[nT]} can uniquely represent the parent continuous-time signal xa(t) In this case, xa(t) can be fully recovered from {x[n]}

92 §2.4 The Sampling Process Example - Determine the discrete-time signal v[n] obtained by uniformly sampling at a sampling rate of 200Hz the continuous- time signal Note: va(t) is composed of 5 sinusoidal signals of frequencies 30Hz, 150Hz, 170Hz, 250Hz and 330Hz

93 §2.4 The Sampling Process The sampling period is T=1/200=0.005 sec
The generated discrete-time signal v[n] is thus given by

94 §2.4 The Sampling Process Note: v[n] is composed of 3 discrete-time sinusoidal signals of normalized angular frequencies: 0.3π, 0.5π, and 0.7π

95 §2.4 The Sampling Process Note: An identical discrete-time signal is also generated by uniformly sampling at a 200-Hz sampling rate the following continuous-time signals:

96 §2.4 The Sampling Process Recall 0=20/T
Thus if T>20, then the corresponding normalized digital angular frequency 0 of the discrete-time signal obtained by sampling the parent continuous-time sinusoidal signal will be in the range -<< Conclusion: No aliasing

97 §2.4 The Sampling Process On the other hand, if T < 20 , the normalized digital angular frequency will foldover into a lower digital frequency 0=(20/T)2 in the range -<< because of aliasing Hence, to prevent aliasing, the sampling frequency T should be greater than 2 times the frequency 0 of the sinusoidal signal being sampled

98 §2.4 The Sampling Process Generalization: Consider an arbitrary continuous-time signal xa(t) composed of a weighted sum of a number of sinusoidal signals xa(t) can be represented uniquely by its sampled version {x[n]} if the sampling frequency T is chosen to be greater than 2 times the highest frequency contained in xa(t)

99 §2.4 The Sampling Process The condition to be satisfied by the sampling frequency to prevent aliasing is called the sampling theorem A formal proof of this theorem will be presented later

100 §2.5 Discrete-Time Systems
A discrete-time system processes a given input sequence x[n] to generates an output sequence y[n] with more desirable properties In most applications, the discrete-time system is a single-input, single-output system: x[n] y[n] Input sequence Output sequence Discrete-Time System

101 Discrete-Time Systems:Examples
2-input, 1-output discrete-time systems - Modulator, adder 1-input, 1-output discrete-time systems - Multiplier, unit delay, unit advance

102 Discrete-Time Systems:Examples
Accumulator : The output y[n] at time instant n is the sum of the input sample x[n] at time instant n and the previous output y[n-1] at time instant n which is the sum of all previous input sample values from - to n-1 The system accumulatively adds, i.e., it accumulates all input sample values

103 Discrete-Time Systems:Examples
Accumulator - Input-output relation can also be written in the form The second form is used for a causal input sequence, in which case y[-1] is called the initial condition

104 Discrete-Time Systems:Examples
M-point moving-average system – Used in smoothing random variations in data In most applications, the data x[n] is a bounded sequence M-point average y[n] is also a bounded sequence

105 Discrete-Time Systems:Examples
If there is no bias in the measurements, an improved estimate of the noisy data is obtained by simply increasing M A direct implementation of the M-point moving average system requires M−1 additions, 1 division, and storage of M−1 past input data samples A more efficient implementation is developed next

106 Discrete-Time Systems:Examples
Hence

107 Discrete-Time Systems:Examples
Computation of the modified M-point moving average system using the recursive equation now requires 2 additions and 1 division An application: Consider x[n] = s[n] + d[n], where s[n] is the signal corrupted by a noise d[n]

108 Discrete-Time Systems:Examples
s[n]=2[n(0.9)n], d[n]-random signal

109 Discrete-Time Systems:Examples
Exponentially Weighted Running Average Filter Computation of the running average requires only 2 additions, 1 multiplication and storage of the previous running average Does not require storage of past input data samples

110 Discrete-Time Systems:Examples
For 0<α<1, the exponentially weighted average filter places more emphasis on current data samples and less emphasis on past data samples as illustrated below

111 Discrete-Time Systems:Examples
Linear interpolation - Employed to estimate sample values between pairs of adjacent sample values of a discrete-time sequence Factor-of-4 interpolation

112 Discrete-Time Systems:Examples
Factor-of-2 interpolator – Factor-of-3 interpolator –

113 Discrete-Time Systems:Examples
Factor-of-2 interpolator –

114 Discrete-Time Systems:Examples
Median Filter – The median of a set of (2K+1) numbers is the number such that K numbers from the set have values greater than this number and the other K numbers have values smaller Median can be determined by rank-ordering the numbers in the set by their values and choosing the number at the middle

115 Discrete-Time Systems:Examples
Median Filter – Example: Consider the set of numbers {2, -3, 10, 5, -1} Rank-order set is given by {-3, -1, 2, 5, 10} Hence, Med{2, -3, 10, 5, -1}=2

116 Discrete-Time Systems:Examples
Median Filter – Implemented by sliding a window of odd length over the input sequence {x[n]} one sample at a time Output y[n] at instant n is the median value of the samples inside the window centered at n

117 Discrete-Time Systems:Examples
Median Filter – Finds applications in removing additive random noise, which shows up as sudden large errors in the corrupted signal Usually used for the smoothing of signals corrupted by impulse noise

118 Discrete-Time Systems:Examples
Median Filtering Example –

119 §2.5 Discrete-Time Systems: Classification
Linear System Shift-Invariant System Causal System Stable System Passive and Lossless Systems

120 §2.5.1 Linear Discrete-Time Systems
Definition - If y1[n] is the output due to an input x1[n] and y2[n] is the output due to an input x2[n] then for an input x[n] =αx1[n] +βx2[n] the output is given by y[n] =αy1[n] +βy2[n] Above property must hold for any arbitrary constants α and β and for all possible inputs x1[n] and x2[n]

121 §2.5.1 Linear Discrete-Time Systems
Accumulator – For an input the output is Hence, the above system is linear

122 §2.5.1 Linear Discrete-Time Systems
The outputs y1[n] and y2[n] for inputs x1[n] and x2[n] are given by The output y[n] for an input αx1[n]+βx2[n] is given by

123 §2.5.1 Linear Discrete-Time Systems
Now Now if Thus

124 §2.5.1 Linear Discrete-Time Systems
For the causal accumulator to be linear the condition y[-1]=αy1[-1]+βy2[-1] must hold for all initial conditions y[-1], y1[-1], y2[-1], and all constants α and β This condition cannot be satisfied unless the accumulator is initially at rest with zero initial condition For nonzero initial condition, the system is nonlinear

125 Nonlinear Discrete-Time Systems
The median filter described earlier is a nonlinear discrete-time system To show this, consider a median filter with a window of length 3 Output of the filter for an input {x1[n]}={3, 4, 5}, 0≤n≤2 is {y1[n]}={3, 4, 4}, 0≤n≤2

126 Nonlinear Discrete-Time Systems
Output for an input {x2[n]}={2, -1, -1}, 0≤n≤2 is {y2[n]}={0, -1, -1}, 0≤n≤2 However, the output for an input {x[n]}={x1[n]+ x2[n]} {y[n]}={3, 4, 3}

127 Nonlinear Discrete-Time Systems
Note {y1[n]+y2[n]}={3, 3, 3}≠{y [n]} Hence, the median filter is a nonlinear discrete-time system

128 §2.5.1 Shift-Invariant System
For a shift-invariant system, if y1[n] is the response to an input x1[n] , then the response to an input x[n]=x1[n-n0] is simply y[n]=y1[n-n0] where n0 is any positive or negative integer The above relation must hold for any arbitrary input and its corresponding output The above property is called time-invariance property, or shift-invariant proterty

129 §2.5.1 Shift-Invariant System
In the case of sequences and systems with indices n related to discrete instants of time, the above property is called time-invariance property Time-invariance property ensures that for a specified input, the output is independent of the time the input is being applied

130 §2.5.1 Shift-Invariant System
Example - Consider the up-sampler with an input-output relation given by For an input x1[n]=x[n-n0] the output x1,u[n] is given by

131 §2.5.1 Shift-Invariant System
However from the definition of the up-sampler Hence, the up-sampler is a time-varying system

132 §2.5.2 Linear Time-Invariant system
Linear Time-Invariant (LTI) System - A system satisfying both the linearity and the time-invariance property LTI systems are mathematically easy to analyze and characterize, and consequently, easy to design Highly useful signal processing algorithms have been developed utilizing this class of systems over the last several decades

133 Causal System In a causal system, the n0-th output sample y[n0] depends only on input samples x[n] for n≤n0 and does not depend on input samples for n>n0 Let y1[n] and y2[n] be the responses of a causal discrete-time system to the inputs x1[n] and x2[n], respectively

134 Causal System Then x1[n]= x2[n] for n<N implies also that
y1[n]= y2[n] for n<N For a causal system, changes in output samples do not precede changes in the input samples

135 Causal System Examples of causal systems:
y[n]=α1x[n]+α2x[n-1]+α3x[n-2]+α4x[n-3] y[n]=b0x[n]+b1x[n-1]+b2x[n-2] +a1y[n-1]+a2y[n-2] y[n]=y[n-1]+x[n] Examples of noncausal systems: y[n]=xu[n]+1/2(xu[n-1]+ xu[n+1]) y[n]=xu[n]+1/3(xu[n-1]+ xu[n+2]) + 2/3(xu[n-2]+ xu[n+1])

136 Causal System A noncausal system can be implemented as a causal system by delaying the output by an appropriate number of samples For example a causal implementation of the factor-of-2 interpolator is given by y[n]=xu[n-1]+1/2(xu[n-2]+ xu[n])

137 Stable System There are various definitions of stability
We consider here the bounded-input, bounded-output (BIBO) stability If y[n] is the response to an input x[n] and if |x[n]|≤Bx for all values of n Then |y[n]|≤By for all values of n

138 Stable System Example - The M-point moving average filter is BIBO stable: For a bounded input |x[n]|≤Bx we have

139 §2.5.3 Passive and Lossless Systems
A discrete-time system is defined to be passive if, for every finite-energy input x[n], the output y[n] has, at most, the same energy, i.e. For a lossless system, the above inequality is satisfied with an equal sign for every input

140 §2.5.3 Passive and Lossless Systems
Example - Consider the discrete-time system defined by y[n]=x[n-N] with N a positive integer Its output energy is given by Hence, it is a passive system if ||  1 and is a lossless system if || =1

141 §2.5.4 Impulse and Step Responses
The response of a discrete-time system to a unit sample sequence {δ[n]} is called the unit impulse response or simply, the impulse response, and is denoted by {h[n]} The response of a discrete-time system to a unit step sequence {μ[n]} is called the unit step response or simply, the step response, and is denoted by {s[n]}

142 §2.5.4 Impulse and Step Responses
Example - The impulse response of the system y[n]=a1x[n]+a2x[n-1]+a3x[n-2]+a4x[n-3] is obtained by setting x[n]=δ[n] resulting in h[n]=a1δ[n]+a2δ[n-1]+a3δ[n-2]+a4δ[n-3] The impulse response is thus a finite-length sequence of length 4 given by {h[n]={a1, a2, a3, a4}

143 §2.5.4 Impulse and Step Responses
Example - The impulse response of the discrete-time accumulator is obtained by setting x[n] = δ[n] resulting in

144 §2.5.4 Impulse and Step Responses
Example - The impulse response {h[n]} of the factor-of-2 interpolator is obtained by setting xu[n]= [n] and is given by The impulse response is thus a finite-length sequence of length 3:

145 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Input-Output Relationship – A consequence of the linear, time-invariance property is that an LTI discrete-time system is completely characterized by its impulse response Knowing the impulse response one can compute the output of the system for any arbitrary input

146 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Let h[n] denote the impulse response of a LTI discrete-time system Compute its output y[n] for the input: As the system is linear, we can compute its outputs for each member of the input separately and add the individual outputs to determine y[n]

147 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Since the system is time-invariant

148 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Likewise, as the system is linear Hence because of the linearity property we get Likewise, as the system is linear

149 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Now, any arbitrary input sequence x[n] can be expressed as a linear combination of delayed and advanced unit sample sequences in the form The response of the LTI system to an input x[k][n-k] will be x[k]h[n-k]

150 §2.6 Time-Domain Characterization of LTI Discrete-Time System
Hence, the response y[n] to an input will be which can be alternately written as

151 §2.6.1 Convolution Sum The summation
is called the convolution sum of the sequences x[n] and h[n] and represented compactly as y[n] = x[n] h[n] *

152 §2.6.1 Convolution Sum Properties - Commutative property:
x[n] h[n] = h[n] x[n] * Associative property : (x[n] h[n]) y[n] = x[n] (h[n] y[n]) * Distributive property : x[n] (h[n] + y[n]) = x[n] h[n] + x[n] y[n] *

153 §2.6.1 Convolution Sum Interpretation -
1) Time-reverse h[k] to form h[-k] 2) Shift h[-k] to the right by n sampling periods if n > 0 or shift to the left by n sampling periods if n < 0 to form h[n-k] 3) Form the product v[k]=x[k]h[n-k] 4) Sum all samples of v[k] to develop the n-th sample of y[k] of the convolution sum

154 §2.6.1 Convolution Sum Schematic Representation -
The computation of an output sample using the convolution sum is simply a sum of products Involves fairly simple operations such as additions, multiplications, and delays

155 §2.6.1 Convolution Sum We illustrate the convolution operation for the following two sequences: Figures on the next several slides the steps involved in the computation of y[n]= x[n] h[n] *

156 §2.6.1 Convolution Sum

157 §2.6.1 Convolution Sum

158 §2.6.1 Convolution Sum

159 §2.6.1 Convolution Sum

160 §2.6.1 Convolution Sum

161 §2.6.1 Convolution Sum

162 §2.6.1 Convolution Sum

163 §2.6.1 Convolution Sum

164 §2.6.1 Convolution Sum

165 §2.6.1 Convolution Sum

166 §2.6.1 Convolution Sum

167 §2.6.1 Convolution Sum

168 Time-Domain Characterization of LTI Discrete-Time System
In practice, if either the input or the impulse response is of finite length, the convolution sum can be used to compute the output sample as it involves a finite sum of products If both the input sequence and the impulse response sequence are of finite length, the output sequence is also of finite length

169 Time-Domain Characterization of LTI Discrete-Time System
If both the input sequence and the impulse response sequence are of infinite length, convolution sum cannot be used to compute the output For systems characterized by an infinite impulse response sequence, an alternate time-domain description involving a finite sum of products will be considered

170 Time-Domain Characterization of LTI Discrete-Time System
Example - Develop the sequence y[n] generated by the convolution of the sequences x[n] and h[n] shown below

171 Time-Domain Characterization of LTI Discrete-Time System
As can be seen from the shifted time-reversed version {h[n-k]} for n<0, shown below for n =-3 , for any value of the sample index k, the k-th sample of either {x[k]} or is zero

172 Time-Domain Characterization of LTI Discrete-Time System
As a result, for n<0, the product of the k-th samples of {x[k]} and {h[n-k]} is always zero, and hence y[n] = for n < 0 Consider now the computation of y[0] The sequence {h[n-k]} is shown on the right

173 Time-Domain Characterization of LTI Discrete-Time System
The product sequence {x[k]h[-k]} is plotted below which has a single nonzero sample x[0]h[0] for k=0 Thus y[0]=x[0]x[0]=-2

174 Time-Domain Characterization of LTI Discrete-Time System
For the computation of y[1], we shift {h[-k]} to the right by one sample period to form {h[1-k]} as shown below on the left The product sequence {x[k]h[1-k]} is shown below on the right Hence, y[1]=x[0]h[1]+x[1]h[0]=-4+0=-4

175 Time-Domain Characterization of LTI Discrete-Time System
To calculate y[2], we form as shown below on the left -6 The product sequence {x[k]h[2-k]} is plotted below on the right y[2]=x[0]h[2]+x[1]h[1]+x[2]h[0]=0+0+1=1

176 Time-Domain Characterization of LTI Discrete-Time System
Continuing the process we get y[3]=x[0]h[3]+x[1]h[2]+x[2]h[1]+x[3]h[0] = =3 y[4]=x[1]h[3]+x[2]h[2]+x[3]h[1]+x[4]h[0] = =1 y[5]=x[2]h[3]+x[3]h[2]+x[4]h[1]=-1+0+6=5 y[6]=x[3]h[3]+x[4]h[2]=1+0=1 y[6]=x[4]h[3]=-3

177 Time-Domain Characterization of LTI Discrete-Time System
From the plot of {h[n-k]} for n > 7 and the plot of {x[k]} as shown below, it can be seen that there is no overlap between these two sequences As a result y[n] = 0 for n > 7

178 Time-Domain Characterization of LTI Discrete-Time System
The sequence {y[n]} generated by the convolution sum is shown below

179 Time-Domain Characterization of LTI Discrete-Time System
Note: The sum of indices of each sample product inside the convolution sum is equal to the index of the sample being generated by the convolution operation For example, the computation of y[3] in the previous example involves the products x[0]h[3], x[1]h[2], x[2]h[1], and x[3]h[0] The sum of indices in each of these products is equal to 3

180 Time-Domain Characterization of LTI Discrete-Time System
In the example considered the convolution of a sequence {x[n]} of length 5 with a sequence {h[n]} of length 4 resulted in a sequence {y[n]} of length 8 In general, if the lengths of the two sequences being convolved are M and N, then the sequence generated by the convolution is of length M+N-1

181 Tabular Method of Convolution Sum Computation
Can be used to convolve two finite-length sequences Consider the convolution of {g[n]}, 0≤n≤3, with {h[n]}, 0≤n≤2, generating the sequence y[n]= g[n] h[n] * Samples of {g[n]} and {h[n]} are then multiplied using the conventional multiplication method without any carry operation

182 Tabular Method of Convolution Sum Computation
The samples y[n] generated by the convolution sum are obtained by adding the entries in the column above each sample

183 Tabular Method of Convolution Sum Computation
The samples of {y[n]} are given by y[0]=g[0]h[0] y[1]=g[1]h[0]+g[0]h[1] y[2]=g[2]h[0]+g[1]h[1]+g[0]h[2] y[3]=g[3]h[0]+g[2]h[1]+g[1]h[2] y[4]=g[3]h[1]+g[2]h[2] y[5]=g[3]h[2]

184 Tabular Method of Convolution Sum Computation
The method can also be applied to convolve two finite-length two-sided sequences In this case, a decimal point is first placed to the right of the sample with the time index n = 0 for each sequence Next, convolution is computed ignoring the location of the decimal point

185 Tabular Method of Convolution Sum Computation
Finally, the decimal point is inserted according to the rules of conventional multiplication The sample immediately to the left of the decimal point is then located at the time index n = 0

186 Convolution Using MATLAB
The M-file conv implements the convolution sum of two finite-length sequences If a=[ ] b=[ ] then conv(a,b) yields [ ]

187 Simple Interconnection Schemes
Two simple interconnection schemes are: Cascade Connection Parallel Connection

188 Cascade Connection * Impulse response h[n] of the cascade of two LTI discrete-time systems with impulse responses h1[n] and h2[n] is given by y[n]= h1[n] h2[n] *

189 Cascade Connection Note: The ordering of the systems in the cascade has no effect on the overall impulse response because of the commutative property of convolution A cascade connection of two stable systems is stable A cascade connection of two passive (lossless) systems is passive (lossless)

190 Cascade Connection An application is in the development of an inverse system If the cascade connection satisfies the relation =[n] h1[n] h2[n] * then the LTI system h1[n] is said to be the inverse of h2[n] and vice-versa

191 Cascade Connection An application of the inverse system concept is in the recovery of a signal x[n] from its distorted version appearing at the output of a transmission channel If the impulse response of the channel is known, then x[n] can be recovered by designing an inverse system of the channel x[n] channel Inverse system =[n] h1[n] h2[n] *

192 Cascade Connection Example - Consider the discrete-time accumulator with an impulse response µ[n] Its inverse system satisfy the condition It follows from the above that h2[n]=0 for n<0 and

193 Cascade Connection Thus the impulse response of the inverse system of the discrete-time accumulator is given by h2[n]=[n]- [n-1] which is called a backward difference system

194 Parallel Connection Impulse response h[n] of the parallel connection of two LTI h1[n] discrete-time systems with impulse responses and h2[n] is given by h[n]=h1[n]+h2[n]

195 §2.6.2 Simple Interconnection Schemes
Consider the discrete-time system where h1[n]=[n]+0.5[n-1], h2[n]=0.5[n]-0.25[n-1], h3[n]=2[n], h4[n]=- 2(0.5)n[n]

196 §2.6.2 Simple Interconnection Schemes
Simplifying the block-diagram we obtain *

197 §2.6.2 Simple Interconnection Schemes
Overall impulse response h[n] is given by * Now, *

198 §2.6.2 Simple Interconnection Schemes
* Therefore

199 Stability Condition of an LTI Discrete-Time System
BIBO Stability Condition - A discrete- time is BIBO stable if and only if the output sequence {y[n]} remains bounded for all bounded input sequence {x[n]} An LTI discrete-time system is BIBO stable if and only if its impulse response sequence {h[n]} is absolutely summable, i.e.

200 Stability Condition of an LTI Discrete-Time System
Proof: Assume h[n] is a real sequence Since the input sequence x[n] is bounded we have Therefore

201 Stability Condition of an LTI Discrete-Time System
Thus, S < ∞ implies |y[n]|≤By < ∞ indicating that y[n] is also bounded To prove the converse, assume y[n] is bounded, i.e., |y[n]|≤By Consider the input given by

202 Stability Condition of an LTI Discrete-Time System
where sgn(c) = +1 if c > 0 and sgn(c) =-1 if c < 0 and |K| ≤ 1 Note: Since |x[n]| ≤ 1, is obviously bounded For this input, y[n] at n = 0 is Therefore, |y[n]|≤By implies S < ∞

203 Stability Condition of an LTI Discrete-Time System
Example - Consider a causal LTI discrete- time system with an impulse response h[n]=(α)nµ[n] For this system Therefore S < ∞ if |α|<1 for which the system is BIBO stable If |α|<1, the system is not BIBO stable

204 Causality Condition of an LTI Discrete-Time System
Let x1[n] and x2[n] be two input sequences with x1[n]=x2[n] for n≤n0 The corresponding output samples at n=n0 of an LTI system with an impulse response {h[n]} are then given by

205 Causality Condition of an LTI Discrete-Time System

206 Causality Condition of an LTI Discrete-Time System
If the LTI system is also causal, then y1[n0]=y2[n0] As x1[n]=x2[n] for n≤n0 This implies

207 Causality Condition of an LTI Discrete-Time System
As x1[n] ≠x2[n] for n>n0 the only way the condition will hold if both sums are equal to zero, which is satisfied if h[k] = 0 for k < 0

208 Causality Condition of an LTI Discrete-Time System
An LTI discrete-time system is causal if and only if its impulse response {h[n]} is a causal sequence Example - The discrete-time system defined by is a causal system as it has a causal impulse response

209 Causality Condition of an LTI Discrete-Time System
Example - The discrete-time accumulator defined by is a causal system as it has a causal impulse response given by

210 Causality Condition of an LTI Discrete-Time System
Example - The factor-of-2 interpolator defined by is noncausal as it has a noncausal impulse response given by

211 Causality Condition of an LTI Discrete-Time System
Note: A noncausal LTI discrete-time system with a finite-length impulse response can often be realized as a causal system by inserting an appropriate amount of delay For example, a causal version of the factor- of-2 interpolator is obtained by delaying the input by one sample period:

212 Finite-Dimensional LTI Discrete-Time Systems
An important subclass of LTI discrete-time systems is characterized by a linear constant coefficient difference equation of the form x[n] and y[n] are, respectively, the input and the output of the system {dk} and {pk} are constants aracterizing the system

213 Finite-Dimensional LTI Discrete-Time Systems
The order of the system is given by max(N,M), which is the order of the difference equation It is possible to implement an LTI system characterized by a constant coefficient difference equation as here the computation involves two finite sums of products

214 Finite-Dimensional LTI Discrete-Time Systems
If we assume the system to be causal, then the output y[n] can be recursively computed using provided d0≠0 y[n] can be computed for all n≥n0, knowing x[n] and the initial conditions y[n0-1], y[n0-2],…, y[n0-N]

215 §2.7 Classification of LTI Discrete-Time Systems
Based on Impulse Response Length - If the impulse response h[n] is of finite length, i.e., h[n]=0 for N1<n<N2 and N1<N2 then it is known as a finite impulse response (FIR) discrete-time system The convolution sum description here is

216 §2.7 Classification of LTI Discrete-Time Systems
The output y[n] of an FIR LTI discrete-time system can be computed directly from the convolution sum as it is a finite sum of products Examples of FIR LTI discrete-time systems are the moving-average system and the linear interpolators

217 §2.7 Classification of LTI Discrete-Time Systems
If the impulse response is of infinite length, then it is known as an infinite impulse response (IIR) discrete-time system The class of IIR systems we are concerned with in this course are characterized by linear constant coefficient difference equations

218 §2.7 Classification of LTI Discrete-Time Systems
Example - The discrete-time accumulator defined by y[n]=y[n-1]+x[n] is seen to be an IIR system

219 §2.7 Classification of LTI Discrete-Time Systems
Example - The familiar numerical integration formulas that are used to numerically solve integrals of the form can be shown to be characterized by linear constant coefficient difference equations, and hence, are examples of IIR systems

220 §2.7 Classification of LTI Discrete-Time Systems
If we divide the interval of integration into n equal parts of length T, then the previous integral can be rewritten as where we have set t = nT and used the notation

221 §2.7 Classification of LTI Discrete-Time Systems
Using the trapezoidal method we can write Hence, a numerical representation of the definite integral is given by

222 §2.7 Classification of LTI Discrete-Time Systems
Let y[n] = y(nT) and x[n] = x(nT) Then reduces to which is recognized as the difference equation representation of a first-order IIR discrete-time system

223 §2.7 Classification of LTI Discrete-Time Systems
Based on the Output Calculation Process Nonrecursive System - Here the output can be calculated sequentially, knowing only the present and past input samples Recursive System - Here the output computation involves past output samples in addition to the present and past input samples

224 §2.7 Classification of LTI Discrete-Time Systems
Based on the Coefficients - Real Discrete-Time System - The impulse response samples are real valued Complex Discrete-Time System - The impulse response samples are complex valued

225 §2.8 Correlation of Signals
There are applications where it is necessary to compare one reference signal with one or more signals to determine the similarity between the pair and to determine additional information based on the similarity

226 §2.8 Correlation of Signals
For example, in digital communications, a set of data symbols are represented by a set of unique discrete-time sequences If one of these sequences has been transmitted, the receiver has to determine which particular sequence has been received by comparing the received signal with every member of possible sequences from the set

227 §2.8 Correlation of Signals
Similarly, in radar and sonar applications, the received signal reflected from the target is a delayed version of the transmitted signal and by measuring the delay, one can determine the location of the target The detection problem gets more complicated in practice, as often the received signal is corrupted by additive random noise

228 §2.8 Correlation of Signals
Definitions A measure of similarity between a pair of energy signals, x[n] and y[n], is given by the cross-correlation sequence rxy [ℓ] defined by The parameter ℓ called lag, indicates the time-shift between the pair of signals

229 §2.8 Correlation of Signals
y[n] is said to be shifted by ℓ samples to the right with respect to the reference sequence x[n] for positive values of ℓ, and shifted by ℓ samples to the left for negative values of The ordering of the subscripts xy in the definition of rxy [ℓ] specifies that x[n] is the reference sequence which remains fixed in time while y[n] is being shifted with respect to x[n]

230 §2.8 Correlation of Signals
If y[n] is made the reference signal and shift x[n] with respect to y[n], then the corresponding cross-correlation sequence is given by Thus, ryx [ℓ] is obtained by time-reversing rxy [ℓ]

231 §2.8 Correlation of Signals
The autocorrelation sequence of x[n] is given by obtained by setting y[n] = x[n] in the definition of the cross-correlation sequence rxy [ℓ] Note: , the energy of the signal x[n]

232 §2.8 Correlation of Signals
From the relation ryx [ℓ]= rxy [-ℓ] it follows that rxx [ℓ]= rxx [-ℓ] implying that rxx [ℓ] is an even function for real x[n] An examination of reveals that the expression for the cross- correlation looks quite similar to that of the linear convolution

233 §2.8 Correlation of Signals
This similarity is much clearer if we rewrite the expression for the cross-correlation as * The cross-correlation of y[n] with the reference signal x[n] can be computed by processing x[n] with an LTI discrete-time system of impulse response y[−n] x[n] rxy[n] y[-n]

234 §2.8 Correlation of Signals
Likewise, the autocorrelation of x[n] can be computed by processing x[n] with an LTI discrete-time system of impulse response x[-n] x[n] rxx[n] x[-n]

235 Properties of Autocorrelation and Cross-correlation Sequences
Consider two finite-energy sequences x[n] and y[n] The energy of the combined sequence ax[n]+y[n-ℓ] is also finite and nonnegative, i.e.,

236 Properties of Autocorrelation and Cross-correlation Sequences
Thus a2 rxx[0]+2arxy[ℓ]+ryy[0]≥0 where rxx[0]=Ex>0 and ryy[0]=Ey>0 We can rewrite the equation on the previous slide as for any finite value of a

237 Properties of Autocorrelation and Cross-correlation Sequences
Or, in other words, the matrix is positive semidefinite or, equivalently,

238 Properties of Autocorrelation and Cross-correlation Sequences
The last inequality on the previous slide provides an upper bound for the cross- correlation samples If we set y[n] = x[n], then the inequality reduces to

239 Properties of Autocorrelation and Cross-correlation Sequences
Thus, at zero lag (ℓ=0), the sample valuel of the autocorrelation sequence has its maximum value Now consider the case y[n] =±bx[n-N] where N is an integer and b > 0 is an arbitrary number In this case Ey=b2Ex

240 Properties of Autocorrelation and Cross-correlation Sequences
Therefore Using the above result in we get

241 Correlation Computation Using MATLAB
The cross-correlation and autocorrelation sequences can easily be computed using MATLAB Example - Consider the two finite-length sequences x[n]=[ ] y[n]=[ ]

242 Correlation Computation Using MATLAB
The cross-correlation sequence rxy[n] computed using Program 2_7 of text is plotted below

243 Correlation Computation Using MATLAB
The autocorrelation sequence rxx[ℓ] computed using Program 2_7 is shown below Note: At zero lag, rxx[0] is the maximum

244 Correlation Computation Using MATLAB
The plot below shows the cross-correlation of x[n] and y[n]=x[n-N] for N = 4 Note: The peak of the cross-correlation is precisely the value of the delay N

245 Correlation Computation Using MATLAB
The plot below shows the autocorrelation of x[n] corrupted with an additive random noise generated using the function randn Note: The autocorrelation still exhibits a peak at zero lag

246 Correlation Computation Using MATLAB
The autocorrelation and the cross- correlation can also be computed using the function xcorr However, the correlation sequences generated using this function are the time- reversed version of those generated using Programs 2_7 and 2_8

247 Normalized Forms of Correlation
Normalized forms of autocorrelation and cross-correlation are given by They are often used for convenience in comparing and displaying Note: |ρxx [ℓ]|≤1 and |ρxy [ℓ]|≤1 independent of the range of values of x[n] and y[n]

248 Correlation Computation for Power Signals
The cross-correlation sequence for a pair of power signals, x[n] and y[n], is defined as The autocorrelation sequence of a power signal x[n] is given by

249 Correlation Computation for Periodic Signals
The cross-correlation sequence for a pair of periodic signals of period N, and is defined as The autocorrelation sequence of a periodic signal of period N is given by

250 Correlation Computation for Periodic Signals
Note: Both and are also periodic signals with a period N The periodicity property of the autocorrelation sequence can be exploited to determine the period of a periodic signal that may have been corrupted by an additive random disturbance

251 Correlation Computation for Periodic Signals
Let be a periodic signal corrupted by the random noise d[n] resulting in the signal which is observed for 0≤n≤M-1 where M>>N

252 Correlation Computation for Periodic Signals
The autocorrelation of w[n] is given by

253 Correlation Computation for Periodic Signals
In the last equation on the previous slide, is a periodic sequence with a period N and hence will have peaks at ℓ=0, N, 2N,… with the same amplitudes as ℓ approaches M As and d[n] are not correlated, samples of cross-correlation sequences and are likely to be very small relative to the amplitudes of

254 Correlation Computation for Periodic Signals
The autocorrelation rdd [ℓ] of d[n] will show a peak at ℓ=0 with other samples having rapidly decreasing amplitudes with increasing values of |ℓ| Hence, peaks of rww [ℓ] for ℓ>0 are essentially due to the peaks of and can be used to determine whether is a periodic sequence and also its period N if the peaks occur at periodic intervals

255 Correlation Computation of a Periodic Signal Using MATLAB
Example - We determine the period of the sinusoidal sequence x[n] =cos(0.25n), 0≤n≤95 corrupted by an additive uniformly distributed random noise of amplitude in the range [-0.5,0.5] Using Program 2_8 of text we arrive at the plot of rww[ℓ] shown on the next slide

256 Correlation Computation of a Periodic Signal Using MATLAB
As can be seen from the plot given above, there is a strong peak at zero lag However, there are distinct peaks at lags that are multiples of 8 indicating the period of the sinusoidal sequence to be 8 as expected

257 Correlation Computation of a Periodic Signal Using MATLAB
Figure below shows the plot of rdd[ℓ] As can be seen rdd[ℓ] shows a very strong peak at only zero lag


Download ppt "Discrete-Time Signals and Systems"

Similar presentations


Ads by Google