An enameled wire defect detection system based on photoelectric sensor

CN117269182BActive Publication Date: 2026-10-27ZHEJIANG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311084839.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-25
Publication Date
2026-10-27
Estimated Expiration
2043-08-25

AI Technical Summary

Technical Problem

传统检测方法中日本盐水法检测能力有限、低压水银法存在安全隐患、压轮式直流高压漆膜连续性试验法容易损伤漆膜等,难以满足工业漆包线检测高效、鲁棒性强的要求

Benefits of technology

[0045]本发明利用红外传感器实现漆包线圆周侧面的缺陷检测,可以克服基于视觉处理的检测方式无法适用于非扁平、小直径的漆包线检测的缺点,实现连续、高效、稳定的圆周侧面缺陷检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117269182B_ABST
    Figure CN117269182B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on photoelectric sensor's enameled wire defect detection system, transmission is used for bearing enameled wire to do uniform velocity straight line motion, positioning device is used for positioning the relative displacement of infrared sensor and enameled wire;Infrared sensor includes: two groups of parallel infrared probe, signal acquisition circuit;Infrared probe includes transmitter and detector;Signal acquisition circuit converts infrared reflection light signal into electric signal transmission to microprocessor, and microprocessor converts analog electric signal into digital signal transmission to data processing center;Whether the existence of measured object reflection in the detection range of infrared probe is judged by the output switch indicator light of signal acquisition circuit;Display module carries out visual presentation to the data obtained by infrared sensor;Data processing center uses defect detection algorithm to process received signal, and identifies and classifies abnormal defect.The application realizes continuous, efficient and stable defect detection to the circumferential side of enameled wire by using infrared sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of defect detection and analysis, and photoelectric detection, and particularly to a defect detection system for enameled wire based on a photoelectric sensor. Background Technology

[0002] Enameled wire consists of an inner layer of metal conductors and an outer layer of various organic insulating enamel films. The enamel films are applied to the surface of the metal conductors using appropriate coating methods. Due to factors such as contamination of the metal conductors by impurities, damage during the drawing process, and breakage of the organic insulating enamel film, the produced enameled wire may have defects such as pinholes in the organic insulating coating, peeling of the organic insulating enamel film, and enamel film aggregation into nodules and lumps, resulting in poor surface finish. If enamel film damage is not detected in time during production, substandard enameled wire may be produced and used in motors and electrical appliances, potentially leading to reduced product lifespan, malfunction of other components, or even leakage hazards from exposed copper wires. Installing an abnormality detection device in a timely manner, stopping production or preventing the wire from leaving the factory upon detection of anomalies, can significantly reduce material waste and lower the risks associated with using motors and electrical appliances made with enameled wire.

[0003] Currently, the main methods for detecting defects in enameled wire are traditional inspection methods and visual inspection. Traditional methods, such as the Japanese brine method, have limited detection capabilities; the low-pressure mercury method poses safety hazards; and the pressure roller-type DC high-voltage continuous coating test method is prone to damaging the coating film, making it difficult to meet the requirements of high efficiency and robustness in industrial enameled wire inspection. Visual inspection methods are more suitable for planar area scan cameras or line scan cameras for large-diameter curved surfaces like steel pipes, and are not suitable for non-flat, small-diameter enameled wires. For line scan cameras, the deviation of small-diameter enameled wires is difficult to control during rotation. Regarding signal analysis for defects in enameled wire, correlation-based defect detection technology suffers from significant errors when calculating defects based on correlation in complex environments due to sampling deviations leading to low correlation between two signal reproductions, or even minor defects causing the sensor to only sample the defect signal in one of two samplings. This results in inaccurate identification and judgment when using correlation to determine the defect situation. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention proposes a defect detection system for enameled wire based on photoelectric sensors.

[0005] The specific technical solution is as follows:

[0006] A defect detection system for enameled wire based on photoelectric sensors includes: an infrared sensor, a microprocessor, a display module, a data processing center, a transmission device, and a positioning device; the transmission device is used to carry the enameled wire to make uniform linear motion, and the positioning device is used to position the relative displacement between the infrared sensor and the enameled wire, so that the enameled wire is within the detection range of the infrared sensor.

[0007] The infrared sensor includes: two sets of parallel infrared probes and a signal acquisition circuit; the two sets of infrared probes are spaced at a fixed distance, and each set of infrared probes includes a transmitter and a detector. The transmitter emits infrared light waves of a fixed wavelength, which are reflected after encountering a reflective object. The reflected infrared light signal is received by the detector, which converts the light signal into a weak electrical signal; the signal acquisition circuit amplifies the weak electrical signal and transmits it to a microprocessor; the signal acquisition circuit includes an output switch indicator light to determine whether there is a reflected object within the detection range of the infrared probes.

[0008] The microprocessor receives data acquired by the infrared sensor, converts the analog electrical signal into a digital signal, and then transmits it to the data processing center; the display module is used to visualize the data acquired by the infrared sensor.

[0009] The data processing center uses a defect detection algorithm to process the received signals, identify and classify abnormal defects. Specifically, the data processing center constructs a delayed signal based on the received signal and performs filtering. Then, it selects an appropriate window size and step size, calculates the similarity between two sets of delayed signals within the window, takes the similarity coefficient within each window as the similarity feature of the data within that window, and adds three categories of labels to the signal: normal, defective, and noise. The signal voltage value and similarity coefficient are concatenated into an input sequence matrix, which is then fed into an LSTM neural network. After learning, the corresponding classification label is output, and the cross-entropy loss of each classification label is calculated until the loss function converges, resulting in a trained LSTM neural network. The test set is input into the trained LSTM neural network for testing, and the defect classification information of the enameled wire under unknown conditions is output.

[0010] Furthermore, the transmitter is an infrared diode, and the detector is a phototransistor.

[0011] Furthermore, both sets of infrared sensors are isolated by a black, light-shielding housing.

[0012] Furthermore, the signal acquisition circuit includes: a DC power supply, a fixed resistor, two ceramic capacitors 104, a voltage comparator, and an adjustable resistor V. R1 Adjustable resistor V R2The system includes an infrared diode, a phototransistor, an output switch indicator, and a power indicator; the infrared diode acts as the transmitter, and the NPN phototransistor acts as the detector; the base of the phototransistor receives the reflected infrared light signal, and the collector is connected to an adjustable resistor V. R2 One fixed terminal of the phototransistor has its emitter grounded; a ceramic capacitor 104 is connected in parallel across the collector and emitter of the phototransistor; the positive terminal of the infrared diode is connected in series with a current-limiting resistor to the DC power supply, and the negative terminal is grounded; the resistance value of the current-limiting resistor is in the range of 95-180Ω; an adjustable resistor V... R1 One of the fixed terminals is connected to a DC power supply, the other fixed terminal is grounded, and the variable terminal is connected to the inverting input of a voltage comparator; the adjustable resistor V R2 One of its fixed terminals is connected to the positive input terminal of the voltage comparator, the collector of the phototransistor, and the output terminal A0, respectively. The output terminal A0 is connected to the signal input terminal of the microprocessor. The adjustable resistor V... R2 Both the other fixed and variable terminals are connected to a DC power supply;

[0013] The positive terminal of the output switch indicator light is connected to the DC power supply, and the negative terminal is connected to the output terminal of the voltage comparator after being connected in series with a fixed resistor. A pull-up resistor is connected in series between the output terminal of the voltage comparator and the DC power supply. The positive terminal of the power indicator light is connected to the DC power supply, and the negative terminal is connected in series with a fixed resistor and then grounded. The resistance value of the fixed resistors connected in series with the output switch indicator light and the power indicator light is in the range of 296Ω-1.083kΩ. A ceramic capacitor 104 is connected in parallel across the power indicator light and the fixed resistor to buffer and protect the power indicator light.

[0014] Furthermore, the defect detection algorithm is implemented through the following sub-steps:

[0015] Step 1: Acquire the delayed signal and perform filtering processing;

[0016] The data processing center constructs a delayed signal sequence based on the received signal voltage values: X = [x1, x2, ..., x...]. n ], Y = [y1, y2, ..., y n ], where n is the number of signal points; and Y lags behind X by j points. x represents the actual distance between the transmitters of the two sets of infrared probes of the infrared sensor, v represents the actual speed of the AC speed-regulating motor, and f represents the sampling frequency of the microprocessor.

[0017] The delayed signal sequences X and Y are filtered to eliminate numerical deviations in the sampling of the two sets of infrared sensors.

[0018] Step 2: Signal similarity calculation;

[0019] Set the time window size l and the sliding step s, where 0 < l ≤ n, s = l;

[0020] The similarity of the datasets within each sliding window is calculated using the Pearson correlation coefficient. The expression for the Pearson correlation coefficient of the datasets within the i-th window is as follows:

[0021]

[0022] in

[0023]

[0024]

[0025]

[0026]

[0027]

[0028] In the formula, X i Let X be the X signal of the i-th window, i∈(1,q). And X i =[x (i-1)l+1 ,x (i-1)l+2 ...,x il ];Y i Let Y be the Y signal of the i-th window, and Y i =[y (i-1)l+j+1 ,y (i-1)l+j+2 ...,y il+j ]; Represents X i Expected value Represents Y i Expected value Represents X i standard deviation Represents Y i Standard deviation, COV(X) i ,Y i ) is X i and Y i The covariance between them, r i Represents X i and Y i The Pearson correlation coefficient between them;

[0029] Step 3: Multi-dimensional data splicing of enameled wire;

[0030] For the known X i and Y iThe signals are labeled manually, with 0 representing normal signals, 1 representing defective signals, and 2 representing noise signals. The signals are then input into an LSTM neural network for learning and classification.

[0031] The Pearson correlation coefficient r of the window i As similarity features of signals within the window; the input signals X, Y, and r are sliced ​​into equal-length slices to construct a dataset, with a slice length of L; based on the signals of the enameled wire at the same position, the features of X, Y, and r are concatenated to construct the input sequence matrix of the LSTM neural network, the expression of which is as follows:

[0032]

[0033] Step 4: Construct and train the temporal memory network;

[0034] The dataset is divided into a training set and a test set, with a ratio of α. The training set is input into an LSTM neural network to extract temporal features. The LSTM layer contains storage units for hidden information, a forget gate, an input gate, and an output gate. Each time the LSTM neural network is input, it combines the voltage signal and similarity information at the current time step with the hidden layer features from the previous time step. Using the sigmoid and tanh non-linear activation functions, it forgets unimportant information and remembers important information from the long-term sequence. The LSTM neural network outputs a classification label at each time step. The output classification label is then compared with the signal's true label using the cross-entropy loss function, as shown in the following expression:

[0035]

[0036]

[0037] In the formula, The label represents the signal obtained after training with an LSTM neural network. It is a probability distribution, each element c represents the probability that a sample belongs to the k-th class, where k = 0, 1, 2; k = [c0, c1, c2] is the one-hot encoded representation of the sample label. When the sample belongs to the k-th class, c k =1, otherwise c k =0; Loss is the loss function to be minimized, used to constrain the LSTM neural network;

[0038] When the training set loss function converges, it indicates that the LSTM neural network training is complete. The test set is then input into the trained LSTM neural network for testing, and the output is the defect classification information of the enameled wire under unknown conditions.

[0039] Furthermore, in step 2, considering that the delay between environmental interference signals during the sampling process will not strictly deviate by j, multiple windows with different field of view lengths are selected when calculating the Pearson similarity to reduce the deviation caused by the fluctuation of the delay point due to physical interference of the detection device.

[0040] Furthermore, there are multiple infrared sensors arranged in a staggered and complementary manner along the circumference of the enameled wire's forward path, enabling the infrared sensors to detect the complete circumferential side surface of the enameled wire, and ensuring that each infrared sensor does not interfere with the others.

[0041] Furthermore, the transmission device includes: an AC speed-regulating motor, a reversible speed regulator, a horizontal straightener, and a conveyor pulley;

[0042] The conveyor pulley is fixed on the shaft of the AC speed-regulating motor, which provides power for the enameled wire to travel at a constant speed. The conveyor pulley carries the enameled wire under the drive of the AC speed-regulating motor. The reversible speed controller is connected to the AC speed-regulating motor and is used to control the forward and reverse rotation direction and rotation speed of the AC speed-regulating motor. The horizontal straightener is fixed at both ends of the enameled wire in the direction of travel and is used to fix the enameled wire to be straight and avoid violent shaking deviation during the movement, and to straighten the detection error caused by the unevenness of the enameled wire.

[0043] Furthermore, the positioning device includes a dovetail slide and a vertical straightener; the infrared sensor is fixedly connected to the dovetail slide, and the vertical straightener is used to position the infrared probe of the infrared sensor. The infrared probe is manually adjusted so that it is on the same vertical line as the enameled wire, thereby realizing the detection of the enameled wire.

[0044] The beneficial effects of this invention are:

[0045] This invention utilizes an infrared sensor to detect defects on the circumferential side of enameled wire. It overcomes the shortcomings of vision-based detection methods, which are not suitable for detecting non-flat, small-diameter enameled wires, and achieves continuous, efficient, and stable detection of defects on the circumferential side. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of a device for a defect detection system for enameled wire based on a photoelectric sensor, according to an embodiment of the present invention.

[0047] Figure 2 This is a schematic diagram of the infrared probe detection of the infrared sensor according to an embodiment of the present invention, namely the wavelength-relative spectral sensitivity curve.

[0048] Figure 3 This is a schematic diagram of the signal acquisition circuit of the infrared sensor according to an embodiment of the present invention.

[0049] Figure 4This is a schematic diagram of a defect detection algorithm running in a data processing center according to an embodiment of the present invention.

[0050] Figure 5 This is a schematic diagram of the arrangement of multiple infrared sensors in a staggered and complementary manner to achieve omnidirectional detection of enameled wires according to an embodiment of the present invention.

[0051] Figure 6 This is a graph showing the sampling voltage results of the enameled wire in an embodiment of the present invention.

[0052] Figure 7 This is an ROC curve of the defect classification effect of enameled wire according to an embodiment of the present invention. Detailed Implementation

[0053] The present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments. The objectives and effects of the present invention will become clearer as a result. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0054] like Figure 1 As shown, a defect detection system for enameled wire based on photoelectric sensors includes: an infrared sensor, a microprocessor, a display module, a data processing center, a transmission device, and a positioning device.

[0055] Infrared sensors are used to emit and receive light, and include: two sets of parallel infrared probes and a signal acquisition circuit. The two sets of parallel infrared probes are spaced a certain distance apart, and the sampling signals have a certain time difference. The purpose is to acquire and remove random noise in anomaly detection through signal reproduction. Each set of infrared probes includes a transmitter and a detector; the transmitter is an infrared diode, and the detector is a phototransistor. The transmitter emits infrared light waves of a fixed wavelength. When the detection direction encounters a reflective object, the reflected infrared light waves are received by the detector. To avoid interference between the emitted and received light from the two sets of infrared probes, both sets of infrared probes are isolated by a black light-shielding shell, and the diffuse reflection angle is limited. Figure 2 As shown, in this embodiment of the invention, the infrared probe emits infrared light waves with a wavelength of 940nm, which are received by the detector. The wavelength of the infrared light waves is not limited to 940nm. In this embodiment, the infrared sensor used is TCRT5000. When the wavelength range of the infrared light emitted by the transmitter is 800-1000nm, the spectral sensitivity is relatively high.

[0056] like Figure 3 As shown, the signal acquisition circuit converts the infrared reflected light signal received by the detector into an electrical signal, amplifies this electrical signal, and transmits it to the microprocessor. The signal acquisition circuit includes: a DC power supply, a fixed resistor, two ceramic capacitors 104, a voltage comparator, and an adjustable resistor V.R1 and V R2 The system consists of a surface-mount LED and an MH SensorSerial sensor. The DC power supply voltage range is 3.3V-5V; the voltage comparator used in this embodiment is an LM393 voltage comparator. The MH SensorSerial sensor includes an infrared diode as the transmitter and a phototransistor as the detector. The phototransistor is NPN type; its base receives the reflected infrared light signal, and its collector is connected to an adjustable resistor V. R2 The emitter is grounded; a ceramic capacitor 104 is connected in parallel across the collector and emitter of the detector. The positive terminal of the infrared diode is connected in series with a current-limiting resistor to the DC power supply to prevent the diode from being damaged by excessive current; the negative terminal is grounded. Since the operating current of the infrared diode is generally less than 20mA and the voltage drop is 1.4V, the resistance value of the current-limiting resistor is in the range of 95-180Ω. In this embodiment, the resistance value is 180Ω.

[0057] Adjustable resistor V R1 It has two fixed terminals, one connected to a DC power supply and the other grounded. The variable terminal is connected to the inverting input of a voltage comparator. Adjustable resistor V R2 There are two fixed terminals. One fixed terminal is connected to the positive input of the voltage comparator, the collector of the phototransistor, and the output terminal A0 of the signal acquisition circuit. The other fixed terminal and the variable terminal are connected to the DC power supply. The output terminal A0 of the signal acquisition circuit is connected to the signal input terminal of the microprocessor.

[0058] The surface-mount LED includes an output switch indicator and a power indicator. The positive terminal of the output switch indicator is connected to the DC power supply, and the negative terminal is connected to the output terminal of the voltage comparator via a series fixed resistor. Since the rated current for normal illumination of the output switch indicator is 3-5mA and the operating voltage is 1.75-1.82V, while the power supply voltage ranges from 3.3-5V, the resistance of the fixed resistor can be calculated using the formula "resistance = (power supply voltage - LED operating voltage) / rated current". The resistance range of this fixed resistor is 296Ω-1.083kΩ. In this embodiment, the resistance is 1kΩ. A pull-up resistor is connected in series between the output terminal of the voltage comparator and the DC power supply. When the voltage at the non-inverting input terminal is less than the voltage at the inverting input terminal, the output terminal outputs a low level. When the voltage at the non-inverting input terminal is greater than the voltage at the inverting input terminal, the high-impedance state of the output terminal needs to be converted to a high level under the action of the pull-up resistor. In this embodiment, the resistance of this pull-up resistor is 10kΩ. The positive terminal of the power indicator light is connected to the DC power supply, and the negative terminal is connected in series with a fixed resistor and grounded. The resistance of this fixed resistor ranges from 296Ω to 1.083kΩ; in this embodiment, the resistance is 1kΩ. A ceramic capacitor 104 is connected in parallel across the power indicator light and the fixed resistor to buffer and protect the power indicator light, while also reducing noise in the circuit. When the power indicator light diode is forward-biased, the parallel capacitor stores charge and releases it during the conduction time to maintain voltage stability. When the power indicator light diode is reverse-biased and cut off, the parallel capacitor releases charge to recharge the diode, maintaining voltage smoothness and achieving a regulated output.

[0059] The output switch indicator light is used to determine whether the infrared probe and the enameled wire under test are on the same vertical line, that is, to determine whether there is a measured object reflecting light within the detection range of the infrared probe. When the detected object is not present, or the distance d between the infrared probe and the enameled wire is too large or too small, the intensity of the reflected light received by the detector is lower than the threshold, and the output switch indicator light turns off. When the detected object is present and the distance between the infrared probe and the enameled wire is within the sensing distance of the infrared sensor, the intensity of the reflected light received by the detector is higher than the threshold, and the output switch indicator light illuminates. In summary, the distance between the enameled wire and the infrared probe affects the intensity of the infrared light received by the output switch indicator light. The change in the output signal caused by adjusting the distance can be controlled by the adjustable resistor V. R2 The compensation mechanism enables adjustable light intensity for the output switch indicator, thereby reducing the infrared sensor's dependence on distance and allowing sensing at different infrared probe and enameled wire distances. In this embodiment, a 3.3V DC power supply is selected, and the output voltage at output terminal A0 increases with increasing illumination, with a range of 0V to 3.3V.

[0060] The display module is used to visualize the data acquired by the infrared sensor. In this embodiment, the display module adopts the SDWb070S84C serial port screen, and designs the required interface display controls and touch buttons. It encodes the instructions and addresses of the data source channels of the signals to be displayed. Multi-channel encoding can display multiple sets of signals simultaneously.

[0061] The microprocessor receives data from the infrared sensor and converts the analog electrical signals into digital signals via an AD module. A serial port connects the microprocessor to the data processing center, transmitting the voltage signals detected by the two sets of infrared probes from the infrared sensor to the data processing center. Simultaneously, the microprocessor controls the signal reception channel of the display module via coded instructions. When the display module issues a command to receive signals, the microprocessor receives this command and transmits the received data to the display module in real time. When the display module issues a command to stop receiving signals, the microprocessor receives this command and terminates data reception, while the display module stops updating data.

[0062] The transmission device, used to support the uniform movement of the enameled wire, includes: an AC speed-regulating motor, a reversible speed regulator, a horizontal straightener, and conveyor pulleys. The conveyor pulleys are fixed to the shaft of the AC speed-regulating motor, which provides the power for the enameled wire to move at a uniform speed. The conveyor pulleys, driven by the AC speed-regulating motor, support the movement of the enameled wire. The reversible speed regulator is connected to the AC speed-regulating motor and controls its forward and reverse rotation direction and speed. The horizontal straightener is fixed to both ends of the enameled wire in the direction of travel, used to ensure the enameled wire is driven straight, avoiding severe vibration deviations during movement, and correcting detection errors caused by the unevenness of the enameled wire.

[0063] The positioning device is used to measure the distance between the infrared probe and the enameled wire under test, and to determine their relative vertical displacement. The positioning device includes a dovetail slide and a vertical straightener. An infrared sensor is fixedly connected to the dovetail slide. The position of the infrared probe is positioned using the vertical straightener. Adjusting the nut ensures that the infrared probe and the enameled wire under test are on the same vertical line, thus enabling the detection of the enameled wire.

[0064] like Figure 4 As shown, the data processing center uses a defect detection algorithm to process the received signals, thereby identifying and classifying abnormal defects and random noise. The specific detection process of the defect detection algorithm is as follows:

[0065] Step 1: Acquire the delayed signal and perform filtering.

[0066] The data processing center first constructs a set of delayed signal sequences based on the received signals (the received signals are signal voltage values), namely X=[x1,x2,...,x n ], Y = [y1, y2, ..., yn ], where n is the number of signal points; and Y lags behind X by j points. x represents the actual distance between the transmitters of the two sets of infrared probes of the infrared sensor, v represents the actual speed of the AC speed-regulating motor, and f represents the sampling frequency of the microprocessor.

[0067] The delayed signal sequences X and Y are filtered separately. Since the majority of the data sampled in this experiment are normal samples, the mode within the window is used as the filtering result to eliminate the numerical deviation between the two sets of infrared sensor samples.

[0068] Step 2: Signal similarity calculation.

[0069] Set an appropriate time window size l and sliding step size s, where 0 < l ≤ n and s = l.

[0070] The similarity between two delayed signal datasets within each sliding window is calculated using the Pearson correlation coefficient. The expression for the Pearson correlation coefficient of the dataset in the i-th window is as follows:

[0071]

[0072] in

[0073]

[0074]

[0075]

[0076]

[0077]

[0078] In the formula, X i Let X be the signal of the i-th window, i∈(1,q). And X i =[x (i-1)l+1 ,x (i-1)l+2 ...,x il ];Y i Let Y be the Y signal of the i-th window, and Y i =[y (i-1)l+j+1 ,y (i-1)l+j+2 ...,y il+j ]. Represents X i Expected value Represents Y i Expected value Represents X i standard deviation Represents Y iStandard deviation, COV(X) i ,Y i ) is X i and Y i The covariance between them, r i Represents X i and Y i The Pearson correlation coefficient between them.

[0079] Since Y is delayed by j points, the window starts from the j-th signal point. Considering that the delay between environmental interference signals during the sampling process will not strictly deviate by j, multiple windows with different field-of-view lengths are selected in the Pearson similarity calculation to reduce the deviation caused by the fluctuation of delay points due to physical interference of the detection device.

[0080] Step 3: Multi-dimensional data splicing of enameled wire.

[0081] For the known X i and Y i The signals are labeled by humans, with 0 representing normal signals, 1 representing defective signals, and 2 representing noise signals. The signals are then input into a Long Short-Term Memory (LSTM) neural network for learning and classification.

[0082] The Pearson correlation coefficient r of the window i As similarity features of signals within the window, the input signals X, Y, and r are sliced ​​into equal-length slices to construct a dataset. The slice length of the samples is L, which is set manually. Based on the signals of the enameled wire at the same position, the features of X, Y, and r are concatenated to construct the input sequence matrix of the LSTM neural network, the expression of which is as follows:

[0083]

[0084] Step 4: Build and train the temporal memory network.

[0085] The dataset is divided into training and test sets, with a ratio of α. The training set is input into an LSTM neural network to extract temporal features. The LSTM layer contains storage units for hidden information and three gates (forget gate, input gate, and output gate). Each time the LSTM neural network is input, it uses the current voltage signal (X and Y), similarity information (r), and the hidden layer features from the previous time step. Through the sigmoid and tanh non-linear activation functions, it forgets less important information and remembers important information from the long-term sequence. The LSTM neural network outputs a classification label at each time step, which is then compared with the signal's true label using the cross-entropy loss function. The calculation expression is as follows:

[0086]

[0087]

[0088] In the formula, The label represents the signal obtained after training with an LSTM neural network. It is a probability distribution, each element c represents the probability that a sample belongs to the k-th class, where k = 0, 1, 2; k = [c0, c1, c2] is the one-hot encoding of the sample label. When the sample belongs to the k-th class, c k =1, otherwise c k =0; Loss is the loss function that is minimized and used to constrain the LSTM neural network.

[0089] When the training set loss function converges, it indicates that the LSTM neural network training is complete. The test set is then input into the trained LSTM neural network for testing, and the output is the defect classification information of the enameled wire under unknown conditions.

[0090] like Figure 5 As shown, this invention takes into account the cylindrical characteristics of the enameled wire's side surface. Due to the limited single infrared radiation range of the infrared sensor, there may be missed detections on the bottom or side surfaces during the enameled wire's forward movement. To address this, this invention uses multiple infrared sensors in a staggered and complementary manner. Based on the sensor's radiation angle θ and the detection distance d between the probe and the enameled wire, the radiation range of each infrared sensor can be roughly obtained through calculation. Thus, multiple infrared sensors are arranged to achieve full coverage of the circumferential side surface. This avoids missed detections during the enameled wire's forward movement, and the staggered arrangement of the infrared sensors also prevents mutual interference between multiple infrared sensors on the same axial surface.

[0091] The following example illustrates the operational steps of the present invention during actual testing.

[0092] Example 1

[0093] Step 1: Acquire the delayed signal and perform filtering.

[0094] The actual distance between the two sets of infrared probes of the infrared sensor is x = 15mm, the radiation angle of the infrared sensor is θ = 25°, the detection distance between the infrared probe and the enameled wire is d = 3mm, the actual speed of the AC speed-regulating motor is v = 170mm / s, the sampling frequency of the microprocessor is f = 200Hz, and the data processing center constructs a set of delayed signal sequences divided into X = [x1, x2, ..., x...]. n ], Y = [y1, y2, ..., y n ], where n is the number of signal points, and the number of delay points of signal Y relative to X is j = 17, such as Figure 6As shown, data1 represents the sampling signal of infrared sensor number one, and data2 represents the sampling signal of infrared sensor number two. Figure 6 The data includes four defects with time delays sampled by two sets of infrared sensors and two noises sampled by the first infrared sensor.

[0095] Calculations show that the enameled wire used in this invention has a diameter of 1.5 mm, and a single infrared sensor is sufficient to cover the upper half of the curved surface of the enameled wire. If two infrared sensors are used to cover the top and bottom, the infrared light reflected from the sides cannot be received by the detector. Therefore, three sets of infrared sensors are selected to achieve full coverage of the circumferential side surface.

[0096] Step 2: Signal similarity calculation.

[0097] Choose three time windows of different lengths, l s =15, l m =20, l l =25, the sliding step size s corresponds to the length of the time window, and the similarity of the datasets within each sliding window is calculated using the Pearson correlation coefficient. The Pearson correlation coefficients of the three time window lengths are used to construct a three-dimensional correlation matrix ∑, as shown in the following expression:

[0098]

[0099] In the formula, This indicates that the window length is l s The Pearson correlation coefficient of the dataset within the first window. This indicates that the window length is l s The Pearson correlation coefficient of the dataset within the second window. This indicates that the window length is l s The Pearson correlation coefficient of the dataset within the t-th window; This indicates that the window length is l m The Pearson correlation coefficient of the dataset within the first window. This indicates that the window length is l m The Pearson correlation coefficient of the dataset within the second window. This indicates that the window length is l m The Pearson correlation coefficient of the dataset within the m-th window; This indicates that the window length is l l The Pearson correlation coefficient of the dataset within the first window. This indicates that the window length is l l The Pearson correlation coefficient of the dataset within the second window. This indicates that the window length is l l The Pearson correlation coefficient of the dataset within the l-th window.

[0100] Step 3: Multi-dimensional feature splicing of enameled wire.

[0101] Given X i and Y i The signals are labeled manually, with label 0 representing normal signals, 1 representing defective signals, and 2 representing noise signals. The signals are then input into an LSTM neural network for learning and classification.

[0102] The Pearson coefficient r of the window i The similarity features of the signals within the window are used as the basis for assigning values ​​to all signals within the window. Input signals X and Y are sliced ​​into equal-length segments to construct a dataset, with a slice length of L = 70. Based on the signals at the same position along the enameled line, features from X, Y, and the correlation matrix ∑ are concatenated to construct the input sequence matrix for the LSTM neural network.

[0103]

[0104] Step 4: Construct and train a temporal memory network for signal label classification.

[0105] The dataset is divided into training and test sets in a ratio of α = 7:3. The training set is input into an LSTM neural network to extract temporal features. At each time step, the model outputs a classification label. The output classification label and the true label are compared using the cross-entropy loss function, calculated as follows:

[0106]

[0107]

[0108] When the training set loss function converges, it indicates that the LSTM neural network training is complete, and the test set can be input into the trained LSTM neural network for defect detection. Since the defective samples and normal samples in this instance are imbalanced, the ROC curve can better evaluate the classification performance of this instance. The classification ROC curve for this instance is as follows: Figure 7 As shown.

[0109] It will be understood by those skilled in the art that the above descriptions are merely preferred examples of the invention and are not intended to limit the invention. Although the invention has been described in detail with reference to the foregoing examples, those skilled in the art can still modify the technical solutions described in the foregoing examples or make equivalent substitutions for some of the technical features. All modifications and equivalent substitutions made within the spirit and principles of the invention should be included within the scope of protection of the invention.

Claims

1. A defect detection system for enameled wire based on photoelectric sensors, characterized in that, include: The system includes an infrared sensor, a microprocessor, a display module, a data processing center, a transmission device, and a positioning device. The transmission device is used to carry the enameled wire in uniform linear motion, and the positioning device is used to position the relative displacement between the infrared sensor and the enameled wire, so that the enameled wire is within the detection range of the infrared sensor. The infrared sensor includes: two sets of parallel infrared probes and a signal acquisition circuit; the two sets of infrared probes are spaced at a fixed distance, and each set of infrared probes includes a transmitter and a detector. The transmitter emits infrared light waves of a fixed wavelength, which are reflected after encountering a reflective object. The reflected infrared light signal is received by the detector, which converts the light signal into a weak electrical signal; the signal acquisition circuit amplifies the weak electrical signal and transmits it to a microprocessor; the signal acquisition circuit includes an output switch indicator light to determine whether there is a reflected object within the detection range of the infrared probes. The microprocessor receives data acquired by the infrared sensor, converts the analog electrical signal into a digital signal, and then transmits it to the data processing center; the display module is used to visualize the data acquired by the infrared sensor. The data processing center uses a defect detection algorithm to process the received signals, identify and classify abnormal defects. Specifically, the data processing center constructs a delayed signal based on the received signal and performs filtering. Then, it selects an appropriate window size and step size, calculates the similarity between two sets of delayed signals within the window, takes the similarity coefficient within each window as the similarity feature of the data within that window, and adds three categories of labels: normal, defective, and noise. The signal voltage value and similarity coefficient are concatenated into an input sequence matrix, which is then fed into an LSTM neural network. After learning, the network outputs the corresponding classification label, calculates the cross-entropy loss for each classification label, and continues until the loss function converges, resulting in a trained LSTM neural network. The test set is then input into the trained LSTM neural network for testing, and the network outputs defect classification information for enameled wires in unknown situations. The defect detection algorithm is implemented through the following sub-steps: Step 1: Acquire the delayed signal and perform filtering processing; The data processing center constructs a set of delayed signal sequences based on the received signal voltage values: , Where n is the number of signal points; and Y lags behind X by j points. x represents the actual distance between the transmitters of the two sets of infrared probes of the infrared sensor, v represents the actual speed of the AC speed-regulating motor, and f represents the sampling frequency of the microprocessor. The delayed signal sequences X and Y are filtered to eliminate numerical deviations in the sampling of the two sets of infrared sensors. Step 2: Signal similarity calculation; Set the time window size and sliding step size s, where, , ; The similarity of the datasets within each sliding window is calculated using the Pearson correlation coefficient. The expression for the Pearson correlation coefficient of the datasets within the i-th window is as follows: ; in ; ; ; ; ; In the formula, X i Let X be the signal of the i-th window. , ,and ;Y i Let Y be the Y signal of the i-th window, and ; Represents X i Expected value Represents Y i Expected value Represents X i standard deviation Represents Y i standard deviation For X i and Y i The covariance between them, r i Represents X i and Y i The Pearson correlation coefficient between them; Step 3: Multi-dimensional data splicing of enameled wire; For the known X i and Y i The signals are labeled manually, with label 0 representing normal signals, 1 representing defective signals, and 2 representing noise signals. The signals are then input into an LSTM neural network for learning and classification. The Pearson correlation coefficient r of the window is used as the similarity feature of the signals within the window; the input signals X, Y, and r are sliced ​​into equal-length slices to construct a dataset, with a slice length of L; based on the signals at the same position on the enameled line, the features of X, Y, and r are concatenated to construct the input sequence matrix of the LSTM neural network, the expression of which is as follows: ; Step 4: Construct and train the temporal memory network; The dataset is divided into a training set and a test set, with a ratio of α. The training set is input into an LSTM neural network to extract temporal features. The LSTM layer contains storage units for hidden information, a forget gate, an input gate, and an output gate. Each time the LSTM neural network is input, it combines the voltage signal and similarity information at the current time step with the hidden layer features from the previous time step. Using the sigmoid and tanh non-linear activation functions, it forgets unimportant information and remembers important information from the long-term sequence. The LSTM neural network outputs a classification label at each time step. The output classification label is then compared with the signal's true label using the cross-entropy loss function, as shown in the following expression: ; ; In the formula, The label represents the signal obtained after training with an LSTM neural network. It is a probability distribution, each element This represents the probability that a sample belongs to the k-th class, where k = 0, 1, 2; It is the one-hot encoded representation of the sample label. When the sample belongs to the k-th class, c k =1, otherwise c k =0; Loss is the loss function to be minimized, used to constrain the LSTM neural network; When the training set loss function converges, it indicates that the LSTM neural network training is complete. The test set is then input into the trained LSTM neural network for testing, and the output is the defect classification information of the enameled wire under unknown conditions.

2. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, The transmitter is an infrared diode, and the detector is a phototransistor.

3. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, Both sets of infrared probes are isolated with black light-proof shells.

4. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, The signal acquisition circuit includes: a DC power supply, a fixed resistor, two ceramic capacitors 104, a voltage comparator, and an adjustable resistor V. R1 Adjustable resistor V R2 The system includes an infrared diode, a phototransistor, an output switch indicator, and a power indicator; the infrared diode acts as the transmitter, and the NPN phototransistor acts as the detector; the base of the phototransistor receives the reflected infrared light signal, and the collector is connected to an adjustable resistor V. R2 One fixed terminal of the phototransistor has its emitter grounded; a ceramic capacitor 104 is connected in parallel across the collector and emitter of the phototransistor; the positive terminal of the infrared diode is connected in series with a current-limiting resistor to the DC power supply, and the negative terminal is grounded; the resistance value of the current-limiting resistor ranges from 95-180Ω; an adjustable resistor V... R1 One of the fixed terminals is connected to a DC power supply, the other fixed terminal is grounded, and the variable terminal is connected to the inverting input of a voltage comparator; the adjustable resistor V R2 One of its fixed terminals is connected to the positive input terminal of the voltage comparator, the collector of the phototransistor, and the output terminal A0, respectively. The output terminal A0 is connected to the signal input terminal of the microprocessor. The adjustable resistor V... R2 Both the other fixed and variable terminals are connected to a DC power supply; The positive terminal of the output switch indicator light is connected to the DC power supply, and the negative terminal is connected to the output terminal of the voltage comparator after being connected in series with a fixed resistor. A pull-up resistor is connected in series between the output terminal of the voltage comparator and the DC power supply. The positive terminal of the power indicator light is connected to the DC power supply, and the negative terminal is connected in series with a fixed resistor and then grounded. The resistance value of the fixed resistors connected in series with the output switch indicator light and the power indicator light is in the range of 296Ω-1.083kΩ. A ceramic capacitor 104 is connected in parallel across the power indicator light and the fixed resistor to buffer and protect the power indicator light.

5. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, In step 2, it is considered that the delay between environmental interference signals during the sampling process will not be strictly offset. In the Pearson similarity calculation, multiple windows with different field of view lengths are selected to reduce the deviation caused by the delay point fluctuation due to physical interference of the detection device.

6. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, The infrared sensors are multiple and are arranged in a staggered and complementary manner around the circumference of the enameled wire's path, enabling the infrared sensors to detect the complete circumferential side of the enameled wire, and each infrared sensor does not interfere with the others.

7. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, The transmission device includes: an AC speed-regulating motor, a reversible speed regulator, a horizontal straightener, and a conveyor pulley; The conveyor pulley is fixed on the shaft of the AC speed-regulating motor, which provides power for the enameled wire to travel at a constant speed. The conveyor pulley carries the enameled wire under the drive of the AC speed-regulating motor. The reversible speed controller is connected to the AC speed-regulating motor and is used to control the forward and reverse rotation direction and rotation speed of the AC speed-regulating motor. The horizontal straightener is fixed at both ends of the enameled wire in the direction of travel and is used to fix the enameled wire to be straight and avoid violent shaking deviation during the movement, and to straighten the detection error caused by the unevenness of the enameled wire.

8. The enameled wire defect detection system based on photoelectric sensors according to claim 1, characterized in that, The positioning device includes a dovetail slide and a vertical straightener; the infrared sensor is fixedly connected to the dovetail slide, and the vertical straightener is used to position the infrared probe of the infrared sensor. The infrared probe is manually adjusted so that it is on the same vertical line as the enameled wire, thereby realizing the detection of the enameled wire.

Citation Information

Patent Citations

  • Electromagnetic ultrasonic detecting device and method for surface defects of cold rolled ribbed steel bar

    CN103134856A

  • Enameled wire thickness detection device

    CN210981168U