Introduction

Present-day smartphones seamlessly integrate a broad spectrum of highly proficient sensors that are compact, economical, energy-efficient and boast remarkable performance. This ensemble of cutting-edge sensor technology plays a pivotal role in advancing the sophistication of smartphones. Specifically, smartphones have been equipped with an array of microelectromechanical sensors (MEMS) designed to collect data about the external environment, directly accessing real-time location, motion, and biometric data. The collection of the acquired data can be used in extensive applications across various fields, including earthquake early warning (EEW)1,2,3,4,5,6,7,8,9,10, structural health monitoring (SHM)11,12,13,14,15, clinical studies, and numerous other applications in daily human life.

Moreover, given the widespread use of smartphones with increased computational capabilities, together with future wireless 5G-6G connectivity, an unprecedented opportunity for real-time environmental and structural monitoring towards timely alert generation to ensure public safety, is today conceivable16,17,18,19. As a result, nowadays new smartphone applications towards this end are being developed20,21,22,23,24, improving the overall coverage and accuracy of earthquake detection and characterization. Given this advanced background, the implementation of a novel synchronized hybrid network is foreseen. In such a network, different sensors may interact to increase the effective overall sensitivity and accuracy in event detection, and may also independently generate and disseminate an alert. However, to ensure the correct merging of signals from different sensors, measuring the accelerometer responses and whether this response is constant over time is mandatory. A pioneering study of the smartphone’s accelerometer sensitivity is reported on15 where the excitation frequencies of interest were limited to 0.5 Hz–20 Hz, a range particularly relevant to civil engineering structures. Other work25 in this direction describes the comparison between smartphone accelerometers and low-cost global navigation satellite systems to monitor structural deformation.

In this work, we extend previous studies in this field, by using a slightly different measurement technique, to get an accurate determination of the smartphone’s accelerometer transfer functions (TF) over an extended range of frequencies, particularly focusing on the low-frequency regime (\(\sim\)Hz), particularly interesting to the detection of seismic events. We repeated and verified the measurements over three different, latest smartphone generations. We compared them with a reference, high-precision low-frequency accelerometer, highlighting the main differences in sensors and software used for the data collection. Finally, we apply the measured smartphones TF, to simulate a dramatic event (the earthquake in L’Aquila, on 6-th April 2009) to observe the real smartphone capability in earthquake detection.

In the remaining sections of the manuscript, the experimental setup and the methodology are first presented, then, after a careful analysis of the measured TF for each sensor, the reconstruction of the signal of an earthquake is studied, and finally, the future application to a novel synchronized network of sensors is presented.

Experimental setup

For the characterization of the transfer function of each accelerometer mounted in the three smartphones, we realized an experimental apparatus as depicted in Fig. 1a. To isolate the measurement breadboard from the seismic noise in the interesting frequency range 0.1–50 Hz, we used a vibration isolation platform (model 25BM-4 from Minus K Technologies). The vibrational noise transmission from the supporting table follows a typical pattern, ranging from a reduction of \(-5\) dB at a frequency of 0.1 Hz to a significant decrease of \(-80\) dB at 50 Hz. On top of the isolated platform, an actuator is positioned, as depicted in Fig. 1a. The actuator is a commercially available 40 W (4 \(\Omega\)) woofer, controlled by an arbitrary waveform generator (AWF), producing a clean tone with variable frequency, in the range of interest (0.1 Hz to 40 Hz). The typical peak-to-peak voltage employed during the experiment is 20 V for all sinusoidal functions produced.

Figure 1
figure 1

(a) Sketch of the apparatus used to characterize the different smartphone’s accelerometers. From bottom to top: the isolation stage in grey (Minus-K platform), and the actuator (a woofer); on top of it, a breadboard is placed to host all the accelerometers (EpiSensor Es-T for calibration and the smartphones, SP). The z-axis of all the accelerometers is aligned with the vertical direction. The woofer is driven by a sine function generator (arbitrary wave function, AWF), shown on the left side of the panel. The EpiSensor signals (for each axis) are acquired by using an oscilloscope and a computer, meanwhile, the SP signal is sent to the PC thanks to the Matlab and Phyphox cloud. (b) Recorded time traces of the acceleration measured by each smartphone’s sensor along the z-axis (vertical axis), for a typical actuator signal at 40 Hz, violet line: actuator sinusoidal signal,  blue line: Apple iPhone 8 time trace, yellow line: Apple iPhone 13Pro time trace, green line: Mi9T time trace, and red line EpiSensor time trace.

The sensors are placed on the speaker using a very thin aluminum surface (\(<1\) mm). The three different smartphones (Apple iPhone 8, Apple iPhone 13Pro and Xiaomi Mi9T) are placed on the top, with the screen facing upwards, of this surface close together with a force balance accelerometer (EpiSensor ES-T Kinemetrics). This latter high-precision sensor acts as a reference accelerometer for determining the actual vibration applied by the woofer. The transfer function of this accelerometer is given by the formula26:

$$\begin{aligned} TF_{EpiS}=\frac{k_1\; k_2}{(s-p_1)(s-p_2)(s-p_3)(s-p_4)} \end{aligned}$$
(1)

where s is the Laplace transform variable, \(k_1 = 2.46\times 10^{13}\), \(k_2=80\) V/g used to convert the signal expressed in V into acceleration units (where \(g = 9.81\)\({\mathrm{m/s}}^2\) is the gravitational acceleration). The \(p_i\) are the poles (\(p_1 = -981 + i 1009\), \(p_2 = -981 - i 1009\), \(p_3 = -3290 + i 1263\), \(p_4 = -3290 - i 1263\)). The coefficient values are available in the instrument manual26. We notice that the transfer function is flat in the frequency range considered in this work (from 0.1 Hz to 40 Hz). On the contrary, accelerometers mounted on smartphones share quite different characteristics (see Table 1), respectively of the Bosch Sensortec accelerometer (mounted on the two iPhones) and the TDK-Invensense accelerometer (mounted on the Mi9T).

Table 1 Main characteristics of accelerometers mounted on the smartphone Mi9T. Bandwidth for acceleration standard deviation estimation is not available. Bosch Sensortech information is not available. The EpiSensor range is expressed in terms of the gravitational acceleration \(g = 9.81\)\({\mathrm{m/s}}^2\).

We note that while the actuator mainly applies vertical accelerations to the whole measurement breadboard, residual acceleration along the two axes along the horizontal plane is observed. To take into account this additional effect, the whole set of 3D accelerations in \({\mathrm{m/s}}^2\) of the smartphone is acquired using the Matlab application, which also offers the flexibility to choose the acquisition rate ranging from 1 to 100 Hz (typically set at 100 Hz). We first checked that along the horizontal plane (x and y-axis) the average value is zero and along the z-axis, the average value is equal to the local gravitational acceleration. After acquiring a time trace, in post-processing, the Fourier spectra can be calculated. To compare two applications available in the store we also measure the acceleration with the iPhone 13Pro using a second app called Phyphox (with an acquisition rate set at 100 Hz). Simultaneously, the acceleration of the EpiSensor is captured using an oscilloscope with a maximum bandwidth of 100 MHz (Tektronix MDO3014). The acquired time traces are converted into acceleration time traces using the TF described above, given the measurement range of the EpiSensor. The length of the time traces is set to 400 s. The sample rate is kept constant at 1 Ms/s for all the measurements. An example of z-axis acceleration acquisition as a function of time for all the sensors is shown in Fig. 1b. The vertical scale is represented in arbitrary units (a.u.) for comparison purposes across different acquisitions. In the figure, the violet line represents the sinusoidal signal sent to the woofer, at a frequency modulation of 40 Hz. The signals acquired from the three smartphones (iPhone 8, iPhone 13 Pro, and Mi9T) are depicted in blue, yellow, and green, respectively. Finally, in red, it is shown the signal from the EpiSensor.

The EpiSensor accelerometer constitutes a reference for both the frequency and amplitude of the vibration applied. The EpiSensor is chosen as a reference because its transfer function is well known26. This sensor has a superior signal-to-noise ratio over a much broader frequency range compared to the accelerometers under test. Moreover, the Episensor is one of several field instruments that have been utilized for decades in the geo-seismic field for detecting and monitoring. The objective is to gain insights into the accuracy of two critical parameters: the precision of the time base and the absolute accelerometer’s calibration in \({\mathrm{m/s}}^2\). These parameters are crucial when utilizing smartphones for seismic measurements or in the field of structural health monitoring.

Data analysis and estimation of the transfer function

Our focus is specifically on studying acceleration in the vertical direction (z-axis) at various frequencies, from 0.1 to 40 Hz.

Figure 2
figure 2

The acquired spectra at four different frequencies with the available smartphones also using the two apps. In the four subplots excitation frequency is equal to 30 Hz, 20 Hz, 10 Hz, and 4 Hz, for (a–d), respectively. Further details are provided in the text.

For this, the acquired traces are transformed into the Fourier space using a post-processing algorithm. A general description of the Fourier Transform (FT) follows:

$$\begin{aligned} \tilde{f}(\nu )=\int _{-\infty }^{\infty }e^{-i2\pi \nu t} f(t) dt. \end{aligned}$$
(2)

where \(\tilde{f}(\nu )\) is the FT of f(t) (the time-domain signal) with respect to frequency \(\nu\). The FT helps analyze the signal in the frequency domain, providing valuable insights into the behavior of the accelerometer response at different frequencies. The calculated spectra for four different excitation frequencies, 30 Hz, 20 Hz,10 Hz and 4 Hz, are illustrated in Fig. 2, for different accelerometers, as detailed in the figure caption. In Fig. 2, we also compare the measurements performed using two different Apps, Matlab and Phyphox, and reported in green and light blue, respectively.

Figure 3
figure 3

Dots show the value of the peak amplitude as a function of the measured Fourier frequencies. The mean noise level obtained from background signals within the frequency range 0.1 Hz–40 Hz is represented respectively for each sensor with lines. The observed frequency dependence of the peak amplitude is due to the different responses of the actuator as a function of frequency.

We estimate the transfer function (TF) for each sensor by measuring the peak amplitude (and Fourier frequency) observed in the Fourier transform of the acquired time trace when the woofer applies a sinusoidal monochromatic vibration. Additionally, we capture time traces when vibration ceases, to estimate the noise floor of each detector and get an estimation of the minimum monochromatic signal that can be detected (sensor absolute sensitivity). Through FT analysis of the background signal, we also estimate mean noise amplitude within the frequency range of 0.1–40 Hz. Results are depicted in Fig. 3, showcasing vibration amplitudes with and without vibration, across different frequencies for each sensor. All these spectra are calculated over an integration time of 400 s.

Table 2 Measured amplitude and Fourier frequency of the signal acquired around 40 Hz for the different sensors.

Moreover, at the Fourier frequency of 40 Hz, we repeated 5 measurements to estimate the error in the measured quantities and, to ensure the repeatability of the measurements. The results are shown in Table 2, where the mean and standard deviation for both the measured amplitude and Fourier frequency for each sensor are reported.

As shown in Fig. 3, at Fourier frequencies below 2 Hz, smartphones are no longer able to detect the modulation applied, and the signal is around the noise level, as shown from the recorded spectra.

While it is still possible to observe the vibration below this frequency on the EpiSensor, we plan to improve the electronics to increase the woofer modulation amplitude, which at this frequency is capable of applying only an acceleration of about \(10^{-4}\)\({\mathrm{m/s}}^2\), with the present setup. However, these data are sufficient to extract the effective sensitivity of the smartphone-mounted accelerometer in the range of 2 Hz - 40 Hz.

Contrary to the declared sensitivities of only \(\sim 10^{-2}\)\({\mathrm{m/s}}^2\) (see Table 1), as shown in Fig. 3, it is remarkable that the smartphone’s accelerometers can indeed observe a signal with an amplitude two order of magnitude smaller, just above the \(10^{-4}\)\({\mathrm{m/s}}^2\) level.

Figure 4
figure 4

(a) Sensitivity level with different integration times measured in a bandwidth of 50 Hz. (b) Calibration curve of the EpiSensor acceleration on smartphones. (c) Sensor responses (normalized) as a function of the amplitude of the sine wave driving the woofer. (d) Frequency shift (\(\Delta f\)) between EpiSensor and smartphone..

To explore the sensor’s sensitivity further, we delve into how their sensitivity levels, when unmodulated by external signals, evolve over different integration times. Following this procedure, we estimated the sensor sensitivity as the mean amplitude of the noise floor measured in a fixed bandwidth as a function of the integration time. Our analysis, detailed in Fig. 4a), showcases sensitivity measured within a 50 Hz bandwidth across various integration times for all four sensors. Each data point, accompanied by error bars representing standard deviations, reflects the mean value derived from 10 consecutive acquisitions. This mean value is obtained by averaging the spectrum over 50 Hz bandwidth and subsequently averaging the results of the 10 measurements. The standard deviation is then calculated based on these 10 measurements. Notably, Fig. 4a reveals a distinct trend in smartphone sensitivity, converging toward \(10^{-4}\)\({\mathrm{m/s}}^2\) as integration time lengthens, while sensitivity diminishes with shorter integration periods.

Turning our attention to overall sensor linearity, we scrutinize the relationship between measured acceleration at 40 Hz and the amplitude of the sinusoidal signal transmitted to the actuator. Mean acceleration and standard deviations (depicted as error bars) are calculated for each voltage value over 10 traces. The linear trend observed across all sensors, as depicted in Fig. 4c, is evident with measured accelerations normalized to the maximum value. This finding serves to mitigate concerns regarding potential nonlinear effects in our measurements.

In Fig. 4b, the plot illustrates a calibration comparison, with EpiSensor amplitudes plotted against those of smartphones. Notably, a linear trend emerges in the Log-Log scale for three sensors, offering a correction curve crucial for precise smartphone acceleration calibration. The calibration slope values for iPhone 8, iPhone 13 Pro, and Mi9T are recorded as 0.87, 0.79, and 0.69, respectively. Furthermore, precision in frequency measurement stands as another critical parameter. As demonstrated in Fig. 4d, Fourier frequency shifts (\(\Delta f\)) are depicted by comparing measured frequencies of smartphones against those of EpiSensor. Linear trends are observed in measurements with iPhone 8 and Mi9T, exhibiting similar patterns. However, higher frequency shifts are apparent in iPhone 13 Pro measurements across all frequencies. Slope values from linear fits are determined as 0.9 mHz/Hz for iPhone 8, 3.8 mHz/Hz for iPhone 13 Pro, and 1.1 mHz/Hz for Mi9T. These trends highlight additional delays present in smartphones, likely stemming from imperfections in the design (hardware) or handling (delay coming from software) of a precise time base.

We conducted further investigation into the source of the frequency shift observed in the iPhone 13 Pro measurements. To do this, we compared the spectra obtained using two different apps available in the store: Matlab version 9.3 and Phyphox version 1.1.12. The comparison of spectra is illustrated in Fig. 2, as described in the caption. For instance, in Fig. 2a, the Matlab acquisition (green) exhibits a peak at 40.15 Hz, while the peak frequency is 40.01 Hz for spectra acquired with the Phyphox App (light blue). In Fig. 4d, all the frequency shifts measured with the Phyphox app are depicted with light blue dots. It is evident from the figure that the frequency shift error is less pronounced compared to the Matlab results obtained with the same smartphone. The measured slope is 0.2 mHz/Hz, much smaller than the 3.8 mHz/Hz measured with Matlab. Based on these findings, it is plausible to conclude that the observed frequency error mostly stems from software imprecision (possibly introducing a fixed time delay) rather than the smartphone hardware. This underscores the significance of developing real-time applications with a well-defined time, which constitutes a crucial parameter, particularly for the conception of synchronized and hybrid networks.

Application to seismic events detection

Figure 5
figure 5

Estimated smartphone’s transfer functions normalized to the EpiSensor transfer functions. The lines are the interpolation of the experimental data..

After conducting these characterizations, we analyze the data presented in Fig. 3 to derive the full TF for each smartphone normalized by the TF of the EpiSensor, because its TF is well known and the sensitivity is higher than those of the smartphones in the interested bandwidth26. The interpolated normalized smartphones TF are shown in Fig. 5. As clearly represented in the Figure, the three transfer functions appear not flat and very different from each other, given this fact, differences and relative distortion of the signal acquired are expected.

Figure 6
figure 6

(a) The red line represents the time track of the 2009 L’Aquila earthquake as recorded by a precision accelerometer. Blue, yellow, and green lines depict the signals that would have been observed by the iPhone 8, iPhone 13 Pro, and Mi9T, respectively. (b,c) A zoom of the signals at around 2 s and 5 s. (b) The horizontal light-blue area represents the level under which the smartphones are not sensitive, more details in the text.

This normalized TF reflects the effectiveness of each smartphone in detecting earthquake ground motion at different frequencies. As an application of the measured TF, we show how each smartphone can detect a major earthquake, evidencing the differences with the actual vibration in \({\mathrm{m/s}}^2\). To do so, we applied these TFs to the ground motion data of a major earthquake that occurred in Italy on April 6th, 2009, recorded at station AQA, obtained from the Engineering Strong Motion database (ESM)27. The Fourier transform is applied on the earthquake trace, as per Eq. (2). On this signal, we individually multiply the smartphone’s transfer functions. At this point, the earthquake signal (as perceived by every smartphone) was recreated using an inverse Fourier transform on the modified data.

In Fig.6, the acceleration amplitude of the earthquake event (red line) and the corresponding smartphone traces are shown. Notably, distinct effects of the TFs are visible in two zooms Fig. 6b at around 2 s from the beginning of the event and Fig. 6c after 5 s nearly at the maximum amplitude of the event.

In Fig. 6b two areas are also shown: the black area, corresponding to the average sensitivity of the smartphones (\(\sim 0.01\)\({\mathrm{m/s}}^2\)), and the light blue area, representing the average plus one standard deviation of the earthquake amplitude signal. These values, an average of 0.012 \({\mathrm{m/s}}^2\) and a standard deviation of 0.028 \({\mathrm{m/s}}^2\) were obtained from Italian earthquakes spanning from 1976 to 2016, downloadable from the ESM website27.

This indicates that the sensitivity of smartphones is significantly higher than expected (see Table 1), allowing for the observation of the most common and significant seismic events. Through the outlined process, we have effectively showcased how smartphones can be leveraged for earthquake identification.

Towards a synchronized distributed network of sensors

Figure 7
figure 7

Sketch of the cluster of a synchronized network of mobile sensors. Each cluster is independent but it is interconnected to each other and a central station for calibration purposes (image freely modified from www.freepik.com contents).

In the above analysis, we showed how off-the-shelves accelerometers reach high sensitivity levels and a reasonably large bandwidth to observe low-frequency seismic events. This is a key result towards the development of synchronized sensor networks, e.g., in the field of mobile crowdsensing applications28,29,30,31,32,33. Accurate calibration of each sensor would greatly help efficiently merge data acquired from the many heterogeneous sources, and precise knowledge of each sensor transfer function is necessary.

However, we want to remark that implementing a coherent synchronized sensing system built out of low-cost off-the-shelf sensing devices is an orthogonal problem compared to the contribution and, therefore, out of the scope of this paper, which focuses on the calibration of such individual devices and studying their possible application. Having this in mind, in the rest of the Section, we briefly outline the framework and the main design idea of a novel synchronized sensor network, discussing potential sensitivity and possible issues that might be tackled by future theoretical and experimental work.

A sketch of the proposed implementation of a cluster architecture for real-time interferometry of different sources is represented in Fig. 7. Here we envision a set of sensors, organized in independent clusters that are interconnected to each other with the possibility of linking to central stations from time to time for re-calibration. For a real-time, synchronized network, we expect an increase in the sensitivity of each cluster by a factor of \(\sqrt{N}\), where N is the number of sensors in the cluster. Given the minimum acceleration sensitivity of the sensors we tested, a single cluster composed of only N=10 sensors would in this case allow reaching sensitivities well beyond 0.1 Gal (1 \({\mathrm{mm/s}}^2\)), leading to a network that could access the observation of small seismic events, at an intensity well beyond the level felt by the population. In the future, this proposed network could add value to the current high-precision sensor networks, allowing for a low-cost capillary study of microseismic events or bradysism.

Moreover, in this concept network, the direct intercomparison with higher sensitivity and better long-term stability classical (or quantum) inertial sensors, would help in reducing the typical noise at low frequencies of mobile sensors (long-term changes and drift of the response function) while keeping the high repetition-rate real-time detection. This, in turn, might help in reducing the detrimental effects and non-seismic motion signals coming from the daily use of smartphones, including changes in position and different surfaces of support. While techniques have been developed to filter out similar sources of noise34, real-time analysis and continuous re-calibration capability would help in removing more effectively time-changing noise sources.

Specifically, synchronization between devices can be achieved by timestamping events at each node. Timestamps can be made consistent among nodes by exploiting standard global time synchronization protocols, such as the Network Time Protocol (NTP). In any case, the data gathered by each device in isolation would have to be collected by a central entity (e.g., residing in the cloud), which would analyze and correlate them together to extract refined knowledge from the individual devices’ sensing logs. If individual logs are timestamped using a global reference source (such as NTP), it would be straightforward for such a centralized system to align the timelines of data sensed by the different nodes, thus achieving synchronization. Finally, it should be noted that a certain degree of imprecision in the synchronization, within the typical limits guaranteed by the NTP protocol, would not be an issue, as such effects would be easily overcome by correlating data sensed by a large number of low-cost devices.

Together with the already well-known problems as the existing variable delays in data transmission and difficulties that arise in data merging from heterogeneous sources, in this work, we show the importance of a precise calibration of the actual transfer function of each sensor and the importance of how the data are extracted from the sensor itself, before being distributed over the network. In this field, poor programming strategies can induce internal delays eventually resulting in frequency shifts of Fourier components and distortion of the measured signal. As a result, variations in sensor types, models, and calibration levels can lead to inconsistencies in data collection and interpretation, undermining the reliability and accuracy of the network as a whole.

Despite these challenges, the potential applications of such synchronized sensor networks are vast. From early warning systems for natural disasters to structural health monitoring in critical infrastructure, these networks offer invaluable insights and capabilities, particularly in densely populated areas where the risk is heightened. Moreover, the integration of quantum and classical sensor systems presents an intriguing avenue for further advancement. By harnessing the reliability of quantum sensors over long timescales and the rapid response rates of classical sensors, hybrid systems can achieve unparalleled performance in risk detection and alert generation.

Conclusion

We thoroughly characterized the accelerometers mounted on board three different mobile phones. The calibration we did evidenced a difference in the actual sensitivity in the peak-to-peak amplitudes and a different reading of the actual signal frequency introduced by a poor time base used in some of the applications running on the mobile phone itself. However, our work can be improved by modifying the apparatus with a more performing actuator pin and extending the number of smartphones. This work is in line with existing literature, such as15,25, which highlights uncertainties in amplitude and frequency measurements when using smartphones, often revealed through comparisons with reference sensors as like as we did. Furthermore, we studied the smartphone’s transfer function which is crucial for deepening knowledge about their response characteristics and improving measurement accuracy. We also apply this knowledge to retrieve a seismic signal with no distortion.

This work represents an important step towards the future realization of a synchronized network of sensors. While the network topology can help in solving part of the problems that arise in data merging from heterogeneous sources, we shed light on the importance of knowing precisely the transfer function of each sensor. This represents a fundamental requirement towards the realization of a low-cost, capillary, and high-sensitivity network of sensors, capable of observing micro-events, for enhancing safety and with potential application in various areas.