Lecture5 2
Lecture5 2
Time Signals ✔ ✔
Systems
Convolution
Frequency Fourier series ✔ ✔
Fourier transforms
Frequency response
Generalized z / Laplace Transforms
Frequency
Transfer Functions
System Stability
Mixed Signal Sampling ➔
5-2
Aliasing
• Definition for “alias” [dictionary.com]
“a false name used to conceal one's identity; an assumed name”
• Is x2[n]=cos(2.4pn) an alias for x1[n]=cos(0.4pn)?
x2[n] = cos(2.4pn) = cos(0.4pn + 2pn) = cos(0.4pn) = x1[n]
f2 = 1.2 Hz
Sample at
fs = 1 Hz
f1 = 0.2 Hz
5-3
Aliasing
• MATLAB code from previous slide
%% Part 1: Define Signals %% Part 2: Generate Plots
wHat = 0.4*pi; figure;
nmax = 12; plot(t, x2cont, 'm-', 'LineWidth', 1);
n = 0:nmax;
x1 = cos(wHat*n); figure;
x2 = cos(2.4*pi*n); plot(t, x2cont, 'm-', 'LineWidth', 1);
hold;
fs = 1; stem(n, x1, 'Linewidth', 2, 'MarkerEdgeColor', 'black');
f1 = 0.2; stem(n, x2, 'Linewidth', 2, 'MarkerEdgeColor', 'black');
w1Hat = 2*pi*f1/fs;
period = round(fs/f1); figure;
f2 = 1.2; plot(t, x2cont, 'm-', 'LineWidth', 1);
w2Hat = 2*pi*f2/fs; hold;
Ts = 1/fs; stem(n, x1, 'Linewidth', 2, 'MarkerEdgeColor', 'black');
tmax = (nmax/period)*(1/f1); stem(n, x2, 'Linewidth', 2, 'MarkerEdgeColor', 'black');
t = 0 : (Ts/100) : tmax; plot(t, x1cont, 'b-', 'LineWidth', 2);
x1cont = cos(2*pi*f1*t);
x2cont = cos(2*pi*f2*t);
5-4
Aliasing
• Continuous-time sinusoid y[n] = y(Tsn)
= A cos(2p(f0 + lfs)Tsn + f)
x(t) = A cos(2p f0 t + f) = A cos(2pf0Tsn + 2plfsTsn + f)
= A cos(2pf0Tsn + 2pln + f)
• Sample at Ts = 1/fs = A cos(2pf0Tsn + f)
x[n] = x(Tsn) = A cos(2p f0 Ts n + f) = x[n]
Here, fsTs = 1
• Keeping the sampling period same,
sample Since l is an integer,
y(t) = A cos(2p (f0 + l fs) t + f) cos(x + 2 p l) = cos(x)
5-5
Another Kind of Aliasing (Folding)
• Continuous-time sinusoid y[n] = y(Tsn)
= A cos(2p(-f0 + lfs)Tsn + f)
x(t) = A cos(-2p f0 t + f) = A cos(-2pf0Tsn + 2plfsTsn + f)
= A cos(-2pf0Tsn + 2pln + f)
• Sample at Ts = 1/fs = A cos(-2pf0Tsn + f)
x[n] = x(Tsn) = A cos(-2p f0 Ts n + f) = x[n]
Here, fsTs = 1
• Keeping the sampling period
same, sample Since l is an integer,
y(t) = A cos(2p (-f0 + l fs) t + f) cos(x + 2 p l) = cos(x)
5-6
Spectrum of a Discrete-Time Signal
• Spectrum of a sinusoidal signal ½
( )
cos ŵ0n = 0.5 e( - jŵ0n
+e
jŵ0n
) ŵ
Frequency components at-ŵ 0 andŵ 0 -ŵ0 ŵ 0
• Example: Two of the aliases for x1[n] = cos(0.4pn)
x2[n] = cos(2.4pn) = cos(0.4pn + 2pn) = cos(0.4pn) = x1[n]
x3[n] = cos(-1.6pn) = cos(0.4pn − 2pn) = cos(0.4pn) = x1[n]
Only need to add principal frequency components for synthesis
½
ŵ
-2.4p -1.6p -0.4p 0.4p 1.6p 2.4p
figure;
stem(n, yofn);
figure;
stem(n, yofn);
hold
plot(t, yoft);
5-9
Sampling– SPFirst Sec. 4-1.5
5-10