Gibbs phenomenon and ringing in square waves: causality?

In summary, the Fourier series of a square wave on a scope shows the well-known overshoot when n is only taken to a small number, such as 30, terms. The causality is related to the Kramer's-Kronig relations. There is no way to reproduce what you see on a scope trace as an instance of the Gibbs phenomenon without first ascertaining what the scope is actually triggering on.
  • #1
RGann
12
1
A seemingly good way to understand the overshoot and decay (ringing) of a square wave on a scope is that it is the result of bandwidth limiting. In that case, the Fourier series of a square wave
[tex]\Pi(t) = \frac{1}{2 \pi} \sum_{n=-\infty}^\infty \frac{\sin(n \omega/2)}{n \omega/2} \exp(i n \omega t)[/tex]
shows the well-known overshoot when n is only taken to a small number, such as 30, terms.
attachment.php?attachmentid=63610&stc=1&d=1383465195.png

It's obtained by Fourier transforming the rect function [itex]\Pi(t)[/itex] to get [itex]\mathrm{sinc}(\omega)[/itex], then transforming back to the time domain, except you form a Riemann sum instead of an integral and take finite terms.

But this calculation doesn't reproduce what you really see on a scope, because it appears to be non-causal. That is, before the machine that drives the signal starts to apply voltage (at [itex]t=-5[/itex] in the plot), this curve is already ringing. There's a few references to the causality being related to the Kramer's-Kronig relations, especially in the "Understanding the Kramers-Kronig Relation Using A Pictorial Proof" white paper availble online (here). In that they suggest forming a causal function, where it is zero for all [itex]t < 0[/itex], which we could do by translating the rectangle function so that its rise is at [itex]t=0[/itex]. Then form even and odd functions out of the signal. When you do this, the odd function is the same as the even function times [itex]\mathrm{sgn}[/itex]. However, this seems to be of little help, particularly because finding the Fourier transform of the odd part
[tex] h_o = \mathrm{sgn}(t) h_e = (1/2) \mathrm{sgn}(t) \Pi(t) [/tex]
involves a convolution of [itex]\mathrm{sinc}[/itex] and [itex]1/i \omega[/itex], which is quite difficult (Wolfram integrator gives an answer that is not pure imaginary, which shouldn't be true).

What am I missing here? Is there a way to present the real signal you see on a scope trace as an instance of the Gibbs phenomenon? If so, is this on the right track? Does anyone know of a treatment of this problem?

Thanks!
 

Attachments

  • ScreenClip [1].png
    ScreenClip [1].png
    10.1 KB · Views: 2,062
  • attachment.php?attachmentid=63610&stc=1&d=1383465195.png
    attachment.php?attachmentid=63610&stc=1&d=1383465195.png
    9.5 KB · Views: 393
Physics news on Phys.org
  • #2
But this calculation doesn't reproduce what you really see on a scope, because it appears to be non-causal

You clearly can't hear a bell ring before it's struck.

I've not seen real scope traces that look like your "ideal". They normally look like these from the web..

http://www.craigsarea.com/images/good_gate.jpg
http://www.chatzones.co.uk/discus/messages/1218/2480.jpg
http://i.stack.imgur.com/Q0uig.png

Dual beam scope traces can sometimes be misleading because of the way sync and chop/sweep works. The input and output wave form can be shifted so they appear to be non causal. It's not always obvious what feature of an input wave caused what feature in the output.
 
  • #3
CWatters said:
You clearly can't hear a bell ring before it's struck.

I've not seen real scope traces that look like your "ideal". They normally look like these from the web..

http://www.craigsarea.com/images/good_gate.jpg
http://www.chatzones.co.uk/discus/messages/1218/2480.jpg
http://i.stack.imgur.com/Q0uig.png

Dual beam scope traces can sometimes be misleading because of the way sync and chop/sweep works. The input and output wave form can be shifted so they appear to be non causal. It's not always obvious what feature of an input wave caused what feature in the output.

You should always ascertain what the scope is actually triggering on. Most scopes default to 'Alternate Sweep' (one trace at a a time). If it is on 'Auto trigger' then the fast leading edge in each case sill probably be the time reference for each trace as it is displayed; they will appear to coincide. If you can actually 'trigger on A channel' (or B), then that should show you the two traces in 'real' time relation to each other. Failing that, split the source signal and feed it to the External sync input and sync on that.

For low frequency waveforms it is sometimes possible to 'Chop' between inputs and that will also give the right relative timing (but the chop frequency needs to be a lot higher than the signal repetition frequency.
The actual delay through a filter will be at least as long as the impulse response of the filter, looked at in the time domain.You can never have the cart arrive before the horse.
 
  • #4
CWatters said:
I've not seen real scope traces that look like your "ideal". They normally look like these from the web..

That was my point; you never get the ideal. When properly measured with a scope, they look like the third picture you linked to. That is, they look like neither of the plots that I drew. They almost look like the approximate curve, which is due to bandwidth limitation caused by parasitic capacitance, inductance, and resistance. Looking at a low duty cycle pulse (so that previous transient behavior has totally died down by the next pulse) given by machines made by DEI, BNC, and Stanford, you always see the ringing behavior. They're real and understandable. One way you can replicate them is to do a SPICE analysis of a square wave pulse and inserting a parasitic circuit. You get ringing. But people say that it's a Gibbs phenomenon example, and I'm having trouble rationalizing the fact that the Gibbs phenomenon predicts noncausal behavior which isn't observed.

Put simply, how can you calculate the trace in the third pic that you linked to?
 
  • #5
RGann said:
That was my point; you never get the ideal.

It's a long time since I studied this but look up how digital filters work.

In a simple digital filter the output at time t is a function of samples either side of t. Clearly a real world, real time filter can't be forward looking (non-causal) so a delay has to be introduced. That delay modifies the response and makes the output appear causal.

Google found this article but it's not a great answer/explanation.

http://paulbourke.net/miscellaneous/filter/

As I said it's been awhile. Perhaps someone has a better explanation.
 
  • #6
CWatters said:
It's a long time since I studied this but look up how digital filters work.

In a simple digital filter the output at time t is a function of samples either side of t. Clearly a real world, real time filter can't be forward looking (non-causal) so a delay has to be introduced. That delay modifies the response and makes the output appear causal.

Google found this article but it's not a great answer/explanation.

http://paulbourke.net/miscellaneous/filter/

As I said it's been awhile. Perhaps someone has a better explanation.
As I remember, there are Finite Impulse Response temporal filters where the delay is defined by the length of the memory and Recursuve Filters with feedback. The response for those takes time to establish itself on a repeating function. That can give you apparent non causal effects that aren't really.
 
  • #7
I think the basic issue here is that in any real-world circuit that acts as a filter, the time delays (or phase changes) are different for each component of the signal.

It is possible to design digital FIR (finite impulse response) filters that don't introduce relative phase differences, but the filter introduces a finite time delay between the input and the output. That would shift the "approx" trace in the OP's plot to the right, and preserve causality.

Of course if such a filter is used "off line", i.e. not for real time processing, there is no reason why it has to be causal, and the output can be time-shifted to look exactly like the OP's plots.

Real world analog circuits always introduce frequency-dependent time shifts. Even a simple "piece of wire" acts like an LCR circuit, not like an ideal resistor.
 
  • #8
You need to be careful about what you mean by 'causal'. For a start, to discuss causality here, you can only talk in terms of a single pulse, in time and not a repeating pulse (what you normally see on a 'scope. The Fourier transform of a repeated wave shape involves sinusoids that are in existence for infinite time (strictly). The ringing that looks as if it starts 'before' the pulse 'was always there' before the pulse, even for the original rectangular pulse. It was just being modified by a load of other sinusoids so that the Sum was zero, at all times, except during the pulse. If you filter off the higher harmonics, the cancellation is incomplete so that 'ringing frequency' becomes visible. This is nothing to do with causality.
Yet again, there is no paradox.
 
  • #9
I've pored over a few treatments of the problem in available texts at the library. Abdul Jerri has a book on the Gibbs phenomenon, and discusses the non-convergence of the series even in the large limit (point convergence is guaranteed, but the curves do not have this feature). He points out that as the filter window opens, the overshoot does not go away, it simply moves closer to the point discontinuity, remaining at about 9%. All of his plots (and there are several) demonstrating overshoot of the sgn(t) function begin at t=0, and so he elides the question.

Something else I noticed in my reading (do not have the reference ATM) was the technical point that even without a true step discontinuity, the Gibbs phenomenon still rears its head. This is fortunate, since I've yet to find a 0s-rise-time generator. The text then introduces the Hilbert kernel, purportedly relevant, but drops it after just a few pages.

I guess my inherent prejudice is toward the observations I've made in my work. A 900 V pulser that I work with daily clearly shows this effect of overshoot, and never shows any such behavior before the pulse begins (the duty cycle is quite low). This is simple to understand from a circuit point-of-view; a TTL pulse turns on an FET on the rising edge, and a DC supply quickly energizes the output. Until this TTL pulse is sent, the system would have no knowledge that something is about to happen. Perhaps my usage of "causality" is imprecise.
 
  • #10
RGann said:
I guess my inherent prejudice is toward the observations I've made in my work. A 900 V pulser that I work with daily clearly shows this effect of overshoot, and never shows any such behavior before the pulse begins (the duty cycle is quite low). This is simple to understand from a circuit point-of-view; a TTL pulse turns on an FET on the rising edge, and a DC supply quickly energizes the output. Until this TTL pulse is sent, the system would have no knowledge that something is about to happen. Perhaps my usage of "causality" is imprecise.

The voltage waveform doesn't tell the whole story, though. Your pulse generator will have a non linear output impedance. When it is 'off', it will represent a different source impedance from when it is 'on'. If you use a normal oscilloscope, you are looking with a voltage probe, so the volts, when the signal is zero, could be from a 'voltage source' and will appear zero, whatever circuit follows. That could 'wipe out' any voltage variations and give you a flat base. The time constants when the pulse is rising will be shorter than the time constants when the pulse is falling. No double you would see a tiny amount of pre-ringing as the leading edge starts to establish itself and the impedance starts to change.
 
  • Like
Likes 1 person

1. What is the Gibbs phenomenon?

The Gibbs phenomenon is a phenomenon in which the Fourier series of a function exhibits large oscillations near a discontinuity, even when the series converges to the correct value of the function at all other points.

2. What causes the Gibbs phenomenon?

The Gibbs phenomenon is caused by the difficulty of approximating a discontinuous function with a series of continuous functions. The overshoot and ringing near the discontinuity are a result of the series trying to "fill in" the gap between the discontinuous points.

3. How does the Gibbs phenomenon affect square waves?

Square waves, being a discontinuous function, are highly affected by the Gibbs phenomenon. The Fourier series of a square wave will exhibit overshoot and ringing near the discontinuity, creating a "wavy" appearance instead of a sharp edge.

4. Can the Gibbs phenomenon be eliminated?

No, the Gibbs phenomenon cannot be completely eliminated. However, the amount of oscillation can be reduced by using a larger number of terms in the Fourier series or by using a different series approximation, such as the Fejér kernel.

5. Is there a causal relationship between the Gibbs phenomenon and ringing in square waves?

Yes, there is a causal relationship between the two. The Gibbs phenomenon, which is caused by the difficulty of approximating discontinuous functions, leads to the ringing effect in square waves. This is because the Fourier series tries to smooth out the sharp edges of the square wave, resulting in the characteristic overshoot and ringing near the discontinuity.

Similar threads

  • Advanced Physics Homework Help
Replies
4
Views
931
  • Calculus and Beyond Homework Help
Replies
3
Views
741
  • Calculus and Beyond Homework Help
Replies
1
Views
186
  • Advanced Physics Homework Help
Replies
6
Views
1K
Replies
1
Views
1K
Replies
1
Views
901
Replies
1
Views
604
  • Introductory Physics Homework Help
3
Replies
70
Views
5K
Replies
2
Views
1K
  • Advanced Physics Homework Help
Replies
6
Views
1K
Back
Top