1
$\begingroup$

I have two sensors measuring a single time varying signal . The first sensor (reference sensor) is sampling the data at 60 Hz and the second sensor (test sensor) is sampling the data at 60 Hz. I need to check the accuracy of the test sensor by comparing with the reference sensor. I am confused about how to downsample the data recorded at 100 Hz to 60 Hz. I see it is quite trivial to downsample from 100 Hz to 50Hz/25 Hz. But I am confused how to downsize to 60 Hz.

After downsampling, is cross-correlation a good technique to compare the data from two sensors?

Can you please help?

Thanks, Peter

$\endgroup$
  • $\begingroup$ Downsampling by an integer factor might seem evident, but it is not trivial and requires care, as much as downsampling to another frequency. Wouldn't your consider upsampling both to, say, 300 Hz? And what is you criterion to tell a signal is good? $\endgroup$ – Laurent Duval May 20 '18 at 20:55
  • 2
    $\begingroup$ @Andrea you've got a small math problem: as Laurent said, you want to oversample threefold to 300 Hz and then downsample 5× to 60 Hz (you got the factors the wrong way around) $\endgroup$ – Marcus Müller Jun 20 '18 at 13:29
  • $\begingroup$ I don't quite understand the problem: Do both sensors actually have the same sampling rate of $60\,\text{Hz}$? $\endgroup$ – applesoup Jun 20 '18 at 13:31
  • $\begingroup$ I assume he must mean one sensor is sampling at 100Hz. If so as Marcus alluded upsampling the 100 MHz with a x3 interpolator and then decimating by 5 to get that signal at 60 Hz makes sense. Nothing needs to be done to the signal already at 60Hz. Assuming the reference sensor is “known good” then yes correlation of the two once at the same rate make perfect sense. Specifically computing the correlation coefficient would give a quality metric of the result. If both sensors have unknown quality, correlation will not provide useful information. $\endgroup$ – Dan Boschen Sep 22 '18 at 18:04
0
$\begingroup$

First fix your question: it talks about both sensors sampling at 100Hz. Then the question is what the statistics for the change rates of your measured signals are in order to decide what the respective sensors may be missing and what they might be aliasing in their measurement. Any form of resampling will only lead to comparable results if the processed sensor data can be made to actually unambigously represent the same information. This is feasible when the sensor signals are low-pass filtered before sampling so that no aliasing is involved any more.

Cross-correlation is not an overly useful technique for "comparing the data from two sensors". It will tell you whether both sensors are actually working at all and whether the latencies of the measurement for both sensors differ (assuming sufficient change in the measured signal).

$\endgroup$
0
$\begingroup$

The naive idea comes up to me is to throw away 40Hz in a signal series, however, the remaining 60Hz maybe not in the right phase. So you may want to use FFT to shift the signal to the phase you want. For any real number x0, if h(x) = f (x − x0), then ĥ(ξ) = e−2πix0ξ f̂ (ξ).

Actually, you can also shift the 40Hz part. By doing this, some part of the 60Hz will be averaged and be smoother.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.