Using Machine Learning Methods to Provision Virtual Sensors in Sensor-Cloud

The advent of sensor-cloud technology alleviates the limitations of traditional wireless sensor networks (WSNs) in terms of energy, storage, and computing, which has tremendous potential in various agricultural internet of things (IoT) applications. In the sensor-cloud environment, virtual sensor provisioning is an essential task. It chooses physical sensors to create virtual sensors in response to the users’ requests. Considering the capricious meteorological environment of the outdoors, this paper presents an measurements similarity-based virtual-sensor provisioning scheme by taking advantage of machine learning in data analysis. First, to distinguish the changing trends, we classified all the physical sensors into several categories using historical data. Then, the k-means clustering algorithm was exploited for each class to cluster the physical sensors with high similarity. Finally, one representative physical sensor from each cluster was selected to create the corresponding virtual sensors. The experimental results show the reformation of our scheme with respect to energy efficiency, network lifetime, and data accuracy compared with the benchmark schemes.


Introduction
In recent years, motivated by the incorporation of the ubiquitous environmental information sensing ability of WSNs as well as the powerful data storage and processing capabilities of cloud computing, sensor-cloud technology has been receiving growing attention in various application domains [1], such as target tracking [2], environment monitoring [3], smart city [4], public safety system [5], and precision irrigation [6]. It conveys a concept of providing physical sensors as a service (Se-aaS) [7]. In the sensor-cloud framework, various physical sensors and the corresponding cloud services are provided by sensor owners and cloud service providers, respectively. The end-users can get the information from these infrastructures without actually owning them. They only need to send their service requests to the sensor-cloud platform and pay for usage. Considering that the end-users are usually low-income farmers in agriculture fields, this pay-per-use model may alleviate the burden of farmers from the high cost and onerous farmland tasks [8]. Furthermore, the sensor-cloud framework enables multiple users to share the same infrastructure by using virtualization technology. Thus, the profits of the service providers can also be guaranteed.
The sensor-cloud framework is viewed as a paradigm shift from traditional WSNs. It decouples the physical sensor (data producer) from the data provider, which is conceptualized as a virtual sensor working in the virtual machine [9]. In some early works, researchers have focused on the design of system architecture. For instance, the authors in [9] described the design and the operation mode of the sensor-cloud framework. In [10], the authors gave a basic definition and interrelation of each component in sensor-cloud mathematically. Similarly, the authors in [11] introduced the sensor-cloud (1) We propose an energy-efficient virtual sensor provisioning scheme based on the similarity of sensing data. Differently from the spatial similarity based scheme, the physical sensors in our scheme with the highest correlation of measurement values can be divided into one cluster, even though they are far from each other in geographical areas. (2) To ensure the accuracy of results, we first use the linear regression model to classify all the physical sensors into several classes according to the historical data, then exploit the k-means clustering algorithm to optimize the selection. As a result, we use fewer physical sensors to provide a higher quality of service.
( 3) In addition to paying attention to the changing trends of physical sensors, we also consider the number of sensory parameters. The sensors chose in our schemes can sense two kind parameters that differ from the scheme using single parameter sensors.
The rest of this article is organized as follows: Section 2 introduces some related works and a brief discussion. Section 3 describes the system model and the problem definition of virtual sensor provisioning. In Section 4, we detail the proposed machine learning based virtual sensor provisioning scheme in detail. Then, Section 5 evaluates the performance of our proposed scheme and analyzes the simulation results. Finally, the conclusions and future works are drawn in Section 6.

Related Works
Virtual sensor provisioning is an important task in sensor-cloud, which is similar to the sensor allocation in traditional WSNs. In contrast, exploiting the virtualization technology, the physical sensors in the sensor-cloud framework can be shared with multiple users via the virtual sensors. The main goal of virtual sensor provisioning is to reduce energy consumption and redundancy data. With the same goal in traditional WSNs, the low energy adaptive clustering hierarchy (LEACH) protocol is applied widely [19,20]. In this method, the cluster head nodes are selected randomly with probability p, and the data packages from cluster members are sent to the sink node via the cluster head nodes. The cluster head nodes are selected periodically so that the energy load of the entire network can be allocated evenly to each sensor node. However, this method does not consider the multiple user's request specifically, so it is not suitable in the sensor-cloud environment.
The authors in [21] designed an agricultural sensor-cloud framework to provide multiple services for farmers. In order to ensure that the event data packets can be forwarded to the sink fast and reliably, the authors focused on the routing protocol of the physical layer and presented a priority-based data transmission technique. However, they tended to activate all the deployed physical sensors for virtual sensor provisioning. Although this method can utilize the powerful ability of cloud computing to process the massive data packages efficiently, the lifetime of WSNs will reduce with the increase of energy consumption. Similarly, the authors in [22] proposed a software-defined network (SDN) based load balancing and low response delay edge-cloud network framework, which reduces the redundant data and service response time.
In [12], the authors divided the whole geographical area into several regions. The data from the same region were sent to the middleware layer and processed with a hierarchical data aggregation method. The authors introduced four different virtual sensor configurations, such as one-to-many, many-to-one, many-to-many, and derived, which are the basic forms of physical sensor virtualization. However, the network-level virtualization [23] has not fully utilized the advantages of sensor-cloud infrastructure. Furthermore, the physical sensors from the same region do not guarantee the data correlation to perform the aggregation. As mentioned above, if there are some trees in the cropland, the temperature and humidity in the woods may be quite different from the outside.
Thereafter, some researchers take into account the spatial-temporal correlation when creating virtual sensors. They consider the dynamic correlation of the sensing data and propose an active node selection algorithm to reduce energy consumption [24]. The values of dormant sensors can be predicted by the activated sensors with high spatial-temporal correlation. An integration model based on historical data prediction is proposed in [25]. The authors exploited the spatial-temporal correlation to predict and controlled the accuracy of the sensing data, which provides a trade-off between the quality of service and energy efficiency.
The authors in [26] mainly focused on the similarity of sensing data. When the user initiates a service request, all the physical sensors are activated, then the collected data are sent to the middleware layer via the sink nodes for further processing. The middleware clusters the physical sensors based on the similarity of current sensing data. The generation of clusters is regulated by the predefined mean squared error. In this way, the physical sensors in the same cluster may be distributed in different areas. However, this scheme does not fully consider the changing trends of the environment (e.g., example of Sensor A and Sensor B in Section 2). In this case, direct data aggregation may lead to inaccurate results. Thus, before clustering the physical sensors, it is necessary to perform a classification process in advance.
As for the node selection algorithm, the authors in [27] proposed an adaptive clustering algorithm in a multihop mobile network. This algorithm partitions the whole network into several disjoint clusters according to each node's 1-hop neighbors. Similarly, in [28], a coalition-head selection algorithm is present to support the trapped users to form a coalition based on users' transmission range. These two node selection algorithms are similar to the allocation scheme based on spatial correlation as mentioned above. Thus, it is difficult to distinguish the physical sensors with different changing trends. Furthermore, these algorithms are focused on mobile networks. The network topology is unstable. In our scheme, we mainly focused on the static network.
From the above discussion, the existing works about virtual sensor provisioning are mainly focused on activating all physical sensors, network-level virtualization, spatial correlation, or data analysis for current sensing data. These methods may result in more energy consumption and redundant data. In addition, the role of historical data has not been fully considered. Figure 1 shows the basic architecture of agricultural sensor-cloud, which can be divided into three layers: the user layer, the middleware layer, and the physical layer [7]. Sensor to sink communication link (1) The user layer: The user layer is responsible for providing standard interfaces and various application services, which can be applied for users with different operating systems (e.g., Windows, Linux or Android). They are mainly two kinds of users: farmers and device owners. Farmers can request all the applications according to their demands. Device owners are the providers of the infrastructural, they should provide all the information about the sensors when registering on the platform. (2) The middleware layer: The middleware layer acts as an intermediary between the user layer and the physical layer, which is responsible for agricultural data analysis, storage, and virtual sensor provisioning. Leveraging the benefits of cloud computing, the sensing data can be processed efficiently. Users can obtain these data from the corresponding services. Each service may consist of multiple virtual sensors, and each virtual sensor may belong to multiple services. (3) The physical layer: The physical layer contains various physical sensors and agricultural devices, which are applied for data communication and implementing the users' strategies, respectively. In this layer, each physical sensor transmits its information (e.g., position, type, and values) to the corresponding sink through the ZigBee network, which is assumed to be star topology here for simplicity description [8]. Then, the sink will act as relay nodes and forward the collected data to the cloud platform using 4G [29] or 5G [30] networks.

System Model
We use an example to depict the working pattern. Assume that a farmer wants to request an irrigation service. Thus, he (she) needs to know the information about soil moisture. The request is submitted to the sensor-cloud platform. As the request arrives, the middleware will send a query to activate all the related physical sensors. Then, each physical sensor sends its sensing data (i.e., soil moisture) to the cloud via the corresponding sink (i.e., sink_1). Thereafter, virtual sensors provisioning task will be implemented to choose the most representative physical sensors in response to the farmer's request. These physical sensors will be active until the service time is over and the other physical sensors will switch to dormant to reduce energy consumption. Finally, the farmer will make an irrigation decision based on the received sensing data.

Problem Definition
In this section, we introduce the basic components of the sensor-cloud framework and present the definition of virtual sensor provisioning mathematically. Figure 2 shows the virtualization model. (1) The physical sensor: A physical sensor (P) is the basic resource unit to create virtual sensors.
They are deployed by sensor owners to monitor the specific environment parameters. The sensor owners should provide the information (e.g., identifier, position, and type) of each physical sensor when registering in the portal of sensor-cloud platform. Moreover, the position of physical sensors is usually fixed. For each physical sensor (P i ∈ P), it can be defined as a tuple with the following parameters: where id, loc, type, m, and Ψ denote the physical sensor's identifier, location, parameter type (e.g., temperature or humidity), measurement value, and state (e.g., active or dormant), respectively. Moreover, the set of measurement values, also named sample set or dataset, can be defined as a matrix X: where the ith row indicates the ith attribute, i = 1, 2, . . ., m; the jth column indicates the jth sample, and j = 1, 2, . . ., n. For instance, assuming that the used physical sensor can sense three parameters: 1-temperature, 2-humidity, and 3-light. Thus, a 13 = 25 means the measurement value of the first attribute of sensor node 3 (i.e., temperature) is 25 • C.
(2) The virtual sensor: The virtual sensor (V) can be regarded as a data provider in sensor-cloud and obtains its data from the underlying physical sensors. It can have a data processing program to process the sensing data in response to the user's service requests. Similarly, for each V i ∈ V, it can be defined as: where the id, type, p, and Ψ denote the virtual sensor's identifier, service type, used physical sensors, and state (e.g., active or terminated), respectively. Generally, it is not necessary to activate all the physical sensors to provision virtual sensors. From our point of view, each virtual sensor can be viewed as a logical mapping of multiple physical sensors with the same or different types. The mapping function between P i and V i can be expressed as: where ξ is the mapping relation between P i and V i , such as one-to-many, many-to-one, many-to-many, or derived.
(3) Service: The sensor-cloud platform provides various services (S) (e.g., irrigation, weather, or GPS service) for users. They can log in to the website via the browser or mobile device and choose the services according to their demands. A service (S i ) may be supported by multiple virtual sensors. For instance, an irrigation service may contain the following virtual sensor services: soil moisture, air humidity, and temperature. Here, S i can be denoted as: where own, type, area, τ, and t denote the service's requester, type, coverage area, data collection interval (e.g., once-per-30s or other), and total service time, respectively.
(4) Virtual sensor provisioning: After receiving the user's service request, the middleware will retrieve the catalog of physical sensors in the service area. Then, all the related physical sensors send their sensing data to the sensor-cloud platform via the sink node. The middleware will combine these fresh data with the historical data stored in the storage server, grouping these physical sensors into several clusters according to the measurement similarity. Thus, for x i , x j ∈ X, x i = {x 1i , x 2i , . . ., x mi } T , x j = {x 1j , x 2j , . . ., x mj } T , if x i and x j belong to the same cluster, then there is: where d ij is the distance or similarity of the x i and x j , D is the given threshold of distance.
For each cluster, only one representative physical sensor P r is selected to activate. The residual physical sensors will switch to dormant to save energy. As a result, all the representative nodes create a virtual sensor in response to the user's request. This process is called virtual sensor provisioning.
Problem definition: For a given substrate physical sensor set (P). The task of virtual sensor provisioning is to find the optimal subset P to create a virtual sensor (V i ) in response to the user's request. In this paper, we implement the virtual sensor provisioning as a clustering problem. The object is to select the representative physical sensor from each cluster. Finally, achieving a decrease in energy consumption and redundant data, meanwhile, improving the service quality.

Proposed Virtual Sensors Provisioning Scheme
In our scheme, we exploited the k-means algorithm to implement the virtual sensor provisioning. Moreover, considering that the physical sensors with similar values may have different changing trends, the linear regression model was applied to distinguish the changing trends.

Model
Assume that there are n physical sensors deployed in the monitoring area. Their sensing data compose a sample set X = {x 1 , x 2 , . . ., x n }, which can be denoted by an eigenvector with m dimensions, such as time (m 1 = t), node identifier (m 2 = id), and sensing parameter (m 3 = temperature). The first step is to classify n samples into l groups (G) according to the changing trends, in which: Then, clustering each group (G i ∈ G) into k i different clusters (C i ): From the final results, n samples are clustered into k clusters. So, the relationship between n and k can be expressed as: γ = C(i), in which i ∈ {1, 2, . . ., n}, γ ∈ {1, 2, . . ., k}. The model of k-means clustering is a many-to-one function from samples to clusters.

Strategy
The linear regression model is applied to classify these physical sensors. For a sample x = {x 1 , x 2 , . . .x m }, there is: the object of linear regression is to get the optimal value of ω and b to achieve f (x i ) y i . Here, y i is the actual value. The value of ω can be calculated by: where x i is the average of x. We also define a flag (θ) to denote the changing trend of each attribute (j), it can be expressed as: Thus, for each sample x ∈ X, the overall changing trend can be denoted by a flag set Θ i = {θ 1 , θ 2 , . . ., θ m }.
After the initial classification, we apply the k-means clustering algorithm to select the optimal division (C * ) for each group by minimizing the Loss Function (L). In this paper, we adopt Squared Euclidean Distance (SED) as the index to evaluate the distance d(x i , x j ) or similarity of samples.
where ρ denotes the ρth dimension of sample. L is the sum of the distances between each sample and the center of the cluster to which it belongs, it denotes the similarity of the samples in the same cluster.
where x γ = (x 1γ , x 2γ , . . .x mγ ) T is the center of the γth cluster. Thus, the k-means clustering can be viewed as an optimization problem with the object: The value of C * reaches a minimum when similar samples are gathered into the same cluster. The task of dividing n samples into k clusters is a combined optimization problem; thus, the number of all possible clustering results can be calculated by: From the Equation (15), we can know that the result of N is exponential because the optimal solution of the k-means clustering problem is NP-hard. The iterative method is commonly applied to solve this problem.

Algorithm
Algorithm 1 details the entire virtual sensor provisioning scheme, which can be divided into two steps: classification and clustering. Initially, there is only one physical sensor in each group (i.e., G i = {i}, 1 ≤ i ≤ n). Subsequently, the linear regression model is applied to calculate the value of Θ(G i ) according to the historical data. The physical sensors with the same value of Θ are grouped into one class. Then, in clustering, for each class, the first step is to assign each sample to its nearest centroid (i.e., µ(G i ) = {µ 1 , µ 2 , . . ., µ k i }), and the second step is to create new centroids by taking the mean value of all the samples assigned to each previous centroid. The difference between the old and the new centroids is computed and the algorithm repeats these last two steps until this value is less than a threshold. In other words, it iterates until the centroids do not move significantly. if Θ(G i ) = Θ(G j ) then 6: end if 8: end for 9: Return G = {G 1 , G 2 , . . ., G l } 10: Step2:Clustering 11: end if 20: end for Output: C * = {C * 1 , C * 2 , . . ., C * l }

Computational Complexity
For the given dataset X mn . The computational complexity can be divided into two phase according to the algorithm's execution steps. In classification phase, the time complexity is O(m 2 (m + n)), and the space complexity is O(mn); In clustering phase, the time complexity is O(tkmn), and the space complexity is O(m(n + k)). Here, t is the number of iterations. The proof is given in the following. Proof 1. We use the least squares method to train the model. For a sample x j = (x 1 , x 2 , . . ., x m ), j = 1, 2, . . ., n. The linear regression model can be defined as: in which ξ = (ξ 0 , ξ 1 , . . ., ξ m ). For simplify, we set x j = (x 0 , x 1 , . . ., x m ), x 0 = 1. Then Equation (16) can be expressed as: the mean square error is applied as the cost function: where x (i) denotes the feature vector of the ith sample, and y (i) denotes the actual value of the ith sample, n is the number of samples. Thus, X = (x (1) , x (2) , . . ., x (n) ) ∈ R n(m+1) , and Y = (y (1) , y (2) , . . ., y (n) ) ∈ R n . So, the cost function can be expressed as: calculate the derivative of ξ: Set ∂J(ξ) ∂ξ = 0, we can get: the most computationally intensive part is X T X, the time complexity is O(nm 2 ), and then inverting it, the time complexity is O(m 3 ). Thus, the overall time complexity is O(m 2 (m + n)). Furthermore, it only need to store the dataset X mn , so the space complexity is O(mn).

Proof 2.
The implementation of k-means clustering algorithm for each class can be divided into four steps: (1) Select k samples as the initial centroids, µ = {µ 1 , µ 2 , . . ., µ k }; (2) Calculate the distance between sample x j and µ. Then divide x j into the cluster corresponding to the centroid with the smallest distance; (4) Repeat the above two steps until the centroids do not move significantly.
In sum, the time complexity in step 2 is O(km), in which k is the number of clusters, and m is the dimension of a sample. However, there are n samples and t iterations. Thus, the overall time complexity is O(tkmn). In addition, it only need to store the samples and centroids, so the space complexity is O(m(n + k)).

Simulation Settings
The experiment of virtual sensor provisioning is done using Python3 language (https://www. python.org/) and NS-3 (https://www.nsnam.org/). Python3 is responsible for processing the dataset and implementing the clustering algorithm. In this paper, the dataset used comes from Intel Lab Data (http://db.csail.mit.edu/labdata/labdata.html). This dataset consists of 54 physical sensors that collect the environmental data once every 31 s. But there are massive null values and outliers, the record number of each node is also different. Some nodes only have a little record. To guarantee the accuracy of results, we selected 50 sensors with sufficient data. The used parameters are temperature and humidity. As for NS-3 (version:3.28), it is applied to simulate the performance of the generated underlying network. In the simulation, the location of each physical sensor is random, so we adopt the average of three simulation results. The simulation area is 100 m × 100 m, assuming that each node can communicate with the sink node directly. The initial energy of each node is 0.3 j. Table 1 lists all the used simulation parameters.

Performance Metrics
In this section, we analyze the performance of our proposed scheme in terms of energy consumption, network lifetime, and data accuracy. We briefly present the corresponding definitions in the performance evaluation.
(1) Energy consumption: We exploit the average energy consumption of the whole network to evaluate the energy efficiency of our scheme and the benchmark schemes. In each round, the energy consumption of our sensor-cloud based scheme and the LEACH scheme can be calculated by: where k is the number of selected physical sensors, E s k and E t k is the energy consumption due to sensing and transmission.
where n is the number of physical sensors, E s p , E t p , E r p , and E c p are the energy consumption due to transmission, receiving, sensing, and computing, respectively.
(2) Network lifetime: We define the network lifetime as in the percentage of network which has not yet depleted their energy or their energy level is greater than the predefined threshold. In this paper, we choose the number of iteration round when the total remaining energy is above 10% as the evaluation indicator. (3) Data accuracy: The proposed scheme groups all the physical sensors into several clusters and chooses some representative nodes to provide services. However, whether these selected physical sensors can represent the whole network is uncertain. Thus for any cluster (C * i ), we exploit Equation (24) to evaluate the data accuracy of our scheme.
where δ is the evaluation indicator of data discrete degree, δ i is used to calculate the data accuracy of our scheme, respectively. N is the number of records, k is the number of physical sensors in cluster C * i except the representative node, M r is the measurement value of representative node, and M j is the measurement value of the residual node j.
Similarly, Equation (25) are used to evaluate the data aggregation scheme in [12].
where δ i is used to calculate the data accuracy of data aggregation scheme, and M is the average of all the physical sensors. In addition, the overall data accuracy (∆) can be obtained by calculating the average of δ.

Benchmark
We compare our scheme with the LEACH scheme in traditional WSNs and the data aggregation scheme in [12]. In the LEACH protocol, the network selects cluster head nodes randomly with probability p. The cluster member nodes send the data packages to the cluster head nodes. The cluster head nodes aggregate and transmit these data packages to the sink node. After a period, the network reselects new cluster head nodes based on the remaining energy. Moreover, the data aggregation scheme utilizes all the physical sensors to provide data collection services. The virtual sensors are created based on the geographical position of physical sensors, and their values are the average of the physical sensors.

Results and Analysis
The classification task is completed by a Python3 linear regression script. Since the data of light in the used dataset is incomplete, so only temperature and humidity parameters are considered in our experiments. As a result, 50 sensor nodes are divided into 4 classes according to their changing trends. The classification results are shown in Table 2.  9, 12, 13, 18, 22, 25, 40, 41, 42, 43, 44, 45, 46} Then implementing the k-means clustering algorithm for each class, the first is exploiting the Elbow Method (EM) to select a suitable number of clusters (k i ). The core index of EM is the sum of squared errors, its value will decrease as k i increases. We set k 1 = 1 because of there are only 3 nodes, and Figure 3 shows the relationship between k i and SSE. As a result, k = {1, 3, 4, 3}.  Our proposed scheme divides all the 50 physical sensors into 11 clusters. Then in each cluster, only one physical sensor is selected to provision the virtual sensor. Table 3 shows the clustering results.  Figure 4 analyzes the performance of our scheme and data aggregation scheme in [12] with respect to data accuracy. For simplicity, we take the class (0, 1) as an example. From Figure 4a-c, our scheme can cluster the physical sensors with high similarity to one set accurately. Although the values of Figure 4a,b are similar to each other, the temperature values of nodes 10 and 16 are higher than 14 and 15, they are divided into two different clusters. Thus, we can choose nodes 10, 14, and 19 to create a virtual sensor and provide service. As for the data aggregation scheme, it exploits all 6 physical sensors in class (0, 1). The data provided to users are the average of these physical sensors. As shown in Figure 4d.  In this paper, we select 300 consecutive data to estimate the data accuracy. In our scheme (labeled as 'os'), the value of δ can be calculated according to Equation (18) Table 4. Similarly, the data accuracy of the data aggregation scheme can be obtained by Equation (19) Table 5. In sum, our scheme achieves 55.11% and 50.78% increase in data accuracy of two kind parameters, as compared to the data aggregation scheme. Figure 5 shows the comparison of energy consumption between our scheme and two benchmark schemes in different transmission rounds. The results show that our scheme is more energy-efficient than the other two schemes. The energy consumption in the sensor-cloud environment is mainly due to the transmission from physical sensors to the gateway and sensing environmental data. The complex and energy-intensive computing tasks are processed in the cloud. In our scheme, only 11 physical sensors are activated to provide service, which achieves almost 75.59% decrease in energy consumption, as compared to the data aggregation scheme. As for the LEACH scheme, all the physical sensors are activated to provide services. The energy expenses are mainly due to the sensing, transmission, and computing of data. Furthermore, there are more repetitive message packets forwarded among the physical sensors. However, in our scheme, the communications among physical sensors are little. Because the data packets are sent to the gateway directly. Thus, a large amount of energy is conserved.  The energy variation directly reflects the network lifetime. In this experiment, both the LEACH and data aggregation schemes exploit 50 nodes. Figure 6 shows the comparison of network lifetime. In sum, this is about 1600 rounds in p = 0.1 scenario, 2100 rounds in p = 0.5 scenario, and 5800 rounds in data aggregation scenario. Obviously, our scheme has the longest lifetime.

Conclusions
Virtual sensor provisioning is one of the foremost tasks in sensor-cloud. The existing studies on the sensor cloud mainly consider the selection of all physical sensors, which results in a massive amount of energy consumption. Inspired by the machine learning methods, we propose a virtual sensor provisioning scheme to realize data similarity analysis. First, all physical sensors are divided into l classes by different changing trends. Then the k-means clustering algorithm is applied for each class. Finally, representative physical sensors are chosen to create a corresponding virtual sensors. In summary, we use fewer physical sensors to provide higher quality services. Meanwhile, our scheme reduces more energy consumption and prolongs the overall lifetime of the network. The experimental results show that our approach is efficient and suitable for virtual sensor provisioning tasks.
Nonetheless, there are still some issues that need further elaboration in future studies, such as virtual sensor provisioning under the heterogeneous environment, selection algorithm of the representative physical sensors.