As we saw in the previous article, several different algorithms are available for fitting circles to CMM point data.  This article will examine the calculations that are used for the most common algorithms.

Mathematical Basis of Fitting Calculations

A circle fitting algorithm calculates a perfect circle that is the “best fit” for the set of raw data points.  In other words, it finds the circle that most closely approximates the data points.  Mathematically, a fitting algorithm is an optimization calculation that maximizes or minimizes a certain parameter within certain degrees of freedom while subject to constraints.  For circle fitting, the size and center point are the “floating” variables whose values are adjusted and the point deviations are optimized by particular criteria.  The distinction between the different algorithms is in exactly how the circle is fitted – specifically, what parameter is optimized (maximized or minimized) and what the constraints are.

Least Squares Circle

• The Least Squares algorithm is the default in most CMM softwares.

• Finds an “average” circle that goes through the middle of the data points

• Does not correspond to contact with a mating feature.  A physical analogy for least squares is that the deviation at each point represents an elastic band whose tension varies with the square of the length.  The result minimizes the “energy” of the system.

• The optimization criterion is that the sum of the squared deviations is minimized, with no other constraints.

• The Least Squares algorithm is computationally stable and not sensitive to outliers Maximum Inscribed Circle

• Finds the largest circle that will fit completely inside the data points

• Corresponds to the largest gage pin that will fit into a hole

• In most cases, there are 3 points of contact where the deviation is zero

• Maximizing the size of the circle minimizes the area between the circle and the surface, as well as the average deviation

• The optimization criteria are that the average absolute deviation is minimized, with the constraint that the minimum deviation is zero

• Because the result is determined by the most extreme “low” data points, the Maximum Inscribed algorithm is sensitive to outliers Minimum Circumscribed Circle

• Finds the smallest circle that will fit completely outside the data points

• Corresponds to the smallest ring gage that will fit over a pin

• In most cases, there are 3 points of contact where the deviation is zero

• Minimizing the size of the circle minimizes the area between the circle and the surface, as well as the average deviation

• The optimization criteria are that the average absolute deviation is minimized, with the constraint that the maximum deviation is zero

• Because the result is determined by the most extreme “high” data points, the Maximum Inscribed algorithm is also sensitive to outliers Comparison Between Different Fitting Algorithms

The fitting examples show that the sizes and centers of the fitted circle can be quite different, depending on which algorithm was used.  These differences correspond roughly to the feature’s form error, so algorithm selection can be a major consideration when the amount of form error is significant.

Summary

Circle fitting algorithms in CMM software are based on the mathematical concept of optimization, to calculate the circle that maximizes or minimizes a certain aspect of the point deviations.  Future articles will explore other algorithms with different optimization criteria and constraints, the computational pros and cons of each algorithm, and how they correspond to fit and function criteria and GD&T calculations.

### CMM Training

JSN Megazine template designed by JoomlaShine.com