## 3 Result and Discussion
### Simulation Setup  
The simulation environment used for the experiment is developed in Python language on a computer with an Intel Core i7 processor, 8 GB memory, and Ubuntu 20.04 (64 bit Linux) operating system. A Pytorch framework is used to program the LSTM model. To design a communication network between the master and remote sides, a Mininet emulator is utilized. The Mininet emulator is programmed in Python language and is publicly accessible for researchers at the Mininet official website ([[http://mininet.org/](http://mininet.org/)]([http://mininet.org/](http://mininet.org/)), accessed on 25 July 2024). It uses a Linux kernel to create a real network with virtualized end hosts, switches, routers, and links. It provides built-in support for SDN architecture. For our simulation experiments, we collected data using a custom-made wearable hand device equipped with an ESP32 chip for RSSI measurements and an MPU-6050 six-axis IMU sensor, as depicted in Figure 4. The dataset creation involved recording RSSI values  
\begin{table}
\begin{tabular}{l c} \hline \hline
**Parameters** & **Settings/Device Used** \\ \hline \hline \multicolumn{3}{c}{**Simulation Environment Setup**} \\ \hline Operation system & Ubuntu 20.04 \\ Programming & Python 3.10 \\ Framework for model design & Pytorch 2.0.1 \\ Network design emulator & Mininet 3.6.5 \\ \hline \multicolumn{3}{c}{**Network Emulator**} \\ \hline Network topology & Mesh network of switches \\ IP suite & Transmission control protocol (TCP) \\ Software switch type & Open vSwitch 2.9.8 \\ SDN based controller & OVS-controller \\ SDN controller protocol & OpenFlow \\ Link delay & Shortest route 1.6 ms \\ Link bandwidth & 20\(\sim\)100 Mbps \\ Packet sampling rate & 1 kHz\(\sim\)3 Mbps \\ Number of external hosts & 5, 10, 15 \\ \hline \hline \multicolumn{3}{c}{**LSTM Algorithm**} \\ \hline Learning rate (\(\alpha\)) & 0.0001 \\ Optimizer & Adam \\ No. of training epochs & 100 \\ No. of layers & 02 \\ Hidden dimension & 100 \\ Evaluation metrics & Accuracy, recall, precision \\ \hline \hline \multicolumn{3}{c}{**Custom Device for Data Collection**} \\ \hline Localization module & ESP32 \\  & MPU-6050 \\ Activity module & -Accelerometer sensor \\  & -Gyroscopic sensor \\ Localization data & Received signal strength indication (RSSI) \\ Activity data & Eating, being still, walking, and sitting \\ Data collection sampling rate & 50 Hz \\ \hline \hline \end{tabular}
\end{table}
Table 1: List of parameters settings, simulation environment, and dataset used in experimentation.  
for Wi-Fi fingerprinting (localization) and monitoring various activities with the IMU sensor. These activities included eating, being still, walking, and sitting. Data collection was performed at a high sampling rate of 50 Hz to ensure high-resolution data capture, resulting in more than 12,000 samples from male participants with a median age of 25 years. The ESP32 chip was utilized to gather RSSI values, which are crucial for determining the location of the device within an indoor environment. Meanwhile, the MPU-6050 IMU sensor provided detailed information on the user's physical activities by measuring acceleration and angular velocity. The combination of the ESP32 and MPU-6050 sensors ensures robust and versatile data acquisition, essential for accurate analysis and application development in smart environments. In-depth details on dataset collection and the custom-made wearable hand device are provided in the Supplementary File of this paper. This dataset offers a comprehensive foundation for analyzing and modeling both localization and activity monitoring for remote patient care.