## 3 System Framework Overview
### Middleware Layer
#### 3.2.1 Context Acquisition  
The context acquisition module is responsible for the aggregation of the raw data which were obtained by the sensors of the PF facility's WSAN and their distribution among various providers (i.e., a weather station providing context related to environmental conditions such as temperature, pressure, humidity, etc.) so as to be converted into context. After achieving the extraction of a high-level context feature, all the information is integrated in a single context model and its description is then forwarded to the context management module of the context-aware middleware cloud. In the context acquisition module, context providers are accountable for converting the data acquired by the sensors into context. As agricultural environments are characterized by an exceeding amount of information that can be classified as \"context\", several data abstraction levels and various feature selection techniques, such as classification and clustering, are required to obtain the exact content value for heterogeneous sensor data. Data fusion classification techniques, particularly can be extensively employed on multisensory environments aiming to fuse and aggregate data from multiple distributed heterogeneous sensors (as those deployed in agricultural fields) in order to obtain lower detection error probability and higher reliability [92]. For this purpose, the proposed system can employ a relatively large number of providers running individual techniques referring to Artificial Neural Network (ANN) classifiers, C5.0 classification algorithms, Bayesian fusion classifiers and Hidden Markov Model (HMM) classification methods, whereas in case the classification is unknown, unsupervised learning may be applied. Furthermore, clustering as an exploratory data analysis technique is widely used for identifying subgroups (clusters) in the data according to the similarity or diversity of data points. In other words, clustering is the technique of finding (according to a similarity measure) homogeneous subgroups within the data in such a way that data points in a cluster are as similar as possible. Since the K-means algorithm is one of the most used clustering techniques [93], special emphasis is given to it in the present work and its performance is going to be tested as part of the system's evaluation. As classification problems with large sets of input are considered to be of high computational cost, it is essential for the proposed model to be adequately adjusted to extract the proper classification features. Employing a mobile cloud platform to provide a classifier with the data storage and memory, \begin{table}
\begin{tabular}{c c c c c c} \hline
**Wireless Technology** & **Wireless Standard** & **Operating Frequencies** & **Max. Coverage Range** & **Max. Data Rate** & **Security** \\ \hline WIFI & IEEE 802.11 & 2.4/560 GHz & 100 m & 2 Mbps-6.93 Gbps & WEP/WPA/WPA2 \\ \hline Bluetooth & IEEE 802.151 & 2400/2483.5 MHz & 100 m & 1-3 Mbps & 56/128 bit \\ \hline BLE & IEEE 802.15.1 & 2400/2483.5 MHz & 100 m & 1 Mbps & 128-bit AES \\ \hline
6 LowPAN & IEEE 802.15.4 & 908.42/4883.5 MHz & 100m & 250 Kbps & 128 bit \\ \hline Zigbee & IEEE 802.15.4 & 2400/2483.5 MHz & 10 m & 250 Kbps & 128 bit \\ \hline GPRS & 3 GPP & GSM 850/1900 MHz & 10 km & 171 Kbps & GEA2/GEA3/GEA4 \\ \hline LTE & 3 GPP & 700/2600 MHz & 28 km & 1 Gbps & SNOW 3G \\ \hline SigFox & SigFox & 908.42 MHz & 30-50 km & 10-1000 bps & N/A \\ \hline LoRaWAN & LoRa Alliance & 868/915 MHz & 15 km & 50-100 Kbps & 128 bit \\ \hline DASH7 & ISO/IEC 18000-7 & 433.92868/915 MHz & 10 km & 28-200 kbps & 128-bit AES \\ \hline \end{tabular}
\end{table} 
Table 2: Comparison of Wireless Protocols for the IoT. that that are required for performing efficient computations is expected to minimize the load from local servers. Therefore, all context providers of the system are distributed in the cloud structure, running as SOAP-based web services which assemble raw sample data as inputs and respond with classification outputs.