Modulo Means (reprised)

Sunday, November 30th, 2008 by Nigel Jones

In my previous post I had asked for some input on how to compute the mean of a phase comparator. Bruno Santiago suggested converting the phase readings to their Cartesian co-ordinates and averaging the resulting (X, Y) data, and then converting the means of X & Y back into a phase angle. Well kudos to Bruno because this is exactly what I ended up doing. However, as Bruno observed, it’s not exactly an efficient process. It is however robust, and in my application, the robustness counts for a lot.

The suggestion that I average the inputs to the phase comparator has its merits. However for reasons that would take too long to explain, I’m not really able to do this in my application.

Finally, I’d like to mention the second solution that Kyle had proposed. First a caveat. I haven’t fully thought through this solution, and I most certainly have not implemented and tested it. With that in mind, here’s another approach to contemplate.

You’ll remember that we can compute the average of the phase angle by using the simple arithmetic mean, provided that we do not cross back and fore across the zero phase line. Well Kyle’s insight was that as well as computing the arithmetic mean of the phase angle, we also do the same for the quadrature angle. The idea is that while it is possible that the phase could alternate across the zero degree line, it would not simultaneously alternate across the 90 degree line (or indeed the 180 degree line). Thus, the method then becomes one of computing two means and choosing the correct one. If I get the time I’ll develop this into a fully fledged algorithm and publish it for you all to, ahem, enjoy. I’m fairly sure that this method is not as robust as the Cartesian method. However, it is dramatically more efficient and thus is deserving of greater investigation. Bruno – perhaps you’d care to do the analysis in your CFT (Copious Free Time)?

Home

4 Responses to “Modulo Means (reprised)”

1. Bruno Santiago says:

To get the best method you have to analyse two things.How many inputs you will average? 4? 10? 500? 10000?What´s the max noise? 10 degrees? 30? 70? 90? 180?If it´s over 90 your measurement is probably useless.With that information and looking to the unit circle and the four quadrants for a couple of hours you will probably find a efficient and robust method.The magic will probably on analysing the inputs before averaging. Something like my second suggestion but without restrictions for the number of inputs, but with restrictions about the maximum noise.

2. Bruno Santiago says: