1 Introduction

Autonomous, driverless or self-driving vehicles are going through intensive testing to be released in the near future for public transport in different major cities in Europe and all over the world [1]. Although they provide many advantages such as reduced parking spaces, lower emissions and fewer congestions, they may also pose a risk to the public safety if unsuccessful in collecting or processing key input from their surroundings [2]. To go fully independent of human interaction, it is important to consider all the inputs usually considered by a human driver. An important factor in this regards is related to the road roughness. This factor often helps a human driver to decide on the vehicle distance from other road users, its speed, acceleration and its trajectory. However, for an autonomous vehicle processing such data in real time can be a challenge [3, 4].

Determining the most feasible trajectory is an important level of a vehicle autonomy not only for safety but also for passengers comfort [4]. Several methods can be found in the literature for trajectory optimisation based on driving scenarios on highways or country roads [5, 6]. Based on longitudinal and lateral accelerations of an autonomous vehicle a dynamic controller is proposed to follow a desired path and to describe the driving and handling limits of the vehicle [7]. The vehicle velocity was also studied for travelling time and road curvature constraints [8, 9]. A model predictive control was developed for an autonomous vehicle based on the feasible road region and the vehicle shape [3]. A path planning algorithm for autonomous driving that avoids in real-time static and dynamic obstacles was developed in [10]. To optimise the trajectory for urban driving, it was proposed to decompose the problem into a spatial path and a velocity profile so that they can be studied separately [11].

Accurately detecting the road surface condition can be crucial for a safe vehicle trajectory [12]. In this context, we are interested in identifying the road roughness which refers to the disturbances induced by an uneven road on a moving vehicle [13]. The road roughness is an essential vertical input that plays an important role not only for trajectory but also in the entire vehicle dynamic design and fatigue life [14,15,16]. International Organization for Standardization (ISO) specifies a method for reporting measured vertical profile of a road in ISO8608:2016 [17]. International roughness index (IRI) is specified as a standard practice to evaluate road roughness from longitudinal profile measurements. The IRI was first introduced in 1986 by American Society of Testing and Materials (ASTM) [18].

Different models of road roughness have been widely studied in the literature [19,20,21,22,23,24,25,26]. These models can be classified into two main categories. The first category relies on simulations of roads with parameters that can be adjusted to change the simulated road roughness, while the second relies on measurement taken from actual roads. The first category is in general based on empirical statistics and mathematical models that are an approximation of actual roads. The inverse fast Fourier transform was used to simulate road roughness, and the results were compared to the trigonometric series method [21]. The road and vehicle spectral functions were combined with a trip schedule to estimate road roughness and the corresponding vehicle speed and segment duration [22]. An ISO profile was used in stochastic modelling to identify IRI roughness coefficient [27] where the proposed Laplace model was validated for eight road profiles. The spectral factorisation approach was used for full-car models in [28] where two different formulations were presented and validated for different road profiles.

The second category of methods that rely on measurements of actual roads can be further subdivided into two classes based on the used equipments if they contact or do not contact the road. Examples of the contact class methods are as follows: the level and ruler, the beam, the three-metre ruler, the multi-round instrument and in-pavement strain sensors among others [29,30,31]. Examples of the non-contact methods include the following: the general motors road profilometers, vehicular bump-integrator, laser profiler, schematic diagram of sensors and mobile laser scanning data [32,33,34]. Generally speaking, contact methods are more accurate but less efficient than non-contact methods [29, 35]. The reduced accuracy of the non-contact methods can be attributed to the vibrations of the vehicle that carries the measurement equipments.

It should also be mentioned that several algorithms were developed to estimate the road roughness based on measured data. Coherence functions method [23], Kalman filter [36, 37], artificial neural network [38] and machine learning technology [39] are some examples. However, a major issue for these algorithms is related to the noise in the measured data which can significantly impact the accuracy. Also the computations required in these relatively complex models makes it difficult to achieve real-time road roughness estimation which is an essential issue for autonomous vehicles.

In this study, we aim to estimate the road roughness by measuring the vibrations of a vehicle. We propose an inverse algorithm to estimate the profile of a road using only the knowledge of the vehicle and its dynamic response. The algorithm is designed to be integrated into the navigation and the control system of an autonomous vehicles. The aim is to obtain road roughness in real time with minimum computational resources and output the roughness into the control system. Constructing the input from the dynamic system response belongs to the second inverse problem as specified in [40]. Solving such problem can be achieved either in the time domain or the frequency domain [41,42,43]. Although the frequency domain methods are easier to implement, they are not suitable for non-stationary vibrations. On the other hand, time domain methods can deal with non-stationary vibrations but can suffer from the temporal error accumulation. The proposed algorithm is a time domain method and is coupled to a four degrees-of-freedom (DoF) model that is solved in real time. It should also be noted that the presented work is among the first to use an inverse solution for estimating road roughness not only for autonomous vehicles but also in the context of designing vehicles.

Fig. 1
figure 1

Schematic diagram of the considered half-car model

Next, the simplified model of the vehicle and the equation of motion are presented in Sect. 2. The inverse method is explained in Sect. 3, while in Sect. 4 numerical experiments are run to evaluate the accuracy and the efficiency of the proposed method. We finish with some concluding remarks in Sect. 5.

2 Half-vehicle model and equation of motion

The dynamic model used in this paper is the ‘bicycle model’ or ‘4 DoF half-car model’ which is a standard representation for a car suspension system. The main advantage of the half-vehicle model compared to quarter-vehicle is the ability to include the vehicle pitching motion in the calculation. It also allows considering the effect of the centre of gravity location and accounts for different damping an stiffness for the front and rear wheels. Such properties can significantly differ between different vehicles. The model involves one rotational and three translational degrees of freedom that are shown in Fig. 1. The vehicle body is represented by a rigid beam in the figure and has a pitching moment of inertia \({I_c}\) and a mass \({m_c}\). The body has a translational and a rotational degrees of freedom. The translational DoF is noted with x in the figure, located at the centre of gravity C and has a vertical direction. The rotational DoF is noted with \(\theta \) in the figure and represents the pitching angle of the mass around the centre C. The remaining two degrees of freedom are the vertical translation of the unsprung front and rear masses which are denoted by \(m{t_f},m{t_r}\), respectively. These masses are connected to the body through the springs and dampers as shown in Fig. 1. The front and rear wheels are simplified as linear springs and dampers that are connected to the unsprung masses. The parameters \(k{t_f},k{t_r}\) and \(c{t_f},c{t_r}\) represent the stiffness and damping coefficients of the front and rear wheels where the subscript f denotes front and r rear. The road disturbances denoted by \({z_f}\) and \({z_r}\) are assumed to be the only vertical inputs on the vehicle. The types of transient disturbances we consider in this paper are sinusoidal or random fluctuations or it can be a combination of these two types. We also assume micro-amplitude vibrations so that \(\sin \theta = \theta \) and \(\cos \theta = 1\). All displacements are considered to be zero at the static equilibrium conditions.

Starting from Newton’s second low the equation of motion can be obtained

$$\begin{aligned} \mathbf{M}\ddot{\mathbf{u}} + \mathbf{C}\dot{\mathbf{u}} + \mathbf{Ku} = \mathbf{f} \end{aligned}$$
(2.1)

where \( \mathbf{M},\mathbf{C}\) and \(\mathbf{K}\) are, respectively, the mass, the damping and the stiffness matrices of a considered system while \(\mathbf{f}\) represents any external forces applied to it. The variable \(\mathbf{u}, \dot{\mathbf{u}}\) and \(\ddot{\mathbf{u}}\) represent the displacement, the velocity and the acceleration vectors, respectively. The matrices are explicitly defined for our considered model as

$$\begin{aligned} \mathbf{M}= & {} \left[ \begin{array}{cccc} m_c &{} 0 &{} 0 &{} 0 \\ 0 &{} I_c &{} 0 &{} 0 \\ 0 &{} 0 &{} mt_f &{} 0 \\ 0 &{} 0 &{} 0 &{} mt_r \end{array} \right] , \mathbf{C}=\left[ \begin{array}{cccc} c_f+c_r &{} ac_f-bc_r &{} -c_f &{} -c_r \\ ac_f-bc_r &{} a^2c_f+b^2c_r &{} -ac_f &{} bc_r \\ -c_f &{} -ac_f &{} c_f+ct_f &{} 0 \\ -c_r &{} bc_r &{} 0 &{} c_r+ct_r \end{array} \right] ,\\ \mathbf{K}= & {} \left[ \begin{array}{cccc} k_f+k_r &{} ak_f-bk_r &{} -k_f &{} -k_r \\ ak_f-bk_r &{} a^2k_f+b^2k_r &{} -ak_f &{} bk_r \\ -k_f &{} -ak_f &{} k_f+kt_f &{} 0 \\ -k_r &{} bk_r &{} 0 &{} k_r+kt_r \end{array} \right] , \mathbf{u}=\left[ \begin{array}{c} x \\ \theta \\ y_f \\ y_r \end{array} \right] , \mathbf{f}=\left[ \begin{array}{c} 0 \\ 0 \\ ct_f\dot{z}_f+kt_fz_f \\ ct_r\dot{z}_r+kt_rz_r \end{array} \right] , \end{aligned}$$

where all the parameters are summarised in Table 1.

Table 1 Half-car model parameters specification

3 Estimating the road roughness

The relation between the road disturbances \({z_f(t)}\) and \({z_r(t)}\) and the vehicle response can be defined using Eq. (2.1) where the external forces \(\mathbf{f}\) are resulting from these disturbances. We aim to identify \({z_f(t)}\) and \({z_r(t)}\) based on the vehicle acceleration response \(\ddot{\mathbf{u}}\). Therefore, we need to find the inverse solution of Eq. (2.1) by first identifying \(\mathbf{f}\). Next, and based on the external force vector \(\mathbf{f}\) we can reconstruct \({z_f(t)}\) and \({z_r(t)}\) using the composite Gaussian quadrature. The proposed inverse solution and the procedure to reconstruct the road disturbances are described next.

3.1 Inverse method for estimating the force vector

Evaluating the forces based on the dynamic response of a structure is a typical inverse problem [41, 42]. In this regards, the Newmark method is a stable recursive algorithm and is widely used for recovering the structural dynamic response in time domain applications when solving the forward problem [44]. It is an efficient and accurate method for multi-degrees of freedom system such as the one considered here. Because in this paper we look into time domain applications, we base our iterative inverse algorithm on the Newmark method. Here, it should be noted that the proposed algorithm could also be implemented with other time integration schemes but with minor changes. The algorithm uses the acceleration response and the dynamic characteristics of the vehicle to recover the forces \(\mathbf{f}\). Basing the proposed procedure on acceleration is a key for implementation in autonomous vehicles as acceleration is relatively easy to collect in real-time.

Using the Newmark method based on Richardson’s extrapolation [44], it is possible to write the following pseudostatic recursive equation at time (t)

$$\begin{aligned} {{\mathbf{K}}^{*}}{\mathbf{u}}(t) = {{\mathbf{f}}^*}(t) \end{aligned}$$
(3.1)

where the equivalent stiffness matrix \({{\mathbf{K}}^*}\) and the equivalent force vector \({{\mathbf{f}}^*(t)}\) are given as

$$\begin{aligned} {{\mathbf {K}}^{*}}&= \mathbf {K}+\frac{1}{\beta \Delta {{t}^{2}}}\mathbf {M}+\frac{\gamma }{\beta \Delta t}\mathbf {C} \end{aligned}$$
(3.2)
$$\begin{aligned} {{\mathbf {f}}^{*}}(t)&= \mathbf {f}(t)+{\hat{\mathbf {f}}}(t - \Delta t) \end{aligned}$$
(3.3)

with \(\Delta t\) being the time sampling interval, while \(\beta \) and \(\gamma \) are the Newmark parameters and \({\hat{\mathbf {f}}}(t - \Delta t)\) is a virtual force vector that is given as

$$\begin{aligned} {\hat{\mathbf {f}}}(t- \Delta t)=\,&\mathbf {M}\left( \frac{1}{\beta \Delta {{t}^{2}}}\mathbf {u}(t- \Delta t)+\frac{1}{\beta \Delta t}\dot{\mathbf {u}}(t- \Delta t)+\left( \frac{1}{2\beta }-1\right) \ddot{\mathbf {u}}(t- \Delta t) \right) \nonumber \\&+\, \mathbf {C}\left( \frac{\gamma }{\beta \Delta t}\mathbf {u}(t- \Delta t)+\left( \frac{\gamma }{\beta }-1\right) \dot{\mathbf {u}}(t- \Delta t)+\left( \frac{\gamma }{2\beta }-1\right) \Delta t\ddot{\mathbf {u}}(t- \Delta t) \right) \end{aligned}$$
(3.4)

The displacement \(\mathbf {u}(t)\) at the current time step results from the force vector \(\mathbf {f}(t)\) at the current time step as well as the virtual force vector at the previous time step \({\hat{\mathbf {f}}}(t- \Delta t)\). Therefore, we split the displacements \({\mathbf{u}}(t)\) into two parts: \(\hat{\mathbf {u}}(t)\) and \(\tilde{\mathbf {u}}(t)\) where the former results from \(\mathbf {f}(t)\) and the latter from \({{\hat{\mathbf {f}}}}(t- \Delta t)\). The total displacement vector at the current time step (t) can now be written as the summation of these two parts

$$\begin{aligned} {\mathbf{u}}(t) =\hat{\mathbf {u}}(t)+\tilde{\mathbf {u}}(t) \end{aligned}$$
(3.5)

Thus, Eq. (3.1) can be split in terms of these two displacements such that

$$\begin{aligned} {{\mathbf {K}}^{*}}{\hat{\mathbf {u}}}(t)=\,&{{\hat{\mathbf {f}}}}(t- \Delta t) \end{aligned}$$
(3.6)
$$\begin{aligned} {{\mathbf {K}}^{*}}{\tilde{\mathbf {u}}}(t)=\,&\mathbf {f}(t) \end{aligned}$$
(3.7)

For the forward Newmark problem if the force vector \(\mathbf {f}(t- \Delta t)\) is known, it is possible to obtain \({\mathbf{u}}(t- \Delta t)\), \({\dot{\mathbf{u}}}(t- \Delta t)\) and \({\ddot{\mathbf{u}}}(t- \Delta t)\). These can then be used to get \({{\hat{\mathbf {f}}}}(t- \Delta t)\) and \({\hat{\mathbf {u}}}(t)\) from Eqs. (3.4) and (3.6), respectively. Furthermore, starting from the displacement, velocity and acceleration vectors at the previous time step \((t- \Delta t)\) and using Newmark method, the acceleration vector at the current time step (t) can be written as

$$\begin{aligned} \ddot{\mathbf {u}}(t)=\frac{1}{\beta \Delta {{t}^{2}}}\left( \mathbf {u}(t)-\mathbf {u}(t- \Delta t) \right) -\frac{1}{\beta \Delta t}\dot{\mathbf {u}}(t- \Delta t)-\left( \frac{1}{2\beta }-1\right) \ddot{\mathbf {u}}(t- \Delta t) \end{aligned}$$
(3.8)

By rearranging Eq. (3.8), it is possible to get the displacement vector in the current time step \(\mathbf {u}\left( t\right) \) in terms of the displacement \({\mathbf{u}}(t- \Delta t)\) and \({\dot{\mathbf{u}}}(t- \Delta t)\) velocity vectors at the previous time step and the acceleration at both the current \(\ddot{\mathbf {u}}\left( t \right) \) and previous time steps \(\ddot{\mathbf {u}}\left( t- \Delta t \right) \)

$$\begin{aligned} \mathbf {u}(t)=\mathbf {u}(t-\Delta t)+\dot{\mathbf {u}}(t-\Delta t)\Delta t+\left( \left( \frac{1}{2}-\beta \right) \ddot{\mathbf {u}}(t-\Delta t)+\beta \ddot{\mathbf {u}}(t) \right) \Delta {{t}^{2}} \end{aligned}$$
(3.9)

If the acceleration vector at the current time step is known at all degrees of freedom, we can also calculate the displacement vector \(\mathbf {u}(t)\) using Eq. (3.9). Then, since we already have \({\hat{\mathbf {u}}}(t)\) we can also evaluate \({\tilde{\mathbf {u}}}(t)\) at all degrees of freedom. Finally, the external forces \({\mathbf{f}}(t)\) can be evaluated using Eq. (3.7).

In this paper, we consider a model with four degrees of freedom. The relatively small number of degrees of freedom helps to achieve road roughness estimation in real time which is important for autonomous vehicles. Nevertheless, the same algorithm can also be applied to a system of any number of degrees of freedom. However, if considering a system of thousands or even millions of degrees of freedom as for example a full vehicle model, it is in general not possible to measure acceleration at all degrees of freedom. Processing the input from several accelerometers in real time can be efficiently achieved using the proposed algorithm. Hence, it can be used to estimate road roughness in real time for autonomous vehicles. However, considering the input of hundreds or thousands of accelerometers cannot be achieved within the real-time constraint, although it can still be processed in the same way. Therefore, such models need to be modified to work with only the degrees of freedom where accelerations are measured. According to Eq. (3.9), it is only possible to obtain the displacement vector entries at these degrees of freedom and, hence, \({\tilde{\mathbf {u}}}(t)\) is also obtained from (3.5) for the same degrees of freedom. To find the unknown forces based on incomplete acceleration response, we define a selection matrix \(\mathbf {D}\) that consists of 0 and 1 to determine the positions of the collected acceleration. Because \({{\mathbf {K}}^{*}}\) is positive definite we can write

$$\begin{aligned} {\tilde{\mathbf {u}}}(t)={({\mathbf {K}}^{*})}^+\mathbf {f}(t) \end{aligned}$$
(3.10)

where \({({\mathbf {K}}^{*})}^+\) is the Moore-inverse of \({{\mathbf {K}}^{*}}\). Multiplying with \(\mathbf {D}\) from left on both sides of the equation we get

$$\begin{aligned} \mathbf {D}{\tilde{\mathbf {u}}}(t)=\mathbf {D}{({\mathbf {K}}^{*})}^+\mathbf {f}(t) \end{aligned}$$
(3.11)

For simplicity, we denote \(\mathbf {D}{\tilde{\mathbf {u}}}(t) \) as \(\mathbf {P}(t)\) and \( \mathbf {D}{({\mathbf {K}}^{*})}^+\) as \(\mathbf {Q}\) thus we can rewrite Eq. (3.11) as

$$\begin{aligned} \mathbf {P}(t)=\mathbf {Q}\mathbf {f}(t) \end{aligned}$$
(3.12)

The number of the columns in the matrix \(\mathbf {P}(t)\) is equal to the number of degrees of freedom, m, used for measuring the acceleration. The length of the force vector \(\mathbf {f}(t)\) to be evaluated is k. If we have \(k \le m\) the following equation could be used to evaluate the unknown force vector at the current time step

$$\begin{aligned} \mathbf {f}(t)=\mathbf {Q}^+\mathbf {P}(t) \end{aligned}$$
(3.13)

where \(\mathbf {Q}^+\) is the Moore-inverse of \(\mathbf {Q}\). Thus, we propose employing Eq. (3.13) to reconstruct the forces over the whole time domain. After establishing the recurrence relationship from \(\mathbf {f}(t- \Delta t)\) to \(\mathbf {f}(t)\), the next step is to determine \(\mathbf {f}(0)\).

figure a

At time \(t = 0\), given that the initial displacement, velocity and acceleration vectors are known at all degrees of freedom, it is relatively simple to calculate the initial force vector based on the vibration differential equation with constant coefficients [45] . However, when some accelerations are known at m degrees of freedom and the condition \(k \le m\) is still satisfied we can use

$$\begin{aligned} \mathbf {P}(0)=\mathbf {Q}\mathbf {f}(0) \end{aligned}$$
(3.15)

or

$$\begin{aligned} \mathbf {f}(0)=\mathbf {Q}^+\mathbf {P}(0) \end{aligned}$$
(3.16)

Starting from the initial force vector, it is possible to identify all subsequent force vectors following the inverse Newmark recurrence relations described above. For convenience steps 1 to 17 in Algorithm 1 summarise the proposed inverse procedure. Following the procedure described in the algorithm, the force vector \(\mathbf{f}(t)\) can be identified. This vector will then be used to evaluate the road roughness using composite Gaussian quadrature which is explained next.

3.2 Identification of the road profile

As it is shown in Fig. 1, the road disturbances \({z_f(t)},{z_r(t)}\) affect the third and fourth degrees of freedom in the model. The relation between the forces and the disturbances can be given as

$$\begin{aligned} {f_3}&= c{t_f}{\dot{z}_f}(t) + k{t_f}{z_f}(t) \end{aligned}$$
(3.17)
$$\begin{aligned} {f_4}&= c{t_r}{\dot{z}_r}(t) + k{t_r}{z_r}(t) \end{aligned}$$
(3.18)

Thus, the force vector can also be written as \({\mathbf{f}}(t) = \{0 \qquad 0 \qquad f_3 \qquad f_4\}\). The values of \({z_f(t)}\) and \({z_r(t)}\) can be obtained by solving the two first-order differential Eqs. (3.17) and (3.18). The two equations have constant coefficients and can be integrated over the time domain to obtain these values

$$\begin{aligned} {z_f}(t) =\,&{z_f}(0){e^{ - \frac{{k{t_f}}}{{c{t_f}}}t}} + \frac{1}{c{t_f}}\int _0^{t_\mathrm{final}} {{f_3}(\tau ) \cdot {e^{ - \frac{{k{t_f}}}{{c{t_f}}}(t - \tau ) }}d} \tau \end{aligned}$$
(3.19)
$$\begin{aligned} {z_r}(t) =\,&{z_r}(0){e^{ - \frac{{k{t_r}}}{{c{t_r}}}t}} + \frac{1}{c{t_r}}\int _0^{t_\mathrm{final}} {{f_\mathrm{{4}}}(\tau ) \cdot {e^{ - \frac{{k{t_r}}}{{c{t_r}}}(t - \tau ) }}d} \tau \end{aligned}$$
(3.20)

The initial conditions \({z_f}(0),{z_r}(0)\) can be zero or alternatively evaluated at the initial time step. To evaluate the integrals in (3.19) and (3.20), it is possible to use Gaussian quadrature. However, because the integration domain size increases with each extra step in time we can either retain the same integration points and add more at each time step or re-evaluate the entire time domain with a new set of integration points. The former can lead to high integration errors, while the latter can be computationally demanding. Therefore, we instead use the composite Gaussian quadrature [46].

The composite Gaussian quadrature sets a threshold i.e. \(\tau _0\). The time domain is then divided into intervals of the same size \(\tau _0\) so that the number of the intervals is the quotient of t over \(\tau _0\). We evaluate the integrated function over each interval so that the integral is only evaluated over one interval at a time. Any new intervals are then added to the already evaluated intervals. Thus, the computational costs of integrating over the entire time domain are not repeated. Step 18 in Algorithm 1 shows that the time integration procedure is evaluated at the end of the proposed procedure and only after completing the solution of the inverse problem.

4 Numerical results

In this section, we first introduce the numerical parameters used for the model. Then, the efficiency and accuracy of the model and the proposed algorithm are tested for different road roughness profiles.

4.1 Model parameters

The half-vehicle model parameters considered for the numerical simulation are given in Table 2. These values are based on the parameters published in [47]. Using the considered values, we calculate both the natural frequencies and the damped natural frequencies of the model. These are then compared in Table 3 to the experimental data obtained from [47]. In all the following numerical tests, the considered values of the time integration variables are taken as \(\beta =0.25\) and \(\gamma =0.50\) while the considered time step size is \(\Delta t=0.002\hbox {s}\).

Table 2 Consider input for the numerical tests
Table 3 Natural frequencies of the model compared to the experimental results in [47]

4.2 Test cases

Table 4 Considered road profiles

The three different road roughness profiles in Table 4 are studied to test the proposed algorithm. The random profile is generated with a normal random signal with the root-mean-square (RMS=0.002). The relation between \({z_f(t)}\) and \({z_r(t)}\) is assumed to be \({z_r}(t) = {z_f}(t + T)\) where T represents the time needed by the vehicle to pass the distance (\(a+b\)) in Fig. 1. In all the cases, we take zero initial conditions i.e. \({\mathbf{u}}(0) = {\left\{ {\begin{array}{*{20}{c}} x&\theta&{{y_f}}&{{y_r}} \end{array}} \right\} ^\top } = {\mathbf{0}}\).

Fig. 2
figure 2

Case 1: acceleration response of the vehicle under a sinusoidal road profile

Fig. 3
figure 3

Case 1: identified profiles plotted against the actual road profile at the top row. The error representing the difference between the identified and the actual profile is plotted below each graph

For simplicity, we assume that the velocity does not change within the distance where we aim to identify the roughness. This assumption results in the roughness being only a function of time. Thus, in all the cases considered here we are looking to identify the time-dependent road roughness for the considered vehicle model.

4.2.1 Case 1: sinusoidal

First, we assume a sinusoidal road roughness as defined in Table 4. The acceleration response of all four degrees of freedom in the vehicle model is plotted in Fig. 2. Using the proposed inverse algorithm, we then identify the road roughness over a two seconds time span. The road profile recovered numerically is then plotted against the actual road profile in Fig. 3a. The absolute difference between the actual and the identified road profiles is considered as the error and is plotted below the profile. The plot shows that the inverse algorithm recovers the road elevation with high accuracy where the difference is of the order \(10^{-10}\). However, the error plot shows that the difference grows with time. This is expected as the time integration scheme introduces temporal errors which accumulate in time.

Next, we add a Gaussian noise into the measured acceleration. The signal-to-noise ratio (SNR) is 20 dB. Fig. 3b displays the identified profile plotted against the actual profile. Again, the error is plotted below the road profile. The results show that the algorithm recovers the road profile with good accuracy but the error increase in time, becomes a lot more significant in this case. Adding the noise causes the identification error to become multiple times larger than the amplitude of the variation in the road elevation while without the noise the error was several orders of magnitude smaller than this amplitude. This shows the impact of the noise on the results. To improve the algorithm accuracy, we investigate filtering the inverse algorithm output. Using a regular filtering scheme may lead to a phase shift problem [48]. Therefore, we chose here to apply the bidirectional filtering method which does not suffer from the phase shift issue [49]. A preliminary study was performed in order to chose a suitable noise filter. For brevity purpose, we only show the results obtained with the fourth-order Butterworth filter which outperformed other filters.

Figure 3c shows the recovered road profile plotted against the actual one using the same polluted data as before (with \(\hbox {SNR}=20\,\hbox {dB}\)) but after applying the fourth-order Butterworth high-pass bidirectional filter where the considered cut-off frequency is 2 Hz [49]. Again, the error is plotted next to the road profile. The figure shows a significant improvement in the accuracy of the road profile and that the error increase is again stable.

The results in this case confirm that the proposed inverse algorithm can recover a sinusoidal road profile with good accuracy unless the collected data include noise. In such situation, it is necessary to apply a noise filter which seems to efficiently limit the effect of noise.

4.2.2 Case 2: random

A random profile as in Table 4 is considered next. The acceleration responses of the vehicle heave, pitch and hop of front and rear wheels are plotted in Fig. 4. In order to test the algorithm with a reduced system in this case, we do not take all the available accelerations. Only the accelerations of the heave and the wheels namely \({y_f}\) and \({y_r}\) are taken as the input for the inverse solution.

Again in Fig. 5, we plot the identified road profile for clean acceleration data (a), data polluted with noise (b) and polluted data with filtering (c). The identified road profiles are plotted against the actual road profile. The difference between the actual and the identified profiles is also included below each plot. For the polluted data Gaussian noise is added with the SNR = 20 dB. The same filter as bfore is again considered i.e. the fourth-order Butterworth high-pass bidirectional filter with the cut-off frequency being 0.5 Hz. The results are consistent with the previous case where the clean data can be used to achieve high accuracy road roughness identification. The noisy data leads to a significant deviation in time between the identified and the actual profiles. However, applying the filter significantly reduces the impact of the noise and again the identified profile matches the actual one with good accuracy.

Fig. 4
figure 4

Case 2: acceleration response of the vehicle under a random road profile

Fig. 5
figure 5

Case 2: identified profiles plotted against the actual road profile at the top row. The error representing the difference between the identified and the actual profile is plotted below each graph

Although the accelerations of only three degrees of freedom are considered in this case, the proposed algorithm has successfully recovered the road profile as it did in the first test case where all degrees of freedom were utilised. The results also shows that the algorithm can successfully identify random road profiles.

4.2.3 Case 3: sinusoidal plus random

Finally, a summation of sinusoidal and random profiles are studied where the cases 1 and 2 are added together. The acceleration responses for the four degrees of freedom are plotted in Fig. 6. Again, only the three degrees of freedom considered in Case 2 are taken as an input for the inverse algorithm here.

Similar to before, we start by evaluating the algorithm performance with the actual accelerations then with the accelerations polluted with a Gaussian noise (SNR = 20 dB) and finally with the noisy data but after filtering. We use the same filter considered in the previous cases. In Fig. 7, we show the recovered road profiles with the three data sets plotted against the actual profile as well as the differences between the actual and identified. The algorithm performance is consistent with the previous two cases. It can recover the road profile with high accuracy for the set with the clean data and show sensitivity to the noisy data. Again applying the Butterworth filter with the cut-off frequency being 0.5 Hz eliminates the sensitivity to noisy data.

The maximum absolute errors of the cases 1,2 and 3 are summarised in Table 5. When clean data are used the maximum absolute error in all cases is 4.8173E−10. Using noisy data causes a significant increase in the accumulation of error over time. Hence, the maximum error in any case increases to 0.0585, which is many orders of magnitude larger than the clean case. This can be controlled by applying a noise filter as can be seen in the table where the maximum error reduces to 0.0019.

Fig. 6
figure 6

Case 3: acceleration response of the vehicle under a sinusoidal plus a random road profile

Fig. 7
figure 7

Case 3: identified profiles plotted against the actual road profile at the top row. The error representing the difference between the identified and the actual profile is plotted below each graph

The considered road profiles, especially, cases 2 and 3 are relatively complicated and difficult to recover. However, the proposed algorithm shows high accuracy and efficiency in dealing with such transient input. Therefore, we may conclude that the algorithm is expected to recover other road profiles with a similar accuracy and efficiency. It should also be noted that the three test cases were run on an Intel Core(TM) i7 Windows PC with 32 GB of RAM and 3.6 GHz CPU. As the consider model is relatively small evaluating each time step in the road profile was achieved on average in 0.004s after reading the acceleration input. This CPU time was achieved with the unoptimised prototype code used in this research. By optimising the code and the hardware, it will be possible to further speed the computations. Therefore, evaluating the road profile over short time spans can be achieved in real time and significantly faster than a human driver.

It is important to take into account sudden changes in the profile. Hence, it is possible to evaluate the roughness in snapshots over short time spans can be achieved in few tenths of a second which is well faster than average human drivers, which gives the autonomous vehicle driving system more time to react to any changes in the road roughness.

4.3 Uncertainty analysis

Our final aim is to evaluate the impact of uncertainty in the vehicle parameters on the performance of the proposed algorithm. To this end, we set all the parameters identified in Table 2 to have a deviation of 5% decrease from the real values. The effect of this deviation on the identification results is measured using the normalised mean square error (NMSE) given by

$$\begin{aligned} {\mathrm{NMSE}}={\sum \limits _{i=1}^{n}{{{\left[ X(i)-Y(i)\right] }^{2}}}}/{\sum \limits _{i=1}^{n}{X{{(i)}^{2}}}} \end{aligned}$$
(4.1)

where X(i) is the value obtained from the actual road profile, Y(i) the value obtained from the identified road profile while n is the total number of points considered on the road profile. Table 6 shows the NMSE comparison under the actual and the deviated parameters where the road input data is clean from noise. The table shows that the value of NMSE is very small without the deviation, while it is less than 0.35% with deviation. The results suggests that the proposed algorithm can be robust even when the vehicle model parameters deviate from the actual parameters.

5 Conclusions

In this paper, we present a novel inverse algorithm to evaluate road roughness in real time for autonomous vehicles. The proposed algorithm consists of two steps. Starting from vibration acceleration measurements at few degrees of freedom the first step is to identify the forces of the wheels using the inverse Newmark method. The second is to reconstruct the road roughness by solving a system of ordinary differential equations that links the forces and the displacements. The equations are solved using the composite Gaussian quadrature. The algorithm is coupled with a 4 \(^\circ \) of freedom half-vehicle model and can evaluate road roughness in real time. We also show it is easy to extend to any number of degrees of freedom even when the acceleration measurements are only available at some of these degrees of freedom.

We investigate the robustness and the stability of the proposed algorithm using three different road profiles, namely sinusoidal, random and sinusoidal plus random. With clean data, the algorithm can predict these road profiles with high accuracy. However, with noisy data, the accuracy deteriorates quickly in time. To overcome this, we propose using the fourth-order Butterworth high-pass bidirectional filter. We show a significant improvement in the error accumulation when the filter is applied. The presented results show that the algorithm can be highly accurate identifying random as well as deterministic road profiles. The robustness of the proposed method with respect to uncertainties in the vehicle parameters has also been assessed. The influence of the model parameters deviation by 5% from the actual values is measured using the normalised mean square error. The results show that the value of the error remains small even when using deviated parameters.

Table 5 Summary of the maximum identification errors found in all considered cases
Table 6 Comparison of NMSE values for deviated and actual vehicle parameters

The work presents a first attempt to utilise an inverse method for real-time road roughness estimation. In the future, we want to test higher-order time integration schemes to increase stability of the algorithm even with polluted data . However, this may prove computationally demanding as it requires processing several time steps. Furthermore, we plan next to build a physical prototype of half-vehicle model and proceed to conduct experimental validation on standard vehicles and then on autonomous vehicles. Finally, it should be noted that the proposed algorithm is limited in terms of application to nonlinear problems. Furthermore, the algorithm assumes that the vehicle parameters do not change in time. Hence, it may provide wrong information if the vehicle gets damaged in an accident for example. Therefore, for future work we plan to include nonlinearity and time-dependent properties. Obviously, extending the algorithm in these directions may significantly increase the required computational efforts and, hence, challenge the real-time aspect of this work.