Sound Analysis
87
Lagrange interpolation
sinusoidal model
Taken three adjacent bins of the magnitude DFT, we assign them the co
ordinates (x
0
, y
0
), (x
1
, y
1
), and (x
2
, y
2
). Then, we simply apply the Lagrange
interpolation formula
y =
(x  x
1
)(x  x
2
)
(x
0
 x
1
)(x
0
 x
2
)
y
0
+
(x  x
0
)(x  x
2
)
(x
1
 x
0
)(x
1
 x
2
)
y
1
+
(x  x
0
)(x  x
1
)
(x
2
 x
0
)(x
2
 x
1
)
y
2
.
(16)
Since
x
1
 x
0
= x
2
 x
1
= f =
F
s
N
(17)
is the frequency quantum, any point in the parabola has coordinates (x, y)
related by
y = (x  x
1
)(x  x
2
)y
0

1
2
(x  x
0
)(x  x
2
)y
1
+ (x  x
0
)(x  x
1
)y
2
1
2f
2
.
(18)
From this expression, it is straightforward to find the peak as the point where
the derivative vanishes: y =
dy
dx
= 0.
Phase following
Let us assume that the signal to be analyzed can be expressed as a sum of
sinusoids with timevarying amplitude and frequency (sinusoidal model, see
sec. 5.1.1):
y(t) =
I
i=1
A
i
(t)e
j
i
(t)
,
(19)
with
i
(t) =
t

i
( )d ,
(20)
being
i
the frequency of the ith partial.
The kth bin of the mth frame of the STFT gives
Y
m
(k) =
N 1
n=0
w(m  n)A
i
(n)e
j
i
(n)
e
j
2
N
kn
(21)
= e
j
2
N
km
m
r=mN +1
w(r)A
i
(m  r)e
j
i
(mr)
e
j
2
N
kr
.
(22)
In order to proceed with the accurate partial frequency estimation, we have
to make a
Assumption 1 Frequency and amplitude of the ith component are constant
within a STFT frame:
i
(m  r) =
i
(m)  r
i
(23)
A(m  r) = A(m)
(24)
We see that
Y
m
(k) = e
j
2
N
km
A(m)e
j(m)
W (
2
N
k 
i
(m)) ,
(25)