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 filter to achieve this. An algorithm to compensate for the road slope is implemented in the filter. The filter 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 Scania’s test facility.

I would also like to thank all the other people that made this work possible: Per Back for the help with the programming. for the support and help. Martin Larsson and Anders Björkman for the assistance with the driving and finally Veronika Karlsson for help with the administrative tasks.Acknowledgements I would like to thank the following people at Scania. Tom Nyström for the extraordinary help with the simulation environment. . My supervisors Roger Reuter and Fredrik Schnell. Södertälje.

.

. . . . . 2. 2 Experimental Environment 2. . . . . . .1 Drive Line Model . . 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4 Correlation Between Force and Acceleration 6. . . . . . . .2 5. . .1 Thresholds for the Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2. . . . . . . . . . . . . . . . . . . . . . . . . 11 .2 Low Pass Filter . 1. . . . . . . . . . . 7 Results 40 7. . . .3 Calculations Estimating the Wheel Radius . . . .1 5. 9 . . . . .Contents 1 Introduction 1. . . . . . . . . . . 3. . . . . . . . . 1. .2 The Filter . . . .5 Simulations . . .3 Adaptive Kalman Filter . . . . . . . . . . . . . . . . . . . . . . . . . 7 7 7 8 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Modelling the Problem 20 4. . . . . . Filtering the Gear Ratio . . . . . . . . . . . . .1 State-space Description and Discretisation 3. . . . . . . . . . . . . . . . . .2 Test Vehicles . 3. 6. . . . . . . . . . . . . . . . . .4 Development Environment . . . . . . . . . . Calculating the Acceleration . 26 26 27 29 30 30 32 34 36 38 6 Mass Estimation 6. . . . . . . . . . 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Further Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6. . . . . 24 5 Pre 5. . . . 43 References . . .1 OptiCruise . . . . . . . . . . . . 16 16 17 18 19 3 Basic Theory 3. . . 46 5 . . . .3 Used signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3 Outline . . . . . . . . . . . . . . .3 Road Slope Compensation . . . .1 Background . . . . . . . . . . . . .4 Correlation Coefficient . . . . . . . 2. . . . . . . . . . . . 20 4. . . . . . . . . . 42 8 Conclusions 43 8. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 . . .1 Validity of Simulations . . . . . .2 External Forces . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.

cruise control and energy optimizing with respect to applied torque for the engine. 7 .Chapter 1 Introduction 1. In the long run this estimation is then going to be sent over a GPRS link to Scania’s "Fleet Management" Portal. The goal for this thesis is to be able to estimate the mass of the vehicle in Scania’s Interactor unit. 1. but the accuracy is not good enough for "Fleet Management’s" purpose. Today several mass estimations are performed.2 Objective The goal of this thesis is to develop a filter to estimate the mass of Scania’s vehicles by using only the standard mounted sensors of the vehicle. This is done to render the possibility for truck carrier company’s to energy optimize their transport routes with respect to maximizing their ton per mileage for each truck.1 Background A correct mass estimation is critical in today’s heavy vehicle for it’s use in automated gear shift ECU’s. With the environmental issues of today and with limited oil resources this is getting more and more important. This estimation is going to be used by Scania’s "Fleet Management" Portal to evaluate the driving statistic.

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

It utilises five different phases during the shift. It lower the torque from the engine. implementation and verification of this thesis. The internal Scania test vehicle names are used in this article. Kontakten Kontakten is a Scania coach bus 6x2 (six wheels. It’s equipped with a OptiCruise unit.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. two driven) equipped with a 12 litre engine (380 HP). [1] 2. re-engages the gear box at another gear and finally raises the torque once again. 9 . disengage the gear-box.2 Test Vehicles The test vehicles used for recording CAN-bus information and evaluation is listed in this section.Chapter 2 Experimental Environment This section explains the components used in the development. The weight of this vehicle is constant 16100 kg since it’s hard to alter. matches the speed of the engine with the gear-box. 2.

It has OptiCruise and a EBS system. two driven) is a truck equipped with a 16 litre engine (500 HP). 10 . Marja Marja is a Scania R420LA 4x2 (four wheels. two driven) truck with a rigid frame mounted. A semi-trailer weighing 32000 kg and a cargo frame weighing 5500 kg is used in combination with this truck to alter it’s weight.Mago Mago is a Scania R500LB 6x2 (six wheels. Meg Meg is a Scania R500LA 4x2 (four wheels. It has a OptiCruise unit and it’s weight is altered with a 25000 kg semi-trailer. It has a OptiCruise and a EBS system. Mormor Mormor is a Scania R580LA 4x2 is a truck equipped with a 16 litre engine (580 HP). A semi-trailer weighing 32000 kg is used to alter it’s weight. This truck is mainly used for it’s acceleration reference. It’s approximate weight is 19500 kg and the weight is altered with a trailer weighing c:a 33500 kg. two driven) truck with a 12 litre engine (420 HP). It has a 16 litre engine (500 HP) and is equipped with a ordinary manual gear box.

This section explains the differences and accuracy. Left and Right These signals is calculated as the difference from the front left wheel speed and the vehicle speed and the same for the right.3 Used signals The signals used for the implementation of the algorithm differs slightly depending on whether the truck is equipped with OptiCruise or manual gear box. All the signals are transmitted over the Controller Area Network (CAN) vehicle standard designed to allow several micro controllers and different devices to communicate with each other. This signal is only available at vehicles equipped with ABS brake system. It is sampled at 50 Hz and considered accurate but noisy. They sampled at 20 Hz and considered accurate enough. 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. It’s sampled at 50 Hz and considered satisfying accurate but noisy. They are sampled at 20 Hz and considered accurate enough. Lateral Acceleration The lateral acceleration is calculated from the wheel speed sensors. Relative Front Speed.2. Only available at vehicles with ABS. 11 . Vehicle Speed The vehicle speed is measured at the propeller shaft and calculated. It was designed specifically for automotive applications by Robert Bosch GmbH in 1983 and is now the dominating vehicle serial bus protocol. Front Wheel Speed The front wheel speed is measured at both front wheels and calculated as a mean value.

Engine RPM The engine speed is measured at the flywheel of the engine and is sampled with 50 Hz. There are no differences between different trucks and it’s considered accurate enough. Driveline Engaged This signal is measured by the OptiCruise unit. This is only used if the current gear ratio signal is missing. It is calculated by a formula where a certain amount of fuel at any given rate gives a certain torque [1]. Brake Pedal Switch This signal measures the current position of the brake pedal. It’s sampled with 10 Hz and considered accurate. It’s sampled at 100 Hz and considered very accurate. 12 . It’s only available at vehicles with OptiCruise Clutch Pedal Position This signal measures the current position of the clutch pedal. This signal is used instead of the "Driveline Engaged" if the vehicle is equipped with a manual gear box.Current Gear Ratio The gear ratio signal is present in all newer vehicles with OptiCruise. It’s sampled at 20 Hz and considered accurate enough. Engine Torque The engine torque is estimated in the Electronic Engine Controller. Propeller Shaft Speed The propeller shaft speed is measured at the transmission output shaft at 50 Hz. It’s sampled at 10 Hz and considered accurate but it’s resolution is low. There are no differences between different trucks and it’s considered accurate enough. This signal can vary with fuels and does have some minor problems with transients. It’s sampled at 50 Hz and considered satisfactory accurate.

The signal is sampled at 4 Hz and considered of low accuracy.Exhaust Brake Torque The exhaust brake is a valve in the exhaust system which stops the exhaust through flow thus raising the engine work. It’s sampled at 4 Hz. It’s estimated in the Electronic Engine Controller and sampled at 10 Hz. It’s estimated in the Electronic Engine Controller and sampled at 10 Hz. This signal is fairly difficult to calculate and it’s considered to be of low accuracy. It’s difficult to model this problem and thus making it of fairly low accuracy at least at low engine temperatures. 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-off frequency’s or alike is useless. Retarder Torque The retarder is a hydraulic pump acting as a brake mounted at the driveline. Estimated Engine Parasite Torque Loss The estimated parasite torque loss comes from external equipment such as engine cooling fan and air-conditioner pump. Nominal Friction Torque The friction torque is estimated by a map based on engine speed and temperature. 13 . Implementation frequency Since the absolutely most significant signal. the engine torque. Since it’s peak torque can vary ± 10 % [1] it’s considered less accurate.

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. 14 . A serial port debug recording unit was set up in Matlab for easy view of the output from the Interactor unit.2. Figure 2.1: Photo of the Interactor Matlab The simulations was done with Matlab. The different signal sample frequencies was levelled to 50 Hz with the resample command [2]. It was also used to replay the CAN-bus messages in to the Interactor unit thus simulating the truck exactly. The implementation of the Matlab code was done straightforward in the C programming language. Canalyzer To record the CAN-bus information the software Canalyzer installed on a Laptop was used. This made it easy to spot eventually numerical differences between the Matlab code in the computer and the C code in the Interactor.

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

Chapter 3 Basic Theory This section explains all the necessary theory used in this thesis.1 State-space Description and Discretisation Every physical system is best described using a continuous time model. This makes it necessary to transform the continuous state space description into a discrete state space description.2) (3.3) 16 . 3. but controllers are usually implemented in computers using discrete mathematical methods. 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. which yields x[t + 1] = Ax[t] + Bu[t] y[t] = Cx[t] (3.1) where h is the sample period.

2 Low Pass Filter In order to avoid aliasing the used signals are low pass filtered with a first order discrete LP-filter x(k) = (1 − a)x(k + 1) + au(k) where u is the input. (3.4) 17 .3. x is the output and a is the filter constant.

with the probability distributions according to p(w) ∼ N (0.5) (3. In [1] the adaptive Kalman filter was proposed and since it is a generalized form of both LMS and RMS it was also used in this thesis. This is not considered a problem in this thesis since the mass calculation is only one dimensional. Q) p(e) ∼ N (0. If a system is described by θ(t + 1) = θ(t) + w(t) y(t) = ϕT (t)θ(t) + e(t) (3. This suites the mass estimation well since there are many disturbing factors for the driving force. 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.9) P (t − 1)ϕ(t)ϕT (t)P (t − 1) + Q(t) R(t) + ϕT (t)P (t − 1)ϕ(t) The filter has to be initialised with a θ(0) and a P (0) where P (0) is covariance of the initial guess θ(0). Gaussian distributed. The Q and the R matrices are the covariance matrices of w and e.8) (3.3 Adaptive Kalman Filter The adaptive Kalman filter is usually used in noisy and changing environments. assumed to be independent of each other.3. Since the covariance matrices describes the 1 2 Least Mean Square Recursive Least Square 18 .6) where w and e is random disturbance variables. RLS2 . There are many different filters that could be used to estimate the mass from the force and acceleration like LMS1 or as used in [5].7) (3. The drawback of the adaptive Kalman filter is that it requires a lot of computing power.

v.noise level it will in fact end up with in this case that a higher Q means more trustworthy signals. The correlation coefficient can be estimated by r= n n x2 − ( i xi y i − xi ) 2 xi n yi 2 yi − ( yi )2 (3. mX and mY are the expected values of the variables and σX and σY are the standard deviation of the variables. It is defined by [7] ρX.Y = E[(X − mX )(Y − mY )] σX σY (3. hence faster adaptation and v.4 Correlation Coefficient The correlation coefficient 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. 3.11) 19 .10) where E is the expected value operator.

1. In this thesis some simplifications are made because of the driveline rattle and driveline damping these springs and dampers causes is not affecting the output torque on the driving wheels in any significant way. This section describes how the force is calculated by the engine torque signals. Several papers has proposed models for this. 4. dampers. springs and friction in the parts shown in figure 4.1) This then requires that a proper driving force and acceleration. 20 .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. The oscillations during gear shift the total sprung mass causes is neither taken care of because the mass calculation is then prohibited. The full model consists of moment of inertias. among others [8] or [9] which this thesis are based upon.Chapter 4 Modelling the Problem To be able to estimate the mass of the vehicle Newton’s second law of motion is used that states F = ma (4.

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. the clutch is only disengaged during take of and in trucks without OptiCruise and it’s considered stiff without losses. The eventual clutch slip is taken care of later in this paper as a condition for the mass filter. Clutch The clutch is used to disconnect the engine from the gear box during gear shifts. cooling fan. Mf r is the friction inside the engine.2) where ωe is the rotational speed of the flywheel with inertia Je ..3) (4. In this work. water pump etc.4) 21 . alternator.g. Meng is the torque produced by the engine combustion. Mexh is the torque from the exhaust brake and Mc is the torque left for the clutch. Mc = Mv ωe = ωc (4. Mpar is the parasitic torque taken from external devices e.

hence the differential. It consists of a input shaft. The equations are given by ωc = ωv iv Jv ωv = Mv iv − Mf − Mret ˙ (4. ωv = ωf if Jf ωf = Mf if − Mh ˙ (4. This also alternates the output shafts inertia which has to be taken in respect.8) Hub Reduction Gear The hub reduction gear is used at "dirt" dump trucks mostly.10) whereas the ih is the gear ratio and ωw is the rotational speed of the wheel with torque Mw . Mh ih = Mw (4. It’s modelled by ωf = ωh ωh = ωw ih . output shaft and a "bottom" shaft with different sets of gears. iv is the actual gear ratio and Mret is the torque from the retarder brake. 22 . the only difference that it have one rigid gear ratio.Gearbox The gearbox provides gear reduction for the vehicle at low speeds.9) (4.6) where Jt is the outgoing shaft inertia and ωv is the rotational speed of the outgoing shaft. The purpose of it is to release some stress from the drive shafts since they get lower torque acting on them.7) (4. this is necessary because of the combustion engine’s limited torque peak. It’s modelled in the same way as the gear box. Final Differential Gear The differential gear is a torque converter but it’s main task is to let the back wheels spin with different speed.5) (4.

Final Driveline Model Putting together (4.11) where all accelerations are substituted with ωw .2) . 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. 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.(4.13) (4. Mw rw (4.12) 23 .10) then yields the torque for the driving wheels.

2 taken from [12]. cr1 and cr2 is depending on the tires used and the road surface during driving.2 External Forces The external Forces acting on the truck can be viewed in figure 4.2: External Forces The Rolling Resistance The rolling resistance force occurs when the tire is deformed by the truck during driving.14) where m is the mass of the vehicle. Figure 4.15) where ρ is the density of air. 24 .4. A is the total front area of the vehicle. An approximation of the resistance is [13] Froll = m(cr1 + cr2 v) (4. C is the coefficient of air resistance. The Air Resistance The air drag resistance is modelled by ρ Fair = CA(v + vw )2 2 (4. v is the vehicle speed and vw is the head wind acting at the vehicle which is unknown and approximated to zero.

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.17) 25 . (4. 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.

A solution to this problem was proposed in [1].1.1 Estimating the Wheel Radius In (4. Since the drive line rattles when the truck is starting to accelerate the speed of the filter has to be moderate. 5. a low Q value is chosen. It can be seen that after c:a 70 seconds the filter has adapted to the correct value.Chapter 5 Pre Calculations This section presents the calculations that is done in order to estimate the mass.13) the wheel radius rw is unknown.1) and using the propeller shaft speed and the vehicle speed signals as in signals in an adaptive filter the wheel radius is calculated. A estimation of the wheel radius through the use of an adaptive Kalman filter. This causes a problem since it varies a lot between different vehicles with different payloads. By using the fact that v = rw ωw (5. 26 . The output from the Kalman filter is shown in figure 5. the filtering of the gear ratio and the calculation of the acceleration is presented.

5.Figure 5. 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). Simply dividing the engine speed with the propeller shaft speed yields a noisy gear ratio as can be seen in figure 5. Since all the gear ratios are known a threshold filter is made with the following rule where iv (n) is the current gear ratio.2 Filtering the Gear Ratio If the signal current gear ratio is missing a calculation of this is needed.3. 27 .2. iv (n) − . The output can be seen in figure 5.1: The output from the adaptive Kalman filter. By filtering this quotient the result is time delayed and can be slightly offset from the actual gear ratio.

Figure 5. 28 .2: Divided gear ratio.3: Filtered gear ratio.Figure 5.

3 Calculating the Acceleration To obtain the acceleration the vehicle speed was differentiated by (3. In this thesis a trustworthy acceleration signal could be used as a reference during the modelling.4: The modelled acceleration and the reference signal.4. 29 . Figure 5. With this reference and some filtering of the output from the differentiation an accurate acceleration was achieved as can be seen in figure 5.5.1). A special care has to be taken with the acceleration since differentiation of the vehicle speed is very sensitive to high frequency noise. based upon [14]. This signal calculation is during this thesis not yet implemented in Scania’s hardware.

Drive Line Engaged The filter must assume that the drive line are engaged. Brake Pedal If the brake pedal is pressed no calculations will be performed since it is very hard to model the braking force. This is not the case when a gear shift is performed and the filter are then restricted from calculations. 30 . A proper model.Chapter 6 Mass Estimation 6. if it exists. would depend on to many variables as the temperature of the disc brakes.1 Thresholds for the Filter Several thresholds are used to avoid erroneous calculations in the filter. Wheel Slip If the drive wheels slip there are a significant force loss to the vehicle. The slip is here calculated by the difference between the rear wheels speed and the front wheels speed. If the wheel slip is to great no calculations will be performed. the condition of the brake discs and the calipers. They are all describing a force loss between the driving wheels and the vehicle in different ways.

Velocity Since it is shown that the mass estimation performs badly when the velocity is low no calculations is done beneath a threshold level. 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 doesn’t pick that up. The clutch slip is calculated as the difference between the engine speed and the propeller shaft speed normalized with the gear ratio. 31 .Clutch Slip The clutch slip should not generally occur in a vehicle with a proper clutch. If the clutch slip is to great no calculations will be performed.

although it could be a little bit more accurate it didn’t improve the accuracy enough to be acceptable with the higher calculating complexity. 32 .9) will provide the best linear estimation of θ.13) together with (4.(4.7) . If w(t) and e(t) is a sequence of independent random variables with Ew(t) = 0.6. Figure 6. Ew(t)w(t) = Q Ee(t) = 0. Several tempts were made to implement both the road slope and the mass as two different states in one mass estimator filter like [15] or [16]. Ee(t)e(t) = R then the equations (3. Given (3. is the uncertainty in the estimated torque signals.1: The Mass Estimation Filter.14) . even with correct road slope information provided. The main problem with the accuracy.5) and (3.(3.6) the equations for the adaptive mass filter is described by θ(t + 1) = θ(t) + w(t) Ftot (t) = a(t)θ(t) + e(t) where θ is the mass to be estimated.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.2 The Filter Taken from (4.

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

Inspired by the article [17] which measures the acceleration before and after a gear shift to determine the road slope disturbance.1) where mc is the slope compensated mass. In figure 6. It can be seen that the calculated weight would differ between around 2000 kg to around 15000 kg by the road slope. ag is the acceleration during gear shift and c is a tuning constant. with more or less bad result. Figure 6.2: Road slope influence on the driving force. 34 . The compensation used in the algorithm is simply a parametric one to adjust the faulty mass output mc = me + me ag c (6. a method to compensate the road slope was developed. 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.6.3 Road Slope Compensation The biggest source of disturbance is the road slope.2 the correct driving force (solid) and the acceleration (dotted) are printed. Several attempts to make a scientific force disturbance calculation. me is the mass calculated in the filter.

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.In figure 6. 35 .3: Road slope compensation. Figure 6. the vertical lines shows the disengagement of the drive line.3 the acceleration during a gear shift and the adjustment of the mass can be seen.

Figure 6.861. This is based on the fact that there should be a strong correlation between the signals if no external disturbances is affecting. 36 .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.4 shows a case with pretty good correlation between the signals Figure 6.6.4: Acceleration and force good correlated The correlation coefficient is in this case calculated to 0.

Figure 6.378.Figure 6. The correlation coefficient is calculated for all the hits in the filter and constantly mean value weighted to produce one single coefficient for the whole estimation.5 shows a less correlated case where a disturbance in the force possibly by a road slope change is present. 37 .5: Acceleration and force less correlated The correlation coefficient is in this case calculated to 0.

5 Simulations Three different estimations are here shown.6. Figure 6. This should not be confused with the initial value of the adaptive Kalman filter which is set to 30000 kg. The mean value weighted output of the filter starts at zero.6: Mass estimation performed with Meg. The correct value is 8280 kg and the estimated final value 8576 kg 38 . The thick solid lines are the correct mass of the vehicle.

Figure 6.8: Mass estimation performed with Mago.7: Mass estimation performed with Mormor. The correct value is 19590 kg and the estimated final value 21717 kg 39 . The correct value is 38880 kg and the estimated final value 41780 kg Figure 6.

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

The colons shows in order: mass of the vehicle. time taken before 10 % accuracy is reached. 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. the weighted correlation coefficient. relative error. estimated mass. the number of different gears during the calculation occurred and finally the number of sampling points calculated. The three last numbers was evaluated for the sake of accuracy analysis. Much hope were given the correlation coefficient but it proved to be a disappointment and it didn’t provide any relevant information about the accuracy at all. 41 .

Some minor differences were spotted and it can be drawn to conclusion that it depends of the resampling of the different signal frequency’s in Matlab. These test proved to be successful and no problems occurred.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. Any signal that’s not re-sampled is absolutely identical. 42 . Functional tests with the truck Mago were performed to verify the implementation in the Interactor hardware. The simulations are considered very trustworthy.7.

When the signal used for reference acceleration [14] is implemented it can easily be used instead of the calculated one. The uncertainty of the precision in the torque signals is another factor that lowers the accuracy.1 Further Improvements If the goal for the estimation is to be accurate within 5 % information about the road slope has to be provided. Several thresholds is present in the filter to avoid erroneous calculations by prohibiting them. If that work is used in combination with this thesis. since it is the biggest source of disturbance.Chapter 8 Conclusions The aim of this thesis has been to estimate the mass by Newton’s second law of motion in every available type of Scania truck. To lower the accuracy down to ± 5 % seems not to be possible without proper road slope information. but it proved to be a disappointment since it doesn’t give any particular information about it. without the oscillations in respect and a acceleration signal is differentiated from the velocity. this is only to save computing 43 . the accuracy would increase. The road slope is compensated in the algorithm by using the acceleration during the disengagement of the drive line. At the division REP at Scania a work has been done to estimate the road slope [12]. A correlation coefficient calculation between the acceleration and force is performed to analyse the accuracy of the estimation. The filter is able to give an estimation within 10 % in less then a minute but fails to be more accurate. The filter used for the task is an adaptive Kalman filter which suites the task well. The algorithm is implemented in hardware and evaluated in functional trials with the same precision as in the simulations. 8. A model of the driveline is developed.

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

.

M. 91-44-01709-X. Observer for a vehicle longitudinal controller. Linköping University [9] M. Studentlitteratur [7] P. Grundläggande teori. S. Stridkvist.73. Lund. SP-2138 [6] F. S.Han. Årzen. Studentlitteratur. Driveline Modeling and Control 91-7871-937-2. K.02 Rev. Händel. Linköping University [2] MatLab’s interactive user guide. D. K.J. Dannfelt. Computer Control: An overview. Reglerteknik. Vehicle Mass Estimator for Adaptive Roll Stability Control.M. ISBN 91-974087-2-7 [8] Magnus Pettersson. R. Modelling and Control of Automotive Clutch Systems. Witternmark. Ottoson. IFAC Professional Briefs [11] Peter Rytterstedt. Han.H. L. Millnert. Glad. Driveline Observer for an Automated Manual Gearbox. Gustafsson. 3:e upplagan 2002. ISBN 91-44-17892-1 [5] K. Dassen. H. Young. Signalteori. LiTh-ISY-EX–006/3828–SE. Lim. MathWork’s inc. L. Ljung. Yun. Ljung. Nr. J. Signalbehandling. K-E. [3] Physikalisch-Technische Bundesanstalt. Department of Mechanical Engineering. Linköpings Tekniska Högskola 46 . TU/e Eindhoven [10] B. Test certificate. Department of Electrical Engineering. Åström. 2007. Hjalmarsson.1 [4] T.Bibliography [1] P. SAE Technical Paper Series. J.H. H. Hong. Jung. D09-97. LiTHISY-EX-2007/3950–SE. 2003. M. Huh. J. Reprinted From: Vehicle Dynamics and Simulation. Department of Electrical Engineering.

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