Digital Signal Processing Frequency Analysis of Signals (2) Moslem Amiri, V´aclav Pˇrenosil Embedded Systems Laboratory Faculty of Informatics, Masaryk University Brno, Czech Republic amiri@mail.muni.cz prenosil@fi.muni.cz April, 2012 The Concept of Bandwidth Low-frequency signal A power signal (or energy signal) whose power density spectrum (or energy density spectrum) is concentrated about zero frequency Figure 1: Low-frequency signal. 2 / 40 The Concept of Bandwidth High-frequency signal A power signal (or energy signal) whose power density spectrum (or energy density spectrum) is concentrated at high frequencies Figure 2: High-frequency signal. 3 / 40 The Concept of Bandwidth Medium-frequency signal or bandpass signal A power signal (or energy signal) whose power density spectrum (or energy density spectrum) is concentrated somewhere in broad frequency range between low frequencies and high frequencies Figure 3: Medium-frequency signal. 4 / 40 The Concept of Bandwidth Bandwidth of a signal To express quantitatively the range of frequencies over which power or energy density spectrum is concentrated E.g., if a continuous-time signal has 95% of its power (or energy) density spectrum concentrated in F1 ≤ F ≤ F2, then 95% bandwidth of signal is F2 − F1 A bandpass signal is narrowband if its bandwidth F2 − F1 is much smaller than median frequency (F2 + F1)/2 Otherwise, it is wideband A signal is bandlimited if its spectrum is zero outside frequency range |F| ≥ B A periodic continuous-time signal xp(t) is bandlimited if its Fourier coefficients ck = 0 for |k| > M (M is some positive integer) A continuous-time finite-energy signal x(t) is bandlimited if its Fourier transform X(F) = 0 for |F| > B A periodic discrete-time signal with fundamental period N is periodically bandlimited if Fourier coefficients ck = 0 for k0 < |k| < N A discrete-time finite-energy signal x(n) is (periodically) bandlimited if |X(ω)| = 0 for ω0 < |ω| < π 5 / 40 The Concept of Bandwidth Exploiting duality between frequency and time domains, a signal x(t) is time-limited if x(t) = 0, |t| > τ If a signal is periodic with period Tp, it is periodically time-limited if xp(t) = 0, τ < |t| < Tp/2 A discrete-time signal x(n) of finite duration (x(n) = 0, |n| > N) is also time-limited When a signal is periodic with fundamental period N, it is periodically time-limited if x(n) = 0, n0 < |n| < N No signal can be time-limited and bandlimited simultaneously A reciprocal relationship exists between time duration and frequency duration of a signal The narrower the pulse becomes in time domain, the larger the bandwidth of signal becomes Consequently, product of time duration and bandwidth of a signal is fixed 6 / 40 Frequency-Domain and Time-Domain Signal Properties There are two time-domain characteristics that determine type of signal spectrum we obtain 1 Whether time variable is continuous or discrete 2 Whether signal is periodic or aperiodic Summary of results of previous sections Continuous-time signals have aperiodic spectra Because complex exponential exp(j2πFt) is a function of continuous variable t, and hence it is not periodic in F Thus frequency range extends from F = 0 to F = ∞ Discrete-time signals have periodic spectra Both Fourier series and transform are periodic here with period ω = 2π Frequency range is finite and extends from ω = −π to ω = π, where ω = π corresponds to the highest possible rate of oscillation Periodic signals have discrete spectra Periodic signals are described by means of Fourier series Fourier series coefficients provide lines that constitute discrete spectrum Line spacing is ∆F = 1/Tp for continuous-time periodic signals and ∆f = 1/N for discrete-time signals Aperiodic finite energy signals have continuous spectra Because X(F) and X(ω) are functions of exp(j2πFt) and exp(jωn), respectively, which are continuous functions of F and ω 7 / 40 Frequency-Domain and Time-Domain Signal Properties Figure 4: Summary of analysis and synthesis formulas. 8 / 40 Frequency-Domain and Time-Domain Signal Properties Periodicity with ”period” α in one domain automatically implies discretization with ”spacing” of 1/α in the other domain, and vice versa ”Period” in frequency domain means frequency range ”Spacing” in time domain is sampling period T Line spacing in frequency domain is ∆F α = Tp −→ 1/α = 1/Tp = ∆F α = N −→ ∆f = 1/N α = Fs −→ T = 1/Fs 9 / 40 Properties of Fourier Transform for Discrete-Time Signals Direct transform (analysis equation) X(ω) ≡ F{x(n)} = ∞ n=−∞ x(n)e−jωn Inverse transform (synthesis equation) x(n) ≡ F−1 {X(ω)} = 1 2π 2π X(ω)ejωn dω x(n) and X(ω) are a Fourier transform pair x(n) F ←→ X(ω) 10 / 40 Properties of Fourier Transform for Discrete-Time Signals Suppose both x(n) and X(ω) are complex-valued x(n) = xR(n) + jxI (n) (1) X(ω) = XR(ω) + jXI (ω) (2) Putting (1) and e−jω = cos ω − j sin ω in X(ω) = ∞ n=−∞ x(n)e−jωn XR(ω) = ∞ n=−∞ [xR(n) cos ωn + xI (n) sin ωn] (3) XI (ω) = − ∞ n=−∞ [xR(n) sin ωn − xI (n) cos ωn] (4) Putting (2) and ejω = cos ω + j sin ω in x(n) = 1 2π 2π X(ω)ejωndω xR(n) = 1 2π 2π [XR(ω) cos ωn − XI (ω) sin ωn]dω (5) xI (n) = 1 2π 2π [XR(ω) sin ωn + XI (ω) cos ωn]dω (6) 11 / 40 Properties of Fourier Transform for Discrete-Time Signals Real signals. If x(n) is real, then xR(n) = x(n) and xI (n) = 0 Hence (3) and (4) reduce to XR (ω) = ∞ n=−∞ x(n) cos ωn and XI (ω) = − ∞ n=−∞ x(n) sin ωn Since cos(−ωn) = cos ωn and sin(−ωn) = − sin ωn XR (−ω) = XR (ω) and XI (−ω) = −XI (ω) X∗ (ω) = X(−ω) Magnitude and phase spectra for real signals |X(ω)| = X2 R (ω) + X2 I (ω) and X|ω| = tan−1 XI (ω) XR (ω) |X(ω)| = |X(−ω)| and X(−ω) = − X(ω) For inverse transform of a real-valued signal (x(n) = xR (n)), (5) implies x(n) = 1 2π 2π [XR (ω) cos ωn − XI (ω) sin ωn]dω Since both XR (ω) cos ωn and XI (ω) sin ωn are even functions of ω x(n) = 1 π π 0 [XR (ω) cos ωn − XI (ω) sin ωn]dω 12 / 40 Properties of Fourier Transform for Discrete-Time Signals Real and even signals. If x(n) is real and even (x(−n) = x(n)), then x(n) cos ωn is even and x(n) sin ωn is odd XR(ω) = ∞ n=−∞ x(n) cos ωn −→ XR(ω) = x(0) + 2 ∞ n=1 x(n) cos ωn (even) XI (ω) = − ∞ n=−∞ x(n) sin ωn −→ XI (ω) = 0 x(n) = 1 π π 0 [XR(ω) cos ωn − XI (ω) sin ωn]dω −→ x(n) = 1 π π 0 XR(ω) cos ωndω Thus spectra for real and even signals are Real-valued Even functions of ω 13 / 40 Properties of Fourier Transform for Discrete-Time Signals Real and odd signals. If x(n) is real and odd (x(−n) = −x(n)), then x(n) cos ωn is odd and x(n) sin ωn is even XR(ω) = ∞ n=−∞ x(n) cos ωn −→ XR(ω) = 0 XI (ω) = − ∞ n=−∞ x(n) sin ωn −→ XI (ω) = −2 ∞ n=1 x(n) sin ωn (odd) x(n) = 1 π π 0 [XR(ω) cos ωn − XI (ω) sin ωn]dω −→ x(n) = − 1 π π 0 XI (ω) sin ωndω Thus spectra for real-valued odd signals are Purely imaginary-valued Odd functions of ω 14 / 40 Properties of Fourier Transform for Discrete-Time Signals Example Determine and sketch XR(ω), XI (ω), |X(ω)|, and X(ω) for X(ω) = 1 1 − ae−jω , −1 < a < 1 Multiplying both numerator and denominator by complex conjugate of denominator X(ω) = 1 − aejω (1 − ae−jω)(1 − aejω) = 1 − a cos ω − ja sin ω 1 − 2a cos ω + a2 XR (ω) = 1 − a cos ω 1 − 2a cos ω + a2 and XI (ω) = − a sin ω 1 − 2a cos ω + a2 |X(ω)| = X2 R (ω) + X2 I (ω) = 1 √ 1 − 2a cos ω + a2 X|ω| = tan−1 XI (ω) XR (ω) = − tan−1 a sin ω 1 − a cos ω 15 / 40 Properties of Fourier Transform for Discrete-Time Signals Figure 5: Spectra of the transform in Example for a = 0.8; all symmetry properties for the spectra of real signals apply to this case. 16 / 40 Properties of Fourier Transform for Discrete-Time Signals Example Determine Fourier transform of x(n) = A, −M ≤ n ≤ M 0, elsewhere x(n) is real and even (x(−n) = x(n)) XR(ω) = x(0) + 2 ∞ n=1 x(n) cos ωn (even) and XI (ω) = 0 X(ω) = XR(ω) = A 1 + 2 M n=1 cos ωn = A sin(M + 1 2)ω sin(ω/2) |X(ω)| = A sin(M + 1 2)ω sin(ω/2) and X(ω) = 0, if X(ω) > 0 π, if X(ω) < 0 17 / 40 Properties of Fourier Transform for Discrete-Time Signals Figure 6: Spectral characteristics of rectangular pulse in Example. 18 / 40 Fourier Transform Theorems and Properties Linearity If x1(n) F ←→ X1(ω) and x2(n) F ←→ X2(ω) then a1x1(n) + a2x2(n) F ←→ a1X1(ω) + a2X2(ω) Fourier transformation, viewed as an operation on a signal x(n), is a linear transformation 19 / 40 Fourier Transform Theorems and Properties Example Determine Fourier transform of x(n) = a|n|, −1 < a < 1 x(n) can be expressed as x(n) = x1(n) + x2(n) where x1(n) = an, n ≥ 0 0, n < 0 and x2(n) = a−n, n < 0 0, n ≥ 0 Fourier transform of x1(n) X1(ω) = ∞ n=−∞ x1(n)e−jωn = ∞ n=0 an e−jωn = ∞ n=0 (ae−jω )n = 1 1 − ae−jω knowing that |ae−jω| = |a| < 1 20 / 40 Fourier Transform Theorems and Properties Example (continued) Fourier transform of x2(n) X2(ω) = ∞ n=−∞ x2(n)e−jωn = −1 n=−∞ a−n e−jωn = −1 n=−∞ (aejω )−n = ∞ k=1 (aejω )k = aejω 1 − aejω Combining these two transforms, we obtain Fourier transform of x(n) X(ω) = X1(ω) + X2(ω) = 1 − a2 1 − 2a cos ω + a2 21 / 40 Fourier Transform Theorems and Properties Figure 7: Sequence x(n) and its Fourier transform in Example with a = 0.8. 22 / 40 Fourier Transform Theorems and Properties Time shifting If x(n) F ←→ X(ω) then x(n − k) F ←→ e−jωk X(ω) Proof F{x(n)} = X(ω) = ∞ n=−∞ x(n)e−jωn F{x(n − k)} = ∞ n=−∞ x(n − k)e−jωn l=n−k −−−−→ = ∞ l=−∞ x(l)e−jω(l+k) = X(ω)e−jωk = |X(ω)|ej[ X(ω)−ωk] If a signal is shifted in time domain by k samples, its magnitude spectrum remains unchanged, but phase spectrum is changed by an amount −ωk 23 / 40 Fourier Transform Theorems and Properties Time reversal If x(n) F ←→ X(ω) then x(−n) F ←→ X(−ω) Proof F{x(n)} = X(ω) = ∞ n=−∞ x(n)e−jωn F{x(−n)} = ∞ n=−∞ x(−n)e−jωn l=−n −−−→ = ∞ l=−∞ x(l)ejωl = X(−ω) = |X(−ω)|ej X(−ω) if x(n) is real −−−−−−−−−−→ = |X(ω)|e−j X(ω) 24 / 40 Fourier Transform Theorems and Properties Convolution theorem If x1(n) F ←→ X1(ω) and x2(n) F ←→ X2(ω) then x(n) = x1(n) ∗ x2(n) F ←→ X(ω) = X1(ω)X2(ω) Proof: multiply both sides of convolution formula by e−jωn and sum over all n x(n) = x1(n) ∗ x2(n) = ∞ k=−∞ x1(k)x2(n − k) X(ω) = ∞ n=−∞ x(n)e−jωn = ∞ n=−∞ ∞ k=−∞ x1(k)x2(n − k) e−jωn n−k=l −−−−→ = ∞ k=−∞ x1(k) ∞ l=−∞ x2(l)e−jω(k+l) = X1(ω)X2(ω) 25 / 40 Fourier Transform Theorems and Properties Example Using convolution theorem, determine convolution of sequences x1(n) = x2(n) = {1, 1 ↑ , 1} For real and even signals XR (ω) = x(0) + 2 ∞ n=1 x(n) cos ωn and XI (ω) = 0 X1(ω) = X2(ω) = 1 + 2 cos ω X(ω) = X1(ω)X2(ω) = (1 + 2 cos ω)2 = 3 + 4 cos ω + 2 cos 2ω = 3 + 2(ejω + e−jω ) + (ej2ω + e−j2ω ) Thus convolution of x1(n) with x2(n) is (recall X(ω) = ∞ n=−∞ x(n)e−jωn ) x(n) = {1, 2, 3 ↑ , 2, 1} 26 / 40 Fourier Transform Theorems and Properties Figure 8: Graphical representation of the convolution property. 27 / 40 Fourier Transform Theorems and Properties Correlation theorem If x1(n) F ←→ X1(ω) and x2(n) F ←→ X2(ω) then rx1x2 (n) F ←→ Sx1x2 (ω) = X1(ω)X2(−ω) Proof: multiply both sides of correlation formula by e−jωn and sum over all n rx1x2 (n) = ∞ k=−∞ x1(k)x2(k − n) Sx1x2 (ω) = ∞ n=−∞ rx1x2 (n)e−jωn = ∞ n=−∞ ∞ k=−∞ x1(k)x2(k − n) e−jωn k−n=l −−−−→ = ∞ k=−∞ x1(k) ∞ l=−∞ x2(l)e−jω(k−l) = X1(ω)X2(−ω) Sx1x2 (ω) is called cross-energy density spectrum of signals x1(n) and x2(n) 28 / 40 Fourier Transform Theorems and Properties Wiener-Khintchine theorem Let x(n) be a real signal. Then rxx (l) F ←→ Sxx (ω) I.e., energy spectral density of an energy signal is Fourier transform of its autocorrelation sequence This is a special case of preceding theorem (correlation theorem) 29 / 40 Fourier Transform Theorems and Properties Example Determine energy density spectrum of x(n) = anu(n), −1 < a < 1 Using results of previous examples for this signal rxx (l) = 1 1 − a2 a|l| , −∞ < l < ∞ F{rxx (l)} = 1 1 − a2 F{a|l| } = 1 1 − 2a cos ω + a2 According to Wiener-Khintchine theorem Sxx (ω) = 1 1 − 2a cos ω + a2 30 / 40 Fourier Transform Theorems and Properties Frequency shifting If x(n) F ←→ X(ω) then ejω0n x(n) F ←→ X(ω − ω0) Proof X(ω) = ∞ n=−∞ x(n)e−jωn −→ X(ω − ω0) = ∞ n=−∞ x(n)e−j(ω−ω0)n = ∞ n=−∞ (ejω0n x(n))e−jωn = F{ejω0n x(n)} 31 / 40 Fourier Transform Theorems and Properties Figure 9: Illustration of the frequency-shifting property of the Fourier transform (ω0 ≤ 2π − ωm). 32 / 40 Fourier Transform Theorems and Properties Modulation theorem If x(n) F ←→ X(ω) then x(n) cos ω0n F ←→ 1 2 [X(ω + ω0) + X(ω − ω0)] Proof: expressing cos ω0n as cos ω0n = 1 2 (ejω0n + e−jω0n ) and using frequency-shifting property x(n) F ←→ X(ω) −→ ejω0n x(n) F ←→ X(ω − ω0) we obtain F{1 2 (ejω0n + e−jω0n )x(n)} = 1 2 [X(ω − ω0) + X(ω + ω0)] 33 / 40 Fourier Transform Theorems and Properties Figure 10: Graphical representation of the modulation theorem; the spectra of the signals x(n), y1(n) = x(n) cos 0.5πn and y2(n) = x(n) cos πn. 34 / 40 Fourier Transform Theorems and Properties Parseval’s theorem If x1(n) F ←→ X1(ω) and x2(n) F ←→ X2(ω) then ∞ n=−∞ x1(n)x∗ 2 (n) = 1 2π π −π X1(ω)X∗ 2 (ω)dω Proof: eliminating X1(ω) on right-hand side of above equation 1 2π 2π ∞ n=−∞ x1(n)e−jωn X∗ 2 (ω)dω = ∞ n=−∞ x1(n) 1 2π 2π X∗ 2 (ω)e−jωn dω = ∞ n=−∞ x1(n)x∗ 2 (n) 35 / 40 Fourier Transform Theorems and Properties In special case where x2(n) = x1(n) = x(n), Parseval’s relation reduces to ∞ n=−∞ |x(n)|2 = 1 2π 2π |X(ω)|2 dω Left-hand side of this equation is energy Ex of x(n) Left-hand side is also equal to autocorrelation of x(n), rxx (l) at l = 0 Integrand in right-hand side is equal to energy density spectrum, so integral over −π ≤ ω ≤ π yields total signal energy Ex = rxx (0) = ∞ n=−∞ |x(n)|2 = 1 2π 2π |X(ω)|2 dω = 1 2π π −π Sxx (ω)dω 36 / 40 Fourier Transform Theorems and Properties Multiplication of two sequences (Windowing theorem) If x1(n) F ←→ X1(ω) and x2(n) F ←→ X2(ω) then x3(n) = x1(n)x2(n) F ←→ X3(ω) = 1 2π π −π X1(λ)X2(ω − λ)dλ Integral on right-hand side is convolution of X1(ω) and X2(ω) This convolution integral is known as periodic convolution of X1(ω) and X2(ω) because it is convolution of two periodic functions having the same period Multiplication of aperiodic sequences is equivalent to periodic convolution of their Fourier transforms Based on duality, convolution in time domain (aperiodic summation) is equivalent to multiplication of continuous periodic Fourier transforms Due to periodicity of Fourier transforms for discrete-time signals, there is no ”perfect” duality between time and frequency domains with respect to convolution operation, as in the case of continuous-time signals 37 / 40 Fourier Transform Theorems and Properties Proof of windowing theorem: We know x3(n) = x1(n)x2(n) and x1(n) = 1 2π π −π X1(λ)ejλn dλ Thus X3(ω) = ∞ n=−∞ x3(n)e−jωn = ∞ n=−∞ x1(n)x2(n)e−jωn = ∞ n=−∞ 1 2π π −π X1(λ)ejλn dλ x2(n)e−jωn = 1 2π π −π X1(λ)dλ ∞ n=−∞ x2(n)e−j(ω−λ)n = 1 2π π −π X1(λ)X2(ω − λ)dλ 38 / 40 Fourier Transform Theorems and Properties Differentiation in frequency domain If x(n) F ←→ X(ω) then nx(n) F ←→ j dX(ω) dω Proof: differentiate series in Fourier transform definition, term by term with respect to ω X(ω) = ∞ n=−∞ x(n)e−jωn dX(ω) dω = d dω ∞ n=−∞ x(n)e−jωn = ∞ n=−∞ x(n) d dω e−jωn = −j ∞ n=−∞ nx(n)e−jωn Multiplying both sides by j, we obtain the desired result 39 / 40 References John G. Proakis, Dimitris G. Manolakis, Digital Signal Processing: Principles, Algorithms, and Applications, Prentice Hall, 2006. 40 / 40