DSPRelated.com
Forums

How to reversely find function from its Fourier Series Expansion?

Started by lucy September 18, 2005
Hi all,

This needs a little bit reverse thinking. I am used to compute the FSE
from a function; but now with a function in FSE form, I want to find
the original function in its compact form...

How to do that?

http://www.yourupload.com//uploads/losemind/a4e87-Capture2.jpg

Thanks a lot!

lucy wrote:

> This needs a little bit reverse thinking. I am used to compute the FSE > from a function; but now with a function in FSE form, I want to find > the original function in its compact form...
> How to do that?
What kind of original function are you considering? You might look at some symbolic math programs, like Mathematica, which can do Simplify[] to find a simpler for for a complex expression. Otherwise, various linear and non-linear fit algorithms might help. -- glen
"lucy" <losemind@yahoo.com> wrote in message
news:1127014118.027757.208010@g14g2000cwa.googlegroups.com...

> This needs a little bit reverse thinking. I am used to compute the FSE > from a function; but now with a function in FSE form, I want to find > the original function in its compact form...
Just plotting the series in Excel, it looks like it's zero for 0 < t < 1 and for 3 < t < 4, and 2 for 1 < t < 3, with period 4. Integration verifies this result. -- write(*,*) transfer((/17.392111325966148d0,6.5794487871554595D-85, & 6.0134700243160014d-154/),(/'x'/)); end
Hi guys, thanks a lot for your help!
But I want the paper and pencil approach and the thinking logic. Thanks
a lot!

In article <1127024855.591030.211900@z14g2000cwz.googlegroups.com>,
lucy <losemind@yahoo.com> wrote:

> Hi guys, thanks a lot for your help! > But I want the paper and pencil approach and the thinking logic. Thanks > a lot! >
What Fourier series do you know? Does this look like one of them? Can you get from the one you know to this one somehow?
in article 1127014118.027757.208010@g14g2000cwa.googlegroups.com, lucy at
losemind@yahoo.com wrote on 09/17/2005 23:28:

> This needs a little bit reverse thinking. I am used to compute the FSE > from a function; but now with a function in FSE form, I want to find > the original function
add up the Fourier terms??
> in its compact form...
what if there was no compact form, in the first place. but, i'm pretty sure that the Fourier Series of what you have at:
> http://www.yourupload.com//uploads/losemind/a4e87-Capture2.jpg
is a square wave with even symmetry. rather than have us look at a stupid jpg, can you try your hand at "ASCII math" and type it in here? it might look like +inf f(t) = 1 + 4/pi * SUM{ (-1)^(2n+1)/(2n+1) * cos((2n+1)/2*pi*t) } n=0 and this is pretty certainly a square wave with a period of 4 and some DC offset. to compute the amplitude, you'll have to start with a square wave of amplitude A, compute the FSE and compare to what you have. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
robert bristow-johnson wrote:

> in article 1127014118.027757.208010@g14g2000cwa.googlegroups.com, lucy at > losemind@yahoo.com wrote on 09/17/2005 23:28:
>>This needs a little bit reverse thinking. I am used to compute the FSE >>from a function; but now with a function in FSE form, I want to find >>the original function
(snip)
>>in its compact form...
> what if there was no compact form, in the first place.
(snip)
> is a square wave with even symmetry.
I didn't look at it, but I think a fitting algorithm would be best. It may be a square wave, but it is unlikely to be exactly a square wave with any round off errors in the transform. If you fit to a few common wave shapes and select the closest one... -- glen
In article <1127014118.027757.208010@g14g2000cwa.googlegroups.com>,
lucy <losemind@yahoo.com> wrote:

>This needs a little bit reverse thinking. I am used to compute the FSE >from a function; but now with a function in FSE form, I want to find >the original function in its compact form...
>How to do that?
Your series was f(t) = 1 + 4/pi sum_{n=0}^infty (-1)^(n+1)/(2n+1) cos((2n+1) pi t/2) Note that cos((2n+1) pi t/2) = Re exp((2n+1) pi i t/2). So let's find sum_{n=0}^infty (-1)^(n+1)/(2n+1) exp((2n+1) pi i t/2). This is g(w) = sum_{n=0}^infty (-1)^(n+1) w^(2n+1)/(2n+1) where w = exp(pi i t/2). Differentiate wrt w and you'll find a series you recognize; integrate the sum (noting that g(0) = 0) and you'll find g(w) = i/2 ln((1+iw)/(1-iw)) [Note: Abel's Theorem is needed to justify this being the sum when |w|=1, w <> +- i]. The real part is -1/2 arg((1+iw)/(1-iw)). Think about this geometrically when w is on the unit circle: 1+iw and 1-iw are opposite points on the circle of radius 1 centred at 1. The angle between them at 0 is pi/2, but the arg could be either +pi/2 or -pi/2: it switches when w = i or -i... Robert Israel israel@math.ubc.ca Department of Mathematics http://www.math.ubc.ca/~israel University of British Columbia Vancouver, BC, Canada
Lucy, I think Robert has amply demonstrated what you need to 
do.  Become a mathematician.  :-)


Bob

Robert Israel wrote:
> In article <1127014118.027757.208010@g14g2000cwa.googlegroups.com>, > lucy <losemind@yahoo.com> wrote: > > >>This needs a little bit reverse thinking. I am used to compute the FSE > >>from a function; but now with a function in FSE form, I want to find > >>the original function in its compact form... > > >>How to do that? > > > Your series was > f(t) = 1 + 4/pi sum_{n=0}^infty (-1)^(n+1)/(2n+1) cos((2n+1) pi t/2) > Note that cos((2n+1) pi t/2) = Re exp((2n+1) pi i t/2). So let's find > sum_{n=0}^infty (-1)^(n+1)/(2n+1) exp((2n+1) pi i t/2). > This is g(w) = sum_{n=0}^infty (-1)^(n+1) w^(2n+1)/(2n+1) where > w = exp(pi i t/2). Differentiate wrt w and you'll find a series > you recognize; integrate the sum (noting that g(0) = 0) and you'll > find g(w) = i/2 ln((1+iw)/(1-iw)) [Note: Abel's Theorem is needed > to justify this being the sum when |w|=1, w <> +- i]. The > real part is -1/2 arg((1+iw)/(1-iw)). Think about this geometrically > when w is on the unit circle: 1+iw and 1-iw are opposite points on > the circle of radius 1 centred at 1. The angle between them at 0 > is pi/2, but the arg could be either +pi/2 or -pi/2: it switches when > w = i or -i... > > Robert Israel israel@math.ubc.ca > Department of Mathematics http://www.math.ubc.ca/~israel > University of British Columbia Vancouver, BC, Canada >
-- "Things should be described as simply as possible, but no simpler." A. Einstein
Bob Cain wrote:
> Lucy, I think Robert has amply demonstrated what you need to do. Become > a mathematician. :-)
That's one way. Another is to become a pragmatist. In the general case, you can only plot the waveform and see what it looks like. Start out the same way for a particular case, then squint and see if it looks familiar. If it is, problem solved (there are tables of waveforms, just as there are tables of integrals and tables of transforms). If it looks arbitrary, it probably is. When building concrete structures, a common method is "design by analysis". That's a fancy to put guessing (experience helps) and checking to see if the guess is good. You could call finding a waveform's closed form "solution by syntheses", but there both examples of a more fundamental procedure: do what you can do. ... Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;