Académique Documents
Professionnel Documents
Culture Documents
Lecture #4 DT signals
Sampled signals
Converting a CT signal into a DT signal by sampling: given xa(t) to be a CT signal, xa(nT) is the value of xa(t) at t = nT DT signal is defined only for n an integer
t -2T -T 0 T 2T 3T 4T 5T 6T 7T . . . nT
x a (t)
t nT
x a (nT)
x (n ),
Representations of DT signals
1. Functional representation
1, n 1,3 x[n ] 4, n 0, n
2. Tabular representation
n -1 0 1 2 3 4
x[n]
Representations of DT signals
3. Sequence representation
x[n]
0 ,1, 4 ,1
4
4. Graphical representation
-1
0 1
3 4 5
Lecture #4 DT signals
Unit step
u[n]
1 0
n 0 n 0
-1
0 1
3 4 5 6
u[n n 0 ]
For n0 > 0 1 1 1
1, n 0, n
n0 n0
-n0-1 n0 n0+1
u[n n 0 ]
For n0 < 0 1 1 1
-n0-1 n0 n0+1
Unit impulse
1 0 n 0 n 0
[ n]
-2
-1 0
[n n 0 ]
For n0 > 0
n0-1 n0 n0+1
[n n 0 ]
n0-1 n0 n0+1
u[n ]
k
[k ]
Sinusoidal signal
x (n ) A cos( n A cos(2 Fn ), ), n n
Exponential signal
x[n] Ca n
1. If C and a are real, then x[n] is a real exponential
a > 1 growing exponential 0 < a < 1 shrinking exponential -1 < a < 0 alternate and decay
a < -1 alternate and grows 2. If C or a or both is complex, then x[n] is a complex exponential
x[n] Ce j
0n
C cos(
n)
j sin(
n)
F0
k N
or
k N
Fundamental period
The fundamental period can be found as
k2
0
rational?
k N
# cycles # po int s
Examples
Determine which of the signals below are periodic. For the ones that are, find the fundamental period and fundamental frequency j n
x1[n] e
2 N
0
6( 2 ) 12 : fundamental period 2 N 2 12
: fundamental frequency
1 12
k N
Examples
Determine which of the signals below are periodic. For the ones that are, find the fundamental period and fundamental frequency
3 x2 [n] sin n 1 5
0
2 N 2 N
Examples
Determine which of the signals below are periodic. For the ones that are, find the fundamental period and fundamental frequency
x3[n] cos(2n
Examples
Determine which of the signals below are periodic. For the ones that are, find the fundamental period and fundamental frequency
x4 [n] cos(1.2 n)
0
2 N 2 N
1.2 2 2 5
3 5
k N
3 cycles in 5 points
5 : fundamental period
: fundamental frequency 0 because k 1
Lecture #4 DT signals
4. Classification of DT signals
- Time reversal
Transformation of amplitude:
Do it point by point
x[n]
k > 0: right-shift x[n] by |k| samples (delay of signal) k < 0: left-shift x[n] by |k| samples (advance of signal)
4 1
2 3 4 4 n
x[n-2]
1 -1 0 1 2
1 3 4 n
4 1
2 3 4 n
x[n+1]
1 -1
4 1 0 1 2 3 4 n
a must be an integer
4 1
2 3 4 n
x[2n+1]
x[2n]
1
-2
-1 0 1
-1
n 0 1 2 3
n
-1 0 1 2 3 4
Given x[n]
1
-7
-6
-5
-4
-3
-2
-1
w1[n] = x[2n]
-7
-6
-5
-4
-3
-2
-1
Given x[n]
1
-7
-6
-5
-4
-3
-2
-1
-7
-6
-5
-4
-3
-2
-1
x[n] x[-n]
4
1 2 3 4 n
x[-n]
4 1
-3 -2 -1 0 1
3 4
Method 1: Flip first, then shift Method 2: Shift first, then flip
Example Method 1
Method 1: Flip first, then shift Ex. Find y[n] = x[-n-2] = x[-(n+2)] x[n]
Flip
x[-n] = w[n]
w[n+2] = x[-(n+2)]
Advance by 2 (left shift)
Example Method 1
x[n]
-1 0
x[-n] = w[n]
-4
-3
-2
-1
-4
-3
-2
-1
Example Method 2
Method 2: Shift first, then flip Ex. Find y[n] = x[-n-2] = x[-(n+2)] x[n]
(left shift)
x[n+2] = w[m]
w[-m] = x[-(n+2)]
Flip w[m]
Advance by 2
x[n]
Example Method 2
-1 0
x[n+2] = w[m]
-2
-1
-2 0
-1 1
0 2
1 3
2 4
3 5
4 6
5 7
6 8
n m
-4
-3
-2
-1
Method 1: time scale then shift Method 2: shift then time scale Be careful!!! For some cases, method 1 or 2 doesnt work. To make sure, plug values into the table to check
Example Method 1
x[n] y[n] = x[an-b]
w[n-1] = x[-2(n-1)]
Time scale by -2
Example Method 1
x[n]
-1 0
x[-2n] = w[n]
-4
-3
-2
-1
-4
-3
-2
-1
Example Method 2
x[n] y[n] = x[an-b]
x[n-1] = w[m]
Time scale by -2
w[-2m] = x[-2(n-1)]
x[n]
4 1
Example Method 2
-1
x[n-1] = w[m]
-1 -2
0 -1
1 0
2 1
3 2
4 3
5 4
n m
-4
-3
-2
-1
Example
x[n]
1 -1 0 1
4
y[n] = x[2n-3]?? 1 2 3 4 n
n x[n] y[n]
-1 0 0
0
y[n]
-1 0 1
1
0 1 4
1
0 0 1
1
1 2
3 4 n
Exercise
Find x[n]
x[n]
1 -1
0 1
-1
2 3
4 5
Lecture #4 DT signals
1. Representations of DT signals
2. Some elementary DT signals 3. Simple manipulations of DT signals 4. Characteristics of DT signals
Characteristics of DT signals
Even xe [n] xe [ n]
And the signal xo[n] is odd if
Odd xo [n]
xo [ n]
Any DT signal can be expressed as the sum of an even signal and an odd signal:
xe [n]
xo [n]
1 2
1 2
( x[n] x[ n])
( x[n] x[ n])
How to find xe[n] and xo[n] from a given x[n]? Step 1: find x[-n]
Step 2: find
xe [n]
1 2
( x[n] x[ n])
( x[n] x[ n])
Step 3: find
xo [n]
1 2
Example
Given x[n]
1
-4
-3
-2
-1
Find x[-n]
2 1
-6
-5
-4
-3
-2
-1
Example
-4
-3
-2
-1
Find xe[n]
3/2
1
1/2 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Example
2
-4
-3
-2
-1
Find x0[n]
1
-6
-5
-4
-3
-1
-2
-1 -1/2
0
1/2 1 2 3 4 5 6 7
E
n
x[n ]
N 1 2 lim x[n ] N 2N 1 n N
Examples
Determine which of the signals below are energy signals? Which are power signals?
u[n]
1 0
n 0 n 0
E
n
x[n]
2 n 0
12
N 1 lim 12 N 2N 1 n 0
N 1 2 lim x[n] N 2N 1 n N
lim
N 1 1/ 2 0 2N 1
Examples
Determine which of the signals below are energy signals? Which are power signals? (b)
x[n ] (1 / 2) n , n 0 (2) , n 0
n n0
n
a n0 1 a
if if
|a | 1 |a | 1
E
n
x[n ] 1 2
n 1
2 n 0
(1 / 2)
n2 n
( 2) n 2
n 0
(1 / 4)n
n 1
(1 / 4)n
(1 / 4)n
1 2
1/ 4 1 1/ 4
5/ 3
Examples
Determine which of the signals below are energy signals? Which are power signals?
x[n]
0 n
[n ]
otherwise
2 2
2 [n 1] 2
2
2 [n 3] 2
E
n
x[n]
2 2
2 2
2 1 4
2 4
Lecture #5 DT systems
DT system example
A digital low pass filter:
y[n] = 1/5{x[n]+x[n-1]+x[n-2]+x[n-3]+x[n-4]}
1
Before filtering
0.5
20
40
60
80
100
120
0.8
After filtering
Interconnection of DT systems
x[n]
y[n]
Parallel connection
Interconnection of DT systems
x[n]
System1 T1{ }
System2 T2{ }
y[n]
Cascade connection
Example
1 y3[n] y2[n] 3 y4[n]
x[n]
2
y[n]
Lecture #5 DT systems
DT system properties
Memory
Invertibility Causality Stability Linearity
Time-invariance
Memory
y[n0] = f(x[n0]) system is memoryless (static) Otherwise, system has memory (dynamic), meaning that its output depends on inputs rather than just at the time of the output
Ex:
Invertibility
Invertibility
x[n]
System
Inverse system
Ti[T(x[n])] = x[n]
b) Accumulator y[n]
k n 1
x[k ] is invertible
y[n 1]
k
Causality
The output of a causal system (at each time) does not depend on future inputs
a) y[n] = x[-n]
non causal
Stability
In particular, if a well-behavior signal (all values have finite amplitude) results in infinite magnitude outputs, the system is unstable
BIBO stability: bounded input bounded output if you put finite signals in, you will get finite signals out
unstable stable
Linearity
Scaling signals and adding them, then processing through the system
same as Processing signals through system, then scaling and adding them
Time-invariance
If you time shift the input, get the same output, but with the same time shift
If T(x[n]) = y[n]
then T(x[n-n0]) = y[n-n0]
a) y[n]
nx[n]
Linear
Not time-invariant
Non-linear
Time-invariant
c) Linear
y[n]
r 0
br x[n r ]
Time-invariant
y[n]
n 1.5 y[ n ] n 2.5
c) It is causal
y[n]
n 2.5 n 1.5
100
200
300
400
500
600
700
800
900
1000
y[n]
e) Superposition linear
a1 x1[n ] a2 x2 [n ]
2
n 2.5 n 1.5
a1 x1[n ] a2 x2 [n ]
2
Lecture #6 DT convolution
1. DT convolution formula
2. DT convolution properties 3. Computing the convolution sum 4. DT LTI properties from impulse response
x[n]
k
ck xk [ n ] y k [ n] y[n]
k
xk [ n ] x[n]
ck y k [ n ]
DT convolution formula
Convolution: an operation between the input signal to a system and its impulse response, resulting in the output signal
CT systems: convolution of 2 signals involves integrating the product of the 2 signals where one of signals is flipped and shifted DT systems: convolution of 2 signals involves summing the product of the 2 signals where one of signals is flipped and shifted
x[k ] [n k ]
Example:
x[n]
-1 0 1 2 3 n x[2][n-2]
x[0][n-0]
x[1][n-1]
-1
-1
2 n
-1
[n]
Time-invariant DT system
Time-invariant DT system
h[n]
[n-k]
h[n-k]
[n-k]
LTI DT system
h[n-k]
x[n]
k
x[k ] [n k ]
LTI DT system
y[n]
k
x[k ]h[n k ]
Convolution sum
Notation: y[n] = x[n] * h[n]
The general output: y[n] = + x[-2]h[n+2] + x[-1]h[n+1] + x[0]h[n] + x[1]h[n-1] + x[2]h[n-2] + + x[n-1]h[1] + x[n]h[0] + x[n+1]h[-1] + x[n+2]h[-2]
Lecture #6 DT convolution
1. DT convolution formula
2. DT convolution properties 3. Computing the convolution sum 4. DT LTI properties from impulse response
Commutative law
Associative law
x[n]
y[n]
x[n]
h1[n]*h2[n]
y[n]
x[n]
h2[n]
h1[n]
y[n]
Distributive law
x[n]
y[n]
Lecture #6 DT convolution
1. DT convolution formula
2. DT convolution properties 3. Computing the convolution sum 4. DT LTI properties from impulse response
x[k ]h[n k ]
y[n0 ]
k
x[k ]h[n0 k ]
1. Fold h[k] about k = 0, to obtain h[-k] 2. Shift h[-k] by n0 to the right (left) if n0 is positive (negative), to obtain h[n0-k] 3. Multiply x[k] and h[n0-k] for all k, to obtain the product
x[k].h[n0-k]
4. Sum up the product for all k, to obtain y[n0] Repeat from 2-4 fof all of n
x[k ]h[n k ]
Suppose:
Length of x[k] is Nx N1 k N1 + Nx 1
Example 1
Find y[n] = x[n]*h[n] where
[n]
-1 0 1 2 3
h[n] n
-1 0 1 2 3
Ex1 (cont)
x[k]
-1 0 1 2 3
h[k]
-1 0 1 2 3 k
h[-k]
-2 -1 0 1 k
y[0] = 6;
Ex1 (cont)
x[k]
-1 0 1 2 3
h[-k]
-2 -1 0 1
h[-1-k]
-4 -3 -2 -1 0
y[-1] = 2;
Ex1 (cont)
x[k]
-1 0 1 2 3
h[-k]
-2 -1 0 1
h[1-k]
-2 -1 0 1 2
y[1] = 8;
Ex1 (cont)
x[k]
-1 0 1 2 3
h[-k]
-2 -1 0 1
h[2-k]
-2 -1 0 1 2
y[2] = 8;
Ex1 (cont)
x[k]
-1 0 1 2 3
h[-k]
-2 -1 0 1
h[3-k]
-2 -1 0 1 2
y[3] = 4;
Ex1 (cont)
x[k]
-1 0 1 2 3
h[-k]
-2 -1 0 1
h[3-k]
-2 -1 0 1 2
y[4] = 2;
Example 2
Find y[n] = x[n]*h[n] where
x[n] a nu[n]
h[n] u[n]
Try it both ways (first flip x[n] and do the convolution and then flip h[n] and do the convolution). Which method do you prefer?
Remember!
n n0
a 1 a
n0
if if
|a | 1 |a | 1
n1
a
n n0
1 a a 1 a
n0
( n1 n0 1)
Example 2
First flip x[n] and do the convolution
Factor out an to get form you know
n n
0 : y[ n ] 0
n n
y[ n ]
k 0
n k
n n 0
1 a a 1 a
n
( n 1) 1
an a 1 1 a1
Therefore
an 1 1 a 1
y[n]
an 1 1 u[n] a 1
Example 2
First flip h[n] and do the convolution
you know this form
n n
0 : y[ n ] 0
n
y[ n ]
k 0
a
y[n]
1 a 1 1 a
n 1
a 1 a 1
n 1
Therefore
an 1 1 u[n] a 1
Example 3
Find y[n] = x[n]*h[n] where x[n] = bnu[n] and h[n] = anu[n+2] |a| < 1, |b| < 1, a b
Factor out bn to get form you know
2 : y[ n ] 0
n n
y[ n ]
k
b
2
n k
n k 2
a b
a b
a b a 1 b
n 3
Therefore
y[n]
a 2bn 2 a n 1b 1 ab 1
u[n 2]
Example 4
Compute output of a system with impulse response
n n
Therefore
2 : [n ]
k 2
ak ak
k n
a2 1 a an 1 a
an u[n 3] 1 a
Varies with n
2:
y[ n ]
y[n]
a2 u[2 n] 1 a
A constant
Lecture #6 DT convolution
1. DT convolution formula
2. DT convolution properties 3. Computing the convolution sum 4. DT LTI properties from impulse response
1. Finite Impulse Response (FIR) system 2. Infinite Impulse Response (IIR) system Be one of system representations Be convolved with the input to result in the output
1 2 1 2
1
1 1 x 4 2 5 1 8 4
5 8
5 1 8 4
1 1 5 x x 4 4 8
5 1 8 4
h[n] = K[n]
Invertible system: system with h[n] is invertible if there exists another impulse response hi[n] such that
h[n]*hi[n] = [n]
y[n0 ]
k
h[k ]x[n0 k ]
k 0
h[k ]x[n0 k ]
k
Future inputs
| x[n ] | M x
Take the absolute:
| y[ n ] |
k
h[k ]x[n k ]
| y[ n ] |
k
| y[ n ] | M x
The output is bounded if the impulse response satisfies:
h[n]
n
Examples
1. Is h[n] = 0.5nu[n] BIBO stable? Causal? Stable Causal
General form:
a k y[n k ]
k 0 r 0
b r x[n r ], a 0 1
N, M: non-negative integers
N: order of equation ak, br: real constant coefficients
ak y[ n k ]
k 0 N r 0
br x[n r ], a0
M
y[ n ]
k 1
ak y[ n k ]
r 0
br x[n r ]
Solving the equation in 2 ways: 1. Solving the equation recursively, one value at a time. Need to start the iteration with initial conditions 2. Finding a formula for y[n] (a closed form)
Example 1
Solve iteratively to find the 1st 3 terms of
n
-1 0
x[n]
0 2
y[n]
10 (initial condition) y[0] = x[-1]+2y[-1] = 20
1 2
2 2
Example 2
Find the 1st 3 terms of y[n+2] y[n+1] +0.24y[n] = x[n+2] -2x[n+1]
with initial condition y[-1] = 2, y[-2] = 1, and input x[n] = nu[n]
x[n]
0 0
y[n]
1 (initial condition) 2 (initial condition)
0
1
0
1
y[2] = 1.8576
2. Find the particular response, assume all initial conditions = 0. Choose the form of the particular response same as the form of input
3. Total response = complementary + particular. Use initial conditions to find N constants from the complementary response
Example
Example (cont)
Components: branch points, summation, delays, gains, LTI systems Signals travel along lines, arrows point direction of inputs and outputs
Each component acts the same way, no matter how many components are connected to it For linear system, the order of operation does not matter
responses to obtain
x[n]
Z-1
y[n]
Z-1 -a1
b1
Z-1
b2
Z-1 -a2
bM
-aN
x[n]
Z-1
b0
y[n]
Z-1
-a1 Z-1
b1
Z-1
b2
-a2
bM
-aN
x[n]
Z-1 -a1
b0
y[n]
Z-1
b1
Z-1
-a2
Z-1
b2
-aN
bM
x[n]
Z-1 -a1
Z-1 -a2
b0
y[n]
b1
b2
Suppose
-aN
bN
M=N
HW
b) 9.15d c) 9.17a
d) 9.17b
HW
Prob.3 For the following systems: Prove or disprove that they are:
Memoryless Invertible
Causal Stable Time-invariant Linear
a) b) c) d)
y[n]
k n
x[a k ], a x(e|n| )
M 1
y[n]
x[n k ], M
HW
Prob.4
Prob.5
Prob.6
Prob.7
a) 10.1
b) 10.11
10.4
a) 10.6 a
b) 10.6 c c) 10.6 d
10.14
HW
Prob.8 Determine the response y[n] for n0 of the system described by the following equation: y[n] -0.7y[n-1] + 0.1y[n-2] = x[n] 3x[n-1] The input is x[n] = (-1)n and y[-2] = 29/9, y[-1] = 7/9
HW
9