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.

fourier transform versus fourier series

Status
Not open for further replies.

derick007

Member
I have used Fourier series to calculate the frequency spectra of a periodic unipolar square wave (i.e. 50% duty cycle) with amplitude A and found the line spectra to exist at 0 Hz and odd harmonics of the fundamental frequency. The line spectra do not exist for even harmonics.
The amplitude at 0 Hz is A/2 and for the n th odd harmonic = (2 x A)/(n x pi).

I then used the Fourier Transform to calculate the frequency spectra of a unipolar square wave (i.e. 50% duty cycle) with amplitude A for
1. One complete cycle with period T and fundamental frequency f=1/T
2. Two complete cycles, one after the other, each with a period T/2 and fundamental frequency f=2/T. Total time T.
3. Three complete cycles, one after the other, each with a period T/3 and fundamental frequency f=3/T. Total time T.
4. Four complete cycles, one after the other, each with a period T/4 and fundamental frequency f=4/T. Total time T.

and found the line spectra to exist at 0 Hz and odd harmonics of the fundamental frequency. The line spectra do not exist for even harmonics.
The amplitude at 0 Hz is AT/2 and for the n th odd harmonic = (A x T)/(n x pi). As expected the line spectra increase in amplitude as the number of complete cycles within the time T increases.

However I cannot see when the line spectra of the Fourier transform would equal that of the Fourier transform ? Ate the equations for the line spectra correct ?
 
I have used Fourier series to calculate the frequency spectra of a periodic unipolar square wave (i.e. 50% duty cycle) with amplitude A and found the line spectra to exist at 0 Hz and odd harmonics of the fundamental frequency. The line spectra do not exist for even harmonics.
The amplitude at 0 Hz is A/2 and for the n th odd harmonic = (2 x A)/(n x pi).

I then used the Fourier Transform to calculate the frequency spectra of a unipolar square wave (i.e. 50% duty cycle) with amplitude A for
1. One complete cycle with period T and fundamental frequency f=1/T
2. Two complete cycles, one after the other, each with a period T/2 and fundamental frequency f=2/T. Total time T.
3. Three complete cycles, one after the other, each with a period T/3 and fundamental frequency f=3/T. Total time T.
4. Four complete cycles, one after the other, each with a period T/4 and fundamental frequency f=4/T. Total time T.

and found the line spectra to exist at 0 Hz and odd harmonics of the fundamental frequency. The line spectra do not exist for even harmonics.
The amplitude at 0 Hz is AT/2 and for the n th odd harmonic = (A x T)/(n x pi). As expected the line spectra increase in amplitude as the number of complete cycles within the time T increases.

However I cannot see when the line spectra of the Fourier transform would equal that of the Fourier transform ? Ate the equations for the line spectra correct ?

Hi,

That question doesnt seem to make any sense :)
What are you trying to do here?
 
Analysis is correct. 50% has no even harmonics.

In fact, the duty cycle deviation from 50% or asymmetry, can be determined by the relative level of even harmonics.
 
The formula I get from the fourier series for the line spectra is (2 x A)/(n x pi). I got this by using fourier series fomula and calculated the fourier coefficients ao , bn , an
Assuming A=1, then the amplitude at the fundamental frequency (n=1) is
F(1) = 2 x 1 / 1 x pi() = 0.64
Is this correct ? I don’t believe it is because when the fourier series is expanded using complex coefficients
F(1) = A ( sin (2pi()t/T) – j cos (2pi()t/T) ) / pi() i.e for n=1 amplitude = A / pi()
F(-1) = A ( sin (2pi()t/T) + j cos (2pi()t/T) ) / pi() i.e for n=-1 amplitude = A / pi()
F(1) + F(-1) = 2 x A / n x pi() = 0.64
The 2 expansions are only equal, when the one which uses complex coefficients takes account of negative frequencies ?
I presume if such a signal was viewed on a spectrum analyser the amplitude at the fundamental frequency = A / pi() (n=1) i.e. 0.32 ?
 
The formula I get from the fourier series for the line spectra is (2 x A)/(n x pi). I got this by using fourier series fomula and calculated the fourier coefficients ao , bn , an
Assuming A=1, then the amplitude at the fundamental frequency (n=1) is
F(1) = 2 x 1 / 1 x pi() = 0.64
Is this correct ? I don’t believe it is because when the fourier series is expanded using complex coefficients
F(1) = A ( sin (2pi()t/T) – j cos (2pi()t/T) ) / pi() i.e for n=1 amplitude = A / pi()
F(-1) = A ( sin (2pi()t/T) + j cos (2pi()t/T) ) / pi() i.e for n=-1 amplitude = A / pi()
F(1) + F(-1) = 2 x A / n x pi() = 0.64
The 2 expansions are only equal, when the one which uses complex coefficients takes account of negative frequencies ?
I presume if such a signal was viewed on a spectrum analyser the amplitude at the fundamental frequency = A / pi() (n=1) i.e. 0.32 ?
 
Hello there,

I dont think you should use such badly rounded results like 0.64 when mixed with theory. If you must do this you should really use at least 4 digits so there is no confusion. Two digits have a probability of 1/100 of being the right number when 4 digits have a probability of 1/10000 of being the right number when the last digit is rounded. This could make a difference in some cases and the reader wont be able to be sure if you are posting the same number as they think you are or not.

In this case you probably mean 2/pi which rounds to 0.6366 using four digits.

The fundamental frequency amplitude is 2/pi which is close to 0.6366, but a line spectrum would probably normalize this to a perfect 1.000000 so that means it would be multiplied by pi/2 which is close to 1/0.6366 using the four digits again. This means all the other amplitudes of the harmonics will come out pi/2 times their calculated values, and so we will see amplitudes as: 1, 1/3, 1/5, 1/7, 1/9
and so rounding some of these we will see: 1.0000, 0.3333, 0.2000, 0.1429, 0.1111, etc.
The reason for this is because then we can see the relationship of the fundamental to any harmonic, and this tells us the relative significance of the harmonic for a given application. For example, if we built a transmitter from a square wave and we wanted a pure sine output, we would probably have a spec that tells us to make sure that one of the harmonics is at a certain level below the fundamental, for example the third harmonic must be 20db down from the fundamental. Looking at the spectrum this way would tell us if we met that spec or not with a given filter design.
 
Assuming my formula for both the fourier transform and series for a square wave with 50% duty cycle is correct then it would appear the series = transform when T=1 ?
 
Hi,

So you are looking for an equality after some time period? What made you decided to do this?
 
Just an observation. It looks as though there isn’t anything significant about it.
What I do find confusing about the formula for the Fourier Series is the amplitude of the line spectra.
It would appear that if you sketch the line spectra with just positive frequencies the amplitude is
(2 x A)/(n x pi()).
However if you include the negative frequencies the amplitude is A/(n x pi()) ?
If a test instrument (spectrum analyser) was to be used to measure the amplitude, what result would it give ?
 
Hi,

Let me write out the formula for the bn and see if this makes sense to you, or perhaps you can explain what you are doing here in a little more detail..

The bn come from the integral:
bn=(1/pi)*integral(f(x)*sin(n*x),dx,-pi,+pi)

which in words is:
"One over pi, times the integral of f(x)* sin(n*x) with respect to x, over the interval from -pi to +pi."

or in another form:
bn=(1/pi)*integral(f(x)*sin(n*x),dx,0, 2*pi))

That gives us a definite result, and for the unipolar square wave that has amplitude 1 (ie f(x)=1) from x=0 to x=pi and amplitude 0 from x=pi to x=2*pi we get:
bn=(1/pi)*(1-cos(pi*n))/n

and after multiplying that by pi we get:
Bn=(1-cos(pi*n))/n

Plotting this function from n=1 to say 5, we see a wave that is zero whenever n is an even integer, and non zero values for when n is an odd integer. The simplification is:
Bn=2/n

for n odd only from 1 to +infinity, or:
Bn=2/(2*k-1)

for k from 1 to +infinity, and of course the amplitude of bn is (1/pi) times either of these.

So for n=1 or k=1 we get:
B1=2

so we get:
b1=2/pi

This does not change, so i am not sure what you are doing here with 'negative frequencies'. Perhaps you meant allowing the signal to go negative as well as positive, as in a bipolar (plus and minus) square wave that has amplitude 1 from 0 to pi and -1 from pi to 2*pi.

A spectrum analyzer would give a reading of the normalized amplitudes, relative to the fundamental frequency. So if in the above we had b1=2/pi, then b3 would be equal to 2/(3*pi), and b5 would be 2/(5*pi), and these have amplitudes in decimal approximately:
0.6366
0.2122
0.1273

but the spectrum analyzer would see the 0.6366 and convert that to 1.0000 (multiply by the reciprocal of 0.6366 which is pi/2 or approximately 1.5708). It would then multiply the others by this same factor so we would get:
1.0000
0.3333
0.2000

so you can see that what we have now is:
1
1/3
1/5

and if we continued with more harmonics we would see:
1/7
1/9
1/11

etc.

That's because the square wave is made up of harmonics that are 1/n times the amplitude of the fundamental which has normalized amplitude exactly 1.

What this tells us is the amplitude relationship of each harmonic to the fundamental, which is usually of prime importance in design work. There are estimates that are known by people in the field that work out good in practice for certain types of designs, and knowing that (say) the 11th harmonic is say 20db down from the fundamental could mean the design is adequate, but if it is only say 10db down it is not good enough yet.
For the square wave we see that the 11th harmonic is already more than 20db down from the fundamental because 20*log10(1/11) is slightly more negative than -20, so if that was the final signal then the design would have met the spec. Likewise, if the spec was that the 9th harmonic had to be 20db down, then it would not meet the spec because 20*log10(1/9) is only about -19db down from the fundamental.
The relationship is almost always shown as a harmonic amplitude relationship to the fundamental for reasons like this because it allows for quick and universal comparisons.

I suppose you could have a spectrum analyzer with settings to output the actual amplitude or the normalized amplitudes. Some put out a signal that you can actually read on a scope, with a plot similar to what we plotted above for variation of the continuous n. In this case you can adjust the vertical gain to put the fundamental amplitude at some grad like "10", and then you could read off the other amplitudes relative to that number. Or better yet, "100", and then you could read off the other amplitudes in percent. So say the output for the fundamental was 10 volts, you could adjust the vertical for 10 grads, but thinking about them in terms of being divided by 10 each, which would give 100 minor divisions. Each minor division would then be 1 percent, and since the fundamental is adjusted for an exact 100 minor grads, then you would be reading amplitude in percent of the fundamental.
 
Last edited:
Mr Al, many thanks for your detailed reply. I have calculated the complex fourier coefficients of the fourier series using :
Fn(t) = n=-N∑+N Cn ej2pi()nt/T
Cn = 1/T 0∫T F(t) e -j2pi()nt/T
I get
Cn = jA(cosnpi() – 1) / 2npi()
n=1 F1(t) = A ( sin 2pi()t/T – jcos 2pi()t/T ) / pi()
n=-1 F-11(t) = A ( sin 2pi()t/T + jcos 2pi()t/T ) / pi()
F1(t) + F-1(t) = 2A sin 2pi()t/T / pi() which is the same as you and I have derived before calculating the Ao, Bn and An coefficients.
Page 8 and 9 of the attachment explains what I mean.
 

Attachments

  • chapter8.pdf
    695.9 KB · Views: 653
Hi,

Can you show those two pages as picture files instead of a .pdf ?
Thanks.

In the mean time, i think i might be getting the idea of what you are trying to understand here. I'll still wait for your info, but lets see if this helps.

When i use the 'regular' Fourier Series to calculate the bn, i get:
b1=2/pi

which we both got already. But when i use the complex form, i get:
ck=-j/pi

or in a more pure math-like notation:
ck=-i/pi

Since the ck is related to the an and bn as:
ck=(an-i*bn)/2

we can note that here i*imagpart(ck)=-i*bn/2=-i/pi

and this makes sense, because in the reconstruction of the time domain representation we have to sum from -infinity to +infinity, which means we end up counting that ck twice. In the 'regular' form, we only count the bn once.

Also, the "line spectrum" could be different than what you might see on an actual spectrum analyzer. The spectrum analyzer would usually normalize all the components, but the line spectrum would just show the amplitudes, unless of course you normalize that also. So for our simple example the line spectrum for bn would just show an amplitude of about 0.6366, and then less for the higher harmonics. Using the ck we get the same result, because the amplitude is 2*|ck|. Since we've established that the imaginary part for ck is minus half the value of bn, we get the result of -0.6366 , and we loose the sign in the computation of the amplitude of ck (which is shown as |ck| above). So we get 0.6366 regardless of which way we calculate it.

BTW, in the complex form ck is calculated from the integral of f(x)*e^(-i*n*x), but the multiplier is not 1/pi it is 1/(2*pi).

You should also note that there are variations on the definition of the Fourier Series', and you must be sure to match the component calculations to the reconstruction calculations.
 
Last edited:
MrAl, please find copies of the files you requested – hope you can open them.
I haven’t had an opportunity to read your email yet, but when I do I will reply accordingly.
Thanks, Derek
 

Attachments

  • compcoeff1.jpg
    compcoeff1.jpg
    284.5 KB · Views: 390
  • compcoeff1.jpg
    compcoeff1.jpg
    284.5 KB · Views: 379
  • compcoeff2.jpg
    compcoeff2.jpg
    331.7 KB · Views: 381
Hello again,

Ok then yes, i believe i had answered your question in post #12. The two series' are not the same, in that the multiplying constant is 1/2 for the exponential as compared to the regular series. So the exponential multiplier is 1/(2*pi) while the regular series multiplier is just 1/pi. And since the reconstruction of the exponential form counts the components two times each while with the regular series each component only gets counted once, it makes sense that the absolute value of the bn comes out twice as large as the the corresponding part of ck.
So bn=2*|ck| and that is just because the two forms of the series are a little different.

To be a little more complete, sqrt(an^2+bn^2)=2*|ck|, so the line spectrum amplitude is either of these. The spectrum analyzer normalized amplitude would be either of these with n equal to the harmonic of interest divided by either of these with n=1, so for example for the fifth harmonic we would have either:
sqrt(a3^2+b3^2)/sqrt(a1^2+b1^2)
or:
2*|c3|/(2*|c1|)=|c3|/|c1|

for the normalized third harmonic.

Also, i think the simpler forms for the calculations are:

an=(1/pi)*integral[f(x)*cos(n*x)]dx
bn=(1/pi)*integral[f(x)*sin(n*x)]dx

and:
cn=(1/(2*pi))*integral[f(x)*e^(-i*n*x)]dx

where we can see the multipliers out in front are different for each form.
 
Last edited:
MrAl, once again thank you for taking the time to provide such a comprehensive reply. Not sure if I totally grasp the ideas behind the two methods of calculating the fourier coefficients, but I am content to accept there is a difference which will give the same results if the correct reconstruction techniques are used.
Is it possible to derive/calculate the fourier coefficients of a 16 QAM signal without it being sampled ? If so I presume because such a signal is not periodic one would have to use Fourier Transforms ?
 
Hello again,


The Fourier Transform is used for non periodic functions and since digital QAM can be non periodic we'd have to use that. To paraphrase one scholar, "In real life we find bang more interesting than buzz". However, if we can establish a periodic message signal then maybe we can use the series. This would be kinda strange but interesting. The period would have to be as long as the repetition pattern, so it could end up being rather long. But given a short, repeating message like the universally known, "SOS", i think the series could be found by integrating over each symbol time and calling the whole time the time period. We would need infinite frequency to reconstruct the signal near the jumps, but that's always an issue even with just square waves. We'd also get some annoying artifacts in the reconstruction at the jumps, but that's life. So in the reconstruction, with high enough frequency and given enough computation precision, we should be able to get the original signal back again, for the most part.
Working through a few good problems pays off big in units of understanding. You should probably try this exercise yourself and see what comes of it. I might actually do it too and post results if i can get to it today. To form an example we just have to chop up a sine or cosine wave and glue the loose ends back together...say a cosine from 0 to 2*pi glued end to end with a sine from 0 to 2*pi, or something like that anyway :)

BTW there is a way to understand the transform from the series in a limiting case, but it's been a long time since i looked at this so i'd have to look it up myself too. I think that's one of the things you wanted to look at.

There are a TON of references to these subjects on the web. I was surprised myself at how much is available and how in depth some of them go after taking just a brief look to refresh on some issues. I think you would do well to look up these subjects on the web and see what interests you.
 
Last edited:
Please find attached 2 calculation sheets were I have tried to
  1. Find the Fourier Transform of a single pulse of width T=0.25ms and amplitude A.
    As expected, the amplitude of the line spectra are very small < -40 dBm.
    I have normalised these spectra in the chart.
    Is it normal to assume the bandwidth associated with a signal such as this is typically were the first zero crossing occurs i.e. 4 KHz (twice the fundamental frequency) ?
    I have superimposed the discrete fourier transform on top of it.
  2. Find the discrete Fourier Transform of the same single pulse.
    The first thing of note is the amplitude of the spectra, a difference of about 90 dBm between the fourier transform and discrete fourier transform ?
    Also it would appear the line spectra starts to increase after it has reached a minimum. I presume this is due to the fact the spectra for a sampled signal is repeated periodically directly dependent on the sampling frequency ? It is difficult to tell were the spectra begin to overlap.
    Again I would assume the bandwidth associated with such a signal is were the first zero crossing occurs i.e. 4 KHz.
 

Attachments

  • DFT.pdf
    253.3 KB · Views: 379
  • FT.pdf
    225.9 KB · Views: 365
Hi,

Quick reply...................

First, how are you getting such a sawtoothed looking waveform for the results? When i do it i get a very curvy looking envelope. That sawtoothed wave reminds me of that movie "Teeth" where an unfortunate girl begins to suffer from a mythological case of vagina dentata :)

For question #1, the way you find answers to questions like this is you try to develop a general theory which describes and includes everything you are questioning, and then test it with your hypothesis. This will normally mean finding a closed form solution which you can then test and that one test either confirms or conflicts with your original idea of the general overall behavior. If you cant find a closed form solution then you will have to be satisfied with doing several numerical calculations (varying all variables) to as great an accuracy as you can and then comparing the results of all the individual cases...in other words, try it with other pulse widths and amplitudes and then compare results to see if your idea holds ground. The closed form solution however is the best way to go, if the closed form can be found of course. There are online tools that help sometimes.

For question #2, the result looks symmetrical so a quick guess would be the turning point is right in the center, but i would suggest trying other sampling periods too and see what results you get from that. There should be a relationship between the pulse width and sampling period, and the result.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top