Digital Signal Aliasing and Folding Frequencies
Copyright (c) 2009-2017 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.
Based on M.J. Roberts, Fundamentals of Signals and Systems S.K. Mitra, Digital Signal Processing : a computer-based approach 2 nd ed S.D. Stearns, Digital Signal Processing with Examples in MATLAB 3
Aliasing Condition Examples clf n = [0:1:10]; t = [0:1000]/100; y1 = 4*cos(2*pi*(1/)*n); y2 = 4*cos(2*pi*(6/)*n); yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(6/)*t); subplot(3,1,1); stem(n, y1); hold on; plot(t, yt1, 'g'); subplot(3,1,2); stem(n, y2); hold on; plot(t, yt2, 'g'); subplot(3,1,3); plot(t, yt1); hold on; plot(t, yt2); stem(n, y1, 'g'); M.J. Roberts, Fundamentals of Signals and Systems 4
Aliasing Condition Examples clf n = [0:0.:10]; t = [0:1000]/100; y1 = 4*cos(2*pi*(1/)*n); y2 = 4*cos(2*pi*(11/)*n); yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(11/)*t); subplot(3,1,1); stem(n, y1); hold on; plot(t, yt1, 'g'); subplot(3,1,2); stem(n, y2); hold on; plot(t, yt2, 'g'); subplot(3,1,3); plot(t, yt1); hold on; plot(t, yt2); stem(n, y1, 'g'); M.J. Roberts, Fundamentals of Signals and Systems
Identical Sine and Cosine Conditions θ 1 θ 2 = θ 1 +2π ω 1 t ω 2 t = 2 π π θ θ +θ 2 1 1 +θ 4 θ 2 π+θ 3 θ 3 θ 4 ω 1 t + ω 2 t = +π ω 1 t + ω 2 t = 0 ω 1 t + ω 2 t = π ω 1 t + ω 2 t = 0 sin(ω 1 t) = sin (ω 2 t ) sin(ω 1 t ) = sin(ω 2 t) sin(ω 1 t) = sin (ω 2 t ) sin(ω 1 t ) = sin(ω 2 t) cos(ω 1 t ) = cos(ω 2 t) cos(ω 1 t) = cos(ω 2 t ) cos(ω 1 t ) = cos(ω 2 t) cos(ω 1 t) = cos(ω 2 t ) 6
cos(2πf 1 t) = cos(2πf 2 t) cos(ω 1 t ) = cos(ω 2 t) ω 1 t ω 2 t = 2 n π ω 1 t + ω 2 t = 2 n π t + 1 t = n t 1 t = n 6 t = n 4 t = n 6, 10 6, 1 6, 4, 10 4, 1 4, 7
Aliasing Condition Examples 2 t + 1 t = n 2 t 1 t = n 3 t = n 1 t = n = 3 = 1 3 t + 1 t = n 3 t 1 t = n 4 t = n 2 t = n = 4 = 2 4 t + 1 t = n 4 t 1 t = n t = n 3 t = n = = 3 t + 1 t = n t 1 t = n 6 t = n 4 t = n = 6 = 4 6 t + 1 t = n 6 t 1 t = n 7 t = n t = n = 7 = 7 t + 1 t = n 7 t 1 t = n 8 t = n 6 t = n = 8 = 6 8 t + 1 t = n 8 t 1 t = n 9 t = n 7 t = n = 9 = 7 8
Aliasing Condition Examples clf t = [0:00]/100; yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(2/)*t); yt3 = 4*cos(2*pi*(3/)*t); yt4 = 4*cos(2*pi*(4/)*t); yt = 4*cos(2*pi*(/)*t); yt6 = 4*cos(2*pi*(6/)*t); yt7 = 4*cos(2*pi*(7/)*t); yt8 = 4*cos(2*pi*(8/)*t); n1 = 0: /2 : ; n2 = 0: /3 : ; n3 = 0: /4 : ; n4 = 0: / : ; n = 0: /6 : ; n6 = 0: /7 : ; n7 = 0: /8 : ; n8 = 0: /9 : ; y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); subplot(4,2,1); subplot(4,2,3); plot(t, yt2, 'b'); grid on stem(n2, y2, 'r'); subplot(4,2,); plot(t, yt3, 'b'); grid on stem(n3, y3, 'r'); subplot(4,2,7); plot(t, yt4, 'b'); grid on stem(n4, y4, 'r'); subplot(4,2,2); plot(t, yt, 'b'); grid on stem(n, y, 'r'); subplot(4,2,4); plot(t, yt6, 'b'); grid on stem(n6, y6, 'r'); subplot(4,2,6); plot(t, yt7, 'b'); grid on stem(n7, y7, 'r'); subplot(4,2,8); plot(t, yt8, 'b'); grid on stem(n8, y8, 'r'); 9
Graphs of cos(2π(n/)t) & cos(2π(1/)t) f = 1 f = 2 f = f = 6 clf t = [0:00]/100; yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(2/)*t); yt3 = 4*cos(2*pi*(3/)*t); yt4 = 4*cos(2*pi*(4/)*t); yt = 4*cos(2*pi*(/)*t); yt6 = 4*cos(2*pi*(6/)*t); yt7 = 4*cos(2*pi*(7/)*t); yt8 = 4*cos(2*pi*(8/)*t); f = 3 f = 7 f = 4 f = 8 10
A Set of Roots of cos(2π(n/)t) = cos(2π(1/)t) f = 1 f = 2 f = 3 f = f = 6 f = 7 n2 = 0: /3 : ; n3 = 0: /4 : ; n4 = 0: / : ; n = 0: /6 : ; n6 = 0: /7 : ; n7 = 0: /8 : ; n8 = 0: /9 : ; y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); f = 4 f = 8 11
Another Set of Roots of cos(2π(n/)t) = cos(2π(1/)t) f = 1 f = 2 f = 3 f = f = 6 f = 7 n2 = 0: /1 : ; n3 = 0: /2 : ; n4 = 0: /3 : ; n = 0: /4 : ; n6 = 0: / : ; n7 = 0: /6 : ; n8 = 0: /7 : ; y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); f = 4 f = 8 12
Aliasing and Folding A F = 1 F = 4 F = 6 F = 9 F = 11 F = 14 F = 16 F = 19 13
Plotting of Aliasing & Folding Frequencies clf t = [0:00]/100; yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(6/)*t); yt3 = 4*cos(2*pi*(11/)*t); yt4 = 4*cos(2*pi*(16/)*t); yt = 4*cos(2*pi*(4/)*t); yt6 = 4*cos(2*pi*(9/)*t); yt7 = 4*cos(2*pi*(14/)*t); yt8 = 4*cos(2*pi*(19/)*t); n1 = 0: / : ; n2 = 0: / : ; n3 = 0: / : ; n4 = 0: / : ; n = 0: / : ; n6 = 0: / : ; n7 = 0: / : ; n8 = 0: / : ; y2 = 4*cos(2*pi*(6/)*n2); y3 = 4*cos(2*pi*(11/)*n2); y4 = 4*cos(2*pi*(16/)*n2); y = 4*cos(2*pi*(4/)*n); y6 = 4*cos(2*pi*(9/)*n); y7 = 4*cos(2*pi*(14/)*n); y8 = 4*cos(2*pi*(19/)*n); subplot(4,2,1); subplot(4,2,3); plot(t, yt2, 'b'); grid on stem(n2, y2, 'r'); subplot(4,2,); plot(t, yt3, 'b'); grid on stem(n2, y3, 'r'); subplot(4,2,7); plot(t, yt4, 'b'); grid on stem(n2, y4, 'r'); subplot(4,2,2); plot(t, yt, 'b'); grid on stem(n, y, 'r'); subplot(4,2,4); plot(t, yt6, 'b'); grid on stem(n, y6, 'r'); subplot(4,2,6); plot(t, yt7, 'b'); grid on stem(n, y7, 'r'); subplot(4,2,8); plot(t, yt8, 'b'); grid on stem(n, y8, 'r'); 14
Aliasing Frequencies (1) 1 6 11 16 A+B 7 12 17 22 27 7 12 17 22 27 A-B 10 1 1 1 1 2 1 3 1 1
Aliasing Frequencies (2) 4 9 14 19 A+B 13 18 23 28 33 13 18 23 28 33 A-B 10 1 1 1 1 2 1 3 1 16
Aliasing and Folding Frequencies Aliasing frequencies n1 = [1/, 6/, 11/, 16/]; n2 = [4/, 9/, 14/, 19/]; y1 = [1, 1, 1, 1]; y2 = [1, 1, 1, 1]; Aliasing frequencies Folding frequencies subplot(3, 1, 1) stem(n1, y1, 'b'); grid on; axis([0, 4, 0, 2]); subplot(3, 1, 2) stem(n2, y2, 'm'); grid on; axis([0, 4, 0, 2]); subplot(3, 1, 3) stem(n1, y1, 'b'); hold on; stem(n2, y2, 'm'); grid on; axis([0, 4, 0, 2]); J.H. McClellan, et al., Signal Processing First 17
Graphs of cos(2π(n/7)t) & cos(2π(1/7)t) A F = 1 7 F = 6 7 F = 8 7 F = 13 7 F = 1 7 F = 13 7 F = 22 7 F = 20 7 18
sin(2πf 1 t) = sin(2πf 2 t) sin(ω 1 t ) = sin(ω 2 t) ω 1 t ω 2 t = 2 n π ω 1 t + ω 2 t = n π 6 t + 1 t = n 2 6 t 1 t = n 7 t = n 2 t = n 14, 10 14, 1 14, ±sin (ω 1 t) = sin(ω 2 t) 1, 2, 3, sin(ω 1 t) = sin(ω 2 t) 19
sin(2πf 1 t) = ±sin(2πf 2 t) sin(ω 1 t ) = sin(ω 2 t) ω 1 t ω 2 t = 2 n π ω 1 t + ω 2 t = 2 n π sin(ω 1 t ) = sin(ω 2 t) 6 t + 1 t = n 6 t 1 t = n 7 t = n t = n 7, 10 7, 1 7, sin(ω 1 t ) = sin(ω 2 t) 1, 2, 3, sin(ω 1 t) = sin(ω 2 t) 20
2πf 1 t + 2πf 2 t = 2nπ, (2n+1)π Conditions ω 1 t + ω 2 t = (2 n+1)π sin(ω 1 t) = sin (ω 2 t ) ω 1 t + ω 2 t = 2 n π sin(ω 1 t ) = sin(ω 2 t) 21
Aliasing Condition Examples 2 t + 1 t = n 2 t 1 t = n 3 t = n 1 t = n = 3 = 1 3 t + 1 t = n 3 t 1 t = n 4 t = n 2 t = n = 4 = 2 4 t + 1 t = n 4 t 1 t = n t = n 3 t = n = = 3 t + 1 t = n t 1 t = n 6 t = n 4 t = n = 6 = 4 6 t + 1 t = n 6 t 1 t = n 7 t = n t = n = 7 = 7 t + 1 t = n 7 t 1 t = n 8 t = n 6 t = n = 8 = 6 8 t + 1 t = n 8 t 1 t = n 9 t = n 7 t = n = 9 = 7 22
Aliasing Condition Examples clf t = [0:00]/100; yt1 = 4*cos(2*pi*(1/)*t); yt2 = 4*cos(2*pi*(2/)*t); yt3 = 4*cos(2*pi*(3/)*t); yt4 = 4*cos(2*pi*(4/)*t); yt = 4*cos(2*pi*(/)*t); yt6 = 4*cos(2*pi*(6/)*t); yt7 = 4*cos(2*pi*(7/)*t); yt8 = 4*cos(2*pi*(8/)*t); n1 = 0: /2 : ; n2 = 0: /3 : ; n3 = 0: /4 : ; n4 = 0: / : ; n = 0: /6 : ; n6 = 0: /7 : ; n7 = 0: /8 : ; n8 = 0: /9 : ; y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); subplot(4,2,1); subplot(4,2,3); plot(t, yt2, 'b'); grid on stem(n2, y2, 'r'); subplot(4,2,); plot(t, yt3, 'b'); grid on stem(n3, y3, 'r'); subplot(4,2,7); plot(t, yt4, 'b'); grid on stem(n4, y4, 'r'); subplot(4,2,2); plot(t, yt, 'b'); grid on stem(n, y, 'r'); subplot(4,2,4); plot(t, yt6, 'b'); grid on stem(n6, y6, 'r'); subplot(4,2,6); plot(t, yt7, 'b'); grid on stem(n7, y7, 'r'); subplot(4,2,8); plot(t, yt8, 'b'); grid on stem(n8, y8, 'r'); 23
Aliasing Condition Examples 24
Aliasing Condition Examples f = 1 f = n2 = 0: (1/2)*/3 : ; n3 = 0: (1/2)*/4 : ; n4 = 0: (1/2)*/ : ; n = 0: (1/2)*/6 : ; n6 = 0: (1/2)*/7 : ; n7 = 0: (1/2)*/8 : ; n8 = 0: (1/2)*/9 : ; f = 2 f = 6 f = 3 f = 7 f = 4 f = 8 2
Aliasing Condition Examples f = 1 f = n2 = 0: (1/2)*/3 : ; n3 = 0: (1/2)*/4 : ; n4 = 0: (1/2)*/ : ; n = 0: (1/2)*/6 : ; n6 = 0: (1/2)*/7 : ; n7 = 0: (1/2)*/8 : ; n8 = 0: (1/2)*/9 : ;k f = 2 f = 6 f = 3 f = 7 f = 4 f = 8 26
Aliasing Condition Examples f = 1 y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); f = y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); n2 = 0: /1 : ; n3 = 0: /2 : ; n4 = 0: /3 : ; n = 0: /4 : ; n6 = 0: / : ; n7 = 0: /6 : ; n8 = 0: /7 : ; f = 2 f = 3 f = 4 f = 6 subplot(4,2,1); subplot(4,2,3); f = plot(t, 7 yt1, 'g'); hold on plot(t, yt2, 'b'); grid on stem(n2, y2, 'r'); subplot(4,2,); f = plot(t, 8 yt3, 'b'); grid on stem(n3, y3, 'r'); 27
Aliasing Condition Examples f = 1 y2 = 4*cos(2*pi*(2/)*n2); y3 = 4*cos(2*pi*(3/)*n3); y4 = 4*cos(2*pi*(4/)*n4); f = y = 4*cos(2*pi*(/)*n); y6 = 4*cos(2*pi*(6/)*n6); y7 = 4*cos(2*pi*(7/)*n7); y8 = 4*cos(2*pi*(8/)*n8); n2 = 0: /1 : ; n3 = 0: /2 : ; n4 = 0: /3 : ; n = 0: /4 : ; n6 = 0: / : ; n7 = 0: /6 : ; n8 = 0: /7 : ; f = 2 f = 3 f = 4 f = 6 subplot(4,2,1); subplot(4,2,3); f = plot(t, 7 yt1, 'g'); hold on plot(t, yt2, 'b'); grid on stem(n2, y2, 'r'); subplot(4,2,); f = plot(t, 8 yt3, 'b'); grid on stem(n3, y3, 'r'); 28
References [1] http://en.wikipedia.org/ [2] J.H. McClellan, et al., Signal Processing First, Pearson Prentice Hall, 2003 [3] M.J. Roberts, Fundamentals of Signals and Systems [4] S.J. Orfanidis, Introduction to Signal Processing [] K. Shin, et al., Fundamentals of Signal Processing for Sound and Vibration Engineerings [6] A graphical interpretation of the DFT and FFT, by Steve Mann 29