Smartphone monitoring of in-ambulance vibration and noise

Transferring sick premature infants between hospitals increases the risk of severe brain injury, potentially linked to the excessive exposure to noise, vibration and driving-related accelerations. One method of reducing these levels may be to travel along smoother and quieter roads at an optimal speed, however this requires mass data on the effect of roads on the environment within ambulances. An app for the Android operating system has been developed for the purpose of recording vibration, noise levels, location and speed data during ambulance journeys. Smartphone accelerometers were calibrated using sinusoidal excitation and the microphones using calibrated pink noise. Four smartphones were provided to the local neonatal transport team and mounted on their neonatal transport systems to collect data. Repeatability of app recordings was assessed by comparing 37 journeys, made during the study period, along an 8.5 km single carriageway. The smartphones were found to have an accelerometer accurate to 5% up to 55 Hz and microphone accurate to 0.8 dB up to 80 dB. Use of the app was readily adopted by the neonatal transport team, recording more than 97,000 km of journeys in 1 year. To enable comparison between journeys, the 8.5 km route was split into 10 m segments. Interquartile ranges for vehicle speed, vertical acceleration and maximum noise level were consistent across all segments (within 0.99 m . s−1, 0.13 m · s−2 and 1.4 dB, respectively). Vertical accelerations registered were representative of the road surface. Noise levels correlated with vehicle speed. Android smartphones are a viable method of accurate mass data collection for this application. We now propose to utilise this approach to reduce potential harmful exposure, from vibration and noise, by routing ambulances along the most comfortable roads.


Introduction
There are between 15,000 and 16,000 ambulance journeys, each year in the United Kingdom, 1 of infants who are transferred between hospitals. High-risk premature infants, transferred by ambulance for specialist care, are more than twice as likely to have severe brain injury compared to infants not undergoing transfer. 2,3 The general view is that this is, at least partly, due to the environment encountered during the journey. For example, there is evidence that sudden changes in noise levels can cause both rapid increase in blood pressure 4 and fluctuations in brain blood flow. 5 Some evidence was found which suggested accelerating and decelerating the ambulance in accordance with traffic conditions may correlate with physiological instability. 6 Other studies have demonstrated excessive exposure to vibration [7][8][9] and noise levels 10 supporting the rationale that they could be reduced by appropriate routing. Neonatal transports are conducted using an incubator mounted on a trolley, also carrying life support equipment, which is rigidly clamped to the floor of the ambulance. Although the standard for the transportation of incubators recommends vibration is kept to a minimum, 11 it also specifies that the trolley must be rigidly attached to the chassis. 12 This results in shocks being directly coupled to the trolley. Similarly, it also states that ear defenders must be used 11 although current defenders for preterm infants only reduce sound levels by up to 7 dB, 13 and have no impact on patient stability in a quiet setting. 14 Despite this guideline, noise levels during transport remain significantly higher than recommended. 15,16 An approach to reduce vibration and noise inputs is to route the vehicle along smoother or quieter roads.
To determine the optimum route for ambulances some cost function is minimised, such as travel duration, vibration within certain frequency bands, 17 the number and severity of vibration, noise levels, or a combination thereof. Consequently, data are required regarding the inputs from the environment into the vehicle that are linked to the road surface (e.g. roughness on various spatial scales, potholes and rapid changes of surface) and vehicle parameters (e.g. speed, suspension and soundproofing).
Traditionally, since gathering road condition information is expensive, it is only performed annually. 18,19 An example is the UK SCANNER survey, which includes measurements of road texture, rut depths and roughness, albeit restricted to the left-hand wheel path. 20 However, to achieve the goals described above there is a need for cheaper, simpler and more regular means of monitoring since roads can rapidly deteriorate, and subsequently be repaired.
The proposed solution is to use ubiquitous smartphones utilising the multitude of built-in sensors and communication capabilities they provide at relatively low cost. Numerous groups have shown that smartphones' accelerometers are capable of identifying road roughness, either by creating their own classification system 21 or by attempting to develop cheaper methods of calculating the International Roughness Index 22 from the vertical accelerations, 23,24 with one project also investigating the relationship with vehicle speed. 25 Road artefacts such as speed bumps and potholes have also been identified using raw, 26 low pass, 27,28 and high pass 29,30 accelerations, all at different sample rates. Our aim, however, is to combine the accelerometers with analysis of noise to measure the effect of road surface and speed on the environment within the vehicle rather than the road surface itself. This paper describes the development, validation and testing of a smartphone app for use by neonatal ambulance services to collect data from the device's accelerometers and microphone alongside location information that can be used to begin investigation of optimised routing.

App development
The core function of the app developed in this paper is to collect data from the inbuilt three-axis accelerometer and microphone alongside time and location information. Ease of use is essential if long-term continued data collection is to be achieved. It is vital for a routing service to adapt as road status changes such as potholes emerging, being repaired, and any resurfacing. The Android operating system was chosen due to the wider availability of suitable phones and ease of app development and registration. The app itself was written in the Java language.
The interface must provide a simple means of initiating and halting monitoring; with data upload occurring automatically. A single large button was provided to toggle the start and stop of data recording ( Figure 1). Upon cessation of recording the data are uploaded to a server when the phone automatically connects to Wi-Fi. This server stores a log of each successfully uploaded recording with memory overload of the phone prevented by deleting previously uploaded files. If the Wi-Fi connection is interrupted, the upload is rescheduled. If the phone is turned off before data upload has been completed, the app checks on start-up for remaining non-uploaded files and schedules the upload accordingly.
Three-axis acceleration data, output from the microphone and geographic location data, accessed via callback methods from in-built sensors (available on most phones but with differing specifications) were used in the application. For all data streams the sampling frequency is set by specifying a desired delay between samples. However this delay is not fixed and the actual time between samples fluctuates. 31 Acceleration data is sampled from the Inertial Measurement Unit (IMU) at the fastest rate possible. A standard for vibration exposure specifies frequencies between 0.5 and 80 Hz as affecting comfort and health. 17 The maximum sampling rates for most current smartphone models vary between 100 and 200 Hz, with the more high-end devices offering the higher frequencies. Using a phone with a 200 Hz average sample frequency will, according to the Nyquist-Shannon sampling theorem, ideally enable analysis of baseband signals up to 100 Hz under the assumption that a suitable low-pass filter is present which removes all other signals to prevent aliasing. This will therefore cover the required range for comfort. X-, Y-and Z-(in device coordinates) axis accelerations are provided as 32-bit floating point values.
The chosen smartphone (Redmi 5 Plus, Xiaomi, Beijing, China) fulfils the 200 Hz IMU sampling frequency requirement (Table 1), and four were purchased for data collection. Figure 2 shows that while the sample frequency fluctuated, the jitter between sample times was minimal (95% confidence interval: 20.70 to 0.77 s 310 À3 ).
Recording raw audio data would compromise patient privacy, therefore the maximum sound amplitude level from the microphone was recorded by calling the built-in method 'getMaxAmplitude' which returns a 16-bit integer. The values were converted to a decibel scale. Maximum recording frequency was achieved using a simple timer method with a period of 20 ms since 'getMaxAmplitude' does not provide periodic calling.
Geographic location, using satellite only, is accessed through the 'LocationManager' class at a rate of 1 Hz. Location was stored as latitude, longitude and altitude; other information recorded being bearing in degrees, speed in m Á s 21 , horizontal radial accuracy in m and UTC in milliseconds. Apart from UTC, which was provided as a 64-bit signed integer, all values are floating point; latitude, longitude and altitude with 64-bit double precision, the remaining with 32-bit single precision.
Time stamps assigned to sensor data corresponded to the next IMU sample, as this had the highest sampling frequency. After an accelerometer sample is received, a comma-separated string containing the elapsed time in milliseconds and all new sensor values are added to a blocking queue. Every 5 s, the items in the queue are written to a GZIP-compressed CSV file. Filenames for each recording include an 8-digit number to uniquely identify the smartphone and the system UTC at start, which ensure recordings will not be mistakenly overwritten on the server.

Accelerometer -validation
Frequency response of the smartphone IMU was not provided in the data sheet. By comparing the smartphone output to that of a reference accelerometer (352C65, PCB Piezotronics, Depew, NY, USA), with an accuracy of 65% between 0.5 and 10,000 Hz, the IMU response could be assessed, along with any effect of the Android interface. Comparisons were made by mounting the reference accelerometer and phone on an electromechanical shaker (VP4, Derritron Electronics, Hastings, UK). The shaker was controlled by a signal generator (AFG3252, Tektronix, Beaverton, OR, USA) which generated sinusoidal motion across a range of frequencies, in accordance with the standard on measuring instrumentation for the human response to vibration, 32 controlled so that the RMS acceleration at all frequencies was either 1 m Á s 22 or 9.81 m Á s 22 .

Noise -calibration
Calibration of the noise levels recorded by the smartphone was required as no specifications could be found on the built-in microphone, along with no documentation to what the output of the 'getMaxAmplitude' method would equate. Therefore, a precision sound meter (2260 Investigator with Type 4189 free-field microphone, Bru¨el & Kjaer, Naerum, Denmark) was used as a benchmark as it was designed for noise monitoring and has a response of 61 dB between 10 and 8000 Hz. Each smartphone was positioned, along with the sound meter, inside a diffuse sound field created by  a ring of 24 loudspeakers (VX 6, Tannoy, Coatbridge, UK). Pink noise, comprised of frequencies between 100 and 10,000 Hz, was generated for a range of noise levels in 5 s bursts. Comparisons were made between the Aweighted noise levels from the sound meter, applying a slow time weighting, and the RMS of the smartphone levels.

Road tests
The app, along with four smartphones, was provided to the CenTre neonatal transfer team to record all their ambulance journeys. To enable meaningful comparison of data from recording to recording and ambulance to ambulance a means of reliably and repeatedly mounting the smartphone in the same position was required. This was accomplished using magnets attached to both the phone and transport trolley. Magnets were positioned in the corners of the phone using a laser-cut template, with the bottom two magnets slightly closer to prevent misalignment. The template was also used to position magnets at the rear left corner of the trolley, fixing the phone location ( Figure 3). As the ambulance is a low-impact environment, magnets with a 5.7 N pull rating were used (Adhesive 10 mm dia 3 1 mm N42 Black Epoxy Magnets -0.58 kg Pull, Magnet Expert Ltd, Tuxford, Nottinghamshire, UK) to ensure secure mounting under vertical shocks of up to 10 g. Being in the same position in all ambulances, and aligning with the axes of the ambulance, there is no need to reorient any smartphone accelerometer data. Any orientation error can be quantified by calculating the vertical components of each axis using 0.5 Hz lowpass filtered acceleration data, under the assumption that the average accelerations below 0.5 Hz are solely due to gravity. Vertical components are found in 5 s windows by dividing the average axis value by the resultant magnitude of all axes. Positioning the smartphone on the transport trolley also enables incubator exposure to be measured rather than just the ambulance.

Repeatability
Recorded data needs to reflect the comfort of the road, not the ambulance. Spaced out over the course of 11 months, 37 journeys along an 8.5 km section of single carriageway ( Figure 4) were extracted from the data recorded by smartphones in ambulances. To check for repeatability, the data from these recordings were compared. Due to varying vehicle speeds and sample times between the different recordings, it is not feasible to align the sampled data by time. So for each recording, geographical coordinates were linearly interpolated to provide coordinates for each IMU sample which were then aggregated in 10 m intervals. Although this method loses resolution, it results in directly comparable data. Repeatability was checked for both acceleration (RMS of each 10 m) and noise level (mean of each 10 m).

Results
During use, the app records at an average of 20 MB per hour with battery usage averaging 3.2% per hour. Over 1000 h of data can be stored in the internal flash memory, with up to 31 h of recording on a single charge.

Accelerometer validation
Subject to sinusoidal testing, the smartphones matched the reference accelerometer up to 55 Hz, giving identical responses at both magnitudes of both 1 m Á s 22 and 9.81 ms 22 ( Figure 5). Above 55 Hz, the recorded Á  magnitudes at both amplitudes diverged rapidly from the reference.
The minimum test frequency was limited to 3 Hz for the 1 m Á s 22 tests and 10 Hz for the 9.81 m Á s 22 tests. These limits were imposed by the shaker used which did not have the travel required to reach the magnitudes required at lower frequencies.

Noise calibration
The values from the smartphones matched to within 0.5 dB to those of the sound meter subject to the 5 s bursts of pink noise at noise levels increasing from 50 to 80 dBA in 5 dB increments. The average RMS response is shown in Figure 6 with absolute error bars, showing a perfect correlation (r 2 = 1.00).

Repeatability
From 24/10/2018 until 14/10/2019, a total of 1711 journeys were recorded in neonatal ambulances totalling a distance of over 97,000 km of road.
For 37 journeys along the same stretch of single-carriageway, recorded vehicle speeds were similar ( Figure  7). The only exceptions were at traffic lights, at 1.5 km and 2.5 km along the route.
Misalignment between smartphone and vehicle axes was found to be minimal, with the Z-axis being within 0.15°of vertical. This small error confirms that reorienting the smartphone axes is not required.
Smartphone accelerations were found to result in similar waveforms for each of the 37 journeys, clearly showing repeated events ( Similarly, noise levels demonstrated the same trend for all 37 journeys ( Figure 10). Magnitudes of the median maximum noise level for each 10 m segment varied by less than 2 dB, with an inter-quartile range between 61.3 dB. Average noise level for the route was 73.7 dB, fluctuating between 63.5 and 76.0 dB.
Features in the noise levels were seen to line up with several of those in the acceleration. To highlight any causality, normalised noise levels and accelerations were plotted against vehicle speed ( Figure 11). Data were normalised by calculating the z-scores of the 10 m segment medians. Sixty-nine percent of the variation in maximum noise levels could be explained by the vehicle  speed whereas vertical accelerations were found to be independent (r 2 = 0.04).

Discussion
An app has been developed to provide an estimation of the accelerations and sound levels experienced within ambulances used for neonatal transport. Data recorded needed to be both accurate and repeatable from one journey to the next to enable analysis of the impact of the road, with routing being a possible use case. As well as reliable data, it is imperative that patient care is not obstructed by use of the app. The minimal interface of the app, along with automatic data retrieval, led to over 1700 journeys being recorded by the ambulance crews involved.
With over 30 h recording available on a full charge, journeys of all lengths could be recorded. Recording at 20 MB per hour would allow for over 1000 h of recordings to be stored in a smartphone with 32 GB of   available storage. As successfully uploaded files are periodically deleted from the smartphones, on-board storage usage should never reach capacity.
Subject to single-frequency sinusoidal accelerations, the smartphones gave an appropriate response covering the typical 3-20 Hz exposure range during neonatal transport. 7 The smartphone response was almost identical at both magnitudes tested, suggesting a linear response over the relevant magnitudes of acceleration. Although the control accelerometer was kept at a constant magnitude throughout, the shape of the response between 68 and 80 Hz suggests vibrational modes were present in either the shaker platform or smartphone, along with the inability to rigidly attach the reference accelerometer without damage. It is plausible that, given a perfect shaker setup, the smartphone response would match the reference more closely.
Maximum noise values outputted by the smartphones were found to be a good estimation of the maximum A-rated sound level. Smartphone values were almost identical to those of the sound meter at all noise levels tested, with a maximum error of 0.92%.
The route chosen for analysis was the most used stretch of single carriageway in the data set, which, unlike dual carriageways, would ensure the ambulance was always in the same lane. The route also consisted of multiple different speed-limit sections, introducing more variability than would be expected on other roads and enabling analysis of parameters which may vary with speed. With no traffic jams and little variation over the same sections of road, journey speeds were found to be highly consistent along the route only varying slightly (10%) amongst datasets. Areas of large variation in speed were due to traffic lights (1.4-1.5 and 2.3-2.6 km) and a major roundabout (8.3-8.4 km), both of which can necessitate sharp reductions in speed.
Positioned on the transport trolley for 37 journeys along the same route, the smartphone accelerometers gave similar values at the same locations. Accelerations varied the most of all data ( . 35%) and showed minimal correlation with vehicle speeds. This suggests recorded accelerations characterise the road, regardless of the driving style, further supported by the 10 Hz spectral peak which is in the frequency range associated with wheel hop.
Vibration spectral density shows good agreement to results published by both Blaxter et al. 7 using a microelectro-mechanical system accelerometer attached to the incubator chassis, albeit sampling at half the rate, and Green et al., 33 recording at the ambulance floor. Similarly, the average noise level along the test route was within 1 dB of the mean measured inside the incubator by Prehn et al., 8 however their peak value of 87.7 dB was . 6 dB greater than the maximum noise level recorded by any of the smartphones along the test route. This may be due to different road surfaces, vehicle speeds or the location on the trolley.
Although no link was shown between the recorded accelerations and vehicle speed, noise levels were found to be highly correlated. While more controlled  assessment is required to fully explore the connection between speed and acceleration, this suggests that a metric for maximising comfort may require a compromise between optimal vehicle speed, depending on clinical urgency, and choosing smoother roads. Despite a single carriageway stretch of road being chosen for analysis to try and ensure the same road surface, there are multiple factors which could have lead to discrepancies between journeys: such as sideways variations within the lane; vehicle speed; weather conditions; and wear as both traffic and weather could cause degradation over the 11 months analysed.

Conclusion
A most comfortable route option during transport on roads would be beneficial to all users, ranging from those in need of emergency transportation to the general public. In order to provide a most comfortable route an extensive collection of road data is required, with the focus being vibration and noise. An application for Android devices was created for the purpose of crowdsourcing road data during everyday driving and tested on a smartphone.
We have demonstrated that Android smartphones are a viable method of collecting road data, utilising the ambulances used for neonatal transfers. Although acceleration and noise levels vary between trips along the same road, the trends are always visible with larger noise levels associated with greater vehicle speeds and acceleration levels deriving from the road surface.
The next stage in finding a most comfortable route will be to assess the different roads available. For neonatal transfers, this will involve splitting all roads travelled by the neonatal ambulances into unique segments. By accumulating data recorded during all journeys along each segment and applying different metrics to be minimised, shortest path algorithms could then be used to output the optimum route.