A Reconfigurable Hardware Application for Machining of Metal Parts William Cash, Stephen Schnelle, Sammy Lee, Jan Frigo, Paul Graham, Matt Bement Los Alamos National Laboratory Abstract Image processing algorithms can be used to mitigate and detect anomalies or to monitor a process such as machining of metal parts. For certain applications, typically involving high-precision components, it is desirable to detect the variability in material properties such as grain size or hardness of the workpiece material. The hardness of a finished part is determined using a high speed video camera (4000 frames/sec) and an image processing algorithm. The algorithm has a feed-forward data flow that consists of three stages: edge detection of the frame, interframe differencing to eliminate any static particles, and a cross-correlation routine to determine the chip velocity. This velocity yields information pertaining to the hardness of the metal, i.e. slower velocities correspond to softer materials, etc. Processing in real-time is necessary because of the high frame rate of the camera. Thus, a specialized hardware system is investigated. The target hardware is a specialized reduced instruction set computer (RISC) processor, the Stretch S5000, that contains a hardware accelerator built into the processor called the Instruction Set Extension Fabric (ISEF). Performance is reported in terms of algorithm run-time speed, power usage, memory implementation issues and ease of development. I. I NTRODUCTION Machining of metal parts is generally an automated process. Current methods of detecting defects in manufactured parts involve a destructive analysis that does not provide a real-time inspection. Before using computational analysis, the measurement process involved an experienced and skillful operator to make accurate measurements. Although manual inspection may detect major defects, it cannot determine material properties such as hardness without extensive scrutiny under a microscope. Currently, automated visual methods provide greater accuracy, but involve damaging the material to conduct measurements. Therefore, a means of measuring material hardness without compromising the integrity of the material is desirable. Work at Los Alamos National Laboratory (LANL) has shown a direct correlation between chip velocity from a metal being machined on a lathe and its material hardness. Harder metals have cutting chips that exit the part faster than those of softer metals for identical cutting parameters. Hence, the machining process can potentially be used as a continuous, nondestructive material hardness test. The unaided eye is incapable of observing this phenomenon, because of the rates at which machining processes occur. Therefore, a high-speed camera that takes 4000 frames/sec (fps) with a resolution of 110x100 pixels recorded the cutting of the part. The fine pixel resolution is used to detect features on the chip and the rapid procession of images is required to track the movement of these features. When observing a lathe, the environment is not always constant. Signal processing algorithms offer solutions for handling the environmental variability and extracting the desired material properties from the data. A high-pass filter is implemented to remove these variances. During the machining, the lighting can be changed, or objects can obstruct the camera’s view of the material. Chips from the metal can leave the lathe at various angles and affect the image. Additionally, if coolant is used, the coolant could splash and alter the image. First, a high-pass filter sharpens the edges, then interframe differencing subtracts the current frame from the previous frame to remove any spurious particles that are static between frames. This eliminates any buildup around the tool or on the camera lens. Finally, a cross-correlation algorithm extracts the velocity of the chip. Unfortunately, for even a single image the large number of computations required can prohibit real-time implementations on most conventional processors such as a Pentium, etc. If real-time analysis is not possible, storing the large quantity of data generated by the high-speed camera can be burdensome. Even at the typical 8-bit resolution, over 10KB of memory is required to store a 110x100 pixel image. With the camera taking 4000 frames/second (fps), almost 42MB is required just to store one second worth of data. Such large amounts of data may not be thoroughly analyzed and can fill too much memory. Post-processing of the data also poses an issue as it does not allow for real-time detection and possible correction of defects. Furthermore, data transfer of 42 MB/sec alone can slow down the defect detection considerably. Hence, real-time data analysis is necessary.