Talk:Spectral leakage

Latest comment: 1 year ago by 213.118.94.49 in topic Windowing vs leakage

Windowing vs leakage

edit

> No, windowing is not the cause of leakage This comment is correct.

DFT leakage is introduced when you have a sine of let's say 50 kHz, but decide to sample this signal at not 400 kHz, but 500 kHz (fsample is not a multiple of fsine).

Windowing is a technique which you can apply to your sample data (rectangular, hamming, hanning, sine / essentially multiply by another signal of lower frequency) to reduce the DFT leak drastically. — Preceding unsigned comment added by 213.118.94.49 (talk) 19:32, 18 April 2023 (UTC)Reply


Untitled

edit

Basic How do you compute "Leakage"? For instance, which calculations do you need to perform to obtain the plot in the figure? —Preceding unsigned comment added by 93.144.183.117 (talk) 12:55, 24 January 2011 (UTC)Reply

Spectral leakage is not caused by the DFT. It is caused by windowing. The DFT is actually a way to create the illusion that there is no leakage. That's what is going on when the input signal does not have "frequency components that lie between [DFT] reference frequencies". (Another requirement for the illusion is that you use a rectangular window function.) Anyhow, this article off to a bad start. A better start is at Window_function#Spectral_analysis. But it does not [yet] customize the discussion for the discrete-time case, which is what most people are used to dealing with. --Bob K 20:58, 12 December 2005 (UTC)Reply

A common misconception is that spectral leakage is caused by the

Huh? An article with this title should start by saying what spectral leakage is. And it should follow Wikipedia's bolding convention. And this link that superficially looks like a self-link should be put elsewhere and it should be clear what it is. Michael Hardy 22:01, 15 December 2005 (UTC)Reply

Right. That's why it's a stub and always has been. But the stuff I replaced was worse, because it was misinformation. As I say in an embedded comment: "Can't redirect to a subtopic (Window_function#Spectral_analysis), or else I would be tempted." --Bob K 23:10, 15 December 2005 (UTC)Reply

Yes, windowing IS the cause of leakage

edit

Ajgorton says: "Windowing IS NOT the cause of leakge. When the signal is NOT PERIODIC within the time timeblock, leakage will occur. Windows attempt to resolve this issue."

Then how do you explain that the continuous time Fourier transform of any windowed cosine function is no longer a dirac delta?

--Bob K 08:35, 2 June 2007 (UTC)Reply

No, windowing is not the cause of leakage

edit

In response to the comment above: If you choose the window to be identically equal to one, then the continuous-time windowed Fourier transform of a cosine remains a Dirac delta function.

Having said that, the usefulness of windowing is not in situations like this, where the signal is known analytically "for all time", but in situations where the signal has been truncated to a finite length (as would be the case in any conceivable practical application). In such cases, windowing is an effective technique to reduce broad-band spectral leakage. This is covered in many undergraduate-level books on signal processing.

An infinite-length window is no window at all. Please don't waste our time with semantic games.
--Bob K 15:26, 11 June 2007 (UTC)Reply


non-uniform sampling

edit

On 4-Jan-2007, User:mschaner added this to the article:

Another way that spectral leakage can happen is through non-uniform sampling. A non-uniformly sampled sinusoidal waveform will show spectral leakage in its Fourier transform as compared to a transform of the same waveform that has been sampled uniformly. This often occurs in digital waveform sythesis when the waveform samples are generated from a look-up table. See [1]

But I looked at the reference, and it describes the effect not as leakage, but as distortion.

--Bob K 03:56, 31 July 2007 (UTC)Reply

Not sure if Bob has read the whole paper or just the abstract, but the whole reason for trying to come up with a better method of look-up table waveform synthesis is to reduce spectral leakage. The effect of the spectral leakage is that it causes harmonic distortion in the resulting analog waveform. I thought it would be useful to have an example that shows the effect occuring in a real world problem. Mschaner 06:08, 12 August 2007 (UTC)Reply

I am just hoping to avoid unnecessary overloading of the term "spectral leakage", if there is a more specific term for the specific effect you are talking about. For instance, perfectly uniform sampling also introduces new frequency components. But to distinguish that distortion from the kind caused by windowing, we call it "aliasing". I don't know any other term for the effect of windowing than "leakage". But perhaps there is another term for the effect of non-uniform sampling.
--Bob K 13:00, 12 August 2007 (UTC)Reply

I don't know of any term to distinguish the causes of spectral leakage. Windowing and non-uniform sampling have a very similar effect on the analog waveform. Both effects can also be completely described analytically and there are a number of references in print that deal with both of them. In loose terms, both effects are basically the result of incompletely or incorrectly representing a waveform by repeating a segment of it (or an approximation of the segment). Different types of windows try to soften the blow of using such a segment. Both windowing and non-uniform sampling distort the analog waveform with known periodicity. Aliasing is quite different because it involves mixing the high frequncies of a signal with it's low frequencies, whereas windowing and non-uniform sampling introduce frequencies that were not there in the first place.Mschaner 02:32, 18 August 2007 (UTC)Reply

I don't understand the viewpoint that non-uniform sampling represents a waveform by repeating a segment of it. I think I understand where that viewpoint comes from in regard to windowing, but I don't agree with it. For instance, the window function  , applied to   produces only the segment  , which is not repetitious. But it does contain frequencies other than  , which is "leakage". Even if you sample the windowed function with  , the result is not repetitious (in the time domain). But now it contains both leakage and aliasing. The Fourier transform of the sampled and windowed function is periodic and continous (see DTFT). And the inverse continuous Fourier transform (or inverse DTFT, if you prefer) of course exactly reproduces the non-repetitious windowed and sampled function. The repetitiousness that I think you are talking about happens when you inverse transform only a discrete subset (i.e. samples) of the DTFT. And of course it is called DFT. The repetitiousness is caused by doing a discrete inverse transform instead of a continuous one. It has nothing to do with windowing or sampling.
--Bob K 13:21, 18 August 2007 (UTC)Reply

Maybe I should have been more specific. I was talking about the particular type of non-uniform sampling discussed in the paper, which is periodic. As for windowing, I was refering to the fact that the windowed segment would be an accurate representation if the signal was actually the same as what you get if you repeat the windowed segment. In all practical cases, it is not. That is why there are many different types of windows - so you can pick the one the minimizes the errors that you are trying to avoid. Anyway, the point is that this is a different effect from aliasing.Mschaner 02:03, 21 August 2007 (UTC)Reply

Of course it is. But it (i.e. non-uniform sampling) is also different than windowing, which is why I would prefer their effects to have different names, if possible. But we are not here to make up new names, so my wish will probably not come true. The root of the problem is that "leakage" is too general. One could (and probably should) argue that "aliasing" is a special form of "leakage" with its own name. (It does create frequency components that are not in the original Fourier transform.) Windowing is also a special form, but it lacks a special name.
The notion of "repeating the windowed segment" is not very useful/practical, as you said. And as I said, it derives from a lack of understanding of what the periodicity of the inverse DFT really means. In cases of practical interest, it is just an approximation error. The approximation usually takes place when we do a DFT of the windowed samples instead of a DTFT, because the DFT only provides a discrete subset of the continuous (and periodic) DTFT (which is an exact Fourier transform). Without the whole DTFT, it is impossible to do an exact transform back to the time domain. The penalty is a periodicity that usually did not exist before. Rather than handle it as an approximation error, most professors sidestep the issue by starting with "assume an infinitely periodic signal...". And mathematicians like to handle it by pretending the time and frequency domains are "finite". What happens outside their limited vision does not matter. These viewpoints are not wrong, but I believe they are misleading and unrealistic. "Approximation error" is unsatisfying to a mathematician, but it is the most honest explanation in the vast majority of cases.
--Bob K 08:58, 21 August 2007 (UTC)Reply

I disagree that aliasing is a special form of leakage. We use the term leakage because the effect resembles that of liquid leaking out of a container. I wouldn't say that about aliasing. Nevertheless, I will remove my paragraph in the interest of clarity.Mschaner 02:04, 22 August 2007 (UTC)Reply

I don't want to call it leakage either. But if somebody did, I could see their point, because the word is so broad. Another disadvantage is the connotation that the leakage is one-way, or "out" as you said. But what leaks out of one frequency also leaks in to the others. The leakiest windows create DFT bins that absorb the most noise power, resulting in a loss of sensitivity (highest noise-floor). So an equally valid name would be absorption.
--Bob K 11:07, 22 August 2007 (UTC)Reply

Most of what goes into an encyclopedia (or a dictionary for that matter) is driven by common usage. No one uses leakage to describe aliasing. It is used to describe the effect resulting from windowing, and sometimes the effect from non-uniform sampling. I have never seen the term absorption used.Mschaner 11:42, 23 August 2007 (UTC)Reply

Google confirms the non-uniform sampling usage and more, such as out-of-band frequencies produced by a transmitter, and imperfectly rejected reflections from luminescent-paint, and probably many more. However, I refreshed my memory of the guidelines at Disambiguation#Deciding_to_disambiguate and found this:
"In other words, disambiguations are paths leading to the different article pages that could use essentially the same term as their title."
and this:
"A disambiguation page is not a list of dictionary definitions. A short description of the common general meaning of a word can be appropriate for helping the reader determine context. Otherwise, there are templates for linking the reader to Wiktionary, the wiki dictionary; see Wikipedia:Wikimedia sister projects#Wiktionary."
Since we don't actually have an article about non-uniform sampling (do we?) or transmitter leakage, I think a disambig page would be basically just that... a list of dictionary definitions. My suggestion is that you start an article about the non-uniform sampling, and we move the content of this article to a new one called "Spectral leakage (windowing)", and then we turn "Spectral leakage" into a disambiguation page with links to both articles.
Caveat: This article is not very good or complete. It is a subset of Window_function#Spectral_analysis, but with an emphasis on the common misconceptions that I found here (and in other articles) when I first arrived. People who won't bother to dig into Window_function#Spectral_analysis might pause long enough to read the brief admonitions found here. That seemed worthwhile to me, and to my great surprise the article has survived a long time in this form. So apparently there are others who agree. But eventually some good Samaritan will finish the cleanup that I only began.
--Bob K 15:16, 23 August 2007 (UTC)Reply

Relation to aliasing

edit

Please could someone differentiate it from aliasing in the article?--Adoniscik (talk) 18:25, 23 January 2008 (UTC)Reply

Sampling and windowing both create frequency components that were not present beforehand. With sampling, it is due to the convolution of the original spectrum with a "comb" of Dirac delta functions, spaced at the sample-rate, which has a replication effect. The higher the rate, the farther apart are the replicas, and the less likely are the aliases to be a problem. With windowing, it is due to the convolution of the original spectrum with the spectrum of the window function. That has a smearing effect, rather than a replication effect. The wider the window, the narrow is its spectrum, and the less is the smearing.
This might also help: Discrete_Fourier_transform#Spectral_analysis
--Bob K (talk) 02:06, 24 January 2008 (UTC)Reply

So it's the convolution with the sinc function artifact (for rectangular windows)?--Adoniscik (talk) 02:57, 24 January 2008 (UTC)Reply

Yes. You've got it (except I wouldn't have used the word "artifact"). As the rectangular window widens (to infinity), the sinc function narrows (to a delta function). Convolution with the delta function produces no "leakage", just as windowing with an infinitely wide rectangle does not change the time-domain waveform.
--Bob K (talk) 14:18, 24 January 2008 (UTC)Reply

An unfamiliar name (to me) for a familiar phenomenon. You could cut the writing in half with an animated diagram. If anyone has the inclination, go for it.Adoniscik (talk) 23:07, 24 January 2008 (UTC)Reply

It's not animated, but there is a picture at DTFT#Finite-length_sequences.

Clarification to Windowing and definition of DFT

edit

I have a problem with a couple things. For starters:

1. Windowing is without a doubt the cause of spectral leakage. This extends from the duality of multiplication and convolution. Rectangular windowing of a cosine function, for example, is the same as multiplying the signal by a rect function. Multiplication in the time domain corresponds to convolution in the frequency domain, or more specifically for discrete sets, cyclic convolution in the frequency domain. The Fourier transform of the rect function is a sinc function, hence why the resulting frequency domain representation of the magnitude is a sinc function. As the window broadens to infinity, its FT approaches the dirac function, in which case the convolvement is now trivial and we're left with a perfect(ideal) dirac function in the frequency domain. This also coincides with Schrodinger's uncertainty principle which details the inverse proportionality between length of observation(window) in the time domain and the width of the FT.

I agree. The article used to agree also, but it has been butchered.
--Bob K (talk) 22:26, 8 June 2009 (UTC)Reply

2. I have a big problem with this statement:

"the DFT can be interpreted as the DTFT of the original signal, truncated (via a rectangular filter), then repeated periodically"

Absolutely not. the DFT is nothing more than a sampled version of the DTFT. Nothing more, nothing less. the DTFT is the Fourier transform of a discrete set, and is thus already windowed rectangularly for finite sets. Taking the DFT of a discrete set results in a sampled version of the DTFT. While the DTFT is continuous, the DFT represents the DTFT in a set of discrete points. 192.17.144.247 (talk) 18:18, 8 June 2009 (UTC)Reply

Well you're both wrong. Whereas the DTFT is defined for infinite, aperiodic sequences, the DFT is not. Therefore it is something less than a sampled version of the DTFT.
--Bob K (talk) 22:26, 8 June 2009 (UTC)Reply
Okay, I shouldn't have been so definitive with my words without limiting the scope. I agree with what you say, and my notion of the relationship between the DTFT and DFT extended from practical, real-world applications and ignored the theoretical conclusions of infinite sequences. I qualified my statement slightly by saying finite sets, but I should have been more general/clear in my response. Nonetheless, we can agree the original statement is flawed.
173.15.28.209 (talk) 16:10, 9 June 2009 (UTC)Reply
Yes, I think we do agree. Are the current mods salvageable?... Is there any value-added?... Or should we just revert back? That's the question I haven't been able to get motivated to answer. I've gotten a bit weary of the editorial thrashing that defines Wikipedia.
--Bob K (talk) 10:56, 10 June 2009 (UTC)Reply

Lobes / skirts

edit

My professors call the arcs "lobes" or "skirts". In particular he calls all the arcs except the central for "side lobes". In the "side lobe" article, there is a link to this article talking about lobes in signal processing.

I however do not feel too confident in my terminology or knowledge on this topic to change it, but could someone write a line about this terminology, and perhaps make a link from "Lobe (disambiguation)" to here. It took me forever to find this article.

77.67.176.125 (talk) 22:18, 7 March 2012 (UTC)Reply

I think you've got it backward. The article Sidelobe is the right place for the terminology explanation, and this article should link to that.
--Bob K (talk) 01:29, 8 March 2012 (UTC)Reply