MISS LYNN
Math 250A Spring 2018
PROJECT
INSTRUCTIONS: Refer to the project guidelines for complete instructions and advice.
This project is due by the beginning of class on Wednesday, April 25, 2018. A first draft
is due by the beginning of class on Monday, April 2, 2018. Your (entire) team will meet
with your instructor by Wednesday, March 21, 2018 to discuss the project and your
team’s progress. Team members who fail to show up for their scheduled meeting will be
docked 5 points on their project grade.
INSPECTING COMPLEX HARDWARE
Complex machined hardware components are designed to fit together with very tight
tolerances, sometimes as small as 0.001”. These parts are manufactured using
computerized numerically controlled (CNC) milling machines that are programmed to cut
elaborate contours. In a typical CNC mill, the contour consists of segments of straight
lines and arcs of circles. After the parts are manufactured, they must be inspected to
ensure that the required tolerances are maintained. The inspection process consists of
two steps: collecting the inspection data and analyzing the data.
The data are collected using a coördinate measuring machine (CMM). The CMM has a
probe with a small ruby sphere at the end. The probe follows the contour of the part and
periodically records the x- and y-coördinates of the center of the sphere. For a typical
inspection the coördinates might be recorded every 0.020” around the contour, or fifty
points per inch.
The data are analyzed by comparing the recorded coördinates with a computer design file
giving the nominal, or ideal, contour for the part. Should the coördinate system for the
data points and the coördinate system for the design file be identical, the analyst can
compute the distance from each data point to the corresponding point in the design. If the
part were manufactured perfectly, all of these distances should equal the radius of the
probe sphere. Distances computed to be too large indicate that the part is oversized;
distances computed to be too small indicate that the part is undersized. The objective of
analyzing the inspection data is to determine whether the part is in tolerance everywhere,
or to note where it is out of tolerance. It may be possible to remachine an out-of-
tolerance part to bring it into tolerance. Failing this, a variance may be granted for the
part, or it may be scrapped.
The typical situation is that the coördinate systems for the design file and for the
inspection data are not identical. In this case, the first thing the analyst must do is to
transform the inspection coördinates so that they “fit” the design file coördinates; only
then can the analyst determine whether the part is in tolerance or not. The purpose of this
project is to investigate how this transformation is accomplished, and how the “fit” of the
inspection data to the design file is determined.
The fit of the inspection data to the design file is done using the Least Squares method:
for each data point, the analyst computes the square of the distance from that point to the
Math 250A Spring 2018
nearest point on the design file. The degree of fit is the sum of these squared distances
for all of the data points. The “best” fit is obtained when this sum is minimized, hence
the name “Least” Squares. The first step in the process is to develop a method for
determining the distance from a data point to the nearest point in the design file.
Step 1: Distance from a Data Point to a Design File Contour
The contour consists of line segments and arcs of circles. We assume that the analyst has
determined which segment or arc is closest to a given data point.
A. Given a data point with coördinates ,x y , and a line segment with start point
,s sx y and end point ,e ex y , compute the (shortest) distance from the data point to the line segment. There are three distinct cases you have to consider,
depending on the relative location of the data point and the segment.
B. Given a data point with coördinates ,x y , and an arc of a circle with center
,c cx y , radius r , starting and ending angles and , respectively,
( )0 2 , , 2 , compute the (shortest) distance from the data
point to the arc. There are several cases you have to consider, depending on the
relative location of the data point and the arc – in particular, whether the data
point is inside the circle or outside the circle.
Step 2: Transformation of a Data Point
The data points will undergo a transformation consisting of a rotation about 0, 0
through an angle , followed by a translation of ,x y .
A. Given a data point with coördinates ,x y , compute the coördinates of the data point after undergoing the given transformation.
B. Explain why the order of the operations in the transformation – rotation followed by translation – is important. Be specific in your explanation.
We will refer to the data point before the transformation as the original data point, and
after the transformation as the transformed data point.
Step 3: Distance from a Data Point to a Contour as a Function of Three Variables
The distance from a given transformed data point to a design file contour is a function of
three variables.
A. What are the three independent variables for this function? B. Using the results from Steps 1 and 2, write the formula(e) for the distance from a
transformed data point to a line segment.
Math 250A Spring 2018
C. Using the results from Steps 1 and 2, write the formula(e) for the distance from a transformed data point to an arc of a circle.
D. List and explain any difficulties with using the formulae from parts B and C. In particular, what assumptions might be violated by a transformed data point?
(Figure 1 might help.)
Step 4: The Function to be Minimized
The Least Squares function to be minimized is the sum of the squares of the distances
from the data points to the contour. To make the problem tractable, assume that there are
only two line segments in the contour – 1 1 1 1 , – ,
s s e e x y x y and
2 2 2 2 , – ,
s s e e x y x y
– and that all transformed data points have distances measured normal to the appropriate
segment (see Figure 2). The 1
n data points for segment 1 have (initial, untransformed)
coördinates 1 11,1 1,1 1,2 1,2 1, 1,
, , , , , , n n
x y x y x y ; the 2
n data points for segment 2 have
(initial, untransformed) coördinates 2 22,1 2,1 2,2 2,2 2, 2,
, , , , , , n n
x y x y x y .
A. Write the formula for the squared distance from the transformed data point having
initial coördinates 1, 1,,i ix y to the first segment with end points 1 1,s sx y and
1 1 ,
e e x y . Do the same for the points for the second segment.
B. Write the formula for the sum of the squared distances for all of the transformed data points. Use sigma notation. This is the function to be minimized; for
convenience, this function will be known as 1 2 3, ,F v v v . (You didn’t think I was going to name the real variables and give away the answer to 3A, did you?)
Step 5: Minimizing F, Part I
A. Explain in general how you would minimize a function of three independent variables.
B. Write the three equations that must be solved to minimize F . C. Explain why a solution to these three equations might not give you a minimum
value for F . What would such a solution represent physically in the inspection
problem? Draw a picture of this sort of situation.
Math 250A Spring 2018
Step 6: Minimizing F, Part II
The difficulty in finding a solution to the set of equations in Step 5B is that the equations
are nonlinear. However, numerical techniques can be used to approximate a solution.
These techniques can be repeated to get closer and closer approximations to the actual
solution.
One such technique is to substitute a linear function for each nonlinear function in F .
The linear function should be chosen so that it gives the best approximation possible to
the nonlinear function it is replacing.
A. Identify the nonlinear functions that you intend to replace with linear approximations.
B. For each of the nonlinear functions, explain how you will select an appropriate linear function with which to replace it. (Hint: think about Taylor polynomials.)
C. List and explain any assumptions needed to justify the use of the linear functions identified in part B. In particular, explain why these assumptions are reasonable.
D. Write equations for the linear approximations to the three equations you derived in 5B.
Step 7: Minimizing F, Part III
When you solve the set of equations in 6D, the solution you get is an approximation to
the solution for the set of real equations in 5B.
A. Explain how you will use the solution to the set of equations in 6D; i.e., what will you do with the values of the variables obtained in the solution?
B. Because the solution is only approximate, you will repeat some of the steps above to get a better approximation. Explain which steps you will repeat, and how the
physical situation changes with each repetition.
C. Explain how you will decide when your approximation is close enough to stop the repetitions. (Hint: you haven’t yet used the tolerance on the part.)
Step 8: Finishing Up
You now have a solution that minimizes F .
A. Explain what minimizing F means physically. B. Reiterate the goal of the inspection process; i.e., what were you really trying to
accomplish here?
C. Explain how you will use the solution found in Step 7 to accomplish this goal.
Math 250A Spring 2018
Step 9: Extra Credit
Because F is nonlinear, the actual solution to minimizing F cannot be obtained by
simply adding the incremental values from each iteration. However, for a final
inspection report, the values used to minimize F should be included.
A. Explain how you would determine the actual solution for minimizing F using the incremental values. (Hint: look at Step 2B.)
Many machined parts have contours and tolerances in three dimensions, rather than two.
B. What transformations would be necessary for a three-dimensional inspection data analysis? How many variables would be involved?
Math 250A Spring 2018
Figure 1
Math 250A Spring 2018
Figure 2