# (3/4) Analysis: Explaining Fourier analysis with a machine

Articles . Blog

In the previous video, I showed how turning the crank on this machine generates twenty different frequencies also known as harmonics, which are turned into

cosines here multiplied by coefficients then summed magnified and the resulting function plotted here on the front. This process is called synthesis. But this machine is called a Harmonic Analyzer which means it can be used to solve the much more difficult inverse problem called analysis. For example if I want to plot a particular function here how do I set the amplitude bars to produce it. To illustrate how the machine does analysis let’s start with a square wave. First, we use some unique properties of the square wave. Since it’s periodic and even all of the information that function carries is contained in half a period. So we’ll take that half a period and sample it at twenty equally spaced points. We use the values of these points as the inputs for the machine. When we turn the crank we produce a new function that reveals the correct coefficients. To see how we get these coefficients we’ll look at the side of the machine. As I turn the crank the tips of the rocker arms form a sinusoid. The indices on the rocker arms run from high on the left to low on the right. I’ll flip the video to make it a little more intuitive. When the rocker arm tips are lined up in a straight line we’ll call that crank number zero. If the horizontal axis runs from zero to pi and the vertical axis from minus one to plus one then we can describe the position of the rocker arms with a cosine. Every two turns of the crank increases the frequency of the cosine by one. At these even numbered cranks the values of the function on the platen yield the coefficients we’re looking for. Let’s rewind and watch the plot and the rocker arms simultaneously. If we pause briefly at every second crank a point is marked on the function. We create a total of 20 points. If we look at the output from the machine and compare it to a sinc calculated by a computer we see that they are very similar. Now, we’ll take the data points from this sinc scale them and use these values on the rocker arms. Remember that our goal is to program the analyzer so that it will plot a square wave. Now, as I turn the crank the pen writes a horizontal line then drops and writes another flat section which amazes me because we’re adding only cosines and then it rises to write another horizontal line. Of course, what we’re seeing is a square wave. What I’ve just shown with the machine is an essential feature of fourier methods. I can take a function perform harmonic analysis extract the coefficients and then synthesize that function to approximate the original. So, now that we see that this machine can do harmonic synthesis and analysis I’ll show you in the next video some details about how to set up the analyzer to perform these calculations. I’m Bill Hammack the Engineer Guy. Next up in the series is operation. If you haven’t seen them already there’s also they intro and synthesis videos. You can learn more about the book here. And if you really want to learn more about the book watch the page by page. If you’re a fan of oscillatory motion you gotta watch the bonus rocker arms video.

##### Written by Brian Rohrer

### 81 comments

### Leave a Reply Cancel reply

#### Recent Posts

- InVision Feedback Example | | Medium-Fidelity Prototypes | Rapid Prototyping | Udacity
- InVision Tutorial: Upload Images | Medium-Fidelity Prototypes | Rapid Prototyping | Udacity
- Real clear SLA parts: Clearcoating prototype 3D printed bottles
- Fused Deposition Modeling Process
- Mechanics of Machining [Introduction Video]
- CNC Machined Parts – Swiss CNC Machined Parts – Custom Swiss CNC Parts
- What is Medium fidelity? | Medium-Fidelity Prototypes | Rapid Prototyping | Udacity
- How to Find Users | Low-Fidelity Prototypes & User Research | Rapid Prototyping | Udacity
- Discover Metal Machining at TEC
- Advance CNC Machining ~ We Stand By Our Delivery

#### Recent Comments

- Jozef Ferenci on ΠΡΡΠΎΠ²Π°Ρ ΠΊΠ»Π°Π΄ΠΊΠ°: ΡΠ°ΡΠΊΠ»ΠΈΠ½ΠΈΠ²Π°Π΅ΠΌ. Π‘ΡΡΠΎΠΈΠΌ Π΄ΡΠ΅Π½Π°ΠΆ, Π·Π°Π±ΠΎΡΡ, ΡΡΠ΅Π½Ρ ΠΈ Π΄ΠΎΡΠΎΠΆΠΊΠΈ
- Serg Grosskopfs on ΠΡΡΠΎΠ²Π°Ρ ΠΊΠ»Π°Π΄ΠΊΠ°: ΡΠ°ΡΠΊΠ»ΠΈΠ½ΠΈΠ²Π°Π΅ΠΌ. Π‘ΡΡΠΎΠΈΠΌ Π΄ΡΠ΅Π½Π°ΠΆ, Π·Π°Π±ΠΎΡΡ, ΡΡΠ΅Π½Ρ ΠΈ Π΄ΠΎΡΠΎΠΆΠΊΠΈ
- Shirley Xu on How to make plastic injection mold? Honeywell-are you drving us to make your plastic parts?
- ΠΠΌΠΈΡΡΠΎ ΠΠ΅Π»Π°Π½ΠΈΡ on Millenial farmer makes a tour across his business for Agrosphera
- Lorielyn Francisco on Team Croatia’s reunion | Make It With You (With Eng Subs)

This is awesome!

Wasn't it supposed to be released on a week-by-week basis?

This is engineering witchcraft! So cool =D

This is absolutely fantastic! I wish I could show my friends this but they don't appreciate math as much as I do though :(.

This is SO cool! I honestly cannot pretend to understand the math behind this, but it is presented in such a clear and succinct way that I feel like I'm following it anyhow. Brilliant.

You just blew my mind π

You are, by far, the best science guy i'm subscribed to on Youtube, thanks so much for the hard work.

This video is fantastic! The production quality looks like something you would see in a large-budget documentary, maybe even better. Also, the machine you present is stunning. Thank you for spending the time and resources to make this!

Hi Bill,

Great video! It's always great to see old mechanisms coming to life.

I'm interested as to why you don't see any of the Gibbs Phenomenon when this is plotted, I was wondering if you could explain why?

So Good

What a shame that the best channels on YouTube get the least number of views, while videos full of absolute nonsense get millions of views.

Keep it up!

What level math is this? The highest I've taken is trig but I didn't finish it, so the only thing about this that I understand is what a cosine wave is. How much more would I have to study to encounter what is shown in the video? It looks really interesting.

How can I get such a machine?

This is even more awesome, looking at this someone can understand how to make the algorythm work on a computer.Β I.e. what do to with the wave to transform it into coeffiecients. Cool.

This machine is so fascinating. Thank you for making these videos.

mind blown bro. that machine is rad!!!

One of your best videos, nicely done.Β Call me spoiled but I feel like the machine doesn't so much do the analysis as make it easier to execute.Β After entering the input function into the rocker arms, you've got to discretize its sinc output and transcribe this into its rocker arms.Β Then on the second run you get the approximation.Β Is this correct?

It always amazes me what people have done purely mechanical before the appearance of electronics (and even then, quite a lot of that "mechanical magic" was used in recent products, like VCRs).

Seeing it applied to do Fourier transformation, really the most important thing in engineering, makes it double amazing.

Thank you so much for these videos. I think I have finally understood Fourier Analysis. What an astonishing machine.

If you ever wondered how computers (synthesisers) generate electronic music, this is it. The shape of the wave gives it's tone, and notes are generated by varying the wave's frequency.

That sewing just did a Fourier Transform lol. . .

Amazing!!!

MATHS = Mental Abuse To Humans…

Thank you for teachingΒ something totally new to me today!

This Mark Hamill guy should read audiobooks.

AWESOME! How did the points get there? and how do you determine their value? I see that you set the first harmonic to its max,and all the others relative to that, to make the squariest square possible.

FINALLY I've understood fourier analysis after all those years…

Wow! Fantastic stuff. Loving it!

You'r a great speaker and teacher. Thank you for this videos.

These are some REALLY well-made videos man. Truly amazing machine.

That's really cool. Thought I wanted to see the arms when they were creating the square wave. How all of those cosines add up to a straight line!

So, this is how is was done before the FFT! Great video.

That's so cool, thanks a lot for this series!

Great!!

My brain. I just… Dude.

We don't see Gibbs phenomenon ?

You lost me at 0:02 o_0

Woah no dilikes

1000 likes and 0 dislikes great job! π

Beautiful video.Β Thank you so much.

Fascinating Β machine

Magic!

1:40 – Forty seconds of video just taught me what four incredibly frustrating years of high school math could not. Β Why the HELL could my teachers not get the concept of a cosine across to me or most of my peers?

If you were my physics lecturer, I would have been an Einstein. A big like to you.

very cool!!!

Wow. That is incredible. I seriously am astonished by this machine; I got chills when you synthesized the approximated square wave.

Brings back some very bad memories from uni. I never could decide if I hated Fourier transforms more than Laplace transforms. Brilliant mathematical concept and and an even more brilliant machine to see it in action – it's just my feeble brain couldn't cope.

So this is how the Flintstones invented the radio..

Bill, thank you for your videos. They truly inspire me and humbly remind me that we indeed stand on the shoulders of giants!

truly a great piece of engineering! Great Work!

This is my new favorite mechanical calculator. This thing is beautiful, and amazing. Now I want a scale model of one of these!

Thank you for showing the world this amazing device!

This is mind blowing! But more accurate periodic functions could be made by increasing the number of terms to greater than 20.

All those levers moving around…and the pen stays still then rather suddenly moves and stays still again.! I wish you had shown the rockers moving here!

amazing

I use a series of sines and cosines to draw camshaft profiles and analyze their harmonics, since it's a preloaded spring and mass system.

people are smart

hey bud…… your vids are awesome(BIG time) !…….what a historic gem !…..& to any/everyone interested…….I had recently been working on a thingy(a pretty cool online graphing calculator) that that hopefully helps visualize these/related ideas ……..https://www.desmos.com/calculator/krrxbwnyvf

I have great admiration for any man who can design such elegant machines. Fantastic.

If you don't know how "Fourier transformations and back" work then you have a hard time to understand this video. Wonderfully designed analogue machine! :))

Brilliant!!!

You are Geniu!

Even functions are symmetric about the y-axis, not the origin (0:52)

This video went a little too fast. I had to watch it a couple times to follow it. (You go from setting the square wave on the rocker arms to the chart with the coefficients to resetting the rocker arms really fast.)

Top notch!

The mechanism is amazing and you sir have explained it very well

This is food for my mind for a thousand years!

Didn't you say in the previous video, that turning the crank varies x? Now at 1:50 you say 2 turns of the crank increases the frequency of the cosine by 1?

So what do you really mean?

Maybe I didn't get it right, but: We start with a_n=10 (n=1..10) and a_n=0 (n=11..20)

This is sth like 10* (cos(x) + … + cos(10x))

So how does this represent sin(x)/x ??

Mano do cΓ©u! Mind Blowing!! No words for this video, thank you, sir

You are awesome, sir!

When I was still taking my undergraduate degree in mechanical engineering, we had a subject in machine elements where a four bar mechanism can apporximate a function. I did not know that they actually had a machine that actually added lots of those functions!ππ

That's really cool. I actually just happened to have read an article on adding sinusoidal frequencies and how square waves are made up of multiple harmonic sine wave frequencies. Neat that I should come across this video right after.

What Mr Michelson didn't foresee, is that his machine could be used centuries later, to compress/uncompress MP3… which is basically doing DCT (Fourier's transform) , throwing away the minor (inaudible) cosine components , and reverse-DCTing the result to recreate sound.

This would be really slow though :p

cites OMFG- HellomY gOD iS tHAT aMAZING

So Fourier analysis is actually super simple? Uni makes it look so incredibly difficult to do.

Brilliant! sinc(x)… who knew?

Fantastic!

I am an Engineer my self, and did a lot related to Fourier analysis yet didn't know about this awesome device …… thx for sharing

I've got goose bumps!!!!

Amazing machine. B4 I retired as an electronics tech we'd use a hi tech oscilloscope to do this kind of thing.

Itβs maddening even imagining what types of minds come up with these things.