I have a program that reads 16 bit two's complement format data to plot/analyze graphs. I have a database text file with various decimals which represent real analogue data, ie. let's say they are voltage readings:

-0.002948 0.08594 0.01 0.00777

When I convert to the 16 bit form with the toolbox's inbuilt function, I have to manually choose the 'gain'. If I choose 1, all these small numbers will be rounded to the nearest integer, ie 0.

So then my question is, what is the protocol for choosing this gain/normalization? Do I multiply everything by the maximum absolute voltage range divided by the largest absolute number? I want to retain as much information/reduce round off errors as possible.

ie. Multiply all numbers by (2^16/2-1)/0.08594 in this specific example.

Thanks very much.

  • 1
    $\begingroup$ I think you're on the right track -- you want the maximum analog sample to map to the largest binary number, and the minimum analog sample to map to the smallest binary number. This is called quantization. $\endgroup$ – MBaz Dec 1 '15 at 15:09

Your Answer

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

Browse other questions tagged or ask your own question.