[Scipy-tickets] [SciPy] #1105: Logarithmic chirp frequency sweep incorrect
SciPy Trac
scipy-tickets@scipy....
Mon Feb 8 15:06:07 CST 2010
#1105: Logarithmic chirp frequency sweep incorrect
-----------------------------------------+----------------------------------
Reporter: johntryan | Owner: somebody
Type: defect | Status: needs_review
Priority: normal | Milestone: 0.8.0
Component: scipy.signal | Version: 0.7.0
Keywords: chirp logarithmic frequency |
-----------------------------------------+----------------------------------
Comment(by johntryan):
I am not sure that the logarithm section is correct.
In the earlier discussion,
f(t) = f0 + (f1 - f0)**(t/t1)
is given as a formula for a logarihmic sweep from f0 to f1,
but surely this cannot be so as with t=0 it gives f(0)=f0+1.0, forcing the
introduction of adjustments to correct for the 1.0
The alternative formula
f(t) = f0*(f1/f0)**(t/t1),
results naturally in f(0) = f0 and f(t1) = f1.
With this formula the integral of 2*pi*f(t) given earlier is
phase = 2*pi * f0 * ((f1/f0)**(t/t1) - 1) * t1/log(f1/f0)
Using this formula, there is no need for the special handling of f1 == f0
+ 1.0
and the following four lines in the diff
{{{
254 if f0 + 1.0 == f1:
255 phase = 2*pi * (f0 + 1) * t
256 else:
257 beta = t1 / log(f1 - f0)
258 phase = 2*pi * (f0*t + beta * (pow(f1 - f0, t/t1) -
1.0))
}}}
can be replaced with
{{{
beta = t1 / log(f1/f0)
phase = 2*pi * f0 * (pow(f1/f0, t/t1) - 1.0) * beta
}}}
The constraints remain f0>0, f1>0, f1>f0
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1105#comment:5>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list