## 4 Platform and Sensors Implementation and Evaluation
### Sensors  
#### 4.2.1 Accelerometers  
In Sensor4 PRI the accelerometer is the main source of information for evaluating the structural health of the railway infrastructure. On the one hand, a precise accelerometer is essential for detecting subtle changes in the vibration patterns of the slab track. On the other hand, an economically viable accelerometer is needed to keep the cost of the monitoring system low. In order to evaluate these two factors a test has been carried out with the sensors whose main features are shown in Table 2.  
As these two accelerometers differ greatly in price, the goal of this test is to confirm that both sensors are able to detect vibration patterns in a similar way. If that is the case, then the ADXL345 sensor is going to be selected as it has a lower price. \begin{table}
\begin{tabular}{c c c c c} \hline Name & Arduino UNO & Arduino MEGA 2560 & BeagleBone Black & Raspberry PI \\ \hline
**Microcontroller** & ATmega328 & ATmega2560 & AM335x & ARM Cortex-A8 & ARM1176 JZF-S \\ \hline
**Operating Voltage** & 5 V & 5 V & 5 V & 5 V \\ \hline
**I/O Pins** & \begin{tabular}{c} 14 (6 PWM \\ output) + 6 \\ \end{tabular} & \begin{tabular}{c} 54 (14 PWM \\ output) + 16 \\ \end{tabular} & \
\begin{tabular}{c} 2x 46 pin headers \\ \end{tabular} &
\begin{tabular}{c} 25 pin headers \\ \end{tabular} \\ \hline
**Flash Memory** & \begin{tabular}{c} 32 KB (0.5 KB \\ bootloader) \\ \end{tabular} & \begin{tabular}{c} 256 KB (8 KB \\ bootloader) \\ \end{tabular} & \
\begin{tabular}{c} 4 GB \\ \end{tabular} &
\begin{tabular}{c} SD dependant \\ \end{tabular} \\ \hline
**SRAM** & 2 KB & 8 KB & 512 MB DDR3 & 256 MB \\ \hline
**EEPROM** & 1 KB & 4 KB & - & - \\ \hline
**Serial (UART)** & 1 & 4 & 4 & 1 \\ \hline
**Clock Speed** & 16 MHz & 16 MHz & 1 GHz & 700 MHz \\ \hline
**Price** & 20 \(\copy\) & 41 \(\copy\) & 42 \(\copy\) & 28 \(\copy\) + sd \\ \hline \end{tabular}
\end{table} 
Table 1: Technical characteristics of the sensor boards evaluated. \begin{table}
\begin{tabular}{c c c} \hline  & **ADXL345** & **SQ-SVS** \\ \hline
**Manufacturer** & Analog Devices & Signal Quest \\
**Axis** & 3 & 2 \\
**Consumption** & 20 \(\upmu\)A & 40–145 \(\upmu\)A \\
**Price** & 21 \(\copy\) & 363 \(\copy\) \\
**Interface** & SPI, I2C & Analog, UART \\
**Precision** & 2 g–16 g & 2 g \\
**Image** & & & \\ \hline \end{tabular}
\end{table} 
Table 2: Technical characteristics of evaluated sensorsThe tests have been performed by attaching both sensors to a rotating electric motor. Both sensors are controlled by the Sensor4 PRI system and collect raw data about acceleration simultaneously at a rate of 250 Hz. The total duration of the test is 3 min. Two/three axis data have been collected for SQ-SVS/ADXL345 sensors respectively although only results from axis X are presented in Figure 3 due to space reasons. Figure 3 shows that although there are some differences in acceleration data perceived by these two sensors it is difficult to assess the performance of these two accelerometers using only this information. In the study of structural health of infrastructures, one of the most common techniques is to analyze the frequency of the different components of the acceleration signal. This information is used to detect changes in vibration patterns and abnormal acceleration response of the infrastructure that evidence the existence of a defect. The raw data acceleration obtained in the test has been transformed to the frequency domain by means of a FFT algorithm. This transformation is the one that the Sensor4 PRI system applies to the data it collects. Figure 4 shows the result of this analysis for three different time windows of size 512. These three selected windows are marked in Figure 3 as w1, w2 and w3  
Figure 3: Raw acceleration (axis x) obtained for the sensors SQ-SVS and ADXL345. respectively. The results show that peaks in frequency vibration are successfully detected in the same way by these two sensors. Therefore, this analysis confirms that both sensors detect the same vibration pattern in the electric motor.