0
votes

I'm working in the space of biosignal acquisition. I made a experiment as detailed below, and am now trying to obtain some results from the data.

I have a text file of a signal in Matlab. I loaded the signal onto a waveform generator, then I recorded the generator output on an oscilloscope. I imported the recorded signal from the oscilloscope back into Matlab. The Pearson's correlation coefficient between the original signal and the oscilloscope signal is 0.9958 (obtained using corrcoeff function).

I want to compute the SNR of the oscilloscope signal (what I'm calling my signal plus whatever noise is introduced through the digital-to-analog conversion and visa-versa). I have attached a snippet of the 2 signals for reference.

So my original signal is X and oscilloscope signal is X + N. I used the snr function to compute SNR as follows.

snr(original, (oscilloscope - original))

The result I got was 20.44 dB. This seems off to me as I would have thought with such a high correlation, that the SNR should be much higher?

Or is it not appropriate to try and compute SNR in this sort of situation?

All help is appreciated.

Thanks

enter image description here

Edit: Graph of a couple of results vs Sleutheye's simulated relationship

enter image description here

1

1 Answers

1
votes

You might be surprised at just how even such moderate SNR can still result in fairly high correlations.

I ran an experiment to illustrate the approximate relation between correlation and signal-to-noise-ratio estimate. Since I did not have your specific EEG signal, I just used a reference constant signal and some white Gaussian noise. Keep in mind that the relationship could be affected by the nature of the signal and noise, but it should give you an idea of what to expect. This simulation can be executed with the following code:

SNR = [10:1:40];

M = 10000;
C = zeros(size(SNR));
for i=1:length(SNR)

  x = ones(1,M);
  K = sqrt(sum(x.*x)/M)*power(10, -SNR(i)/20);
  z = x + K*randn(size(x));
  C(i) = xcorr(x,z,0)./sqrt(sum(x.*x)*sum(z.*z));
end

figure(1);
hold off; plot(SNR, C);
corr0 = 0.9958;
hold on;  plot([SNR(1) SNR(end)], [corr0 corr0], 'k:');
snr0 = 20.44;
hold on;  plot([snr0 snr0], [min(C) max(C)], 'r:');

xlabel('SNR (dB)');
ylabel('Correlation');

The dotted black horizontal line highlights your 0.9958 correlation measurement, and the dotted red vertical line highlights your 20.44 dB SNR result.

enter image description here

I'd say that's a pretty good match!

In fact, for this specific case in my simulation (x = 1; z = x + N(0,σ)) if we denote C(x,z) to be the correlation between x and z, and σ as the noise standard deviation, we can actually show that:

    enter image description here

Given a correlation value of 0.9958, this would yield an SNR of 20.79dB, which is consistent with your results.