Hi, I m trying to learn more about gibbs phenomenon. I found various sites explaining about what is gibbs phenomenon but none of them epxlained the reason behind the phenomenon. Can anyone please explain the reason for the gibbs phenomenon or send me links about the same. Thanks in advance.

# Gibbs Phenomenon

Started by ●June 26, 2008

Posted by ●June 26, 2008

On Jun 26, 7:52 pm, "vasindagi"wrote: > Hi, > I m trying to learn more about gibbs phenomenon. I found various sites > explaining about what is gibbs phenomenon but none of them epxlained the > reason behind the phenomenon. > Can anyone please explain the reason for the gibbs phenomenon or send me > links about the same. > Thanks in advance.For a periodic waveform it can be made of of sine-waves of various harmonic frequencies. If you miss out the higher frequencies you end up with a "bad-fit" - loads on the net. K.

Posted by ●June 26, 2008

On 26 Jun, 09:52, "vasindagi"wrote: > Hi, > I m trying to learn more about gibbs phenomenon. I found various sites > explaining about what is gibbs phenomenon but none of them epxlained the > reason behind the phenomenon.The Fourier transform is defined for *piecewise* continuous functions, which are continuous everywhere except in some discrete points where there are jumps. One example is a rectangular pulse, where the leading and trailing flanks are jump discontinuities. The FT, on the other hand, represents the function in terms of functions that are continuous. The Gibbs phenomenon is a consequence from trying to represent discontinuous functions in terms of continuous ones. Rune

Posted by ●June 26, 2008

On Thu, 26 Jun 2008 02:52:20 -0500, "vasindagi"wrote: >Hi, >I m trying to learn more about gibbs phenomenon. I found various sites >explaining about what is gibbs phenomenon but none of them epxlained the >reason behind the phenomenon.Gibbs phenomenon happens when one tries to represent a signal with discontinuities with Fourier series. If the number of components used in the expansion is finite, it can't represent the discontinuity as a finite sum continuous functions is by definition continuous so there will always be an error.

Posted by ●June 26, 2008

vasindagi schrieb:> Hi, > I m trying to learn more about gibbs phenomenon. I found various sites > explaining about what is gibbs phenomenon but none of them epxlained the > reason behind the phenomenon. > Can anyone please explain the reason for the gibbs phenomenon or send me > links about the same.Depends on "how deep" you want to dig to understand the reason. I would say, the reason for this phenomenon is the "uncertainty relation of signal processing", meaning that you cannot represent a signal that is sharp both in the frequency (Fourier) space and in the spatial (regular/time) domain. Specifically, spikes or edges (depending on whether that's audio or visual information) representing localized objects or phenomena relate to "unlocalized" data in the Fourier domain (e.g. the spectrum of a sharp spike covers more or less all frequencies), and also vice versa. That is, as soon as you represent data in the Fourier domain, and then introduce some kind of loss in this domain by, for example, dropping small coefficients or band-limiting the signal, you end up with "sharpness loss" and the typical Gibbs artifacts near edges; to describe them precisely, an infinite Fourier spectrum is required. Mathematically, one can show that the Fourier series (or the Fourier integral) converges for continuous functions, and converges to the average of the two values at the discontinuity, but the closer you get to the discontinuity, the slower the rate of convergence will become. Specifically, one can also see that for every finite number of terms in the Fourier series approximating a square wave, there is always a point near the edge where the series differs by a constant term from the source signal - mathematically, the convergence is only in l^2 sense (mean square error) and not in the pointwise (l^infinity) sense. This difference is exactly the Gibbs phenomenon. So long, Thomas

Posted by ●June 26, 2008

On Jun 26, 3:52 am, "vasindagi"wrote: > Hi, > I m trying to learn more about gibbs phenomenon. I found various sites > explaining about what is gibbs phenomenon but none of them epxlained the > reason behind the phenomenon. > Can anyone please explain the reason for the gibbs phenomenon or send me > links about the same. > Thanks in advance.They explanation about the limitation of not using higher frequencies isn't really correct - even though it displays the same type of behaviour. Even if you used an infinite number of frequencies the result does not converge at that point i.e. the discontinuity. So what you're seeing is the limitation of sum of sinusoids representation - it does not form a complete basis. It is like trying to represent 3D space with only 2 vectors. A linear combination of 2 vectors can only map out a plane and so you can only get so close to representing any point in 3D space. Hope that helps. Cheers, Dave

Posted by ●June 26, 2008

"vasindagi"wrote in message news:E--dnXOJr4Yp1_7VnZ2dnUVZ_orinZ2d@giganews.com... > Hi, > I m trying to learn more about gibbs phenomenon. I found various sites > explaining about what is gibbs phenomenon but none of them epxlained the > reason behind the phenomenon. > Can anyone please explain the reason for the gibbs phenomenon or send me > links about the same. > Thanks in advance.http://en.wikipedia.org/wiki/Gibbs_phenomenon This makes it pretty clear along with the explanations given by others. My 2 cents: You are trying to represent a waveform of infinite frequency content - and the series doesn't converge as was pointed out. You may want to ask: "How do I get rid of it?" The answer is to *not* try to represent discontinuities that are as sharp as a pure theorectical square wave would be. In the real world they don't exist anyway - although you can certainly generate a waveform that has noticeable Gibbs phenomenon which is a bandlimited signal. Use a lowpass filter of some reasonable bandwidth to smooth out those edges and the ringing goes away. Fred

Posted by ●June 26, 2008

On 26 Jun., 14:43, Davewrote: > On Jun 26, 3:52 am, "vasindagi"You are right in that those do not form a complete basis. However, finite sums of sinusoids approximation to periodic functions don't necessarily display Gibbs ringing at points of discontinuity. Truncating the Fourier series of a periodic function after the first N terms is the best N-bandlimited approximation in the L2 sense (and results in Gibb's). However, using windowing one can reduce or do away with Gibbs ringing altogether for N term sum of sinusoids approximation - one of the points in windowed FIR design is to reduce Gibbs ringing in the approximation of ideal frequency responses. The resulting windowed N term approximation won't be optimal in the L2 sense, but you can suppress the Gibbs ringing. Regards, Andorwrote: > > > Hi, > > I m trying to learn more about gibbs phenomenon. I found various sites > > explaining about what is gibbs phenomenon but none of them epxlained the > > reason behind the phenomenon. > > Can anyone please explain the reason for the gibbs phenomenon or send me > > links about the same. > > Thanks in advance. > > They explanation about the limitation of not using higher frequencies > isn't really correct - even though it displays the same type of > behaviour. Even if you used an infinite number of frequencies the > result does not converge at �that point i.e. the discontinuity. > > So what you're seeing is the limitation of sum of sinusoids > representation - it does not form a complete basis.

Posted by ●June 26, 2008

vasindagi wrote:

Posted by ●June 26, 2008

On Jun 26, 3:52�am, "vasindagi"wrote:

Posted by ●July 6, 2008

"Dave"wrote in message news:d656b993-fb08-4a41-8806-0bfa0978e5b2@d77g2000hsb.googlegroups.com... > On Jun 28, 4:41 pm, Thomas RichterIt's the "basis set" that "forms the basis". I don't know if the norm determines. To me it's always been about whether you can construct and uniquely solve a set of equations on a set of points using that basis. The objective of the equations / the norm / may not be important. But I'd not want to comment on L3, L4, etc. For example, you can use the Fourier cos/sin basis along with the infinity norm - that's what the Remez exchange algorithm does or can do as in the Parks-McClellan implementation... well, at least the cos basis. So, the Fourier Transform yields an L2 approximation and the Remez exchange and L(inf) approximation, etc. Fredwrote: > >> I afraid you don't understand - they *do* form a (Schauder-) basis of >> L^2, provably. But this only implies convergence in L^2 (mean-square >> error) sense, and not in pointwise sense. If you say "basis", you also >> need to define "norm". Actually, elements in L^2 are *not* functions, >> but equivalence classes of them where, specifically, function values >> *at* a point do not make sense, so to say that it "does not converge >> pointwise" makes little sense in an L^2 space. >> >> All this sounds like mathematical nit-picking, but it is important to >> use a proper definition of words specifically in the >> infinite-dimensional cases or you get lost easily. > > I will admit that this area is not my forte, so I am a bit out of my > depth - so take what I say with a grain of salt. I agree with > everything you've said., but I specifically didn't mention a norm. > All I meant to do was point out that it doesn't converge at the one > particular point i.e. the discontinuity. > > I'm sure there must exist some norm for which the fourier transform > doesn't form a basis. Perhaps the infinity norm? Perhaps you can tell > me? > > Cheers, > Dave

Posted by ●July 3, 2008

On Jun 28, 4:41 pm, Thomas Richterwrote: > I afraid you don't understand - they *do* form a (Schauder-) basis of > L^2, provably. But this only implies convergence in L^2 (mean-square > error) sense, and not in pointwise sense. If you say "basis", you also > need to define "norm". Actually, elements in L^2 are *not* functions, > but equivalence classes of them where, specifically, function values > *at* a point do not make sense, so to say that it "does not converge > pointwise" makes little sense in an L^2 space. > > All this sounds like mathematical nit-picking, but it is important to > use a proper definition of words specifically in the > infinite-dimensional cases or you get lost easily.I will admit that this area is not my forte, so I am a bit out of my depth - so take what I say with a grain of salt. I agree with everything you've said., but I specifically didn't mention a norm. All I meant to do was point out that it doesn't converge at the one particular point i.e. the discontinuity. I'm sure there must exist some norm for which the fourier transform doesn't form a basis. Perhaps the infinity norm? Perhaps you can tell me? Cheers, Dave

Posted by ●June 28, 2008

Dave wrote:>> Whether there are complete basis of function spaces is a matter of >> believe (namely if you thrust the axiom of choice). For all practical >> matters, Schauder bases like the free oscillations (cos/sin or exp(ix)) >> are good enough. IOW, you can approximate any function as close as you >> wish with sinoids in the l^2 sense. They do not form a Schauder basis in >> l^\infty sense of the piecewise continuous functions, that's true, but a >> different statement. > > The fourier series doesn't converge at a the point of the > discontinuity and there is always a finite error, and it cannot be > made infinitely small - atleast from what I remember.Look, "convergence" requires a norm, otherwise this word makes no sense. And yes, indeed, the cos/sin series *do* converge to any (non-continuous or continuous) function *in L^2 sense*. I never claimed that they do converge in a *pointwise* sense, which is something entirely different.> I agree with you in mostcases the representation is sufficient.This is not a matter of "what happens in most cases", it is really a matter of picking the mathematically suitable function space. (-:>>> It is like trying >>> to represent 3D space with only 2 vectors. >> No, not at all. In 3D space, you will always have a positive error for >> arbitrary vectors. Here, you can make the error infinitely small. > > > Since the sin/cos bases doesn't form a basis for discontinuous > functions my analogy still stands. To represent the discontinuous > functions you start getting into the theory of distributions.I afraid you don't understand - they *do* form a (Schauder-) basis of L^2, provably. But this only implies convergence in L^2 (mean-square error) sense, and not in pointwise sense. If you say "basis", you also need to define "norm". Actually, elements in L^2 are *not* functions, but equivalence classes of them where, specifically, function values *at* a point do not make sense, so to say that it "does not converge pointwise" makes little sense in an L^2 space. All this sounds like mathematical nit-picking, but it is important to use a proper definition of words specifically in the infinite-dimensional cases or you get lost easily. So long, Thomas

Posted by ●June 27, 2008

>Hi, >I m trying to learn more about gibbs phenomenon. I found various sites >explaining about what is gibbs phenomenon but none of them epxlained the >reason behind the phenomenon. >Can anyone please explain the reason for the gibbs phenomenon or send me >links about the same. >Thanks in advance. >Here's some reading on the Gibbs effect. Steve http://www.dspguide.com/ch11/4.htm P.S. download the pdf version from the page; the HTML graphic isn't detailed enough.

Posted by ●June 27, 2008

On Jun 27, 2:49 am, Thomas Richterwrote: > Dave schrieb: > > > On Jun 26, 3:52 am, "vasindagi"The fourier series doesn't converge at a the point of the discontinuity and there is always a finite error, and it cannot be made infinitely small - atleast from what I remember. I agree with you in mostcases the representation is sufficient.wrote: > >> Hi, > >> I m trying to learn more about gibbs phenomenon. I found various sites > >> explaining about what is gibbs phenomenon but none of them epxlained the > >> reason behind the phenomenon. > >> Can anyone please explain the reason for the gibbs phenomenon or send me > >> links about the same. > >> Thanks in advance. > > > They explanation about the limitation of not using higher frequencies > > isn't really correct - even though it displays the same type of > > behaviour. Even if you used an infinite number of frequencies the > > result does not converge at that point i.e. the discontinuity. > > It doesn't converge *pointwise* at the discontinuity, but it does > converge in l^2 sense, and it also converges pointwise at every epsilon > > > 0 around the discontinuity. > > So what you're seeing is the limitation of sum of sinusoids > > representation - it does not form a complete basis. > > Whether there are complete basis of function spaces is a matter of > believe (namely if you thrust the axiom of choice). For all practical > matters, Schauder bases like the free oscillations (cos/sin or exp(ix)) > are good enough. IOW, you can approximate any function as close as you > wish with sinoids in the l^2 sense. They do not form a Schauder basis in > l^\infty sense of the piecewise continuous functions, that's true, but a > different statement. > > It is like trying > > to represent 3D space with only 2 vectors. > > No, not at all. In 3D space, you will always have a positive error for > arbitrary vectors. Here, you can make the error infinitely small.Since the sin/cos bases doesn't form a basis for discontinuous functions my analogy still stands. To represent the discontinuous functions you start getting into the theory of distributions. Cheers, David

Posted by ●June 27, 2008

Nils schrieb:> vasindagi schrieb: >> Hi, >> I m trying to learn more about gibbs phenomenon. I found various sites >> explaining about what is gibbs phenomenon but none of them epxlained the >> reason behind the phenomenon. > > You've got lots of reactions about Gibbs phenomeon over the last two days. > > I'd like to give a different perspective from the graphical point of > view. At last: The Gibbs phenomeon is often percieved used when it comes > to images, rarely if ever if you talk about sound. > > > The sole reason why it is important in graphics is the fact that our > eyes and brain is trained to detect edges. Whatever your mind makes up > for you is one thing. What really drives your vision are the edges of > what you see. > > Mathematical spoken: The brain/eyes does a high-pass filer on what you > see and the vision pays attention on those things that have the highest > derivation from the mean. What you see however is often an illusion made > up by your mind.Well, not really, Nils. The Gibbs phenomenon is real in the sense that you can measure it. The visibility is actually not *at* the edge, where visual masking will appear - I can show images where this type of masking makes the phenomenon invisible, which is one of the reasons why JPEG works so well. However, the problem with Gibbs appears as soon as the oscillations caused by it are well away from the edge, in an otherwise flat terrain where no structure can mask them, and *then* they become very visible.> The gibbs pheonomen is simply ringing in the passband. However, it > creates something like a halo around the objects, and that effect > triggers the edge-detection part of your brain. It does pay much more > attention to it than it ought to.That's a different part of the story - a matter of the contrast sensitivity function - (or a passband filter, if you want to say so), which visually amplifies specific frequencies. Gibbs becomes visible, too, whenever its "implied" frequencies are low enough to fit into this passband.> A similar effect yet kinda different is the marching band effect that > you'll percieve if you quantize an image from lets say 8 bit to 4 bit. > You'll get ridges/steps in smooth gradients and you eye will - no matter > what you do - focus on them.Yup, that's quantization noise, a different structure and a different origin. Here, artificial edges are created, and they are again very visible because there is no structure around them that could mask the edges away.> Both things are well explained from a perceptive point of view. The > gibbs pheonomeon in images is one of those cases where a lower per pixel > error has a higher percieved error than it ought to.Not really - it depends on *where* the phenomenon occurs. Typically, it is masked by the edge itself, unless you see the oscillations too far away from the edge. That's at least my experience (I've looked at too many images, probably... :-) So long, Thomas

Posted by ●June 27, 2008

On 27 Jun., 04:33, Ron Nwrote: > On Jun 26, 7:02�pm, "Fred Marshall"case of> wrote: > > > > > > > "Ron N" wrote in message > > >news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com... > > On Jun 26, 7:00 am, Andor wrote: > > > Typical windowing only helps remove the ringing near > > discontinuous boundary conditions at the sides of the window. > > You will still get ringing from discontinuities in the middle > > of the window. > > > It might be possible to reduce or eliminate the Gibb's > > phenomena by approaching the limit of the sinusoidal series > > in a different manner. �Instead of just adding terms, one can > > replace the discontinuity with a short continuous function > > segment (trapezoidal edge, or other higher order polynomial), > > and approach the limit by simultaneously both increasing the > > number of terms and decreasing the span of the replaced > > segment being approximated by those terms in proportion to > > the number of terms, thus decreasing the L2 error of both > > approximations together. > > > Ron, > > > I have never seen a "discontinuous window" unless you want to include the > > gate function as a window as we always do. �But that's a limiting > > really "no window". > > I was talking about the "temporal" gating of > non-periodic-in-aperture-width signals, and > discontinuities in the middle of the waveform, > before applying an additional "window function". > > There needs to be a more widespread and commonly > used glossary of the terminology.Ron I explicitely said that I was using the term "windowing" as in "windowed FIR design". The discontinuous periodic function is the frequency response, and we window the Fourier series exapansion of the frequency response (the impulse response) to smooth the frequency response. This is equivalent to convolving the periodic function with a smoothing kernel, so the ringing is removed everywhere, not only at the "sides" (whatever that means). Regards, Andor

Posted by ●June 27, 2008

Dave schrieb:> On Jun 26, 3:52 am, "vasindagi"It doesn't converge *pointwise* at the discontinuity, but it does converge in l^2 sense, and it also converges pointwise at every epsilonwrote: >> Hi, >> I m trying to learn more about gibbs phenomenon. I found various sites >> explaining about what is gibbs phenomenon but none of them epxlained the >> reason behind the phenomenon. >> Can anyone please explain the reason for the gibbs phenomenon or send me >> links about the same. >> Thanks in advance. > > > They explanation about the limitation of not using higher frequencies > isn't really correct - even though it displays the same type of > behaviour. Even if you used an infinite number of frequencies the > result does not converge at that point i.e. the discontinuity. > 0 around the discontinuity.> So what you're seeing is the limitation of sum of sinusoids > representation - it does not form a complete basis.Whether there are complete basis of function spaces is a matter of believe (namely if you thrust the axiom of choice). For all practical matters, Schauder bases like the free oscillations (cos/sin or exp(ix)) are good enough. IOW, you can approximate any function as close as you wish with sinoids in the l^2 sense. They do not form a Schauder basis in l^\infty sense of the piecewise continuous functions, that's true, but a different statement.> It is like trying > to represent 3D space with only 2 vectors.No, not at all. In 3D space, you will always have a positive error for arbitrary vectors. Here, you can make the error infinitely small. So long, Thomas

Posted by ●June 26, 2008

On Jun 26, 7:02�pm, "Fred Marshall"wrote: > "Ron N"ofwrote in message > > news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com... > On Jun 26, 7:00 am, Andor wrote: > > Typical windowing only helps remove the ringing near > discontinuous boundary conditions at the sides of the window. > You will still get ringing from discontinuities in the middle > of the window. > > It might be possible to reduce or eliminate the Gibb's > phenomena by approaching the limit of the sinusoidal series > in a different manner. �Instead of just adding terms, one can > replace the discontinuity with a short continuous function > segment (trapezoidal edge, or other higher order polynomial), > and approach the limit by simultaneously both increasing the > number of terms and decreasing the span of the replaced > segment being approximated by those terms in proportion to > the number of terms, thus decreasing the L2 error of both > approximations together. > > Ron, > > I have never seen a "discontinuous window" unless you want to include the > gate function as a window as we always do. �But that's a limiting case > really "no window".I was talking about the "temporal" gating of non-periodic-in-aperture-width signals, and discontinuities in the middle of the waveform, before applying an additional "window function". There needs to be a more widespread and commonly used glossary of the terminology. rhn

Posted by ●June 26, 2008

"Ron N"wrote in message news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com... On Jun 26, 7:00 am, Andor wrote: Typical windowing only helps remove the ringing near discontinuous boundary conditions at the sides of the window. You will still get ringing from discontinuities in the middle of the window. It might be possible to reduce or eliminate the Gibb's phenomena by approaching the limit of the sinusoidal series in a different manner. Instead of just adding terms, one can replace the discontinuity with a short continuous function segment (trapezoidal edge, or other higher order polynomial), and approach the limit by simultaneously both increasing the number of terms and decreasing the span of the replaced segment being approximated by those terms in proportion to the number of terms, thus decreasing the L2 error of both approximations together. Ron, I have never seen a "discontinuous window" unless you want to include the gate function as a window as we always do. But that's a limiting case of really "no window". I've certainly not seen one with discontinuities in the middle. Some supergained theoretical windows have spikes at the edges but they aren't very practical anyway. Others of this sort have sinusoidal properties. But these are *way* out there...... Most practial windows go to zero at the edges and maybe have a discontinuous first derivative. Many have their first derivative zero as well. Typical windowing is a type of lowpass filter (in frequency) and does reduce the ringing at temporal discontinuities. Fred