Naked Science Forum

Non Life Sciences => Physics, Astronomy & Cosmology => Topic started by: chris on 14/07/2017 08:52:49

Title: What are harmonics and how are harmonics formed?
Post by: chris on 14/07/2017 08:52:49
I was analysing some audio the other day which contained intrusive "mains hum" at 50Hz; but looking further at the spectrum there were "harmonics" of the 50Hz hum visible at higher frequencies up the spectrum.

I know what these harmonics are, but I have never really understood how they form or why they adopt the frequencies that they do.

Can someone please explain it to me, and how do I explain this to a ten year old?
Title: Re: What are harmonics and how are harmonics formed?
Post by: evan_au on 14/07/2017 12:59:38
A pure, long-lasting sine wave contains just a single frequency.
- Any distortion of a pure sine wave (including turning it on and off) generates additional frequencies

The target UK mains voltage is a sine wave of 50.000Hz, and voltage of around 230Vrms. But for various reasons it sometimes deviates from the ideal.

For maximum efficiency of the power grid, the current drawn from a wire will also be a sine wave of 50Hz, and "in phase" with the voltage, ie the current is maximum when the voltage is maximum, and the current is zero when the voltage is zero (and the current will be balanced between the 3 wires of a 3-phase power system). But for various reasons it frequently deviates from the ideal, for example:
- Lighting dimmers turn the current off and on 100 times per second, generating a lot of high-frequency harmonics beyond 100kHz, see this thread on lighting dimmers (https://www.thenakedscientists.com/forum/index.php?topic=17073.msg518031#msg518031)
- Many electronic appliances use a rectifier circuit feeding a capacitor. It draws no current until the mains voltage exceeds the voltage on the capacitor, at which point there is a sudden surge in current which stops as soon as the mains voltage drops below the capacitor voltage again. This current waveform contains harmonics in the low end of the audio band; how many depends on how much current the device is drawing.
- Some old variable-speed motors could generate additional frequencies that were related to the speed of the motor being driven rather than being harmonics of the mains frequency. But this delivers power inefficiently, and today's electronic controls draw power at the mains frequency, and use it to generate the right frequencies to drive the variable-speed motor.
- It is most likely that the hum picked up in your audio file was due to the magnetic fields generated by non-sinusoidal current waveforms from a device drawing a lot of current. These can be picked up if your microphone lead was not shielded.

The mains supply has some resistance, so when the current deviates from a sine wave, the voltage also deviates from a sine wave. But the voltage can also deviate for other reasons:
- Transformers are used to convert high voltages for long-distance transmission into "low" voltages for household appliances. During peak hour, the magnetic field can approach the design maximum ("magnetic saturation"), and this distorts the voltage waveform.
- It is possible that your audio system could pick up this distorted voltage waveform frdom capacitive coupling if an unshielded microphone cable is close to a mains-voltage lead.
- This can also happen if you connect two earthed pieces of equipment together, but to different earth points. Sometimes there can be a volt of mains noise between different circuits, and this could well be larger than the audio signal produced by your microphone. This is called an "Earth Loop"; a smartphone used as an audio recorder isn't usually earthed, and should be fairly immune from this.
Title: Re: What are harmonics and how are harmonics formed?
Post by: chris on 14/07/2017 14:08:00
But what about sounds, specifically?

My report on whale sharks from Ningaloo reef (https://www.thenakedscientists.com/articles/interviews/swimming-whale-sharks) (out on ABC RN this week!) has a throbbing noise that was audible in the background when we did the recording; this was some engine or other running on the boat. Looking at the spectrum, there is a bright line at about 50-60Hz corresponding to this sound. There are then further similar bright lines at various points at higher frequencies. These are clearly harmonics. But what's making them?
Title: Re: What are harmonics and how are harmonics formed?
Post by: jeffreyH on 14/07/2017 15:53:43
Harmony and discord.
https://plus.maths.org/content/magical-mathematics-music
Title: Re: What are harmonics and how are harmonics formed?
Post by: Colin2B on 14/07/2017 22:16:49
[/size].....there is a bright line at about 50-60Hz corresponding to this sound. There are then further similar bright lines at various points at higher frequencies. These are clearly harmonics. But what's making them?
The vibration from the engine obviously has a max at the 50-60Hz and that vibration will also cause other components, either in the engine or parts of the structure, to vibrate. If those components are of the appropriate length they will resonate at a harmonic, sometimes a sub harmonic.
Title: Re: What are harmonics and how are harmonics formed?
Post by: evan_au on 14/07/2017 23:14:24
When you said 50Hz, I just assumed electrical interference from the UK mains voltage....

The central noise source of a marine diesel is the periodic explosion of the fuel in the cylinders.
- The explosion itself is a wideband noise
- It is the fact that it is repeated periodically which produces the frequency peaks in the spectrum

This noise will reach your microphone in various ways:
- The exhaust pipe contains baffles, which will reduce some of the higher frequency sounds. But the exhaust pipe can also resonate at certain frequencies, emphasising some harmonics, and reducing others
- Vibration of the engine will be carried through the deck, where it will rattle anything loose on deck
- The propeller(s) beating the water
- Anything that naturally vibrates at some multiple of the engines vibration frequency will also rattle

Diesel engines tend to run slower than petrol engines, and the speed isn't carefully regulated - the speed varies depending whether they are pushing the boat up a wave, or sliding down a wave. It is also possible that the boat had two engines, running at slightly different speeds. 
- This will result in a situation where some things will start to rattle as you go up the wave, and other things rattle when you go down the wave, as the engine passes through their various resonant frequencies.

This can produce a broad peak in a spectrum, as the noise source is continuously changing in frequency.
- The peak shows the most common frequency
- The slopes at the side show the range of less-common frequencies
Title: Re: What are harmonics and how are harmonics formed?
Post by: chris on 14/07/2017 23:17:50
But why do things vibrate at these harmonic frequencies?
Title: Re: What are harmonics and how are harmonics formed?
Post by: jeffreyH on 14/07/2017 23:32:47
And we are back to music and natural frequencies. The frequency or frequencies at which a particular object will naturally vibrate.
http://www.physicsclassroom.com/class/sound/Lesson-4/Natural-Frequency
Title: Re: What are harmonics and how are harmonics formed?
Post by: evan_au on 15/07/2017 02:21:52
Quote from: Chris
But why do things vibrate at these harmonic frequencies?
Sound propagates at a certain velocity through a substance (air, wood, steel, etc).
- The length of that substance determines how long the sound takes to get to the end and bounce back.
- Sounds that can persist (resonate) in the substance have a whole number of wavelengths in the length of the object; other frequencies are quickly damped out.
- How long the resonances persist depends on the Q-Factor (https://en.wikipedia.org/wiki/Q_factor) of the substance

If you hit a low-Q object like a marshmallow, the impact is absorbed, and sound does not propagate.
- If you hit a medium-Q object like a block of wood, the sound propagates, but quickly dies out, making a "clunk"
- If you hit a high-Q object like a childrens' "triangle" instrument, it rings for quite a while, with a specific frequency (plus some harmonics which also have an integer number of wavelengths)

The goal of a luthier (like Colin2B) is to make a musical instrument with a complex shape that will sustain high-Q oscillations over the whole musical range of the instrument, and also resonate to convert the vibrations of the strings (which don't move much air by themselves) into vibrations of the instrument body (which has a much larger area, and produces louder vibrations in the air).

A boat consists of many objects of random shapes and materials, bolted together or just resting on top of each other. They will have an equally random set of resonant frequencies.
- some of these might be high-Q (like a string holding up the mast which will resonate at a specific set of frequencies),
- but most are low Q, and will just clunk, buzz or rattle if the engine hits the right frequency.

Launching a space satellite subjects the payload to high intensity noise of every possible frequency. A standard test is to put the space probe on a shaker table, and vary the frequency of the shaker table over the whole range of frequencies expected during liftoff. The goal is to see if there are any resonances in the payload that will cause the satellite to shake itself to pieces during launch; remediation can involve inserting a low-Q material to absorb the vibration, or changing the tension of straps so they resonate at different frequencies.

I am sure a similar process takes place during the design of a car, to ensure that there aren't annoying resonances inside the car when the engine hits certain speeds.
Title: Re: What are harmonics and how are harmonics formed?
Post by: RD on 15/07/2017 04:17:44
But why do things vibrate at these harmonic frequencies?
It's a resonance (https://en.wikipedia.org/wiki/Resonance) thing ... 
Deviation from a perfect sine wave creates additional frequencies other than that of the fundamental-frequency driving the system.
Any additional frequencies which don't have nodes (https://en.wikipedia.org/wiki/Node_(physics)) which coincide with those of the fundamental-frequency, will quickly be damped (https://en.wikipedia.org/wiki/Damped_sine_wave)-out of existence.
So only harmonics (https://en.wikipedia.org/wiki/Harmonic), (i.e integer-multiples of the fundamental-frequency), persist.

(https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Moodswingerscale.svg/541px-Moodswingerscale.svg.png)
Title: Re: What are harmonics and how are harmonics formed?
Post by: RD on 15/07/2017 04:51:22
...  some engine or other running on the boat. Looking at the spectrum, there is a bright line at about 50-60Hz corresponding to this sound. There are then further similar bright lines at various points at higher frequencies. These are clearly harmonics ...

If it's a constant frequency, multiple notch-filters can help : same technique as was used to attenuate the vuvuzelas ...


But in your case the fundamental frequency will be much lower : "50-60Hz"  instead of  220 Hz, and integer-multiples thereof.
Title: Re: What are harmonics and how are harmonics formed?
Post by: chris on 15/07/2017 11:25:50
Super answers; thank you all very much!
Title: Re: What are harmonics and how are harmonics formed?
Post by: evan_au on 16/07/2017 04:28:51
Quote
multiple notch-filters can help
If the fundamental has a range of 50-60Hz (10Hz bandwidth), then:
- the second harmonics will be 100-120Hz (20Hz bandwidth)
- the tenth harmonic will be 500-600Hz (100Hz bandwidth), which overlaps with the ninth harmonic (450-540Hz) and eleventh harmonic (550-660Hz)

So a bandpass filter is of limited use of there are significant higher harmonics present - you would need to filter out all frequencies!

It may be better to design a dynamic filter that tracks the variation in engine frequency throughout the recording, and removes multiples of whatever engine frequency is present at that point in the recording.

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back