Placement of Social Digital Twins at the Edge for Beyond 5G IoT Networks

As the fifth-generation (5G) and beyond (5G+/6G) networks move forward, and a wide variety of new advanced Internet of Things (IoT) applications are offered, effective methodologies for discovering time-relevant information, services, and resources are being demanded. To this end, computing-, storage-, and battery-constrained IoT devices are progressively augmented via digital twins (DTs) hosted on edge servers. According to recent research results, a further feature these devices may acquire is social behavior; this latter offers enormous possibilities for fast and trustworthy service discovery, although it requires new orchestration policies of DTs at the network edge. This work addresses the dynamic placement of DTs with social capabilities [social digital twins (SDTs)] at the edge, by providing an optimal solution under IoT device mobility and by accounting for edge network deployment specifics, types of devices, and their social peculiarities. The optimization problem is formulated as a particular case of the quadratic assignment problem (QAP); also, an approximation algorithm is proposed and two relaxation techniques are applied to reduce computation complexity. Results show that the proposed placement policy ensures a latency among SDTs up to 1.4 times lower than the one obtainable with a traditional proximity-based only placement while still guaranteeing appropriate proximity between physical devices and their virtual counterparts. Moreover, the proposed heuristic closely approximates the optimal solution while guaranteeing the lowest computational time.


I. INTRODUCTION
B Y 2050, there will be 24 billion interconnected devices [1], meaning almost every object around us will be connected to the Internet, such as wearable devices, mobile phones, robots, electric meters, cars, and streetlights.Such devices will allow end users to enjoy a wide variety of innovative applications, ranging, for instance, from augmented reality (AR)/extended reality (XR) to autonomous assistance navigation [2], demanding high throughput, low latency, high reliability, and pervasive availability.
Although several countries are rolling out the fifthgeneration (5G) network, the requirements of most of the applications mentioned above are still hardly supported, hence motivating the research community to look ahead to beyond-5G solutions toward 2030.Among them, digital twins (DTs), acting as high-fidelity digital mirrors of physical entities, appear as the game changer to fully enable the digital transformation and cope with the increasing connectivity, computing, and storage demands of massively deployed heterogeneous Internet of Things (IoT) devices in 5G and beyond network scenarios [3].
As examined in [4], connectivity between physical and virtual counterparts, i.e., DTs, is an open issue attracting considerable interest, especially with a view to guaranteeing real-time data transfer [5].To this aim, there is a wide consensus on placing DTs at the network edge so to ensure lowlatency interactions with their physical counterparts located in proximity [6], [7].However, the decision about the proper placement of DTs has to account for the limited and heterogeneous resources at edge servers.Such decision becomes even more complicated when considering mobile devices in the physical realm that constantly trigger DT migrations among edge servers to ensure proximity to the physical devices.Recent works have addressed these issues; for instance, deep reinforcement learning (DRL) and an algorithm based on iteratively solving a series of minimum graph cuts have been leveraged, respectively, in [8] and [9], to approximate the optimal placement solution.
A further feature, which adds constraints to the placement policy, is the possibility for physical devices to establish mutual social relationships, e.g., according to the Social IoT (SIoT) paradigm, which has gained great popularity in recent years in the IoT research arena [10], [11].A social network of devices is created by establishing and maintaining different types of relationships, such as co-location, ownership, and parental, among others [10].Indeed, IoT applications can be conceived so to leverage data and services provided by "friend" devices.Their discovery, by navigating the social network graph, may be facilitated if we introduce so-called social DTs (SDTs) at the edge, used to expose the mentioned resource/services on behalf of the physical devices and also to keep trace of the social relationships dynamically established among their physical counterparts.As a consequence, a wise placement of SDTs must also be implemented to make the social network browsing quicker and more effective.
In light of the above, it is clear that the dynamic placement of DTs with social capabilities at the edge is a challenging decision to be taken when both user-and operator-centric requirements need to be simultaneously satisfied.In our previous work in [12], the issue has been addressed through the formulation of an initial optimization problem under basic conditions and without considering SDT mobility, as the main objective was to provide a proof of concept of the introduced paradigm.Differently, in this work, we propose a significantly extended study, which accounts for more realistic operational conditions and provides the contributions summarized as follows.
1) The design of an SIoT-Edge framework, closely aligned with the multiaccess edge computing (MEC) architecture, standardized by the European Telecommunications Standards Institute (ETSI) [13], wherein the proposed SDT placement, named enhanced social-aware closest edge placement (eSoCEP), is conceived as a functionality of the ETSI mobile-edge (ME) orchestrator.
2) The formulation of the optimal placement of SDTs as a quadratic assignment problem (QAP), which extends the preliminary formulation in [12] by accounting for different types of IoT devices, their social features, mobility patterns, and the limited computing resources of edge servers.
3) The design of an approximation scheme to find nearoptimal solutions and the application of approximation techniques addressing the challenge of the NP-hardness of the formulated optimization problem.4) The evaluation of the performance of the proposed algorithm against the formulated optimal solution through joined CPLEX and MATLAB simulations.5) The analysis of the time-dependent behavior of the SIoT-Edge system under conditions of device mobility for the dynamic SDT placement problem, and the consequent selection of the proper time interval duration between consecutive runs of the SDT placement strategy for the scenario of interest.6) The implementation of an extensive performance evaluation campaign aiming at studying the impact of the input parameters and of the social relationship types and device categories on meaningful performance metrics.The remainder of this work is organized as follows.An overview of related work is provided in Section II.In Section III, we illustrate the SIoT-Edge framework.In Section IV, we present the reference system model used for the solution of the dynamic SDT placement problem.Section V formulates the optimization problem as a particular case of the QAP.Section VI proposes an approximation algorithm and describes relaxation techniques for the SDT placement.Simulation results are reported in Section VII.The main findings of the study are summarized in Section VIII.Finally, in Section IX, conclusions are drawn and hints on future works are provided.

II. BACKGROUND AND MOTIVATIONS
Most existing works on the SIoT have focused on smart objects and their interconnection via social relationships, as well as on specific requirements and constraints raised in this domain.Examples of addressed research on this topic are IoT objects' social behavior understanding [14], service discovery [15], trustworthiness management [16], and critical security and privacy provisioning [17], among others.Thanks to more recent frameworks, platforms, and architectures [11], this research orientation is solid in its current form, as knowledge has already been accumulated through both theoretical and experimental studies.
As for DTs, in [3], its general concept has been examined by considering different functions, configurations, and patterns.In [18], a DT wireless network model has been designed to transfer data processing and computation to the network edge in real time.A vision of DT edge networks has been proposed in [19], where the offloading scheme is based on DRL, and DTs aid the offloading decision by estimating the states of edge servers.In [20], a framework has been introduced for improving the energy efficiency of services in a MEC system, where DTs are used to train the deep learning algorithm.A framework to track mobility has been presented in [21], where DTs retrieve mobility data of physical entities.In [22], a content caching mechanism with DT support has been designed for socially oriented vehicular edge networks.

A. Placement at the Edge
The problem of service placement, both in general and in the specific case of DTs, has been widely discussed in the scientific literature, and numerous solutions have appeared.Some existing works have investigated the possibilities of edge infrastructures to satisfy the latency constraints between a physical device and its DT [12].In [7], a cloudlet placement strategy has been proposed, taking into account the cost of deploying edge servers and the end-to-end latency between physical objects and their virtual entities.In [23], a service placement framework has been designed to achieve a tradeoff between latency and migration costs.In [24], a joint optimization on the service placement and access network selection has been studied to improve the Quality of Service (QoS).In [9], a service entity placement problem considering activation, placement, proximity, and co-location costs has been formulated and solved with an iterative algorithm.
Moreover, machine learning (ML) techniques for entity/service placement at the network edge have been recently investigated in [25] as a means to efficiently solve complex edge placement optimization problems, instead of formulating mathematically tractable heuristics.Decision tree-based algorithms have shown to be the best performing among supervised learning schemes.DRL and transfer learning are used in [8] to find the solutions of the optimal DT placement and migration problems, respectively.
Table I summarizes the main features of the closest related works, by highlighting the differences with our work.It emerges that the past literature does not cover the full convergence of virtualization and socialization capabilities of future IoT devices and applications, by also accounting for heterogeneous and resource-limited edge computing environments.

B. Contributions of the Work
This work aims to fill the aforementioned critical gap by contributing a framework and methodology for the dynamic placement of SDTs that build upon the SIoT, edge computing, and DT concepts.More specifically, SDTs should be placed as closer as possible to their physical counterparts to ensure low-latency interactions between IoT objects and corresponding SDTs.This can also help to reduce the amount of traffic traversing the edge network segment.In addition, social relationships have to be accounted for, since SDTs may likely need to interact with each other to offer SIoT-based services.SIoT objects may need to quickly interoperate and discover services with a low data footprint on the edge infrastructure by querying the social network.Hence, SDTs of friend SIoT devices should preferably be placed in close edge servers.
Both aspects have been accounted for in our early study in [12], where an optimal "static" SDT placement problem was formulated.However, the optimization was subject to strong assumptions which, although tolerable for carrying out an initial proof of concept, did not allow to exploit the proposed model in real scenarios, mainly due to the following limitations, which this article overcomes.First, a simple proximity-driven only SDT placement may not be feasible due to the limited resources of edge servers; it gets increasingly more difficult as the demands of the SDTs in terms of computing/storage resources get higher and heterogeneous, as expected under realistic circumstances.Second, the inter-SDTs latency should be minimized not in a myopic manner, but rather accounting for the specific relationship existing between the corresponding physical devices, which entails the exchange of data with different intensiveness.Third, efficient use of available resources plays a key role in satisfying the requirements of both users and operators.Fourth, a placement decision cannot be static.Instead, it shall account for the mobility patterns of physical IoT devices that may trigger repeated migrations of SDTs among different edge servers.Finally, the design and validation of an efficient heuristic solution were missing there, which are, instead, among the additional contributions of the present work toward the practical deployments of the proposed framework.

III. SIOT-EDGE FRAMEWORK: OVERVIEW
This section presents a general overview of the proposed SIoT-Edge framework for the dynamic placement of SDTs.Similarly to our early study [12], the reference architecture consists of a real-world layer and a virtualization layer [see Fig. 1(a)].The real-world layer represents the physical world that accommodates IoT objects interconnected with each other and to other entities through connectivity facilities.Social relationships among objects are assumed, which are set up according to the SIoT paradigm [10].For instance, the co-location object relationship (C-LOR) is established among objects located in the same place.The ownership object relationship (OOR) specifies connections among objects that belong to the same owner.The parental object relationship (POR) is defined among objects belonging to the same production batch.Social object relationships (SOR) is established due to sporadic or continuous contact of users/devices.
The virtualization layer is responsible for hosting the digital counterparts of physical devices [26], i.e., the SDTs.They offer the typical functionalities a digital counterpart provides, including caching and aggregation of the raw data transmitted by the IoT device, before IoT applications can process them.In addition, the proposed SDT stores metadata describing the device type and the established SIoT relationships.An IoT device, willing to query friend devices, discover services offered by them, and/or push data to them, needs to read the friendship information stored in its SDT.Once such a piece of information is retrieved, the SDT itself can interact with its peers on behalf of the physical device.
We assume that SDTs are deployed as a virtualized ME app (e.g., through containers) and instantiated in edge servers.The latter ones, referred to as ME hosts, in agreement with the ETSI MEC architecture [13], may be associated with base stations (BSs)/access points (APs).
In order to align our proposal with the ETSI MEC architecture [13], the SIoT-Edge framework components, as shown in Fig. 1(b), are considered.
In the ETSI MEC architecture, the ME orchestrator has visibility of the resources and capabilities of the entire edge network, made up of several ME hosts, and determines the most suitable ME hosts for instantiating the applications (i.e., ME apps) according to the application requirements (e.g., latency, processing, memory, etc.), available resources, and mobility conditions.In case a virtualized application needs to be relocated, the orchestrator triggers the migration procedure.
In the envisioned framework, the ME orchestrator is in charge of selecting the ME hosts wherein each SDT should be placed [see the corresponding functional module in Fig. 1(b)].Besides, in our design, the ME orchestrator may interact with an external SIoT server to get information about the current social relationships established by any given physical device to decide the most suitable placement of its SDT.In particular, the SIoT server may record the profiles of SIoT devices, their relationships, as well as activities.The location information of the objects can also be managed and then updated in the profile on the SIoT server.

IV. SYSTEM MODEL
This section outlines the reference system model and summarizes our modeling assumptions.Some of them are inherited from our previous work in [12] and shortly recalled here to make this article self-contained.Others have been specifically added to match the additional contributions of the work.Unlike [12], the system is assumed to operate according to a discrete timing based on a sequence of time slots t ∈ T = {0, . . ., T} with the duration of τ (in minutes), introduced to capture the mobility features and offer dynamic decisions.The assumption is quite common in [7], [23], and [27].Table II lists the basic notations employed in this work.

A. SIoT Devices and SDTs
We consider N IoT devices within the coverage area of M wireless APs (e.g., BSs and APs).At a given time instant, an IoT device i is assumed to be connected to a single AP/BS, particularly the closest one [28].A device i can move and change the connectivity point [see Fig. 2(b)].
Considered devices establish relationships according to the SIoT paradigm.The resulting social network is represented by a social-based graph G P (t) = (V P (t), E P (t)).The set of vertices in the graph G P (t), i.e., V P (t), corresponds to the IoT devices connected by links in set E P (t).The probability p ij (t), 0 ≤ p ij (t) ≤ 1, reflects the intensiveness of the data exchange between IoT devices i and j, and is associated with SIoT links.It is straightforward to assume that the p ij (t) value is strongly  correlated with the specific kind of social relationship established between the two physical devices [29].IoT devices tied by an OOR may need to frequently share data about the smart home/the smart car of the owner as well as her habits, preferences, and health status.This would not be the case for POR.
In case more than one relationship is established between two devices, the maximum p ij (t) value is utilized.

B. Network Edge
We consider an edge infrastructure consisting of M edge servers associated with each wireless AP/BS [28] and, unlike [7] and [12], equipped with heterogeneous capabilities.An edge server k has a finite amount of CPU, disk, and RAM resources, denoted as aCPU k , aD k , and aRAM k , respectively [30].Such servers are in charge of hosting SDTs, which are in turn associated with IoT devices.SDTs can store data and perform some processing, having specific CPU, disk, and RAM demands.The latter ones are indicated for an SDT i as CPU i (t), D i (t), and RAM i (t).
The edge network is represented by graph G S = (V S (t), E S (t)), where V S (t) is a finite set of edge servers, whereas E S (t) is a set of links between the edge servers.We reasonably assume that the number of IoT devices is larger than the number of edge servers, |V P (t)| = N > |V S (t)| = M, which does not limit the generality of the presentation.
The latency between each pair of edge servers k, l is given by L kl (t).Similar to [7] and [9], L kl (t) is estimated to be proportional to the distance between them.We denote as L ik (t) the latency between device i and its SDT located at edge server k.Similar to [31], for L ik (t), we neglect the delay over the radio interface and consider the latency between a BS that covers the device and an edge server that hosts the corresponding SDT.Hence, L ik (t) and L kl (t) are estimated as in [32] where is the distance to latency mapping coefficient, d ik (t) is the physical distance between the BS that serves device i and edge server k, whereas d kl (t) is the distance between edge servers k and l.

V. OPTIMAL SOCIAL DIGITAL TWIN PLACEMENT
We formulate the optimal SDT placement problem by targeting the following main objectives.
1) To jointly minimize the latency between each IoT device and its relevant SDT placed at an edge server and the latency between friends SDTs, while accounting for the relationship existing between the corresponding physical devices, and, hence, for the intensiveness of the expected data exchange.2) To ensure that delay bounds on the interactions between IoT devices and their SDTs are met, whenever requested.3) To guarantee the effective utilization of the available resources for heterogeneous SDT demands.Hence, we define the objective function to be optimized and the relevant constraints in the following.

A. Objective Function
We define the objective function as a cost to be minimized given the sum of two latency contributions.The first component includes the latency experienced between a physical device and the corresponding SDT and is given by where x ik (t) is the SDT placement decision variable and is equal to 1 if the SDT of device i is placed at edge server k at time slot t; otherwise, x ik (t) = 0, i.e., The second component of the objective function includes the latency among SDTs of friend devices at time slot t, i.e., the time required to communicate and discover services querying the friends on the virtualization layer, and is as follows: where x jl (t) is the SDT placement decision variable, x jl (t) ∈ {0, 1}.Hence, we define the total cost at time slot t as B. Constraints 1) Allocation Constraint: Allocation constraint is responsible for the placement of SDTs without replication.Since each SDT is allocated only to one edge server, we have the following constraint for SDT placement decision x ik (t): 2) Latency Constraint: Latency constraint is compliant with the idea of meeting the proximity constraint for the SDT of a given physical device and preserves a limitation on the latency between IoT device i and its SDT deployed at edge server k, which is upper bounded by L max i , i.e., 3) Resource Utilization Constraints: Resource utilization constraints guarantee efficient resource utilization while preventing the overload of a given edge server k.The constraints ensure SDT placement according to edge server resource availability and guarantee that the capacity constraint (i.e., CPU, THR CPU , disk storage, THR D , and RAM, THR RAM , utilization) for each edge server at time slot t is not violated when multiple IoT devices simultaneously share the computing resources to host the corresponding SDTs at edge servers

D. Complexity Analysis
Lemma 1: Optimal SDT placement in the dynamic largescale SIoT-Edge environment problem is NP-hard.
Proof: We conducted the proof in our previous work in [12] via a polynomial-time reduction from the QAP, which is known to be NP-hard [33].

E. Linearization
We aim to remove the nonlinearity of function (12), specifically (5), and perform the linearization of the objective function.When elaborating C 2 (t), we first denote the cost contributions related to the latency between the SDTs of IoT devices i and j placed at edge servers k and l at time slot t, respectively, as C ikjl (t), by replacing p ij (t)L kl (t).We reformulate (5) as follows [34]: We then define x ik (t) j∈V P l∈V S x jl (t)C ikjl (t) by introducing F ik (t) and express the minimization of C L (t) where f ik (t) is given by

VI. APPROXIMATION SOLUTIONS
Computing the optimal policy solution for the SDT placement is very difficult in practical cases.Indeed, as mentioned in Section V-D, it is an NP-hard problem.The solution via exhaustive search suggested in Section V can provide an optimal configuration for a small size network, but it turns to be of no practical use for large networks.This is why in this section we aim to design an approximation solution for the SDT placement problem that is simpler to compute while still achieving close-to-optimal performance.The algorithm carries out a relaxing transformation to simplify the original problem, and a graph-based heuristic is derived from it.We then introduce alternative known approximation techniques, i.e., the associated local branching (LB) and relaxation-induced neighborhood search (RINS) heuristics, which are also applied to our problem.

A. Proposed Graph-Based Heuristic
The QAP has been drawing researchers' attention worldwide because of its practical and theoretical importance as well as its complexity.The QAP is one of the most challenging combinatorial optimization problems.However, to the best of our knowledge, there is no theoretical proof concerning quality and computational time convergence, especially for large-scale dimension problems.We focus on achieving low enough execution time in this work while ensuring reasonable approximation to the optimal solution.
For the SDTs placement problem, we present an approximation algorithm, which is based on a graph-theoretic solution.The pseudocode of the graph-based heuristic is listed in Algorithm 1 and it is executed for each time slot t ∈ T .
The formulation of the approximation solution in terms of graph theory is as follows.Let G P (t) be a weighted connected graph, V P (t) be the set of vertices of graph G P (t) corresponding to the SDTs, and E P (t) be the set of links of the graph G P (t) defining the connections between the SDTs allocated at edge servers.Let V S (t) be a finite set of positions intended for assigning vertices of the graph G S (t) corresponding to the set of edge servers.
Algorithm 1 starts with the definition of a connected component G P (t) of graph G P (t), i.e., identification of individual connectivity components (line 3).It allows defining the number of strongly connected components in which a path from each vertex to another vertex exists.The algorithm considers each component separately (lines 5-16), starting from the strongest one between vertices of a component (lines [6][7][8][9][10][11][12]. Next, Algorithm 1 finds an approximating spanning subgraph or, in other words, a spanning tree (line 13).In the mathematical field of graph theory, a spanning tree T of an undirected graph G P (t) is a subgraph that is a tree, which includes all of the vertices of G P (t) with a minimum possible number of links.If all of the links of G P (t) are links of a spanning tree T of G P (t), then G P (t) is a tree and is identical to T. The advantages of spanning tree usage and, therefore, problem simplification are as follows.First, constructing a spanning tree takes a polynomial time when using well-known algorithms (e.g., Boruvka's, Prim's, Kruskal's, reverse-delete, greedy algorithms, etc.).Second, the problem of tree placement can be solved relatively quickly.
We then perform mapping (t) (line 15) by placing the vertices of graph G P (t), assuming that vertex i ∈ V P (t) is allocated in the position π(i) ∈ V S (t), such that any vertex of V S (t) can either accommodate vertices of V P (t) or accommodate no vertices.The set of all mappings of set V P (t) into set V S (t) is given by We specify the following parameters.First, the distance L ik (t) between vertex i ∈ V P (t) and position k ∈ V S (t), defined in terms of the latency of the connectivity between physical device i and its SDTs placed at edge server k.We refer to as distance L ik (t) the cost of placing vertex i ∈ V P (t) in position k ∈ V S (t).We then define: the weight of the edge p ij (t) associated with the probability of data exchanging between IoT devices; the distance L kl between positions k, l ∈ V S (t), defined in terms of the latency of the connectivity between edge server k and edge server l.The cost of communication between vertices i, j As we aim to allocate the vertices of graph G P (t) in positions V S (t) by minimizing the total cost of placing the vertices V P (t) to positions V S (t), the problem is formulated in terms of mappings as follows: Algorithm 1 determines the most suitable positions to host vertices of the spanning tree (T) to minimize the cost of spanning tree's vertices allocated to the set of positions G S (t) (19).The Algorithm terminates when all vertices of G P (t) are mapped onto positions belonging to G S (t) by satisfying constraints ( 4) and ( 7)- (11).
Complexity Analysis: The computational complexity of the proposed algorithm (Algorithm 1) is given by where n is the complexity due to the while cycle over all |G p (t)| = n vertices of graph G P (t) in the worst case when the number of connected components of graph G P (t) is equal to the number of graph vertices (lines 5-16).For the second component, which is inside the while cycle, n is the complexity due to the searching for the largest connected component in terms of the number of communications between vertices (lines 6-12).Since initially |G p (t)| = n and at each iteration one of the elements is removed, this inner loop runs n times first, then n − 1, n − 2, and so on until at the last iteration, the inner loop runs only once.The complexity of the sum 1 + 2 + • • • + (n − 1) + n is problematic to be precisely determined (lines 6-12).Instead, we find an upper limit for it, which is O(n).This means that every time the inner loop goes exactly n times.The complexity of lines 13-16 is O( 1), but it runs within while cycle, therefore, O(n • 1) = O(n), which does not change the complexity of the first component.As a result, the operations' numbers' upper limit is in O(n 2 ).
In contrast, the problem of optimal SDT placement in the dynamic large-scale SIoT-Edge environment has been formulated as a QAP, which is NP-hard.The NP-hard problems can be solved but not in polynomial time, i.e., there are no solutions that can offer the result within O(n k ) for any constant k ≥ 2.Moreover, QAP is one of the most challenging combinatorial optimization problems [35].While theoretical, algorithmic, and technological breakthroughs have resulted in large increases in the sizes of solvable issues for many wellknown NP-hard problems, QAP has remained a stand-alone class that appears to defy all attempts to solve it except for very small sizes [35].General form of QAP requires the specification of O(n 4 ) cost terms for C 2 (t) [36].Therefore, the lower limit of the number of operations for the dynamic large-scale SIoT-Edge environment problem is in O(n 4 ).
Hence, the conceived heuristic ensures a significantly lower theoretical complexity than the optimal problem formulation.

B. Classic Relaxation Techniques
The solution of the problem (12) can also be adopted by utilizing branch-and-cut or branch-and-bound techniques.In this work, we consider LB heuristic and RINS heuristic and compare them with the optimal solution as well as the proposed approximation algorithm.
1) LB Heuristic: LB is based on the idea of changing neighborhoods during the search for a better solution [37].LB is a technique designed, in principle, as an exact method.However, if the total time allocated to solve a given instance is reached before an optimal solution is found and its optimality is proved, then LB stops at the time with the best solution known as output (or, possibly, with no feasible solution).
2) RINS Heuristic: RINS is a heuristic that explores a neighborhood of the incumbent solution to find a new, improved incumbent [38].RINS constructs a promising neighborhood using information contained in the continuous relaxation of the mixed-integer programming (MIP) model.The neighborhood depends on the current incumbent solution and the current fractional solution of a branch-and-cut node.The neighborhood is formulated and explored as another MIP.This optimization is truncated by limiting the number of nodes explored in the search tree.

VII. EXPERIMENTAL EVALUATION
This section aims to assess the performance of the proposed SDT placement optimization strategy.First, we describe the conducted simulation campaign, including the considered scenario, settings, benchmark schemes, and metrics of interest.Then, we compare the results achieved through the optimal solution, the approximation solutions, i.e., the graph-based and the LB and RINS heuristics, and some benchmark placement schemes, by means of a simulator tool based on the IBM ILOG CPLEX Optimization Studio 12.10.0and MATLAB R2021b software.Simulation settings are reported in the remainder of this section and are summarized in Table III.

A. Simulation Settings 1) Network and Edge Deployments:
Similar to [39], we consider the city center of Santander (Spain), which roughly has an area of 4 km × 4 km.We assume the hexagonal grid cellular layout, in agreement with the Third Generation Partnership Project (3GPP) specifications [41], with M = 8 BSs.An edge server is associated with each BS, in agreement with ETSI documents [28].
2) SIoT Devices and Mobility: We evaluate the proposal on the basis of a realistic object behavior taken from the large data set2 generated in [39] that tracks device interactions based on real IoT objects 3 and the small world in motion (SWIM) mobility model [40].SWIM is based on a simple intuition on human mobility, i.e., people go more often to places close to their home and to the most popular places.We consider two device density settings (i.e., portions of the data set), namely, 50 and 100 users with N = 113 and N = 328 heterogeneous IoT devices, respectively, spanning from static devices to consumer devices carried by users moving in the selected area of interest (see Table III for the percentages of each category of IoT devices).
3) SDT Demands: An SDT is paired to each IoT device and implemented as a container in edge facilities [46].Without loss of generality, to account for the heterogeneity of IoT devices, we associate SDTs with four types of containers (based on the corresponding device types) according to the CPU demands [44] as presented in Table III.For example, cars with autonomous assistance navigation and smartphones might require high CPU for their SDTs; whereas SDTs of smartwatches and sensors and tablets, smart fitness devices, and printers might be associated with small and micro instances, respectively.As a further requirement, the maximum latency between a physical device and its SDT is uniformly distributed in the interval [1,10] ms [45].The latency is derived according to the geographical distance between any two entities deployed in the reference area [7], [9], [32] as described in Section IV-B.
4) SIoT Features: Social relationships are associated with each device in the data set.For the extracted 113 devices, the percentage of established relationships corresponds to 50%, 21%, 15%, and 14%, for OOR, C-LOR, SOR, and POR, respectively.Whereas for the 328 devices setup, the percentage of established relationships is as follows: 60% OOR, 8% C-LOR, 1% SOR, and 31% POR.
Unlike all the aforementioned settings, there are no specific clues about how to set the parameter p ij (t).Hence, without loss of generality, we consider a set of representative values throughout the simulation campaign to understand their impact on the conceived SDT placement strategy compared to solutions oblivious of the social relationship information (see the following).In particular, we fix p ij (t) = 0.1 for SOR and POR.The rationale behind these values is that IoT devices, either sporadically coming into contact (i.e., tied by an SOR relationship) or belonging to the same brand or product batch (i.e., tied by a POR relationship), are reasonably expected not to exchange big amount of data with a high frequency, but only upon some specific events, when compared to the other friendship types.For instance, devices tied by a POR may seldom exchange software updates.Data exchanges among objects of the same owner, i.e., those tied by an OOR relationship, may be frequent and huge, e.g., to synchronize personal/health data, to monitor the smart home, etc.Hence, we set for OOR p ij (t) = 1, and we vary it to be 0.1 and 1 for those devices tied by a C-LOR.However, it is worth remarking that the strategy is flexible enough to accommodate other settings.

5) Simulation Time:
The entire simulation covers a timelapse of 5 h.Within this period, we first simulate time slots t of duration equal to τ = 5 min [23].Then, we vary this setting up to 30 min in steps of 5 min.We determine the best time slot duration based on the analysis of simulation results.During each time slot t, we assume that the SDT placement does not change [23], [27].
6) Benchmark Schemes: We compare the optimal solution (labeled in the curves as eSoCEP) with the following approximation solutions and placement strategies.
1) Approximation Techniques: a) Proposed graph-based heuristic, as per Algorithm 1, labeled in the curves as eSoCEP Heuristic (see Section VI-A).b) LB [37], labeled in the curves as LB (see Section VI-B1).c) RINS [38], labeled in the curves as RINS (see Section VI-B2).2) Placement Strategies: a) Social-aware closest edge placement (SoCEP) of SDTs [12], labeled in the curves as SoCEP, which only takes into account proximity and social requirements without accounting for the specific nature of SIoT links, types of devices, network deployment specifics, and mobility.We also simulate the graph-based heuristic for SoCEP, labeled in the curves as SoCEP Heuristic.b) Closest edge placement (CEP), labeled in the curves as CEP, widely leveraged in the literature and also known as the FollowMe strategy, is representative of the approaches in [7], [9] and considered in [8] and [47] as a benchmark solution.According to CEP, SDTs paired with physical devices are always placed at the nearest edge server, by neglecting social features.c) Static placement, labeled in the curves as No Migration, is a strategy according to which SDTs are initially placed at the nearest edge server and keep the same placement throughout the whole simulation duration without migration possibilities [23], [48].It should be noticed that, for the sake of fair comparison, a dynamic placement is also triggered at every time slot for both SoCEP 4 and CEP.

7) Metrics of Interest:
We evaluate the performance of proposed and benchmark solutions by leveraging the following metrics.

1) Average Latency Between IoT Devices and Their SDTs:
We measure this metric as the average latency between a physical device and the edge server hosting the corresponding SDT. 2) Average Latency Among Friend SDTs: This metric refers to the average delay experienced between the SDTs of friend devices.3) Total Number of Migrated SDTs: This metric refers to the total number of SDTs migrated from one edge server to another during the whole simulation.

B. Heuristic Validation and Complexity Analysis
The first set of results aims to validate the effectiveness and efficiency of the proposed eSoCEP heuristic (for both N = 113 and N = 328) when compared to the optimal solution, the considered relaxation techniques (LB and RINS), and the benchmarks solutions.As one may observe in Fig. 3, eSoCEP and eSoCEP Heuristic preserve close values for all considered metrics and under all device density settings.This is especially true for the latency among friend SDTs for which values are significantly lower compared to the CEP and No Migration benchmarks.Instead, the device-SDT latency, although higher for the eSoCEP Heuristic compared to the optimal solution, is in any case bound by the proximity constraint in (8).
Furthermore, we analyze the average latency among friend SDTs per relationship type, as illustrated in Fig. 4(a) and (b).The optimal eSoCEP solution guarantees zero latency among OOR friends for N = 113 and the lowest values for N = 328.This implies that SDTs of friend devices are co-located in the same edge server, in alignment with the targeted objectives, well captured by the parameter p ij (t) set equal to 1. Higher latency values are measured for the other kinds of relationships.In particular, the highest latency values are experienced among POR friends in the case of N = 113 IoT devices, because devices establishing such a kind of relationship are more likely spread throughout the topology.
As a next step, we assess the computational complexity.To this aim, in Fig. 5, we report the algorithms' running time as a function of the number of devices in the system.We evaluate placement strategies via simulations on an Intel Xeon CPU E5 − 2620 v4 at 2.10 GHz with 19.7-GB RAM.
We start with the comparison of eSoCEP and SoCEP heuristics with the optimal solver.In eSoCEP, the introduction of stricter constraints on latency and resource usage (see Section V-B) as well as a linearization of the optimization function, which allows for faster optimal solution search (see Section V-E), lead to significant reduction in complexity.Contrarily to eSoCEP, the SoCEP strategy fails to scale as the number of devices and the average number of friends increase.Moreover, we note that LB and RINS (dashed lines) applied to the eSoCEP solution, respectively, decrease the running time on average by 7.5% and 11.5% compared to eSoCEP for the average number of friend IoT devices f equal to 4, and by 8.8% and 11.3% for f = 7.
From results in Fig. 5, it further emerges that the eSoCEP heuristic outperforms all the considered placement strategies and approximation solutions.It offers on average 43.3% and 46.9% reduction of the running time compared to the optimal solution for f = 4 and f = 7, respectively.For N = 328, such reduction is up to nearly 94%.Here, approximated spanning subgraph usage is beneficial for the following reasons.First, it is possible to construct a spanning subgraph in polynomial time by using well-known algorithms (see Section VI).Second, the problem of tree placement can be solved relatively quickly.The eSoCEP heuristic preserves low enough computational time regardless of f .Such a finding concerning the scalability of the proposed heuristic with the number of friends is particularly relevant, since IoT devices are expected to establish many relationships.What is more interesting is that the eSoCEP heuristic, representative of a more sophisticated SDT placement strategy, incurs the same computation time as the simplest CEP approach (violet line), whose detailed results are reported in the following.

C. Impact of the Time Slot Duration
So far, we have analyzed the results of the dynamic placement strategies when fixing the time slot to 5 min, similar to [23].In this section, we assess the results when varying the duration of the time slot (i.e., the frequency of the optimization recomputation) for the reference scenario.Fig. 6 reports the average latency contributions for different time interval duration, τ .In particular, in Fig. 6(a), it can be observed that the latency between the physical devices and their digital counterparts is sensitive to the setting of the time slot, whatever the considered dynamic placement strategy.The larger the time slot duration, the less frequent is the replacement of the SDTs.Hence, all the considered placement strategies hardly capture the device mobility, as witnessed by the increasing latency values when the time slot duration increases.This is especially true for the CEP strategy, whose latency values are almost doubled when passing from τ = 5 min to τ = 30 min.The CEP strategy exhibits the lowest latency, being specifically conceived to ensure that IoT devices have their SDT hosted in close proximity, neglecting the existence of social relationships.The proposed eSoCEP strategy outperforms SoCEP.If a static SDT placement (No Migration) strategy is enforced, the poorest performance is achieved with latency values that are nearly doubled compared to those measured for eSoCEP (averaged values through the entire simulation, not shown in the figure, are in the order of 3 ms).
When considering the latency among friend SDTs, Fig. 6 From Fig. 6(c), interestingly, it emerges that the proposed eSoCEP solution is more efficient than SoCEP.It can be observed that it always triggers a lower number of migration events compared to SoCEP.As a consequence, the overhead incurred by migration procedures is lower, i.e., a lower amount of data is exchanged over backhaul links interconnecting the edge servers acting as the source and destination of migrating SDTs.It can be further noticed that, unlike latency metrics, the total number of migration events is highly sensitive to the settings of the time slot, t.Such a finding suggests to further investigate the results for a specific τ value, i.e., 20 min, which allows for achieving a good tradeoff between the number of migration events and the latency metrics.

D. Impact of the Device Type
Under such settings, it is worth understanding the SDT migration dynamics per category of IoT devices.Fig. 7 shows the percentage of migration events at the end of each time slot, when a replacement is triggered, for two representative device categories, i.e., smartwatches and home sensors.Not surprisingly, the SDTs of smartwatches migrate more than the SDTs of home sensors.You can notice that, although associated with static devices, the latter may also migrate for SoCEP and eSocEP to satisfy the targeted constraints of proximity among SDTs of friend devices.Also, for the considered device categories, eSoCEP is more efficient than SoCEP.
To further shed light on the latency performance, the latency among friend SDTs is reported in Fig. 8 per relationship type.Here, we consider two settings for the proposed heuristic, namely, for bars labeled as eSoCEP Heuristic*, probability of data exchange corresponds to p ij (t) = 1 for OOR and C-LOR and p ij (t) = 0.1 for SOR and POR, whereas for bars labeled as eSoCEP Heuristic, p ij (t) = 1 for OOR and p ij (t) = 0.1 for C-LOR, SOR, and POR.
Let us remember that SoCEP does not distinguish the relationship type when placing SDTs.In alignment with the targeted objectives, among the compared schemes, eSoCEP (both considered settings) provides the lowest latency values for SDTs associated with IoT devices establishing OOR relationships.The eSoCEP Heuristic* achieves a lower latency value for C-LOR as well, when compared to the other dynamic strategies, at the expense of slightly higher latency values for SOR and POR.Interestingly, latency values achieved by social-aware strategies for SOR mainly established by mobile devices, are more than halved, compared to the No Migration approach.Slightly higher values than SoCEP are experienced by eSoCEP only for the latency among SDTs associated with IoT devices establishing POR relationships, which, however, are expected to interact at a lower extent.Hence, the results in Fig. 8   Heuristic that allows for minimizing the latency in the data exchange based on its intensiveness for a given relationship type.

VIII. DISCUSSION
The proposed placement, eSoCEP, satisfactorily targets the objective of ensuring the lowest latency among SDTs of friend devices that are more likely to exchange data, e.g., those tied by OOR while guaranteeing appropriate proximity between physical devices and their physical counterparts.A lower latency among SDTs has a twofold benefit: 1) the pressure on the network is low when SDTs exchange data because packets traverse a lower number of links and 2) quick interactions are ensured among them, which is crucial for service discovery procedures entailing the browsing of the social graph.
Compared to the benchmark solutions, the eSoCEP heuristic is shown to be efficient in terms of computation time, being its execution even faster than the most popular placement strategy, CEP, which is myopic w.r.t. the need to ensure proximity among SDTs of friend devices.Moreover, the eSoCEP heuristic is faster than the heuristic for our previous proposal, SoCEP, and also more efficient in terms of placement decisions.
eSoCEP incurs a lower number of migrations w.r.t.SoCEP.Hence, a lower communication footprint is incurred, since whenever a migration is triggered to match a new placement decision, data needs to be exchanged from the source to the target edge server.
The proposal is currently aimed to minimize the cost function, which jointly accounts for device-SDT latency and interfriend SDT latency.The proximity between the physical devices and their virtual counterparts is however ensured by a hard delay constraint.
Nonetheless its potentials and promising achievements, the proposal has room for improvement.
First, the formulated problem could be extended to overstep a possible limitation as, in this stage, only the communication latency is considered.The computation delay experienced at the selected edge server to perform the related IoT devices augmentation tasks is not currently accounted for in the problem.The formulation is quite flexible to accommodate such a further latency contribution.However, in order to do this, either assumptions are needed concerning the workload of each SDT associated with a given IoT device (as in [8]) or realistic patterns should be derived from actual IoT deployments.This issue will be among the subject matters of future work.
Moreover, the considered data set assumes that social relationships are static.However, they may evolve (be created and deleted) over time [49] and hence, placement decisions should vary according to the relationships' lifecycle.The chosen time slot values are short enough to capture well such dynamics and hence, SDTs can be moved to follow variations in the social relationships with no impact on the data exchange performance.Nonetheless, such replacements occur at the expenses of higher migration costs, which should also be considered.

IX. CONCLUSION AND FUTURE WORK
In this work, we have developed a framework for the dynamic placement of DTs associated with physical IoT devices establishing social relationships.The conceived placement strategy accounts for the social features of IoT devices, their mobility patterns, and the limited computing resources of edge servers.The optimal placement of SDTs has been formulated as a QAP.We designed a heuristic and applied approximation techniques addressing the challenge of the optimization problem complexity.Numerical results demonstrated that relaxation techniques approximate very well the exact solution, whereas the proposed graph-based heuristic allows for preserving polynomial time complexity while also keeping results close to the optimal solution.
Future research directions include, among others, ML algorithms for mobility-and time-dependent SDTs (re)allocation, where the proposed placement might be utilized to generate the training data.Among ML algorithms, it could be worth to investigate DRL, in alignment with recent literature trends, to enhance SDTs placement efficiency.
Furthermore, the placement decision might be extended toward a green and sustainable dimension.

Fig. 2 .
Fig. 2. Example of dynamic SDT placement problem: (a) illustration of SDT placement and (b) illustration of SDT's migration.

Fig. 5 .
Fig. 5. Computational time when varying the number of IoT devices N and the average number of friend IoT devices f = 4 and f = 7.
(b), both SoCEP and eSoCEP outperform other schemes, thus confirming their capability to account for social relationships demands, as targeted by the formulated problem.For the No Migration policy, delay values close to 4 ms are measured, although not reported in the Figure to reduce cluttering.

Fig. 6 .Fig. 7 .
Fig. 6.Metrics of interest for different time interval duration τ : average number of friend IoT devices f =4 and probability of data exchange p ij (t) = 1 for OOR and p ij (t) = 0.1 for C-LOR, SOR, and POR, N = 113.(a) Latency between IoT devices and SDTs.(b) Latency among friend SDTs.(c) Total number of migrated SDTs during the simulation.

TABLE I DT
PLACEMENT SOLUTIONS IN THE LITERATURE VERSUS OUR WORK: COMPARISON OF SUPPORTED FEATURES

TABLE II SUMMARY
OF THE MAIN NOTATIONS t), E S (t)); 2 Output: V P (t) → V S (t); 3 find sets of connected components G P (t) = G P (V P (t)), |G P (t)| = n such that V P (t) ⊆ V P (t), E P (t) ⊆ E P (t),