DISCRETE-TIME SYSTEMS
A system is a transformation of signals
A system is an input-output relationship
x n T y n
A SISO system
1
Ex: A delay system 𝑦[𝑛] = 𝑥 [𝑛 − Δ]
2
Ex:
𝑦[𝑛] = 𝑎𝑥 [𝑛] + 𝑏𝑥 [𝑛 − 1]
1 sample
𝑥[𝑛] delay
a b
+ 𝑦[𝑛]
This is a linear, time-invariant, finite impulse response (FIR) system.
In general, an LTI, FIR system
𝑁2
𝑦[𝑛] = ∑ 𝑎𝑘 𝑥 [𝑛 − 𝑘]
𝑁1
3
Ex:
𝑦[𝑛] = 𝑎𝑦[𝑛 − 1] + 𝑥 [𝑛]
This is a recursive expression.
𝑥[𝑛] + 𝑦[𝑛]
1 sample
delay
This is a linear, time-invariant, infinite impulse response (IIR) system.
Equivalently its nonrecursive form is,
𝑛
𝑦 [𝑛 ] = ∑ 𝑥 [𝑘 ]
𝑘=−∞
Note that not all recursive expressions have their nonrecursive counterparts.
4
CLASSIFICATION OF SYSTEMS
With memory - memoryless
Linear - nonlinear
Time-invariant – time-varying
Causal-noncausal
Stable-unstable
A Quotation from a Recent Research Paper:
“Null Space Component Analysis for Noisy Blind Source
Separation”
“The solutions for the BSS problem were investigated under
various source signal mixing models. Initially, linear
instantaneous (memoryless) mixing models were used [3],
followed by linear convolution mixing models [4]. More
recently, nonlinear mixing models [5, 6, 7], bounded component
analysis [8, 9], and the sparsity-based approach [10, 11] have
been exploited.”
5
WITH MEMORY - MEMORYLESS
𝑦 [𝑛 ] = 𝑥 [𝑛 ]
𝑦[𝑛] = 3𝑥 [𝑛]
𝑦[𝑛] = 4𝑥[𝑛]
are memoryless
whereas
𝑦 [ 𝑛 ] = 𝑥 [ 𝑛 − 1]
𝑦 [ 𝑛 ] = 𝑥 [ 𝑛 + 1]
𝑦 [ 𝑛 ] = 𝑥 [ 𝑛 ] + 𝑥 [ 𝑛 − 1]
have memory
You have heard or you will hear about “dynamic systems”; they have memory.
6
LINEARITY
A system, 𝑇{∙}, is said to be linear if it satisfies
a) additivity: 𝑇{𝑥1 [𝑛] + 𝑥2 [𝑛]} = 𝑇{𝑥1 [𝑛]} + 𝑇{𝑥2 [𝑛]}
b) homogeneity: 𝑇{𝑎𝑥 [𝑛]} = 𝑎𝑇{𝑥 [𝑛]}
7
Ex:
𝑦[𝑛] = ∑𝑛𝑘=−∞ 𝑥 [𝑘] is linear
𝑦[𝑛] = log(|𝑥 [𝑛]|) is nonlinear
𝑦 [𝑛 ] = 𝑥 [𝑛 ] + 3 is nonlinear
Proof: Exercise
8
TIME-INVARIANCE
Let 𝑦1 [𝑛] = 𝑇{𝑥[𝑛]} and 𝑦2 [𝑛] = 𝑇{𝑥 [𝑛 − 𝑁0 ]} be the outputs of the system to
𝑥 [𝑛] and 𝑥 [𝑛 − 𝑁0 ], respectively.
Then, if 𝑦2 [𝑛] = 𝑦1 [𝑛 − 𝑁0 ] the system is said to be time-invariant.
9
Ex: Compressor (downsampler!)
𝑦[𝑛] = 𝑥 [𝑀𝑛] 𝑀 ∈ 𝑍, 𝑀 > 1
𝑥 [𝑛 ] ↓M 𝑦 [𝑛 ]
Is it time-invariant?
10
Before answering the question, let’s see what a compressor is.
Compressor
x[n]
3
2
… 1
…
-2 -1 0 1 2 3 4
n
x[2n]
2
… … M=2
-2 -1 0 1 2 3 4
n
11
Is it time-invariant?
Answer:
Following the above definition, let
𝑦1 [𝑛] = 𝑥 [𝑀𝑛]
𝑦2 [𝑛] = 𝑥 [𝑀𝑛 − 𝑁0 ]
Since
𝑦2 [𝑛] ≠ 𝑦1 [𝑛 − 𝑁0 ] = 𝑥 [𝑀𝑛 − 𝑀𝑁0 ]
compressor is time-varying.
12
Compressor is time-varying:
x[n]
3
2
… 1
…
-2 -1 0 1 2 3 4
n
x[3n]
3
2
… 1
… M=3
”
-2 -1 0 1 2 3 4
n
x[3n-1]
3
2
… 1
… The response to 𝑥[𝑛 − 1]
” when M = 3
-2 -1 0 1 2 3 4
n
x[3(n-1)]
3
2
… 1
… 𝑥[3𝑛] delayed by 1 sample
”
n
-2 -1 0 1 2 3 4
13
clear all
close all
k = 0:10;
a = (-1).^k
aa = upsample(a,2)
x = [0 aa 0] %input
n = 0:length(x)-1;
stem(n,x)
xlabel('n, sample index')
ylabel('x[n]')
title('input')
x_1 = circshift(x,[0,1]) % input delayed by one sample
figure
n = 0:length(x_1)-1;
stem(n,x_1)
xlabel('n, sample index')
ylabel('x[n-1]')
title('input delayed by one sample')
y = downsample(x,2)
figure
n = 0:length(y)-1;
stem(n,y)
xlabel('n, sample index')
ylabel('y[n]')
title('response to x[n]')
yy = downsample(x_1,2)
figure
n = 0:length(yy)-1;
stem(n,yy)
xlabel('n, sample index')
ylabel('z[n]\neq y[n-1]')
title('response to x[n-1]')
14
Show that it is linear! (exercise)
15
Ex: Expander (upsampler!)
𝑛
𝑥[ ] 𝑛 = 𝑘𝐿
𝑦 [𝑛 ] = { 𝐿 𝐿 ∈ 𝑍, 𝐿>1
0 𝑛 ≠ 𝑘𝐿
𝑥 [𝑛 ] ↑L 𝑦 [𝑛 ]
16
Is it time-invariant?
𝑛
𝑥[ ] 𝑛 = 𝑘𝐿
𝑦1 [𝑛] = { 𝐿
0 𝑛 ≠ 𝑘𝐿
𝑛
𝑥 [ − 𝑁0 ] 𝑛 = 𝑘𝐿
𝑦2 [𝑛] = { 𝐿
0 𝑛 ≠ 𝑘𝐿
Since
𝑛 − 𝑁0
𝑥[ ] 𝑛 − 𝑁0 = 𝑘𝐿
𝑦2 [𝑛] ≠ 𝑦1 [𝑛 − 𝑁0 ] = { 𝐿
0 𝑛 − 𝑁0 ≠ 𝑘𝐿
expander is time-varying.
Show that it is linear! (exercise)
17
CAUSALITY
A system is said to be causal if the two output signals 𝑦1 [𝑛] and 𝑦2 [𝑛] (due to
two input signals 𝑥1 [𝑛] and 𝑥2 [𝑛]) satisfy
𝑦1 [𝑛] = 𝑦2 [𝑛] 𝑛 ≤ 𝑛0
whenever
𝑥1 [𝑛] = 𝑥2 [𝑛] 𝑛 ≤ 𝑛0
18
Ex:
𝑦 [ 𝑛 ] = 𝑥 [ 𝑛 + 1] − 𝑥 [ 𝑛 ] is noncausal
𝑦 [ 𝑛 ] = 𝑥 [ 𝑛 ] + 𝑥 [ 𝑛 − 1] is causal
𝑦 [𝑛 ] = 𝑥 [𝑛 ] + 5 is causal
Proof: Exercise
19
STABILITY (BIBO)
A system is said to be BIBO stable if “bounded inputs yield bounded outputs.”,
i.e.,
|𝑥 [𝑛]| ≤ 𝑏𝑥 < ∞ ⇒ |𝑦[𝑛]| ≤ 𝑏𝑦 < ∞
for arbitrary finite 𝑏𝑥 and 𝑏𝑦 .
20
Ex:
𝑦 [𝑛 ] = ∑ 𝑥 [𝑘 ]
𝑘=−∞
= 𝑦 [ 𝑛 − 1] + 𝑥 [ 𝑛 ]
UNSTABLE
𝑛+1 𝑛≥0
For example, for 𝑥 [𝑛] = 𝑢[𝑛] the output is 𝑦[𝑛] = {
0 𝑛<0
Therefore bounded input does not yield bounded output.
21
Computation of
𝑦[𝑛] = 𝑎𝑦[𝑛 − 1] + 𝑥 [𝑛]
in MATLAB.
clear all
close all
N = 1000; % signal length
a = 0.97; % system parameter
b = 1; % system parameter
k = 1:N; % discrete-time index vector
w = pi/2; % frequency of input sinuoid
% x = 2*(rand(1,N)-0.5); % random input
x = sin(w*k); % sinusoidal input
x = [x zeros(1,N)]; % zero padding (why?)
y = zeros(1,2*N); % output signal
for n = 2:2*N
y(n) = a*y(n-1)+b*x(n);
end
plot(x)
hold on
plot(y,'r')
22