# Second Spectrum question

1. Aug 24, 2014

### phys_student2

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

1. Take a time series of length $N$.
2. Divide it into $m$ segment, each of length $N'=N/m$.
3. For each segment $m$, do a Fourier Transform. The result is the 'first spectrum',$S_i^{(1)}(f_1), i=1,...,m$
4. Divide each spectrum into $n$ octaves, an octave starts at $f_L=f_0 \times 2^p$ and ends at $f_H=f_0 \times 2^{p+1}$, where $p=0,1,2, etc$, and $f_0$ is the lowest frequency in $S_i^{(1)}(f_1)$. For $f_0 = 1$ 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 $n$ time series each of length $m$.
7. Take the Fourier Transform of each time series. This is the second spectrum, $S_n^{(2)}(f_2)$

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. Aug 26, 2014

### Stephen Tashi

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?

3. Aug 26, 2014

### phys_student2

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.

4. Aug 27, 2014

### Stephen Tashi

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.