A motor stamping part surface defect detection method based on machine vision
Patent Information
- Application Number
- CN202610714189.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-18
AI Technical Summary
常规检测多依赖单一可见光视觉,仅能从二维轮廓识别毛刺外形,无法结合冲裁摩擦生热、热波传导机理做深层特征挖掘
本发明通过沿冲次时序同步采集边缘图像与红外热图像,利用冲裁摩擦热产生机理建立毛刺朝向与空间相位差的一致性规则,精准区分模具源性毛刺与热形变伪毛刺;通过构建模具源性毛刺朝向时序序列并检测突变点,量化生成模具间隙稳定性指数,实现从孤立静态检测到模具状态主动预判的跨越;根据稳定性指数自动切换标准或鲁棒检测模式,平衡检测精度与产线容错需求,同时输出异常区位、磨损类型及量化调校建议,形成检测与运维闭环,显著提升了电机冲压件表面缺陷检测的准确性和模具工况的智能化管控水平。
Smart Images

Figure CN122591692A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of stamping defect detection technology, specifically a machine vision-based method for detecting surface defects in motor stamping parts. Background Technology
[0002] As the core and load-bearing structural components of motors, stamped parts are generally formed by high-speed stamping using multi-station continuous dies. Burrs generated at the cut edges are high-frequency surface defects that directly affect dimensional accuracy, assembly clearance, and the vibration and service life of the entire machine. Conventional inspections mostly rely on single visible light vision, which can only identify the shape of burrs from two-dimensional contours and cannot combine the heat generated by stamping friction and the heat wave conduction mechanism to perform in-depth feature mining.
[0003] Conventional inspections often perform isolated static identification on individual parts, lacking temporal correlation analysis of punching cycles. This makes it difficult to distinguish between workpiece-origin burrs caused by material fluctuations and instantaneous vibrations, and die-origin burrs caused by die edge wear, clearance misalignment, and edge chipping. Traditional solutions do not incorporate dual-modal collaborative detection of infrared thermal imaging and vision, making it impossible to infer the cause of burrs from the edge temperature field distribution and temperature rise variation patterns.
[0004] Meanwhile, traditional methods lack quantitative modeling of the correlation between burr orientation, temperature rise gradient, temperature peak, and burr tip position, and there is no unified judgment threshold, relying solely on fuzzy morphology for discrimination. They cannot identify and statistically analyze abrupt changes in burr orientation during consecutive punches, cannot quantify die clearance stability, and cannot adaptively switch burr judgment criteria. Fixed thresholds are prone to missed and false detections, and they cannot provide early warnings of fault locations. Overall, their adaptability and reproducibility are insufficient, making it difficult to meet the needs of high-precision online inspection and die condition prediction for large-scale operations. Summary of the Invention
[0005] The purpose of this invention is to provide a machine vision-based method for detecting surface defects in stamped motor parts, so as to solve the problems mentioned in the background art.
[0006] A machine vision-based method for detecting surface defects in stamped motor parts includes: A1. Along the stamping sequence, edge images and infrared thermal images of motor stamping parts produced by the same mold in consecutive stamping cycles are acquired sequentially, and each frame of image is associated with the stamping sequence number to form a dual-modal image sequence. A2. Extract burr orientation information from each frame of edge image and determine whether the burr is facing upwards or downwards; reconstruct the edge temperature field from the infrared thermal image, calculate the local temperature rise gradient of the edge segment where the burr is located, and the spatial phase difference between the temperature peak position and the burr tip position; the spatial phase difference is defined as the temperature peak position coordinate minus the burr tip position coordinate divided by the thermal wave diffusion length, and its positive or negative sign indicates that the temperature peak is located downstream or upstream of the burr tip along the edge extension direction; at the same time, construct a temperature rise-phase difference time series. A3. Only when the local temperature rise gradient exceeds the gradient threshold, the absolute value of the spatial phase difference is less than the phase difference threshold, and the sign of the spatial phase difference and the burr orientation satisfy the consistency rule established based on the punching friction heat generation mechanism, is the burr orientation marked as a mold-origin burr label; otherwise, it is discarded. The mold-origin burr labels are arranged according to the punching sequence number to construct a time sequence of mold-origin burr orientations. A4. Scan the time sequence of burr orientation of the mold source through a sliding window, detect abrupt changes in the burr orientation label between adjacent strokes, count the frequency of occurrence of abrupt changes and the stroke interval between adjacent abrupt changes, and generate a mold clearance stability index; wherein, the stable stroke is the stroke in which the mold clearance stability index is higher than the first threshold, and the previous stable stroke is the most recent stable stroke before the current stroke. If there is no previous stable stroke, then the spur orientation distribution map of the 10 most recent strokes before the current stroke is used to generate a temporary standard distribution map by majority vote, which is used to mark the mutation point. A5. Determine the stamping status based on the stability index: if it is higher than the first threshold, execute the standard detection mode; if it is lower than the first threshold but higher than the second threshold, execute the robust detection mode; if it is lower than the second threshold, output a mold abnormality warning. A6. The standard detection mode uses the first burr height judgment threshold, while the robust detection mode uses the second burr height judgment threshold, which is greater than the first threshold, and ignores the burr height detection results of the strokes corresponding to isolated mutation points. A7. Output the burr height detection results and stability index for each stroke, and when outputting an abnormal warning, also output the mold part prompts related to the distribution of mutation points.
[0007] By adopting the above scheme, through dual-modal image sequence acquisition, burr orientation and thermal feature extraction, mold origin label screening, mutation point detection and stability index generation, and adaptive switching of detection mode based on stability index, the accurate identification of mold origin burrs and dynamic hierarchical control of stamping status are realized, which solves the problems of traditional methods being unable to distinguish the cause of burrs and unable to quantify mold stability.
[0008] In some possible implementations, the consistency rule established based on the mechanism of frictional heat generation during punching is as follows: under standard punching conditions, frictional heat is concentrated on the downstream side of the burr root along the punching direction (the downstream side is defined as the side along the edge of the stamped part from the feed end to the discharge end). Therefore, the spatial phase difference is expected to be positive when the burr is facing upward and negative when the burr is facing downward. When the sign of the measured spatial phase difference does not satisfy the above expected relationship with the burr orientation, it is determined that the burr is not caused by the die clearance.
[0009] The above solution provides a clear physical criterion for distinguishing between mold-origin burrs and non-mold-origin burrs, effectively eliminating false burrs caused by external interference.
[0010] In some possible implementations, the specific methods for calculating the local temperature rise gradient and spatial phase difference in step A2 include: Pixel-level temperature calibration is performed on the edge region of the stamped part in the infrared thermal image to establish an edge temperature distribution map; The pixel-level temperature calibration method is as follows: Three or more non-collinear feature points (e.g., process holes or cross marks) are preset on the stamped part, and the positions of these feature points in the edge image and infrared thermal image are recorded respectively. The affine transformation matrix (or perspective transformation matrix) is solved using the least squares method to obtain the mapping relationship between the two sets of coordinates. The infrared thermal image is then transformed and scaled to the same resolution as the edge image, ensuring that each pixel position on the edge of the stamped part corresponds to a unique temperature value.
[0011] Centered on the edge segment corresponding to the burr orientation information, a temperature profile within a symmetrical window along the edge normal direction is extracted, and the integral value of the temperature difference between the edge segment and the background substrate is calculated as the local temperature rise gradient. Extract the thermal wave diffusion length of the temperature profile, where the thermal wave diffusion length is the spatial distance required for the temperature to drop from the peak temperature to the background temperature. Establish an inverse relationship between the heat wave diffusion length and the authenticity of the burr: when the heat wave diffusion length is less than the diffusion length threshold, retain the mold-origin burr label of the burr; when the heat wave diffusion length is greater than or equal to the diffusion length threshold, mark the burr as a thermal deformation pseudo-burr and remove it. The spatial phase difference is expressed as Δφ=(Ppeak-Pburr) / Lchar, where Pburr is the position coordinate of the burr tip in the edge extension direction, Ppeak is the position coordinate of the temperature peak, and Lchar is the thermal wave diffusion length; a positive Δφ indicates that the temperature peak is located on the downstream side of the burr tip along the edge extension direction (the downstream side is defined as the side along the edge of the stamped part from the feed end to the discharge end), and a negative Δφ indicates that it is located on the upstream side (the upstream side is the opposite side).
[0012] By defining specific calculation methods for local temperature rise gradient and spatial phase difference, introducing the inverse ratio judgment relationship of thermal wave diffusion length to eliminate thermal deformation pseudo-glitch, and providing a standardized formula for calculating spatial phase difference, the repeatability and accuracy of thermal feature quantification are guaranteed.
[0013] In some possible implementations, the specific methods for detecting mutation points in step A4 include: For each abrupt change point in the temporal sequence of the mold-origin burr orientation, extract the punch number corresponding to the abrupt change point and the burr orientation distribution map at different circumferential positions on the edge of the stamped part under that punch. The burr orientation distribution map is compared with the standard orientation distribution map under the previous stable stroke to identify continuous edge segments where the orientation is reversed. Based on the circumferential position of the continuous edge segments on the stamping part, an edge segment anomaly distribution vector is generated; Extract the spatial phase difference at the same impulse number as the abrupt change point in the temperature rise-phase difference time series, and calculate the difference between the spatial phase difference and the spatial phase difference of the adjacent stable impulse to generate the phase difference jump variable; When the length of the abnormal distribution vector of the edge segment exceeds a preset segment threshold or the distribution density exceeds a preset density threshold, and the absolute value of the phase difference jump variable exceeds the phase difference jump threshold, the mutation point is marked as a mold gap jump event. The preset segment threshold is scaled according to the ratio of the stamping part's circumference to the reference circumference of 500mm, and the preset density threshold is defined as the ratio of the arc length of the abnormal segment to the total circumferential length of the stamping part, which is a dimensionless fixed value.
[0014] The length and distribution density of the abnormal distribution vector of the edge segment are incorporated into the die clearance stability index. When the length exceeds a preset segment threshold or the distribution density exceeds a preset density threshold, the stamped part produced in that stroke is marked as a high-risk part, and a die maintenance prompt associated with the position of the edge segment is output.
[0015] By differentially identifying the flipped section using the burr orientation distribution map and combining it with phase difference jump double verification to mark the mold gap jump event, the system achieves accurate positioning of abnormal areas and identification of high-risk parts, providing clear location guidance for mold maintenance.
[0016] In some possible implementations, the decomposition and corresponding output information of the edge segment anomaly distribution vector include: If all the burrs in the continuous edge section are flipped in the same direction, it is determined to be a unidirectional bias type anomaly, and the output prompt message is that the mold of the corresponding edge section may have unilateral wear. If the burrs in the continuous edge section alternately flip in direction, it is determined to be an oscillation-type abnormality, and the output prompt message indicates that there may be a gap looseness in the mold of the corresponding edge section. If the burrs in the continuous edge segment are irregularly distributed, it is determined to be a diffuse anomaly, and the output prompt message is that the mold of the corresponding edge segment may have overall passivation.
[0017] In some possible implementations, the robust detection mode in step A6 further includes: For each isolated orientation change point that is ignored, extract the spur height sequence at the same edge position in the N strokes before and N strokes after the change point. Linear regression was performed on the burr height sequence to calculate the drift slope of the burr height as a function of the number of strokes. When the absolute value of the drift slope is greater than a preset slope threshold, the isolated orientation mutation point is remarked as a valid mutation point; Based on the sign and magnitude of the drift slope, output mold status prediction information: if the drift slope is positive and monotonically increases within three or more consecutive calculation windows, output mold wear acceleration warning and remaining stroke estimation range; if the drift slope is negative, output mold cleaning warning. The mold state prediction information and the mold clearance stability index are output together.
[0018] In some possible implementations, after the mold cleaning prompt is output, the following steps are also included: In the subsequent M consecutive strokes, the burr height sequence at the same edge position is monitored in real time to generate the recovery trajectory after cleaning; The restored trajectory is compared with the baseline of the burr height before cleaning: if the burr height returns to below the baseline, the cleaning is confirmed to be effective, and the second burr height judgment threshold in the subsequent robust detection mode is reduced; if the burr height does not return to below the baseline, a depth cleaning suggestion is output and the original judgment threshold is maintained.
[0019] In some possible implementations, the following steps are also included: Linear regression is performed on the local temperature rise gradient sequence and the burr height sequence of the same edge segment to obtain the temperature rise drift slope and the burr height drift slope. When the absolute value of the burr height drift slope is greater than the minimum effective slope, the ratio of the two is calculated as the thermo-wear discrimination coefficient. When the thermal wear discrimination coefficient is greater than the first coefficient threshold, it is determined to be wear dominated by thermal fatigue, and a suggestion to reduce the stamping speed is output; when the thermal wear discrimination coefficient is less than the second coefficient threshold, it is determined to be wear dominated by mechanical abrasive wear, and a suggestion to check the lubrication system is output; when the second coefficient threshold is less than the first threshold and the thermal wear discrimination coefficient is between the two, it is determined to be a mixed wear state.
[0020] In some possible implementations, the following steps are also included: For abrupt change points marked as die clearance jump events, the sign of the spatial phase difference under that stroke is extracted, and the direction of clearance change is determined according to the direction of the burr towards the flipping: if the spatial phase difference is positive and the burr is facing upward, the clearance of the edge section is determined to be too large; if the spatial phase difference is negative and the burr is facing downward, the clearance of the edge section is determined to be too small. Output the gap adjustment suggestion for the corresponding section, and output the adjustment reference value based on the product of the absolute value of the spatial phase difference and the preset calibration coefficient. The reference value is proportional to the gap amount that needs to be corrected. The preset calibration coefficient is 0.02mm, which is obtained by linear regression calibration of the spatial phase difference and the measured gap deviation under the standard gap. The calibration sample is no less than 100 sets.
[0021] In some possible implementations, the following steps are also included: The switching frequency is calculated by counting the number of times the standard detection mode and the robust detection mode are switched using a preset statistical window length. When the switching frequency is lower than the first frequency threshold and the mold clearance stability index shows a downward trend, it is determined to be progressive wear, and a prompt for planned maintenance is output. When the switching frequency is higher than the second frequency threshold, it is determined to be intermittent jamming, and a prompt to check the waste discharge system is output; when the first frequency threshold is less than the second frequency threshold and the switching frequency is between the two, a status monitoring prompt is output.
[0022] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects: This invention simultaneously acquires edge images and infrared thermal images along the stamping sequence, and establishes a consistency rule for burr orientation and spatial phase difference based on the stamping friction heat generation mechanism, accurately distinguishing between mold-origin burrs and thermal deformation pseudo-burrs. By constructing a time sequence of mold-origin burr orientation and detecting abrupt change points, a mold clearance stability index is quantified, achieving a leap from isolated static detection to proactive prediction of mold status. Based on the stability index, the invention automatically switches between standard and robust detection modes, balancing detection accuracy and production line fault tolerance requirements, while outputting abnormal areas, wear types, and quantitative adjustment suggestions, forming a closed loop of detection and maintenance. This significantly improves the accuracy of surface defect detection in motor stamping parts and the level of intelligent control of mold conditions. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the method structure of the present invention. Detailed Implementation
[0024] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0025] Please see Figure 1 This application provides a machine vision-based method for detecting surface defects in stamped motor parts, including: A1. Along the stamping sequence, edge images and infrared thermal images of motor stamping parts produced by the same mold in consecutive stamping cycles are acquired sequentially, and each frame of image is associated with the stamping sequence number to form a dual-modal image sequence.
[0026] It should be noted that the stroke sequence refers to each complete die closing, stamping, and ejection of the workpiece from the same set of stamping dies, which is counted as an independent stroke. These strokes are arranged in a time sequence according to the order of material output from the production line. In actual division, the signal indicating the die slide's downward movement and the die closing position can be used as the start mark of a single stroke, and the ejection of the stamped part from the die can be used as the end mark. In actual quantization, the stamping trigger pulse number output from the production control system can be directly used as the basis for timing arrangement.
[0027] In this embodiment, a 25-megapixel industrial monochrome camera is used to acquire edge images, and an infrared thermal imager with a temperature range of -20 to 150 degrees Celsius and a frame rate of 50 Hz is used to acquire thermal images. Both types of devices are connected to the field industrial switch via gigabit Ethernet and rely on the Ethernet protocol to complete real-time data interaction with the industrial control computer.
[0028] Understandably, the image acquisition timing must be strictly synchronized with the die stamping cycle. In this solution, the single stamping cycle of the die is fixed at one second. The visible light camera and the infrared thermal imager both adopt a hardware-triggered synchronization mode. The trigger signal is taken from the die slider travel proximity switch, set to 5V high level effective, and the trigger delay is set to 0ms by default. The overall timing synchronization error is controlled within one millisecond, and synchronous capture is completed within a 200-millisecond window after the stamped part is in place. The images are uniformly stored in an 8-bit lossless bitmap format, with the single frame edge image resolution set to 1920 pixels by 1080 pixels, and the infrared thermal image resolution fixed at 640 pixels by 512 pixels.
[0029] Furthermore, the stamping sequence number uses a natural number encoding that increments sequentially starting from 1. A unique sequence number is assigned after each stamping and material output is completed, and this integer data is embedded in the image file header. The file name is arranged in the format of stamping sequence number, image type, and timestamp, with the timestamp retained to millisecond precision. The visible light image and infrared thermal image corresponding to the same stamping are bound to the same sequence number and arranged sequentially in time, forming a dual-modal image sequence that can be directly retrieved and analyzed by the equipment.
[0030] Based on the hardware configuration, synchronous acquisition timing, and standardized data storage format defined in this step, precise temporal alignment of dual-modal images can be achieved. The acquisition system can be directly set up on-site according to the configuration without additional debugging and adaptation. At the same time, it provides regular and reliable raw data support for subsequent multi-feature temporal correlation analysis. The hardware selection limits the visible light camera to use a global shutter with a frame rate of no less than 50 Hz, and the infrared thermal imager to have a temperature measurement accuracy controlled within ±0.1 degrees Celsius and a pixel pitch of no more than 15 micrometers. With fixed communication ports, synchronous triggering specifications, and acquisition delay parameters, the raw data deviation caused by differences in equipment selection can be effectively avoided, ensuring the consistency of the acquisition process.
[0031] Additionally, data transmission employs packet fragmentation, with each packet having a fixed size of 1024 bytes. The packet header reserves fields for sequence number, image type, data length, and checksum. The checksum calculation uses the CRC32 algorithm. The receiving end verifies data integrity using the checksum. If verification fails, a retransmission request is automatically initiated. The retransmission timeout is fixed at 100 milliseconds, and a maximum of three retransmissions are allowed. Multiple failed transmissions result in the current packet being marked as invalid and recorded in the operation log.
[0032] Specifically, conventional single-vision acquisition can only obtain isolated single-frame appearance images, lacking temporal correlation and thermal field dimension information. The gradual characteristics of mold working conditions are fragmented by discrete sampling methods, making it impossible to trace the continuous evolution of the stamping process. Stamping production is a continuous temporal process; mold edge wear and clearance offset are slow, gradual processes with each stroke. Isolated single-frame acquisition will lose the correlation characteristics between consecutive strokes, making it difficult to distinguish between random interference and the actual mold deterioration trend. Based on the underlying laws of continuous temporal evolution in stamping production, this invention adopts a method of synchronous acquisition of dual-modal images of the same stroke and binding them to stroke sequence numbers to construct a temporal sequence, so that each set of visual and thermal field features is anchored on a unified production timeline. By combining time-series binding with dual-modal synchronous sampling, the continuous characteristics of the mold working condition gradually changing with the number of strokes can be fully preserved, avoiding the fragmented evolution correlation of discrete single-frame detection. This provides complete original support for subsequent mining of the mold's minute degradation trends from a time-series perspective. At the same time, the standardized image naming and transmission verification mechanism can avoid data packet loss and time sequence misalignment caused by interference from the on-site industrial environment, ensuring the regularity and traceability of the sequence data.
[0033] A2. Extract burr orientation information from each frame of edge image and determine whether the burr is facing upwards or downwards; reconstruct the edge temperature field from the infrared thermal image, calculate the local temperature rise gradient of the edge segment where the burr is located, and the spatial phase difference between the temperature peak position and the burr tip position; the spatial phase difference is defined as the temperature peak position coordinate minus the burr tip position coordinate divided by the thermal wave diffusion length, and its positive or negative sign indicates that the temperature peak is located downstream or upstream of the burr tip along the edge extension direction; at the same time, construct a temperature rise-phase difference time series.
[0034] It should be noted that all fixed thresholds involved in this method (including but not limited to: gradient threshold 0.8℃ / pixel, phase difference threshold 0.2, heat wave diffusion length threshold 1.2mm, stability index first threshold 0.65, second threshold 0.45, burr height judgment threshold 0.05mm and 0.08mm, sliding window length 20 strokes, statistical window length 100 strokes, etc.) are obtained through a large number of sample experiments based on the standard working conditions of typical motor stamping parts (material grade 50WW800, plate thickness 0.5mm, stamping speed 120 times / minute). The sample size is no less than 500 pieces, and the statistical method is to take the mean plus three times the standard deviation.
[0035] For production lines with different materials, thicknesses, or stamping speeds, the above thresholds should be adaptively adjusted according to the following rules: for every 0.1mm increase in plate thickness, the temperature rise gradient threshold increases by 0.05℃ / pixel, and the phase difference threshold increases by 0.02; for every 10 strokes / minute increase in stamping speed, both of the above thresholds increase by 5%. Other thresholds (heat wave diffusion length threshold 1.2mm, stability index first threshold 0.65, second threshold 0.45, burr height judgment thresholds 0.05mm and 0.08mm, phase difference jump threshold 0.35, drift slope threshold 0.0005mm / stroke, etc.) have been experimentally verified to have no significant correlation with plate thickness and stamping speed. Within the production range of conventional motor stamping parts (plate thickness 0.3mm~0.8mm, stamping speed 60~180 strokes / minute), the default values given by this method can be used directly. Beyond this range, users should recalibrate through a small sample experiment. The calibration method is to take the average of the characteristic parameters from 100 strokes under stable production conditions as the new threshold.
[0036] Users can directly use the default threshold provided by this method. The system will calculate the abnormality rate based on historical detection results and provide a prompt. If higher accuracy is required, automatic calibration can be performed using stable data from the first 100 production strokes. The calibration method is to take the average value of each characteristic parameter from those 100 strokes as the new threshold. The above adjustment method is a conventional technique in this field.
[0037] It should be noted that the burr direction refers to the upward direction of the burr on the cut edge of the stamped part relative to the reference plane of the stamped part body. The determination process takes the flat mounting reference plane of the stamped part as a reference, and uses the least squares method to fit one hundred consecutive pixels of the edge to obtain the edge fitting baseline, which is used as the reference for angle calculation.
[0038] If the burr tip is biased towards the feeding side of the conveyor belt, it is considered upward; if it is biased towards the discharge side, it is considered downward. In actual quantification, the burr centerline inclination angle is fitted and classified. An inclination angle greater than zero is classified as upward, and less than or equal to zero is classified as downward. The inclination angle is also solved using the least squares method, with the fitting window limited to ten pixels before and after the burr centerline. The fitting correlation coefficient is not less than 0.9. At the same time, isolated noise points that deviate from the contour by more than three pixels are removed to avoid recognition bias caused by subjective visual judgment.
[0039] The edge temperature field defines a calculation area of 200 pixels wide at the edge of the stamped part's cut, a fixed width that can completely cover the distribution range of conventional burrs. The grayscale values of each pixel in the infrared thermal image are converted to actual temperature according to a fixed linear relationship. The conversion formula is set as T=K×G+B, where T represents the actual temperature, G is the pixel grayscale value, K is fixed at 0.6 degrees Celsius per grayscale level, and B is fixed at -20 degrees Celsius.
[0040] For missing pixels in temperature measurement, 3×3 pixel neighborhood bilinear interpolation is used to fill in the gaps. Weights are allocated inversely based on the distance to effective neighboring pixels to generate a continuous two-dimensional temperature distribution field, with temperature values recorded to one decimal place. Grayscale to temperature conversion is completed using a fixed mapping relationship, eliminating the need for additional on-site calibration. The interpolation method effectively fills in temperature measurement blind spots, ensuring the continuity of the temperature field distribution.
[0041] The specific method for calculating the local temperature gradient and spatial phase difference in step A2 includes: First, pixel-level registration of the infrared thermal image and the edge image: Pre-set three or more non-collinear feature points (e.g., process holes or cross marks) on the stamped part, record the positions of these feature points in the edge image and the infrared thermal image respectively, and use the least squares method to solve the affine transformation matrix (or perspective transformation matrix) to obtain the mapping relationship between the two sets of coordinates. Transform and scale the infrared thermal image to the same resolution as the edge image, so that each pixel position on the edge of the stamped part corresponds to a unique temperature value. Then, convert the grayscale values of each pixel in the registered infrared thermal image into the actual temperature (T=K×G+B) according to a fixed linear relationship, completing the pixel-level temperature calibration. Centered on the edge segment corresponding to the burr orientation information, a symmetrical temperature profile with a width of fifty pixels along the edge normal direction is extracted. The local temperature rise gradient is solved by integrating the temperature difference between the edge segment and the substrate background. The integration interval is limited to a range of forty pixels before and after the edge segment. The specific integration formula is: ∇T = ∑_{i=1}^{N} (Ti - Tbg), where N is the total number of pixels in the integration interval (default 80 pixels), Ti is the temperature of the i-th pixel, and Tbg is the background temperature (average value of the non-heat-affected zone). Extract the thermal wave diffusion length corresponding to the temperature profile. This length is defined as the spatial distance from the temperature peak to the background steady-state temperature plus a tolerance of 0.3℃. The determination method is to search pixel by pixel along the edge normal direction from the temperature peak point. Let the current searched pixel be the i-th pixel. If the temperature values of this pixel and its two adjacent next pixels (i.e., i, i+1, i+2) are all ≤ Tbg+0.3℃, then the i-th pixel is taken as the diffusion endpoint, and the spatial distance between the diffusion endpoint and the peak value is taken as the thermal wave diffusion length. The background temperature is selected from the average temperature of 30 consecutive pixels in the heat-free area on the outer edge. To avoid background temperature drift caused by heat accumulation in the mold, the background temperature is recalibrated every 50 strokes, taking the average temperature of the same location in the previous 50 strokes (or all existing strokes if less than 50) as the new background temperature benchmark. If no valid infrared thermal image can be acquired within 100 consecutive strokes (e.g., equipment failure), the detection is paused and a "Equipment malfunction, check recommended" message is output.
[0042] Establish a logic for determining the inverse relationship between heat wave diffusion length and burr authenticity. Set the diffusion length threshold to 1.2 mm, which is equivalent to 120 pixels. If the measured value is less than the threshold, retain the mold-origin burr label. If it is greater than or equal to the threshold, it is determined to be a heat deformation pseudo burr and removed. The spatial phase difference is obtained by dividing the difference between the temperature peak coordinate and the burr tip coordinate by the thermal wave diffusion length. The coordinate values are all set along the edge tangent direction. The temperature peak is extracted by fitting the extreme values of five points in the 5×5 pixel neighborhood. It meets the judgment conditions that the temperature of the extreme point is higher than that of all pixels in the neighborhood and the absolute value of the temperature gradient is not lower than 0.2 degrees Celsius per pixel. The positive and negative values of the calculation results directly correspond to the upstream and downstream distribution positions of the peak relative to the burr tip.
[0043] Pixel-level temperature conversion is achieved using a fixed mapping formula, eliminating the need for factory calibration or on-site debugging. This ensures consistent and controllable temperature values for each pixel, resulting in pixel-level accuracy in the constructed edge temperature distribution map. A fixed 50-pixel window is used to capture the temperature profile, precisely identifying the core thermally affected area around burrs and eliminating interference from irrelevant data. An interval integration method is employed to solve the temperature rise gradient, which, unlike single-point measurement methods, effectively suppresses computational fluctuations caused by temperature measurement noise and improves the stability of feature representation.
[0044] Extraction can be completed by following a fixed process of peak value, background sampling, and span measurement, which facilitates programmed calculation. By setting a fixed threshold based on the inherent characteristics of heat conduction in punching, the screening is completed by relying on the difference between the short heat attenuation distance of real burrs and the wide heat diffusion range of pseudo burrs. Invalid features caused by thermal deformation of the sheet can be stably filtered out without sample calibration.
[0045] The calculation benchmark and peak extraction rules for spatial phase difference are clearly defined, with no subjective settings throughout the process. The correspondence between positive and negative signs is intuitive and unique, providing a standardized and quantitative basis for subsequent glitch cause identification.
[0046] The entire calculation process for temperature rise gradient, heat wave propagation length, and spatial phase difference is complete, with parameters and judgment rules clearly recorded. The calculation can be performed step-by-step by following the recorded process. After completing temperature mapping, profile extraction, gradient solving, heat wave length measurement, pseudo-spurious removal, and phase difference calculation for a single frame image, the corresponding parameters are recorded in real time. The temperature rise gradient and spatial phase difference are stored in floating-point array format according to the stroke sequence number, and a temperature rise-phase difference time series is constructed by arranging them in time sequence. The sequence length dynamically expands with each stroke, and the memory cache is set to a maximum of 10,000 sets of data. Any data exceeding this limit is automatically written to a specified hard disk path, ensuring the continuity and integrity of data storage.
[0047] During the stamping and blanking process, the friction between the cutting edge and the sheet metal generates directional heat conduction. The root of a genuine die-originating burr always concentrates the frictional heat source, and the temperature peak exhibits a fixed spatial offset pattern depending on the burr tip. In contrast, pseudo-burrs generated by the sheet metal's own thermal deformation have no directional frictional heat source, resulting in a diffusely distributed temperature field without a stable peak position correlation. Existing technologies rely solely on the external contour to identify burrs, completely ignoring the conduction and distribution patterns of stamping frictional heat. This makes it impossible to distinguish between genuine burrs and thermally deformed pseudo-burrs from a physical perspective, easily misjudging contour undulations caused by sheet metal temperature changes as defects. Based on the inherent physical laws of stamping frictional heat generation and edge heat wave conduction, this invention simultaneously extracts the burr orientation, local temperature rise gradient, and relative position of the temperature peak, constructing a spatial phase difference quantification index. Utilizing the inherent correlation between heat wave diffusion distance and peak offset, it distinguishes between structural burrs and thermally deformed pseudo-burrs from a mechanistic perspective.
[0048] By reconstructing the edge temperature field and building the phase difference time sequence, we can rely on the underlying physical characteristics of the heat conduction in punching to break away from the limitations of simple shape recognition, identify burr attributes from the perspective of cause, and avoid the defects of traditional visual inspection being easily affected by the temperature change of the sheet material and the interference of environmental heat radiation. At the same time, the regular construction of the time sequence lays the characteristic foundation for the continuous analysis of the gradual change law of the mold gap.
[0049] A3. Only when the local temperature rise gradient exceeds the gradient threshold, the absolute value of the spatial phase difference is less than the phase difference threshold, and the sign of the spatial phase difference satisfies the consistency rule established based on the punching friction heat generation mechanism, is the burr orientation marked as a mold-origin burr label; otherwise, it is discarded. The mold-origin burr labels are arranged according to the punching sequence number to construct a time sequence of mold-origin burr orientations.
[0050] It should be noted that the gradient threshold is fixed at 0.8 degrees Celsius per pixel, which can effectively distinguish between the effective stamping friction temperature rise and the interference caused by ambient temperature drift and instantaneous heat dissipation; the phase difference threshold is fixed at 0.2, which is directly set according to the physical characteristics under standard stamping conditions, limiting the maximum allowable deviation range of the feature. If it exceeds the limit, it is judged as random thermal interference and does not have mold-related attributes.
[0051] A consistent matching rule is established based on the formation law of frictional heat in blanking: the direction along the edge of the stamped part from the feed end to the discharge end is defined as the positive direction. The spatial phase difference is positive when the temperature peak is located on the positive side of the burr tip, and negative when it is on the opposite side. Under standard blanking conditions, frictional heat is concentrated on the downstream side of the burr root in the blanking direction, which is the positive side. Therefore, the spatial phase difference should be positive when the burr is facing upwards, and negative when the burr is facing downwards. When the measured characteristics do not meet this matching relationship, it is determined that the burr is unrelated to the change in die clearance. This matching logic is established based on blanking mechanics and heat wave conduction characteristics, and the constraint relationship is unique and fixed.
[0052] This step employs a logical judgment based on the simultaneous fulfillment of three conditions. If any condition is not met, the current stroke's feature data is removed, effectively improving the accuracy of mold-origin burr identification. During actual labeling, labels are recorded in Boolean format: 1 for conditions met and 0 for conditions not met. These are sequentially stored in a one-dimensional array according to the stroke sequence number, with array indices corresponding one-to-one with the stroke sequence number, ultimately generating a continuous, complete time-series sequence. The data is stored in CSV text format, with fields containing the stroke sequence number and label value for easy direct parse and retrieval by subsequent algorithms.
[0053] By combining fixed thresholds with thermal mechanism matching rules for joint screening, invalid burr features caused by material fluctuations and on-site vibrations can be screened out from the physical source, accurately separating mold-origin and workpiece-origin interference features, and reducing the impact of noise data on subsequent mold status analysis.
[0054] Conventional inspections determine burr attribution based solely on the contour shape, neglecting the inherent matching rules of the punching thermal field. This easily leads to misattributing temporary contour changes caused by fluctuations in sheet material and instantaneous mechanical vibrations as mold malfunctions, resulting in frequent false alarms. During punching, the location of frictional heat accumulation, the direction of heat wave propagation, and the burr's upward orientation have a natural physical binding relationship. This correlation does not change with minor fluctuations in production conditions and is the inherent underlying constraint for distinguishing between mold-origin and workpiece-origin burrs. Based on the natural coupling rule between thermal field distribution and burr orientation, this invention employs a three-pronged screening approach: temperature rise gradient, phase difference amplitude, phase sign, and orientation consistency. Only features that perfectly match the physical mechanism are identified as mold-origin burrs. Through this combined screening based on the inherent physical correlation of punching heat conduction, random contour interference without mechanistic support can be eliminated, accurately retaining effective features that truly reflect the mold clearance state. This avoids the shortcomings of traditional single-shape discrimination, which is prone to misjudgment and false alarms, allowing subsequent mold state analysis to be based on pure and effective feature data.
[0055] A4. Scan the time sequence of burr orientation of the mold source through a sliding window, detect abrupt changes in the burr orientation label between adjacent strokes, count the frequency of occurrence of abrupt changes and the stroke interval between adjacent abrupt changes, and generate a mold clearance stability index; wherein, the stable stroke is the stroke in which the mold clearance stability index is higher than the first threshold, and the previous stable stroke is the most recent stable stroke before the current stroke.
[0056] If a stable stroke cannot be found during the initial startup of the production line or within 50 consecutive strokes, the following rule is temporarily adopted: Take the burr orientation distribution map of the 10 most recent strokes preceding the current stroke, and statistically analyze the majority orientation for each circumferential interval to generate a temporary standard distribution map. This temporary standard is only used to mark abrupt change points; it does not generate abnormal distribution vectors for edge segments, nor does it output mold maintenance prompts. During this period, the mold clearance stability index is considered invalid, and no stable stroke determination is performed. Once the first stroke with a stability index higher than the first threshold appears, the complete inspection process is resumed, and this stroke is recorded as the first stable stroke.
[0057] In this embodiment, the sliding window is fixed at twenty consecutive strokes, which can cover the complete cycle of small fluctuations in the die clearance. The sliding step size is set to a single stroke, and the window is traversed sequentially from the first stroke to the latest stroke. If the burr label values of two adjacent strokes are inconsistent, it is determined to be a sudden change point, and the corresponding stroke number is recorded as the coordinate of the sudden change point. This parameter setting takes into account both detection sensitivity and operational stability, and can accurately capture the temporal fluctuations in burr orientation.
[0058] The specific method for detecting abrupt change points in step A4 includes: extracting the stamping sequence number corresponding to each abrupt change point, and simultaneously collecting the burr orientation distribution at different circumferential positions on the edge of the stamped part under that stamping sequence. The above division is based on the calibration of a typical motor stamped part with an outer perimeter L0 = 500mm (corresponding to a diameter of approximately 159mm). When the perimeter L of the stamped part being tested is different, the number of intervals is adjusted proportionally to round (36×L / L0), and the interval length threshold (e.g., 3 intervals) is also scaled proportionally. The reference ten-degree interval division method is applicable to typical stamped parts with a perimeter of 500mm. The actual interval angle is adjusted proportionally with the perimeter of the stamped part, which can control the overall computational load while ensuring circumferential resolution.
[0059] The real-time burr orientation distribution map is compared with the standard distribution map corresponding to the previous stable strokes to identify continuous edge segments where the orientation has reversed. The standard distribution map is obtained by averaging the distribution data of five consecutive stable strokes after the stability index meets the standard. The average of multiple sets of values in the same interval is then rounded down. If the difference between the interval values exceeds the fixed deviation threshold of plus or minus three, it is determined that the orientation has reversed in that interval.
[0060] An anomaly distribution vector for edge segments is constructed based on the circumferential position, span, and proportion of the flipped interval. The vector components include the circumferential starting angle, the segment span, and the flipping proportion. The angle value is accurate to 0.1 degrees, and the proportion is retained to two decimal places, which fully represents the location and scale of the anomaly segment.
[0061] The decomposition of the abnormal distribution vector of the edge segment and the corresponding output information include: if all burrs in a continuous edge segment are flipped in the same direction and the flipping ratio is equal to 1.0, it is judged as a unidirectional bias type anomaly, indicating that there is unilateral wear in the corresponding segment of the mold; if the flipping ratio is in the range of 0.3 to 0.7 and the flipping state of adjacent intervals alternates, it is judged as an oscillation type anomaly, indicating that the mold gap is loose; if the flipping ratio is in the range of 0.1 to 0.9 and does not meet the alternating change characteristic, it is judged as a diffuse type anomaly, indicating that the mold cutting edge is dulled overall.
[0062] The three types of anomaly determination conditions are independent of each other and completely cover all distribution scenarios. There is no interval overlap or judgment gap, which can achieve a unique correspondence between distribution characteristics and fault types.
[0063] The spatial phase difference value of the same stroke in the temperature rise-phase difference time series is retrieved and calculated by subtracting it from the average phase difference of the two most recent stable strokes before and after the abrupt change point to obtain the amplitude of the phase difference jump variable. A threshold for the number of circumferential intervals is set as (reference value 3 × L / L0, rounded to the nearest integer), a distribution density threshold is set as 0.45, and a phase difference jump threshold is set as 0.35. When the length or distribution density of the abnormal segment meets the standard, and the absolute value of the phase difference jump variable exceeds the threshold, the abrupt change point is marked as a mold gap jump event (the distribution density is the proportion of the arc length of the abnormal segment to the circumference, which is dimensionless, so the threshold is a fixed value and does not need to be scaled).
[0064] For marked gap jump events, the gap change state is determined by combining the sign of the spatial phase difference and the direction of the burr reversal. If the phase difference is positive and the burr is pointing upwards, the gap of the section is determined to be too large; if the phase difference is negative and the burr is pointing downwards, the gap of the section is determined to be too small. The gap adjustment reference value is calculated based on the product of the absolute value of the spatial phase difference and a fixed calibration coefficient, and the value is proportional to the actual gap deviation that needs to be corrected.
[0065] The length and density of the abnormal distribution vector in the edge segment are incorporated into the stability index correction calculation. When the parameters exceed a fixed threshold, the stamped part of the current stroke is marked as a high-risk part, and the corresponding cutting edge segment of the die is associated with the inspection location according to the preset partition mapping relationship. The die edge is fixedly divided into three circumferential partitions, each corresponding to a different cutting edge segment of the die, realizing a direct association between abnormal locations and die inspection points.
[0066] Using one hundred consecutive impulses as a fixed statistical interval, the ratio of the total number of mutation points within the statistical interval to the number of impulses in the interval is used to obtain the frequency of occurrence of mutation points; the difference between the impulse numbers of adjacent mutation points is used to obtain the impulse interval value, which is used to characterize the temporal distribution characteristics of mutation points.
[0067] The mold clearance stability index is calculated using a fixed model. The basic index is composed of 1 minus the frequency of abrupt change points and the interval dispersion coefficient. The interval dispersion coefficient is calculated using the interval mean, the root mean square error of the difference, and a fixed normalized interval. The final index value is limited to between 0 and 1, with a higher value indicating a more stable clearance operation. Distribution density is then introduced as a correction factor to linearly correct the basic index, resulting in the final stability index.
[0068] The final stability index is calculated as follows: First, within a fixed statistical window of 100 consecutive impulses, the number of abrupt changes is counted, and the frequency of occurrence of these abrupt changes is calculated (number of abrupt changes divided by 100). Second, the impulse interval between adjacent abrupt changes is calculated, resulting in a set of interval values. Using the mean μ and standard deviation σ of these intervals, the interval dispersion coefficient is obtained through a normalization function. The interval dispersion coefficient = σ / (μ+σ), which takes values between 0 and 1, reflecting the uniformity of abrupt changes over time. Then, the base stability index is equal to 1 minus the weighted average of the abrupt change frequency and the interval dispersion coefficient (default 0.5 for each), i.e., Sbase = 1 - (0.5f + 0.5η).
[0069] Finally, an abnormal distribution density in the edge section (i.e., the proportion of the abnormal section length to the total circumferential length of the stamped part) is introduced as a correction factor: when the distribution density does not exceed 0.3, the correction factor is 1; when the density is between 0.3 and 0.6, it is 0.8; and when the density is greater than 0.6, it is 0.5. (The distribution density threshold is a fixed value and does not scale with the size of the stamped part, as it is defined as a proportional value.)
[0070] The final stability index equals the base index multiplied by a correction factor, with a value limited to between 0 and 1. A higher value indicates a more stable inter-gap operation. The statistical window length, weight, and density thresholds mentioned above are exemplary preferred values and can be scaled and adjusted proportionally according to actual production conditions. The scaling rule is that each threshold and the window length are adjusted linearly in the same proportion.
[0071] A first threshold is set to 0.65; a stability index higher than this value is considered a stable impulse. When searching for previous stable impulses, comparisons are made sequentially backward from the current impulse, with a maximum backtracking depth limited to fifty impulses. If this range is exceeded, it is determined that there is no preceding stable impulse. If no previous stable impulse exists, a temporary standard distribution map is generated by majority voting on the burr orientation distribution maps of the 10 most recent impulses before the current impulse, according to the above rules, and abrupt change points are marked accordingly. Once the first stable impulse appears, the complete detection process resumes.
[0072] The window parameters, backtracking depth, exponential model and normalization rules of the entire calculation process are fully recorded. The mold gap operation status is characterized from multiple dimensions such as time series fluctuations, circumferential anomalies and thermal feature jumps. It can accurately complete fault location and quantitative adjustment guidance, and get rid of the limitation of relying on subjective judgment based on human experience.
[0073] Wear and clearance shift of the die cutting edge do not occur synchronously across the entire area. They often start from a local circumferential section and gradually spread. Furthermore, abnormal clearance can directly cause the burr orientation to rotate regularly during consecutive strokes. Under stable operating conditions, the burr orientation remains stable with very few abrupt changes. Current technology only performs defect assessment for a single stroke, neglecting the abrupt changes in orientation and circumferential distribution differences during consecutive strokes. It cannot detect the nascent stage of minor localized die deterioration and can only identify it after the fault becomes severe, resulting in a significant delay in early warning.
[0074] Based on the evolutionary pattern of localized mold deterioration first causing a temporal abrupt change in burr orientation, and then exhibiting circumferential distribution anomalies, this invention employs a fixed sliding window temporal scanning to detect abrupt change points. It combines this with circumferential interval difference to construct an anomaly distribution vector, and simultaneously introduces thermal field phase difference jumps for dual verification, quantifying and generating a stability index. Through multi-dimensional fusion quantification of temporal abrupt change frequency, interval dispersion, and circumferential anomaly density, it can accurately characterize the stability of mold gaps, capturing early characteristics of localized minor wear and gap loosening. This breaks away from the limitations of traditional post-fault identification, achieving a paradigm shift from passive defect detection to proactive working condition prediction. Furthermore, relying on the binding relationship between thermal characteristics and orientation mechanisms, it accurately identifies the deformation direction of gaps that are too large or too small, providing directly applicable quantitative adjustment amounts, thus overcoming the shortcomings of traditional detection methods that can only provide alarms but not guidance for adjustment.
[0075] A5. Determine the stamping status based on the stability index: if it is higher than the first threshold, execute the standard detection mode; if it is lower than the first threshold but higher than the second threshold, execute the robust detection mode; if it is lower than the second threshold, output a mold abnormality warning.
[0076] Understandably, the second threshold is fixed at 0.45, forming a tiered interval division with the first threshold of 0.65. The stable mode corresponds to a stability index greater than 0.65, while the robust mode corresponds to an index between 0.45 and 0.65. A mold anomaly warning is triggered when the index is not higher than 0.45. The three interval divisions are clearly defined and do not overlap, adapting to the mold's state changes from normal operation and minor fluctuations to severe anomalies.
[0077] After each single stroke, the stability index calculation is completed, and the working condition range is immediately determined without any additional delay. For boundary strokes, the calculation is performed in real time according to the same sliding window rule. The determination result is stored in integer code form and pushed to the defect detection execution module in real time via Ethernet protocol to meet the real-time working condition control requirements of the stamping production line.
[0078] By dividing the stamping conditions into three categories using fixed layer thresholds, the detection and control logic can be automatically switched according to the actual operating status of the mold, adapting to the operating characteristics of different deterioration stages throughout the mold's life cycle and improving the overall adaptability of the solution to operating conditions.
[0079] The evolution of a mold from brand-new service to wear and failure is a gradual process. Clearance stability declines continuously and gradually, without abrupt changes. The degree of defect interference and the range of burr fluctuations naturally differ at different stages of decline. Existing technologies use the same set of detection and judgment standards throughout the entire process. Fixed thresholds are prone to frequent false detections when the mold experiences slight fluctuations, and are prone to missed detections when the mold is severely deteriorated, failing to adapt to changes in operating conditions throughout its entire lifecycle. Based on the gradual decline in mold clearance stability, this invention sets two layers of fixed thresholds to divide the mold into three operating condition intervals: stable, fluctuating, and abnormal. The detection strategy and early warning logic are automatically switched based on the stability index. Through layered threshold-based operating condition control, this invention can adapt to the inherent characteristics of gradual deterioration throughout the mold's lifecycle. It maintains stringent detection standards under stable conditions, automatically accommodates reasonable burr fluctuations under minor fluctuation conditions, and promptly triggers early warnings under severely unstable conditions, avoiding the problems of traditional fixed judgment standards being unable to adapt to multi-stage operating conditions and the coexistence of false detections and missed detections.
[0080] A6. The standard detection mode uses the first burr height judgment threshold, and the robust detection mode uses the second burr height judgment threshold which is greater than the first threshold, and ignores the burr height detection results of the stroke corresponding to the isolated mutation point; the isolated mutation point is defined as the mutation point in which no other mutations occur within 15 consecutive strokes.
[0081] Furthermore, the first burr height judgment threshold is fixed at 0.05 mm, which conforms to the factory dimensional tolerance limit standard for motor stamping parts; the second burr height judgment threshold is fixed at 0.08 mm, which is higher than the first threshold, and is adapted to the fault judgment requirements under small fluctuations in mold clearance.
[0082] The rule for determining isolated mutation points is set as follows: if no other mutations occur within fifteen consecutive strokes before and after a single mutation point, it is defined as an isolated mutation point. In robust detection mode, the burr height measurement value for this type of stroke is marked as invalid and is not included in subsequent pass / fail statistics and operating condition determination, effectively shielding the detection fluctuations caused by random interference.
[0083] The robust detection mode in step A6 further includes: For isolated, ignored abrupt change points, burr height sequences at the same edge position are extracted from twenty strokes before and after that stroke. A univariate linear regression is used to fit the extracted height sequences to calculate the drift slope of the burr height as a function of strokes. During the fitting process, outliers deviating from the sequence mean by three standard deviations are removed. A slope threshold of 0.0005 mm per stroke is set. When the absolute value of the drift slope exceeds this threshold, the original isolated abrupt change point is re-marked as a valid abrupt change point. Based on the positive or negative sign of the drift slope and the trend of its multi-window variation, mold status prompts are output. A continuously increasing positive slope indicates accelerated mold wear and estimates the remaining stable stamping strokes. A negative slope prompts for mold chip cleaning. After outputting a cleanup prompt, the system continuously monitors the burr height change at the same edge position for thirty consecutive strokes, generating a post-cleanup recovery trajectory. The average burr height of the fifteen consecutive stable strokes before the cleanup prompt is selected as the baseline. If the subsequent height falls below the baseline, the cleanup is deemed effective, and the robust mode judgment threshold is lowered by 0.005 mm, ensuring the lowered threshold is not lower than the first threshold. If the height does not fall back to the baseline, deep cleanup is recommended while maintaining the original judgment threshold.
[0084] Local temperature rise gradient sequences and burr height sequences from the same edge segment are selected, and linear regression is performed to solve for the temperature rise drift slope and height drift slope, respectively. When the absolute value of the burr height drift slope exceeds the minimum effective slope of 0.001 mm per stroke, the ratio of the two slopes is calculated to obtain the thermo-wear discrimination coefficient.
[0085] The first threshold coefficient is set at 5.0 degrees Celsius per stroke per millimeter, and the second threshold coefficient is set at 1.0 degrees Celsius per stroke per millimeter. When the discrimination coefficient is higher than the first threshold, it is determined to be thermal fatigue-dominated wear, and it is recommended to reduce the stamping speed; when it is lower than the second threshold, it is determined to be mechanical abrasive wear-dominated, and it is recommended to check the equipment lubrication system; when the value is between the two, it is determined to be a mixed wear state.
[0086] Using 200 consecutive strokes as a fixed statistical window, the number of times the standard detection mode and robust detection mode switch between each other is counted, and the switching frequency per stroke is calculated. A first frequency threshold of 0.005 times per stroke and a second frequency threshold of 0.02 times per stroke are set. When the switching frequency is lower than the first threshold and the stability index shows a continuous downward trend, it is judged as progressive wear, and a planned maintenance prompt is output. When the switching frequency is higher than the second threshold, it is judged as intermittent jamming, and it is recommended to check the waste discharge structure. When the value is between the two thresholds, continuous monitoring of the operating condition is sufficient.
[0087] Finally, the mold condition prediction results, maintenance effect judgment, wear type and working condition identification information are summarized and output simultaneously with the stability index.
[0088] By selecting a fixed sequence length of twenty strokes, the slow degradation trend of the die is covered without increasing the computational burden due to excessively long sequences. Precise matching of segment coordinates at the same edge position avoids cross-regional data interference with trend analysis. A clear univariate linear regression fitting rule, combined with a three-fold standard difference constant point removal method, accurately quantifies the evolution rate and direction of burr height with each stroke. A fixed slope threshold effectively distinguishes between random disturbances and drift in the true state of the die, avoiding missed detections caused by simple masking.
[0089] A fixed monitoring duration of thirty strokes is adapted to the post-cleaning condition recovery cycle, and continuous sampling is performed on the same section to ensure that the recovery trajectory and baseline data are comparable. The average of fifteen consecutive stable strokes is used as the judgment baseline, with an objective and unique standard, allowing for a direct assessment of the cleaning effect through numerical comparison. If cleaning is effective, the judgment threshold is slightly lowered to match the detection standard after the cutting edge condition has recovered; if ineffective, deep cleaning is recommended, forming a linkage control logic between maintenance and detection thresholds.
[0090] Simultaneously, a unified regression calculation is performed on the temperature rise sequence and the height sequence to capture mold degradation characteristics from two dimensions: thermal accumulation and mechanical wear. A fixed minimum effective slope can filter out meaningless minor fluctuations, and wear type discrimination is only initiated when the characteristic changes are significant. Based on the inherent differences between thermal fatigue and mechanical wear, a fixed coefficient threshold is set to accurately distinguish the dominant wear type and provide targeted operation and maintenance suggestions.
[0091] The statistical window of 200 strokes balances the completeness of the working condition representation with the real-time response speed. The fixed frequency threshold divides the working condition range. Combined with the stability index decline trend fitting judgment rule, it can accurately identify two types of hidden faults: progressive wear and intermittent jamming. It provides differentiated operation and maintenance guidance to avoid production losses caused by excessive or delayed maintenance.
[0092] A7. Output the burr height detection results and stability index for each stroke, and when outputting an abnormal warning, also output the mold part prompts related to the distribution of mutation points.
[0093] To more clearly illustrate the feasibility of this method, a specific embodiment is provided: taking a certain type of motor stator lamination (material 50WW800, plate thickness 0.5mm, stamping speed 120 times / minute) as the test object, the first 200 stamping cycles are continuously tested.
[0094] The system synchronously acquires edge images and infrared thermal images according to step A1; Extract the burr orientation, local temperature rise gradient, and spatial phase difference according to step A2. During the first to 150 strokes, the burr orientation is consistently upward, the spatial phase difference is positive and the absolute value is less than 0.2, and the local temperature rise gradient is between 0.85 and 0.95℃ / pixel. All three conditions of step A3 are met, and the burrs are marked as mold-origin burrs. The stability index is 1, which is higher than the first threshold of 0.65. The standard detection mode is executed, and the measured burr height is between 0.03 mm and 0.05 mm (the first threshold is 0.05 mm). During the 151st stroke, a burr appeared downward for the first time in a certain edge section, and the spatial phase difference became negative, but the other two conditions were still met. The mutation point detection identified this stroke as a mutation point, with the stability index dropping to 0.56, triggering the robust detection mode. The system output that this section was a unidirectional bias anomaly, indicating potential unilateral wear in the die. Over the next 20 strokes, the burr height in this abnormal section gradually increased to 0.07mm (exceeding the first threshold but below the second threshold of 0.08mm). The system then output a die maintenance prompt and suggested adjusting the clearance.
[0095] For the first to 150th strokes, the frequency of the mutation point is 0, the interval dispersion coefficient is 0, the basic index is 1, the correction factor is 1, and the final index is 1. The first mutation point appears in the 151st stroke. The stability index is calculated based on the sliding window from the 52nd to the 151st stroke: the mutation point frequency within the window is 0.05, the interval dispersion coefficient is 0.55, the basic index is 0.70, the distribution density is 0.45, the correction factor is 0.8, and the final index is 0.56.
[0096] From stroke 152 to 200, the frequency of mutation points increases to 0.05, the mean interval is 10, the standard deviation is 8, the interval dispersion coefficient is 8 / (10+8)=0.444, the basic index is 1-0.5×0.05-0.5×0.444=0.753, the distribution density is 0.45, the correction factor is 0.8, and the final index is 0.602.
[0097] It should be understood that the burr height is measured using a sub-pixel edge detection algorithm, employing bilinear interpolation for pixel subdivision, achieving a measurement accuracy of 0.001 millimeters. The physical equivalent of a pixel is fixed at 0.01 millimeters per pixel, calculated through a combination of optical conversions based on the camera's fixed working distance of 350 millimeters, a lens focal length of 25 millimeters, a pixel size of 5.5 micrometers, a matching 0.35x telecentric lens, and image preprocessing scaling. The image preprocessing scaling ratio is 0.045x, using a bilinear interpolation algorithm. Even after scaling, the resolution still meets the minimum pixel requirement for sub-pixel edge detection. The measurement results are retained to two decimal places and output synchronously with the stability index in successive pulses.
[0098] In another implementation, the edge of the stamped part is divided into three fixed circumferential zones, corresponding to three cutting edge sections of the die. The boundary angles of these zones are fixed, eliminating the need for on-site measurement and adjustment. When abrupt changes are concentrated in a particular zone, the corresponding die cutting edge position is directly associated with the change. The detection results are output in a fixed text format, including the stamping sequence number, burr height, stability index, abnormal zone code, wear type, clearance adjustment amount, and various maintenance suggestions. This data is uploaded to the production line control system via serial communication. The communication baud rate is fixed at 11,520, using odd parity. Data frames are arranged in a fixed format with start bit, data bits, parity bit, and stop bit. Each frame is 64 bytes long, with a frame interval of at least 10 milliseconds, adapting to the typical network communication requirements of industrial sites.
[0099] After a single stroke detection process is completed, data is simultaneously uploaded to local storage and the central control system within 500 milliseconds, with a fixed latency that balances data processing time with the real-time requirements of the production line. When an anomaly warning is triggered, a pop-up window is displayed, showing the abnormal stroke, stability index, fault location, adjustment reference value, and maintenance suggestions, facilitating quick location and handling by on-site personnel.
[0100] Relying on fixed hardware calibration parameters and sub-pixel measurement algorithms, the accuracy of burr height measurement is guaranteed to be uniform and controllable. Standardized serial communication parameters and frame formats enable seamless integration of detection data with the production line control system. The output information integrates defect values, stable status, fault location, calibration references, and maintenance suggestions to form a complete application closed loop. This can directly guide on-site mold repair and fine-tuning, shortening fault diagnosis and downtime, and improving the automation level of defect detection and mold status management in the stamping production line.
[0101] Stamping production lines operate within a continuous, industrialized, closed-loop production environment. Inspection data, mold status, and maintenance recommendations need to be synchronized to the central control system in real time. Furthermore, fault indications must accurately correspond to specific cutting edge sections of the mold to support rapid on-site handling. Existing inspection solutions can only display single defect values locally, lacking standardized output formats, fault location mapping, and supporting maintenance and adjustment suggestions. Inspection results cannot be directly applied to guide production and maintenance, creating an information gap between inspection and application. Based on the actual operational patterns of centralized control, zoned maintenance, and real-time adjustment in industrial production lines, this invention adopts a fixed sub-pixel measurement standard, fixed zone mapping rules, and a standardized serial communication frame format to synchronously output burr height, stability index, fault location, wear type, and quantitative adjustment suggestions. Through standardized real-time output of all-dimensional information, the information barrier between inspection algorithms and on-site maintenance is broken down. Inspection results are no longer isolated values but rather complete decision-making data that can be directly used for fault location, mold fine-tuning, and maintenance scheduling, improving the overall engineering feasibility and practical value of the solution.
[0102] This invention relies on dual-modal time-series image acquisition to construct feature sequences. Combined with the inherent laws of heat conduction and burr formation in punching, it identifies genuine mold-origin burrs from both external shape and thermal field dimensions, effectively avoiding misjudgments caused by sheet temperature changes and environmental interference. By jointly quantifying the mold clearance stability through time-series abrupt change detection, circumferential distribution analysis, and thermal feature jump verification, it can capture early characteristics of localized mold wear, clearance loosening, and cutting edge dulling, achieving fault prediction and precise location. Based on the mold's operational stability, detection and judgment thresholds are set in layers, automatically adapting to different operating conditions throughout the mold's lifecycle, balancing product quality standards and production tolerance requirements, and reducing the probability of missed and false detections. Time-series regression analysis quantifies the mold's deterioration rate, distinguishing between thermal fatigue and mechanical abrasive wear causes, while simultaneously evaluating the actual effectiveness of cleaning and maintenance, providing targeted maintenance and clearance quantification adjustment suggestions, achieving refined control of mold status.
[0103] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for detecting surface defects in stamped motor parts based on machine vision, characterized in that, include: A1. Along the stamping sequence, edge images and infrared thermal images of motor stamping parts produced by the same mold in consecutive stamping cycles are acquired sequentially, and each frame of image is associated with the stamping sequence number to form a dual-modal image sequence. A2. Extract burr orientation information from each frame of edge image and determine whether the burr is facing up or down; reconstruct the edge temperature field from infrared thermal image, calculate the local temperature rise gradient of the edge segment where the burr is located and the spatial phase difference between the temperature peak position and the burr tip position; A3. Only when the local temperature rise gradient exceeds the gradient threshold, the absolute value of the spatial phase difference is less than the phase difference threshold, and the sign of the spatial phase difference and the burr orientation satisfy the consistency rule established based on the punching friction heat generation mechanism, is the burr orientation marked as a mold-origin burr label; otherwise, it is discarded. The mold-origin burr labels are arranged according to the punching sequence number to construct a time sequence of mold-origin burr orientations. A4. Scan the time sequence of burr orientation of the mold source through a sliding window, detect abrupt changes in the burr orientation label between adjacent strokes, count the frequency of occurrence of abrupt changes and the stroke interval between adjacent abrupt changes, and generate a mold clearance stability index; wherein, the stable stroke is the stroke in which the mold clearance stability index is higher than the first threshold, and the previous stable stroke is the most recent stable stroke before the current stroke. A5. Determine the stamping status based on the stability index: if it is higher than the first threshold, execute the standard detection mode; if it is lower than the first threshold but higher than the second threshold, execute the robust detection mode; if it is lower than the second threshold, output a mold abnormality warning. A6. The standard detection mode uses the first burr height judgment threshold, while the robust detection mode uses the second burr height judgment threshold, which is greater than the first threshold, and ignores the burr height detection results of the strokes corresponding to isolated mutation points. A7. Output the burr height detection results and stability index for each stroke, and when outputting an abnormal warning, also output the mold part prompts related to the distribution of mutation points.
2. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, The consistency rule established based on the mechanism of frictional heat generation during punching is as follows: Under standard punching conditions, frictional heat is concentrated at the root of the burr on the downstream side along the punching direction. Therefore, the spatial phase difference is expected to be positive when the burr is facing upward and negative when the burr is facing downward. When the sign of the measured spatial phase difference does not meet the above expected relationship with the burr orientation, it is determined that the burr is not caused by the die clearance.
3. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, The specific methods for calculating the local temperature rise gradient and spatial phase difference in step A2 include: Pixel-level temperature calibration is performed on the edge region of the stamped part in the infrared thermal image to establish an edge temperature distribution map; Centered on the edge segment corresponding to the burr orientation information, a temperature profile within a symmetrical window along the edge normal direction is extracted, and the integral value of the temperature difference between the edge segment and the background substrate is calculated as the local temperature rise gradient. Extract the thermal wave diffusion length of the temperature profile, where the thermal wave diffusion length is the spatial distance required for the temperature to drop from the peak temperature to the background temperature. Establish an inverse relationship between the heat wave diffusion length and the authenticity of the burr: when the heat wave diffusion length is less than the diffusion length threshold, retain the mold-origin burr label of the burr; when the heat wave diffusion length is greater than or equal to the diffusion length threshold, mark the burr as a thermal deformation pseudo-burr and remove it. The spatial phase difference is expressed as Δφ=(Ppeak-Pburr) / Lchar, where Pburr is the position coordinate of the burr tip in the edge extension direction, Ppeak is the position coordinate of the temperature peak, and Lchar is the thermal wave diffusion length; a positive Δφ indicates that the temperature peak is located downstream of the burr tip in the edge extension direction, and a negative Δφ indicates that it is located upstream.
4. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, The specific methods for detecting mutation points in step A4 include: For each abrupt change point in the temporal sequence of the mold-origin burr orientation, extract the punch number corresponding to the abrupt change point and the burr orientation distribution map at different circumferential positions on the edge of the stamped part under that punch. The burr orientation distribution map is compared with the standard orientation distribution map under the previous stable stroke to identify continuous edge segments where the orientation is reversed. Based on the circumferential position of the continuous edge segments on the stamping part, an edge segment anomaly distribution vector is generated; Extract the spatial phase difference at the same impulse number as the abrupt change point in the temperature rise-phase difference time series, and calculate the difference between the spatial phase difference and the spatial phase difference of the adjacent stable impulse to generate the phase difference jump variable; When the length of the abnormal distribution vector of the edge segment exceeds a preset segment threshold or the distribution density exceeds a preset density threshold, and the absolute value of the phase difference jump variable exceeds the phase difference jump threshold, the mutation point is marked as a mold gap jump event. The length and distribution density of the abnormal distribution vector of the edge segment are incorporated into the die clearance stability index. When the length exceeds a preset segment threshold or the distribution density exceeds a preset density threshold, the stamped part produced in that stroke is marked as a high-risk part, and a die maintenance prompt associated with the position of the edge segment is output.
5. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 4, characterized in that, The decomposition and corresponding output information of the edge segment anomaly distribution vector include: If all the burrs in the continuous edge section are flipped in the same direction, it is determined to be a unidirectional bias type anomaly, and the output prompt message is that the mold of the corresponding edge section may have unilateral wear. If the burrs in the continuous edge section alternately flip in direction, it is determined to be an oscillation-type abnormality, and the output prompt message indicates that there may be a gap looseness in the mold of the corresponding edge section. If the burrs in the continuous edge segment are irregularly distributed, it is determined to be a diffuse anomaly, and the output prompt message is that the mold of the corresponding edge segment may have overall passivation.
6. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, The robust detection mode in step A6 further includes: For each isolated orientation change point that is ignored, extract the spur height sequence at the same edge position in the N strokes before and N strokes after the change point. Linear regression was performed on the burr height sequence to calculate the drift slope of the burr height as a function of the number of strokes. When the absolute value of the drift slope is greater than a preset slope threshold, the isolated orientation mutation point is remarked as a valid mutation point; Based on the sign and magnitude of the drift slope, output mold status prediction information: if the drift slope is positive and monotonically increases within three or more consecutive calculation windows, output mold wear acceleration warning and remaining stroke estimation range; if the drift slope is negative, output mold cleaning warning. The mold state prediction information and the mold clearance stability index are output together.
7. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, After the output mold cleaning prompt appears, the following steps are also included: In the subsequent M consecutive strokes, the burr height sequence at the same edge position is monitored in real time to generate the recovery trajectory after cleaning; The restored trajectory is compared with the baseline of the burr height before cleaning: if the burr height returns to below the baseline, the cleaning is confirmed to be effective, and the second burr height judgment threshold in the subsequent robust detection mode is reduced; if the burr height does not return to below the baseline, a depth cleaning suggestion is output and the original judgment threshold is maintained.
8. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, It also includes the following steps: Linear regression is performed on the local temperature rise gradient sequence and the burr height sequence of the same edge segment to obtain the temperature rise drift slope and the burr height drift slope. When the absolute value of the burr height drift slope is greater than the minimum effective slope, the ratio of the two is calculated as the thermo-wear discrimination coefficient. When the thermal wear discrimination coefficient is greater than the first coefficient threshold, it is determined to be wear dominated by thermal fatigue, and a suggestion to reduce the stamping speed is output; when the thermal wear discrimination coefficient is less than the second coefficient threshold, it is determined to be wear dominated by mechanical abrasive wear, and a suggestion to check the lubrication system is output. When the second coefficient threshold is less than the first coefficient threshold, and the thermal wear discrimination coefficient is between the two, it is determined to be a mixed wear state.
9. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 4, characterized in that, It also includes the following steps: For abrupt change points marked as die clearance jump events, the sign of the spatial phase difference under that stroke is extracted, and the direction of clearance change is determined according to the direction of the burr towards the flipping: if the spatial phase difference is positive and the burr is facing upward, the clearance of the edge section is determined to be too large; if the spatial phase difference is negative and the burr is facing downward, the clearance of the edge section is determined to be too small. Output the gap adjustment suggestion for the corresponding section, and output the adjustment reference value based on the product of the absolute value of the spatial phase difference and the preset calibration coefficient. This reference value is proportional to the gap amount that needs to be corrected.
10. The method for detecting surface defects in stamped motor parts based on machine vision according to claim 1, characterized in that, It also includes the following steps: The switching frequency is calculated by counting the number of times the standard detection mode and the robust detection mode are switched using a preset statistical window length. When the switching frequency is lower than the first frequency threshold and the mold clearance stability index shows a downward trend, it is determined to be progressive wear, and a prompt for planned maintenance is output. When the switching frequency is higher than the second frequency threshold, it is determined to be intermittent jamming, and a prompt to check the waste discharge system is output; when the first frequency threshold is less than the second frequency threshold and the switching frequency is between the two, a status monitoring prompt is output.