Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Fourier Reconstruction

Subject: Fourier Reconstruction

From: kk KKsingh

Date: 4 Mar, 2010 09:50:20

Message: 1 of 6

Can any one provide me a file submitted where Signal is reconstructed in Fourier domain!

kk

Subject: Fourier Reconstruction

From: Jose

Date: 10 Mar, 2010 20:14:05

Message: 2 of 6

KKsingh,

Not sure if this is what you are looking for, but this script takes a pulse back and forth between frequency and time domains.

http://www.mathworks.com/matlabcentral/fileexchange/25571-fourier-analysis-of-a-rectangular-pulse

It's been in the file exchange since last year.

J.

"kk KKsingh" <akikumar1983@gmail.com> wrote in message <hmnvos$d0a$1@fred.mathworks.com>...
> Can any one provide me a file submitted where Signal is reconstructed in Fourier domain!
>
> kk

Subject: Fourier Reconstruction

From: Greg Heath

Date: 11 Mar, 2010 04:30:58

Message: 3 of 6

On Mar 4, 4:50 am, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> Can any one provide me a file submitted where Signal is reconstructed in Fourier domain!
>
> kk

Is the original signal uniformly sampled in time?
Is the spectrum estimated uniformly in frequency?
Is the spectrum estimated using Least Squares or
the Fourier formula?

Hope this helps.

Greg

Subject: Fourier Reconstruction

From: kk KKsingh

Date: 12 Mar, 2010 21:56:22

Message: 4 of 6

Hey!

Suppose I obtain spectrum for irregular signal by some method...may be one of your dftgh code i saw in community...that spectrum is approximate now i want to obtain correct spectrum by using least square then what should i do ! in one of signal proceesing paper........they applied some thing like this


a=inv(A^H *W*A)*A^H*W*y %a is correct spectrum and A^H*W*y is approximate one so here i am constructing my spectrum in Frequency domain
a_y=ifft(a)

where A^H is my forward Fourier kernel, W is weights based on distance between the samples, y is irregular sample position..in time.....i tired this but didnt worked for me...





Greg Heath <heath@alumni.brown.edu> wrote in message <5c77c6c5-2da3-48be-a2c7-5c1d23aff635@e1g2000yqh.googlegroups.com>...
> On Mar 4, 4:50 am, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Can any one provide me a file submitted where Signal is reconstructed in Fourier domain!
> >
> > kk
>
> Is the original signal uniformly sampled in time?
> Is the spectrum estimated uniformly in frequency?
> Is the spectrum estimated using Least Squares or
> the Fourier formula?
>
> Hope this helps.
>
> Greg

Subject: Fourier Reconstruction

From: kk KKsingh

Date: 12 Mar, 2010 21:56:22

Message: 5 of 6

Hey!

Suppose I obtain spectrum for irregular signal by some method...may be one of your dftgh code i saw in community...that spectrum is approximate now i want to obtain correct spectrum by using least square then what should i do ! in one of signal proceesing paper........they applied some thing like this


a=inv(A^H *W*A)*A^H*W*y %a is correct spectrum and A^H*W*y is approximate one so here i am constructing my spectrum in Frequency domain
a_y=ifft(a)

where A^H is my forward Fourier kernel, W is weights based on distance between the samples, y is irregular sample position..in time.....i tired this but didnt worked for me...





Greg Heath <heath@alumni.brown.edu> wrote in message <5c77c6c5-2da3-48be-a2c7-5c1d23aff635@e1g2000yqh.googlegroups.com>...
> On Mar 4, 4:50 am, "kk KKsingh" <akikumar1...@gmail.com> wrote:
> > Can any one provide me a file submitted where Signal is reconstructed in Fourier domain!
> >
> > kk
>
> Is the original signal uniformly sampled in time?
> Is the spectrum estimated uniformly in frequency?
> Is the spectrum estimated using Least Squares or
> the Fourier formula?
>
> Hope this helps.
>
> Greg

Subject: Fourier Reconstruction

From: Greg Heath

Date: 13 Mar, 2010 09:51:17

Message: 6 of 6

On Mar 12, 4:56 pm, "kk KKsingh" <akikumar1...@gmail.com>
wrote:
> Greg Heath <he...@alumni.brown.edu> wrote in message <5c77c6c5-2da3-48be-a2c7-5c1d23aff...@e1g2000yqh.googlegroups.com>...
> > On Mar 4, 4:50 am, "kk KKsingh" <akikumar1...@gmail.com> > > wrote:
> > > Can any one provide me a file submitted where
> > > Signal is reconstructed in Fourier domain!
>
> > Is the original signal uniformly sampled in time?
> > Is the spectrum estimated uniformly in frequency?
> > Is the spectrum estimated using Least Squares or
> > the Fourier formula?
>
> Suppose I obtain spectrum for irregular signal by
> some method ...may be one of your dftgh code

For the new version of that code x,t and f have to
be periodically extended (Thanks to AJJohnson) so that

x(N+1) = x(1); % Periodic extension
dt0 = (t(N)-t(1))/(N-1)
t(N+1) = t(N) + dt0;
df0 = (f(M)-f(1))/(M-1)
f(M+1) = f(M) + df0;

then

dt = diff(t); % asymmetric "dt"
dts = 0.5*([dt; 0]+[0; dt]); % symmetric "dt"
W = exp(-2*pi*j*f(:)*t(:)'); % size(W)=[M+1 N+1]

XDFT = W * ( x .* dts ); % XDFT(M+1) = X(1)

If

1. t is uniformly spaced, i.e., dt = dt0*ones(N+1,1);
2. M = N
3. f is uniformly spaced; i,e,. df = df0*ones(N+1,1);
with df0 = 1/(N*dt0)

then

XDFT = dt0*ifft(x);

There are two general least-square reconstruction
formulae:

xQR = ( W \ XDFT ) ./ dts;
xPINV = ( pinv(W) * XDFT ) ./ dts;

> i saw in community...that spectrum is approximate
> now i want to obtain correct spectrum by using
> least square then what should i do !

Invert

x = W' * ( XLS .* dfs );

to obtain either

XLS = XQR = ( W' \ x ) .*/ dfs;

or

XLS = XPINV = ( pinv(W') * x ) .*/ dfs;


> in one of signal processing paper........they
> applied some thing like this (sic)
>
> a = A^H*W*y % approximate spectrum

changing back to my notation

XDFT = W * diag(dts) * x;
     = W * ( x .* dts );

> and
> a = inv(A^H *W*A)*A^H*W*y % a is correct spectrum

No.

Define

Dfs = diag(dfs)
IDfs = inv(Dfs) = diag( 1./dfs )

then

x = W' * ( XLS .* dfs );
  = W' * Dfs * XLS

W * W' * Dfs * XLS = W * x

Now if W is full rank,

XLS = inv( W * W' * Dfs) * W * x
    = IDfs * inv( W * W') * W * x
    = IDfs * pinv( W' ) * x
    = ( pinv( W' ) * x ) .*/ dfs;
    = XPINV

which agrees with my more general formula.

> so here i am constructing my spectrum in Frequency domain
> a_y=ifft(a)

I hope you meant

BEGIN QUOTE

" ... so here i am reconstructing my time domain
signal from the spectrum in the Frequency domain
via

y=ifft(a)"

END QUOTE


Otherwise the sentence makes no sense.

Regardless, as stated above, you can only use ifft
when the following conditions are satisfied:
dt is constant, M = N, df= 1/(N*dt). This should be
obvious since ifft(x) only has x and N (implicitly)
as imputs.

> where A^H is my forward Fourier kernel, W is weights
> based on distance between the samples, y is irregular
> sample position..in time.....i tired this but didnt
> worked for me...

Use the the XQR and XPINV formulas that I derived above.

Hope this helps.

Greg

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us