Frequency Estimation from two DFT Bins

Similar documents
Fourier Series and Fourier Transforms

Systems. x 1 = ax 1 + bx 2, x 2 = cx 1 + dx 2,

10.1 Complex Arithmetic Argand Diagrams and the Polar Form The Exponential Form of a Complex Number De Moivre s Theorem 29

1 Review of complex numbers

CMPT 318: Lecture 5 Complex Exponentials, Spectrum Representation

Today s lecture. The Fourier transform. Sampling, aliasing, interpolation The Fast Fourier Transform (FFT) algorithm

Overview of Complex Numbers

Math 104 Midterm 3 review November 12, 2018

Table of contents. d 2 y dx 2, As the equation is linear, these quantities can only be involved in the following manner:

REFLECTION AND REFRACTION OF PLANE EM WAVES

Notes for the Physics-Based Calculus workshop

(x 1, y 1 ) = (x 2, y 2 ) if and only if x 1 = x 2 and y 1 = y 2.

General Physics I. Lecture 14: Sinusoidal Waves. Prof. WAN, Xin ( 万歆 )

Complex symmetry Signals and Systems Fall 2015

Background ODEs (2A) Young Won Lim 3/7/15

Final Exam January 31, Solutions

IB Paper 6: Signal and Data Analysis

L = 1 2 a(q) q2 V (q).

Topic 5 Notes Jeremy Orloff. 5 Homogeneous, linear, constant coefficient differential equations

HB Coupled Pendulums Lab Coupled Pendulums

Likewise, any operator, including the most generic Hamiltonian, can be written in this basis as H11 H

Complex Numbers. The set of complex numbers can be defined as the set of pairs of real numbers, {(x, y)}, with two operations: (i) addition,

We consider systems of differential equations of the form. x 1 = ax 1 + bx 2,

Solutions 2: Simple Harmonic Oscillator and General Oscillations

4. Complex Oscillations

CHAPTER 4 FOURIER SERIES S A B A R I N A I S M A I L

Chapter 2 Algorithms for Periodic Functions

Notes on Noncoherent Integration Gain

Hongbing Zhang October 2018

3 + 4i 2 + 3i. 3 4i Fig 1b

Sinusoids. Amplitude and Magnitude. Phase and Period. CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

Discrete Simulation of Power Law Noise

ω 0 = 2π/T 0 is called the fundamental angular frequency and ω 2 = 2ω 0 is called the

Multi-Robotic Systems

LOPE3202: Communication Systems 10/18/2017 2

Music 270a: Complex Exponentials and Spectrum Representation

8/19/16. Fourier Analysis. Fourier analysis: the dial tone phone. Fourier analysis: the dial tone phone

z = x + iy ; x, y R rectangular or Cartesian form z = re iθ ; r, θ R polar form. (1)

Section 3: Complex numbers

Fourier s representation for functions on R, T p, Z, and P N

Each of these functions represents a signal in terms of its spectral components in the frequency domain.

MAT187H1F Lec0101 Burbulla

ANoteonEuler sformula

With this expanded version of what we mean by a solution to an equation we can solve equations that previously had no solution.

In Z: x + 3 = 2 3x = 2 x = 1 No solution In Q: 3x = 2 x 2 = 2. x = 2 No solution. In R: x 2 = 2 x = 0 x = ± 2 No solution Z Q.

NORMAL MODES, WAVE MOTION AND THE WAVE EQUATION. Professor G.G.Ross. Oxford University Hilary Term 2009

Lecture 04: Discrete Frequency Domain Analysis (z-transform)

EECS 20N: Midterm 2 Solutions

MAE 200B Homework #3 Solutions University of California, Irvine Winter 2005

Modes and Roots ... mx + bx + kx = 0. (2)

MATH 135: COMPLEX NUMBERS

Chapter 2: Complex numbers

Euler-Cauchy Using Undetermined Coefficients

01 Harmonic Oscillations

Hypothesis elimination on a quantum computer

David Abrecht. February 17, 2012

Lab10: FM Spectra and VCO

Quick Overview: Complex Numbers

2 Fourier Transforms and Sampling

1.1 A Scattering Experiment

Damped Harmonic Oscillator

Math 112 Section 10 Lecture notes, 1/7/04

Chapter 7: Trigonometric Equations and Identities

Physics 142 Wave Optics 1 Page 1. Wave Optics 1. For every complex problem there is one solution that is simple, neat, and wrong. H.L.

Chapter 7: Trigonometric Equations and Identities

23.6. The Complex Form. Introduction. Prerequisites. Learning Outcomes

BME 50500: Image and Signal Processing in Biomedicine. Lecture 2: Discrete Fourier Transform CCNY

7.3 Getting on the Right Wavelength

2. Force Systems. 2.1 Introduction. 2.2 Force

Image Acquisition and Sampling Theory

Fourier Series and Integrals

The Wave Function. Chapter The Harmonic Wave Function

Section 4.7: Variable-Coefficient Equations

Problem Set 4 for MAE280A Linear Systems Theory, Fall 2017: due Tuesday November 28, 2017, in class

NONLINEAR COMPLEX MODULUS IN BITUMENS

COMPLEX NOISE-BITS AND LARGE-SCALE INSTANTANEOUS PARALLEL OPERATIONS WITH LOW COMPLEXITY

Lecture 9: Eigenvalues and Eigenvectors in Classical Mechanics (See Section 3.12 in Boas)

A523 Signal Modeling, Statistical Inference and Data Mining in Astrophysics Spring 2011

5.74 Introductory Quantum Mechanics II

Jackson 7.6 Homework Problem Solution Dr. Christopher S. Baird University of Massachusetts Lowell

Continuous functions. Limits of non-rational functions. Squeeze Theorem. Calculator issues. Applications of limits

Contents. Digital Signal Processing, Part II: Power Spectrum Estimation

The Exponential of a Matrix

2.161 Signal Processing: Continuous and Discrete

21.3. z-transforms and Difference Equations. Introduction. Prerequisites. Learning Outcomes

Frequency Response of Linear Time Invariant Systems

Fourier Series and Transforms

DCSP-2: Fourier Transform

DIFFERENCE AND DIFFERENTIAL EQUATIONS COMPARED

EECS 123 Digital Signal Processing University of California, Berkeley: Fall 2007 Gastpar November 7, Exam 2

Digital Signal Processing

7.3 Inverse Trigonometric Functions

ELEG 305: Digital Signal Processing

A NOVEL METHOD TO DERIVE EXPLICIT KLT KERNEL FOR AR(1) PROCESS. Mustafa U. Torun and Ali N. Akansu

EXAMINATION: MATHEMATICAL TECHNIQUES FOR IMAGE ANALYSIS

Second-Order Linear ODEs

Partial Fractions. June 27, In this section, we will learn to integrate another class of functions: the rational functions.

Properties of Fourier Series - GATE Study Material in PDF

Waves Encountering Barriers

Transcription:

Frequency Estimation from two DFT Bins Martin Vicanek 17. June 015, revised 31. May 016 and 11. February 017 In a recent thread in comp.dsp [1] Cedron Dawg presented an exact formula for extracting the frequency of a pure tone from three DFT bins []. The possibility of using fewer bins remained an open question, also whether or not there are other three-bin formulas. Inspired by that thread I was able to derive an exact expression for the frequency based on values from only two bins. It turns out that that expression is not unique: it offers a degree of freedom which may be used to advantage in the presence of noise. Consider a frame of real valued samples x 0, x 1,..., x N 1 which represent a pure tone with some frequency, amplitude, and phase. We may use the center position n c = (N 1)/ to write x n = A cos[(n n c )ω] + B sin[(n n c )ω], (1) where ω denotes a normalized angular frequency in the range 0 ω π with ω = π representing the Nyquist frequency. A and B are real valued constants to allow for an arbitrary amplitude A + B and phase arctan(b/a). The DFT may be written in a form centered around n c, N 1 X k = e πiknc/n n=0 x n e πikn/n, () where the sum on the right hand side represents the familiar DFT and the phase factor in front provides for the symmetry with respect to n c. Inserting (1) into () yields, after some algebra, X k = ( 1) k sin(nω/) cos β k cos ω [ ( ω ) A sin cos ( βk where we have introduced the abbreviation β k intermediate steps at the end of this note. 1 ) ( ω ) ( )] βk + ib cos sin, (3) = πk/n. We outline the

Suppose the set of X k is known for all k = 0, 1,..., N 1, and the task is to extract the frequency ω, and possibly A and B. To this end we define the quantities u k = ( 1) k Re(X k )/ cos(β k /), k N/. (4) It is easy to see that the following relation holds for any k j: u j = cos β k cos ω u k cos β j cos ω. (5) Eq.(5) may be solved for ω to yield ( ) uj cos β j u k cos β k ω = arccos u j u k (6) So far so good: equation (6) provides a formula for the frequency ω using information from the two bins j and k. Note that j and k need not denote adjacent bins, although it is reasonable to choose the two bins with maximum modulus, which, in the case of a pure tone spectrum, will be adjacent bins. Also note that these two bins will enclose ω, and that the corresponding u j and u k will have oposite signs. Eq.(5) will break down for A = 0, however. In that case we may define v k = ( 1) k Im(X k )/ sin(β k /), k 0, (7) and obtain similar formulas as in eqs.(5) and (6). Indeed, any linear combination w k = au k + bv k (8) will do. This degree of freedom is not so surprising given that two bins hold two complex valued numbers (i.e. four independent values) to determine three unknowns ω, A and B. By the same token, one would expect Cedron s three-bin formula to be only one among many others. Clearly, we can use this freedom to our advantage and make an optimum choice of e.g. a and b for best signal to noise ratio. Although it is not obvious what the best choice would be, setting a = cos(β m /) Re(X m ) b = sin(β m /) Im(X m ) (9) with m denoting the peak bin optimizes the SNR of w m. Hence that choice is expected to provide nearly optimum accuracy.

It would seem that because only two bins are used, much information is actually thrown away - information that could be used if the background characteristics are known (white noise being the simplest case). On the other hand, for unknown background one might argue that a two-bin method provides maximum locality hence minimum interference. I have tested the scheme only briefly in a real-world scenario with noise or another interfering tone. Results with w k according to eq.(9) are indeed better than with either u k or v k plugged into eq.(6). Derivation of Eq.(3) We may write eq.(1) in the form x n = A ib The DFT of the exponentials in eq.(10) is e iω(n nc) + A + ib e iω(n nc). (10) N 1 n=0 e i(β k±ω)(n n c) = sin [N(β k ± ω)] sin[(β k ± ω)/] = ( 1)k sin(nω/) sin[(ω ± β k )/]. (11) Hence we obtain the following expression for the real part: ( ) { } Re(X k ) = ( 1)k A Nω 1 sin sin[(ω + β k )/] + 1 sin[(ω β k )/] (1) The term in curly brackets in eq.(1) may be simplified using trigonometric identities, resulting in 4 sin(ω/) cos(β k/) cos β k cos ω. (13) The imaginary part Im(X k ) may be treated in a similar way. Collecting all bits and pieces, we obtain the result in eq.(3). Derivation of Optimum a and b If we assume additive white noise, then the Fourier components will fluctuate with some variance σ, regardless of k, and the variance will be equal for the real and imaginary parts: Var[Re(X k )] = Var[Im(X k )] = σ. (14) 3

Hence the variances of u k and v k will be Var(u k ) = which yields the variance of w k, [ Var(w k ) = σ cos (β k /), Var(v k) = a cos (β k /) + b sin (β k /) σ sin (β k /), (15) ] σ (16) Now the relative mean standard deviation of w k is Var(w k )/ w k. We want the relative error of w k to be small because we are taking ratios. Minimizing the above expression (or easier, its square) results in a condition for a and b, Minimum Variance Estimate a b = cos(β k/)re(x k ) sin(β k /)Im(X k ). (17) The information from two bins leads to an overdetermined system of equations for ω. With the abreviations µ = cos ω, and µ k = cos β k, these equations are: U(µ) := (u j u k )µ u j µ j + u k µ k = 0 V (µ) := (v j v k )µ v j µ j + v k µ k = 0 (18) In general, the two equations cannot be solved simultaneously. The best one can do is to minimize a suitable error. One may square each equation and minimize their weighted sum. The optimum weights are the inverse variances of each term. Observe that for adjacent j and k at the peak, Var(U) σ / cos (β m /) Var(V ) σ / sin (β m /) (19) where the index m denotes the peak. Hence the optimum cost function is cos (β m /) U(µ) + sin (β m /) V (µ) = min. (0) Taking the derivative with respect to µ and equating to zero, we arrive at the expression µ = cos ω = cos (β m /)(u j u k ) µ u + sin (β m /)(v j v k ) µ v cos (β m /)(u j u k ) + sin (β m /)(v j v k ) [Re(X j + X k )] µ u + [Im(X j + X k )] µ v X j + X k (1) 4

where µ u and µ v are the solutions of U(µ) = 0 and V (µ) = 0, respectively. This result coincides with the one found in the previous section if we substitute in eq. (9) u m u j u k / and v m v j v k /. Recall that u j and u k have opposite signs, likewise for v j and v k. Formulas in Terms of Ordinary DFT For easier application of the results we provide the main expressions in terms of the standard DFT which we denote by Z k, Z k = N 1 n=0 x n e iβ kn. () The relation between the centered and the standard DFT is ( 1) k Re(X k ) = cos(β k /) Re(Z k ) + sin(β k /) Im(Z k ) ( 1) k Im(X k ) = sin(β k /) Re(Z k ) + cos(β k /) Im(Z k ), (3) The auxiliary quantities u k and v k become u k = Re(Z k ) + tan(β k /) Im(Z k ) and the optimum choice for a and b is Complex Tone v k = Re(Z k ) + cot(β k /) Im(Z k ), (4) a b = cot(β m/) Re(Z m ) + Im(Z m ) tan(β m /) Re(Z m ) + Im(Z m ). (5) As an alternative to eq.(1), consider a complex tone x n = Ce i(n nc)ω, (6) where C represents a complex amplitude. The DFT according to eq.() is X k = ( 1) k C sin(nω/) sin[(β k ω)/]. (7) To derive a two-bin formula for a complex tone, we form the ratio ( 1) j X j = sin[(β k ω)/] ( 1) k X k sin[(β j ω)/] = cos(ω/) sin(β k/) sin(ω/) cos(β k /) cos(ω/) sin(β j /) sin(ω/) cos(β j /) (8) 5

which is easily solved for tan(ω/) = ( 1)j X j sin(β j /) ( 1) k X k sin(β k /) ( 1) j X j cos(β j /) ( 1) k X k cos(β k /). (9) For adjacent bins j = k + 1 this expression becomes References tan(ω/) = X k+1 sin(β k+1 /) + X k sin(β k /) X k+1 cos(β k+1 /) + X k cos(β k /). (30) [1] http://www.dsprelated.com/showthread/comp.dsp/78049-1.php [] http://www.dsprelated.com/showarticle/773.php 6