# Edge-Computing Meshed Wireless Acoustic Sensor Network for Indoor Sound Monitoring
## 3 Sensor Design
### Computing Unit of the Sensor  
After an exhaustive evaluation of the available single-board computing units of the market, Raspberry Pi has been selected as the main computing platform for each individual node. Raspberry Pi meets all the requirements mentioned in Section 3 (ability to measure continuously, price lower than EUR 100, easy deployment and enables remote connection). A more exhaustive explanation on what platforms have been studied and discarded (such as Hummingboard [26], Cubieboard5 [27], Jaguar One [28], Banana Pi [29], PcDuino4 [30] or Beaglebone Black [31]) can be found in our preliminary work [16]. In general terms, these boards were discarded either due to their lack of a WiFi module, because they had features not required for this project (having, hence, a higher price) or because their online support community was not as big as the one offered by the chosen computational unit.  
Among the different Raspberry Pi models, Raspberry Pi Model 4B (Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5 GHz) with 4 GB RAM has been selected. As the main storage unit, a 64 GB SD card containing Raspberry Pi OS Lite is used. This model allows the connection of peripherals (such as microphones) through USB 3.0 connectors. Moreover, as the board presents both wired (e.g., Ethernet) and wireless (e.g., WiFi or Bluetooth) connectivity, it offers flexibility for WASN deployments in different scenarios.  
The capabilities of this board enable the performance of real-time signal processing [25]. To test to what extent the hardware is able of performing state-of-the-art acoustic signal processing, the board has been evaluated with a script that performs the following computations:Acquires acoustic samples at a rate of 44,100 Hz with a bit depth of 16 bits.
* Every 1 s, it calculates the Equivalent Loudness Level (\(L_{eq}\)) and calculates the spectrogram of the 1-second window audio.
* After evaluating these two acoustic features, the spectrogram is used as an input of a Convolutional Neural Network (CNN) (i.e., MobileNet V2 [32], which occupies 8.8 MB of RAM) to perform acoustic event classification.  
All the enumerated steps are carried out in less than 1 s using the selected Raspberry 4 model. MobileNet V2 has been selected as the classification algorithm as it is a CNN that has been specifically designed to be deployed in mobile or resource-constrained environments, as in the case of a WASN. Actually, MobileNets are architectures conceived for computer vision tasks that use depthwise separable convolutions, which are a type of convolutions lighter than regular convolutions. Depthwise separable convolutions split the computation into two steps: they first apply a single convolutional filter per each input channel (R, G, B) and then a pointwise 1 \(\times\) 1 convolution to combine the output of the previous convolutions. This technique enables light-weight deep neural networks to be built [33]. In the case of spectrograms, as R, G and B channels do not have a relevant meaning except for visualization purposes, the spectrograms have been treated as greyscale images by replicating the same spectrogram to the three input channels, as typically done in the state-of-the-art audio classification tasks.  
The main difference or novelty between MobileNet V2 compared to the first version of MobileNet is the incorporation of a type of layer named \"inverted residual with linear bottleneck\". These types of layers enable us to use fewer parameters than the first version of MobileNet [32].