A method for determining the direction of movement of personnel based on pyroelectric infrared signals

The infrared signal is obtained and signal processing is performed through the PIR sensor, which solves the problem that existing pyroelectric infrared sensors cannot detect the direction of personnel movement, realizes accurate judgment of personnel activities and direction, reduces the false alarm rate and expands the scope of application.

CN115165117BActive Publication Date: 2025-03-18SHANGHAI INST OF MICROSYSTEM & INFORMATION TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210658918.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-13
Publication Date
2025-03-18
Estimated Expiration
2042-06-13

AI Technical Summary

Technical Problem

Existing pyroelectric infrared sensors cannot effectively detect the direction of personnel movement, resulting in a high false alarm rate and limited application range.

Method used

The infrared signal is obtained through the PIR sensor, the invalid signal is filtered out using the IIR bandpass filter, and the Fourier transform is performed, and the energy in the 0.5Hz to 3Hz frequency band is calculated to determine the activity and movement direction of the person.

Benefits of technology

It effectively reduces the false alarm rate, can accurately detect the movement direction of personnel, and expands the application of pyroelectric infrared sensors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115165117B_ABST
    Figure CN115165117B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for determining the direction of movement of a person based on a pyroelectric infrared signal, comprising: step (1): acquiring an infrared signal through a PIR sensor; step (2): determining whether the infrared signal contains human activity; step (3): when human activity exists, determining the direction of movement of the human activity according to the infrared signal. The present invention can not only detect human activity, but also effectively detect the direction of movement of the person.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital signal processing, and in particular to a method for judging the moving direction of personnel based on pyroelectric infrared signals. Background Art

[0002] Passive pyroelectric infrared sensors are ultra-low cost, ultra-low power consumption, easy to use, and widely used in security alarms, automatic doors and other products. However, the technical means of these products are relatively simple, and even do not require the participation of digital signal processors. They only require simple circuit structures, and their functions are limited to detecting whether there are people in close range.

[0003] The existing pyroelectric infrared sensor detection technology has a high false alarm rate and can only detect whether a person is passing by, but cannot detect the direction in which the person is passing. The existing technology needs to be further improved so that the pyroelectric infrared sensor can have a wider range of applications. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method for determining the moving direction of personnel based on pyroelectric infrared signals, which can not only detect the activities of personnel, but also effectively detect the moving direction of personnel.

[0005] The technical solution adopted by the present invention to solve the technical problem is: to provide a method for determining the moving direction of a person based on pyroelectric infrared signals, comprising:

[0006] Step (1): Obtain infrared signals through the PIR sensor;

[0007] Step (2): determining whether there is human activity in the infrared signal;

[0008] Step (3): When there is human activity, the moving direction of the human activity is determined based on the infrared signal.

[0009] The step (1) is specifically as follows: the sampling rate is set to 200 Hz, the sampling signal length is set to 5.12 s, and each sampling is performed by the PIR sensor to obtain a total of 200 Hz×5.12 s=1024 sampling points of infrared signal x.

[0010] The step (1) further includes: filtering the acquired infrared signal through an IIR bandpass filter to filter out invalid DC offset and high-frequency disturbance.

[0011] The step (2) comprises:

[0012] Step (21): performing Fourier transform on the acquired infrared signal to obtain a frequency domain signal;

[0013] Step (22): Calculate the energy E of the frequency domain signal in the frequency range of 0.5 Hz to 3 Hz S , according to the energy E S Determine whether there is human activity, when the energy E S Greater than the preset first energy threshold TH S , it indicates that there is human activity; when the energy E S Less than the preset first energy threshold TH S , it indicates that there is no human activity.

[0014] The energy E in step (22) S The formula is: Where N is the length of the frequency domain signal, X(n) is the amplitude at frequency point n, n∈[0,N-1], X * (n) is the conjugate of X(n).

[0015] The step (2) also includes: respectively calculating the energy E0 of the frequency domain signal in the 0.5-1 Hz frequency band, the energy E1 in the 1-1.7 Hz frequency band, and the energy E2 in the 1.7-2.5 Hz frequency band; and when there is human activity, determining in which sub-frequency band of energy E0, energy E1, and energy E2 the signal of human activity is concentrated.

[0016] The step (3) is specifically as follows: when the infrared signal first appears a trough and then a peak, the moving direction of the personnel activity is determined to be a positive direction; when the infrared signal first appears a peak and then a trough, the moving direction of the personnel activity is determined to be a reverse direction.

[0017] The step (3) also includes determining whether the peaks and troughs in the infrared signal are valid, specifically:

[0018] Step (31): compare the kth sampling point x(k) in the infrared signal x with the mpdth sampling points in the left neighborhood and the mpdth sampling points in the right neighborhood respectively. If x(k) is the maximum value, x(k) is used as the pre-selected peak point; then the k+mpdth sampling point is used as the next detection point to find the pre-selected peak point until the sampling point detection is completed; finally, the peak points less than the preset threshold TH are eliminated. p The pre-selected peak point is obtained to obtain the effective peak;

[0019] Step (32): Let y = -x, and use the method of step (31) to obtain the effective peak of y, where the effective peak of y is the effective trough of the infrared signal x.

[0020] The mpd sampling points satisfy:

[0021] If E0>TH0 is satisfied, then mpd=128; if E0>TH0 is not satisfied, then E1 and TH0 are compared;

[0022] If E1>TH0 is satisfied, then mpd=64. If E1>TH0 is not satisfied, then E2 and TH0 are compared.

[0023] If E2>TH0 is satisfied, then mpd=32; wherein TH0 represents the second energy threshold.

[0024] Beneficial Effects

[0025] Due to the adoption of the above-mentioned technical scheme, the present invention has the following advantages and positive effects compared with the prior art: the present invention can detect whether there is human activity by calculating energy, effectively reducing the false alarm rate, and can also detect the direction of human movement; when detecting the direction of human movement, the present invention calculates the energy of the three signal sub-bands in the effective signal frequency band, and then determines in which of the three sub-bands the effective signal is mainly concentrated, and then can effectively detect the effective peaks and effective troughs; the present invention enables pyroelectric infrared sensors to have a wider range of application occasions. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of actual detection of a PIR sensor according to an embodiment of the present invention;

[0027] Figure 2 1 is a schematic diagram of the comparison before and after IIR bandpass filtering according to an embodiment of the present invention;

[0028] Figure 3 is a method flow chart of an embodiment of the present invention;

[0029] Figure 4 is a flow chart of a method for determining whether there is human activity in a detection area in an embodiment of the present invention;

[0030] Figure 5 is a flow chart of a method for determining a direction in which a person passes in an embodiment of the present invention;

[0031] Figure 6 is a flow chart of a peak detection method in an embodiment of the present invention;

[0032] Figure 7 This is a diagram showing the effect of detecting the direction of a person passing by according to an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms fall within the scope limited by the appended claims of the application equally.

[0034] The embodiment of the present invention relates to a method for determining the moving direction of a person based on a pyroelectric infrared signal, comprising:

[0035] Step (1): Obtain infrared signals through the PIR sensor;

[0036] Step (2): determining whether there is human activity in the infrared signal;

[0037] Step (3): When there is human activity, the moving direction of the human activity is determined based on the infrared signal.

[0038] The following is a detailed introduction to this implementation method:

[0039] like Figure 1 As shown in the figure, the PIR sensor is equipped with a narrow-angle Fresnel lens and is placed directly in front of the detection area. When a target person passes in front of the PIR sensor, the CPU will obtain the corresponding electrical signal. Figure 1 As shown in (a), when a person passes by in the positive direction, the CPU obtains Figure 2 (c) The waveform shown; Figure 1 As shown in (b), when a person passes in the opposite direction, the CPU obtains Figure 2 (e) The algorithm first determines whether human activity is detected based on the characteristics of the waveform. If human activity is detected, it further determines the direction of human movement.

[0040] The effective sensing distance specified in this embodiment is 1m to 30m (such as Figure 1 As shown in the figure, usually the frequency of the signal sensed by the PIR sensor when a person walks at a normal pace (hereinafter referred to as the effective signal) is between 0.5Hz and 2.5Hz. When the distance is far, the effective signal frequency is lower, and when the distance is close, the effective signal frequency is higher.

[0041] In this embodiment, the sampling rate is set to 200 Hz, and the signal length used for each calculation is 5.12 s, that is, the infrared signal x sampled each time includes 1024 sampling points x(k), k = 0, 1, 2, ..., 1023, that is, the signal sample composition used for judgment at a single time is:

[0042] x(0),x(1),...,x(255),x(256),x(257),x(258),...,x(511),

[0043] x(512),x(513),...,x(767),x(768),x(769),...,x(1023)

[0044] Among them, x(0), x(1), ..., x(255) are the first group of signals (time length is 1.28s), x(256), x(257), ..., x(511) are the second group of signals (time length is 1.28s), x(512), x(513), ..., x(767) are the third group of signals (time length is 1.28s), and x(768), x(769), ..., x(1023) are the fourth group of signals (time length is 1.28s). It should be noted that the signal overlap rate is set to 75% in this embodiment. Therefore, in this signal acquisition process, except for the fourth group of signals which are newly acquired, the first group of signals, the second group of signals and the third group of signals are all from the infrared signal x used for the previous detection, that is, each signal used for detection will use the latter 75% of the data of the signal used for the previous detection.

[0045] The above configuration can ensure the timeliness of detection and ensure that the signal length is sufficient to cover the entire process of a person passing through. In order to ensure that the algorithm has a low false alarm rate and a high accuracy rate, the method flow of this embodiment is as follows: Figure 3 As shown, it is mainly divided into two steps. The first step is to detect whether there is human activity, and the second step is to determine the direction of human movement. The specific description is as follows:

[0046] The first step, such as Figure 4 The figure shows that in order to judge whether there is human activity within the detection range, the bandwidth of the IIR bandpass filter is set to 0.44Hz~3Hz, which effectively filters out invalid DC offset and high-frequency disturbance. Figure 2 (c) is the original signal obtained, Figure 2 (d) is the signal after filtering, Figure 2 (e) is the signal before filtering, Figure 2 (f) is the signal after filtering.

[0047] Furthermore, the filtered signal is transformed by FFT to obtain the frequency domain characteristics of the signal. In the spectrum diagram, the energy E in the frequency range of 0.5 Hz to 3 Hz is calculated according to formula (1). S , if the energy E S Greater than the first energy threshold TH S , it is considered that there is human activity; otherwise, it is considered that there is no human activity; energy E S The formula is as follows:

[0048]

[0049] Where N is the length of the frequency domain signal, X(n) is the amplitude at frequency point n, n∈[0,N-1], X * (n) is the conjugate of X(n).

[0050] According to the sampling rate F S =200Hz, the signal sample length is 1024 sampling points, and the frequency resolution in the spectrum diagram is about 200Hz÷1024=0.195Hz. Therefore, to calculate the energy of the 0.5-2.5Hz bandwidth, when summing using formula (1), the range of n in this embodiment is 2-13.

[0051] In addition, in this step, the present embodiment also calculates the energy of 0.5-1 Hz, 1-1.7 Hz, and 1.7-2.5 Hz, which are defined as E0, E1, and E2, respectively. This is mainly used to determine which frequency band the energy of the effective signal is mainly concentrated in, which is used for the second step of determining the moving direction.

[0052] The second step is to determine the direction of personnel movement based on the order of the peaks and troughs of the effective signal. The flow chart is as follows: Figure 5 shown.

[0053] A large number of experiments have shown that the signal waveform caused by the passage of people or other disturbances has the following two characteristics:

[0054] 1. Two consecutive peaks or troughs are judged as invalid features.

[0055] 2. When a person passes by in the positive direction, the signal first shows a trough and then a peak; when a person moves in the opposite direction, the signal first shows a peak and then a trough.

[0056] According to the above characteristics, we only need to accurately identify the effective peaks and troughs of the signal, as well as the order in which they appear. The peak detection method is as follows: Figure 6 shown.

[0057] Define a detection signal sample x as: x(0), x(1), ..., x(1023), where x(1023) is the current sampling time point. Compare the kth sampling point x(k) (k = 0, 1, 2, ..., 1023) in x with several adjacent sampling points on the left and right. The left neighborhood width is set to mpd sampling points, and the right neighborhood width is also set to mpd sampling points. If x(k) is the maximum value, then x(k) is temporarily determined as the pre-selected peak point. According to the above method, the k+mpdth sampling point is used as the next detection point to find the pre-selected peak point, until the sampling point detection is completed, and all pre-selected peak points are saved. In order to eliminate invalid pre-selected peak points, all pre-selected peak points are compared with the threshold TH p Compared with TH pThe pre-selected peak point is deleted. In this embodiment, k=10, that is, the comparison starts from the 11th sampling point among the 1024 sampling points (x(0), x(1), ..., x(1023)).

[0058] In order to detect effective peaks and avoid obtaining false peaks, when the signal frequency is high, the detection width is set narrower, and vice versa. Therefore, it is stipulated that: when E0>TH0, mpd=128; secondly, when E1>TH0, mpd=64; finally, when E2>TH0, mpd=32, where TH0 represents the second energy threshold. The priority of these three judgment conditions is from low to high, that is, E0 and TH0 are compared first. If E0>TH0 is not satisfied, E1 and TH0 are compared. If E1>TH0 is not satisfied, E2 and TH0 are compared. If none of the three conditions are met, mpd=64.

[0059] Furthermore, the signal sample is negated, that is, y=-x, and samples y(0), y(1), ..., y(1023) are obtained. The above method can be used to obtain the effective peak of sample y, which is the effective trough of sample x. The detection effect is as follows: Figure 7 (g) Figure 7 (h) shown.

[0060] Since the signal sample used for detection each time has 75% overlap with the signal sample of the previous detection, in order to avoid the same valid signal (the signal generated by a person passing by) being captured twice or three times in a row, resulting in repeated judgment, after the moving direction is determined, the valid signal segment and the previous signal segment are discarded, and the judgment is made again after the CPU re-acquires 1024 sampling points (5.12s of data).

[0061] It can be seen that the present invention can detect whether there is human activity by calculating energy, effectively reduce the false alarm rate, and detect the direction of human movement; when detecting the direction of human movement, the present invention calculates the energy of the three signal sub-frequency bands in the effective signal frequency band, and then determines in which of the three sub-frequency bands the effective signal is mainly concentrated, and thus can effectively detect the effective peaks and effective troughs.

Claims

1. A method for determining the direction of movement of personnel based on pyroelectric infrared signals, characterized in that: include: Step (1): Obtain infrared signals through the PIR sensor; Step (2): determining whether there is human activity in the infrared signal, specifically comprising: Step (21): performing Fourier transform on the acquired infrared signal to obtain a frequency domain signal; Step (22): Calculate the energy E of the frequency domain signal in the frequency range of 0.5 Hz to 3 Hz S , according to the energy E S Determine whether there is human activity, when the energy E S Greater than the preset first energy threshold TH S , it indicates that there is human activity; when the energy E S Less than the preset first energy threshold TH S , it indicates that there is no human activity; among them, the energy E S The formula is: Where N is the length of the frequency domain signal, X(n) is the amplitude at frequency point n, n∈[0,N-1], X * (n) is the conjugate of X(n); The step (2) further includes: respectively calculating the energy E0 of the frequency domain signal in the 0.5-1 Hz frequency band, the energy E1 in the 1-1.7 Hz frequency band, and the energy E2 in the 1.7-2.5 Hz frequency band, and when there is human activity, determining in which sub-frequency band of energy E0, energy E1, and energy E2 the signal of human activity is concentrated; Step (3): when there is human activity, the moving direction of the human activity is determined according to the infrared signal, specifically: when the infrared signal first appears a trough and then a peak, the moving direction of the human activity is determined to be a positive direction; When the infrared signal first appears a peak and then a trough, the moving direction of the person's activity is determined to be the opposite direction; The step (3) also includes determining whether the peaks and troughs in the infrared signal are valid, specifically: Step (31): compare the kth sampling point x(k) in the infrared signal x with the mpdth sampling points in the left neighborhood and the mpdth sampling points in the right neighborhood respectively. If x(k) is the maximum value, x(k) is used as the pre-selected peak point; then the k+mpdth sampling point is used as the next detection point to find the pre-selected peak point until the sampling point detection is completed; finally, the peak points less than the preset threshold TH are eliminated. p The pre-selected peak point is obtained to obtain the effective peak; Step (32): Let y = -x, and use the method of step (31) to obtain the effective peak of y, where the effective peak of y is the effective trough of the infrared signal x.

2. The method for determining the moving direction of a person based on pyroelectric infrared signals according to claim 1, characterized in that: The step (1) is specifically as follows: the sampling rate is set to 200 Hz, the sampling signal length is set to 5.12 s, and each sampling is performed by the PIR sensor to obtain a total of 200 Hz×5.12 s=1024 sampling points of infrared signal x.

3. The method for determining the moving direction of a person based on pyroelectric infrared signals according to claim 1, characterized in that: The step (1) further includes: filtering the acquired infrared signal through an IIR bandpass filter to filter out invalid DC offset and high-frequency disturbance.

4. The method for determining the moving direction of a person based on pyroelectric infrared signals according to claim 1, characterized in that: The mpd sampling points satisfy: If E0>TH0 is satisfied, then mpd=128; if E0>TH0 is not satisfied, then E1 and TH0 are compared; If E1>TH0 is satisfied, then mpd=64. If E1>TH0 is not satisfied, then E2 and TH0 are compared. If E2>TH0 is satisfied, then mpd=32, if E2>TH0 is not satisfied, then mpd=64; Wherein, TH0 represents the second energy threshold.

Citation Information

Patent Citations

  • Method and device for judging movement direction of human body by using PIR (passive infrared sensor)

    CN110384504A

  • Human body existence sensing system and method based on PIR

    CN112284544A