A Setup for Measuring the Centering Error of a Dual-Element Pyroelectric Infrared Sensor Module

This paper presents an experimental setup to measure the horizontal centering error of a pre-built pyroelectric infrared (PIR) sensor module, in which a dual-element PIR sensor is aligned at the focal point of a single-zone Fresnel Lens. In the setup, the sensor module was placed facing a modulated infrared radiating source and turned over a range of horizontal angles. The position of the optical axis of the sensor module was determined based on the analysis of the output response of the sensor at turned angles. Thus, the horizontal centering error of the module is defined as the difference between the mechanical axis of the housing and the found optical axis. For the prebuilt sensor module, with the specific available equipment, the measurement of the centering error of the module achieved a resolution of 0.02 degrees.


Introduction
The Pyroelectric Effect, in which a temperature change in a specific material leads to an output of an electric charge, has been known about for a long time [1]. PIR sensors, which work based on the pyroelectric effect, are featured with their ability to detect intrusions from specific heat sources in their fields of view (FOV) [2]. In practical applications, the PIR sensor is usually assembled with a Fresnel lens-a flat, converted type of plano-convex lens [3]-which plays a role of the objective in order to concentrate infrared (IR) radiation emitted from a heat source onto the sensor surface and, as a result, to magnify the output signal of the sensor. Furthermore, it is worth noting that the dual-element PIR sensor type is used for the purpose of reducing the effect of background temperature change on its output signal [4]. The sensor and the lens usually work in the mid-infrared wavelength range. Therefore, such assembly of the sensor and the lens should be considered as a non-imaging Electro-Optical (EO) system.
Many works have used such PIR sensor modules for various purposes; for example, in commercial applications such as detecting human motion, indoor human tracking and localization [5][6][7], vehicle traffic [8], or even fire alarms [9], etc. In particular, in relation to our recent work [10], a roadside system consisting of two PIR sensor modules, which are supposed to be parallel to each other, was constructed for measuring the speeds of passing vehicles. The layout of our measurement system is illustrated in Figure 1, whereby the moving vehicle's speed is defined by the length of the time delay between two output signals of those sensor modules when the vehicle passes across their FOV. In such a measurement system, the parallelism of the optical axes of the two sensor modules is critical for the measurement result, as the vehicles may travel at various distances from the measurement system. With the concern of determining the position of the heat source Figure 1. Description of the layout of the vehicle speed measurement system using two PIR sensor modules [10].
However, it should be noted that there are very few works using PIR sensor modules that are concerned with the actual FOV and optical axis of the sensor modules. For example, Kastek et al. [11] made a test bed for the evaluation of the angular characteristics of their PIR sensor module by measuring the response of the sensor to a well-controlled moving heat source-a wire heater-across the sensor's FOV. In another work for indoor human tracking using PIR sensors [4], the authors briefly describe their method to determine the FOV of the sensor, where an incandescent bulb played the role of the heat source, and a chopper was used to modulate infrared radiation to the sensor. Nonetheless, the problem of the centering error of the PIR sensor module has still not been thoroughly resolved, and its analysis should be conducted carefully.
Moreover, the definitions of the optical axis and, consequently, centering error of a PIR sensor module seem to be difficult to find in the literature. According to [12], the centering error is the angle between the mechanical axis and the optical axis; however, the definition of the optical axis in the same document cannot be applied for EO systems such as the PIR sensor module. Fortunately, Krzysztof Chrzanowski provided a proper definition of the optical axis for non-imaging EO systems [13]: the "optical axis of a non-imaging EO system (IR seeker, receiver of laser seeker, receiver of laser range finder, receiver of laser communication system) is a line that connects the center of the discrete optical detector, the center of a thin lens equivalent to system optics, and a point in the target plane that is the center of the FOV of such a system". Therefore, in this research, in order to measure the horizontal centering error of the PIR sensor module, we used the definition of an optical axis of the PIR sensor module, demonstrated in Figure 2, which also follows the definition proposed by Krzysztof Chrzanowski for general non-imaging EO systems. However, it should be noted that there are very few works using PIR sensor modules that are concerned with the actual FOV and optical axis of the sensor modules. For example, Kastek et al. [11] made a test bed for the evaluation of the angular characteristics of their PIR sensor module by measuring the response of the sensor to a well-controlled moving heat source-a wire heater-across the sensor's FOV. In another work for indoor human tracking using PIR sensors [4], the authors briefly describe their method to determine the FOV of the sensor, where an incandescent bulb played the role of the heat source, and a chopper was used to modulate infrared radiation to the sensor. Nonetheless, the problem of the centering error of the PIR sensor module has still not been thoroughly resolved, and its analysis should be conducted carefully.
Moreover, the definitions of the optical axis and, consequently, centering error of a PIR sensor module seem to be difficult to find in the literature. According to [12], the centering error is the angle between the mechanical axis and the optical axis; however, the definition of the optical axis in the same document cannot be applied for EO systems such as the PIR sensor module. Fortunately, Krzysztof Chrzanowski provided a proper definition of the optical axis for non-imaging EO systems [13]: the "optical axis of a non-imaging EO system (IR seeker, receiver of laser seeker, receiver of laser range finder, receiver of laser communication system) is a line that connects the center of the discrete optical detector, the center of a thin lens equivalent to system optics, and a point in the target plane that is the center of the FOV of such a system". Therefore, in this research, in order to measure the horizontal centering error of the PIR sensor module, we used the definition of an optical axis of the PIR sensor module, demonstrated in Figure 2, which also follows the definition proposed by Krzysztof Chrzanowski for general non-imaging EO systems. The challenge of determining the position of the optical axis for a prebuilt PIR sensor module is that the module is a non-imaging EO system; thus, the only data are the output voltage signals over time. In addition, there are also many noise sources, such as unex-  The challenge of determining the position of the optical axis for a prebuilt PIR sensor module is that the module is a non-imaging EO system; thus, the only data are the output voltage signals over time. In addition, there are also many noise sources, such as unexpected radiation noise, Johnson noise, amplifier noise, etc. [1], that might affect the output signal of the sensor. Therefore, a setup for measuring the centering error of a PIR sensor module should be built based on the working principle of PIR sensor and the definition of the optical axis of the module. Moreover, the setup should obtain appropriate measurement sensitivity to define the position of the optical axis of the module with a desired resolution, regarding the presence of noises.
The aim of this study is to construct an experimental setup for defining the position of the optical axis and the centering error. In this setup, an infrared radiation source modulated at a specific frequency is presented and the analysis for parameter settings to enhance the measurement sensitivity is described. The centering error of the PIR sensor module was determined through the sensor output response to the modulated heat source.
Thus, the consecutive sections are constructed as follows. Section 2 describes the working principle of the PIR sensor module which are similar/popular. Section 3 presents the measurement setup with the analysis that points out specific setting parameters that would assist the measurement sensitivity. Section 4 supports the reliability of the proposed setup by providing practical measurements for two PIR sensor modules with specific signal processing methods.

Dual-Element PIR Sensor Module
The housing of the dual element PIR sensor module was made based on a mechanical design ( Figure 3) in order to assemble a Fresnel lens, a dual-element PIR sensor, and electronic board for processing the sensor's output signal. The lens used in the module was a single-zone Fresnel lens F50.9 from KUBE Electronics AG [14], which played the role of an objective for the EO system. The dual-element PIR sensor was an IRA-S230ST01 sensor from Murata Manufacturing Co., Ltd [15]. Both the sensor and the lens worked with the infrared wavelength range of 5 µm ÷ 15 µm, which features the surface temperature range of −80 • C ÷ 300 • C, due to the Wein displacement law [16]. The PIR sensor was supposed to be placed at the focal point of the Fresnel lens (f = 50.9 mm). Such an alignment has appeared in most applications of PIR sensors.  According to this description of the module, a centering error may occur due to various reasons, such as: Imperfection of the curve of the lens, due to the lens being manufactured as plastic; Asymmetry of the sensor; Imperfect placement of the lens and sensor onto the housing. Before describing the setup that was necessary to build, the way in which the specific PIR sensor works should be considered. A dual-element PIR sensor contains two sensing elements that have the same active rectangular areas placed on the same plane, which are systematic regarding the axis of the sensor surface ( Figure 4). The formulas that explain how a PIR sensor converts incident radiation into an electrical signal can be found in var- According to this description of the module, a centering error may occur due to various reasons, such as: Imperfection of the curve of the lens, due to the lens being manufactured as plastic; Asymmetry of the sensor; Imperfect placement of the lens and sensor onto the housing. Before describing the setup that was necessary to build, the way in which the specific PIR sensor works should be considered. A dual-element PIR sensor contains two sensing elements that have the same active rectangular areas placed on the same plane, which are systematic regarding the axis of the sensor surface ( Figure 4). The formulas that explain how a PIR sensor converts incident radiation into an electrical signal can be found in various literature [2,17]. Overall, the formula of its transfer function in the Laplace domain is found as: where ∆Φ-difference of incident radiation powers to two active sensing elements; V doutput voltage of the sensor; τ Th and τ e -thermal and electric time constants that are the main characteristics of the sensor; K d -the sensor's amplifier gain. The time constants' values are usually in the range of a few hundredths of a second to a few seconds, while the amplifier gain is about a few thousand [4].  Based on the definition of the optical axis for the EO system mentioned in Section 1, and the working nature of the dual-element PIR sensor that is featured in Equation (2), due to the differential component of the transfer function, the following several consequences were taken into consideration:  If the IR radiation power emitted from sources within the two FOVs of PIR sensing elements is equal all the time, the output voltage amplitude of the sensor module will be zero in an ideal condition (without any noises), or insignificant in reality (with the presence of noises);  Even in the case that the IR radiation powers emitted from sources within two FOVs are unequal due to their differential component in the transfer function, if the difference in quality between those powers is settled, then the output voltage amplitude will settle to zero in ideal conditions (without noises), or insignificant in real conditions (with noises).
According to those observations for dual element PIR sensor module, a setup for measuring the position of the optical axis of the module based on a modulated infrared radiation source has been built and it is described in the below section.

The Proposed Idea
The practical setup mentioned in this work was focused on measuring the horizontal position of the optical axis of the EO system (i.e., the PIR sensor module) and contained three particular components ( Figure 5): 1. A graybody heat source with a rectangular heating surface, which was intended to be a Lambertian surface; 2. An optical shutter that was designed and made by our research team, with a rectan- For the prebuilt PIR sensor module, an external conditioning circuit was built to amplify the sensor's output voltage and filter the voltage signal within a specific frequency bandwidth. Assuming that the frequency bandwidth is large enough to contain the working frequency bandwidth of the sensor (depending on its time constants), the transfer function of the whole circuit can be written as: where K a -amplifier gain of the conditioning circuit. As can be seen from Equation (2), the output voltage signal of the module characterizes the changing rate of the difference of the incident radiation power to the two sensing elements. On the other hand, the incident radiation power is defined by the heat source within the FOV of each sensing element. When the sensor is aligned at the focal point of the lens, it creates two separate fields of view, corresponding to two sensing elements. The two FOVs are also symmetrical in regard to the optical axis of the sensor module.
Based on the definition of the optical axis for the EO system mentioned in Section 1, and the working nature of the dual-element PIR sensor that is featured in Equation (2), due to the differential component of the transfer function, the following several consequences were taken into consideration:

•
If the IR radiation power emitted from sources within the two FOVs of PIR sensing elements is equal all the time, the output voltage amplitude of the sensor module will be zero in an ideal condition (without any noises), or insignificant in reality (with the presence of noises); • Even in the case that the IR radiation powers emitted from sources within two FOVs are unequal due to their differential component in the transfer function, if the difference in quality between those powers is settled, then the output voltage amplitude will settle to zero in ideal conditions (without noises), or insignificant in real conditions (with noises).
According to those observations for dual element PIR sensor module, a setup for measuring the position of the optical axis of the module based on a modulated infrared radiation source has been built and it is described in the below section.

The Proposed Idea
The practical setup mentioned in this work was focused on measuring the horizontal position of the optical axis of the EO system (i.e., the PIR sensor module) and contained three particular components ( Figure 5):

1.
A graybody heat source with a rectangular heating surface, which was intended to be a Lambertian surface; 2.
An optical shutter that was designed and made by our research team, with a rectangular pinhole and moving shield which was motorized by a stepper motor controlled by an embedded microsystem; 3.
A fixture kit that is based on a manual optical micro-stage, specifically for mounting the sensor module. The micro-stage was able to turn the sensor module around the vertical axis with a resolution of 0.02 degrees.  The three components were aligned on an axis that coincided with the mechanical axis of the sensor module when the module was positioned at a reference angle ( Figure  5). The opened area of the pinhole that allowed IR from the graybody to pass through was controlled by the shield, whose movement was controlled by a program on the microsystem. Therefore, the IR radiation power released from the graybody, and incident to the surface of the sensor module was considered to be modulated. Therefore, by adjusting the angular position of the sensor module, once the pinhole was symmetrical around the optical axis of the module, the IR radiation powers in the FOVs of the two sensing elements were equal, regardless of the motion of the shield, and, as a consequence, the amplitude of the output signal stayed at zero in an ideal condition or was insignificant with noises in reality. On the other hand, if the symmetry condition was violated, the output signal would contain a part that has a fundamental frequency similar to the frequency of the field's motion. The below analysis describes how significant the amplitude of the output signal is regarding the angular position of the optical axis. The three components were aligned on an axis that coincided with the mechanical axis of the sensor module when the module was positioned at a reference angle ( Figure 5). The opened area of the pinhole that allowed IR from the graybody to pass through was controlled by the shield, whose movement was controlled by a program on the microsystem. Therefore, the IR radiation power released from the graybody, and incident to the surface of the sensor module was considered to be modulated. Therefore, by adjusting the angular position of the sensor module, once the pinhole was symmetrical around the optical axis of Sensors 2021, 21, 6684 6 of 12 the module, the IR radiation powers in the FOVs of the two sensing elements were equal, regardless of the motion of the shield, and, as a consequence, the amplitude of the output signal stayed at zero in an ideal condition or was insignificant with noises in reality. On the other hand, if the symmetry condition was violated, the output signal would contain a part that has a fundamental frequency similar to the frequency of the field's motion. The below analysis describes how significant the amplitude of the output signal is regarding the angular position of the optical axis.

Analysis for Measurement Sensitivity
The optical axis of the sensor module was positioned at an angle of θ, horizontally relative to the axis of symmetry of the pinhole ( Figure 6) that was placed at a distance of R from the sensor module. Due to the assumption that the radiating source surface is Lambertian, i.e., the radiating energy is equal in all directions, the incident power to each sensing element was calculated as [18]: here: T s -heat source surface temperature; A s.k -the opened area of the pinhole (that lets through infrared radiation from the heat source) within the field of view of the sensing element number k; T b-ambient background temperature; A b.k -the covered area of the pinhole and the background area within the field of view of the sensing number k; A l -the surface area of the lens, equal to πD 2 /4, with D-diameter of the lens surface. R-distance from the source to the sensor module; L(T s ), L(T b )-Lambertian functions of the blackbody surface and background temperatures measured in K degrees, defined as definite integrals [16]: here, (λ 1 , λ 2 ) [µm]-working infrared wavelength range of the Fresnel lens and PIR sensing elements; η(λ)-attenuation due to the atmosphere; ε(λ)-the emissivity of the heat source object; τ(λ)-the infrared transmittance of the Fresnel lens; c 1 and c 2 are constants as:  Accordingly, the difference of the incident infrared powers to the two pyroelectric sensing elements was determined as: Accordingly, the difference of the incident infrared powers to the two pyroelectric sensing elements was determined as: In the case when the angle θ was significantly small, the differences of the areas mentioned in Equation (5) were estimated as ( Figure 6): where h R is the vertical size of the opened area of the pinhole that does not exceed the value of h e ·R/f with h e -vertical dimension of one sensing element; f -focal length of the objective. The value of h R is a function over time whose value depends on the shield's motion. Supposing that the function is a harmonic one, with the amplitude H equal to h e ·R/f, then: here, t-time variable, f m -modulation frequency. Thus, the difference in infrared flux ∆Φ is also a function over time, which can be specified as: With such input radiation power, based on the transfer function represented in Equation (8), the output signal would have the formula: with V 0 -peak voltage amplitude; ϕ(t)-phase shift. The voltage amplitude is defined as: where ω m = 2πf m is the angular modulation frequency. Thus, if the peak voltage amplitude could be measured, the sensitivity of the measurement system would be: The approximation in Equation (11) is held if the value of θ is significantly small. Therefore, the value of the gradient |∂V 0 /∂θ| that features the measurement sensitivity, can be modified by choosing the following parameters: circuit amplifier K d , background temperature T b , heat source surface temperature T s , and the modulation frequency f m . It should be noted that even if an increase in the circuit amplifier led to an increase in the gradient |∂V 0 /∂θ|, it could also increase the noise in the output signal. Moreover, interestingly, the dimensions of the pinhole did not affect the measurement sensitivity, so that they only needed to satisfy the following conditions: where w e -horizontal dimension of sensing element; w g -width of the horizontal gap between two sensing elements; W p -horizontal dimension of the pinhole; H p -vertical dimension of the pinhole. From this, we were able to simulate some results by setting the parameters properly. Table 1 gives the values of the parameters needed for the simulation study (it should be mentioned that the given parameters are similar to the real ones): In particular, in Table 1, the value of the background temperature T b is preset at 298 K degrees or 25 Celsius degrees. The values of heat source surface temperature T s and modulation frequency f m will vary for examining the output signal amplitude. Figure 7 interprets the dependence of the measurement sensitivity |∂V 0 /∂θ| on the heat source surface temperature T s and modulation frequency f m . It should be pointed out that that the more surface temperature there is, the more IR radiation power is emitted; thus, the measurement sensitivity will increase when the value of the heat source surface temperature T s increases. Furthermore, the sensitivity will peak when the modulation frequency f m is of (τ Th · τ e ) −1/2 /2π. thus, the measurement sensitivity will increase when the value of the heat source surface temperature Ts increases. Furthermore, the sensitivity will peak when the modulation frequency fm is of (τTh • τe) -1/2 /2π. The analysis and simulation result above provided clues to improve the performance of the setup. The following section shows the experimental result of measuring the centering error of the prebuilt PIR sensor module. The analysis and simulation result above provided clues to improve the performance of the setup. The following section shows the experimental result of measuring the centering error of the prebuilt PIR sensor module.

Experimental Result
For conducting experiments to measure the centering error of the prebuilt PIR sensor module, a STM32L476 microcontroller kit was used to sample the sensor's output voltage signal with a sampling rate f S of 2000 samples per second, and for transmitting the digitalized data to a computer for further analysis. The heat source temperature was set at T s = 321 K (48 • C), while the background temperature was set at T b = 298 K (25 • C). In order to make the modulation as well as the control program for the stepper motor more accessible, the motion of the shield was controlled as a triangular function over time instead of a harmonic one, with the modulation frequency f m = 0.69 Hz for a period of 1.44 s, and the height amplitude of the opened area at H = 40 mm. The heat source temperature was limited due to the available equipment, while the modulation frequency should be set close to the optimal value of (τ T · τ e ) −1/2 /2π. At each time of measurement, the sensor module was fixed at a horizontal angular position, which was varied every 0.02 degrees by the help of the micro-stage. The output voltage signal of the sensor module was monitored and acquired over a constant duration of time that contained ten periods of the shield motion. Figure 8 illustrates an example of the output voltage signal of a sensor module at different turned angles.
where N-number of samples within the monitored duration; V(t) -output voltage at moment t; and tk (k=1..N)-discrete moments sampled within the duration. For method #2, the magnitude of the signal at the frequency at the modulation frequency was estimated using the Discrete Fourier Transform for the series {V(tk) }k=1…N : Due to the non-harmonic input and the presence of noises, instead of dealing with the signal amplitude, other quantities (such as signal power, signal magnitude) were taken into consideration. Thus, the determination of the position of the optical axis was found based on one (or both) of two proposed methods: For method #1, the PSD of the output signal is defined discretely as: where N-number of samples within the monitored duration; V(t)-output voltage at moment t; and t k (k = 1 . . . N)-discrete moments sampled within the duration. For method #2, the magnitude of the signal at the frequency at the modulation frequency was estimated using the Discrete Fourier Transform for the series {V(t k )} k=1 . . . N : At a glance, the two methods would have taken a similar calculation complexity over N multiplications. While method #1 appeared simple, method #2 may have given a better result due to the elimination of noises at other frequencies than the modulation frequency.
A number of measurements of the optical axis position at various turned angles have been conducted repeatedly for two (02) PIR sensor modules. Table 2 shows the result of their optical axis position using the two proposed signal processing methods. The values of quantities P and M presented in Table 2 are calculated as averages of measurement results from 10 measurements at each single turned angle.  Figure 9 illustrates the normalized curves of those functions over the specific range of turned angular positions.
Based on the data presented in Table 2, the two methods gave the same results when determining the angular positions of the optical axes of the two sensor modules relative to their mechanical axes. Thus, for sensor module #1, its horizontal centering error was determined to be +0.02, and for sensor module #2, −0.04. In order to evaluate the effectiveness of the proposed methods, one should notice the gradients of the curves at local points of the minimum.  Figure 9 illustrates the normalized curves of those functions over the specific range of turned angular positions. Figure 9. Experiment results of normalized PSD and magnitude at modulation frequency over different turned angles for two PIR sensor modules.
Based on the data presented in Table 2, the two methods gave the same results when determining the angular positions of the optical axes of the two sensor modules relative to their mechanical axes. Thus, for sensor module #1, its horizontal centering error was determined to be + 0.02, and for sensor module #2, − 0.04. In order to evaluate the effectiveness of the proposed methods, one should notice the gradients of the curves at local points of the minimum. For PIR sensor module #1, the gradients are 0.49 deg -2 and 2.97 deg -2 for the normalized P and M curves, respectively. For PIR sensor module #2, they are 0.77 deg -2 and 4.43 deg -1 , respectively.

Conclusions
A setup for defining the centering error of a PIR sensor module, which is considered to be an Electro-Optical system, has been presented in this paper. The setup was mainly built by constructing a modulated heat source that consisted of a standard radiating surface, and a shutter with a programmable motorized field. An analysis that addressed the setting conditions and parameters, which would support the measurement sensitivity, was also described in this study. Owing to the experimental results, method #2, using DFT, presented a more reliable result due to the local gradient of the peak. With the available equipment, measurements were conducted with a resolution of 0.02 degrees. Based on the proposed setup, the analysis, and the practical measurement results presented in this work, it is suggested that a more accurate measurement for the centering error of similar PIR sensor modules could be made in better conditions. Examples of these are: better thermal isolation for the whole setup, a higher heat source temperature, improved input modulation (in terms of frequency, to make it closer to the optimal frequency, as well as waveform), more accurate and higher-resolution turning equipment, etc. Funding: This work was supported by the Centennial SIT Action for the 100th anniversary of Shibaura Institute of Technology to enter the top ten Asian Institute of Technology.