Defect target detection method based on deep learning
By combining multi-intensity, multi-frequency scanning excitation with deep learning, the excitation parameters are dynamically selected, and the nonlinear response characteristics of the commutator are extracted. This solves the problem that existing technologies cannot identify internal defects in the commutator, and achieves efficient and high-precision non-destructive testing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DONGGUAN POLYTECHNIC
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot effectively identify potential defects that are not visible to the naked eye, such as microcracks inside the commutator and hidden inter-segment short circuits. Furthermore, the excitation mode with fixed parameters is difficult to balance detection efficiency and accuracy, and cannot meet the high-precision detection requirements in industrial scenarios.
A defect target detection method combining multi-intensity and multi-frequency scanning excitation with deep learning is adopted. By constructing a multi-dimensional response data tensor and an adaptive excitation decision network, excitation parameters are dynamically selected. Combined with high-order spectral analysis and physical field reconstruction network, nonlinear response fingerprint features are extracted for defect detection.
It enables high-precision non-destructive testing of internal defects in commutators, significantly reducing the probability of missed and false detections, improving testing efficiency and accuracy, and meeting the needs of industrial batch testing.
Smart Images

Figure CN122487503A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nondestructive testing and deep learning technologies, and more specifically, to a method for detecting defective targets based on deep learning. Background Technology
[0002] This invention belongs to the field of non-destructive testing of core motor components and deep learning. As a core component of DC motors and series motors, the internal and surface defects of the commutator directly determine the motor's operational stability and service life. Efficient and high-precision defect detection technology is the core link to ensure the production quality of the commutator and the safe operation of the motor.
[0003] Current mainstream solutions for commutator defect detection rely primarily on machine vision for visual inspection. These solutions can only identify morphological defects visible on the commutator surface and cannot detect potential defects that are not visible, such as internal microcracks or inter-segment hidden short circuits. This leads to frequent missed or false detections. Furthermore, existing non-destructive testing solutions often employ fixed-parameter excitation modes, which cannot dynamically adjust the excitation parameters based on the real-time response characteristics of the tested component. This makes it difficult to maximize the information gain of defect features and results in insufficient feature differentiation for weak potential defects. Consequently, these solutions cannot balance detection efficiency and accuracy, making them unsuitable for the batch and high-precision testing requirements in industrial settings.
[0004] To address the numerous shortcomings of the existing technologies, this invention proposes a deep learning-based defect target detection method. Summary of the Invention
[0005] In view of the shortcomings of existing technologies, the purpose of this invention is to provide a defect target detection method based on deep learning.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The deep learning-based defect detection method includes the following steps: Step 1: Multi-intensity and multi-frequency scanning excitation: Multiple sets of physical excitation pulses with different amplitudes and frequencies are sequentially applied to the commutator under test to stimulate the nonlinear response behavior of potential defects in the commutator under test. The type of physical excitation pulse is selected according to the type of defect to be detected. Step 2, Spatiotemporal response data acquisition: During each excitation application process and within the response decay period, the time-series response images of the commutator under test are continuously acquired to construct a multidimensional response data tensor containing excitation parameter dimensions, time dimensions, and spatial dimensions. Step 3, Adaptive Incentive Decision: Based on the currently collected response data, the incentive decision network built on deep reinforcement learning dynamically selects the next set of incentive parameters that can bring the maximum information gain, iteratively executes incentive application and data collection until the preset termination condition is met, and obtains the final multidimensional response data tensor. Step 4: Nonlinear fingerprint extraction and matching: Input the final multidimensional response data tensor into the preset physical field reconstruction network, extract the nonlinear response fingerprint features of each pixel position, match the measured features with the theoretical response benchmark of the defect-free state, and complete the localization and classification of defective targets.
[0007] Furthermore, in step one, an electrical excitation pulse is used for conductive defects of the commutator, and an ultrasonic vibration excitation pulse is used for mechanical defects of the commutator; the interval between two adjacent excitation pulses is not less than the relaxation time of the corresponding response of the commutator under test, to ensure that the response of the previous excitation completely decays to a steady state.
[0008] Furthermore, in step two, the acquisition device used to acquire the time-series response images is matched with the type of excitation pulse, and the acquisition time window covers the entire process from the application of the excitation to the decay of the response to a steady state; the time-series image sequences corresponding to each excitation are expanded and aligned along the excitation parameter dimension to form a multidimensional response data tensor containing spatial dimension, time dimension, excitation amplitude dimension and excitation frequency dimension.
[0009] Furthermore, in step three, when dynamically selecting excitation parameters, firstly, based on the collected response data, Gaussian process regression is used to model the distribution of the response function at each pixel position, calculate the total information entropy of the currently collected data, then estimate the information gain corresponding to each candidate excitation parameter, and select the candidate excitation parameter that can bring the maximum information gain as the next set of excitation parameters to be executed.
[0010] Furthermore, when estimating the information gain corresponding to the candidate excitation parameters, a mutual information prediction method is adopted. This method combines the distribution characteristics of the response function of each pixel position obtained by Gaussian process regression. By analyzing the correlation between the response prediction distribution corresponding to the candidate excitation parameters and the distribution of the currently collected data, the mutual information between the two is quantified, and this mutual information value is used as the estimated value of the information gain of the candidate excitation parameters.
[0011] Furthermore, the incentive decision network adopts a deep Q-network architecture, using the information entropy of the currently collected dataset, the estimated information gain of the candidate incentive parameters, and the iteration number as network inputs, and the actual information gain obtained after applying incentives as the reward function. The network is optimized through offline pre-training and online fine-tuning, and the optimal incentive parameters are output.
[0012] Furthermore, in step four, when extracting nonlinear response fingerprint features, for the time-series response signals of each pixel position under different excitation parameters, the nonlinear components in the signal are extracted through high-order spectral analysis to form a basic nonlinear fingerprint feature vector.
[0013] Furthermore, a temporal convolutional network is used to extract deep nonlinear features of the temporal response signal. The deep nonlinear features are then concatenated, fused, and standardized with the basic nonlinear fingerprint feature vector to form the final nonlinear response fingerprint features at each pixel location.
[0014] Furthermore, in step four, the theoretical response benchmark for the defect-free state is constructed based on the material properties, geometric structure, and excitation type of the commutator under test. The corresponding physical field control equations are constructed, and the theoretical response data under the defect-free state is obtained by solving the equations using the finite element method. The statistical distribution of the theoretical nonlinear response at each pixel position is obtained by combining parameter fluctuation simulation to form a matching benchmark.
[0015] Furthermore, when matching the measured nonlinear response fingerprint features extracted in step four with the theoretical response benchmark of the defect-free state, the difference between the statistical distribution of the measured nonlinear response fingerprint features and the theoretical response benchmark is first calculated to screen out candidate defect pixels. Then, a coarse matching between the candidate defect pixel features and the preset defect benchmark set is completed through a Siamese convolutional network. Based on the coarse matching result, a global optimization objective function is constructed, and the globally optimal defect type allocation result is obtained by solving the quantum annealing algorithm, thus completing the defect classification.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention abandons the traditional defect detection approach that relies on the commutator's appearance. Instead, it uses multi-intensity, multi-frequency physical excitation pulses matched with the defect type to stimulate the nonlinear response behavior of potential defects in the commutator under test. By acquiring time-series response images, a multi-dimensional response data tensor is constructed, and pixel-level nonlinear response fingerprint features are extracted to complete defect detection. This method overcomes the technical limitation of appearance inspection, which can only identify visible defects. It can effectively identify potential defects that are not visible to the outside, such as microcracks inside the commutator and hidden inter-segment short circuits. By accurately characterizing defect attributes through nonlinear response features, it significantly reduces the probability of missed and false detections of defects, and realizes non-destructive testing of all types of defects in the commutator. 2. Based on the principle of maximizing mutual information, this invention constructs a deep reinforcement learning-driven adaptive incentive decision-making mechanism. Based on the collected response data, it can complete the distribution modeling of the pixel-level response function through Gaussian process regression, predict the information gain of candidate incentive parameters, and dynamically select incentive parameters that bring the maximum information gain for iterative acquisition. This method overcomes the limitations of fixed incentive parameters and can automatically focus on the incentive conditions with the richest information according to the real-time response characteristics of the commutator under test, avoiding redundant data acquisition. At the same time, it can specifically amplify the nonlinear response characteristics of defects, significantly improve the distinguishability of weak defect features, and achieve synergistic optimization of detection efficiency and detection accuracy. Attached Figure Description
[0017] Figure 1This is a flowchart of a deep learning-based defect detection method. Figure 2 This is a flowchart illustrating the implementation of the adaptive incentive decision-making steps of the present invention. Figure 3 This is a flowchart illustrating the implementation of the nonlinear fingerprint extraction and matching steps of the present invention. Detailed Implementation
[0018] Example, refer to Figure 1 The deep learning-based defect target detection method in this embodiment specifically includes the following steps: Step 1: Multi-intensity, multi-frequency scanning excitation.
[0019] This step aims to fully excite the nonlinear response behavior of potential defects inside the commutator using a series of physical excitation pulses with different amplitudes and frequencies, providing rich excitation-response data for subsequent analysis. The specific implementation is as follows: Pre-set a set of excitation parameter combinations ,in For the first The amplitude of the excitation pulse, such as current value, voltage value, or vibration amplitude. The pulse frequency, When the pulse is applied, The pulse duration is specified; the excitation type can be selected according to the detection requirements, such as using pulsed current to excite the thermal response or using ultrasonic vibration to excite the mechanical response; when the defect is unknown, different types of excitation are applied in random order to discover all possible faults; all excitation parameters should cover a sufficiently wide dynamic range to excite the nonlinear characteristics of various defects without damaging the commutator. Pulse Amplitude Value range: If pulse current excitation is used, the value range is 0.1A~50A; if pulse voltage excitation is used, the value range is 1V~220V; if ultrasonic vibration excitation is used, the value range is 0.1μm~100μm; all parameters are lower than the commutator's rated breakdown voltage, rated current and fatigue vibration threshold to ensure that the test piece is not damaged. pulse frequency The value range is 1Hz~1MHz, where thermal response excitation corresponds to 1Hz~10kHz and mechanical vibration excitation corresponds to 10kHz~1MHz; Pulse duration The value range is 10μs~10s, matching the pulse frequency, and the duration of a single pulse does not exceed 1 / 2 of a pulse cycle; Pulse application time Interval setting: The interval between two consecutive excitations should not be less than 3 times the relaxation time of the thermal / mechanical response of the test piece, to ensure that the response of the previous excitation completely decays to a steady state; Excitation type selection rules: For commutator inter-segment short circuits and electrical burns, pulse current / voltage excitation is preferred; for microcracks and delamination, ultrasonic vibration excitation is preferred. During the detection process, each excitation pulse is applied sequentially. After each excitation, the system response is allowed to stabilize before the next excitation is performed, or the next set of excitation parameters is dynamically selected based on the adaptive decision in step three. For the initial detection, the first round of excitation parameters can be determined by full parameter scanning or random sampling. Full-parameter scan rules: The parameter step size is set to no more than 5% of the maximum amplitude and no more than 5% of the maximum frequency; Random sampling rules: The sample size shall be no less than 10% of the total number of parameter combinations, and the sampling range shall cover the dynamic range of all parameters.
[0020] Step 2: Spatiotemporal response data acquisition.
[0021] During each excitation process, multiple frames of time-series images are continuously acquired from the inside of the commutator to construct a multidimensional response data tensor containing excitation parameter dimensions, time dimensions, and spatial dimensions. The specific implementation is as follows: Using a high-speed camera or infrared thermal imager, a fixed frame rate is used during and after each excitation pulse application within a time window. collection Frame image; let the first The image sequence corresponding to the next excitation is ,in For pixel coordinates, For the time relative to the start of the excitation; stack all the image sequences obtained from the excitation along the excitation parameter dimension to obtain a five-dimensional tensor. This provides a complete data foundation for subsequent processing; Data acquisition equipment selection requirements: high-speed camera with a spatial resolution of no less than 1280×720, frame rate... The frame rate ranges from 50fps to 100,000fps; the temperature measurement accuracy of the infrared thermal imager is no less than 0.1℃, and the frame rate ranges from 30fps to 10,000fps. Matching the excitation pulse frequency, the number of frames acquired within a single pulse cycle is no less than 10 frames; Acquisition time window setting: The total length of the time window is the duration of the excitation pulse. It is 5 to 20 times that of the previous period, covering the entire process from the application of the excitation to the decay of the response to the steady state; Number of frames captured Calculation rules: ,in, This is the total length of the data acquisition time window. The value range is from 10 frames to 10,000 frames; Five-dimensional tensor stacking rule: Stack the image sequence corresponding to each stimulus. Along the excitation amplitude Excitation frequency Two dimensions are expanded and aligned to form a shape. For spatial dimensions, In terms of time dimension, To incentivize the amplitude dimension, For the five-dimensional tensor of the excitation frequency dimension The value at each position in the tensor is the pixel response value under the corresponding parameter.
[0022] Step 3: Adaptive incentive decision-making.
[0023] This step constructs an incentive decision network based on deep reinforcement learning. Based on the currently collected response data, it dynamically selects the next set of incentive parameters that best reduces uncertainty, maximizing information acquisition efficiency and transforming the detection process from a fixed procedure into an intelligent iterative closed loop. The specific process is as follows: Figure 2 As shown: S31. Construction of an Incentive Decision Network Based on Deep Reinforcement Learning: This network adopts a deep Q-network (DQN) architecture to achieve end-to-end intelligent decision-making for incentive parameters. Gaussian process regression and mutual information calculation results are used as the network state input and reward function. Deep learning is used to strengthen the selection strategy for optimal incentive parameters, improving data acquisition efficiency and decision accuracy. The specific network construction process is as follows: Network input: The state vector contains the total information entropy of the currently collected dataset. The mutual information prediction value of all candidate activation parameters, the current iteration round, and the state vector dimension is fixed at 32-128 dimensions; Network structure: It contains 3 fully connected hidden layers, each with a dimension of 256~1024. Each hidden layer is followed by a batch normalization layer and a ReLU activation layer. The output layer dimension is the same as the number of candidate activation parameters, and it outputs the action value corresponding to each candidate parameter. value; Reward function setting: based on the actual mutual information obtained after applying candidate incentive parameters. For immediate rewards, if the mutual information exceeds a preset threshold, an additional positive reward is given; if the termination condition is not met even after the maximum number of iterations, a negative reward is given, and the reward function is perfectly aligned with the information gain objective. Network training: An offline pre-training plus online fine-tuning approach is adopted. During the pre-training stage, 10,000 to 50,000 iterations of training are completed based on the simulation dataset of commutator defect detection. The Adam optimizer is used, with an initial learning rate of 0.0001 and a discount factor of 0.9 to 0.99. During the online detection stage, based on the real-time data collected from the current test component, the network is fine-tuned for 10 to 50 steps after each iteration to adapt to the personalized response characteristics of the test component. Decision execution: In each iteration, the current state vector is input into the trained DQN network, and the output is selected. The candidate stimulus parameter with the largest value is used as the stimulus parameter for the next round of execution, which is fully compatible with the original scheme's single-parameter selection and multi-parameter parallel execution mode.
[0024] S32. Complete Algorithm Steps: First, define the information metric for the response data; let the currently collected dataset be... The corresponding excitation parameters are known; for each candidate excitation parameter It is necessary to evaluate how much information gain, i.e. mutual information, the newly acquired response data can bring to the current system state after applying the stimulus; select the candidate parameter that maximizes the mutual information for the next round of acquisition, and iterate until the information gain is lower than the preset threshold. S321. Response distribution modeling: Gaussian process regression is used to model the response function at each pixel location; let the pixel... response value With excitation parameters The relationship between them is: ; in, It is a mean function. For the covariance function, this embodiment uses a squared exponential kernel; based on the observed data, the Gaussian process can give the posterior normal distribution of the response under any unobserved excitation parameters. ; The specific expression for the squared exponent kernel is: ,in, The standard deviation of the signal is 0.1 to 10. The length scale parameter ranges from 0.01 to 100. Both parameters are determined by maximum likelihood estimation based on the initial collected data. Response value For the corresponding pixel in the excitation The mean of the time-series response, measured in pixels as grayscale values or temperatures, is the mean function. Covariance function Dimensions and completely consistent; S322, Information Entropy Calculation: Total information entropy corresponding to the currently observed data It can be obtained by summing the entropy of the posterior distribution of all pixel locations; for Gaussian distribution, the entropy is proportional to the logarithm of the variance; more practically, this embodiment considers the joint entropy of all pixels in the entire image, but to simplify the calculation, it can be assumed that the pixels are independent, then the total entropy is the sum of the entropies of each pixel. The specific formula for calculating the entropy of a single pixel Gaussian distribution is as follows: For pixels Posterior normal distribution Its entropy ; Formula for calculating total information entropy: ; in, For pixels The standard deviation of the posterior distribution; S323, Mutual Information Prediction: For candidate excitation parameters The new observational data it may bring The distribution can be predicted by a Gaussian process; applying After that, the new dataset Information entropy Through the The distribution is obtained by taking the expectation; mutual information is defined as: ; The larger the value, the more it indicates the application of... The more new information you can obtain later; Desired solution method: Monte Carlo sampling method is used for each candidate parameter. Sample the predicted response distribution 100 to 1000 times, calculate the information entropy after each sampling, and take the average value to obtain the result. ; Candidate parameter set Construction rules: The set of parameters that have not been stimulated in the full parameter combinations preset in step one, with a number of candidate parameters of no less than 10 groups and no more than 50% of the total number of parameter combinations; S324. Select the optimal incentive: Calculate all candidate parameters mutual information Select This serves as the incentive parameter for the next round. In actual execution, only one parameter can be selected per round, or multiple parameters can be applied in parallel to improve efficiency. Simultaneously, the optimal incentive parameter can be directly output through the aforementioned deep reinforcement learning incentive decision network. Both decision-making methods are compatible and can be used together. S325, Iteration Termination Condition: When the mutual information of all candidate parameters is below the threshold ,For example When the preset maximum number of iterations has been reached, adaptive data acquisition stops; at this point, the final multidimensional response data tensor is obtained. ; threshold The range of values is ; The maximum number of iterations ranges from 5 to 100, and the number of iterations does not exceed 30% of the total number of parameter combinations. This adaptive decision-making mechanism enables the detection system to automatically focus on the most informative stimulus conditions based on the actual response characteristics of the object being tested, avoiding redundant acquisition and significantly improving detection efficiency and accuracy.
[0025] Step 4: Nonlinear fingerprint extraction and matching.
[0026] This step inputs the final acquired multidimensional response data tensor into the physical field reconstruction network. This network consists of three parts: a nonlinear response encoder, an intrinsic response modeler, and a fingerprint matching detector, which together complete the localization and classification of defects. The specific process is as follows... Figure 3 As shown: S41. Nonlinear Response Encoder: The encoder's task is to extract fingerprint features that characterize the nonlinear response of defects at each pixel location. Traditional methods only analyze linear responses, while this invention introduces high-order spectral analysis to extract nonlinear components, including harmonics, frequency divisions, and modulation sidebands, from time-series signals. Simultaneously, it combines deep learning time-series networks to automatically extract deep nonlinear features, forming a fused nonlinear fingerprint. The specific implementation is as follows: For each pixel The time-series responses acquired under different excitation parameters constitute a three-dimensional data block. For simplicity, this embodiment describes each combination of excitation parameters. Extract the time-series signal separately, and then merge the features; The bispectrum, a tool in higher-order spectral analysis, is employed as the primary instrument. The bispectrum is a two-dimensional Fourier transform of the third-order cumulant of a signal, capable of revealing nonlinear characteristics such as quadratic phase coupling. The signal is defined as follows: The double spectrum is: ; in It is a third-order cumulant; in actual calculation, the signal is segmented and windowed, and the bispectrum is estimated using either a direct or indirect method. Bispectral calculation parameter settings: The range of values is ,in, The segment length of the timing signal, ranging from 256 to 1024; the timing signal... Divided into lengths of The segments are divided into segments with 50% overlap between adjacent segments. A Hanning window is applied to each segment. The third-order cumulant is calculated using an indirect method. Then, a two-dimensional Fourier transform is performed on the third-order cumulant to obtain the bispectrum. To further characterize the nonlinear intensity, the following features are extracted, and the specific extraction methods for each feature are as follows: The peak values of the bispectral amplitude and their corresponding frequency coordinates: Extraction method: Based on the calculated bispectral matrix First, calculate the bispectral amplitude matrix. A 3×3 neighborhood nonmaximum suppression algorithm is used to screen out local extrema in the amplitude matrix. These extrema are then sorted from highest to lowest amplitude value, and the top 5-20 extrema are selected as the bispectral amplitude peaks. Simultaneously, the two-dimensional frequency coordinates corresponding to each peak are extracted. Divide the extracted frequency coordinates by the sampling frequency. (i.e., frame rate) The normalization process is completed to limit the range of frequency coordinate values to within a certain range. ; Bispectral symmetry measure: Extraction method: Based on the inherent symmetry characteristics of bispectral data, three types of core symmetry regions are selected: main diagonal symmetry region, antidiagonal symmetry region, and conjugate symmetry region. The Pearson correlation coefficient of bispectral amplitude in each symmetry region is calculated, as well as the sum of squares of the differences in bispectral amplitude at corresponding positions within the symmetry region. The mean of the correlation coefficient and the normalized reciprocal of the sum of squares of the differences are weighted and summed to obtain the bispectral symmetry measure, which ranges from 0 to 1. The closer the value is to 1, the stronger the bispectral symmetry. Energy distribution along a slice at a specific frequency: Extraction method: Three types of feature frequency slices were selected, namely diagonal slices. Horizontal slices ( (for excitation fundamental frequency) and vertical slice For each selected frequency slice, extract the bispectral amplitude values at all positions along the slice path, calculate the total energy, mean energy, standard deviation of energy, peak energy position, and energy proportion of different frequency intervals within the slice, and form the energy distribution characteristics of the slice; stitch together the energy distribution characteristics of all selected slices to form the final energy distribution feature vector along a specific frequency slice. Higher-order spectral moments, such as bispectral skewness and kurtosis: Extraction method: using the bispectral amplitude matrix For the statistical sample, first calculate the global mean of the bispectral amplitude. Compared with global standard deviation Based on the standardized bispectral amplitude values, the bispectral skewness is calculated according to the third-order central moment formula to characterize the degree of asymmetry in the bispectral amplitude distribution; the bispectral kurtosis is calculated according to the fourth-order central moment formula to characterize the steepness and extreme value characteristics of the bispectral amplitude distribution; the bispectral skewness and kurtosis are combined to form higher-order spectral moment features. All extracted features are combined into a basic feature vector. The dimension can be set as needed; S42. Deep Learning Temporal Nonlinear Feature Supplement Extraction: The Temporal Convolutional Network (TCN) is used to extract the deep nonlinear features of the temporal signal, which are then fused with the basic feature vector to form the final nonlinear fingerprint vector. This achieves complementarity between manually designed features and features automatically learned by deep learning, thereby improving the fingerprint's ability to distinguish micro-defects. Network Structure: An 8-16 layer causal convolutional structure is used, with each layer having a kernel size of 3-7. The dilation coefficient increases exponentially by 2. Each convolutional layer is followed by a batch normalization layer and a ReLU activation layer. Residual connections are added to prevent gradient vanishing. The network finally outputs a fixed-dimensional deep feature vector through a global average pooling layer. The dimensions are set to 10~100. Network training: Supervised contrastive learning is adopted. The training set contains 5,000 to 20,000 time-series response signals collected under various defective states of the commutator, with no defects and various defective states. The optimization objective is to minimize the feature distance of the same type of defects and maximize the feature distance of different types of defects. The loss function is contrastive loss, the optimizer is AdamW optimizer, the initial learning rate is set to 0.0005, the number of training epochs is set to 100 to 300, and the batch size is set to 16 to 64. Feature fusion: combining basic feature vectors With deep feature vectors The data is then concatenated to form the final nonlinear fingerprint vector. The concatenated dimension is the sum of the basic feature dimension and the deep feature dimension; thus, each pixel corresponds to a non-linear fingerprint vector, and the entire image constitutes a feature field. ; Feature standardization: All fused features are standardized to 0 mean and unit variance. The number of principal components is... The value range is 10 to 100, and the cumulative variance contribution rate is not less than 95%. S43, Intrinsic Response Modeler: Based on the ideal physical model of the commutator, it calculates the theoretical nonlinear response range of each pixel in a defect-free state, which serves as the benchmark for subsequent fingerprint matching. The modeling process needs to combine the type of excitation used for detection, select the corresponding physical equation to construct the model, and incorporate key parameters such as commutator geometry and material properties to ensure the accuracy and relevance of the theoretical response. The physical equations used for modeling are determined based on the excitation type. If pulsed current excitation is used, a transient heat conduction equation needs to be constructed; if ultrasonic vibration excitation is used, a wave equation needs to be constructed. This embodiment uses a transient heat conduction equation, specifically in the following form: ; in, For the commutator material density, The specific heat capacity at constant pressure of the material. For the thermal conductivity of the material, For the Joule heat source term, For temperature field distribution, For time, Three-dimensional spatial coordinates; The values of the equation parameters must strictly follow the properties of commonly used commutator materials. In this embodiment, the specific value ranges are as follows: density for (Standard range for copper materials), specific heat capacity at constant pressure for thermal conductivity for Joule heat source term It is positively correlated with the excitation current density, and its value ranges from [value range missing]. It needs to be adjusted according to the actual excitation current parameters; The above physical equations are solved using the finite element method to obtain the internal temperature field distribution of the defect-free commutator under given excitation parameters. The solution process must follow these rules: The commutator's 3D model should be meshed using tetrahedral meshes, with the maximum mesh size not exceeding 1 / 10 of the commutator's minimum feature size to ensure mesh accuracy; the solution time step should not exceed 1 / 2 of the acquisition time interval to guarantee the accuracy of the timing response; the boundary conditions should be set to natural convection heat transfer between the commutator's outer surface and the air, with the convection heat transfer coefficient set to [value missing]. The physical field output by the finite element method is sampled to a grid consistent with the camera pixels through interpolation. Boundary conditions and material parameters are calibrated using defect-free standard parts. This embodiment uses the least squares fitting method. For different combinations of excitation parameters, the corresponding theoretical response data need to be calculated and stored in advance using the above method to form a defect-free theoretical response database, which provides a basis for subsequent comparison between measured fingerprints and theoretical fingerprints; To obtain the nonlinear response range in a defect-free state, it is necessary to consider interference factors such as the slight nonlinearity of material properties with temperature variation and the uncertainty of boundary conditions. Multiple sets of possible theoretical response curves are generated through Monte Carlo simulation, thereby obtaining the statistical distribution of the theoretical nonlinear fingerprint for each pixel, i.e., the mean vector. Covariance Matrix ; The specific implementation rules for Monte Carlo simulation are as follows: the number of simulations is 1,000 to 10,000 to ensure the reliability of the statistical distribution; the fluctuation range of material parameters is controlled within ±5% of the nominal value, and the fluctuation range of boundary conditions is controlled within ±10% of the nominal value. The fluctuation range is set to fit the parameter deviations in actual production and testing to ensure the rationality of the theoretical response range. S44. Fingerprint Matching Detector: The fingerprint matching detector compares the measured nonlinear fingerprint with the theoretical defect-free fingerprint, identifies regions with significant differences, and determines the defect type by combining deep Siamese network pre-matching with quantum annealing global optimization. First, calculate the measured fingerprint. Mahalanobis distance from the theoretical distribution: ; like , The significance threshold is set, for example, the 95th percentile based on the chi-square distribution, then the pixel is considered to be a defective area; threshold Value selection rules: Based on the chi-square distribution, the degrees of freedom are equal to the feature vector dimension. The quantile values range from 90% to 99.9%. For all candidate defect pixels, it is necessary to further match the defect type; for this purpose, a defect nonlinear response benchmark set is pre-constructed. ,in, For the first Defects such as microcracks, inter-chip short circuits, and electrical burns, under various excitations, can be identified by typical nonlinear fingerprint vectors through simulation or experimental calibration. This benchmark set does not need to be continuously updated and is only used as a reference template. Reference set construction rules: targeting common commutator issues such as microcracks, inter-segment short circuits, electrical burns, and delamination. Class defects, The value range is 3 to 10. At least 10 standard samples are prepared for each type of defect. Response data under different excitations are collected using the methods in steps one and two. Nonlinear fingerprint vectors are extracted, and the mean of the fingerprint vectors of all samples for each type of defect is taken as the baseline fingerprint for that type of defect. To form a benchmark set ,in Corresponding to the defect-free class; Furthermore, a twin convolutional network is used to learn the similarity measure of nonlinear fingerprints, and a coarse match of defect types is performed on candidate defect pixels to output the matching probability. This provides a more accurate matching cost for subsequent quantum annealing global optimization and improves classification accuracy. Network structure: It adopts a two-branch symmetric structure, with the two branches sharing all weights. Each branch contains 3 fully connected layers, with each layer having a dimension of 128~512. Each layer is followed by a batch normalization layer and a ReLU activation layer, and finally outputs a 128-dimensional feature embedding vector. The network head uses a distance metric layer to calculate the cosine distance between the embedding vectors of two input fingerprints and outputs a matching probability between 0 and 1. Network training: using a defect benchmark set The fingerprint vectors in the model are positive samples, and the fingerprint vectors of different types of defects are negative samples. The loss function is the contrastive loss, the optimizer is the Adam optimizer, the initial learning rate is set to 0.0001, the number of training epochs is set to 50 to 200, and the batch size is set to 16 to 32. Pre-matching execution: Measured fingerprints of candidate defective pixels. With reference set The baseline fingerprint of each type of defect A Siamese network trained with paired inputs outputs the pixel corresponding to the first... Matching probability of class defects The higher the matching probability, the greater the likelihood that the pixel belongs to the corresponding defect type; The matching process can be modeled as a global optimization problem: the defect region of the entire image is divided into connected components, and each component needs to be assigned a defect type to minimize the total matching cost of all components; since the matching between defect type and fingerprint may be non-convex, this invention introduces the quantum annealing algorithm to solve this combinatorial optimization problem. The quantum annealing matching algorithm is as follows: Define the objective function, i.e., the Hamiltonian. : ; in, Iterate through all defective pixels or superpixels. To assign to pixels Defect type tags, including no-defect classes, To make pixels fingerprints Matching as type The cost is that the second term is a smoothing term, which encourages consistent labeling between adjacent pixels. For coupling strength, Let Kronecker function be used when When the function is active, its value is 1; otherwise, it is 0. This form is similar to the Ising model or The model can be solved for the globally optimal label configuration using quantum annealing. Matching cost calculation rules: ,in, Pixels output by a deep Siamese network Corresponding type The matching probability and the cost range from 0 to 1, which is fully compatible with the Euclidean distance cost logic of the original scheme and can be directly replaced. Quantum annealing introduces a transverse field to tunnel through the energy barrier under quantum fluctuations, avoiding getting trapped in local optima. In practice, a simulated quantum annealing algorithm can be used, mapping the objective function to qubits and simulating the quantum annealing process using the path integral Monte Carlo method, gradually reducing the temperature to obtain an approximate global optimum. This algorithm has superior global search capabilities for high-dimensional combinatorial optimization problems. Furthermore, quantum annealing can be equivalently replaced by simulated annealing, graph cut, or CRF. Quantum annealing algorithm parameter settings: initial transverse field strength is 10~100, annealing steps are 100~1000, temperature decreases linearly from the initial value of 10~100 to 0.01~0.1, Monte Carlo sampling is performed 10~100 times per step, and coupling strength is... The value ranges from 0.1 to 10, and is adjusted according to the connectivity of the defective area; Finally, the detector outputs the classification label and confidence score for each defective pixel; if a pixel is determined to be a defect, its connected region is a defect target, and the detector also outputs the type of the defect and nonlinear response characteristic parameters, such as bispectral peak frequency and harmonic order.
[0027] Through the detailed description of the above embodiments, the deep learning-based defect target detection method of the present invention excites the nonlinear response behavior of the commutator defect under test by applying matched physical excitation pulses of multiple intensities and frequencies. Simultaneously, it acquires time-series response images throughout the entire excitation application and response decay cycle, constructing a multi-dimensional response data tensor. Relying on an excitation decision network constructed using deep reinforcement learning, it achieves adaptive dynamic optimization of excitation parameters with mutual information maximization as the core criterion, iteratively completing the efficient acquisition of high-value response data. Then, through the fusion of high-order spectral analysis and temporal convolutional networks, it extracts pixel-level nonlinear response fingerprint features. Combined with the theoretical response benchmark of the defect-free state and a global optimization matching algorithm, it achieves accurate localization and classification of the defect target. This invention breaks through the technical bottleneck of traditional appearance inspection, achieving effective identification of potential defects without relying on the commutator's appearance, providing a high-precision and high-reliability non-destructive testing solution for commutator industrial inspection.
[0028] The above formulas are all dimensionless calculations, and the preset parameters in the formulas should be set by those skilled in the art according to the actual situation.
[0029] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0030] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0031] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0032] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0033] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0034] If the aforementioned functions 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, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0035] 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 defect target detection method based on deep learning, characterized in that, The method flow is as follows: Step 1: Multi-intensity and multi-frequency scanning excitation: Multiple sets of physical excitation pulses with different amplitudes and frequencies are sequentially applied to the commutator under test to stimulate the nonlinear response behavior of potential defects in the commutator under test. The type of physical excitation pulse is selected according to the type of defect to be detected. Step 2, Spatiotemporal response data acquisition: During each excitation application process and within the response decay period, the time-series response images of the commutator under test are continuously acquired to construct a multidimensional response data tensor containing excitation parameter dimensions, time dimensions, and spatial dimensions. Step 3, Adaptive Incentive Decision: Based on the currently collected response data, the incentive decision network built on deep reinforcement learning dynamically selects the next set of incentive parameters that can bring the maximum information gain, iteratively executes incentive application and data collection until the preset termination condition is met, and obtains the final multidimensional response data tensor. Step 4: Nonlinear fingerprint extraction and matching: Input the final multidimensional response data tensor into the physical field reconstruction network, extract the nonlinear response fingerprint features of each pixel position, match the measured features with the theoretical response benchmark of the defect-free state, and complete the localization and classification of defective targets.
2. The deep learning-based defect target detection method according to claim 1, characterized in that, In step one, an electrical excitation pulse is used for conductive defects in the commutator, and an ultrasonic vibration excitation pulse is used for mechanical defects in the commutator. The interval between two adjacent excitation pulses is not less than the relaxation time of the corresponding response of the commutator under test, to ensure that the response of the previous excitation completely decays to a steady state.
3. The deep learning-based defect target detection method according to claim 1, characterized in that, In step two, the acquisition device used to acquire the time-series response images is matched with the type of excitation pulse, and the acquisition time window covers the entire process from the application of the excitation to the decay of the response to the steady state. The time-series image sequences corresponding to each excitation are expanded and aligned along the excitation parameter dimension to form a multidimensional response data tensor containing spatial dimension, time dimension, excitation amplitude dimension and excitation frequency dimension.
4. The deep learning-based defect target detection method according to claim 1, characterized in that, In step three, when dynamically selecting excitation parameters, Gaussian process regression is first used to model the distribution of the response function at each pixel position based on the collected response data, and the total information entropy of the currently collected data is calculated. Then, the information gain corresponding to each candidate excitation parameter is estimated, and the candidate excitation parameter that can bring the maximum information gain is selected as the next set of excitation parameters to be executed.
5. The deep learning-based defect target detection method according to claim 4, characterized in that, When estimating the information gain corresponding to the candidate excitation parameters, a mutual information prediction method is adopted. This method combines the distribution characteristics of the response function of each pixel position obtained by Gaussian process regression. By analyzing the correlation between the response prediction distribution corresponding to the candidate excitation parameters and the distribution of the currently collected data, the mutual information between the two is quantified, and this mutual information value is used as the estimated value of the information gain of the candidate excitation parameters.
6. The deep learning-based defect target detection method according to claim 5, characterized in that, The incentive decision network adopts a deep Q-network architecture, using the information entropy of the currently collected dataset, the estimated information gain of the candidate incentive parameters, and the iteration rounds as network inputs, and the actual information gain obtained after applying incentives as the reward function. The network is optimized through offline pre-training and online fine-tuning, and the optimal incentive parameters are output.
7. The deep learning-based defect target detection method according to claim 1, characterized in that, In step four, when extracting nonlinear response fingerprint features, the nonlinear components in the time-series response signals of each pixel position under different excitation parameters are extracted through high-order spectral analysis to form a basic nonlinear fingerprint feature vector.
8. The deep learning-based defect target detection method according to claim 7, characterized in that, A temporal convolutional network is used to extract deep nonlinear features of the temporal response signal. The deep nonlinear features are then concatenated and fused with the basic nonlinear fingerprint feature vector and standardized to form the final nonlinear response fingerprint features at each pixel location.
9. The deep learning-based defect target detection method according to claim 1, characterized in that, In step four, the theoretical response benchmark for the defect-free state is constructed based on the material properties, geometric structure, and excitation type of the commutator under test. The corresponding physical field control equations are constructed, and the theoretical response data under the defect-free state is obtained by solving the equations using the finite element method. The statistical distribution of the theoretical nonlinear response at each pixel position is obtained by combining parameter fluctuation simulation to form a matching benchmark.
10. The deep learning-based defect target detection method according to claim 9, characterized in that, When matching the measured nonlinear response fingerprint features extracted in step four with the theoretical response benchmark of the defect-free state, the difference between the statistical distribution of the measured nonlinear response fingerprint features and the theoretical response benchmark is first calculated to screen out candidate defect pixels. Then, a coarse matching between the candidate defect pixel features and the preset defect benchmark set is completed through a Siamese convolutional network. Based on the coarse matching result, a global optimization objective function is constructed, and the globally optimal defect type allocation result is obtained by solving the quantum annealing algorithm, thus completing the defect classification.