0% found this document useful (0 votes)
4 views

SP Slides 1

Uploaded by

tquan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

SP Slides 1

Uploaded by

tquan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Discrete-Time Signals

Continuous-Time Versus Discrete-Time Signals

Continuous-Time Signals (analog signals): x(t)


I defined for every value of t
I take on values in a continuous interval
I continuous-valued function
I example: x(t) = cos(⇡t)

Discrete-Time Signals: x(tn ) =) x(nT ) =) x[n]


I defined for only specific values of time (usually equally spaced intervals)
I still continuous-valued (as opposed to a digital signal)
I example: x[n] = cos(10n), where n is an integer
Example: Discrete-Time Signal x[n]
Perhaps sampled from a continuous-time signal, x(t):

x[n] = x(nT )

I where n is an integer, the sample index


I T is the sampling period (seconds)
I example discrete-time signal x[n]:
Basic Discrete-Time Signals

Unit Sample Sequence:


(Unit Impulse)
(
0, n 6= 0
[n] =
1, n = 0

Unit Step Sequence:


(
1, n 0
u[n] =
0, n < 0
Using Scaled and Delayed Impulses to Represent a Sequence

p[n] = a 3 [n + 3] + a1 [n 1] + a2 [n 2] + a7 [n 7]
(
0, n 6= 0
where, [n] =
1, n=0
Increasing Frequency of Discrete-Time Sinusoids

cos (0 · n)
note: same as cos (2⇡n)

cos ⇡8 n
15⇡
note: same as cos 8 n

cos ⇡4 n
7⇡
note: same as cos 4 n

cos (⇡n)
Classification of Discrete-Time Systems
Continous-Time Speech Signal and Sequence of Samples
PN
xa (t) = i=1 Ai (t) sin [2⇡Fi (t)t + ✓i (t)]

x[n] = xa (nT ), where T = 125µs


Discrete-Time System
Memoryless System versus a System With Memory

Examples of Memoryless Systems:

y[n] = ax[n]
y[n] = nx[n] + bx3 [n]

Examples of Systems with Memory:

y[n] = x[n] + 3x[n 1]


Xn
y[n] = x(n k)
k=0
1
X
y[n] = x(n k)
k=0
Linear Systems versus Nonlinear Systems

If y1 [n] and y2 [n] are the responses of a system when x1 [n] and x2 [n] are the
respective inputs, then the system is linear if and only if the additivity property
holds:
T {x1 [n] + x2 [n]} = T {x1 [n]} + T {x2 [n]} = y1 [n] + y2 [n]
and the scaling property holds:

T {ax[n]} = aT {x[n]} = ay[n]

Together, these two properties comprise the principle of superposition:

T {ax1 [n] + bx2 [n]} = aT {x1 [n]} + bT {x2 [n]}


Time-Invariant versus Time-Variant Systems

A relaxed system is time-invariant (or shift invariant) if and only if

x[n] ! y[n]

implies that
x[n k] ! y[n k]
Time-Invariant versus Time-Variant Systems

Examples of time-invariant systems:

y[n] = x[n] x[n 1]


Xn
y[n] = x[k]
k= 1

Examples of time-varying systems:

y[n] = nx[n]
y[n] = x[ n]
Causal versus Noncausal Systems

A system is causal if, for every choice of n0 , the output sequence value at the time
index n = n0 depends only on the input sequence value for n  n0 .

Example of noncausal system:

y[n] = x[n + 1] x[n]

Example of a causal system:

y[n] = x[n] x[n 1]


Stable versus Unstable Systems

The input, x[n], is bounded if there exists a fixed positive finite value Bx such that

|x[n]|  Bx < 1, for all n

Stability requires that, for every bounded input, there exists a fixed positive finite
value By such that
|y[n]|  By < 1, for all n
Stable versus Unstable Systems

Example of BIBO unstable system:


n
X
y[n] = x[k]
k= 1

Example of BIBO stable system:

y[n] = x[n + 1] x[n]


The Convolution Sum
Unit Sample Sequence (Unit Impulse)

(
0, n 6= 0
[n] =
1, n=0
Signals represented as a sum of scaled, delayed impulses

p[n] = a 3 [n + 3] + a1 [n 1] + a2 [n 2] + a7 [n 7]
Any sequence can be represented as a sum of scaled, delayed impulses:
1
X
x[n] = x[k] [n k]
k= 1
Impulse Response for LTI Systems

y[n] = T {x[n]}
( 1 )
X
= T x[k] [n k]
k= 1

Now, using the superposition principle:


1
X 1
X
y[n] = x[k]T { [n k]} = x[k]hk [n]
k= 1 k= 1

When we let hk [n] be the response of the system to the input [n k].
Response of LTI system to arbitrary inputs: the convolution sum

h(n) ⌘ T [ [n]]
Using time invariance, the response to [n k] is now h[n k]:
1
X
y[n] = x[k]h[n k], for all n
k= 1

This equation is known as the convolution sum, and we represent convolution by


the notation:
X1
y[n] = x[k]h[n k] = x[n] ⇤ h[n]
k= 1
Computing Discrete-Time Convolution
The Convolution Sum

The response y[n] of an LTI system as a function of the input signal x[n] and the
impulse response h[n] is called the convolution sum:

y[n] = x[n] ⇤ h[n]


X1
= x[k]h[n k]
k= 1
Step to Compute the Convolution Sum
Let’s find the output of the LTI system at one particular time instant n = n0 :
1
X
y[n0 ] = x[k]h[n0 k]
k= 1

1. Folding. Fold h[k] about k = 0 to obtain h[ k].


2. Shifting. Shift h[ k] by n0 to the right (left) if n0 is positive (negative) to
obtain h[n0 k]
3. Multiplication. Multiply the two sequences x[k] and h[n0 k] to obtain
x[k]h[n0 k].
4. Summation. Sum all the values of the product sequence to obtain the output
at time n = n0 .
Repeat steps 2 through 4 for all possible time shifts to find the response over all
time.
Convolution Sum Example
Example:
⇢ The impulse response of a linear time-invariant system is
h[n] = 1, 2, 1, 1 . Determine the response of the system to the input signal
⇢ "
x[n] = 1, 2, 3, 1 .
"

h[ k] = 1, 1,2, 1
"

h[ 1 k] = 1, 1, 2,1 where n0 = 1
"

x[k] =1, 2, 3, 1
"

x[k]h[ 1 k] = ..., 0, 0, 0, 1, 0, 0, 0, ...


"
1
X
y[ 1] = x[k]h[ 1 k] = 1
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 0 to find output y[0]:

x[k] =1, 2, 3, 1
"

h[0 k] = 1, 1,2, 1
"

x[k]h[0 k] = ..., 0, 0, 0,2, 2, 0, 0, ...


"

1
X
y[0] = x[k]h[0 k] = 4
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 1 to find output y[1]:

x[k] =1, 2, 3, 1
"

h[1 k] = 1,1, 2, 1
"

x[k]h[1 k] = ..., 0, 0, 0,1, 4, 3, 0, ...


"

1
X
y[1] = x[k]h[1 k] = 8
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 2 to find output y[2]:

x[k] =1, 2, 3, 1
"

h[2 k] = 1, 1, 2, 1
"

x[k]h[2 k] = ..., 0, 0, 0, 1, 2, 6, 1, 0...


"

1
X
y[2] = x[k]h[2 k] = 8
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 3 to find output y[3]:

x[k] =1, 2, 3, 1
"

h[3 k] =0, 1, 1, 2, 1
"

x[k]h[3 k] = ..., 0, 0, 0,0, 2, 3, 2, 0, 0, ...


"

1
X
y[3] = x[k]h[3 k] = 3
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 4 to find output y[4]:

x[k] =1, 2, 3, 1
"

h[4 k] =0, 0, 1, 1, 2, 1
"

x[k]h[4 k] = ..., 0, 0,0, 0, 3, 1, 0, 0, ...


"

1
X
y[4] = x[k]h[4 k] = 2
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 5 to find output y[5]:

x[k] =1, 2, 3, 1
"

h[5 k] =0, 0, 0, 1, 1, 2, 1
"

x[k]h[5 k] = ...0,0, 0, 0, 1, 0, 0, ...


"

1
X
y[5] = x[k]h[5 k] = 1
k= 1
Convolution Sum Example (Continued)

Let the shift be n0 = 6 to find output y[6]:

x[k] =1, 2, 3, 1
"

h[3 k] =0, 0, 0, 0, 1, 1, 2, 1
"

x[k]h[6 k] = ..., 0, 0, 0,0, 0, 0, , 0, 0, ...


"

1
X
y[6] = x[k]h[6 k] = 0
k= 1
Convolution Sum Example (Continued)

Putting all of these outputs together:

y[ 1] = 1
y[0] = 4
y[1] = 8
y[2] = 8
y[3] = 3
y[4] = 2
y[5] = 1

y[n] = ...0, 0, 1, 4, 8, 8, 3, 2, 1, 0, 0, ...
"
The Convolution Sum: A Commutative Operation

The convolution operation is commutative... it doesn’t matter which sequence is


folded and shifted:

y[n] = x[n] ⇤ h[n]


X1
= x[k]h[n k]
k= 1
X1
= h[k]x[n k]
k= 1
Analytical Evaluation of the Convolution Sum
Example: Determine the output of this relaxed LTI system.

h[n] = an u[n], |a| < 1 with input x[n] = u[n]

1
X
y[n] = h[k]x[n k]
k= 1
X1
= ak u[k]u[n k]
k= 1
Xn
k
= a
k=0
n+1
X 1 an+1
= ak 1
= for n > 0
1 a
k=1
Properties of Linear-Time Invariant Systems
Convolution Distributes Over Addition

x[n] ⇤ h1 [n] + h2 [n] = x[n] ⇤ h1 [n] + x[n] ⇤ h2 [n]


Two Systems Can Cascade In Either Order

Convolution satisfies the associative property:

y[n] = x[n] ⇤ h1 [n] ⇤ h2 [n] = x[n] ⇤ h1 [n] ⇤ h2 [n]

Using commutative property, order doesn’t


matter:

y[n] = x[n] ⇤ h2 [n] ⇤ h1 [n] = x[n] ⇤ h2 [n] ⇤ h1 [n]


LTI Systems Are Stable If and Only If h[n] is Absolutely Summable

LTI systems are BIBO stable if and only if output sequence y[n] is bounded for
every input x[n].

The output is bounded if the impulse response is absolutely summable and


therefore satisfies:
X1
|h[k]| < 1
k= 1
LTI Systems Are Causal if h[n] = 0 for n < 0

Let’s look at the output at time n = n0 using convolution:


1
X
y[n0 ] = h[k]x[n0 k]
k= 1
1
X X1
= h[k]x[n0 k] + h[k]x[n0 k]
k=0 k=1
= [h[0]x[n0 ] + h[1]x[n0 1] + h[2]x[n0 2] + ...]
+ [h[ 1]x[n0 + 1] + h[ 2]x[n0 + 2] + ...]

For output to depend only on the present and past inputs:

h[n] = 0, n < 0
Modified Convolution Formula for Causal Systems

Since h[n] = 0 for n < 0, we can modify the limits on the summation of the
convolution formula:

1
X
y[n] = h[k]x[n k]
k=0
Xn
= x[k]h[n k]
k= 1
Finite Impulse Response (FIR) & Infinite Impulse Response (IIR)
Systems

I FIR: Systems with a finite-duration impulse response

h[n] = 0, n < 0 and N M


M
X1
y[n] = h[k]x[n k]
k=0
I IIR: Systems with infinite-duration impulse response
1
X
y[n] = h[k]x[n k] (assuming causality)
k=0
Using Constant-Coefficient Di↵erence Equations to
Characterize LTI Systems
General Form of Linear-Constant-Coefficient Di↵erence Equations

Important class of LTI systems are those in which the input, x[n], and output,
y[n], satisfy a linear constant-coefficient di↵erence equation:
N
X M
X
ak y[n k] = bk x[n k]
k=0 k=0

N is the order of the di↵erence-equation or the order of the system.


Di↵erence Equation Example: The Accumulator

n
X
y[n] = x[k]
k= 1

Let’s show that the input and output satisfy a di↵erence equation...
n
X1
y[n] = x[n] + x[k]
k= 1

Also,
n
X1
y[n 1] = x[k]
k= 1

So, that: y[n] = x[n] + y[n 1]


or, equivalently: y[n] y[n 1] = x[n]
General Recursive System

N
X M
X
ak y[n k] = bk x[n k]
k=0 k=0

We can find the output using the recursive formula:


N
X M
X
ak bk
y[n] = y[n k] + x[n k],
a0 a0
k=1 k=0

N is the order of the di↵erence-equation or the order of the system. If system is


relaxed, or initially at rest, then the system will be linear, time-invariant, and
causal.
Nonrecursive Systems
If N = 0, no recursion is required:
M
X bk
y[n] = x[n k],
a0
k=0

This is convolution! We can find the impulse response of this system by setting the
input to an impulse, x[n] = [n]:
M ✓
X ◆
bk
h[n] = [n k]
a0
k=0

Therefore, the impulse response is


(⇣ ⌘
bk
a0 , 0nM
h[n] =
0, otherwise

Any FIR system can be computed nonrecursively.


Frequency-Domain Representation
Complex Exponentials as Eigenfunctions for LTI Systems
Let’s use a complex exponential sequence as the input:
x[n] = ej!n for 1<n<1
We can find the output using the convolution sum:
1
X
y[n] = h[k]x[n k]
k= 1
X1
= h[k]ej!(n k)

k= 1
X1
= h[k]ej!n e j!k

k= 1

y[n] = H ej! ej!n


1
X
where, H ej! = h[k]e j!k
is the frequency response
k= 1
Example: Response to Sinusoidal Input In LTI Systems

Let’s use sinusoidal signal as an input to an LTI system:


A (j!0 n+✓) A ( j!0 n ✓)
x[n] = A cos (!0 n + ✓) = e + e
2 2
Response to first complex exponential:
A (j!0 n+✓)
y1 [n] = H ej!0 e
2
Response to second complex exponential:

j!0 A ( j!0 n ✓)
y2 [n] = H e e
2
Example: Response to Sinusoidal Input In LTI Systems (Continued)

Here is the total response to a complex exponential:


A (j!0 n+✓) A (
y[n] = H ej!0 e +H e j!0
e j!0 n ✓)
2 2
If we restrict the impulse response, h[n], to be real, then H e j!0 = H ⇤ ej!0 .
Let = \H ej!0 , then H ej!0 = H ej!0 \ and
H e j!0 = H ej!0 \

Therefore, the output of an LTI system, with a real h[n], to a sinusoidal input is:

y[n] = A H ej!0 cos (!0 n + ✓ + )


Concept of Frequency Response in Discrete-Time LTI Systems

Note that the complex exponential sequence

ej!n , 1<n<1

is indistinguishable from
n o
ej(!+2⇡n) , 1<n<1

The frequency response for a discrete-time system is a periodic function of ! with


period 2⇡: ⇣ ⌘
H ej(!+2⇡k) = H ej! for k an integer
Frequency Response of Ideal Low Pass Filters
Low Frequencies: close to zero (or an even multiple of ⇡)
High Frequencies: close to ±⇡ (or an odd multiple of ⇡)
Frequency Response of Ideal Filters
Using The Discrete-Time Fourier Transform to Represent
Sequences
Discrete-Time Fourier Transform (DTFT) Pair

The Fourier transform of a finite-energy discrete-time signal x[n] is defined as


1
X
j!n
X (!) = x[n]e
n= 1

X (! + 2⇡k) = X (!)
The inverse Fourier transform is
Z ⇡
1
x[n] = X(!)ej!n d!
2⇡ ⇡
Fourier Transform is a Complex-Valued Function

In rectangular form:
X(!) = XR (!) + jXI (!)
In polar form:
X(!) = |X!)|\X(!)
(note that the phase is not unique since any integer multiple of 2⇡ can be added to
the angle at any frequency and have the same result)
Impulse Response and Frequency Response

The frequency response is the discrete-time Fourier transform of the impulse


response:
X1
H(!) = h[n]e j!n
n= 1

The impulse response of a system can be obtained by using the inverse Fourier
transform: Z ⇡
1
h[n] = H(!)ej!n d!
2⇡ ⇡
Symmetry Properties of the DTFT: Even and Odd Sequences
Conjugate-symmetric sequence: xe [n] = x⇤e [ n] (called ”even” if a real
sequence)
Conjugate-antisymmetric sequence: xo [n] = x⇤0 [ n] (called ”odd” if a real
sequence)
Any sequence can be expressed as a sum of conjugate-symmetric and
conjugate-antisymmetric sequence:

x[n] = xe [n] + xo [n]

where,
1
xe [n] = (x[n] + x⇤ [ n]) = x⇤e [ n]
2
1
xo [n] = (x[n] x⇤ [ n]) = x⇤o [ n]
2
Symmetry Properties of the DTFT: Even and Odd Functions

A Fourier transform can be decomposed into a sum of conjugate-symmetric and


conjugate-antisymmetric functions:

X(!) = Xe (!) + Xo (!)

where,
1
Xe (!) = [X(!) + X ⇤ ( !)] = Xe⇤ ( !)
2
1
Xo (!) = [X(!) X ⇤ ( !)] = Xo⇤ ( !)
2
Table for Symmetry Properties of the DTFT
Time Shifting and Frequency Shifting Theorem of the DTFT

If,
x[n] ! X(!)
then,
j!nd
x[n nd ] !e X(!) Time-Shifting Theorem
and
ej!0 n x[n] ! X(! !0 ) Frequency-Shifting Theorem
Convolution Theorem of the DTFT

If,
x[n] ! X(!)
and
h[n] ! H(!)
and
1
X
y[n] = x[k]h[n k] = x[n] ⇤ h[n] Convolution Sum in the Time Domain
1

then
Y (!) = X(!)H(!) Multiplication in the Frequency Domain
Fourier Transform Theorems and Properties
Common DTFT Pairs
Example: DTFT of a Signal
Determine the Fourier transform of the sequence

x[n] = an u[n 5]

Let’s rewrite this sequence as x[n] = a5 an 5 u[n 5]. Using a table of Fourier
transform pairs, we can find the Fourier transform of a new sequence:

a5
x1 [n] = a5 an u[n] ! X1 (!) = j!
1 ae
We can obtain the original sequence by delaying this new sequence, x1 [n], by five
samples so using the time-shifting property:

j5! a5 e j5!
X(!) = e X1 (!) =
1 ae j!
Applications of the
Discrete-Time Fourier Transform (DTFT)
Discrete-Time Fourier Transform (DTFT) Pair

The Fourier transform of a finite-energy discrete-time signal x[n] is defined as


1
X
X ej! = X (!) = x[n]e j!n

n= 1

The inverse Fourier transform is


Z ⇡
1
x[n] = X(ej! )ej!n d!
2⇡ ⇡
Example: Frequency Domain Representation
Determine the magnitude and phase of the DTFT of the sequence:

x[n] = 1, 1, 1 = [n + 1] + [n] + [n 1]
"

Using the DTFT definition, we have


1
X
X(ej! ) = x[n]e j!n
= ej! + 1 + e jw

n= 1

ej✓ +e j✓
From the inverse of Euler’s formula, we know that cos ✓ = 2 . Therefore,

X(ej! ) = ej! + 1 + e jw
= 1 + 2 cos(!).
(
0, X(ej! ) > 0
|X(ej! )| = |1 + 2 cos(!)| and \X(ej! ) =
⇡, X(ej! ) < 0
Example: Frequency Domain Representation
Determine the DTFT of the following sequence:
1 n
x[n] = 2 u[n + 3]
Using the DTFT definition to evaluate:
X1
j!
X(e ) = x[n]e j!n
n= 3
1
X
1 n
= 2 e j!n
n= 3
1
X 1
X
1 j! n 1 j! m 3
= 2e let n = m 3 =) 2e
n= 3 m=0
1
X ✓ ◆m
1 j! 3 1 j! 8ej3!
= 2e e = 1 j!
2 1 2e
m=0
Example: Performing Convolution
Determine the convolution (y[n] = x1 [n] ⇤ x2 [n]) of the sequences:

x1 [n] = x2 [n] = 1, 1, 1
"
1
X
X(ej! ) = x[n]e j!n
= ej! + 1 + e jw
= 1 + 2 cos(!)
n= 1
Convolution in the frequency domain is multiplication:
X(ej! ) = X1 (ej! )X2 (ej! ) = (1 + 2 cos(!))2
= 3 + 4 cos(!) + 2 cos(2!)
= 3 + 2(ej! + e j!
) + (ej2! + e j2!
)
Taking the inverse Fourier transform yields the convolution sequence:

y[n] = 1, 2, 3, 2, 1
"
Example: Finding a Di↵erence Equation To Implement a System
Determine a di↵erence equation to implement a system with the frequency response

1 0.5e j! + e 3j!
H(ej! ) =
1 + 0.5e j! + 0.75e 2j!
Since the frequency response is:

Y (ej! ) 1 0.5e j! + e 3j!


H(ej! ) = =
X(ej! ) 1 + 0.5e j! + 0.75e 2j!
Cross-multiply to find:
⇥ ⇤ ⇥ ⇤
1 + 0.5e j! + 0.75e 2j!
Y (ej! ) = 1 0.5e j!
+e 3j!
X(ej! )

Then, take the inverse DTFT of each term to determine the di↵erence equation:

y[n] + 0.5y[n 1] + 0.75y[n 2] = x[n] 0.5x[n 1] + x[n 3]

You might also like