Signal & Linear System: Basil Hamed
Signal & Linear System: Basil Hamed
Basil Hamed 2
3.1 Introduction
What is a discrete-time (D-T) signal?
A discrete time signal is a sequence of numbers indexed by
integers Example: x[n] n = …, -3, -2, -1, 0, 1, 2, 3, …
Basil Hamed 3
3.1 Introduction
D-T systems allow us to process information in much more
amazing ways than C-T systems!
In this case the D-T signal y[n] is related to the C-T signal y(t) by:
T is “sampling interval”
Basil Hamed 4
3.1 Introduction
• Discrete-time signal is basically a sequence of numbers.
They may also arise as a result of sampling CT time
signals.
• Systems whose inputs and outputs are DT signals are
called digital system.
• x[n], n—integer, time varies discretely
Basil Hamed 5
3.1 Introduction
A function, e.g. sin(t) in continuous-time or
sin(2 p n / 10) in discrete-time, useful in analysis
A sequence of numbers, e.g. {1,2,3,2,1} which is a sampled
triangle function, useful in simulation
Basil Hamed 6
Size of a discrete-time signal
Power and Energy of Signals
• Energy signals: all x ϵ S with finite energy, i.e.
Basil Hamed 7
3.2 Useful Signal Operations
Three possible time transformations:
• Time Shifting
• Time Scaling
• Time Reversal
Basil Hamed 8
3.2 Useful Signal Operations
Time
Shift
Delay or shift by integer k:
Definition: y[n] = x[n - k]
Interpretation:
• k 0 graph of x[n] shifted by k units to the right
• k < 0 graph of x[n] shifted by k units to the left
Basil Hamed 9
3.2 Useful Signal Operations
Time Shift
Signal x[n ± 1] represents instant shifted version of
x[n]
Find f[k-5]
Basil Hamed 10
3.2 Useful Signal Operations
Time- Reversal (Flip)
Graphical interpretation: mirror image about origin
Basil Hamed 11
3.2 Useful Signal Operations
Time- Reversal (Flip)
Signal x[-n] represents flip version of x[n]
Find f[-k]
Basil Hamed 12
3.2 Useful Signal Operations
Time-scale
Basil Hamed 13
3.3 Some Useful Discrete-time Signal Models
Combined
Operations
Ex; 2
Find a) x[2-n] b) x[3n-4]
Solution
a) x[2 n] {1, 3,2,2,1,3}
b)
Basil Hamed 14
3.3 Some Useful Discrete-time Signal Models
Much of what we learned about C-T signals carries over to D-T signals
Discrete-Time Impulse Function δ[n]
d[n]
Basil Hamed 15
3.3 Some Useful Discrete-time Signal Models
u[n-k]=
Basil Hamed 16
3.3 Some Useful Discrete-time Signal Models
Discrete-Time Unit ramp Function r[n]
n ,n 0
r[n]=
0 ,n 0
Basil Hamed 17
3.3 Some Useful Discrete-time Signal Models
D-T Sinusoids
X[n]=Acos (Ω n+ θ)
Ω is in radians/sample
Basil Hamed 18
3.4 Classification of DT Systems
o Linear Systems
o Time-invariance Systems
o Causal Systems
o Memory Systems
o Stable Systems
Linear Systems:
A (DT) system is linear if it has the superposition property:
If x1[n] →y1[n] and x2[n] →y2[n]
then ax1[n] + bx2[n] → ay1[n] + by2[n]
Example: Are the following system linear?
y[n]=nx[n]
Basil Hamed 19
3.4 Classification of DT Systems
Basil Hamed 20
3.4 Classification of DT Systems
Time-Invariance
A system is time-invariant if a delay (or a time-shift) in the
input signal causes the same amount of delay (or time-
shift) in the output signal
If x[n] →y[n]
then x[n -n0] →y[n -n0]
x[n] = x1[n-n0] y[n] = y1[n-n0]
y[n]=nx[n]
Basil Hamed 21
3.4 Classification of DT Systems
Basil Hamed 22
3.4 Classification of DT Systems
Causal
System
A system is causal if the output does not anticipate future values
of the input, i.e., if the output at any time depends only on values
of the input up to that time.
A system x[n] →y[n] is causal if
When x1[n] →y1[n] x2[n] →y2[n]
And x1[n] = x2[n] for all n≤ no
Then y1[n] = y2[n] for all n≤ no
Causal: y[n] only depends on values x[k] for k n.
Ex. Check if the following system is Causal: y[n]=nx[n]
System is causal because it does not depend on future
Basil Hamed 23
3.4 Classification of DT Systems
Memoryless (or static) Systems: System output y[n]
depends only on the input at instant n, i.e. y[n] is a
function of x[n].
Memory (or dynamic) Systems: System output y[n]
depends on input at past or future of the instant n
Basil Hamed 24
3.5 DT System Equations:
Difference Equations:
• We saw that Differential Equations model C-T systems…
• D-T systems are “modeled” by Difference Equations.
A general Nth order Difference Equations looks like this:
The difference between these two index values is the “order” of the
difference eq. Here we have: n–(n –N) =N Basil Hamed 25
3.5 DT System Equations:
Difference equations can be written in two forms:
Basil Hamed 26
3.5 DT System Equations:
Sometimes differential equations will be
presented as unit advances rather than delays
y[n+2] – 5 y[n+1] + 6 y[n] = 3 x[n+1] + 5 x[n]
Basil Hamed 27
3.5 DT System Equations:
Solving Difference Equations
Although Difference Equations are quite different from
Differential Equations, the methods for solving them are
remarkably similar.
Basil Hamed 29
3.5 DT System Equations:
Now…isolating the y[n] term gives the “Recursive Form”:
Basil Hamed 30
3.5 DT System Equations:
Note: sometimes it is necessary to re-index a difference equation using
n+k →n to get this form…as shown below.
Basil Hamed 31
3.5 DT System Equations:
So here we need to subtract 2 from each sample argument:
y[n]-1.5y[n -1] +y[n-2]= 2x[n-2]
Basil Hamed 32
3.5 DT System Equations:
Recursive Form:
y[n]=1.5y[n -1] -y[n-2]+ 2x[n-2]
Basil Hamed 33
3.5 DT System Equations:
Ex 3.9 P. 273
y[n+2]-y[n +1] +0.24y[n]= x[n+2]-2x[n+1]
y[-1]=2, y[-2]=1, and causal input x[n]=n
Solution
y[n]=y[n -1] -0.24y[n-2]+ x[n]-2x[n-1]
y[0]=y[-1] -0.24y[-2]+ x[0]-2x[-1]= 2-0.24= 1.76
y[1]=y[0] -0.24y[-1]+ x[1]-2x[0]= 1.76 – 0.24(2)+ 1- 0= 2.28
:
:
Basil Hamed 34
Convolution
Our Interest: Finding the output of LTI systems (D-T & C-T
cases)
x[n].
Basil Hamed 36
3.8 System Response to External Input:
(Zero State Response)
h [ 𝑛 − 𝑘 ]= ¿
U[k]u[n-k]=1 0<k<n
=0 k<0
Basil Hamed 38
3.8 System Response to External Input:
(Zero State Response)
From Section B7-4 P49
OR
“Geometric Sum”
Basil Hamed 39
3.8 System Response to External Input:
(Zero State Response)
Example
Determine y (n) as the convolution of h (n)
and x (n), where
1 n
x ( n) ( ) u ( n 3)
4
1 n
h( n) ( ) u ( n 5)
3
Basil Hamed 40
3.8 System Response to External Input:
(Zero State Response)
Basil Hamed 41
3.8 System Response to External Input:
(Zero State Response)
27
𝑦 [ 𝑛 ] =( )¿
16
Basil Hamed 42
3.8 System Response to External Input:
(Zero State Response)
Basil Hamed 43
3.8 System Response to External Input:
(Zero State Response)
Graphical procedure for the convolution:
Basil Hamed 44
3.8 System Response to External Input:
(Zero State Response)
Example of Graphical Convolution
Find y[n]=x[n]*h[n]
for all integer values of n
So..what we know so far is that:
Basil Hamed 45
3.8 System Response to External Input:
(Zero State Response)
Solution
• For this problem I choose to flip x[n]
• My personal preference is to flip the shorter signal although I
sometimes don’t follow that “rule”…only through lots of
practice can you learn how to best choose which one to flip.
Basil Hamed 46
3.8 System Response to External Input:
(Zero State Response)
“Commutativity” says
we can flip either x[k]
or h[k] and get the same
answer…
Here I flipped x[k]
Basil Hamed 47
3.8 System Response to External Input:
(Zero State Response)
We want a solution for n = …-2, -1, 0, 1, 2, …so must do Steps
3&4 for all n. But…let’s first do: Steps 3&4 for n= 0 and then
proceed from there.
Step 3: For n= 0, shift by n to get x[n-k]
For n= 0 case there
is no shift!
x[0 -k] = x[-k]
Step 4: For n= 0, Form the product x[k]h[n–k] and sum its elements to give y[n]
Step 4: For n= 1, Form the product x[k]h[n–k] and sum its elements to give y[n]
Step 4: For n= 2, Form the product x[k]h[n–k] and sum its elements to give y[n]
Step 4: For n= 6, Form the product x[k]h[n–k] and sum its elements to give y[n]
Step 4: For n > 6, Form the product x[k]h[n–k] and sum its elements to give y[n]
Basil Hamed 53
3.8 System Response to External Input:
(Zero State Response)
BIG PICTURE: So…what we have just done is found the
zero-state output of a system having an impulse response
given by this h[n] when the input is given by this x[n]:
Basil Hamed 54
3.8 System Response to External Input:
(Zero State Response)
EX: given x[n], and h[n], find y[n]
Basil Hamed 55
3.8 System Response to External Input:
(Zero State Response)
y[n]={1,2,-2,-3,1,1}
Basil Hamed 56
3.8 System Response to External Input:
(Zero State Response)
Exercises : given the following systems Find y[n]
i. x[n]={-2,-1,0,1,2}, h[n]={-1,0,1,2}
Solution: 𝛿 [ 𝑛 ]
Basil Hamed 58
3.8-2 Interconnected Systems
𝛿 [𝑛]
Basil Hamed
59
Comparison of Discrete convolution and
Difference Eq.
1. Difference Eq. require less computation than convolution
2. Difference Eq. require less memory
3. Convolutions describe only zero-state responses. (IC=0)
Basil Hamed 61
3.10 System Stability
I. = = which is finite if <1, System is stable
Basil Hamed 62
3.10 System Stability
Basil Hamed 63