Impurity detection method of foreign fiber removing machine based on photoelectric detection technology
By segmenting and clustering the photoelectric detection signals, and combining anomaly factors and confidence factors, the problem of low efficiency caused by signal data updates in photoelectric detection is solved, achieving high efficiency and accuracy in foreign fiber removal.
Patent Information
- Application Number
- CN202511349488.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-22
AI Technical Summary
Existing photoelectric detection technology requires clustering of all signal data after each new signal data is added during the foreign fiber removal process, resulting in low efficiency in screening abnormal data.
By dividing the signal to be detected into several intercept intervals, calculating the anomaly factor and normal signal range for each interval, and using the K-means clustering algorithm for clustering, combined with the anomaly factor and confidence factor, suspected abnormal signals are identified and foreign fibers are removed.
It improves the accuracy and efficiency of foreign fiber removal, reduces the impact of noise, and ensures the reliability and accuracy of foreign fiber detection.
Smart Images

Figure CN120846990B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of data processing, and particularly relates to a foreign fiber removing machine impurity detection method based on photoelectric detection technology. BACKGROUND
[0002] With the development of related technologies and hardware in the industry, it is necessary to use photoelectric detection technology to detect plastic filaments, hair, hemp filaments, cloth pieces and other foreign fibers in cotton. On the one hand, traditional manual foreign fiber detection is not only low in efficiency and high in cost, but also prone to missed detection or misjudgment due to human factors. Photoelectric detection technology can detect foreign fibers in real time through high-speed and non-contact methods, effectively improving the detection accuracy and stability, and meeting the requirements of modern textile industry for product quality and automation level. On the other hand, in the photoelectric detection process, a large amount of signal data often contains mixed information of normal fibers and foreign fibers. If a clustering algorithm is introduced to screen abnormal signals in the received signals, the adaptive characteristics of the algorithm can be used to automatically distinguish normal and abnormal signals according to the differences between the signals, which can not only improve the accuracy and robustness of foreign fiber detection, but also effectively reduce the false positive rate and the false negative rate, so that the detection system still has strong adaptability and intelligent level in complex production environment. Therefore, the K-means clustering algorithm is used as an adaptive clustering algorithm to detect abnormal signals in the collected signals, and then foreign fibers are removed.
[0003] From the foreign fiber removing task, the sensor will obtain signal data every second according to the sampling frequency. In the foreign fiber removing task, each new data collected will expand the data sample size of the clustering. The addition of new data may affect the determination of the center position and the division of the cluster in the algorithm, so that after each new signal data is added, all signal data need to be clustered together to determine whether the new signal data is abnormal signal data, which reduces the efficiency of abnormal data screening through the clustering algorithm. SUMMARY
[0004] In order to solve the problem that when the K-means clustering algorithm is used to continuously obtain abnormal signal data from signal data, all signal data need to be clustered to determine whether the new signal data is abnormal signal data after each new signal data is added, which reduces the efficiency of abnormal data screening through the clustering algorithm, the application provides a foreign fiber removing machine impurity detection method based on photoelectric detection technology.
[0005] To achieve the above objectives, the present invention provides the following technical solution: The cotton to be tested is placed on a foreign fiber removal machine to obtain a data sequence of the signal to be tested; the area that the spray valve in the foreign fiber removal machine can cover under a set air pressure, the width of the conveyor belt, and the running speed of the conveyor belt are obtained; the data sequence of the signal to be tested is segmented to obtain several interception intervals; each signal to be tested corresponds to a region of the cotton to be tested; based on the distribution difference of the signals to be tested in each interception interval and its surrounding interception intervals, an anomaly factor for each interception interval is obtained; the signals to be tested in each interception interval are clustered to obtain several clusters; the cluster containing the most signals to be tested in each interception interval is denoted as each interception interval. Select normal clusters within each interval; based on the distribution of the signals to be detected in the normal clusters within each interval, obtain the upper and lower bounds of the normal signal range for each interval; based on the difference in anomalous factors between each interval and other intervals, the anomalous factor of each interval, and the number of signals to be detected in the normal clusters within each interval, obtain the confidence factor of the normal signal range for each interval; combining the upper and lower bounds of the normal signal range for each interval, obtain the final upper and lower bounds of the normal signal range; based on the final upper and lower bounds of the normal signal range and the distribution of the signals to be detected within each interval, obtain the degree of removal required for each interval, and perform foreign fiber removal.
[0006] Further, the specific steps for obtaining several interception intervals are as follows: Set the air pressure of the spray valve inside the foreign fiber removal machine, and obtain the area that the spray valve can cover under the set air pressure; divide the area that the spray valve can cover under the set air pressure by the width of the conveyor belt inside the foreign fiber removal machine, and record the result as the coverage length; the specific calculation formula for obtaining the time length of the interception interval is as follows: In the formula, Indicates the length of the time interval to be extracted. Indicates the length that can be covered. This indicates the running speed of the conveyor belt inside the foreign fiber removal machine; based on the acquisition time corresponding to each signal to be detected in the data sequence of the signal to be detected, and the time length of the intercept interval, the data sequence of the signal to be detected is divided into several intercept intervals.
[0007] Furthermore, the specific calculation formula for obtaining the anomaly factor of each intercepted interval is as follows: In the formula, Indicates the first Outlier factors within a cutoff interval Indicates the first The variance of all signals to be detected within a cutoff interval. Indicates the first The variance of all signals to be detected within a cutoff interval. represents the mean value of all the to-be-detected signals in the first intercept interval, represents the mean value of all the to-be-detected signals in the first intercept interval, represents the mean value of all the to-be-detected signals in the first intercept interval, represents an absolute value function, is a hyperparameter for preventing the denominator from being 0.
[0008] Further, the specific steps of clustering the to-be-detected signals in each intercept interval to obtain a plurality of clustering clusters are as follows: through an elbow method, the number of clustering clusters when using a K-means clustering algorithm to cluster all the to-be-detected signals in the first intercept interval is obtained, which is recorded as the number of clustering clusters of the first intercept interval; taking the Euclidean distance as a distance measurement, according to the values of all the to-be-detected signals in the first intercept interval, the number of clustering clusters is set to the number of clustering clusters of the first intercept interval, and the K-means clustering algorithm is used to cluster all the to-be-detected signals in the first intercept interval to obtain a plurality of clustering clusters.
[0009] Further, the specific steps of obtaining the upper limit and the lower limit of the normal signal range of each intercept interval are as follows: the minimum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval is recorded as the lower limit of the normal signal range of the first intercept interval; and the maximum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval is recorded as the upper limit of the normal signal range of the first intercept interval.
[0010] Further, the specific calculation formula of the confidence factor of the normal signal range of each intercept interval is as follows: wherein, represents the confidence factor of the normal signal range of the first intercept interval, represents an abnormal factor of the first intercept interval, represents an abnormal factor of the first intercept interval, represents the number of intercept intervals, represents a second hyperparameter for preventing the denominator from being 0, represents the number of to-be-detected signals in the normal clustering cluster in the first intercept interval, the number of the detected signals in the i-th intercept interval, the third hyperparameter, to prevent the denominator from being 0, is an absolute value function.
[0011] Further, the specific calculation formulae of the final upper limit and the final lower limit of the normal signal range are as follows: wherein, the final upper limit of the normal signal range, the number of intercept intervals, the confidence factor of the normal signal range of the i-th intercept interval, the confidence factor of the normal signal range of the i-th intercept interval, the upper limit of the normal signal range of the i-th intercept interval; and the specific calculation formula of the final lower limit of the normal signal range is as follows: wherein, the final lower limit of the normal signal range, the number of intercept intervals, the confidence factor of the normal signal range of the i-th intercept interval, the confidence factor of the normal signal range of the i-th intercept interval, the lower limit of the normal signal range of the i-th intercept interval. Further, the specific steps of obtaining the degree of the to-be-removed signals in each intercept interval are as follows: the suspected abnormal signals greater than the final upper limit of the normal signal range or smaller than the final lower limit of the normal signal range in the i-th intercept interval are recorded as suspected abnormal signals; the other to-be-detected signals in the i-th intercept interval except the suspected abnormal signals are recorded as suspected normal signals; if the j-th suspected abnormal signal in the i-th intercept interval is greater than the final upper limit of the normal signal range, the absolute value of the difference between the j-th suspected abnormal signal in the i-th intercept interval and the final upper limit of the normal signal range is recorded as the abnormal performance degree of the j-th suspected abnormal signal in the i-th intercept interval; if the j-th suspected abnormal signal in the i-th intercept interval is smaller than the final lower limit of the normal signal range, the absolute value of the difference between the j-th suspected abnormal signal in the i-th intercept interval and the final lower limit of the normal signal range is recorded as the abnormal performance degree of the j-th suspected abnormal signal in the i-th intercept interval.
[0012] Further, the specific steps of obtaining the degree of the to-be-removed signals in each intercept interval are as follows: the suspected abnormal signals greater than the final upper limit of the normal signal range or smaller than the final lower limit of the normal signal range in the i-th intercept interval are recorded as suspected abnormal signals; the other to-be-detected signals in the i-th intercept interval except the suspected abnormal signals are recorded as suspected normal signals; if the j-th suspected abnormal signal in the i-th intercept interval is greater than the final upper limit of the normal signal range, the absolute value of the difference between the j-th suspected abnormal signal in the i-th intercept interval and the final upper limit of the normal signal range is recorded as the abnormal performance degree of the j-th suspected abnormal signal in the i-th intercept interval; if the j-th suspected abnormal signal in the i-th intercept interval is smaller than the final lower limit of the normal signal range, the absolute value of the difference between the j-th suspected abnormal signal in the i-th intercept interval and the final lower limit of the normal signal range is recorded as the abnormal performance degree of the j-th suspected abnormal signal in the i-th intercept interval. Within the selected interval, the first... The absolute value of the difference between the final lower bound of the range of the suspected abnormal signal and the normal signal is denoted as the i-th. Within the selected interval, the first... The degree of abnormality of the first suspected abnormal signal; the first Each suspected abnormal signal within a cutoff interval is connected to the suspected abnormal signals adjacent to its left and right sides to obtain the first... Several suspected abnormal signal segments were extracted within the intercept interval; according to the... The mean of the abnormality of all suspected abnormal signals within the first intercept interval, the first... The number of suspected normal signals within each intercept interval, the first The maximum value among the number of suspected abnormal signals in all suspected abnormal signal segments within the first intercept interval is obtained. The degree of need to be cleared in each intercepted interval.
[0013] Furthermore, the statement based on the first The mean of the abnormality of all suspected abnormal signals within the first intercept interval, the first... The number of suspected normal signals within each intercept interval, the first The maximum value among the number of suspected abnormal signals in all suspected abnormal signal segments within the first intercept interval is obtained. The specific formula for calculating the degree of removal required for each cutoff interval is as follows: In the formula, Indicates the first The degree of need to be cleared in each selected interval. Indicates the first The number of suspected normal signals within a single intercept interval. Indicates the first The number of signals to be detected within each intercept interval Indicates the first The mean of the abnormality of all suspected abnormal signals within a cutoff interval. Indicates the first The maximum value among all suspected abnormal signal segments within a cutoff interval, representing the number of suspected abnormal signals. This represents the sigmoid function. It is an exponential function with the natural constant as its base.
[0014] Furthermore, the specific steps for removing foreign fibers are as follows: According to the first... Each signal to be detected within a certain interval corresponds to a region of cotton to be detected, thus obtaining the first... The area of cotton to be detected corresponding to each intercept interval; a preset threshold for removal. If the first The degree of uncleared areas in each selected interval then the region of the cotton to be detected corresponding to the first intercept interval is subjected to foreign fiber removal.
[0015] The foreign fiber removal machine impurity detection method based on photoelectric detection technology has the following beneficial effects: before the cotton to be detected is subjected to foreign fiber removal, the cotton to be detected is divided into multiple regions according to the area covered by the spray valve under the set jet pressure and the width of the conveyor belt, and multiple intercept intervals are obtained, so that when foreign fiber removal is performed on each region, no impact is caused on other regions, and when foreign fiber removal is performed on a region, foreign fiber removal can be performed on all positions in the region, thereby improving the accuracy of foreign fiber removal; then, according to the characteristics that the normal signals contained in the detection signals are more and more similar, the detection signals in each intercept interval are clustered to obtain the upper and lower bounds of the normal signal range of each intercept interval; then, according to the characteristics that when the detection signals in different intercept intervals are all normal signals, the values and distributions of the detection signals in different intercept intervals are more similar, the confidence factor of the normal signal range of each intercept interval is obtained according to the distribution difference of the detection signals in different intercept intervals; then, according to the confidence factor of the normal signal range of each intercept interval and the upper and lower bounds of the normal signal range of each intercept interval, the final upper and lower bounds of the normal range of each intercept interval are obtained, thereby solving the problem that if the final upper and lower bounds of the normal signal range are directly obtained according to the upper and lower bounds of the normal signal range of each intercept interval, the upper and lower bounds of the normal signal range of some intercept intervals containing more abnormal signals have too great an impact on the final upper and lower bounds of the normal signal range, and the credibility of the final upper and lower bounds of the normal signal range is not high; then, according to the value of each detection signal, the suspected abnormal signals in each intercept interval are obtained, thereby solving the problem that if the suspected abnormal signals are directly obtained using the K-means clustering algorithm, the clustering of all data is required every time a new data is added, and the efficiency of abnormal data detection is too low; according to the characteristics that foreign fibers are continuous in form, that is, when a signal affected by foreign fibers appears, multiple signals affected by foreign fibers should appear continuously, the degree of removal of each intercept interval is obtained according to the distribution of the suspected abnormal data in each intercept interval, thereby solving the problem that if the number of suspected abnormal signals in each intercept interval is directly used to determine whether foreign fiber removal is performed on each intercept interval, the impact of noise on the detection signals cannot be reduced, the credibility of the degree of removal of each intercept interval is improved, and the accuracy of foreign fiber removal is increased. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application and the design scheme thereof, the following will briefly introduce the drawings required by the present embodiments. The drawings in the following description are only part of the embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor on the basis of these drawings.
[0017] Figure 1 Flow chart of the impurity detection method of the foreign fiber removing machine based on photoelectric detection technology according to the embodiments of the present application. DETAILED DESCRIPTION
[0018] In order for those skilled in the art to better understand the technical solutions of the present application and to implement them, the present application will be described in detail below in conjunction with the drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.
[0019] Embodiment 1: The present application provides an impurity detection method of a foreign fiber removing machine based on photoelectric detection technology, specifically as shown in the figure, comprising: step S001: placing the cotton to be detected on the foreign fiber removing machine to obtain a data sequence of the detection signal; obtaining the coverable area of the spray valve in the foreign fiber removing machine under the set jet pressure, the width of the conveying belt and the running speed of the conveying belt, and dividing the data sequence of the detection signal to obtain a plurality of interception intervals. Figure 1
[0020] It should be noted that when the foreign fiber removing machine based on photoelectric detection technology detects foreign fibers, it uses the control of the air flow valve to blow out the foreign fibers to complete the removal. And because the air flow intensity blown by the spray valve is limited, the coverable area of the spray valve under the preset jet intensity, i.e. the jet pressure, is compared with the width of the conveying belt to obtain the length that can be covered by the spray valve at each time of blowing. Then, according to the length that can be covered by the spray valve at each time of blowing and the running speed of the conveying belt, the time length of the interception interval is obtained, so that each part of each interception interval can be blown at each time of blowing of the spray valve, and the parts in each interception interval will not be affected by the gas blown when the foreign fibers in other interception intervals are removed.
[0021] Specifically, the cotton to be detected which needs to be detected and fully opened is laid on the conveying belt of the foreign fiber removing machine in a uniform thickness to complete the arrangement of the cotton to be detected.
[0022] Further, when detecting, a polarization module is placed above the conveying belt perpendicular to the conveying belt, and the light source on the polarization module is used to emit light at a speed of 1000 Hz to 2000 Hz, and the light source is arranged to be perpendicular to the conveying belt. The light source emits light signals at a preset frequency, and at the light source emitting position, a polarizer is used to convert the light signals into linearly polarized light. After the linearly polarized light irradiates on the cotton, the linearly polarized light is scattered to different degrees according to the different properties of the irradiated surface. The preset frequency value in the embodiment is Other values can be set in other embodiments. The preset frequency value in the embodiment is The light source emits light signals at a preset frequency, and at the light source emitting position, a polarizer is used to convert the light signals into linearly polarized light. After the linearly polarized light irradiates on the cotton, the linearly polarized light is scattered to different degrees according to the different properties of the irradiated surface. The preset frequency value in the embodiment is The light source emits light signals at a preset frequency, and at the light source emitting position, a polarizer is used to convert the light signals into linearly polarized light. After the linearly polarized light irradiates on the cotton, the linearly polarized light is scattered to different degrees according to the different properties of the irradiated surface. The preset frequency value in the embodiment is
[0023] Further, a polarizing beam splitter is placed in front of the receiving sensor. The linearly polarized light scattered to different degrees is received by the receiving sensor to obtain a plurality of to-be-detected signals, and then a data sequence of the to-be-detected signals is obtained. The polarization direction of the polarizing beam splitter in front of the receiving sensor is perpendicular to the direction of the polarizer. Each to-be-detected signal corresponds to a collection time. Each to-be-detected signal corresponds to a region of the to-be-detected cotton.
[0024] Thus, the data sequence of the to-be-detected signals is obtained.
[0025] Further, the value obtained by dividing the area of the coverable region of the spray valve in the foreign fiber removing machine at the set jet pressure by the width of the conveying belt in the foreign fiber removing machine is recorded as the coverable length. The preset jet pressure of the spray valve in the foreign fiber removing machine in the embodiment is 0.6 Mpa, and other values can be set in other embodiments. The area of the coverable region of the spray valve at the jet pressure can be obtained according to the preset jet pressure of the spray valve, which is a known technology, and thus the embodiment will not be described in detail.
[0026] Further, the specific calculation formula of the time length of the intercepted interval is as follows: In the formula, represents the time length of the intercepted interval, represents the coverable length, represents the running speed of the conveying belt in the foreign fiber removing machine.
[0027] Further, according to the collection time corresponding to each to-be-detected signal in the data sequence of the to-be-detected signals and the time length of the intercepted interval, the data sequence of the to-be-detected signals is divided into a plurality of intercepted intervals. Each intercepted interval does not contain the to-be-detected signal at the same collection time. The data sequence is divided into a plurality of segments according to the collection time, which is a known technology, and thus the embodiment will not be described in detail.
[0028] Thus, a plurality of intercepted intervals are obtained.
[0029] Step S002: According to the distribution difference of the to-be-detected signals in each intercepted interval and the surrounding intercepted intervals, an abnormal factor of each intercepted interval is obtained.
[0030] It should be noted that since the intensity of the light signal emitted by the light source is consistent, and the properties of normal cotton are consistent, even if there are slight differences in the thickness during laying, causing fluctuations in the intensity signal received after reflection, the received intensity signals should be quite similar and the fluctuations should be small when the reflecting medium is cotton within the same interval. That is, under normal circumstances, the distribution of the detected signal within different intercept intervals where the reflecting medium is cotton is quite similar.
[0031] It should be further noted that due to the relatively large differences in properties between normal cotton and foreign fibers, the intensity signal of the light signal received after reflection by foreign fibers differs significantly from the intensity signal received after reflection by normal cotton. That is, the distribution of the detected signal acquired when the reflecting medium within the interval is entirely cotton differs from the distribution acquired when the reflecting medium within the interval contains both cotton and foreign fibers. Therefore, based on the difference in the distribution of the detected signal within each intercepted interval compared to the two intercepted intervals before and after it, the anomaly factor for each intercepted interval is obtained.
[0032] Specifically, the formula for calculating the outlier factor for each cutoff interval is as follows: In the formula, Indicates the first Outlier factors within a cutoff interval Indicates the first The variance of all signals to be detected within a cutoff interval. Indicates the first The variance of all signals to be detected within a cutoff interval. Indicates the first The mean of all signals to be detected within a cutoff interval. Indicates the first The mean of all signals to be detected within a cutoff interval. Indicates the first The mean of all signals to be detected within a cutoff interval. Represents the absolute value function. To prevent hyperparameters with a denominator of 0, this embodiment sets... In other embodiments, this can be set to other values. Wherein, if Then the third cutoff interval is taken as the cutoff interval before the first cutoff interval, that is, the third cutoff interval. The 3rd cutoff interval is the first cutoff interval; if the 3rd cutoff interval is the second cutoff interval... If the first interval is the last interval, then the third-to-last interval is taken as the interval following the last interval. That is, at this point, the first interval... The third-to-last cutoff interval is the selected interval.
[0033] It should be noted that, The smaller the value, the more... The more similar the mean of the signal to be detected within a certain intercept interval is to the mean of the signal to be detected within its surrounding intercept intervals, the better. The more similar the distribution of the signal to be detected within a certain intercept interval is to the distribution of the signal to be detected in its two surrounding intercept intervals, the more likely it is that the signal distribution is similar to that within the first intercept interval. The more the intercepted interval conforms to the characteristic that the distribution of the detected signal is relatively similar in different intercepted intervals when the reflecting medium is cotton under normal circumstances, then the first intercepted interval... The smaller the outlier of each intercepted interval; The smaller the value, the more... The first intercept interval and the first The more similar the mean values of the signals to be detected within each intercepted interval, the more it conforms to the characteristic that the distribution of the signals to be detected within different intercepted intervals is relatively similar under normal circumstances, when the reflecting medium is cotton. The first intercept interval and the first The probability of an abnormal signal to be detected within a certain intercept interval is relatively small. It better reflects the first The probability that an abnormal signal is contained within a selected interval; and The smaller the value, the more... The smaller the difference between the different signals to be detected within each intercepted interval, the more it indicates that the... The smaller the difference between different signals to be detected within each intercept interval, that is, the smaller the difference between the first and second intercept intervals. With the The more a selected interval matches the characteristic that the signals to be detected are relatively similar within the selected interval where the reflecting medium is cotton, then... It better reflects the first The degree of anomaly in each intercepted interval.
[0034] Thus, the outlier factors for each intercepted interval are obtained.
[0035] Step S003: Cluster the signals to be detected within each intercepted interval to obtain several clusters; the cluster containing the most signals to be detected within each intercepted interval is denoted as the normal cluster within each intercepted interval; based on the distribution of signals to be detected in the normal clusters within each intercepted interval, the upper and lower bounds of the normal signal range for each intercepted interval are obtained; based on the difference in anomalous factors between each intercepted interval and other intercepted intervals, the anomalous factor of each intercepted interval, and the number of signals to be detected in the normal clusters within each intercepted interval, the confidence factor of the normal signal range for each intercepted interval is obtained; combined with the upper and lower bounds of the normal signal range for each intercepted interval, the final upper and lower bounds of the normal signal range are obtained.
[0036] It should be noted that, since the detected signal obtained by normal cotton reflection and the detected signal obtained by foreign fiber reflection are different in each intercept interval, the K-means clustering algorithm is used to cluster the detected signals in each intercept interval according to the numerical value of each detected signal, and the detected signals in each intercept interval are divided into a plurality of clustering clusters.
[0037] It should be further noted that, since the foreign fibers in the detected cotton are relatively few, the number of detected signals obtained by foreign fiber reflection in each intercept interval is relatively small. Therefore, the clustering cluster containing the most detected signals in each intercept interval is recorded as the normal clustering cluster in the intercept interval, and the interval range of the normal signal in each intercept interval is obtained. Then, according to the interval range of the normal signal in all intercept intervals, the final range of the normal signal is obtained.
[0038] It should be further noted that, since the number and value of the detected signals obtained by foreign fiber reflection in different intercept intervals may be different, when the final range of the normal signal is obtained according to the interval range of the normal signal in all intercept intervals, different weights need to be given to the interval range of the normal signal in each intercept interval. When a intercept interval contains a large number of detected signals obtained by foreign fiber reflection, a smaller weight is given to the intercept interval, and when a intercept interval contains a small number of detected signals obtained by foreign fiber reflection, a larger weight is given to the intercept interval.
[0039] It should be further noted that, when the maximum clustering cluster in a intercept interval contains more detected signals, it means that the normal detected signal, i.e. the detected signal obtained by cotton reflection, contained in the intercept interval is more. Therefore, according to the number of detected signals contained in the maximum clustering cluster of each intercept interval, the confidence factor of each intercept interval, i.e. the weight of the intercept interval, is calculated.
[0040] It should be further noted that, when the anomaly factor of a intercept interval is larger, it means that the possibility of containing abnormal detected signals, i.e. the detected signals obtained by foreign fiber reflection, in the intercept interval is larger. Therefore, the anomaly factor of each intercept interval is used as a parameter for calculating the confidence factor of each intercept interval.
[0041] It should be further noted that, since the distribution of the detected signals in different intercept intervals is similar when the reflection medium is cotton under normal circumstances, the anomaly factors of different intercept intervals are also similar when the reflection medium is cotton, and therefore the difference between the anomaly factors of each intercept interval and other intercept intervals is used as a parameter for calculating the confidence factor of each intercept interval.
[0042] Specifically, the Euclidean distance is used as the distance measure, and the anomaly factor of each intercept interval is calculated according to the first formula: The values of all signals to be detected within the intercepted interval are analyzed using the K-means clustering algorithm. All signals to be detected within a specified interval are clustered to obtain several clusters. The cluster containing the most signals to be detected is denoted as the i-th cluster. The first truncation interval contains normal clusters. The K-means clustering algorithm is used to select the th truncation interval. When clustering all signals to be detected within a certain intercept interval, the number of clusters is determined by the elbow method. Obtaining the number of clusters when clustering a set of data using the elbow method is a well-known existing technique, and will not be described in detail in this embodiment.
[0043] Furthermore, the first The minimum value among all the signals to be detected in the normal clusters within the intercept interval is denoted as the i-th value. The lower bound of the normal signal range of the intercept interval. The maximum value among all the signals to be detected in the normal clusters within the intercept interval is denoted as the i-th value. The upper limit of the normal signal range of the intercepted interval.
[0044] Furthermore, obtain the first The specific formula for calculating the confidence factor of the normal signal range of each intercept interval is as follows: In the formula, Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first Outlier factors within a cutoff interval Indicates the first Outlier factors within a cutoff interval Indicates the number of intervals to be extracted. This represents the second hyperparameter to prevent the denominator from being zero. Indicates the first The number of signals to be detected in normal clusters within a cutoff interval. Indicates the first The number of signals to be detected within each intercept interval To prevent the third hyperparameter from having a denominator of 0, It is an absolute value function. This embodiment sets... , In other embodiments, it can be set to other values.
[0045] It should be noted that since the number of signals to be detected obtained through reflection from the cotton in each truncated interval is relatively large, the ratio of the number of signals to be detected in the normal clusters within each truncated interval to the total number of signals to be detected in the entire truncated interval is... This is considered as the proportion of normal signals within the detection interval, therefore The larger the value, the more significant the first... The lower the probability of an abnormal signal within the selected interval, that is, the lower the probability of the first intercept interval being the first intercept interval. The more reliable the normal signal range of each intercepted interval, the better. The larger the value; The larger the value, the more significant the first... The greater the likelihood that an abnormal signal is contained within a specific intercept interval; The larger the value, the more significant the first... The greater the difference between the first intercept interval and other intercept intervals, the less it conforms to the characteristic that different intercept intervals with cotton as the reflecting medium also have relatively similar anomalous factors, i.e., the first... The greater the probability that the selected interval contains an abnormal signal, that is, the higher the probability that the selected interval contains an abnormal signal. The less reliable the normal signal range of a segmented interval is.
[0046] Thus, the confidence factor for the normal signal range of each intercepted interval is obtained.
[0047] Furthermore, the specific calculation formula for obtaining the final upper bound of the normal signal range is as follows: In the formula, This represents the final upper bound of the normal signal range. Indicates the number of intervals to be extracted. Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first The upper limit of the normal signal range of the intercepted interval.
[0048] Furthermore, the specific calculation formula for obtaining the final lower bound of the normal signal range is as follows: In the formula, This represents the lower bound of the normal signal range. Indicates the number of intervals to be extracted. Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first The lower bound of the normal signal range of the intercept interval.
[0049] It should be noted that, through Different weights are assigned to the upper and lower bounds of different intercept intervals, so that when an intercept interval contains more normal signals, the upper and lower bounds of the intercept interval are given a larger weight, and when an intercept interval contains fewer normal signals, the upper and lower bounds of the intercept interval are given a smaller weight.
[0050] Thus, the final upper and lower bounds of the normal signal range are obtained.
[0051] Step S004: Based on the final upper and lower limits of the normal signal range and the distribution of the signal to be detected in each intercepted interval, obtain the degree of removal required for each intercepted interval and perform foreign fiber removal.
[0052] It should be noted that when determining the degree of removal required for each intercepted interval based on the final upper and lower bounds of each normal signal range, the more detectable signals within an intercepted interval that are greater than the final upper bound or less than the final lower bound of the normal signal range, the greater the likelihood that the intercepted interval requires foreign fiber removal. Therefore, the degree of removal required for each intercepted interval is calculated based on the numerical distribution of the detectable signals within each intercepted interval.
[0053] It should be further explained that, since foreign fibers are morphologically continuous, although their position, angle, or thickness mixed with normal cotton may vary, their influence on the received normal signal should be continuous. That is, when a signal affected by foreign fibers appears, multiple signals affected by foreign fibers should appear consecutively. Therefore, the degree of removal required for each intercepted interval is calculated based on the number of consecutive signals affected by foreign fibers.
[0054] It should be further noted that when the signal to be detected is greater than the upper limit of the normal signal range, the greater the difference between the signal to be detected and the upper limit of the normal signal range, the greater the likelihood that the signal to be detected is an abnormal signal. Similarly, when the signal to be detected is less than the lower limit of the normal signal range, the greater the difference between the signal to be detected and the lower limit of the normal signal range, the greater the likelihood that the signal to be detected is an abnormal signal. Therefore, based on the value of the signal to be detected within each intercepted interval, the degree of removal required for each intercepted interval is calculated.
[0055] Specifically, the first Signals to be detected that fall above the upper bound of the normal signal range or below the lower bound of the normal signal range within the intercept interval are categorized as suspected abnormal signals. Other signals to be detected within a cutoff interval, excluding suspected abnormal signals, are denoted as suspected normal signals.
[0056] Furthermore, if the first Within the selected interval, the first... If the first suspected abnormal signal is greater than the final upper bound of the normal signal range, then the first... Within the selected interval, the first... The absolute value of the difference between the final upper bound of the range of the suspected abnormal signal and the normal signal is denoted as the nth. Within the selected interval, the first... The degree of abnormality of a suspected abnormal signal.
[0057] Furthermore, if the first Within the selected interval, the first... If the first suspected abnormal signal is less than the final lower bound of the normal signal range, then the first... Within the selected interval, the first... The absolute value of the difference between the final lower bound of the range of the suspected abnormal signal and the normal signal is denoted as the i-th. Within the selected interval, the first... The degree of abnormality of a suspected abnormal signal.
[0058] Furthermore, the first Each suspected abnormal signal within a cutoff interval is connected to the suspected abnormal signals adjacent to its left and right sides to obtain the first... The method involves extracting several suspected abnormal signal segments within a given interval. Specifically, connecting each signal within an interval to its adjacent signals on either side to form a data segment is a well-known technique and will not be described in detail in this embodiment.
[0059] Furthermore, obtain the first The specific formula for calculating the degree of removal required for each cutoff interval is as follows: In the formula, Indicates the first The degree of need to be cleared in each selected interval. Indicates the first The number of suspected normal signals within a single intercept interval. Indicates the first The number of signals to be detected within each intercept interval Indicates the first The mean of the abnormality of all suspected abnormal signals within a cutoff interval. Indicates the first The maximum value among all suspected abnormal signal segments within a cutoff interval, representing the number of suspected abnormal signals. This represents the sigmoid function, which is used for normalization in this embodiment. As an exponential function with the natural constant as its base, this embodiment uses it for inverse proportional processing.
[0060] It should be noted that, The larger the value, the more significant the [value]. The fewer signal data points within the intercepted interval that are greater than the final upper bound or less than the final lower bound, the better. The likelihood of containing foreign fibers within the selected interval is relatively small; The larger the value, the more significant the [value]. The greater the probability that a suspected abnormal signal within a given interval is indeed an abnormal signal, that is, the higher the probability that the first abnormal signal is actually an abnormal signal. The selected interval is likely to contain foreign fibers; The larger the value, the more significant the [value]. The more a segment of suspected abnormal data within a selected interval conforms to the characteristic that when a signal affected by a foreign fiber appears, multiple signals affected by a foreign fiber should appear consecutively, i.e., the first segment... The greater the chance that a cut-off interval contains foreign fibers.
[0061] At this point, the degree of cleanup required for each selected interval is obtained.
[0062] Furthermore, according to the first Each signal to be detected within a certain interval corresponds to a region of cotton to be detected, thus obtaining the first... The area of cotton to be detected corresponds to the selected interval. A preset threshold for removal is set. ,like Then for the first The foreign fiber is removed from the area of the cotton to be detected corresponding to each intercept interval. In this embodiment, a preset threshold for removal is used. This example is used for illustration; other values can be set in other embodiments. Removing foreign fibers from a region is a well-known technique and will not be described in detail in this embodiment.
[0063] This concludes the embodiment.
Claims
1. A foreign matter detection method for a foreign fiber removing machine based on a photoelectric detection technology, characterized by, The application relates to a method for detecting the presence of a foreign fiber in a cotton sample, comprising: placing the cotton to be detected on a foreign fiber removing machine to obtain a data sequence of a detection signal; The area that the spray valve can cover under a set jet pressure, the width of the conveyor belt, and the running speed of the conveyor belt are obtained within the foreign fiber removal machine. The data sequence of the signal to be detected is segmented to obtain several interception intervals; each signal to be detected corresponds to a region of the cotton to be detected. Based on the distribution difference of the signal to be detected in each interception interval and its surrounding interception intervals, the anomaly factor of each interception interval is obtained. The signal to be detected in each interception interval is clustered to obtain several clusters. The cluster containing the most signal to be detected in each interception interval is denoted as the normal cluster in each interception interval. Based on the distribution of the signal to be detected in the normal clusters in each interception interval, the distribution of the signal to be detected in each interception interval is obtained. The upper and lower bounds of the normal signal range of a cut-off interval are determined. Based on the difference in anomalous factors between each cut-off interval and other cut-off intervals, the anomalous factor of each cut-off interval, and the number of signals to be detected in the normal clusters within each cut-off interval, a confidence factor for the normal signal range of each cut-off interval is obtained. Combining this with the upper and lower bounds of the normal signal range of each cut-off interval, the final upper and lower bounds of the normal signal range are obtained. Based on the final upper and lower bounds of the normal signal range and the distribution of signals to be detected within each cut-off interval, the degree of removal required for each cut-off interval is determined, and foreign fiber removal is performed. The specific calculation formula for obtaining the anomalous factor of each cut-off interval is as follows: In the formula, Indicates the first Outlier factors within a cutoff interval They represent the first The, the The variance of all signals to be detected within a cutoff interval. They represent the first The, the The, the The mean of all signals to be detected within a cutoff interval. To prevent overparameters with a denominator of 0, the specific calculation formula for the confidence factor of the normal signal range for each truncation interval is as follows: In the formula, Indicates the first Confidence factor for the normal signal range of a cut-off interval Indicates the first Outlier factors within a cutoff interval Indicates the first Outlier factors within a cutoff interval Indicates the number of intervals to be extracted. This represents a second hyperparameter to prevent the denominator from being zero. Indicates the first The number of signals to be detected in normal clusters within a cutoff interval. Indicates the first The number of signals to be detected within each intercept interval to prevent the third hyperparameter with denominator 0, is an absolute value function; the specific calculation formulae of the final upper limit and the final lower limit of the normal signal range are as follows: wherein, represents the final upper limit of the normal signal range, represents the number of the intercept intervals, represents the confidence factor of the normal signal range of the th intercept interval, represents the confidence factor of the normal signal range of the th intercept interval, represents the upper limit of the normal signal range of the th intercept interval, represents the final lower limit of the normal signal range, represents the lower limit of the normal signal range of the th intercept interval; the specific steps of obtaining the degree of the to-be-cleaned of each intercept interval are as follows: the to-be-detected signal greater than the final upper limit of the normal signal range or smaller than the final lower limit of the normal signal range in the th intercept interval is recorded as a suspected abnormal signal; the other to-be-detected signal except the suspected abnormal signal in the th intercept interval is recorded as a suspected normal signal; if the th suspected abnormal signal in the th intercept interval is greater than the final upper limit of the normal signal range, then the absolute value of the difference between the th suspected abnormal signal and the final upper limit of the normal signal range in the th intercept interval is recorded as the abnormal performance degree of the th suspected abnormal signal in the th intercept interval; If the first Within the selected interval, the first... If the first suspected abnormal signal is less than the final lower bound of the normal signal range, then the first... Within the selected interval, the first... The absolute value of the difference between the final lower bound of the range of the suspected abnormal signal and the normal signal is denoted as the i-th. Within the selected interval, the first... The degree of abnormality of the first suspected abnormal signal; the degree of abnormality of the first suspected abnormal signal; Each suspected abnormal signal within a cutoff interval is connected to the suspected abnormal signals adjacent to its left and right sides to obtain the first... Several suspected abnormal signal segments were extracted within the intercept interval; the first... The specific formula for calculating the degree of removal required for each cutoff interval is as follows: In the formula, Indicates the first The degree of need to be cleared in each selected interval. Indicates the first The number of suspected normal signals within a single intercept interval. Indicates the first The number of signals to be detected within a single intercept interval. Indicates the first The mean of the abnormality level of all suspected abnormal signals within a cutoff interval. Indicates the first The maximum value among all suspected abnormal signal segments within a cutoff interval.
2. The foreign matter detection method of the foreign fiber removing machine based on the photoelectric detection technology according to claim 1, characterized by, The specific steps for obtaining the plurality of interception intervals are as follows: setting the jet pressure of the jet valve in the foreign fiber removing machine, obtaining the coverable area of the jet valve in the foreign fiber removing machine under the set jet pressure; dividing the coverable area of the jet valve in the foreign fiber removing machine under the set jet pressure by the width of the conveying belt in the foreign fiber removing machine, and recording the value as the coverable length; and obtaining the specific calculation formula of the time length of the interception interval as follows: In the formula, denotes the time length of the interception interval, denotes the coverable length, denotes the running speed of the conveying belt in the foreign fiber removing machine; according to the acquisition time corresponding to each to-be-detected signal in the data sequence of the to-be-detected signal and the time length of the interception interval, the data sequence of the to-be-detected signal is divided into a plurality of interception intervals.
3. The foreign matter detection method of the foreign fiber removing machine based on the photoelectric detection technology according to claim 1, characterized by, The specific steps for clustering the signal to be detected within each intercepted interval to obtain several clusters are as follows: Using the elbow method, obtain the clusters using the K-means clustering algorithm. The number of clusters formed when clustering all signals to be detected within a specified interval is denoted as the i-th cluster. The number of clusters in each cutoff interval; using Euclidean distance as the distance metric, based on the... The values of all signals to be detected within the specified interval are taken, and the number of clusters is set to the th interval. The number of clusters in the th cutoff interval is used to perform K-means clustering on the th interval. All signals to be detected within a cutoff interval are clustered to obtain several clusters.
4. The foreign matter detection method of the foreign fiber removing machine based on the photodetecting technology according to claim 1, characterized by, The specific steps of obtaining the upper and lower bounds of the normal signal range of each intercept interval are as follows: taking the minimum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval as the lower bound of the normal signal range of the first intercept interval; taking the maximum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval as the upper bound of the normal signal range of the first intercept interval. taking the minimum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval as the lower bound of the normal signal range of the first intercept interval; taking the maximum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval as the upper bound of the normal signal range of the first intercept interval. taking the maximum value of all the to-be-detected signals in the normal clustering cluster in the first intercept interval as the upper bound of the normal signal range of the first intercept interval.
5. The foreign matter detection method of the foreign fiber removing machine based on the photoelectric detection technology according to claim 1, characterized by, The specific steps of the foreign fiber removing are as follows: according to the first interval, a region of the cotton to be detected corresponding to each signal to be detected in the first interval is obtained. Preset threshold to be cleared If the first The degree of uncleared areas in each selected interval Then for the first Foreign fibers are removed from the area of the cotton to be tested corresponding to the intercepted interval.
Citation Information
Patent Citations
Method and system for diagnosing nitrogen nutrition loss of drip irrigation cotton
CN113109272A
Falling impurity component analysis method based on computer vision
CN118968109A