A Machine Vision-Based Method and System for Defect Detection of Electric Vehicle Shock Absorbers
By using machine vision and data fusion technology, the problem of insufficient correlation between surface defects and dynamic performance of shock absorbers has been solved, achieving high-precision defect detection and risk warning, and improving the automation and accuracy of detection.
Patent Information
- Application Number
- CN202511158362.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-19
AI Technical Summary
Existing technologies cannot effectively establish an accurate correlation between surface defects and dynamic balance performance of shock absorbers, resulting in detection results that rely on human experience, lack automation and quantitative analysis, and fail to achieve high-precision defect detection.
A machine vision-based approach is adopted to acquire initial images under multi-angle light sources through high-resolution imaging acquisition equipment. After denoising and filtering, defect classification and spatial distribution analysis are performed. Combined with vibration amplitude acquisition and spectrum analysis, performance parameter vectors are constructed, and defect assessment is achieved through data fusion and correlation prediction models.
It realizes cross-domain correlation analysis between shock absorber defects and dynamic performance, improves the accuracy of defect cause determination, reduces the misjudgment rate under complex working conditions, establishes a full-dimensional defect assessment system, and provides a closed-loop decision chain from defect identification to service risk warning.
Smart Images

Figure CN120668682B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of shock absorber defect detection technology, and in particular to a machine vision-based method and system for detecting defects in electric vehicle shock absorbers. Background Art
[0002] Currently, electric vehicles, as a core tool of new energy transportation, directly impact driving safety and user experience through their dynamic balance performance. The structural integrity of the shock absorber is a key factor determining the overall vehicle dynamic balance. With the expansion of the electric vehicle market and the increasing performance requirements, the limitations of traditional testing methods are becoming increasingly apparent: manual visual inspection is easily influenced by subjective factors, and testing standards are difficult to standardize; single-parameter monitoring lacks in-depth analysis of the root causes of defects, making it impossible to establish an accurate correlation between defect types and fluctuations in dynamic balance performance. The core challenge currently facing technology lies in the complex and diverse morphologies of surface defects in shock absorbers (such as cracks and wear), and the quantitative mapping relationship between their visual characteristics and dynamic balance parameters is not yet clear. Furthermore, relying solely on images or single-dimensional data is insufficient to assess the actual impact of defects on performance. Therefore, constructing a comprehensive testing system that integrates surface image features and dynamic balance parameters, and overcoming the technical barriers of heterogeneous data collaborative analysis and defect-performance correlation modeling, has become an urgent need for achieving intelligent and high-precision defect detection of electric vehicle shock absorbers.
[0003] In one existing technology, the surface of the shock absorber is first visually inspected. Inspectors use magnifying glasses or industrial endoscopes to observe for defects such as cracks, wear, or deformation, and judge the severity of the defects based on experience. Simultaneously, the shock absorber is mounted on a dynamic balancing test bench, and single-parameter data such as vibration amplitude and frequency response under simulated loads are collected. During the inspection, the location and morphology of surface defects are manually recorded and compared with the dynamic balancing test data. If the dynamic balance parameters exceed a preset threshold, the shock absorber is deemed to have a potential defect. However, this technology relies solely on manual observation and static threshold judgment, failing to establish a precise correlation model between surface defect characteristics and dynamic balance parameters. The final inspection results depend on the subjective experience of the inspectors and lack automated data fusion and quantitative analysis mechanisms.
[0004] Therefore, existing technologies cannot provide a basis for the quality control and performance optimization of shock absorbers. Summary of the Invention
[0005] This invention provides a machine vision-based method and system for detecting defects in electric vehicle shock absorbers, thereby providing a basis for shock absorber quality control and performance optimization.
[0006] In a first aspect, to address the aforementioned technical problems, this invention provides a machine vision-based method for detecting defects in electric vehicle shock absorbers, comprising:
[0007] An initial set of images under illumination from multiple angles is acquired using a high-resolution imaging acquisition device;
[0008] Denoising filtering is performed on the initial image set to obtain clear image data;
[0009] Based on the clear image data, defect classification and spatial distribution analysis are performed to obtain a surface feature vector containing defect type and defect spatial distribution.
[0010] Vibration amplitude and phase angle are acquired based on the surface feature vector, and a performance parameter vector is constructed through spectrum analysis.
[0011] Data fusion is performed based on the performance parameter vector and the surface feature vector to obtain fused features;
[0012] The fused features are input into a pre-built association prediction model to obtain defect prediction data;
[0013] Based on the defect prediction data, the degree of defect impact is analyzed to obtain the defect assessment results.
[0014] In one optional implementation, the step of performing denoising filtering on the initial image set to obtain clear image data includes:
[0015] Based on the initial image set, pixel noise is suppressed by a median filter. If salt-and-pepper noise interference is detected, a second smoothing and denoising operation is performed by a Gaussian filter to obtain the first preprocessed image.
[0016] Based on the first preprocessed image, the overall brightness distribution is remapped using an adaptive histogram equalization algorithm to obtain the second preprocessed image.
[0017] Based on the second preprocessed image, pixel gradient calculation is performed using the Sobel edge detection operator to identify continuous high gradient sequences and mark them as suspected crack areas, thus obtaining the third preprocessed image.
[0018] Based on the third preprocessed image set, the wear area contour is extracted by morphological opening operation to highlight crack and wear features and obtain clear image data.
[0019] In one optional implementation, the step of performing defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution includes:
[0020] Based on the clear image data, the surface area of the shock absorber is divided into pixel clusters using a watershed segmentation algorithm to obtain a pixel classification set.
[0021] The amount of grayscale value change is extracted based on the pixel classification set, and the pixel classification set in which the amount of grayscale value change exceeds the preset grayscale value change threshold is taken as the potential defect region, thus obtaining the defect region set.
[0022] Based on the set of defect regions, continuous contour delineation is performed using the Canny edge detection algorithm to extract crack boundary coordinates and wear texture shape. Combined with a pre-stored defect template library, morphological matching and classification are performed to obtain a set of classification features containing crack type and wear level.
[0023] Based on the classification feature set, defect boundary points are extracted and curvature analysis is performed. The defect boundary points whose curvature exceeds a preset curvature threshold are recorded and their corresponding planar coordinates are recorded to obtain the defect spatial distribution.
[0024] Based on the spatial distribution of defects, the length and width of the defect region are quantized using the minimum bounding rectangle algorithm. Combined with the classification feature set, structured data is generated to obtain a surface feature vector containing defect type, defect location, and defect size.
[0025] In one optional implementation, the step of acquiring vibration amplitude and measuring phase angle based on the surface feature vector, and constructing a performance parameter vector through spectrum analysis, includes:
[0026] Based on the surface feature vector, the shock absorber is controlled to run within a set speed range by a dynamic balancing test platform. An accelerometer is used to collect vibration amplitude, and a photoelectric encoder is used to perform phase angle measurement to obtain an initial signal set containing speed, amplitude, and phase.
[0027] Based on the initial signal set, a time-frequency conversion is performed using the Fast Fourier Transform algorithm to generate a spectrum diagram. Power spectral density analysis is used to extract the frequency response peak value synchronized with the rotational speed. When the frequency response peak value exceeds a preset frequency response threshold, abnormal frequency bands are marked, resulting in a frequency response characteristic distribution diagram of the marked abnormal frequency bands.
[0028] Based on the frequency response characteristic distribution map, the vibration waveform of the abnormal frequency band is nonlinearly time-aligned with the pre-stored fault template library using a dynamic time warping algorithm, and the waveform amplitude deviation is calculated to obtain vibration signal data containing rotational speed, frequency and waveform amplitude deviation.
[0029] Based on the vibration signal data, a spectrum diagram is generated by performing time-frequency conversion using a fast Fourier transform algorithm, and the amplitude characteristics of the preset primary and secondary frequencies are extracted to obtain the vibration signal characteristics.
[0030] Based on the vibration signal characteristics, energy is integrated for the frequency band exceeding the preset frequency threshold, and an initial performance vector is generated by combining the preset dynamic balance weighting coefficients.
[0031] Based on the initial performance vector, feature dimensionality reduction is performed using principal component analysis algorithm, and performance parameter vectors are extracted.
[0032] In one optional implementation, the step of fusing data based on the performance parameter vector and the surface feature vector to obtain fused features includes:
[0033] Based on the crack boundary coordinates, the crack morphology similarity is calculated using the Frechet distance algorithm, and the set of geometric parameters is extracted.
[0034] Based on the performance parameter vector, the intrinsic fluctuation components are extracted, and the frequency band energy integral is calculated to generate the dominant frequency features.
[0035] Based on the set of geometric parameters and the dominant frequency features, weight coefficients are assigned using the entropy weighting method, and the fused features are obtained by weighted fusion.
[0036] In one optional implementation, the process of constructing the association prediction model includes:
[0037] Obtain historical fusion features and corresponding historical defect data;
[0038] An initial association prediction model is constructed using the support vector machine algorithm. The classification boundary is initialized using the RBF kernel function, and a penalty coefficient is set to determine the tolerance error threshold.
[0039] Based on the historical fusion features, the curvature adjustment parameter of the classification boundary is calculated using the kernel density estimation method, and the curvature of the classification boundary is dynamically adjusted through the RBF kernel function.
[0040] Based on the historical defect data, the penalty coefficient is optimized using a grid search method to determine the error tolerance threshold;
[0041] Cross-validate the adjusted classification boundaries and calculate the set of classification accuracy and error distribution after boundary adjustment;
[0042] When the error distribution set exceeds the error tolerance threshold, the gradient descent method is used to re-optimize the curvature parameter of the classification boundary, and the classification boundary is iteratively updated until the error distribution set does not exceed the error tolerance threshold.
[0043] By using RBF kernel function mapping, the optimized classification boundary is matched with the defect data in a multi-dimensional space to determine the hyperplane equation corresponding to each defect data.
[0044] Based on the time series characteristics of the historical defect data, the sliding window method is used to extract the dynamic trend parameters of the defect data changes. The dynamic trend parameters are then correlated with the hyperplane equation to construct the final correlation prediction model.
[0045] In one optional implementation, the step of analyzing the degree of defect impact based on the defect prediction data to obtain the defect assessment result includes:
[0046] Based on the defect prediction data, a matching operation is performed using a pre-stored historical defect-performance degradation mapping library to obtain a baseline performance degradation reference value.
[0047] The defect prediction data includes defect type encoding, location coordinate set, size parameter vector, and performance interference coefficient.
[0048] Based on the performance interference coefficient and the reference value of the baseline performance attenuation, and combined with the pre-stored material hardness of the shock absorber, a finite element stress simulation analysis is performed to obtain the stress and damping performance attenuation in the defect area.
[0049] Based on the stress in the defect area and the damping performance attenuation, a risk level is determined. If the stress in the defect area exceeds a preset material yield strength threshold or the damping performance attenuation exceeds a preset dynamic balance tolerance threshold, a high-risk indicator is output, and a defect assessment result containing the defect location, size, risk level, and damping performance attenuation is finally generated.
[0050] Secondly, the present invention provides a machine vision-based electric vehicle shock absorber defect detection system, comprising:
[0051] The data acquisition module is used to acquire an initial set of images under illumination from multiple angles using a high-resolution imaging acquisition device;
[0052] The image filtering module is used to perform noise reduction filtering processing on the initial image set to obtain clear image data;
[0053] The surface feature module is used to perform defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution.
[0054] The performance parameter module is used to perform vibration amplitude acquisition and phase angle measurement operations based on the surface feature vector, and to perform spectrum analysis to construct the performance parameter vector;
[0055] The feature fusion module is used to perform data fusion based on the performance parameter vector and the surface feature vector to obtain fused features;
[0056] The defect prediction module is used to input the fused features into a pre-built association prediction model to obtain defect prediction data;
[0057] A defect assessment module is used to analyze the degree of defect impact based on the defect prediction data and obtain a defect assessment result. Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the machine vision-based electric vehicle shock absorber defect detection method described in any one of the preceding embodiments.
[0058] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the machine vision-based electric vehicle shock absorber defect detection method described above.
[0059] Compared with the prior art, the present invention has the following beneficial effects:
[0060] (1) The weighted fusion of surface feature vector and performance parameter vector (vibration spectrum / energy ratio) is adopted. The weight coefficients of geometric features and frequency features are allocated by entropy weight method to solve the problem of insufficient analysis of performance degradation correlation in traditional pure visual inspection. This enables cross-domain correlation analysis of surface defects and dynamic performance, and improves the accuracy of defect cause determination.
[0061] (2) By dynamically adjusting the curvature of the classification boundary through the RBF kernel function, and combining the grid search method to optimize the penalty coefficient and the gradient descent method to iteratively update the parameters, the traditional support vector machine is overcome by overcoming the rigidity of classification in time-varying vibration data, so as to realize the autonomous adaptation of the defect prediction model to the characteristics of real-time vibration signals and reduce the misjudgment rate under complex working conditions.
[0062] (3) Based on the Frechet distance algorithm, the crack morphology similarity is quantified, the power spectral density analysis is combined to extract the energy ratio of abnormal frequency bands, and the fault waveform template is matched by the dynamic time warping algorithm to solve the problem of insufficient mining of the correlation between defect geometric features and vibration response by traditional methods, and to establish a full-dimensional defect assessment system across the visual-vibration domain.
[0063] (4) By quantifying the stress distribution in the defect area through finite element stress simulation, and combining the historical defect-performance degradation mapping library with the dynamic equilibrium tolerance threshold, the material yield strength is used as the high-risk judgment benchmark to solve the problem of inaccurate prediction of hidden performance degradation by traditional manual sampling inspection, and realize a closed-loop decision chain from defect identification to service risk warning. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the process for detecting defects in electric vehicle shock absorbers based on machine vision, provided in the first embodiment of the present invention.
[0065] Figure 2 This is a schematic diagram of the structure of the electric vehicle shock absorber defect detection system based on machine vision provided in the second embodiment of the present invention. Detailed Implementation
[0066] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0067] Reference Figure 1 The first embodiment of the present invention provides a machine vision-based method for detecting defects in electric vehicle shock absorbers, comprising the following steps:
[0068] S11, acquires an initial set of images under illumination from multiple angles using a high-resolution imaging acquisition device;
[0069] S12, perform noise reduction filtering processing on the initial image set to obtain clear image data;
[0070] S13, perform defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution;
[0071] S14, based on the surface feature vector, perform vibration amplitude acquisition and phase angle measurement operations, and perform spectrum analysis to construct a performance parameter vector;
[0072] S15, perform data fusion based on the performance parameter vector and the surface feature vector to obtain fused features;
[0073] S16, The fused features are input into a pre-built association prediction model to obtain defect prediction data;
[0074] S17. Based on the defect prediction data, perform defect impact analysis to obtain defect assessment results.
[0075] In step S11, an initial set of images under illumination from multiple angles is acquired using a high-resolution imaging acquisition device.
[0076] Specifically, an industrial-grade high-resolution CMOS camera is used as the imaging device, coupled with a programmable ring light source array. This array includes a vertically illuminating top light source, an obliquely illuminating side light source, and a penetrating bottom light source. The vibration damper sample is fixed on a three-dimensional motorized rotary table, and the controller synchronously coordinates the rotary table's step angle and the light source switching sequence. The rotary table rotates the vibration damper at fixed step angles (e.g., 30°), triggering a light source switch every time it rotates to a preset specific angle position (e.g., 0°, 120°, 240°). At each angle position, three light source modes are activated sequentially: the top light source provides vertical illumination to acquire surface morphology features; the side light source provides oblique incidence to enhance texture contrast (e.g., crack shadows); and the bottom light source penetrates the material to detect internal structural anomalies (e.g., pore defects). The camera acquires a single frame image in each light source mode, and multiple original images are generated in a single rotation cycle to form an initial image set. The camera exposure time is dynamically adjusted based on the material's reflective properties (e.g., by monitoring the average grayscale value of the image in real time through a light-sensing feedback mechanism; when the grayscale value is higher than a preset upper threshold (e.g., >200), the exposure time is automatically shortened (e.g., reduced to 20ms); when the grayscale value is lower than a preset lower threshold (e.g., <50), the exposure time is automatically extended (e.g., increased to 80ms) to maintain the image grayscale within a stable range (e.g., 60-180)). The light source intensity threshold is determined through a pre-calibration process: based on a standard defect-free sample, a specific signal-to-noise ratio level (e.g., ≥40dB) is used as the illumination reference, and the light source power is iteratively adjusted until the signal-to-noise ratio requirement is met. Multi-angle collaborative imaging overcomes the detection limitations of a single light source; for example, lateral light can highlight surface microstructure features (e.g., cracks) within a specific depth range (e.g., depth ≥0.1mm), while penetrating light can identify internal anomalies (e.g., pores) of a specific size (e.g., diameter ≥0.5mm).
[0077] In step S12, noise reduction filtering is performed on the initial image set to obtain clear image data.
[0078] In one specific implementation, the step of performing denoising filtering on the initial image set to obtain clear image data includes:
[0079] Based on the initial image set, pixel noise is suppressed by a median filter. If salt-and-pepper noise interference is detected, a second smoothing and denoising operation is performed by a Gaussian filter to obtain the first preprocessed image.
[0080] Based on the first preprocessed image, the overall brightness distribution is remapped using an adaptive histogram equalization algorithm to obtain the second preprocessed image.
[0081] Based on the second preprocessed image, pixel gradient calculation is performed using the Sobel edge detection operator to identify continuous high gradient sequences and mark them as suspected crack areas, thus obtaining the third preprocessed image.
[0082] Based on the third preprocessed image set, the wear area contour is extracted by morphological opening operation to highlight crack and wear features and obtain clear image data.
[0083] Specifically, the initial image set is first subjected to median filtering: a 3×3 pixel window is used to traverse each image, and the median of the pixel gray values within the window is used to replace the center pixel value after sorting the pixel gray values to suppress impulse noise (typically black and white noise). If the gray standard deviation of a certain image region exceeds a preset threshold (determined by statistical analysis of historical noise samples), it is determined that salt-and-pepper noise interference exists, and a Gaussian filtering operation is added: a 5×5 Gaussian convolution kernel is used to weight the pixel values (the weights within the kernel follow a normal distribution) to achieve secondary smoothing and denoising, and the first preprocessed image is output.
[0084] Adaptive histogram equalization is performed based on the first preprocessed image: the image is divided into several local blocks (the block size is dynamically set according to the image resolution), the gray-level histogram of each block is calculated independently and the cumulative distribution function is mapped to eliminate the effects of uneven illumination (such as overexposed areas caused by local reflections), so that the overall brightness distribution is uniform, and the second preprocessed image is output.
[0085] The second preprocessed image is processed using the Sobel edge detection operator: the horizontal gradient value Gx (horizontal convolution kernel) and the vertical gradient value Gy (vertical convolution kernel) are calculated separately. The gradient values in these two directions for each pixel are squared and summed, and then the square root of the sum is taken. This calculation process generates the pixel gradient magnitude for each pixel. The entire image is scanned to identify continuous high-gradient sequences (gradient magnitude exceeding an empirical threshold and ≥5 consecutive pixels), which are marked as suspected crack regions (such as linear high-gradient bands), and the third preprocessed image is output.
[0086] Finally, morphological opening operations are performed on the third preprocessed image set: circular structuring elements (radius set according to the minimum defect size) are first used for erosion to eliminate minor noise, and then dilation is performed to restore the effective region contour. The focus is on extracting wear area features (such as irregular depressions) and enhancing crack continuity (such as fracture edge repair), outputting clear image data containing prominent defect features.
[0087] In step S13, defect classification and spatial distribution analysis are performed based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution.
[0088] In one specific implementation, the step of performing defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution includes:
[0089] Based on the clear image data, the surface area of the shock absorber is divided into pixel clusters using a watershed segmentation algorithm to obtain a pixel classification set.
[0090] The amount of grayscale value change is extracted based on the pixel classification set, and the pixel classification set in which the amount of grayscale value change exceeds the preset grayscale value change threshold is taken as the potential defect region, thus obtaining the defect region set.
[0091] Based on the set of defect regions, continuous contour delineation is performed using the Canny edge detection algorithm to extract crack boundary coordinates and wear texture shape. Combined with a pre-stored defect template library, morphological matching and classification are performed to obtain a set of classification features containing crack type and wear level.
[0092] Based on the classification feature set, defect boundary points are extracted and curvature analysis is performed. The defect boundary points whose curvature exceeds a preset curvature threshold are recorded and their corresponding planar coordinates are recorded to obtain the defect spatial distribution.
[0093] Based on the spatial distribution of defects, the length and width of the defect region are quantized using the minimum bounding rectangle algorithm. Combined with the classification feature set, structured data is generated to obtain a surface feature vector containing defect type, defect location, and defect size.
[0094] Specifically, firstly, using clear image data as input, the watershed segmentation algorithm is employed to cluster pixels on the surface of the shock absorber. This algorithm characterizes the drastic change in brightness by calculating the gradient value of each pixel in the image. Specifically, the Sobel operator is used to calculate the gradient components of each pixel in the horizontal and vertical directions: for the horizontal gradient, the brightness values of the pixel and its surrounding neighborhood (usually a 3x3 area) are multiplied at corresponding positions by a horizontal edge detection template (the center column of this template is zero, the left column is negative, and the right column is positive), and then summed to obtain the brightness change of the pixel in the horizontal direction; similarly, for the vertical gradient, the brightness values of the pixel's neighborhood are multiplied at corresponding positions by a specific vertical edge detection template (the center row of this template is zero, the upper row is negative, and the lower row is positive), and then summed to obtain the brightness change of the pixel in the vertical direction. Next, the calculated horizontal and vertical gradient values are squared and added together, and the square root of the sum is taken to obtain the overall gradient magnitude of the pixel. Because of the significant brightness step change in the crack edge region, its comprehensive gradient amplitude is usually more than twice that of the normal surface region (for example, the average gradient amplitude of the normal region is about 5, while that of the crack edge can be more than 15).
[0095] The algorithm uses points where the gradient magnitude is a local minimum as initial seed regions. The threshold for determining these gradient magnitude minimum points is based on a standard defect-free shock absorber surface image: First, the average gradient magnitude and its standard deviation of all pixels in the defect-free sample image are calculated, and the threshold is set to the average gradient magnitude minus N times the standard deviation (e.g., N=1.5, corresponding to a gradient magnitude threshold of approximately 5). Then, the region is expanded based on the similarity of gray values between adjacent pixels: the tolerance range for gray value differences is set to 1.2 times the maximum observed difference in the gray-level uniformity test of the defect-free shock absorber surface (e.g., if the measured maximum difference is 6 gray levels, the tolerance range is set to ±7 gray levels). Starting from the seed region, the algorithm gradually expands outward, merging adjacent pixels that meet the similarity condition, ultimately forming independent connected regions. After this process is completed, the output is a pixel classification set containing multiple such independent regions.
[0096] Next, each connected region in the pixel classification set is traversed, and the absolute difference between the average gray value inside the region and the average gray value of the surrounding background region is calculated as the gray value change. If the difference exceeds a preset gray value change threshold (which is determined by the statistical distribution characteristics of defect-free samples), the connected region is marked as a potential defect region, and the results are summarized to form a defect region set.
[0097] Subsequently, Canny edge detection is performed on the defect region set: First, a Gaussian filter is used to smooth the image to eliminate noise interference (e.g., using a 5x5 Gaussian kernel with a standard deviation of 1.5); then, the gradient magnitude and direction of each pixel are calculated (also using the Sobel operator); then, non-maximum gradient suppression is performed, retaining only pixels with local maxima in the gradient direction; finally, dual thresholding is performed to extract continuous contour lines: a high threshold and a low threshold are set, where the high threshold is 70% of the maximum gradient magnitude in the image, and the low threshold is 30% of the maximum gradient magnitude in the image. Pixels with gradient magnitudes greater than the high threshold are identified as strong edge points, and pixels with gradient magnitudes between the low and high thresholds are identified as weak edge points, which are only retained when a weak edge point is directly connected to a strong edge point. The output is a crack boundary coordinate sequence (e.g., a sequence composed of point coordinates) and a binarized texture shape of the wear area. The result is matched with a pre-stored defect template library (containing typical crack morphology and wear patterns): by calculating the similarity of the contour shape and the matching degree of the texture features (determined according to the preset classification threshold), the crack type code (e.g., 01 represents radial crack) and wear level (e.g., 1 represents mild wear) are output to form a set of classification features containing defect type and level.
[0098] Furthermore, the coordinate sequence of defect boundary points is extracted from the classification feature set. Points are taken along the boundary at fixed intervals, and the local curvature value (reflecting the degree of boundary curvature) of each point is calculated. If the curvature value exceeds a preset curvature threshold (which is set based on the material's resistance to stress concentration), the planar coordinates of that point are recorded. All high curvature points constitute a spatial distribution dataset describing the key morphology of the defect.
[0099] Finally, based on the defect spatial distribution dataset, the minimum bounding rectangle algorithm is applied to each defect region: finding the smallest rectangle that can completely enclose the defect point, and outputting its center coordinates, length, and width. These geometric parameters are then integrated with the defect type encoding and wear level from the classification feature set according to a predefined structure (including defect type, center x-coordinate, center y-coordinate, length, width, and wear level) to generate a structured surface feature vector.
[0100] This step precisely quantifies the geometric features of defects through watershed segmentation and curvature analysis (e.g., high curvature points correspond to stress concentration areas at crack tips), and combines this with morphological matching to achieve automated defect classification, significantly reducing the rate of missed detection of microcracks by manual visual inspection. The generated surface feature vector contains key parameters such as defect location, size, and type, providing a spatial reference for subsequent vibration performance correlation analysis. For example, the defect center coordinates are directly used to locate the finite element stress simulation region, and the defect length parameter participates in the crack propagation risk assessment calculation, forming a closed-loop analysis basis from visual features to performance prediction.
[0101] In step S14, vibration amplitude acquisition and phase angle measurement are performed based on the surface feature vector, and spectrum analysis is performed to construct a performance parameter vector.
[0102] In one specific implementation, the step of acquiring vibration amplitude and measuring phase angle based on the surface feature vector, and constructing a performance parameter vector through spectrum analysis, includes:
[0103] Based on the surface feature vector, the shock absorber is controlled to run within a set speed range by a dynamic balancing test platform. An accelerometer is used to collect vibration amplitude, and a photoelectric encoder is used to perform phase angle measurement to obtain an initial signal set containing speed, amplitude, and phase.
[0104] Based on the initial signal set, a time-frequency conversion is performed using the Fast Fourier Transform algorithm to generate a spectrum diagram. Power spectral density analysis is used to extract the frequency response peak value synchronized with the rotational speed. When the frequency response peak value exceeds a preset frequency response threshold, abnormal frequency bands are marked, resulting in a frequency response characteristic distribution diagram of the marked abnormal frequency bands.
[0105] Based on the frequency response characteristic distribution map, the vibration waveform of the abnormal frequency band is nonlinearly time-aligned with the pre-stored fault template library using a dynamic time warping algorithm, and the waveform amplitude deviation is calculated to obtain vibration signal data containing rotational speed, frequency and waveform amplitude deviation.
[0106] Based on the vibration signal data, a spectrum diagram is generated by performing time-frequency conversion using a fast Fourier transform algorithm, and the amplitude characteristics of the preset primary and secondary frequencies are extracted to obtain the vibration signal characteristics.
[0107] Based on the vibration signal characteristics, energy is integrated for the frequency band exceeding the preset frequency threshold, and an initial performance vector is generated by combining the preset dynamic balance weighting coefficients.
[0108] Based on the initial performance vector, feature dimensionality reduction is performed using principal component analysis algorithm, and performance parameter vectors are extracted.
[0109] Specifically, based on the defect location coordinates recorded in the surface feature vector, the vibration damper is controlled by a dynamic balancing test platform to operate within a preset speed range (e.g., 800-3000 rpm) covering its rated operating range, and the speed is increased in fixed steps (e.g., 100 rpm). An acceleration sensor is installed at a designated location on the vibration damper surface (located according to the defect coordinates) to collect vibration amplitude data in real time; simultaneously, a photoelectric encoder is used to measure the rotational phase angle, generating an initial signal set containing speed, amplitude, and phase angle values.
[0110] A Fast Fourier Transform (FFT) is performed on the initial signal set to convert the time-domain vibration signal into a frequency-domain signal, generating a spectrum. Power spectral density analysis is used to extract the frequency response peaks synchronized with the rotational speed (e.g., fundamental frequency amplitude A1, second harmonic amplitude A2). If a frequency response peak exceeds a preset frequency response threshold (this threshold is set based on the maximum permissible vibration amplitude of a defect-free sample at the same rotational speed), the frequency band is marked as an abnormal frequency band, and a frequency response characteristic distribution map of the marked abnormal frequency band is output.
[0111] For the marked abnormal frequency bands, corresponding waveform segments are extracted from the time-domain vibration signal. Using a dynamic time warping algorithm, this waveform segment is nonlinearly aligned with a typical fault template library (containing typical fault waveforms such as imbalance and misalignment) generated by clustering multiple sets of vibration waveform data collected from standard faulty components at corresponding speeds. This alignment involves stretching or compressing the time axis to achieve a minimum path distance match between the measured waveform and the template waveform. The absolute deviation of the aligned waveform amplitude relative to the template is calculated, generating vibration signal data containing speed values, abnormal frequency values, and waveform amplitude deviation values.
[0112] A Fast Fourier Transform is performed again on the vibration signal data to extract the amplitude features of preset primary and secondary frequencies (such as fundamental frequency, second harmonic, and third harmonic), resulting in vibration signal features composed of amplitudes at key frequency points. Based on these features, the proportion of frequency band energy exceeding a preset frequency threshold (e.g., high-frequency bands greater than 1 kHz) to the total energy is calculated. This proportion is then weighted and combined with preset dynamic balance weighting coefficients (allocated according to rotor dynamic characteristics) to generate an initial performance vector (e.g., [high-frequency energy proportion 0.35, fundamental frequency amplitude deviation 0.12, second harmonic amplitude deviation 0.08]).
[0113] Finally, principal component analysis (PCA) is used to reduce the dimensionality of the initial performance vector: the variance contribution rate of each feature dimension is calculated, the principal component components with a cumulative contribution rate of more than 85% are retained, and the dimensionality-reduced performance parameter vector is extracted.
[0114] This step utilizes dual spectral analysis combined with dynamic waveform matching to accurately extract vibration features strongly correlated with defects. The first Fast Fourier Transform (FFT) locates anomalous frequency bands, and dynamic time warping eliminates waveform distortion caused by rotational speed fluctuations, ensuring the comparability of fault features. The second FFT focuses on the amplitudes of primary and secondary frequencies, supplemented by high-frequency energy proportion to quantify the distribution of anomalous vibration energy. Finally, principal component analysis eliminates redundant dimensions, allowing the performance parameter vector to centrally characterize the core vibration modes induced by defects. The generated performance parameter vector directly correlates with the degree of interference of defects on dynamic balance performance; for example, the high-frequency energy proportion effectively reflects the nonlinear vibration phenomena induced by cracks, providing quantitative performance indicators for subsequent cross-domain fusion of surface features and laying the data foundation for defect-performance correlation modeling.
[0115] In step S15, data fusion is performed based on the performance parameter vector and the surface feature vector to obtain fused features.
[0116] In one specific implementation, the step of fusing data based on the performance parameter vector and the surface feature vector to obtain fused features includes:
[0117] Based on the crack boundary coordinates, the crack morphology similarity is calculated using the Frechet distance algorithm, and the set of geometric parameters is extracted.
[0118] Based on the performance parameter vector, the intrinsic fluctuation components are extracted, and the frequency band energy integral is calculated to generate the dominant frequency features.
[0119] Based on the set of geometric parameters and the dominant frequency features, weight coefficients are assigned using the entropy weighting method, and the fused features are obtained by weighted fusion.
[0120] Specifically, the crack boundary coordinate sequence (denoted as the coordinate point set P) is extracted from the surface feature vector. The similarity between the crack morphology and the corresponding template in the pre-stored standard crack template library is calculated using the Frechet distance algorithm. The standard crack template library is constructed based on typical crack samples (such as radial cracks and circumferential cracks) confirmed by metallographic testing: the coordinate point set of the crack profile is obtained by high-precision laser scanning, and stored as a reference template after smoothing filtering and key point sampling. The algorithm iterates through the Euclidean distances between all corresponding points on two curves, takes the maximum value of these distances as the morphological difference measure, and extracts the crack length value (obtained by accumulating the distances of adjacent boundary points) and the boundary fractal dimension value—this value is calculated by box counting: the crack boundary profile is covered with square grids of different side lengths, and the logarithmic slope of the minimum number of grids required to cover the profile is recorded as a function of the grid side length. The larger the slope value, the higher the irregularity of the profile (for example, the fractal dimension of fatigue cracks is usually greater than 1.3), forming a set of geometric parameters (including crack length and fractal dimension).
[0121] Extracting intrinsic wave components from the performance parameter vector: The vibration signal is decomposed into multiple intrinsic mode functions using an empirical mode decomposition algorithm, and the component with the highest energy proportion is selected as the core wave component. The energy integral value of this component in a preset frequency band (e.g., 1-2kHz) is calculated to generate the dominant frequency feature (including the core component energy value and the frequency band energy value).
[0122] The set of geometric parameters and the dominant frequency features are merged into an initial feature matrix, and weight coefficients are automatically assigned using the entropy weighting method: First, the information entropy value of each feature dimension is calculated (based on the dispersion of the feature value distribution), and features with smaller entropy values are assigned higher weights; weight coefficients are calculated based on the inverse relationship of entropy values (e.g., crack length weight coefficient 0.3, frequency band energy weight coefficient 0.4); finally, the feature values are weighted and linearly fused according to the weights, and the fused feature is output (e.g., 0.3 × crack length + 0.4 × frequency band energy + weighted sum of other features).
[0123] This step precisely quantifies the deviation between the crack geometry and the standard template using Frechet distance (e.g., an increased fractal dimension indicates a higher risk of crack propagation), and combines this with the frequency band energy integral of the vibration eigencomponents (e.g., a surge in high-frequency energy reflects the nonlinear response induced by the crack), overcoming the limitations of traditional single-dimensional feature analysis. The entropy weighting method dynamically assigns weights based on the information content of the features themselves, avoiding subjective experience bias and ensuring that the fused features simultaneously cover the strong correlation between geometric defect characteristics and dynamic performance degradation (e.g., high-weighted frequency band energy directly correlates with damping performance degradation prediction), providing a comprehensive input across the visual-vibration domain for subsequent defect prediction models.
[0124] In step S16, the fused features are input into a pre-built association prediction model to obtain defect prediction data.
[0125] In one specific implementation, the process of constructing the association prediction model includes:
[0126] Obtain historical fusion features and corresponding historical defect data;
[0127] An initial association prediction model is constructed using the support vector machine algorithm. The classification boundary is initialized using the RBF kernel function, and a penalty coefficient is set to determine the tolerance error threshold.
[0128] Based on the historical fusion features, the curvature adjustment parameter of the classification boundary is calculated using the kernel density estimation method, and the curvature of the classification boundary is dynamically adjusted through the RBF kernel function.
[0129] Based on the historical defect data, the penalty coefficient is optimized using a grid search method to determine the error tolerance threshold;
[0130] Cross-validate the adjusted classification boundaries and calculate the set of classification accuracy and error distribution after boundary adjustment;
[0131] When the error distribution set exceeds the error tolerance threshold, the gradient descent method is used to re-optimize the curvature parameter of the classification boundary, and the classification boundary is iteratively updated until the error distribution set does not exceed the error tolerance threshold.
[0132] By using RBF kernel function mapping, the optimized classification boundary is matched with the defect data in a multi-dimensional space to determine the hyperplane equation corresponding to each defect data.
[0133] Based on the time series characteristics of the historical defect data, the sliding window method is used to extract the dynamic trend parameters of the defect data changes. The dynamic trend parameters are then correlated with the hyperplane equation to construct the final correlation prediction model.
[0134] Specifically, in the implementation of the correlation prediction model, the historical fusion feature dataset (containing a set of geometric parameters such as crack length and fractal dimension generated from crack boundary coordinates, as well as dominant frequency features such as core fluctuation component energy value and frequency band energy integral value extracted from performance parameter vectors) and corresponding historical defect data (including defect type encoding, location coordinate set, size parameter vector, and performance interference coefficient) are first obtained. An initial model framework is established using the support vector machine algorithm, and the classification boundary is initialized through radial basis function kernel functions: using historical fusion features as input vectors and historical defect type encodings as classification labels, an initial penalty coefficient (set to a range of 0.1-10) is used to control the classification error tolerance threshold (e.g., initially setting a maximum allowable classification error rate of 5%).
[0135] Based on the spatial distribution characteristics of historical fusion features, a kernel density estimation operation is performed: traversing each feature dimension (such as crack length and frequency band energy value), the density value of data points within a unit area surrounding each coordinate point in the feature space is calculated. When the density value of a certain area exceeds a preset density threshold (determined by the statistical quantile of the feature value distribution), the width parameter of the radial basis function kernel function in that area is increased (e.g., from 0.5 to 1.0) to increase the curvature of the classification boundary to fit the high-density data cluster; conversely, in low-density areas (density values below the lower limit of the statistical quantile), the width parameter is decreased (e.g., from 0.5 to 0.2) to reduce the boundary curvature and avoid overfitting.
[0136] Based on the actual classification results of historical defect data, the penalty coefficient is optimized using a grid search method: values are iterated within a preset coefficient range (0.1-10) with a step size of 0.1. Each iteration performs 10-fold cross-validation, calculating the classification accuracy and high-risk defect false negative rate (e.g., the proportion of cracks misclassified as no defects) under each penalty coefficient. The penalty coefficient that minimizes the high-risk defect false negative rate (e.g., ≤2%) and maximizes the overall accuracy (e.g., ≥95%) is selected as the optimal value, and the error tolerance threshold is updated synchronously (e.g., the high-risk defect false negative rate threshold is set to 2%). Cross-validation is performed on the curvature-adjusted classification boundary. If the high-risk defect false negative rate in the error distribution set exceeds 2%, gradient descent is used for iterative optimization: the classification error rate is used as the loss function, and the partial derivative of the loss function with respect to the width parameter of the radial basis function kernel function is calculated. The width parameter is updated along the gradient descent direction (e.g., adjusted from 0.8 to 0.7), and validation is repeated until the high-risk defect false negative rate is ≤2%.
[0137] After parameter optimization, the defect data is transformed into a high-dimensional space using radial basis function kernel mapping: for each historical defect data point (e.g., a feature vector containing a crack length of 3.2 mm and a frequency band energy value of 0.45), the kernel function distance (e.g., Gaussian distance) between it and the support vectors is calculated, and the optimal classification hyperplane equation is solved (e.g., the crack class hyperplane equation is a linear combination of the weight vector and the feature vector equal to the offset). Finally, considering the temporal continuity of the historical defect data, a sliding window method with a fixed window size (set to 30 days based on the data acquisition cycle) is adopted: the defect size parameter vector is extracted in chronological order within a continuous window, and the linear regression slope of the crack length within the window is calculated as a dynamic trend parameter (e.g., monthly expansion of 0.15 mm). This dynamic expansion rate parameter is combined with the hyperplane equation to construct a final prediction model that integrates static classification and dynamic evolution.
[0138] In the construction of the association prediction model, the specific method for dynamically adjusting the curvature of the classification boundary through the radial basis function kernel function is as follows: Based on the historical fusion feature dataset (including geometric parameters such as crack length and fractal dimension, and dominant frequency features such as frequency band energy values), the density distribution values of each region in the feature space are calculated using a kernel density estimation algorithm. When the density value of a certain region exceeds the density threshold determined by the statistical quantiles of historical data, the width parameter of the radial basis function kernel function in that region is automatically increased, so that the curvature of the classification boundary is increased to tightly surround the high-density data clusters (e.g., the width parameter is increased from the baseline value of 0.5 to 0.7); conversely, the width parameter is decreased in the low-density region (e.g., from 0.5 to 0.3) to reduce the boundary curvature and prevent overfitting. This operation enables the classification boundary to adaptively deform according to the data distribution characteristics, solving the problem of classification response lag caused by the time-varying characteristics of vibration signals in traditional models (e.g., significantly improving the fluctuation of classification accuracy when the rotational speed changes abruptly).
[0139] In step S17, the degree of defect impact is analyzed based on the defect prediction data to obtain the defect assessment result.
[0140] In one specific implementation, the step of analyzing the degree of defect impact based on the defect prediction data to obtain the defect assessment result includes:
[0141] Based on the defect prediction data, a matching operation is performed using a pre-stored historical defect-performance degradation mapping library to obtain a baseline performance degradation reference value.
[0142] The defect prediction data includes defect type encoding, location coordinate set, size parameter vector, and performance interference coefficient.
[0143] Based on the performance interference coefficient and the reference value of the baseline performance attenuation, and combined with the pre-stored material hardness of the shock absorber, a finite element stress simulation analysis is performed to obtain the stress and damping performance attenuation in the defect area.
[0144] Based on the stress in the defect area and the damping performance attenuation, a risk level is determined. If the stress in the defect area exceeds a preset material yield strength threshold or the damping performance attenuation exceeds a preset dynamic balance tolerance threshold, a high-risk indicator is output, and a defect assessment result containing the defect location, size, risk level, and damping performance attenuation is finally generated.
[0145] Specifically, using defect prediction data as input (including defect type codes such as crack type code 01, location coordinate sets such as crack center point coordinates [x,y], size parameter vectors such as crack length 3.2mm and width 0.5mm, and performance interference coefficients such as vibration frequency band energy proportion 0.35), a matching operation is performed by querying a pre-stored historical defect-performance degradation mapping library. This mapping library is constructed based on historical experimental data (for example, using the average performance degradation corresponding to defect samples with the same type code and size within ±10% error range as a benchmark), and outputs the benchmark performance degradation reference value for the current defect (such as a damping performance degradation reference value of 15%).
[0146] Combining the pre-stored material hardness values of the shock absorber (such as the hardness value of spring steel HRC52), finite element stress simulation analysis is adopted: the simulation area mesh is defined by the set of defect location coordinates and the size parameter vector, and the performance interference coefficient is used as the boundary condition load (for example, the frequency band energy ratio of 0.35 is converted into an equivalent dynamic stress load). By solving the material constitutive equation (using Hooke's law and the damping dissipation model), the maximum stress value (such as the stress peak of 380MPa) and the damping performance attenuation (such as the actual attenuation of 18%) in the defect area are calculated.
[0147] In the risk level determination stage, the stress value of the defect area is compared with the material yield strength threshold (this threshold is obtained from the standard material mechanical property table based on the material hardness value, such as the yield strength threshold of 355MPa for spring steel). Simultaneously, the damping performance attenuation is compared with the dynamic balance tolerance threshold (this threshold is determined statistically through dynamic balancing bench testing, such as a maximum allowable attenuation of 20%). If the stress value of the defect area exceeds the preset material yield strength threshold or the damping performance attenuation exceeds the preset dynamic balance tolerance threshold, a high-risk indicator is set (e.g., risk level code "R4"). Finally, a structured defect assessment result is generated, including the fields: defect location coordinates, defect size, risk level R4, and damping performance attenuation.
[0148] By combining historical mapping databases with finite element simulations (such as algorithms that convert frequency band energy proportions into stress loads), the problem of misjudging implicit performance degradation by traditional manual experience is solved; a threshold dynamic judgment mechanism driven by material hardness (such as automatically matching yield strength thresholds based on HRC52) enables closed-loop quantitative assessment from defect characteristics to service risk levels (such as accurately predicting structural failure risks exceeding yield strength), providing data support for proactive maintenance of shock absorbers.
[0149] Reference Figure 2 The second embodiment of the present invention provides a machine vision-based electric vehicle shock absorber defect detection system, comprising:
[0150] The data acquisition module is used to acquire an initial set of images under illumination from multiple angles using a high-resolution imaging acquisition device;
[0151] The image filtering module is used to perform noise reduction filtering processing on the initial image set to obtain clear image data;
[0152] The surface feature module is used to perform defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution.
[0153] The performance parameter module is used to perform vibration amplitude acquisition and phase angle measurement operations based on the surface feature vector, and to perform spectrum analysis to construct the performance parameter vector;
[0154] The feature fusion module is used to perform data fusion based on the performance parameter vector and the surface feature vector to obtain fused features;
[0155] The defect prediction module is used to input the fused features into a pre-built association prediction model to obtain defect prediction data;
[0156] The defect assessment module is used to analyze the degree of defect impact based on the defect prediction data and obtain the defect assessment results.
[0157] It should be noted that the machine vision-based electric vehicle shock absorber defect detection device provided in this embodiment of the invention is used to execute all the process steps of the machine vision-based electric vehicle shock absorber defect detection method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0158] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a machine vision-based electric vehicle shock absorber defect detection program. When the processor executes the computer program, it implements the steps described in the various machine vision-based electric vehicle shock absorber defect detection method embodiments above, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as a machine vision-based electric vehicle shock absorber defect detection module.
[0159] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0160] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0161] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0162] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0163] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0164] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0165] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A machine vision-based method for detecting defects in electric vehicle shock absorbers, characterized in that, include: An initial set of images under illumination from multiple angles is acquired using a high-resolution imaging acquisition device; Denoising filtering is performed on the initial image set to obtain clear image data; Based on the clear image data, defect classification and spatial distribution analysis are performed to obtain a surface feature vector containing defect type and defect spatial distribution. Vibration amplitude and phase angle are acquired based on the surface feature vector, and a performance parameter vector is constructed through spectrum analysis. Data fusion is performed based on the performance parameter vector and the surface feature vector to obtain fused features; The fused features are input into a pre-built association prediction model to obtain defect prediction data; Based on the defect prediction data, the degree of defect impact is analyzed to obtain the defect assessment results; The step of acquiring vibration amplitude and measuring phase angle based on the surface feature vector, and constructing a performance parameter vector through spectrum analysis, includes: Based on the surface feature vector, the shock absorber is controlled to run within a set speed range by a dynamic balancing test platform. An accelerometer is used to collect vibration amplitude, and a photoelectric encoder is used to perform phase angle measurement to obtain an initial signal set containing speed, amplitude, and phase. Based on the initial signal set, a time-frequency conversion is performed using the Fast Fourier Transform algorithm to generate a spectrum diagram. Power spectral density analysis is used to extract the frequency response peak value synchronized with the rotational speed. When the frequency response peak value exceeds a preset frequency response threshold, abnormal frequency bands are marked, resulting in a frequency response characteristic distribution diagram of the marked abnormal frequency bands. Based on the frequency response characteristic distribution map, the vibration waveform of the abnormal frequency band is nonlinearly time-aligned with the pre-stored fault template library using a dynamic time warping algorithm, and the waveform amplitude deviation is calculated to obtain vibration signal data containing rotational speed, frequency and waveform amplitude deviation. Based on the vibration signal data, a spectrum diagram is generated by performing time-frequency conversion using a fast Fourier transform algorithm, and the amplitude characteristics of the preset primary and secondary frequencies are extracted to obtain the vibration signal characteristics. Based on the vibration signal characteristics, energy is integrated for the frequency band exceeding the preset frequency threshold, and an initial performance vector is generated by combining the preset dynamic balance weighting coefficients. Based on the initial performance vector, feature dimensionality reduction is performed using principal component analysis algorithm, and performance parameter vectors are extracted.
2. The method for detecting defects in electric vehicle shock absorbers based on machine vision according to claim 1, characterized in that, The step of performing noise reduction filtering on the initial image set to obtain clear image data includes: Based on the initial image set, pixel noise is suppressed by a median filter. If salt-and-pepper noise interference is detected, a second smoothing and denoising operation is performed by a Gaussian filter to obtain the first preprocessed image. Based on the first preprocessed image, the overall brightness distribution is remapped using an adaptive histogram equalization algorithm to obtain the second preprocessed image. Based on the second preprocessed image, pixel gradient calculation is performed using the Sobel edge detection operator to identify continuous high gradient sequences and mark them as suspected crack areas, thus obtaining the third preprocessed image. Based on the third preprocessed image set, the wear area contour is extracted by morphological opening operation to highlight crack and wear features and obtain clear image data.
3. The method for detecting defects in electric vehicle shock absorbers based on machine vision according to claim 1, characterized in that, The step of classifying and spatially analyzing defects based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution includes: Based on the clear image data, the surface area of the shock absorber is divided into pixel clusters using a watershed segmentation algorithm to obtain a pixel classification set. The amount of grayscale value change is extracted based on the pixel classification set, and the pixel classification set in which the amount of grayscale value change exceeds the preset grayscale value change threshold is taken as the potential defect region, thus obtaining the defect region set. Based on the set of defect regions, continuous contour delineation is performed using the Canny edge detection algorithm to extract crack boundary coordinates and wear texture shape. Combined with a pre-stored defect template library, morphological matching and classification are performed to obtain a set of classification features containing crack type and wear level. Based on the classification feature set, defect boundary points are extracted and curvature analysis is performed. The defect boundary points whose curvature exceeds a preset curvature threshold are recorded and their corresponding planar coordinates are recorded to obtain the defect spatial distribution. Based on the spatial distribution of defects, the length and width of the defect region are quantized using the minimum bounding rectangle algorithm. Combined with the classification feature set, structured data is generated to obtain a surface feature vector containing defect type, defect location, and defect size.
4. The method for detecting defects in electric vehicle shock absorbers based on machine vision according to claim 3, characterized in that, The step of fusing data based on the performance parameter vector and the surface feature vector to obtain fused features includes: Based on the crack boundary coordinates, the crack morphology similarity is calculated using the Frechet distance algorithm, and the set of geometric parameters is extracted. Based on the performance parameter vector, the intrinsic fluctuation components are extracted, and the frequency band energy integral is calculated to generate the dominant frequency features. Based on the set of geometric parameters and the dominant frequency features, weight coefficients are assigned using the entropy weighting method, and the fused features are obtained by weighted fusion.
5. The method for detecting defects in electric vehicle shock absorbers based on machine vision according to claim 1, characterized in that, The construction process of the association prediction model includes: Obtain historical fusion features and corresponding historical defect data; An initial association prediction model is constructed using the support vector machine algorithm. The classification boundary is initialized using the RBF kernel function, and a penalty coefficient is set to determine the tolerance error threshold. Based on the historical fusion features, the curvature adjustment parameter of the classification boundary is calculated using the kernel density estimation method, and the curvature of the classification boundary is dynamically adjusted through the RBF kernel function. Based on the historical defect data, the penalty coefficient is optimized using a grid search method to determine the error tolerance threshold; Cross-validate the adjusted classification boundaries and calculate the set of classification accuracy and error distribution after boundary adjustment; When the error distribution set exceeds the error tolerance threshold, the gradient descent method is used to re-optimize the curvature parameter of the classification boundary, and the classification boundary is iteratively updated until the error distribution set does not exceed the error tolerance threshold. By using RBF kernel function mapping, the optimized classification boundary is matched with the defect data in a multi-dimensional space to determine the hyperplane equation corresponding to each defect data. Based on the time series characteristics of the historical defect data, the sliding window method is used to extract the dynamic trend parameters of the defect data changes. The dynamic trend parameters are then correlated with the hyperplane equation to construct the final correlation prediction model.
6. The method for detecting defects in electric vehicle shock absorbers based on machine vision according to claim 1, characterized in that, The step of analyzing the degree of defect impact based on the defect prediction data to obtain the defect assessment result includes: Based on the defect prediction data, a matching operation is performed using a pre-stored historical defect-performance degradation mapping library to obtain a baseline performance degradation reference value. The defect prediction data includes defect type encoding, location coordinate set, size parameter vector, and performance interference coefficient. Based on the performance interference coefficient and the reference value of the baseline performance attenuation, and combined with the pre-stored hardness of the shock absorber material, a finite element stress simulation analysis is performed to obtain the stress and damping performance attenuation in the defect area. Based on the stress in the defect area and the damping performance attenuation, a risk level is determined. If the stress in the defect area exceeds a preset material yield strength threshold or the damping performance attenuation exceeds a preset dynamic balance tolerance threshold, a high-risk indicator is output, and a defect assessment result containing the defect location, size, risk level, and damping performance attenuation is finally generated.
7. A machine vision-based electric vehicle shock absorber defect detection system, used to implement the machine vision-based electric vehicle shock absorber defect detection method as described in any one of claims 1 to 6, characterized in that, include: The data acquisition module is used to acquire an initial set of images under illumination from multiple angles using a high-resolution imaging acquisition device; The image filtering module is used to perform noise reduction filtering processing on the initial image set to obtain clear image data; The surface feature module is used to perform defect classification and spatial distribution analysis based on the clear image data to obtain a surface feature vector containing defect type and defect spatial distribution. The performance parameter module is used to perform vibration amplitude acquisition and phase angle measurement operations based on the surface feature vector, and to perform spectrum analysis to construct the performance parameter vector; The feature fusion module is used to perform data fusion based on the performance parameter vector and the surface feature vector to obtain fused features; The defect prediction module is used to input the fused features into a pre-built association prediction model to obtain defect prediction data; The defect assessment module is used to analyze the degree of defect impact based on the defect prediction data and obtain the defect assessment results.
8. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the machine vision-based electric vehicle shock absorber defect detection method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the machine vision-based electric vehicle shock absorber defect detection method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Workpiece surface defect detection system
CN117740673A
New energy automobile part surface defect testing method based on computer vision
CN119091186A