A device and method for fast filtering direct current signals suitable for PIR sensors

CN116781039BActive Publication Date: 2026-11-03HANGZHOU SDIC MICROELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310620751.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-29
Publication Date
2026-11-03
Estimated Expiration
2043-05-29

AI Technical Summary

Technical Problem

现有PIR传感器的直流信号过滤时间过长,导致系统开机时间较长,并且容易受到干扰,增加了系统成本和误判风险。

Method used

The system employs a DC detection unit, a high-pass filter coefficient calculation unit, and a signal delay unit. It detects the DC component through a low-pass filter, selects an appropriate high-pass filter coefficient based on the magnitude of the DC component, and combines signal delay processing to quickly filter the DC signal.

Benefits of technology

It reduces DC signal filtering time, lowers the risk of misjudgment, simplifies hardware circuitry, reduces system cost, and improves signal-to-noise ratio.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781039B_ABST
    Figure CN116781039B_ABST
Patent Text Reader

Abstract

The application provides a device and method for quickly filtering direct current signals suitable for PIR sensors, which comprises a direct current detection unit, a high-pass filter coefficient calculation unit, a signal delay unit and a high-pass filter data processing unit, the direct current detection unit, the high-pass filter coefficient calculation unit and the high-pass filter data processing unit are connected in sequence, and the signal delay unit is connected to the high-pass filter data processing unit, the application selects appropriate high-pass filter coefficients according to the size of the calculated direct current components, thereby accelerating the filtering speed of the direct current signals, reducing the oscillation attenuation phenomenon of the direct current signals, and reducing the possibility of misjudgment caused by the subsequent algorithm decision unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microelectronics / digital circuit technology, and more specifically to an apparatus and method for rapidly filtering DC signals for PIR sensors. Background Technology

[0002] Pyroelectric infrared (PIR) sensors are passive thermal radiation detectors capable of detecting infrared signals (8–14 μm) emitted by the human body with high sensitivity. They are widely used in intelligent lighting control, intrusion detection, and other fields. The structure of a PIR signal conditioning circuit is as follows: Figure 1 As shown, it typically consists of a PIR sensor unit, an ADC analog-to-digital converter unit, a filter circuit unit, and an algorithm decision unit. When a human body with a temperature difference from the ambient background passes through the PIR sensor's sensing area, the sensor outputs an AC signal of about 1mV. This AC signal is superimposed on a variable DC bias signal. Furthermore, the high impedance characteristics of the PIR sensor itself and the DC bias in the ADC analog-to-digital converter will cause the PIR signal received by the subsequent stage to have a certain DC component. In applications, a high-pass filter is designed to filter out the DC component in the PIR sensor output signal when the system is powered on or the environment changes. This high-pass filter is usually a third-order IIR high-pass filter with a cutoff frequency of fc = 0.4Hz.

[0003] For a third-order IIR high-pass filter, the settling time for filtering DC signals is too long, causing the DC signal to exhibit an oscillating attenuation trend. This makes the algorithm decision unit of the PIR signal conditioning circuit susceptible to interference from the oscillating attenuated DC signal, leading to misjudgments. In other words, the excessively long DC signal filtering time in the PIR conditioning circuit results in a longer system startup time, and the back-end circuits are easily affected by interference during startup or environmental changes, reducing the system's signal-to-noise ratio. The decision algorithms used in the decision unit to reduce misjudgments are complex, which significantly increases the system cost and hinders large-scale deployment in production. Summary of the Invention

[0004] To address the problems of oscillating attenuation in DC signals from PIR sensors after filtering, leading to misjudgments in subsequent algorithm decision units, and the high cost of improving the decision algorithm, this invention proposes a device for rapidly filtering DC signals from PIR sensors. By selecting appropriate high-pass filter coefficients based on the estimated magnitude of the DC component, the DC signal filtering time can be reduced, decreasing misjudgments in the decision algorithm unit of the PIR conditioning circuit. Furthermore, the hardware implementation is simple, requires fewer resources, and the high-pass filter coefficients for filtering DC signals can be configured and adjusted according to the application. This invention also relates to a method for rapidly filtering DC signals from PIR sensors.

[0005] The technical solution of the present invention is as follows:

[0006] A device for rapidly filtering DC signals for PIR sensors, characterized in that it includes a DC detection unit, a high-pass filter coefficient calculation unit, a signal delay unit, and a high-pass filter data processing unit, wherein the DC detection unit, the high-pass filter coefficient calculation unit, and the high-pass filter data processing unit are connected in sequence, and the signal delay unit is connected to the high-pass filter data processing unit;

[0007] The DC detection unit receives the digital signal from the PIR sensor and calculates the DC component of the received digital signal using the time-domain expression of a low-pass filter. The calculation result of the DC component is then subjected to hard decision processing through several pre-set levels to obtain a hard decision processing result. Each level has a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number. The hard decision processing result involves matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval. The hard decision processing result of the DC component is then transmitted to the high-pass filter coefficient calculation unit.

[0008] The high-pass filter coefficient calculation unit stores several data sets corresponding to the high-pass filter used by the high-pass filter data processing unit. Each data set includes different gear numbers set based on the zero-pole cumulative trial method, the corresponding high-pass filter cutoff frequency, and high-pass filter coefficients containing the numerator and denominator polynomial coefficients of the high-pass filter Z-domain transfer function. It receives the hard decision processing result of the DC component transmitted by the DC detection unit and matches it with the gear number of the stored data set to obtain the high-pass filter coefficient corresponding to that gear number. Then, it transmits the obtained high-pass filter coefficient to the high-pass filter data processing unit.

[0009] The signal delay unit uses a synchronous FIFO circuit to receive the digital signal from the PIR sensor and delay it. The delay time is the same as the DC component calculation time in the DC detection unit. Then, the digital signal from the PIR sensor after the delay is transmitted to the high-pass filter data processing unit.

[0010] The high-pass filter data processing unit receives the high-pass filter coefficients transmitted from the high-pass filter coefficient calculation unit and the delayed digital signal of the PIR sensor transmitted from the signal delay unit. Based on the received high-pass filter coefficients and combined with the time-domain expression of the high-pass filter Z-domain transfer function, the delayed digital signal of the PIR sensor is filtered to obtain a PIR filtered signal, which is then used by the subsequent algorithm decision unit of the PIR signal conditioning circuit.

[0011] Preferably, the DC detection unit uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz.

[0012] Preferably, the DC detection unit is pre-set with 7 gear positions and correspondingly increasing DC component thresholds for each of the 7 positions, dividing the system into 8 gear intervals with corresponding gear numbers from 0 to 7. When the calculated result of the DC component is less than the threshold of the first gear position, it is the first gear interval and its gear number is output as 0. When it is greater than or equal to the threshold of the first gear position and less than the threshold of the second gear position, it is the second gear interval and its gear number is output as 1, and so on. When the calculated result of the DC component is greater than or equal to the threshold of the seventh gear position, it is the eighth gear interval and its gear number is output as 7.

[0013] Preferably, the high-pass filter of the high-pass filter data processing unit is a third-order IIR high-pass filter.

[0014] Preferably, the high-pass filter cutoff frequency range of each data group stored in the high-pass filter coefficient calculation unit is between 0.4Hz and 3.2Hz. The cutoff frequency is evenly divided within this range according to the number of data groups to serve as the high-pass filter cutoff frequency value corresponding to the gear number in each data group. In each data group, the high-pass filter cutoff frequency corresponding to the gear number increases as the gear number increases. In the high-pass filter coefficients corresponding to the gear number, the zero-order coefficient of the denominator polynomial coefficients is 1, the first-order coefficients are negative and increasing, the second-order coefficients are positive and decreasing, and the third-order coefficients are negative and increasing. The zero-order coefficient of the numerator polynomial coefficients is positive and decreasing, the first-order coefficients are negative and increasing, the second-order coefficients are positive and decreasing, and the third-order coefficients are negative and increasing.

[0015] Preferably, the DC component calculation process of the DC detection unit lasts for 1 to 3 seconds, and the delay time of the signal delay unit for the digital signal delay processing of the received PIR sensor is also 1 to 3 seconds, which is the same as the DC component calculation process duration.

[0016] A method for rapidly filtering DC signals for PIR sensors, characterized by comprising the following steps:

[0017] The DC detection step involves receiving a digital signal from a PIR sensor and calculating the DC component of the received digital signal using a time-domain expression of a low-pass filter. The calculation result of the DC component is then subjected to hard decision processing through several pre-set levels to obtain a hard decision processing result. Each level has a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number. The hard decision processing result is obtained by matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval.

[0018] The high-pass filter coefficient calculation steps include storing several data sets corresponding to the high-pass filter. Each data set includes different gear numbers set based on the zero-pole cumulative trial method, the corresponding high-pass filter cutoff frequency, and the high-pass filter coefficients containing the numerator and denominator polynomial coefficients of the high-pass filter's Z-domain transfer function. The hard decision processing result of the DC component obtained in the DC detection step is matched with the gear number of the stored data set to obtain the high-pass filter coefficient corresponding to that gear number.

[0019] In the signal delay step, a synchronous FIFO circuit is used to receive the digital signal from the PIR sensor and perform delay processing on it, and the delay time is the same as the DC component calculation process time in the DC detection step.

[0020] The high-pass filter data processing step involves using the high-pass filter coefficients obtained from the high-pass filter coefficient calculation step, combined with the time-domain expression of the high-pass filter Z-domain transfer function, to filter the digital signal of the PIR sensor after the signal delay step to obtain the PIR filtered signal, which is then used by the subsequent algorithm decision unit of the PIR signal conditioning circuit.

[0021] Preferably, the DC detection step uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz; the preset range has 4 to 64 ranges.

[0022] Preferably, the DC detection step pre-sets 7 gears with corresponding incremental 7-gear DC component thresholds, dividing the system into 8 gear intervals with corresponding gear numbers from 0 to 7. When the calculated result of the DC component is less than the threshold of the first gear, it is the first gear interval with a gear number of 0. When it is greater than or equal to the threshold of the first gear and less than the threshold of the second gear, it is the second gear interval with a gear number of 1, and so on. When the calculated result of the DC component is greater than or equal to the threshold of the seventh gear, it is the eighth gear interval with a gear number of 7.

[0023] Preferably, the high-pass filter in the high-pass filter data processing step is a third-order IIR high-pass filter.

[0024] The beneficial effects of this invention are as follows:

[0025] This invention proposes a device for rapidly filtering DC signals using PIR sensors. It can be understood as an improved filtering circuit unit within a PIR signal conditioning circuit, comprising a DC detection unit, a high-pass filter coefficient calculation unit, a signal delay unit, and a high-pass filter data processing unit. The DC detection unit employs a low-pass filter with a low cutoff frequency, capable of detecting the magnitude of the DC component of the signal. The magnitude of the DC component can be calculated using its own time-domain expression, which is convenient and accurate. Then, based on the calculated DC component magnitude, the signal is divided into 64 levels. The higher the number of levels, the higher the efficiency and accuracy of DC signal filtering, but the cost will also increase accordingly. Therefore, the user can freely choose according to their specific needs, performing hard decision processing, demonstrating good configurability. The high-pass filter coefficient calculation unit uses the level numbers assigned by the DC detection unit (i.e., the hard decision processing result) to match the high-pass filter's Z-domain transfer function time-domain expression, selected by the high-pass filter data processing unit, with the results stored in the high-pass filter data processing unit. The high-pass filter coefficients in the coefficient calculation unit; the signal delay unit uses a synchronous FIFO circuit. Since the DC detection unit introduces a delay, the signal delay unit delays the input signal by 1 to 3 seconds, so that the high-pass filter coefficients loaded by the high-pass filter data processing unit and the original signal can be synchronized in time. The delay time of 1 to 3 seconds can be selected and configured in the DC detection unit, which also reflects the good configurability of the device of the present invention; the high-pass filter data processing unit receives the high-pass filter coefficients and delayed signals generated by the high-pass filter coefficient calculation unit and the signal delay unit, performs filtering calculations through the Z-domain transfer function of the selected high-pass filter, and finally outputs a PIR filtered signal for use by the algorithm decision unit in the PIR signal conditioning circuit. This invention selects appropriate high-pass filter coefficients based on the estimated magnitude of the DC component. If the DC detection unit estimates a large DC component, a set of high-pass filter coefficients with a higher cutoff frequency and faster DC component filtering is selected to filter out the DC signal. Combined with a signal delay unit, the filter coefficients loaded by the high-pass filter data processing unit and the original signal can be synchronized in time, accelerating DC filtering, reducing the oscillation attenuation phenomenon of the DC signal, and reducing the DC signal filtering time. This minimizes the impact of DC signal oscillation attenuation on the subsequent algorithm decision unit of the PIR signal conditioning circuit, thereby reducing misjudgments. It also has the advantages of simple hardware circuit implementation, fewer resources, and the ability to configure and adjust the high-pass filter coefficients for filtering DC according to the application.

[0026] This invention also relates to a method for rapidly filtering DC signals for PIR sensors, corresponding to the aforementioned apparatus for rapidly filtering DC signals for PIR sensors. It can be understood as a method for implementing the aforementioned apparatus for rapidly filtering DC signals for PIR sensors, including a DC detection step, a high-pass filter coefficient calculation step, a signal delay step, and a high-pass filter data processing step. These steps work collaboratively. Unlike existing technologies that select the same coefficients for all DC components, resulting in the use of low-cutoff-frequency, slow-filtering high-pass filter coefficients even with large DC components, this invention selects appropriate high-pass filter coefficients based on the estimated magnitude of the DC component. If the estimated DC component is large in the DC detection step, a set of coefficients with a higher cutoff frequency and faster DC filtering is selected to filter the DC signal, significantly accelerating the filtering speed and reducing misjudgments in the subsequent decision algorithm unit of the PIR conditioning circuit. Furthermore, unlike methods that involve complex algorithms in the decision unit, this invention has a simple hardware implementation and requires fewer resources. Attached Figure Description

[0027] Figure 1 This is a commonly used PIR sensor signal conditioning circuit structure.

[0028] Figure 2 This is a block diagram of a device for rapidly filtering DC signals suitable for PIR sensors according to the present invention.

[0029] Figure 3 This is a data processing flowchart of a device for rapidly filtering DC signals suitable for PIR sensors according to the present invention.

[0030] Figure 4 The diagram shows the oscillation attenuation of a DC signal filtered by a traditional PIR signal conditioning circuit.

[0031] Figure 5 This is a diagram showing the oscillation attenuation of a DC signal rapidly filtered by a PIR signal conditioning circuit using the scheme of this invention. Detailed Implementation

[0032] The present invention will now be described with reference to the accompanying drawings.

[0033] Commonly used PIR sensor signal conditioning circuit structures are as follows: Figure 1As shown, the system includes a PIR sensor unit, an ADC analog-to-digital converter unit, a filter circuit unit, and an algorithm decision unit. Currently, the filter circuit unit typically uses a third-order IIR high-pass filter with a cutoff frequency of fc = 0.4Hz. However, because the settling time of a third-order high-pass filter for filtering DC signals is too long, the DC signal exhibits an oscillating attenuation trend. This causes the algorithm decision unit of the PIR conditioning circuit to be easily interfered with by the oscillating attenuated DC signal, leading to misjudgments. This invention is an improvement to the filter circuit unit.

[0034] For a third-order IIR high-pass filter, the lower the cutoff frequency, the longer the DC filtering time, and the DC signal exhibits an oscillating attenuation trend after passing through the filter. This prolonged oscillation and attenuation process after the DC signal passes through the high-pass filter can affect the decision unit of the PIR sensor signal conditioning circuit, leading to misjudgments. The high impedance characteristics of the PIR sensor itself and the DC bias in the ADC analog-to-digital conversion both contribute to the presence of a certain DC component and low-frequency interference signals in the received PIR signal. The filtering circuit unit in the PIR signal conditioning circuit is responsible for filtering out these DC components and low-frequency interference signals. Due to the limitation of the amplitude of the signal detected by the front-end PIR sensor, if the DC component of the PIR signal is large, other low-frequency interference signals in the PIR signal will be relatively small. Therefore, when the DC component is large, the cutoff frequency of the high-pass filter in the PIR conditioning circuit can be appropriately increased to accelerate the filtering of the DC component. At the same time, since the low-frequency interference is relatively small, increasing the cutoff frequency of the high-pass filter has a relatively small impact on the signal-to-noise ratio of the entire signal link. In the PIR signal conditioning circuit, the original high-pass filter takes about 5 seconds to filter the DC signal. This means that the traditional PIR signal conditioning circuit can only stabilize and work normally about 5 seconds after the front-end sensor introduces a large DC interference signal under conditions such as system startup and environmental changes. At the same time, the back-end decision circuit needs to be equipped with a complex decision algorithm to reduce the occurrence of false judgments, which increases the implementation cost of the system.

[0035] In view of this, the idea of ​​the present invention is to select appropriate high-pass filter coefficients based on the magnitude of the estimated DC component. If the DC component estimated by the DC detection unit is large, a set of coefficients with a higher cutoff frequency and faster DC component filtering is selected to filter out the DC signal, thereby accelerating the filtering of DC and reducing the oscillation attenuation phenomenon of the DC signal.

[0036] This invention relates to a device for rapidly filtering DC signals for PIR sensors, the structure of which is as follows: Figure 2 As shown, it includes a DC detection unit, a high-pass filter coefficient calculation unit, a signal delay unit, and a high-pass filter data processing unit. The DC detection unit, high-pass filter coefficient calculation unit, and high-pass filter data processing unit are connected sequentially, and the signal delay unit is connected to the high-pass filter data processing unit. Combined with... Figure 3 The data processing flow shown provides a detailed explanation of each unit.

[0037] Specifically, the DC detection unit employs a low-pass filter with a low cutoff frequency to receive the digital signal from the PIR sensor (i.e., the digital signal output from the ADC analog-to-digital converter unit of the PIR sensor signal conditioning circuit, such as...). Figure 3 The ADC shown acquires the PIR signal, and then the DC detection unit estimates the DC amplitude (DC component magnitude) of the PIR signal. Specifically, it calculates the DC component of the received digital signal based on the time-domain expression of the low-pass filter with the low cutoff frequency. The calculation result of the DC component is then hard-determined by comparing it with several preset levels to obtain the hard-determined result. The preset levels can be 4 to 64, each level having a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number, which can be sorted from low to high starting from zero. The hard-determined result is obtained by matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval. The duration of the DC component calculation process can be set to 1 to 3 seconds (this is an optional configuration and can also be set to other durations). Then, the hard-determined result of the DC component is transmitted to the high-pass filter coefficient calculation unit in the form of a digital signal.

[0038] Preferably, the PIR digital signal output from the ADC analog-to-digital converter unit enters the DC detection unit to estimate the DC component of the PIR digital signal. A low-pass filter with a low cutoff frequency has the ability to detect the magnitude of the DC component of the signal. The DC detection unit uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz. The Z-domain transfer function of the DC detection unit is shown below.

[0039]

[0040] The time-domain expression is shown in formula (2) below. The DC detection unit takes 3 seconds to select the DC component.

[0041] y(n)=0.01×x(n)+0.01×x(n-1)+0.9799×y(n-1) (2)

[0042] The DC detection unit calculates the DC component according to the above formula (2), and performs hard decision processing by dividing into multiple gear thresholds, where each gear threshold corresponds to a set of inherent coefficients of the high-pass filter. The larger the DC component, the set of inherent coefficients of the high-pass filter with a higher cut-off frequency and faster DC filtering is adopted. The threshold gears can be configured according to system requirements. For example, the pre-settable gears range from 4 to 64. The more the gear thresholds, the smoother the switching of the inherent coefficients of the high-pass filter, but the more complex the hardware implementation will be, and the higher the detection and filtering accuracy of the DC signal will be. In this preferred embodiment, the DC detection unit is preset with 7 gears and correspondingly 7 increasing DC component thresholds (th1, th2, th3, th4, th5, th6, th7) (th1<th2<th3<th4<th5<th6<th7) for hard decision processing, which are divided into 8 gear intervals with corresponding gear numbers of 0 to 7. When the calculation result of the DC component is less than th1, it is the first gear interval with the gear number output as 0; when it is greater than or equal to th1 and less than th2, it is the second gear interval with the gear number output as 1; when it is greater than or equal to th2 and less than th3, it is the third gear interval with the gear number output as 2, arranged in sequence; when it is greater than or equal to th6 and less than th7, it is the 7th gear interval with the gear number output as 6; when it is greater than or equal to th7, it is the 8th gear interval with the gear number output as 7.

[0043] The DC component estimation time is determined by the inherent coefficients of the DC detection unit. Considering the accuracy of DC signal detection, a recommended set of coefficients here is shown in formula (2) as {0.01, 0.01, 0.9799}, and the preferred delay for DC signal detection is 3s. Adjusting the coefficients according to formula (2) can achieve a trade-off between DC signal detection accuracy and detection delay. The lower the requirement for DC signal detection accuracy, the smaller the detection delay; the higher the requirement for DC signal detection accuracy, the greater the detection delay.

[0044] The high-pass filter coefficient calculation unit performs high-pass filter parameter matching based on the DC amplitude estimated by the DC detection unit. Specifically, it is responsible for storing several data sets corresponding to the high-pass filter used by the high-pass filter data processing unit. The content of each data set includes different gear numbers set based on the zero-pole trial method and the corresponding high-pass filter cutoff frequency and high-pass filter coefficients. The high-pass filter coefficients contain the numerator and denominator polynomial coefficients of the high-pass filter Z-domain transfer function. The number of data sets is the same as the number of gears selected in the DC detection unit. The unit is also responsible for receiving the hard decision processing result of the DC component transmitted by the DC detection unit and matching it with the gear number of the stored data set to obtain the high-pass filter coefficient corresponding to that gear number. The matching can be achieved through a lookup table. Finally, the high-pass filter coefficient calculation unit transmits the obtained high-pass filter coefficients to the high-pass filter data processing unit in the form of a hexadecimal digital signal.

[0045] Preferably, the high-pass filter coefficient calculation unit stores a total of 8 data groups. Taking a 3rd-order IIR high-pass filter as an example, these 8 groups contain corresponding gear numbers, the cutoff frequency of the 3rd-order IIR high-pass filter, and the coefficients of the 3rd-order IIR high-pass filter, as shown in Table 1. It is designed based on the zero-pole trial-and-error method (or the Z-domain zero-pole trial-and-error algorithm for digital filter design). The high-pass filter cutoff frequency range of each data group stored in the high-pass filter coefficient calculation unit is between 0.4Hz and 3.2Hz. The cutoff frequency is evenly distributed within this range according to the number of data groups to serve as the high-pass filter cutoff frequency corresponding to the gear number in each data group. The frequency values ​​are 0.4Hz, 0.8Hz, 1.2Hz, 1.6Hz, 2.0Hz, 2.4Hz, 2.8Hz, and 3.2Hz. In each data group, the cutoff frequency of the high-pass filter increases with the increase of the gear number. The denominator polynomial coefficients a0 of the high-pass filter coefficients corresponding to the gear number have the following relationships: the zero-order coefficient a0 is 1, the first-order coefficient a1 is negative and increasing, the second-order coefficient a2 is positive and decreasing, and the third-order coefficient a3 is negative and increasing. The numerator polynomial coefficients b0 are positive and decreasing, the first-order coefficient b1 is negative and increasing, the second-order coefficient b2 is positive and decreasing, and the third-order coefficient b3 is negative and increasing. The high-pass filter coefficient calculation unit receives the hard decision result output by the DC detection unit, i.e., the gear number N (N = 0, 1, 2, 3, 4, 5, 6, 7). Based on the value of N, it selects the corresponding coefficient from Table 1. For example, if N = 1, it matches the cutoff frequency 0.8 corresponding to gear number 1 with the high-pass filter coefficients a0, a1, a2, a3, b0, b1, b2, b3 (1, -2.8378974373038, 2.6886682404420, -0.8502786173793, 0.922105536890, -2.766316610671, 2.766316610671, -0.922105536890). The selected high-pass filter coefficients are then loaded into the high-pass filter data processing unit.

[0046] Table 1

[0047]

[0048] The signal delay unit, employing a synchronous FIFO circuit, is responsible for receiving the digital signal from the PIR sensor and performing delay processing on it. The delay duration is the same as the calculation time of the DC component in the DC detection unit, i.e., as shown below. Figure 3The input signal delay shown is equal to the delay of the DC detection unit, ensuring that the DC component estimated by the previous stage and the original signal seen by the high-pass filter data processing unit are synchronized in time. The DC component calculation process of the DC detection unit lasts 1-3 seconds, and the delay time is also 1-3 seconds, the same as the DC component calculation process duration. The PIR sensor digital signal, after delay processing, is then transmitted to the high-pass filter data processing unit. When the DC component calculation process duration of the DC detection unit is configured to other durations, the delay time of the signal delay unit is adjusted accordingly to the same duration.

[0049] The high-pass filter data processing unit is a hardware digital circuit for calculating the selected high-pass filter. It is responsible for receiving the high-pass filter coefficient signal transmitted from the high-pass filter coefficient calculation unit and the delayed PIR sensor digital signal transmitted from the signal delay unit. Then, based on the received high-pass filter coefficients and the time-domain expression formula (4) of the high-pass filter Z-domain transfer function, it filters the delayed PIR sensor digital signal to obtain the PIR filtered signal, as shown below. Figure 3 The high-pass filter shown uses adjusted parameters (high-pass filter coefficients) to filter the signal, and finally the PIR filtered signal is passed to the algorithm decision unit in the subsequent PIR sensor signal conditioning circuit.

[0050] Preferably, we use a third-order IIR filter as the high-pass filter in this embodiment, which can remove DC signals and has sufficient attenuation for low-frequency interference signals. The Z-domain transfer function H(z) of the third-order IIR filter is shown below.

[0051]

[0052] Converting the Z-domain transfer function to a time-domain expression, we have the following calculation formula (4).

[0053] y(n)=a0×x(n)+a1×x(n-1)+a2×x(n-2)+a3×x(n-3)-b1×y(n-1)-b2×y(n-2)-b3×y(n-3) (4)

[0054] Where y(n) is the current output value, y(n-1) is the previous output value, y(n-2) is the previous two output values, y(n-3) is the previous three output values, x(n) is the current input value, x(n-1) is the previous input value, x(n-2) is the previous two input values, and x(n-3) is the previous three input values.

[0055] The values ​​of the high-pass filter coefficients a1, a2, a3, b0, b1, b2, b3 determine the cutoff frequency and the filtering time for DC signals. In general applications, the cutoff frequency of the high-pass filter is first determined based on the attenuation effect on the DC signal and low-frequency interference signals. Then, the values ​​of coefficients a0, a1, a2, a3, b0, b1, b2, b3 are calculated. Once these coefficients are determined, the DC filtering time is also determined. For high-pass filters, the lower the cutoff frequency, the longer the DC filtering time. Furthermore, DC signals exhibit an oscillating attenuation trend after passing through a higher-order high-pass filter. Figure 4 As shown, the prolonged oscillation and attenuation process of a DC signal after passing through a high-pass filter can affect the algorithm decision unit of the PIR signal conditioning circuit, causing misjudgments.

[0056] The effectiveness of the device of the present invention was tested below. The oscillation attenuation of the DC signal filtered by the conventional PIR signal conditioning circuit is shown in the figure below. Figure 4 As shown, the original high-pass filter in the PIR signal conditioning circuit takes approximately 5 seconds to filter the DC signal, while the PIR signal conditioning circuit using the present invention achieves faster oscillation attenuation when filtering the DC signal. Figure 5 As shown, with the solution of this invention, the PIR signal conditioning circuit can complete the filtering of DC signal in as little as 0.5 seconds, which greatly speeds up the DC filtering time and improves the system startup speed. At the same time, it can simplify the decision algorithm used by the back-end decision circuit, reduce system cost, minimize the impact of DC signal oscillation attenuation on the decision unit of the subsequent algorithm of the PIR signal conditioning circuit, and the high-pass filter coefficient for filtering DC mentioned in this invention can be configured and adjusted according to the application.

[0057] This invention also relates to a method for rapidly filtering DC signals for PIR sensors, corresponding to the aforementioned apparatus for rapidly filtering DC signals for PIR sensors. It can be understood as a method for implementing the aforementioned apparatus for rapidly filtering DC signals for PIR sensors, comprising the following steps:

[0058] The DC detection step involves receiving a digital signal from a PIR sensor and calculating the DC component of the received digital signal using a time-domain expression of a low-pass filter. The calculation result of the DC component is then subjected to hard decision processing through several pre-set levels to obtain a hard decision processing result. Each level has a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number. The hard decision processing result is obtained by matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval.

[0059] The high-pass filter coefficient calculation steps include storing several data sets corresponding to the high-pass filter. Each data set includes different gear numbers set based on the zero-pole cumulative trial method, the corresponding high-pass filter cutoff frequency, and the high-pass filter coefficients containing the numerator and denominator polynomial coefficients of the high-pass filter's Z-domain transfer function. The hard decision processing result of the DC component obtained in the DC detection step is matched with the gear number of the stored data set to obtain the high-pass filter coefficient corresponding to that gear number.

[0060] In the signal delay step, a synchronous FIFO circuit is used to receive the digital signal from the PIR sensor and perform delay processing on it, and the delay time is the same as the DC component calculation process time in the DC detection step.

[0061] The high-pass filter data processing step involves using the high-pass filter coefficients obtained from the high-pass filter coefficient calculation step, combined with the time-domain expression of the high-pass filter Z-domain transfer function, to filter the digital signal of the PIR sensor after the signal delay step to obtain the PIR filtered signal, which is then used by the subsequent algorithm decision unit of the PIR signal conditioning circuit.

[0062] Preferably, the DC detection step uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz; the preset range has 4 to 64 ranges, and the preset range can be adjusted. The more ranges set, the more complex the hardware implementation will be, and the higher the detection and filtering accuracy of the DC signal will be.

[0063] Preferably, the DC detection step pre-sets 7 levels with corresponding incremental DC component thresholds, dividing the system into 8 level intervals numbered 0 to 7. When the calculated result of the DC component is less than the threshold of the first level, it belongs to the first level interval, and its level number is output as 0. When it is greater than or equal to the threshold of the first level but less than the threshold of the second level, it belongs to the second level interval, and its level number is output as 1, and so on. When the calculated result of the DC component is greater than or equal to the threshold of the seventh level, it belongs to the eighth level interval, and its level number is output as 7.

[0064] Preferably, the high-pass filter in the high-pass filter data processing step is a third-order IIR high-pass filter.

[0065] The present invention provides an apparatus and method for rapidly filtering DC signals for PIR sensors. It selects appropriate high-pass filter coefficients based on the estimated magnitude of the DC component. If the DC detection unit estimates a large DC component, a set of high-pass filter coefficients with a higher cutoff frequency and faster DC filtering is selected to filter out the DC signal. Combined with a signal delay unit, the filter coefficients loaded by the high-pass filter data processing unit are synchronized with the original signal in time, accelerating DC filtering, reducing the oscillation attenuation of the DC signal, and decreasing the DC signal filtering time. This minimizes the impact of DC signal oscillation attenuation on the subsequent algorithm decision unit of the PIR signal conditioning circuit, thereby reducing misjudgments. Furthermore, it has advantages such as simple hardware implementation, fewer resources, and the ability to configure and adjust the high-pass filter coefficients for DC filtering according to the application.

[0066] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail with reference to the accompanying drawings and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention. In short, all technical solutions and improvements that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention patent.

Claims

1. A device for rapidly filtering DC signals for PIR sensors, characterized in that, It includes a DC detection unit, a high-pass filter coefficient calculation unit, a signal delay unit, and a high-pass filter data processing unit, wherein the DC detection unit, the high-pass filter coefficient calculation unit, and the high-pass filter data processing unit are connected in sequence, and the signal delay unit is connected to the high-pass filter data processing unit; The DC detection unit receives the digital signal from the PIR sensor and calculates the DC component of the received digital signal using the time-domain expression of a low-pass filter. The calculation result of the DC component is then subjected to hard decision processing through several pre-set levels to obtain a hard decision processing result. Each level has a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number. The hard decision processing result involves matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval. The hard decision processing result of the DC component is then transmitted to the high-pass filter coefficient calculation unit. The high-pass filter coefficient calculation unit stores several data sets corresponding to the high-pass filter used by the high-pass filter data processing unit. Each data set includes different gear numbers set based on the zero-pole cumulative trial method, the corresponding high-pass filter cutoff frequency, and high-pass filter coefficients containing the numerator and denominator polynomial coefficients of the high-pass filter Z-domain transfer function. It receives the hard decision processing result of the DC component transmitted by the DC detection unit and matches it with the gear number of the stored data set to obtain the high-pass filter coefficient corresponding to that gear number. Then, it transmits the obtained high-pass filter coefficient to the high-pass filter data processing unit. The signal delay unit uses a synchronous FIFO circuit to receive the digital signal from the PIR sensor and delay it. The delay time is the same as the DC component calculation time in the DC detection unit. Then, the digital signal from the PIR sensor after the delay is transmitted to the high-pass filter data processing unit. The high-pass filter data processing unit receives the high-pass filter coefficients transmitted from the high-pass filter coefficient calculation unit and the delayed digital signal of the PIR sensor transmitted from the signal delay unit. Based on the received high-pass filter coefficients and combined with the time-domain expression of the high-pass filter Z-domain transfer function, the delayed digital signal of the PIR sensor is filtered to obtain a PIR filtered signal, which is then used by the subsequent algorithm decision unit of the PIR signal conditioning circuit.

2. The apparatus for rapidly filtering DC signals according to claim 1, characterized in that, The DC detection unit uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz.

3. The apparatus for rapidly filtering DC signals according to claim 1 or 2, characterized in that, The DC detection unit is pre-set with 7 gear levels and corresponding incremental DC component thresholds, divided into 8 gear intervals with corresponding gear numbers from 0 to 7. When the calculated result of the DC component is less than the threshold of the first gear level, it is the first gear interval and its gear number is 0. When it is greater than or equal to the threshold of the first gear level and less than the threshold of the second gear level, it is the second gear interval and its gear number is 1, and so on. When the calculated result of the DC component is greater than or equal to the threshold of the seventh gear level, it is the eighth gear interval and its gear number is 7.

4. The apparatus for rapidly filtering DC signals according to claim 1, characterized in that, The high-pass filter of the high-pass filter data processing unit is a third-order IIR high-pass filter.

5. The apparatus for rapidly filtering DC signals according to claim 4, characterized in that, The high-pass filter cutoff frequency range of each data group stored in the high-pass filter coefficient calculation unit is between 0.4Hz and 3.2Hz. The cutoff frequency is evenly divided within this range according to the number of data groups to serve as the high-pass filter cutoff frequency value corresponding to the gear number in each data group. In each data group, the high-pass filter cutoff frequency corresponding to the gear number increases as the gear number increases. In the high-pass filter coefficients corresponding to the gear number, the zero-order coefficient of the denominator polynomial coefficients is 1, the first-order coefficients are negative and increasing, the second-order coefficients are positive and decreasing, and the third-order coefficients are negative and increasing. The zero-order coefficient of the numerator polynomial coefficients is positive and decreasing, the first-order coefficients are negative and increasing, the second-order coefficients are positive and decreasing, and the third-order coefficients are negative and increasing.

6. The apparatus for rapidly filtering DC signals according to claim 1, characterized in that, The DC component calculation process of the DC detection unit takes 1 to 3 seconds, and the delay time of the signal delay unit for the digital signal delay processing of the received PIR sensor is also the same as the DC component calculation process, which is 1 to 3 seconds.

7. A method for rapidly filtering DC signals suitable for PIR sensors, characterized in that, Includes the following steps, The DC detection step involves receiving a digital signal from a PIR sensor and calculating the DC component of the received digital signal using a time-domain expression of a low-pass filter. The calculation result of the DC component is then subjected to hard decision processing through several pre-set levels to obtain a hard decision processing result. Each level has a corresponding DC component threshold. Based on the magnitude of the DC component threshold, each level interval has a sequentially ordered level number. The hard decision processing result is obtained by matching the calculation result of the DC component with the DC component threshold of each level to obtain the level number of the corresponding level interval. The high-pass filter coefficient calculation steps include storing several data sets corresponding to the high-pass filter. Each data set includes different gear numbers set based on the zero-pole cumulative trial method and the corresponding high-pass filter cutoff frequency, as well as the high-pass filter coefficients containing the numerator polynomial coefficients and denominator polynomial coefficients of the high-pass filter Z-domain transfer function. The hard decision processing result of the DC component obtained from the DC detection step is matched with the gear number of the stored data group to obtain the high-pass filter coefficient corresponding to the gear number. In the signal delay step, a synchronous FIFO circuit is used to receive the digital signal from the PIR sensor and perform delay processing on it, and the delay time is the same as the DC component calculation process time in the DC detection step. The high-pass filter data processing step involves using the high-pass filter coefficients obtained in the high-pass filter coefficient calculation step, combined with the time-domain expression of the high-pass filter Z-domain transfer function, to filter the digital signal of the PIR sensor after the signal delay step to obtain the PIR filtered signal, which is then used by the subsequent algorithm decision unit of the PIR signal conditioning circuit.

8. The method for rapidly filtering DC signals according to claim 7, characterized in that, The DC detection step uses a first-order IIR low-pass filter with a cutoff frequency of 0.2Hz; the preset range has 4 to 64 ranges.

9. The method for rapidly filtering DC signals according to claim 8, characterized in that, The DC detection step is pre-set with 7 gear levels and corresponding incremental DC component thresholds, divided into 8 gear intervals with corresponding gear numbers from 0 to 7. When the calculated result of the DC component is less than the threshold of the first gear level, it is the first gear interval and its gear number is output as 0. When it is greater than or equal to the threshold of the first gear level and less than the threshold of the second gear level, it is the second gear interval and its gear number is output as 1, and so on. When the calculated result of the DC component is greater than or equal to the threshold of the seventh gear level, it is the eighth gear interval and its gear number is output as 7.

10. The method for rapidly filtering DC signals according to any one of claims 7 to 9, characterized in that, The high-pass filter used in the high-pass filter data processing step is a third-order IIR high-pass filter.

Citation Information

Patent Citations

  • Modulation-demodulation type current sensor

    CN103487631A

  • Control circuit and control method of flexible direct current power transmission system

    CN114865684A