An adaptive infrared detection method and system resistant to sunlight interference

By combining dynamic intelligent modulation and coherent demodulation with a multi-feature verification collaborative mechanism, the problem of false triggering of infrared detectors under sunlight interference is solved, achieving object detection with high reliability and low false alarm rate.

CN121806140BActive Publication Date: 2026-05-26BEIJING JINGPIN SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JINGPIN SCI & TECH CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-26

Smart Images

  • Figure CN121806140B_ABST
    Figure CN121806140B_ABST
Patent Text Reader

Abstract

This invention relates to an adaptive anti-sunlight interference infrared detection method and system, belonging to the field of infrared detection technology. The system includes: an infrared transmitter, an infrared receiver, a signal preprocessing unit, a bandpass filter unit, a digital phase-locked loop unit, and a controller unit. The controller unit is electrically connected to the infrared transmitter, infrared receiver, signal preprocessing unit, bandpass filter unit, and digital phase-locked loop unit, and includes: a dynamic modulation module, a coherent processing module, an encoding and demodulation module, a feature extraction module, an intelligent decision-making module, and a detection output port. This invention, through a collaborative mechanism of dynamic modulation, coherent demodulation, and multi-feature verification, ensures that only signals emitted by the system itself can trigger detection. This allows the system to proactively adapt to environmental changes and accurately identify the true signals emitted by the system and reflected by obstructed objects. Thus, it achieves extremely high reliability and extremely low false alarm rate object detection in various harsh light environments, including direct sunlight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of infrared detection technology. Specifically, this invention relates to an adaptive anti-sunlight interference infrared detection method, system, and storage medium. Background Technology

[0002] In industrial automation, security, and smart home applications, infrared through-beam or reflective photoelectric sensors are widely used for object detection, counting, and position determination. Their basic principle is that an infrared emitter emits light, which is then received by a receiver. When an object blocks the light (through-beam type) or reflects it (reflective type), the received signal changes, triggering detection. However, existing technologies face a common and challenging problem: sunlight interference. Sunlight contains abundant infrared spectral components, and its intensity far exceeds the signal emitted by the sensor. This means that even when there is no target object, the receiver may still generate an electrical signal due to receiving sunlight, causing serious false triggering or false detection. Traditional solutions have significant drawbacks:

[0003] 1. Simple optical filters: They can only attenuate light outside a specific wavelength range and cannot eliminate sunlight components that overlap with the emitted wavelength, so their effect is limited.

[0004] 2. Fixed-frequency modulation and demodulation: A fixed-frequency (e.g., 38kHz) infrared pulse is transmitted, and the receiver only amplifies the signal at that frequency. Although this method has a certain degree of anti-interference capability, its reliability drops significantly when faced with high-intensity, wide-spectrum sunlight (which itself contains various frequency fluctuations) or interference from electronic devices operating at the same frequency in the environment.

[0005] 3. Fixed threshold comparison: Setting a fixed signal strength threshold to determine the presence or absence of objects can easily lead to false alarms or missed alarms when there are drastic changes in ambient light (such as cloud movement or shadow changes).

[0006] The above methods are all static and passive anti-interference strategies, lacking the ability to actively adapt to and intelligently identify dynamic and complex lighting environments, resulting in insufficient stability and reliability of the sensors in outdoor or bright light window scenarios. Summary of the Invention

[0007] To overcome the aforementioned shortcomings of existing technologies, an intelligent adaptive infrared detection system against solar interference is provided. Its core objective is not only to resist interference but also to distinguish between the system's own signal and environmental interference at the signal source. By introducing a collaborative mechanism of dynamic intelligent modulation, coherent demodulation, and multi-feature verification, the system can proactively adapt to environmental changes and accurately identify the true signal emitted by itself and reflected / blocked by objects. This enables object detection with extremely high reliability and an extremely low false alarm rate in various harsh lighting environments, including direct sunlight.

[0008] A first aspect of the present invention provides an adaptive infrared detection method resistant to sunlight interference, comprising the following steps:

[0009] S1, install the infrared transmitter and infrared receiver opposite each other on both sides of the detection area, or install the infrared transmitter and receiver integrated module facing the detection area.

[0010] S2, when there are no obstructions in the detection area, turn off the infrared transmitter and turn on the infrared receiver to collect ambient light; determine the stability of the ambient light by analyzing the frequency range of the ambient light.

[0011] S3, dynamically set the frequency and duty cycle of the carrier signal according to the stability of the ambient light and the intensity of the ambient light to obtain the first signal;

[0012] S4, embed the first digital code sequence into the first signal to obtain the second signal; turn on the infrared transmitter and drive the infrared transmitter to emit an infrared signal using the second signal as the driving signal;

[0013] S5, the infrared receiver receives the infrared signal, converts the current signal generated by the infrared receiver into a voltage signal, and after the voltage signal is amplified by the gain circuit, the first received signal is obtained.

[0014] S6, the first received signal is filtered through a bandpass filter to obtain the second received signal;

[0015] S7, the frequency and phase of the second received signal are locked and recovered through a digital phase-locked loop as a basic reference signal;

[0016] S8, multiply the first received signal with the basic reference signal to obtain the third received signal;

[0017] S9, perform digital encoding demodulation on the third received signal to obtain the second digital encoding sequence demodulated from the third received signal;

[0018] S10, extract the parameter features of the third received signal and the basic reference signal respectively;

[0019] S11, when the parameters of the third received signal and the basic reference signal meet the similarity condition, and the first digital coding sequence and the second digital coding sequence are the same, it is determined that the infrared detection is in a valid detection state; otherwise, it is determined that the infrared detection is in an invalid detection state.

[0020] S12: When the infrared detection is in an effective detection state, if the infrared detection light is blocked, it is determined that there is an obstruction, and a level switching signal is output; when the infrared detection is in an invalid detection state, return to step S2.

[0021] Furthermore, in step S2, the step of determining the stability of ambient light by analyzing its frequency range specifically includes:

[0022] S2.1 If the frequency range difference of the ambient light is greater than the frequency interference threshold, the ambient light is determined to be unstable.

[0023] S2.2 If the frequency range difference of the ambient light is not greater than the frequency interference threshold, then the ambient light is considered stable.

[0024] Furthermore, the frequency interference threshold is 0.5 kHz.

[0025] Furthermore, step S3 specifically includes:

[0026] S3.1 When the ambient light is stable, a carrier signal frequency is selected by pseudo-random switching within a preset frequency range;

[0027] S3.2 When the ambient light is unstable, a carrier signal frequency is selected outside the frequency range of the ambient light according to the preset frequency deviation value;

[0028] S3.3, Based on the ambient light intensity, a carrier signal duty cycle is selected by pseudo-random switching within a preset duty cycle range;

[0029] S3.4, Based on the selected carrier signal frequency and carrier signal duty cycle, generate the corresponding carrier and set it as the first signal.

[0030] Furthermore, in step S3.1, the preset frequency range is 32~44kHz or 30~50kHz;

[0031] In step S3.2,

[0032] Carrier signal frequency = Maximum ambient light frequency + Preset frequency deviation = First signal frequency; or,

[0033] Carrier signal frequency = minimum ambient light frequency - preset frequency deviation = first signal frequency;

[0034] The preset frequency deviation values ​​are 5kHz, 10kHz, or 20kHz.

[0035] Furthermore, step S3.3 also includes:

[0036] In light environments with light intensity exceeding 50,000 lux, the preset duty cycle range is 5% to 10%.

[0037] In a light environment with an intensity of 10,000 to 50,000 lux, the preset duty cycle range is 15% to 25%.

[0038] In light environments with light intensity below 10,000 lux, the preset duty cycle range is 30% to 40%.

[0039] Furthermore, the first digital encoding sequence is: a preamble + a dynamic password;

[0040] Alternatively, the first digital encoding sequence is: preamble + dynamic password + repeat code + dynamic password + repeat code + dynamic password + ... + repeat code + dynamic password;

[0041] The dynamic password is formatted as: address code + address verification code + data code + data verification code;

[0042] The address code, address verification code, data code, and data verification code are all 8-bit data.

[0043] Both the address verification code and the data verification code are verified using the reverse code.

[0044] Preamble format: 10ms carrier wave + 5ms silence;

[0045] Logical "0" format: 500μs carrier + 500μs silence;

[0046] Logical "1" format: 500μs carrier + 1500μs silence;

[0047] The repeat code format is: 10ms carrier + 2.5ms silence + 500μs carrier.

[0048] Further, in step S11, satisfying the similarity condition includes:

[0049] The similarity condition is met when the parameter similarity between the third received signal and the basic reference signal is higher than the similarity threshold and the same parameter similarity is maintained for multiple consecutive cycles.

[0050] The parameter similarity includes the similarity of carrier frequency, carrier phase, and carrier duty cycle;

[0051] The similarity threshold is 95%, which is dynamically adjusted according to the environmental noise level.

[0052] A second aspect of the present invention provides an adaptive anti-solar interference infrared detection system for implementing the adaptive anti-solar interference infrared detection method described in the first aspect of the present invention, comprising: an infrared transmitter, an infrared receiver, a signal preprocessing unit, a bandpass filter unit, a digital phase-locked loop unit, and a controller unit; wherein,

[0053] The infrared transmitter is used to convert electrical signals into infrared detection light for detection of obstructions.

[0054] The infrared receiver is used to receive infrared light signals from the detection area and convert them into current signals.

[0055] The signal preprocessing unit, which is electrically connected to the infrared receiver and the controller unit, includes a transimpedance amplifier and a gain circuit. It is used to convert the current signal generated by the infrared receiver into a voltage signal using the transimpedance amplifier, and then amplify the voltage signal through the gain circuit to obtain the first received signal.

[0056] A bandpass filter unit, electrically connected to the signal preprocessing unit, is used to perform bandpass filtering on the first received signal to obtain a second received signal;

[0057] A digital phase-locked loop unit, electrically connected to the bandpass filter unit, is used to lock and recover the frequency and phase of the second received signal as a basic reference signal.

[0058] The controller unit, electrically connected to the infrared transmitter, infrared receiver, signal preprocessing unit, bandpass filter unit, and digital phase-locked loop unit, includes: a dynamic modulation module, a coherent processing module, an encoding and demodulation module, a feature extraction module, an intelligent decision-making module, and a detection output port;

[0059] The dynamic modulation module is used to dynamically set the frequency and duty cycle of the carrier signal to obtain a first signal; embed a first digital encoding sequence into the first signal to obtain a second signal; and use the second signal as a driving signal to drive the infrared transmitter to emit an infrared signal.

[0060] The coherent processing module is used to multiply the first received signal with the basic reference signal to obtain the third received signal;

[0061] The feature extraction module is used to extract the parameter features of the third received signal and the basic reference signal;

[0062] The encoding and demodulation module is used to perform digital encoding and demodulation on the third received signal to obtain the second digital encoding sequence demodulated from the third received signal;

[0063] The intelligent decision-making module is used to determine that infrared detection is in a valid detection state when the parameters of the third received signal and the basic reference signal meet the similarity condition and the first digital encoding sequence and the second digital encoding sequence are the same; otherwise, it determines that infrared detection is in an invalid detection state. When infrared detection is in a valid detection state, if the infrared detection light is blocked, it is determined that there is an obstruction, and the detection output port outputs a level-jumping signal. When infrared detection is in an invalid detection state, it instructs the dynamic modulation module to regenerate the first signal and the second signal; and uses the second signal as the driving signal to drive the infrared transmitter to emit an infrared detection signal.

[0064] A third aspect of the present invention provides a processor-readable storage medium storing a computer program, wherein when the processor executes the computer program, it implements the adaptive anti-sunlight interference infrared detection method described in the first aspect of the present invention.

[0065] The advantages of this invention compared to the prior art are:

[0066] The beneficial effects of this invention lie not only in resisting interference, but also in distinguishing between self-generated signals and environmental interference at the signal source. This invention employs a three-tiered collaborative mechanism—dynamic modulation, coherent demodulation, and multi-feature verification—to ensure that only signals emitted by the system itself can trigger detection. This allows the system to proactively adapt to environmental changes and accurately identify the true signals emitted by the system and reflected by obscured objects. Consequently, it achieves extremely high reliability and extremely low false alarm rates for object detection in various harsh lighting environments, including direct sunlight. Attached Figure Description

[0067] Figure 1 This is a schematic flowchart of an adaptive anti-sunlight interference infrared detection method provided in an embodiment of the present invention.

[0068] Figure 2 This is a schematic diagram of an adaptive anti-sunlight interference infrared detection system provided in an embodiment of the present invention. Detailed Implementation

[0069] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0070] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0071] Method Implementation Examples

[0072] In a first aspect, the present invention provides an adaptive infrared detection method resistant to sunlight interference, the flowchart of which is shown below. Figure 1As shown, it specifically includes:

[0073] S1, the infrared transmitter and receiver are installed opposite each other on both sides of the detection area, or the integrated infrared transmitter and receiver module is installed facing the detection area.

[0074] S2, when there are no obstructions in the detection area, turn off the infrared transmitter and turn on the infrared receiver to collect ambient light; by analyzing the frequency range of the ambient light, determine the stability of the ambient light.

[0075] Specifically, determining the stability of ambient light by analyzing its frequency range includes:

[0076] S2.1 If the frequency range difference of the ambient light is greater than the frequency interference threshold, the ambient light is determined to be unstable.

[0077] S2.2 If the frequency range difference of the ambient light is not greater than the frequency interference threshold, then the ambient light is considered stable.

[0078] For example, the frequency interference threshold is 0.5 kHz.

[0079] For example, if the frequency range of ambient light is 30~35kHz, then the frequency range difference is 35kHz-30kHz=5kHz, which is higher than the frequency interference threshold of 0.5kHz; therefore, the ambient light is determined to be unstable.

[0080] S3, based on the stability and intensity of ambient light, dynamically sets the frequency and duty cycle of the carrier signal to obtain the first signal. Specifically, this includes:

[0081] S3.1 When the ambient light is stable, a carrier signal frequency is selected by pseudo-random switching within a preset frequency range.

[0082] Optionally, the preset frequency range is 32~44kHz, 30~50kHz, etc.

[0083] S3.2 When the ambient light is unstable, select a carrier signal frequency outside the frequency range of the ambient light according to the preset frequency deviation value.

[0084] Optionally, the carrier signal frequency = maximum ambient light frequency + preset frequency deviation = first signal frequency.

[0085] Optionally, the carrier signal frequency = minimum ambient light frequency - preset frequency deviation = first signal frequency.

[0086] Optionally, the preset frequency deviation value is 5kHz, 10kHz, 20kHz, etc.

[0087] S3.3, Based on the ambient light intensity, a carrier signal duty cycle is selected by pseudo-random switching within a preset duty cycle range.

[0088] This step dynamically sets the carrier duty cycle based on the ambient light intensity detected in real time by the infrared receiver. The stability of the ambient light does not need to be considered when performing this step.

[0089] In strong light environments with light intensity exceeding 50,000 lux, the preset duty cycle range for the carrier signal is 5% to 10%.

[0090] In moderate light environments with light intensity ranging from 10,000 to 50,000 lux, the preset duty cycle range for the carrier signal is 15% to 25%.

[0091] In low-light environments with light intensity below 10,000 lux, the carrier signal has a preset duty cycle range of 30% to 40%.

[0092] By detecting light intensity at the receiver, in strong ambient light conditions, a low carrier signal duty cycle is selected. By reducing the duty cycle, fixed energy is compressed and released within a very short time window, creating higher instantaneous power peaks and steeper signal changes, thus reducing the probability of the infrared detection light signal being overwhelmed by ambient light. In weak ambient light conditions, a high carrier signal duty cycle is selected. By increasing the duty cycle, a continuous signal stream is provided, which is helpful for digital phase-locked loop tracking and ensures the reliability of detection. In moderate light environments, a moderate carrier signal duty cycle range is selected, balancing signal strength and continuity.

[0093] S3.4, Based on the selected carrier signal frequency and carrier signal duty cycle, generate the corresponding carrier and set it as the first signal.

[0094] For example, if the frequency range of ambient light is 30~35kHz and the light intensity is 20000 lux (interference light may be generated by some lamps, equipment, etc.), and the ambient light is determined to be unstable, a carrier signal with a frequency of 35kHz+10kHz=45kHz and a carrier signal duty cycle of 20% can be selected to generate a corresponding infrared detection light driving signal, thereby avoiding ambient light interference.

[0095] S4, embed the first digital code sequence into the first signal to obtain the second signal; turn on the infrared transmitter and drive the infrared transmitter to emit an infrared signal using the second signal as the driving signal.

[0096] The second signal is obtained by embedding a first digital code sequence into the first signal, which is achieved by further pulse modulation of the signal pulse on the carrier of the first signal using the first digital code sequence.

[0097] The first digital encoding sequence, combined with the first signal that has undergone dynamic frequency and duty cycle adjustment, yields the second signal. Transmitting the second signal is like transmitting a dynamic password.

[0098] For example, the first digital encoding sequence is: a preamble + a dynamic password.

[0099] For example, the first digital encoding sequence is: preamble + dynamic password + repeat code + dynamic password + repeat code + dynamic password + ... + repeat code + dynamic password.

[0100] For example, the dynamic password format is: address code + address verification code + data code + data verification code.

[0101] For example, the address code, address verification code, data code, and data verification code are 8-bit data.

[0102] For example, the address verification code and the data verification code are reverse verification codes.

[0103] For example, the preamble format is: 10ms carrier wave + 5ms silence.

[0104] For example, the logic "0" format is: 500μs carrier + 500μs silence.

[0105] For example, the logical "1" format is: 500μs carrier + 1500μs silence.

[0106] For example, the repeat code format is: 10ms carrier + 2.5ms silence + 500μs carrier.

[0107] Explanation of the repeat code: When the transmitter keeps sending the same dynamic password, it stops sending the preamble and instead adds a repeat code after sending the dynamic password before continuing to send the dynamic password.

[0108] The transmitter of this invention does not emit a constant infrared detection light, but rather emits dynamically modulated infrared detection light. Dynamically modulated infrared detection light refers to a series of infrared detection lights with a specific and variable frequency and a dynamically adjustable duty cycle, essentially embedding special pulse characteristics into the infrared detection signal. The advantage of setting the detection light according to ambient light is that it can avoid interference from sources of interference (such as certain lamps or equipment).

[0109] S5, the infrared receiver receives the infrared signal, converts the current signal generated by the infrared receiver into a voltage signal, and after the voltage signal is amplified by the gain circuit, the first received signal is obtained.

[0110] S6, the first received signal is bandpass filtered through a bandpass filter to obtain the second received signal.

[0111] The center frequency of the bandpass filter follows the transmission frequency, i.e., the frequency of the first signal, to filter out out-of-band noise. The bandpass filter performs bandpass filtering on the signal received at the receiving end (which may contain interference signals including sunlight, lamps, and equipment), allowing only signals with characteristics similar to the transmitted signal to pass through. The second received signal after passing through the bandpass filter does not completely remove interference signals; some interference signals may still remain.

[0112] S7 uses a digital phase-locked loop to lock and recover the frequency and phase of the second received signal as a base reference signal.

[0113] After passing through a bandpass filter and a digital phase-locked loop, a carrier signal that is strictly synchronized with the transmitter can be recovered from the original infrared signal as a pure and stable basic reference signal.

[0114] S8, multiply the first received signal with the basic reference signal to obtain the third received signal.

[0115] Multiplication processing can significantly amplify signals in the first received signal that are in the same frequency and phase as the fundamental reference signal (i.e., signals that are emitted by themselves and reflected back), while suppressing other interference signals in the first received signal that are at different frequencies and phases from the fundamental reference signal, such as sunlight.

[0116] S9, digitally encode and demodulate the third received signal to obtain the second digitally encoded sequence demodulated from the third received signal.

[0117] S10, extract the parameter features of the third received signal and the basic reference signal respectively.

[0118] The parameter characteristics include carrier frequency, carrier phase, carrier duty cycle, and other parameters.

[0119] S11, when the parameters of the third received signal and the basic reference signal meet the similarity condition, and the first digital encoding sequence and the second digital encoding sequence are the same, it is determined that the infrared detection is in a valid detection state; otherwise, it is determined that the infrared detection is in an invalid detection state.

[0120] The similarity conditions include:

[0121] The similarity condition is met when the parameter similarity between the third received signal and the basic reference signal is higher than the similarity threshold, and the parameter similarity remains the same for multiple consecutive cycles.

[0122] The parameter similarity includes the similarity of carrier frequency, carrier phase, and carrier duty cycle.

[0123] Preferably, the similarity threshold is 95%. This threshold is dynamically adjusted based on the ambient noise level.

[0124] S12: When the infrared detection is in an effective detection state, if the infrared detection light is blocked, it is determined that there is an obstruction, and a level transition signal is output (such as transitioning from low level to high level); when the infrared detection is in an invalid detection state, return to step S2.

[0125] System Implementation Examples

[0126] Based on the same technical concept as the first aspect of the present invention, the second aspect of the present invention discloses an adaptive anti-solar interference infrared detection system for performing the adaptive anti-solar interference infrared detection method described in the first aspect of the present invention.

[0127] An adaptive infrared detection system resistant to sunlight interference, such as Figure 2 As shown, it includes: an infrared transmitter, an infrared receiver, a signal preprocessing unit, a bandpass filter unit, a digital phase-locked loop unit, and a controller unit.

[0128] The infrared transmitter is used to convert electrical signals into infrared detection light for detection of obstructions.

[0129] The infrared receiver is used to receive infrared light signals from the detection area and convert them into current signals.

[0130] Infrared light signals include effective infrared detection light reflection signals and interfering infrared light signals such as sunlight.

[0131] The signal preprocessing unit, electrically connected to the infrared receiver and the control unit, includes a transimpedance amplifier and a gain circuit. It is used to convert the current signal generated by the infrared receiver into a voltage signal using the transimpedance amplifier, and then amplify the voltage signal through the gain circuit to obtain the first received signal.

[0132] The bandpass filter unit is electrically connected to the signal preprocessing unit and is used to perform bandpass filtering on the first received signal to obtain the second received signal.

[0133] The center frequency of the bandpass filter unit follows the transmission frequency, i.e., the frequency of the first signal, to filter out out-of-band noise. The bandpass filter unit performs bandpass filtering on the signal received at the receiving end (which may contain interference signals including sunlight, lamps, equipment, etc.), allowing only signals with characteristics similar to the transmitted signal to pass through. The second received signal after passing through the bandpass filter unit cannot completely remove interference signals; some interference signals may still remain.

[0134] The digital phase-locked loop unit, electrically connected to the bandpass filter unit, is used to lock and recover the frequency and phase of the second received signal as a base reference signal.

[0135] A digital phase-locked loop (PLL) functions to lock and recover the frequency and phase of an input signal. A PLL can precisely track frequency changes in the input signal, automatically adjusting its oscillator frequency to match the input signal even if the frequency drifts or becomes unstable. In addition to frequency locking, a PLL can precisely control the phase difference between the output and input signals, ensuring they remain synchronized in time. Through an internal feedback mechanism, the PLL can extract and recover the original frequency and phase information from the input signal, even if the input signal is affected by noise or distortion.

[0136] After passing through a bandpass filter unit and a digital phase-locked loop, a carrier signal that is strictly synchronized with the transmitter can be recovered from the original infrared signal as a pure and stable basic reference signal.

[0137] The controller unit is electrically connected to the infrared transmitter, infrared receiver, signal preprocessing unit, bandpass filter unit, and digital phase-locked loop unit. The controller unit is an MCU or a dedicated logic controller.

[0138] The controller unit specifically includes: a dynamic modulation module, a coherent processing module, an encoding and demodulation module, a feature extraction module, an intelligent decision-making module, and a detection output port.

[0139] The dynamic modulation module is used to dynamically set the frequency and duty cycle of the carrier signal to obtain a first signal; embed a first digital encoding sequence into the first signal to obtain a second signal; and use the second signal as a driving signal to drive the infrared transmitter to emit an infrared signal.

[0140] The frequency and duty cycle of the carrier signal are dynamically set, including: when the ambient light is stable, selecting a carrier signal frequency by pseudo-random switching within a preset frequency range; when the ambient light is unstable, selecting a carrier signal frequency outside the frequency range of the ambient light according to a preset frequency deviation value; selecting a carrier signal duty cycle by pseudo-random switching within a preset duty cycle range according to the ambient light intensity; and generating a corresponding carrier and setting it as the first signal according to the selected carrier signal frequency and carrier signal duty cycle.

[0141] Optionally, the preset frequency range is 32~44kHz, 30~50kHz, etc.

[0142] Optionally, the carrier signal frequency = maximum ambient light frequency + preset frequency deviation = first signal frequency.

[0143] Optionally, the carrier signal frequency = minimum ambient light frequency - preset frequency deviation = first signal frequency.

[0144] Optionally, the preset frequency deviation value is 5kHz, 10kHz, 20kHz, etc.

[0145] In strong light environments with light intensity exceeding 50,000 lux, the preset duty cycle range for the carrier signal is 5% to 10%.

[0146] In moderate light environments with light intensity ranging from 10,000 to 50,000 lux, the preset duty cycle range for the carrier signal is 15% to 25%.

[0147] In low-light environments with light intensity below 10,000 lux, the carrier signal has a preset duty cycle range of 30% to 40%.

[0148] The second signal is obtained by embedding a first digital encoding sequence into the first signal. This is achieved by further pulse modulation of the signal pulse on the first signal carrier using the first digital encoding sequence. The first digital encoding sequence, combined with the aforementioned first signal that has undergone dynamic frequency adjustment and duty cycle modulation, is equivalent to transmitting a dynamic code.

[0149] For example, the first digital encoding sequence is: a preamble + a dynamic password.

[0150] For example, the first digital encoding sequence is: preamble + dynamic password + repeat code + dynamic password + repeat code + dynamic password + ... + repeat code + dynamic password.

[0151] For example, the dynamic password format is: address code + address verification code + data code + data verification code.

[0152] For example, the address code, address verification code, data code, and data verification code are 8-bit data.

[0153] For example, the address verification code and the data verification code are reverse verification codes.

[0154] For example, the preamble format is: 10ms carrier wave + 5ms silence.

[0155] For example, the logic "0" format is: 500μs carrier + 500μs silence.

[0156] For example, the logical "1" format is: 500μs carrier + 1500μs silence.

[0157] For example, the repeat code format is: 10ms carrier + 2.5ms silence + 500μs carrier.

[0158] Explanation of the repeat code: When the transmitter keeps sending the same dynamic password, it no longer sends the preamble. Instead, it adds a repeat code after sending the data frame and then sends the address code, verification code, data code, and data verification code.

[0159] The infrared emitter of this invention does not emit a constant infrared detection light, but rather emits dynamically modulated infrared detection light. Dynamically modulated infrared detection light refers to a series of infrared detection lights generated by a dynamic modulation module, with a specific and variable frequency and a dynamically adjustable duty cycle, essentially embedding special pulse characteristics into the infrared detection signal. The advantage of setting the detection light according to ambient light is that it avoids interference from sources with fixed frequencies (such as certain lamps and devices). The purpose of dynamically setting the duty cycle of the infrared detection light drive signal is to automatically adjust the pulse on / off ratio according to the ambient light intensity. Under strong ambient light, the duty cycle is reduced to decrease the probability of the infrared detection light signal being overwhelmed by ambient light; under weak ambient light, the infrared detection light duty cycle is increased to enhance the infrared detection light signal intensity.

[0160] The coherent processing module multiplies the first received signal with the fundamental reference signal to obtain the third received signal. The multiplication process can significantly amplify signals that are in phase and frequency with the fundamental reference signal (i.e., signals that are emitted and reflected back), while suppressing other interference signals such as sunlight that are in different frequency and phase with the fundamental reference signal.

[0161] The feature extraction module is used to extract parameter features of the third received signal and the basic reference signal, including carrier frequency, carrier phase, carrier duty cycle and other parameter features.

[0162] The encoding and demodulation module is used to perform digital encoding and demodulation on the third received signal to obtain the second digital encoded sequence demodulated from the third received signal.

[0163] The intelligent decision-making module is used to determine that infrared detection is in a valid detection state when the parameters of the third received signal and the basic reference signal meet the similarity condition and the first digital encoding sequence and the second digital encoding sequence are the same; otherwise, it determines that infrared detection is in an invalid detection state. When infrared detection is in a valid detection state, if the infrared detection light is blocked, it determines that there is an obstruction and outputs a level-jumping signal (such as jumping from low level to high level) at the detection output port. When infrared detection is in an invalid detection state, it instructs the dynamic modulation module to regenerate the first signal and the second signal; and uses the second signal as the driving signal to drive the infrared transmitter to emit the infrared detection signal.

[0164] The similarity conditions include:

[0165] The similarity condition is met when the parameter similarity between the third received signal and the basic reference signal is higher than the similarity threshold, and the parameter similarity remains the same for multiple consecutive cycles.

[0166] The parameter similarity includes the similarity of carrier frequency, carrier phase, and carrier duty cycle.

[0167] Preferably, the similarity threshold is 95%. This threshold is dynamically adjusted based on the ambient noise level.

[0168] The system also includes a host computer, which is electrically connected to the controller unit and is used to set the parameters of the controller unit and receive the level signal from the controller unit's detection output port.

[0169] The controller unit parameters include: trigger sensitivity, output mode, trigger conditions, etc.

[0170] This invention comprehensively judges multiple extracted parameter features. Only when each parameter exceeds a similarity threshold and the digital encoding sequence is identical is the system finally determined to be in the "valid object detection" state. This multi-factor verification mechanism makes it extremely difficult for even the rarest interference signal to simultaneously meet the encoding and other waveform feature conditions, thus reducing the false alarm rate to an extremely low level.

[0171] A third aspect of the present invention provides a processor-readable storage medium storing a computer program, wherein when the processor executes the computer program, it implements the adaptive anti-sunlight interference infrared detection method described in the first aspect of the present invention.

[0172] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An adaptive infrared detection method resistant to sunlight interference, characterized in that, Includes the following steps: S1, install the infrared transmitter and infrared receiver opposite each other on both sides of the detection area, or install the infrared transmitter and receiver integrated module facing the detection area. S2, when there are no obstructions in the detection area, turn off the infrared transmitter and turn on the infrared receiver to collect ambient light; determine the stability of the ambient light by analyzing the frequency range of the ambient light. S3, dynamically set the frequency and duty cycle of the carrier signal according to the stability of the ambient light and the intensity of the ambient light to obtain the first signal; S4, embed the first digital code sequence into the first signal to obtain the second signal; turn on the infrared transmitter and drive the infrared transmitter to emit an infrared signal using the second signal as the driving signal; S5, the infrared receiver receives the infrared signal, converts the current signal generated by the infrared receiver into a voltage signal, and after the voltage signal is amplified by the gain circuit, the first received signal is obtained. S6, the first received signal is filtered through a bandpass filter to obtain the second received signal; S7, the frequency and phase of the second received signal are locked and recovered through a digital phase-locked loop as a basic reference signal; S8, multiply the first received signal with the basic reference signal to obtain the third received signal; S9, perform digital encoding demodulation on the third received signal to obtain the second digital encoding sequence demodulated from the third received signal; S10, extract the parameter features of the third received signal and the basic reference signal respectively; S11, when the parameters of the third received signal and the basic reference signal meet the similarity condition, and the first digital coding sequence and the second digital coding sequence are the same, it is determined that the infrared detection is in a valid detection state; otherwise, it is determined that the infrared detection is in an invalid detection state. S12: When the infrared detection is in an effective detection state, if the infrared detection light is blocked, it is determined that there is an obstruction, and a level switching signal is output; when the infrared detection is in an invalid detection state, return to step S2.

2. The adaptive anti-solar interference infrared detection method according to claim 1, characterized in that, In step S2, the step of determining the stability of ambient light by analyzing its frequency range specifically includes: S2.1 If the frequency range difference of the ambient light is greater than the frequency interference threshold, the ambient light is determined to be unstable. S2.2 If the frequency range difference of the ambient light is not greater than the frequency interference threshold, then the ambient light is considered stable.

3. The adaptive anti-sunlight interference infrared detection method according to claim 2, characterized in that: The frequency interference threshold is 0.5 kHz.

4. The adaptive anti-sunlight interference infrared detection method according to claim 1, characterized in that, The S3 step specifically includes: S3.1 When the ambient light is stable, a carrier signal frequency is selected by pseudo-random switching within a preset frequency range; S3.2 When the ambient light is unstable, a carrier signal frequency is selected outside the frequency range of the ambient light according to the preset frequency deviation value; S3.3, Based on the ambient light intensity, a carrier signal duty cycle is selected by pseudo-random switching within a preset duty cycle range; S3.4, Based on the selected carrier signal frequency and carrier signal duty cycle, generate the corresponding carrier and set it as the first signal.

5. The adaptive anti-sunlight interference infrared detection method according to claim 4, characterized in that: In step S3.1, the preset frequency range is 32~44kHz or 30~50kHz; In step S3.2, Carrier signal frequency = Maximum ambient light frequency + Preset frequency deviation = First signal frequency; or, Carrier signal frequency = minimum ambient light frequency - preset frequency deviation = first signal frequency; The preset frequency deviation values ​​are 5kHz, 10kHz, or 20kHz.

6. The adaptive anti-sunlight interference infrared detection method according to claim 5, characterized in that, Step S3.3 further includes: In light environments with light intensity exceeding 50,000 lux, the preset duty cycle range is 5% to 10%. In a light environment with an intensity of 10,000 to 50,000 lux, the preset duty cycle range is 15% to 25%. In light environments with light intensity below 10,000 lux, the preset duty cycle range is 30% to 40%.

7. The adaptive anti-sunlight interference infrared detection method according to claim 1, characterized in that: The first digital encoding sequence is: a preamble + a dynamic password; Alternatively, the first digital encoding sequence is: preamble + dynamic password + repeat code + dynamic password + repeat code + dynamic password + ... + repeat code + dynamic password; The dynamic password is formatted as: address code + address verification code + data code + data verification code; The address code, address verification code, data code, and data verification code are all 8-bit data. Both the address verification code and the data verification code are verified using the reverse code. Preamble format: 10ms carrier wave + 5ms silence; Logical "0" format: 500μs carrier + 500μs silence; Logical "1" format: 500μs carrier + 1500μs silence; The repeat code format is: 10ms carrier + 2.5ms silence + 500μs carrier.

8. The adaptive anti-solar interference infrared detection method according to claim 1, characterized in that, In step S11, satisfying the similarity condition includes: The similarity condition is met when the parameter similarity between the third received signal and the basic reference signal is higher than the similarity threshold and the same parameter similarity is maintained for multiple consecutive cycles. The parameter similarity includes the similarity of carrier frequency, carrier phase, and carrier duty cycle; The similarity threshold is 95%, which is dynamically adjusted according to the environmental noise level.

9. An adaptive anti-solar interference infrared detection system, used to implement the adaptive anti-solar interference infrared detection method according to any one of claims 1 to 8, characterized in that, include: The system includes an infrared transmitter, an infrared receiver, a signal preprocessing unit, a bandpass filter unit, a digital phase-locked loop unit, and a controller unit; among which, The infrared transmitter is used to convert electrical signals into infrared detection light for detection of obstructions. The infrared receiver is used to receive infrared light signals from the detection area and convert them into current signals. The signal preprocessing unit, which is electrically connected to the infrared receiver and the controller unit, includes a transimpedance amplifier and a gain circuit. It is used to convert the current signal generated by the infrared receiver into a voltage signal using the transimpedance amplifier, and then amplify the voltage signal through the gain circuit to obtain the first received signal. A bandpass filter unit, electrically connected to the signal preprocessing unit, is used to perform bandpass filtering on the first received signal to obtain a second received signal; A digital phase-locked loop unit, electrically connected to the bandpass filter unit, is used to lock and recover the frequency and phase of the second received signal as a basic reference signal. The controller unit, electrically connected to the infrared transmitter, infrared receiver, signal preprocessing unit, bandpass filter unit, and digital phase-locked loop unit, includes: a dynamic modulation module, a coherent processing module, an encoding and demodulation module, a feature extraction module, an intelligent decision-making module, and a detection output port; The dynamic modulation module is used to dynamically set the frequency and duty cycle of the carrier signal to obtain a first signal; embed a first digital encoding sequence into the first signal to obtain a second signal; and use the second signal as a driving signal to drive the infrared transmitter to emit an infrared signal. The coherent processing module is used to multiply the first received signal with the basic reference signal to obtain the third received signal; The feature extraction module is used to extract the parameter features of the third received signal and the basic reference signal; The encoding and demodulation module is used to perform digital encoding and demodulation on the third received signal to obtain the second digital encoding sequence demodulated from the third received signal; The intelligent decision-making module is used to determine that infrared detection is in a valid detection state when the parameters of the third received signal and the basic reference signal meet the similarity condition and the first digital encoding sequence and the second digital encoding sequence are the same; otherwise, it determines that infrared detection is in an invalid detection state. When infrared detection is in a valid detection state, if the infrared detection light is blocked, it is determined that there is an obstruction, and the detection output port outputs a level-jumping signal. When infrared detection is in an invalid detection state, it instructs the dynamic modulation module to regenerate the first signal and the second signal; and uses the second signal as the driving signal to drive the infrared transmitter to emit an infrared detection signal.

10. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and when the processor executes the computer program, it implements an adaptive anti-sunlight interference infrared detection method as described in any one of claims 1 to 8.