Closed DavidLP closed 5 years ago
Don't we have these issues with every scan step? The issue is more likely to appear for the LSB, but also the tuning error is the smallest for the LSB being wrong. I don't see how we can solve this and get significant better results.
A solution would be to increase the number of injections - this is equivalent to increased statistics.
Significant better results not, but a cross check that threashol(TDAC) is monotone could inprove the result.
We store the best result in all tunings. Event if binary search does not give a good result we will overwrite with the optimal result afterwards.
E.g. 10000 -> first step ... 11100 -> this is optimal result, but a little bit too high 11010 -> this in 3nd optimal result, but too low 11011 -> this in 2nd optimal result, but a little too low 11010 -> repeating last scan step with 0 (see above) -> change to 11011 11100 -> replaced 11011 with 11100, because the latter was better
There is one special case where we could find a better value: Imagine:
TDAC = 1111
withOcc = N_inj
: means threshold is still too lowTDAC = 1110
withOcc = N_inj - 1
. Here we measure just by statistical error one count less. Than this result is taken. But we know already that evenTDAC = 1111
was still too low bad. This information could be used to prevent this.Solution: Do not do / use the last iteration result when all preceding bits are set.