# Evaluating the accuracy of an integrator

I'm designing a digital signal processing chain that includes integration of a periodic input followed by decimation/resampling. The processor is integer/fixed point only, so the primary source of error is numerical. I'm simulating the process in python in order to evaluate the accuracy of different algorithms and parameters.

I have a target maximum error of 0.3%, and I'm in conversation with the project owner about how to interpret that, but I'm curious about standard practices for evaluating accuracy in a signal processing chain.

I could take the absolute value of the difference between my signal and the target (in this case a synthesized ideal integral) and divide by the value of the target. But this doesn't work when the signal passes through 0.

If I divide instead by the peak value, I find that the primary contributor to the instantaneous error is a small phase discrepancy. If the two signals have the same shape, but one is delayed by half a sample, I somehow feel like that shouldn't count as much toward the real error.

• 3% of what? The project owner kindly must explain this vague error target in a more specific, unambigious, language, possibly using a mathematical formula... Mar 22, 2022 at 22:12
• Regarding digital integrators, the material at the following web page may be of some interest to you: dsprelated.com/showarticle/1299.php Mar 23, 2022 at 10:11
• @Fat32 Yes, this is really the key point. After more discussion we established that it was percentage of reading that they wanted measured and we were able to establish the minimum reading for which this threshold had to be met. Apr 19, 2022 at 21:46

$$SNR = 10\cdot log_{10}(\frac{\sum x_{float}^2}{\sum (x_{fixed} -x_{float})^2})$$