Accurately estimating vehicle mass and road slope is fundamental for optimizing the longitudinal dynamics, energy management, and active safety of modern battery electric vehicles (BEVs). Given the distinct characteristics of vehicle mass as a time-invariant parameter and road slope as a time-varying parameter, their coupled estimation presents a significant challenge. Traditional unified estimation algorithms often suffer from compromised accuracy and slower convergence due to this coupling effect. This paper addresses this challenge by proposing a novel two-stage estimation strategy. In the first stage, the vehicle mass is estimated using an Adaptive Forgetting Factor Recursive Least Squares (AFFRLS) algorithm, which is designed to handle the parameter’s stability requirements under complex driving conditions. Subsequently, the estimated mass is treated as a known input to the second stage, where a Square-Root Cubature Kalman Filter based on Singular Value Decomposition (SRCKF-SVD) is employed for precise, real-time estimation of the road slope. This decoupled approach effectively mitigates the mutual interference between the two parameter estimations. Comprehensive validation is performed via co-simulation in CarSim/Simulink and Hardware-in-the-Loop (HIL) experiments on a dedicated new energy vehicle test bench. The results demonstrate that the proposed AFFRLS-SRCKF two-stage algorithm achieves superior estimation accuracy and robustness compared to benchmark methods while satisfying real-time computational constraints, making it highly suitable for advanced control applications in battery electric vehicles.

The transition towards vehicle electrification has intensified research focus on optimizing the dynamic performance of battery electric vehicles. Core to this optimization is the precise knowledge of critical vehicle states and parameters, among which vehicle mass and road slope are paramount. The mass of a battery electric vehicle directly influences its acceleration, braking, and energy consumption characteristics. Meanwhile, the road slope is a key disturbance affecting longitudinal force balance. Accurate real-time estimation of these parameters enables advanced control systems to preemptively adjust torque distribution, refine regenerative braking strategies, optimize battery energy allocation for extended range, and enhance overall driving safety and comfort. Therefore, developing reliable and accurate estimation algorithms for both vehicle mass and road slope is of great practical importance for the development of intelligent battery electric vehicles.
1. Longitudinal Vehicle Dynamics Model
The estimation framework is built upon a longitudinal vehicle dynamics model. Assuming no wheel slip, the forces acting on a battery electric vehicle during longitudinal motion include the driving force, aerodynamic drag, rolling resistance, and grade resistance. Applying Newton’s second law yields:
$$ m\dot{v} = F_t – F_w – F_f – F_i $$
where \( m \) is the vehicle mass, \( \dot{v} \) is the longitudinal acceleration, \( F_t \) is the driving force, \( F_w \) is the aerodynamic drag, \( F_f \) is the rolling resistance, and \( F_i \) is the grade resistance.
The driving force for an in-wheel motor driven battery electric vehicle is given by:
$$ F_t = \frac{T_{tm} \eta_T}{R} $$
where \( T_{tm} \) is the motor output torque, \( \eta_T \) is the driveline efficiency, and \( R \) is the effective wheel radius.
The aerodynamic drag force is:
$$ F_w = \frac{1}{2} \rho C_D A v^2 $$
where \( C_D \) is the aerodynamic drag coefficient, \( A \) is the frontal area, \( \rho \) is the air density, and \( v \) is the vehicle speed.
The rolling resistance and grade resistance are expressed as:
$$ F_f = mgf \cos\theta $$
$$ F_i = mg \sin\theta $$
where \( g \) is the gravitational acceleration, \( f \) is the rolling resistance coefficient, and \( \theta \) is the road slope angle.
Substituting these forces into the main equation gives the complete longitudinal dynamics model for the battery electric vehicle:
$$ m\dot{v} = \frac{T_{tm} \eta_T}{R} – \frac{1}{2} \rho C_D A v^2 – mgf \cos\theta – mg \sin\theta $$
2. Design of the Two-Stage Estimator
The core idea is to decouple the estimation of the time-invariant mass and the time-varying slope into two sequential stages to avoid the detrimental coupling effects present in joint estimation schemes.
2.1 Overall Estimator Architecture
In the first stage, vehicle mass and an initial slope value are estimated using an Adaptive Forgetting Factor Recursive Least Squares (AFFRLS) algorithm based on the longitudinal dynamics model. This algorithm is chosen for its ability to provide stable parameter convergence for quasi-static parameters like mass, even in the presence of varying slope, by adaptively tuning its forgetting factor. In the second stage, the estimated mass from the first stage is treated as a known, accurate parameter. It is fed into a state estimator designed for the road slope. For this purpose, a Square-Root Cubature Kalman Filter utilizing Singular Value Decomposition (SRCKF-SVD) is employed. The SRCKF provides superior accuracy for nonlinear state estimation without the linearization errors of the Extended Kalman Filter (EKF), and the square-root formulation with SVD ensures numerical stability. The architectural flow of this two-stage strategy is summarized in the following process.
2.2 Stage 1: Vehicle Mass Estimation via AFFRLS
The longitudinal dynamics equation is reformulated into a linear-in-parameters model suitable for RLS. Using the auxiliary angle relationship \( \phi = \tan^{-1}f \), the equation is rewritten as:
$$ \dot{v} = \frac{T_{tm} \eta_T}{mR} – \frac{\rho C_D A}{2m} v^2 – g\sqrt{1+f^2} \sin(\theta + \phi) $$
This can be expressed in the standard linear form \( y = \boldsymbol{\gamma}^T \boldsymbol{\beta} \), where:
$$
y = \dot{v}, \quad \boldsymbol{\gamma} = \begin{bmatrix} \frac{T_{tm} \eta_T}{R} – \frac{\rho C_D A}{2} v^2 \\ -g\sqrt{1+f^2} \end{bmatrix}, \quad \boldsymbol{\beta} = \begin{bmatrix} \frac{1}{m} \\ \sin(\theta + \phi) \end{bmatrix}
$$
The recursive estimation proceeds as follows. The prediction error is \( e(k) = y(k) – \boldsymbol{\gamma}^T(k) \hat{\boldsymbol{\beta}}(k-1) \). To handle the different time-varying natures of the parameters (mass-related is slow, slope-related is fast), a dual forgetting factor mechanism is introduced into the loss function:
$$ J(k) = \sum_{i=1}^{k} (\lambda_m \lambda_\theta)^{k-i} e^2(i) $$
where \( \lambda_m \) is the forgetting factor for the mass-related parameter (set to a high constant value like 0.9995 for stability), and \( \lambda_\theta \) is the adaptive forgetting factor for the slope-related parameter. The standard RLS update equations are modified accordingly. The gain vector \( \mathbf{L}(k) = [L_m(k), L_\theta(k)]^T \) and the covariance matrix \( \mathbf{P}(k) \) are updated as:
$$
\mathbf{L}(k) = \frac{\mathbf{P}(k-1) \boldsymbol{\gamma}(k)}{\lambda_m \lambda_\theta + \boldsymbol{\gamma}^T(k) \mathbf{P}(k-1) \boldsymbol{\gamma}(k)}
$$
$$
\hat{\boldsymbol{\beta}}(k) = \hat{\boldsymbol{\beta}}(k-1) + \mathbf{L}(k) e(k)
$$
$$
\mathbf{P}(k) = \frac{1}{\lambda_m \lambda_\theta} [\mathbf{I} – \mathbf{L}(k) \boldsymbol{\gamma}^T(k)] \mathbf{P}(k-1)
$$
The key innovation is the adaptation of \( \lambda_\theta \) based on the measurement error to balance historical data usage and responsiveness to slope changes:
$$ \lambda_\theta(k) = \lambda_{\theta,\max} – (\lambda_{\theta,\max} – \lambda_{\theta,\min}) \frac{|e(k)|}{\delta + |e(k)|} $$
where \( \lambda_{\theta,\max} \) and \( \lambda_{\theta,\min} \) are preset bounds (e.g., 0.99 and 0.9), and \( \delta \) is a sensitivity coefficient. A large error \( e(k) \) (indicating a possible slope change) reduces \( \lambda_\theta \), causing the algorithm to “forget” old slope data faster and focus on recent information, thereby preventing the transient slope error from corrupting the mass estimate \( \hat{\beta}_1(k) = 1/\hat{m}(k) \).
2.3 Stage 2: Road Slope Estimation via SRCKF-SVD
With the mass \( \hat{m} \) now available from Stage 1, the road slope is estimated using a nonlinear state estimator. The system state vector is defined as \( \mathbf{x} = [v, \theta]^T \). The discrete-time state-space model, derived from the longitudinal dynamics using the forward Euler method with sampling time \( T_s \), is:
State Equation:
$$
\begin{aligned}
v_k &= v_{k-1} + T_s \left( \frac{T_{tm}(k-1) \eta_T}{\hat{m} R} – \frac{\rho C_D A}{2\hat{m}} v_{k-1}^2 – gf \cos\theta_{k-1} – g \sin\theta_{k-1} \right) \\
\theta_k &= \theta_{k-1} + \omega_{\theta, k}
\end{aligned}
$$
where \( \omega_{\theta, k} \) is a small process noise term accounting for slow slope variation.
Measurement Equation:
$$
\mathbf{z}_k = \begin{bmatrix} v_k \\ a_k \end{bmatrix} + \mathbf{v}_k = \begin{bmatrix} v_k \\ \frac{T_{tm}(k) \eta_T}{\hat{m} R} – \frac{\rho C_D A}{2\hat{m}} v_k^2 – gf \cos\theta_k – g \sin\theta_k \end{bmatrix} + \mathbf{v}_k
$$
where \( a_k \) is the measured longitudinal acceleration and \( \mathbf{v}_k \) is the measurement noise.
The SRCKF-SVD algorithm is applied to this nonlinear system. Let \( \mathbf{S}_{k-1|k-1} \) be the square-root factor of the state covariance \( \mathbf{P}_{k-1|k-1} \), obtained via SVD (\( \mathbf{P}_{k-1|k-1} = \mathbf{U}_{k-1} \mathbf{\Sigma}_{k-1} \mathbf{V}_{k-1}^T \), then \( \mathbf{S}_{k-1|k-1} = \mathbf{U}_{k-1} \sqrt{\mathbf{\Sigma}_{k-1}} \)). The steps are:
1. Time Update (Prediction):
- Generate Cubature Points: \( \boldsymbol{\mathcal{X}}_{i, k-1} = \hat{\mathbf{x}}_{k-1|k-1} + \mathbf{S}_{k-1|k-1} \boldsymbol{\xi}_i \), where \( \boldsymbol{\xi}_i \) are the cubature points (\( i = 1, \ldots, 2n \)).
- Propagate Points: \( \boldsymbol{\mathcal{X}}^*_{i, k|k-1} = f(\boldsymbol{\mathcal{X}}_{i, k-1}, \mathbf{u}_{k-1}) \).
- Predict State and Square-Root Covariance:
$$ \hat{\mathbf{x}}_{k|k-1} = \frac{1}{2n} \sum_{i=1}^{2n} \boldsymbol{\mathcal{X}}^*_{i, k|k-1} $$
$$ \mathbf{S}_{k|k-1} = \text{Tria}([\boldsymbol{\chi}^*_{k|k-1}, \mathbf{S}_{Q, k-1}]) $$
where \( \boldsymbol{\chi}^*_{k|k-1} \) is the matrix of centered propagated points, \( \mathbf{S}_{Q} \) is the square-root of process noise covariance \( \mathbf{Q} \), and \( \text{Tria}(\cdot) \) performs a triangularization (e.g., QR decomposition).
2. Measurement Update (Correction):
- Generate New Points: \( \boldsymbol{\mathcal{X}}_{i, k|k-1} = \hat{\mathbf{x}}_{k|k-1} + \mathbf{S}_{k|k-1} \boldsymbol{\xi}_i \).
- Propagate through Measurement Eq: \( \mathbf{Z}_{i, k|k-1} = h(\boldsymbol{\mathcal{X}}_{i, k|k-1}, \mathbf{u}_k) \).
- Predicted Measurement: \( \hat{\mathbf{z}}_{k|k-1} = \frac{1}{2n} \sum_{i=1}^{2n} \mathbf{Z}_{i, k|k-1} \).
- Estimate Covariances and Gain:
$$ \mathbf{S}_{zz,k|k-1} = \text{Tria}([\boldsymbol{\mathcal{Z}}_{k|k-1}, \mathbf{S}_{R, k}]) $$
$$ \mathbf{P}_{xz, k|k-1} = \boldsymbol{\chi}_{k|k-1} \boldsymbol{\mathcal{Z}}_{k|k-1}^T $$
$$ \mathbf{K}_k = (\mathbf{P}_{xz, k|k-1} / \mathbf{S}_{zz,k|k-1}^T) / \mathbf{S}_{zz,k|k-1} $$
where \( \boldsymbol{\mathcal{Z}}_{k|k-1} \) is the matrix of centered measurement predictions and \( \mathbf{S}_{R} \) is the square-root of measurement noise covariance \( \mathbf{R} \). - Update State and Square-Root Covariance:
$$ \hat{\mathbf{x}}_{k|k} = \hat{\mathbf{x}}_{k|k-1} + \mathbf{K}_k (\mathbf{z}_k – \hat{\mathbf{z}}_{k|k-1}) $$
$$ \mathbf{S}_{k|k} = \text{Tria}([\boldsymbol{\chi}_{k|k-1} – \mathbf{K}_k \boldsymbol{\mathcal{Z}}_{k|k-1}, \mathbf{K}_k \mathbf{S}_{R, k}]) $$
The use of SVD for the square-root initialization and the cubature rule for numerical integration makes this estimator particularly robust and accurate for the nonlinear slope estimation problem in a battery electric vehicle.
3. Simulation and Experimental Validation
The performance of the proposed AFFRLS-SRCKF two-stage algorithm is rigorously evaluated through co-simulation and Hardware-in-the-Loop (HIL) testing.
3.1 Experimental Setup
A high-fidelity model of a B-segment battery electric vehicle is built in CarSim. The vehicle parameters are listed in the table below. The estimation algorithms are implemented in MATLAB/Simulink. Real-time HIL validation is conducted on a new energy vehicle chassis HIL test bench equipped with an NI real-time system, which executes the compiled vehicle model and estimator, ensuring validation under realistic hardware and timing constraints.
| Parameter | Symbol | Value |
|---|---|---|
| Vehicle Mass (Curb/Laden) | \( m \) | 1260 kg / 1740 kg |
| Wheel Radius | \( R \) | 0.287 m |
| Driveline Efficiency | \( \eta_T \) | 0.99 |
| Frontal Area | \( A \) | 1.6 m² |
| Aerodynamic Drag Coeff. | \( C_D \) | 0.3 |
| Rolling Resistance Coeff. | \( f \) | 0.015 |
Two driving scenarios are designed to test robustness: a Micro-Slope route with gentle gradients (≤1°) and a Comprehensive Mountainous route with aggressive slope changes (up to ±20°).
3.2 Real-Time Performance Analysis
The computational efficiency is critical for deployment in a battery electric vehicle’s electronic control unit. Profiling results are shown below.
| Algorithm | Iterations | Total Time (ms) | Avg. Time per Iteration (ms) | % of 10ms Control Cycle |
|---|---|---|---|---|
| AFFRLS (Stage 1) | 1000 | 102.75 | 0.103 | 1.03% |
| SRCKF (Stage 2) | 1000 | 156.54 | 0.157 | 1.57% |
The combined execution time for one cycle of the two-stage algorithm is approximately 0.26 ms, which is only 2.6% of a typical 10 ms control cycle. This leaves ample computational margin, confirming the algorithm’s suitability for real-time implementation in battery electric vehicle control systems.
3.3 Vehicle Mass Estimation Results
The proposed AFFRLS algorithm is compared against a standard Fixed-Forgetting-Factor RLS (FFRLS) under both driving scenarios for curb mass (1260 kg) and laden mass (1740 kg). The key results are summarized in the table below, and the trends are clear.
| Scenario & Mass | Algorithm | Max Error (kg) | RMSE (kg) | MAE (kg) |
|---|---|---|---|---|
| Micro-Slope (1260 kg) | FFRLS | 6.8 | 2.64 | 1.98 |
| AFFRLS | ~2.0 | 0.43 | 0.30 | |
| Mountain-Curb (1260 kg) | FFRLS | 22.6 | 10.70 | 8.22 |
| AFFRLS | 2.3 | 1.79 | 1.21 | |
| Mountain-Laden (1740 kg) | FFRLS | 38.0 | 15.12 | 11.85 |
| AFFRLS | 3.1 | 2.01 | 1.45 |
On the gentle micro-slope route, both algorithms perform well, with errors below 1% relative to the true mass. However, under the demanding mountainous route with large, rapid slope changes, the FFRLS performance degrades significantly. Its fixed forgetting factor cannot properly discount the large errors induced by transient slope mismatches, leading to error accumulation and bias in the mass estimate. In contrast, the AFFRLS algorithm’s adaptive forgetting factor effectively treats these large errors as indicators of “model mismatch” due to slope change and reduces their influence on the mass update. Consequently, the AFFRLS maintains stable and accurate mass estimation (RMSE < 2.1 kg) even in challenging conditions, demonstrating excellent robustness for the battery electric vehicle application.
3.4 Road Slope Estimation Results
With the mass accurately estimated by AFFRLS, the second-stage slope estimation is performed. The proposed SRCKF-SVD is compared against two common nonlinear filters: the Extended Kalman Filter (EKF) and an Adaptive EKF (AEKF). The estimation accuracy metrics are presented below.
| Scenario | Algorithm | Max Error (°) | RMSE (°) | MAE (°) |
|---|---|---|---|---|
| Micro-Slope | AFFRLS-AEKF | 1.1 | 0.25 | 0.22 |
| AFFRLS-EKF | 2.0 | 0.47 | 0.46 | |
| AFFRLS-SRCKF | 0.3 | 0.07 | 0.05 | |
| Mountainous | AFFRLS-AEKF | 4.8 | 0.94 | 0.75 |
| AFFRLS-EKF | 6.5 | 1.60 | 1.23 | |
| AFFRLS-SRCKF | 3.40 | 0.44 | 0.26 |
The results clearly show the superiority of the SRCKF-SVD approach. The EKF-based methods suffer from linearization errors inherent in their first-order Taylor approximation, which become pronounced during aggressive slope transitions. While the AEKF offers some improvement over the standard EKF, it still relies on a linearized model. The SRCKF, by using a third-degree spherical-radial cubature rule, more accurately captures the mean and covariance of the nonlinear system without linearization. This leads to significantly lower steady-state error and, more importantly, much better tracking performance during dynamic changes. In the complex mountainous scenario, the AFFRLS-SRCKF combination achieves an average slope estimation error of only 0.26°, highlighting its precision and robustness for real-world battery electric vehicle driving conditions.
4. Conclusion
This paper presented a novel two-stage estimation strategy for the coupled problem of vehicle mass and road slope estimation in battery electric vehicles. By strategically separating the estimation of the time-invariant mass and the time-varying slope, the proposed method effectively mitigates the negative coupling effects that plague joint estimation schemes. In the first stage, an AFFRLS algorithm with a dual adaptive forgetting factor mechanism provides robust and accurate mass estimation, even when the vehicle is subjected to large and rapid road grade variations. The second stage employs an SRCKF-SVD algorithm, which leverages the accurately estimated mass as a known parameter to deliver highly precise and stable road slope estimates, free from the linearization errors of EKF-based methods.
Validation through CarSim/Simulink co-simulation and HIL experiments on a dedicated test bench confirmed the algorithm’s effectiveness. The AFFRLS-SRCKF combination demonstrated superior performance compared to benchmark algorithms like FFRLS, EKF, and AEKF, achieving a vehicle mass estimation error of less than 1% and a road slope estimation with an average error of 0.26° in challenging mountainous terrain. Furthermore, the algorithm’s computational load was verified to be well within the limits of real-time execution for a typical battery electric vehicle control system.
The accurate real-time knowledge of both vehicle mass and road slope provided by this algorithm unlocks significant potential for enhancing battery electric vehicle performance. It enables optimal torque vectoring for efficiency and stability, predictive energy management for maximizing range, and adaptive cruise control or braking systems for improved safety. The successful decoupling strategy presented here also offers a valuable framework for addressing other coupled parameter estimation problems in complex vehicle dynamics systems.
