## 3 Results and Discussions  
The Statistics of Data Packets Sent from Slave Nodes in the WSN System during the Three-Day Observation  
This experiment began on 18:34 11 August 2018 and ended on 16:54 14 August 2018. Considering the sampling period of 10 min, an entire record should consist of 423 entries. Table 2 exhibits the general overview of measurement condition about all the 41 indoor slave nodes which recorded the environmental parameters in a commercial mechanically ventilated negative-pressure piggery. The valid total number of records that were measured by all 41 indoor slave nodes is 16,371 which is 972 less than the expected or ideal 17,343. The cause of the missing part is two-fold: one is from the malfunction of slave node which consists of five modules, for example, 22 slave nodes once experienced the abnormal extremely high temperature (99.9 \({}^{\circ}\)C) and also two of them encountered battery failures, thus all corresponding records had been removed; the other is associated with the defect of its transmitter module, specifically, the cloud server could only receive 419 entries which was four less than the desirable 423 from each slave node, this was probably due to the accumulative lag on the communication process during the entire experimental period. Additionally, another four slave nodes were mounted nearby the wall (water curtain) and entrance (outdoor). In sum, the actual number of packets received by the cloud server was 18,263 in total while it should totally receive 19,035 packets, thus the overall packet loss rate of the WSN system was 4%. In terms of the individual indoor slave nodes, the actual performances are shown in Figure 8. It can be obviously found from this figure that virtually all the nodes achieved a relatively stable performance with the number of valid measurements (labeled as 'Occupied') fluctuating around 400 and the missing number of records (labeled as 'Vacant') less than 20. Noticing that both node 3 and node 13 reported relatively substantial null records (94 and 85, respectively), it turned out that these malfunctions were due to the corresponding battery failures at halfway. Specifically, node 3 stopped working on 19:38 August 12 because of its battery quality issue, and the operation of battery replacement on 09:06 August 13 restored its normal working condition; node 13 ceased to upload the measurement data to the cloud server on 06:07 August 14 on account of its drained battery. The above reasons explained why the slave nodes installed on Column D held the highest malfunction rate (approaching 9%). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Parameter** & **Temperature (\({}^{\circ}\)C)** & **Relative Humidity \%** & \
\begin{tabular}{c} **NH3 Concentration** \\ **(mg/m\({}^{3}\))** \\ \end{tabular} &
\begin{tabular}{c} **CO2 Concentration** \\ **(mg/m\({}^{3}\))** \\ \end{tabular} \\ \hline Model & DHT21 & DHT21 & ZE03 & MH-Z19B \\ Range & \(-\)40.0 to 80.0 & 0 to 100.0 & 0 to 5 \(\times\) 10\({}^{-5}\) & 0 to 1 \(\times\) 10\({}^{-2}\) \\ Resolution & 0.1 & 0.1 & 1 \(\times\) 10\({}^{-8}\) & 1 \(\times\) 10\({}^{-6}\) \\ Precision & \(\pm\)0.5 \({}^{\circ}\)C & \(\pm\)3\% & \(\pm\)5\% to 8\% & \(\pm\)(5 \(\times\) 10\({}^{-5}\) + 5\%) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters of the wireless sensor slave node components. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Item** & **Col.A \({}^{\text{1}}\)** & **Col.B** & **Col.C** & **Col.D** & **Col.E** & **Col.F** & **Rec. \({}^{\text{2}}\)** & **Exp. \({}^{\text{3}}\)** \\ \hline Valid & 2810 & 2828 & 2765 & 2672 & 2850 & 2446 & 16,371 & 17,343 \\ Malfunction & 123 & 105 & 168 & 261 & 83 & 68 & 808 & 0 \\ Defect & 28 & 28 & 28 & 28 & 28 & 24 & 164 & 0 \\ \hline \hline \end{tabular} \({}^{\text{1}}\) Column (represents the mounting position of the slave node), \({}^{\text{2}}\) recorded, \({}^{\text{3}}\) expected.  
\end{table} 
Table 2: The overall statistics about the number of data packets recorded by all the 41 indoor slave nodes in the WSN system.