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.

Sum of sine waves of different frequencies (fourier analsyis)

Status
Not open for further replies.

tom911

New Member
Hi,
The result of ODD waveform represents as follows:
b1=2.55
b3=0.85
b5=0.51
b7=0.36

f=5kHz (Period, T, is 0.2mS)
Dc average, a0, is 3V

The signal passes through High Pass filter with a cut off of 300hz Thus only DC component will not pass.

The waveform is of course a squasi square wave but with what amplitude ?

The solution shows an Vp of 2V and Vpp of 4V, I've no idea how to get this value.

Thanks,
Tom
 
hi tom,
I guess you know a square wave is made up of the Odd harmonics of a sine wave, in your case 5KHz fundamental.
 
Hi,
The result of ODD waveform represents as follows:
b1=2.55
b3=0.85
b5=0.51
b7=0.36

f=5kHz (Period, T, is 0.2mS)
Dc average, a0, is 3V

The signal passes through High Pass filter with a cut off of 300hz Thus only DC component will not pass.

The waveform is of course a squasi square wave but with what amplitude ?

The solution shows an Vp of 2V and Vpp of 4V, I've no idea how to get this value.

Thanks,
Tom



Hi,

Isnt your b7 coefficient supposed to be 0.39 instead of 0.36 ?

Also, there's no DC in the signal anyway.
 
Last edited:
Voltage of 7th Harmonic is equivalent to Fundamental Harmonic/7 which is 2.55/7 = 0.36V

There is not DC right, its my poor explanation.

But what is the amplitude of this waveform ? i.e. The sum of the Sine-waves ?

Let me try to explain this with a diagram:
View attachment 63847

As you can see the Red wave represents a Quasi-square wave signal. This Red Wave is the sum of all of the amplitudes (i.e. V1+v2+v3+V4+v5) and I would like to know how is the average amplitude value calculated ?

I've used:
Vav=sqrt(V1^2+V2^2...etc) * 0.707
 
Hi,

Yes you are right it is closer to 0.36 than 0.39, i thought 0.36 was a little low but 0.39 is too large the more exact figure being 0.364 instead.

But anyway, using 0.36 for b7 and 2.55 for b1 we get a much larger wave than you have indicated, and at 5000Hz it is also much faster.

The wave is going to be:
Vs(t)=b1*sin(w*t)+b3*sin(3*w*t)+b5*sin(5*w*t)+b7*sin(7*w*t)

and for this we get a peak amplitude that is closer to 2.0 than it is to 1.0.

To find the average value which is what you say you are after, we integrate over the time period. Since the wave is symmetric about zero we would get an average value of zero, so to get what we commonly call the average voltage of the wave we integrate over half the period, usually the positive portion, then divide by half the time period.
This looks like this:
Vavg=Integral[0 to T/2](Vs(t))dt/(T/2)

which in words is:
"The integral of Vs(t) with respect to time from zero to half the period, divided by one half the period".

The period T is the time period of one cycle, in this case 1/5000, so half of that is 1/10000.

The actual value comes out to very close to 1.9, but you should do this yourself to find out how this works and to come up with a more exact figure.

The previous formula you've used is for calculating the RMS value which is the square root of the sum of the squared components.
The peak value is harder to find.
 
Last edited:
Too complicated without MatLab, lol ;)

I've used the formula from wikipedia and I did get the value u said (1.95) as can be found in this link: solution.

But now I've verified them with MatLab and the results shows exactly a value of 2V which means that the formula above is wrong.
View attachment 63853

Therefore is there any possible basic assumption rather than integration ?
 
Hi,


The definition is to integrate over the period and then divide by the period. Anything else is an approximation. Integrating isnt particularly hard to do for this wave because all the terms are sin terms which integrate easily. We can however do the integration using an approximate method too if you prefer.

The result is not 2 volts and is not 1.95 volts so something must have went wrong when you did those calculations.
The result is 2 volts if the wave was a perfect square wave with amplitude 2v peak (4v peak to peak), but we have an approximate square wave here not a true one. I am using the original 'b' values you posted in the first post.
The result comes out to 1.9014 to 5 significant figures, but you should do this yourself too and get more digits. I did this using two methods, one analytical and the other completely numerical and the results agree out to something like 14 decimal places.

To prove this graphically, you could draw the wave positive portion using a high resolution graphics function drawing program, and also draw a perfect square wave (positive portion) that exactly encloses the approximate wave touching at the highest peaks. Since we know the area of the perfect square wave is equal to the base width times the height and we know the length and height of one pixel, we can calculate the exact number of pixels under the perfect square wave and we can count the number of pixels under the approximate wave. We can then divide the counted pixels by the calculated pixels and come out with a ratio that when multiplied by the average value of the perfect square wave yields the the average value of the approximate wave.

To do this mathematically using an approximate integral, we can divide the time axis of the true square wave into sections of equal length and sum all of those lengths. Then do the same for the approx square wave. The average value of the approx square wave is then the ratio of the sum using the approx wave divided by the sum using the true square wave times the average value of the true square wave (which is 2.000000). Try this and see what you get.

The integral of:
B*sin(N*w*t)
is:
-B*cos(N*w*t)/(N*w)

so you could use that to integrate term by term if you like. This works out to:

B*(1/(N*w)-cos((N*w*T)/2)/(N*w))

for the integral of B*sin(N*w*t) over the period from 0 to T/2, so you could use that to make it simple for each term.

Slightly simpler form is:
B*(1-cos((N*w*T)/2))/(N*w)

where N=1,3,5 or 7.

After dividing by T/2, we get:
2*B*(1-cos(pi*f*N*T))/(2*pi*f*N*T)

and because T is related to f this simplifies even more to:
B*(1-cos(pi*N))/(pi*N)

and because cos(pi*N) for N odd always results in a value of -1, we get:
B*(1-(-1))/(pi*N)

which simplifies to:
2*B/(pi*N)

for each term with N=1,3,5, and 7.
So applying that term by term and summing should provide the same results for the average value.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top