DSPRelated.com
Forums

Gibbs Phenomenon

Started by vasindagi June 26, 2008
On Jun 26, 7:00&#4294967295;am, Andor <andor.bari...@gmail.com> wrote:
> On 26 Jun., 14:43, Dave <dspg...@netscape.net> wrote: > > > > > On Jun 26, 3:52 am, "vasindagi" <vish...@gmail.com> 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 &#4294967295;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. > > 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.
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. . IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
On 26 Jun., 16:38, Jerry Avins <j...@ieee.org> wrote:
> 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. > > Do you want an explanation apart from the mathematics, which you say you > understand? How about "Nature abhors abrupt discontinuities"?
Don't be silly, Jerry. The really deep explanation is because Nature loves abrupt discontinuities. As soon as she sees a discontinuity coming ahead, she start jumping up and down in childish anticipation. Afterward the jump, it takes her some time to settle down, where she echos the jump in sweet memories by wigglying and slowly settling. :-)
On 2008-06-26 14:14:35 -0300, Andor <andor.bariska@gmail.com> said:

> On 26 Jun., 16:38, Jerry Avins <j...@ieee.org> wrote: >> 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. >> >> Do you want an explanation apart from the mathematics, which you say you >> understand? How about "Nature abhors abrupt discontinuities"? > > Don't be silly, Jerry. The really deep explanation is because Nature > loves abrupt discontinuities. As soon as she sees a discontinuity > coming ahead, she start jumping up and down in childish anticipation. > Afterward the jump, it takes her some time to settle down, where she > echos the jump in sweet memories by wigglying and slowly settling. > > :-)
Which is the deep mathematical explanation as well! Truncation in the Fourier series corresponds to convolution with the original function. The kernel that is relevant is a sinc(x) (a.k.a. dif(x) or sin(x)/x with some or other scaling) which jumps up and down. This view makes it clear why there is always a 6% (or so) overshoot at the discontinuity. More terms just make the action more localized.
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. Lots of optical illusians are based on the fact that the perception is trained and puts its focus on edges. 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. 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. 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. It's one of those reasons why the eye favors a crude gaussian filtering more than a from the mathematical point of view superiour windowed sinc-filter. Nils
Andor wrote:
> On 26 Jun., 16:38, Jerry Avins <j...@ieee.org> wrote: >> 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. >> Do you want an explanation apart from the mathematics, which you say you >> understand? How about "Nature abhors abrupt discontinuities"? > > Don't be silly, Jerry. The really deep explanation is because Nature > loves abrupt discontinuities. As soon as she sees a discontinuity > coming ahead, she start jumping up and down in childish anticipation. > Afterward the jump, it takes her some time to settle down, where she > echos the jump in sweet memories by wigglying and slowly settling. > > :-)
Funny! I just left an adorable Goh-Khi who was exactly like that. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
"Ron N" <ron.nicholson@gmail.com> wrote in message 
news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com...
On Jun 26, 7:00 am, Andor <andor.bari...@gmail.com> 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 


On Jun 26, 7:02&#4294967295;pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org>
wrote:
> "Ron N" <ron.nichol...@gmail.com> wrote in message > > news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com... > On Jun 26, 7:00 am, Andor <andor.bari...@gmail.com> 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. &#4294967295;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. &#4294967295;But that's a limiting case of > 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
Dave schrieb:
> On Jun 26, 3:52 am, "vasindagi" <vish...@gmail.com> 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. So long, Thomas
On 27 Jun., 04:33, Ron N <ron.nichol...@gmail.com> wrote:
> On Jun 26, 7:02&#4294967295;pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org> > wrote: > > > > > > > "Ron N" <ron.nichol...@gmail.com> wrote in message > > >news:3de35455-919f-4715-a986-e4ee80428c1c@z32g2000prh.googlegroups.com... > > On Jun 26, 7:00 am, Andor <andor.bari...@gmail.com> 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. &#4294967295;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. &#4294967295;But that's a limiting case of > > 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
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