Reading Contact Patterns on Spiral Bevel Gears: A Lightweight ResNet-18 Classifier for Installation-Position Deviation

Spiral bevel gears transmit torque between intersecting shafts in vehicle final drives, transfer cases, helicopter tail rotors and machine-tool spindles. Their curved, progressively engaging teeth deliver a high contact ratio and quiet running, but the same geometry makes the meshing state unusually sensitive to how the pair sits inside its housing. A few hundredths of a millimetre of axial or radial displacement is enough to move the loaded contact from the middle of the flank toward the toe or the heel, concentrating stress and shortening life.

On the shop floor, that meshing state is judged from the contact pattern. Marking compound is spread over one flank, the pair is rolled under a light braking load for a fixed number of revolutions, and the patch where the compound has been wiped away is inspected. Position, length, shape and orientation of the patch tell the fitter whether the pinion sits too deep or too shallow, whether the gear needs to move axially, and which shim stack to change. The reading is fast but subjective: it depends on the experience of the operator, it is poorly documented, and it is difficult to audit.

Spiral bevel gear set with curved teeth for a right-angle drive
A spiral bevel pair: the curved tooth trace produces gradual engagement, and the same curvature makes the contact pattern shift readily when the mounting position changes.

Why the contact pattern is a classification problem in disguise

Two established routes exist for turning a pattern into a number. Tooth contact analysis (TCA) computes the contact ellipse from the mathematical flank surfaces and the relative displacement of the two members; it is accurate but requires the machine-tool settings and the exact flank equations of the specific pair, which makes it a design-office tool rather than a production-line one. The second route processes a photograph of the pattern: binarisation, extraction of a contact-spot coordinate frame, and computation of spot shape and position parameters. Such pipelines work, but they depend on hand-tuned thresholds and on stable illumination, and each new gear size needs re-tuning.

A different framing avoids both problems. In real assembly, the mounting position is not a continuous variable to be measured but a discrete state chosen from a shim catalogue: the adjuster selects among a limited set of axial and radial configurations. Each configuration leaves a recognisably different imprint, so identifying the deviation is equivalent to assigning a pattern image to one of a small number of classes. That is a standard convolutional-network task, and it can be executed on the same photograph the fitter already takes.

Four mounting offsets and their signatures

The mounting position of a spiral bevel pair is described by four deviations, which together form the adjustment space available during assembly:

  • ΔV — radial (offset) deviation between pinion and gear, manifesting as a change in the hypoid offset distance;
  • ΔH — pinion axial deviation, positive in the direction of increasing pinion axial mounting position;
  • ΔJ — gear axial deviation, positive in the direction of increasing gear axial mounting position;
  • ΔE — shaft-angle deviation.

In the classification study described here, three states were used as classes: the nominal position (ΔJ = 0 mm, ΔH = 0 mm), a gear axial offset (ΔJ = −1.0 mm) and a pinion axial offset (ΔH = −1.0 mm). Radial and shaft-angle offsets were left for later expansion of the dataset.

Backbone: ResNet-18 and the residual idea

ResNet-18 is an 18-layer residual network built around the observation that stacking more layers does not automatically lower training error. If a block is asked to represent a target mapping H(X) directly, optimisation becomes difficult once the network is deep; instead the block represents the residual F(X) = H(X) − X, and a skip connection adds the input back so that the block output is F(X) + X. Driving F(X) toward zero then yields an identity mapping, and adding layers can no longer degrade training error. The layer configuration is summarised below for a 224×224×3 input.

Stage Output size Kernel / channels / stride
conv_1x 112×112 7×7, 64, 2
maxpool 56×56 3×3, 64, 2
conv_2x 56×56 4 × (3×3, 64, 1)
conv_3x 28×28 3×3, 128, 2 followed by 3 × (3×3, 128, 1)
conv_4x 14×14 3×3, 256, 2 followed by 3 × (3×3, 256, 1)
conv_5x 7×7 3×3, 512, 2 followed by 3 × (3×3, 512, 1)
avgpool 1×1 1×1, 512
FC 1×1 —

Attention: letting the network look where the patch is

Contact patterns occupy a small, spatially variable part of the flank image, so a useful classifier must suppress the bright but irrelevant regions of the tooth surface and concentrate on the wiped patch. The convolutional block attention module (CBAM) achieves this with two sequential operations.

Channel attention pools the feature map along both spatial axes with average and maximum operators, passes each descriptor through a shared multilayer perceptron with one hidden layer, sums the two outputs and applies a sigmoid:

$$M_c(X)=\sigma\left(W_1W_0\,X^{c}_{avg}+W_1W_0\,X^{c}_{max}\right)$$

where σ is the sigmoid function, W1 and W0 are the two weight matrices of the shared perceptron, and Xcavg, Xcmax are the average- and maximum-pooled channel descriptors.

Spatial attention concatenates the average- and maximum-pooled maps along the channel axis and convolves the result with a single 7×7 kernel:

$$M_s(X)=\sigma\left(f^{7\times7}\left(\left[X^{s}_{avg};X^{s}_{max}\right]\right)\right)$$

where f7×7(·) denotes the 7×7 convolution and [·;·] the channel-wise concatenation.

Modifications to the stock network

Two changes were made to the standard ResNet-18. First, the 7×7 stem convolution with stride 2 was replaced by three stacked 3×3 convolutions — one with stride 2, two with stride 1 — which reach a comparable effective receptive field while inserting additional nonlinearities before the first pooling stage. Second, channel-and-spatial attention blocks were inserted after the stem convolution and after the final residual stage, ahead of global average pooling, leaving the residual stages themselves untouched. The resulting network keeps the lightweight character of ResNet-18 while concentrating its capacity on the pattern region.

Test rig and image acquisition

Patterns were generated on a closed-loop, power-recirculating test stand. A servo motor and a high-ratio planetary reducer supply the drive; an asynchronous AC motor working against a brake resistor applies load; a torque and speed sensor measures shaft speed and loading torque; diaphragm couplings compensate residual misalignment. Power is fed in at the gear and taken out at the pinion to maximise the torque the system can circulate. The gearbox module carries a ball-screw axial adjustment for both members, with adjustment amount read from the screw lead and a graduated scale, and a radial adjustment based on shim packs of different thicknesses — simple, repeatable and directly comparable to shop-floor practice.

Patterns were produced by cleaning the flanks, applying red lead oxide marking compound evenly to the convex flank of the gear, running the pair for a specified number of revolutions, and photographing the resulting contact region with an industrial camera, ring light and laser displacement sensor mounted on a bracket. The ring light and the fixed sensor geometry keep ambient light out and hold the region of interest in a reproducible position.

Because the flank is a curved surface, images were unwrapped before use. A flexible checkerboard target was pressed onto the tooth surface to divide it into small patches; corner points detected with OpenCV served as control points for a per-patch perspective transform, giving a transform matrix for each patch. Applying these matrices to the pattern image, with the tooth held in the same spatial position as during calibration, produces a flattened view of the whole flank in which the pattern geometry is preserved and directly comparable between samples.

Dataset

No public benchmark of gear contact patterns exists, so the images were captured and flattened under one loading condition: 20 r/min shaft speed and 1 500 N·m torque. A total of 432 flattened pattern images were obtained, split into training and test subsets.

Class Mounting deviation Training images Test images
1 Nominal position, ΔJ = 0 mm, ΔH = 0 mm 206 29
2 Gear axial deviation, ΔJ = −1 mm 81 17
3 Pinion axial deviation, ΔH = −1 mm 83 16

Training environment and metrics

Models were implemented in Python with PyTorch 2.0 on a Windows 11 64-bit workstation with an Intel Core i7-10700K, 32 GB of memory, an NVIDIA GTX 1660 GPU and CUDA 11.8. Performance was judged with classification accuracy, the share of correctly predicted samples,

$$\text{Accuracy}=\frac{T}{T+F}\times100\%$$

where T and F are the numbers of correctly and incorrectly classified samples, and with the softmax cross-entropy loss for a sample of class y,

$$\mathcal{L}_{CE}(z,y)=-\log\frac{\exp\left(z_y\right)}{\sum_{j=1}^{C}\exp\left(z_j\right)}$$

with z the vector of class scores and C the number of classes.

Results

Model Training accuracy / % Test accuracy / % Loss
Improved ResNet-18 (3×3 stem + attention) 97.84 93.55 0.15
Original ResNet-18 93.78 90.32 0.19

Replacing the stem convolution and adding channel and spatial attention raised test accuracy from 90.32 % to 93.55 %, a gain of 3.23 percentage points, and lowered the cross-entropy loss from 0.19 to 0.15. Training accuracy rose as well, from 93.78 % to 97.84 %, so the improvement reflects a better fit to the pattern features rather than a change of regularisation strategy; both models retain a train–test gap of roughly three to four points.

How far the numbers can be pushed

Two cautions follow from the arithmetic of the split. The test set holds 62 images, so a single misclassified sample moves accuracy by about 1.6 percentage points; the reported 3.23-point gain is therefore equivalent to roughly two images and should be read as a promising signal rather than a settled effect size. Class balance is also uneven — 206 nominal images against 81 and 83 for the two offset classes — and aggregate accuracy hides whether the minority classes are being confused with the nominal one, which is precisely the error an assembly application cannot tolerate. A confusion matrix, per-class recall and cross-validated splits over repeated captures would make the comparison far more informative than a single train–test division.

Generalisation is bounded by the physical scope of the data as well: one gear pair, one gearbox, one speed and one torque level. Pattern geometry scales with gear size and shifts with load, so a classifier trained at 1 500 N·m and 20 r/min has no demonstrated transfer to other modules or to the light-load rolling conditions sometimes used for inspection.

Engineering value and next steps

Within those limits, the approach changes the economics of pattern inspection. Once a camera and ring light are mounted at the test station, unwrapping and classification run without operator judgement, and the output is a discrete label — nominal, gear offset, pinion offset — that maps directly onto the adjustment the fitter would otherwise derive by eye. Because the network is a modified ResNet-18 rather than a large backbone, inference fits on modest industrial hardware and can sit beside the test stand rather than in a separate computing room.

The obvious extensions are to enlarge the dataset with radial (ΔV) and shaft-angle (ΔE) offsets, additional offset magnitudes rather than the single −1.0 mm step, other gear sizes and additional load levels, and to report per-class metrics alongside overall accuracy. Interpretability is the second front: attention maps overlaid on the flattened flank would let an inspector confirm that the network is responding to the wiped patch and not to illumination artefacts or tooth-surface blemishes, which is the condition for trusting such a classifier in a quality-control record.

Scroll to Top