Lecture5 1
Lecture5 1
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
Introduction
• Conversion of signals
Sampling: Continuous-Time to Discrete-Time
Reconstruction: Discrete-Time to Continuous-Time
f0 = 440;
fs = 24*f0;
Ts = 1/fs;
sampling tmax = 1/f0;
t = 0 : Ts : tmax;
x = cos(2*pi*f0*t);
reconstruction plot(t, x);
figure;
stem(t, x);
5-4
Discrete-Time Signals
• Many signals originate in continuous time
Example: Talking on smart phone or playing live music
• Sample continuous-time signal Sampled analog waveform
at equally-spaced points in time s(t
) T
to obtain a sequence of numbers s
• Using a formula
x[n]
x[n] = – 5n + 3
n2
How does it look in continuous time?
n = 0 : 7;
x = n.^2 - 5*n + 3;
stem(n, x); n
5-5
Sampling Sinusoidal Signals
• Analog continuous-time signals
Sinusoids model physical quantities such as musical tones
Sums of sinusoids can represent general continuous-time signals
5-7
How to Pick a Sampling Rate?
• Sampling theorem fs =500 Hz
Sampling rate fs > 2 fmax
2.5x
Larger fs tracks waveform shape better oversampling
in time
fs = 5 fmax = 2.5 (2 fmax) is
2.5 times oversampling
fs =2000 Hz Cosine at
f0 =100 Hz
10x
oversampling Used 10x
oversampling
to generate
continuous-
time plot
5-8
How to Pick a Sampling Rate?
f0 = 100;
• MATLAB code tmin = -0.01; tmax = 0.02; fs =500 Hz
fs = 5*f0; Ts = 1/fs;
For previous slide wHat = 2*pi*f0/fs; 2.5x
nmin = round(tmin / Ts); oversampling
nmax = round(tmax / Ts);
fs =2000 Hz n = nmin : nmax;
x2 = cos(wHat*n);
10x figure; stem(n, x2);
oversampling xlabel('Sample Index n');
title('100-Hz Sinusoid Sampled at 500 Hz');
f0 = 100;
tmin = -0.01; tmax = 0.02; Cosine at
fs = 20*f0; Ts = 1/fs; f0 = 100;
tmin = -0.01; tmax = 0.02;
f0 =100 Hz
wHat = 2*pi*f0/fs;
nmin = round(tmin / Ts); fs = 20*f0; Ts = 1/fs; Used 10x
nmax = round(tmax / Ts); t = tmin : Ts : tmax; oversampling
n = nmin : nmax; x = cos(2*pi*f0*t);
to generate
x1 = cos(wHat*n); figure;
figure; stem(n, x1); plot(t, x); continuous-
xlabel('Sample Index n'); xlabel('Time (s)'); time plot
title('100-Hz Sinusoid Sampled at 2000 title('Continuous-Time Sinusoid at 100 Hz'); 5-9
Hz');