Introduction

The Fourier Transform is everywhere. Few are the days in your life where you won’t pick up a piece of technology that implements it to provide you with pictures, videos, music, a phone call, and all manner of everyday applications. 

However, its very ubiquity means we take The Fourier Transform very much for granted and few are the people that really understand how it works. One of the reasons for this may be that, on the face of it, the maths can seem a little complicated.

In this episode, we look at what the Fourier Transform is and I describe my own journey from mathematical ignoramus to actually understanding how the Fourier Transform works.


Resources

Podcast email:
[email protected]

Become a Patreon:
https://howthefouriertransformworks.com/patreon

Join the mailing list:
https://howthefouriertransformworks.com/mailing-list

 


Transcript

Hello and welcome to a podcast all about the Fourier Transform. My name is Mark Newman and I’ve been an electronics engineer for the past 25 years. During that time, I have developed something of an obsession with the Fourier Transform.

My mission, in these podcasts, is to try and make the Fourier Transform accessible to people, like me, who find the language of mathematics a bit of a challenge. As Albert Einstein once said:

“Most of the fundamental ideas of science are essentially simple, and may, as a rule, be expressed in a language comprehensible to everyone.”

I want to look at different aspects of the Fourier Transform and try to explain them in layman’s terms; to answer any questions you may have on the Fourier Transform and its uses. I also want to look at the many different ways the Fourier Transform is used in the real world. Maybe you’ll even hear something in these podcasts which will give you an idea of how to use the Fourier Transform in a new and creative way.

To that end, if you have any questions about the Fourier Transform, or if you already use the Fourier Transform yourself and would like to share how you use it, please e-mail me at [email protected]. I would love to interview you for a future episode.

This podcast is intended as a companion piece to an online course I’m working on called “How the Fourier Transform works”. You can check out the course at https://howthefouriertransformworks.com/. I’ll be talking more about the course a little later in this podcast.

As this is the first podcast in a series, let’s begin by asking the most obvious question.

What is the Fourier Transform and what does it do? To properly answer this question, we need to look at an example of how and where it is used. Now, you might think that the Fourier Transform is just a mathematical theory, and yes, it is that; but it is also an extremely practical tool used almost everywhere you look. 

For example, did you know that your ears use it to process sound waves so that your brain can understand what it is hearing? 

Deep inside your ear, behind the ear-drum lies the cochlea, a snail-shaped structure filled with fluid. As sound waves hit the surface of your ear-drum, they cause it to vibrate making ripples in the fluid. The ripples become a traveling wave that forms along a membrane inside the cochlea known as the basilar membrane. Sitting on top of the basilar membrane are special hair cells, sensory cells which ride the wave. The physical make-up of these hair cells means that each one can only vibrate at a certain frequency. The hair cells near the wider end of the snail-shaped cochlea detect higher-pitched sounds, while those closer to the center detect lower-pitched sounds. If the incoming sound contains a frequency at which an individual hair can vibrate, it will do so in proportion to the amplitude of that particular frequency in the sound wave. If a particular frequency doesn’t exist, the same hair will not be able to vibrate at all.

In this way, your ear turns a signal that is essentially a time-based signal, that is to say, a signal whose amplitude changes over time, into a frequency-based signal. In effect, your ear deconstructs the sound it is hearing into its constituent building blocks. Like taking apart the lego spaceship your child has just built until it is a collection of individual lego blocks. As far as Fourier is concerned the lego blocks of his signals are sine waves.

That’s what a transform is, a method of looking at the constituent parts of a signal. Another example of a transform is the Laplace Transform. Essentially Laplace does exactly the same thing. However, where Fourier uses sine waves which carry on forever as his lego blocks, Laplace uses decaying sine waves to build his signals.

The Fourier Transform is everywhere. Few are the days in your life where you won’t pick up a piece of technology that implements it to provide you with pictures, videos, music, a phone call, and all manner of everyday applications. The device you are currently listening to this podcast on is, right at this moment, performing the inverse Fourier Transform to turn frequency-based data stored on the podcast server back into a time-based sound signal for playing through your speakers or headphones.

However, its very ubiquity means we take The Fourier Transform very much for granted and few are the people that really understand how it weaves its magic. Even those who have heard of it and make conscious use of it, often don’t know HOW it actually works. One of the reasons for this may be that, on the face of it, the maths can seem a little complicated. 

I don’t think I’ve ever been any good at maths. 

Now that might not sound to you like a very promising start to a Podcast series that is all about a subject as mathematical as the Fourier Transform but bear with me on this one as this is exactly my point.

My problematic relationship with maths began at the age of 6 when I was in my second grade of elementary school. I was made to stay behind in the classroom when all my friends went out for playtime because I had got all my take-away sums wrong in the preceding lesson.

From that moment on, a little voice in my head would whisper “you’ll never be able to do this” whenever numbers were involved.

Fast forward another 10 years or so… 

By this time I was a keen musician. But the thing that fascinated me most, more than anything else about music, wasn’t so much playing it, although I did enjoy that; but rather, recording my performances. Not just a simple point-and-shoot type recording, but the type they did in recording studios. Multitracking, sampling, and audio effects.

This was the early 90s and home digital recording was in its infancy. I had dabbled a bit in “digital recording” by sampling tapes and records that my parents had in their collection. One of the biggest problems I faced was actually storing the sampled songs. Floppy disks in home computers were a new thing and they didn’t store very much information. This was before of days of MP3s. The key to being able to get a whole song on one floppy disk was the sampling rate. Set the sampling rate too high, and the song wouldn’t fit on the disk but set it too low and the quality of the recording suffered. Why was this?

Fast forward another 5 years. Now I was in my first year of university, studying electronics. The subject had fascinated me ever since my parents bought me my first electronics kit as a child. Building circuits. Wow! But electronics involves rather a lot of maths that subject that I had never been any good at at school.

However, one course on the curriculum looked particularly fascinating to me. Signals and systems. Learning how to process, analyze and understand the data in a signal. 

So here I am, sitting in the lecture hall at university, eagerly about to start a course that would enable me to understand the mechanics of sampling and signal processing, to formalize years of experiential learning, and gain a deeper appreciation that would inform and develop my art. 

In comes the lecturer and over the course of the next 45 minutes succeeds in totally destroying what could have been one of the most fascinating courses of my entire university career.

Everything was mathematical equations, algebraic proofs, assumed knowledge, and blackboards filled with Greek letters. My trouble with maths that had begun in that classroom at the age of 6 had come back to haunt me.

No attempt was made to explain what the maths was doing or why it was doing it. How did a stray sigma hope to explain why I had to sample my signal at some minimum sample rate for me to faithfully record a song? How could symbols like e, i, integration signs, and “dt’s” hope to reveal what a sound signal is made out of, why harmony worked, or why I enjoyed music so much?

By this point, I’d heard of the Fourier Transform and even had a passing understanding of what it did. I was eagerly awaiting to learn exactly how it worked.

But instead, I was presented with a dry, boring, and completely unscalable wall of mathematical theory, concepts I had not the first clue about, and a language that was completely foreign to me. The magical path, the joy of new knowledge, the wonder of discovery was brutally murdered in the course of one 45 minute lecture; and this was the first lecture of a course that was to last three months. I cannot even remember now whether I passed the course or not.

Fast forward another 10 years. I have now been a professional electronics engineer for a while, developing prototypes for a string of different medical companies. One day, a new project lands on my desk in the field of bio-spectroscopy. This is totally new to me. Bio-spectroscopy is where one injects a small alternating current at a range of different frequencies into one or more areas of the body. The impedance the body presents to that current is then measured at each frequency. This way, one can determine the type of tissues through which the current has flowed. Some household scales use it to provide you an estimate of your body fat.

The method relies on the Fourier Transform to analyze the signal. My last encounter with the Fourier Transform at that point, remember, had been during that disastrous Signals and Systems course at university. Consequently, Fourier and I were not on the best of terms. But now, our relationship was about to undergo something of a renaissance.

The Fourier Transform has been around for 200 years. The Fast Fourier Transform, in its present form, has been around since the 1960s when James Cooley and John Tukey optimized the calculation of the discrete Fourier Transform so that a computer could calculate it more quickly. Therefore there are many chips and programming libraries that do it for you.

Now, there are many engineers who can take these ready-made, off-the-shelf solutions and implement them effortlessly in their projects. However, I am not one of them. I find that if I don’t understand what these solutions are doing inside the “black box”, I find them very difficult to use.

The chip I was using saved me a ton of development work. Not only did it generate the sine wave frequency sweep to be injected into the body, but it also contained all the amplification and sampling circuitry as well as an in-built FFT module to perform the Fast Fourier Transform. However, as I had never properly understood how the Fourier Transform worked and didn’t understand why it gave its answer as a list of complex numbers, I was unsure what to do with the output the chip gave me. This is ridiculous, I thought. It should be obvious how to convert the output into the form I needed. It must be obvious as even the chip’s datasheet didn’t see the need to explain it. I felt like the class dunce, the slow idiot that everyone looks down on. I felt like that 6-year-old child who had been made to stay behind at playtime because he’d got all his take-away sums wrong.

How could I call myself a professionally qualified engineer, if I didn’t understand something as basic as the Fourier Transform? Embarrassed at my lack of knowledge, I began to secretly look up some internet sites on the Fourier Transform hoping no one at work would notice what I was doing. I found two different types of information out there. The first type was so generalized and basic, it just told me what I already knew while the other was so complicated, it might have been written in a foreign language. I would read paragraphs that said things like:

The Fourier transform is a unitary change of basis for functions that diagonalizes all convolution operators.” This often involves expressing an arbitrary function as a superposition of “symmetric” functions of some sort. In the common signal-processing applications, an arbitrary “signal” is decomposed as a superposition of “waves”.

Now I had no doubt that what this paragraph said was true, but I couldn’t understand a word of it. It contains far too many concepts that, at the time, I had no idea about. It assumed too much previous knowledge. It made me feel like I was back in my Signals and Systems lecture at university. 

With that path proving unhelpful, a little hesitantly, I began to ask my colleagues at work for help but was extremely surprised to discover that they didn’t know the answer either. Hang on! I thought I was the only idiot who didn’t understand these things.

With all avenues of discovery blocked to me, I went back to the basics. I knew that the chip I was using injected a sine wave into the body, so I began to play around with sine waves on a spreadsheet.

I tried adding two sine waves with different frequencies together. I tried multiplying them, I played around with their frequencies, amplitudes, and phases. Then I wondered what would happen if I added a sine wave and a cosine wave with the same frequency together. I discovered, to my amazement, that by playing with their amplitudes but keeping their frequencies the same, I could control the phase of the resultant wave. 

Now I’m sure I must have learned this at university. However, it would have been taught to me as an identity in the form of a mathematical formula. I wouldn’t have understood the significance of what I was being taught. I’d have just accepted the identity as some unfathomable truth, learned it like a parrot, regurgitated it just in time for the exam, and passed my degree. The lecturer wouldn’t have bothered to draw a graph to show what was happening. Who needs a graph? It’s obvious from the equation what’s going on. 

I needed a graph. I needed the information to be communicated to me in a visual way. That was MY language. And now, there it was, sitting on my screen right in front of my eyes. It was a moment of discovery. It was like a light bulb suddenly came on in my head. Years of disparate pieces of knowledge all scattered like bread crumbs, suddenly came together. Each time I multiplied two sine waves, I saw immediately what the result looked like. Every time I added two sine waves together, there was the picture instantly available to me.

That was the answer. That’s how the Fourier Transform works. Sines and Cosines, of course – that’s why it uses complex numbers, that’s what it all meant. Fourier’s 200-year-old statement which we had learned by wrote at university suddenly made sense.

“any function of a variable, whether continuous or discontinuous, can be expanded in a series of sines of multiples of the variable.” 

..or as I understood it at that moment:

“Any signal can be built out of sine waves with many different amplitudes, frequencies, and phases, all added together.”

I was elated. I felt like Archimedes must have done when he climbed into his bath and had his “eureka” moment. I wasn’t such an idiot after all.

Several more years passed. I continued to work with Fourier on and off as an engineer, but something was missing from my professional life. Some challenge wasn’t being met. Also now married with a growing family, the demands of an engineering job were becoming a little top-heavy and not leaving me enough time to spend with my wife and kids.

Parallel to my interest in electronics, I also had my interest in music and recording. I started a music podcast. I recorded the first episode on music theory and as part of the podcast found myself wanting to explain the circle of fifths. The problem with the circle of fifths, as far as a podcast is concerned, is that it is a visual representation of the relationship between the different musical keys. A podcast is an audio medium. So I found myself making a video to accompany the podcast. 

I really enjoyed the process. All the things I loved doing the most in the world suddenly came together in one endeavor. Explaining complicated concepts using visuals and animation. This was the challenge that was missing from my professional life. I wanted to make educational videos. 

Even though several years had passed, the eureka moment I had experienced with the Fourier Transform was still very potent in my mind. What if I could make a video explaining how the Fourier Transform worked in the way I wish I had been taught it?

I began writing a script but quickly realized that one video was not going to be enough. Also, I was having trouble ordering my thoughts. My ideas were flowing out freely enough onto the page, but they were doing so in an untidy, unstructured way. No one else would be able to follow my explanation with any clarity. Writing a video script straight off was not the way to go. Instead, I began to order my thoughts in a blog where I charted my journey of discovery. 

The blog took me over a year to write and, as I wrote it, I found that it contained many gaps. Each time my explanations began to become garbled and difficult to follow, I realized that there was some aspect of the Fourier Transform that I had failed to understand properly and that more research was needed. Even after I released the blog on my site, it continued to evolve.

I was in the privileged position of having two colleagues at work who were experts in the Fourier Transform. This is the point, I think, to say a big thank you to Gabbi Idan and Yakir Sharon for all their support and patience, answering all my questions as I struggled along my path to understanding.

I was also now involved in developing a second generation of the bio-spectroscopy device and for a while, a wonderfully symbiotic relationship began to develop between my professional life and the blog, each informing the other with new knowledge.

While I was still writing the blog, I started to turn some of the posts into scripts for videos. I began with a video on Euler’s identity and released it on YouTube. For a while, it didn’t really do anything, but after a year, it began to get thousands of views every day. 

People began to leave comments. The vast majority of comments were overwhelmingly positive. People thanked me for helping them finally understanding what Euler was all about. A few comments even contained extremely valuable constructive criticism which gave me ideas on how I could improve things in future videos. There were also the inevitable one or two comments that were downright abusive, but I quickly came to understand that this is a known phenomenon on the internet. There is even a name for the type of people who write them: Trolls.

However, trolls aside, it was clear from the viewing figures and from the comments that I wasn’t the only one who needed the visual medium to explain complicated mathematical concepts. What had begun as me trying to prove to myself that I was no longer the six-year-old idiot who couldn’t even do his take-away sums, had now developed into something which was helping others. 

I was inspired. 

How much research time and frustration, could I save people if only I could explain the concepts well enough? Could this course, or maybe some future course, even help someone realize that they were actually quite good at maths and that the only barrier that existed for them was the way they had been taught? Maybe I could help someone else to experience their own Eureka moment. 

Producing the videos is ridiculously time-consuming, and am constantly trying to improve my workflow and make the process more efficient. But the videos are my passion. They are the key to explaining these difficult concepts in an engaging and accessible way. I really want to use the full pallet which the video medium gives me; to use cool effects and animations to illustrate each concept that makes up the Fourier Transform. I want SO badly to get away from the image of a blackboard filled with incomprehensible Greek symbols. I want to get rid of that blackboard and create a world filled with visuals that that show, not tell, what the maths is doing. 

It took me 4 years to produce 6 videos that amounted to about half of the course; just under two and a half hours of content.  Then, a year and a half ago, the covid-19 crisis hit, and I found myself, like all of us. spending a lot more time at home. 

My wife convinced me that maybe now was a good time to release the first half of the course and that I should make it available to anyone who might be interested. So I uploaded the videos to YouTube and this is what you will see if you visit the course homepage at https://howthefouriertransformworks.com.

During the last year and a half of the Covid crisis, I have continued to update the blog as I have learned more about the Fourier Transform in its many forms. Now, with the blog finally complete and the structure of the full course clear in my mind, I have resumed filming the videos for the second half of the course as well as getting some exercise sheets produced to help students practice what they are learning. I’m slowly compiling everything into one coherent course.

I find myself battling between two ideals. On the one hand, I would like to release the whole course for free. Knowledge should be available to all, regardless of their financial standing. However, on the other hand, I have a duty to support my family. For the last 6 years, I have been steering an unstable path trying to balance the conflicting needs of an engineering job, producing the course, and still having time for my family. 

Therefore, I’ve decided to compromise. The course has always been divided neatly in two in my head. The first half of the course, the half you can find for free on the website, takes you on a journey from who Fourier was, through all the core concepts of the Fourier Transform, and ends up exploring how the Fourier series works. The Fourier series was the theory which Jean-Baptiste Joseph Fourier himself proposed to the Paris institute in his 1807 memoir and is the precursor to the Fourier Transform. However, the Fourier series can only model repeating signals. Most of the signals we encounter in our day-to-day lives don’t repeat themselves. For that, we need the Fourier Transform. 

So the second half of the course follows how people like Johann Peter Gustav Lejeune Dirichlet continued to develop Fourier’s original theory into the Fourier Transform and beyond into the practical tool we use today. We look at the problems with the Fourier Transform and how those problems were overcome. We finish up with a detailed look at how the Fast Fourier Transform works and how you can even write your own library which performs it.

As I complete them, I’m making a selection of the videos from the second half of the course available to people who are supporting my work on a monthly basis through Patreon. If you would like access to these videos, then please head over to https://howthefouriertransformworks.com/patreon and pledge your support. Not only will you gain access to the videos, but, depending on which tier you choose you can also receive a discount on the price of the full course once it is released, and a free copy of the course ebook which I am currently working on. You will also be enabling me to devote more time to producing the course and its related content such as this podcast.

If you would like to receive updates on the progress of the course, notifications when new podcast episodes are available or other free bonuses which I release from time to time, please sign up to the course mailing list at https://howthefouriertransformworks.com/mailing-list.

That’s it for this episode, but join me next time when we look at how the Fourier Transform saves lives, keeps aeroplanes in the air and power stations running through its use in the field of preventative maintenance.

Don’t forget to send me your questions or how you are using the Fourier Transform by dropping me a line at [email protected]. I look forward to hearing from you.