8

If a square wave requires infinite bandwidth how can we display it on oscilloscopes?

Link: Oscilloscope fundamentals.

JRE
  • 67,678
  • 8
  • 104
  • 179
OVIYA N
  • 97
  • 1
  • 3
  • 13
    If you zoom in you will see that the rise time and fall time are finite. Therefore, what you observe on the oscilloscope is not a perfect square wave with infinite bandwidth. Instead it is an imperfect square wave with finite bandwidth. – user57037 Nov 16 '20 at 19:05
  • 3
    Another fundamental reason no-one's mentioned is that you would need infinitely small pixels to fully define an infinitely sharp squarewave (which our eyes couldn't resolve anyway), but because most modern scopes have pretty chunky pixels (e.g. compared to phones), edges that only slope a fraction get rounded up to a single, straight line of pixels so you lose a bit of the finer details (analog scopes had more effective "*pixels*" but then had focus issues to worry about). As a wise man once said *"There are lies, damned lies, and what's on the screen of the oscilloscope"* – Sam Nov 16 '20 at 21:57
  • 2
    Old fart here from the analog oscilloscope days. When the transition times for a square wave are very short, the edges of the square wave get fainter. The maximum slope (delta voltage over delta time) sets an upper limit on how faint the trace can be. – EvilSnack Nov 17 '20 at 19:30
  • @Sam Do oscilloscopes have pixels? https://www.youtube.com/watch?v=Ea6tw-gulnQ – Acccumulation Nov 17 '20 at 20:23
  • @Acccumulation Oh yes, absolutely, it doesn't really matter what you call them, but there is always a finite limit to the screen's ability to define an image (a sub-pixel is still a singular item). Even the old analog scopes of yore had a resolution in the sense that each "pixel" represented each grain of phosphor on the display and a pixel that is half on and half off blurs into one that is half as bright because of light bleed, otherwise we'd just have one continuous film but even then we'd still have a finite resolution, it's just that each pixel is now one atom in size... – Sam Nov 17 '20 at 21:50

9 Answers9

57

We can't. We see a bandlimited version. That's obvious for two reasons:

  1. perfect square signals cannot physically exist, for changing a voltage within 0 time would require an infinite amount of power
  2. Your oscilloscope has an analog front-end low-pass filter. Its bandwidth is probably printed somewhere prominent on the front panel.
Marcus Müller
  • 88,280
  • 5
  • 131
  • 237
  • 2
    Do analog scopes have a purpose-designed front-end filter, or is the claimed bandwidth merely the highest frequency at which factors like slew rate won't prevent a scope from meeting other published specifications for accuracy, etc. – supercat Nov 16 '20 at 17:33
  • @supercat I think it's highly likely that if there's a family of scopes with, say, 1, 2, and 4 GHz bandwidth, that the lower-bandwidth ones at least have filters to deliberately restrict the bandwidth. Probably the highest bandwidth one does too (as an anti-aliasing filter for the sampler). – The Photon Nov 16 '20 at 17:39
  • 4
    @ThePhoton: Anti-aliasing would be needed on digital scopes, but I wouldn't think analog scopes would need them. – supercat Nov 16 '20 at 17:42
  • 4
    @supercat, It's 2020. If someone doesn't specify "analog" when talking about scopes, I assume they mean digital. – The Photon Nov 16 '20 at 17:43
  • 1
    @ThePhoton: My question was "do analog scopes..." Digital scopes can display things however their designers want them to display things, so I think the original question is worth answering for both kinds of scopes. – supercat Nov 16 '20 at 17:48
  • 8
    @ThePhoton Well, he *did* specify "analog scopes" right in the first sentence :) But yeah, I checked service manual for Tektronics 2245a and at least that analog scope had no explicit low pass filter. It does have a kind of a frequency equalizer circuit to tune response, though. – jpa Nov 16 '20 at 17:48
  • @supercat, OK, sorry. I'm interpreting Marcus's answer and OYIVAN's question to be about digital scopes, so I was just reading quickly and assumed your comment was relevant to that. – The Photon Nov 16 '20 at 18:09
  • @jpa since high-speed oscilloscopes, digital and analog, need to have matched inputs, and matching is usually achieved by something with strong low-pass characteristics, I'd go with "yes, there's an explicit LPF anyway". And also, even in an analog scope, you don't want the RF noise to influence your measurement, so I'd actually be pretty surprised if the bandwidth was actually only limited by unwanted properties of some electronics rather than by a deliberate filter. – Marcus Müller Nov 16 '20 at 18:29
  • "perfect square signals cannot physically exist, for changing a voltage within 0 time would require an infinite amount of power" But only for an infinitely short time. – WhatRoughBeast Nov 16 '20 at 21:51
  • It also depends on the probes and cables (and impedance) how quickly the measurement can react. – eckes Nov 17 '20 at 04:03
  • @WhatRoughBeast pssst ;) no, seriously, though, \$0\cdot\infty\$ is not necessarily bounded. Now, I'm no physicist, but action (impulse·time) is quantized; so if this exchange of energy was to happen in 0 time, it must've happened without any impulse being exchanged, contradicting conservation of impulse. If we assume it's just happened in the "shortest \$\Delta t\$ possible", then require a technically impossible amount of impulse… which for the scope of the question is about covered by "doesn't exist". – Marcus Müller Nov 17 '20 at 09:29
26

You are correct that an ideal square wave needs an infinite bandwidth as it contains frequencies up to infinite frequencies.

But this is theory, ideal square waves do not exist in the real world as infinitely high frequencies do not exist either.

If you see a square wave on an oscilloscope that doesn't mean it is ideal. As long as it is close enough then that is also good enough.

For example, on an oscilloscope with a bandwidth of 100 MHz, a 1 MHz square wave will look more than good enough. The frequencies above 100 MHz will be attenuated but their signal content is quite small and do not affect the shape of the square wave that much.

Bimpelrekkie
  • 80,139
  • 2
  • 93
  • 183
18

The 'scope won't show a perfect squarewave and if you zoom in on the timebase you should be able to see the rising and falling edges with some slope on them. This will be most obvious on an analogue oscilloscope. The bandwidth will be limited by the input stage.

You can experiment with additive synthesises waveform generator such as the one below to gain an intuitive understanding.

enter image description here

Figure 1. The odd harmonic series generated by \$ \sin(\omega t) + \frac {\sin(3\omega t)} 3 + \frac {\sin(5\omega t)} 5 \frac {\sin(7\omega t)} 7 + \frac {\sin(9\omega t)} 9 + \frac {\sin(11\omega t)} {11} \$. Source Additive synthesis.

You can see that with just the series up to the 11th harmonic that the resultant waveform is beginning to show its squarewave form. You can play with this in the link above. Remember that the squarewave will have odd harmonics only.

Null
  • 7,448
  • 17
  • 36
  • 48
Transistor
  • 168,990
  • 12
  • 186
  • 385
5

Perfect square waves don't exist in the real world. They are a physical impossibility: it requires a signal to be two different values in the same time instant. Further, as the wave's transition time gets smaller, the power required to make transition gets larger, approaching infinity as the time approaches zero.

So basically, a perfect square wave is dividing by zero.

You can also think of a square wave as a sum of Fourier harmonics. As the number of harmonics increases, the squarewave sharpens. Infinite harmonics give a perfect square wave. We can think of this mathematically, but we could never construct such a signal.

Even if we could, such a perfect square wave would need infinite bandwidth to represent it. Physical devices (like oscilloscopes) don't have that, be they digital or analog.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • 2
    Actually they don't require to be different in the same instant. it requires that the left limit be of one value and the right limit be another (in other words, a discontinuity) – Bruno Ferreira Nov 17 '20 at 15:56
  • 2
    That’s the point: the zero-time interval between the two states is impossible to express: like division by zero, it is undefined. Call it a discontinuity if you want, same thing. – hacktastical Nov 17 '20 at 20:34
3

Square waves on oscilloscopes are due to the lines being drawn between sample points, but those lines are a fiction. It is convenient and useful to see a signal as continuous, but the scope only has the sampled points as real data, and anything in between is a construction. In all but the most basic scopes you can choose between linear interpolation and (sin x)/x interpolation (also called sinc). EEVBlog has a video explaining and illustrating this.

Dot mode doesn't have this problem but is much harder to see on the screen. If you use it, it becomes more obvious that the dots (samples) must be seperated in time by the sampling period, so you cannot have a dot directly above (true vertical) another dot of the same signal, so you cannot have true square waves in the scope.

Martin
  • 8,320
  • 1
  • 22
  • 30
  • 10
    You may have grown up in the digital age. Analogue scopes are rather different. – Transistor Nov 16 '20 at 12:14
  • Fair point, but the question didn't specify analogue scope, at least when I saw it. The linked document covered both types, but as The Photon says in his comment to Marcus' answer, I assumed they meant digital. – Martin Nov 16 '20 at 18:29
  • This ought to be qualified with ['digital'](https://en.wikipedia.org/wiki/Oscilloscope_types#Digital_oscilloscopes). ["Analog" oscilloscopes](https://en.wikipedia.org/wiki/Oscilloscope_types#Cathode-ray_oscilloscope) are still in use. – Peter Mortensen Nov 18 '20 at 19:18
1

Given any circuit has some equivalent noise resistance, which may vary with frequency, a circuit with infinite bandwidth will require zero capacitance and will produce infinite noise energy. Up to about 200 terahertz.

Thus we exploit the finite bandwidth of any circuit, knowing that any non-zero size of metallic structures has non-zero parasitic capacitance, and thus requires non-zero energy to impose changes of electric fields (called a signal, or your square wave) upon the metallic pieces.

That finite bandwidth, because of the non-zero size, limits the rise and fall time of the circuitry.

Peter Mortensen
  • 1,676
  • 3
  • 17
  • 23
analogsystemsrf
  • 33,703
  • 2
  • 18
  • 46
0

Well, first of all, an oscilloscope doesn't display in the frequency space, it displays in the time space.

Second, oscilloscopes have finite resolution, both in physical location on their screen, or in time space. Since the higher frequencies of a square wave have lower amplitudes, at some point they get aliased out.

0

You cannot create a perfect square wave either... That's a mathematical construct.

What you can realize by using physical hardware is a bandlimited approximation to it. And what you see on your oscilloscope may also be a further bandlimited copy of it...

Fat32
  • 131
  • 3
0

There is NO physical square wave in real life.

The Oscilloscope only sees a crude approximation as the mathematicians would describe the electronic 'square' wave.