0
$\begingroup$

I'm investigating quantization error.

I have an analogue waveform that looks like this and is of theoretically infinite resolution:-

wave

I've sampled it as (8 bit oscilloscope readings & 0b1) to produce a file of single ones or zeros. The samples are partially random as per quantization theory, but I want to check the correlation with the analogue original. Theory suggests that there should be some correlation.

How can I do that? Clearly I can't compare the 1 bit samples with the 8 bit samples they came from.

Put another way, how can I show that my quantization is entirely uncorrelated to the underlying waveform?


Edit & maybe a solution:-

St is the theoretical and perfect(!) signal.

S1 is my sample set as (scope reading) & 0b1.

S2 is another independent sample set as (scope reading) & 0b1.

It occurs to me that I can't possibly compare S1 with St, as quantisation error will be present in both sets. But, if S1 ~ St, then by inference S2 ~ St. Hence I can test the hypothesis that S1 ~ S2 since they're both derived from common signal St. If there is a correlation, then S1 must be correlated to St too.

So I can just use normal correlation analysis (or Hamming distance, Jaccard index) between S1 and S2 to measure any. Yes/no?

$\endgroup$
5
  • $\begingroup$ with & 0b1, you're extracting the least significant bit position. Is that your intention? Why can't you "clearly" compare these, what's the problem there? $\endgroup$ Jan 14, 2021 at 12:23
  • $\begingroup$ @MarcusMüller My understanding of quantisation theory is that the quantisation noise/error (my bits) is somewhat correlated to the waveform in the case of a regular waveform. I can't compare them with the original as that's a 100% fit because one is derived directly from the other. $\endgroup$
    – Paul Uszak
    Jan 14, 2021 at 13:08
  • 1
    $\begingroup$ That't not the quantization noise/error! That would be $V_{digitized}-V_{actual}$, and you don't know the latter. $\endgroup$ Jan 14, 2021 at 15:01
  • $\begingroup$ @MarcusMüller You're right! So what would I call that single bit stream? I'm interested in the randomness of those bits. I can then amend the question... $\endgroup$
    – Paul Uszak
    Jan 14, 2021 at 15:59
  • $\begingroup$ That's the least significant bits coming from the scope. $\endgroup$ Jan 14, 2021 at 16:26

1 Answer 1

2
$\begingroup$

I've sampled it at a 1 bit resolution (as 8 bit oscilloscope readings & 0b1)

No. Taking the LSB is NOT 1 bit quantization. A one bit quantizers are not trivial to design. For a zero mean signal that's reasonably symmetrically distributed over positive and negative values, you can just take the sign bit. For signals that are asymmetrically distributed around their mean, designing a decent 1 bit quantizer takes a bit of work.

In your example you should quantize so that you get a "1" of the signal is above the mean and and "0" if it's below the mean. If you do this, you will see that both quantization noise and quantized signal are highly correlated with the original signal. Both will be periodic with the same period.

If you want to study quantization noise, I recommend starting with higher bit levels, i.e. where the amplitude of the signal is much larger than the quantization steps. This makes the choice of quantizer very simple and in most case you can assume that the quantization noise is uniformly distributed. Otherwise, you need to tackle the subject of "optimum quantizer" which requires some non-trivial math.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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