A multi-pulse signal-based anti-interference method and photoelectric sensor

CN122881772APending Publication Date: 2026-10-09GUANGZHOU HEYI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611105862.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]本发明提供了一种基于多脉冲信号抗干扰方法及光电传感器,其采用多脉冲信号进行周期性校验,以及采用时序和脉冲宽度双维度联合判决,提高了检测精度,同时采用多个维度加权置信度量化评判机制,为了解决现有技术无法区别精准区分,以及对有效信号的输出仅采用单一阈值判断,易出现有效信号误屏蔽、干扰脉冲电信号误输出的问题

Benefits of technology

[0018]相较于仅依靠帧周期识别信号的现有技术,本发明提供的方法在周期性校验基础上增加组内时序模板匹配与脉冲宽度一致性双重校验,可精准区分周期一致的目标多脉冲组与同频干扰多脉冲组,解决同频干扰误识别问题;相较于单脉冲传感识别方案,本发明采用的多脉冲可以作为身份特征,增加识别维度,难以被外界干扰复刻,同时通过脉冲聚类分层过滤随机散光与异频周期性干扰,提前剔除无效信号,降低后端算法运算开销;时序与脉冲宽度为相互独立的两类物理特征,双维度联合判决形成识别冗余,在脉冲丢失、强环境散光、多设备同频工作等恶劣工况下仍具备稳定识别能力,大幅提升工业传感器抗干扰性能与检测可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122881772A_ABST
    Figure CN122881772A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multi-pulse signal anti-interference method and photoelectric sensor, the method provided in the application increases group within timing template matching and pulse width consistency double check on the basis of periodic check, can accurately distinguish the target multi-pulse group of consistent period and the same frequency interference multi-pulse group, solve the same frequency interference misidentification problem;Timing and pulse width dual-dimension joint decision forms identification redundancy, still have stable identification ability under the adverse working conditions such as pulse loss, strong environmental stray light, multi-device same frequency operation, greatly improve the anti-interference performance and detection reliability of industrial sensor. Still adopt pulse actual trigger time, pulse actual width, edge actual slope, coherent integration amplitude multiple dimensions weighted calculation confidence quantization evaluation mechanism, so that the confidence assignment of signal is objective quantization, improve discrimination logic accuracy, avoid prior art discrimination logic extensive, to effectively avoid signal misjudgment, the problem of missing judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of photoelectric signal detection and pulse signal anti-interference recognition technology, and more specifically, to a multi-pulse signal anti-interference method and photoelectric sensor. Background Technology

[0002] With the continuous improvement of the integration and modularity of industrial automation equipment, production line equipment layouts are becoming increasingly compact. Photoelectric sensors, as core components for automated detection, limit sensing, and material identification, are being densely deployed in confined installation spaces. It's common to see multiple photoelectric sensors installed side-by-side, facing each other, or in close-range, staggered configurations on production lines. Meanwhile, thanks to their advantages of high efficiency, energy saving, fast response, and long lifespan, high-frequency LED light sources have completely replaced traditional light sources and are widely used in industrial lighting, equipment status indication, and assembly line supplementary lighting. Therefore, photoelectric sensors are susceptible to diffuse reflection or direct light from high-frequency LED light sources and other side-by-side or facing photoelectric sensors, significantly increasing the probability of light interference and leading to false triggering. Thus, in complex industrial conditions with dense installation and coexistence of high-frequency LED light sources, if existing photoelectric sensors lack appropriate handling mechanisms, they are prone to false triggering, harming industrial production and causing unnecessary losses.

[0003] Existing technologies generally use single-pulse signals for co-frequency optical detection, which has the following drawbacks: the waveform features used for signal discrimination are of a single dimension, and the ability to distinguish co-frequency interference pulses with highly similar timing is insufficient; when the amplitude and time domain of the valid signal and the interference pulse overlap, misjudgment and missed detection are very likely to occur; most importantly, the output of the valid signal is judged by only a single threshold, which is prone to the dual problems of false shielding of the valid signal and false output of the interference signal.

[0004] In summary, existing technologies using single-pulse detection suffer from poor resistance to co-frequency optical interference, low interference identification accuracy, and a single signal processing method. They cannot simultaneously achieve anti-interference performance with real-time detection and accuracy, making it difficult to meet the high-precision and highly integrated demands of modern industrial automation production. Therefore, a novel technical solution is urgently needed to address these technical shortcomings. Summary of the Invention

[0005] This invention provides a multi-pulse signal-based anti-interference method and photoelectric sensor. It uses multi-pulse signals for periodic verification and employs a dual-dimensional joint decision based on timing and pulse width to improve detection accuracy. At the same time, it adopts a multi-dimensional weighted confidence quantification evaluation mechanism to address the problems of existing technologies being unable to accurately distinguish between signals and using only a single threshold to judge the output of effective signals, which can easily lead to the false shielding of effective signals and the false output of interference pulse electrical signals.

[0006] The technical solution adopted in this invention is:

[0007] A method for anti-interference based on multi-pulse signals, the method comprising: The transmitter is driven to periodically emit multi-pulse optical signals according to a pre-stored multi-pulse signal template. The receiver obtains the actual trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles. The pulse electrical signal is generated by the receiver acquiring optical signals in real time. The optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light. Multiple pulse electrical signals are clustered and divided according to the actual trigger time of the pulse electrical signals to form several multi-pulse groups; Using the standard period of the multi-pulse signal template as a reference, several multi-pulse groups are periodically verified. If they fail, they are determined to be due to ambient astigmatism interference, and the transmission period of the transmitter is not adjusted. If they pass, they are determined to be periodic multi-pulse groups with the same frequency. For periodic multi-pulse groups with the same frequency, perform intra-group timing template matching and pulse width consistency detection; if the detection fails, it is determined to be a multi-pulse signal interfering with the same frequency, and the transmission period of the transmitter is adjusted; if the detection passes, it is determined to be the target multi-pulse signal. The acquired target multi-pulse signal is subjected to coherent integration to obtain the coherent integral amplitude; The confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal. Whether to sample and output depends on the confidence level of the target multi-pulse signal.

[0008] Preferably, based on the actual trigger time of the pulse electrical signal, multiple pulse electrical signals are clustered and divided into several multi-pulse groups, including: Read the preset maximum interval within the pulse group and the silence interval between groups; The time interval between adjacent pulses is calculated based on the actual trigger time of the pulse electrical signal. Pulses whose time interval between adjacent pulses is less than or equal to the maximum interval within the pulse group are clustered together to form multi-pulse groups; When the time interval between adjacent pulses is greater than or equal to the preset inter-group silence interval, a new multi-pulse group is generated.

[0009] Preferably, the obtained multi-pulse groups are periodically verified based on the standard period of the multi-pulse signal template; if the verification fails, it is determined to be environmental astigmatism interference / heterogeneous frequency interference; if the verification passes, it is determined to be a periodic multi-pulse group with the same frequency, including: Read the preset minimum number of consecutive valid pulse groups and periodic fluctuation threshold; Extract the start time of several multi-pulse groups and calculate the interval period between adjacent multi-pulse groups; Using the standard period of the multi-pulse signal template as a benchmark, the relative fluctuation of the interval period of each multi-pulse group relative to the standard period of the multi-pulse signal template is calculated. If the number of multi-pulse groups obtained by clustering over a certain period of time is greater than or equal to the minimum number of consecutive effective pulse groups, and the relative period fluctuation is less than or equal to the period fluctuation threshold, then it is determined to be a periodic multi-pulse group with the same frequency; otherwise, it is determined to be environmental astigmatic interference / different frequency interference.

[0010] Preferably, the same-frequency periodic multi-pulse group is subjected to intra-group timing template matching and pulse width consistency detection; if it fails, it is determined to be a same-frequency interfering multi-pulse signal, and the transmission period of the transmitting end is adjusted; if it passes, it is determined to be the target multi-pulse signal, including: Align the pulses within the same frequency periodic multipulse group with the first pulse to obtain the measured relative time delay sequence, and perform intra-group timing template matching with the standard relative time delay sequence of the pre-stored multipulse signal template; Acquire pulse electrical signals that successfully match the timing template within the group to obtain the effective pulse width set, and perform pulse width consistency detection on the pulse width of the effective pulse width set; Verification is performed using timing template matching within the joint group and pulse width consistency detection; If both the timing template matching within the group and the pulse width consistency detection are passed, then it is determined to be the target multi-pulse signal; If the timing template matching and / or pulse width consistency detection within the group fails, it is determined to be a co-frequency interference multi-pulse signal.

[0011] Furthermore, the pulses within a periodic multi-pulse group at the same frequency are aligned with the first pulse to obtain a measured relative time delay sequence. This sequence is then matched with a pre-stored standard relative time delay sequence of a multi-pulse signal template within the group, including: Read the standard relative delay sequence, timing jitter tolerance threshold, and total number of pulses from the pre-stored multi-pulse signal template; Using the first pulse moment within a periodic multi-pulse group at the same frequency as the time origin, the relative time delay of each pulse electrical signal within each group is calculated, thereby obtaining the measured relative time delay sequence corresponding to the periodic multi-pulse group at the same frequency. Calculate the absolute value of the difference between the corresponding time delays of the standard relative time delay sequence and the measured relative time delay sequence; The number of first pulse electrical signals whose absolute value of the statistical difference is less than or equal to the timing jitter tolerance threshold; The timing matching score is calculated based on the number of first pulse electrical signals and the total number of pulses.

[0012] Furthermore, pulse signals that successfully match the timing template within the group are acquired to obtain the effective pulse width set. Pulse width consistency detection is then performed on the pulse widths of the effective pulse width set, including: The pulse tolerance range is obtained by reading the standard pulse width and pulse tolerance difference of the pre-stored multi-pulse signal template; The effective pulse width set is obtained by acquiring and using the pulse electrical signals whose absolute difference is less than or equal to the timing jitter tolerance threshold and the number of first pulse electrical signals; Count the number of second pulse electrical signals whose pulse width falls within the pulse width tolerance range in the effective pulse width set; The pulse width matching ratio is calculated based on the number of second pulse electrical signals and the number of first pulse electrical signals.

[0013] Preferably, the acquired target multi-pulse signal is subjected to coherent integration to obtain the coherent integrated amplitude, including: The coherent integral amplitude is obtained by multiplying the target multipulse signal and the pre-stored multipulse signal template at time points and accumulating the results.

[0014] Preferably, the confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal, including: Read the standard pulse trigger time, standard peak value of coherent integration, standard pulse width, and standard edge slope of the pre-stored multi-pulse signal template; The absolute timing offset is calculated based on the actual trigger time of the target multi-pulse signal and the trigger time of the standard pulse. The temporal matching coefficients are obtained by segmenting and normalizing the absolute temporal offset; The coherent integral amplitude of the target multipulse signal is normalized based on the coherent integral standard peak value to obtain the normalized integral amplitude. The normalized integral amplitude is corrected by range limiting to obtain the coherent integral matching coefficients; The absolute error of pulse width is calculated based on the measured pulse width of the target multi-pulse signal and the standard pulse width. The absolute error of pulse width is normalized to obtain the pulse width matching coefficient; The absolute error of the measured edge slope is calculated based on the measured edge slope of the target multi-pulse signal and the standard edge slope. The absolute error of the measured slope at the edge is normalized to obtain the edge slope matching coefficient; The confidence level of the target multipulse signal is calculated by weighting the obtained timing matching coefficient, coherence integral matching coefficient, pulse width matching coefficient, and edge slope matching coefficient.

[0015] Furthermore, the decision to sample and output is based on the confidence level of the target multi-pulse signal, including: When the confidence level of the target multi-pulse signal is greater than or equal to the effective judgment threshold, the target multi-pulse signal is determined to be a valid encoded pulse of the local machine and participates in the sampling output; When the confidence level of the target multi-pulse signal is less than the effective judgment threshold, it is judged as interference, the response is turned off, and there is no sampling output.

[0016] A photoelectric sensor includes an MCU main controller, which executes the multi-pulse signal-based anti-interference method as described above.

[0017] Compared with the prior art, the beneficial effects of the present invention are:

[0018] Compared to existing technologies that rely solely on frame periodicity for signal identification, the method provided in this invention adds dual verification of intra-group timing template matching and pulse width consistency on top of periodic verification. This can accurately distinguish between target multi-pulse groups with consistent periods and multi-pulse groups interfering with the same frequency, solving the problem of misidentification due to the same-frequency interference. Compared to single-pulse sensing and identification schemes, the multi-pulse used in this invention can serve as an identification feature, increasing the identification dimension and making it difficult to be replicated by external interference. At the same time, by filtering random astigmatism and inter-frequency periodic interference through pulse clustering and layering, invalid signals are eliminated in advance, reducing the computational overhead of the back-end algorithm. Timing and pulse width are two independent physical features, and the dual-dimensional joint decision forms identification redundancy. It still has stable identification capabilities under harsh conditions such as pulse loss, strong environmental astigmatism, and multiple devices operating at the same frequency, significantly improving the anti-interference performance and detection reliability of industrial sensors.

[0019] In addition, this invention also adopts a quantitative evaluation mechanism that uses multiple dimensions such as actual pulse trigger time, actual pulse width, actual edge slope, and coherent integral amplitude to calculate the confidence of the target multi-pulse signal. This makes the confidence of the signal objectively quantified, improves the accuracy of the discrimination logic, avoids the coarse discrimination logic of the existing technology, and effectively avoids the problems of signal misjudgment and omission. This invention is suitable for complex and multi-interference industrial working conditions. Attached Figure Description

[0020] Figure 1 This is a flowchart of a multi-pulse signal-based anti-interference method provided by the present invention.

[0021] Figure 2 This is a timing diagram of the pulse signal acquired by the receiving end provided by the present invention.

[0022] Figure 3 This is a schematic diagram of the various functional units of the MCU main controller in the photoelectric sensor provided by the present invention.

[0023] Figure 4This is a schematic diagram of the frame of the photoelectric sensor provided by the present invention. Detailed Implementation

[0024] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments.

[0025] It should be understood that, when used in this specification, the terms “comprising” and “including” indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0026] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification, unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “the” are intended to include the plural forms.

[0027] It should also be further understood that the term "and / or" as used in this specification refers to any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations. Example

[0028] When multiple devices are densely deployed in an industrial site, adjacent photoelectric sensors will generate interference pulses with the same frequency and highly similar timing. For example, the trigger time of the interference pulse may differ from the effective signal of the local sensor by only a few microseconds. It is difficult to distinguish between the two types of pulses by simply relying on the pulse trigger time. At the same time, LED flicker and external stray light will form periodic interference light. The amplitude and time domain range of the interference pulse are likely to overlap with the effective signal of the local sensor. Relying solely on time domain threshold screening can easily misjudge the interference pulse as an effective signal, causing the sensor to frequently trigger falsely.

[0029] Existing technologies generally use single-pulse signals for co-frequency optical detection, which has several drawbacks: the waveform features used for signal discrimination are limited in dimension, making it insufficient for distinguishing co-frequency interference pulses with highly similar timing; when the amplitude and time domain of the valid signal and the interference pulse overlap, misjudgment and missed detection are very likely to occur; most importantly, the output of the valid signal only uses a single threshold for judgment, lacking multi-dimensional quantization matching, and cannot objectively quantify the degree of matching between the signal and the standard pulse signal; for boundary mixed pulses with weak interference superimposed on the valid signal, they are either directly discarded, resulting in missed detection, or directly output, causing misjudgment, resulting in poor detection stability. Therefore, it is easy to have the dual problems of false shielding of the valid signal and false output of the interference pulse electrical signal.

[0030] Based on this, the present invention provides an anti-interference method based on multi-pulse signals. It uses multi-pulse signals for detection and makes joint decisions through intra-group timing template matching and pulse width consistency detection. At the same time, it adopts a quantitative evaluation mechanism with multiple dimensions of weighted confidence quantification, including actual pulse trigger time, actual pulse width, actual edge slope, and coherent integral amplitude. This makes the confidence value of the signal objectively quantified, improves the accuracy of the discrimination logic, avoids the coarse discrimination logic of existing technologies, and effectively avoids the problems of signal misjudgment and omission. The present invention is suitable for complex and multi-interference industrial working conditions.

[0031] like Figure 1 , Figure 2 As shown, the present invention provides an anti-interference method based on multi-pulse signals, the method comprising: The transmitter is driven to periodically emit multi-pulse optical signals according to a pre-stored multi-pulse signal template. The receiver obtains the actual trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles. The pulse electrical signal is generated by the receiver acquiring optical signals in real time. The optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light. Multiple pulse electrical signals are clustered and divided according to the actual trigger time of the pulse electrical signals to form several multi-pulse groups; Using the standard period of the multi-pulse signal template as a reference, several multi-pulse groups are periodically verified. If they fail, they are determined to be due to ambient astigmatism interference, and the transmission period of the transmitter is not adjusted. If they pass, they are determined to be periodic multi-pulse groups with the same frequency. For periodic multi-pulse groups with the same frequency, perform intra-group timing template matching and pulse width consistency detection; if the detection fails, it is determined to be a multi-pulse signal interfering with the same frequency, and the transmission period of the transmitter is adjusted; if the detection passes, it is determined to be the target multi-pulse signal. The acquired target multi-pulse signal is subjected to coherent integration to obtain the coherent integral amplitude; The confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal. Whether to sample and output depends on the confidence level of the target multi-pulse signal.

[0032] Compared to existing technologies that rely solely on frame periodicity for signal identification, the method provided in this invention adds dual verification of intra-group timing template matching and pulse width consistency on top of periodic verification. This can accurately distinguish between target multi-pulse groups with consistent periods and multi-pulse groups interfering with the same frequency, solving the problem of misidentification due to the same-frequency interference. Compared to single-pulse sensing and identification schemes, the multi-pulse used in this invention can serve as an identification feature, increasing the identification dimension and making it difficult to be replicated by external interference. At the same time, by filtering random astigmatism and inter-frequency periodic interference through pulse clustering and layering, invalid signals are eliminated in advance, reducing the computational overhead of the back-end algorithm. Timing and pulse width are two independent physical features, and the dual-dimensional joint decision forms identification redundancy. It still has stable identification capabilities under harsh conditions such as pulse loss, strong environmental astigmatism, and multiple devices operating at the same frequency, significantly improving the anti-interference performance and detection reliability of industrial sensors.

[0033] This invention obtains the energy characteristics of the same source signal through multi-pulse coherent integration, and combines the four-dimensional features of pulse timing, pulse width, and edge slope to quantify the confidence level, replacing the binary sampling decision based solely on timing distance. This significantly suppresses false alarm sampling caused by external co-frequency lasers, strong background light, and channel crosstalk. Through multi-dimensional cross-validation of timing, coherent integration amplitude, pulse width, and edge slope, the invention eliminates the identification loopholes of single timing decision, greatly improving the robustness of pulse detection and sampling output under complex conditions with multiple interferences. It is also compatible with long-distance weak reflection pulses with small timing offsets and slight waveform distortion, effectively reducing the probability of target missed detection.

[0034] In this example, the transmitter periodically transmits multi-pulse optical signals according to a pre-stored multi-pulse signal template. Specifically, at least one set of standard multi-pulse signal templates can be pre-stored in the MCU main controller. Each set of multi-pulse signal templates contains fixed parameters: reference transmission frequency F0, total number of pulses N, standard relative delay sequence, timing jitter tolerance threshold, width of each standard pulse, pulse tolerance difference, standard pulse trigger time, standard peak value of coherent integration, standard pulse width, standard edge slope, pulse interval T, reference window center, etc. For example, the transmission period is 100us, and a multi-pulse signal consisting of a wide pulse and a narrow pulse is output. The pulse width of the wide pulse is 5us, the pulse width of the narrow pulse is 3us, and the pulse interval between the wide and narrow pulses is 2us. The pulse width and pulse interval in each set of multi-pulse signal templates are different, so the multi-pulse signal in each set of multi-pulse signal templates is unique. Any set of standard multi-pulse signal templates is selected from multiple sets, and then the transmitter is driven to periodically transmit multi-pulse optical signals according to the pre-stored multi-pulse signal template. This invention employs multi-pulse signals, which differ from the single-pulse and disordered pulse transmission used in existing technologies. The transmission mode of multi-pulse signals provides a benchmark matching basis for subsequent timing and coherence verification, greatly improving signal recognition.

[0035] In this example, multiple sets of standard multi-pulse signal templates can be pre-stored in each photoelectric sensor at the factory. The multi-pulse signal templates of different photoelectric sensors can also be set to be different from each other. Thus, the unique pulse characteristics of its own multi-pulse signal template can be used to effectively identify the multi-pulse light signal reflected back by the detected object (i.e., the target multi-pulse signal) and interference light. The interference light includes the same-frequency interference light generated by photoelectric sensors installed in rows or side by side, and / or the interference light generated by high-frequency LEDs. These interference lights may be collected in real time by the receiving end through diffuse reflection or direct illumination and converted into electrical signals, thereby interfering with the effective light signal acquisition of the device and causing false triggering or missed detection.

[0036] The receiver obtains the actual trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles. The pulse electrical signal is generated by the receiver acquiring optical signals in real time. The optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light. Specifically, within each transmission cycle, the pulse electrical signal output by the receiving end is compared with a reference voltage threshold, such as using a comparator. When the pulse electrical signal is greater than or equal to the reference voltage threshold, a timer is triggered to increment by 1, thereby recording the frequency of the pulse electrical signal and the actual trigger time of the pulse. Simultaneously, the duration of each pulse electrical signal can be recorded using a pulse width sampling unit, thus obtaining the measured pulse width data. The voltage change rates at the rising and falling edges of the pulse electrical signal are acquired using an edge measurement slope sampling unit, thereby obtaining the measured rising edge slope and the measured falling edge slope. Here, the measured rising edge slope and the measured falling edge slope are collectively referred to as the edge measurement slope, meaning that the edge measurement slope includes both the measured rising edge slope and the measured falling edge slope.

[0037] In one specific embodiment, based on the actual trigger time of the pulse electrical signal, multiple pulse electrical signals are clustered and divided into several multi-pulse groups, including: Read the maximum interval within the preset pulse group Intergroup silence interval ; The time interval between adjacent pulses is calculated based on the actual trigger time of the pulse electrical signal. Specifically, the time interval between adjacent pulses can be obtained by subtracting the actual trigger times of two adjacent pulse electrical signals. .

[0038] Pulses with an adjacent pulse time interval less than or equal to the maximum interval within the pulse group are clustered to form multi-pulse groups. Specifically, if This indicates that two adjacent pulse signals belong to the same multi-pulse group, and therefore the two adjacent pulse signals are considered to be in the same multi-pulse group.

[0039] This invention uses the time interval between two pulse electrical signals as the basis for clustering to cluster pulse electrical signals collected in multiple cycles, thereby obtaining several multi-pulse groups.

[0040] The maximum interval within a multi-pulse group can be set based on the maximum theoretical interval between adjacent pulses within the group from a pre-stored multi-pulse signal template, used to distinguish whether pulse signals belong to the same multi-pulse group. However, considering that industrial sensors may experience signal drift during actual operation due to system clock sampling jitter, slight echo timing drift caused by changes in light flight distance, timing deviations introduced by the receiver and comparator, or slight pulse loss causing a small widening of the interval in a few operating conditions, this example adds a time drift margin to the maximum theoretical interval between adjacent pulses as the maximum interval within the pulse group; in other words, the maximum interval within the pulse group is equal to the sum of the maximum theoretical interval between adjacent pulses and the time drift margin.

[0041] It is important to note the maximum interval within a pulse group. The setting cannot be too small because the measured pulse interval exceeds the limit due to jitter. A single target multi-pulse group will be split into multiple pseudo-clusters, causing subsequent periodic verification to fail. However, It should not be set too high, as setting it too high may cause astigmatic stray pulses that immediately follow the end of the multi-pulse group to be incorrectly included in the current group, thus affecting the subsequent statistics on timing and pulse width.

[0042] In this embodiment, a silent interval between groups is also set. Read the preset inter-group silence interval , ;like This indicates that two adjacent pulse electrical signals have a large interval and belong to different multi-pulse groups. Therefore, when the time interval between adjacent pulses is large... Greater than or equal to the preset inter-group silence interval When this occurs, a new multi-pulse group is generated. The inter-group silence interval is... It can be used to identify the silent gap between two sets of multi-pulse groups, and to achieve reliable segmentation of the multi-pulse group boundary.

[0043] For intergroup silence interval The interval between the end of the last pulse in a multi-pulse group and the start of the first pulse in the next adjacent multi-pulse group; the inter-group silence interval. The silence interval between groups can be determined based on the transmission period of the pre-stored multi-pulse signal template and the total span of the multi-pulse signal. It is equal to the transmission period of the multi-pulse signal template minus the total span of the multi-pulse signal, or slightly less than the difference between the transmission period of the multi-pulse signal template and the total span of the multi-pulse signal. The total span of the multi-pulse signal represents the interval between the start time of the first pulse and the end time of the last pulse within the multi-pulse signal template, which is the time width occupied by each multi-pulse group.

[0044] when Maintain the current multi-pulse group open and continuously listen for pulses. If the waiting time reaches [a certain value], [further action will be taken]. If no new pulse is captured, the current multi-pulse group is closed.

[0045] In one specific embodiment, several multi-pulse groups are periodically verified based on the standard period of the multi-pulse signal template. If the verification fails, it is determined to be environmental astigmatism interference / different frequency light, and the transmission period of the transmitter is not adjusted. If the verification passes, it is determined to be a periodic multi-pulse group with the same frequency, including: Read the preset minimum number of consecutive effective pulse groups and periodic fluctuation threshold. ; Extract the start times of several multi-pulse groups, denoted as The interval period of adjacent multi-pulse groups was calculated. ;in, .

[0046] Standard period of multi-pulse signal template Based on this, the relative fluctuation of the interval period of each multi-pulse group relative to the standard period of the multi-pulse signal template is calculated; the formula for calculating the relative fluctuation of the period is as follows: .

[0047] Several multi-pulse groups are obtained by continuous collection and clustering over a certain period of time. If the number of multi-pulse groups obtained by continuous collection and clustering over a certain period of time is greater than or equal to the minimum number of consecutive effective pulse groups, and the relative period fluctuation is less than or equal to the period fluctuation threshold, then it is determined to be a periodic multi-pulse group with the same frequency; otherwise, it is determined to be environmental astigmatic interference / different frequency interference.

[0048] Specifically, for ambient astigmatism interference, the pulses have no fixed transmission sequence; only random, scattered pulses occasionally and briefly cluster together. The intervals between several consecutive multi-pulse groups vary greatly, with fluctuations continuously exceeding the limit, making it impossible to form a stable repetitive cycle. Therefore, if the following conditions are met: the number of multi-pulse groups obtained by clustering over a certain period of time is less than the minimum number of consecutive effective pulse groups, or the relative fluctuation of the cycle is greater than the cycle fluctuation threshold, then the periodicity check fails, and it is determined to be ambient astigmatism interference. All pulse groups in that segment are discarded directly and do not proceed to subsequent timing and pulse width checks. In this case, the transmission period of the transmitter is not adjusted.

[0049] For inter-frequency periodic interference, the interference source itself has a stable fixed period, but the difference between its inherent period and the standard period is relatively large, resulting in a periodicity between adjacent multi-pulse groups. Continuous deviation from the standard period The cycle fluctuates relatively. Long-term greater than the periodic fluctuation threshold Although the pulses within a group form a regular sequence and possess periodicity, they do not have the same frequency as the target multi-pulse signal, meaning their periods are different. Therefore, if the following conditions are met: the number of multi-pulse groups obtained from clustering over a continuous period is greater than or equal to the minimum number of consecutive effective pulse groups, and the relative period fluctuation is greater than the period fluctuation threshold, then the periodicity check fails, and it is determined to be inter-frequency interference. In this case, the transmission period of the transmitting end is not adjusted.

[0050] If the following conditions are met: the number of multi-pulse groups obtained by clustering over a certain period of time is greater than or equal to the minimum number of consecutive effective pulse groups, and the relative periodic fluctuation is less than or equal to the periodic fluctuation threshold, then the periodicity check is passed and the group is determined to be a periodic multi-pulse group with the same frequency.

[0051] The co-frequency periodic multipulse group may be a target multipulse group or a co-frequency interference multipulse group.

[0052] To improve the accuracy of the judgment, it is best to collect pulse electrical signal data for three or more transmission cycles, preferably four or more transmission cycles. In other words, it is preferable to use the interval period between three continuous multi-pulse groups to calculate the relative fluctuation of the period.

[0053] In most applications, determining whether interference is co-channel interference can be done simply by timing matching. For example, for ordinary co-channel interference, if the period of the multi-pulse signal of the co-channel interference is... In other words, if the difference between the period of the interfering multi-pulse signal and the transmission period of the multi-pulse signal template is less than the period threshold, then co-channel interference is considered to exist. However, in extreme environments, such as when there is severe approximate coded co-channel interference, the interference source may intentionally or unintentionally use pulse timing similar to that within the target multi-pulse group. In such cases, timing matching alone can easily lead to misidentification. Because different light source driving circuits and their rise and fall edge characteristics differ, the output light pulse width varies; therefore, pulse width can serve as an important identification dimension, effectively distinguishing the target from the interference pulse width. Thus, combining timing with pulse width for joint determination improves the stability of industrial sensors operating in complex environments.

[0054] In this example, intra-group timing template matching and pulse width consistency detection are performed on the same-frequency periodic multi-pulse group. If the detection fails, it is determined to be a same-frequency interfering multi-pulse signal, and the transmission period of the transmitter is adjusted. If the detection passes, it is determined to be the target multi-pulse signal, including: Align the pulses within the same frequency periodic multipulse group with the first pulse to obtain the measured relative time delay sequence, and perform intra-group timing template matching with the standard relative time delay sequence of the pre-stored multipulse signal template; Acquire pulse electrical signals that successfully match the timing template within the group to obtain the effective pulse width set, and perform pulse width consistency detection on the pulse width of the effective pulse width set; Verification is performed using timing template matching within the joint group and pulse width consistency detection; If both the timing template matching within the group and the pulse width consistency detection are passed, then it is determined to be the target multi-pulse signal; If the timing template matching and / or pulse width consistency detection within the group fails, it is determined to be a co-frequency interference multi-pulse signal.

[0055] In this example, the pulses within a periodic multi-pulse group are aligned with the first pulse to obtain the measured relative time delay sequence. This sequence is then matched with the pre-stored standard relative time delay sequence of the multi-pulse signal template within the group, including: Read the standard relative time delay sequence of the pre-stored multi-pulse signal template , , This represents the relative delay of the first pulse within a group, which is always 0; N represents the total number of pulses; timing jitter tolerance threshold. Total number of pulses N; The first pulse time within a periodic multi-pulse group with the same frequency Using this as the time origin, the relative time delay of each pulse electrical signal within each group is calculated. Thus, the measured relative time delay sequence corresponding to the same frequency periodic multi-pulse group is obtained; Specifically, for a group of periodic multi-pulse pulses with the same frequency, its absolute pulse time sequence is denoted as... Where M represents the actual total number of pulses in the current synchronous periodic multipulse group; For the relative time delay of each pulse electrical signal within each group The calculation formula is as follows: .

[0056] Therefore, the obtained measured relative time delay sequence .

[0057] Calculate the absolute value of the difference between the corresponding time delays of the standard relative time delay sequence and the measured relative time delay sequence. For example, the absolute value of the difference between the first pulses is The absolute value of the difference between the second pulse in a periodic multi-pulse group with the same frequency is .

[0058] When the absolute value of the difference When the timing match is successful, the number of first pulse electrical signals whose absolute value of the difference is less than or equal to the timing jitter tolerance threshold is counted. ; The timing matching score is calculated based on the number of first pulse electrical signals and the total number of pulses. The formula for calculating the timing matching score is as follows: ,in, This represents the time sequence matching score.

[0059] In this example, a timing template matching can be determined by setting a timing threshold. Of course, it can also be set to other values ​​such as 0.8 or 0.9, which can be set according to the actual application.

[0060] When the time-series matching score is greater than or equal to the time-series threshold, that is... This indicates that the measured relative time delay sequence of the current periodic multipulse group at the same frequency matches the standard relative time delay sequence of the multipulse signal template, and the current periodic multipulse group at the same frequency may be the target multipulse group.

[0061] When the timing matching score is less than the timing threshold, it means that the measured relative time delay sequence of the current co-frequency periodic multipulse group does not match the standard relative time delay sequence of the multipulse signal template. In this case, the current co-frequency periodic multipulse group is not the target multipulse group.

[0062] To improve detection accuracy and prevent false positives, a sliding window of length L (e.g., 8 consecutive multi-pulse groups) can be used to statistically analyze the parameters within the sliding window. Number of groups The total temporal matching score within a sliding window can be calculated as follows: Where L represents the sum of the total number of pulses N within a sliding window.

[0063] Books that need explanation, if This indicates that no pulse timing match was successful, and the pulse width detection for this group is directly determined to be invalid. No subsequent pulse width consistency detection calculation is required.

[0064] In this example, pulse signals that successfully match the timing template within the group are acquired to obtain a set of effective pulse widths. A pulse width consistency check is then performed on the pulse widths of this set, including:

[0065] Based on the standard pulse width read from the pre-stored multi-pulse signal template Pulse tolerance difference To obtain the pulse tolerance range .

[0066] It should be noted that pulse tolerance is poor. It can be obtained by calibrating circuit temperature drift, sampling error, and photoelectric conversion distortion.

[0067] The effective pulse width set is obtained by acquiring and using the number of pulse electrical signals whose absolute difference value is less than or equal to the timing jitter tolerance threshold and the number of first pulse electrical signals, denoted as . Here, Therefore, the effective pulse width set is obtained by matching the timing templates within the group, and the specific steps are mentioned above.

[0068] Count the number of second pulse electrical signals whose pulse width falls within the pulse width tolerance range in the effective pulse width set; Specifically, you can iterate through the collection. Count the number of pulse electrical signals that satisfy the following formula. : .

[0069] The pulse width matching ratio is calculated based on the number of second pulse electrical signals and the number of first pulse electrical signals, using the following specific formula: ,in, This indicates the proportion of pulse width matching.

[0070] If there is slight drift in the pulse width of some pulses, or severe dispersion in pulse width, a comprehensive judgment can be made by combining the standard deviation of pulse width within the multi-pulse group.

[0071] In this embodiment, a pulse width threshold can be set to determine whether the pulse width consistency detection passes. For example, setting a pulse width threshold... Of course, it can also be set to other values ​​such as 0.7 or 0.9, which can be set according to the actual application.

[0072] When the pulse width matching ratio is greater than or equal to the pulse width threshold, it indicates that the pulse width characteristics of the current periodic multi-pulse group are qualified, that is, the measured pulse width of the current periodic multi-pulse group is highly consistent with the standard pulse width of the multi-pulse signal template.

[0073] When the pulse width matching ratio is less than the pulse width threshold, it indicates that the pulse width characteristics of the current periodic multi-pulse group are not qualified, that is, there is a big difference between the measured pulse width of the current periodic multi-pulse group and the standard pulse width of the multi-pulse signal template.

[0074] Therefore, there is only if When the signal is detected, it is determined to be a target multi-pulse signal.

[0075] when ,or and At that time, it was determined to be a co-frequency interference multi-pulse signal.

[0076] Only if and At that time, it was determined to be a multi-pulse signal with inter-frequency interference.

[0077] In one specific embodiment, coherent integration is performed on the acquired target multipulse signal to obtain the coherent integral amplitude, including: The coherent integral amplitude is obtained by multiplying the target multipulse signal and the pre-stored multipulse signal template at time points and then integrating the results. The specific calculation formula is as follows: , in, This refers to the received pulse electrical signal, including the target multi-pulse signal and / or interference pulse electrical signal; The waveform representing the pre-stored multi-pulse signal template; This represents the measured amplitude of the coherence product of the pulsed electrical signal; This indicates the transmission time window for multi-pulse signals.

[0078] When the waveform timing, pulse width, and pulse interval of the pulse electrical signal are perfectly aligned with the multi-pulse signal template, the in-phase energy continues to superimpose after multiplication, resulting in a significant increase in the integral result. However, when the waveform of the interference pulse electrical signal is completely misaligned with the multi-pulse signal template, the positive and negative signals cancel each other out after multiplication, resulting in a lower integral output value.

[0079] By performing coherent integration over the entire transmission time window, the integral value changes with time, forming a curve. The coherent integration amplitude reaches its maximum value at the moment when the received target multipulse signal and the locally pre-stored multipulse signal template are perfectly aligned. The maximum coherent integration amplitude is then used as the coherent integration amplitude for the corresponding coherent integration operation of the target multipulse signal.

[0080] The coherent integration operation described above uses the calculation formula for continuous time domain. Of course, the calculation formula for discrete sampling can also be used, but it will not be explained here.

[0081] like Figure 2 As shown, the transmission period is 100µs. Taking the following multi-pulse electrical signal as an example: the pulse width of the wide pulse is 5µs, the pulse width of the narrow pulse is 3µs, and the pulse interval between the wide and narrow pulses is 2µs. The multi-pulse signal itself occupies a 10µs time domain width. The following explanation will use this multi-pulse signal as an example. The transmission time window can be set to... The transmission period of 100us is the time from the falling edge of the last pulse (such as a narrow pulse) in the previous multi-pulse signal (the start of this period, t=0) to the falling edge of the last pulse (such as a narrow pulse) in the current multi-pulse signal (the end of this period, t=100us). In this transmission period, the rising edge of the first pulse (such as a wide pulse) in the multi-pulse signal is detected at 90us.

[0082] It should be noted that, theoretically, the base time window is The present invention sets the launch time window to... On the one hand, the multi-pulse signal itself occupies a certain time domain width; if the transmission time window is set to a single point in time, such as 100µs, it would be the center of the transmission reference, but it cannot accommodate the multi-pulse signal. On the other hand, the interrupt responses of the LRD driver circuit, amplifier circuit, comparator, MCU control unit, etc. in the hardware circuit all have fixed and random microsecond-level delay drifts; and temperature changes and voltage fluctuations will further cause timing offsets. Therefore, the target multi-pulse signal is difficult to precisely hit the center of the reference window (i.e., at 95µs), and may fall in the vicinity of the center of the reference window. In addition, when the weak interference pulse electrical signal and the target multi-pulse signal have slight superposition, the rising edge of the composite waveform will also shift, causing a slight drift in the triggering time of the target multi-pulse signal. Therefore, considering the possibility of drift, the transmission time window is set to... This ensures that the target multi-pulse signal will not be incorrectly rejected due to edge drift.

[0083] Generally, the data processing steps described above can determine the type of interference, such as ambient stray light or co-channel interference. When co-channel interference is detected, adjusting the emission period of the emitted light can prevent persistent interference. Within one emission period, if the target multi-pulse signal and the co-channel interference signal are far apart, direct sampling and output are possible. However, if the target multi-pulse signal and the co-channel interference signal are close together or even partially overlap, the response is disabled, and no sampling is output. Traditionally, judging sampling output solely based on distance is inaccurate and carries the risk of misjudgment or missed detection.

[0084] After determining the target multi-pulse signal, this invention does not use direct sampling output. Instead, it combines four dimensions—timing, measured pulse width, measured edge slope, and coherent integral amplitude—to further calculate the confidence level of the target multi-pulse signal. The confidence level is then used to determine whether to sample and output the signal.

[0085] In this example, the confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal, including: Standard pulse trigger time for reading multi-pulse signal template (e.g., 90µs), coherent integral standard peak value Standard pulse width Standard edge slope K (standard rising edge) , slope of falling edge Maximum allowable offset threshold for timing ; Based on the actual pulse trigger time of the target multi-pulse signal Compared with the standard pulse trigger time The time-series absolute offset is calculated. The calculation formula is as follows: .

[0086] The timing matching coefficients are obtained by piecewise normalization mapping of the absolute timing offset. The calculation formula is as follows: .

[0087] In this example, a linear decay function is used for the timing matching coefficient. The larger the offset, the lower the coefficient. If the maximum tolerance is exceeded, the coefficient is directly set to 0.

[0088] The coherent integral amplitude of the target multipulse signal is determined based on the peak value of the coherent integral standard. Normalization is performed to obtain the normalized integral magnitude. The calculation formula is as follows: , in, This represents the normalized integral magnitude. This represents the coherent integral amplitude of the target multipulse signal, which is obtained by sliding the coherent integral over the entire transmission time window to obtain the maximum coherent integral amplitude.

[0089] The normalized integral amplitude is corrected by range limiting to obtain the coherent integral matching coefficients. The calculation formula is as follows: , in, This represents the noise basis integration threshold; signals below this value are considered to be unmatched multipulse signals.

[0090] This example demonstrates how applying range limiting correction to the normalized integral amplitude can effectively prevent strong light reflection from causing... overflow.

[0091] Based on the measured pulse width of the target multi-pulse signal Compared with standard pulse width The absolute error of pulse width was calculated. The calculation formula is as follows: .

[0092] The pulse width matching coefficient is obtained by normalizing the absolute error of the pulse width, and its calculation formula is as follows: .

[0093] The absolute error of the measured edge slope is calculated based on the measured edge slope of the target multi-pulse signal and the standard edge slope. The absolute error of the measured slope at the edge is normalized to obtain the edge slope matching coefficient.

[0094] In this example, the measured slope of the edge includes the rising edge slope and the falling edge slope; The average of the rising edge slope matching coefficient and the falling edge slope matching coefficient is taken as the total edge measured slope coefficient. The confidence level of the target multipulse signal is calculated by weighting the timing matching coefficient, coherence integral matching coefficient, pulse width matching coefficient, and total edge measured slope coefficient.

[0095] This example uses the rising edge as an example; the calculation logic for the falling edge is exactly the same.

[0096] Calculate the absolute error of the measured slope at the rising edge: ; The edge slope matching coefficient is calculated as follows: .

[0097] Similarly, the slope matching coefficient of the falling edge can be calculated. .

[0098] Total edge measured slope coefficient .

[0099] It should be noted that in the process of calculating the timing matching coefficient, coherent integral matching coefficient, pulse width matching coefficient, and edge measured slope coefficient, the calculation of these four coefficients is relatively independent and there is no particular order between them. That is, the timing matching coefficient can be calculated first, followed by the coherent integral matching coefficient, pulse width matching coefficient, and edge measured slope coefficient; or the coherent integral matching coefficient can be calculated first, followed by the pulse width matching coefficient, edge measured slope coefficient, timing matching coefficient, and so on.

[0100] In one specific embodiment, the confidence level of the target multi-pulse signal is calculated by weighting the timing matching coefficient, coherence integral matching coefficient, pulse width matching coefficient, and edge slope matching coefficient, including the following: The confidence level of the target multi-pulse signal is calculated by weighting the timing matching coefficient, coherent integral matching coefficient, pulse width matching coefficient, and the total measured slope coefficient obtained from the rising edge slope matching coefficient and the falling edge slope coefficient; the formula for calculating the confidence level is as follows: , Where A, B, C, and D represent weighting coefficients. For example, A = 0.25, B = 0.4, C = 0.2, and D = 0.15 can be set. The specific values ​​of A, B, C, and D can be set according to the actual situation.

[0101] The weighting coefficients always satisfy A+B+C+D=1, and the weight adjustment step size can be limited to ±0.02 to avoid drastic fluctuations. Furthermore, the updated weights can be stored non-volatilely after a power outage and reused directly upon the next power-on.

[0102] In another specific embodiment, the confidence level of the target multi-pulse signal can be calculated by considering only the rising edge slope or the falling edge slope. In other words, the confidence level of the target multi-pulse signal can be calculated by weighting the timing matching coefficient, coherent integral matching coefficient, pulse width matching coefficient, and rising edge slope matching coefficient, or by weighting the timing matching coefficient, coherent integral matching coefficient, pulse width matching coefficient, and falling edge slope matching coefficient.

[0103] In one specific embodiment, determining whether to sample and output based on the confidence level of the target multi-pulse signal includes: When the confidence level of the target multi-pulse signal is greater than or equal to the effective judgment threshold, the target multi-pulse signal is determined to be a valid encoded pulse of the local machine and participates in the sampling output; When the confidence level of the target multi-pulse signal is less than the effective judgment threshold, it is judged as interference, the response is turned off, and there is no sampling output.

[0104] In this example, for cases where the confidence level of the target multi-pulse signal is greater than or equal to the effective judgment threshold, graded processing can also be performed. When the confidence level of the target multi-pulse signal is greater than or equal to the effective judgment optimal threshold, it indicates that the target multi-pulse signal is a pure signal and is directly sampled and output. When the confidence level of the target multi-pulse signal is less than the optimal threshold for effective judgment, but greater than or equal to the effective judgment threshold, it indicates that the target multi-pulse signal may have slight distortion. Therefore, filtering and smoothing are performed simultaneously with the sampling output. The optimal threshold for effective judgment is greater than the effective judgment threshold; for example, the optimal threshold for effective judgment can be set to 0.7, and the effective judgment threshold can be set to 0.5.

[0105] This invention combines timing, coherent integral amplitude, pulse measured width, and edge measured slope to calculate confidence level in four dimensions. It can accurately distinguish between interference pulses with closely spaced timing and target multi-pulse groups (effective pulse signals), completely solving the defect of misjudgment due to timing overlap in traditional solutions. The accuracy of interference identification is greatly improved, and the probability of false triggering and missed triggering is reduced to an extremely low level.

[0106] Compared to traditional methods that rely solely on a single timing threshold to determine whether a valid signal should be output as a sampled output, this invention calculates the confidence level of a target multi-pulse signal using four dimensions: timing, correlation integral amplitude, measured pulse width, and measured edge slope. This avoids the possibility of false triggering and missed detection, and significantly reduces misjudgments, especially when there are nearby interference signals. The nearby interference signals refer to interference signals that are close to the valid pulse signal or within the transmission time window.

[0107] Example 2

[0108] Based on the multi-pulse signal anti-interference method provided in the above embodiments, this embodiment also provides a photoelectric sensor, including an MCU main controller, wherein the MCU main controller executes the multi-pulse signal anti-interference method; the multi-pulse signal anti-interference method specifically includes the following: The transmitter is driven to periodically emit multi-pulse optical signals according to a pre-stored multi-pulse signal template. The receiver obtains the actual trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles. The pulse electrical signal is generated by the receiver acquiring optical signals in real time. The optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light. Multiple pulse electrical signals are clustered and divided according to the actual trigger time of the pulse electrical signals to form several multi-pulse groups; Using the standard period of the multi-pulse signal template as a reference, several multi-pulse groups are periodically verified. If they fail, they are determined to be due to ambient astigmatism interference, and the transmission period of the transmitter is not adjusted. If they pass, they are determined to be periodic multi-pulse groups with the same frequency. For periodic multi-pulse groups with the same frequency, perform intra-group timing template matching and pulse width consistency detection; if the detection fails, it is determined to be a multi-pulse signal interfering with the same frequency, and the transmission period of the transmitter is adjusted; if the detection passes, it is determined to be the target multi-pulse signal. The acquired target multi-pulse signal is subjected to coherent integration to obtain the coherent integral amplitude; The confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal. Whether to sample and output depends on the confidence level of the target multi-pulse signal.

[0109] Specifically, such as Figure 3 As shown, the MCU master controller includes: The PWM unit is used to drive the transmitter to periodically transmit multi-pulse optical signals according to a pre-stored multi-pulse signal template. The signal acquisition unit is used to acquire the actual pulse trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles; the pulse electrical signal is generated by the receiver acquiring optical signals in real time, and the optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light; Clustering units are used to cluster multiple pulse electrical signals according to the actual trigger time of the pulse electrical signals, forming several multi-pulse groups; The periodic verification unit is used to periodically verify several multipulse groups obtained based on the standard period of the multipulse signal template. If it fails, it is determined to be due to environmental astigmatism interference, and the transmission period of the transmitter is not adjusted. If it passes, it is determined to be a periodic multipulse group with the same frequency. The timing and pulse width verification unit is used to perform timing template matching and pulse width consistency detection within the same frequency periodic multi-pulse group. If it fails, it is determined to be a same-frequency interference multi-pulse signal, and the transmission period of the transmitter is adjusted. If it passes, it is determined to be the target multi-pulse signal. The coherent integration unit is used to perform coherent integration on the acquired target multi-pulse signal to obtain the coherent integration amplitude. The confidence calculation unit is used to calculate the confidence of the target multi-pulse signal based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal. The output unit determines whether to sample and output based on the confidence level of the target multi-pulse signal.

[0110] In this example, such as Figure 4 As shown, the emitting end includes a light source and a driving circuit for driving the light source; the light source can be a laser or an LED, etc., used to emit white light or other light of a specific wavelength. The driving circuit drives the light source to periodically emit light.

[0111] The driving circuit is electrically connected to the PWM output terminal of the MCU master controller. The MCU master controller drives the transmitter to periodically emit multi-pulse optical signals according to the pre-stored multi-pulse signal template through the driving circuit.

[0112] The receiving end includes a receiving tube and an amplifier circuit electrically connected to the output of the receiving tube; the receiving tube is a photodiode, an avalanche photodiode, or other photodiode used to convert optical signals into electrical signals. The amplifier circuit amplifies the electrical signal output by the receiving tube. The receiving end may also include a noise removal filter circuit and / or an ADC conversion circuit, etc.

[0113] The detailed descriptions of each of the above steps are described in Example 1 and will not be repeated here.

[0114] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the claims of the present invention.

Claims

1. A method for anti-interference based on multi-pulse signals, characterized in that: The method includes: The transmitter is driven to periodically emit multi-pulse optical signals according to a pre-stored multi-pulse signal template. The receiver obtains the actual trigger time, measured pulse width, and measured edge slope of the pulse electrical signal output by the receiver in multiple transmission cycles. The pulse electrical signal is generated by the receiver acquiring optical signals in real time. The optical signals include multi-pulse optical signals periodically emitted by the transmitter and reflected back by the detection object, as well as interference light. Multiple pulse electrical signals are clustered and divided according to the actual trigger time of the pulse electrical signals to form several multi-pulse groups; Using the standard period of the multi-pulse signal template as a reference, several multi-pulse groups are periodically verified. If they fail, they are determined to be environmental astigmatism interference / inter-frequency interference, and the transmission period of the transmitter is not adjusted. If they pass, they are determined to be periodic multi-pulse groups of the same frequency. For periodic multi-pulse groups with the same frequency, perform intra-group timing template matching and pulse width consistency detection; if the detection fails, it is determined to be a multi-pulse signal interfering with the same frequency, and the transmission period of the transmitter is adjusted; if the detection passes, it is determined to be the target multi-pulse signal. The acquired target multi-pulse signal is subjected to coherent integration to obtain the coherent integral amplitude; The confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude of the target multi-pulse signal. Whether to sample and output depends on the confidence level of the target multi-pulse signal.

2. The anti-interference method based on multi-pulse signals according to claim 1, characterized in that: Based on the actual trigger time of the pulse electrical signals, multiple pulse electrical signals are clustered and divided into several multi-pulse groups, including: Read the preset maximum interval within the pulse group and the silence interval between groups; The time interval between adjacent pulses is calculated based on the actual trigger time of the pulse electrical signal. Pulses whose time interval between adjacent pulses is less than or equal to the maximum interval within the pulse group are clustered together to form multi-pulse groups; When the time interval between adjacent pulses is greater than or equal to the preset inter-group silence interval, a new multi-pulse group is generated.

3. The anti-interference method based on multi-pulse signals according to claim 1, characterized in that: Using the standard period of the multi-pulse signal template as a benchmark, the resulting multi-pulse groups are periodically verified. If it fails, it is determined to be due to ambient astigmatism interference / heterogeneous frequency light; If it passes, it is determined to be a periodic multi-pulse group with the same frequency, including: Read the preset minimum number of consecutive valid pulse groups and periodic fluctuation threshold; Extract the start times of several multi-pulse groups and calculate the interval period between adjacent multi-pulse groups; Using the standard period of the multi-pulse signal template as a benchmark, the relative fluctuation of the interval period of each multi-pulse group relative to the standard period of the multi-pulse signal template is calculated. If the number of multi-pulse groups obtained by clustering over a certain period of time is greater than or equal to the minimum number of consecutive effective pulse groups, and the relative period fluctuation is less than or equal to the period fluctuation threshold, then it is determined to be a periodic multi-pulse group with the same frequency; otherwise, it is determined to be environmental astigmatic interference / different frequency interference.

4. The anti-interference method based on multi-pulse signals according to claim 1, characterized in that: Perform intra-group timing template matching and pulse width consistency detection on multiple pulse groups with the same frequency and periodicity; If it fails, it is determined to be a multi-pulse signal interfering with the same frequency, and the transmission period of the transmitting end is adjusted. If it passes, it is determined to be the target multi-pulse signal, including: Align the pulses within the same frequency periodic multipulse group with the first pulse to obtain the measured relative time delay sequence, and perform intra-group timing template matching with the standard relative time delay sequence of the pre-stored multipulse signal template; Acquire pulse electrical signals that successfully match the timing template within the group to obtain the effective pulse width set, and perform pulse width consistency detection on the pulse width of the effective pulse width set; Verification is performed using timing template matching within the joint group and pulse width consistency detection; If both the timing template matching within the group and the pulse width consistency detection are passed, then it is determined to be the target multi-pulse signal; If the timing template matching and / or pulse width consistency detection within the group fails, it is determined to be a co-frequency interference multi-pulse signal.

5. The anti-interference method based on multi-pulse signals according to claim 4, characterized in that: Align the pulses within a periodic multipulse group with the first pulse to obtain the measured relative time delay sequence. Then, perform intra-group timing template matching with the standard relative time delay sequence of a pre-stored multipulse signal template, including: Read the standard relative delay sequence, timing jitter tolerance threshold, and total number of pulses from the pre-stored multi-pulse signal template; Using the first pulse moment within a periodic multi-pulse group at the same frequency as the time origin, the relative time delay of each pulse electrical signal within each group is calculated, thereby obtaining the measured relative time delay sequence corresponding to the periodic multi-pulse group at the same frequency. Calculate the absolute value of the difference between the corresponding time delays of the standard relative time delay sequence and the measured relative time delay sequence; The number of first pulse electrical signals whose absolute value of the statistical difference is less than or equal to the timing jitter tolerance threshold; The timing matching score is calculated based on the number of first pulse electrical signals and the total number of pulses.

6. The anti-interference method based on multi-pulse signals according to claim 5, characterized in that: Acquire pulse signals that successfully match the timing template within the group to obtain the effective pulse width set. Perform pulse width consistency detection on the pulse widths of the effective pulse width set, including: The pulse tolerance range is obtained by reading the standard pulse width and pulse tolerance difference of the pre-stored multi-pulse signal template; The effective pulse width set is obtained by acquiring and using the pulse electrical signals whose absolute difference is less than or equal to the timing jitter tolerance threshold and the number of first pulse electrical signals; Count the number of second pulse electrical signals whose pulse width falls within the pulse width tolerance range in the effective pulse width set; The pulse width matching ratio is calculated based on the number of second pulse electrical signals and the number of first pulse electrical signals.

7. The anti-interference method based on multi-pulse signals according to claim 1, characterized in that: Perform coherent integration on the acquired target multi-pulse signal to obtain the coherent integral amplitude, including: The coherent integral amplitude is obtained by multiplying the target multipulse signal and the pre-stored multipulse signal template at time points and accumulating the results.

8. The anti-interference method based on multi-pulse signals according to claim 1, characterized in that: The confidence level of the target multi-pulse signal is calculated based on the actual pulse trigger time, measured pulse width, measured edge slope, and coherent integral amplitude, including: Read the standard pulse trigger time, standard peak value of coherent integration, standard pulse width, and standard edge slope of the pre-stored multi-pulse signal template; The absolute timing offset is calculated based on the actual trigger time of the target multi-pulse signal and the trigger time of the standard pulse. The temporal matching coefficients are obtained by segmenting and normalizing the absolute temporal offset; The coherent integral amplitude of the target multipulse signal is normalized based on the coherent integral standard peak value to obtain the normalized integral amplitude. The normalized integral amplitude is corrected by range limiting to obtain the coherent integral matching coefficients; The absolute error of pulse width is calculated based on the measured pulse width of the target multi-pulse signal and the standard pulse width. The absolute error of pulse width is normalized to obtain the pulse width matching coefficient; The absolute error of the measured edge slope is calculated based on the measured edge slope of the target multi-pulse signal and the standard edge slope. The absolute error of the measured slope at the edge is normalized to obtain the edge slope matching coefficient; The confidence level of the target multipulse signal is calculated by weighting the obtained timing matching coefficient, coherence integral matching coefficient, pulse width matching coefficient, and edge slope matching coefficient.

9. The anti-interference method based on multi-pulse signals according to claim 8, characterized in that: Whether to sample and output is determined based on the confidence level of the target multi-pulse signal, including: When the confidence level of the target multi-pulse signal is greater than or equal to the effective judgment threshold, the target multi-pulse signal is determined to be a valid encoded pulse of the local machine and participates in the sampling output; When the confidence level of the target multi-pulse signal is less than the effective judgment threshold, it is judged as interference, the response is turned off, and there is no sampling output.

10. A photoelectric sensor, characterized in that: It includes an MCU main controller, which executes the anti-interference method based on multi-pulse signals as described in any one of claims 1 to 9.