Sampling Basics (1B)
Copyright (c) 2009-2013 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using OpenOffice and Octave.
Measuring Rotation Rate Angular Speed (Frequency) RPM = 2 T = 2 f rpm = revolutions / minute 1 rpm = 2 rad / 1 min = 2 rad / 60 sec = 30 rad / sec 0 rad / 1 sec 0 rad / 1 sec 0 rad / sec 0 rad / sec Negative Angles 1B Sampling Basics 3
Complex Exponential I I R R t t e + j ω 0t = cos (ω 0 t) + j sin (ω 0 t) e j ω t = cos (ω 0 t) j sin (ω 0 t) e + jt = cos (t) + j sin (t) (ω 0 = 1) e jt = cos (t) j sin (t) (ω 0 = 1) 1B Sampling Basics 4
Cos(ω 0 t) Spectrum e + jt = cos (t) + j sin (t) (e + jt + e j t ) = 2cos (t) e jt = cos (t) j sin (t) I R t + A 2 e jω 0 t A 2 A 2 + A 2 e+ jω 0 t x(t) = A cos (ω 0 t) = A 2 e+ j ω 0t + A 2 e j ω 0t ω 0 +ω 0 spectrum 1B Sampling Basics 5
Sin(ω 0 t) Spectrum e + jt = cos (t) + j sin (t) (e + jt e j t ) = 2 j sin (t) I e j t = cos (t) + j sin (t ) R t ω 0 + A 2 +ω 0 + A 2 e+ jω 0 t x(t) = A sin (ω 0 t) = A 2 j e+ j ω 0 t A 2 j e j ω 0 t A 2 e jω 0 t A 2 spectrum 1B Sampling Basics 6
Angular Frequency and Sinusoid Time Domain Frequency Domain x(t) t ω 0 +ω 0 + T 0 ω 0 = 2π T 0 For 1 second For 1 second x(t) = A cos (ω 0 t) = A 2 e j ω 0t + A 2 e j ω 0t 0 rad / sec 0 rad / sec 1B Sampling Basics 7
Co-terminal Angles +ω 0 (rad / sec) 2 0 rad / sec 3 0 rad / sec 4 0 rad / sec +5 ω 0 (rad / sec) +2π/3 Negative Angles +4 π/3 +2 π +8 π/3 +10 π/3 Co-terminal Angles 0 rad / sec 2 0 rad / sec 3 0 rad / sec 4 0 rad / sec 5 ω 0 (rad / sec) 2π/3 4 π/3 2 π 8 π/3 10 π/3 π π 5ω 0 4 ω 0 3 ω 0 2ω 0 ω 0 +ω 0 +2ω 0 +3 ω 0 +4 ω 0 +5ω 0 + 1B Sampling Basics 8
Angular Speed and Frequency = 2 T = 2 f 1 T = f T (sec) 0.01 sec 0.1 sec 1 sec 10 sec 100 sec f (Hz) 100 Hz 10 Hz 1 Hz 0.1 Hz 0.01 Hz Frequency rad / sec 200 rad / sec 20 rad / sec 2 rad / sec 0.2 rad / sec 0.02 rad / sec Angular Speed / Radian Frequency (rad / sec) = 628 = 62.8 = 6.28 = 0.628 =0.0628 1B Sampling Basics 9
Sampling Continuous Time Signal continuous-time signals x(t) = A cos (ω 0 t) Sampling Time T s (= τ) T 0 0.5sec 1sec t Sequence Time Length T = N T s 0.125sec Sampling Frequency T s (= τ) f s = 1 T s (samples / sec) For 1 second 1 T 0 (cycles / sec) For 1 second 1 T s (samples / sec) Signal's Frequency For 1 cycle For 1 sample f 0 = 1 T 0 (cycles / sec) 1 (cycles) / T 0 (sec) 1 (samples) / T s (sec) 1B Sampling Basics 10
Discrete Time Sequence continuous-time signals x(t) = A cos (ω 0 t) Sampling Time T s (= τ) T 0 1sec 2 cycles t Sequence Time Length T = N T s Sampling Frequency T s (= τ) f s = 1 T s (samples/sec) discrete-time sequence x [0 ] x [4] x [1] x [2] x [3 ] x [5] x [6 ] x [7 ] x [8] Signal's Frequency f 0 = 1 T 0 (cycles/sec) 1sec 8 samples 1B Sampling Basics 11
Angular Frequencies in Sampling For 1 second For 1 revolution ω 0 = 2π f 0 (rad / sec) 2 π (rad ) / T 0 (sec) continuous-time signals x(t) = A cos (ω 0 t) 4 π 2 cycles, 2 revolutions 0.5sec T 0 0.5sec 1 revolution t 1sec sampling sequence For 1 second For 1 revolution ω s = 2π f s (rad /sec) 2 π (rad ) / T s (sec) 0.125sec T s (= τ) 1 revolution 16π 8 cycles, 8 revolutions, 8 samples 0.125sec 1B Sampling Basics 12
Dimensionless Sequence x [n], x [0], x [1 ], x [2], x [3], x [4], x [5], x [6 ], x [7 ], x [8 ], x [0 ] x [1] x [2] x [3 ] x [4] x [5] x [6 ] x [7 ] x [8] x [0 ] x [2] x [4] x [6 ] x [8] x [1] x [3 ] x [5] x [7 ] 0.5sec 1sec 0.25 cycle / sample the same normalized frequency the same sequence 0.5sec 0.25 cycle / sample Infinite number of continuous time signals Sampling The same discrete-time sequence 1B Sampling Basics 13
Sampling of Sinusoid Functions x t = A cos t t n T s x [n ] = x n T s = A cos n T s = A cos T s n = A cos n ω = ω T s = ω 1/T s ω = ω f s = 2π f f s Normalized to f s x t 0.25 cycle / sample Normalized Radian Frequency 0.125sec T s 0.5sec 1sec t 1B Sampling Basics 14
Normalized Radian Frequency continuous-time signals x t Sampling t n T s discrete-time sequence x [n ] = x nt s Angular Frequency ω (rad / sec) Sampling T s Normalized Radian Frequency ω = ω T s (rad / sample) Angular Speed X Sampling Time Normalized Radian Frequency can be viewed as the angular displacement of a signal during the period of its sample time T s Negative Angles folding Co-terminal Angles periodic 1B Sampling Basics 15
Normalized Radian Frequency Example x(t) = A cos (ω 0 t) 0.5sec 1sec t ω 0 = 2 π f 0 f 0 = 1 T 0 T 0 T s (= τ) 0.125sec sampling sequence continuous-time signals For 1 sample For T s second ω s = 2 π f s f s = 1 T s ω = ω T s 2 π (rad ) / T s (sec) 0.125sec ω = ω 0 T s (rad /sample) π 2 (rad ) 0.25 cycle / sample ω = ω f s Signal's relative angle position after each of T s second 1B Sampling Basics 16
Normalized Frequency Normalized Radian Frequency 2 π (rad) (cycle) f 0 f s (cycle/ sec) (sample /sec) ω 0 f s (rad / sample) ω = ω f s = 2π f f s ω = ω T s = ω 1/T s Normalized Frequency f 0 f s (cycle / sec) (sample / sec) f 0 f s (cycle / sample) 1B Sampling Basics 17
Normalized Radian Frequency (4) Consider f f s 2, + f s 2 f f s 1 2, +1 2 ω π, +π Linear Frequency f ( Hz) f s 2 0 + f s 2 + f s + ω = +π (rad /sample) Normalized Radian Frequency ω (rad / sample) ω = π (rad /sample) π 0 +π 1B Sampling Basics 18
Negative Angular Speed Example ω s = 2 π f s (rad / sec) A cos (ω 1 t) = A cos (+ ω s 2 t ) A cos (+π n) ω 1 = +π (rad ) 2 π (rad ) / T s (sec) ω i = ω i T s (rad /sample) Negative Angles A cos (ω 2 t) = A cos ( ω s 2 t) A cos ( π n) A cos (ω 3 t) = A cos (+ ω s 4 t ) A cos (+ π 2 n) A cos (ω 4 t) = A cos ( 3ω s 4 t) A cos ( 3 π 2 n) ω 2 = π (rad ) ω 3 = + π 2 (rad ) ω 4 = 3π 4 (rad ) ω 1 = +π (rad ) ω 4 = 3π 4 (rad ) ω 3 = + π 2 (rad ) ω 2 = π (rad ) 1B Sampling Basics 19
Co-terminal Angular Speed Example ω s = 2 π f s (rad / sec) A cos (ω 1 t) = A cos (+ ω s 2 t ) A cos (+π n) ω 1 = +π (rad ) 2 π (rad ) / T s (sec) ω i = ω i T s (rad /sample) Co-terminal Angles A cos (ω 2 t) = A cos (+ 3ω s 2 t) A cos (+π n) A cos (ω 3 t) = A cos (+ ω s 4 t ) A cos (+ π 2 n) A cos (ω 4 t) = A cos (+ 5ω s 4 t) A cos (+ π 2 n) ω 2 = +π (rad ) ω 3 = + π 2 (rad ) ω 4 = + π 2 (rad ) +π (rad ) +3π (rad ) + 3ω s 2 = + ω s 2 + ω s + 5ω s 4 = + ω s 4 + ω s + π 2 (rad ) + 5π 2 (rad ) 1B Sampling Basics 20
Co-terminal Angles (1) For 1 sample For T s second 2 π (rad ) / T s (sec) ω = ω T s (rad / sample) ω = ω T s (rad / sample) = ω / f s (rad / sample) f 0 f 0 + f s f 0 +2 f s ω 0 = 2 π f 0 ω 1 = 2 π( f 0 + f s ) ω 2 = 2 π( f 0 +2 f s ) ω 0 (rad / sample) ω 0 +2π (rad / sample) ω 0 +4 π (rad / sample) cos(ω 0 t) cos(ω 1 t ) cos(ω 2 t) ω (rad / sec) 3 ω s 2ω s ω s +ω s +2ω s +3 ω s + cos( ω 0 n) = cos( ω 1 n) = cos( ω 2 n) ω (rad / sample) 6 π 4 π 2π +2π +4 π +6 π 1B Sampling Basics 21
Co-terminal Angles (2) For 1 sample For T s second 2 π (rad ) / T s (sec) ω = ω T s (rad / sample) ω = ω T s (rad / sample) = ω / f s (rad / sample) f 0 f 0 + f s f 0 +2 f s ω 0 = 2 π f 0 ω 1 = 2 π( f 0 + f s ) ω 2 = 2 π( f 0 +2 f s ) ω 0 (rad / sample) ω 0 +2π (rad / sample) ω 0 +4 π (rad / sample) Co-terminal Angles The same angular positions after each sample time. 1B Sampling Basics 22
Positive & Negative Angles (1) + Positive Normalized Rad Freq ω p ω n ω p ω n = 2 π ω p = 2 π + ω n + Negative Normalized Rad Freq ω n = ω p 2 π + f s 2 < f 1 < f s Normalized Radian Frequency Positive Angle +π < ω 1 < 2 π ω 1 2 π ω (rad / sample) ω 1 Negative Angle π < ω 1 2π < 0 π 0 +π +2 π ω 1 1B Sampling Basics 23
Positive & Negative Angles (2) Positive Normalized Rad Freq + ω n ω p ω p ω n = 2 π ω p = 2 π + ω n + Negative Normalized Rad Freq ω n = ω p 2 π + f s < f 2 < f s 2 Normalized Radian Frequency ω 2 Negative Angle 2π < ω 2 < π ω 2 ω 2 +2 π ω (rad / sample) Positive Angle 0 < 2π + ω 2 < π π 0 +π +2 π 1B Sampling Basics 24
Periodic and Folding Co-terminal Angles Periodic ω (rad / sample) 6 π 4 π 2π +2π +4 π +6 π ω (rad / sample) 5π 3 π π +π +3 π +5π +7 π Negative Angles Folding ω (rad / sample) 6 π 4 π 2π +2π +4 π +6 π ω (rad / sample) 6 π 4 π 2π +2π +4 π +6 π 1B Sampling Basics 25
1B Sampling Basics 26
1B Sampling Basics 27
References [1] http://en.wikipedia.org/ [2] J.H. McClellan, et al., Signal Processing First, Pearson Prentice Hall, 2003 [3] A graphical interpretation of the DFT and FFT, by Steve Mann