# Self Correlation

Back to Sound Finder main page
It makes intuitive sense to me that using pearson correlation to compare the left and right channels through a range of offsets should, with an ideal signal, work to show when the channels are best correlated and hence determine when the microphones received the signal relative to each other. This exploration is intended to help explore that idea - does it work with an ideal signal? How does the situation with my real data compare with the ideal situation?

To start with I took one of the data channels and ran comparisons of the channel offset against itself. Since with no offset the two datasets are perfect copies of each other, the correlation should be 1 at 0 offset. As the offset varies from 0 that correlation will presumably drop off. In the charts below, I have plotted the absolute value of the pearson correlation, since I am interested in the strength of the correlation more than whether it is positive or negative.

## The self-correlation of the first 3 incidents

Below we can see that the self-correlation seems to behave as I would like it to.

## The correlation of left and right channels of the first 3 incidents

The left/right channel correlations are not nearly so nice but may have some potential. One thing to be aware of here is that signals should theoretically line up with an offset between -128 and 128 since the microphones were one meter apart and with a sample rate of 44100Hz there would only be 128 samples taken in the time it takes sound to travel one meter. In these charts I extended the offsets I am looking at to explore and see if there are indications of other dynamics I should be considering. It would be convenient if I could look at the highest correlation and use the corresponding offset to determine the relative distance of the sound from the microphones. The fact that on some of the incidents the highest peak is outside of that -128 to 128 range suggests that more work needs to be done before this technique could be used with this data.

## Finally an overlay of the self and left/right channel correlations over the first 6 incidents.

Looking at the overlayed comparisons below emphasizes that the left/right channel correlations do not have the nice peak correlation tapering off to the sides as we would have with an ideal signal. Perhaps there is some way I can better clean the data or another comparison I can make that will prove more useful.