Teaching Reform of WSN Laboratory Class based on a Virtual Simulation Platform

: Wireless Sensor Networks (WSNs) are considered as one of the most rapidly developing technologies in recent years. The WSN course, as a core curriculum of the Internet of Things (IoT) major, also plays an important role in higher education teachings. However, the inadequate facilities, equipment and spaces have been main constraints of universities’ WSN laboratory classes. In this paper, we designed a specific situation and scene for smart home, one of the commonly used applications of WSN, and developed a Virtual Simulation Experimental Platform (VSEP) based on Unity 3D engine, aiming to enhance students’ learning interest and improve their practical skills. In particular, we firstly analyzed the current limitations in WSN experimental teachings, with design concepts and objectives and experiment teaching content of VSEP introduced thereafter. In addition, we discussed systems architecture and functions design, and experimental methods and steps. Finally, an anonymous survey was utilized to examine the teaching reform result. The study showed that most students have found the virtual platform helped them understand the theoretical concepts and experimental processes better, and is an effective way to learn the course.


Introduction
WSN is a collection of sensors and routing nodes, including wireless networks which can collect and process data from tiny nodes and transfer it to the operators [1].It is one of the cutting-edge technologies developed in the 21st century.Various applications of WSN are currently already maturely in use, such as in the domains of military [2], environment [3], industry [4]and health [5].In science learnings, the laboratory activity plays a significant role in helping students acquire the technical skills.Students can have direct experience, conceptual understanding and long-term memory through experimentation.However, building a fixed facility for WSN experimental teaching involves high cost relating to the significant amount of devices in order to meet the need of a large-scale deployment of sensors [6].It is often impossible for universities to develop practical classes with all WSN applications due to limited budgets.
As of present, most experimental teachings of WSN still depend on traditional technologies.The content of the course is abstract, and the requirements for mathematical skills are also high.Experimental teachings are mainly limited by the following aspects [7][8][9]: (1) Outdated teaching method and tedious manual operations.In traditional laboratory classes, the instructor firstly introduces basic principles of the experiment at the beginning of the class, then the students are to conduct their own experiments according to the pre-written guidebook.They are only required to follow the instructions without understanding the specifications of the application.Additionally, students often spend a lot of time in repeating tedious operations for configuring different nodes in the wireless network, causing a rapid decrease in the students' learning interest.
(2) Inadequate equipment and low resource utilization rate.Due to the high cost in equipment and maintenance, institutions have limited access to a large number of wireless sensor hardware and software facilities.It is also a challenge for the lab to purchase new sensors and devices to keep up with the rapid pace of WSN development.Besides, most hardware components installations are fixed to the lab bench, making them not very conducive for the designs of new experiments.Thus, a low resource utilization rate is inevitable.
(3) Insufficient practical class hours and poor experimental flexibility.WSN is a multi-disciplinary course, combining sensor technology, embedded technology and wireless communication technology.Conducting an experiment class on WSN implies the learning of various hardware and software layers.It requires students to spend much time staying in the lab to cultivate practice ability.However, there are only total 8 class hours for WSN experiment in many universities.It is difficult for students to grasp the key concepts of the course and master the practical skills in the limited class hours.In addition, students can use the experiment equipment only when they are in the lab.Usually, they do not have access to the lab facilities after class because of the strict management and busy scheduling of lab resources for other students.
Considering the current teaching situation, universities should expand their WSN education programs with new developed technologies and scientific modules.The use of virtual experiments provides a way to reduce the costs associated with practical issues (e.g.equipment, staff and faculty time) and it has been proved to be an effective way to enhance students' understanding of concepts and experimental processes [10].Pedro and Miguel introduced a simulation tool, named Atarraya, specifically designed for the testing and implementing of topology control protocols for WSN.It includes several key algorithms and applications, which along with graphical user interface, providing solid support to teaching activities [11].The virtual stimulation platform can also provide direct experimental visualization, interactive virtual environment, practical experimentation, and opportunities for students to repeat experiments to eliminate mistakes [12].This is also an effective way to gain practical skills, and cultivate innovative and entrepreneurial talents [13].
Although many VSEPs have been developed and applied to different fields [14], the availability of virtual platform focusing on smart home in the domain of WSN is very limited.Our study is the case of the construction and implementation of a VSEP for smart home based on Unity 3D technology.We included this platform to our experimental teaching as a small program to illustrate the ZigBee network formulation, in the hope that the virtual simulation experiments teaching with traditional practical experiments and classroom theory could contribute to the development of students' comprehensive practice and innovative ability.

Design Concepts and Objectives
As with the limitations mentioned above, when students conduct a traditional experiment, they simply focus on successfully completing the experiment and writing a good report, without much of critical thinking involved.Thus, concepts of student-centered learning and experimental skills training should be considered in designing a VSEP.In the VSEP for smart home, students should design their own deployment of smart devices and configure wireless network settings to allow the nodes to communicate with each other.Consequently, their skills of experiment analysis and design can be practiced through running the virtual program.They can also identify and propose potential problems, and gain better understanding of the theoretical knowledge.The objectives of experimental project are as follows: (1) Help students learn about commonly used sensors in smart home and deploy devices in the virtual environment.
(2) Help students learn about networking principles of WSN with Zigbee technology and the calculation of different nodes' address in the wireless network.
(3) Improve students' self-learning and innovative practical ability.

Experiment Teaching Content
In this work, we designed a virtual project to introduce the network formulation of WSN as the experimental teaching content.WSN involves lots of sensor nodes and they communicate with each other using wireless communication protocols.Among them, ZigBee protocols have been successfully adopted in the current implementation to provide low-cost and low power solution for remotely controlling and monitoring smart equipment [15].Students are expected to learn the wireless network formulation based on ZigBee and WiFi technologies in an immersive smart home virtual environment, and learn to remotely control devices by using a simulated cellphone as they do in the real world.
The experiment should provide commonly used virtual sensors in smart home to satisfy objective 1, so the students can learn the basic knowledge of them.More importantly, the core experiment content is the formulation of the wireless network which connect all the devices in the virtual home.
Specifically, students should firstly learn the concepts and principles of ZigBee technology then the mechanism of assigning addresses within a ZigBee network, and finally, the key for the terminal devices successfully connected to network lies in the communication of ZigBee and WiFi networks.The main theoretical points are as follows: (1) ZigBee Devices The devices in Zigbee system network are divided into two types: full function device (FFD) and reduced function device (RFD).FFD can operate in three operating modes, namely: personal area network (PAN) Coordinator, Router and End Device.The PAN Coordinator sends beacon frames, provides routing information and manages network specific address.The Router relays messages between nodes, and is not required in simple networks.Lastly, the End Device is responsible for sending and receiving messages and it is the only node type that can sleep.Moreover, FFDs can talk to any other device, while RFDs can only talk to an FFD.
(2) ZigBee Topology Zigbee networks can be configured to operate in one of the three topologies [16]: Star, Tree and Mesh.While the Star is the simplest topology, and the Mesh is the most versatile and resilient, we adopted Tree topology to describe the communication between devices in this paper in order to provide training for basic skills and simplify the complexity of the experiment.
In the tree topology, which is built upon the star topology, a coordinator node is accompanied by a few routers and end devices.Routers play a crucial role in extending the network coverage, and they allow devices that are distant from the coordinator to connect and communicate effectively.In addition, the coordinator or routers function as central nodes or root nodes, while the end devices are referred as children.
(3) ZigBee Channels Zigbee can operate in the unlicensed industrial, scientific, and medical radio bands, which varies depending on the region.It defines various channels within these bands to avoid interference with other wireless technologies operating in the same frequency range.Table1 lists the commonly used Zigbee center frequency bands and their associated channels [17].(4) ZigBee Address Mechanism The address mechanisms in Zigbee network can be divided into two items: Stochastic Address Assignment Mechanism (SAAM) and Distributed Address Assignment Mechanism (DAAM) [18].In DAAM, a parent node P can assign the address to the newly entering node using equation 1: (1)

Where
is the size of its children's address pools and is the maximum tree depth.
stands for the maximum number of children and denotes the maximum number of children that can be router.d is the depth value in the network and indicates the depth value of parent.If the value of is 0, it means that this node can only be an end device in the Zigbee network, whereas if the value of that is greater than 0, this node is able to assign address to its children nodes.The address assignment formula for the nth end device is calculated as shown in equation 2, where and are the address of end device and the address of parent node, respectively.
(2) The network address calculation of the nth route node is seen in equation 3 below, where 1≤n≤( -) and is the nth route device address.
1 1 (3) The architecture of the device communication is shown in Figure 1.The bottom layer is a Zigbee network composed of Zigbee terminal devices, and it connects to the WiFi wireless network in upper layer via the ZigBee-WiFi smart gateway in the middle.Hence, cellphones, computers and other devices connected to the WiFi can remotely control the end devices.

System Architecture and Functions
The platform is designed with Client/Server (C/S) architecture and includes three layers, namely data layer, business layer and presentation layer, and each layer plays different role in the system construction.The VSEP for smart home should provide friendly user interface and allow the user to roam in and interact with the virtual environment.The configuration of devices, gateway, routing and other parameters are the keys connecting to the ZigBee network.All devices in the smart home should be monitored and controlled by the user via the wireless network.There should also be an assessment for the experiment process to record students' performance.The detailed descriptions of system architecture and functions can be seen in paper [19].

Experimental Methods and Steps
The experiment can be carried out in a "human-computer" way.When students open the software, the main interface will be displayed (as shown in Figure 2), and they can click on the user manual icons on the right-top corner of the screen to find out how to use the system and interact with it.They can also gain a complete understanding of the experiment purpose, principles and detailed process after reading the experiment guide.The network settings can be manually configured by selecting WSN Configuration, and the simulation cellphone icon on the bottom right corner provides controls for the smart devices.Students require an account to access the simulated cellphones, and once successfully logged in, they are able to start the assessment system, check the connection of WSN and control the devices remotely.The assessment module is a module where they must complete the full experiment process instead of roaming aimlessly in the virtual environment.Specifically, student interaction steps are as follows: (1) Use student ID and the registered password to log into the simulation cellphone (see in Figure 3 and Figure 4).
(2) Click Assessment icon to begin evaluation, as shown in Figure 5. (3) Follow instructions on the task list (Figure 6) and in the scenes (Figure 7), deploy the sensors to their corresponding places in the virtual room.Double click the sensor to learn more about its characteristics.(4) Click onto WSN Configuration to configure the network settings, including the name and password of smart gateway, the PANID and channel number of Zigbee coordinator, the routers, and the end devices (illustrated in .Calculate IP addresses according to the principles and formulas.If the parameter is set correctly, a dotted line will be displayed linking the devices, as shown in Figure 12. (6) Control and interact with the devices using the simulation cellphone.

Results
Alongside the traditional experiments, we applied this VSEP to our WSN laboratory teaching.At the end of the course, all the junior students majoring in the IoT major (a total of 144 students in 2023) were invited to complete a voluntary, anonymous online survey through Tencent Questionnaire (https://wj.qq.com/).This survey asked students to rate their responses to statements using a fivepoint Likert scale ranging from "strongly disagree" to "strongly agree".The statements were designed to gauge how students felt when they used the VSEP for smart home and whether they found it a valuable tool for their learning.Response rate for the survey was almost 90% (129/144).The survey items were constructed in four aspects [20]: design and contents of the platform, interactions with the platform, cognitive benefits for students, and students' attitude about the platform.The survey items and questionnaire results are shown in Table 2.
According to the feedback from the questionnaire, most of the students agreed that the design and contents in VSEP were very helpful for learning.More than 87% of the students thought the graphic design and animation were closely linked to knowledge taught in theoretical classroom and have helped them achieve their learning goal.The feedback also revealed that the contents in the platform were rich and allowed students to have more control over the way they learn.Interactions with the simulation environment provided positive effect on students' learning.There were 88.3% of the students thought that the virtual platform enhanced their practical skills, and more than 86% of the students agreed that they can improve searching skills and gain more confidence.Furthermore, the proportion of students believing that the platform is an effective way to learn and will recommend it to other future students are 90.6% and 91.4%, respectively.Note that the values in the table are in percent and the number of students who have completed the questionnaire is 129.We calculated and compared the experiment average score and the course score of WSN in both 2022 and 2023.The results are seen in Figure 13 and Figure 14 below.The average scores for both students' theoretical performance and their experiments are generally higher in 2023, where 144 students participated, than in 2022 where 130 students were involved.This is a remarkable achievement indicating that the design and implementation of VSEP is an effective learning tool.It should continue to stay in use and be promoted widely where and when possible.

Conclusion
This study analyzed the problems encountered in conventional teaching of WSN and introduced a VSEP based on Unity 3D.This platform transforms the abstract concepts and independent technical operations of the textbook into controllable simulation graphics and images.Thus, it is able to provide students with an interactive simulated environment to learn the knowledge of ZigBee network formulation.Students can develop their practical skills in a risk-free and repeatable way, regardless of time and space constraints.Besides, the VSEP records students' personal learning trajectory, allowing them to deploy smart devices in the virtual home and configuring the network settings.All the steps will be recorded by the assessment module in the platform.Through the feedback on the questionnaire, majority of the students (more than 80%) thought that the design and content and interactions with virtual platform were helpful in their learning, and they are likely to recommend it to other students.In addition, compared to the scores in experiment and course of WSN last year, the scores in 2023 had witnessed improvements in both theoretical and experimental performance.
However, our study has some limitations.On one hand, the VSEP can only deal with a specific application field of WSN.The experiment content mainly focuses on the ZigBee network formulation.It still cannot meet the demand of extensive knowledge experimental teaching of WSN.On the other hand, some of the scenes are not attractive and the contents are not well organized.Thus, it leads to a lower percent in the aspect of design and contents construction and a decrease in students' enthusiasm for study.Our future plan is to add more scenes and better content organization, such as smart city and smart agriculture etc., to the VSEP, in hope to provide more interactive virtual environment to stimulate the students' learning interest.

Table 1 .
Zigbee center frequency and channels

Table 2 .
Survey items and results of the questionnaire Figure 13.Experiment scores of WSN from 2022 to 2023 Figure 14.Course scores of WSN from 2022 to 2023