Next Article in Journal
Petrophysics Parameter Inversion and Its Application Based on the Transient Electromagnetic Method
Previous Article in Journal
Mapping the mHealth Nexus: A Semantic Analysis of mHealth Scholars’ Research Propensities Following an Interdisciplinary Training Institute
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Evaluation of Correlation-Based Methods for Time Period Estimation in Vehicle Speed Measurement Using Pyroelectric Infrared Sensors

1
Precision Engineering & Smart Measurement Lab, School of Mechanical Engineering, Hanoi University of Science and Technology, No 1 Dai Co Viet Street, Hanoi 100000, Vietnam
2
Faculty of Information Technology, University of Transport Technology, No 54 Trieu Khuc Street, Hanoi 100000, Vietnam
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(11), 6255; https://doi.org/10.3390/app15116255
Submission received: 26 April 2025 / Revised: 28 May 2025 / Accepted: 30 May 2025 / Published: 2 June 2025
(This article belongs to the Special Issue Diagnostic Methodology and Sensors Technologies: 2nd Edition)

Abstract

:
Accurate time period estimation (TPE) between sensor signals is essential for vehicle speed measurement in intelligent transportation systems (ITSs). In this context, we focus on time period estimation using signals acquired from a dual pyroelectric infrared (PIR) sensor setup. To estimate the time period between these signals, this paper analyzes and compares two correlation-based methods—conventional cross-correlation (CCF) and Hilbert transform-enhanced cross-correlation (CCFHT). An analytical framework is developed to quantify the bias and variance of each method under practical conditions, including sensor mismatch and noise. The PIR sensor signals are modeled based on their dynamic response characteristics, enabling theoretical analysis supported by simulations and field experiments. Results show that although both methods yield negligible bias under ideal conditions, CCFHT significantly reduces estimation variance in noisy or mismatched scenarios. These findings confirm the advantages of CCFHT for achieving robust and precise vehicle speed estimation using low-cost PIR sensor systems, and provide insights into practical deployment within ITSs.

1. Introduction

1.1. Background

Accurate and reliable vehicle speed measurement is a fundamental component of intelligent transportation systems (ITSs), serving critical applications such as traffic flow analysis, congestion monitoring, incident detection, and automated enforcement [1]. Among the commonly used methods for speed measurement, time delay in the literature [2,3,4]) estimation (TPE) between two spatially separated sensors remains one of the most intuitive and robust strategies, especially for point-based systems [5,6]. This approach estimates the travel time of a vehicle between two sensor units to compute speed from the known baseline distance. However, the performance of TPE critically depends on the quality and consistency of the signals acquired from both sensors.
Various technologies have been employed for vehicle detection and TPE, including radar, LiDAR, magnetic loops, and video cameras [7,8,9,10]. These methods, which are supposed to be accurate, often suffer from high deployment costs, power demands, or environmental limitations. In contrast, pyroelectric infrared (PIR) sensors provide a low-cost, passive, and energy-efficient alternative, particularly suited for scenarios where minimal infrastructure is preferred or energy constraints exist [11,12].
PIR sensors detect changes in infrared radiation, typically emitted by heating objects such as vehicles when they pass through the sensors’ fields of view (FOV) and convert them into electrical signals. When a group of two or more PIR sensors are placed along a lane at a known distance apart, the time period or time interval between their response signals can be used to estimate vehicle speed. Despite their simplicity, PIR-based speed measurement systems face several challenges for TPE: variability in sensor response time due to differing thermal or electrical time constants; environmental noise and reflections, which degrade the signal-to-noise ratio; limited temporal resolution, which hinders precision in fast or closely spaced events.
These challenges lead to the need for a deeper understanding of how sensor imperfections and signal characteristics affect the accuracy of TPE, particularly through systematic error analysis.

1.2. Related Work

Time period or time delay estimation has been widely studied in applications such as radar, seismology, audio processing, and biomedical signal analysis [13,14,15]. The conventional cross-correlation function (CCF) remains one of the most popular methods for estimating the time shift between signals [16,17,18]. However, it is known to be sensitive to noise, signal distortion, and amplitude variations, which may reduce accuracy in practical implementations [19,20]. To address these issues, enhanced methods such as CCF enhanced with Hilbert transform (CCFHT) have been proposed, leveraging the analytic signal representation to improve phase alignment and robustness [21,22,23]. These methods offer a balance between computational efficiency and improved estimation accuracy under noise conditions.
In the context of vehicular sensing, PIR sensors have been used in basic applications such as motion detection, vehicle counting, and lane occupancy. However, in most speed-related applications [11,12,24], the emphasis is often on straightforward delay measurement rather than a detailed analysis of signal behavior or estimation uncertainty. Even in our previous work [25], a prototype PIR-based speed measurement system was introduced, and speed was estimated using threshold and analog signal processing techniques. While the system demonstrated feasibility, it lacked a comprehensive evaluation of accuracy, bias, and variance in the time estimation process.
To the best of our knowledge, no prior study has systematically evaluated the application of correlation-based estimators—such as CCF and CCFHT—to PIR-based speed measurement systems under conditions involving sensor response mismatch and environmental noise. This gap motivates the need for a dedicated framework to analyze estimation performance in such systems.

1.3. Contributions

This paper focuses on evaluating the cross-correlation fFunction (CCF) and cross-correlation function with Hilbert transform (CCFHT) for TPE in PIR sensor-based vehicle speed measurement. The specific contributions of this work are as follows:
-
A detailed mathematical evaluation of conventional and enhanced cross-correlation methods for TPE.
-
An investigation into sensor response divergence and its effects on estimation accuracy.
-
A numerical analysis of system parameters—including bandwidth, signal-to-noise ratio (SNR), and sensor time constants—to assess their influence on time period estimation performance, complemented by limited experimental validation to compare the overall performance of CCF and CCFHT.
By integrating theoretical modeling, simulation, and real-world validation, this study provides practical insights into the performance and limitations of low-cost PIR-based vehicle speed sensing, laying the foundation for future ITS applications that require robust and lightweight estimation techniques.

2. Materials and Methods

This section presents the analytical and modeling framework developed to evaluate the bias and variance of time period estimation methods applied to PIR sensor signals. The objective is to provide a systematic and quantifiable analysis of how estimation errors are affected by sensor imperfections, signal characteristics, and system parameters. The structure of this section follows logical progression:
-
Section 2.1 introduces the general bias and variance analysis framework for zero-point estimators, derived mean value theorem, or Taylor expansion.
-
Section 2.2 describes the signal modeling of PIR sensors in the context of vehicle speed measurement, highlighting waveform characteristics and inter-sensor mismatches.
-
Section 2.3 and Section 2.4 apply the general framework to two specific correlation-based estimators—conventional cross-correlation function (CCF) and Hilbert-enhanced CCF (CCFHT)—to derive analytical expressions for their expected bias and variance under various conditions.

2.1. Analytical Framework for Bias and Variance Analysis of Estimators

In order to evaluate the estimation biases and uncertainties using traditional cross-correlation function and CCF combined with Hilbert transform, we employ the zero-point estimation analysis. Let J ( τ ) be the objective function and we have to find the zero point τ 0 such that J ( τ 0 ) = 0 , in the scene that the measured J ( τ ) might contain some noise. Suppose its estimated value is τ 0 ^ , using the mean value theorem, or similarly the Taylor expansion [26]:
0 = J ( τ 0 ^   ) = J ( τ 0 ) + ( τ 0 ^ τ 0   )   J   ( τ ξ )
for some τ ξ lying between τ 0 and τ 0 ^ . Thus:
( τ 0 ^ τ 0   )   J   ( τ ξ ) = J ( τ 0 ^   ) and   τ 0 ^ τ 0 2 × J   τ ξ 2 = J τ 0 2
In many practical cases, the objective function J ( τ ) is usually smooth around the point τ 0 (Figure 1), so that J τ J ( τ 0 ) , and accordingly, E [ J ( τ ) ] E [ J ( τ 0 ) ] for τ close to τ 0 . Here, denote E x to be the expected value of a random variable x. Thus:
E J τ 0 = E τ 0 ^ τ 0 J τ ξ   E τ 0 ^ τ 0 · E J τ 0 and   E [ J τ 0   2 ] = E [ τ 0 ^ τ 0 2 · J τ ξ 2 ] E [ τ 0 ^ τ 0 2 ] · E J τ 0 2
Consequently, the definition of bias and variance of the zero-point estimation are defined as:
b i a s   τ 0 ^ = E [ ( τ 0 ^ τ 0 ) ] E J τ 0 E J τ 0
v a r   τ 0 ^ = E [ τ 0 ^ τ 0 2 ] E J τ 0 2 E J ( τ 0 ) 2

2.2. PIR Signal Modeling for Time Period Estimation

To apply the above framework to vehicle speed estimation using PIR sensors, we model the signal behavior of the sensors as a vehicle passes through their fields of view. In this study, a vehicle speed measurement is designed using two pyroelectric infrared (PIR) sensor modules placed in a known geometric configuration (Figure 2a). The system is designed to minimize centering errors by ensuring the parallel alignment between the optical axes of the sensor modules and maintaining an accurate distance d between the FOV center axes of the sensors [27,28]. As a vehicle moves past these sensors, it causes changes in the sensors’ output signals, which are then analyzed to estimate time delay between the two signals and consequently to determine the speed of the moving vehicle (Figure 2b).
The fundamental principle behind this system is that the time period between the sensor outputs can be used to compute speed using the equation:
v = d / τ 0
where τ 0 is the time period between their output signals.
To analyze the performance of different TPE methods, we first define the mathematical representation of the signals. The two output signals of the PIR sensors over a monitoring window [0, T] can be modeled as x 1 ( t ) and x 2 ( t ) for 0 ≤ tT, where x 2 ( t ) is essentially a time-shifted version of x 1 ( t ) : x 2 t   ~   x 1 ( t τ 0 ) . Table 1 presents notations of several quantities related to PIR sensor signals that are used in this analysis.
In PIR sensor-based speed measurement, the differential infrared flux detected by the two sensing elements of each PIR sensor is denoted as a function over time ϕ ( t ) [29,30]. This flux variation is caused by the movement of a heat emitting object (vehicle) across the sensor’s FOV. If we define the differential flux from the object for the first sensor as ϕ ( t ) , the second sensor ϕ ( t τ 0 ) . As a moving heat source (e.g., a vehicle) passes through the sensor’s field of view (FOV), the incident infrared radiation varies over time, producing a structured alternating signal due to the differential sensing mechanism. Given that vehicles typically follow a consistent motion trajectory within the monitored region, the resulting ϕ ( t ) can be approximated as a sinusoidal signal within the observation window. This sinusoidal assumption is justified by the periodic nature of the sensor’s response to smoothly moving sources and enables a more tractable mathematical representation for time period estimation. Treating ϕ ( t ) as a sinusoid simplifies its frequency domain analysis, allows the use of Fourier-based techniques, and enhances computational efficiency in estimating time period via cross-correlation methods.
ϕ t = ϕ 0 · sin 2 π f 0 t Φ f = ϕ 0 2 j δ f f 0 ϕ 0 2 j δ f + f 0
Each PIR sensor operates as a linear system with a transfer function H i ( s ) and impulse response h i ( t )   ( i = 1 ,   2 ) (Figure 3). Consequently, output signals of the PIR sensors can be established in such a way that:
x 1 t = h 1 t ϕ t + n 1 t x 2 ( t ) = h 2 ( t ) ϕ ( t τ 0 ) + n 2 ( t τ 0 )
Using the Laplace transform, the system equations in the frequency domain can be written as:
X 1 f = H 1 f · Φ f + N 1 f X 2 ( f ) = H 2 f · Φ f + N 2 f e j 2 π f τ 0
For practical PIR sensor systems, the transfer function is often modeled as a second-order system [30,31]:
H i s = A i s 1 + τ t h . i s 1 + τ e . i s               f o r   i = 1,2
where parameters τ t h . i , τ e . i are thermal time constant and electric time constant and A i is the gain faction of each sensor i (i = 1, 2).
Noise in PIR sensors primarily arises from thermal fluctuations in the sensing elements, electronic noise in the amplification and filtering stages, environmental interferences from ambient temperature variations, etc. [6]. Assuming the noise signals n 1   ( t ) ,   n 2   ( t ) are white Gaussian noises within the working specific bandwidth [−B, B] of the sensors, they satisfy the following Equations (11)–(15), according to references [14,32,33].
1. Zero-mean:
E n 1 t = E n 2 t = 0 ;   E N 1 ( f ) = E N 2 ( f ) = 0
2. Independence:
E N 1 f 1 N 2 ( f 2 ) = 0
3. Variance:
v a r n 1 t = E n 1 t 2 = σ n 1 2 ;     v a r n 2 t = E n 2 t 2 = σ n 2 2
4. Power Spectral Densities:
S n 1 f = σ n 1 2 ;       S n 2 f = σ n 2 2
5. Correlated for identical frequencies:
E R e N 1 f 1 N 1 f 2 = E I m N 1 f 1 N 1 f 2 = σ n 1 2 . T 2 · δ f 1 f 2 + δ f 1 + f 2 E R e N 2 f 2 N 2 f 2 = E I m N 2 f 1 N 2 f 2 = σ n 2 2 . T 2 · δ f 1 f 2 + δ f 1 + f 2
where δ is the notation of the Dirac delta function.
These assumptions facilitate the derivation of analytical expressions for bias and variance in TPE. Further in this paper, it is the attempt to explore the effect of divergence between two responding systems of the PIR sensor modules on the biases and uncertainties of the estimations.

2.3. Bias and Variance Analysis with Conventional Cross-Correlation for TPE

Similarly, in many works, the very conventional approach to time period or time delay estimation between sensors’ output signals is using the crosscorrelation function which is defined as:
R x 1 x 2 τ = 0 T x 1 α x 2 τ α d α ; f o r T τ T
Thus, the time period is essentially estimated as:
τ 0 = arg max T τ T R x 1 x 2 τ
Let y 1 ( t ) = x 1 ( t ) ; y 2 ( t ) = x 2 ( t ) , thus:
y 2 t = h 2 t ϕ ( t τ 0 ) + n 2 t τ 0
and in the frequency domain:
Y 2 f = H 2 f · Φ f + N 2 f e j 2 π f τ 0 = H 2 f Φ f + N 2 f  
where C is the denotation of the conjugated complex number of a complex number C.
The cross-correlation function between the two signals x 1 ( t ) ,   x 2 ( t ) is then rewritten as:
R x 1 x 2 τ = 0 T x 1 α x 2 α + τ d α = 0 T x 1 α y 2 τ α d α = L ( τ )
w h e r e :   L τ = 0 T x 1 α y 2 τ α d α  
Equation (22) drives the Fourier transform of the function L ( τ ) , which is defined as:
X 1 f Y 2 f = H 1 f Φ f + N 1 f · H 2 Φ f + N 2 f e j 2 π f τ 0 = D 1 f + N 1 f D 2 f + N 2 f · e j 2 π f τ 0
Here, we denote the deterministic part of the output signal of each sensor in the frequency domain as:
D 1 f = H 1 f Φ f ; D 2 f = H 2 f Φ f and:   M f = D 1 f + N 1 f D 2 f + N 2 f
Therefore, L ( τ ) is the inverse Fourier transform of the function M f · e j 2 π f τ 0 :
L τ = 0 T x 1 α y 2 τ α d α = B B M ( f ) · e j 2 π f τ + τ 0 d f
Due to Equation (17), the following estimate is considered:
τ 0 ^ = arg max L τ   o r   τ 0 ^ = arg d d τ L τ = 0
Thus, the objective function is defined as J C C F ( τ ) = d d τ L ( τ ) . Now, we proceed with some calculations to apply the analysis mentioned in Section 2.1 for bias and variance estimation.
J C C F τ = j 2 π B B f . M f . e j 2 π f τ 0 τ d f
J C C F τ 0 = j 2 π B B f . M ( f ) d f
E J C C F τ 0 = j 2 π B B f . E M ( f ) d f
J C C F τ 0 2 = 4 π 2 B B B B f 1 f 2 . M f 1 M f 2 d f 1 d f 2
E J C C F τ 0 2 = 4 π 2   B B B B f 1 f 2 E M f 1 M f 2   d f 1 d f 2
J C C F τ = d d τ J C C F τ = 4 π 2 B B f 2 . M f e j 2 π f τ 0 τ d f
J C C F τ 0 = 4 π 2 B B f 2 . M f d f
E J C C F τ 0 = 4 π 2 B B f 2 . E J C C F τ 0 d f
Now, we use Equations (11)–(15) to explore the recent formulas, with the notation that D 1 f ,   D 2 f is zero for any f ± f 0 . To perform this, the term Δ f —the frequency resolution—is introduced to manage the effect of the Dirac delta function δ in an integral. The Dirac delta function is a mathematical idealization that assigns all energy at a single frequency, making direct integration problematic. To resolve this, Δ f serves as a small frequency resolution element, ensuring the integral remains finite and meaningful in numerical and practical applications. It ensures that computations remain stable and consistent with real-world signal analysis, where measurements always occur over discrete frequency bins [25,26]:
E J C C F τ 0 = π f 0 × I m   D 1 f 0 D 2 f 0 . Δ f
E J C C F τ 0 = 2 π 2 f 0 2 × R e   D 1 f 0 D 2 f 0 . Δ f
E J C C F τ 0 2 = 4 π 4 σ N 1 2 σ N 2 2 . f 0 4 Δ 2 f . S N R 1 . S N R 2 . cos 2 Θ 0
E J C C F τ 0 2 = 8 π 2 f 0 2 × I m 2 D 1 f 0 D 2 f 0 . Δ 2 f + 8 π 2 f 0 2 D 1 f 0 2 σ N 2 2 2 B T + D 2 f 0 2 σ N 1 2 2 B T . Δ 2 f + 8 B 3 π 2 3 σ N 1 2 2 B T σ N 2 2 2 B T Δ f
E J C C F τ 0 2 = 8 π 2 σ N 1 2 σ N 2 2 × { f 0 2 Δ 2 f × S N R 1 . S N R 2 . cos Θ 0 + f 0 2 2 B / T × S N R 1 + S N R 2 + B . Δ f 12 1 / T 2 }
The previous formulas also present Θ 0 as the argument of the complex number D 1 f 0 D 2   ( f 0 ) and also of H 1 f 0 H 2   ( f 0 ) ; and the signal-to-noise ratios, which present the ratio between the power spectral of the deterministic part over noise:
S N R 1 = B B D 1 f 2 d f B B N 1 f 2 d f = D 1 f 0 2 . Δ 2 f σ n 1 2 ; S N R 2 = B B D 2 f 2 d f B B N 2 f 2 d f = D 2 f 0 2 . Δ 2 f σ n 2 2
Therefore, by applying Formulas (4) and (5), the bias and variance of the estimation are derived as:
b i a s   τ 0 ^ C C F = E J C C F τ 0 E J C C F τ 0 = 1 2 π f 0 × I m   D 1 f 0 D 2 f R e   D 1 f 0 D 2 f 0 = tan Θ 0 2 π f 0
v a r   τ 0 ^ C C F = E J C C F τ 0 2 E J C C F τ 0 2 = = 2 π 2 f 0 2 × { tan 2 Θ 0 + 1 N d . cos 2 Θ 0 1 S N R 1 + 1 S N R 2 + B 2 N d . 6 f 0 2 × 1 S N R 1 . S N R 2 . cos Θ 0 }
where the number N d = 2 B Δ f defines the number of discrete frequency bins N d used in spectral analysis. This formulation arises from the necessity to sample the continuous frequency spectrum at discrete intervals, ensuring that all relevant signal components within the bandwidth are accounted for in the Fourier-based time period estimation. A finer frequency resolution ( Δ f ) increases N d , leading to improved accuracy in spectral estimation but also higher computational complexity. Conversely, a larger Δ f reduces N d , potentially impacting estimation precision. The choice of Δf thus balances the trade-off between resolution and efficiency, ensuring that the cross-correlation-based TPE method effectively captures the required spectral information while maintaining computational feasibility [23,34].
It is not difficult to see that, in ideal conditions, time constants of H 1 s ,   H 2 ( s ) coincide in such condition that τ 1 . t h = τ 2 . t h , τ 1 . e = τ 2 . e ; arg ( H 1 f ) = arg H 2 f ; then, Θ 0 = arg D 1 f 0 D 2 * f 0 = a r g H 1 f 0 H 2 * f 0 = 0 . In this case, the estimation has no bias: b i a s ( τ 0 ^ ) = 0 , and also:
v a r   τ 0 ^ C C F = 2 π f 0 2 × 1 N d × 1 S N R 1 + 1 S N R 2 + B 2 6 . N d . f 0 2 × 1 S N R 1 . S N R 2
In general cases, with the presence of Θ 0 , supposing S N R 1 and S N R 2 are significant, we may simplify:
v a r   τ 0 ^ C C F = 2 π f 0 2 × tan 2 Θ 0 + 1 N d . cos Θ 0 1 S N R 1 + 1 S N R 2
Equation (43) implies that, due to the differences between time constants from two transfer functions of two sensor modules, the bias of the estimator occurs, and the variance of the estimator also increases.

2.4. Bias and Variance Analysis with Cross-Correlation Function Combined with Hilbert Transform for TPE

Another approach that has been used in this study is applying Hilbert transform [17,23] to one of the output signals, specifically the second one:
x 2 t = 0 T x 2 α t α d α
The correlation function for signals x 1 t ,   x 2 t , which is also the specific target function, is now constructed as:
J C C F H T τ = R x 1 x 2 τ = 0 T x 1 α x 2 τ α d α ; T τ T
Unlike the CCF method, using the CCFHT method, the time period is estimated as the zero point of the new correlation function:
τ 0 = arg R x 1 x 2 τ = 0
The Fourier transform of the objective function is defined as [17]:
j . s i g n   f . X 1 f Y 2 f = j .   s i g n   f . D 1 f + N 1 f D 2 f + N 2 f · e j 2 π f τ 0 = j . s i g n   f M f
Then, the following equations can be proceeded:
J C C F H T τ = B B j . s i g n   f M f e j 2 π f τ 0 τ d f J C C F H T τ 0 = B B j . s i g n   f M f d f E J C C F H T τ 0 = 2 . I m D 1 f 0 D 2 f 0 . Δ f
J C C F H T τ = d d τ J C C F H T τ = 2 π B B f . s i g n f M f e j 2 π f τ 0 τ d f
J C C F H T τ = 2 π B B f . s i g n f E M f d f
E J C C F H T τ 0 = 4 π f 0 R e D 1 f 0 D 2 f 0 . Δ f E J C C F H T τ 0 2 = 16 π 2 f 0 2 . R e 2 D 1 f 0 D 2 f 0 . Δ 2 f = 16 π 2 f 0 2 . σ N 1 2 σ N 2 2 . 1 Δ 2 f × S N R 1 . S N R 2 cos 2 Θ 0
E J C C F H T τ 0 2 = 2 σ N 1 2 . σ N 2 2 . { S N R 1 . S N R 2 Δ 2 f . sin 2 Θ 0 + T 2 B · S N R 1 + S N R 2 + T 2 . Δ f 4 B }
The bias and variance of the estimation using the CCFHT method are defined:
b i a s τ 0 ^ C C F H T = E J C C F H T τ 0 E J C C F H T τ 0 = 1 2 π f 0 . tan Θ 0  
b i a s τ 0 ^ C C F H T = E J C C F H T τ 0 E J C C F H T τ 0 = 1 2 π f 0 . tan Θ 0  
Again, in the case of the time constants of H 1 s and H 2 ( s ) coinciding, it appears:
b i a s τ 0 ^ C C F H T = 0 v a r τ 0 ^ C C F H T = 1 8 π 2 f 0 2 1 B . S N R 1 + 1 B . S N R 2 + 1 B . S N R 1 . S N R 2
In general cases, supposing S N R 1 ,   S N R 2 are significant, we have:
v a r τ 0 ^ C C F H T 1 8 π f 0 2 tan 2 Θ 0   + 1 N d . cos 2 Θ 0   1 S N R 1 + 1 S N R 2  

3. Numerical Results and Experimental Validation

To validate the analytical framework and compare the performance of the two correlation-based estimators, this section presents numerical results alongside field experiments. The outcomes provide practical insight into how real-world uncertainties affect time period estimation for speed measurement in PIR-based systems.

3.1. Numerical Results

This section presents numerical results for time period estimation (TPE) in vehicle speed measurement using pyroelectric infrared (PIR) sensors. This study evaluates two methods: cross-correlation function (CCF) and cross-correlation function with Hilbert transform (CCFHT). The focus is on how sensor response mismatch, noise levels, and signal bandwidth affect the estimation accuracy. The parameters used in this work are presented in Table 2.
It should be noticed that, if the object is moving with the speed v at the distance D from the sensors, then the duration of the signal caused by the moving object to the sensor and the signal frequency are defined as:
T 0 = D w F + L v  
f 0 = 1 T 0 = v D w F + L  
On the other hand, once the bias and the variance of time period estimation are found, from (1), the bias and uncertainty of speed measurement due to the bias and variance of the TPE are also defined:
b i a s   v = v 2 d · b i a s τ 0  
u v = v 2 d · u τ 0 = v 2 d · v a r τ 0  
The numerical results are in the following figures. Figure 4, Figure 5 and Figure 6, which illustrate the effects of thermal time constant mismatch and object speed on TDE performance. Particularly, Figure 4 presents the influence of thermal time constant mismatch on the bias and variance of time period estimation. When the second sensor has a longer or shorter response time compared with the first, asymmetric signal shapes are produced, leading to a phase shift between the signals. Figure 5 shows that, while both methods are influenced, CCFHT maintains more stable variance across varying levels of sensor mismatch. In addition, Figure 6 also presents the impact of bandwidth B on TDE variance and speed measurement uncertainty using CCF.

3.2. Experimental Validation

To validate the numerical results, a practical experiment was conducted using real traffic vehicles under field conditions. The measurement system employed two PIR sensor modules arranged in a linear configuration with a fixed spacing of 1 m, as shown in Figure 2a. The sensors were mounted at a height of approximately 1.5 m above ground level and aligned horizontally along the direction of vehicle movement (Figure 2b). The distance from the measurement system to the vehicle movement line varied from 5 to 15 m. The axes of the sensors were adjusted to maintain their parallelism, as shown in our previous works [27,28].
The analog output of each PIR sensor was digitized using a data acquisition module based on a microcontroller STM32L476RG [35] and sampled at 1024 Hz. A high-speed camera (200 fps) was simultaneously used as a reference measurement system, enabling the extraction of ground truth vehicle speeds by tracking vehicle position across successive video frames.
A total of about 100 random vehicles, including cars and motorcycles, with different traveling speeds ranging from 20 to 100 km/h, were recorded. The time period between the sampled output signals of the two PIR sensors was extracted using both the conventional cross-correlation function (CCF) and the Hilbert transform-enhanced cross-correlation function (CCFHT). The estimated vehicle speeds were then calculated using the known distance between the sensors’ axes and compared against the camera-based reference.
The experimental results, shown in Figure 7, indicate that both methods provide reasonable estimates of vehicle speed with absolute estimation errors under 5 km/h over the speed range of 20 to 100 km/h; particularly, that the deviation between the estimated vehicle speed and the reference speed remains within 5% across the specific speed range when using the conventional cross-correlation method (CCF), and within 3.5% when using the Hilbert transform-enhanced cross-correlation method (CCFHT).

4. Discussion

4.1. Effect of Sensor Mismatch on Bias and Variance of Time Period Estimation

One of the primary factors affecting time period estimation (TPE) accuracy is the mismatch in the sensor characteristics, particularly differences in thermal and electrical time constants between the two PIR sensors. This mismatch introduces a phase shift Θ 0 between the sensor responses, leading to systematic errors in the TPE.
From Figure 4a, it is observed that the phase mismatch Θ 0 increases as the thermal time constant τ t h 2 derives from τ t h 1 . This leads to an increasing bias in TDE, as shown in Figure 4b, confirming that larger sensor response mismatches lead to greater bias in the estimated time period.
Equations (40) and (53) infer that bias decreases at higher signal frequencies, meaning that, at higher vehicle speeds, the impact of sensor mismatch on bias is reduced. This trend is supported by Figure 4c, where speed estimation bias decreases as vehicle speed increases, further confirming the inverse relationship between bias and signal frequency.
Variance analysis reveals key differences between CCF and CCFT in handling sensor mismatches. In addition, from Figure 5, it is observed that CCF variance increases rapidly with sensor mismatch, making it highly unstable, while CCFHT variance remains relative lower, confirming its robustness against sensor mismatches.

4.2. Impact of Bandwidth and Noise on Estimation Variance

The presence of noise in PIR sensor signals significantly affects TDE variance, making it an essential factor in performance evaluation. Mathematically, the variance behaviors using the two methods are given in Equations (38) and (51). These results confirm that CCF variance increases with B, whereas CCFHT remains stable across different bandwidth conditions. The numerical results also indicated that CCF-based TDE is highly sensitive to noise bandwidth. Specifically, as bandwidth increases, the variance in CCF-based time period estimation also increases significantly (Figure 6). This occurs because CCF variance scales directly with the noise bandwidth, making it unreliable for wideband signals.
This trend is evident in Figure 6, where it is seen that CCF variance increases dramatically at higher bandwidths. Meanwhile, CCFHT variance remains stable, confirming its ability to suppress noise-related uncertainty.

4.3. Implications for Practical Deployment

The findings of this study carry several implications for the practical deployment of TPE systems using low-cost PIR sensors. CCFHT demonstrates superior robustness to both sensor mismatch and environmental noise, making it a more viable option for real-world implementations where hardware constraints and variability are common. The mathematical framework developed in this study enables the quantitative prediction of estimation performance under different conditions. This allows system designers to assess expected error margins and choose parameters accordingly.
Despite the simplicity and low cost of the PIR-based system, the analytical and experimental results indicate that accurate speed estimation is achievable within typical traffic speed ranges (20–100 km/h), with mean estimation errors below 3.5% when using CCFHT.
While this paper focuses on two correlation-based techniques, it is important to note that other TPE methods have been proposed in the literature. For instance, generalized cross-correlation (GCC) [13] incorporates frequency domain weighting to improve delay detection in multipath or noisy environments, while wavelet-based approaches [22,36] leverage time–frequency analysis to handle non-stationary signals. Though potentially more accurate, these methods often demand greater computational resources, making them less suitable for embedded or low-power platforms such as those built around PIR sensors.
Future work may consider integrating lightweight machine learning models [37] to further improve performance, or multi-sensor fusion with complementary sensors (e.g., accelerometers, ultrasonic, or light sensors) to increase robustness under complex traffic and environmental conditions.

5. Conclusions

This study evaluated time period estimation (TDE) methods using pyroelectric infrared (PIR) sensors to determine vehicle speed in intelligent transportation systems (ITSs) based on a mathematical framework. The analysis focused on two correlation-based techniques: the conventional cross-correlation function (CCF) and an enhanced version using the Hilbert transform (CCFHT). A unified analytical framework was developed to derive bias and variance expressions for both methods under practical conditions involving sensor mismatch and noise. Numerical simulations demonstrated that, although both estimators yielded unbiased results in ideal conditions, sensor mismatch and bandwidth limitations significantly affected the performance of CCF. In contrast, CCFHT maintained a lower estimation variance across varying mismatch levels and noise bandwidths, confirming its robustness and stability. Experimental results further validated the findings, showing that CCFHT consistently achieved speed estimation errors below 3.5% in real-world vehicle traffic scenarios, compared with 5% for CCF. These results highlight the potential of low-cost PIR sensors, combined with carefully selected signal processing techniques such as CCFHT, for reliable and energy-efficient vehicle speed monitoring in intelligent transportation systems (ITSs). Moreover, integrating other types of sensors and applying more advanced signal processing algorithms are essential to further improve the system’s performance, representing a critical development trend for ITSs.

Author Contributions

Conceptualization, B.H.D. and V.V.Q.; methodology, B.H.D.; validation, V.T.T.; formal analysis, B.H.D.; data curation, B.H.D. and V.V.Q.; writing—original draft preparation, B.H.D.; writing—review and editing, V.V.Q.; visualization, B.H.D.; supervision, V.T.T. and V.V.Q.; funding acquisition, V.V.Q. All authors have read and agreed to the published version of the manuscript.

Funding

This research is funded by Hanoi University of Science and Technology (HUST) under project number T2024-TĐ-028.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

No new data were created.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

TPETime Period Estimation
PIRPyroelectric InfraRed
ITSIntelligent Transport System
CCFCross-Correlation Function
CCFHTCross-Correlation Function with Hilbert Transform

References

  1. Papageorgiou, M.; Diakaki, C.; Dinopoulou, V.; Kotsialos, A.; Wang, Y. Review of road traffic control strategies. Proc. IEEE 2003, 91, 2043–2067. [Google Scholar] [CrossRef]
  2. Zhang, C.; Shen, S.; Huang, H.; Wang, L. Estimation of the Vehicle Speed Using Cross-Correlation Algorithms and MEMS Wireless Sensors. Sensors 2021, 21, 1721. [Google Scholar] [CrossRef] [PubMed]
  3. Duda, K.; Marszalek, Z. Vehicle speed determination with inductive-loop technology and fast and accurate fractional time delay estimation by DFT. Metrol. Meas. Syst. 2024, 31, 781–796. [Google Scholar] [CrossRef]
  4. Kaskonas, P.; Meskuotiene, A. Vehicle Speed Meters Validation and Verification System. Elektron. Elektrotech. 2012, 3, 95–98. [Google Scholar] [CrossRef]
  5. O’Dwyer, A. Time Delay Estimation in Signal Processing Applications: An Overview. In Proceedings of IT&T Conference; Waterford Institute of Technology: Waterford, Ireland, 2002. [Google Scholar]
  6. Hing, C.S. Time Delay Estimation: Applications and Algorithms. 2015. Available online: https://sigport.org/sites/default/files/Time_Delay_Estimation.pdf (accessed on 25 April 2025).
  7. Luz, E.Y.; Mimbela, A. Summary of Vehicle Detection and Surveillance Technologies Used in Intelligent Transportation Systems; Technical Report; The Vehicle Detector Clearinghouse, Southwest Technology Development Institute (SWTDI) at New Mexico State University: Las Cruces, NM, USA, 2007. [Google Scholar]
  8. Arora, A.; Dutta, P.; Bapat, S.; Kulathumani, V.; Zhang, H.; Naik, V.; Mittal, V.; Cao, H.; Demirbas, M.; Gouda, M.; et al. A line in the sand: A wireless sensor network for target detection, classification, and tracking. Comput. Networks 2004, 46, 605–634. [Google Scholar] [CrossRef]
  9. Garcia, F.; Cerri, P.; Broggi, A.; Armingol, J.M.; de la Escalera, A. Vehicle detection based on laser radar. In Computer Aided Systems Theory—EUROCAST 2009; Springer: Berlin/Heidelberg, Germany, 2009; pp. 391–397. [Google Scholar]
  10. Michalopoulos, P.G. Vehicle detection video through image processing: The Autoscope system. IEEE Trans. Veh. Technol. 1991, 40, 21–29. [Google Scholar] [CrossRef]
  11. Tarik, M.H.; Ahsen, M.B.; Tarek, N.S.; Samir, A.A. Infrared Pyroelectric Sensor for Detection of Vehicular Traffic Using Digital Signal Processing Techniques. IEEE Trans. Veh. Technol. 1995, 44, 683–689. [Google Scholar]
  12. Odat, E.; Shamma, J.S.; Claudel, C. Vehicle Classification and Speed Estimation Using Combined Passive Infrared/Ultrasonic Sensors. IEEE Trans. Intel. Transp. Syst. 2018, 19, 1593–1606. [Google Scholar] [CrossRef]
  13. Knapp, C.; Carter, G. The generalized correlation method for estimation of time delay. IEEE Trans. Acoust. Speech Signal Process. 1976, 24, 320–327. [Google Scholar] [CrossRef]
  14. Carter, G.C. Coherence and time delay estimation. Proc. IEEE 1987, 75, 236–255. [Google Scholar] [CrossRef]
  15. Brandstein, M.; Ward, D. Microphone Arrays: Signal Processing Techniques and Applications; Springer: Berlin/Heidelberg, Germany, 2001. [Google Scholar]
  16. Blok, E. Classification and evaluation of discrete subsample time delay estimation algorithms. In Proceedings of the 14th International Conference on Microwaves, Radar and Wireless Communications MIKON-2002, Gdansk, Poland, 20–22 May 2002. [Google Scholar]
  17. Bendat, J.S.; Piersol, A.G. Random Data—Analysis and Measurement Procedures, 4th ed.; Wiley: New York, NY, USA, 2010. [Google Scholar]
  18. Costa-Júnior, J.F.; Cortela, G.A.; Maggi, L.E.; Rocha, T.F.; Pereira, W.C.; Costa-Felix, R.P.; Alvarenga, A.V. Measuring uncertainty of ultrasonic longitudinal phase velocity estimation using different time-delay estimation methods based on cross-correlation: Computational simulation and experiments. Measurement 2018, 122, 45–56. [Google Scholar] [CrossRef]
  19. Lampropoulos, G.; Chan, Y. Time delay estimation with nonstationary signals. In Proceedings of the ICASSP ’86. IEEE International Conference on Acoustics, Speech, and Signal Processing, Tokyo, Japan, 7–11 April 1986. [Google Scholar]
  20. Pang, Z.; Wang, G.; Wang, B.; Wang, L. Comparison between Time Shifting Deviation and Cross-correlation Methods. J. Light. Technol. 2022, 40, 3003–3009. [Google Scholar] [CrossRef]
  21. Tamim, S.M.; Ghani, F. Hilbert transform of FFT pruned cross correlation function for optimization in time delay estimation. In Proceedings of the IEEE 9th Malaysia International Conference on Communications (MICC), Kuala Lumpur, Malaysia, 15–17 December 2009. [Google Scholar]
  22. Osman, A.B.; Ovinis, M.; Hashim, F.M.; Mohammed, K.; Osei, H. Time Delay Estimation Using Continuous Wavelet Transform Coefficients. Adv. Sci. Lett. 2017, 23, 1299–1303. [Google Scholar] [CrossRef]
  23. Hanus, R. Time delay estimation of random signals using cross-correlation with Hilbert Transform. Measurement 2019, 146, 792–799. [Google Scholar] [CrossRef]
  24. Donovan, B.; Li, Y.; Stern, R.; Jiang, J.; Claudel, C.; Work, D. Vehicle detection and speed estimation with PIR sensors. In Proceedings of the 14th International Conference on Information Processing in Sensor Networks, Seattle, WT, USA, 13–16 April 2015; pp. 370–371. [Google Scholar]
  25. Van Quang, V.; Thang, V.T. A novel system for measuring vehicle speed via analog signals of pyroelectric infrared sensors. Int. J. Mod. Phys. B 2021, 35, 2140028. [Google Scholar] [CrossRef]
  26. So, H.C.; Chan, Y.T.; Ho, K.C.; Chen, Y. Simple Formulas for Bias and Mean Square Error Computation. IEEE Signal Process. Mag. 2013, 30, 162–165. [Google Scholar] [CrossRef]
  27. Thang, V.T.; Van Quang, V.; Bui, N.T. A Setup for Measuring the Centering Error of a Dual-Element Pyroelectric Infrared Sensor Module. Sensors 2021, 21, 6684. [Google Scholar] [CrossRef]
  28. Van Quang, V.; Thang, V.T. Measurement uncertainty analysis of centering error of pyroelectric infrared sensor module. Infrared Phys. Technol. 2024, 137, 105124. [Google Scholar] [CrossRef]
  29. Yun, J.; Song, M.-H. Detecting Direction of Movement Using Pyroelectric Infrared Sensors. IEEE Sens. J. 2014, 14, 1482–1489. [Google Scholar] [CrossRef]
  30. Bodhibrata, M.; Seshan, S.; Subrat, K. Modeling the Analog Response of Passive Infrared Sensor. Sensors Sens. Actuators A Phys. 2018, 279, 65–74. [Google Scholar]
  31. Whatmore, R.W. Pyroelectric Devices and Materials. Rep. Prog. Phys. 1999, 49, 1335. [Google Scholar] [CrossRef]
  32. Pillai, S. Unnikrishna. In Probability, Random Variables, and Stochastic Processes; McGraw-Hill: New York, NY, USA, 2002. [Google Scholar]
  33. Kay Steven, M. Fundamentals of Statistical Signal Processing: Estimation Theory; Prentice-Hall, Inc.: Hoboken, NJ, USA, 1993. [Google Scholar]
  34. Faerman, V.; Avramchuk, V.; Voevodin, K.; Sidorov, I.; Kostyuchenko, E. Study of Generalized Phase Spectrum Time Delay Estimation Method for Source Positioning in Small Room Acoustic Environment. Sensors 2022, 22, 965. [Google Scholar] [CrossRef] [PubMed]
  35. Datasheet of Microcontrollers STM32L476xx. STMicroelectronics. Available online: https://www.st.com/resource/en/datasheet/stm32l476je.pdf (accessed on 25 April 2025).
  36. Sharkova, S.B.; Faerman, V.A. Wavelet transform-based cross-correlation in the time-delay estimation applications. J. Phys. Conf. Ser. 2021, 2142. [Google Scholar] [CrossRef]
  37. Shaltaf, S. Neural-Network-Based Time-Delay Estimation. EURASIP J. Adv. Signal Process. 2004, 3, 378–385. [Google Scholar] [CrossRef]
Figure 1. Graphical illustration of a practical objective function.
Figure 1. Graphical illustration of a practical objective function.
Applsci 15 06255 g001
Figure 2. Views of the speed measurement systems using two PIR sensors (a); and illustration of its working principle (b).
Figure 2. Views of the speed measurement systems using two PIR sensors (a); and illustration of its working principle (b).
Applsci 15 06255 g002aApplsci 15 06255 g002b
Figure 3. PIR sensors perform as linear systems.
Figure 3. PIR sensors perform as linear systems.
Applsci 15 06255 g003
Figure 4. Impact of various time constant ( τ t h 2 ) and object speed on: (a) argument Θ 0 ; (b) time period estimation bias; (c) speed measurement bias; (d) relative speed measurement bias.
Figure 4. Impact of various time constant ( τ t h 2 ) and object speed on: (a) argument Θ 0 ; (b) time period estimation bias; (c) speed measurement bias; (d) relative speed measurement bias.
Applsci 15 06255 g004
Figure 5. Impact of various time constant ( τ t h 2 ) and object speed on estimation variances, in case B = 100 Hz: (a) variance of time period estimation using CCF; (b) variance of time period estimation using CCFHT; (c) uncertainty of speed measurement using CCF; (d) uncertainty of speed measurement using CCFHT; (e) relative difference between uncertainty of speed measurement using CCF and CCFHT.
Figure 5. Impact of various time constant ( τ t h 2 ) and object speed on estimation variances, in case B = 100 Hz: (a) variance of time period estimation using CCF; (b) variance of time period estimation using CCFHT; (c) uncertainty of speed measurement using CCF; (d) uncertainty of speed measurement using CCFHT; (e) relative difference between uncertainty of speed measurement using CCF and CCFHT.
Applsci 15 06255 g005
Figure 6. Impact of bandwidth on TDE (a) variance and speed measurement (b) uncertainty using CCF.
Figure 6. Impact of bandwidth on TDE (a) variance and speed measurement (b) uncertainty using CCF.
Applsci 15 06255 g006
Figure 7. Comparison between reference vehicle speeds (obtained from video) and estimated speeds using the CCF and CCFHT methods (a); and estimation errors of vehicle speeds using the CCF and CCFHT methods under real conditions (b).
Figure 7. Comparison between reference vehicle speeds (obtained from video) and estimated speeds using the CCF and CCFHT methods (a); and estimation errors of vehicle speeds using the CCF and CCFHT methods under real conditions (b).
Applsci 15 06255 g007
Table 1. Time and frequency domain notations of quantities related to PIR sensor signals.
Table 1. Time and frequency domain notations of quantities related to PIR sensor signals.
QuantityNotation in Time DomainNotation in
Frequency
Domain
Difference between infrared fluxes from the interested object incoming on 2 elements of PIR sensor ϕ ( t ) Φ ( f )
Impulse response of PIR 1 h 1 ( t ) H 1 ( f )
Impulse response of PIR 2 h 2   ( t ) H 2 ( f )
Output signal of PIR 1 x 1 ( t ) X 1 ( f )
Output signal of PIR 2 x 2 ( t ) X 2 ( f )
Noise signal at PIR 1 n 1 ( t ) N 1 ( f )
Noise signal at PIR 2 n 2 ( t ) N 2 ( f )
Table 2. Key parameters and their values for simulation.
Table 2. Key parameters and their values for simulation.
Quantity, [Unit]Value
Focal   length   of   both   sensors   F 1 = F 2 , [mm]50.9
Sensing element width w, [mm]3
Distance between two sensors’ axes d, [m]1
Distance to object’s (vehicle’s) movement D, [m]10
Length of the object L, [m]4.5
Electrical   time   constant   τ e 1   (first sensor), [s] 0.08
Thermal   time   constant   τ t h 1 (first sensor), [s]0.5
Electrical   time   constant   τ e 2   (second sensor), [s]0.08
Thermal   time   constant   τ t h 2   (second sensor), [s]0.4 ÷ 0.6
Number of discrete frequency bins Nd1024
Noise bandwidth B, [Hz]10 ÷ 100
Signal-to-noise ratios SNR1 = SNR210
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Dang, B.H.; Thang, V.T.; Quang, V.V. Evaluation of Correlation-Based Methods for Time Period Estimation in Vehicle Speed Measurement Using Pyroelectric Infrared Sensors. Appl. Sci. 2025, 15, 6255. https://doi.org/10.3390/app15116255

AMA Style

Dang BH, Thang VT, Quang VV. Evaluation of Correlation-Based Methods for Time Period Estimation in Vehicle Speed Measurement Using Pyroelectric Infrared Sensors. Applied Sciences. 2025; 15(11):6255. https://doi.org/10.3390/app15116255

Chicago/Turabian Style

Dang, Bui Hai, Vu Toan Thang, and Vu Van Quang. 2025. "Evaluation of Correlation-Based Methods for Time Period Estimation in Vehicle Speed Measurement Using Pyroelectric Infrared Sensors" Applied Sciences 15, no. 11: 6255. https://doi.org/10.3390/app15116255

APA Style

Dang, B. H., Thang, V. T., & Quang, V. V. (2025). Evaluation of Correlation-Based Methods for Time Period Estimation in Vehicle Speed Measurement Using Pyroelectric Infrared Sensors. Applied Sciences, 15(11), 6255. https://doi.org/10.3390/app15116255

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop