DSPRelated.com
Forums

Analyzing Cross Spectrum for Pitch.

Started by MatthewA May 17, 2016
On Mon, 23 May 2016 13:31:26 -0700 (PDT), robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On Sunday, May 22, 2016 at 10:28:21 PM UTC-4, Eric Jacobsen wrote: >> On Sun, 22 May 2016 21:20:47 -0500, "Cedron" <103185@DSPRelated> >> wrote: >>=20 >> >[...snip...] >> >> >> >>The output of any Fourier Transform of a finite-duration signal, >> >>continuous or discrete, quantized or not, is the convolution of the >> >>signal transform and the window function transform. > >this premise needs to be clarified, or else i will say it's not true. Eric= >, i *know* we have (in this newsgroup) been over this time and again. it's= > repeating, but maybe not a periodic repeating argument we have here at com= >p.dsp.
Yes, ad nauseum, which is why I said I didn't want to revisit it, and I won't. I recall that my conclusion of all that was that your perspective was perfectly valid and is certainly one mathematically self-consistent way of looking at the issue. It is not, however, the only way, and my personal preference is one of the other ways. I think understanding the multiple approaches is a Good Thing, though.
On Monday, May 23, 2016 at 4:46:51 PM UTC-4, Eric Jacobsen wrote:
> On Mon, 23 May 2016 13:31:26 -0700 (PDT), robert bristow-johnson > <rbj@audioimagination.com> wrote: > > >On Sunday, May 22, 2016 at 10:28:21 PM UTC-4, Eric Jacobsen wrote: > >> On Sun, 22 May 2016 21:20:47 -0500, "Cedron" <103185@DSPRelated> > >> wrote: > >>=20 > >> >[...snip...] > >> >> > >> >>The output of any Fourier Transform of a finite-duration signal, > >> >>continuous or discrete, quantized or not, is the convolution of the > >> >>signal transform and the window function transform. > > > >this premise needs to be clarified, or else i will say it's not true. Eric= > >, i *know* we have (in this newsgroup) been over this time and again. it's= > > repeating, but maybe not a periodic repeating argument we have here at com= > >p.dsp. > > Yes, ad nauseum, which is why I said I didn't want to revisit it, and > I won't. > > I recall that my conclusion of all that was that your perspective was > perfectly valid and is certainly one mathematically self-consistent > way of looking at the issue. It is not, however, the only way, and > my personal preference is one of the other ways. I think > understanding the multiple approaches is a Good Thing, though.
yeah, but i'm a goddamn fascist. the periodic extension is the only consistent (and "parsimonious", geez i hate that word) and only mathematically correct way. the "case statements" or "if statements" are not, in my opinion, as consistent as not having such case statements. (see the stack exchange reference i posted earlier.) the case statements slip in numbers (which you say is "0", but what i say could just as well be "5" or "5000" or "the man on the moon") which never enter into the mathematics of any theorem of the DFT. slipping in those extraneous and irrelevant numbers may have the consequence of misleading someone into *using* those extraneous or irrelevant numbers in their mathematics. and when they do, then a concrete, mathematical error occurs. r b-j
Cedron <103185@DSPRelated> wrote:

>What is clearly missing from your replies is any reference to the equation >I derived already being known. If you have any reference to this >equation, you should still post it.
>If anybody else has one, it would be nice if you posted as well.
I think that would be nice too. I also think that both mathematically exact derivations, and approximate derivations, are widely used in signal processing and in every other branch of science, and any scientist needs to know the difference between these two, and not try to lump them together as the same thing. I therefore think it is rather spurious to try to dismiss the role of exact derivations, just because approximations occur elsewhere. Steve
On Mon, 23 May 2016 13:59:19 -0700 (PDT), robert bristow-johnson
<rbj@audioimagination.com> wrote:

>On Monday, May 23, 2016 at 4:46:51 PM UTC-4, Eric Jacobsen wrote: >> On Mon, 23 May 2016 13:31:26 -0700 (PDT), robert bristow-johnson >> <rbj@audioimagination.com> wrote: >>=20 >> >On Sunday, May 22, 2016 at 10:28:21 PM UTC-4, Eric Jacobsen wrote: >> >> On Sun, 22 May 2016 21:20:47 -0500, "Cedron" <103185@DSPRelated> >> >> wrote: >> >>=3D20 >> >> >[...snip...] >> >> >> >> >> >>The output of any Fourier Transform of a finite-duration signal, >> >> >>continuous or discrete, quantized or not, is the convolution of the >> >> >>signal transform and the window function transform. >> > >> >this premise needs to be clarified, or else i will say it's not true. E= >ric=3D >> >, i *know* we have (in this newsgroup) been over this time and again. i= >t's=3D >> > repeating, but maybe not a periodic repeating argument we have here at = >com=3D >> >p.dsp. >>=20 >> Yes, ad nauseum, which is why I said I didn't want to revisit it, and >> I won't. >>=20 >> I recall that my conclusion of all that was that your perspective was >> perfectly valid and is certainly one mathematically self-consistent >> way of looking at the issue. It is not, however, the only way, and >> my personal preference is one of the other ways. I think >> understanding the multiple approaches is a Good Thing, though. > >yeah, but i'm a goddamn fascist. the periodic extension is the only consis= >tent (and "parsimonious", geez i hate that word) and only mathematically co= >rrect way. the "case statements" or "if statements" are not, in my opinion= >, as consistent as not having such case statements. (see the stack exchang= >e reference i posted earlier.) the case statements slip in numbers (which = >you say is "0", but what i say could just as well be "5" or "5000" or "the = >man on the moon") which never enter into the mathematics of any theorem of = >the DFT. slipping in those extraneous and irrelevant numbers may have the = >consequence of misleading someone into *using* those extraneous or irreleva= >nt numbers in their mathematics. and when they do, then a concrete, mathem= >atical error occurs. > >r b-j
It was a good and memorable discussion. There were plenty of interesting arguments and perspectives on all sides.
On Mon, 23 May 2016 15:31:25 -0500, "Cedron" <103185@DSPRelated>
wrote:

>> >>Since you seem to be unaware of the very large body of work already >>done in this area, I think you should start there. Perhaps look into >>topics like window functions. > >Your assumption is wrong, I am very familiar with it. The problem is that >it is difficult to search it for the specific topics at issue. For >instance, when I use the term "complex tone", the results come back with >tons of references that are actually about "complicated tones". I have >found many pages like the one I referenced earlier, but I have yet to find >one pertaining to complex tones. > >This is a statement of yours that I have a big problem with: > >"Attempting to make a point about the inadequacy of the (correct) sinx/x >model by comparing the DFT output for a real-valued tone with the expected >output for a complex-valued is not competent." > >I have yet to find any web page or paper that states that the Sinc >function is the correct model for the side lobe magnitudes of a pure >complex tone. If you know of one, please provide it.
>I have found plenty that say that the Sinc function and a rectangular >window are Fourier pairs. Hey, I was a Calculus TA in college, I don't >have a problem with that.
Then you're already there. Multiplication in one domain is convolution in the other. Multiplication of a time sequence by a rectangular window (to time limit it, e.g., for any practical analysis), convolves the sinx/x transform of the rectangular window with the signal transform in the frequency domain. Since the transform of a complex-value tone (or a complex exponential or a rotating phasor or whatever you want to call it), convolves the dirac-delta distribution (that is the FT of the tone) with the sinx/x. Hence, the output of the FT of a time-limited tone is the convolution of the FT of a diract-delta distribution with a sinx/x, i.e., a sinx/x. That's the math. It works in the continuous or discrete cases, and it's why the sinx/x is widely used to model the FT response to a tone. I'm not sure what it has to do with anything, since you seemed to really be taking issue with people using parabolas to model the main lobe of the sinx/x. There are cases where that is accurate (although I can't recall wether it is for magnitude or magnitude-squared or what the condition is), but it is only used for the main lobe, not the sidelobes. And who cares what people use? All sorts of imperfect models are used to get accuracy adequate for the application, which is what engineering is all about. Don't spend unnecesessary complexity where it isn't needed.
>I have a huge problem with this statement of yours: > >"Since the math is consistent from the fundamentals for the continuous or >discrete cases, ..." > >The math is not consistent from the fundamentals. A summation is not the >same as an integral. You cannot assume that you can go back and forth >between the continuous case and the discrete case with the same formulas.
The transform of a rectangular window is consistent between the continuous and discrete cases. Sampling works in either domain. Just like anything else there may be nuances that one has to keep track of, but that's not unusual at all.
>In order to disprove something in Math, all you need is a single >counterexample. I have provided one that clearly shows that the Sinc >function does not accurately model the side lobe magnitudes of a pure >complex tone. In addition, I've also provided a function that does model >them exactly. One example does not prove that, but the derivation does.
Are you talking about the table you posted earlier where you compared the FT of a real-valued tone with the sinx/x expected output of a complex-valued tone? That's not much of an example of anything other than you're comparing apples and oranges.
On Tue, 24 May 2016 00:18:04 GMT, eric.jacobsen@ieee.org (Eric
Jacobsen) wrote:

>On Mon, 23 May 2016 15:31:25 -0500, "Cedron" <103185@DSPRelated> >wrote: > >>> >>>Since you seem to be unaware of the very large body of work already >>>done in this area, I think you should start there. Perhaps look into >>>topics like window functions. >> >>Your assumption is wrong, I am very familiar with it. The problem is that >>it is difficult to search it for the specific topics at issue. For >>instance, when I use the term "complex tone", the results come back with >>tons of references that are actually about "complicated tones". I have >>found many pages like the one I referenced earlier, but I have yet to find >>one pertaining to complex tones. >> >>This is a statement of yours that I have a big problem with: >> >>"Attempting to make a point about the inadequacy of the (correct) sinx/x >>model by comparing the DFT output for a real-valued tone with the expected >>output for a complex-valued is not competent." >> >>I have yet to find any web page or paper that states that the Sinc >>function is the correct model for the side lobe magnitudes of a pure >>complex tone. If you know of one, please provide it. > >>I have found plenty that say that the Sinc function and a rectangular >>window are Fourier pairs. Hey, I was a Calculus TA in college, I don't >>have a problem with that. > >Then you're already there. Multiplication in one domain is >convolution in the other. Multiplication of a time sequence by a >rectangular window (to time limit it, e.g., for any practical >analysis), convolves the sinx/x transform of the rectangular window >with the signal transform in the frequency domain. Since the >transform of a complex-value tone (or a complex exponential or a >rotating phasor or whatever you want to call it), convolves the >dirac-delta distribution (that is the FT of the tone) with the sinx/x. >Hence, the output of the FT of a time-limited tone is the convolution >of the FT of a diract-delta distribution with a sinx/x, i.e., a >sinx/x. > >That's the math. It works in the continuous or discrete cases, and >it's why the sinx/x is widely used to model the FT response to a tone. > >I'm not sure what it has to do with anything, since you seemed to >really be taking issue with people using parabolas to model the main >lobe of the sinx/x. There are cases where that is accurate >(although I can't recall wether it is for magnitude or >magnitude-squared or what the condition is), but it is only used for >the main lobe, not the sidelobes. > >And who cares what people use? All sorts of imperfect models are >used to get accuracy adequate for the application, which is what >engineering is all about. Don't spend unnecesessary complexity where >it isn't needed. > >>I have a huge problem with this statement of yours: >> >>"Since the math is consistent from the fundamentals for the continuous or >>discrete cases, ..." >> >>The math is not consistent from the fundamentals. A summation is not the >>same as an integral. You cannot assume that you can go back and forth >>between the continuous case and the discrete case with the same formulas. > >The transform of a rectangular window is consistent between the >continuous and discrete cases. Sampling works in either domain. >Just like anything else there may be nuances that one has to keep >track of, but that's not unusual at all. > >>In order to disprove something in Math, all you need is a single >>counterexample. I have provided one that clearly shows that the Sinc >>function does not accurately model the side lobe magnitudes of a pure >>complex tone. In addition, I've also provided a function that does model >>them exactly. One example does not prove that, but the derivation does. > >Are you talking about the table you posted earlier where you compared >the FT of a real-valued tone with the sinx/x expected output of a >complex-valued tone? That's not much of an example of anything other >than you're comparing apples and oranges.
So, just to illustrate slightly better, I did the following today on MathCAD while I was waiting on the phone or whatever: http://ericjacobsen.org/dsp/dftsinc.pdf This compares the dft magnitude, the usual sinc(x) = sinx/x model (for the continuous case) and the Dirichlet kernel, which does fit better for the discrete case as one moves further from the main lobe (as rb-j alluded). As N increases the difference decreases, and the differences are always smallest around the main lobe. This makes it practical for many applications to use sinx/x as the model at the main lobe, especially for large N, especially when the relative shape is of concern and not the scale factor. As N increase to infinity, the error between the dft magnitude and the sinx/x vanishes everywhere. The comparison here is apples-to-apples in the sense that the tone is complex-valued and the expected sinc() shape and Dirichlet kernel match the signal. Note also that other than the small magnitude errors, the general sinx/x shape (e.g., sidelobe peak and zero locations), are consistent with the Dirichlet kernel, which makes it a reasonable model in many cases for sidelobe or "leakage" analysis for large N. Applications that are more sensitive to sidelobe energy levels (especially moving away from the main lobe) are better served with the Dirichlet kernel, especially for small N.
[...snip...]

>Then you're already there. Multiplication in one domain is >convolution in the other. Multiplication of a time sequence by a >rectangular window (to time limit it, e.g., for any practical >analysis), convolves the sinx/x transform of the rectangular window >with the signal transform in the frequency domain. Since the >transform of a complex-value tone (or a complex exponential or a >rotating phasor or whatever you want to call it), convolves the >dirac-delta distribution (that is the FT of the tone) with the sinx/x. >Hence, the output of the FT of a time-limited tone is the convolution >of the FT of a diract-delta distribution with a sinx/x, i.e., a >sinx/x. > >That's the math. It works in the continuous or discrete cases, and >it's why the sinx/x is widely used to model the FT response to a tone.
And it is totally unnecessary. The behavior of the DFT can be fully understood from its definition with absolutely no reference or reliance on the continuous FT. For a common sense intepretation of side lobe values (not just magnitudes) which is independent of both the Sinc function and the notion of orthogonality in vector spaces, I suggest you read and try to understand my blog article titled "DFT Graphical Interpretation: Centroids of Weighted Roots of Unity" which can be found here: https://www.dsprelated.com/showarticle/768.php I think you said it very well: "It is not, however, the only way, and my personal preference is one of the other ways. I think understanding the multiple approaches is a Good Thing, though."
> >I'm not sure what it has to do with anything, since you seemed to >really be taking issue with people using parabolas to model the main >lobe of the sinx/x. There are cases where that is accurate >(although I can't recall wether it is for magnitude or >magnitude-squared or what the condition is), but it is only used for >the main lobe, not the sidelobes. >
You are clearly misunderstanding the issue. Which of these statements are true? "The lobe of a Sinc function looks like a parabola." or "The lobe of a Sinc function is a parabola." Therein lies the distinction between having an approximation and an exact(/true/correct) solution. A mathematical equation is more than just a means to calculate an answer, it is also a descriptive statement. I agree completely with Steve Pope that one should know whether the equation one is working with is the "is" variety or the "looks like" variety. No real life implementation is going to be perfectly precise. Everybody understands this. It goes back at least to Plato and his conceptualization of the ideal circle. However, this is an independent concept to whether you have an approximation or an exact solution. Even though they may fall within the same imprecision range, the two concepts should not be muddled and the former should not be used as an excuse to disregard the latter.
>And who cares what people use? All sorts of imperfect models are >used to get accuracy adequate for the application, which is what >engineering is all about. Don't spend unnecesessary complexity where >it isn't needed. >
There is nothing wrong with using approximations, whether it is to save computation complexity or the mathematical solution only allows series solutions. A parabola can be thought of as a truncated Taylor's series. It is quite adequate in many applications. People do tend to care when approximations are passed off as truths. Engineering is about a lot more than just coming up with numerical answers. [...snip...]
> >The transform of a rectangular window is consistent between the >continuous and discrete cases. Sampling works in either domain. >Just like anything else there may be nuances that one has to keep >track of, but that's not unusual at all. >
Those nuances are important. One of them must have tripped you up since you are getting an incorrect answer. This is not my first trip to the rodeo and I'm not going to do your work for you to figure out where you went wrong. There is a large body of work out there that you seem to be unaware of. I suggest you look into "Real Analysis" and learn about deltas, epsilons, and the concept of taking a limit. [...snip...]
> >Are you talking about the table you posted earlier where you compared >the FT of a real-valued tone with the sinx/x expected output of a >complex-valued tone? That's not much of an example of anything other >than you're comparing apples and oranges.
No, I'm talking about my followup post where I did the same analysis using a complex valued tone. I also provided the correct(/exact/true) equation for the side lobe magnitude drop offs. I would suggest you go back and look at it. Ced --------------------------------------- Posted through http://www.DSPRelated.com
[...snip...]
> >So, just to illustrate slightly better, I did the following today on >MathCAD while I was waiting on the phone or whatever: > >http://ericjacobsen.org/dsp/dftsinc.pdf > >This compares the dft magnitude, the usual sinc(x) = sinx/x model (for >the continuous case) and the Dirichlet kernel, which does fit better >for the discrete case as one moves further from the main lobe (as rb-j >alluded). >
You are still talking about an approximation instead of an exact solution. I had to look up the Dirichlet kernel: sin( (n+1/2)x ) / sin( x/2 ) Here is the corresponding exact solution: sin( Pi*x ) / ( N*sin( Pi*x/N ) ) The two are nearly identical when rescaled horizontally and vertically. The difference that remains, ironically enough, is the same as the difference between the count formula and the area formula from my triangle example, except in reverse.
>As N increases the difference decreases, and the differences are >always smallest around the main lobe. This makes it practical for >many applications to use sinx/x as the model at the main lobe, >especially for large N, especially when the relative shape is of >concern and not the scale factor. As N increase to infinity, the >error between the dft magnitude and the sinx/x vanishes everywhere. >
This is typical behavior when an equation from the continuous case is applied to the discrete case. The larger N becomes, the more the discrete case resembles the continuous case. Amazingly, the continuous case is often the limit of the discrete case as N approaches infinity. Welcome to Calculus. The Sinc function approaches the exact answer because of this: limit[N --> Infinity] N*sin( Pi*x/N ) = Pi*x
>The comparison here is apples-to-apples in the sense that the tone is >complex-valued and the expected sinc() shape and Dirichlet kernel >match the signal. > >Note also that other than the small magnitude errors, the general >sinx/x shape (e.g., sidelobe peak and zero locations), are consistent >with the Dirichlet kernel, which makes it a reasonable model in many >cases for sidelobe or "leakage" analysis for large N. Applications >that are more sensitive to sidelobe energy levels (especially moving >away from the main lobe) are better served with the Dirichlet kernel, >especially for small N.
Once again, "looks like" vs "is". The Dirichlet kernel is still an approximation, no matter what size n is. I have given you the exact equation for the magnitudes for any n, large or small. Here is the equation for the actual complex value: The Signal (assume M>0) S_n = M * exp[ i * ( n*f*2Pi/N + p ) ] Where f = frequency in cycles per frame (N samples) p = phase Let a = f*2Pi/N Let b_k = k*2Pi/N Let d = a - b_k The exact bin value formula is Z_k = (M/N) exp(i*p) [ ( 1 - exp(i*d*N) ) / ( 1 - exp(i*d) ) ]^(1/2) Taking the magnitude of the bin value and using some trig identities leads to: Let x = f - k = d * N/(2Pi) |Z_k| = M * |sin( Pi*x ) / ( N*sin( Pi*x/N ) )| Any questions? Ced --------------------------------------- Posted through http://www.DSPRelated.com
On Tue, 24 May 2016 06:11:15 GMT, eric.jacobsen@ieee.org (Eric
Jacobsen) wrote:

>On Tue, 24 May 2016 00:18:04 GMT, eric.jacobsen@ieee.org (Eric >Jacobsen) wrote: > >>On Mon, 23 May 2016 15:31:25 -0500, "Cedron" <103185@DSPRelated> >>wrote: >> >>>> >>>>Since you seem to be unaware of the very large body of work already >>>>done in this area, I think you should start there. Perhaps look into >>>>topics like window functions. >>> >>>Your assumption is wrong, I am very familiar with it. The problem is that >>>it is difficult to search it for the specific topics at issue. For >>>instance, when I use the term "complex tone", the results come back with >>>tons of references that are actually about "complicated tones". I have >>>found many pages like the one I referenced earlier, but I have yet to find >>>one pertaining to complex tones. >>> >>>This is a statement of yours that I have a big problem with: >>> >>>"Attempting to make a point about the inadequacy of the (correct) sinx/x >>>model by comparing the DFT output for a real-valued tone with the expected >>>output for a complex-valued is not competent." >>> >>>I have yet to find any web page or paper that states that the Sinc >>>function is the correct model for the side lobe magnitudes of a pure >>>complex tone. If you know of one, please provide it. >> >>>I have found plenty that say that the Sinc function and a rectangular >>>window are Fourier pairs. Hey, I was a Calculus TA in college, I don't >>>have a problem with that. >> >>Then you're already there. Multiplication in one domain is >>convolution in the other. Multiplication of a time sequence by a >>rectangular window (to time limit it, e.g., for any practical >>analysis), convolves the sinx/x transform of the rectangular window >>with the signal transform in the frequency domain. Since the >>transform of a complex-value tone (or a complex exponential or a >>rotating phasor or whatever you want to call it), convolves the >>dirac-delta distribution (that is the FT of the tone) with the sinx/x. >>Hence, the output of the FT of a time-limited tone is the convolution >>of the FT of a diract-delta distribution with a sinx/x, i.e., a >>sinx/x. >> >>That's the math. It works in the continuous or discrete cases, and >>it's why the sinx/x is widely used to model the FT response to a tone. >> >>I'm not sure what it has to do with anything, since you seemed to >>really be taking issue with people using parabolas to model the main >>lobe of the sinx/x. There are cases where that is accurate >>(although I can't recall wether it is for magnitude or >>magnitude-squared or what the condition is), but it is only used for >>the main lobe, not the sidelobes. >> >>And who cares what people use? All sorts of imperfect models are >>used to get accuracy adequate for the application, which is what >>engineering is all about. Don't spend unnecesessary complexity where >>it isn't needed. >> >>>I have a huge problem with this statement of yours: >>> >>>"Since the math is consistent from the fundamentals for the continuous or >>>discrete cases, ..." >>> >>>The math is not consistent from the fundamentals. A summation is not the >>>same as an integral. You cannot assume that you can go back and forth >>>between the continuous case and the discrete case with the same formulas. >> >>The transform of a rectangular window is consistent between the >>continuous and discrete cases. Sampling works in either domain. >>Just like anything else there may be nuances that one has to keep >>track of, but that's not unusual at all. >> >>>In order to disprove something in Math, all you need is a single >>>counterexample. I have provided one that clearly shows that the Sinc >>>function does not accurately model the side lobe magnitudes of a pure >>>complex tone. In addition, I've also provided a function that does model >>>them exactly. One example does not prove that, but the derivation does. >> >>Are you talking about the table you posted earlier where you compared >>the FT of a real-valued tone with the sinx/x expected output of a >>complex-valued tone? That's not much of an example of anything other >>than you're comparing apples and oranges. > >So, just to illustrate slightly better, I did the following today on >MathCAD while I was waiting on the phone or whatever: > >http://ericjacobsen.org/dsp/dftsinc.pdf > >This compares the dft magnitude, the usual sinc(x) = sinx/x model (for >the continuous case) and the Dirichlet kernel, which does fit better >for the discrete case as one moves further from the main lobe (as rb-j >alluded). > >As N increases the difference decreases, and the differences are >always smallest around the main lobe. This makes it practical for >many applications to use sinx/x as the model at the main lobe, >especially for large N, especially when the relative shape is of >concern and not the scale factor. As N increase to infinity, the >error between the dft magnitude and the sinx/x vanishes everywhere. > >The comparison here is apples-to-apples in the sense that the tone is >complex-valued and the expected sinc() shape and Dirichlet kernel >match the signal. > >Note also that other than the small magnitude errors, the general >sinx/x shape (e.g., sidelobe peak and zero locations), are consistent >with the Dirichlet kernel, which makes it a reasonable model in many >cases for sidelobe or "leakage" analysis for large N. Applications >that are more sensitive to sidelobe energy levels (especially moving >away from the main lobe) are better served with the Dirichlet kernel, >especially for small N. >
I did that in a bit of a hurry yesterday, so I cleaned it up today and added some stuff. Looking at the far sidelobe levels on a log scale highlights the difference between the circular Dirichlet kernel and the linear sinx/x. The Dirichlet kernel is essentially the sinx/x resampled discretely in the frequency domain so the circularity comes into play. The difference is also interesting in the context of power preservation, i.e., Parseval's Theorem.
On Tue, 24 May 2016 19:04:04 GMT, eric.jacobsen@ieee.org (Eric
Jacobsen) wrote:

>On Tue, 24 May 2016 06:11:15 GMT, eric.jacobsen@ieee.org (Eric >Jacobsen) wrote: > >>On Tue, 24 May 2016 00:18:04 GMT, eric.jacobsen@ieee.org (Eric >>Jacobsen) wrote: >>
>>So, just to illustrate slightly better, I did the following today on >>MathCAD while I was waiting on the phone or whatever: >> >>http://ericjacobsen.org/dsp/dftsinc.pdf >> >>This compares the dft magnitude, the usual sinc(x) = sinx/x model (for >>the continuous case) and the Dirichlet kernel, which does fit better >>for the discrete case as one moves further from the main lobe (as rb-j >>alluded). >> >>As N increases the difference decreases, and the differences are >>always smallest around the main lobe. This makes it practical for >>many applications to use sinx/x as the model at the main lobe, >>especially for large N, especially when the relative shape is of >>concern and not the scale factor. As N increase to infinity, the >>error between the dft magnitude and the sinx/x vanishes everywhere. >> >>The comparison here is apples-to-apples in the sense that the tone is >>complex-valued and the expected sinc() shape and Dirichlet kernel >>match the signal. >> >>Note also that other than the small magnitude errors, the general >>sinx/x shape (e.g., sidelobe peak and zero locations), are consistent >>with the Dirichlet kernel, which makes it a reasonable model in many >>cases for sidelobe or "leakage" analysis for large N. Applications >>that are more sensitive to sidelobe energy levels (especially moving >>away from the main lobe) are better served with the Dirichlet kernel, >>especially for small N. >> > >I did that in a bit of a hurry yesterday, so I cleaned it up today and >added some stuff. Looking at the far sidelobe levels on a log scale >highlights the difference between the circular Dirichlet kernel and >the linear sinx/x. The Dirichlet kernel is essentially the sinx/x >resampled discretely in the frequency domain so the circularity comes >into play. The difference is also interesting in the context of power >preservation, i.e., Parseval's Theorem.
Durp...to clarify, I updated the document. Same link: http://ericjacobsen.org/dsp/dftsinc.pdf