You are on page 1of 49

Implementation and Evaluation of a Mass Estimation Algorithm

ANDREAS ERIKSSON

Masters Degree Project Stockholm, Sweden May 2009

XR-EE-RT 2009:004

Abstract An algorithm for estimation of the vehicle mass with standard mounted sensors in a heavy duty Scania vehicle is presented. The sensor information is used in combination with an adaptive Kalman lter to achieve this. An algorithm to compensate for the road slope is implemented in the lter. The lter handles the most types of Scania vehicles with and is able to present the estimated mass within 10 % of the actual mass. The algorithm is implemented and successfully validated in heavy truck functional tests at Scanias test facility.

Acknowledgements
I would like to thank the following people at Scania, Sdertlje. My supervisors Roger Reuter and Fredrik Schnell, for the support and help. I would also like to thank all the other people that made this work possible: Per Back for the help with the programming, Tom Nystrm for the extraordinary help with the simulation environment, Martin Larsson and Anders Bjrkman for the assistance with the driving and nally Veronika Karlsson for help with the administrative tasks.

Contents
1 Introduction 1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Experimental Environment 2.1 OptiCruise . . . . . . . . . 2.2 Test Vehicles . . . . . . . 2.3 Used signals . . . . . . . . 2.4 Development Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 7 8

9 . 9 . 9 . 11 . 14 . . . . 16 16 17 18 19

3 Basic Theory 3.1 State-space Description and Discretisation 3.2 Low Pass Filter . . . . . . . . . . . . . . . 3.3 Adaptive Kalman Filter . . . . . . . . . . 3.4 Correlation Coecient . . . . . . . . . . .

4 Modelling the Problem 20 4.1 Drive Line Model . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 External Forces . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5 Pre 5.1 5.2 5.3 Calculations Estimating the Wheel Radius . . . . . . . . . . . . . . . . . . Filtering the Gear Ratio . . . . . . . . . . . . . . . . . . . . . Calculating the Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 26 27 29 30 30 32 34 36 38

6 Mass Estimation 6.1 Thresholds for the Filter . . . . . . . . . . . 6.2 The Filter . . . . . . . . . . . . . . . . . . . 6.3 Road Slope Compensation . . . . . . . . . . 6.4 Correlation Between Force and Acceleration 6.5 Simulations . . . . . . . . . . . . . . . . . .

7 Results 40 7.1 Validity of Simulations . . . . . . . . . . . . . . . . . . . . . . 42 8 Conclusions 43 8.1 Further Improvements . . . . . . . . . . . . . . . . . . . . . . 43 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5

Chapter 1 Introduction
1.1 Background

A correct mass estimation is critical in todays heavy vehicle for its use in automated gear shift ECUs, cruise control and energy optimizing with respect to applied torque for the engine. The goal for this thesis is to be able to estimate the mass of the vehicle in Scanias Interactor unit. In the long run this estimation is then going to be sent over a GPRS link to Scanias "Fleet Management" Portal. This is done to render the possibility for truck carrier companys to energy optimize their transport routes with respect to maximizing their ton per mileage for each truck. With the environmental issues of today and with limited oil resources this is getting more and more important. Today several mass estimations are performed, but the accuracy is not good enough for "Fleet Managements" purpose.

1.2

Objective

The goal of this thesis is to develop a lter to estimate the mass of Scanias vehicles by using only the standard mounted sensors of the vehicle. This estimation is going to be used by Scanias "Fleet Management" Portal to evaluate the driving statistic.

1.3

Outline

In the rst part of this report the environment for the thesis work is described, which trucks used and which type of software used to record drivings and simulate. The next part describes the theory used. Section four describes the modelling of the driveline and the driving resistance. Section ve describes all the necessary pre calculations needed for the mass estimation, the gear ratio ltering, estimation of the driving wheel radius and the calculation of the acceleration. The following parts cover the mass lter with simulation results and the conclusions drawn from it.

Chapter 2 Experimental Environment


This section explains the components used in the development, implementation and verication of this thesis.

2.1

OptiCruise

The OptiCruise is an automated gear shift system for manual gear boxes making them semi-automatic. OptiCruise uses a pneumatic system which replaces the manual stick-shift. It utilises ve dierent phases during the shift. It lower the torque from the engine, disengage the gear-box, matches the speed of the engine with the gear-box, re-engages the gear box at another gear and nally raises the torque once again. [1]

2.2

Test Vehicles

The test vehicles used for recording CAN-bus information and evaluation is listed in this section. The internal Scania test vehicle names are used in this article.

Kontakten
Kontakten is a Scania coach bus 6x2 (six wheels, two driven) equipped with a 12 litre engine (380 HP). Its equipped with a OptiCruise unit. The weight of this vehicle is constant 16100 kg since its hard to alter.

Mago
Mago is a Scania R500LB 6x2 (six wheels, two driven) truck with a rigid frame mounted. It has a 16 litre engine (500 HP) and is equipped with a ordinary manual gear box. Its approximate weight is 19500 kg and the weight is altered with a trailer weighing c:a 33500 kg.

Marja
Marja is a Scania R420LA 4x2 (four wheels, two driven) truck with a 12 litre engine (420 HP). It has a OptiCruise unit and its weight is altered with a 25000 kg semi-trailer. This truck is mainly used for its acceleration reference.

Meg
Meg is a Scania R500LA 4x2 (four wheels, two driven) is a truck equipped with a 16 litre engine (500 HP). It has OptiCruise and a EBS system. A semi-trailer weighing 32000 kg is used to alter its weight.

Mormor
Mormor is a Scania R580LA 4x2 is a truck equipped with a 16 litre engine (580 HP). It has a OptiCruise and a EBS system. A semi-trailer weighing 32000 kg and a cargo frame weighing 5500 kg is used in combination with this truck to alter its weight.

10

2.3

Used signals

The signals used for the implementation of the algorithm diers slightly depending on whether the truck is equipped with OptiCruise or manual gear box. This section explains the dierences and accuracy. All the signals are transmitted over the Controller Area Network (CAN) vehicle standard designed to allow several micro controllers and dierent devices to communicate with each other. It was designed specically for automotive applications by Robert Bosch GmbH in 1983 and is now the dominating vehicle serial bus protocol.

Vehicle Speed
The vehicle speed is measured at the propeller shaft and calculated. It is sampled at 50 Hz and considered accurate but noisy.

Front Wheel Speed


The front wheel speed is measured at both front wheels and calculated as a mean value. They sampled at 20 Hz and considered accurate enough. This signal is only available at vehicles equipped with ABS brake system.

Relative Front Speed, Left and Right


These signals is calculated as the dierence from the front left wheel speed and the vehicle speed and the same for the right. They are sampled at 20 Hz and considered accurate enough. Only available at vehicles with ABS.

Lateral Acceleration
The lateral acceleration is calculated from the wheel speed sensors. Its sampled at 50 Hz and considered satisfying accurate but noisy. This signal is only available at vehicles equipped with Vehicle Dynamic Stability which is a system to prevent unwanted vehicle drifting by active braking of separate wheels.

11

Current Gear Ratio


The gear ratio signal is present in all newer vehicles with OptiCruise. Its sampled with 10 Hz and considered accurate.

Engine RPM
The engine speed is measured at the ywheel of the engine and is sampled with 50 Hz. There are no dierences between dierent trucks and its considered accurate enough. This is only used if the current gear ratio signal is missing.

Propeller Shaft Speed


The propeller shaft speed is measured at the transmission output shaft at 50 Hz. There are no dierences between dierent trucks and its considered accurate enough.

Driveline Engaged
This signal is measured by the OptiCruise unit. Its sampled at 100 Hz and considered very accurate. Its only available at vehicles with OptiCruise

Clutch Pedal Position


This signal measures the current position of the clutch pedal. Its sampled at 20 Hz and considered accurate enough. This signal is used instead of the "Driveline Engaged" if the vehicle is equipped with a manual gear box.

Brake Pedal Switch


This signal measures the current position of the brake pedal. Its sampled at 10 Hz and considered accurate but its resolution is low.

Engine Torque
The engine torque is estimated in the Electronic Engine Controller. It is calculated by a formula where a certain amount of fuel at any given rate gives a certain torque [1]. This signal can vary with fuels and does have some minor problems with transients. Its sampled at 50 Hz and considered satisfactory accurate.

12

Exhaust Brake Torque


The exhaust brake is a valve in the exhaust system which stops the exhaust through ow thus raising the engine work. Its estimated in the Electronic Engine Controller and sampled at 10 Hz. This signal is fairly dicult to calculate and its considered to be of low accuracy.

Retarder Torque
The retarder is a hydraulic pump acting as a brake mounted at the driveline. Since its peak torque can vary 10 % [1] its considered less accurate. Its estimated in the Electronic Engine Controller and sampled at 10 Hz.

Nominal Friction Torque


The friction torque is estimated by a map based on engine speed and temperature. Its dicult to model this problem and thus making it of fairly low accuracy at least at low engine temperatures. Its sampled at 4 Hz.

Estimated Engine Parasite Torque Loss


The estimated parasite torque loss comes from external equipment such as engine cooling fan and air-conditioner pump. The signal is sampled at 4 Hz and considered of low accuracy.

Implementation frequency
Since the absolutely most signicant signal, the engine torque, is sampled at 50 Hz it was decided to make the calculations at that frequency. Regular control theory is not applicable here since the mass is static hence any analyse of cut-o frequencys or alike is useless.

13

2.4

Development Environment

Interactor
The Scania Interactor is a ad-on product for Scania and other vehicles with a variety of functions. The implementation was performed in the SMIT unit in the Interactor which has a Fujitsu FR 50 RISC CPU clocked at 50 MHz with 4 kiB of memory. The implementation of the Matlab code was done straightforward in the C programming language.

Figure 2.1: Photo of the Interactor

Matlab
The simulations was done with Matlab. The dierent signal sample frequencies was levelled to 50 Hz with the resample command [2]. A serial port debug recording unit was set up in Matlab for easy view of the output from the Interactor unit. This made it easy to spot eventually numerical dierences between the Matlab code in the computer and the C code in the Interactor.

Canalyzer
To record the CAN-bus information the software Canalyzer installed on a Laptop was used. It was also used to replay the CAN-bus messages in to the Interactor unit thus simulating the truck exactly.

14

The Scale
To verify the vehicle mass and have a reference a scale at Scanias test facility was used. It has a measurement uncertainty: 10 kg with a 95% level of condence [3]. A calibration of the scale unit was performed in April 2008 and its considered very accurate for this thesis purpose.

15

Chapter 3 Basic Theory


This section explains all the necessary theory used in this thesis.

3.1

State-space Description and Discretisation

Every physical system is best described using a continuous time model, but controllers are usually implemented in computers using discrete mathematical methods. This makes it necessary to transform the continuous state space description into a discrete state space description. A regular linear time-invariant state space description x(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t) is discretizied by the Euler approximation [4] x= x(t + h) x(t) h (3.1)

where h is the sample period, which yields x[t + 1] = Ax[t] + Bu[t] y[t] = Cx[t] (3.2) (3.3)

16

3.2

Low Pass Filter

In order to avoid aliasing the used signals are low pass ltered with a rst order discrete LP-lter x(k) = (1 a)x(k + 1) + au(k) where u is the input, x is the output and a is the lter constant. (3.4)

17

3.3

Adaptive Kalman Filter

The adaptive Kalman lter is usually used in noisy and changing environments. This suites the mass estimation well since there are many disturbing factors for the driving force. There are many dierent lters that could be used to estimate the mass from the force and acceleration like LMS1 or as used in [5], RLS2 . In [1] the adaptive Kalman lter was proposed and since it is a generalized form of both LMS and RMS it was also used in this thesis. The drawback of the adaptive Kalman lter is that it requires a lot of computing power. This is not considered a problem in this thesis since the mass calculation is only one dimensional. If a system is described by (t + 1) = (t) + w(t) y(t) = T (t)(t) + e(t) (3.5) (3.6)

where w and e is random disturbance variables, assumed to be independent of each other, Gaussian distributed, with the probability distributions according to p(w) N (0, Q) p(e) N (0, R) then the adaptive Kalman equations are given by [6] (t) = (t 1) + K(t)[y(t) T (t)(t 1)] K(t) = P (t) = P (t 1)(t) R(t) + T (t)P (t 1)(t) (3.7) (3.8) (3.9)

P (t 1)(t)T (t)P (t 1) + Q(t) R(t) + T (t)P (t 1)(t)

The lter has to be initialised with a (0) and a P (0) where P (0) is covariance of the initial guess (0). The Q and the R matrices are the covariance matrices of w and e. Since the covariance matrices describes the
1 2

Least Mean Square Recursive Least Square

18

noise level it will in fact end up with in this case that a higher Q means more trustworthy signals, hence faster adaptation and v.v.

3.4

Correlation Coecient

The correlation coecient between two random variables is a measure describing how linearly dependent they are of each other and it is nothing more than another way to write the vector dot product. It is dened by [7] X,Y = E[(X mX )(Y mY )] X Y (3.10)

where E is the expected value operator, mX and mY are the expected values of the variables and X and Y are the standard deviation of the variables. The correlation coecient can be estimated by r= n n x2 ( i xi y i xi ) 2 xi n yi
2 yi (

yi )2

(3.11)

19

Chapter 4 Modelling the Problem


To be able to estimate the mass of the vehicle Newtons second law of motion is used that states F = ma (4.1)

This then requires that a proper driving force and acceleration. This section describes how the force is calculated by the engine torque signals.

4.1

Drive Line Model

To be able to calculate the driving force from the engine torque signals a model of the drive line is developed. Several papers has proposed models for this, among others [8] or [9] which this thesis are based upon. The full model consists of moment of inertias, dampers, springs and friction in the parts shown in gure 4.1. In this thesis some simplications are made because of the driveline rattle and driveline damping these springs and dampers causes is not aecting the output torque on the driving wheels in any signicant way. The oscillations during gear shift the total sprung mass causes is neither taken care of because the mass calculation is then prohibited.

20

Figure 4.1: Figure of the driveline

Engine
The total engine output torque is given by Je e = Meng Mf r Mpar Mexh Mc (4.2)

where e is the rotational speed of the ywheel with inertia Je , Meng is the torque produced by the engine combustion, Mf r is the friction inside the engine, Mpar is the parasitic torque taken from external devices e.g. alternator, cooling fan, water pump etc., Mexh is the torque from the exhaust brake and Mc is the torque left for the clutch.

Clutch
The clutch is used to disconnect the engine from the gear box during gear shifts. In this work, the clutch is only disengaged during take of and in trucks without OptiCruise and its considered sti without losses. The eventual clutch slip is taken care of later in this paper as a condition for the mass lter. Mc = Mv e = c (4.3) (4.4)

21

Gearbox
The gearbox provides gear reduction for the vehicle at low speeds, this is necessary because of the combustion engines limited torque peak. It consists of a input shaft, output shaft and a "bottom" shaft with dierent sets of gears. This also alternates the output shafts inertia which has to be taken in respect. The equations are given by c = v iv Jv v = Mv iv Mf Mret (4.5) (4.6)

where Jt is the outgoing shaft inertia and v is the rotational speed of the outgoing shaft, iv is the actual gear ratio and Mret is the torque from the retarder brake.

Final Dierential Gear


The dierential gear is a torque converter but its main task is to let the back wheels spin with dierent speed, hence the dierential. Its modelled in the same way as the gear box, the only dierence that it have one rigid gear ratio. v = f if Jf f = Mf if Mh (4.7) (4.8)

Hub Reduction Gear


The hub reduction gear is used at "dirt" dump trucks mostly. The purpose of it is to release some stress from the drive shafts since they get lower torque acting on them. Its modelled by f = h h = w ih , Mh ih = Mw (4.9) (4.10)

whereas the ih is the gear ratio and w is the rotational speed of the wheel with torque Mw .

22

Final Driveline Model


Putting together (4.2) - (4.10) then yields the torque for the driving wheels, disregarding the slip between the tire and the road. Mw = ((Min Je w iv is ih )iv (Jv w is ih Mret ))is ih Jw w

(4.11)

where all accelerations are substituted with w , Jw is the inertia of the driving wheels and Min is Min = Meng Mf r Mexh Mpar The force from the driving wheels can then be written as Fw = where rw is the wheel radius. Mw rw (4.13) (4.12)

23

4.2

External Forces

The external Forces acting on the truck can be viewed in gure 4.2 taken from [12].

Figure 4.2: External Forces

The Rolling Resistance


The rolling resistance force occurs when the tire is deformed by the truck during driving. An approximation of the resistance is [13] Froll = m(cr1 + cr2 v) (4.14)

where m is the mass of the vehicle, cr1 and cr2 is depending on the tires used and the road surface during driving.

The Air Resistance


The air drag resistance is modelled by Fair = CA(v + vw )2 2 (4.15)

where is the density of air, C is the coecient of air resistance, A is the total front area of the vehicle, v is the vehicle speed and vw is the head wind acting at the vehicle which is unknown and approximated to zero.

24

The Road Slope Resistance


The resistance through gravity invoked by the road slope is modelled by Fslope = mg sin (4.16)

This force is both in need of the implicit mass and the unknown road slope which causes a problem later addressed in this paper.

The Lateral Force


The lateral force is given by Flat = malat where m is the mass of the vehicle and alat is the lateral acceleration. (4.17)

25

Chapter 5 Pre Calculations


This section presents the calculations that is done in order to estimate the mass. A estimation of the wheel radius through the use of an adaptive Kalman lter, the ltering of the gear ratio and the calculation of the acceleration is presented.

5.1

Estimating the Wheel Radius

In (4.13) the wheel radius rw is unknown. This causes a problem since it varies a lot between dierent vehicles with dierent payloads. A solution to this problem was proposed in [1]. By using the fact that v = rw w (5.1)

and using the propeller shaft speed and the vehicle speed signals as in signals in an adaptive lter the wheel radius is calculated. The output from the Kalman lter is shown in gure 5.1. Since the drive line rattles when the truck is starting to accelerate the speed of the lter has to be moderate, a low Q value is chosen. It can be seen that after c:a 70 seconds the lter has adapted to the correct value.

26

Figure 5.1: The output from the adaptive Kalman lter.

5.2

Filtering the Gear Ratio

If the signal current gear ratio is missing a calculation of this is needed. Simply dividing the engine speed with the propeller shaft speed yields a noisy gear ratio as can be seen in gure 5.2. By ltering this quotient the result is time delayed and can be slightly oset from the actual gear ratio. Since all the gear ratios are known a threshold lter is made with the following rule where iv (n) is the current gear ratio, iv (n 1) is the gear ratio below and iv (n + 1) is the ratio above iv (n) + iv (n + 1) iv (n 1) + iv (n) iv (n) iv (n) + 2 2 0 < iv (n) iv (highest) If the gear ratio is within these conditions the gear ratio is chosen to iv (n). The output can be seen in gure 5.3.

iv (n) .

27

Figure 5.2: Divided gear ratio.

Figure 5.3: Filtered gear ratio.

28

5.3

Calculating the Acceleration

To obtain the acceleration the vehicle speed was dierentiated by (3.1). A special care has to be taken with the acceleration since dierentiation of the vehicle speed is very sensitive to high frequency noise. In this thesis a trustworthy acceleration signal could be used as a reference during the modelling, based upon [14]. This signal calculation is during this thesis not yet implemented in Scanias hardware. With this reference and some ltering of the output from the dierentiation an accurate acceleration was achieved as can be seen in gure 5.4.

Figure 5.4: The modelled acceleration and the reference signal.

29

Chapter 6 Mass Estimation


6.1 Thresholds for the Filter

Several thresholds are used to avoid erroneous calculations in the lter. They are all describing a force loss between the driving wheels and the vehicle in dierent ways.

Drive Line Engaged


The lter must assume that the drive line are engaged. This is not the case when a gear shift is performed and the lter are then restricted from calculations.

Brake Pedal
If the brake pedal is pressed no calculations will be performed since it is very hard to model the braking force. A proper model, if it exists, would depend on to many variables as the temperature of the disc brakes, the condition of the brake discs and the calipers.

Wheel Slip
If the drive wheels slip there are a signicant force loss to the vehicle. The slip is here calculated by the dierence between the rear wheels speed and the front wheels speed. If the wheel slip is to great no calculations will be performed.

30

Clutch Slip
The clutch slip should not generally occur in a vehicle with a proper clutch. Although this can still happen at manual gear box vehicles if the driver rests his foot on the clutch pedal and the drive line engaged signal doesnt pick that up. The clutch slip is calculated as the dierence between the engine speed and the propeller shaft speed normalized with the gear ratio. If the clutch slip is to great no calculations will be performed.

Velocity
Since it is shown that the mass estimation performs badly when the velocity is low no calculations is done beneath a threshold level.

31

6.2

The Filter

Taken from (4.13) together with (4.14) - (4.17) the total driving force is given by Ftot = Fw Froll Fair Fslope Flat The road slope is unknown and disregarded in the total driving force and taken care of later. Several tempts were made to implement both the road slope and the mass as two dierent states in one mass estimator lter like [15] or [16], although it could be a little bit more accurate it didnt improve the accuracy enough to be acceptable with the higher calculating complexity. The main problem with the accuracy, even with correct road slope information provided, is the uncertainty in the estimated torque signals.

Figure 6.1: The Mass Estimation Filter. Given (3.5) and (3.6) the equations for the adaptive mass lter is described by (t + 1) = (t) + w(t) Ftot (t) = a(t)(t) + e(t) where is the mass to be estimated. If w(t) and e(t) is a sequence of independent random variables with Ew(t) = 0, Ew(t)w(t) = Q Ee(t) = 0, Ee(t)e(t) = R then the equations (3.7) - (3.9) will provide the best linear estimation of . 32

The lter is initialized by a value for the mass (0) and the variance of that initial value P (0). Since the lateral force is implicit with the mass it is updated in each sample with the last calculated mass value. This produces a need for the lter to adapt fast to the correct mass and a high Q is set in the lter. The mean value of the calculations in the lter is set as output. This gives a stable estimation which is less and less sensitive to eventual erroneous calculations the longer time it calculates. If the conditions are prohibiting calculation, K in (3.8) is set to zero which then sets (t) to the last value (t 1) in equation (3.7).

33

6.3

Road Slope Compensation

The biggest source of disturbance is the road slope. In gure 6.2 the correct driving force (solid) and the acceleration (dotted) are printed. The upper dotted is the driving force with the impact of a 8 % ascent and the lower dotted is the driving force with the impact of a 8 % descent.

Figure 6.2: Road slope inuence on the driving force. It can be seen that the calculated weight would dier between around 2000 kg to around 15000 kg by the road slope. Inspired by the article [17] which measures the acceleration before and after a gear shift to determine the road slope disturbance, a method to compensate the road slope was developed. Several attempts to make a scientic force disturbance calculation, with more or less bad result. The compensation used in the algorithm is simply a parametric one to adjust the faulty mass output mc = me + me ag c (6.1)

where mc is the slope compensated mass, me is the mass calculated in the lter, ag is the acceleration during gear shift and c is a tuning constant.

34

In gure 6.3 the acceleration during a gear shift and the adjustment of the mass can be seen, the vertical lines shows the disengagement of the drive line.

Figure 6.3: Road slope compensation. This is only valid if a short time has passed between the last calculation and the gear shift thus approximating the road slope equal during that time.

35

6.4

Correlation Between Force and Acceleration

To be able to tell the degree of validity of the estimations a correlation analysis between the force and acceleration is performed. This is based on the fact that there should be a strong correlation between the signals if no external disturbances is aecting. Figure 6.4 shows a case with pretty good correlation between the signals

Figure 6.4: Acceleration and force good correlated The correlation coecient is in this case calculated to 0.861.

36

Figure 6.5 shows a less correlated case where a disturbance in the force possibly by a road slope change is present.

Figure 6.5: Acceleration and force less correlated The correlation coecient is in this case calculated to 0.378. The correlation coecient is calculated for all the hits in the lter and constantly mean value weighted to produce one single coecient for the whole estimation.

37

6.5

Simulations

Three dierent estimations are here shown. The mean value weighted output of the lter starts at zero. This should not be confused with the initial value of the adaptive Kalman lter which is set to 30000 kg. The thick solid lines are the correct mass of the vehicle.

Figure 6.6: Mass estimation performed with Meg. The correct value is 8280 kg and the estimated nal value 8576 kg

38

Figure 6.7: Mass estimation performed with Mormor. The correct value is 38880 kg and the estimated nal value 41780 kg

Figure 6.8: Mass estimation performed with Mago. The correct value is 19590 kg and the estimated nal value 21717 kg

39

Chapter 7 Results
To validate the implemented algorithm several estimations with dierent trucks were performed. The dierent simulations vary very much in conditions with respect to weather (wet road) and road prole, e.g. highway or city driving. The results are here presented in a table, with metric tonne (1000 kg):

Figure 7.1: Result Table for dierent estimations.

40

The colons shows in order: mass of the vehicle, estimated mass, relative error, time taken before 10 % accuracy is reached, the weighted correlation coecient, the number of dierent gears during the calculation occurred and nally the number of sampling points calculated. The three last numbers was evaluated for the sake of accuracy analysis. Much hope were given the correlation coecient but it proved to be a disappointment and it didnt provide any relevant information about the accuracy at all. It can be seen in the table that the accuracy of the estimations is approximately within 10 % and that trucks without the EBS system (lateral acceleration signal) is performing worse than the trucks with EBS.

41

7.1

Validity of Simulations

After the implementation of the Matlab code as C code in the hardware "Interactor" unit a special care to verify the calculation validity between those environments. Some minor dierences were spotted and it can be drawn to conclusion that it depends of the resampling of the dierent signal frequencys in Matlab. Any signal thats not re-sampled is absolutely identical. The simulations are considered very trustworthy. Functional tests with the truck Mago were performed to verify the implementation in the Interactor hardware. These test proved to be successful and no problems occurred.

42

Chapter 8 Conclusions
The aim of this thesis has been to estimate the mass by Newtons second law of motion in every available type of Scania truck. A model of the driveline is developed, without the oscillations in respect and a acceleration signal is dierentiated from the velocity. The lter used for the task is an adaptive Kalman lter which suites the task well. The road slope is compensated in the algorithm by using the acceleration during the disengagement of the drive line. A correlation coecient calculation between the acceleration and force is performed to analyse the accuracy of the estimation, but it proved to be a disappointment since it doesnt give any particular information about it. Several thresholds is present in the lter to avoid erroneous calculations by prohibiting them. The lter is able to give an estimation within 10 % in less then a minute but fails to be more accurate. To lower the accuracy down to 5 % seems not to be possible without proper road slope information, since it is the biggest source of disturbance. The uncertainty of the precision in the torque signals is another factor that lowers the accuracy. The algorithm is implemented in hardware and evaluated in functional trials with the same precision as in the simulations.

8.1

Further Improvements

If the goal for the estimation is to be accurate within 5 % information about the road slope has to be provided. At the division REP at Scania a work has been done to estimate the road slope [12]. If that work is used in combination with this thesis, the accuracy would increase. When the signal used for reference acceleration [14] is implemented it can easily be used instead of the calculated one, this is only to save computing 43

power. The reference signal is more accurate but only in extreme cases like harsh braking or harsh acceleration, when the mass estimation is prohibited. The correlation coecient could be used in a dierent way, by calculating the correlation for each gear and disregard the outcome of the lter if the correlation is low some accuracy can be gained.

44

Bibliography
[1] P.J. Dannfelt, J. Stridkvist, Driveline Observer for an Automated Manual Gearbox, LiTh-ISY-EX006/3828SE, Department of Electrical Engineering, Linkping University [2] MatLabs interactive user guide. MathWorks inc. [3] Physikalisch-Technische Bundesanstalt, Test certicate, Nr. D09-97.02 Rev.1 [4] T. Glad, L. Ljung, Reglerteknik. Grundlggande teori. Studentlitteratur, Lund. ISBN 91-44-17892-1 [5] K. Huh, S. Lim, J. Jung, D. Hong, S. Han, K.Han, H. Young, J.M. Yun, Vehicle Mass Estimator for Adaptive Roll Stability Control, SAE Technical Paper Series, Reprinted From: Vehicle Dynamics and Simulation, 2007, SP-2138 [6] F. Gustafsson, L. Ljung, M. Millnert, Signalbehandling, 91-44-01709-X, Studentlitteratur [7] P. Hndel, R. Ottoson, H. Hjalmarsson, Signalteori, 3:e upplagan 2002, ISBN 91-974087-2-7 [8] Magnus Pettersson, Driveline Modeling and Control 91-7871-937-2, Department of Electrical Engineering, Linkping University [9] M.H.M. Dassen, Modelling and Control of Automotive Clutch Systems, 2003.73, Department of Mechanical Engineering, TU/e Eindhoven [10] B. Witternmark, K.H. strm, K-E, rzen, Computer Control: An overview, IFAC Professional Briefs [11] Peter Rytterstedt, Observer for a vehicle longitudinal controller, LiTHISY-EX-2007/3950SE, Linkpings Tekniska Hgskola 46

[12] Per Sahlholm, Iterative Road Grade Estimation for Heavy Duty Vehicle Control, Licentiate Thesis Stockholm, Sweden 2008 [13] T.Henriksson, M.Pettersson, F.Gustafsson, An Investigation of the Longitudinal Dynamics of a Car, Especially Air Drag and Rolling Resistance, LiTH-ISY-R1506, Department of Electrical Engineering, Linkping University [14] Carl-Fredrik Ullberg, Master Thesis, Electrical Engineering, The Royal Institute of Technology, Stockholm [15] A. Vahidi, A. Stefanopoulou, H: Peng, A. Arbor, Recursive Least Squares with Forgetting for Online Estimation of Vehicle Mass and Road Grade: Theory and Experiments, Mechanical Engineering Dept., University of Michigan [16] P. Lingman, B: Schmidtbauer, Road Slope and Vehicle Mass Estimation Using Kalman Filtering, Vehicle System Dynamics, Swets and Zeitlinger, ISSN:0042-3114, 2002 [17] Emil Ritzn, Adaptive Vehicle Weight Estimation, LiTH-ISY-EX-1883, Department of Electrical Engineering, Linkping University

You might also like