Home >

In Search of the Fourth Wave

Allen Downey - Watch Now!

This talk will be followed by a Live Q&A Discussion on Zoom.

When I was working on Think DSP, I encountered a small mystery.  As you might know:

  1.  A sawtooth wave contains harmonics at integer multiples of the fundamental frequency, and their amplitudes drop off in proportion to 1/f.  
  2. A square wave contains only odd multiples of the fundamental, but they also drop off like 1/f.  
  3. A triangle wave also contains only odd multiples, but they drop off like 1/f².

This pattern suggests that there is a fourth simple waveform that contains all integer multiples (like a sawtooth) and drops off like 1/f² (like a triangle wave).  Do you know what it is?

In this talk, I'll suggest three ways we can solve this mystery and show how to compute each of them using Python, NumPy, and SciPy.  This talk is appropriate for beginners in both DSP and Python.

M↓ MARKDOWN HELP
italicssurround text with
*asterisks*
boldsurround text with
**two asterisks**
hyperlink
[hyperlink](https://example.com)
or just a bare URL
code
surround text with
`backticks`
strikethroughsurround text with
~~two tilde characters~~
quote
prefix with
>

Puru
Score: 0 | 1 month ago | no reply

Nice explanation covering most of the DSP topics

Leandro
Score: 0 | 2 months ago | 1 reply

Hello,
Is it possible to have the slides of this presentation? Thanks.

AllenDowneySpeaker
Score: 0 | 2 months ago | no reply

The Jupyter notebook is the slides. I used RISE to display the notebook in slide format. You can run the notebook here: https://tinyurl.com/mysterywave

robertdown
Score: 0 | 2 months ago | no reply

this is awesome one

MrFox
Score: 0 | 2 months ago | 1 reply

Very cool talk! I can't help but point out though, the complex exponential at 23:30 is missing the imaginary constant i or j!

AllenDowneySpeaker
Score: 0 | 2 months ago | no reply

Yes, I noticed that during the playback of the talk. It's fixed now in the slides. Thanks for letting me know!

doc_cls
Score: 2 | 2 months ago | no reply

The sawtooth & square wave spectra fall off as 1/f since the wave has discontinuities in the series itself (in the continuous representation); the spectrum of the triangle wave drops as 1/f^2 since the discontinuities are in the first derivative.

CoryClark
Score: 2 | 2 months ago | no reply

Very enjoyable talk Allen, much appreciated, will check out your blog and your ThinkDSP book.

TheBOOM
Score: 1 | 2 months ago | 1 reply

Why did you pick the parabola-looking wave, instead of the sine-ish looking wave as the representative shape?

AllenDowneySpeaker
Score: 0 | 2 months ago | 1 reply

No special reason other than the shape was recognizable as a parabola, which led me to Method 3. And then the integration property tells us that the parabola is the integral of the sawtooth.

TheBOOM
Score: 0 | 2 months ago | no reply

personally, i'm "partial" to the leaning-sine :)

TheBOOM
Score: 2 | 2 months ago | 1 reply

How about all even harmonics? :)

AllenDowneySpeaker
Score: 1 | 2 months ago | no reply

Interesting question. I guess that would be the fundamental at 1000 Hz plus harmonics at 2000, 4000, 6000, etc. Not sure what that would look/sound like. I guess that'll be next year's talk.

TheBOOM
Score: 1 | 2 months ago | 1 reply

13:07 sounds distorted

AllenDowneySpeaker
Score: 0 | 2 months ago | no reply

I think we picked up a delayed copy of the wave from my speakers to my mike, so there's some interference.