Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

harmonics

Status
Not open for further replies.

meowth08

Member
Hi,

1. How are harmonics created in a signal?
2. What are it's uses?
3. Are harmonics desirable?
4. In computations, are harmonics being taken into consideration?

I am asking all these because the readings I've done don't give me straight forward and clear answers. I am hoping that someone can help me understand these well.

Regards,
meowth:D8
 
Last edited:
You've asked several questions that require a ton of explanations.

I'd suggest you google "harmonics" first. For myself, I came to understand audio harmonics first, which helped in understanding electrical (or electronic) harmonics much better, once I got to them.

Then, maybe, ask your questions again, one at a time.
 
Hi,

1. How are harmonics created in a signal?
2. What are it's uses?
3. Are harmonics desirable?
4. In computations, are harmonics being taken into consideration?

I am asking all these because the readings I've done don't give me straight forward and clear answers. I am hoping that someone can help me understand these well.

Regards,
meowth:D8

hi me08,
Its a wide subject, but some of the basics would be:

1. How are harmonics created in a signal?
If the original signal is say a pure sine wave and it connected thru a non linear circuit, distortion of the original sine wave would include harmonics as well as the fundamental.
https://en.wikipedia.org/wiki/Crest_factor

2. What are it's uses?
Some guitar musicians like the 'depth' thats created by harmonic content.
Also its possible to filter off the harmonics to create a higher frequency for other work.

3. Are harmonics desirable?
Not if you want faithful reproduction of the original sound

4. In computations, are harmonics being taken into consideration?
Yes, especially in Fourier Analysis of the signals.

There is lots more to say about harmonics,

Remember a square is composed of the fundamental and all the odd harmonics at a decreasing level of the harmonic frequency.
 
Last edited:
Looking at this from the perspective of a radio transmitter.

1. How are harmonics created in a signal?
Distortion.
Generally, any distortion of the signal will create harmonics.

2. What are it's uses?
Sometimes it is desirable to create a high frquency signal from one of lower frequency.
Some (older) transmitters which put out a signal on say 144Mhz, may have a crystal oscillator running at 12Mhz and a series of multipliers, usually x3, x2 and x2 to give a total multiplication of 12 times.

3. Are harmonics desirable?
In the example above, yes they are. Otherwise the multipliers would not work.

However, consider our transmitter running at 144Mhz.
With the best will in the world there will be harmonics at 288Mhz and 432Mhz and .... etc
These outputs will cause annoyance to users of those frequencies.
So all properly designed transmitters will have a low pass filter to suppress harmonics to a low level.
On the output of a radio transmitter harmonics are NOT desirable.

4. In computations, are harmonics being taken into consideration?
Sorry but I do not understand your question.
Computations of what?

JimB
 
Last edited:
4. In computations, are harmonics being taken into consideration?

When I worked in broadcast I monitored harmonics every day.
I broadcast 100,000 watts of power at 100mhz.
If I had a harmonic at 200mhz and 1000 watts it would block another band.
I could have 200 watts at 300mhz and 100 watts at 400mhz and 50 watts at 500mhz and 10 watts at 600mhz etc.

Because of harmonics my 100,000 watts might be only 98,000 watts at 100mhz. and I will be killing TV reception and other reception.
 
Hi,

1. How are harmonics created in a signal?
2. What are it's uses?
3. Are harmonics desirable?
4. In computations, are harmonics being taken into consideration?

I am asking all these because the readings I've done don't give me straight forward and clear answers. I am hoping that someone can help me understand these well.

Regards,
meowth:D8


Hi,

As others have stated, there's a little bit to this subject all of which might take a little while for you to grasp. It's best to look at the basic concept behind harmonics first and go from there.

The first basic idea is that a harmonic is a frequency that is related to another base frequency usually by some factor and that factor is called the harmonic number. For example, if the base frequency is 100Hz then 200Hz is the 2nd harmonic of 100Hz. Similarly, 300Hz is the 3rd harmonic and so on and so forth. If the base frequency was 200Hz, then 400Hz would be the 2nd harmonic simply because 2 times 200 is 400. 3 times 200 is 600, so 600Hz is the 3rd harmonic of 200Hz. You can see how simple this is. To figure out the 9th harmonic of a given frequency you simply multiply that base frequency by 9 and you get the 9th harmonic.

The second basic concept is that any wave shape (pulse, triangle, square wave, etc.) can be constructed by adding together various sinusoidal harmonics of the base frequency in the right proportions and with the right phase shifts. The base frequency here is called the "Fundamental" frequency. The harmonics are weighted by a set of coefficients called the amplitudes. In other words, any wave shape can be constructed using a set of sine waves starting with the fundamental and the required harmonics with the right amplitudes and phase shifts. They are all sine waves, but when they have the right phase shift and amplitude and are all added together they produce the required wave shape even though none of them individually look anything like the original wave shape.

The most common wave shape studied is the square wave. The square wave has harmonics who's amplitudes are related to the fundamental frequency amplitude by a factor of 1/N, where N is the harmonic, and it contains only odd harmonics so N is odd and never even. For example, for a fundamental of 100Hz we have harmonics of 300Hz, 500Hz, 700Hz, 900Hz, etc., only the odd multiples, and the amplitudes are 1/N so we have 1/3 of the 3rd, 1/5 of the 5th, etc., so that means the 300Hz sine wave would be 0.3333 times the amplitude of the fundamental, and the 500Hz sine wave would be 0.2 times the fundamental amplitude, etc. If we use sine waves that go up high enough (say to the 99th harmonic) we get a wave shape that closely resembles the original square wave when they are all added together.

Strange as this all might sound, it has vast implications in circuit theory that you would end up looking into next. Most notable, since a signal can be represented in the time domain (the square wave is in the time domain because it's amplitude changes with time) and signals in the time domain can be converted to a sum of harmonics of frequencies that are related to the fundamental, signals can also be represented in this new way (called the "frequency domain") and this leads to various circuit analysis simplifications that would be much harder to compute in the time domain. This new representation also allows us to view signals in a conceptually simpler way too in many cases (it makes it easier to understand some circuits).
 
Last edited:
Hi,

I have read all the replies word by word. Thank you for the replies. But I'm still confused.

cowboybob,

Correct me of I'm wrong sir, harmonics in audio is different from electronic harmonics.

sir eric's answers for questions 1 and 4 are about electronic harmonics and for 2 and 3, audio harmonics.
Are audio and electrical harmonics separate branches of harmonics or they always go hand in hand?

Sir eric:

"Remember a square is composed of the fundamental and all the odd harmonics at a decreasing level of the harmonic frequency."
I didn't understand this sir. Although this was restated and explained in MrAl's reply, I wasn't able to understand it right. All I have is a picture of the square wave on my head and but the idea of having odd harmonics in a decreasing frequency is not yet clear.

Jimb,

Regarding the computations I was asking, I think it is already answered in sir eric's post.

Ronsimpson,

Thank you for that example. I imagined how the reception would be if harmonics are not eliminated or suppressed. It would interfere the nearby channels.

MrAl,

Thanks for the very detailed basics of harmonics. You never fail to explain things with simplicity. But honestly, just what I said earlier, paragraph 3 was not clear to me.

Harmonics is a broad topic. It can branch on transmission of signals, electronic circuitries, and audio.
 
Hi,

In paragraph 3 i was trying to give you some starter information on how a wave that is not sinusoidal in nature can actually be constructed using harmonics where each harmonic is itself a sinusoidal wave.

For example, if we start with a sine wave of 1Hz:
sin(2*pi*1*t)

and add to that one third of the third harmonic (the third harmonic is 3Hz because 3 times 1 is 3):
(1/3)*sin(2*pi*3*t)

and add to that one fifth of the fifth harmonic:
(1/5)*sin(2*pi*5*t)

and add to that one seventh of the seventh harmonic:
(1/7)*sin(2*pi*7*t)

and add to that one ninth of the ninth harmonic:
(1/9)*sin(2*pi*9*t)

we would get in total:
v(t)=sin(2*pi*1*t)+(1/3)*sin(2*pi*3*t)+(1/5)*sin(2*pi*5*t)+(1/7)*sin(2*pi*7*t)+(1/9)*sin(2*pi*9*t)

and if we take this v(t) and multiply it by 4/pi we would get the wave shown in the attachment. Looking at that wave, we can see that it is 'almost' a square wave and if we added more harmonics as we did above (more odd above the 9th) we would get a cleaner and cleaner square wave. There are ripples in this 'square wave' because we stopped at the 9th harmonic.

Note that we did not use any even harmonics, and that we followed a strict rule where we would use amplitudes that are 1/N times the Nth harmonic. This strict rule is the 'rule' for the square wave, but other waves would have their own rules. For another example, a triangle wave is constructed also from odd harmonics only with amplitudes that are the inverse square of the harmonic, so each amplitude is 1/N^2 instead of 1/N. This new rule allows us to construct a different wave from the harmonics. Other rules could be found for other periodic waves too. The general procedure for this is known as Fourier decomposition or simply Fourier analysis.

If you want to understand this better your best bet is to start with the concept of the Fourier Series and try to calculate some Fourier coefficients for some different wave shapes.
 
Last edited:
.......................

Correct me of I'm wrong sir, harmonics in audio is different from electronic harmonics.

sir eric's answers for questions 1 and 4 are about electronic harmonics and for 2 and 3, audio harmonics.
Are audio and electrical harmonics separate branches of harmonics or they always go hand in hand?
........................
Harmonics are harmonics. Makes no difference whether it is audio or electrical. A harmonic is just a multiple frequency of the fundamental frequency. Of course audio harmonics can be electrical before they are reproduced by a transducer (speaker) to become sound waves with harmonics.
 
"Remember a square is composed of the fundamental and all the odd harmonics at a decreasing level of the harmonic frequency."
I didn't understand this sir. Although this was restated and explained in MrAl's reply, I wasn't able to understand it right. All I have is a picture of the square wave on my head and but the idea of having odd harmonics in a decreasing frequency is not yet clear.

hi me08.
Its not decreasing frequency, its increasing frequency,,, its the magnitude of the harmonic ampliitude which decreases as the harmonic frequency increases.

Try this:
Get a piece of graph paper and draw a single sine wave, starting from time zero.

Now draw on the same time and amplitude scales, a frequency 3 times higher than the original sine wave, but only a 1/3 of the amplitude of the original sine wave.

If you now add the original and the 3rd sine wave together and plot that you will see the beginnings of a square wave.

If you took it to the next level ie: 5 times frequency of the original sine wave [ the Fundamental] at only 1/5 of the amplitude and added that, the square would get more square .... on so on.

OK.?
 
hi me08,
Had a few free minutes so I thought this image of the Harmonics would help.

The OPA is used to sum the Fundamental and Harmonics,, the input resistors are chosen to give a gains of 1, 1/3, 1/5 and 1/7.

Note the increasing frequency of the voltage generators,, 100,300,500 & 700 Hz.

E.
 
Hi again,

Eric that's a nice illustration of the process of adding the harmonics. It clearly shows that as we include more and more harmonics the square wave gets closer and closer to a real square wave.

meowth:
I forgot to ask you, have you had any calculus at all as in integrating? If so, we can do a Fourier series example for the square wave or other waves.
 
Hi again,

Here is the procedure you might go through to find the coefficients of the harmonics for the square wave. The coefficients are the amplitudes for each harmonic.

Just to note, not much calculus is needed here as we only have to integrate a sin or a cos term as this:
Integral cos(n*x) = sin(n*x)/n
Integral sin(n*x) = -cos(n*x)/n

Those are the only two integrals we have to know to do the square wave.


We usually need two sets of coefficients for a wave, the 'an' and the 'bn', but
the 'an' cancels out for the square wave described above so we only have to
calculate the 'bn'.

The two sets are calculated as follows:
an=(1/pi)*Integral[-pi to pi] f(x)*cos(n*x) dx
bn=(1/pi)*Integral[-pi to pi] f(x)*sin(n*x) dx

and since we only want the bn we do only this second set:
bn=(1/pi)*Integral[-pi to pi] f(x)*sin(n*x) dx

where f(x) is -1 for x from -pi to 0, or +1 from 0 to pi (ie it is a square wave centered at x=0).

We have to split this integral into two sections and add the results...

Integrating sin(n*x) from -pi to 0 first we get:
cos(pi*n)/n-1/n

but since f(x) is the square wave from -pi to 0 has a constant value of -1, this becomes:
1/n-cos(pi*n)/n

Integrating from 0 to pi we get:
1/n-cos(pi*n)/n

Adding the two results we get:
(2-2*cos(pi*n))/n

Thus, we get the 'bn' from this:
bn=(1/pi)*(2-2*cos(pi*n))/n

Since cos(pi*n) for n even is 1, all the bn for n even are zero. Also, since
cos(pi*n) for n odd is -1, we can simplify the bn to this:
bn=(1/pi)*4/n=4/(n*pi)

doing only the odd n.

Tabulating a few of the values for the coefficients we have:
n=1: b1=4/pi
n=3: b3=4/(3*pi)
n=5: b5=4/(5*pi)
n=7: b7=4/(7*pi)
n=9: b9=4/(9*pi)

Because all the 'an' values are zero there are no phase shifts.
This allows us to write out the approximated square wave as:
b1*sin(w*t)+b3*sin(3*w*t)+b5*sin(5*w*t)+b7*sin(7*w*t)+b9*sin(9*w*t)

and by inspection you'll see that all of the frequencies are N*w and all the respective
'bn' coefficients we used are all calcualated above. So when we use the Nth
coefficient we use the Nth frequency. The Nth frequency is just the fundamental
frequency multiplied by that value of N, and the fundamental angular frequency is w.
w is equal to 2*pi*f where f is the fundamental frequency.

The approximate square wave written out using the actual values of the coefficients we have:
(4/pi)*sin(w*t)+(4/3pi)*sin(3*w*t)+(4/5pi)*sin(5*w*t)+(4/7pi)*sin(7*w*t)+(4/9pi)*sin(9*w*t)

and that is the approximate square wave. Note all of the components are sine waves, just
all at different frequencies which are related to the fundamental frequency by an integer
factor N, and as the harmonic number increases the amplitude decreases. Even though
they are all sine waves when added together they make up an appoximated square wave.
It is approximated because we stopped at a certain harmonic, in this case the 9th. Had
we gone all the way to infinity, in theory we would have a perfect square wave. So in
theory the square wave is made up of the odd harmonics from 1 to infinity, and once we
go to infinity it is no longer an approximation but an exact duplicate of the square
wave. You can see how this might be possible by viewing Eric's post where he showed
the square wave getting better and better. If we were able to use an infinite number
of harmonics we would be drawing an perfect square wave instead of one with ripples
on the top and bottom. This is one of the basic principles of Fourier.

A small additional note here is that in order to get a square wave that goes plus and minus 1,
we end up with a factor of 4/pi which is slightly greater than 1. This means if you want to
try to reproduce the square wave you'd have to include an amplification factor of 4/pi.

The procedure used above can be used for other waves too, but of course the resulting coefficients will come out different.
 
Last edited:
Hi,

crutschow
Thanks for the clarification sir.

sir eric
-Oh yes! I committed a mistake on that sir. It is very clear in the equation of MrAl that it is the amplitude that is decreasing and the frequency increasing. It is also clear in the examples that harmonics are multiples of the fundamental frequency and the number multiplied to the fundamental frequency is called the harmonic number.
-I will plot the curves so I would be able to see it myself. I think everything will be ok since I already have the waveforms to compare my drawings with.

MrAl
Yes sir. I know some of the basics of integral and differential calculus. I will also search fourier series and follow through your reply for the computations.

I will let you know what I would get. Thank you for all the information.
 
Grief, this is getting complicated.
Let's go back to OP and ask what triggered this question?

-by knowing why the Q is asked we might avoid giving too much info, which is only clouding the desired reply.... er, maybe.
 
Hi harold,

Well, it sounded like the OP wanted to know more about harmonics, and i dont think the discussion would be complete without at least some mention of Fourier. It's only those two equations for 'an' and 'bn' that have to be understood a little to get going with the decomposition of a signal into it's constituent harmonics, and that helps to show just what the understanding of harmonics can mean.
 
Harold777:

This is not homework. I even forgot where my questions originated.
This is learning for me. No deadlines. No pressure. No limits.
Pure enjoyment of what I do.

MrAl:

The steps you have showed are very comprehensive and easy to follow.
I think I will be able to extract the other waveforms into their sine and cosine components.

Integrating sin(n*x) from -pi to 0 first we get:
cos(pi*n)/n-1/n

I got cos(-pi*n)/n-1/n
At first I thought there was a mistake not realizing immediately that –pi and pi are coterminal.

A small additional note here is that in order to get a square wave that goes plus and minus 1, we end up with a factor of 4/pi which is slightly greater than 1. This means if you want to try to reproduce the square wave you'd have to include an amplification factor of 4/pi.

I don’t get this part so clear sir. I have several questions on this part.
What is the significance of the amplification factor 4/pi?
What does the word “reproduce” mean?
Isn’t it that this equation:
Y=(4/pi)*sin(w*t)+(4/3pi)*sin(3*w*t)+(4/5pi)*sin(5*w*t)+(4/7pi)*sin(7*w*t)+(4/9pi)*sin(9*w*t) . . .
gives us a square wave that goes on and on since the component sine waves are waveforms that do not end, hence, the square wave is reproducing and unending?

:)meowth08:)
 
Last edited:
Harold777:

This is not homework. I even forgot where my questions originated.
This is learning for me. No deadlines. No pressure. No limits.
Pure enjoyment of what I do.

MrAl:

The steps you have showed are very comprehensive and easy to follow.
I think I will be able to extract the other waveforms into their sine and cosine components.



I got cos(-pi*n)/n-1/n
At first I thought there was a mistake not realizing immediately that –pi and pi are coterminal.



I don’t get this part so clear sir. I have several questions on this part.
What is the significance of the amplification factor 4/pi?
What does the word “reproduce” mean?
Isn’t it that this equation:
Y=(4/pi)*sin(w*t)+(4/3pi)*sin(3*w*t)+(4/5pi)*sin(5*w*t)+(4/7pi)*sin(7*w*t)+(4/9pi)*sin(9*w*t) . . .
gives us a square wave that goes on and on since the component sine waves are waveforms that do not end, hence, the square wave is reproducing and unending?

:)meowth08:)


Hi meowth,

I should have know that saying it that way would cause a little confusion.

The common way to describe the components of a square wave is to state that we use the fundamental plus the addition of all the odd harmonics times the reciprocal of the harmonic number, such as 1/3 times sin(3*w*t) for the third harmonic. This means that the component with the first harmonic is 1/1 times sin(w*t). However, that leads to a square wave that goes plus and minus 0.7854 and *NOT* plus and minus 1. To get a square wave that goes plus and minus 1 we have to multiply all the harmonics by the factor 4/pi. Thus the third harmonic component is not really 1/3 times sin(3*w*t), it has to be 4/pi times 1/3 times sin(3*w*t), and the first harmonic is not really sin(w*t), it is 4/pi times sin(w*t).
Note that this is just so that when we think about the convenient form 1/N*sin(N*w*t) we have to remember to include the factor 4/pi if we wish to show the normal square wave that runs from plus 1 to minus 1.

If you use the equations for the Fourier coefficients you dont have to worry about this, because that is the more straight forward way of doing it, and you'll notice that the factor comes out of it automatically and doesnt have to be added manually later. Note that the approximate square wave i had shown in my previous post can be factored where we can bring out the factor 4/pi and that will illustrate what this is all about. So the only time you have to worry about this factor is when you dont actually use the Fourier formulas for the 'an' and 'bn'.

I mentioned this because it comes up now and then where we talk about the harmonic components being 1/N times the sine harmonic, but we forget that we wont get a square wave that goes from plus and minus 1 that way it will only go plus and minus 0.7854 approximately. If you look again at post #11 that Eric posted you'll see that the circuit he uses has source voltages with amplitudes of 10 volts, yet the average output is not 10 volts it is between 6 and 10 volts about half way between them which is approximately 8 volts which is close to the theoretical 7.854 volts. To get 10 volts we'd have to included an amplification factor of 4/pi.

So it is just a matter of how you approach the problem of finding the harmonics as we have really talked about two different methods.

I hope that clears this up.

As to 'reproduce', i was saying that to reproduce the signal we have to use the right sine components AND the right amplitudes, and all i meant by 'reproduce' was that when we use those components we get something like a reproduction of the square wave. We started by finding the components of the square wave, and when we add them all together we again get a square wave which i just called "reproducing the square wave".
So we started with a square wave, converted it into the Fourier form, then converted it back into a square wave which is just as if we 'reproduced' the square wave we started with.
 
Last edited:
Hi,

I didn't notice the amplitudes of the sine waves in sir eric's post.
Thank you sir.

m8
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top