Digital Signal Processing
Associate Prof. Heba Afify
Linear Time-Invariant Systems
Properties of LTI Systems
• Convolution is commutative
xk hk xkhn k hkxn k hk xk
k k
x[n] h[n] y[n] h[n] x[n] y[n]
• Convolution is distributive
xk h1 k h2 k xk h1 k xk h2 k
h1[n]
x[n] h1[n]+ h2[n] y[n] x[n] + y[n]
h2[n]
Properties of LTI Systems
• Cascade connection of LTI systems
x[n] h1[n] h2[n] y[n]
x[n] h2[n] h1[n] y[n]
x[n] h1[n]h2[n] y[n]
Stable and Causal LTI Systems
• An LTI system is (BIBO) stable if and only if
• Impulse response is absolute summable
hk
k
• Let’s write the output of the system as
yn hkxn k hk xn k
k k
• If the input is bounded
x[n] Bx
• Then the output is bounded by
yn Bx hk
k
• Then, the output is bounded if the absolute sum is finite
hk 0 for k 0
• An LTI system is causal if and only if
Example:
Solution :
FIR and IIR
• Note that the impulse response for this system has finite
terms; that is, it is nonzero for only a finite time duration.
Because of this property, the system is known as a finite
impulse response (FIR) system.
• On the other hand, a system whose impulse response is
nonzero for an infinite time duration is said to be an
infinite impulse response (IIR) system.
Example:
Solution
(a)
Convolution and Digital filters
• Convolution is the most practical way of applying a digital filter. It represents the
time-domain equivalent to applying a filter in the frequency domain by multiplying
raw spectra.
• It is equivalent to weighted differencing of the input signal. The filter provides the
weighting coefficients.
y=x*h x h y
where y is the output signal, x is the input signal and h is the filter impulse response.
Correlation
• The correlation between two N-length sequences is computed as
follows:
Nm1
rhx (m) x(n m)h(n),
n 0
m0
• It calculates the similarity between two sequences.
Convolution vs. Correlation
Convolution
Correlation Nm1
rhx [m] n 0
x[n m]h[n], m 0
h[0]x[m] h[1]x[m 1] .......... h[N m 1]x[N 1]
• Comparing at zero lag (m=0) gives:
rhx [0] h[0]x[0] h[1]x[1] .......... h[N 1]x[N 1]
• They are of similar forms except that x[n] in the convolution is in the
reverse order to that in the cross-correlation.
Moving Average Filter
• To obtain a filtered signal f by two-point moving average filtering on
vector d, this means that:
f (n)=d(n)/2+d(n-1)/2.
• You may notice that f is simply the sum of two copies of d, with the
second copy delayed by one tap, and both copies scaled by one half.
• Using conv function in Matlab, we write
f=conv(d,[0.5 0.5]) d[n]
δ[n]
d[n]
d[n] d[n-1]
δ[n-1]
Moving Average Filter
• This smoothing can help reduce “noise”.
• First, let’s make a nice sinusoidal signal:
s=sin(pi/10:pi/10:10*pi)*3;
plot(s)
legend([{'clean'}]);
• Now, we contaminate the signal with some ugly Gaussian
noise
n=randn(size(s));
sn=s+n;
hold on;
plot(sn,'r')
legend([{'clean'},{'noisy'}]);
Moving Average Filter
6
clean
noisy
4
-2
-4
-6
0 20 40 60 80 100