Method for inhibiting product effect
By establishing product templates and comparing real-time detection signals with template signals, the problem of overlapping product signals and metal foreign matter signals in metal detection is solved, which significantly improves the detection accuracy of metal foreign matter and the reliability of the system.
Patent Information
- Application Number
- CN202510397278.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-04-01
AI Technical Summary
During the metal detection process, the characteristic phases of the product signal and the metal foreign matter signal may overlap greatly, resulting in the metal foreign matter signal being masked by the product signal and reducing the detection accuracy.
By establishing product templates for qualified products, including individual product template signals and template widths, obtain real-time detection signals of the product to be tested, and compare the real-time detection signals and template signals to generate effective detection signals to remove interference from product signals.
It effectively suppresses product effects, improves the detection rate and detection accuracy of metal foreign matters, reduces the occurrence of false detection and missed detection, and improves the stability and reliability of the detection system.
Smart Images

Figure CN119902290A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of metal foreign body detection, and in particular to a method for suppressing product effects. Background Art
[0002] At present, metal detectors are devices used to detect whether products contain metal foreign matter. They are widely used in food, medicine, textile and other industries to ensure product quality and safety. The device identifies metal foreign matter by the change of electromagnetic field in the probe window. The probe contains a transmitting coil and a receiving coil. The transmitting coil stimulates the electromagnetic field in the probe window through electrical signals, while the receiving coil is used to detect the change of the electromagnetic field and transmit its signal to the subsequent processing unit for analysis.
[0003] During the metal detection process, any object passing through the probe window will affect the electromagnetic field and have its own specific characteristic phase, that is, the phase interval of the electromagnetic response; in order to ensure that the product under test can pass through the detection area smoothly, the working phase of the metal detector is generally adjusted to the characteristic phase interval of the product under test. However, since the product under test itself will also affect the electromagnetic field, the product signal often exists as background noise, while the metal foreign body signal to be detected is the target signal.
[0004] However, if Figure 3-Figure 5 As shown in the figure, the blue line is the photoelectric tube signal, and the yellow line is the detection signal. In actual applications, the characteristic phase of the product signal and the characteristic phase of the metal foreign body signal may overlap greatly, causing the metal foreign body signal to be masked by the product signal. This phenomenon is called the product effect, which will significantly reduce the detection accuracy of metal foreign bodies, making it difficult to accurately identify small or low-conductivity metal foreign bodies, thereby affecting the overall performance of the metal detector. Therefore, how to effectively suppress the product effect and improve the detection rate of metal foreign bodies has become a technical problem that needs to be solved in the field of metal detection. Summary of the invention
[0005] In order to solve the problem that the product signal and the metal foreign body signal overlap with each other in the traditional metal detector, resulting in a decrease in the accuracy of metal foreign body detection, the present application provides a method for suppressing the product effect.
[0006] A method for suppressing product effects, a method for suppressing product effects comprising: Establishing a product template for qualified products, the product template at least includes a separate product template signal and a template width, wherein the template width is the width of the electromagnetic field coverage time window when the qualified product passes through the photoelectric sensor; Obtain real-time product detection signals of the product to be tested; Compare the real-time detection signal with the individual product template signal to generate a corresponding valid detection signal; Determine whether the effective detection signal is greater than the foreign object detection threshold. If it is not greater than the foreign object detection threshold, generate and push the normal product display result. If it is greater than the foreign object detection threshold, generate and push the metal foreign object presence display result and execute the corresponding alarm operation.
[0007] In a preferred example, the present application can be further configured as follows: the real-time product detection signal includes at least a detection signal S[n] and a photoelectric signal PT, the detection signal S[n] is a real-time electromagnetic signal collected by the metal detector probe receiving coil, and the photoelectric signal PT is a trigger signal generated when the photoelectric sensor detects that the product to be tested passes through the detection area.
[0008] By adopting the above technical solution, the photoelectric signal PT is used as the time reference to achieve accurate positioning of the product passing through the detection area, ensuring that the detection signal S[n] is synchronized with the physical position of the product to be tested. The introduction of the photoelectric signal enables the detection system to accurately distinguish the detection starting points of different products, prevent signal aliasing, improve signal matching accuracy, and make the detection of metal foreign bodies more accurate and reliable.
[0009] In a preferred example, the present application may be further configured as follows: the step of obtaining a real-time product detection signal of the product to be tested includes: Based on the photoelectric signal PT, determine whether the product to be tested blocks the photoelectric sensor; If not, the detection signal S[n] is determined as a valid detection signal DT[n]; If yes, the shielding moment n when the product to be tested shields the photoelectric sensor is taken as the starting point of the template width, and the shielding moment n is assigned a value, and the shielding moment n is accumulated according to the detection time of the product to be tested.
[0010] By adopting the above technical solution, before obtaining the real-time product detection signal of the product to be tested, it is possible to determine whether the product to be tested blocks the photoelectric sensor based on the photoelectric signal PT, thereby ensuring that detection is started only when the product actually enters the detection area, avoiding false detection or missed detection due to environmental interference or signal drift. At the same time, using the blocking moment n as the starting point of the template width and accumulating it according to the detection time of the product to be tested helps to accurately match the product's detection cycle, ensure the timing consistency of the signal, and improve the accuracy and stability of the detection.
[0011] In a preferred example, the present application can be further configured as follows: if yes, the blocking time n when the product to be tested blocks the photoelectric sensor is used as the starting point of the product detection cycle, and the blocking time n is assigned to 0, and after the step of starting to accumulate the blocking time n according to the time of the product to be tested detection, it also includes: According to the product template, determine the corresponding template width on the timeline; Determine whether the occlusion moment n is less than the template width; If yes, then prepare to perform the step of comparing the real-time detection signal with the separate product template signal; If not, the detection signal S[n] is determined as a valid detection signal DT[n].
[0012] By adopting the above technical solution, the corresponding template width on the time axis can be determined according to the product template, and it can be judged whether the occlusion moment n is less than the template width, thereby ensuring that the template signal covers the complete product detection cycle and improving the accuracy of signal matching. When the occlusion moment n is less than the template width, the system can smoothly enter the signal comparison stage to remove the product effect; when the occlusion moment n is greater than the template width, the detection signal S[n] is directly used as the effective detection signal DT[n] to prevent misjudgment caused by the mismatch between the template signal and the actual detection signal, thereby improving the detection accuracy and reliability of metal foreign matter.
[0013] In a preferred example, the present application may be further configured as follows: the step of comparing the real-time detection signal and the individual product template signal to generate a corresponding valid detection signal includes: Extracting a separate product template signal P[n] from the product template; The difference between the individual product template signal P[n] and the detection signal S[n] is calculated to generate the corresponding effective detection signal DT[n].
[0014] By adopting the above technical solution, in the process of comparing the real-time detection signal and the individual product template signal to generate an effective detection signal, the individual product template signal P[n] can be first extracted, and then the difference between P[n] and S[n] can be calculated, thereby effectively removing the product signal, so that the detection signal only retains the metal foreign body signal. This method can eliminate the interference of the product signal on the detection process, significantly enhance the recognizability of the metal signal, improve the detection accuracy of metal foreign bodies, reduce the probability of false detection and missed detection, and improve the stability of the detection system.
[0015] In a preferred example, the present application may be further configured as follows: the step of establishing a product template for a qualified product includes: Select a qualified product as a template product and obtain a preliminary detection signal of the template product; Performing data verification on the preliminary detection signal to determine whether the preliminary detection signal meets the preset standard; If it does not match, the push operation of changing the template product will be executed; If it meets the requirements, the corresponding template width on the time axis is determined, and a preliminary detection signal with no less than data points corresponding to the template width is stored as a separate product template signal, and a product template is constructed based on rules established based on the separate product template signal and the preset template.
[0016] By adopting the above technical solution, it is possible to select a qualified product as a template product, obtain the preliminary detection signal of the product, and then perform data verification on the signal to ensure the accuracy and reliability of the template signal. If the preliminary detection signal does not meet the preset standard, the template product can be replaced to ensure that the system uses a high-quality template signal and improve the accuracy of signal matching. If the preliminary detection signal meets the preset standard, the template width is further determined, and the corresponding data points are stored, and finally the product template is constructed so that the template signal can accurately reflect the product characteristics and improve the reliability and anti-interference ability of subsequent detection.
[0017] In a preferred example, the present application may be further configured as follows: before the step of selecting a qualified product as a template product, the step includes: Get the instruction of whether to update the product template signal; If not, enter the detection preparation state; If so, prepare to proceed to the step of selecting a qualified product as a template product.
[0018] By adopting the above technical solution, before selecting qualified products as template products, it is possible to obtain instructions on whether the product template signal needs to be updated, thereby ensuring that when product characteristics change or production processes are adjusted, the template signal can be updated in time to meet the detection needs of different batches of products. If the template signal does not need to be updated, the system can directly enter the detection preparation state to improve detection efficiency; if an update is required, the template product selection and template signal establishment can be automatically executed to ensure that the detection system always uses the optimal product template and improve the adaptability and accuracy of metal foreign body detection.
[0019] In a preferred example, the present application may be further configured as follows: the corresponding relationship between the template width and the data point is determined based on a preset signal sampling rate.
[0020] By adopting the above technical solution, the corresponding relationship between the template width and the data point can be determined based on the preset signal sampling rate, thereby ensuring that the time scale of the template signal is consistent with the time scale of the sampling signal, and ensuring that the detection system can correctly match the product signal under different sampling conditions. By reasonably setting the template width, the template signal can accurately cover the time period when the product passes through the detection area, improve the representativeness of the template signal, and thus enhance the stability and accuracy of the detection.
[0021] In a preferred example, the present application may be further configured as follows: before the step of determining whether the effective detection signal is greater than the foreign body detection threshold, the step further includes: The effective detection signal is preprocessed to eliminate the corresponding spike pulses.
[0022] By adopting the above technical solution, before judging whether the effective detection signal is greater than the foreign body detection threshold, the effective detection signal can be preprocessed to eliminate the spike pulse in the signal, thereby reducing the false detection caused by instantaneous noise or signal mutation. Through the preprocessing step, the detection signal can be smoothed, the stability of the detection can be improved, the accuracy of the subsequent threshold judgment can be ensured, and the reliability and anti-interference ability of metal foreign body detection can be improved.
[0023] In a preferred example, the present application may be further configured as follows: the step of preprocessing the effective detection signal to eliminate the corresponding spike pulse includes: Determine a corresponding spike width threshold on the time axis, and identify spike pulses in the effective detection signal based on the spike width threshold; Correct the spike pulses; Based on the digital filter, the corrected effective detection signal is filtered.
[0024] By adopting the above technical solution, the effective detection signal can be filtered based on a digital filter to eliminate spike pulses and improve the signal stability and detection accuracy. First, determine the corresponding spike width threshold on the time axis, and identify the spike pulses in the effective detection signal based on the threshold to ensure that only short-time mutation signals are processed without affecting normal metal signals. Then, the detected spike pulses are corrected, such as using interpolation or mean substitution to reduce the impact of the spike on the detection results. Finally, the corrected signal is further smoothed based on a digital filter (such as mean filtering, median filtering or low-pass filtering) to eliminate residual noise and make the final detection signal more stable, thereby improving the detection accuracy of metal foreign bodies and reducing the possibility of false detection and missed detection.
[0025] In summary, the present application includes at least one of the following beneficial technical effects: This application achieves effective suppression of product signals by establishing a product template for qualified products and utilizing the comparison operation between template signals and real-time detection signals, thereby solving the problem of decreased detection accuracy caused by the overlap of product signals and metal foreign body signals. By introducing the concept of template width, it is ensured that the template signal can accurately cover the complete features of the product passing through the detection area, thereby improving the matching accuracy. The signal zeroing processing method based on template matching is adopted to effectively offset the product signal, significantly enhancing the recognizability of the metal foreign body signal. In addition, this method takes up less computing resources and is suitable for the real-time processing requirements of existing metal detection equipment. Without changing the hardware structure, it improves the detection accuracy of metal foreign bodies and the reliability of the detection system, reduces the occurrence of missed detections and false detections, and improves the overall performance of the detection equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flowchart of a method for suppressing product effects in one embodiment of the present application; Figure 2 is another flow chart of a method for suppressing product effects in one embodiment of the present application; Figure 3 It is an oscilloscope waveform diagram of detecting a single product with a metal detector in the conventional method of the present application; Figure 4 It is an oscilloscope waveform diagram of detecting a single metal foreign body by using a metal detector in the conventional method of the present application; Figure 5 It is an oscilloscope waveform diagram of detecting products and metal foreign bodies using a metal detector in the conventional method of the present application; Figure 6 In one embodiment of the present application, a method for suppressing product effects is Figure 3 and Figure 5 The signal waveform data is exported to a table to convert it into a tabular diagram; Figure 7 It is a table diagram showing the conversion of signal waveform data of an effective detection signal in a method for suppressing product effect in one embodiment of the present application by exporting the data into a table; Figure 8 It is a table diagram showing the conversion of the signal waveform data of the peak pulse appearing in the effective detection signal in a method for suppressing the product effect in one embodiment of the present application exported to a table; Fig. 9 is a first flow chart of a method for suppressing product effects in one embodiment of the present application; Fig.10 is a flowchart for implementing step S20 in a method for suppressing product effects in one embodiment of the present application; Fig.11 This is another implementation flow chart of step S20 in a method for suppressing product effects in an embodiment of the present application; Fig.12 is a flowchart for implementing step S30 in a method for suppressing product effects in one embodiment of the present application; Fig.13 This is a flowchart for implementing step S10 in a method for suppressing product effects in one embodiment of the present application; Fig.14 This is a flowchart of implementation before step S101 in a method for suppressing product effects in one embodiment of the present application; Fig.15 This is an implementation flow chart before step S40 in a method for suppressing product effects in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The present application is further described in detail below in conjunction with the accompanying drawings.
[0028] In one embodiment, if Figure 1 , Figure 2 and Fig. 9 As shown, the present application discloses a method for inhibiting product effects, and the method for inhibiting product effects comprises: S10, establish a product template for qualified products, the product template at least includes a separate product template signal and a template width, the template width is the width of the electromagnetic field coverage time window when the qualified product passes through the photoelectric sensor; in this embodiment, a set of reference signals that can represent the electromagnetic characteristics of qualified products is stored in the detection system, and the reference signal is used to eliminate the influence of the product itself on the detection signal, so that the metal foreign body signal can be more clearly presented. The product template at least includes a separate product template signal and a template width, wherein the separate product template signal refers to the signal data extracted from the qualified product that can reflect its electromagnetic characteristics, and the template width refers to the coverage range of the template signal on the time axis, so as to ensure that the template signal can fully represent the electromagnetic characteristics of the qualified product when it passes through the detection area. By setting the product template, the detection system can compare the real-time detection signal with the template in the subsequent detection process, thereby eliminating the product effect and improving the accuracy and reliability of metal foreign body detection. For example, in the food processing industry, packaged food may have different electromagnetic response characteristics due to different materials. After establishing a template for qualified products, the interference of these characteristics on metal foreign body detection can be effectively eliminated, and the detection accuracy can be improved.
[0029] S20, obtaining the real-time product detection signal of the product to be tested; in this embodiment, the probe of the metal detector is used to collect signals from the product being tested, and the electromagnetic response characteristics of the product in the detection area are recorded in real time. The detection signal is received by the receiving coil in the detection equipment and converted into a digital signal for subsequent processing. The real-time product detection signal of the product to be tested includes the electromagnetic response signal of the product itself and the signal of the metal foreign body that may exist. In this process, the system determines the time point when the product enters the detection area through a photoelectric sensor or other positioning device to ensure that the collected signal corresponds to the real data of the product passing through the detection area. By obtaining the real-time detection signal, the electromagnetic characteristics of the product to be tested can be accurately captured, providing a basis for subsequent signal comparison and metal foreign body detection. For example, in the pharmaceutical industry, the material and thickness of the drug packaging may affect the propagation characteristics of the electromagnetic signal. By accurately obtaining the real-time detection signal of the product to be tested, the problem of false detection or missed detection caused by the characteristics of the drug outer packaging can be avoided.
[0030] S30, compare the real-time detection signal and the individual product template signal to generate a corresponding effective detection signal; in this embodiment, the currently detected real-time product detection signal and the pre-stored individual product template signal are calculated and processed to eliminate the electromagnetic signal interference of the product itself, so that the metal foreign body signal can be highlighted. Specifically, by the method of signal subtraction, the product signal part in the real-time detection signal is removed, so that the detection signal only retains the possible metal foreign body signal. This processing process can effectively improve the detectability of metal foreign bodies. During the signal comparison process, the system will consider the time axis alignment problem of the product template to ensure that the calculated effective detection signal accurately reflects the characteristics of the metal foreign body. For example, in the textile industry, some fabrics themselves have weak electromagnetic characteristics, which may interfere with the normal operation of the metal detection system. By comparing the real-time signal with the template signal, the influence of the fabric itself can be effectively removed, thereby accurately identifying the metal impurities therein.
[0031] S40, determine whether the effective detection signal is greater than the foreign body detection threshold. If it is not greater than the foreign body detection threshold, generate and push the normal display result of the product. If it is greater than the foreign body detection threshold, generate and push the metal foreign body presence display result, and perform the corresponding alarm operation. In this embodiment, after completing the signal comparison, the system analyzes the obtained effective detection signal and compares it with the preset metal foreign body detection threshold to determine whether the product contains metal foreign matter. The threshold is determined by experimental data and the actual application environment, and is usually set to a signal strength that can stably detect the minimum metal foreign body size. When the effective detection signal is lower than the threshold, the system determines that the product does not contain metal foreign matter and pushes the normal detection result of the product; when the effective detection signal is greater than the threshold, the system determines that metal foreign matter is detected and triggers the corresponding alarm mechanism, such as sound and light alarm, rejection device activation, etc., so as to handle unqualified products. This step ensures that the detection system can provide reliable metal foreign body detection capabilities while operating efficiently. For example, in the food industry, if small metal fragments are mixed into a batch of packaged food, the system can accurately detect this abnormality through threshold judgment, and remove the batch of products through the rejection device to ensure food safety.
[0032] In one embodiment, if Figure 3 As shown, in step S20, the real-time product detection signal at least includes a detection signal S[n] and a photoelectric signal PT. The detection signal S[n] is a real-time electromagnetic signal collected by the metal detector probe receiving coil, and the photoelectric signal PT is a trigger signal generated when the photoelectric sensor detects that the product to be tested passes through the detection area.
[0033] In this embodiment, the detection signal S[n] is collected and converted by the receiving coil of the metal detector probe, which can accurately reflect the response characteristics of the product to be tested in the electromagnetic field, including the electromagnetic signal of the product itself and the signal of the metal foreign body that may exist; the photoelectric signal PT is obtained by the photoelectric sensor, which is used to detect when the product to be tested passes through the detection area, and generates a corresponding trigger signal to provide a time synchronization reference for the detection system. By adopting this technical solution, it can ensure that the detection signal S[n] corresponds accurately to the time point when the product actually passes through the detection area, thereby improving the accuracy and reliability of the detection data. The introduction of the photoelectric signal PT enables the detection system to accurately determine the moment when the product enters the detection area, avoiding misjudgment or missed detection caused by the misalignment of the detection signal and the product position. In addition, the solution can also improve the stability of signal matching, make the subsequent signal processing process more accurate, effectively reduce the interference caused by changes in the external environment or errors in the detection equipment, thereby enhancing the detection accuracy of metal foreign bodies, improving the overall detection performance of the system, and using the photoelectric signal PT as a time reference to achieve accurate positioning of the product passing through the detection area, ensuring that the detection signal S[n] is synchronized with the physical position of the product to be tested. The introduction of photoelectric signals enables the detection system to accurately distinguish the detection starting points of different products, prevent signal aliasing, improve signal matching accuracy, and make the detection of metal foreign bodies more accurate and reliable.
[0034] In one embodiment, if Fig.10 As shown, in step S20, i.e., the step of obtaining a real-time product detection signal of the product to be tested, the following steps are included: S201. Based on the photoelectric signal PT, determine whether the product to be tested blocks the photoelectric sensor; specifically, the photoelectric signal PT is obtained by the photoelectric sensor and is used to detect when the product enters the detection area. The photoelectric sensor is usually installed above or on the side of the detection channel of the metal detector and is blocked when the product passes through, thereby triggering a signal change. By monitoring the state of the photoelectric signal PT, it is possible to accurately determine whether the product to be tested has entered the detection area, ensuring that the system starts collecting detection signals at the correct time point. This method can avoid erroneous detection caused by environmental interference or false triggering, and improve the accuracy and stability of detection. For example, in an assembly line production environment, products pass through the detection area at a certain interval, and the precise triggering of the photoelectric signal can ensure that each product is detected at the correct position, thereby improving the overall detection efficiency.
[0035] S202. If not, the detection signal S[n] is determined as a valid detection signal DT[n]; specifically, when the photoelectric signal PT is not blocked, it means that no product has passed through the current detection area, or the photoelectric sensor has not correctly detected the product. In this case, the system will not perform template matching or product signal elimination operations, but directly use the current detection signal S[n] as a valid detection signal DT[n]. This method ensures that when no product passes through the detection area, the system will not perform meaningless signal processing, thereby improving computing efficiency and reducing unnecessary computing resource usage. In addition, this strategy can also reduce the probability of false alarms, allowing the system to maintain a stable output when detecting non-product signals. For example, in some production scenarios, there may be gaps on the conveyor belt or uneven product arrangement. Directly using S[n] as a valid detection signal DT[n] can ensure that the system will not trigger a false metal foreign body alarm when the product has not entered the detection area.
[0036] S203, if yes, then the occlusion moment n when the product to be tested blocks the photoelectric sensor is used as the starting point of the template width, and the occlusion moment n is assigned to 0, and the occlusion moment n is accumulated according to the time of the product to be tested. Specifically, when the photoelectric signal PT is blocked, the system determines that the product has entered the detection area, and uses this moment as the starting point of product detection. The occlusion moment n represents the time coordinate of the product passing through the detection area, and is used to calculate the motion state of the product in the detection area. By initializing the occlusion moment n to 0 and gradually accumulating it according to the preset sampling frequency, an accurate time reference can be established to ensure that the real-time detection signal is synchronized with the product position. The introduction of this step enables the system to accurately define the product detection cycle, provide a time reference for subsequent template matching and signal processing, and improve the accuracy of signal matching. For example, in a metal detection system, the passing speed of different products may be different. Using the occlusion moment n as a time reference can ensure that the detection system adapts to production lines with different speeds and improve the adaptability and reliability of detection.
[0037] In summary, before obtaining the real-time product detection signal of the product to be tested, it is possible to determine whether the product to be tested blocks the photoelectric sensor based on the photoelectric signal PT, thereby ensuring that detection is started only when the product actually enters the detection area, avoiding false detection or missed detection due to environmental interference or signal drift. At the same time, using the blocking moment n as the starting point of the template width and accumulating it according to the detection time of the product to be tested helps to accurately match the product's detection cycle, ensure the timing consistency of the signal, and improve the accuracy and stability of the detection.
[0038] In one embodiment, if Fig.11As shown, after step S203, that is, if yes, the blocking time n when the product to be tested blocks the photoelectric sensor is taken as the starting point of the product detection cycle, and the blocking time n is assigned as, after the step of starting to accumulate the blocking time n according to the time of the product to be tested detection, it also includes: S204. Determine the corresponding template width on the time axis according to the product template; specifically, the product template refers to a pre-stored signal data set that can reflect the electromagnetic characteristics of qualified products, wherein the template width refers to the duration of the product signal on the time axis, that is, the time required for the product to pass through the detection area. The determination of the template width is usually based on historical data analysis or experimental measurement, and is closely related to the product size, transmission speed, and sampling rate of the detection equipment. By accurately calculating the template width, it can be ensured that the template signal can completely cover the time range for the product to pass through the detection area, providing an accurate time reference for subsequent signal matching and product effect suppression. For example, on a food production line, the time for foods in different packaging forms to pass through the detection area may be different. For longer products, the template width may need to be larger to ensure that the template signal can fully cover the entire process of the product passing through the detection area.
[0039] S205, determine whether the occlusion moment n is less than the template width; specifically, the occlusion moment n represents the time coordinate of the product passing through the detection area, and the time coordinate begins to accumulate from the moment the product blocks the photoelectric sensor. The system determines whether the product is still within the time range covered by the template signal by comparing the current occlusion moment n with the preset template width. If the occlusion moment n is less than the template width, it means that the product is still in the applicable range of the template signal, and the product template can be used for signal matching and processing; if the occlusion moment n is greater than the template width, it means that the product has exceeded the applicable range of the template signal and a different signal processing strategy needs to be adopted. This step can ensure that the product signal is compared within a reasonable time range, improve the accuracy of template matching, and avoid errors caused by time dislocation. For example, on a high-speed assembly line, some products may pass through the detection area at a faster speed. If the occlusion moment n is not compared with the template width, the system may incorrectly apply the template signal, thereby affecting the accuracy of metal foreign body detection.
[0040] S206. If yes, prepare to perform the step of comparing the real-time detection signal and the individual product template signal; specifically, when the occlusion moment n is still within the template width, the system will perform a matching calculation of the product signal to remove the interference of the product signal on the metal foreign body detection. The process includes extracting the individual product template signal P[n] and calculating it with the current real-time detection signal S[n] to generate an effective detection signal DT[n]. Through this operation, the electromagnetic response signal of the product itself can be effectively reduced, making the metal foreign body signal more prominent and improving the accuracy of the detection system. The reasonable execution of this step ensures that the detection system can correctly apply the template matching technology during the critical time period when the product passes through the detection area, thereby avoiding the product signal affecting the identification of metal foreign bodies. For example, in the pharmaceutical industry, some drug packaging may be made of high-impedance materials, which are easy to interfere with the detection signal. If the template matching technology can be used within the correct time window, the influence of the packaging material can be effectively reduced and the detection rate of metal foreign bodies can be improved.
[0041] S207. If not, the detection signal S[n] is determined as a valid detection signal DT[n]; specifically, when the occlusion moment n exceeds the template width, it indicates that the product has exceeded the applicable time range of the template signal. At this time, the system no longer performs template matching calculations, but directly uses the current real-time detection signal S[n] as the valid detection signal DT[n] to ensure the detection continuity of the system. This method ensures that the system can still perform detection normally when the template signal is unavailable, and will not cause detection interruption or abnormal judgment due to failure of the template signal. The application of this strategy can improve the adaptability of the system under different production conditions and ensure that metal foreign body detection can be carried out continuously. For example, on a packaging production line, some products may take longer or shorter time to pass through the detection area than the standard template time due to differences in appearance. By flexibly adjusting the signal processing method, it can adapt to different product detection requirements and ensure the stable operation of the detection system.
[0042] In summary, the corresponding template width on the time axis can be determined according to the product template, and based on this, it can be judged whether the occlusion moment n is less than the template width, thereby ensuring that the template signal covers the complete product detection cycle and improving the accuracy of signal matching. When the occlusion moment n is less than the template width, the system can smoothly enter the signal comparison stage to remove the product effect; when the occlusion moment n is greater than the template width, the detection signal S[n] is directly used as the effective detection signal DT[n] to prevent misjudgment caused by the mismatch between the template signal and the actual detection signal, thereby improving the detection accuracy and reliability of metal foreign bodies.
[0043] In one embodiment, if Fig.12 As shown, in step S30, that is, the step of comparing the real-time detection signal and the individual product template signal to generate a corresponding effective detection signal, includes: S301, extracting a separate product template signal P[n] from the product template; specifically, the separate product template signal P[n] refers to electromagnetic signal data collected and stored in advance from qualified products, and the signal can accurately reflect the electromagnetic characteristics of qualified products when passing through the metal detector. Since different products may have different materials, shapes or packaging methods, their influence on the electromagnetic field is also different. Therefore, when establishing a product template, it is necessary to select representative qualified products for multiple tests and extract stable electromagnetic signals as separate product template signals P[n]. The process of extracting the template signal is usually completed in the storage module of the detection system. When the system performs the detection task, it will call the corresponding product template from the storage and match the applicable separate product template signal P[n] according to the product type. Through this method, it can ensure that the system uses the correct reference signal during the detection process to achieve comparative calculation and improve the accuracy of the detection. For example, in the food processing industry, different brands of chocolate may have different packaging materials, and their electromagnetic characteristics are different. Therefore, during the detection process, it is necessary to call the corresponding product template for different brands of chocolate to ensure the reliability of the detection results.
[0044] S302, calculate the difference between the individual product template signal P[n] and the detection signal S[n], and generate the corresponding effective detection signal DT[n]; specifically, the detection signal S[n] is the electromagnetic signal collected in real time when the product to be tested passes through the detection area, and the signal contains the electromagnetic effect of the product itself and the possible metal foreign body signal. Since the electromagnetic signal of the product itself may overlap with the metal foreign body signal, directly analyzing S[n] may lead to false detection or missed detection. Therefore, by calculating the difference between S[n] and the individual product template signal P[n], the electromagnetic effect of the product itself can be removed, and only the possible metal foreign body signal is retained to generate the effective detection signal DT[n]. This calculation method is essentially a process of removing background noise, which can enhance the contrast of the metal signal and improve the detection rate of metal foreign bodies. A key point of this method is that the product template signal P[n] must be highly matched with the actual signal of the product to be tested. Therefore, time synchronization and amplitude adjustment may be required during template extraction and signal processing to ensure the accuracy of the calculation. For example, in the pharmaceutical industry, the packaging materials of certain drugs may cause significant interference to metal detection signals. This method can effectively remove the background noise caused by the packaging materials, allowing tiny metal foreign body signals to appear, thereby improving the reliability of drug quality detection.
[0045] In summary, in the process of generating effective detection signals by comparing the real-time detection signal and the individual product template signal, the individual product template signal P[n] can be extracted first, and then the difference between P[n] and S[n] can be calculated, thereby effectively removing the product signal and making the detection signal retain only the metal foreign body signal. This method can eliminate the interference of the product signal on the detection process, significantly enhance the recognizability of the metal signal, improve the detection accuracy of metal foreign bodies, reduce the probability of false detection and missed detection, and improve the stability of the detection system.
[0046] In one embodiment, if Fig.13 As shown, in step S10, i.e., the step of establishing a product template of a qualified product, it includes: S101. Select a qualified product as a template product and obtain a preliminary detection signal of the template product; specifically, the template product refers to a qualified product that meets the quality standards and does not contain metal foreign matter, and its electromagnetic characteristics can represent the typical characteristics of similar products. In the process of establishing a product template, the system will select one or more qualified products on the conveyor belt for detection, and obtain the preliminary detection signal of the product through the probe receiving coil of the metal detector. The preliminary detection signal is the real-time electromagnetic response data of the product when it passes through the detection area, including the influence of factors such as the material, shape, and packaging method of the product on the electromagnetic field. By collecting the preliminary detection signal of the template product, benchmark data can be provided for subsequent template matching to ensure that the detection system can correctly identify the signal characteristics of the product itself. For example, in the food processing industry, different types of biscuits may have different packaging materials and forms, so it is necessary to select a piece of qualified biscuits as a template product to ensure that the signal of the biscuit itself and the potential metal foreign matter signal can be accurately distinguished in the subsequent detection process.
[0047] S102, perform data verification on the preliminary detection signal to determine whether the preliminary detection signal meets the preset standard; specifically, data verification refers to analyzing the preliminary detection signal of the template product to determine whether it meets the preset electromagnetic characteristic standard. Since the electromagnetic signal of a qualified product usually fluctuates within a certain range, the system will set a set of standard parameters, such as signal amplitude, phase range, stability, etc., and compare the collected preliminary detection signal with these standard parameters. If the preliminary detection signal is within the standard range, it means that the electromagnetic characteristics of the template product are stable and suitable as a product template; if the signal deviation is large, it may mean that the product quality is unstable or the external environment has caused a large interference to the signal, and the template product needs to be reselected. The data verification process ensures the accuracy and consistency of the template signal, so that the product effect can be more effectively eliminated in the subsequent detection process, and the detection accuracy of metal foreign bodies can be improved. For example, in the field of drug detection, different batches of capsules may cause changes in electromagnetic characteristics due to slight differences in filler density. Through data verification, the most representative template products can be screened out to ensure the stability of the metal detection system.
[0048] S103. If it does not meet the requirements, the push operation of replacing the template product is executed; specifically, if the preliminary detection signal fails to pass the data verification, the system will automatically execute the push operation of replacing the template product to select a new qualified product for detection. The purpose of this step is to ensure the quality of the product template so that it can accurately reflect the typical electromagnetic characteristics of qualified products. The push operation of replacing the template product can be performed automatically. For example, during the assembly line detection process, the system can continuously collect preliminary detection signals of multiple products until a template product that meets the standards is found; it can also be manually triggered, for example, the operator manually selects a new template product and re-collects the signal according to the prompt of the detection system. This step can effectively avoid subsequent detection errors caused by template product quality problems and improve the reliability of template signals. For example, in the dairy industry, the electromagnetic characteristics of some cheese products may deviate due to different water content or processing technology. The system can automatically replace the template product to ensure that the final selected product template can represent the standard characteristics of the batch of products, thereby improving the accuracy of metal detection.
[0049] S104. If it meets the requirements, the corresponding template width on the time axis is determined, and the preliminary detection signal with no less than the data points corresponding to the template width is stored as a separate product template signal, and the product template is constructed based on the separate product template signal and the preset template. Specifically, when the preliminary detection signal passes the data verification, the system will determine the template width of the product signal on the time axis and store enough data points to construct a complete product template. The template width refers to the time range that the product stays in the detection area, which is jointly determined by the conveyor belt speed, product size and the sampling rate of the detection equipment. In order to ensure that the product template can fully reflect the product signal characteristics, the system will store no less than the data points corresponding to the template width, and use these data points as a separate product template signal. Subsequently, based on the separate product template signal and the preset template establishment rules, the system processes the signal into a final product template for subsequent detection tasks. Through this step, the system can establish an accurate and stable product template, so that the product effect can be effectively suppressed during subsequent detection, and the recognition ability of metal foreign bodies can be improved. For example, in frozen food inspection, frozen foods of different thicknesses take different times to pass through the inspection area on the conveyor belt. The system needs to dynamically calculate the template width and store enough signal data points to ensure that the template can be applied to different batches of products, thereby improving the accuracy and stability of metal detection.
[0050] In summary, it is possible to select a qualified product as a template product, obtain the preliminary detection signal of the product, and then perform data verification on the signal to ensure the accuracy and reliability of the template signal. If the preliminary detection signal does not meet the preset standard, the template product can be replaced to ensure that the system uses a high-quality template signal and improve the accuracy of signal matching. If the preliminary detection signal meets the preset standard, the template width is further determined, and the corresponding data points are stored, and finally the product template is constructed so that the template signal can accurately reflect the product characteristics and improve the reliability and anti-interference ability of subsequent detection.
[0051] In one embodiment, if Fig.14 As shown, before step S20, that is, before the step of selecting a qualified product as a template product, the following steps are included: S1001. Obtain an instruction on whether the product template signal needs to be updated; specifically, the instruction is used to determine whether the product template signal currently used by the system is still applicable to the product to be detected, or whether a new template signal needs to be re-collected. The instruction can be automatically triggered by the system, for example, when it detects that the product batch has been replaced, the equipment operation time has reached a preset period, or the stability of the template signal has decreased, the system will actively issue a request to update the template; it can also be manually input by the operator, for example, when the production line switches the product type or adjusts the detection parameters, the template update instruction is manually triggered. By obtaining this instruction, the system can determine whether it is necessary to re-select qualified products and establish a new product template according to the actual situation, thereby improving the adaptability and accuracy of the detection. For example, on a food production line, if different brands of packaging materials are replaced, the material may have different effects on the electromagnetic signal of the metal detector. At this time, the system will automatically detect the signal deviation and trigger the template update to ensure the detection accuracy of the new product.
[0052] S1002, if not, then enter the detection preparation state; specifically, when the system determines that there is no need to update the product template signal, it means that the current template is still applicable to the current product to be tested, and the system does not need to execute a new template acquisition process, but directly enters the detection preparation state. The detection preparation state refers to the initialization process of the system before the detection, including calibrating the probe, adjusting the detection phase, clearing the cache data, and waiting for the product to be tested to enter the detection area. This state ensures that the system can perform metal foreign body detection under optimal conditions and reduce false detection or missed detection caused by improper template switching. In this way, the operating efficiency of the detection system can be improved, unnecessary template reset operations can be avoided, and the system can quickly enter the detection mode when the product batch has not changed. For example, in the pharmaceutical industry, some drugs may maintain the same packaging and materials during continuous production. If the template is recreated for each detection, it will not only increase the calculation burden of the system, but also reduce the detection efficiency of the production line. Therefore, the system can directly enter the detection preparation state when the template is stable to ensure the consistency and stability of the detection.
[0053] S1003. If so, prepare to proceed with the step of selecting a qualified product as a template product; specifically, when the system determines that the product template signal needs to be updated, it indicates that the current template is no longer applicable to subsequent detection tasks, and the system will enter a new template establishment process. The step of preparing to select a qualified product includes multiple initialization operations, such as clearing old template data, adjusting signal acquisition parameters, resetting template matching thresholds, and ensuring that the newly acquired template signal meets the current detection requirements. The core goal of this process is to ensure that the new product template can accurately reflect the electromagnetic characteristics of qualified products, so as to effectively remove product effects in subsequent detections and improve the ability to identify metal foreign bodies. For example, in the detection of metal-packaged foods, if the production line switches from plastic-packaged foods to aluminum foil-packaged foods, the metal detector's probe will have different electromagnetic responses to the two packages. At this time, the system needs to prepare to select a new qualified product as a template to establish a template signal that matches the new packaging material to ensure the accuracy of metal foreign body detection.
[0054] In summary, before selecting qualified products as template products, it is possible to obtain instructions on whether the product template signal needs to be updated, so as to ensure that when product characteristics change or production processes are adjusted, the template signal can be updated in time to meet the detection needs of different batches of products. If the template signal does not need to be updated, the system can directly enter the detection preparation state to improve detection efficiency; if an update is required, the template product selection and template signal establishment can be automatically executed to ensure that the detection system always uses the optimal product template and improve the adaptability and accuracy of metal foreign body detection.
[0055] In one embodiment, in step S104 , the correspondence between the template width and the data points is determined based on a preset signal sampling rate.
[0056] In summary, the correspondence between the template width and the data point can be determined based on the preset signal sampling rate, thereby ensuring that the time scale of the template signal is consistent with the time scale of the sampling signal, and ensuring that the detection system can correctly match the product signal under different sampling conditions. By reasonably setting the template width, the template signal can accurately cover the time period when the product passes through the detection area, improve the representativeness of the template signal, and thus enhance the stability and accuracy of the detection.
[0057] In one embodiment, if Figure 8 and Fig.15 As shown, before step S40, that is, before the step of determining whether the effective detection signal is greater than the foreign body detection threshold, the method further includes: The effective detection signal is preprocessed to eliminate the corresponding spike pulses.
[0058] In this embodiment, Figure 8The red curve shown represents DT after eliminating the product effect. The spike signal will far exceed the original single product template signal P (blue line) and the real-time detection signal S (orange line), causing false alarms. Since this spike pulse is very short, generally within 50ms, it can be removed after a certain processing by a digital filter, which has little effect on the final detection effect. Before judging whether the effective detection signal is greater than the foreign body detection threshold, the effective detection signal can be pre-processed to eliminate the spike pulse in the signal, thereby reducing false detection caused by instantaneous noise or signal mutation. Through the preprocessing step, the detection signal can be smoothed, the stability of the detection can be improved, the accuracy of the subsequent threshold judgment can be ensured, and the reliability and anti-interference ability of metal foreign body detection can be improved.
[0059] In one embodiment, if Figure 3 As shown, in step S20, that is, the step of preprocessing the effective detection signal to eliminate the corresponding spike pulse, it includes: S31. Determine the corresponding peak width threshold on the time axis, and identify the spike pulses in the effective detection signal based on the peak width threshold; specifically, the peak width threshold refers to a time range defined on the time axis, which is used to distinguish normal detection signals from short-term sudden spike noise. Normally, the signal of the metal detector is relatively stable, and the spike pulses are often caused by instantaneous interference, external vibration, electronic noise or asynchrony when the product passes through the detection area. The duration of these spike pulses is usually within tens of milliseconds, so by setting an appropriate peak width threshold, those abnormal signals with a duration less than the threshold can be marked as spike pulses. In signal processing, the system will scan the effective detection signal and identify those signal fluctuations that appear and disappear quickly in a very short time according to the set peak width threshold, to ensure that the real metal foreign body signal will not be misjudged as a spike pulse. For example, during the food metal detection process, if the conveyor belt vibrates slightly, it may generate short spike pulses on the detection signal. These signals do not represent the actual presence of metal foreign matter. By setting a reasonable spike width threshold, these irrelevant signals can be effectively identified and processed, thereby reducing the occurrence of false alarms.
[0060] S32, correct the spike pulse; specifically, when the detection system identifies the spike pulse, the pulse signal needs to be corrected to reduce its impact on the subsequent metal foreign body detection. The correction method may include interpolation correction, mean substitution or dynamic adjustment. For example, interpolation correction can replace the spike pulse with the average value of several normal signal points before and after to restore the signal to smoothness; mean substitution is to replace the abnormal value with the mean value of the detection signal before and after the spike pulse to ensure the continuity of the signal; and dynamic adjustment can be based on the amplitude and phase characteristics of the spike pulse. The pulse is nonlinearly compensated to minimize its interference with the effective detection signal. The purpose of the correction process is to ensure that the system does not affect the integrity of the metal foreign body signal while eliminating invalid interference, so that the detection system can still accurately identify the real metal foreign body. For example, in the process of metal foreign body detection in the pharmaceutical industry, since some drugs may be packaged in metal foil, occasionally a transient spike signal will be generated due to the electromagnetic interference of the detection machine. If no correction is performed, the system may mistakenly believe that there is a metal foreign body and cause a misjudgment. Therefore, a reasonable correction of the spike pulse can ensure the stability of the detection system and the reliability of the detection results.
[0061] S33. Based on the digital filter, the corrected effective detection signal is filtered; specifically, the digital filter is a signal processing technology that can smooth the high-frequency noise, short-term interference or abnormal signal in the signal, thereby improving the signal quality. After the spike pulse is corrected, there may still be some signal fluctuations, so it is necessary to further optimize the signal through the digital filter. Common digital filtering methods include mean filtering, median filtering and low-pass filtering. Mean filtering can smooth the mutation signal by calculating the average value of multiple continuous signal points; median filtering can effectively remove isolated abnormal points while maintaining the edge characteristics of the signal; low-pass filtering can eliminate high-frequency noise and make the signal more stable. In the detection system, the application of digital filtering can effectively reduce the impact of spike pulses on subsequent metal detection algorithms, ensuring that the detection system can still maintain a high detection accuracy in complex environments. For example, in the metal detection process of the textile industry, since the fabric itself may contain conductive fibers, these fibers may produce short-term high-frequency fluctuations in the detection signal. If proper filtering is not performed, it may cause false alarms. Through the optimization of the digital filter, these irrelevant signals can be effectively removed and the stability of metal foreign body detection can be improved.
[0062] In summary, the effective detection signal can be filtered based on a digital filter to eliminate spike pulses and improve the signal stability and detection accuracy. First, determine the corresponding spike width threshold on the time axis, and identify the spike pulses in the effective detection signal based on the threshold to ensure that only short-time mutation signals are processed without affecting normal metal signals. Then, the detected spike pulses are corrected, such as using interpolation or mean substitution to reduce the impact of the spikes on the detection results. Finally, the corrected signal is further smoothed based on a digital filter (such as mean filtering, median filtering or low-pass filtering) to eliminate residual noise and make the final detection signal more stable, thereby improving the detection accuracy of metal foreign bodies and reducing the possibility of false detection and missed detection.
[0063] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for inhibiting product effects, characterized in that: The method for inhibiting product effect comprises: Establishing a product template for a qualified product, wherein the product template includes at least a separate product template signal and a template width, wherein the template width is the width of the electromagnetic field coverage time window when the qualified product passes through the photoelectric sensor; Obtain real-time product detection signals of the product to be tested; Comparing the real-time detection signal with the individual product template signal to generate a corresponding valid detection signal; Determine whether the effective detection signal is greater than the foreign object detection threshold. If it is not greater than the foreign object detection threshold, generate and push the normal product display result. If it is greater than the foreign object detection threshold, generate and push the metal foreign object presence display result and execute the corresponding alarm operation.
2. A method for suppressing product effects according to claim 1, characterized in that: The real-time product detection signal includes at least a detection signal S[n] and a photoelectric signal PT. The detection signal S[n] is a real-time electromagnetic signal collected by a metal detector probe receiving coil, and the photoelectric signal PT is a trigger signal generated when a photoelectric sensor detects that the product to be tested passes through a detection area.
3. A method for suppressing product effect according to claim 2, characterized in that: The step of obtaining a real-time product detection signal of the product to be tested includes: Based on the photoelectric signal PT, determining whether the product to be tested blocks the photoelectric sensor; If not, the detection signal S[n] is determined as a valid detection signal DT[n]; If yes, the shielding moment n when the product to be tested shields the photoelectric sensor is used as the starting point of the template width, and the shielding moment n is assigned to 0, and the shielding moment n is accumulated according to the detection time of the product to be tested.
4. A method for suppressing product effect according to claim 3, characterized in that: If so, the blocking time n when the product to be tested blocks the photoelectric sensor is taken as the starting point of the product detection cycle, and the blocking time n is assigned to 0, and after the step of accumulating the blocking time n according to the time of the product to be tested detection, the method further includes: According to the product template, determining the corresponding template width on the time axis; Determine whether the shielding moment n is less than the template width; If yes, prepare to perform the step of comparing the real-time detection signal with the individual product template signal; If not, the detection signal S[n] is determined as a valid detection signal DT[n].
5. A method for suppressing product effect according to claim 2, characterized in that: The step of comparing the real-time detection signal with the individual product template signal to generate a corresponding valid detection signal includes: Extracting the individual product template signal P[n] from the product template; The difference between the individual product template signal P[n] and the detection signal S[n] is calculated to generate a corresponding effective detection signal DT[n].
6. A method for suppressing product effects according to claim 1, characterized in that: The step of establishing a product template for a qualified product includes: Selecting a qualified product as a template product and obtaining a preliminary detection signal of the template product; Performing data verification on the preliminary detection signal to determine whether the preliminary detection signal meets a preset standard; If it does not match, the push operation of changing the template product will be executed; If it meets the requirements, the corresponding template width on the time axis is determined, and a preliminary detection signal with no less than data points corresponding to the template width is stored as a separate product template signal, and the product template is constructed based on the separate product template signal and the preset template establishment rules.
7. A method for suppressing product effects according to claim 6, characterized in that: Before the step of selecting a qualified product as a template product, the method includes: Get the instruction of whether to update the product template signal; If not, enter the detection preparation state; If so, prepare to proceed to the step of selecting a qualified product as a template product.
8. A method for suppressing product effects according to claim 6, characterized in that: The corresponding relationship between the template width and the data point is determined based on a preset signal sampling rate.
9. A method for suppressing product effects according to claim 1, characterized in that: Before the step of determining whether the effective detection signal is greater than the foreign object detection threshold, the method further includes: The effective detection signal is preprocessed to eliminate the corresponding spike pulse.
10. A method for suppressing product effects according to claim 9, characterized in that: The step of preprocessing the effective detection signal to eliminate the corresponding spike pulse includes: Determine a corresponding peak width threshold on the time axis, and identify a peak pulse in the effective detection signal based on the peak width threshold; performing correction processing on the spike pulse; Based on the digital filter, the corrected effective detection signal is filtered.
Citation Information
Patent Citations
Clothes treatment equipment and metal foreign matter detection method
CN116145384A
Intelligent detection method and system of metal detector
CN118884539A
Apparatus and method for automatic product effect compensation in radio frequency metal detectors
US20110074401A1
Inspection system
WO2011148991A1