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.