how would I model my data?

Started by lusher00 5 years ago6 replieslatest reply 5 years ago132 views
I am measuring the period of a digital signal. I interrupt on every rising edge and just keep an array of periods. My signal is just an impulse train of random periods. I would like to find the various frequencies in this signal but I am having a hard time conceptualizing this. My function is really just f(t) = 1 for some particular values of t.

I would like to find an elegant way to quickly find particular frequencies and also filter out other. Would this best be solved by sorting the periods into bins and counting the values in the bins? I wanted to see how other people might look at this data.

[ - ]
Reply by MichaelRWFebruary 4, 2019

You know the intervals, or periods, between each set of impulses.  Take the inverse of these values to get the corresponding frequencies.  Generating a histogram with the frequency values will let you see how they are distributed in the segments of the signal that you've analyzed.

[ - ]
Reply by adiduaFebruary 4, 2019

Have you tried autocorrelation? Also, do you have prior knowledge of how many underlying frequencies might exist in the signal and if they are related in anyway? 

[ - ]
Reply by kazFebruary 4, 2019

when you say frequency do you mean pulse rate or actual frequency domain. For random pulses(unshaped) you are likely to get frequencies all over the digital domain, do an fft.

[ - ]
Reply by lusher00February 4, 2019

I mean pulse rate, and only the relationship between subsequent impulses. So by my original idea and what MichaelRW reiterated, an impulse at 0, 1ms, 100ms would be 1kHz and ~100Hz. That doesn’t feel right though.

What would I take the FFT of? I don’t have sampled values at some sampling interval and if I did that it would just be a bunch of shifted impulses in the time domain. I know what that looks like in the frequency domain. It’s not very useful information in this case. The important information is the time between impulses. 

Imagine an application where I receive the same pseudo random series of light pulses from one source and a different pseudo random series from another source. What’s another way to characterize this signal? What would be a quick way of identifying it

[ - ]
Reply by kazFebruary 4, 2019

pseudo random from two sources? nothing special about a given source. if you know the seed and start then you might check the sequence directly and see which source sent it.

[ - ]
Reply by pomartelFebruary 4, 2019

In this case calling your data "f(t) = 1 for some particular values of t" may be leading you astray.  Consider it to be t(n) for n = 0, 1, 2,... That is what you are recording.  You also know that T = t(0) + t(1) + ... t(n) is the time from the start of your measurements until the most recent interrupt.

Generally if you don't know anything about a signal, start with a histogram of the data.  that and calculating the mean, standard deviation and other probability distributions of the data may provide some insight. In this case, autocorrelation could tell you if for instance,the next data after a long time (large data value) tends to be short (small data value).