Got Questions? Get Answers.
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:
Spectral plot of an unequally spaced time series

Subject: Spectral plot of an unequally spaced time series

From: Joshal

Date: 22 Dec, 2010 06:32:04

Message: 1 of 5

Hi.
I want to obtain the periodogram (psd estmate) of a time series which is unequally spaced. I used the Welch periodogram function pwelch after doing some kind of interpolation on data and getting the values at equal intervals. But the plot I obtain is very different from the one I get using tstool GUI. Also all my peaks are concentrated in the lower frequency range. Do I need to detrend the data?
Can anyone guide me on this and help me as to what function the tstool uses for plotting the periodogram? There are many functions but I don't know what exactly to use. I am new to these stuff and would be really obliged if someone could help me out.

Thanks in advance.

Subject: Spectral plot of an unequally spaced time series

From: Greg Heath

Date: 23 Dec, 2010 06:58:41

Message: 2 of 5

On Dec 22, 1:32 am, "Joshal " <joshal3...@gmail.com> wrote:
> Hi.
> I want to obtain the periodogram (psd estmate) of a time series which is unequally spaced. I used the Welch periodogram function pwelch after doing some kind of interpolation on data and getting the values at equal intervals. But the plot I obtain is very different from the one I get using tstool GUI. Also all my peaks are concentrated in the lower frequency range. Do I need to detrend the data?
> Can anyone guide me on this and help me as to what function the tstool uses for plotting the periodogram? There are many functions but I don't know what exactly to use. I am new to these stuff and would be really obliged if someone could help me out.
>
> Thanks in advance.

I am not familiar with tstool. I have posted
a dft algorithm for unequal spacing. Search on

dftgh6

Whether or not detrending is needed is easily
answered by comparing the two (detrend/not detrend)
results.

Hope this helps.

Greg

Subject: Spectral plot of an unequally spaced time series

From: Joshal

Date: 23 Dec, 2010 07:46:05

Message: 3 of 5

Thanks a lot for your reply.
I am also trying the Lomb-Scargle periodogram method for psd estimate.

Subject: Spectral plot of an unequally spaced time series

From: Greg Heath

Date: 23 Dec, 2010 07:54:03

Message: 4 of 5

On Dec 23, 2:46 am, "Joshal " <joshal3...@gmail.com> wrote:
> Thanks a lot for your reply.
> I am also trying the Lomb-Scargle periodogram method for psd estimate.

Good.

What are minmax(t) and numel(t)?
What are the min,mean,median and max of dt?

Greg

Subject: Spectral plot of an unequally spaced time series

From: Joshal

Date: 24 Dec, 2010 00:23:05

Message: 5 of 5

For a specific data set:

minmax(t)=[0 1463.63] (in seconds)
numel(t)=1228

min(dt)=0.1460
mean(dt)=1.1929
median(dt)=1.1990
max(dt)=1.5310

Tags for 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