0% found this document useful (0 votes)
20 views10 pages

Lecture5 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views10 pages

Lecture5 2

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Sampling and aliasing

Signals and systems

PhD. Alberth Ronal Tamo Calla


Signals and Systems Topics
Domain Topic Discrete Time Continuous Time

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)

where l is an integer • y[n] indistinguishable from x[n]

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)

where l is an integer • y[n] indistinguishable from x[n]

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

Aliases Principal Components Aliases 5-7


Ideal Reconstruction
• Sampling theorem
Possible to reconstruct continuous-time signal from samples
Does not say how to do it
• Reconstruction: Ideal case
Need a formula for signal of one or more sinusoids
y(t) = y[n] n= f t for - ¥ < n < ¥ Practical?
s

Consider y[n] = A cos(2 p f0 n Ts + f) where fs > 2 f0


y(t) = y[n] n= f t = Acos(2p f0t + f ) for -¥ < t < ¥
s
• Reconstruction: Practical case
Interpolation fills in values between samples
There are other approaches to “undo” sampling process 5-8
Discrete-to-Continuous Conversion
• Input: sequence of samples y[n] %% y[n] is sinusoid w/
%% period of 8 samples
• Output: continuous-time signal y(t) via interpolation f0 = 0.125;
(“connecting the dots”) fs = 1;
wHat = 2*pi*f0/fs;
• Example: Cosine of frequency f0 n = 0 : 8;
yofn = cos(wHat*n);
From sampling theorem, fs > 2 f0 or f0 < ½ fs
y[n] = A cos(2p f0 Ts n +f) y(t) = A cos(2p f0 t +f)
fs = 20*f0;
~ Ts = 1/fs;
t = 0 : Ts : (1/f0);
yoft = cos(2*pi*f0*t);

figure;
stem(n, yofn);
figure;
stem(n, yofn);
hold
plot(t, yoft);

5-9
Sampling– SPFirst Sec. 4-1.5

Interpolation From Tables


• Using mathematical tables of x f(x)
numeric values of functions to
0 0.0
compute a value of the function
1 1.0
• Estimate f(1.5) from table 2 4.0
Zero-order hold: take value to be f(1)
to make f(1.5) = 1.0 (“stairsteps”) 3 9.0
Linear interpolation: average values of 9
~
f ( x)
nearest two neighbors to get f(1.5) = 2.5
Curve fitting: fit four points in table to
4
polynomal a0 + a1 x + a2 x2 + a3 x3
which gives f(1.5) = x2 = 2.25 1 x
0 1 2 3

5-10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy