# How to estimate PSD, and time delay of a random signal?

I'm trying to estimate the power spectrum and time delay for random signals. the signals were taken from two sensors, 10 cm apart. My aim is to estimate the PSD first then estimate the time delay in order to obtain the structure velocity. I've tried the traditional way by using matlab built-in functions like fft, xcorr. however the results were not as I expected. is there a better way to analyse the attached signals please? Does it need filtering?

The signals represent the void fraction data that was measured for 60s with sampling frequency of 1000hz. the time delay expected to be in ms( around 500ms).  1.Cross Correlation 2.AUTO_CORRELATION 1. PSD 4.Cross Correlation after subtracting the average 60000 points 2000 points HERE'S THE DATA

RUN1_P1

RUN1_P2

• You've not provided enough information. What kind of sensors? What sampling rate? What is the speed of propagation for your signal (how long would it take to travel between the two sensors?) What is the time scale in the provided diagrams? What did you expect to see? (provide a diagram) What results did you see? (provide a diagram.) – JRE Aug 11 '14 at 15:02
• @JRE the post's updated!!.The sensors measures the void fraction in a pipe, the sampling rate is 1000khz, the time expected to be in ms, may be around 500ms. The time scale is ms. the data was collected for 60seconds with sampling rate of 1000 kHz. – Rajab Aug 11 '14 at 17:26
• OK. The cross correlation and your two original diagrams show the problem. Cross correlating two signals with a DC component gives the result you've gotten. You need to run your data through a high pass filter to get rid of the DC. It might be simpler, though, to take the average of the data points for each sensor and subtract that from each data point for that sensor. – JRE Aug 11 '14 at 19:49
• @JRE I’ve never used filters in signal processing; actually I'm beginner in signal processing. Would you please help me to apply the high pass filter for my signal in Matlab. Which frequencies should be cut off?? – Rajab Aug 12 '14 at 9:37
• Easiest is to do as I described above: Computer the average for a data set and subtract that average from each point in the data set. Do that for each data set and you should be good to go. – JRE Aug 12 '14 at 9:59