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
{"ft_lang_label":"__label__en","ft_lang_prob":0.8996059,"math_prob":0.9903117,"size":3642,"snap":"2020-45-2020-50","text_gpt3_token_len":694,"char_repetition_ratio":0.15805387,"word_repetition_ratio":0.22375216,"special_character_ratio":0.17984624,"punctuation_ratio":0.05794702,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99784034,"pos_list":[0,1,2,3,4,5,6],"im_url_duplicate_count":[null,2,null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-23T21:37:50Z\",\"WARC-Record-ID\":\"<urn:uuid:0da557b4-bfbb-4f27-a1f5-0559f417cbfa>\",\"Content-Length\":\"19602\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:738d3cc1-53fc-48dc-8b4a-18ce06d49929>\",\"WARC-Concurrent-To\":\"<urn:uuid:fcac8748-7a60-4ba7-aec7-38cf772014a0>\",\"WARC-IP-Address\":\"35.208.206.10\",\"WARC-Target-URI\":\"http://cmmquarterly.mbccmm.com/index.php/training/general/236-calculations-for-circle-fitting-in-cmm-software\",\"WARC-Payload-Digest\":\"sha1:4HYV5V55O5KVTQCCNGTWFZB2RACVL2VD\",\"WARC-Block-Digest\":\"sha1:KKGLV5Q2QTYTA6TBQY2WI5X6G7NHF7S2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107865665.7_warc_CC-MAIN-20201023204939-20201023234939-00628.warc.gz\"}"}