Sei sulla pagina 1di 51

Signal Processing

Lecture 02: Discrete Time Signals and Systems

Ahmet Taha Koru, Ph. D.

Yildiz Technical University

2017-2018 Fall

ATK (YTU) Signal Processing 2017-2018 Fall 1 / 51


Discrete Time Signals

Discrete Time Signals

ATK (YTU) Signal Processing 2017-2018 Fall 2 / 51


Discrete Time Signals

Impulse

Impulse (unit-sample) is the sequence defined as



0, n 6= 0
δ[n] =
1, n = 0

δ[n]
1

Figure: Impulse function.

ATK (YTU) Signal Processing 2017-2018 Fall 3 / 51


Discrete Time Signals

An arbitrary signal as sum of impulses (1/3)

Let us consider a signal with following values:

x[−3] = 2, x[0] = 4
x[1] = −1, x[4] = 3

x[n]
4
3
2
n
-1

Figure: An arbitrary sequence.

ATK (YTU) Signal Processing 2017-2018 Fall 4 / 51


Discrete Time Signals

An arbitrary signal as sum of impulses (2/3)

The sequence in the figure can be represented as

x[n] = 2δ[n + 3] + 4δ[n] − δ[n − 1] + 3δ[n − 4].

x[n]
4
3
2
n
-1

Figure: An arbitrary sequence.

ATK (YTU) Signal Processing 2017-2018 Fall 5 / 51


Discrete Time Signals

An arbitrary signal as sum of impulses (3/3)

More generally, any sequence can be expressed as



X
x[n] = x[k]δ[n − k]
k=−∞

ATK (YTU) Signal Processing 2017-2018 Fall 6 / 51


Discrete Time Signals

Unit step

Unit step is the sequence defined as



0, n < 0
u[n] =
1, n ≥ 0

u[n]
1 ...
n

Figure: Unit step function.

ATK (YTU) Signal Processing 2017-2018 Fall 7 / 51


Discrete Time Signals

Unit step as sum of impulses


Unit step can be represented as sum of impulses as follows:

u[n] = δ[n] + δ[n − 1] + δ[n − 2] + δ[n − 3] + . . .


X∞
= δ[n − k]
k=0

u[n]
1 ...
n

Figure: Unit step function.

ATK (YTU) Signal Processing 2017-2018 Fall 8 / 51


Discrete Time Signals

Unit step as sum of impulses


Unit step can be represented as sum of impulses as follows:

u[n] = δ[n] + δ[n − 1] + δ[n − 2] + δ[n − 3] + . . .


X∞
= δ[n − k]
k=0

u[n]
1 ...
n

Figure: Unit step function.

ATK (YTU) Signal Processing 2017-2018 Fall 9 / 51


Discrete Time Signals

Different representations of unit step and impulse

δ[n]

Impulse: δ[n] = u[n] − u[n − 1] u[n]


...
n
n
X
Step: u[n] = δ[k]
k=−∞
−u[n − 1] n

...

ATK (YTU) Signal Processing 2017-2018 Fall 10 / 51


Discrete Time Signals

Exponential sequence

The sequence is in the form

x[n] = Aαn

If α < 0 → alternating (+/-) If |α| < 1 → decreasing


If α > 0 → not alternating If |α| > 1 → increasing

x1 [n] x2 [n]
n n

α = 1.15 α = −0.85

ATK (YTU) Signal Processing 2017-2018 Fall 11 / 51


Discrete Time Signals

Discrete-time sinusoids

Discrete-time sinusoid is described as

x[n] = A cos(ωn + θ) = A cos(2πfn + θ)

cos(π/8n)
n

ATK (YTU) Signal Processing 2017-2018 Fall 12 / 51


Discrete Time Signals

Discrete-time sinusoids: Period

The signal periodic only if f is a rational number.


k k
f = , ω = 2π , k, N ∈ Z
N N
k
If f = where common factors are canceled, then the period is N.
N

cos(2π 34 n)
n

ATK (YTU) Signal Processing 2017-2018 Fall 13 / 51


Discrete Time Signals

Discrete-time sinusoids: Aliases

Discrete-time sinusoids whose frequencies are separated by an integer


of 2π are identical.

cos(ωn) = cos([ω + 2πr ] n), ∀r ∈ Z

Any sinusoid with |ω| > π is identical to a sinusoid with |ω| ≤ π.


Sinusoids whose |ω| > π are called aliases (copies).

cos(− 34 πn) cos( 54 πn)


n n

ATK (YTU) Signal Processing 2017-2018 Fall 14 / 51


Discrete Time Signals

Discrete-time sinusoids: Highest rate of oscillation

Highest rate of oscillation is attained when ω = π (or ω = −π).

cos(πn)
n
−8 −4 4 8

ATK (YTU) Signal Processing 2017-2018 Fall 15 / 51


Discrete Time Signals

Complex exponentials

Complex exponential sequence is


described by x[2] Im
k
x[n] = A · e jωn = A · e j2π N n x[3] x[1]

whose elements are complex x[4] x[0] Re


numbers.
x[5] x[7]

x[6]
The period and aliases are similar to
sinusoids.

ATK (YTU) Signal Processing 2017-2018 Fall 16 / 51


Discrete Time Systems

Discrete Time Systems

ATK (YTU) Signal Processing 2017-2018 Fall 17 / 51


Discrete Time Systems Examples

Discrete Time Systems: Examples

ATK (YTU) Signal Processing 2017-2018 Fall 18 / 51


Discrete Time Systems Examples

What is a discrete-time system?

A discrete-time system is defined as a transformation (operator) that maps


an input sequence x[n] into an output sequence y [n].

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

x[n] T (·) y [n]

Figure: Representation of a discrete-system in a block diagram

ATK (YTU) Signal Processing 2017-2018 Fall 19 / 51


Discrete Time Systems Examples

Discrete-time system example I: The Ideal Delay


The ideal delay system is defined by the equation
y [n] = x[n − nd ], −∞ < n < ∞.

x[n]

x[n − 1]

ATK (YTU) Signal Processing 2017-2018 Fall 20 / 51


Discrete Time Systems Examples

Discrete-time system example II: Moving Average (1/3)

The general moving-average system is defined by the equation


M2
1 X
y [n] = x[n − k]
M1 + M2 + 1
k=−M1

1
= (x[n + M1 ] + x[n + M1 − 1] + · · · + x[n]
M1 + M2 + 1
+ · · · + x[n − M2 − 1] + x[n − M2 ])

nth sample of the output sequence is average of (M1 + M2 + 1) samples


around nth sample of input sequence.

ATK (YTU) Signal Processing 2017-2018 Fall 21 / 51


Discrete Time Systems Examples

Discrete-time system example II: Moving Average (2/3)

What is the output of a zero-mean noise signal w [n]?

w [n]
n

y [n]
n

ATK (YTU) Signal Processing 2017-2018 Fall 22 / 51


Discrete Time Systems Examples

Discrete-time system example II: Moving Average (2/3)

What is the output of a zero-mean noise signal w [n]?

w [n]
n

y [n]
n

ATK (YTU) Signal Processing 2017-2018 Fall 23 / 51


Discrete Time Systems Examples

Discrete-time system example II: Moving Average (3/3)

Output of noisy sensor signals

x1 [n] x2 [n]

n
n

y1 [n] y2 [n]

n
n

ATK (YTU) Signal Processing 2017-2018 Fall 24 / 51


Discrete Time Systems Classification

Discrete Time Systems: Classification

ATK (YTU) Signal Processing 2017-2018 Fall 25 / 51


Discrete Time Systems Classification

Why classification matters?

To determine which special mathematical tools can be used to


design/analyze the system
Ex: Linear Time-invariant (LTI) System → Fourier/z-domain analysis

To reach required information from academic literature or online


resources. Example Google searches:
”Stability analysis” → Too general, may not be applicable
”Stability analysis for LTI Time-Delay Systems” → Application specific

ATK (YTU) Signal Processing 2017-2018 Fall 26 / 51


Discrete Time Systems Classification

Memoryless Systems (1/2)

A system is referred to as memoryless if the output y [n] at every value of


n depends only on the input x[n] at the same value of n.
ONLY current value of the input x[n]
NO past values
NO future values

Example
The discrete-time system described as

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

is a memoryless system.

ATK (YTU) Signal Processing 2017-2018 Fall 27 / 51


Discrete Time Systems Classification

Memoryless System (2/2)

System Expression Memoryless

Ideal Delay y [n] = x[n − nd ]

1
Moving Average
PM2
y [n] = x[n − k]
M1 + M2 + 1 k=−M1

ATK (YTU) Signal Processing 2017-2018 Fall 28 / 51


Discrete Time Systems Classification

Memoryless System (2/2)

System Expression Memoryless

Ideal Delay y [n] = x[n − nd ] NO

1
Moving Average NO
PM2
y [n] = x[n − k]
M1 + M2 + 1 k=−M1

ATK (YTU) Signal Processing 2017-2018 Fall 29 / 51


Discrete Time Systems Classification

Linear Systems

Definition
A system T (·) is linear if and only if following properties hold:
Additivity:

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

Homogeneity:

T (αx[n]) = αT (x[n]) = αy [n]

Combining two properties yields super-position:

T (αx1 [n] + βx2 [n]) = αT (x1 [n]) + βT (x2 [n])

ATK (YTU) Signal Processing 2017-2018 Fall 30 / 51


Discrete Time Systems Classification

Linear System Example: The Accumulator


The system, with following input-output relationship, is linear.
n
X
y [n] = x[k]
k=−∞

Proof.
For x3 [k] = αx1 [k] + βx2 [k] super-position property holds:
n
X
y3 [k] = (αx1 [k] + βx2 [k])
k=−∞
n
X n
X
= (αx1 [k]) + (βx2 [k])
k=−∞ k=−∞
n
X n
X
=α x1 [k] + β x2 [k] = αy1 [k] + βy2 [k]
k=−∞ k=−∞

ATK (YTU) Signal Processing 2017-2018 Fall 31 / 51


Discrete Time Systems Classification

Non-linear System Example: Logarithm

The system, with following input-output relationship, is non-linear.

y [n] = log10 (|x[n]|)

Proof.
A counter-example violating super-position property is x1 [n] = 1 and
x2 [n] = 10. For x3 [n] = x1 [n] + x2 [n],

log10 (10 + 1) = log10 (11) 6= log10 (10) + log10 (1) = 1

ATK (YTU) Signal Processing 2017-2018 Fall 32 / 51


Discrete Time Systems Classification

Other Linearity Examples

System Expression Linearity

Ideal Delay y [n] = x[n − nd ]

1
Moving Average
PM2
y [n] = x[n − k]
M1 + M2 + 1 k=−M1

ATK (YTU) Signal Processing 2017-2018 Fall 33 / 51


Discrete Time Systems Classification

Other Linearity Examples

System Expression Linearity

Ideal Delay y [n] = x[n − nd ] YES

1
Moving Average YES
PM2
y [n] = x[n − k]
M1 + M2 + 1 k=−M1

ATK (YTU) Signal Processing 2017-2018 Fall 34 / 51


Discrete Time Systems Classification

Time-invariant Systems

Definition
The systems, for which a time shift or delay of the input sequence causes a
corresponding shift in the output sequence, are called time-invariant
systems.

If the system is time-invariant, the output is y2 [n] = y1 [n − nd ] for the


input x2 [n] = x1 [n − nd ] for arbitrary nd .

ATK (YTU) Signal Processing 2017-2018 Fall 35 / 51


Discrete Time Systems Classification

A time-invariant system example: Accumulator (1/2)

The accumulator system is time-invariant.

Proof.
For x2 [n] = x1 [n − nd ]
n
X n
X
y2 [n] = x2 [k] = x1 [k − nd ]
k=−∞ k=−∞

Change the variable k as k1 = k − nd


n−n
Xd
y2 [n] = x1 [k1 ] = y1 [n − nd ]
k1 =−∞

ATK (YTU) Signal Processing 2017-2018 Fall 36 / 51


Discrete Time Systems Classification

A time-invariant system example: Accumulator (2/2)

x1 [n] x2 [n]

n n

y1 [n] y2 [n]

n n

Figure: The simulation of the system illustrates the time-invariant property

ATK (YTU) Signal Processing 2017-2018 Fall 37 / 51


Discrete Time Systems Classification

Not a time-invariant system example: Compressor (1/2)

The system is defined by the relation

y [n] = x[Mn], −∞ < n < ∞, M ∈ Z+

The system is not time-invariant.


Proof.
Consider y1 [n] = x1 [Mn]. For x2 [n] = x1 [n − nd ],

y2 [n] = x2 [Mn] = x1 [Mn − nd ]

which is not equal to delayed version of output y1

y2 [n] 6= y1 [n − nd ] = x1 [M(n − nd )]

ATK (YTU) Signal Processing 2017-2018 Fall 38 / 51


Discrete Time Systems Classification

Not a time-invariant system example: Compressor (2/2)

x1 [n] x2 [n] = x1 [n − 1]

n n

y1 [n] y2 [n] 6= y1 [n − 1]

n n

Figure: The simulation for M = 3. System is not time-invariant.

ATK (YTU) Signal Processing 2017-2018 Fall 39 / 51


Discrete Time Systems Classification

Causal Systems

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

The output depends


ONLY current and past values of the input
NOT depends on the future values of the input

ATK (YTU) Signal Processing 2017-2018 Fall 40 / 51


Discrete Time Systems Classification

Causality Examples

Example
The backward difference system

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

is causal.

Example
The forward difference system

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

is not causal since output depends on a future value of input.

ATK (YTU) Signal Processing 2017-2018 Fall 41 / 51


Discrete Time Systems Classification

Stable Systems

Definition
A system is bounded-input bounded-output (BIBO) stable if and only if
every bounded input sequence produces a bounded output sequence.

For any bounded input

|x[n]| ≤ Bx < ∞, ∀n,

the system is BIBO stable if and only if

|y [n]| ≤ By < ∞, ∀n.

ATK (YTU) Signal Processing 2017-2018 Fall 42 / 51


Discrete Time Systems Classification

Stable system example

The system
y [n] = x[n]2
is BIBO stable since for any |x[n]| ≤ Bx ,

|y [n]| = |x[n]2 | ≤ Bx2 .

ATK (YTU) Signal Processing 2017-2018 Fall 43 / 51


Discrete Time Systems Classification

Unstable system example: The Accumulator System (1/2)

The accumulator system


n
X
y [n] = x[k]
k=−∞

is not BIBO stable. For x[n] = u[n],



0, n<0
y [n] =
n + 1, n ≥ 0

There is no upper bound of the accumulator system output for the step
input.

ATK (YTU) Signal Processing 2017-2018 Fall 44 / 51


Discrete Time Systems Classification

Unstable system example: The Accumulator System (2/2)

w [n]

n
5 10

y [n]

n
5 10

Figure: Unstable behaviour of the accumulator system.

ATK (YTU) Signal Processing 2017-2018 Fall 45 / 51


Quiz

Quiz

ATK (YTU) Signal Processing 2017-2018 Fall 46 / 51


Quiz

1 Is the system
y [n] = max x[k].
k∈[−∞,n]

linear? Prove or disprove.

2 Under what conditions, the moving-average system


M2
1 X
y [n] = x[n − k]
1 + M1 + M2
k=−M1

is causal?

3 Is the moving-average system is BIBO stable? Prove.

ATK (YTU) Signal Processing 2017-2018 Fall 47 / 51


Quiz

Problem 1 Solution
Let x1 [n] = δ[n] and x2 [n] = −δ[n]. Then, y1 [n] = u[n] and y2 [n] = 0.
For x3 [n] = x1 [n] + x2 [n] = 0, the output is

y3 [n] = 0 6= y1 [n] + y2 [n] = u[n].

Superposition does not hold for the system, hence it is not linear.

δ[n] −δ[n] x3 [n]


n n n

+
y1 [n] y2 [n] y3 [n]
n n n

ATK (YTU) Signal Processing 2017-2018 Fall 48 / 51


Quiz

Problem 2: Solution

The moving average system is


M2
1 X
y [n] = x[n − k]
1 + M1 + M2
k=−M1
1
= (x[n + M1 ] + · · · + x[n] + . . . x[n − M2 ]).
1 + M1 + M2
System is causal when M2 ≥ 0 and M1 ≤ 0.

ATK (YTU) Signal Processing 2017-2018 Fall 49 / 51


Quiz

Problem 3: Solution (1/2)


For inputs satisfying
|x[n]| ≤ Bx , ∀n (1)


M2
1 X
|y [n]| = x[n − k]
1 + M1 + M2 k=−M1

M2
1 X
= x[n − k]
1 + M1 + M2
k=−M1

From triangle inequality property of absolute value (|a + b| ≤ |a| + |b|),


M2
1 X
|y [n]| ≤ |x[n − k]| ,
1 + M1 + M2
k=−M1

ATK (YTU) Signal Processing 2017-2018 Fall 50 / 51


Quiz

Problem 3: Solution (1/2)

and from (1)

1
|y [n]| ≤ · (1 + M1 + M2 )Bx
1 + M1 + M2
As a result, if |x[n]| ≤ Bx , then |y [n]| ≤ Bx . System is BIBO stable.

ATK (YTU) Signal Processing 2017-2018 Fall 51 / 51

Potrebbero piacerti anche