# Recursive total least squares with improved parameter tracking: Application to model-based vehicle mass estimation

Hugo Koide, Jérémy Vayssettes, Guillaume Mercère

► To cite this version:

Hugo Koide, Jérémy Vayssettes, Guillaume Mercère. Recursive total least squares with improved parameter tracking: Application to model-based vehicle mass estimation. Control Engineering Practice, 2025, 164, pp.106429. 10.1016/j.conengprac.2025.106429. hal-05123922

HAL Id: hal-05123922

https://hal.science/hal-05123922v1

Submitted on 26 Jun 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Recursive total least squares with improved parameter tracking: Application to model-based vehicle mass estimation

Hugo Koide<sup>a,b</sup> <sup>●</sup>, Jérémy Vayssettes<sup>b</sup> <sup>●</sup>, Guillaume Mercère<sup>a</sup> <sup>●,*</sup>

## ARTICLE INFO

Keywords:

System identification

Errors-in-variables

Total least squares

Recursive identification

Vehicle mass estimation

## ABSTRACT

Vehicle mass plays an influential role in various dynamical systems for vehicle safety and control. In this work, a novel recursive total least squares (RTLS) solution is presented for the online estimation of gross vehicle mass. The proposed method requires access to engine torque, engine speed, wheel speed, and vehicle IMU acceleration measurements. Different algorithm configurations are considered for mass estimation of internal combustion engine and electric vehicles, with a focused application to passenger cars and light commercial vehicles. The baseline RTLS algorithm is improved by means of regularization, outlier attenuation, parameter projection, and enhanced tracking of jumping parameters, all of which play an important role in optimizing estimator performance for industrial applications. The proposed algorithm is then generalized to account for heterogeneous and heteroscedastic measurement noise with a recursive noise covariance estimation algorithm. The method is tested against two well-known benchmark algorithms from the mass estimation literature with experimental electric vehicle data, and solution sensitivity to model assumptions and model input parameters is discussed. The vehicle experiments show that the proposed method outperforms the benchmark methods in terms of accuracy and convergence characteristics.

## 1. Introduction

Online estimation of vehicle mass has been extensively studied in the vehicle parameter estimation literature, owing to its direct influence in various dynamical equations used for vehicle control. For example, accurate real-time knowledge of vehicle mass is necessary for many advanced driver assistance systems (ADAS) technologies (Kukkala, Tunnell, Pasricha, & Bradley, 2018), which aim to simultaneously improve driver safety and vehicle autonomy. Vehicle mass also plays an important role in regenerative braking control (Zhou, Walker, & Zhang, 2020) and range prediction for electric vehicles (EVs), which can improve optimal route determination strategies for last-mile delivery purposes (Sarker, Shen, & Stankovic, 2018) and reduce driver range anxiety (Pevec et al., 2019; Rauh, Franke, & Krems, 2015). It is also an essential parameter when seeking to estimate vehicle states such as tire vertical forces or tire grip potential to name just a few (Isermann, 2022).

The prevailing obstacle in the automotive industry in determining the vehicle mass (amongst other important hidden parameters), is that it cannot be measured directly without significant costs. Limited by large-scale production costs and access to state-of-the-art transducers,

vehicle manufacturers are restricted in the amount of on-board sensors readily available on passenger cars and connected through the vehicle Control Area Network bus (CAN-bus). Industrials are therefore pushed to implement virtual sensors, which aim at tackling the sensor fusion problem (Yeong, Velasco-Hernandez, Barry, & Walsh, 2021). Hidden vehicle parameters are estimated in real time by exploiting the relationship between the available signals and the vehicle system dynamics (Doumiati, Victorino, Charara, & Lechner, 2009; Stephan, Charara, & Meizel, 2004). These virtual sensors, which rely on recursive state and parameter estimation theory, should be robust to real-world perturbations and provide some form of uncertainty certificate if they are to be embedded in the vehicle's network of data.

Existing solutions in literature for online vehicle mass estimation can vary fundamentally in their core methodologies, and will naturally depend on the target application. The literature can be divided into two classes of methods: model-based estimation and data-driven estimation, both deserving of attention in light of the desired application.

Data-driven estimation methods attempt to learn the system dynamics purely from data, generally in a supervised learning context, where an artificial neural network (ANN) is tuned to produce a nonlinear

<footnote><sup>a</sup> Université de Poitiers, ISAE-ENSMA Poitiers, LIAS, Poitiers, France</footnote>

<footnote><sup>b</sup> Michelin Centre de Recherche de Ladoux, Rue Bleue, Cébazat, 63118, France</footnote>

<footnote>* Corresponding author.
E-mail address: guillaume.mercere@univ-poitiers.fr (G. Mercère).</footnote>
map of the hidden variable from accessible vehicle data. Such methods find merit in their prediction accuracy and their ability to capture unknown nonlinear behaviors within the concerned dynamical system. Examples include NN-based estimators in Korayem, Khajepour, and Fidan (2020) and Torabi, Wahde, and Hartono (2019), a recurrent NN approach in İşbitirici, Giarré, Xu, and Falcone (2023), and attempts to combine machine learning with classical estimation methods in Yu, Hou, Leng, and Huang (2022) and Zhang et al. (2023). Although data-driven methods have their appeal, they face many practical difficulties for industrial implementation. Such methods are often non-scalable (without some form of adaptive learning), and NNs will be overfitted to the specific vehicles used during training. Furthermore, supervised learning solutions require large amounts of labeled experimental training data, which is often inaccessible to the everyday practitioner due to cost and practical constraints. These are some of the reasons that point practitioners to a more physics-based approach, which is the predominant approach found in the literature.

Model-based estimation methods exploit the known physical relations between the hidden variables and the accessible vehicle data in a recursive estimation framework. Classical recursive estimators such as the Kalman filter (KF) or recursive least squares (RLS) filter (Ljung, 1999) have seen widespread implementation in the online mass estimation literature. Such methods find merit in their simplicity, their smaller financial and computational cost, their robust properties against noise-ridden data, their ability to quantify estimation uncertainty, and their vehicle-agnostic implementation (scalability). A crucial first step for model-based approaches lies in the choice of vehicle dynamical model to implement. Methods based on vehicle lateral and suspension dynamics such as in Boada, Boada, and Zhang (2019), De Bruyne, Van der Auweraer, Diglio, and Anthonis (2011), Huh et al. (2007), Minh and Jung (2022), Spaeth et al. (2019), Wang et al. (2020) and Wielitzka, Dagen, and Ortmaier (2015) are more direct in their approaches, but often rely on ad-hoc instrumentation such as suspension deflection sensors and piezoresistive pressure sensors, or sensitive client information such as GPS data. The cost of implementation of such methods therefore weakens their claim as candidate methods for widespread vehicle integration. Methods based on vehicle longitudinal dynamics, however, benefit from their simplicity and minimal sensor requirements, which is reflected in the multiple works in literature that make use of longitudinal models. A non-exhaustive list of solutions includes: Vahidi, Stefanopoulou, and Peng who use an RLS method with multiple forgetting factors to simultaneously estimate mass and road grade in Vahidi, Stefanopoulou, and Peng (2005); Fathy, Kang, and Stein adopt an interesting approach to filter out low frequency dynamics in Fathy, Kang, and Stein (2008), which was later implemented in the works (Chu, Cao, Li, Luo, & Li, 2013; Ghosh, Foulard, & Fietzek, 2017); robust and windup-stable KF solutions presented in Altmannshofer and Endisch (2016) and Rhode, Hong, Hedrick, and Gauterin (2016); methods making use of model disturbance rejection (Han, Kim, Jo, & Huh, 2009; Jensen, Santos, Clemmensen, Theodorsen, & Corstens, 2022a; Oei & Sawodny, 2022); and methods that decouple mass and road grade estimation in Feng, Guodong, Ren, Shen, and Wang (2022), Kim, Shin, Yoo, and Huh (2017), Li, Zhang, Du, and Li (2016), Sun, Li, Yan, Yang, and Tang (2015), Wragge-Morley, Herrmann, Barber, and Burgess (2015) and Zhang, Xu, Li, and Ouyang (2013).

Although the literature covering model-based techniques is rich, solutions commonly fail to address the following points (i) a more comprehensive treatment of the sensor noise corrupting the system input and output measurements (ii) a regularization of the ill-conditioned vehicle data which does not suffer from the classical bias-variance trade-off and (iii) an estimator capable of tracking the piecewise-constant behavior of vehicle mass, which can transition sharply due to passenger onboarding or in delivery use cases.

In this work, which aims at addressing these missing criteria, an industry-tailored adaptation of the recursive total least squares (RTLS)

<figure><img src="image_2.png" /><figcaption>Fig. 1. Vehicle longitudinal dynamics free-body diagram.</figcaption></figure>

filter from Koide, Vayssettes, and Mercère (2024) is derived and combined with an ad-hoc solution for enhanced parameter tracking in the context of online vehicle mass estimation. The proposed solution contains the following contributions:

(i) Development of a total least squares (rather than the common least squares) estimation framework, which is crucial to remove estimation bias from classical least squares solutions when measurement noise is present in both input and output variables of a linear regression model.

(ii) Application-specific improvements of the RTLS solution from Koide et al. (2024) including a covariance matrix factorization-based regularization scheme and an outlier weighting function. These adaptations attenuate the effects of ill-conditioned and outlier-contaminated vehicle data.

(iii) Adaptive tracking of jumping parameters based on selective estimator covariance matrix relaxation, which allows the estimator to accurately track sudden variations in the vehicle mass.

The resulting estimator architecture is then validated using a database of experimental data from a two-wheel drive electric passenger vehicle, and its performance is compared to two well-known benchmark algorithms from the vehicle mass estimation literature.

The remainder of this work is structured as follows: Section 2 derives the reduced vehicle longitudinal dynamics model, including a discussion of the model assumptions and limitations; Section 3 then presents some preliminary recursive parameter estimation theory alongside some benchmark algorithms for online vehicle mass estimation; Section 4 presents the RTLS algorithm with enhanced parameter tracking; Section 5 details the online noise covariance estimation algorithm; Section 6 contains tests using experimental vehicle data for the case of a static and time-varying vehicle mass, as well as an empirical sensitivity analysis on the algorithm input parameters; and Section 7 concludes this work.

## 2. Problem formulation

The strategy of interest identified in Section 1 makes use of a vehicle longitudinal dynamics model due to its simplicity and minimal sensor requirements. The gross vehicle mass can be isolated as a key unknown parameter in this model, and thus estimated with an appropriate recursive identification algorithm. Importantly, this work aims at developing a solution that relies exclusively on on-board sensors which are readily available in production grade passenger vehicles.

### 2.1. Vehicle longitudinal dynamics model

The vehicle longitudinal dynamics equation can be derived by applying a force balance on a vehicle in longitudinal motion shown in Fig. 1, which results in (Isermann, 2022, p. 129)

$$ (m_v(t) + m_{pt}(t))a_x(t) = F_{X,T}(t) - \sum F_{X,\text{res}}(t), \quad (1) $$

where $a_x$ is the vehicle longitudinal acceleration, $m_v$ is the vehicle mass which may vary suddenly due to passenger onboarding or loading
<table><caption>**Table 1**
Summary of modeling assumptions.</caption><thead><tr><th>Assumption</th><th>Description with justification</th><th>Validity</th></tr></thead><tbody><tr><td>(1) m<sub>pt</sub>(t) &lt;&lt; m<sub>v</sub>(t)</td><td>Effective powertrain masses are assumed negligible with respect to the gross vehicle mass. Estimating m<sub>pt</sub>(t) requires vehicle-specific knowledge of various powertrain components.</td><td>For passenger vehicles and light commercial vehicles, the number of powertrain components is limited.</td></tr><tr><td>(2) v<sub>wind</sub>(t) &lt;&lt; v<sub>x</sub>(t)</td><td>Wind velocity is assumed negligible with respect to vehicle velocity. Estimating v<sub>wind</sub>(t) without dedicated sensors is nontrivial.</td><td>Low wind and high vehicle velocity driving conditions are favorable.</td></tr><tr><td>(3) r<sub>dyn</sub>(t) ≈ K<sub>w</sub>r<sub>nom</sub></td><td>The tire dynamic rolling radius is approximated as a constant factor of the geometric tire radius, neglecting the effects of the operating conditions on the tire dynamics. Estimating r<sub>dyn</sub>(t) without dedicated sensors is nontrivial.</td><td>The parameter K<sub>w</sub> should be tuned based on tire usage conditions according to its theoretical range (Isermann, 2022; Jazar, 2008).</td></tr><tr><td>(4) v<sub>x</sub>(t) ≈ ω<sub>x</sub>(t)r<sub>dyn</sub>(t)</td><td>Vehicle longitudinal velocity is calculated directly from wheel speed measurements and the approximated rolling radius, which is generally accurate for low-slip conditions.</td><td>To avoid excessive wheel slip (i) wheel speeds from the non-driven axle can be considered for 2WD vehicles (ii) high acceleration and braking phases can be neglected during estimation.</td></tr><tr><td>(5) α<sub>IMU</sub>(t) ≈ α(t)</td><td>The IMU pitch angle is assumed equal to the road pitch angle, assuming correct IMU alignment and negligible effects of vehicle pitch during mild vehicle accelerations.</td><td>To avoid excessive pitching of the vehicle sprung mass, high acceleration and braking phases can be neglected during estimation.</td></tr></tbody></table>

scenarios, and $m_{pt}$ comprises the rotational and reciprocating masses in a hypothetically stiff powertrain and is described by (Isermann, 2022)

$$m_{pt}(t) = \frac{J_{tot}}{r_{dyn}^2(t)}, \qquad (2)$$

where $J_{tot}$ represents the mass moment of inertia of the powertrain components, and $r_{dyn}$ is the wheel dynamic rolling radius. The tractive force $F_{X,T}$ is given by

$$F_{X,T}(t) = \gamma M_{eng}(t) \quad \text{with} \quad \gamma = \frac{i_{tot}\eta_{tot}}{r_{dyn}(t)}, \qquad (3)$$

where $i_{tot}$ is the combined reduction ratio for the transmission and differential, $\eta_{tot}$ is the combined drivetrain efficiency, and $M_{eng}$ is the engine torque. The sum of the resistive forces $F_{X,\text{res}}$ acting on the vehicle body can further be broken down by

$$\sum F_{X,\text{res}}(t) = F_{X,R}(t) + F_{X,A}(t) + F_{X,C}(t), \qquad (4)$$

where $F_{X,R}$, $F_{X,A}$, and $F_{X,C}$ correspond to the rolling resistance, aerodynamic resistance, and climbing resistance forces respectively. These forces are in turn characterized by (Isermann, 2022)

$$F_{X,R}(t) = m_v(t)g(c_{r0} + c_{r1}v_x(t) + c_{r4}v_x(t)^4), \qquad (5)$$

$$F_{X,A}(t) = \frac{1}{2}\rho_{\text{air}}A_f c_d(v_x(t) - v_{\text{wind}}(t))^2, \qquad (6)$$

$$F_{X,C}(t) = m_v(t)g \sin(\alpha(t)), \qquad (7)$$

where $g$ is the gravitational constant, $c_{r0}$, $c_{r1}$, and $c_{r4}$ are rolling resistance coefficients, $c_d$ is the drag coefficient, $\alpha$ is the road grade, $\rho_{\text{air}}$ is the ambient air density, $A_f$ is the frontal vehicle surface area, and $v_x$ and $v_{wind}$ are the longitudinal vehicle and wind velocities, respectively. Let us note at this stage that the rolling resistance force can also take the form $F_{X,\text{res}} = m_v(t)g c_v \cos(\alpha(t))$, which is a commonly seen case in the mass estimation literature. The alternative choice of a polynomial representation of the rolling resistance force (see Isermann (2022, p. 270)) is preferred since (i) the model now relies on more accessible velocity measurements rather than road grade measurements and (ii) additional signal excitation from $v_x(t)$ and $v_x(t)^4$ terms improves the overall conditioning of the estimation problem (see Section 4). The full longitudinal model is then formed by combining (1)–(7) such that

$$\gamma M_{\text{eng}}(t) = (m_v(t) + \frac{J_{\text{tot}}}{l_{\text{dyn}}^2(t)})a_x(t) + m_v(t)g \sin(\alpha(t)) \\ + m_v(t)g(c_{r0} + c_{r1}v_x(t) + c_{r4}v_x(t)^4) \\ + \frac{1}{2}\rho_{\text{air}}A_f c_d(v_x(t) - v_{\text{wind}}(t))^2. \qquad (8)$$

## 2.2. Model assumptions

Aside from sensor quality and the computational framework used for implementation, the choice of dynamic model will have a key influence on estimator performance. Observability and model parsimony are then important factors in developing a generalizable approach for vehicle mass estimation from accessible on-board sensors. Although the full longitudinal model in (8) provides an accurate representation of the system dynamics, it is difficult to implement in practice. For example, constraints such as the random nature of wind velocity, and the often restricted access to sensitive GPS data make it difficult to measure or estimate data for $v_{wind}$ and $\alpha$ in real time. Justified modeling assumptions then become crucial in reducing the complexity of (8) while minimizing the effects of bias from any resulting model-plant mismatch. A summary of the model assumptions is detailed in Table 1. Note that the assumptions from Table 1 are standard in the vehicle mass estimation literature (Altmannshofer & Endisch, 2016; Fathy et al., 2008; Rhode et al., 2016), allowing for sufficient estimation accuracy while retaining enough model parsimony for practical implementation.

Starting with assumptions (1) and (2) from Table 1, let us assume a negligible impact of the rotational powertrain mass and the wind velocity with respect to the global vehicle mass and the longitudinal vehicle velocity, respectively, such that $m_{pt} \ll m_v$ and $v_{wind} \ll v_x$. Assumption (3) then considers an approximation of the dynamic tire rolling radius with

$$r_{\text{dyn}}(t) \approx K_{w}r_{\text{nom}}, \qquad (9)$$

where $K_w$ is a user-defined parameter in the range $0.96 \le K_w \le 0.98$ (Isermann, 2022; Jazar, 2008). This assumption neglects the dynamic effects of various operating conditions on the tire, but it alleviates any need for estimating the quantity $r_{dyn}(t)$ online. This is a nontrivial estimation problem which may otherwise require the use of dedicated sensors. In Section 6, this assumption is shown to have negligible effects on estimation accuracy with the correct tuning of $K_w$.

Using assumption (3), the longitudinal vehicle velocity can then be obtained directly from wheel speed measurements

$$v_x(t) \approx \omega_x(t) K_w r_{\text{nom}}, \qquad (10)$$

which is assumption (4). This assumption is only valid for zero-slip operating conditions, and estimation should therefore be restricted to the following vehicle dependent conditions:

(i) For internal combustion engine vehicles, only mild accelerations should be considered, and braking phases should be neglected altogether.

(ii) For electric vehicles, only mild accelerations should be considered. If negative engine torque signals are available (regenerative braking), then mild braking phases can also be considered.
(iii) For two-wheel drive vehicles, wheel speeds from the non-driven axel (free-rolling) can be considered.

The final assumption (5) then considers the contamination of the inertial measurement unit (IMU) data with gravity. Let us consider the IMU acceleration during longitudinal driving conditions

$$a_{x,IMU}(t) = a_{x}(t) + g \sin(\alpha_{IMU}(t)), \quad (11)$$

where $a_{x,IMU}(t)$ is the longitudinal IMU acceleration and $\alpha_{IMU}(t)$ is the IMU pitch angle. It is clear from (11) that, for an incline road, the longitudinal vehicle acceleration measurement now contains a projection of the gravitational acceleration term. The IMU pitch angle will necessarily be comprised of the following contributions (Jensen et al., 2022a)

$$\alpha_{IMU}(t) = \alpha(t) + \alpha_{0,\text{mount}} + \alpha_{0,\text{pitch}} + \alpha_{\text{pitch}}(t), \quad (12)$$

where $\alpha_{0,\text{mount}}$ is the IMU mounting pitch orientation w.r.t. vehicle pitch, $\alpha_{0,\text{pitch}}$ is the stationary vehicle pitch angle due to stationary suspension loading, and $\alpha_{\text{pitch}}(t)$ is the dynamic vehicle pitch angle due to acceleration and braking. Let us then assume a correct alignment of the IMU in the vehicle reference frame such that $\alpha_{0,\text{mount}} = 0$, and a negligible effect of $\alpha_{0,\text{pitch}}$ (which will depend on vehicle load distribution and specific suspension parameters). Then, by restricting the domain of application to consider only mild acceleration (and braking for EVs if the correct signals are available) phases, let us assume a negligible impact of the dynamic vehicle pitch $\alpha_{\text{pitch}}(t)$. This leads to assumption (5)

$$\alpha_{\text{IMU}}(t) \approx \alpha(t), \quad (13)$$

which is an important assumption since the reduced model

$$\gamma M_{\text{eng}}(t) \approx m_v(t)a_x(t) + m_v(t)g \sin(\alpha(t)) \\ + m_v(t)g(c_{r0} + c_{r1}v_x(t) + c_{r4}v_x(t)^4) \\ + c_{\text{aero}}v_x(t)^2, \quad (14)$$

can be then further simplified by combining (11) and (13) such that

$$\gamma M_{\text{eng}}(t) \approx m_v(t)a_{x,\text{IMU}}(t) \\ + m_v(t)g(c_{r0} + c_{r1}v_x(t) + c_{r4}v_x(t)^4) \\ + c_{\text{aero}}v_x(t)^2, \quad (15)$$

where the lumped aerodynamic coefficient is defined by $c_{\text{aero}} := \frac{1}{2}\rho_{\text{air}}A_f c_d$. Notice that the reduced model (15) now exclusively relies on engine torque, IMU acceleration, and wheel speed measurements. A discussion on the validity of the aforementioned assumptions is shown in Table 1, and a more detailed discussion regarding estimator implementation considering valid operating conditions is developed in Section 6. Additionally, a review of the vehicle parameter and sensor requirements is detailed in Table 2. Note that the gear reduction ratio $i_{\text{tot}}$ can be directly obtained as a ratio of engine speed to wheel speed signals (Isermann, 2022), which is general to both internal combustion and electric vehicles.

The data collected with the reduced model (15) can now be structured as a multiple-input-single-output (MISO) linear regression model

$$y \approx Ax, \quad (16)$$

where $y \in \mathbb{R}^{n_y \times 1}$ and $A \in \mathbb{R}^{n_y \times n_x}$ contain the output and input measurements respectively retrieved from the vehicle CAN-bus, and where $x \in \mathbb{R}^{n_x \times 1}$ is the vector of unknown vehicle parameters that need to be estimated. From (15), it follows that the row-wise elements of (16) are

$$y_k = \gamma M_{\text{eng},k}, \\ 
\mathbf{a}_k = \begin{bmatrix} a_{x,\text{IMU},k} & g & g v_{x,k} & g v_{x,k}^4 & v_{x,k}^2 \end{bmatrix}, \quad (17) \\ 
\mathbf{x}_k = \begin{bmatrix} m_{v,k} & m_{v,k} c_{r0} & m_{v,k} c_{r1} & m_{v,k} c_{r4} & c_{\text{aero}} \end{bmatrix}^\top,$$

where the time index (t) has been replaced by a recursion index $k = 1, 2, ..., n_y$ to denote the row-wise discretization of the linear regression model (16). Online identification of the vehicle mass can then be obtained by implementing a recursive parameter estimator to solve for $x_k$.

<table><caption>**Table 2**
Vehicle parameter and sensor requirements.</caption><thead><tr><th colspan="3">Sensor requirements</th></tr><tr><th>Measurement</th><th>Provenance</th><th>Unit</th></tr></thead><tbody><tr><td>a<sub>x,IMU</sub>(t)</td><td>Inertial measurement unit</td><td>m/s<sup>2</sup></td></tr><tr><td>M<sub>eng</sub>(t)</td><td>Rotary torque sensor</td><td>N m</td></tr><tr><td>ω<sub>x</sub>(t)</td><td>Wheel speed sensor</td><td>rad/s</td></tr><tr><td>ω<sub>e</sub>(t)</td><td>Engine speed sensor</td><td>rad/s</td></tr></tbody><thead><tr><th colspan="3">Parameter requirements</th></tr><tr><th>Parameter</th><th>Provenance</th><th>Unit</th></tr></thead><tbody><tr><td>K<sub>w</sub></td><td>0.96 ≤ K<sub>w</sub> ≤ 0.98 (Isermann, 2022; Jazar, 2008)</td><td>-</td></tr><tr><td>i<sub>tot</sub></td><td>Obtained (i) from the vehicle specification for electric vehicles or (ii) estimated with the ratio ω<sub>e</sub>(t)/ω<sub>w</sub>(t) (Isermann, 2022)</td><td>-</td></tr><tr><td>η<sub>tot</sub></td><td>0.97 ≤ η<sub>tot</sub> ≤ 0.99 (Isermann, 2022)</td><td>-</td></tr></tbody></table>

### 3. Benchmark recursive parameter estimators

In order to recursively estimate the parameters of the linear regression model in (16), the correct modeling of the system's noise characteristics is crucial, and will serve to remove a potential source of bias during the estimation process.

One way to account for the inconsistencies in (16) is to consider an output error (OE) model

$$y - e_y = Ax \quad \text{with} \quad y = \bar{y} + e_y, \quad (18)$$

where $\bar{y} \in \mathbb{R}^{n_y \times 1}$ is the true output and $e_y \in \mathbb{R}^{n_y \times 1}$ represents the errors in the measured output. The OE model is commonly used in literature, since it is the basis model for the well-known Kalman and RLS filters. Some examples of RLS and KF-based solutions for online vehicle mass estimation include the works (Fathy et al., 2008; Feng, Xiong, Yu, & Qu, 2014; Ghosh et al., 2017; Kim et al., 2017; Oei & Sawodny, 2022; Sun et al., 2015; Vahidi et al., 2005). The RLS filter, which is a special case of the KF tailored to parameter estimation (Ljung & Soderstrom, 1983), is shown in Algorithm 1, where the index $k$ denotes recursion, and where $\mathbf{P}$ and $\lambda$ are the estimator covariance matrix and forgetting factor, respectively. The RLS filter will serve as the first benchmark algorithm for the experiments in Section 6.

The OE model, however, only takes into account the presence of noise in the measured output variable, and is known to produce biased estimations for systems containing both erroneous inputs and outputs (Markovsky & Van Huffel, 2007). By examining the inputs $\mathbf{a}$ and outputs $\mathbf{y}$ from (17), it is clear that both contain CAN-bus measurements, and hence some amount of noise.

In order to produce unbiased parameter estimates, the system in (17) can be more intuitively represented using an errors-in-variables (EIV) model

$$y - e_y = (\mathbf{A} - E_A)\mathbf{x} \quad \text{with} \quad y = \bar{y} + e_y, \\ 
\mathbf{A} = \bar{\mathbf{A}} + E_A, \quad (19)$$

where $\bar{\mathbf{A}} \in \mathbb{R}^{n_y \times n_x}$ is the true input and $E_A \in \mathbb{R}^{n_y \times n_x}$ is now introduced to represent the errors in the measured input. The total least squares

**Algorithm 1: RLS**

1. **Function RLS**($\hat{\mathbf{x}}_k$, $\hat{\mathbf{P}}_k$, $y_{k+1}$, $\mathbf{a}_{k+1}$, $\lambda$):

2. $l_{k+1} = \hat{\mathbf{P}}_k \mathbf{a}_{k+1}^\top (\lambda + \mathbf{a}_{k+1} \hat{\mathbf{P}}_k \mathbf{a}_{k+1}^\top)^{-1}$

3. $\hat{\mathbf{P}}_{k+1} = \frac{1}{\lambda} (I_{n_x} - l_{k+1} \mathbf{a}_{k+1}) \hat{\mathbf{P}}_k$

4. $\hat{\mathbf{x}}_{k+1} = \hat{\mathbf{x}}_k + l_{k+1} (y_{k+1} - \mathbf{a}_{k+1} \hat{\mathbf{x}}_k)$

5. **return** $\hat{\mathbf{x}}_{k+1}$, $\hat{\mathbf{P}}_{k+1}$
<caption>**Algorithm 2: RTLS<sub>SVD</sub>**</caption>

1 **Function** RTLS<sub>SVD</sub> (hat_x, P̂_k, y<sub>k+1</sub>, a<sub>k+1</sub>, ȇ<sub>a,k+1</sub>, ȇ<sub>y,k+1</sub>, λ):
2 &nbsp;&nbsp;&nbsp;&nbsp;**s**<sub>k+1</sub> = [a<sub>k+1</sub> &nbsp;&nbsp;&nbsp;&nbsp; y<sub>k+1</sub>]
3 &nbsp;&nbsp;&nbsp;&nbsp;ȇ<sub>k+1</sub> = diag [ȇ<sub>a,k+1</sub> &nbsp;&nbsp;&nbsp;&nbsp; ȇ<sub>y,k+1</sub>]
4 &nbsp;&nbsp;&nbsp;&nbsp;I<sub>k+1</sub> = P̂_k s<sup>T</sup><sub>k+1</sub> (λ + s<sub>k+1</sub> P̂_k s<sup>T</sup><sub>k+1</sub>)<sup>-1</sup>
5 &nbsp;&nbsp;&nbsp;&nbsp;P̂<sub>k+1</sub> = 1/λ (I<sub>n<sub>x</sub></sub> - I<sub>k+1</sub> s<sub>k+1</sub>) P̂_k
6 &nbsp;&nbsp;&nbsp;&nbsp;v<sub>.,q;k</sub> = [x<sup>T</sup><sub>k+1</sub> &nbsp;&nbsp;&nbsp;&nbsp; -1]<sup>T</sup>
7 &nbsp;&nbsp;&nbsp;&nbsp;v<sub>.,q;k+1</sub> = P̂<sub>k+1</sub> (ȇ<sub>k+1</sub> v<sub>.,q;k</sub>)
8 &nbsp;&nbsp;&nbsp;&nbsp;hat_x<sub>k+1</sub> = -v<sub>1:n,q;k+1</sub>/v<sub>q,q;k+1</sub>
9 **return** hat_x<sub>k+1</sub>, P̂<sub>k+1</sub>

(TLS) problem (Markovsky & Van Huffel, 2007) aims at finding a unique solution for the parameters in (19) by minimizing the input and output biases ΔA ∈ ℝ<sup>n<sub>y</sub>×n<sub>x</sub></sup> and Δy ∈ ℝ<sup>n<sub>y</sub>×1</sup> which serve to compensate for the measured errors, where

$$ \{\Delta \hat{\mathbf{A}}, \Delta \hat{\mathbf{y}}, \hat{\mathbf{x}}\}_{\text{TLS}} := \arg \min_{\Delta \mathbf{A}, \Delta \mathbf{y}, \mathbf{x}} \left\| \Delta \mathbf{A} \quad \Delta \mathbf{y} \right\|_F^2 \quad (20) $$

subject to $y - \Delta y = (\mathbf{A} - \Delta \mathbf{A})x$,

and where recursive solutions to (20) are known as recursive total least squares (RTLS) methods.

Rhode, Bleimund, and Gauterin appropriately identified the need for a TLS-based approach for the vehicle mass estimation problem, with a batch TLS solution proposed in Rhode and Gauterin (2013), and RTLS solutions proposed in Rhode and Gauterin (2012) and Rhode, Bleimund, and Gauterin (2014), which are based on the classical singular value decomposition (SVD) TLS solution (Golub & Van Loan, 1980). The complete RTLS<sub>SVD</sub> method from Rhode et al. (2014), which will serve as a second benchmark algorithm, is shown in Algorithm 2, and requires knowledge of the recursive measurement noise covariance matrices ȇ<sub>a,k+1</sub> and ȇ<sub>y,k+1</sub> (see Section 5 for details on noise covariance estimation). To the best of the authors' knowledge, there have been no further solutions making use of an RTLS method for online vehicle mass estimation.

In this work, a more recent RTLS method proposed in Koide et al. (2024) will serve as the candidate algorithm, and will be adapted in Section 4 to give more robust estimations with enhanced parameter tracking. The RTLS<sub>LAG</sub> solution from Koide et al. (2024) is grounded in a constrained Lagrange optimization of the EIV model, and its recursive solution grants access to estimations of the estimator covariance as well as the input and output biases. The RTLS<sub>LAG</sub> method, which also requires knowledge of the recursive measurement noise covariance matrices, is shown in Algorithm 3, and was shown in Koide et al. (2024) to have improved convergence properties over SVD-based methods such as the Benchmark in Algorithm 2. This method is essentially a RLS filter (lines 6–8 in Algorithm 3) nested within an input bias adjustment process, which is powerful in the sense that classical modifications from the RLS literature are easily applied to the RTLS<sub>LAG</sub> method.

## 4. Improved recursive total least squares

The presented benchmark algorithms can produce accurate estimates when dealing with ideal data which conforms to their underlying assumptions. Industrial implementation of these recursive algorithms, however, requires a more robust solution, where convergence can still be achieved considering sub-optimal data, without compromising overall performance. This section will therefore contain the main practical estimator modifications, and the RTLS<sub>LAG</sub> method from Algorithm 3 will be enhanced with regularization, outlier attenuation, parameter projection, and parameter tracking capabilities.

<caption>**Algorithm 3: RTLS<sub>LAG</sub>**</caption>

1 **Function** RTLS<sub>LAG</sub> (hat_x, δhat_x, ȇ_x, P̂_k, y<sub>k+1</sub>, a<sub>k+1</sub>, ȇ<sub>a,k+1</sub>, ȇ<sub>y,k+1</sub>, λ):
2 &nbsp;&nbsp;&nbsp;&nbsp;hat_x<sub>k+1</sub> = ȇ<sub>y,k+1</sub> + ȇ<sub>k</sub><sup>T</sup> ȇ<sub>a,k+1</sub> ȇ<sub>x</sub>
3 &nbsp;&nbsp;&nbsp;&nbsp;Δa<sub>k+1</sub> = - ȇ<sub>a,k+1</sub> ȇ<sub>k</sub><sup>T</sup> ȇ<sub>a,k+1</sub> (y<sub>k+1</sub> - a<sub>k+1</sub> ȇ<sub>x</sub> - ȇ<sub>k</sub> δ ȇ<sub>x</sub>)
4 &nbsp;&nbsp;&nbsp;&nbsp;Δy<sub>k+1</sub> = ȇ<sub>y,k+1</sub> ȇ<sub>z,k+1</sub><sup>-1</sup> (y<sub>k+1</sub> - a<sub>k+1</sub> ȇ<sub>x</sub> - ȇ<sub>k</sub> δ ȇ<sub>x</sub>)
5 &nbsp;&nbsp;&nbsp;&nbsp;ȇ<sub>k+1</sub> = a<sub>k+1</sub> - Δa<sub>k+1</sub>
6 &nbsp;&nbsp;&nbsp;&nbsp;I<sub>k+1</sub> = P̂_k ȇ<sub>k+1</sub><sup>T</sup> (λ ȇ<sub>z,k+1</sub> + ȇ<sub>k+1</sub> P̂_k ȇ<sub>k+1</sub><sup>T</sup>)<sup>-1</sup>
7 &nbsp;&nbsp;&nbsp;&nbsp;P̂<sub>k+1</sub> = 1/λ (P̂_k - I<sub>k+1</sub> ȇ<sub>k+1</sub> P̂_k)
8 &nbsp;&nbsp;&nbsp;&nbsp;hat_x<sub>k+1</sub> = ȇ<sub>x</sub> + I<sub>k+1</sub> (y<sub>k+1</sub> - a<sub>k+1</sub> ȇ<sub>x</sub>)
9 &nbsp;&nbsp;&nbsp;&nbsp;δhat_x<sub>k+1</sub> = δ ȇ<sub>x</sub> + I<sub>k+1</sub> (y<sub>k+1</sub> - a<sub>k+1</sub> ȇ<sub>x</sub> - ȇ<sub>k+1</sub> δ ȇ<sub>x</sub>)
10 **return** hat_x<sub>k+1</sub>, δhat_x<sub>k+1</sub>, ȇ<sub>k+1</sub>, P̂<sub>k+1</sub>, Δa<sub>k+1</sub>, Δy<sub>k+1</sub>

<caption>**Algorithm 4: Bierman's U-D updating algorithm**</caption>

1 **Function** UpdateUD (U<sub>k</sub>, D<sub>k</sub>, ȇ<sub>k+1</sub>, λ):
2 &nbsp;&nbsp;&nbsp;&nbsp;f := U<sub>k</sub><sup>T</sup> ȇ<sub>k+1</sub><sup>T</sup>
3 &nbsp;&nbsp;&nbsp;&nbsp;g := D<sub>k</sub> f
4 &nbsp;&nbsp;&nbsp;&nbsp;β<sub>0</sub> := λ
5 &nbsp;&nbsp;&nbsp;&nbsp;**for** j in (1, ..., n<sub>x</sub>) **do**
6 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;β<sub>j</sub> = β<sub>j-1</sub> + f<sub>j</sub> g<sub>j</sub>
7 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;D<sub>jj:k+1</sub> = β<sub>j-1</sub> D<sub>jj:k</sub> / β<sub>j</sub> λ
8 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v<sub>j</sub> = g<sub>j</sub>
9 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;μ<sub>j</sub> = -f<sub>j</sub> / β<sub>j-1</sub>
10 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;**for** i in (1, ..., j-1) and j ≠ 1 **do**
11 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;U<sub>ij:k+1</sub> = U<sub>ij:k</sub> + v<sub>i</sub> μ<sub>j</sub>
12 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;v<sub>i</sub> = v<sub>i</sub> + U<sub>ij:k</sub> v<sub>j</sub>
13 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\_l<sub>k+1</sub> = [v<sub>1</sub>, v<sub>2</sub>, ..., v<sub>n<sub>x</sub></sub>]<sup>T</sup>
14 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l<sub>k+1</sub> = \_l<sub>k+1</sub> / β<sub>n<sub>x</sub></sub>
15 **return** x

### 4.1. Data conditioning

An appealing property of model-based estimators lies in their ability to track time-varying parameters. To achieve this, the estimator gain is prevented from tending to zero by implementing some form of exponential forgetting or covariance modification (Gunnarsson, 1996). In doing this, however, estimators become sensitive to poor system excitation, leading to numerical accuracy and stability problems, and eventually to estimator divergence (Bierman, 2006; O'Bannon & Bezan-son, 1991; Rao Sripada & Grant Fisher, 1987). By taking a look at the recursive input vector for the reduced longitudinal dynamics model from (17)

$$ a_k = [a_{IMU,k} \quad g \quad g v_{x,k} \quad g v_{x,k}^4 \quad v_{x,k}^2], \quad (21) $$

it is clear that during constant velocity (zero acceleration) conditions, complete lack of excitation arises between independent variables with $v_{x,k} = C$, and where the steady-state input vector becomes a vector of constants

$$ a_k = [0 \quad g \quad gC \quad gC^4 \quad C^2]. \quad (22) $$
<figure><img src="image_3.png" /><figcaption>Fig. 2. Analysis of experimental data where (a) compares measured outputs $y_{k+1}$ and predicted outputs $\hat{y}_{k+1} = a_{k+1}\hat{x}_k$ to show the presence of outliers and (b) examines the distribution of the residuals $\epsilon_{k+1}$ as a representation of the measurement noise characteristics.</figcaption></figure>

As a result, adaptive filters can experience the following degrading effects, which come as a result of near-singular inversions of the estimator information matrix, (these are generally referred to as “ill-posed” or “ill-conditioned” problems Ljung & Soderstrom, 1983):

(i) **Parameter drift** — during conditions where the covariance matrix $P$ becomes large and the regressors $a$ are dominated by random noise, the updated parameters $\hat{x}$ are unlikely to move in an optimal direction. This behavior is known as parameter drift, and if parameters wander into an unstable region, parameter estimates can experience large perturbations known as “bursting” (Rao Sripada & Grant Fisher, 1987).

(ii) **Covariance wind-up** — often appearing in tandem with parameter drift, covariance wind-up describes the effect of $P$ becoming increasingly large for $\lambda < 1$. Taking the plain example of steady-state operation, the updated covariance matrix is reduced to $\hat{P}_{k+1} = \hat{P}_k/\lambda$, which will naturally increase the magnitude of $P$. A large covariance matrix makes the estimator very sensitive to small perturbations in the regressors $a$, such that excessive wind-up tends to fuel effects such as parameter drift and bursting.

Many solutions exist in literature to cater to ill-conditioned problems. Examples include: addition of a small positive definite matrix to the information matrix to ensure invertibility in what is called Levenberg-Marquardt (LM) regularization (Gunnarsson, 1996; Ljung & Soderstrom, 1983); minimization of the covariance matrix condition number with a diagonal scaling matrix by solving a transformed set of linear equations (Rao Sripada & Grant Fisher, 1987); use of a control sequence to force the covariance matrix to converge towards a pre-specified convergence point (Stenlund & Gustafsson, 2002); and by using a regularized $U-D$ factorization of the covariance matrix to ensure $P$ remains bounded and positive definite (Bierman, 2006). The latter method is chosen for this study because (i) $U-D$ factorization of the covariance matrix enhances the numerical characteristics of the gain computation with little added complexity and (ii) the proposed $U-D$ regularization is able to detect poorly conditioned data and pause the estimation process only when necessary, unlike with classical LM regularization.

In Bierman's $U-D$ factorization algorithm (Bierman, 2006), the covariance matrix is factorized according to

$$P = UDU^T, \qquad (23)$$

where $U \in \mathbb{R}^{n_x \times n_x}$ is a unit upper-triangular matrix with $u_{ii} = 1, i = 1, 2, \dots, n_x$ and $u_{ij} = 0, \forall i > j$ and $D \in \mathbb{R}^{n_x \times n_x}$ is a diagonal matrix. Instead of directly updating $P$, Bierman suggests updating $U$ and $D$ recursively to compute the estimator gain according to Algorithm 4,

with a more detailed derivation shown in Appendix. The covariance matrix conditioning can easily be monitored through $D$ since

$$|P| = |D| = \prod_{j=1}^{n_x} d_j \quad \text{with } D = \text{diag}(d_1, d_2, \dots, d_{n_x}), \qquad (24)$$

where near-singularity of $P$ is detected when one or more of the elements $d_j$ approaches zero. As pointed out by Ljung and Söderström in Ljung and Soderstrom (1983), the $U-D$ algorithm can then naturally be regularized by keeping the elements of $D$ bounded, ensuring positive definiteness of the covariance matrix. Line 7 of Algorithm 4 can then be modified to

$$D_{jj;k+1} = \min \left( Z, \frac{\beta_{j-1}}{\beta_j \lambda} \right) D_{jj;k}, \qquad (25)$$

where $Z$ is typically chosen as unity such as in Chen and Norton (1987). Use of the regularized $U-D$ factorization scheme with the RTLS_LAG method can therefore robustify the estimator against covariance wind-up and parameter drifting and bursting during the low-excitation periods due to constant velocity driving.

## 4.2. Outlier treatment

As is often the case when working with vehicle data, the presence of outlier values is expected, and will have degrading effects on estimator performance. In Fig. 2 a toy estimation with the RTLS_LAG method using experimental data from Section 6 shows the presence of outlier values. Fig. 2a compares predicted and measured outputs using the model in (17), where values far from the fitted line indicate outliers with respect to the chosen model. Fig. 2b shows a probability density histogram for the predicted residuals $\epsilon_{k+1} = y_{k+1} - a_{k+1}\hat{x}_k$, acting to represent the measurement noise characteristics. Rather than the hypothesized Gaussian distribution, the residuals are shown to follow a heavy-tailed distribution, where the probability density of the residuals tends to zero less rapidly than with an exponential function (Bryson, 1974), further exemplifying the presence of outliers in the data. A similar conclusion is drawn in Altmannshofer and Endisch (2016) for the case of vehicle mass estimation using CAN-bus data. When dealing with outliers, the classical LS estimator is known to be non-robust, since the LS cost function penalizes outliers quadratically. Robust M-estimators were introduced by Huber in Huber (1992), and aim at obtaining robustness by replacing the sum of squares cost function with

$$V(\hat{x}) = \sum_{k=0}^{n_y} \rho(\epsilon_{k+1}) \quad \text{with} \quad \epsilon_{k+1} = y_{k+1} - a_{k+1}\hat{x}_k, \qquad (26)$$

where $\rho(\cdot)$ is a function that attenuates the influence of large residual values. Huber showed in Huber (1992) that the most robust estimator is obtained with the following $\rho$-function

$$\rho(\epsilon) = \begin{cases} \frac{1}{2}\epsilon^2, & |\epsilon| \le \xi \\ \xi |\epsilon| - \frac{1}{2}\epsilon^2, & |\epsilon| > \xi, \end{cases} \qquad (27)$$

which is quadratic close to the residual mean and transitions to a linear function for large residual values according to a threshold parameter $\xi$. A corresponding weighting function can be formed with

$$q(\epsilon) = \frac{1}{\epsilon} \frac{\delta \rho(\epsilon)}{\delta \epsilon} = \begin{cases} 1, & |\epsilon| \le \xi \\ \xi/|\epsilon|, & |\epsilon| > \xi, \end{cases} \qquad (28)$$

where the function $q(\cdot)$ then serves to reduce the influence of incoming data by modifying the estimator gain by a factor of $q(\epsilon)$.

The outlier attenuation is best visualized in Fig. 3, where residual values outside of the user-defined quadratic transition point are attributed smaller weights. M-estimators were similarly implemented for online vehicle mass estimation in Altmannshofer and Endisch (2016), Oei and Sawodny (2022), and Rhode et al. (2016).
<figure><img src="image_4.png" /><figcaption>Fig. 3. A comparison of (a) the weighting function and (b) the penalty function for Huber and classical least squares estimators.</figcaption></figure>

### 4.3. Parameter projection

Another important convergence safeguard for any recursive parameter estimation algorithm comes in the form of parameter projection (Ljung & Soderstrom, 1983). By specifying a known region where parameters are most likely to lie, convergence guarantees can be improved by projecting parameter estimates into an *a priori* known stable region. A heuristic approach to achieve this is to project parameters into a sphere with known center $x_c$ and radius $R$ (Rao Sripada & Grant Fisher, 1987)

$$ \hat{x}_{\text{proj},k+1} = x_c + \min \left( 1, \frac{R}{\|\hat{x}_{k+1} - x_c\|} \right) (\hat{x}_{k+1} - x_c). \quad (29) $$

Alternatively, for models where a physical intuition of the parameters space is available, parameters can be contained within pre-specified upper and lower bounds $x_{UB}$ and $x_{LB}$, shown in Algorithm 5. For example, the rolling resistance and aerodynamic coefficients can be bounded above zero, and the gross vehicle mass can be bounded above the unladen mass. Similar parameter projection schemes were adopted for online vehicle mass estimation in Altmannshofer and Endisch (2016) and Rhode and Gauterin (2013).

### 4.4. Tracking jumping parameters

The final adaptation to the RTLS<sub>LAG</sub> algorithm comes in the form of adaptive tracking of switching parameters. In realistic driving conditions, the vehicle's mass will be time-varying, and switch between discrete states depending on loading or unloading of the vehicle. It is hence important that the RTLS<sub>LAG</sub> algorithm is able to adaptively track the piecewise-constant behavior of the vehicle mass. Although this is a crucial feature for a mass virtual sensor, little attention has been given to tracking of switching parameters in the online vehicle mass estimation literature. This is likely due to the fact that common

<table><caption>Algorithm 5: Parameter projection</caption><tr><td>Input:</td><td>$\hat{x}_{k+1}$, $x_{UB}$, $x_{LB}$</td></tr><tr><td>1</td><td>for $i$ in (1, ..., $n_x$) do</td></tr><tr><td>2</td><td>&nbsp;&nbsp;&nbsp;&nbsp;if $\hat{x}_{i,k+1} < x_{LB,i}$ then</td></tr><tr><td>3</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$x_{i,k+1} = x_{LB,i}$</td></tr><tr><td>4</td><td>&nbsp;&nbsp;&nbsp;&nbsp;else if $\hat{x}_{i,k+1} > x_{UB,i}$ then</td></tr><tr><td>5</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$x_{i,k+1} = x_{UB,i}$</td></tr><tr><td>6</td><td>return $\hat{x}_{k+1}$</td></tr></table>

adaptive filtering techniques such as covariance resetting to re-initialize the estimator could be deemed sufficient to track changes in vehicle mass. However, reinitializing the estimator, say, after each journey, or each time the vehicle is at rest, is inefficient if the true mass is left unchanged. The estimator then needs to reconverge to the same mass as before, potentially compromising a more accurate value from the previously converged estimation. This points to the need for an adaptive recursive identification algorithm that can automatically detect and adapt to changes in vehicle mass.

Adaptive filters using a forgetting factor such as the RLS filter suffer from estimation “lag” when exposed to a time-varying system with switching parameters, since the forgetting factor is unable to detect and adapt to these sharp parameter transitions. Zheng and Lin therefore identified three methods for tracking switching parameters in Zheng and Lin (2003):

(i) **Multiple forgetting factors** — otherwise known as vector-type forgetting or selective forgetting, the scalar forgetting factor $\lambda$ is replaced with a vector of forgetting factors $\lambda = [\lambda_1, \lambda_2, ..., \lambda_{n_x}]^T$ to introduce multiple degrees of freedom in the parameter updates (Parkum, Poulsen, & Holst, 1990; Vahidi et al., 2005).

(ii) **Multiple models** — if *a priori* knowledge of the discrete dynamics or the parameter space is known to the user, the estimator can transition between models (Andersson, 1985).

(iii) **Covariance relaxation** — adaptively increasing elements of the estimator covariance matrix $P$ at the detected switching locations to allow sharper gain modifications (Chen & Norton, 1987; O'Bannon & Bezanson, 1991).

Vahidi, Stefanopoulou, and Peng adopt the first method, using a multiple forgetting RLS scheme in their experiments for online vehicle mass estimation in Vahidi et al. (2005) to dissociate rates of change for mass and road grade. Jensen et al. similarly tested a varying forgetting factor scheme in Jensen et al. (2022a) and Jensen, Santos, Clemmensen, Theodorsen, and Corstens (2022b), showing results on time-varying vehicle load scenarios. A drawback with this approach, however, is that there is a trade-off between tracking ability and sensitivity to noise, such that it is difficult to track switching parameters without compromising estimator convergence properties. The second approach is hindered by the reliance on prior knowledge of the discrete dynamics of the system. This leaves the third option, which only necessitates a detection mechanism to find the switching locations, rather than exact knowledge of the switched system.

Chen and Norton suggest using a purely statistical approach, where a vector sequence based on parameter estimation corrections $\delta\hat{x}$ detects the switching locations (Chen & Norton, 1987). First, a low-pass sequence on the parameter corrections if formed by

$$ w_{k+1} = \alpha w_k + (1 - \alpha) \delta \hat{x}_{k+1} \quad \text{with} \quad 0.9 \le \alpha \le 0.99, \quad (30) $$

where correct tuning of $\alpha$ removes noise effects on the parameter correction, and $w$ then fluctuates smoothly about zero. When any given parameter $x_i$ experiences a sudden state transition, its corresponding filtered correction $w_i$ will move away from zero, and this trend can be detected with the following tracking statistic

$$ r_{i;k+1} = \frac{|w_{i;k+1}|}{s_{i;k+1}}, \quad (31) $$

where

$$ s_{i;k+1} = \alpha s_{i;k} + (1 - \alpha) |\delta \hat{x}_{i;k+1}|. \quad (32) $$

When the statistic $r_{i;k+1}$ approaches unity, a transition is concluded in the corresponding parameter $\hat{x}_i$. In order to track this variation, the gain associated with the changing parameter $\hat{x}_i$ is increased by adding a fixed quantity $v_i$ to the corresponding principle diagonal element of the covariance matrix $p_{ii;k+1}$. The added quantity $v_i$ can be defined as the
<table><caption>**Table 3**
Comparison of estimator robustness properties.</caption><thead><tr><th rowspan="2">Estimator</th><th colspan="7">Robust against</th></tr><tr><th>Output noise</th><th>Input noise</th><th>Heterogeneous noise</th><th>Heteroscedastic noise</th><th>Ill-conditioning</th><th>Outliers</th><th>Jumping parameters</th></tr></thead><tbody><tr><td>RLS</td><td>✓</td><td>✗</td><td>✗</td><td>✗</td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>RTLSSVD</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✗</td><td>✗</td><td>✗</td></tr><tr><td>RobRTLSLAG</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td><td>✓</td></tr></tbody></table>

variance $\sigma_{v,l}^2$ of the zero-mean parameter increment for the following random walk model

$$ \hat{x}_{i,k+1} = \hat{x}_{i,k} + \delta\hat{x}_{i,k}, \quad \text{var}(\delta\hat{x}_{i,k}) = \hat{\sigma}_{v,l}^2. \qquad (33) $$

This variance term can either be tuned manually, or determined experimentally with

$$ \hat{\sigma}_{v,l}^2 = \frac{1}{n_y - 1} \sum_{i=2}^{n_y} (\hat{x}_{i,k} - \hat{x}_{i,k-1})^2. \qquad (34) $$

An important advantage of this method is that tracking is targeted for transitioning parameters only, while constant parameters are left undisturbed. This method can be further improved by considering the manner by which a vehicle's mass may change. If, for example, the seatbelt activation signals are available to the user, this can be a good indicator of a mass transition, and this can aid in detecting the switching locations.

After combining the regularization, outlier weighting, parameter projection, and enhanced parameter tracking to the benchmark RTLSLAG method, an ad hoc algorithm can be derived, and will be herein termed the RobRTLSLAG method.

## 5. Recursive noise covariance estimation

In order to complete the virtual sensor architecture, the RTLS estimators can be generalized and made robust against heterogeneous and heteroscedastic noise in the input and output data. Since the RTLS methods from Section 3 present weighted formulations, generalization can be achieved through recursive estimation of the input and output noise covariances $\hat{Q}_{a,k+1}$ and $\hat{q}_{y,k+1}$.

A recursive noise covariance estimation (NCE) scheme was proposed by Rhode, Bleimund, and Gauterin in Rhode et al. (2014), and will serve to generalize the RTLS estimators. The first step in the NCE procedure involves isolating the noise from the measurement signals through a polynomial Kalman smoother (PKS). Previously discovered for frequency debiasing applications in Niedźwiecki and Sobociński (2007), the PKS is a recursive interpretation of the Savitzky-Golay filter (Savitzky & Golay, 1964), whereby a polynomial function is locally approximated in a sliding window. The approximated polynomial function is of the form (Rhode et al., 2016)

$$ b_{k+1} = \sum_{i=1}^{n} (w_l + 1 + w_r)^{l-1} \mathbf{x}_{i;k+1} + \Delta b, \qquad (35) $$

where $(w_l + 1 + w_r)$ is the local approximation window with left and right windows of size $w_l$ and $w_r$ respectively, $\mathbf{x}_{k+1}$ contains the local polynomial function coefficients, and $\Delta b$ is a zero-mean white Gaussian noise process that serves to capture the evolutive nature of the polynomial function. A state-space representation of the time-varying polynomial function then takes the form

$$ \mathbf{x}_{k+1} = \mathcal{A} \mathbf{x}_k, \qquad (36) $$

$$ b_{k+1} = c \mathbf{x}_{k+1} + \Delta b, \qquad (37) $$

where (37) is a condensed form of (35) and $\mathcal{A} \in \mathbb{Z}^{n_y \times n_x}$ is a time-invariant state transition matrix that performs a unit-shift of the polynomial function according to (Zima, 1997)

$$ \mathcal{A}_{l,j} = \begin{cases} \begin{pmatrix} j-1 \\ j-i \end{pmatrix} & \forall j \ge i \\ 0 & \forall j < i. \end{cases} \qquad (38) $$

## Algorithm 6: Polynomial Kalman Smoother

1. **Function PKS**($\hat{x}_k$, $\hat{P}_k$, $b_{k+1}$, $\mathcal{A}$, $c$, $\lambda$):

$$ \left. \begin{aligned} \hat{x}'_k &= \mathcal{A} \hat{x}_k \\ \hat{P}'_k &= \mathcal{A} \hat{P}_k \mathcal{A}^\top \\ l_{k+1} &= \hat{P}'_k c^\top (\lambda + c \hat{P}'_k c^\top)^{-1} \\ \hat{P}_{k+1} &= \frac{1}{\lambda} (\hat{P}'_k - l_{k+1} c \hat{P}'_k) \\ \hat{x}_{k+1} &= \hat{x}'_k + l_{k+1} (b_{k+1} - c \hat{x}'_k) \end{aligned} \right\} \text{6} $$

7. **return** $\hat{x}_{k+1}$, $\hat{P}_{k+1}$

A Kalman filter interpretation of the above state-space representation then allows recursive estimation of the local polynomial function parameters, with the complete method shown in Algorithm 6. The noise-free signal at the center of the approximated polynomial function window is then retrieved with

$$ \hat{b}_{k+1-w_r} = \sum_{i=1}^{n} (w_l + 1)^{l-1} \hat{x}_{i,k+1}, \qquad (39) $$

and the associated first derivative is naturally found with

$$ \frac{d\hat{b}_{k+1-w_r}}{dt} = \sum_{i=1}^{n-1} (w_l + 1)^{l-1} \hat{x}_{i+1;k+1}. \qquad (40) $$

The estimated noise is then found as the difference between the noisy signal and the smoothed signal at the center of the polynomial function where

$$ \Delta \hat{b}_{k+1-w_r} = b_{k+1-w_r} - \hat{b}_{k+1-w_r}. \qquad (41) $$

The noise covariance matrices for the input and output signals $\mathbf{a}_{k+1-w_r}$ and $\mathbf{y}_{k+1-w_r}$ can then be estimated using the following covariance update formula (Rhode et al., 2014)

$$ \Delta \hat{\mathbf{z}}_{k+1-w_r} = [\Delta \hat{\mathbf{a}}_{1;k+1-w_r} \quad \dots \quad \Delta \hat{\mathbf{a}}_{n_x;k+1-w_r} \quad \Delta \hat{\mathbf{y}}_{k+1-w_r}], \qquad (42) $$

$$ \hat{Q}_{k+1-w_r} = \lambda \hat{Q}_{k-w_r} + (1-\lambda)(\Delta \hat{\mathbf{z}}_{k+1-w_r}^\top \Delta \hat{\mathbf{z}}_{k+1-w_r}), \qquad (43) $$

$$ = \begin{bmatrix} \hat{Q}_{a;k+1-w_r} & \mathbf{0} \\ \mathbf{0} & \hat{q}_{y;k+1-w_r} \end{bmatrix}, $$

where the forgetting factor $\lambda$ serves to retain information from previous noise covariance estimations. Use of the PKS in Algorithm 6 and the NCE scheme in (39)-(43) thus permits recursive access to the input and output noise covariances $\hat{Q}_{a;k+1-w_r}$ and $\hat{q}_{y;k+1-w_r}$, but at the expense of an estimation latency equivalent to the size of the right smoothing window $w_r$. Importantly, however, the RTLSSVD and RobRTLSLAG methods can now be made robust against heterogeneous and heteroscedastic measurement noise conditions, which commonly occur in industry settings. An overview of the robustness properties of the RLS, RTLSSVD, and RobRTLSLAG methods is shown in Table 3.

## 6. Experimental tests

The motivation behind the proposed RobRTLSLAG method is to provide robust and accurate online vehicle mass estimations in spite of the sub-optimal data that engineers are frequently faced with. To
<figure><img src="image_5.png" /><figcaption>Fig. 4. Example of the online Boolean data selection process for a randomly sampled 8 min segment of experimental CAN-bus data.</figcaption></figure>

this end, it is important to validate the performance of the proposed method using real vehicle data.

A large-scale experiment was conducted over the course of several weeks, and CAN-bus data was collected using an electric two-wheel drive passenger vehicle, which included wheel speed, longitudinal IMU acceleration, engine torque, and engine speed signals. Data from 90 experimental test drives were collected, and tests included driving with static mass, as well as with switching mass scenarios. The tests were conducted in (i) an urban driving environment, containing mainly highways and flat roads, and (ii) a more mountainous environment containing country roads, with more significant road gradients. Ahead of the estimation process, experimental data was interpolated such that the signals retrieved from the vehicle CAN-bus were synchronized on a common sampling frequency.

## 6.1. Boolean data selector

To maximize the parameter estimation accuracy, and to minimize any model-plant mismatch during operation, it is important to select only the vehicle data during valid operating conditions, which take into account the assumptions from Table 1. A Boolean data selector was therefore implemented, selecting only concomitant data for the estimation process (this concept is standard in the vehicle mass estimation literature, see for example Altmannshofer & Endisch, 2016; Fathy et al., 2008; Rhode et al., 2016). The conditions for conformity are the following:

(i) **Yaw rate** — the absolute value of yaw rate must lie below a user defined upper bound. Yaw rate can be obtained either directly if available in the CAN-bus, from the steering angle signal, or calculated from the wheel speed signals as in Isermann (2022). This ensures the vehicle is driving in longitudinal motion, which is necessary to validate the choice of a longitudinal model.

(ii) **Acceleration** — the absolute value of acceleration must lie within user defined upper and lower bounds. An upper bound on acceleration mitigates the effects of assumptions (4) and (5) from Table 1, since wheel slip and vehicle pitch effects are reduced. Meanwhile, a lower bound on acceleration ensures sufficient signal excitation and mitigates the effects of assumption (2), since errors due to wind velocity can dominate the longitudinal dynamics Eq. (15) for low accelerations.

(iii) **Wheel speed** — wheel speed must lie above a user specified lower bound to ensure sufficient signal excitation.

For electric vehicles, these are sufficient conditions. For internal combustion engine vehicles, however, the additional condition of a fully engaged gear is necessary. Otherwise, during engine idling scenarios for example, the longitudinal dynamics model (15) will no longer be valid without any tractive force acting on the vehicle. Let us note that, under the specified conditions (straight-line driving with mild accelerations), the various vehicle onboard control algorithms are

assumed inactive, and will thus have little influence on the estimation process. An example of the online Boolean data selection process is shown in Fig. 4, where the highlighted data shows the activation of the data selector when the conditions on yaw rate, acceleration, and wheel speed are all met.

## 6.2. Initialization and tuning

All three estimators were initialized with $x_0 = 0$, $P_0 = 100 \times I_{n_x}$, and $\lambda = 0.9995$. For the PKS, a degree two polynomial was used for smoothing with a forgetting factor $\lambda_{PKS} = 0.95$ and a window size $w_r = w_l = 10$. For the noise covariance estimation process, the forgetting factor was set to $\lambda_{NCE} = 0.9999$.

For the ad hoc elements of the proposed RobRTLS<sub>LAG</sub> algorithm, the U-D regularization parameter was set to $Z = 1$, the Huber outlier threshold to $\xi = 300$, and for the parameter tracking $\alpha = 0.99$.

The experiments were carried out with a two-wheel drive electric passenger vehicle, and the vehicle input parameters $i_{tot}$, $K_w$, and $\eta_{tot}$ were tuned according to Table 2.

## 6.3. Results—static mass

The performance of the proposed RobRTLS<sub>LAG</sub> algorithm was first tested in driving scenarios with a static vehicle mass. The RobRTLS<sub>LAG</sub>, RTLS<sub>SVD</sub>, and RLS algorithms were tested over 83 independent vehicle experiments, and for each algorithm, the root mean square percentage error (RMSPE) and the mean absolute percentage error (MAPE) metrics, which are characterized by

$$ 
\begin{aligned}
\text{RMSPE} &= 100 \times \sqrt{\frac{1}{n} \sum_{i=1}^{n} \left( \frac{\hat{x}_i - \bar{x}_i}{\bar{x}_i} \right)^2}, \\
\text{MAPE} &= 100 \times \frac{1}{n} \sum_{i=1}^{n} \left| \frac{\hat{x}_i - \bar{x}_i}{\bar{x}_i} \right|,
\end{aligned} 
\quad (44) 
$$

were calculated over the test duration. At the beginning of each experiment, the true mass value $\bar{x}$ was obtained using a vehicle scale accurate to within $\pm 0.5$ kg. The resulting metrics over the 83 experiments can be seen in Fig. 6 and an overview of the mean and median boxplot values is shown in Table 4. In Fig. 6, for each algorithm, boxplots on the left (blue) are for RMSPE values and on the right (red) are the MAPE values. The full estimation process for a handful of 60 min experiments is also shown in Fig. 5 for five different static mass configurations.

The RLS algorithm produced biased estimates with the highest median RMSPE and MAPE values, which is expected considering the EIV framework discussed in Section 3. This being said, the RLS algorithm displayed excellent convergence properties, which resulted in much fewer outliers than the benchmark RTLS<sub>SVD</sub> method. The benchmark RTLS<sub>SVD</sub> algorithm, which performs very well on simulated data (Rhode et al., 2014), struggled with parameter bursting during initial convergence phases for many of the experimental tests. The inverse iteration procedure to find the eigenvector corresponding to the
<figure><img src="image_6.png" /><figcaption>**Fig. 5.** A sample of six online estimation experiments with different static mass configurations; reference masses included 2164 kg, 2238 kg, 2303 kg, 2312 kg, and 2386 kg configurations. The RobRTLS<sub>LAG</sub> algorithm displays good convergence properties, while remaining unbiased and unaffected by disturbances in the data. The RTLS<sub>SVD</sub> algorithm frequently displays large amounts of bursting before convergence.</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 6.** Comparing RMSPE and MAPE metrics for the RobRTLS<sub>LAG</sub>, RTLS<sub>SVD</sub>, and RLS algorithms over 83 vehicle experiments with static mass. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)</figcaption></figure>

<table><caption>**Table 4**

Error statistics for the 83 experimental tests with static mass.</caption><thead><tr><th></th><th>RLS</th><th>RTLS<sub>SVD</sub></th><th>RobRTLS<sub>LAG</sub></th></tr></thead><tbody><tr><td>Mean RMSPE (%)</td><td>3.97</td><td>300.26</td><td>2.12</td></tr><tr><td>Median RMSPE (%)</td><td>3.39</td><td>2.52</td><td>1.88</td></tr><tr><td>Mean MAPE (%)</td><td>3.34</td><td>6.26</td><td>1.66</td></tr><tr><td>Median MAPE (%)</td><td>3.13</td><td>1.50</td><td>1.53</td></tr></tbody></table>

smallest eigenvalue of the data matrix in lines 6–8 of Algorithm 2 seems very sensitive to ill-conditioned data, and phases of bursting occurred in the early stages of estimation, and sometimes re-occurred in mid-estimation process. This explains the large amount of outlier values in Fig. 6, and an example of the erratic bursting phenomenon can be seen in Fig. 5.

The RobRTLS<sub>LAG</sub> algorithm performed very well overall, eliminating the noise-induced bias from the RLS algorithm, but with almost equivalent convergence times. Due to the outlier attenuation and *U-D* regularization, the RobRTLS<sub>LAG</sub> estimates were much smoother than for the benchmark methods, which was well reflected in the mean and

median RMSPE metrics at 2.12% and 1.88% respectively (the reduced variance is also demonstrated in Fig. 5). This highlights the industry-readiness of the proposed method, since the RobRTLS<sub>LAG</sub> estimations were consistently unhindered by the outlier-ridden and ill-conditioned vehicle data. Furthermore, the importance of implementing an EIV-based solution for vehicle parameter estimation problems where CAN-bus signals corrupt the input data with noise is without question. This is made clear by the mean and median MAPE metrics for the two RTLS solutions, which improve the overall estimation accuracy by a factor of two compared to the classical RLS solution.

### 6.4. Results—switching mass

An additional experiment aimed at testing the switching parameter tracking capabilities of the RobRTLS<sub>LAG</sub> compared to the benchmark algorithms. As discussed in Section 4, the *ad hoc* solution for tracking switching parameters is crucial for online vehicle mass estimation, where discrete changes are frequent during loading and unloading of the vehicle. An intermittent loading scenario was emulated during a 90 min vehicle experiment, where 148 kg and 173 kg sand bags were added to the vehicle at $t = 28$ min and $t = 57$ min, respectively. Fig. 7a compares the performance of the RobRTLS<sub>LAG</sub>, RTLS<sub>SVD</sub>, and RLS algorithms for the mass variation experiment. It is clear that the RLS and RTLS<sub>SVD</sub> algorithms suffer from the estimation lag discussed in Section 4 due to the inability of a forgetting factor-based algorithm to detect switching locations.

The selective covariance relaxation process for the RobRTLS<sub>LAG</sub> algorithm, however, was able to detect and track the switching vehicle mass convincingly. The reconvergence speed is further accentuated by looking at the squared errors during the estimation process in Fig. 7b, where the RobRTLS<sub>LAG</sub> estimator remains below 1% squared error for the majority of the experiment, deviating only briefly during the reconvergence process. A small bias can be observed following the second switching process, the origins of which cannot be known explicitly, although environmental effects such as excessive headwind or severe road gradients tend to have bias-inducing effects on the mass estimation process.

A visual representation of the selective covariance relaxation process can be seen in Fig. 7c, where 95% confidence intervals are shown
<figure><img src="image_8.png" /><figcaption>Fig. 7. Mass estimation results for an experiment with two stages of loading where (a) compares the performance of the presented algorithms, highlighting the effect of estimator lag in the RLS and RTLS<sub>SVD</sub> methods (b) compares the squared absolute errors for each estimator throughout the experiment and (c) shows the covariance relaxation process for the RobRTLS<sub>LAG</sub> method by showing 95% confidence intervals during the estimation process.</figcaption></figure>

for the RobRTLS<sub>LAG</sub> estimation and are calculated according to (Mer- cère, 2023, p. 111)

$$ \hat{x}_i = 1.984 \sqrt{\hat{q}_{x,i|l}} \hat{x}_i + 1.984 \sqrt{\hat{q}_{x,i|l}} \hat{x}_i, \quad (45) $$

where

$$ \hat{Q}_x = \sigma^2 \hat{P}. \quad (46) $$

Prior knowledge of the variance term $\sigma^2$ is therefore necessary to have access to the confidence intervals depicted in Fig. 7c, and can be estimated offline using a chosen data batch with (Shen, Li, & Chen, 2011)

$$ \hat{\sigma}^2 = \frac{(y - \mathbf{A}\hat{x})^\top \hat{Q}_z^{-1} (y - \mathbf{A}\hat{x})}{n_y - n_x}, \quad (47) \\ \hat{Q}_z = \hat{Q}_y + (\hat{x}^\top \otimes I_{n_y}) \hat{Q}_a (\hat{x} \otimes I_{n_y}). $$

Access to the 95% confidence intervals is important for industrial applications since, as discussed in Section 1, uncertainty certificates

are crucial when introducing estimated variables in a vehicle's data network, especially when considering the safety-critical applications in the automotive industry.

## 6.5. Empirical sensitivity analysis

In order to assess the generalizability of the proposed method for model-based online vehicle mass estimation, it is important to discuss the sensitivity to various input parameters and assumptions which were previously discussed in Section 2. First and foremost, we must highlight that the vehicle CAN-bus is only a medium to transport vehicle data, and that the performance of any sensor-based mass estimation algorithm will be heavily dictated by the quality of underlying vehicle sensors. Generally speaking, however, the practicing engineer has little influence on the choice of sensor equipped on production vehicles (high-cost sensors are generally not an option for production vehicles), so not much can be done to improve estimator performance on this front. It then remains to test the proposed method for:

(i) Sensitivity to the choice of modeling assumptions.

(ii) Sensitivity to the user-defined vehicle input parameters.

Regarding the former, an empirical sensitivity analysis was conducted for three vehicle journeys at 2164 kg, 2284 kg, and 2485 kg, and aimed at showing the effects of the vehicle acceleration domain for data selection on the final estimation. The results from this empirical study are shown in Fig. 8 where the effects of selecting very high and very low accelerations, outside the range {$\beta_{min} < |a_{x,IMU}| \le \beta_{max}$} vs. mild accelerations within the range {$\beta_{min} < |a_{x,IMU}| \le \beta_{max}$} can be seen in Fig. 8a and b, respectively. As it was previously discussed, the purpose of selecting vehicle accelerations to within user-defined upper and lower bounds is to mitigate the effects of assumptions (2), (4), and (5) from Table 1. The values of $\beta_{min}$ and $\beta_{max}$ will naturally depend on the vehicle and tire usage conditions (tire wear, vehicle suspension, etc.), and should thus be tuned a priori.

There is a clear degrading effect of selecting very high and very low accelerations, where non-negligible estimation errors for all three algorithms can be seen in Fig. 8a. This is because during very low accelerations (for example during quasi-constant velocity driving on highway roads), vehicle data becomes poorly conditioned, as discussed in Section 4. Furthermore, during low accelerations, the resistive forces dominate the longitudinal dynamics equation such that

$$ F_{X,T}(t) \approx F_{X,R}(t) + F_{X,A}(t) + F_{X,C}(t), \quad (48) $$

which means that effects of neglecting headwind, for example, are much more flagrant. Similarly, by selecting very high accelerations, the degrading effects of vehicle pitch and wheel slip on the final mass estimation are accentuated, rendering assumptions (4) and (5) invalid. On the other hand, it is clear from Fig. 8b that correctly selecting only mild vehicle accelerations results in significantly improved estimation accuracy, which justifies the choice of operating conditions. The zoomed quadrants of Fig. 8 still show some estimation errors, which can be attributed to the remaining model mismatch errors discussed in Table 1.

Regarding the sensitivity to the choice of vehicle parameters, a second empirical sensitivity analysis is shown in Fig. 9, where the three user-defined parameters from Table 2 are assessed. Fig. 9 shows that, by taking drivetrain efficiency $\eta_{tot}$, the tire rolling radius parameter $K_w$, and drivetrain reduction ratio $i_{tot}$ outside of their theoretical ranges (Is- ermann, 2022; Jazar, 2008), a bias inducing effect can be expected. Notably, a ±5 % error on these parameters will induce a ±5 % error on the final mass estimation. Correctly choosing these vehicle parameters therefore becomes important, which hinders the generalizability of this approach since specific tuning is required between vehicle models.
<figure><img src="image_9.png" /><figcaption>**Fig. 8.** Sensitivity of online vehicle mass estimation to vehicle acceleration domains for data selection. From left to right, the estimation algorithms are tested for three separate vehicle journeys at 2164 kg (left), 2284 kg (middle), and 2485 kg (right). The top figures (a) show the estimation results for very high and very low values of acceleration, outside the range {$\rho_{min} < |a_{x,IMU}| \le \rho_{max}$}, while the bottom figures (b) show the estimation results for mild accelerations, within the range {$\rho_{min} < |a_{x,IMU}| \le \rho_{max}$}.</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>**Fig. 9.** Sensitivity of online vehicle mass estimation to vehicle-specific parameters. The RobRTLS<sub>LAG</sub> algorithm is tested on a journey with a reference mass of 2238 kg. From left to right, an empirical sensitivity analysis is shown on $\eta_{tot}$, $K_w$, and $i_{tot}$, where the effect of a ±5% misspecification on each individual parameter is studied. For each test, the two remaining parameters are held at their theoretical values (see Table 2).</figcaption></figure>

## 7. Conclusion

This work presents a robust model-based solution for online estimation of vehicle mass from engine torque, engine speed, wheel speed, and acceleration measurements only and can be implemented for both internal combustion engine and electric passenger vehicles alike. The term “robust” in this context specifically alludes to the capacity to produce unbiased, stable, and reliable estimations when considering the sub-optimal quality and variability of vehicle data.

The proposed RobRTLS<sub>LAG</sub> estimator is grounded in an errors-in-variables model, which specifically caters to the noise-ridden vehicle data to allow for unbiased estimations, and contains several application-specific modifications. A numerically stable regularization procedure avoids parameter drifting and bursting due to ill-conditioned data, and a Huber weighting function aims at attenuating the effect of outliers in data. Furthermore, an *ad hoc* procedure for adaptive tracking of switching parameters is implemented and allows for accurate tracking of vehicle mass transitions. The estimator is then generalized against heterogeneous and heteroscedastic measurement noise by use of a recursive noise covariance estimator.

The proposed algorithm is tested against the classical recursive least squares algorithm, and a benchmark recursive total least squares algorithm from the vehicle mass estimation literature. The accuracy of the proposed algorithm is validated through multiple vehicle experiments using a two-wheel drive electric passenger vehicle. The RobRTLS<sub>LAG</sub> estimator outperforms the benchmark algorithms over 83 experiments with a static vehicle mass, averaging at 2.12% root mean square error. The tracking capability of the RobRTLS<sub>LAG</sub> method is then highlighted with a vehicle experiment containing sharp mass transitions.

## CRediT authorship contribution statement

**Hugo Koide:** Writing – review & editing, Writing – original draft, Validation, Software, Methodology, Investigation, Formal analysis, Data curation, Conceptualization. **Jérémy Vayssettes:** Writing – review & editing, Supervision, Project administration, Funding acquisition. **Guillaume Mercère:** Writing – review & editing, Validation, Supervision, Funding acquisition, Formal analysis.
## Declaration of competing interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

## Acknowledgments

This work was partially supported by I-TireLab, France (2025–2029), a joint public–private laboratory focused on modeling, estimation, and control for connected tires and rubber manufacturing processes. The laboratory is supported by Michelin, Université de Poitiers, Univ. Grenoble Alpes, Grenoble INP, France, and CNRS, France.

## Appendix. Bierman's U-D updating algorithm

The subsequent U-D updating sequence follows from the developments in Bierman (1977) and Ljung and Söderström (1983). Let us consider the factorization of the parameter covariance matrix $P_k$ as

$$P_k = U_k D_k U_k^\top, \qquad (A.1)$$

where $U \in \mathbb{R}^{n_x \times n_x}$ is a unit upper-triangular matrix with $u_{ij} = 1, i = 1, 2, \dots, n_x$ and $u_{ij} = 0, i > j$ and $D \in \mathbb{R}^{n_x \times n_x}$ is a diagonal matrix. We now seek a similar factorization for $P_{k+1}$. Using the relationships from lines 6–7 in Algorithm 3, we have

$$ \begin{aligned} P_{k+1} &= U_{k+1} D_{k+1} U_{k+1}^\top \\ &= \frac{1}{\lambda} \left( P_k - \frac{P_k \tilde{a}_{k+1}^\top \tilde{a}_{k+1} P_k}{\lambda q_{z,k+1} + \tilde{a}_{k+1} P_k \tilde{a}_{k+1}^\top} \right) \\ &= \frac{1}{\lambda} U_k \left( D_k - \frac{D_k U_k^\top \tilde{a}_{k+1}^\top (D_k U_k^\top \tilde{a}_{k+1}^\top)^\top}{\lambda q_{z,k+1} + \tilde{a}_{k+1} P_k \tilde{a}_{k+1}^\top} \right) U_k^\top. \end{aligned} \qquad (A.2) $$

By defining the following variables

$$f_{k+1} := U_k^\top \tilde{a}_{k+1}^\top, \qquad (A.3)$$

$$g_{k+1} := D_k f_{k+1}, \qquad (A.4)$$

$$\beta_{k+1} := \lambda q_{z,k+1} + \tilde{a}_{k+1} P_k \tilde{a}_{k+1}^\top = \lambda q_{z,k+1} + f_{k+1}^\top g_{k+1}, \qquad (A.5)$$

the updated factorization in (A.2) becomes

$$U_{k+1} D_{k+1} U_{k+1}^\top = \frac{1}{\lambda} U_k \left( D_k - \frac{g_{k+1} g_{k+1}^\top}{\beta_{k+1}} \right) U_k^\top. \qquad (A.6)$$

The component in brackets can then be factored as

$$D_k - \frac{g_{k+1} g_{k+1}^\top}{\beta_{k+1}} = \overline{U}_{k+1} \overline{D}_{k+1} \overline{U}_{k+1}^\top, \qquad (A.7)$$

and from (A.6) we find

$$U_{k+1} = U_k \overline{U}_{k+1} \qquad (A.8)$$

$$D_{k+1} = \frac{\overline{D}_{k+1}}{\lambda}. \qquad (A.9)$$

The factorization of (A.7) is then performed following Bierman (1977) to find $U_{k+1}$ and $D_{k+1}$ and is shown in Algorithm 4.

## References

Altmannshofer, S., & Endisch, C. (2016). Robust vehicle mass and driving resistance estimation. In *2016 American control conference* (pp. 6869–6874). Boston, MA, USA: IEEE, http://dx.doi.org/10.1109/ACC.2016.7526754.

Andersson, P. (1985). Adaptive forgetting in recursive identification through multiple models. *International Journal of Control*, 42(5), 1175–1193. http://dx.doi.org/10.1080/00207178508933420.

Bierman, G. J. (2006). *Factorization methods for discrete sequential estimation*. Courier Corporation.

Boada, B. L., Boada, M. J. L., & Zhang, H. (2019). Sensor fusion based on a dual Kalman filter for estimation of road irregularities and vehicle mass under static and dynamic conditions. *IEEE/ASME Transactions on Mechatronics*, 24(3), 1075–1086. http://dx.doi.org/10.1109/TMECH.2019.2909977.

Bryson, M. C. (1974). Heavy-tailed distributions: Properties and tests. *Technometrics*, 16(1), 61–68. http://dx.doi.org/10.1080/00401706.1974.10489150.

Chen, M. J., & Norton, J. P. (1987). Estimation technique for tracking rapid parameter changes. *International Journal of Control*, 45(4), 1387–1398. http://dx.doi.org/10.1080/00207178708933815.

Chu, W., Cao, K., Li, S., Luo, Y., & Li, K. (2013). Vehicle mass estimation based on high-frequency-information extraction. vol. 46, In *Proceedings of the IFAC symposium on advances in automotive control* (pp. 72–76). Tokyo, Japan: http://dx.doi.org/10.3182/20130904-4-JP-2042-00022.

De Bruyne, S., Van der Auweraer, H., Diglio, P., & Anthonis, J. (2011). Online estimation of vehicle inertial parameters for improving chassis control systems. In *Proceedings of the 18th IFAC world congress* (pp. 1814–1819). Milano, Italy: http://dx.doi.org/10.3182/20110828-6-IT-1002.03379.

Doumiati, M., Victorino, A., Charara, A., & Lechner, D. (2009). Virtual sensors, application to vehicle tire-road normal forces for road safety. In *2009 American control conference* (pp. 3337–3343). St. Louis, MO, USA: IEEE, http://dx.doi.org/10.1109/ACC.2009.5159866.

Fathy, H. K., Kang, D., & Stein, J. L. (2008). Online vehicle mass estimation using recursive least squares and supervisory data extraction. In *2008 American control conference* (pp. 1842–1848). Seattle, WA: http://dx.doi.org/10.1109/ACC.2008.4586760.

Feng, B., Guodong, Y., Ren, Y., Shen, T., & Wang, F. (2022). A joint vehicle mass and road slope estimation of distributed drive electric vehicles considering road environment factors. In *817-824, 25th international conference on intelligent transportation systems*. Macau, China: IEEE, http://dx.doi.org/10.1109/ITSC55140.2022.9922558.

Feng, Y., Xiong, L., Yu, Z., & Qu, T. (2014). Recursive least square vehicle mass estimation based on acceleration partition. *Chinese Journal of Mechanical Engineering*, 27(3), 448–458. http://dx.doi.org/10.3901/CJME.2014.03.448.

Ghosh, J., Foulard, S., & Fietzek, R. (2017). Vehicle mass estimation from CAN data and drivetrain torque observer. In *WCX 17: SAE world congress experience*. http://dx.doi.org/10.4271/2017-01-1590.

Golub, G. H., & Van Loan, C. F. (1980). An analysis of the total least squares problem. *SIAM Journal on Numerical Analysis*, 17(6), 883–893. http://dx.doi.org/10.1137/0170773.

Gunnarsson, S. (1996). Combining tracking and regularization in recursive least squares identification. *Proceedings of 35th IEEE Conference on Decision and Control*, 3, 2551–2552. http://dx.doi.org/10.1109/CDC.1996.573481.

Han, K.-J., Kim, I.-K., Jo, H. Y., & Huh, K.-S. (2009). Development and experimental evaluation of an online estimation system for vehicle mass. *Proceedings of the Institution of Mechanical Engineers, Part D: Journal of Automobile Engineering*, 223(2), 167–177. http://dx.doi.org/10.1243/09544070JAUTO991.

Huber, P. J. (1992). Robust estimation of a location parameter. *Breakthroughs in Statistics: Methodology and Distribution*, 492–518. http://dx.doi.org/10.1007/978-1-4612-4380-9_35.

Huh, K., Lim, S., Jung, J., Hong, D., Han, S., Han, K., et al. (2007). Vehicle mass estimator for adaptive roll stability control. In *Proceedings of the 2007 SAE world congress & exhibition*. Detroit, Michigan: http://dx.doi.org/10.4271/2007-01-0820.

İşbitirici, A., Giarré, L., Xu, W., & Falcone, P. (2023). LSTM-based virtual load sensor for heavy-duty vehicles. *Sensors*, 24(1), 226. http://dx.doi.org/10.3390/s24010226.

Isermann, R. (2022). Automotive control: modeling and control of vehicles. Berlin, Heidelberg: Springer, http://dx.doi.org/10.1007/978-3-642-39440-9.

Jazar, R. N. (2008). *Vehicle dynamics: vol. 1*, Springer.

Jensen, K. M., Santos, I. F., Clemmensen, L. K., Theodorsen, S., & Corstens, H. J. (2022a). Mass estimation of ground vehicles based on longitudinal dynamics using IMU and CAN-bus data. *Mechanical Systems and Signal Processing*, 162, Article 107982. http://dx.doi.org/10.1016/j.ymssp.2021.107982.

Jensen, K. M., Santos, I. F., Clemmensen, L. K., Theodorsen, S., & Corstens, H. J. (2022b). Mass estimation of ground vehicles based on longitudinal dynamics using loosely coupled integrated navigation system and CAN-bus data with model parameter estimation. *Mechanical Systems and Signal Processing*, 171, Article 108925.

Kim, S., Shin, K., Yoo, C., & Huh, K. (2017). Development of algorithms for commercial vehicle mass and road grade estimation. *International Journal of Automotive Technology*, 18(6), 1077–1083. http://dx.doi.org/10.1007/s12239-017-0105-6.

Koide, H., Vayssettes, J., & Mercère, G. (2024). A robust and regularized algorithm for recursive total least squares estimation. *IEEE Control Systems Letters*, 8, 1006–1011. http://dx.doi.org/10.1109/LCSYS.2024.3407602.

Korayem, A. H., Khajepour, A., & Fidan, B. (2020). Trailer mass estimation using system model-based and machine learning approaches. *IEEE Transactions on Vehicular Technology*, 69(11), 12536–12546. http://dx.doi.org/10.1109/TVT.2020.3023115.

Kukkala, V. K., Tunnell, J., Pasricha, S., & Bradley, T. (2018). Advanced driver-assistance systems: a path toward autonomous vehicles. *IEEE Consumer Electronics Magazine*, 7(5), 18–25. http://dx.doi.org/10.1109/MCE.2018.2828440.

Li, B., Zhang, J., Du, H., & Li, W. (2016). Two-layer structure based adaptive estimation for vehicle mass and road slope under longitudinal motion. *Measurement*, 95, 439–455. http://dx.doi.org/10.1016/j.measurement.2016.10.045.

Ljung, L. (1999). *System identification: theory for the user*, Prentice hall information and system sciences series, (2nd ed.). New Jersey: Prentice-Hall, Inc.

Ljung, L., & Soderstrom, T. (1983). *Theory and practice of recursive identification*. MIT Press.
Markovsky, I., & Van Huffel, S. (2007). Overview of total least-squares methods. *Signal Processing*, 87, 2283-2302. http://dx.doi.org/10.1016/j.sigpro.2007.04.004.

Mercère, G. (2023). *Data driven model learning for engineers with applications to univariate time series*. Springer Nature Switzerland.

Minh, N. N., & Jung, D. (2022). Integrated estimation strategy of brake force cooperated with artificial neural network based road condition classifier and vehicle mass identification using static suspension deflections. *Applied Sciences*, 12(19), 9727. http://dx.doi.org/10.3390/app12199727.

Niedźwiecki, M., & Sobociński, A. (2007). Generalized adaptive notch filters with frequency debiasing for tracking of polynomial phase systems. *Automatica*, 43(1), 128-134. http://dx.doi.org/10.1016/j.automatica.2006.08.004.

O'Bannon, G., & Bezanson, L. W. (1991). Comparison of improved recursive identification algorithms. *Chemical Engineering Communications*, 99(1), 1-13. http://dx.doi.org/10.1080/00986449108911574.

Oei, M., & Sawodny, O. (2022). Vehicle parameter estimation with Kalman filter disturbance observer. *IFAC PapersOnLine*, 55(27), 497-502. http://dx.doi.org/10.1016/j.ifacol.2022.10.561.

Parkum, J., Poulsen, N., & Holst, J. (1990). Selective forgetting in adaptive procedures. *IFAC Proceedings Volumes*, 23(8), 137-142. http://dx.doi.org/10.1016/S1474-6670(17)51997-7.

Pevec, D., Babic, J., Carvalho, A., Ghiassi-Farrokhfal, Y., Ketter, W., & Podobnik, V. (2019). Electric vehicle range anxiety: an obstacle for the personal transportation (r)evolution? In *Proceedings of the 4th international conference on smart and sustainable technologies*. Split, Croatia: IEEE, http://dx.doi.org/10.23919/SpliTech.2019.8783178.

Rao Sripada, N., & Grant Fisher, D. (1987). Improved least squares identification. *International Journal of Control*, 46(6), 1889-1913. http://dx.doi.org/10.1080/0020717808934023.

Rauh, N., Franke, T., & Krems, J. F. (2015). Understanding the impact of electric vehicle driving experience on range anxiety. *Human Factors: The Journal of the Human Factors and Ergonomics Society*, 57(1), 177-187. http://dx.doi.org/10.1177/0018720814546372.

Rhode, S., Bleimund, F., & Gauterin, F. (2014). Recursive generalized total least squares with noise covariance estimation. In *Proceedings of the 19th IFAC world congress* (pp. 4637-4643). Cape Town, South Africa: IFAC, http://dx.doi.org/10.3182/20140824-6-ZA-1003.01568.

Rhode, S., & Gauterin, F. (2012). Vehicle mass estimation using a total least-squares approach. In *15th international IEEE conference on intelligent transportation systems* (pp. 1584-1589). Anchorage, AK, USA: IEEE, http://dx.doi.org/10.1109/ITSC12.2012.6338638.

Rhode, S., & Gauterin, F. (2013). Online estimation of vehicle driving resistance parameters with recursive least squares and recursive total least squares. In *2013 IEEE intelligent vehicles symposium* (pp. 269-276). Gold Coast City, Australia: IEEE, http://dx.doi.org/10.1109/IVS.2013.6629481.

Rhode, S., Hong, S., Hedrick, J. K., & Gauterin, F. (2016). Vehicle tractive force prediction with robust and windup-stable Kalman filters. *Control Engineering Practice*, 48, 37-50. http://dx.doi.org/10.1016/j.conengprac.2015.10.002.

Sarker, A., Shen, H., & Stankovic, J. A. (2018). MORP: data-driven multi-objective route planning and optimization for electric vehicles. In *Proceedings of the ACM on interactive, mobile, wearable and ubiquitous technologies* (pp. 1-35). http://dx.doi.org/10.1145/3161408.

Savitzky, A., & Golay, M. J. E. (1964). Smoothing and differentiation of data by simplified least squares procedures. *Analytical Chemistry*, 36(8), 1627-1639. http://dx.doi.org/10.1021/ac60214a047.

Shen, Y., Li, B., & Chen, Y. (2011). An iterative solution of weighted total least-squares adjustment. *Journal of Geodesy*, 85(4), 229-238. http://dx.doi.org/10.1007/s00190-010-0431-1.

Spaeth, U., Weisbach, M., Fechtner, H., Herklotz, K., Schmuelling, B., & Troullier, C. (2019). Mass detection using piezoresistive pressure sensors to optimize range prediction of full electric buses. In *Proceedings of the 13th international conference on sensing technology* (pp. 1-6). Sydney, Australia: IEEE, http://dx.doi.org/10.1109/ICST46873.2019.9047724.

Stenlund, B., & Gustafsson, F. (2002). Avoiding windup in recursive parameter estimation. *Preprints of Reglemöte*, 2002, 148-153.

Stephant, J., Charara, A., & Meizel, D. (2004). Virtual sensor: application to vehicle sideslip angle and transversal forces. *IEEE Transactions on Industrial Electronics*, 51(2), 278-289. http://dx.doi.org/10.1109/TIE.2004.824857.

Sun, Y., Li, L., Yan, B., Yang, C., & Tang, G. (2015). A hybrid algorithm combining EKF and RLS in synchronous estimation of road grade and vehicle mass for a hybrid electric bus. *Mechanical Systems and Signal Processing*, 68, 416-430. http://dx.doi.org/10.1016/j.ymssp.2015.08.015.

Torabi, S., Wahde, M., & Hartono, P. (2019). Road grade and vehicle mass estimation for heavy-duty vehicles using feedforward neural networks. In *Proceedings of the 4th international conference on intelligent transportation engineering* (pp. 316-321). Singapore: IEEE.

Vahidi, A., Stefanopoulou, A., & Peng, H. (2005). Recursive least squares with forgetting for online estimation of vehicle mass and road grade: Theory and experiments. *Vehicle System Dynamics*, 43(1), 31-55. http://dx.doi.org/10.1080/00423110412331290446.

Wang, B., Wang, H., Wu, L., Cai, L., Pi, D., & Wang, E. (2020). Truck mass estimation method based on the on-board sensor. *Vol. 234*, In *Proceedings of the institution of mechanical engineers, part d: journal of automobile engineering* (pp. 2429-2443). http://dx.doi.org/10.1177/0954407020905151.

Wielitzka, M., Dagen, M., & Ortmaier, T. (2015). Joint unscented Kalman filter for state and parameter estimation in vehicle dynamics. In *Proceedings of the 2015 IEEE conference on control applications* (pp. 1945-1950). Sydney, Australia: IEEE, http://dx.doi.org/10.1109/CCA.2015.7320894.

Wragge-Morley, R., Herrmann, G., Barber, P., & Burgess, S. (2015). Gradient and mass estimation from CAN based data for a light passenger car. *SAE International Journal of Passenger Cars - Electronic and Electrical Systems*, 8(1), 137-145. http://dx.doi.org/10.4271/2015-01-0201.

Yeong, D. J., Velasco-Hernandez, G., Barry, J., & Walsh, J. (2021). Sensor and sensor fusion technology in autonomous vehicles: a review. *Sensors*, 21(6), 2140. http://dx.doi.org/10.3390/s21062140.

Yu, Z., Hou, X., Leng, B., & Huang, Y. (2022). Mass estimation method for intelligent vehicles based on fusion of machine learning and vehicle dynamic model. *Autonomous Intelligent Systems*, 2(1), 4. http://dx.doi.org/10.1007/s43684-022-00020-8.

Zhang, X., Xu, L., Li, J., & Ouyang, M. (2013). Real-time estimation of vehicle mass and road grade based on multi-sensor data fusion. In *2013 IEEE vehicle power and propulsion conference* (pp. 1-7). Beijing, China: http://dx.doi.org/10.1109/VPPC.2013.6671743.

Zhang, H., Yang, Z., Xiong, H., Zhu, T., Long, Z., & Wu, W. (2023). Transformer aided adaptive extended Kalman filter for autonomous vehicle mass estimation. *Processes*, 11(3), http://dx.doi.org/10.3390/pr11030887.

Zheng, Y., & Lin, Z. (2003). Recursive adaptive algorithms for fast and rapidly time-varying systems. *IEEE Transactions on Circuits and Systems II Analog and Digital Signal Processing*, 50(9), 602-614. http://dx.doi.org/10.1109/TCSII.2003.816906.

Zhou, S., Walker, P., & Zhang, N. (2020). Parametric design and regenerative braking control of a parallel hydraulic hybrid vehicle. *Mechanism and Machine Theory*, 146, Article 103714. http://dx.doi.org/10.1016/j.mechmachtheory.2019.103714.

Zima, E. V. (1997). Fast parallel computation of the polynomial shift. In *Proceedings 11th international parallel processing symposium* (pp. 402-406). IEEE, http://dx.doi.org/10.1109/IPPS.1997.580933.