Revista de Ciencias Tecnológicas (RECIT). Volumen 3 (1): 10-22
Revista de Ciencias Tecnológicas (RECIT). Universidad Autónoma de Baja California ISSN 2594-1925
Volumen 7 (3): e288. Julio-Septiembre, 2024. https://doi.org/10.37636/recit.v7n3e288
1 ISSN: 2594-1925
Research article
Mathematical analysis of the pulse coincidence process for
applications on frequency sensors after the use of variable
references
Análisis matemático del proceso de coincidencia de pulsos para su
aplicación en sensores utilizando referencias variables
Fabian N. Murrieta-Rico1,2 , Oleg Sergiyenko3, Julio C. Rodríguez-Quiñonez1, Wendy
Flores-Fuentes1, José A. Núñez-López3, Vitalii Petranovskii4
1Facultad de Ingeniería Mexicali, Universidad Autónoma de Baja California, Blvd. Benito Juárez S/N, Parcela 44, 21280
Mexicali, Baja California, México
2Universidad Politécnica de Baja California, Av Claridad, Plutarco Elías Calles, 21376 Mexicali, Baja California, México
3Instituto de Ingeniería, Universidad Autónoma de Baja California, Blvd. Benito Juárez S/N, Parcela 44, 21280 Mexicali,
Baja California, México
4Centro de Nanociencias y Nanotecnología, Universidad Nacional Autónoma de México, Carr. Tijuana-Ensenada km107,
22860 Ensenada, Baja California, México
Corresponding author: Fabian N. Murrieta-Rico, Facultad de Ingeniería Mexicali, Universidad Autónoma de Baja California,
Blvd. Benito Juárez S/N, Parcela 44, 21280 Mexicali, Baja California, México. Universidad Politécnica de Baja California, Av
Claridad, Plutarco Elías Calles, 21376 Mexicali, Baja California, México. E-mail: fnmurrietar@upbc.edu.mx. ORCID: 0000-
0001-9829-3013
Received: August 18, 2023 Accepted: July 23, 2024 Published: August 8, 2024
Abstract. In most cases, sensors are the means that enable a computer to get information from a process of interest. This
requires that the information generated by the sensor can be processed by the computer in a timely manner. However, if
accurate data from the sensor is required, an appropriate transduction process is required. There are sensors that generate a
frequency-domain output. Since these sensors typically have a short response time, it is required to get the best approximation
to their frequency within the shortest time possible. There are different methods for obtaining the frequency value generated
by the sensor. Although such methods can be applied, their functioning characteristics are not suitable for application in
sensors. The principle of rational approximations is a method that has proven plenty of improvements in comparison to other
frequency measurement methods. In this work, the functioning of the principle of rational approximations is explored when
different time references are used. After the computational analysis of the principle of rational approximations, it was found
out how the reference frequency value affects the measurement process. It was found that if the magnitude of reference and
unknown frequencies have an increment in their difference, then the relative error decreases.
Keywords: Frequency; Measurement; Sensors.
Resumen. - En la mayoría de los casos, los sensores son los medios que permiten a una computadora obtener información de
un proceso de interés. Esto requiere que la información generada por el sensor pueda ser procesada por la computadora de
manera oportuna. Sin embargo, si se requieren datos precisos del sensor, se requiere un proceso de transducción adecuado.
Hay sensores que generan una salida en el dominio de la frecuencia. Dado que estos sensores suelen tener un tiempo de
respuesta corto, se requiere obtener la mejor aproximación a su frecuencia en el menor tiempo posible. Existen diferentes
métodos para obtener el valor de frecuencia generado por el sensor. Aunque tales métodos pueden aplicarse, sus
características de funcionamiento no son adecuadas para su aplicación en sensores. El principio de aproximaciones racionales
es un método que ha demostrado muchas mejoras en comparación con otros métodos de medición de frecuencia. En este
trabajo se explora el funcionamiento del principio de aproximaciones racionales cuando se utilizan distintas referencias
temporales. Después del análisis computacional del principio de aproximaciones racionales, se descubrió cómo el valor de la
frecuencia de referencia afecta el proceso de medición. Se encontró que, si la magnitud de las frecuencias de referencia y
desconocida se incrementa, entonces el error relativo decrece.
Palabras clave: Frecuencia; Medición; Sensores.
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
2 ISSN: 2594-1925
1. Introduction
Deploying sensors and sensing technology has
many benefits, including predictive and
preventive maintenance. Continuous, real-time
data from assets and processes gives a more
holistic view of the technology enterprise. Key
benefits of sensors include increased sensitivity
in data collection and continuous real-time
analysis. Continuous advancements in sensor
technology have led to the emergence of smart
and intelligent sensors. Smart sensors are capable
of detecting conditions for real-time decision
making. This approach will help to achieve the
Sustainable Development Goals (SDGs) set out
by the United Nations [1].
It is obvious that due to the rapid growth of the
world's population, the demand for food will
increase significantly in the coming years [2].
Traditional farming methods can no longer meet
the growing demands and most importantly they
use resources such as land, water, herbicides and
fertilizers rather inefficiently. For the most
efficient and sustainable use of resources to
increase production, automation in agriculture
needs to be introduced. The way people and
machines work on farms has changed thanks to
the integration of the Internet of Things (IoT)
with numerous sensors, controllers, and
communication protocols.
These sensors can continuously produce a
significant amount of data about the condition of
crops or animals on farms. The architecture and
established analysis of IoT data in agriculture
helps select IoT technologies for specific
applications [3]. Improving the processing of raw
data is one of the requirements that research must
address when designing data collection systems
based on IoT devices to improve overall system
performance. Additional goals are to increase
battery life and minimize information loss during
data transmission when using wearable devices
[4].
Sensors play a crucial role by detecting and
measuring the values of various parameters such
as temperature, pressure, humidity, flow rate,
movement and position, and the concentration of
certain components in the mixture. They convert
physical signals into electrical signals and
provide information to the control system in real
time, thus making production intelligent and
automated. In addition to those already
mentioned, there is another promising use of
sensors - their medical applications, for example,
for routine exhaled air diagnostics. For example,
an "electronic nose" design based on a hybrid
sensor has been developed to detect the initial
stages of lung cancer by analyzing breathing [5].
Lung cancer has the highest mortality rate of all
cancers in the world, but its early detection
significantly increases survival rates. The authors
[5] proposed two different types of e-noses based
on quartz microbalance (QCM) modified
semiconductor coatings. Quartz microbalance
(QCM) modified with Ag+-ZSM-5 zeolite has
been proposed for diabetes diagnosis [6]. Such a
sensor is used to determine the concentration of
acetone in the exhaled air of diabetics, since the
breath of diabetics and healthy people is clearly
distinguishable. Using exhaled gas to diagnose
and monitor human disease has numerous
advantages for being non-invasive, convenient
and environment friendly [7].
For the interaction between the automatic
systems and the controlled system to take place,
the use of sensors is required. During this
process, the information they generate must be
able to be interpreted by the computer systems
that acquire, store and process the information,
preferably in real-time. In this sense, there is a
process of quantifying the signal generated by the
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
2 ISSN: 2594-1925
sensor. It is at this stage that it is of interest to be
able to estimate the value of the useful signal
with the required accuracy, while respecting time
constraints, thereby guaranteeing an adequate
control of the system of interest [8]. In order to
meet the time constraints, the algorithm for
approximating the desired signal must meet
certain characteristics. That is, that it must be
easy to implement, and its execution time must
be small compared to the time constraints of the
system [9].
Sensors are the initial source of information
about the environment that the control system
has, and these devices can be classified in
different ways. In particular, given the output
signal they generate, the sensors can have outputs
that generate signals with voltage, current or
frequency, etc. Thus, a way of quantifying the
signals generated by the sensors may be
improved to improve the performance of the
entire system. In the case of signals in the
frequency domain, there is a high stability and
accuracy in the conversion of the input signal to
the sensor output signal. It is for this reason that
frequency domain sensors are of interest in
various modern applications.
Various methods are known for approximating
the frequency of interest, including methods
based on counting pulses or periods, or methods
based on spectral analysis of the signal, such as
methods using the Fourier transform [10], [11],
[12], [13].
Although each of these methods has its own
advantages and disadvantages, as well as its
specific applications, in recent years, another
method has been proposed and studied, which
allows to reduce the measurement time while
improving the accuracy of approximation to the
measurand; this is the principle of rational
approximations [14], [15], [16], [17]. In this
method, the signal to be measured is compared
with a reference signal. Before the comparison,
both signals are conditioned, and during the
comparison, both signals are multiplied in time.
А third coincidence signal is generated, in which
there are coincidence pulses that are generated
during the time while the pulses in the input
signal are true. After the first matching pulse, the
pulses in the input signals are counted, and then
an approximation to the desired frequency can be
calculated by knowing the counted pulses and the
value of the reference frequency. It has been
shown that it is the value of the latter that affects
the time required to obtain the best
approximation to the measurand. Even so, the
relationship between the value of said variable
and the error observed in the approximation to
the measurand is not completely clear.
In this paper, the aim is to investigate this
dependence, and as a consequence, to elucidate
the best method for choosing the value of the
reference frequency that allows to minimize the
error in the measurement process. For this
purpose, we will analyze the data generated
experimentally in the process of frequency
measurement for the signal generated by a sensor
that works under the direct piezoelectric effect;
further they will be compared with the theoretical
model of the measurement process implemented
in the course of computational simulation.
2. Background
In nowadays technology, sensors are a source of
information that allows computers to have the
necessary data for automated decision making. In
this regard, improving the accuracy of the data
will provide a better understanding of the process
scenario in which the sensor is operating. There
are different methods for estimating the desired
frequency; in general, it can be said that
depending on the type of signal, certain methods
are used. For example, different methods are
used for electrical and optical signals. In the case
of electrical signals, the objective of the
measurements is to be as fast and accurate as
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
3 ISSN: 2594-1925
possible [18]. The methods reported to solve this
task should have a minimum measurement time;
at the same time, if a more accurate
approximation to the measurand is required, a
longer time is needed to obtain a satisfactory
signal.
In case of optical sources, frequency
approximation systems based on MachZehnder
interferometers are used [19]. In the work of Li
et al. [20], variations on relative phase shifts are
used through an optical delay line and spacing
between antennas. Then the phase comparison
based on a multi-base line eliminates the
ambiguity of the angle of arrival over a large
frequency range. Hence, the frequency and angle
of arrival are determined by analyzing the phase
shift of the intermediate frequency signal.
Considering the technological applications of
sensors these days, frequency measurement
systems are being integrated into embedded
systems. For example, an IoT based system has
been proposed for vibration analysis by Kneifel
et al. [21]. In such a system, frequency
measurement is done after realizing fast Fourier
Transform.
In case of methods based on pulse counting, the
principle of rational approximations has been
exhaustively studied in the last years, as a result,
plenty of mathematical formalisms has been
provided for explaining the functioning of such a
method, and experimental prototypes have been
built for experimental evaluation.
As has been reported [14], the principle of
rational approximations requires enough time to
yield a good approximation, which is based on
reaching numerator in the form of “one with r
zeros”. Later, theoretical advances included the
understanding of the pulse width effect in the
reduction of error [15], [16]. Then, the phase
effect and the relation with the shape of error
during measurement was discovered [17]. In
these reports, the authors present evaluation of
the measurement process of signals with an
unknown frequency, then another problem came
up; when the signal from sensors has a frequency
value that changes from one value to another,
there is a frequency shift, then, there are two
unknown frequency values. So, with the aim to
solve this problem, a formalism to solve the
problem of measuring the frequency shift was
proposed [22], [23], [24], [25].
It is based on measuring the desired or unknown
frequency before and after the stimulation of the
sensor, then the difference between both
measurements is computed. There are two
restrictions before this task can be performed, the
first is that the approximation to desired
frequency must be achieved in a time as short as
possible, this with the aim to quantize the
frequency variations caused by input stimulus.
The second restriction is related to the
uncertainty that is adequate for the sensor, this is
that if the frequency shifts generated by the
sensor are below of the uncertainty during the
measurement, then, there is no relevant
information during the measurement process.
This is an important aspect, in particular for
piezoelectric sensors with a variation of their
proper frequency of several parts per million
[26]. From the study of the principle of rational
approximations, experimental implementations
of this method have been proposed.
In particular, the application of this method for
the quantification of frequency shifts generated
by a quartz crystal has been explored [27], [28].
And also, different applications have been
proposed, i.e. the automotive [29] and aerospace
industries [30], [24]. A proper understanding of
this method would allow its application for
improving other instruments that are of current
use, for example, frequency response analyzers,
such as the used on materials science for studying
the nature of nanoparticles [31], [32], [33], [34].
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
4 ISSN: 2594-1925
As this brief revision has shown, different
aspects of the principle of rational
approximations have been studied, but there are
some questions to address before this method can
be fully understood. For this reason, in this work,
the data generated during the frequency
measurement process is evaluated. The signal
coincidence process and the measurement
method are simulated. This is done with the aim
to evaluate the impact of the best coincidences in
the frequency measurement process.
3. Methodology
As discussed in other reports [16], [22], [23], the
principle of rational approximations allows to
estimate an unknown frequency (Hz) from
data obtained during a signal comparison
process. This is that given a reference signal
󰇛󰇜 with a known frequency (Hz) and a
desired signal 󰇛󰇜, a third signal can be
generated when both signals are multiplied in
time. Then, an approximation to the true value
(Hz). This is true if the pulse width of pulses
in both signals is considered to have the same
duration , and . This is that both
signals must have squared pulses with constant
duration.
Figure 1. Theoretical measurement process. When , the counting of pulses starts, this is shown in the next
coincidence when , where . In addition, it can be noted that , which implies that . In this
method, for both input signals, and , has the same duration.
If these conditions are fulfilled, during the signal
coincidence process, the pulses are counted since
the first coincidence, then the number of pulses
from desired and reference signals are
registered in each  coincidence, this,
and denote the amount of pulses counted until
the  coincidence for desired and unknown
signals respectively. This process is depicted in
Fig. 1.
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
5 ISSN: 2594-1925
Then, according to previous reports [14], [18],
[35], [36], [37], the desired frequency can be
approximated from the counting of desired and
reference signals as
󰇛󰇜
If the true value in Hz of desired signal is
known, the relative error is given by

󰇛󰇜
and the measurement time (s) by
󰇛󰇜
In this work, a reference signal with a frequency
was used as reference standard. Different
frequency measurement processes were
simulated after the use of algorithms proposed in
previous reports [22], [27]. The value of was
set to 9 MHz, and the measurement process was
evaluated with 󰇝󰇞
MHz. A pulsewidth 󰇛󰇜 s was
used. The algorithms were implemented in
MATLAB R2023a.
The results of simulations were evaluated using
MATLAB and they are compared with
experimental and theoretical results found in
related literature. This with the aim to understand
the effect of the value of reference frequency in
experimental and theoretical results.
4. Results and discussions
The results of direct frequency measurement are
presented in Fig. 2. As it can be noted,
apparently, all the frequency measurement
processes converge to the same frequency value.
This means that the relative error decreases over
time. Although there are similar convergence
processes, the way each series converge differs.
This can be explained as the result of how the
coincidences appear. For example, we can
consider the first terms of the succession, in case
of  MHz
󰇛󰇜
and for  MHz,

󰇛󰇜
After the use of Eq. 1, it can be easily shown that
the approximated frequency in each case
achieves an exact value when , this is that
. In this regard, the coincidences are
occurring without interruption, and the value of
indicates when the counting of pulses started.
For the process of pulse coincidence, both partial
and perfect coincidences generate a packet of
coincidences, which groups a finite number of
coincidences where a variation in the
coincidence time  (s) has a particular
behavior. These packets appear at a regular rate
in , and the best approximations yields to a
zero error. This is shown in Fig. 2 as the zero
crossings of .
For almost all the values of , there is a value in
the measurement time, where there is a crossing
from positive to negative values of or vice
versa. In case of there is no transition to positive
values, the value of is cero and it is a constant
value during all the . This means that the
crossing point, in case of µs for Fig. 2, occurs
at , which is known to occur when a perfect
coincidence occurs.
Revista de Ciencias Tecnológicas (RECIT): Volumen 7 (3): e288.
6 ISSN: 2594-1925
Figure 2. Frequency measurement process under variations of time-reference, variation of relative error during the
measurement time , different values of reference frequency were considered. The inset shows a zone of interest in
µs, where there is a transition of positive to negative values of .
It is noted that the zero crossings, as the shown in
the inset of Fig. 2, occur a regular rate, but with
a reduction in the magnitude of relative error .
As a consequence, at the beginning of
measurement process the greatest values of ,
but different measurement processes yield either
positive or negative values of , which is known
to be caused by the phase of input signals [18].
For this experiment, the phase condition of both
signals was supposed to be the same, this is that
both signals, during the measurement process,
start at the same time. However, since the first
coincidence is not defining the starting value of
, then it can be attributed to the second
coincidence, as shown in Fig 1, where a pulse
from a signal starts before the pulse of the other
signal where the coincidence exists. This allows
us to understand that with enough coincidences,
the phase conditions can be obtained even when
the signals are supposed to be in the same phase
condition. Then, the phase conditions cannot be
attributed only to the first coincidence, but to the
cumulative effect of all the occurring
coincidences during the measurement process.