Hello. I am trying to obtain an analytical expression for the Fourier coefficients (an, bn) of a sine function, lets say the function is: sin(2*pi*f*t). The coefficients come out to be: an = sin(n*pi)^2 / (pi - n^2 * pi) bn = sin(2*n*pi) / 2pi(n^2 - 1) What "bothers" me is that n in the denominator. If I substitue n = 1, then an and bn become infinite because the denominator is zero. Is this correct? Is this telling me that the magnitude of the first harmonic is infinite? Is there some way to rearrange this expression to give me a non infinite value for the first harmonic? (its what i am lookinf for) Or should i ignore this n=1 "anomaly"? I am perplexed and ashamed... :( Thanks in advance
Stupid question about getting fourier coefficients of a sine function...
Started by ●June 18, 2005
Reply by ●June 18, 20052005-06-18
Le 18/06/2005 21:34, dans 1119123285.092389.199620@f14g2000cwb.googlegroups.com, ��stuffed_penguin@yahoo.com�� <stuffed_penguin@yahoo.com> a �crit�:> Hello. I am trying to obtain an analytical expression for the Fourier > coefficients (an, bn) of a sine function, lets say the function is: > sin(2*pi*f*t). > > The coefficients come out to be: > > an = sin(n*pi)^2 / (pi - n^2 * pi) > > bn = sin(2*n*pi) / 2pi(n^2 - 1) > > > What "bothers" me is that n in the denominator.What bothers me is absence of f. If frequency varies, harmonics varies, so ? If my computations are right (chances are quite high I forgot something somewhere :-)), I find b(n) = sin((2*pi)^2 * f) * 2*n / (pi * ((2*pi*f)^2-n^2)) I leave a(n) as an exercise :-)> If I substitue n = 1,There is still a problem in my formula if f=1/2pi for example. In fact you then try to approximate a sine "by itself". The problem lies is the formula to compute b(n): if you do like me, you linearize the trig product, and when you integrate, a division by 2*pi*f-n appears. You can't do that if 2*pi*f-n=0. As always in maths, you must be very careful with assumptions. I leave also this problem as an exercise: you merely have to consider different cases when 2*pi*f-n or 2*pi*f+n is zero for some n. BTW, if you use Maple, be *very* careful with results. It may be better today, but I remember a lot of fun with special values of formulas, or with crude simplifications, involving sometimes complex numbers where there should not. It's not a critic of Maple or other CAS, just a remark that a computer is not as clever as a human. Hopefully...> then an and bn become infinite because the denominator is zero. Is this > correct? Is this telling me that the magnitude of the first harmonic is > infinite? Is there some way to rearrange this expression to give me a > non infinite value for the first harmonic? (its what i am lookinf for) > Or should i ignore this n=1 "anomaly"? >
Reply by ●June 18, 20052005-06-18
I think that your problem doesn make sense .... sorry but if you are trying to write function f(x) with f(x) .... it means Fourier for sin(2pi*f*t) = sin(2pi*f*t) .... it has only one harmonic component 2pi*f... and it is all... Regards, Amir Hasanovic
Reply by ●June 18, 20052005-06-18
Le 19/06/2005 00:34, dans 1119134071.214105.90020@g43g2000cwa.googlegroups.com, ��amko�� <sinebrate@yahoo.com> a �crit�:> I think that your problem doesn make sense .... sorry but if you are > trying to write function f(x) with f(x) .... it means Fourier for > sin(2pi*f*t) = sin(2pi*f*t) .... it has only one harmonic component > 2pi*f... and it is all... >Sigh. Yeah, of course if you decompose on {cos(2*pi*f*n*t),sin(2*pi*f*n*t)}, it's complete nonsense. But here we decompose on the (rather classic) {cos(n*t),sin(n*t)}.
Reply by ●June 18, 20052005-06-18
One more point: since sin(2*pi*f*t) is odd, a(n) is ...
(fill in the blank :-))
And please note I decomposed on {cos(n*t),sin(n*t)}, maybe you had another
function family in mind ?
Reply by ●June 18, 20052005-06-18
>From formal point of view you have only two kinds of Fourier Transfrom(series), harmonic and exponentional. The first one in this case does not really make any sense, for second one you can note sin(x) = exp(x) -/+ exp(-x)/2 .... or somthing like this .. Amir
Reply by ●June 18, 20052005-06-18
Le 19/06/2005 01:17, dans 1119136642.789890.16030@g43g2000cwa.googlegroups.com, ��amko�� <sinebrate@yahoo.com> a �crit�:>> From formal point of view you have only two kinds of Fourier Transfrom > (series), harmonic and exponentional. The first one in this case does > not really make any sense, > for second one you can note sin(x) = exp(x) -/+ exp(-x)/2 .... or > somthing like this .. > > Amir >Could you tell me what formula you are using ?
Reply by ●June 18, 20052005-06-18
For fourier exponential and harmonic series you can find formula on this page http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/ConvergenceOfFourierSeries/
Reply by ●June 18, 20052005-06-18
Le 19/06/2005 01:52, dans 1119138745.416172.246810@g44g2000cwa.googlegroups.com, ��amko�� <sinebrate@yahoo.com> a �crit�:> For fourier exponential and harmonic series you can find formula on > this page > > http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/ConvergenceOfFourierSerie > s/ >Ok, it's the complex one, but the conclusion is almost the same. When you decompose a function in Fourier series, you first choose a base frequency (or pulsation, whatever you prefer). Assume you have chosen one, call f0 the frequency. The function you decompose happens to be sin(2*pi*f*t), and it is by no way needed that f be equal to f0 or an integer multiple of f0. If it is, you end up with a one term decomposition. But if it is *not*, you'll have infinitely many nonzero Fourier coefficient. The energy is spread on the whole spectra (that's the way you say that ?). Take as an example sin(sqrt(2)*t), to be decomposed in series of sin(n*t), is there still only one harmonic ? Clearly not.
Reply by ●June 18, 20052005-06-18
"Jean-Claude Arbaut" <jean-claude.arbaut@laposte.net> wrote in message news:BEDA8749.5826%jean-claude.arbaut@laposte.net...> > > > Le 19/06/2005 01:52, dans > 1119138745.416172.246810@g44g2000cwa.googlegroups.com, � > amko � > <sinebrate@yahoo.com> a �crit : > >> For fourier exponential and harmonic series you can find >> formula on >> this page >> >> http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/ConvergenceOfFourierSerie >> s/ >> > > Ok, it's the complex one, but the conclusion is almost the > same. When you > decompose a function in Fourier series, you first choose a > base frequency > (or pulsation, whatever you prefer). Assume you have > chosen one, call f0 the > frequency. The function you decompose happens to be > sin(2*pi*f*t), and it is > by no way needed that f be equal to f0 or an integer > multiple of f0. If it > is, you end up with a one term decomposition. But if it is > *not*, you'll > have infinitely many nonzero Fourier coefficient. The > energy is spread on > the whole spectra (that's the way you say that ?). Take as > an example > sin(sqrt(2)*t), to be decomposed in series of sin(n*t), is > there still only > one harmonic ? Clearly not. >Now that I understand what you are doing, let me say that we often force the function we are analyzing to be periodic over the DFT window by "windowing" the sampled data. That is, we multiply (in the time domain) the sampled data points by corresponding points from a window function. This function is chosen to have certain properties. For example, "the function goes to zero at N=0 and N=K (for a K-point window)", or "the function and it's first three derivatives go to zero at N=0 and N=K (for a K-point window)".






