A method for suppressing product effects
By establishing product templates and comparing real-time detection signals, the problem of degradation of detection accuracy caused by overlapping product signals and metal foreign matter signals is solved, and high-precision metal foreign matter detection is achieved.
Patent Information
- Application Number
- CN202510397278.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-06-20
- 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 signal with the template signals to generate an effective detection signal to determine whether it is greater than the foreign object detection threshold to determine whether there is a metal foreign object.
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 reliability and overall performance of the detection system.
Smart Images

Figure CN119902290B_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 Figures 3 - 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:
[0007] Establish a product template for qualified products, the product template at least includes a separate product template signal and a template width, 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;
[0008] Obtain real-time product detection signals of the product to be tested;
[0009] Compare the real-time product detection signal and the individual product template signal to generate a corresponding valid detection signal;
[0010] Determine whether the valid 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 display result of the product. If it is greater than the foreign object detection threshold, generate and push the display result indicating the presence of a metal foreign object, and perform the corresponding alarm operation.
[0011] In a preferred example, the present application can be further configured as follows: 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 receiving coil of the metal detector probe, and the photoelectric signal PT is a trigger signal generated by detecting the product to be tested passing through the detection area by a photoelectric sensor.
[0012] By adopting the above technical solution, using the photoelectric signal PT as the time reference, the accurate positioning of the product passing through the detection area is realized, ensuring the synchronization of the detection signal S[n] 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 the signal matching accuracy, and make the detection of metal foreign objects more accurate and reliable.
[0013] In a preferred example, the present application can be further configured as follows: In the step of obtaining the real-time product detection signal of the product to be tested, it includes:
[0014] Based on the photoelectric signal PT, determine whether the product to be tested blocks the photoelectric sensor;
[0015] If not, determine the detection signal S[n] as the valid detection signal DT[n];
[0016] If so, use the occlusion moment n when the product to be tested blocks the photoelectric sensor as the starting point of the template width, and assign the occlusion moment n as, and accumulate starting from the occlusion moment n according to the detection time of the product to be tested.
[0017] By adopting the above technical solution, it is possible to determine whether the product to be tested blocks the photoelectric sensor based on the photoelectric signal PT before obtaining the real-time product detection signal of the product to be tested, thereby ensuring that the detection only starts when the product truly enters the detection area, avoiding false detection or missed detection caused by environmental interference or signal drift. At the same time, using the occlusion moment n as the starting point of the template width and accumulating according to the detection time of the product to be tested helps to accurately match the detection cycle of the product, ensure the timing consistency of the signal, and improve the accuracy and stability of the detection.
[0018] In a preferred example, the present application can be further configured as follows: If so, the occlusion moment n when the product to be tested occludes the photoelectric sensor is taken as the starting point of the product detection cycle, and the occlusion moment n is assigned the value of 0. After the step of accumulating the occlusion moment n starting from the time of product detection of the product to be tested, the following steps are further included:
[0019] Determine the corresponding template width on the time axis according to the product template;
[0020] Judge whether the occlusion moment n is less than the template width;
[0021] If so, prepare to execute the step of comparing the real-time product detection signal and the individual product template signal;
[0022] If not, determine the detection signal S[n] as the effective detection signal DT[n].
[0023] By adopting the above technical solution, it is possible to determine the corresponding template width on the time axis according to the product template, and accordingly judge whether the occlusion moment n is less than the template width, so as to ensure that the template signal covers the complete product detection cycle and improve 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 objects.
[0024] In a preferred example, the present application can be further configured as follows: In the step of comparing the real-time product detection signal and the individual product template signal to generate the corresponding effective detection signal, the following steps are included:
[0025] Extract the individual product template signal P[n] in the product template;
[0026] Calculate the difference between the individual product template signal P[n] and the detection signal S[n] to generate the corresponding effective detection signal DT[n].
[0027] By adopting the above technical solution, in the process of comparing the real-time product detection signal and the individual product template signal to generate the effective detection 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, so as to effectively remove the product signal and make the detection signal only retain the metal foreign object 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 objects, reduce the probability of false detection and missed detection, and improve the stability of the detection system.
[0028] In a preferred example, the present application can be further configured as follows: In the step of establishing the product template of the qualified product, the following steps are included:
[0029] Select a qualified product as the template product and obtain the preliminary detection signal of the template product;
[0030] Perform data verification on the preliminary detection signal to determine whether the preliminary detection signal meets the preset standard;
[0031] If not, perform the push operation of replacing the template product;
[0032] If it meets the standard, determine the corresponding template width on the time axis, store the preliminary detection signals of no less than the data points corresponding to the template width as the individual product template signals, and construct the product template based on the individual product template signals and the preset template establishment rules.
[0033] By adopting the above technical solution, it is possible to select a qualified product as the 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 high-quality template signals and improve the accuracy of signal matching. If the preliminary detection signal meets the preset standard, further determine the template width, store the corresponding data points, and finally construct the product template, so that the template signal can accurately reflect the product characteristics and improve the reliability and anti-interference ability of subsequent detections.
[0034] In a preferred example of the present application, it can be further configured as follows: before the step of selecting a qualified product as the template product, it includes:
[0035] Obtain an instruction on whether to update the product template signal;
[0036] If not, enter the detection preparation state;
[0037] If so, prepare to perform the step of selecting a qualified product as the template product.
[0038] By adopting the above technical solution, it is possible to obtain an instruction on whether to update the product template signal before selecting a qualified product as the template product, so as to ensure that when the product characteristics change or the production process is adjusted, the template signal can be updated in time to meet the detection requirements of different batches of products. If there is no need to update the template signal, the system can directly enter the detection preparation state to improve the detection efficiency; if an update is required, it can automatically perform the selection of the template product and the establishment of the template signal to ensure that the detection system always uses the optimal product template and improve the adaptability and accuracy of metal foreign object detection.
[0039] In a preferred example of the present application, it can be further configured as follows: the corresponding relationship between the template width and the data points is determined based on the preset signal sampling rate.
[0040] By adopting the above technical solution, the corresponding relationship between the template width and the data points can be determined based on a preset signal sampling rate, so as to ensure that the time scale of the template signal is consistent with that of the sampling signal, and ensure 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.
[0041] In a preferred example of the present application, it can be further configured as: before the step of determining whether the effective detection signal is greater than the foreign object detection threshold, it further includes:
[0042] Preprocess the effective detection signal to eliminate the corresponding spike pulses.
[0043] By adopting the above technical solution, before determining whether the effective detection signal is greater than the foreign object detection threshold, the effective detection signal can be preprocessed first to eliminate the spike pulses 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 the metal foreign object detection can be improved.
[0044] In a preferred example of the present application, it can be further configured as: in the step of preprocessing the effective detection signal to eliminate the corresponding spike pulses, it includes:
[0045] Determine the corresponding spike width threshold on the time axis, and identify the spike pulses in the effective detection signal based on the spike width threshold;
[0046] Perform correction processing on the spike pulses;
[0047] Based on a digital filter, perform filtering processing on the corrected effective detection signal.
[0048] 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 smoothness and detection accuracy of the signal. First, determine the corresponding spike width threshold on the time axis and identify the spike pulses in the effective detection signal based on this threshold to ensure that only short-time mutation signals are processed without affecting the normal metal signal. Then, perform correction processing on the detected spike pulses, such as using interpolation or mean substitution, to reduce the influence of the spikes on the detection results. Finally, based on a digital filter (such as mean filtering, median filtering or low-pass filtering), further smooth the corrected signal to eliminate residual noise, make the final detection signal more stable, thereby improving the detection accuracy of metal foreign objects and reducing the possibility of false detection and missed detection.
[0049] In summary, the present application includes at least one of the following beneficial technical effects:
[0050] By establishing a product template for qualified products and performing a comparison operation between the template signal and the real-time product detection signal, the present application realizes the effective suppression of product signals, thereby solving the problem of decreased detection accuracy caused by the overlap of product signals and metal foreign object signals. By introducing the concept of template width, it is ensured that the template signal can accurately cover the complete characteristics 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 cancel the product signal, significantly enhancing the distinguishability of metal foreign object signals. In addition, this method occupies 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 objects 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. Description of the Drawings
[0051] Figure 1 is a flowchart of a method for suppressing product effects in an embodiment of the present application;
[0052] Figure 2 is another flowchart of a method for suppressing product effects in an embodiment of the present application;
[0053] Figure 3 is an oscilloscope waveform diagram of detecting a single product with a metal detector in the traditional method of the present application;
[0054] Figure 4 is an oscilloscope waveform diagram of detecting a single metal foreign object with a metal detector in the traditional method of the present application;
[0055] Figure 5 is an oscilloscope waveform diagram of detecting a product and a metal foreign object with a metal detector in the traditional method of the present application;
[0056] Figure 6 is a method for suppressing product effects in an embodiment of the present application in which Figure 3 and Figure 5 The signal waveform data is exported to a table and thus transformed into a table diagram;
[0057] Figure 7 is a table diagram obtained by exporting the signal waveform data of the effective detection signal in a method for suppressing product effects in an embodiment of the present application to a table;
[0058] Figure 8 is a table diagram obtained by exporting the signal waveform data with spike pulses in the effective detection signal in a method for suppressing product effects in an embodiment of the present application to a table;
[0059] Figure 9 It is the first flowchart of a method for suppressing product effects in an embodiment of the present application;
[0060] Figure 10 It is the implementation flowchart of step S20 in a method for suppressing product effects in an embodiment of the present application;
[0061] Figure 11 It is another implementation flowchart of step S20 in a method for suppressing product effects in an embodiment of the present application;
[0062] Figure 12 It is the implementation flowchart of step S30 in a method for suppressing product effects in an embodiment of the present application;
[0063] Figure 13 It is the implementation flowchart of step S10 in a method for suppressing product effects in an embodiment of the present application;
[0064] Figure 14 It is the implementation flowchart before step S101 in a method for suppressing product effects in an embodiment of the present application;
[0065] Figure 15 It is the implementation flowchart before step S40 in a method for suppressing product effects in an embodiment of the present application. Detailed implementation manners
[0066] The following further elaborates on the present application with reference to the accompanying drawings.
[0067] In one embodiment, as Figure 1 , Figure 2 and Figure 9 shown, the present application discloses a method for suppressing product effects. A method for suppressing product effects includes:
[0068] S10. Establish a product template for qualified products. The product template includes at least a single product template signal and a template width, where 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 representing the electromagnetic characteristics of qualified products is stored in the detection system. This reference signal is used to eliminate the influence of the product itself on the detection signal, enabling the metal foreign object signal to be presented more prominently. The product template includes at least a single product template signal and a template width. The single 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 to ensure that the template signal can completely represent the electromagnetic characteristics when the qualified product passes through the detection area. By setting the product template, the detection system can compare the real-time product detection signal with this template during the subsequent detection process, thereby eliminating the product effect and improving the accuracy and reliability of metal foreign object detection. For example, in the food processing industry, packaged foods may have different electromagnetic response characteristics due to their different materials. After establishing the template for qualified products, the interference of these characteristics on metal foreign object detection can be effectively eliminated, improving the detection accuracy.
[0069] S20. Obtain 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 detected, and the electromagnetic response characteristics of the product in the detection area are recorded in real time. This detection signal is received by the receiving coil in the detection device 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 possible metal foreign object signal. During this process, the system determines the time point when the product enters the detection area through the photoelectric sensor or other positioning devices to ensure that the collected signal corresponds to the real data of the product passing through the detection area. By obtaining the real-time product detection signal, the electromagnetic characteristics of the product under test can be accurately captured, providing a basis for subsequent signal comparison and metal foreign object detection. For example, in the pharmaceutical industry, the material and thickness of drug packaging may affect the propagation characteristics of electromagnetic signals. By accurately obtaining the real-time product detection signal of the product to be tested, problems such as false detection or missed detection caused by the characteristics of drug outer packaging can be avoided.
[0070] S30. Compare the real-time product 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 is processed through calculation with the pre-stored individual product template signal to eliminate the electromagnetic signal interference of the product itself, so that the metal foreign object signal can be highlighted. Specifically, by means of signal subtraction, the product signal part in the real-time product detection signal is removed, so that the detection signal only retains the possible metal foreign object signal. This processing process can effectively improve the detectability of metal foreign objects. 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 object. 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, so as to accurately identify the metal impurities in it.
[0071] S40. 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 display result indicating the existence of metal foreign objects, and perform corresponding alarm operations. In this embodiment, after the system completes the signal comparison, it analyzes the obtained effective detection signal and compares it with the preset metal foreign object detection threshold to determine whether the product contains metal foreign objects. This threshold is determined by experimental data and the actual application environment, and is usually set to the signal intensity that can stably detect the smallest metal foreign object size. When the effective detection signal is lower than the threshold, the system determines that the product does not contain metal foreign objects and pushes the normal detection result of the product. When the effective detection signal is greater than the threshold, the system determines that a metal foreign object is detected and triggers corresponding alarm mechanisms, such as audible and visual alarms, activation of the rejection device, etc., in order to process unqualified products. This step ensures that the detection system can provide reliable metal foreign object detection capabilities while operating efficiently. For example, in the food industry, if small metal fragments are mixed into a batch of packaged foods, the system can accurately detect this abnormality through threshold judgment and remove this batch of products through the rejection device to ensure food safety.
[0072] In one embodiment, as Figure 3 shown, in step S20, the real-time product detection signal at least includes the detection signal S[n] and the optoelectronic signal PT. The detection signal S[n] is the real-time electromagnetic signal collected based on the receiving coil of the metal detector probe, and the optoelectronic signal PT is the trigger signal generated by the optoelectronic sensor when detecting that the product to be tested passes through the detection area.
[0073] In this embodiment, the detection signal S[n] is collected and converted by the receiving coil of the metal detector probe, and 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 possible metal foreign object signal; the optoelectronic signal PT is obtained by the optoelectronic sensor, which is used to detect when the product to be tested passes through the detection area and generate 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 precisely 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 optoelectronic 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, this solution can also improve the stability of signal matching, making the subsequent signal processing process more accurate, effectively reducing the interference caused by external environmental changes or detection equipment errors, thereby enhancing the detection accuracy of metal foreign objects, improving the overall detection performance of the system, using the optoelectronic signal PT as the time reference to achieve the precise positioning of the product passing through the detection area, and ensuring the synchronization of the detection signal S[n] with the physical position of the product to be tested. The introduction of the optoelectronic signal enables the detection system to accurately distinguish the detection starting points of different products, prevent signal aliasing, improve the signal matching accuracy, and make the detection of metal foreign objects more accurate and reliable.
[0074] In one embodiment, as Figure 10 shown, in step S20, that is, in the step of obtaining the real-time product detection signal of the product to be tested, it includes:
[0075] S201. Based on the optoelectronic signal PT, determine whether the product to be tested blocks the optoelectronic sensor; specifically, the optoelectronic signal PT is obtained by the optoelectronic sensor and is used to detect when the product enters the detection area. The optoelectronic 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 optoelectronic signal PT, it can accurately determine whether the product to be tested has entered the detection area, ensuring that the system starts collecting the detection signal at the correct time point. This method can avoid false detection caused by environmental interference or false triggering, and improve the accuracy and stability of detection. For example, in a production line environment, products pass through the detection area at regular intervals, and the precise triggering of the optoelectronic signal can ensure that each product is detected at the correct position, thereby improving the overall detection efficiency.
[0076] S202. If not, determine the detection signal S[n] as the valid detection signal DT[n]. Specifically, when the optoelectronic signal PT is not blocked, it means that there is no product passing through the current detection area, or the optoelectronic sensor fails to correctly detect the product. In this case, the system will not perform template matching or product signal cancellation operations, but directly use the current detection signal S[n] as the 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 the operation efficiency and reducing unnecessary consumption of computing resources. In addition, this strategy can also reduce the probability of false alarms and keep the system's output stable when detecting non-product signals. For example, in some production scenarios, there may be gaps or uneven product arrangements on the conveyor belt. Directly using S[n] as the valid detection signal DT[n] can ensure that the system will not trigger false metal foreign object alarms when the product does not enter the detection area.
[0077] S203. If so, use the occlusion moment n when the product to be tested blocks the optoelectronic sensor as the starting point of the template width, assign the occlusion moment n as 0, and start accumulating from the occlusion moment n according to the detection time of the product to be tested. Specifically, when the optoelectronic 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 when the product passes through the detection area and is used to calculate the motion state of the product within 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 the synchronization of the real-time product detection signal and the product position. The introduction of this step enables the system to accurately define the product detection cycle, provides a time reference for subsequent template matching and signal processing, and improves the accuracy of signal matching. For example, in a metal detection system, the passing speeds of different products may vary. Using the occlusion moment n as the time reference can ensure that the detection system adapts to production lines with different speeds and improves the adaptability and reliability of detection.
[0078] In summary, before obtaining the real-time product detection signal of the product to be tested, it is possible to judge whether the product to be tested blocks the optoelectronic sensor based on the optoelectronic signal PT, so as to ensure that detection starts only when the product truly enters the detection area, and avoid false detection or missed detection caused by environmental interference or signal drift. At the same time, using the occlusion moment n as the starting point of the template width and accumulating according to the detection time of the product to be tested helps to accurately match the detection cycle of the product, ensure the timing consistency of the signal, and improve the accuracy and stability of detection.
[0079] In one embodiment, as Figure 11As shown, after step S203, that is, if so, the occlusion moment n when the product to be tested occludes the photoelectric sensor is used as the starting point of the product detection cycle, and the occlusion moment n is assigned. After the step of accumulating from the occlusion moment n according to the detection time of the product to be tested, the following steps are further included:
[0080] S204. Determine the corresponding template width on the time axis according to the product template. Specifically, the product template refers to a set of signal data stored in advance that can reflect the electromagnetic characteristics of qualified products. 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 device. By accurately calculating the template width, it can be ensured that the template signal can completely cover the time range when the product passes 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 different packaged foods 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.
[0081] S205. Determine whether the occlusion moment n is less than the template width. Specifically, the occlusion moment n represents the time coordinate when the product passes through the detection area. Starting from the moment when the product occludes the photoelectric sensor, this time coordinate starts to accumulate. 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 indicates that the product is still within 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 different signal processing strategies need 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 misalignment. For example, on a high-speed production line, some products may pass through the detection area at a relatively fast speed. If the occlusion moment n and the template width are not compared, it may cause the system to incorrectly apply the template signal, thus affecting the accuracy of metal foreign object detection.
[0082] S206. If so, prepare to execute the step of comparing the real-time product detection signal with the individual product template signal. Specifically, when the occlusion moment n is still within the range of the template width, the system will perform the matching calculation of the product signal to remove the interference of the product signal on the detection of metal foreign objects. This process includes extracting the individual product template signal P[n] and calculating it with the current real-time product detection signal S[n] to generate the effective detection signal DT[n]. Through this operation, the electromagnetic response signal of the product itself can be effectively reduced, making the metal foreign object 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, thus avoiding the influence of the product signal on the identification of metal foreign objects. For example, in the pharmaceutical industry, some drug packages may be made of high-impedance materials, which are likely 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 objects can be improved.
[0083] S207. If not, determine the detection signal S[n] as the effective 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 the template matching calculation, but directly uses the current real-time product detection signal S[n] as the effective detection signal DT[n] to ensure the detection continuity of the system. This method ensures that the system can still detect normally when the template signal is unavailable, and will not cause detection interruption or abnormal judgment due to the failure of the template signal. The application of this strategy can improve the adaptability of the system under different production conditions and ensure the continuous detection of metal foreign objects. For example, on a packaging production line, some products may have different shapes, resulting in a longer or shorter passing time through the detection area than the standard template time. By flexibly adjusting the signal processing method, different product detection requirements can be met and the stable operation of the detection system can be ensured.
[0084] In summary, it is possible to determine the corresponding template width on the time axis according to the product template, and accordingly judge whether the occlusion moment n is less than the template width, so as to ensure that the template signal covers the complete product detection cycle and improve 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 objects.
[0085] In one embodiment, as Figure 12 shown, in step S30, that is, the step of comparing the real-time product detection signal with the individual product template signal and generating the corresponding effective detection signal, includes:
[0086] S301. Extract the individual product template signal P[n] from the product template. Specifically, the individual product template signal P[n] refers to the electromagnetic signal data collected and stored in advance from qualified products, which 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, and their effects on the electromagnetic field are also different, when establishing the product template, it is necessary to select representative qualified products for multiple detections and extract stable electromagnetic signals as the individual product template signal P[n]. The process of extracting this template signal is usually completed in the storage module of the detection system. When the system executes the detection task, it will call the corresponding product template from the storage and match the applicable individual product template signal P[n] according to the product type. By this method, it can ensure that the system uses the correct reference signal during the detection process to perform comparison calculations and improve the accuracy of detection. For example, in the food processing industry, chocolates of different brands may have different packaging materials and different electromagnetic characteristics. Therefore, during the detection process, it is necessary to call the corresponding product template for chocolates of different brands to ensure the reliability of the detection results.
[0087] S302. Calculate the difference between the individual product template signal P[n] and the detection signal S[n] to 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, which contains the electromagnetic effect of the product itself and the possible metal foreign object signal. Since the electromagnetic signal of the product itself may overlap with the metal foreign object 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 object 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 objects. 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, during the template extraction and signal processing process, time synchronization and amplitude adjustment may be required to ensure the accuracy of the calculation. For example, in the pharmaceutical industry, the packaging materials of some drugs may cause great interference to the metal detection signal. By this method, the background noise brought by the packaging materials can be effectively removed, making the tiny metal foreign object signal appear and improving the reliability of drug quality detection.
[0088] In summary, during the process of generating an effective detection signal by comparing the real-time product 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, so as to effectively remove the product signal and make the detection signal only retain the metal foreign object signal. This method can eliminate the interference of the product signal on the detection process, significantly enhance the distinguishability of the metal signal, improve the detection accuracy of metal foreign objects, reduce the probability of false detection and missed detection, and improve the stability of the detection system.
[0089] In one embodiment, as Figure 13 shown, in step S10, that is, the step of establishing a product template for qualified products, includes:
[0090] S101. Select a qualified product as the template product and obtain the 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 objects, and its electromagnetic characteristics can represent the typical characteristics of similar products. During the process of establishing the 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 when the product 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, reference 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 shapes, so it is necessary to select a qualified biscuit as the template product to ensure that the signal of the biscuit itself and the potential metal foreign object signal can be accurately distinguished during the subsequent detection process.
[0091] 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 signals of qualified products usually fluctuate 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 indicates 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 a large interference on the signal, and then it is necessary to reselect the template product. This data verification process ensures the accuracy and consistency of the template signal, enabling more effective elimination of product effects and improving the detection accuracy of metal foreign objects in subsequent detection processes. For example, in the field of drug detection, different batches of capsules may have changes in electromagnetic characteristics due to slight differences in the density of the filling material. Through data verification, the most representative template product can be selected to ensure the stability of the metal detection system.
[0092] S103. If not, perform the push operation to replace the template product. Specifically, if the preliminary detection signal fails to pass the data verification, the system will automatically perform the push operation to replace 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 to replace the template product can be executed automatically. For example, in the in-line detection process, the system can continuously collect the preliminary detection signals of multiple products until a template product that meets the standard is found. It can also be manually triggered. For example, the operator can manually select a new template product and re-collect the signal according to the prompt of the detection system. This step can effectively avoid subsequent detection errors caused by the quality problems of the template product and improve the reliability of the template signal. For example, in the dairy industry, due to differences in water content or processing technology, the electromagnetic characteristics of some cheese products may deviate. The system can ensure that the finally selected product template can represent the standard characteristics of this batch of products by automatically replacing the template product, thereby improving the accuracy of metal detection.
[0093] S104. If it meets the requirements, determine the corresponding template width on the time axis, store the preliminary detection signal with no less than the number of data points corresponding to the template width as a separate product template signal, and construct a product template based on the separate product template signal and the preset template establishment rule. 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 during which the product stays in the detection area, which is jointly determined by the conveyor belt speed, the product size, and the sampling rate of the detection device. To ensure that the product template can fully reflect the product signal characteristics, the system will store no less than the number of data points corresponding to the template width and use these data points as the separate product template signal. Subsequently, based on the separate product template signal and the preset template establishment rule, the system processes the signal into the final product template for subsequent detection tasks. Through this step, the system can establish an accurate and stable product template, effectively suppressing the product effect during subsequent detection and improving the ability to identify metal foreign objects. For example, in the detection of frozen foods, quick-frozen foods with different thicknesses pass through the detection area on the conveyor belt at different times. 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.
[0094] In summary, by selecting a qualified product as the template product, obtaining the preliminary detection signal of the product, and then performing data verification on the signal, the accuracy and reliability of the template signal can be ensured. 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 improves the accuracy of signal matching. If the preliminary detection signal meets the preset standard, further determine the template width, store the corresponding data points, and finally construct the product template, so that the template signal can accurately reflect the product characteristics and improve the reliability and anti-interference ability of subsequent detection.
[0095] In one embodiment, as Figure 14 shown, before step S20, that is, before the step of selecting a qualified product as the template product, it includes:
[0096] S1001. Obtain an instruction on whether to update the product template signal. Specifically, this 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. This instruction can be automatically triggered by the system. For example, when it detects a product batch change, the equipment operation time reaches a preset cycle, or the stability of the template signal decreases, the system will actively send a request to update the template. It can also be manually input by the operator. For example, when the product type is switched on the production line or the detection parameters are adjusted, the operator triggers the template update instruction. By obtaining this instruction, the system can judge 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 detection. For example, on a food production line, if different brands of packaging materials are replaced, this 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 template update to ensure the detection accuracy of the new product.
[0097] S1002. If not, 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 detected. The system does not need to execute a new template collection process but directly enters the detection preparation state. The detection preparation state refers to the initialization process before detection by the system, including calibrating the probe, adjusting the detection phase, clearing the cache data, and waiting for the product to be detected to enter the detection area. This state ensures that the system can perform metal foreign object detection under optimal conditions and reduces false detections or missed detections caused by improper template switching. In this way, the operation efficiency of the detection system can be improved, unnecessary template reset operations can be avoided, and it is ensured that when the product batch does not change, the system can quickly enter the detection mode. For example, in the pharmaceutical industry, some drugs may maintain the same packaging and materials during continuous production. If a new template is created every time for detection, it will not only increase the computational burden of the system but also reduce the detection efficiency of the production line. Therefore, when the template is stable, the system can directly enter the detection preparation state to ensure the coherence and stability of detection.
[0098] S1003. If so, prepare to select a qualified product as the 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. Preparing to select a qualified product includes multiple initialization operations, such as clearing the old template data, adjusting the signal acquisition parameters, resetting the template matching threshold, 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 the qualified product, so as to effectively remove the product effect in subsequent detections and improve the ability to identify metal foreign objects. For example, in the detection of metal-packaged food, if the production line switches from plastic-packaged food to aluminum-foil-packaged food, the electromagnetic responses of the metal detector's probe to the two types of packaging will be different. At this time, the system needs to prepare to select a new qualified product as the template to establish a template signal that matches the new packaging material to ensure the accuracy of metal foreign object detection.
[0099] In summary, it is possible to obtain an instruction on whether to update the product template signal before selecting a qualified product as the template product, so as to ensure that when the product characteristics change or the production process is adjusted, the template signal can be updated in a timely manner to adapt to the detection requirements of different batches of products. If there is no need to update the template signal, the system can directly enter the detection preparation state to improve the detection efficiency; if an update is required, it can automatically perform the selection of the template product and the establishment of the template signal to ensure that the detection system always uses the optimal product template, improving the adaptability and accuracy of metal foreign object detection.
[0100] In one embodiment, in step S104, that is, the correspondence between the template width and the data points is determined based on a preset signal sampling rate.
[0101] In summary, it is possible to determine the correspondence between the template width and the data points based on a preset signal sampling rate, so as to ensure that the time scale of the template signal is consistent with the time scale of the sampling signal, and ensure 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, improving the representativeness of the template signal, and thus enhancing the stability and accuracy of the detection.
[0102] In one embodiment, as Figure 8 and Figure 15 shown, before step S40, that is, before the step of determining whether the effective detection signal is greater than the foreign object detection threshold, it further includes:
[0103] Preprocess the effective detection signal to eliminate the corresponding spike pulses.
[0104] In this embodiment, Figure 8The red curve shown represents the DT after eliminating the product effect. The spike signals that appear will far exceed the original individual product template signal P (blue line) and the real-time product detection signal S (orange line), resulting in false alarms. Since such spike pulses are very short, generally with a width within 50 ms, they can be removed after certain processing by a digital filter, which has little impact on the final detection effect. Before determining whether the effective detection signal is greater than the foreign object detection threshold, the effective detection signal can be preprocessed to eliminate the spike pulses in the signal, thereby reducing false detections caused by instantaneous noise or signal mutations. Through the preprocessing step, the detection signal can be smoothed, the stability of the detection can be improved, the accuracy of subsequent threshold judgment can be ensured, and the reliability and anti-interference ability of metal foreign object detection can be enhanced.
[0105] In one embodiment, as Figure 3 shown, in step S20, that is, in the step of preprocessing the effective detection signal to eliminate the corresponding spike pulses, it includes:
[0106] S31. Determine the corresponding spike width threshold on the time axis, and identify the spike pulses in the effective detection signal based on the spike width threshold; specifically, the spike width threshold is a time range defined on the time axis, and this range is used to distinguish normal detection signals from short-term sudden spike noises. Usually, the signals of metal detectors are relatively stable, and spike pulses are often caused by instantaneous interference, external vibration, electronic noise, or asynchronous phenomena when products pass through the detection area. The duration of these spike pulses is usually within dozens of milliseconds. Therefore, by setting an appropriate spike width threshold, abnormal signals with a duration less than this threshold can be marked as spike pulses. In the signal processing of the system, according to the set spike width threshold, the effective detection signal will be scanned to identify signal fluctuations that appear and disappear quickly within a very short time, ensuring that real metal foreign object signals will not be misjudged as spike pulses. For example, during the food metal detection process, if the conveyor belt vibrates slightly, it may generate short spike pulses in the detection signal, and these signals do not represent the actual presence of metal foreign objects. By setting a reasonable spike width threshold, these irrelevant signals can be effectively identified and processed, thereby reducing the occurrence of false alarms.
[0107] S32. Perform correction processing on the spike pulse. Specifically, when the detection system identifies a spike pulse, it is necessary to correct the pulse signal to reduce its impact on subsequent metal foreign object detection. The methods of correction processing can include interpolation correction, mean substitution, or dynamic adjustment, etc. For example, interpolation correction can replace the spike pulse with the average value of several adjacent normal signal points to make the signal smooth again; mean substitution replaces the abnormal value with the average value of the detection signals before and after the spike pulse to ensure the continuity of the signal; while dynamic adjustment can perform non-linear compensation on the pulse according to the amplitude and phase characteristics of the spike pulse to minimize its interference with the effective detection signal. The purpose of the correction processing is to ensure that while the system eliminates invalid interference, it does not affect the integrity of the metal foreign object signal, so that the detection system can still accurately identify real metal foreign objects. For example, during the metal foreign object detection in the pharmaceutical industry, since some drugs may be packaged in metal foil and occasional transient spike signals may be generated due to the electromagnetic interference of the detector, if no correction processing is performed, the system may misjudge the existence of metal foreign objects, so reasonable correction of the spike pulse can ensure the stability of the detection system and the reliability of the detection results.
[0108] S33. Based on a digital filter, perform filtering processing on the corrected effective detection signal. Specifically, a digital filter is a signal processing technology that can smooth high-frequency noise, short-term interference, or abnormal signals 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 a digital filter. Common digital filtering methods include mean filtering, median filtering, and low-pass filtering, etc. Mean filtering can smooth the abrupt signal by calculating the average value of multiple consecutive 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 and ensure that the detection system can still maintain a high detection accuracy in a complex environment. For example, during the metal detection in the textile industry, since the fabric itself may contain conductive fibers, these fibers may generate short-term high-frequency fluctuations in the detection signal. Without appropriate filtering processing, it may lead to false alarms. Through the optimization processing of the digital filter, these irrelevant signals can be effectively removed to improve the stability of metal foreign object detection.
[0109] In summary, the effective detection signal can be filtered based on a digital filter to eliminate spike pulses, improve the signal stability and detection accuracy. First, determine the spike width threshold corresponding on the time axis, and identify the spike pulses in the effective detection signal based on this threshold to ensure that only short-time mutation signals are processed without affecting normal metal signals. Then, perform correction processing on the detected spike pulses, such as using interpolation or mean substitution, to reduce the influence of spikes on the detection results. Finally, further smooth the corrected signal based on a digital filter (such as mean filtering, median filtering or low-pass filtering) to eliminate residual noise, make the final detection signal more stable, thereby improving the detection accuracy of metal foreign objects and reducing the possibility of false detection and missed detection.
[0110] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent substitution on some of the technical features; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate 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 product 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 body detection threshold. If it is not greater than the foreign body detection threshold, generate and push the product normal display result. If it is greater than the foreign body detection threshold, generate and push the metal foreign body presence display result and execute the corresponding alarm operation. 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 a metal detector probe receiving coil. The photoelectric signal PT is a trigger signal generated when a photoelectric sensor detects that a product to be tested passes through a detection area. 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 blocking moment n when the product to be tested blocks the photoelectric sensor is used as the starting point of the template width, and the blocking moment n is assigned to 0, and the blocking moment n is accumulated according to the detection time of the product to be tested; 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 detection time of the product to be tested, 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 product detection signal with the individual product template signal; If not, the detection signal S[n] is determined as a valid detection signal DT[n].
2. A method for suppressing product effects according to claim 1, characterized in that: The step of comparing the real-time product 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].
3. A method for suppressing product effect 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.
4. A method for suppressing product effect according to claim 3, 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.
5. A method for suppressing product effect according to claim 3, characterized in that: The corresponding relationship between the template width and the data point is determined based on a preset signal sampling rate.
6. 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.
7. A method for suppressing product effects according to claim 6, 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
Apparatus and method for automatic product effect compensation in radio frequency metal detectors
US20110074401A1