Estimation of Vehicle Counts from the Structural Response of a Bridge. In 2019 International Conference Smart Infrastructure

In this paper an offline method for counting vehicles travelling across a bridge through its structural response under loading is developed. Readings from a single vertically oriented accelerometer fixed to the bridge are normalised and then summarised by instantaneous amplitude envelopes. The envelopes for a single vehicle have a profile that is log-normal in appearance. Least squares fitting is used in conjunction with the Akaike information criterion to fit the envelope time series as the superposition of 𝑛𝑛 log-normal functions (other functional forms are also considered). It is hypothesised that this fit describes 𝑛𝑛 vehicles travelling across the bridge. This method is applied to data from a previous study on rapid deployment of structural health monitoring systems undertaken on the Clifton Suspension Bridge (CSB) in Bristol. The data from a single strain gauge-based accelerometer installed as part of a wireless sensor network (WSN) on the bridge is used and demonstrates the value added by this method to pre-existing asset monitoring systems. A prediction accuracy of 74% is achieved on a labelled test set.


Introduction
Structural health monitoring (SHM) systems enable those responsible for the safe and proper maintenance of critical infrastructure to make better data-driven decisions in order to ensure that damage and deterioration is properly managed. Sensors are fitted to an asset so that the displacement and acceleration of its structural components can be recorded. A great deal of work in applying novel sensing capabilities is undertaken in this area. Chan et al. (2006) installed Fiber Bragg grating sensors to take strain measurements of the Tsing Ma bridge in Hong Kong. Their optics-based sensing capability provided comparable strain measurements to a previous study. Oh et al. (2015) implemented a vision-based system to monitor the acceleration of a building from a multi-camera installation. Their system captured identical behaviour to traditional accelerometers. To monitor the entirety of an asset, sensors are often deployed at various locations as part of a wireless sensor network (WSN), such as a WSN of video cameras to monitor the structural health of a bridge (Basharat, et al., 2005).
Sensing capabilities like these provide rich data sources to perform remote and intelligent SHM. However, what is less well researched is using the information from these sensors for a secondary purpose. Once a sensing capability has been installed onto an asset for SHM, there are no other costs besides the required maintenance of the WSN, and there is great potential to add value by using the data for other purposes.
This paper describes a method that reuses data from accelerometers installed as part of a WSN on the Clifton Suspension Bridge (CSB) in Bristol. Originally installed as a feasibility study in deploying SHM systems on the bridge, the sensors monitored the acceleration and displacement of the CSB over a two-month period. In this paper, a method is developed to count the number of vehicles that cross the bridge from the accelerometer data. Traditionally inductance loops are used to count vehicles, however, they are expensive to install and require the road to be closed and dug up. A method that can count vehicles by using already available data might therefore represent savings both in cost and in time.

Background
In January 2017 a WSN was fitted to the CSB for a study in rapid deployment of SHM systems (Gunner, et al., 2017). From 25 January to 16 March 2017, the bridge's structural response was captured and stored so that any changes in the bridge's physical condition might be monitored.
The CSB stands at 75m above the River Avon and spans 214m across the Avon Gorge joining Clifton to Leigh Woods. The deck is suspended via 81 pairs of vertical iron rods. Since its opening in 1864, the bridge has remained an important piece of infrastructure, carrying three million vehicles every year (Yeung & Smith, 2005). The bridge has one lane in each direction that is accessible to cyclists. A 20mph speed limit is in force on the bridge and so it takes a minimum of 24 seconds to drive across the entire span. There is a footpath on each side of the bridge for pedestrians. Figure 1 Sensor deployment in the CSB trial. The Clifton end is in the foreground and the Leigh Woods end is furthest away from the viewer. The camera is pointing in a broadly westerly direction.
A toll barrier at each end of the CSB records when a vehicle enters the bridge, truncated to the nearest minute. Vehicles travelling towards Leigh Woods pass through the toll barrier at the Clifton end of the bridge and vice versa. There is no information available on when cyclists and pedestrians enter or leave the bridge.
Since a large number of vehicles use the CSB (over 8,000 per day on average), the toll barrier data, together with the structural responses captured in the study, provide a rich data set to help develop a vehicle count estimation method. Due to its age and design, the CSB is more compliant under loading than modern bridges. Hence the deflections due to vehicles tend to be larger and more easily identifiable.

Sensor deployment
Due to time and cost constraints, just four accelerometers were deployed on the bridge, in two pairs. Each pair straddles the width of the bridge deck, with one accelerometer on the north side and one on the south side, so that both vertical and torsional displacement can be measured. Each accelerometer is identified by the vertical iron suspension rod it is closest to, counting from the middle of the span, and whether it is on the north or south (N or S) side of the bridge, see Figure 1. The accelerometers have a range of 10ms -2 , a sampling rate of 4,000 readings per minute and a resolution of 5.2×10 -5 ms -2 . The sampling rate which is relatively low, is chosen to prolong battery life, whilst resolving the principle modes of the bridge.
The first accelerometer pair (11LW N and 11LW S) is placed 26.8m from the midpoint, since Macdonald (2008) showed that this is the optimal location to pick up all of the deck's natural frequencies up to 3Hz.
The second pair (40 LW N and 40 LW S) is placed towards the Leigh Woods end of the bridge, where the structural response to a vehicle entering or exiting there is greatest.
Finally, in addition to the accelerometers, displacement transducers were deployed at the north and south sides of the deck at the Leigh Woods end. The transducers measure vertical displacement, however, their data is not used in this study. A comprehensive description of the sensor deployment is provided in Gunner et al. (2017). Figure 2 shows two-minute windows of the bridge's structural response to vehicles travelling across the bridge in each direction, where the directions are determined by the toll barrier data. The figure shows that accelerometers 11LW N and 11LW S are featureless under loading for both directions of travel, whereas a clear response is observed in accelerometers 40LW N and 40LW S. There is no obvious difference between the responses recorded by the 40LW N and 40LW S accelerometers, therefore we will only consider the acceleration recorded by 40LW N in this paper, which we denote as at time .

Segmentation and matching of accelerometer data
In order to develop a method to count vehicles, the accelerometer data is segmented into windows with corresponding ground truth vehicle counts provided by the toll barrier data.
The toll barriers record when a vehicle enters the bridge truncated to the nearest minute. That is, a vehicle arriving at time ≔ YYYYDDMM hh:mm:ss is attributed to ( ) ≔ YYYYDDMM hh:mm:00. (1) Minute by minute, we thus have counts for the number of vehicles that enter each end of the bridge. The accelerometer data can then be segmented into the corresponding oneminute windows that begin at time ( ).
Consider the following situation. A vehicle enters the bridge at time 1 , and is still travelling across the bridge at time 2 such that ( 2 ) > ( 1 ). In this case, the vehicle may cause a structural response in the one-minute window after that in which it enters the bridge.
To ensure that all structural responses of a vehicle entering in a given minute are captured, we group that minute's toll barrier data with the accelerometer data for that and the following minute, resulting in a two-minute window.
Further, to prevent confusion with the structural response caused by vehicles that enter the bridge either before or after the selected minute, we take forward for analysis only those minutes for which the immediately preceding and succeeding toll barrier counts are zero. The accelerometer has a sampling interval of Δ = 0.015s, and so each two-minute window of accelerometer data can be expressed as , for = 1,2, … , where = 8,000.

Instantaneous amplitude envelope computation
To ensure that each window of accelerometer data has a similar minimum and maximum amplitude, a normalisation is performed on each window in the form to give normalised readings ̃ between -1 and 1.
We now summarise accelerometer data in a smoothed form known as the instantaneous amplitude envelope (IAE) (Picinbono, 1997). We consider the three following methods for computing the IAE, see Figure 3. 1. Peak to Peak. The accelerometer data is replaced by a cubic spline that interpolates local maxima, provided they are separated by at least time-steps (Biswas & Si, 2011). Here = 5 was observed to achieve the required level of smoothing, but the computed envelope is not necessarily positive, so the method is discarded. 2. Analytic Signal. The IAE is found from the magnitude of the discrete-time analytic signal (Reilly, et al., 1994). The computed envelopes are less smooth than we require, so the method is discarded. 3. Moving Root Mean Square (MRMS). MRMS computes the root mean square from a window of width 2 that slides across the accelerometer data (Albu & Heydt, 2003). Thus smoothed readings ̂ are found by where = min( , , − ). The computed envelope is thus strictly positive, and a choice of = 20 (window width of 0.6s) seems to give an appropriate level of smoothing. This method is used in the remainder of this study. Figure 3 Normalised accelerometer data for a twominute accelerometer window and the corresponding IAE computed by the three methods.

Labelled data set
The toll barrier data is inspected to find one-minute windows when one, two or three vehicles enter the bridge at one end, and no vehicles enter at the other end. Further, only windows for which no vehicles enter at either end in the preceding and the following minute are considered. A two-minute window of IAE accelerometer data, corresponding to the selected minute and that which follows, is then extracted for analysis. Such quiet traffic conditions feature mostly at night-time, so the search was restricted to 10pm to 7am each night. In addition, this selection reduces the likelihood of structural responses to pedestrians or cyclists, whose ground truth numbers are not known.
In total, we built a training set of 30 windows and a validation set of 120 windows, as shown in Table 1. Here the counts from the Leigh Woods and Clifton toll barriers are denoted by LW and C respectively. The training windows are used to tune the method in Section 4 and the validation windows are used to test its accuracy in Section 5.
The method identifies the structural response to each vehicle, and thus automatically counts vehicles travelling across the bridge in each window. The method is developed to work both when the response is clear for each vehicle, as shown in Figures  2 and 3, and when the bridge is busier.
To summarise: each selected window is equipped with the count for each toll barrier LW and C , and a smoothed IAE time series ̂ for = 1,2, … , . For reference purposes, the time ( ) (YYYYMMDD hh:mm:00) at which the window commences is also recorded. Table 1 Labelled data set of 30 training windows and 120 validation windows. We collect 30 training windows with a single vehicle for training and 120 validation windows for one, two and three vehicles.

Method
The bridge will exhibit a damped oscillatory response to loading. This response is multi-modal and complex. The general idea is to seek the optimal fit of the IAE with a simplified closed-form function that captures the number of vehicles crossing the bridge. Section 4.1 describes the method and Section 4.2 fits it to the training set.

Derivation of the method
We try to fit a function to the smoothed IAE time series, ̂ for = 1,2, … , . The IAE begins at time 0 , and the th reading ̂, is recorded at = 0 + Δ . This provides a mapping from the discrete time index of the IAE, to continuous time .

Single vehicle:
We use the basis function ( ; ) to fit the IAE of the bridge's structural response under the loading of a single vehicle. We assume that the function is smooth and is parameterised by parameters, = [ 1 , 2 , … , ].
In addition, we include a scaling parameter to account for different envelope amplitudes, and a shift parameter that locates the vehicle within the two-minute window. Thus we fit ( ; , , ) = γ ( − , ).
The chosen estimate * for the number of vehicles, is then found by the putative 'trial' number of vehicles that minimises the mean square error (MSE), between the fitted function and the IAE.
The parameters , and are found in sequence. That is, the parameters that describe a single vehicle 1 , 1 and 1 , are solved for and fixed. Then, the parameters that describe a second vehicle, 2 , 2 and 2 , are solved for and fixed, and so on.
The procedure continues to add vehicles until the information criterion described in Section 4.1.3 tells it to stop. At this point, the procedure has arrived at its final estimate * .

Akaike information criterion:
To avoid over-fitting, the Akaike information criterion (AIC) (Akaike, 2011) is used to penalise the goodness of fit o ( ) by the number of used parameters ( + 2). The AIC is defined by where log ̂ is the maximum value of the log-likelihood function of the fit ( ) given the IAE. The chosen estimate * is selected by the function that minimises the AIC.

Auto-correlation and the likelihood function:
Standard likelihood techniques make the assumption that the error terms between the fitted function and the IAE, i = ̂ -( 0 + Δ ), are identically and independently distributed (iid). This is not an appropriate assumption when dealing with time series data, as consecutive errors are likely to be correlated.
Instead, we assume that the errors follow an auto-regressive (AR) process. Each error is modelled as the weighted sum of the previous errors plus a noise term, which is assumed to be iid normally distributed with zero mean and variance 2 in the form where | | < 1 for = 0,1, … , . The parameter is known as the order of the AR model, which is denoted as AR( ). The AR coefficients (weights) define how correlated each error is with the th error before ( − ), known as the th lag.
The AR coefficients are determined by the Partial Auto-Correlation Function (PACF) (Ramsey, 1974). In practice, software routines such as the parcorr function in Matlab can be employed to find the PACF. The choice of model order is described in Section 4.2.3 The th error from the AR process is then defined by where ̂∼ (0, ).
Note the two-minute windows contain periods when there are no vehicles on the bridge, and therefore, there is no structural response, only background noise.
So that we only consider data above the noise floor, a threshold is set. We then consider only those ̂< errors ̅ for which ̂> for = 1,2, … ,̂. Here the threshold is set to 0.05ms -2 , by visual inspection.
The errors ̅ are also normally distributed with zero mean but with variance ̅ 2 . A standard calculation gives the loglikelihood function for the fitted function ( ) in the form for constant . Substituting Equation (10) into Equation (7) gives the quantity to be minimised. To summarise, in doing so we find the estimated number of vehicles that cross the bridge, from * = argmin [2 ( + 2) + ̂log (∑ ̅ 2 = 1 )]. (11)

Training the method
To determine the basis functions and various parameters in the method, we consider its application to a training set in which only one vehicle is present in each two-minute window, see Table 1. The restriction to single-vehicle set-ups is in order to factor out additional problems if the linear superposition assumption turned out to be poor.

Choice of basis functions:
We consider the basis function ( ; ) that models the IAE time series of the bridge's structural response to a single vehicle entering the bridge at either end. A good basis function will give a small mean squared error in Equation (6) with = 1.
Thus each selected IAE summarises the damped oscillatory response of the bridge to the dynamic loading caused by a single passing vehicle. The overall shape should be one with a rapid 'attack' and a gradual (probably exponential) decay. Inspired by probability theory, we considered the following three forms for the basis function, each of which has ( = 2) two parameters that control 'location' and 'dispersion' and thus the overall 'shape'.

log-normal:
gamma: Weibull: The quality of each function is computed by calculating the optimal MSE for each of the 30 single-vehicle training windows. Table 2 shows the mean MSE (MMSE), i.e., the average across the 30 windows. The log-normal fit is best and so log-normal basis functions are used going forward.

Examination of the log-normal parameters:
We now consider whether the log-normal parameters and are similar for each vehicle travelling across the bridge. If they were, they might be fixed in the fitting process so that only and need be determined for each vehicle. For each of the training windows we fit a log-normal function by least squares to find the optimal parameters = [ , ], and . Figure 4 shows a scatter plot of the optimal and parameters. There is unfortunately no consistent pattern and therefore the log-normal parameters must be found independently for each vehicle going forward. Figure 4 Scatter plot of log-normal parameters fitted to 30 training windows.

Auto-regressive model order:
We now use the training windows to determine the order of the auto-regressive model described in Section 4.1.4. For each window we fit a lognormal function and compute the errors and the first 30 weights . We then calculate the mean weights ̅ averaged over the training windows.
The model order is determined by the lag for which the mean weight falls within the 95% significance interval (Bollerslev, 1986). Figure 5 shows the mean weights for each of the tested lags. All of the significant autocorrelation is contained within the first eight lags. Therefore, in the likelihood calculation described in Section 4.1.4, the error terms ̂ are computed by an AR(8) process.
The AR model order is the only system parameter learnt prior to the vehicle counting procedure described in Section 4. In summary, for each window and for each putative number of vehicles, new log-normal means and standard deviations , scales and shifts are found by least squares. In the likelihood calculation, new sets of AR coefficients for = 0,1, … , 8 are also computed. Figure 5 Mean AR coefficients and the 95% confidence intervals.

Results
We test the method by computing the estimated number * of vehicles for 120 validation windows and comparing with their ground truth counts LW and C , see Table 1. The results are shown in Table 3. Since the method does not identify the direction of travel, LW + C = * corresponds to a correct prediction (although for any one validation window, only one of LW or C is non-zero). The method estimates the correct number of vehicles in 89 (74%) of the validation windows. Table 3 Toll barrier counts and the corresponding estimated number of vehicles * , for 120 validation windows.  Figure 6 illustrates the method at work for two exemplar windows. In each example, the MSE decreases as the putative number of 'trial' vehicles increases and the function ( ) becomes more complex. However, the AIC penalises the Figure 6 Estimation method in operation for two exemplar windows. (a) LW = 2, C = 0 (b) LW = 0, C = 1. Left-hand panels (i) show the superposition of one, two, three and four basis functions fitted to the IAEs. Righthand panels (ii) show the corresponding MSE and AIC for the fits. complexity of ( ), and the number of vehicles is found correctly, by its minimisation.

Discussion
The overall prediction accuracy of 74% is somewhat disappointing. However, when C = 0 (vehicles only enter at the Leigh Woods end), we achieve an accuracy of 87% and we have the beginnings of a plausible operational method. In addition, for these windows, there is no evidence of bias towards over or under-counting.
In contrast, the fit to vehicles entering at the Clifton end is poor, and there is apparently a bias towards over-counting. This may be explained by the exemplar window shown in Figure 7. A single log-normal basis function is a poor fit to the structural response in this case, because the vehicle causes two peaks in the structural response, one when it enters the bridge at the Clifton end, and a second when it reaches the accelerometer at the Leigh Woods end. The estimation method attempts to fit the two peaks with two basis functions, and so counts two vehicles when only one is present. This problem does not arise for vehicles entering at the Leigh Woods end, because the entry peak is almost simultaneous with that when the accelerometer is reached. Note Table 2, which concerns the training set, has already indicated that unimodal basis functions fit the Leigh Woods vehicles better than the Clifton ones.
Further work should consider different basis functions for the two directions of travel, which would also allow the counts for the two directions of travel to be separated. Alternatively, we might place the accelerometer in a position which is indifferent to the direction of travel, e.g., midway along the span. Note also that this paper has only used the data from a single accelerometer, as the aim was to demonstrate the beginnings of a plausible operational method that might be applied to existing SHM set-ups, with a very limited number of sensors. However, clearly a range of improvements might be possible if the data from multiple accelerometers were fused. Figure 7 An example where C = 1, ( LW = 0) and * = 2. When the vehicle enters at the Clifton end, there is an additional peak in advance of that when it reaches the Leigh Woods end detector.

Conclusion
In this paper we have developed a method that estimates the number of vehicles that cross a bridge from its structural response to their dynamic loading. We have applied the method to scalar accelerometer data from the Clifton Suspension Bridge (CSB) in Bristol, UK. A validation exercise applied to a set of selected two-minute windows of data counted the correct number of vehicles in 74% of the set. However, due to various features of the set-up, which was designed for structural health monitoring (SHM), not for counting vehicles, the method performs quite differently in the two directions of travel -61% and 87% accuracy respectively. The higher figure suggests that with some refinements to the method and sensor set-up, we have the beginnings of a deployable operational system. Note that for many practical traffic management and appraisal purposes, the key is not that vehicles are counted precisely, but rather that an offline estimate of the count is unbiased over quite long time periodsthis requirement is relatively tame and looks to be within reach.
There are several shortcomings in our current work and consequently opportunities for future research. Firstly, as currently presented, the method does not distinguish between the directions of travel. However, this appears addressable by considering the data from multiple sensors and distinct basis functions for each direction. Secondly, the validation set currently used is not representative of typical operational conditions, because it does not mix vehicles with different directions of travel, and the total vehicle counts are quite low, compared to busier times of the day. Future work should investigate to what degree the method can identify individual vehicles when there are many different overlapping structural responses, perhaps including those from cyclists and pedestrians too, and indeed whether linear superposition holds in congested traffic flow regimes. Finally, the method as presented works because the CSB is much more compliant than modern concrete bridges, where an examination of higher frequency information, rather than the amplitude envelopes used here, is likely to be the way forward.