Professional Documents
Culture Documents
Lab2 Group1 Report
Lab2 Group1 Report
Lab2 Group1 Report
estimation
May 2024
Contents
1 Task 1: Washout filtering approach of side-slip estimation. . . . . . . . . . . . 1
1.1 Task 1.a: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Task 1.b: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Task 1.c: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Task 1.d: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Task 1.e: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.6 Extra task 1.f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2 Task 2: Unscented K ALMAN filter estimation. . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 Task 2.a: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Task 2.b: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3 Task 2.c: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.4 Task 2.d: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
ii
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
vy mod,COG
• Bicycle model: βy mod = vx , where:
δ being the tyre to road steering angle. This model gives the results at the
Center of Gravity so no transfer was done here.
vy kin,COG
• Integration of lateral acceleration: βy kin = arctan vx , where:
1
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
• Wash-out filter: this filter takes out the best results of each of the two previous
methods, the lateral speed is expressed by vy wo,COG = LP vy mod + HP vy kin
where LP is a low pass filter and HP is a high pass one. The body side slip is
written as: wo,COG
wo vy
βy = arctan
vx
Bicycle model: For this estimator, five parameters can be identified for possible
fine-tuning. These are the lengths from COG to axles, the mass, the longitudinal
velocity and the tyre cornering stiffness.
First, since the lengths from COG to axles and the mass are facts, there is no way to
change them
For the longitudinal speed, since the tests are conducted with different ranges of
speeds (for instance slow speeds for cornering and almost three times faster ones for
the frequency sweep), it was difficult to choose a fixed value for them all. Looking
at the measured longitudinal speed however, the variations for each test are not so
2
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
significant, hence the assumption that speed can be considered constant. As a result,
the longitudinal speed measurements (from VBOX) are used for the model-based
estimator.
The tyre cornering stiffness for the front and rear axles (C12 and C34 ) provided by
the handout are obviously not the correct ones. Consequently, these need also to be
tuned. Since this model is valid for the steady state, the aim is to tune them to get
closer results to the measurements for what could be considered steady state tests.
While the slalom test, and the beginning of both the cornering and frequency sweep
tests can be seen as steady-state situations, the high speed step steer procedure is def-
initely not in steady-state. After trying different values for both constants, the values
in Table 1 are chosen. The figures 4, 5 and 6 show that, after the initial noisy oscilla-
tions, the results from the bicycle model match the experimental results as expected,
i.e. the slalom test, and the beginning of both the cornering and frequency sweep
tests. When tuning the parameters, it was noticed that increasing them significantly
causes the model results to deviate more from the experimental ones although they
still follow the general tendencies.
Figure 4: Body side-slip against time for the cornering test - Model-based.
Figure 5: Body side-slip against time for the slalom test - Model-based.
3
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 6: Body side-slip against time for the frequency sweep test - Model-based.
Integration of lateral acceleration: For this method, and to avoid size problems
later in the code and when plotting figures, the integration was done over the length
of the Time vector made available by the VBOX measurements. This estimator
needs to provide decent results for the transient tests, i.e. especially the high speed
step steer test. The results for the high speed step steer test are shown in the figure
7. As predicted, there is a drift in the results, but the behaviour is similar.
Figure 7: Body side-slip against time for high speed step steer test - Integration of
lateral acceleration based.
One of the reason why there is a drift is the IMU misalignment. One potential ad-
justment involves subtracting the average acceleration value determined outside the
maneuver from the total signal initially. Then, you reset the measured acceleration
to zero both before and after the maneuver itself. The beginning of the maneuver
is detected when the steer angle overcomes a specified threshold (0.03 rad). The
outcome of this additional feature is depicted in the Figure 8.
One parameter is identified for possible fine-tuning which is the vehicle roll gra-
dient. While the provided value already makes sense since it is not hard to mea-
sure the vehicle roll gradient, it goes through a fine-tuning process which yields
Kroll = 1.8deg/g. But the outcome, which is shown in the Figure 9, might not reflect
the physical reality since it might only compensate the inherent shift of the IMU
measurements. As a result, the initial vehicle roll gradient value will be kept.
The solution to obtain more accurate results and to get rid of this shift without mod-
ifying the vehicle roll gradient would be to perform sensors and physical model
fusion, using a K ALMAN filter. This is studied in Task 2 2.
4
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 8: Body side-slip against time for high speed step steer test with IMU mis-
alignment correction - Integration of lateral acceleration based.
Figure 9: Body side-slip for high-speed steer test with IMU misalignment and Kroll
corrections - Integration of lateral acceleration based.
Figure 10: Body side-slip against time for the cornering test - Wash-out.
5
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 11: Body side-slip against time for the slalom test - Wash-out.
Figure 12: Body side-slip against time for the high-speed steer test - Wash-out.
Figure 13: Body side-slip against time for the frequency sweep test - Wash-out.
T is tuned by trial-and-error to give the best compromise of results for the dif-
ferent test maneuvers. Values ranging from 0.1 to 100 are tested in the four test
scenarios. Bigger values around 5 give the best results for the high speed step test,
however, smaller values around 1 give better values for the three other scenarios.
Again, it can be identified that the high speed step steer test should predominantly
utilize the transient estimator, while the other tests should lean more towards the
steady-state estimator. Eventually, the chosen value T = 3 provides reasonably good
behaviors. The results for this value are shown in Figures 10 - 13. However, dis-
crepancies are evident, particularly in the high-speed step steer and frequency sweep
6
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
tests. This is mostly because the model-based estimation diverges significantly from
the true value in the high-speed step steer test, while the integration of lateral accel-
eration based estimation deviates notably from the true value in the frequency sweep
test. Still, these results are the fruit of an inherently imperfect compromise.
Cornering Slalom
Model-based MSE 8.22 × 10−4 4.51 × 10−6
Max Error 1.08 × 10−1 5.51 × 10−3
MSE 7.41 × 10−3 2.48 × 10−4
LatAccInt based
Max Error 2.66 × 10−1 3.38 × 10−2
MSE 5.08 × 10−4 3.44 × 10−5
Wash-out
Max Error 5.90 × 10−2 1.25 × 10−2
Since the Washout filter is supposed to represent the best out of the results of
each other estimator, it is the most relevant to look at. The errors are observed to be
reasonable, the max error is thought to be reducible with a more optimization of the
value of the filter coefficient T. It is however difficult, as explained in Task 1.c (1.3),
to find a value that works for all scenarios, and looking at the table, it would probably
be interesting to have an additional logical reset for the integration part. This would
make the integration of lateral acceleration based estimator more accurate and enable
an increase of the wash-out filter coefficient T.
7
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
It was noted that for all the tests the integration method was the most exposed to
drift. This is predictable since it relies on measurements from the sensors which can
be inaccurate. This inaccuracy could be due for instance to the effects of road in-
clination, banking, or of the sensors. However, the side-slip curve from this method
still follows the general shape of the real measured values.
8
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
speed steer had similar maximum frequency peak wvalues although they represent a
steady-state and a transient manoeuver respectively.
It is certain that with a little more time the issues would have been solved, but
we unfortunately could not finish.
9
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Step 3: Initialization
The initial state X = (vx , vy , ψ̇z )T is straightforwardly initialized using sensor mea-
surements. However, the state estimation covariance, P, is assigned a zero value due
to the absence of any indication regarding suitable values for it.
1
ay = · (F34 + F12 · cos(δ ));
m
The estimated measurements of vx and vy are just equal to the corresponding
car’s states.
[X, P, K, MU, S] = uk f update1(xPre, PPre,Y (:, i), meas f unc UKF, R, predictParam)
10
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
where X is the true car’s states, P the state estimation covariance, MU the estimated
car’s states, all being outputs of the UKF algorithm, and Y the measurements at time
step i (from VBOX).
Figure 14: Body side-slip against time for the cornering test - UKF.
Figure 15: Body side-slip against time for the slalom test - UKF.
11
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 16: Body side-slip against time for the high-speed steer test - UKF.
Figure 17: Body side-slip against time for the frequency sweep test - UKF.
The UKF true states don’t match accurately the VBOX measurements for the
high speed step steer and frequency sweep tests. These are decent for the two other
tests. As a result, the UKF adjustable parameters would need a fine-tuning process.
std(vx,meas )2
0 0 47.4 0 0
R= 0 std(ay,meas )2 0 = 0 12.3 0
2 0 0 0.0243
0 0 std(ψ̇z,meas )
12
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
The enhancement is depicted in the Figure 18. The noise is much lower since the
measurements covariance noises increased, meaning that less credibility was given
to the measurements.
Figure 18: Body side-slip against time for the high speed steer test - UKF, adjusted
measurement covariance noises.
Then, the fine-tuning of the other coefficients relies on a trial-and-error method. The
effect of each coefficient will be assessed one by one to try to reach a combination
that provides an optimal configuration for the UKF.
Regarding the process covariance noises, it seems that the lateral velocity one has
the more significant contribution. By reducing its values, a smoother behavior is
reached, meaning that more weight is given to the physical model. While the be-
havior looks better, it still does not match the measured body side-slip. The other
process noises don’t affect much the shape of the signal except for excessive values
( 100), providing totally different behavior compared to measured body side-slip.
Again, since the three measurements are assumed to be independent, non-diagonal
coefficients are equal to zero. As a result, the following process noise covariance
matrix Q is chosen:
noise(vx,state ) 0 0 0.1 0 0
Q= 0 noise(vy,state ) 0 = 0 0.0075 0
0 0 noise(ψ̇z,state ) 0 0 0.1
The result is shown in the Figure 19. Several (α, β , κ) combinations are tested with
different orders of magnitude. However, it seems to barely change the outcome of
the UKF. Thus, the initial combination is kept.
Initially, it can be imagined that the UKF outcome behavior could be modified in
order to match the corresponding measurement. However, the fine-tuning of the
UKF seems to solely allow to correct the smoothness and the quality of the outcome.
As a result, the UKF appears not to be the most optimal solution for all the tests.
For example, the wash-out filter outperforms the UKF for the high speed steer and
frequency sweep tests.
13
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 19: Body side-slip against time for the high speed steer test - UKF, adjusted
measurement and process covariance noises.
Figure 20: Body side-slip against time for the high speed steer test - UKF, extended
vehicle dynamics model.
14
SD2231 – LAB 2: Lateral Dynamics – State estimation May 2024
Figure 21: Body side-slip against time for the high speed steer test - UKF, extended
vehicle dynamics model.
Figure 22: Body side-slip against time for the high speed steer test - UKF, extended
vehicle dynamics model.
Figure 23: Body side-slip against time for the high speed steer test - UKF, extended
vehicle dynamics model.
The outcomes of the UKF are slightly improved for the two tests for which it
was already working before. Regarding the others, there are bare changes. Since the
extend of the model is very light, it might explain why there are so few modifications.
15