Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Second Spectrum question

  1. Aug 24, 2014 #1
    I am trying to implement what's called the "second spectrum". Basically, you do this:

    1. Take a time series of length [itex]N[/itex].
    2. Divide it into [itex]m[/itex] segment, each of length [itex]N'=N/m[/itex].
    3. For each segment [itex]m[/itex], do a Fourier Transform. The result is the 'first spectrum',[itex]S_i^{(1)}(f_1), i=1,...,m[/itex]
    4. Divide each spectrum into [itex]n[/itex] octaves, an octave starts at [itex]f_L=f_0 \times 2^p[/itex] and ends at [itex]f_H=f_0 \times 2^{p+1}[/itex], where [itex]p=0,1,2, etc[/itex], and [itex]f_0[/itex] is the lowest frequency in [itex]S_i^{(1)}(f_1)[/itex]. For [itex]f_0 = 1[/itex] Hz, The octaves will be like: 1-2 Hz, 2-4 Hz, 4-8 Hz, 8-16 Hz, etc.
    5. For each octave in each spectrum, sum all spectrum values in that octave.
    6. Construct a time-series for each octave. There will be [itex]n[/itex] time series each of length [itex]m[/itex].
    7. Take the Fourier Transform of each time series. This is the second spectrum, [itex]S_n^{(2)}(f_2)[/itex]

    I have already implemented this algorithm (in c++), but I have a question about step 7. I implemented a Welch periodogram method for doing an FFT-based Power Spectral Density. This method chops the signal into segments of length L with overlapping D. Then it Fourier Transform each segment, and the final answer is the average of these transforms. The larger the number of segments, the lower the variance obtained.

    But in step 7, I typically have a time series of length 32, too short to divide into segments. Should I do the PSD with one segment being the whole data, or I still have to segment it? In that case the resulting second spectrum will have too few data points to have any meaning.

    (A version of this question appeared in Stack Exchange, but I got no answers)
  2. jcsd
  3. Aug 26, 2014 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    Your post seems to say "I have made some arbitrary decisions about a computer program whose purpose is only known to me. Please advise about what further arbitrary decisions to make."

    To get an answer based on mathematics, you either need to state a mathematical question or state a practical problem. In matters involving probability, it's usually easier to state the practical problem! What is the data you are dealing iwth - financial data? electrical currents? solar flares? After you apply your program to the data, what do you intend to do with the output? Invest in the stock market? Publish a scientific paper? Win a bet with a friend?
  4. Aug 26, 2014 #3
    I am trying to investigate 1/f noise in a solid state material across a first order phase transition. Normally, one suffice with first spectrum, but if the scattering processes responsible for the noise are non Gaussian, then you need to investigate higher order statistics. The second spectrum will give you an idea about the correlation that exist, if any, between different scatters in the material/system. The data consist of a time series of voltage fluctuations obtained using a balanced Wheatstone bridge.
  5. Aug 27, 2014 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    Someone in communications engineering might give you a quick answer - that wouldn't be me!

    I personally find it helpful to approach practical problems by using simulation. Even if no computer simulation is written in the end, just thinking about how to write it forces one to think about specific mathematical models. What would be a computer program to simulate voltage data caused by 1/f noise? - I mean a program that would simulate a specific time series of voltages.

    Let's start with the thought of that program and then conjecture some ways it would be modified to simulate the kind of data you have.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook