Path: news.mathworks.com!newsfeed.mathworks.com!wn13feed!wn11feed!worldnet.att.net!199.45.45.8!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail
From: "Ken Davis" <kendavis@alum.mit.edu>
Newsgroups: comp.dsp,comp.soft-sys.matlab
References: <ap102a$6ce$1@scotsman.ed.ac.uk>
Subject: Re: DFT of an irregular time-spacing signal
Lines: 54
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <hfct9.23921$Pk1.2939@nwrddc02.gnilink.net>
Date: Tue, 22 Oct 2002 13:19:09 GMT
NNTP-Posting-Host: 151.200.30.87
X-Complaints-To: abuse@verizon.net
X-Trace: nwrddc02.gnilink.net 1035292749 151.200.30.87 (Tue, 22 Oct 2002 09:19:09 EDT)
NNTP-Posting-Date: Tue, 22 Oct 2002 09:19:09 EDT
Xref: news.mathworks.com comp.dsp:134844 comp.soft-sys.matlab:140245



[Note to Peter Boettcher: Hello Peter... This might qualify as a frequently
asked question and I don't see it on the current list. My answer might be
part of a good answer but it is incomplete. - Ken]

"Chia C Chong" <Chia.Chong@ee.ed.ac.uk> wrote in message
news:ap102a$6ce$1@scotsman.ed.ac.uk...
> Hi there!
>
> I have a signal, y which has irregular time-spacing. I would like to find
> the power spectrum of this signal. Since the signal has irregular
> time-spacing, I guess I can't simply perform the DFT using the fft command
> in Matlab?? If so, what method should I used in order to find the power
> spectrum of y?
>
> Thanks.
> CCC
>
>
>

Hello Chia,

This thread seems to have headed off into a digression. I'll try to bring it
back on track...

The easiest way to find the spectrum of irregularly sampled data is to
resample it to uniform samples. You can do this with Matlab's interp1
function. The accuracy of your spectrum will depend on the accuracy of the
interpolation. You will want to experiment with several of the interpolation
methods that are available in interp1. I believe that for interpolation with
a limited window (i.e. interpolating a sample value from N nearest
neighbors), the Lagrange interpolation is optimal, but Lagrange is not one
of the choices in interp1 (hint, hint Mathworks).

If interpolation doesn't work there are other schemes available. The
Lomb-Scargle periodogram is often mentioned in relation to this question and
may be more appropriate if your data has very uneven spacing (e.g. very
large or very small spacings). I know that this algorithm is listed in
Numerical Recipes, but I don't have a good on-line reference (with Matlab
code) to point you to. Perhaps someone else following this thread has this
information.

In general, the problem is that the spacing between points determines the
"importance" of a particular point. For example, if several points are very
close together, then small amounts of noise on those measurements will tend
to have a greater effect on inferring the slope of the function (and with
it, the high frequency energy) than the same amounts of noise on
measurements that are further apart.

HTH,

Ken