The setup is the following:
I am using a RedPitaya board to measure the phase shift of two input signals. These input signals will sweep logarithmically from 1kHz to 100 kHz in 10 seconds.
Currently, I am using 512 samples of the input signals which then get zero-padded until they reach a size of 1024 in order to perform the correlation using FFT. The sample frequency is 488.281 kHz (can get up to 125 MHz) in order to ensure that an entire period worth of data from the lowest input signal frequency gets sampled. My code works and accurately measures the phase for an input signal of 1 kHz.
Currently, I want to calculate the cross correlation and thereafter the phase for all of the input frequencies using only one set sample frequency. Once the input signals start rising in frequency, the measurement will obviously decrease in resolution/accuracy. If the decrease in accuracy is to much I might have to change my approach here. My problem is that I do not know how to calculate the Resolution for higher frequencies, or any frequency really.
How can I calculate the loss of accuracy for higher frequencies?
My trial and error approach in MATLAB has told me that I need quite significant oversampling in order to correctly measure the phase shift using cross Correlation, but I do not really understand why.
Code can be provided if needed (pure C with RedPitaya specific Header for I/O-control).