# Are the frequencies a histogram in the frequency domain?

I'm new to signal processing, and was learning about wavelets from this site. In the graphs above, the time domain signal is obvious. The x axis shows the signal varying according to time. I don't understand the frequency domain though (even after watching a few videos).How does the frequency graph relate to the time graph above? Is it showing the frequency value for every amplitude value of a different signal (assuming "amplitude" is "Module" of the y axis) of the temporal graph?

Part of my assumption is obtained from this answer. But the question still remains, since if there are two signals of the same frequency but different amplitude, wouldn't they have a representation on the frequency graph where it's not possible to distinguish between them?

I'm even more confused because this example shows 20 millisecond samples being taken from a Fourier spectrum and being fed to a neural network like as though the x axis of the Fourier spectrum was the time domain rather than a "Module" value as shown in the graph above.

ps: I'd appreciate a plain-English explanation rather than one supplemented with equations that I won't understand.

• This video might be helpful for you: youtube.com/watch?v=spUNpyF58BY It has good animations which help you get some intuition on the topic while also going over the math a bit. – hulappa Aug 21 '18 at 11:24
• Thanks hulappa. That's the exact same video I linked to in my question. – Nav Aug 21 '18 at 12:54
• Sorry, my bad. I hope the answer below is more helpful. – hulappa Aug 21 '18 at 12:56

Are the frequencies a histogram in the frequency domain?

No.

A histogram is the visualisation of a sequence of discrete counts. For example, a population pyramid can tell you the distribution of ages in a population.

The frequency spectrum represents strength. It doesn't have to be integer and it does not really mean that it represents counts of sinusoids at a specific frequency. The most trivial counter example of this is what is known as the Direct Current (DC) value which is frequency 0 (Zero) Hertz.

Although, you could possibly formulate a view of the frequency spectrum as some form of histogram (counts of elementary parcels of sinusoids), it would be very difficult to fit this view to the average value across the sample (which is what 0 Hz represents).

So, the frequency spectrum is not a histogram, it has nothing to do with a histogram. But what is it?

It is difficult to tell you without going through equations and properties because they represent our understanding of how the world works (for example, linearity and how things can be decomposed to parts and recomposed from parts). But here is an attempt:

This is a string trio: Notice that the instruments have more or less the same shape but their size changes. Now, without going into equations, take it as a rule of thumb: The bigger the instrument the "lower" (in frequency) is its sound. (And, they can get...big).

When they all play together, they make up one continuous stream of sound that hits one's ears or a microphone.

The accurate analogy here is that the frequency spectrum of the sound recording would tell you how loud was each one of these 'violins' playing.

Joseph Fourier worked out a finer analogy that is very useful in DSP and goes by the name Discrete Fourier Transform (DFT).

He postulated that given any periodic waveform, there is a way to decompose it down to an infinite sum of sinusoids of varying strength and phase.

This is what the DFT does and from the DFT we derive various frequency spectra (namely, amplitude, power, phase).

...since if there are two signals of the same frequency but different amplitude, wouldn't they have a representation on the frequency graph where it's not possible to distinguish between them?

You see how this histogram view of the frequency spectrum doesn't really work now I hope. Two signals of the same frequency contribute to the strength of the same frequency in "the mix" and therefore do not appear as two individual measurements.

I'm even more confused because this example shows 20 millisecond samples being taken from a Fourier spectrum...

But what you show is not a frequency spectrum. What you show is a spectrogram.

Without going into equations: The DFT decomposes a periodic waveform (any waveform) into an infinite sum of sinusoids. Because of the properties of those sinusoids, the DFT can tell you that a sinusoid is present in the mix but it cannot tell you WHEN it was present.

So, if you had a 1 hour recording of just two violins, a big one and a small one but with the small one just performing for 2 seconds, the DFT will still show high frequencies but it will not be able to inform you WHICH 2 SECOND SEGMENT of the 1 hour recording was it that the small violin was louder.

For this reason, the Short Time Fourier Transform (STFT) was developed. What this does is decompose the signal down to small (possibly) overlapping windows and obtain the DFT's of those windows.

This leads to an intermediate representation of the signal where we now can tell (within limits) which frequencies were present at which times.

This is what the last diagram in your question is depicting and this is why it still retains an axis of "Time". In that diagram, Time runs left to right and frequency runs bottom to top.

Hope this helps.

PS: I think that I understand why you don't feel like going through the equations but if you make a start, first with understanding the mathematical notation and then towards reading and understanding what it is that the equations are trying to describe, then I think that you will be greatly benefited in the long term.

• Thank you very much A_A. So if the frequency graph shows the strength of the signals, I'd assume the frequencies of the violin would appear as a small hill and the frequencies of the Cello would appear as a smaller hill a little away from the violin frequency etc. Correct? – Nav Aug 21 '18 at 12:51
• @Nav You are welcome.If you are referring to the spectrogram then provided that the cello and the violin play at the same time,they will be forming two "hills",one lower than the other on the same column.If they play at different times,the hills will still preserve their vertical separation but also occur at different columns (one to the left of the other).If you are referring to the spectrum then provided that they play together, the cello will appear as a "hill" to the left (lower frequencies) of the violin. Not a hill, more of a slope – A_A Aug 21 '18 at 13:57
• I was referring to the frequency graph. Blue lines. The first image. Thanks. – Nav Aug 21 '18 at 13:59