# Grouping Similar Sensors Based on their Sent Data in a Massive IoT Scenario

Gwen Maudet, Mireille Batton-Hubert, Patrick Maillé, Laurent Toutain

► To cite this version:

Gwen Maudet, Mireille Batton-Hubert, Patrick Maillé, Laurent Toutain. Grouping Similar Sensors Based on their Sent Data in a Massive IoT Scenario. 2024. hal-04424455v4

HAL Id: hal-04424455

https://hal.science/hal-04424455v4

Preprint submitted on 9 Jul 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Grouping Similar Sensors Based on their Sent Data in a Massive IoT Scenario

Gwen Maudet¹, Mireille Batton-Hubert², Patrick Maillé³, and
Laurent Toutain³

¹Interdisciplinary Centre for Security, Reliability and Trust,
University of Luxembourg, Esch-sur-Alzette, Luxembourg,
gwen.maudet@uni.lu

²Mines Saint-Etienne, Univ Clermont Auvergne, UMR CNRS
6158, F-42023, Saint-Etienne, France

³IMT Atlantique, IRISA, UMR CNRS 6074, F-35700, Rennes,
France

July 9, 2025

## Abstract

The rapid growth of the Internet of Things (IoT) has enabled the large-scale deployment of low-cost, lightweight sensors. In the Massive IoT paradigm, sensors are deployed dynamically, operate intermittently, and produce noisy, irregular, and unsynchronized data. When sensors monitor the same physical phenomenon, their data often exhibit similar patterns. Grouping such sensors can improve data reliability and enable communication optimizations, such as reducing redundancy. However, existing methods typically assume static deployments with synchronized transmissions, making them unsuitable for this new dynamic scenario.

In this work, we propose a novel clustering approach tailored to the challenges of Massive IoT. We introduce a similarity metric based on kriging interpolation to account for irregular time series and measurement noise. This metric is integrated into a hierarchical clustering algorithm with a custom linkage strategy designed to handle asynchronous sensor activity. Our method does not require knowledge of sensor positions or regular transmissions, making it suitable for low-cost, large-scale deployments.

We evaluate our approach through extensive simulations, showing a 23% improvement in V-Measure over a baseline combining Dynamic Time Warping and standard hierarchical clustering. We also assess robustness under different levels of measurement noise using different clustering stopping criteria.
# 1 Introduction

The Internet of Things (IoT) has significantly transformed large-scale monitoring systems by enabling diverse strategies for resource optimization, risk management, and real-time tracking [1]. These technologies find applications across numerous domains, including agriculture [2], industrial automation [3], and smart cities [4]. Advances in electronic engineering and the advent of networks with stringent constraints have led to the development of embedded sensors. These sensors are designed for specific, straightforward tasks, such as measuring temperature, humidity, or CO₂ levels [5]. Due to their battery-powered nature and affordability, these sensors can be deployed on a large scale, potentially being integrated into everyday objects [6].

To further scale up deployments and reach the Massive IoT paradigm [6,7], sensors must be easily producible in very large quantities. In this context, we consider scenarios where many sensors are deployed in a dynamic environment: sensors can appear or disappear at any time, and their transmissions are often noisy, asynchronous, and irregular. While this model is more generic and sustainable, it also introduces significant challenges for interpreting and organizing sensor data. In scenarios where sensors monitor the same physical phenomenon, their readings may show strong similarities. Identifying such groups is valuable—not only for improving data reliability, especially in the presence of sensor noise and faults—but also for reducing redundancy and improving communication efficiency. Our goal is to develop a clustering method that can group sensors tracking the same underlying phenomenon, even under the constraints of the Massive IoT setting. The precise assumptions underpinning this setting are detailed in Section 2.

Clustering sensor data has already been explored for purposes such as energy-efficient routing [8-10], fault detection [11], and transmission reduction [12-16]. However, most existing methods assume static deployments with synchronized, periodic transmissions. These assumptions lead to high deployment costs and are unsuitable for dynamic environments. A review of related work is presented in Section 3.

To address these limitations, we propose a two-step method:

(1) Define a similarity metric tailored to the irregular and asynchronous nature of sensor data, and

(2) Design a clustering strategy that adapts to the dynamic behavior of sensors.

We introduce a similarity metric based on Kriging interpolation, allowing us to reconstruct the underlying signals from sparse and noisy readings. Similarity is measured over the overlapping operational period between sensors by comparing the mean magnitudes of their interpolated values. Based on this, we develop an Agglomerative Hierarchical Clustering (AHC) method, incorporating a novel linkage criterion that adjusts similarity scores based on the duration of co-observation, to reflect confidence in the measurement. The details of
the similarity definition and clustering methodology are presented in Section 4 and Section 5, respectively.

To validate our approach, we compare it against a baseline using Dynamic Time Warping (DTW) combined with traditional complete-linkage hierarchical clustering, as used in prior studies [15,16]. Our evaluation is conducted under a highly dynamic and noisy simulation setting, where two distinct phenomena evolve over time, sensor measurements are perturbed with substantial noise (standard deviation equal to one-tenth of the value range [-1, 1]), and only 10% of the sensors are directly comparable. Despite these challenges, our method achieves a 23% improvement in V-Measure over the baseline. Additionally, we assess the robustness of the clustering process under varying noise levels and evaluate two different stopping criteria for the hierarchical algorithm. The experimental setup and results are discussed in Section 6.

In summary, our contributions are as follows:

* Formalization of the Massive IoT paradigm, characterized by asynchronous, noisy, and irregular sensor transmissions, with dynamic sensor entry and exit.

* Definition of a novel similarity metric based on Kriging interpolation to handle the irregular nature of sensor data.

* Development of an AHC algorithm with a new linkage criterion that incorporates the reliability of observed similarity based on the overlap duration.

* Demonstration, through simulations in a chaotic setting, of the ability to correctly identify groups of sensors monitoring the same phenomenon, achieving a 23% improvement over a state-of-the-art baseline.

# 2 Hypotheses and Objectives

This section introduces the context of the Massive IoT paradigm and defines the general system model that guides the development of our proposed methodology.

## 2.1 Classical IoT vs. Massive IoT

We first contrast the traditional IoT approach with the Massive IoT paradigm that motivates our work.

In classical IoT solutions, a limited number of reliable sensors are strategically placed to ensure adequate spatial coverage and data diversity. Each sensor is expected to provide distinct, high-quality measurements. However, this setup incurs high deployment and maintenance costs due to the need for precise placement and immediate replacement of any malfunctioning sensor. Moreover, detecting faults or drifts in sensor behavior is difficult, as sensors are assumed to report relatively uncorrelated data.

In contrast, the Massive IoT paradigm envisions the deployment of a large number of low-cost sensors, often integrated into everyday objects [6,17]. This
approach reduces dependency on individual sensors, lowers maintenance require-
ments (since faulty sensors can be ignored), and facilitates anomaly detection
via redundancy and correlation among multiple sensors. However, this comes at
the cost of lower individual sensor reliability—in terms of both sensing accuracy
and regularity of transmission.

## 2.2 Use Case: Real-Time Monitoring of Physical Quantities

We consider a scenario where sensors are deployed to monitor physical quantities in real time. This use case is typical in domains such as smart agriculture, where parameters like soil moisture and light exposure are critical [2], as well as in smart buildings, where environmental conditions such as temperature, CO2 concentration, and particulate matter are tracked [4].

In these contexts, sensors transmit measurements of the targeted physical quantity, with no strict requirements on latency or high precision, as the communication is not time-critical.

## 2.3 Observations Sent by a Sensor

In our framework, sensors transmit their data directly to a central gateway using a star topology, which is the most energy-efficient configuration—particularly well-suited for Low-Power Wide-Area Networks (LPWANs) [5,18]. Although our method could be adapted to mesh networks, we do not rely on any additional information that could be obtained from such architectures.

We explicitly do not assume any synchronization between sensors. Time synchronization is challenging due to clock drift and limited uplink bandwidth [19]. Moreover, as shown in [20], the absence of synchronization does not degrade monitoring quality and may even improve network performance by reducing the likelihood of packet collisions at the gateway.

Additionally, we do not require sensors to transmit data at regular intervals. Irregular transmissions may arise from various factors, including clock drift, message loss, or deliberate design choices such as trigger-based or model-based reporting schemes [21].

Each message—hereafter referred to as an *observation*—contains the sensor identifier, a timestamp, and the measured value. Given the low-cost nature of the devices considered, we assume that each observation represents the true value of the monitored phenomenon corrupted by additive measurement noise.

## 2.4 Incoming and Outgoing Sensors

As noted earlier, sensors may become inactive over time due to battery depletion or hardware failure, while new sensors may be added dynamically to maintain sufficient coverage. Alternatively, sensors may physically enter and leave the monitored environment (e.g., when integrated into mobile objects). Therefore,
we consider sensors with limited and variable lifetimes, with new sensors poten-
tially entering the system after the monitoring process has begun. Consequently,
the similarity between any two sensors can only be evaluated over their period
of coexistence, which may vary or not exist at all.

## 2.5 Identifying Sensors Observing the Same Phenomenon

In many environments, multiple distinct phenomena may be present simultane-
ously, each characterized by unique temporal dynamics. For instance, temper-
ature variations in different rooms of a building may follow different patterns.

We adopt the simplifying assumption that each sensor monitors a single,
unique phenomenon. The objective is to identify and cluster sensors observing
the same underlying phenomenon, even when their measurements are affected
by noise and their operational periods do not necessarily overlap.

Clustering sensors in this way supports several objectives, including (but
not only): (i) reducing the overall volume of transmitted data (via compres-
sion or scheduling), and (ii) detecting faulty or drifting sensors based on group
consistency.

## 2.6 Challenges Addressed in This Paper

Given the scenario described above, the only available data is the history of
observations transmitted by sensors from the beginning of the deployment up
to a certain time *t*. Based on this data, our goal is to group sensors that have
observed (or are still observing) the same underlying phenomenon.

# 3 Related Works

This section reviews prior work on clustering sensors based on similarity. We begin by briefly presenting relevant papers, focusing on their objectives. Next, we discuss the various similarity metrics used, highlighting their limitations in the context of Massive IoT. We then do the same for the clustering methods. Finally, we position our contribution relative to this body of work.

The reviewed papers are categorized by their application domain, similarity
metric, and clustering method, as summarized in Table 1.

## 3.1 Reviewed Papers

Clustering techniques are used across several IoT domains. [22] analyzes cor-
relations between geographical and data-based similarities. In routing applica-
tions, especially for mesh networks, [8-10] propose hierarchical communication
schemes where sensors report to cluster heads. In data compression, [12,13] use
clustering to reduce redundancy by transmitting only representative models of
group data. [14] addresses the sensor selection problem, significantly reducing
the number of sensors needed for effective monitoring. In the context of fault
<table><caption>Table 1: Overview of related works in sensor similarity metrics and clustering methods.</caption><thead><tr><th>Ref</th><th>Field</th><th>Similarity metric</th><th>Grouping algorithm</th></tr></thead><tbody><tr><td>[22]</td><td>Similarity evaluation</td><td>Geographic distance<br>Jaccard coefficient<br>Cosine similarity<br>Pearson correlation coefficient</td><td>-</td></tr><tr><td>[8,9]</td><td>Routing</td><td>Geographic distance</td><td>K-means</td></tr><tr><td>[10]</td><td>Routing</td><td>Geographic distance</td><td>Density-based</td></tr><tr><td>[12]</td><td>Compression</td><td>Max difference (on data)</td><td>Partition into cliques</td></tr><tr><td>[13]</td><td>Compression</td><td>Mean difference (on data)<br>Similar trend counting</td><td>Partition into cliques</td></tr><tr><td>[14]</td><td>Sensor selection</td><td>Data summary statistics<br>Geographic distance</td><td>Partition-based<br>K-means<br>Gaussian mixture model</td></tr><tr><td>[11]</td><td>Fault detection</td><td>Pearson correlation</td><td>Gaussian mixture model</td></tr><tr><td>[15]</td><td>Scheduling</td><td>Max difference (on data)<br>Similar trend counting</td><td>Partition into cliques</td></tr><tr><td>[16]</td><td>Scheduling</td><td>Mean difference (on data)<br>Pearson correlation coefficient</td><td>Partition into cliques</td></tr></tbody></table>

detection, [11] proposes clustering sensors and flagging those that deviate from group behavior. Finally, [15,16] reduce network traffic by activating only a subset of sensors at any time—one sensor per cluster—rotating duties within each cluster to share load and preserve energy.

## 3.2 Similarity Measures

Among the reviewed works, similarity measures generally fall into two categories: geographic-based and data-driven.

Geographic similarity approaches [8-10,14,22] assume known sensor locations. These can be obtained through environmental fingerprinting [23] or signal analysis [24], but such methods are difficult to scale due to environmental variability and pre-deployment requirements. In a Massive IoT context, we consider these methods impractical due to limited adaptability.

Data-driven similarity metrics are generally preferred, as they do not require physical positioning. For example, [22] considers Jaccard and Pearson coefficients, also used in [11,16]. However, these approaches treat sensor data as samples, ignoring temporal information and thus losing meaningful patterns. [14] relies on summary statistics (e.g., mean, min, max of data), which also oversimplify the data.

Other works use similarity between synchronized time series: [22] uses cosine similarity, while [12,13,15] rely on max differences or trend comparisons. However, such methods compare pairs of data, hence assume uniform, synchronized transmission—an unrealistic assumption in Massive IoT scenarios.

To handle asynchronous and irregular data, transformation like DTW is an option. This method will be considered in the experimental part to adapt the existing methods to our new context. DTW compares two time series by
aligning them non-linearly to minimize distance despite differences in sampling or transmission times [25]. Given two sets of sensor observations $\theta_i$ and $\theta_j$ over intervals $T_i$ and $T_j$, DTW computes the optimal path through the distance matrix $(d(\theta_{i,t_i}, \theta_{j,t_j}))_{t_i \in T_i, t_j \in T_j}$, minimizing cumulative distance between the series. The pseudocode of this algorithm is presented in Algorithm 1.

<caption>**Algorithm 1** Normalized DTW algorithm. Time indices are simplified to $[1..n_i]$ and $[1..n_j]$ for clarity.</caption>

**Require:** $\theta_i = (\theta_{i,k})_{k=1..n_i}$, $\theta_j = (\theta_{j,l})_{l=1..n_j}$
1: Initialize $DTW[k, l] = |\theta_{i,k} - \theta_{j,l}|$
2: **for** $k = 2$ to $n_i$ **do**
3: &nbsp;&nbsp;&nbsp;&nbsp;$DTW[k, 1] = DTW[k - 1, 1]$
4: &nbsp;&nbsp;&nbsp;&nbsp;**end for**
5: **for** $l = 2$ to $n_j$ **do**
6: &nbsp;&nbsp;&nbsp;&nbsp;$DTW[1, l] = DTW[1, l - 1]$
7: &nbsp;&nbsp;&nbsp;&nbsp;**end for**
8: **for** $k = 2$ to $n_i$ **do**
9: &nbsp;&nbsp;&nbsp;&nbsp;**for** $l = 2$ to $n_j$ **do**
10: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$DTW[k, l] = \min\{DTW[k - 1, l], DTW[k, l - 1], DTW[k - 1, l - 1]\}$
11: &nbsp;&nbsp;&nbsp;&nbsp;**end for**
12: **end for**
13: **return** $\frac{DTW[n_i, n_j]}{n_i + n_j}$

Despite their flexibility, data-based methods can still produce false positives—e.g., sensors monitoring unrelated phenomena may show coincidentally similar behavior. Combining data-driven and spatial metrics may offer more robustness, though this is not explored here. We prioritize data-driven methods to avoid deployment overheads.

## 3.3 Clustering Methods

Clustering methods depend heavily on the nature of the similarity metric. K-means and density-based methods [8-11,14] assume an Euclidean embedding, which is unsuitable for complex or non-metric distances like those from sensor's data.

Other works use clique-based partitioning [12,13,15,16], requiring strong pairwise similarity between all cluster members. This is problematic with sparse and noisy data, where few such links may exist. Moreover, all the reviewed clustering methods assume full comparability between sensors—an assumption not considered in our context. In our setting, many sensors may not be directly comparable due to incoming and outgoing sensors over time.

## 3.4 Positioning This Work
This study addresses the specific challenges posed by Massive IoT, as defined in Section 2. These challenges include the presence of heterogeneous and asynchronous sensors, the irregular and sparse nature of data transmissions, and the absence of physical positioning information for the devices.

Unlike prior work, our method performs clustering based solely on the observed messages, without requiring synchronization, regular sampling, or full sensor comparability. Our contributions are:

* A robust similarity metric for noisy, asynchronous, and irregular time series,

* A clustering algorithm capable of grouping sensors monitoring the same phenomenon, even with non-overlapping observation windows.

# 4 Similarity Metric: Mean Difference between Interpolations of Sensors Observations

<figure><img src="image_2.png" /><figcaption>Figure 1: Representation of two sets of observations. Orange diamonds and dashed green squares represent observations from two sensors, with time on the x-axis and observation values on the y-axis.</figcaption></figure>

As part of our assumptions, we consider that a sensor sends unsynchronized observations to other sensors with a variable transmission period. Furthermore, this sensor remains within the environment for a limited duration. An example of the observations sent by two sensors, which we aim to compare, is illustrated in Fig. 1.

In this section, we introduce a distance metric that relies on two key components. Firstly, we utilize an interpolation method named Kriging to convert irregular observations into a continuous representation. Subsequently, we define the distance between two sensors over their common time interval as the mean magnitude difference between their interpolations.

This section includes several symbols, most of which are also used in Section 5, which is why they are grouped in Table 2.

## 4.1 Kriging-Based Interpolation of an Observation Set

The observations are sent irregularly spaced and noisy, making direct comparisons challenging. Therefore, as an initial step, we propose to employ an inter-
<table><caption>Table 2: Symbols used in Section 4</caption><thead><tr><th>Symbol</th><th>Meaning</th></tr></thead><tbody><tr><td>θ</td><td>Set of sensor observations</td></tr><tr><td>T</td><td>Set of measurement time instants</td></tr><tr><td>θ<sub>t</sub></td><td>Observation sent at time t</td></tr><tr><td>γ<sub>θ</sub></td><td>Experimental variogram</td></tr><tr><td>γ̂<sub>θ</sub></td><td>Variogram model</td></tr><tr><td>n, s, r</td><td>Nugget, sill, and range as variogram model parameters</td></tr><tr><td>t̂</td><td>Interpolation instant</td></tr><tr><td>θ̂(t̂)</td><td>Interpolated value at instant t̂</td></tr><tr><td>K</td><td>Covariance matrix of known observations</td></tr><tr><td>k<sub>t̂</sub></td><td>Variance between the value at t̂ and the known observations</td></tr><tr><td>ψ̂</td><td>Weights of the interpolator</td></tr><tr><td>a(., .)</td><td>Beginning of the common interval</td></tr><tr><td>b(., .)</td><td>End of the common interval</td></tr><tr><td>δ(., .)</td><td>Duration of the common interval</td></tr><tr><td>d<sub>interp-mean</sub>(., .)</td><td>Mean distance between Kriging interpolations</td></tr></tbody></table>

interpolation method to transforms a set of observations into a continuous function, facilitating comparisons.

### 4.1.1 Justification of the Kriging Choice

An interpolation function is a mathematical function defined over all time points based on a set of noisy observations. Its objective is to minimize the average discrepancy between the interpolated function and the measured phenomenon. Numerous interpolation methods exist, as documented in [26]. Since the observed data is subject to noise, we aim to relax the constraint of passing through all data points. Consequently, certain methods like Spline are not applicable.

Kriging is an interpolation method based on Gaussian processes governed by prior covariances [27]. This approach is particularly well-suited for various noise reduction applications, as summarized in [28], as it allows the estimation and incorporation of measurement errors into the modeling. For instance, in [29], an experimental study demonstrated the superiority of Kriging over the inverse distance weighting method. Kriging has been applied in the domain of the IoT as well, such as in [30], where it was used to propose a sensor positioning solution based on the data they provide.
### 4.1.2 Principle of the Kriging and the Variogram

Kriging is an interpolation method based on Gaussian processes, where each observation is treated as a random variable. Thus, the variogram is a function that measures the variance between two observation values based on their temporal separation. It is employed in the Kriging model to estimate an interpolated value at a target time from known observations that are correlated (temporally close).

Since the true variogram is typically unknown, it is estimated using known observations. This estimation is obtained by initially calculating the experimental variogram. We denote by $\theta = \{\theta_t, t \in T\}$ the set of known observations, where $T$ represents the set of measurement time instants and $\theta_t$ is an observation value made at time $t$. Then, the experimental variogram $\gamma_{\theta}$ is computed for each pair of points, so that:

$$ \forall (t_1, t_2) \in T^2, \gamma_{\theta}(|t_1 - t_2|) = 0.5(\theta_{t_1} - \theta_{t_2})^2 $$

<figure><img src="image_3.png" /><figcaption>Figure 2: Illustration of the variogram model based on experimental variogram points. The variogram consists of three parameters: nugget, sill, and range. The closer (temporally) the distance between two observations, the more correlated the values. Beyond a certain threshold, defined by the range, observations that are too distant are no longer correlated.</figcaption></figure>

The data points of the experimental variogram are shown in Fig. 2 as red squares. Here, the horizontal axis represents the temporal distance between two observations, while the vertical axis displays the measurement of the experimental variogram between these two observations.

To create a continuous representation from this discrete experimental variogram, we fit these data points to a mathematical function known as the variogram model, denoted as $\hat{\gamma}_{\theta}$, and visualized in Fig. 2 by the black curve. This model serves to evaluate the correlation between two observations based on their temporal separation.
For example, spherical, exponential, and Gaussian models are characterized by three parameters and illustrated in Fig. 2:

* The nugget n: Signifies the variogram value when there is zero temporal distance between observations. It quantifies the amount of short-range variability in the data, essentially capturing measurement noise.

* The sill s: Represents the variogram value when the temporal distance becomes extensive enough that observation values are no longer correlated.

* The range r: Denotes the temporal distance at which the variogram reaches the sill value.

The generic version of the Gaussian variogram is for example given by:

$$ \hat{\gamma}(t_1, t_2) = n + s \left( 1 - e^{-\frac{(t_1 - t_2)^2}{r^2}} \right) \quad (1) $$

### 4.1.3 Calculations for the Simple Kriging

Kriging is an interpolation method rooted in statistical modeling. It assumes that each observation is a random variable with a finite mean and variance.

We present the result for the simple Kriging. The strong assumption here is that the mean expectation of values at all time instances is the same and known, assumed to be zero. In the case of ordinary Kriging (another Kriging modeling), the expectation is similar across all points and unknown; for universal Kriging, a polynomial trend model is incorporated.

Here, $\theta = (\theta_t)_{t \in T}$ constitutes the vector representing the set of known observations. Under the given assumptions, we assume $E[\theta_t] = 0$. The covariance matrix of the observation history vector is defined using the variogram model $\hat{\gamma}_{\theta}$ as follows: $K = E[\theta\theta^\top] = (\hat{\gamma}_{\theta}(t_1, t_2))_{t_1, t_2 \in T}$.

Our objective is to evaluate the value at the point $\hat{t}$. Let $\Theta_t$ denote the random variable representing the value at $\hat{t}$ (with $E[\Theta_t] = 0$). The covariance vector between the observation value to evaluate at $\hat{t}$ and the set of known observations is defined based on the variogram model: $k_{\hat{t}} = E[\theta\Theta_{\hat{t}}] = (\hat{\gamma}_{\theta}(\hat{t}, t))_{t \in T}$.

The core principle of Kriging is that interpolation at a point is defined as a linear combination of the observation values. Hence, the estimator at the point $\hat{t}$, denoted by $\hat{\theta}(\hat{t})$, is the sum of observation values weighted by the coefficient vector $\psi_{\hat{t}} = (\psi_{t, \hat{t}})_{t \in T}$:

$$ \hat{\theta}_{\hat{t}} = \sum_{t \in T} \psi_{t, \hat{t}} \theta_t = \psi_{\hat{t}}^{\top} \theta \quad (2) $$

From the definition of $\hat{\theta}_{\hat{t}}$, we can already establish through its expectation calculation that it is unbiased: $E[\hat{\theta}_{\hat{t}}] = \sum_{t \in T} \psi_{t, \hat{t}} E[\Theta_t] = 0$.

The weights are defined to minimize the expectation of the squared difference between the estimator and the quantity to predict at this new point $\hat{t}$: $\Delta(\hat{t}) = E[(\hat{\theta}_{\hat{t}} - \Theta_{\hat{t}})^2]$
By expanding this squared difference, we have:

$$
\begin{align*}
\Delta(\hat{t}) &= E[(\psi_{\hat{t}}^{\top} \theta - \Theta_{\hat{t}})^2] \\
&= E[\psi_{\hat{t}}^{\top} \theta \theta^{\top} \psi_{\hat{t}} - \Theta_{\hat{t}} \theta^{\top} \psi_{\hat{t}} - \psi_{\hat{t}}^{\top} \theta \Theta_{\hat{t}} + \Theta_{\hat{t}}^2] \\
&= \psi_{\hat{t}}^{\top} E[\theta \theta^{\top}] \psi_{\hat{t}} - 2E[\Theta_{\hat{t}} \theta^{\top}] \psi_{\hat{t}} + E[\Theta_{\hat{t}}^2] \\
&= \psi_{\hat{t}}^{\top} K \psi_{\hat{t}} - 2k_{\hat{t}}^{\top} \psi_{\hat{t}} + \sigma_{\hat{t}}^2
\end{align*}
$$

Where $\sigma_{\hat{t}} = \sqrt{E[\Theta_{\hat{t}}^2]}$, independent of $\psi_{\hat{t}}$.

We aim to find the vector $\psi_{\hat{t}}$ that minimizes $\Delta(\hat{t})$. The derivative with respect to each $\psi_{t,\hat{t}}$ is zero, resulting in:

$$
\begin{align*}
\frac{\partial \Delta(\hat{t})}{\partial \psi_{\hat{t}}} &= 2K\psi_{\hat{t}} - 2k_{\hat{t}} = 0 \\
\Leftrightarrow \quad \psi_{\hat{t}} &= K^{-1}k_{\hat{t}}
\end{align*}
$$

$K$ is a symmetric matrix, so $K^{-1}$ is a symmetric matrix. Hence, eq.(2) leads us to the expression of the estimation $\hat{\theta}(\hat{t})$:

$$
\hat{\theta}(\hat{t}) = k_{\hat{t}}^{\top} K^{-1} \theta
$$

Therefore, for the computation of $\hat{t}$, it is necessary to define $K$ and $k_{\hat{t}}$ based on the variogram model $\gamma_{\theta}$ and invert the matrix $K$. For any new time when an estimation is required, it is only necessary to redefine $\hat{t}$.

## 4.2 Distance Based on Mean Magnitude Difference

Let the sets of observations from sensors $i$ and $j$ defined by $i: \{\theta_{i,t}, t \in T_i\}$ and $j: \{\theta_{j,t}, t \in T_j\}$, so that $\hat{\theta}_i(t)$ and $\hat{\theta}_j(t)$ be the interpolations obtained using the Kriging-based interpolation. We use the mean magnitude difference to evaluate the distance between two interpolations over their common definition interval, as schematically represented in Fig. 3.

<figure><img src="image_4.png" /><figcaption>Figure 3: Interpolations of the sets of observations illustrated in Fig. 1, depicted as solid orange and dashed green lines. The vertical dashed lines indicate the common temporal domain of the two interpolations $[a(.,..), b(.,..)]$. The area between the two interpolations over the common definition interval is represented by the red filling.</figcaption></figure>

Firstly, the interpolations can only be compared over their common definition interval. If there exists a common definition interval between $i$ and $j$, we
denote it by $[a(i, j), b(i, j)]$. This interval begins at the time of the sensor that arrived the latest and ends at the time of the sensor that leaves the earliest:

$$a(i, j) = \max\{\min\{t \in T_i\}, \min\{t \in T_j\}\}$$

$$b(i, j) = \min\{\max\{t \in T_i\}, \max\{t \in T_j\}\}$$

Hence, the duration of the common definition interval, denoted by $\delta(i, j)$, is defined by:

$$\delta(i, j) = \max\{0, (b(i, j) - a(i, j))\} \qquad (3)$$

Furthermore, since the interpolation method aims to minimize the average difference between the ground truth and the estimation, we define the distance $d(i, j)$ as the mean magnitude difference between the interpolations. If the duration of the common definition interval is not zero, it can be mathematically expressed as:

$$d_{\text{interp-mean}}(i, j) = \frac{1}{\delta(i, j)} \int_{a(i, j)}^{b(i, j)} |\hat{\theta}_i(t) - \hat{\theta}_j(t)| dt \qquad (4)$$

# 5 Weighted Mean Linkage Hierarchical Clustering

In this section, we propose a method that leverages the previously presented similarity measure to cluster sensors deemed similar, using an AHC approach.

We begin by presenting the fundamentals of AHC, followed by a justification for choosing this method for our clustering task. We introduce our novel linkage method designed to best address the specificities of the problem. Finally, we detail two different stopping criteria and their application in the simulation phase.

## 5.1 Agglomerative Hierarchical Clustering Basics

### Algorithm Principles

AHC is a clustering method that iteratively merges clusters [31]. Initially, each object (sensor) is treated as an individual cluster. At each iteration, the two closest clusters are merged to form a new cluster. This process reduces the number of clusters by one in each iteration, continuing until a stopping criterion is met. The stopping criterion can be either the final number of clusters or a predefined cluster distance.

### Linkage Method

An essential aspect is defining the distance between clusters. The method that uses inter-object distances to determine inter-cluster distance is known as the *linkage method*. In Fig. 4, we illustrate several linkage methods: single-link (the
smallest distance between any pair of objects from different clusters), complete-link (the largest distance between any pair of objects from different clusters), and average-link (the average of all pairwise distances between objects from different clusters).

<figure><img src="image_5.png" /><figcaption>Figure 4: Examples of single, complete, and average linkage methods from [32].</figcaption></figure>

## 5.2 Specification of the Clustering Problem

In our specific context, an object represents a sensor, its set of observations, and its Kriging-based interpolation over a specific time interval. Here, the calculation of distance is not as straightforward, which is why we have dedicated a specific section to it. Thus, we were able to define a distance (which can be None) $d(.,.)$ and a common definition interval duration $\delta(.,.)$ between two sensors.

This introduces specific considerations in devising a clustering solution:

* Some pairs of sensors may have an unknown distance due to disjoint intervals, making it impossible to determine their proximity.

* The duration of the common definition interval is a critical indicator of the distance measure's quality; a distance calculated over a longer period is more significant than one computed over a short duration.

## 5.3 Justification for Choosing AHC

In a typical clustering problem, objects are considered with *n* variables, and the goal is to group objects close in an *n*-dimensional space [33-36]. In our case, we constructed the distance *d*(.,.), which lacks some distance properties (notably the triangle inequality). Additionally, this distance may be undefined for some sensor pairs. Existing methods for handling missing data are suitable when few data are missing; however, as shown in the simulation section, in our scenario, only 10% of sensor pairs are comparable.

Clustering methods from the literature, discussed in related works (Section 3), such as clique partitioning, are inapplicable because a similarity graph cannot account for undefined similarity links between sensors. Methods like k-means or density-based clustering consider *n*-dimensional spaces with fully defined distances between sensor pairs.
Unlike others, AHC do not necessitate all distances between sensors to exist, as the algorithm merges sensors with defined distances first. We will show that with our cluster distance definition, the clustering method can compare indirectly comparable sensors. Additionally, our linkage method exploits the common definition interval duration, a crucial factor for assessing distance reliability.

## 5.4 Weighted Mean Linkage Method

Various common linkage methods involve linear combinations of distances between cluster elements. Here, we adapt the average-link to better suit our problem. We weight distances by the common definition interval duration, giving more importance to distances calculated over longer periods.

Let $d(i, j)$ be the distance between sensors $i$ and $j$ calculated using the method described in eq. (4), and $\delta(i, j)$ the duration of their common definition interval, as defined in eq. (3). For non-comparable sensors, $\delta(i, j) = 0$ and $d(i, j) = None$, and our convention sets $\delta(i, j)d(i, j) = 0$.

We define the distance between two clusters as the mean of distances between pairs of objects from different clusters, weighted by their common definition interval duration. Considering $i \in I$ as the set of sensors in cluster $I$, and $j \in J$ for $J$, the distance between clusters $I$ and $J$ is given by:

$$D(I, J) = \frac{\sum_{i \in I} \sum_{j \in J} \delta(i, j)d(i, j)}{\sum_{i \in I} \sum_{j \in J} \delta(i, j)}$$

(If all distances between $i$ and $j$ are unknown, then by convention, $D(I, J) = None$, and we do not merge $I$ and $J$.)

For this linkage method, we use the Lance-Williams algorithm for hierarchical clustering implementation [37], updating cluster distances at each merging step. First, we extend the notation $\delta(.)$, with $\delta(I, J)$ as the sum of the common definition interval duration between each sensor from $I$ and $J$. Mathematically, $\delta(I, J) = \sum_{i \in I} \sum_{j \in J} \delta(i, j)$.

Denoting the cluster composed of elements from clusters $I$ and $J$ as $I + J$, after merging, we update its distance with another cluster $K$. The update formulas are as follows:

$$D(I + J, K) = \frac{\delta(I, K)}{\delta(I, K) + \delta(J, K)} D(I, K) + \frac{\delta(J, K)}{\delta(I, K) + \delta(J, K)} D(J, K) \\ \delta(I + J, K) = \delta(I, K) + \delta(J, K)$$

As a reminder of the AHC algorithm, in each round, we merge clusters with the smallest distance $D$ based on this distance definition.

## 5.5 Stopping Criterion

The stopping criterion for this AHC method is crucial for its performance and will be discussed in the simulation section. We will consider two types of stop-
ping criteria.

Firstly, to fairly evaluate the proposed approach against a comparative clustering method introduced in the simulation section, we will use the maximum number of clusters as the stopping criterion. This comparison method employs a different distance definition, necessitating a consistent criterion for fair evaluation.

However, arbitrarily defining the final number of clusters is not always optimal for achieving the best performance [37]. Therefore, in the second part of the simulation, we propose an alternative stopping criterion that sets a threshold for the maximum distance between clusters. This threshold is specific to our distance definition and is not applicable to the comparative clustering method. We will then assess the performance of each stopping criterion, including their robustness when increasing measurement noise.

# 6 Performance Evaluation

In this section, we present a series of experiments designed to simulate a representative Massive IoT scenario. We introduce our proposed clustering method and compare its performance against a baseline derived from established techniques in the literature.

To simulate realistic conditions, we generate two distinct continuous phenomena, each constrained to a narrow range of values to induce relatively high correlation levels. Sensors are assigned to observe one of these phenomena and transmit noisy measurements at irregular intervals. Each sensor remains active in the environment for a limited time, with only about 10% of the total sensors present and transmitting at any given moment. The goal is to cluster sensors that observe the same phenomenon, despite their asynchronous and transient behavior.

Given the complexity of replicating all these assumptions in a real-world setup, we rely on a simulation-based framework. This controlled environment uses random variables to model the generation of physical phenomena, sensor message transmissions (including losses), and sensor activation/deactivation, mimicking the dynamics of a battery-powered and resource-constrained IoT system. A detailed description of the simulation parameters is provided in Table 3.

We conduct two main experiments. First, we evaluate the performance of our proposed method under fixed measurement noise and compare it against a baseline drawn from the literature, which combines DTW for time series similarity with an AHC algorithm based on clique partitioning. Second, we assess the robustness of both approaches by varying the level of measurement noise and examining the behavior of our method under the two proposed clustering stopping criteria.
<table><caption>Table 3: Parameters of the simulation</caption><thead><tr><th>symbol</th><th>Meaning</th><th>Value(s)</th></tr></thead><tbody><tr><td colspan="3"><em>Phenomena Parameters Section 6.1.1</em></td></tr><tr><td>ω<sub>i</sub>, φ<sub>i</sub></td><td>Frequencies of signal <i>i</i></td><td>U(0, <sup>2π</sup>&frasl;<sub>30</sub>)</td></tr><tr><td>α<sub>i</sub>, β<sub>i</sub></td><td>Amplitudes of signal <i>i</i></td><td>U(-100, 100)</td></tr><tr><td colspan="2">Rescaling of the phenomena values</td><td>[-1, 1]</td></tr><tr><td colspan="3"><em>Sensors Observations Section 6.1.2</em></td></tr><tr><td>λ</td><td>Sensor arrival rate</td><td>0.1</td></tr><tr><td>1/γ</td><td>Average number of sent observations</td><td>1</td></tr><tr><td>μ</td><td>Sensor existing time rate</td><td>0.01</td></tr><tr><td colspan="2">End of Simulation</td><td><i>t</i> = 1000</td></tr><tr><td colspan="2">Sensors Considered in simulation</td><td>Alive at <i>t</i> = 200</td></tr><tr><td colspan="3"><em>V-measure Parameter Section 6.3</em></td></tr><tr><td><i>a</i></td><td>Weight given for Homogeneity</td><td>1</td></tr><tr><td colspan="3"><em>Evaluation Using a Comparative Method Section 6.4</em></td></tr><tr><td colspan="2">Max nb of clusters</td><td>3</td></tr><tr><td>σ</td><td>Std of Gaussian noise</td><td>0.2</td></tr><tr><td colspan="3"><em>Robustness to Noise Variations Section 6.5</em></td></tr><tr><td>C</td><td>Zero noise threshold</td><td>0.1</td></tr><tr><td>k</td><td>Noise dependent threshold</td><td>0.8</td></tr><tr><td>σ</td><td>Std of Gaussian noise</td><td>{0 + 0.05<i>i</i>,<br>0 ≤ <i>i</i> ≤ 10}</td></tr></tbody></table>

# 6.1 Generation of Phenomena and Sensor Observations

The assumptions regarding the phenomena, sensor inputs and outputs, as well as the transmitted observations, are presented here in detail, and visible in Fig. 5.

## 6.1.1 Generation of Phenomena

We define a phenomenon using a continuous function over time. In this study, we consider two phenomena, each generated in the same way. Specifically, the generic function is given by:

$$f(t) = \sum_{i=1}^{30} (\alpha_i \cos \omega_i t + \beta_i \sin \phi_i t)$$

For each $i \in \{1, 30\}$ and for each of the two phenomena, the constants $\alpha_i$ and $\beta_i$ are chosen from a uniform distribution $U(-100, 100)$, and the frequencies $\omega_i$ and $\phi_i$ are chosen from a uniform distribution $U(0, \frac{2\pi}{30})$ (ensuring a minimum oscillation period of 30, limiting the variability). Then, we rescale the function to the range [-1, 1], compressing the phenomena values into a small value segment. We keep the same phenomena for all the simulation parts, and they are depicted in Fig. 6(a,b).
<figure><img src="image_6.png" /><figcaption>Figure 5: Representation of the phenomena, sensor inputs and outputs, and the transmitted noisy observations.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>Figure 6: (a,b) Value variations of the Phenomena: (a) in their entirety, (b) zoomed between $t = 200$ and 400.</figcaption></figure>
6.1.2 Generation of Sensors Observations

<figure><img src="image_8.png" /><figcaption>Figure 7: (a,b) One observation sampling with a noise level of σ = 0.2, (a) targets the time interval between t = 400 and t = 600, and (b) focuses on the shorter span from t = 400 to t = 420. Each sensor’s observations are color-coded for distinction. Sensors tracking phenomenon 1 are represented by square markers, while those monitoring phenomenon 2 are indicated by circles. Solid squares colored in yellow and black, unlike others that have hollow markers, are selected as examples to demonstrate the variabilities encountered in the simulation.</figcaption></figure>

Each sensor follows one of the two phenomena, the same one for its total time
in the system, and sends noisy observations of the phenomenon, with Gaussian
noise of standard deviation σ. New sensors enter the environment over time,
following a Poisson process with a rate of λ = 0.1 arrival per time unit, and
each of them follows one of the two phenomena with equal probability. The
duration of a sensor’s stay in the environment follows an exponential distribution
with a parameter of μ = 0.01. While in the environment, a sensor transmits
observations following a Poisson process with a parameter of γ = 1 per time
unit.

We terminate the simulation at *t* = 1000. To mitigate most cases where a
phenomenon ceases to be tracked by a sensor, we initiate the evaluation when
a sufficient number of sensors have entered the environment. Specifically, we
consider only sensors that remain active after *t* = 200.

We define an "observation sampling" as the generation of a new set of sen-
sors' observations. Observation sampling follows a random process; to achieve
average results, we will repeatedly run the simulation, generating new observa-
tion samplings each time. When comparing different methods, they are evalu-
ated using the same set of observation samplings to ensure consistency.

An example of observation sampling is shown in Fig. 7(a,b), which docu-
ments the total presence of 88 sensors. In Fig. 7(a), sensor observations between
t = 400 and t = 600 are displayed, where 25 sensors are active during this inter-
val. A more focused view between t = 400 and t = 420 shows 7 sensors present
in Fig. 7(b). The sampling illustrates significant variations induced by the use
of random processes, particularly highlighted through the observations marked
with solid squares in yellow and black.

As illustrated in Fig. 7(a), the sensor depicted in black with solid squares is active only from $t = 413$ to $t = 428$, while the sensor shown in yellow with solid squares remains active from $t = 410$ to $t = 710$ ($t = 600$ on the figure). On average, a sensor remains in the environment for a duration of $\frac{1}{\mu} = 100$, which often results in many sensor pairs having no overlapping periods of operation.

In the more precise zoom shown in Fig. 7(b), sensor messages are not trans-
mitted at regular intervals—for instance, among the 15 messages shown in black,
there is less than 0.01 seconds between two messages at $t = 413$ and more than
1.6 seconds between $t = 415$ and $t = 417$. This irregularity reduces the effec-
tiveness of distance metrics based on point-to-point calculations.

The messages are also quite noisy, with values reaching 1.5 at $t = 412$ for the yellow square messages, even though the maximum value of the phenomenon is 1. This level of noise makes distance metrics that evaluate maximum deviations or trends (such as increases or decreases between consecutive points) unreliable.

6.2 Kriging Parameter Settings

The Kriging requires fitting the experimental variogram to the variogram model. We have chosen the Gaussian model defined in eq. (1). In the survey [28], it was established that the choice of variogram model is relatively unimportant compared to the parameters associated with this model. Hence, we propose a robust method for fixing the variogram parameters.

In our simulations, we used the PyKrig package in Python, which we utilized
to create Kriging interpolations. This module can estimate the parameters of
nugget *n*, sill *s*, and range *r* based on a given variogram model. However,
since the sensor observations are randomly generated with random measurement
noise, the parameter estimation was not always accurate. In some cases, the
parameter estimation led to very strong variations in the interpolation (e.g.,
small range *r*), while in other cases, it resulted in a nearly linear interpolation
(e.g., very large range *r*).

To address this issue, for a given observation sampling, we assume that sets of
observations from each sensor have the same underlying form since they are gen-
erated using the same random laws; therefore, they should be interpolated with
the same variogram model. To achieve this, for a given observation sampling,
we fix the parameters *n*, *s*, and *r* that will be the same for all interpolations to
make.
For one observation sampling, for each sensor $i$, we estimate the triplet of parameters $n_i$, $s_i$, and $r_i$ using the fitting function provided by the PyKrig package. Consequently, for each parameter, we define the value for the variogram model across all sensors in the observation sampling as the median value.

## 6.3 Using V-measure to Evaluate Clustering Performance

To evaluate the performance of a clustering solution, we assess the clustering results in comparison to the true membership of sensors to their corresponding phenomenon. A so-called class is defined by one phenomenon and its related sensors, and we compare this set of classes with the set of clusters formed by the evaluated clustering method.

A method to evaluate the performance of a clustering algorithm when true labels are known relies on two measures: Completeness and Homogeneity, forming the V-measure. These measures are based on conditional entropy and provide a score ranging from 0 to 1; the mathematical expressions are developed in [38].

On the one hand, Homogeneity evaluates the proportion of a cluster containing elements from the same class. In the extreme case, a clustering with perfect Homogeneity would involve constructing a cluster for each object.

On the other hand, Completeness evaluates the proportion of a class being grouped into the same cluster. In the extreme case, a clustering with perfect Completeness would involve constructing a single cluster containing all objects.

A score of 1 corresponds to perfect Completeness (respectively Homogeneity), while 0 indicates null Completeness (Homogeneity).

These two metrics characterize two main aspects of a clustering performance. The weighted harmonic mean by $a$ (that we choose $a = 1$), known as V-measure, is defined as:

$$V-measure = \frac{(1 + a)Homogeneity \times Completeness}{a \times Homogeneity + Completeness}$$

## 6.4 Evaluation Using a Comparative Method

We begin by assessing our proposal in comparison to alternatives found in the literature, introducing a comparative similarity metric and clustering algorithm.

Subsequently, we evaluate the various possible combinations, opting for either our proposed method or the comparative one, for each of the two components of the clustering methodology. We demonstrate the effectiveness of each proposal compared to the alternative ones.

### 6.4.1 Comparison Similarity - Dynamic Time Warping

Due to the non-synchronicity of observations, conventional distance metrics for time series, which rely on observations at identical instances, are not directly applicable. In [15,16], which also aim to create groups of similar sensors, the similarity metric between two sets of observations is based on the maximum
difference between pairs of observations made at the same instants and on sim- ilar trends (rise or fall). However, observations between sensors are not syn- chronized, and with measurement noise, neither of these metrics seems to be suitable.

Still, algorithms based on time series that could address such variability exist, with DTW being a notable example. As detailed in the related work section Section 3, DTW aims to measure the similarity between two time series, accommodating temporal shifts or differences in sampling between the compared time series. In this simulation, we choose the distance function as the absolute difference between the two compared values d ( θ$_{i,t}$$_{i}$ , θ$_{j,t}$$_{j}$ ) = | θ$_{i,t}$$_{i}$ − θ$_{j,t}$$_{j}$ | .

6.4.2 Comparison Clustering - AHC with Complete Linkage

Talking about the clustering method, we propose to compare our solution to an approach extracted from the literature, specifically the solution proposed in [15,16]. In these references, the sensors transmit observations at exactly the same time points. Two sensors are defined as similar if the maximum amplitude difference between their observations does not exceed a threshold. The problem is thus formulated as a sensor graph where the edges represent similarity links. They have developed an algorithm that performs clique partitioning, meaning a partition of the sensor set such that each group contains sensors that are all mutually similar.

To enable a comparison between our approach and the one proposed in the literature on a common ground, we keep the main clustering algorithm, and change their features. Specifically, we decide to adapt this principle to the AHC algorithm. Drawing an analogy with the clique partitioning method, we choose a complete linkage method [39]. This linkage method defines the distance between two clusters as the maximum existing distance between each pair of objects from different clusters:

$$
D(I, J) = \max\{d(i, j), d(i, j) \neq \text{None}, i \in I, j \in J\}
$$

Thus, at each stage, we merge the two clusters that have the lowest distance, hence restricting the maximum distance between two sensors that belong to the same cluster.

6.4.3 Setting the Maximum Number of Clusters

As mentioned in Section 5.5, to ensure a fair comparison between the two com- parison methods, we need to choose a stopping criterion that is not dependent on the distance, hence the choice of the maximum number of clusters.

For our settings, the ideal number of clusters is 2, one cluster containing the sensors following the first phenomenon, and the second containing those following the second phenomenon. However, due to simulations driven by ran- dom variables, the created objects exhibit significant variability. We conduct a substantial number of simulations, consistently regenerating sets of sensor ob- servations, revealing instances where the decision to have two clusters proved
suboptimal. We identified cases where choosing two clusters yields poor clustering results.

* Occasionally, a phenomenon might not be monitored by any sensors at a specific point in the simulation, resulting in the sensors before and after this point being grouped separately due to the absence of a common definition interval. In such cases, ideally, three clusters would better represent the scenario—two for the disjoint periods of the same phenomenon and one for the other phenomenon.

* When the overlap in the monitoring interval between sensors is minimal, and the phenomena themselves are overlapping, a pair of sensors monitoring different phenomena might end up with a very low measured distance between them. Consequently, these sensors might be mistakenly grouped together. It becomes crucial to isolate such pairs to avoid incorrect clustering, potentially necessitating an additional cluster.

* High noise levels or sensors that transmit very few observations over brief intervals can lead to significantly different readings compared to other sensors. Our clustering method sometimes inadvertently groups sensors tracking different phenomena and leaves such an outlier sensor isolated in its own cluster.

For these reasons, we opt to set 3 clusters. In this case, this choice is not always optimal, but it is a compromise to obtain sufficiently consistent groups and comparable results.

### 6.4.4 Simulation Settings

We aim to assess the relevance of our choices for the similarity metric and linkage method. With the comparative method we have just presented, we have the option to choose between two similarity metrics and two clustering methods. Firstly, for the similarity metric, we can opt for our proposal – which calculates the average difference between interpolations – or the DTW method. Secondly, for the clustering method, the two proposed approaches involve AHC, either using our weighted mean linkage or the complete linkage method.

By selecting a similarity metric and a clustering method, we obtain four different methods, allowing us to investigate the performance impact of altering one component of the methodology.

We set the measurement noise to $\sigma = 0.2$ and conduct 1000 observation samplings. The average performance along with the standard deviation of Homogeneity, Completeness, and V-measure can be observed in Table 4.

### 6.4.5 Discussion of the Results

Globally, we achieve a 23% improvement in terms of V-measure performance compared to the method we have chosen for comparison, demonstrating its superiority, which is evident in both Homogeneity (+28%) and Completeness (+16%).

The use of our similarity metric significantly enhances performance, with its application alongside the complete linkage method proving to be the second-most effective configuration in terms of Homogeneity and Completeness. The
<table><caption>Table 4: Clustering performance comparison using a similarity metric and a linkage method for AHC from both our proposed solution and the comparative approach, with a predefined number of final clusters set to 3 and sensor measurement noise $\sigma = 0.2$. Presentation of average values and standard deviations of Homogeneity, Completeness, and V-measure. Highlighting our contributions in **bold**.</caption><thead><tr><th rowspan="2">Similarity metric</th><th rowspan="2">Linkage method</th><th colspan="2">Homogeneity</th><th colspan="2">Completeness</th><th colspan="2">V-measure</th></tr><tr><th>Mean</th><th>Std</th><th>Mean</th><th>Std</th><th>Mean</th><th>Std</th></tr></thead><tbody><tr><td>Mean interpolation difference</td><td>Weighted mean</td><td>0.72</td><td>0.23</td><td>0.60</td><td>0.20</td><td>0.65</td><td>0.22</td></tr><tr><td>Mean interpolation difference</td><td>Complete</td><td>0.70</td><td>0.21</td><td>0.52</td><td>0.16</td><td>0.59</td><td>0.18</td></tr><tr><td>Dynamic time warping</td><td>Weighted mean</td><td>0.53</td><td>0.34</td><td>0.50</td><td>0.27</td><td>0.50</td><td>0.31</td></tr><tr><td>Dynamic time warping</td><td>Complete</td><td>0.60</td><td>0.22</td><td>0.43</td><td>0.17</td><td>0.50</td><td>0.19</td></tr></tbody></table>

key advantage of our similarity approach is its comprehensive consideration of all messages sent by a sensor. Unlike traditional time series-based methods like DTW, which focus only on the sequence of messages, our interpolation-based method incorporates the dimension of duration. It's important to note, however, that while the interpolation method is robust against irregular and noisy sensor data, it is a parametric method that performs best when the phenomena being monitored do not undergo abrupt changes. Additionally, we have selected the Kriging interpolation method, which is particularly effective at interpolating functions that are combinations of sinusoids.

Regarding different linkage methods, our linkage method enhances performance by 9% when combined with the mean interpolation difference similarity metric, although, interestingly, when using the DTW metric, applying either the complete linkage or the weighted mean linkage results in similar overall V-measure performance. Our objective was to consider the duration of the common comparison between compared sensors, giving more weight to pairs of sensors defined over a longer common definition interval. In contrast, complete linkage only retains the most significant distance and does not incorporate the duration of the common definition interval into its distance calculation.

## 6.5 Robustness of the Solution to Noise Variations

This section evaluates the robustness of our solution against variations in measurement noise.

The stopping criterion plays a crucial role in determining measurement performance. Consequently, we have implemented another thresholding method based on the distance between clusters.
### 6.5.1 Setting of the Threshold Based on Inter-cluster Distance

As explained in Section 6.4.3, the number of "optimal" clusters can vary, ranging from a minimum of 2 clusters to a potentially higher number due to the strong variability inherent in the considered simulation.

Hence, we propose a stopping criterion that is a threshold for the maximum distance between clusters.

Firstly, with zero noise, since the distance is based on interpolations over sets of irregular observations, when sensors belong to the same phenomenon, the distance is non-zero. The threshold for zero noise distance must, therefore, have a non-zero value.

Furthermore, as the noise increases, the distance between two sensors following the same phenomenon becomes larger. Analogous to confidence interval definitions, we set the threshold distance proportionally to the intensity of the measurement noise $\sigma$.

Thus, we define our threshold in a generic form:

$$D_{\text{threshold}} = C + k\sigma \quad (5)$$

<figure><img src="image_9.png" /><figcaption>Figure 8: (a) Average V-measure performances with zero noise, while varying the threshold distance parameter $C$. (b) Average V-measure performances with noise $\sigma = 0.2$, while varying the threshold distance parameter $k$, and with $C = 0.1$. The vertical line represents the chosen parameter value for $C$ and $k$, further used.</figcaption></figure>

To determine the appropriate values for parameters $C$ and $k$, we perform simulations. Initially, to set $C$ in eq. (5)—the threshold for zero noise—we conduct 1000 observation samplings under the condition of zero noise $\sigma = 0$. We evaluate the clustering performance for various $C$ values, applying our clustering method with the stopping criterion defined in eq. (5), and assess each simulation's performance by examining the V-measure. The results, showing the mean V-measures in Fig. 8(a), indicate that performance is relatively stable
<figure><img src="image_10.png" /><figcaption>Figure 9: Performance evaluation of our clustering solution (mean interpolation difference + weighted mean linkage method for AHC) under various levels of measurement noise, with a stopping criterion based on maximum number of sensors (solid blue line) and one based on threshold inter-cluster distance (dashed red line).</figcaption></figure>

(a) Mean Homogeneity, (b) Mean Completeness, and (c) Mean V-measure of clustering results for the two compared solutions. (d) Average number of final clusters when using the distance-based inter-cluster stopping criterion.
for *C* values within the range [0.05, 0.28], producing V-measure values between [0.925, 0.932]. Based on these findings, we choose *C* = 0.1.

After setting *C*, we determine *k* using the same process, this time with
noise set at *σ* = 0.2 and *C* = 0.1, performing 1000 observation samplings and
evaluating the thresholding method's performance for different *k* values. The
V-measure results, presented in Fig. 8(b), suggest a performance plateau for *k*
within [0.5, 1], with scores between [0.694, 0.702]. We select *k* = 0.8.

These observations confirm that a broad range of values for *C* and *k* yield
consistently effective clustering performance.

6.5.2 Evaluation of the Clustering Performance for Different Noises

We evaluate the robustness of our clustering method by analyzing its response
to varying levels of measurement noise. Our methodology integrates a similarity
metric derived from the average amplitude difference between kriging interpo-
lations, along with hierarchical clustering that employs a mean linkage method
weighted by the duration of common intervals. We assess the performance of
this configuration using two distinct stopping criteria for the clustering: lim-
iting the number of clusters to a maximum of three, and using a maximum
inter-cluster distance threshold set at D<sub>threshold</sub> = 0.1 + 0.8σ.

Considering that phenomena values range between -1 and 1, we conduct
1000 observation samplings for each noise level σ = {0 + i * 0.05, 0 ≤ i ≤
10}. The evaluation results are illustrated in Fig. 9, where we display metrics
such as Homogeneity (a), Completeness (b), and V-measure (c). Additionally,
for the method that employs the stopping criterion based on the inter-cluster
distance, we document the average number of clusters formed at each noise level
in Fig. 9(d).

Overall, for both stopping criteria, noise significantly impacts clustering
performance, with an average V-measure decrease of 34% from zero noise to
σ = 0.25 when using the distance-based stopping criterion, and a decrease of
32% when fixing the final number of clusters. It's worth noting that, overall,
the formed clusters are more homogeneous than complete, given that there are
only two classes to cluster.

Comparing the two stopping criteria, when noise is low (σ ≤ 0.25), the
distance-based stopping criterion outperforms, both in terms of average Homo-
geneity and Completeness. On average, the final number of clusters is below 3
(2.7 clusters for σ = 0.25), which is advantageous compared to the maximum
cluster number stopping criterion. Thus, for σ < 0.25, there is a difference of at
least 7.8% in terms of mean V-measure in favor of the distance-based stopping
criterion.

However, as noise increases, the distance-based stopping criterion becomes
more sensitive. Indeed, with relatively high noise levels (σ > 0.35), the average
number of final clusters increases significantly (6.6 for σ = 0.4, 17.9 for σ = 0.45,
and 39.0 for σ = 0.5). This surge in cluster numbers might appear misleading
because it does not correspondingly impact completeness as expected. In the
simulations, there is a fluctuation between very low cluster counts (where a single
cluster yields perfect completeness) and very high cluster counts (resulting in lower completeness), leading to poorer overall V-measure performance for the distance-based threshold.

### 6.5.3 Discussion on the Use of Criteria According to Context

We have presented two stopping criteria for defining the final number of clusters. It has been shown that a criterion based on the distance between clusters can be advantageous when measurement noise is low. However, it is important to note that defining such a criterion requires a detailed study of environmental variations, particularly because measurement noise, which is not always known, plays a role in our criterion's definition.

Overall, the most suitable method depends on the study context. If the exact number of phenomena to be identified is known beforehand, then a criterion based on the final number of clusters is highly relevant. Conversely, if this number is unknown but there is information about the transmitted data, the second criterion is preferable. In general scenarios where the exact number of phenomena cannot be determined, the distance-based threshold should be defined according to the needs. A large threshold can be chosen to define broad clusters, identifying global phenomena, whereas a small threshold can be used to identify strong similarities.

## 7 Conclusion

In this study, we introduced a novel sensor deployment scenario based on the principles of Massive IoT, characterized by irregular and unsynchronized transmissions, and a dynamic environment with frequent sensor arrivals and departures. This generic scenario presents numerous challenges, particularly in sensor clustering, which is the focus of this contribution. Traditional similarity evaluation methods are typically limited to regular and/or synchronized data. We propose to address these issues by defining a new similarity metric based on the Kriging interpolator. The resulting clustering problem is atypical since some sensor pairs cannot be compared due to non-overlapping lifetimes. Our method addresses this by assigning greater weight to similarities calculated over longer common intervals between sensors. We demonstrated the effectiveness of our similarity metric and clustering approach in comparison to a state-of-the-art method, showing a 23% improvement in the V-measure. Additionally, we conducted a robustness study to evaluate our method's ability to accurately identify sensor groups under varying levels of measurement noise, discussing the choice of criterion for defining the final number of clusters.

We focused on real-time monitoring of physical quantities when data is not critical. In this context, the general goal is to provide a solution that requires no expertise for sensor deployment: sensors are casually dispersed in the environment or integrated into everyday objects. This approach significantly reduces
costs, aiming to further increase the adoption of intelligent IoT solutions. However, some scientific challenges still remain from developing a versatile solution for such uncertainties in the environment.

Future research would explore the next steps for using and expanding these clustering methods. Integrating these strategies into real-world applications, such as anomaly detection or message reduction, would further demonstrate the value of this work.

## References

[1] C.-W. Tsai, C.-F. Lai, M.-C. Chiang, and L. T. Yang, "Data Mining for Internet of Things: A Survey," *IEEE Communications Surveys & Tutorials*, vol. 16, no. 1, pp. 77-97, 2014.

[2] S. L. Ullo and G. R. Sinha, "Advances in Smart Environment Monitoring Systems Using IoT and Sensors," *Sensors*, vol. 20, p. 3113, May 2020.

[3] H. H. R. Sherazi, L. A. Grieco, M. A. Imran, and G. Boggia, "Energy-Efficient LoRaWAN for Industry 4.0 Applications," *IEEE Transactions on Industrial Informatics*, vol. 17, pp. 891-902, Feb. 2021.

[4] Y. Liu and K. Yang, "Communication, sensing, computing and energy harvesting in smart cities," *IET Smart Cities*, p. smc2.12041, Sept. 2022.

[5] A. Ikpehai, B. Adebisi, K. M. Rabie, K. Anoh, R. E. Ande, M. Hammoudeh, H. Gacanin, and U. M. Mbanaso, "Low-Power Wide Area Network Technologies for Internet-of-Things: A Comparative Review," *IEEE Internet of Things Journal*, vol. 6, pp. 2225-2240, Apr. 2019.

[6] N. H. Motlagh, E. Lagerspetz, P. Nurmi, X. Li, S. Varjonen, J. Miner-aud, M. Siekkinen, A. Rebeiro-Hargrave, T. Hussein, T. Petaja, M. Kul-mala, and S. Tarkoma, "Toward Massive Scale Air Quality Monitoring," *IEEE Communications Magazine*, vol. 58, pp. 54-59, Feb. 2020. Conference Name: IEEE Communications Magazine.

[7] H. Babbar, S. Rani, O. Bouachir, and M. Aloqaily, "From Massive IoT Toward IoE: Evolution of Energy Efficient Autonomous Wireless Networks," *IEEE Communications Standards Magazine*, vol. 7, pp. 32-39, June 2023. Conference Name: IEEE Communications Standards Magazine.

[8] Y. Zhao, K. Liu, X. Xu, H. Yang, and L. Huang, "Distributed Dynamic Cluster-Head Selection and Clustering for Massive IoT Access in 5G Networks," *Applied Sciences*, vol. 9, p. 132, Jan. 2019.

[9] S. K. S. L. Preeth, R. Dhanalakshmi, R. Kumar, and P. M. Shakeel, "An adaptive fuzzy rule based energy efficient clustering and immune-inspired routing protocol for WSN-assisted IoT system," *Journal of Ambient Intelligence and Humanized Computing*, Dec. 2018.
[10] A. A. Baradaran and K. Navi, "HQCA-WSN: High-quality clustering algorithm and optimal cluster head selection using fuzzy logic in wireless sensor networks," *Fuzzy Sets and Systems*, vol. 389, pp. 114-144, June 2020.

[11] Y. Yoo, "Data-driven fault detection process using correlation based clustering," *Computers in Industry*, vol. 122, p. 103279, Nov. 2020.

[12] D. Tulone and S. Madden, "An energy-efficient querying framework in sensor networks for detecting node similarities," in *Proceedings of the 9th ACM international symposium on Modeling analysis and simulation of wireless and mobile systems - MSWiM '06*, (Terromolinos, Spain), p. 191, ACM Press, 2006.

[13] F. R. Almeida, A. Brayner, J. J. Rodrigues, and J. E. B. Maia, "Focal Clustering and similarity measure: Two new approaches for reducing energy consumption in Wireless Sensor Networks," in *2016 Eighth International Conference on Ubiquitous and Future Networks (ICUFN)*, pp. 288-293, July 2016. ISSN: 2165-8536.

[14] D. Yoganathan, S. Kondepudi, B. Kalluri, and S. Manthapuri, "Optimal sensor placement strategy for office buildings using clustering algorithms," *Energy and Buildings*, vol. 158, pp. 1206-1225, Jan. 2018.

[15] C. Liu, K. Wu, and J. Pei, "An Energy-Efficient Data Collection Framework for Wireless Sensor Networks by Exploiting Spatiotemporal Correlation," *IEEE Transactions on Parallel and Distributed Systems*, vol. 18, pp. 1010-1023, July 2007. Conference Name: IEEE Transactions on Parallel and Distributed Systems.

[16] Z. Liu, W. Xing, Y. Wang, and D. Lu, "Hierarchical Spatial Clustering in Multihop Wireless Sensor Networks," *International Journal of Distributed Sensor Networks*, vol. 9, p. 528980, Nov. 2013. Publisher: SAGE Publications.

[17] M. Jouhari, N. Saeed, M.-S. Alouini, and E. M. Amhoud, "A Survey on Scalable LoRaWAN for Massive IoT: Recent Advances, Potentials, and Challenges," *IEEE Communications Surveys & Tutorials*, vol. 25, no. 3, pp. 1841-1876, 2023.

[18] A.-A. A. Boulogeorgos, P. D. Diamantoulakis, and G. K. Karagianni-dis, "Low Power Wide Area Networks (LPWANs) for Internet of Things (IoT) Applications: Research Challenges and Future Trends," Nov. 2016. arXiv:1611.07449 [cs].

[19] Y.-C. Tseng, C.-S. Hsu, and T.-Y. Hsieh, "Power-saving protocols for IEEE 802.11-based multi-hop ad hoc networks," in *Proceedings. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies*, vol. 1, pp. 200-209 vol.1, June 2002. ISSN: 0743-166X.
[20] G. Maudet, M. Batton-Hubert, P. Maille, and L. Toutain, "Energy Efficient Message Scheduling with Redundancy Control for Massive IoT Monitoring," in *2023 IEEE Wireless Communications and Networking, 2023. WCNC 2023.*, 2023.

[21] G. M. Dias, B. Bellalta, and S. Oechsner, "A Survey About Prediction-Based Data Reduction in Wireless Sensor Networks," *ACM Computing Surveys*, vol. 49, pp. 1–35, Sept. 2017.

[22] B. Q. Ali, N. Pissinou, and K. Makki, "Identification and Validation of Spatio-Temporal Associations in Wireless Sensor Networks," in *2009 Third International Conference on Sensor Technologies and Applications*, (Athens, Greece), pp. 496–501, IEEE, June 2009.

[23] K. Lin, M. Chen, J. Deng, M. M. Hassan, and G. Fortino, "Enhanced Fingerprinting and Trajectory Prediction for IoT Localization in Smart Buildings," *IEEE Transactions on Automation Science and Engineering*, vol. 13, pp. 1294–1307, July 2016.

[24] J. Jung, D.-o. Kang, and C. Bae, "Peer to peer signal strength characteristic between IoT devices for distance estimation," in *2014 IEEE World Forum on Internet of Things (WF-IoT)*, pp. 208–211, Mar. 2014.

[25] S. Salvador and P. Chan, "Toward Accurate Dynamic Time Warping in Linear Time and Space," in *KDD Workshop on Mining Temporal and Sequential Data*, vol. 11, pp. 70–80, Jan. 2004.

[26] C. Caruso and F. Quarta, "Interpolation methods comparison," *Computers & Mathematics with Applications*, vol. 35, pp. 109–126, June 1998.

[27] J. P. Kleijnen, "Kriging metamodeling in simulation: A review," *European Journal of Operational Research*, vol. 192, pp. 707–716, Feb. 2009.

[28] V. Picheny, T. Wagner, and D. Ginsbourger, "A benchmark of kriging-based infill criteria for noisy optimization," *Structural and Multidisciplinary Optimization*, vol. 48, pp. 607–626, Sept. 2013.

[29] D. Zimmerman, C. Pavlik, A. Ruggles, and M. P. Armstrong, "An Experimental Comparison of Ordinary and Universal Kriging and Inverse Distance Weighting," *Mathematical Geology*, vol. 31, no. 4, pp. 375–390, 1999.

[30] C. C. Castello, J. Fan, A. Davari, and R.-X. Chen, "Optimal sensor placement strategy for environmental monitoring using Wireless Sensor Networks," in *2010 42nd Southeastern Symposium on System Theory (SSST 2010)*, (Tyler, TX, USA), pp. 275–279, IEEE, Mar. 2010.

[31] G. N. Lance and W. T. Williams, "A general theory of classificatory sorting strategies: II. Clustering systems," *The Computer Journal*, vol. 10, pp. 271–277, Jan. 1967.
[32] P. Guevara, *Inference of a human brain fiber bundle atlas from high angular resolution diffusion imaging*. PhD thesis, University of Concepción, Oct. 2011.

[33] O. Maimon and L. Rokach, eds., *Data mining and knowledge discovery handbook*. New York: Springer, 2005.

[34] S. Déjean, P. G. P. Martin, A. Baccini, and P. Besse, "Clustering Time-Series Gene Expression Data Using Smoothing Spline Derivatives," *EURASIP Journal on Bioinformatics and Systems Biology*, vol. 2007, pp. 1-10, 2007.

[35] S. Aghabozorgi, A. Seyed Shirkhorshidi, and T. Ying Wah, "Time-series clustering – A decade review," *Information Systems*, vol. 53, pp. 16-38, Oct. 2015.

[36] T. W. Liao, "Clustering of time series data-a survey," *Pattern Recognition*, Nov. 2005.

[37] F. Murtagh and P. Contreras, "Algorithms for hierarchical clustering: an overview," *WIREs Data Mining and Knowledge Discovery*, vol. 2, no. 1, pp. 86-97, 2012. eprint: https://onlinelibrary.wiley.com/doi/pdf/10.1002/widm.53.

[38] A. Rosenberg and J. Hirschberg, "V-Measure: A Conditional Entropy-Based External Cluster Evaluation Measure," in *Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning*, Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning, 2007.

[39] A. Großwendt and H. Röglin, "Improved Analysis of Complete-Linkage Clustering," *Algorithmica*, vol. 78, pp. 1131-1150, Aug. 2017.