Chapter 12
Metrology, Quality Control and Closed-Loop Machining
Bachelors Program in Machine Technology
CNC Programming
•
Bachelor
Metrology, Quality Control and Closed-Loop Machining
Introduction
CNC machining is not complete when the tool leaves the workpiece. A manufactured feature is acceptable only when its dimensions, geometry, surface condition, material integrity, and functional performance conform to specification. Metrology provides the evidence; quality control interprets that evidence; closed-loop machining uses it to correct the process.
In conventional CNC production, the machine executes programmed coordinates under the assumption that tools, fixtures, materials, temperature, and machine geometry remain stable. In practice, cutting tools wear, workpieces deform, thermal conditions change, and measurement systems introduce uncertainty. Inspection and feedback therefore connect the designed product to the actual manufacturing process.
This chapter develops methods for planning inspection with gauges, probes, and coordinate measuring machines (CMMs); evaluating tolerance capability and process variation; assessing surface integrity; and applying offsets and tool-wear compensation. The emphasis is on safe, traceable corrective control rather than simply measuring finished parts.
Learning Objectives
After studying this chapter, a student should be able to:
Select suitable gauges, probes, and coordinate measuring systems for a machining task.
Distinguish accuracy, precision, resolution, repeatability, reproducibility, and measurement uncertainty.
Calculate basic process statistics and capability indices, interpreting their limitations.
Relate cutting conditions and tool wear to dimensional error and surface integrity.
Design an inspection plan and use measured results to adjust work and tool offsets.
Explain the operation, benefits, risks, and limitations of closed-loop machining.
Apply traceability, calibration, and statistical-control principles in a production setting.
1. Metrology as a Manufacturing System
Metrology is the science of measurement. In CNC production it includes the specification of what is measured, the instrument and method used, environmental control, data recording, uncertainty evaluation, and decision rules for accepting or rejecting a part.
A measurement result is not identical to the true value. It is an estimate obtained under defined conditions. A useful conceptual model is:
xm = xt + es + er + ee
Here, xm is the measured value, xt is the unknown true value, es is systematic error or bias, er is random error, and ee represents environmental and setup effects. The expression is a measurement model, not a guarantee that all errors can be separated exactly. It is applicable when the principal error contributions can reasonably be represented as additive.
Important terminology includes:
Accuracy: closeness of a result to the reference or true value.
Precision: closeness of repeated results to one another.
Repeatability: variation under the same operator, instrument, method, location, and short time interval.
Reproducibility: variation when specified conditions change, such as operator or measurement station.
Resolution: the smallest displayed or distinguishable increment.
Calibration: comparison with a reference standard, with documented results and traceability.
Uncertainty: quantified doubt associated with a measurement result.
High resolution does not automatically mean high accuracy. A digital indicator may display micrometres while possessing substantial bias if it has not been calibrated or correctly aligned.
Measurement traceability and uncertainty
Traceability is an unbroken documented chain of calibrations linking a measurement to recognized standards, with each link contributing to uncertainty. Typical sources include instrument calibration, probe repeatability, temperature, fixturing, alignment, operator technique, and surface form.
For independent uncertainty components represented by standard uncertainties u1, u2, …, a commonly used combined standard uncertainty is:
uc = √(u12 + u22 + … + un2)
The root-sum-square form assumes the components are reasonably independent and are expressed in the same units. If components are correlated, covariance terms must be included. An expanded uncertainty is often reported as:
U = k uc
where k is a coverage factor selected for the desired level of confidence, often approximately 2 for an approximately 95% coverage interval when normal-model assumptions are appropriate. Acceptance rules must specify how uncertainty is treated near a tolerance limit; otherwise, two inspectors may make inconsistent decisions.
2. Selecting Inspection Equipment
Inspection should be planned from the functional requirement, tolerance, feature geometry, production volume, and required speed. The instrument must be capable not merely of reading the nominal dimension but of discriminating meaningful differences within the tolerance.
Fixed and comparative gauges
Go/no-go gauges provide rapid attribute decisions. A GO plug gauge checks the maximum material condition of a hole, while a NO-GO gauge checks the opposing limit. They are efficient for repetitive production but do not provide a numerical value and are specific to a feature and tolerance.
Vernier and digital callipers are versatile but usually unsuitable for very tight tolerances because contact alignment, jaw condition, and operator force affect results. Micrometers provide better resolution and controlled contact force for external dimensions. Bore gauges and air gauges are useful for internal diameters, taper, and production comparison. Indicators support runout, alignment, flatness comparisons, and setup verification.
Touch-trigger and scanning probes
CNC machine probes can locate workpiece datums, measure bore or boss positions, verify stock, and inspect selected features in the machine. A touch-trigger probe records a trigger point; a scanning probe collects many points while moving across a surface. Probes reduce handling and can support automatic offset updates, but they are affected by stylus calibration, approach direction, trigger pre-travel, coolant, chips, surface roughness, and machine geometric error.
Probe calibration normally establishes the effective stylus diameter and trigger characteristics using a qualified artefact. Calibration should be repeated after stylus changes, collisions, or significant thermal changes.
Coordinate measuring machines
A CMM determines coordinates in a controlled coordinate system using a touch or non-contact sensor. It can evaluate size, location, orientation, form, and relationships between features. A typical CMM inspection sequence is:
Clean and stabilize the part.
Secure it without distorting thin or flexible features.
Establish an alignment from datum features.
Measure sufficient points using a defined sampling strategy.
Fit geometric elements according to the specified rule.
Evaluate dimensions and geometric tolerances.
Report results, uncertainty, and identification data.
The measured result depends on the datum alignment and fitting method. For example, a circle fitted by least squares is not necessarily the same as a minimum-zone circle. The drawing or applicable standard must determine the appropriate interpretation.
Capability of the measurement system
Before using measurement data to judge a process, the measurement system itself should be evaluated. A gauge repeatability and reproducibility (GR&R) study estimates variation due to the equipment and appraisers. If measurement variation is large compared with the manufacturing tolerance, process conclusions are unreliable. A common practical objective is that measurement-system variation should be a small fraction of total tolerance, although the exact acceptance criterion depends on the organization and governing standard.
3. Inspection Planning and Geometric Control
An inspection plan translates a product specification into controlled operations. It should identify the feature, characteristic, nominal value, tolerance, datum reference, instrument, sampling frequency, environmental conditions, acceptance rule, and reaction plan.
A useful sequence is:
Interpret the drawing: identify size tolerances, geometric tolerances, surface texture, material requirements, and datum structure.
Classify characteristics: distinguish critical-to-function, safety-related, major, and minor features.
Select the method: use the fastest method that provides adequate discrimination and traceability.
Define the sampling plan: consider risk, production volume, process stability, and customer requirements.
Control the environment: stabilize temperature, remove chips and coolant, and prevent thermal growth.
Record results: retain program version, machine, tool, operator, measurement device, time, and part identity.
Define reaction rules: specify when to stop production, segregate parts, investigate, or adjust offsets.
For a hole pattern, for example, a calliper cannot establish true position. A CMM or calibrated machine probe may measure the hole axes relative to datums. For a turned shaft, a micrometer may check diameter, while an indicator or CMM is needed for runout relative to the datum axis. Surface texture requires an appropriate profilometer rather than visual inspection alone.
4. Process Variation and Statistical Control
No machining process produces identical results indefinitely. Variation can be divided into:
Common-cause variation: inherent effects such as normal machine stiffness, minor temperature fluctuation, and stable tool geometry.
Special-cause variation: identifiable disturbances such as a chipped insert, loose fixture, wrong offset, probe collision, or incorrect material.
A process should not be adjusted merely because one result differs slightly from the target. Frequent unnecessary adjustment can increase variation, a condition known as tampering. Control charts and engineering judgment help distinguish random variation from a real shift.
For observations x1, x2, …, xn, the sample mean is:
x̄ = (1/n) ∑_(i=1)n xi
and the sample standard deviation is:
s = √[∑_(i=1)n (xi − x̄)2/(n − 1)]
The denominator n−1 is used when estimating the population standard deviation from a sample. All observations must represent the same characteristic and use consistent units.
For a stable, approximately normal process with lower specification limit LSL and upper specification limit USL, potential capability is:
Cp = (USL − LSL)/(6σ)
where σ is the process standard deviation. Cp compares the specification width with the natural process spread but ignores centering. Centered capability is:
Cpk = min[(USL − μ)/(3σ), (μ − LSL)/(3σ)]
where μ is the process mean. In practice, μ and σ are estimated using x̄ and s. These indices are meaningful only when the process is reasonably stable, the data are representative, and the distributional assumptions are defensible. A high capability index cannot compensate for an unstable process.
Worked example: capability of a diameter process
A shaft has specification 25.000 ± 0.020 mm. Thus:
USL = 25.020 mm and LSL = 24.980 mm. A stable sample gives x̄ = 25.006 mm and s = 0.004 mm.
The spread is relatively narrow, but the process is displaced toward the upper limit. Centering the process near 25.000 mm would improve Cpk without necessarily reducing variation.
5. Surface Integrity and Tool Wear
Surface integrity includes surface texture, residual stresses, microhardness, plastic deformation, tearing, burns, white layers, and subsurface damage. It is broader than roughness. A component may have acceptable average roughness but unacceptable tensile residual stress or a thermally damaged layer.
Surface roughness is commonly described using parameters such as Ra, the arithmetic mean of absolute profile deviations from the mean line. The exact evaluation length, cutoff, filtering method, stylus radius, and measurement direction must be specified; values obtained under different settings should not be compared directly.
For an idealized turning operation with a rounded tool nose of radius r_ε and feed per revolution f, the theoretical kinematic roughness is often approximated by:
Ra ≈ f2/(32r_ε)
This relation assumes an ideal tool, rigid setup, negligible material effects, and a regular feed-mark profile. It does not predict chatter, built-up edge, vibration, ploughing, tool damage, or material-specific behavior. Units must be consistent; if f and r_ε are in millimetres, Ra is in millimetres.
Tool wear affects both size and quality. Flank wear generally changes the effective cutting geometry and may cause gradual dimensional drift, increased cutting force, heat, and roughness. Crater wear can weaken the cutting edge; notch wear may occur near the depth-of-cut line. Sudden chipping produces special-cause variation and requires immediate investigation rather than gradual offset compensation.
Tool-wear decisions should combine dimensional trends, spindle load, vibration, acoustic signals, visual evidence, and inspection results. Compensation is appropriate only when the error is consistent, the tool remains structurally sound, and the correction is within a validated limit.
6. Offsets and Corrective Control
CNC controls commonly use several offset types:
Work coordinate offsets: define the relationship between machine coordinates and part datums.
Tool length or geometry offsets: account for tool dimensions and setup position.
Tool wear offsets: apply small corrections as the cutting edge changes.
Cutter radius compensation: modifies programmed path according to cutter radius and directional requirements.
A correction must be linked to the physical cause. If every feature is displaced equally, the likely cause is work offset, datum location, probing, or fixture setup. If only one tool's features drift, tool geometry or wear offset is more likely. If an error changes with machine warm-up, thermal behavior should be investigated.
For a measured characteristic with target T and measured value M, the signed error may be defined as:
e = M − T
A simple corrective update is:
onew = oold − k e
where o is the relevant offset and k is a correction gain. For direct diameter control, the required offset change may be half the diameter error when the control applies a radial tool-path correction; for a control that directly applies diameter wear compensation, it may equal the full diameter error. The machine builder's convention must therefore be verified before implementation. k should not exceed the validated response of the process, and limits, approvals, and rollback procedures are essential.
Closed-loop correction should not chase random measurement noise. A practical rule is to use a moving average, trend, or control limit and to require confirmation of the measurement system before changing an offset.
7. Closed-Loop Machining Architecture
Closed-loop machining is a cycle in which measurement results influence subsequent machining decisions. The loop may operate within one part, between operations, or across a production batch.
Closed-loop machining process from planning through measurement and correction
Figure: Closed-loop machining process from planning through measurement and correction
Figure: A closed-loop machining cycle in which measurement informs a controlled correction.
A robust loop contains: a defined measurement characteristic; calibrated sensing; data validation; decision logic; bounded offset changes; confirmation measurement; and a record of the action. In-process probing is fast and avoids re-fixturing, but an independent CMM may be required for final release because machine-tool errors and probe alignment can influence results.
Digital manufacturing systems can connect CNC controls, probes, CMMs, statistical software, and manufacturing execution systems. Artificial intelligence may assist with anomaly detection or tool-life prediction, but it does not eliminate calibration, engineering judgment, explainability, or responsibility for product conformity. A model trained on biased or incomplete data can recommend inappropriate corrections.
8. Illustrative Case: Correcting a Drifting Turning Process
Background
An illustrative production cell turns a steel shaft to a diameter of 30.000 ± 0.030 mm. A carbide insert machines 120 parts per shift. A micrometer checks diameter, while every tenth part is verified on a CMM.
Problem
Measurements show a gradual increase from 30.004 mm to 30.020 mm over 80 parts. The measurement system has been calibrated, and a short GR&R study shows acceptable variation relative to the 0.060 mm tolerance. Surface roughness also increases, but no chatter is observed.
Analysis
The monotonic trend suggests flank wear rather than a random fixture disturbance. The part remains within specification, but the upper limit is 30.030 mm and continued drift could create nonconforming parts. The operator inspects the insert and finds a continuous wear land without fracture. Cutting conditions and coolant flow are checked; both are correct.
Approach and solution
The process engineer establishes a tool-wear compensation limit and uses a confirmed diameter measurement. The current error relative to target is:
e = 30.020 − 30.000 = +0.020 mm
The CNC control applies diameter wear compensation directly, so a correction of −0.020 mm is entered only after the control convention is verified. A smaller staged correction, such as −0.010 mm followed by a confirmation cut, may be preferred to avoid overcorrection. The next part measures 30.008 mm. Production then resumes with measurements every fifth part for a short verification interval. The insert is replaced at the validated wear limit rather than being used until failure.
Outcome and learning points
The process returns toward target, surface quality improves, and no parts are accepted solely on the basis of an unverified automatic correction. The case demonstrates that:
measurement-system adequacy precedes process adjustment;
a trend is more informative than one isolated reading;
the offset sign and diameter/radius convention must be confirmed;
compensation cannot repair a chipped or unstable tool;
tool-life limits should be based on evidence and risk;
all corrections require traceable records and confirmation.
9. Limitations, Safety, and Governance
Measurement can be invalidated by thermal gradients, dirty surfaces, burrs, clamping distortion, poor datum selection, inadequate sampling, or an unsuitable fitting algorithm. A CMM report may appear precise while measuring the wrong coordinate system. Likewise, automatic probing can damage a stylus or workpiece if approach clearance and collision protection are inadequate.
Safety procedures should include guarded probing cycles, collision checks, safe retract planes, controlled feed rates during probing, chip removal, lockout procedures, and authorization for automatic offset writes. Access to offset-edit functions should be role-based, with limits preventing catastrophic changes. CNC programs, probe routines, calibration records, inspection reports, and corrective actions should be version-controlled.
Quality decisions must respect applicable drawing standards, contractual requirements, calibration standards, and regulatory obligations. Records should preserve part identity, equipment identification, environmental conditions where relevant, measurement results, uncertainty or decision rule, and disposition of nonconforming product. It is unethical and technically dangerous to delete out-of-limit results, remeasure selectively, or adjust offsets until a preferred number appears.
10. Best-Practice Checklist
Start with function, datums, and tolerance—not with the instrument available.
Calibrate instruments and verify the measurement system for the intended tolerance.
Clean, deburr, stabilize, and fixture parts without distortion.
Use independent verification for critical or release characteristics.
Separate common-cause trends from special-cause events.
Do not compensate for random noise, damage, or an unknown cause.
Confirm whether the CNC applies diameter or radius compensation.
Bound automatic corrections and require confirmation measurements.
Maintain traceability from part to program, tool, offset, and inspection result.
Treat surface integrity and geometric relationships as seriously as size.
Chapter Summary
Metrology supplies reliable evidence about manufactured features, but measurement quality depends on instrument selection, calibration, datum alignment, environment, sampling, and uncertainty. Gauges are fast and feature-specific; probes enable in-machine feedback; CMMs provide flexible coordinate and geometric evaluation. Process variation should be analyzed using stable, representative data, with Cp describing potential spread and Cpk also accounting for centering. Surface integrity includes more than roughness and is strongly influenced by tool condition and cutting mechanics. Offset compensation is effective for bounded, diagnosed, and repeatable errors, but it must not conceal unstable processes or damaged tools. Closed-loop machining joins machining, measurement, decision logic, and controlled correction while requiring calibration, cybersecurity, safety, traceability, and human oversight.
Key Terms
Metrology: Science of measurement and its application.
Calibration: Comparison with a reference standard under documented conditions.
Traceability: Documented connection of a result to recognized standards.
Measurement uncertainty: Quantified doubt associated with a measurement result.
Repeatability: Agreement under unchanged measurement conditions.
Reproducibility: Agreement when specified measurement conditions change.
Gauge: Device used to inspect a feature, often by comparison or limit decision.
CMM: Coordinate measuring machine that determines feature geometry from measured coordinates.
Datum: Theoretically exact reference used to establish a feature or coordinate system.
Probe: Sensor used to detect or scan a workpiece feature.
Common-cause variation: Inherent variation from a stable process system.
Special-cause variation: Variation associated with an identifiable disturbance.
Process capability: Ability of a stable process to meet specification limits.
Tool-wear compensation: Controlled offset adjustment that accounts for tool degradation.
Surface integrity: Surface and subsurface condition affecting function and life.
Runout: Variation of a rotating feature relative to a reference axis or datum.
Closed-loop machining: Machining system in which inspection data influence subsequent control.
GR&R: Study of gauge repeatability and reproducibility.
Review Questions
Short Answer Questions
Distinguish accuracy from precision.
Why must a measurement system be evaluated before process capability is calculated?
What is the purpose of a work coordinate offset?
Name two common causes of dimensional drift during machining.
Why is surface integrity broader than surface roughness?
Long Answer Questions
Explain how you would plan inspection for a turned shaft containing diameter, runout, and surface-texture requirements.
Describe the assumptions and limitations of Cp and Cpk.
Compare fixed gauges, machine probes, and CMMs in terms of speed, flexibility, information, and risk.
Explain a controlled procedure for applying tool-wear compensation.
Discuss how traceability, calibration, and uncertainty affect the acceptance of a machined part.
Analytical / Application Questions
A process has limits 49.95 and 50.05 mm, mean 50.030 mm, and standard deviation 0.010 mm. Calculate Cp and Cpk, then interpret centering and spread.
A bore is repeatedly measured 0.012 mm oversize, but a second independent instrument shows nominal size. Identify the investigations required before changing an offset.
Design a closed-loop inspection and correction strategy for a five-hole CNC-machined pattern, including datums, measurement method, sampling, decision rules, and safeguards against incorrect automatic correction.
Multiple Choice Questions with Answers
Question 1
Which property describes closeness of repeated measurements to one another?
A. Accuracy
B. Precision
C. Traceability
D. Resolution
Correct Answer: B. Precision
Question 2
A CMM is most appropriate for which task?
A. Checking only whether a simple shaft enters a limit gauge
B. Measuring a hole pattern relative to datum features
C. Removing burrs from a machined part
D. Setting spindle speed automatically
Correct Answer: B. Measuring a hole pattern relative to datum features
Question 3
For specification limits 24.980 mm and 25.020 mm, with σ = 0.004 mm, what is Cp?
A. 0.60
B. 1.00
C. 1.67
D. 3.33
Correct Answer: C. 1.67
Question 4
Which condition most strongly indicates a special cause?
A. Small random variation around a stable mean
B. A gradual, explainable tool-wear trend
C. A sudden shift after a fixture loosens
D. Normal measurement repeatability
Correct Answer: C. A sudden shift after a fixture loosens
Question 5
What is the main purpose of a work coordinate offset?
A. To define the relationship between machine coordinates and part datums
B. To increase coolant concentration
C. To measure surface roughness
D. To replace tool calibration
Correct Answer: A. To define the relationship between machine coordinates and part datums
Question 6
The idealized turning roughness approximation Ra ≈ f2/(32r_ε) assumes which condition?
A. A chipped cutting edge
B. A perfectly flexible fixture
C. An ideal tool and regular feed-mark geometry
D. Uncontrolled chatter
Correct Answer: C. An ideal tool and regular feed-mark geometry
Question 7
Why should random measurement noise not automatically trigger an offset change?
A. It may increase process variation through tampering
B. It always means the CMM is defective
C. Offsets cannot affect dimensions
D. Noise occurs only during milling
Correct Answer: A. It may increase process variation through tampering
Question 8
What does Cpk consider that Cp does not?
A. Tool material
B. Process centering relative to specification limits
C. Machine spindle power
D. Surface color
Correct Answer: B. Process centering relative to specification limits
Question 9
Which action is appropriate after a suspected insert fracture?
A. Apply a large wear offset immediately
B. Ignore the measurement until the next batch
C. Stop and investigate the special cause
D. Increase measurement uncertainty intentionally
Correct Answer: C. Stop and investigate the special cause
Question 10
A robust closed-loop machining system should include which combination?
A. Automatic corrections without limits or confirmation
B. Measurement, validated decision logic, bounded correction, and verification
C. Visual inspection only and no records
D. Offset changes based on a single unverified reading
Correct Answer: B. Measurement, validated decision logic, bounded correction, and verification