METHODS FOR ESTIMATING THE ROLL ANGLE AND PITCH ANGLE OF A TWO-WHEELED VEHICLE, SYSTEM AND A COMPUTER PROGRAM TO PERFORM THE METHODS

Abstract: Methods for determining the roll angle and pitch angle of a two-wheeled vehicle wherein the roll angle is measured in relation to the gravitational field. The invention is based on dynamic parameters detected by means of inertial sensors, for example accelerometers and rate gyros. The general sensor fusion approach requires a parameter that indicates the lateral acceleration of the vehicle. In a further development of the invention the lateral acceleration is combined with a parameter indicating the velocity of the vehicle. Advantageous embodiments of the invention comprise an adaptive filter in the shape of a Kalman filter. The yaw rate can also be generated as an addition sensor signal to achieve higher performance.

Description: Methods for estimating the roll angle and pitch angle of a two-wheeled vehicle, system and a computer program to perform the methods. Field of the invention The present invention refers generally to a system and a method for determining the roll angle of a two-wheeled vehicle, and more particularly to such a system and method for determining the roll angle of a motorcycle. Background of the invention hi order to improve the functionality and safety of modern vehicles several technical advanced systems have been developed. This have been possible thanks to new theoretical results concerning areas such as vehicle dynamics, signal processing, control theory, computer development, physics etc. Systems developed for cars can in general be implemented on motorcycles as well. There is however one major difference, namely that a motorcycle leans when turning. This may not be a problem for some systems, but for systems such as ABS (ABS, anti lock braking system) and anti-spin systems using the wheel speed signals is this a problem since the effective wheel radii are roll angle dependent. This effect originates from the fact that the front and rear wheels are different in size and shape, which introduce severe difficulties for some systems. These problems can be eliminated if the roll angle is estimated, which will increase the performance and safety of the motorcycles. Roll angle information can also be used for driver warning/fraining, adjustable headlights and anti theft devices. Prior Art Examples of prior art describing roll angle estimation is found for example in the patent document EP 0 603 612, which shows the use of a lateral and vertical accelerometer. However, the technique shown in this document has a limited accuracy. Other approaches are for example to use ultrasound according to e.g. JP 1 208 289, headlight reflection according to US 5,426,571, mechanical gyro according to US 5,811,656, steering angle and velocity according to JP 50 000 637 or cameras according to JP 7 132 869. These solutions have a debatable performance and are generally expensive due to high sensor costs. Object of the Invention The general object of the present invention is to provide a roll angle two-wheeled vehicles indicator that has an improved accuracy and is possible to implement to a moderate cost. Aspects of the object is to provide a method, an apparatus and a computer program product for accurately estimating the roll angle or the pitch angle of a motorcycle. Summary of the Invention The inventive concept comprises an estimation of the roll angle by measuring the angle between a vertical axis of the vehicle and the direction of the gravitational field. The gravitation is utilised by arranging a lateral acceleration sensor such that it generates a lateral acceleration signal based on the detection of an acceleration comprising a component dependent on the lateral movement of the vehicle and a component dependent on the gravitational effect. The invention is based on dynamic parameters detected by means of inertial sensors, for example accelerometers and rate gyros. The sensor signals are processed in a sensor fusion structure comprising an adaptive filter based on a model on the vehicle dynamics. The general sensor fusion approach allows different sensor configurations but requires a parameter that indicates the lateral acceleration of the vehicle. In a further development of the invention the lateral acceleration parameter is combined with a parameter indicating the velocity of the vehicle. Advantageous embodiments of the invention comprises an adaptive filter in the shape of a Kalman filter. The Kalman filter enables similar implementation for different sensor combinations, for example a velocity sensor and a lateral accelerometer combined with a vertical accelerometer and or a longitudinal rate gyro. Embodiments apt for achieving even higher performance comprise an extra gyro for generating an additional sensor signal such as the yaw rate. The invention is applicable on all two-wheeled vehicles and operates only a rolling vehicle. For acceptable accuracy the invention generally requires a minimum speed for example in the range of 10 km/h. All the examples in this text are however described in relation to a motorcycle. Assuming the horizontal plane is perpendicular to the gravitational field, the method according to an aspect of the invention comprises the steps of: - determining the vertical acceleration a z of the motorcycle; - determining the lateral acceleration a y of the motorcycle; - determining the longitudinal acceleration a x of the motorcycle; - determining the angular velocity around the forward axis ( Jc ) of the motorcycle, φ ; - determining the longitudinal speed u of the motorcycle; - determining the pitch angle Θ of the motorcycle with respect to the horizontal plane dependent on said accelerations and said longitudinal speed preferably dependent on the longitudinal acceleration a x and the longitudinal speed; - determining the roll angle Φ of the motorcycle with respect to the gravitational field dependent on the sum of said pitch angle Θ and on said vertical and lateral accelerations (a ∑ ,a y ); Another embodiment of the invention includes a method for determining the roll angle. of a motorcycle, which method comprises the steps of: - determining the vertical acceleration a z of the motorcycle; - determining the lateral acceleration a y of the motorcycle; - optionally determining the longitudinal acceleration a x of the motorcycle; - optionally determining the longitudinal speed u of the motorcycle; - optionally determining the angular velocity around the forward (x) axis, φ ; - optionally determining the pitch angle Θ with respect to the horizontal plane dependent on the said accelerations and said longitudinal speed preferably dependent on the longitudinal acceleration a x and longitudinal speed. Advantages The strength of the invention presented in this document, is that the roll angle estimate can be made more accurate since estimation of the sensor offsets are straightforward using adaptive filtering techniques. Definitions and Coordinate Systems For the sake of clarity, the definitions and coordinate systems used below will be defined and discussed in this section and with reference to Fig 1 A. A natural approach when modelling vehicles is to use several coordinate systems. How these systems are chosen depends on vehicle type and application, h the roll angle estimation system according to the present invention, two coordinate systems are used. One coordinate system is attached to the inertial frame and the other to the body of the motorcycle. The inertial frame (I) system is, as the name implies, fixed in the inertial space. Thus, Newton's equations must be expressed relatively this system. The inertial frame system is an orthogonal right-handed coordinate system, wherein the axes are denoted X, Ϋ and z . In this system the earth is assumed to be flat which allows Z to be chosen parallel to the gravitational field. The definition of the system in the inertial frame is thus i = [X Ϋ z) , wherein T is the transpose operator: The body frame (B) is also an orthogonal and right-handed coordinate system. The system is attached to the motorcycle according to figure 1 A. In figure 1 A x is the axis in the longitudinal (forward) direction, y the axis in the lateral (left) direction and z is the axis in the vertical (upwards) direction. The body fixed system may thus be defined as B = (x y zf , wherein T is the transpose operator. The local rotations φ , θ , ψ are defined as those a rate gyro would measure, thus ψ is the angular velocity around the x axis, θ is the angular velocity around the y axis and ψ is the angular velocity around the z axis. Finally, the rate gyro signals are defined as = iφ θ ψ) and the velocity of coordinate system B is defined as (u v w)B . The body frame coordinate system B must be related relatively the inertial frame system I. The rotation of B relative to /is expressed using the roll angle Φ, the slope/pitch angle Θ, and the yaw angle Ψ. Further, the coordinate systems are related to each other using the transformation matrix Cf . Thus, B = cfϊ and Ϊ = C B B where Furthermore, cf is orthogonal, implying that iff j 1 = iff J =c B ' . Further, derivatives are calculated using the matrix W IB cf = -W IB cf where (1) Using this notation, calculation of the derivative of B is straightforward, namely as = Cfϊ = -W IB CfC B ! B = -W IB B . Notation In this application a number of mathematical models and equations are described, wherein the following notation is used. B Body fixed coordinate system I Inertial fixed coordinate system x,y,z Coordinate axles in orthogonal coordinate system B X, Ϋ,Z Coordinate axles in orthogonal coordinate system I Φ, Θ, Ψ Roll, pitch and yaw angles describing the rotation of B relative I. , θ , ψ Angular velocities of B relative I ψ,θ,ψ Angular accelerations of B relative I r B Vector from origin in I to position B r P Vector from origin in I to position P r PIB Vector from position B to position P u Velocity in longitudinal direction, x , in B v Velocity in lateral direction, y , in B w Velocity in vertical direction, z , in B ά Acceleration in longitudinal direction, x , in B v Acceleration in lateral direction, y , in B w Acceleration in vertical direction, I , in B δ x Sensor offset longitudinal accelerometer δ y Sensor offset lateral accelerometer <5, Sensor offset vertical accelerometer δ gyr g Sensor offset rate gyro z fτ Distance from hub on front wheel to center of mass in vertical direction z rτ Distance from hub on front rear to center of mass in vertical direction F yτ Force from gyroscopic effects from both wheels F yιf Force from gyroscopic effects from the front wheel F yτι . Force from gyroscopic effects from the rear wheel m Mass of driver-motorcycle system ^ G ^ G ' Z G Location of center of mass in body fixed coordinate system B ω f Angular velocity front wheel ω,. Angular velocity rear wheel X, Y, Z Location of coordinate system B relative I x, y, z Coordinates relative coordinate system B I f , I,. Moment of inertia front wheel and rear wheel I y ; i, j = χ,y,z Elements in the inertia tensor /, = „ y " yy I Z = I ZZ τ f ' Torque applied on the front wheel from the motorbike f f Torque applied oh the motorcycle from the front wheel T The sampling interval in discrete implementations. Brief Description of the Drawings The present invention will be described with reference to the accompanying drawings, in which Fig 1 A shows the body fixed coordinate system; Fig IB shows accelerometers on a motorcycle in an exemplifying implementation of the invention; Fig 1C shows a schematically a functional block diagram of the stages comprised in an embodiment of a pre-processing stage in accordance with the invention; Fig ID shows the relation between two coordinate systems used in some embodiments of the invention; Fig. 2 A and 2B show schematically a functional block diagram of the stages comprised in embodiments the invention; Fig. 3 shows inter alia the forces acting on the centre of gravity and the torque around the origin; Fig. 4 shows a flowchart of the estimation of sensor variance; Fig 5 shows a notation for a mechanical gyroscope. used in embodiments of the invention; Fig 6A and 6B shows a simple motorcycle model; Fig 7 illustrates the balancing forces on a motorcycle; Fig 8 shows a schematic block diagram of embodiments of the invention having different sensor configurations; Fig 9-12 show diagrams of roll angle indications measured plotted against a reference from experimental test driving with the invention. Detailed Description of Exemplifying Embodiments h an implementation of the invention on for example a motorcycle as shown in Fig IB, acceleration sensors for detecting lateral acceleration, vertical acceleration and longitudinal acceleration are placed in a suitable position on the vehicle. The inventive system allows a variety of positions for the sensors on the vehicle, however the sensors should be protected against disturbances and noise, h the embodiment of Fig IB, an accelerometer component 101 comprising a lateral accelerometer 104, a vertical accelerometer 106 and a longitudinal accelerometer 108 are placed under the saddle. There is also a gyro 102 mounted close to the steering bar. A further development of this embodiment comprises an additional longitudinal accelerometer used to improve an estimation of the vehicle velocity or to detect hills. The system according to the present invention will be described with reference to the example according to Fig IB having a selection or a combination of sensors for accelerometers and possible rate gyros. Pre-processing It is often advantageous to pre-process the signals indicating the sensed parameters. The quality and the accuracy of the roll angle estimate depends on the quality of the signal from the sensors. Embodiments of the inventive concept therefore further comprises a pre-processing stage devised to enhance the sensor signal quality or to adapt the sensor signal to the actual estimation stages. So for example the information delivered by sensors detecting a parameter related to the roll angle typically has a low frequency during driving, e.g. in the range of 10 Hz. h a normal motorcycle the disturbances typically occur above 10 Hz, and because only the roll angle information is used the disturbances above the range of 10 Hz are suppressed. The invention is conveniently realised by means of a digital signal or data processing system, such as a computer. Since inertial sensors usually delivers a continuous time output signal, the sensor signal must in digital implementations be converted to discrete time. Fig 1 C shows a functional block diagram of an embodiment of the pre-processing stages in a pre-processor 110. The pre-processor 110 comprises processing in four stages, viz. a continuous time stage 112, a sampling stage 114, a discrete time stage 116 and one or more down-sampling stage(s) 118. In the continuous time stage 112 the signal from a sensor 120 is filtered in an ideal low pass (LP) filter 122. The LP filter would at least comprise a design to attenuate frequencies above half the sampling frequency in order to minimise alias effects. Possibly, the LP filter would also comprise a design to suppress high frequency disturbances for example with higher frequencies than about 10 Hz. A simple low order analogue filter is used in cased where the sampling rate is sufficiently high, in order to avoid difficulties arising for high order filters in the continuous time domain. The sampling stage 114 samples the analogue signal for example by means of an A/D converter and outputs a digital signal in the discrete time domain. The discrete time stage 116 preferably comprises a data rate or sample rate reduction mechanism devised to reduce the data rate and hence the computational load. The data reduction mechanism preferably comprises a low pass filter 126 devised to attenuate frequencies above half the sampling frequency of the decimated signal. Decimation of the data rate by a factor k is carried in a decimation stage 128 out by selecting every k:th sample in the discrete signal and discarding the rest of the samples. The steps for reducing the sampling frequency of a discrete signal for example from 100 Hz to 50 Hz comprises the steps of designing a suitable LP-filter attenuating frequencies above 25 Hz, applying the LP-filter to the signal and removing every second sample from the filtered signal. The data reduction mechanism in Fig 1C also comprises a down sampling mechanism having another LP -filter 130 and a sample decimation stage 132 for example operating in a manner similar to first data reduction stages. Roll Angle Estimation The technique for roll angle estimation by model based sensor fusion in accordance with the invention requires a good sensor model, i.e. the model of the vehicle dynamics as indicated by the parameters detected by the sensors. Different embodiments of the invention employs various models. One embodiment is based on a simple approach wherein the signals from a lateral and a vertical accelerometer is processed in a model using a static mathematics formula. In a perhaps more powerful embodiment the estimation of model parameters are determined by means of an adaptive filter, preferably a Kalman filter based on the model. The Kalman filter embodiment is advanced enough to estimate not only the roll angle but also parameters such as yaw rate and sensor offsets, thus creating a very versatile and useful system. In yet another embodiment the system comprises several versions of the adaptive filter. The choice of filter depends on how the features of the system are modelled and the sensors used. Fig 2 A shows an embodiment of a the stages and the functional units of a roll estimation method and apparatus in accordance with the invention. Signals or data from a number m of inertial sensors such as accelerometers ace l...acc m, possibly a number n of gyros gyro 1...gyro n and the angular velocities ω front and ω rear of the front and rear wheels are input to a pre-processing stage 201. A velocity estimation is made either as a part of the pre-processing or in a separate stage before the Kalman filter possibly using a combination of the front and rear angular velocity signals. The pre-processed sensor signals thus indicating different parameters relating to the vehicle dynamics are input into an adaptive filter 202, here in the shape of a Kalman filter. The adaptive filter 202 is based on a selected and predetermined model of the vehicle dynamics and is devised to generate and output an estimation of a number 1...k parameter values 204 dependent on the input sensor signals. In certain filters, for example Kalman filters, one of the output parameters is the roll angle indicator signal. The output parameter value 204 is possibly input into a calculating stage or vehicle roll angle calculator 206 devised to calculate, dependent on said parameter value from the adaptive filter, a further processed, e.g. low pass filtered, roll angle indication value RAI 208 that is dependent on and indicative of the roll angle of the vehicle or other . This general structure is usable for different configurations of sensors, for example one, two or three accelerators possibly combined with one longitudinal gyro or a veliicle velocity signal from at least one of the front or rear wheels. Fig 2B shows an even more general structure of the invention taking as an input a lateral acceleration signal 210, a vertical acceleration signal 211, pre-processing 212 and an estimation model calculator 214 devised to calculate a signal or a parameter 216 RAI indicative of roll angle of the vehicle. The calculator 214 comprises the a selected simple or advanced model of the vehicle dynamics. Models of Vehicle Dynamics The invention is implementable by means of different models of vehicle dynamics and some embodiments may even comprise several selectable models used dependent on different driving situations or other requirements. A number of different models and model varieties comprised in the invention are described in the following sections. In all the embodiments of the system according to the present invention, the estimation of the roll angle is based on inertial sensor signals, in particular accelerometer signals which requires the most modelling effort. It is generally preferred to operate with a accurate model having relatively few states. The following section describes examples of the derivation of models for ideal accelerometers. Accelerometer Models The inputs to these expressions are the orientation, velocity and acceleration of the body fixed system. The first step is to model acceleration on a point on the motorcycle. In order to simplify the explanation, two coordinate systems are used viz. one that is fixed in the inertial space (I) and one that is fixed to the motorcycle (B). The point on the motorcycle where acceleration is calculated is denoted P. The vector from the origin in the inertial fixed system pointing to location P on the motorcycle can be expressed as: rp = r B +r P ι B = {X Y z)ϊ+ (x y z)B where 7 B is the position of coordinate system B in /and r PI B is the coordinate expressed in B. This is illustrated in Fig ID and is valid for cases or vehicles wherein a first coordinate system moves in relation to a fixed coordinate system. By using the two coordinate system approach, derivation of the acceleration due to movement and rotation of the vehicle body is straightforward. Accelerator Model Derivation 1 Using the expressions derived as shown in the definitions section is the acceleration calculated as: The accelerometers are also influenced by the gravitational field. The gravity is modelled as: g = -gZ = (o 0 - g)cfB . Let r measwed be the measured acceleration by the accelerometers. The acceleration of a point in space can be calculated from the measured acceleration according to: f The measurements for the longitudinal, vertical and lateral directions then become: x : a Bx = ύ + wθ-vψ + zθ -yψ-xψ 2 +ψ 2 )+ yφθ + zφψ - g sin Θ y:a By =v+uψ -wφ + xψ - zφ + xφθ - yψ 2 +ψ 2 )+ zθψ + g sinΦ cosΘ (2) z : a Bz =w+vφ-uθ + yφ-xθ+ xφψ + yθψ -zψ 2 +θ 2 )+g cos'Φ cos Θ If the preciseness of the model is allowed to be reduced, approximations can be made. If the sensors are located near the centre of the motorcycle, the lateral slip is small and if both wheels are in contact with the ground the relations (3) below can be used: x = y = w = w = v = v = 0 (3) which simplifies the model (2) to: x:a Bx —ά + zθ +zφψ — gsinΘ y:a By — uψ — zip A- zθψ + g sin Φ cos Θ (4) z:a Bz +6J 2 )+gcosΦcosΘ Further simplifications maybe done. Assume thatθ,φ,ψψ,θψ,φ 2 ,θ 2 are small then the model of measured accelerations (4) can be simplified to: x : α Bx = ύ - g sin Θ gήα cos® (5) z : α Bz =-uθ + g cos Φ cos Θ Furthermore, when flat ground is assumed, Θ = Θ = 0 is valid for the slope angle Θ and the (1) can be rewritten as: CfC B = -W IB . Solving this system yields: Θ = θ cos Φ -ψ sin Φ φ_ ycosΦ+gsinΦ cosΘ (6) Φ = φ + tanΘ ψ cos Φ+θ sin ΦJ Assuming flat ground gives The model for the measured accelerations (4) is simplified to: x : a Bx =ύ + zθ + zφψ y:a By = uψ-zφ + zψ 2 tanΦ + gsinΦ z:a Bz = -uθ-z[ 2 +ψ 2 tan 2 ΦJ+gcosΦ. or if flat ground etc. is assumed: y:a By =uψ+gsmΦ z : a Bz = — uψ tan Φ + g cos Φ Accelerator Model Derivation 2 This model derivation can alternatively be described in a somewhat shorter format. The expressions for each direction are for the longitudinal, lateral, and vertical direction are:. r x =ύ + wθ-vψ + zθ -yψ-xψ 2 +ψ 2 )+ yφθ + zφψ r y =v + uψ-wφ + xψ-zφ + xφθ—yψ 2 +ψ 2 )+zθψ f. -w+vφ-uθ + yφ-xθ+xφψ + yθψ-zψ 2 +θ 2 ) These models are not taken by themselves adequate enough to model accelerometers because accelerometers are also influenced by gravity. Extending the derived model to model gravity is done by adding how the longitudinal, the lateral and the vertical accelerometer are affected when rotated in a field of gravity. The accelerometer models are therefore dependent of the two roll angle Φ and tilt angle Θ . This dependence of the roll angle is the feature required in order to use the sensor to estimate the roll angle. Unfortunately, the tilt angle, seen as disturbance, complicates the problem. For normal hill slopes, the error is small though. The ideal models for the three accelerometers becomes a Bx =ύ + M'θ-vψ + zθ -yψ-xψ 2 +ψ 2 )+ yφθ + zφψ - g sinΘ a By =v + uψ-wφ + xψ-zφ + xφθ-y\<p 2 +ψ 2 j+zθψ + g sinΦ cos Θ a Bz =w+vφ-uθ÷yφ-xθ+xφψ + yθψ-zψ 2 +θ 2 )+gcosΦcosΘ The ideal accelerometer model is taken by itself inadequate for roll angle estimation because of the additive sensor offset. This offset, unknown for each individual sensor, is also temperature dependent. The inventive solution to the offset problem is to extend the accelerometer model with offsets. a Bx = it + wθ -vψ + zθ - yψ - xψ 2 +ψ 2 )+yφθ + zφψ - gsinΘ + δ x a By = v + uψ - wφ + xψ - zφ + xφθ - yψ 2 +ψ 2 )+ zθψ + gsmΦcosΘ + δ v a Bz = w+vφ -uθ + yφ - xθ + xφψ + yθψ - zψ 2 + θ 2 )+ g cos Φ cos Θ + δ z The sensors are usually influenced by a scaling error as well. This error is partly absorbed by the sensor offsets and is not modelled. Implementing such sensor errors in the models is straightforward but can result in other problems. The complexity of the models 5 makes estimation of all interesting parameters using very few sensors impossible because of divergence problems. The inventors have, however, realised that there are unused relations between some of the variables that can be used together with simplifications specific for vehicles moving on two wheels. If the Euler angles are chosen as an xyz- system the relations are Θ = θ cosΦ~v r sinΦ I f) ύ^ ψ' cosΦ+θ sin Φ cos Q Φ ^ + ta Θ ^ cos Φ+θ sin Φ) If the tilt angle and its time derivative is assumed to be small ( Θ = Θ = 0 ) the angular velocities can be expressed as The two most important results from this approximation are: 15 1. The rollrate in the body fixed system is equal to the inertial system φ = Φ 2. The angular velocity θ around axis y can. be substituted with θ = ψ tan Φ So far no particular assumptions specific for two wheeled vehicles and the locations of the sensors have been made, except that the location of the sensors are fixed relative to the body fixed coordinate system. In order to make further simplifications a simple motorbike 0 model shown in Figure 6A and 6B is established. The model consists of one wheel and a rod perpendicular to the road. Compared to the longitudinal velocity the lateral and vertical velocities are small and are assumed to be equal to zero. This approximation corresponds to v = v - w= w - 0 It is evident from accelerometer models that assuming x = y = z = 0 would simplify the 5 expressions. This approximation can of course be done but in this variety it is focused on the more general assumption x = y = 0. When all approximations and coordinate relations are applied into the accelerometer models new less complex models are obtained. a τ B B v v = uψ - zφ+zψ 2 tan Φ + g sin Φ+5,, a B z = -uψ tm Φ-zψ 2 +ψ 2 tan 2 Φ + cosΦ + δ z Additional Lateral Acceleration Model Additional interpretation of the lateral accelerometer measurement is possible and there is even more information to extract from the lateral accelerometer. i order to reduce the complexity of the system a very simple model is used, wherein flat ground is assumed. Figure 3 shows a force diagram, hi figure 3, R is the curve radius, z the height ground to CoG (centre of gravity) in the local coordinate system, M λ is the torque excerted by the wheels, Φ is the roll angle, ψ the local yawrate, ψ the global yawrate, F { is the virtual force due to acceleration (the centripetal force), and F 2 is the force due to gravity. Furthermore, a steady state model of the wheel torque could be used. For one wheel, the following steady state model is used M λ = Iωψ = I—ψ and for two wheels the following steady state model is used M = ' + — i ϊiψ . According to figure 3, two forces are acting on the centre of gravity (CoG). One of the forces is due to the accelerating coordinate system, F l - muΨ , and the other is due to the gravity, F 2 = mg . The torque M around the origin, O, are now easily calculated according to the following expression: M = F, z cos Φ + F z sin Φ + , = muΨz cos Φ + mgz sin Φ + f - + r = In steady state is = 0 => mgz sin Φ = —muzψ — Kuψ ^> Static Vehicle Dynamics Model A lateral accelerometer attached to the motorcycle measures: a y = uψ +xψ-zφ + xφθ -yψ 2 +ψ 2 )+zθψ + g sin Φ cos θ Assuming that χ= y = φ = φ=E =E = 0 and that θ=θcosφ-ψsmφ^θ =ψt φ gives the measured acceleration: a y -= uψ + zθψ + g sin Φ = uψ + zψ 2 tanΦ + g sin Φ ^ wyΛ + zψ- 2 tan Φ - (l + κ)uψ = zψ 2 ta.n Φ-Kuψ (7) where z > 0 , K > 0 as a consequence of their physical meaning. Assume a left-hand turn and that the bike leans to the left. This results in that the roll angle is less than zero and that the local yaw rate is greater than zero, i.e. φ < 0, ψ > 0. The result is due to the fact that the accelerometer shows a negative value during steady state when driving in a left-hand turn. A similar argument leads to the conclusion that the accelerometer shows a positive value in a right-hand turn. As a conclusion two very interesting results are derived using this simple model. The first is the connection between the sign of the lateral acceleration a y and the second is a new model of the measurement of the lateral acceleration. Firstly the sign of the lateral expression may be expressed as sign[α y )= sign(Φ), and secondly the measurement of the lateral acceleration may be modelled as α y = zψ 2 tanΦ -Kuψ . This embodiment is also called a static roll angle estimator. If the offsets of the accelerometers are negligible or if very rough estimates are good enough, a very simple roll angle estimator can be used. If the offsets are known or estimated the accelerometer signals must be compensated before inserted into the following equations. Assuming that Θ = o => θ = ψ tan Φ , and using this relation in the equation (8) : results in α By - uψA-g sin Φ cos Θ (9) α B , - -uψ tan Φ + g cos Φ cos Θ Combining the expressions for α By and α Bz in (9) results in: α Bz cos Φ + α By sin Φ - g cos Θ = 0 Solve Φ (α Bz > 0 ) which results in If the roll angle is zero (Φ = o) and not influenced by other accelerations than gravity: 0 = 0 + 0 + 2πfl : » = 0 Thus the roll angle, Φ , can be expressed as: Since sign[a y )= sigtι(φ) If flat ground is assumed the expression for the roll angle Φ can ' be simplified to Φ This is perhaps the. most basic algorithm embodiment using only two accelerometers as sensors. Adaptive Vehicle Dynamics Model A more advance embodiment employing an adaptive filter, here exemplified by means of a Kalman filter will now be described. Referring again to Fig 2, the input to the system is data from m accelerometers, n rate gyros and the angular velocity of the front and rear wheel. All sensors in the figure is not necessary for the system to work, hi this embodiment of the system the main focus is on a system using m=2 or m=3 accelerometers and n=l rate gyro. The angular velocity is preferably taken from the front wheel but the rear wheel signal can be used to support the system. When the purpose is to estimate the roll angle there is only one output (k=l) from the system. If other parameters, such as yawrate, pitch angle etc., are estimated and sent out of the system, k is greater than 1. The preprocessing blocks are used to estimate the variance of for instance the signal. If the discrete time signal model can be written as y = h(x), the extended Kalman filter can be applied. Here f, g and h are non-linear functions of the states x k , and z k are the measurements from the sensors. Defining the matrices F, G and H according to: F = \ k dx !*=**'* _dh,,(x)\ XT. i- — 1 v _ k dx I -**'*-' G k = Sk{ χ kik) Then, according to the systems theory, the linearized signal model can be written as **+ι = ***+ G*w t +κ t z k= H k' χ k+ v +yk where yk = hk x klk-\ ) ~ Hlc x k/k-l and The extended Kalman filter equations are x klk ~ x klk-l + Lk L z k ~ hk \ x k/k-l )i : ∑ -ι H k Ω. k €l k =H k '∑ klk _ γ H k +R k ∑ k/k = ∑k/k-l _ ∑ft/fr-l H k [H k ' ∑k/k-l Hk ∑A/t-l ∑/c+l//c = k ∑fc/ft F k +G kQk G k' Initialization is provided by: Σ 0 M = P 0 , χ 0 M = χ 0 . Models of the different accelerometers are derived in the above description. The complete sensor models are: a Bx =u + wθ-vψ + zθ- yψ-xψ 2 +ψ 2 )+ yφθ + zφψ - g sinΘ + δ x a By =v+uψ-wφ + xψ-zφ + xφθ-yifp 2 +ψ 2 )+zθψ + gsinΦcosΘ + δ y (10) a Bz = w+vφ -uθ + yφ - xθ+ xφψ + yθψ - zψ 2 +θ 2 J+ cosΦcosΘ + δ z Where δ x , δ y and<5 z are the sensor offsets. The variables are also related according to the expressions and the expression for the alternative interpretation of the lateral accelerometer (7) α =zψ 2 tanφ-Kuψ + δ y (12) The extended Kalman filter can thus be implemented using (10), (11) and (12). The large number of required states however makes the system somewhat complex. The number of states is easily reduced if approximations are allowed, h order to illustrate the principle of the extended Kalman filter a complete derivation of a simple filter utilizing a vertical and a lateral accelerometer will be described below. Assuming that the ground is flat and having the measurements: α By = u ψ + zψ 2 tan φ + g sin φ + δ y α z - -uψ nΦ - z 2 -^ψ 2 tan 2 φ)+gcosφ + δ z α By - zψ 2 tan φ-Kuψ + δ y The flat ground assumption gives φ = Φ . Introduce states according to x = (xj x 2 x 3 4 x 5 x 6 ) = φ ψ K δ y δ. ) Note that the index above denotes state numbers and not sample numbers as the index k in the extended Kalman filter equations. Using these states, the measurements can be written as: α By\ =gsinx 1 +wx 3 +2X 3 tan ! +x s α Bz — gcosxγ — MX 3 tanx j —z[ x , 2 2 "T , X 2 + tan 2 XΛ + χ Λ 2 Let z = [α α Bz α m ) τ . The measurements can now be written as ( gsm ■ ; +ux 3 +zx 3 2 tanx j + 5 2 = g cos x — UX 3 tan x γ — z\x 2 + ^ 3 tan Xy )+ x 6 : kx) — x 4 ux s +zx 2 tanx j +x 5 Calculation of H' is now straightforward and H' may thus be expressed as gcosx j +zx (l + tan 2 x) u + 2zx 3 tan x, 0 1 0 3 (l + tan 2 x 1 )-2zx 3 ta ,l + tan 2 x,j -2zx 2 -utanx l -2zx 3 tail 0 0 1 (l + tan 2 x, J 0 —x 4 u + 2zx } tan x, -MX, 1 0 where T is the sampling time of the Kalman filter. The continuous time model is where the vector w c describes the process noise of the system. The discrete time equivalent to A is F, arid F is easily derived from A using standard theory for sampled systems. The discrete time equivalent to B is G, and G is easily derived from B using standard theory for sampled systems. An example including a three accelerometers configuration is described below. The equations (11) and (5) were derived earlier and are repeated for the sake of clarity: Θ = θ cosΦ-y^ sinΦ ^ cos Φ + θ sin Φ Ψ = cos Θ (ID Φ = <p + tanΘ (t^ cos Φ + θ sin φ) x : a Bx — ύ - g sin Θ y : a By = uψ + g sin Φ cos Θ (5) z : a Bz = —uθ + g cos Φ cos Θ From (11): θ = Θ ^÷yHanΦ cos Φ Using the first expression in (11) the expressions in (5) can be rewritten as: x : a Bx - ύ - g sin Θ y : a By = uψ + g sin Φ cos Θ -u& . , . _ Λ -? : α Bz = wy n Φ + cos Φ cos Θ cos Φ If the sensor offsets are to be modelled the complete model becomes: x : a Bx ^ w -gsinΘ + δ.,. y : a By ^ M^+ sinΦ cos Θ+δ^, -uΘ . , , ___ Λ . z : α 5z = MyHan Φ + cos Φ cos Θ + o z cos Φ h the expression above δ x is the offset in the longitudinal accelerometer, δ y the offset in the lateral accelerometer and δ z the offset in the vertical accelerometer. In this example the simplest possible expressions have been used. The accuracy is improved if the more complex models for the accelerometers are used. This process is straightforward from the derivation shown here. Selectable Adaptive Filter hi an embodiment employing selectable adaptive filter the Kalman filter approach described above allows sensor fusion from many different kinds of sensors. Provided that a good model for the sensor is known, the new sensor information is used to improve the performance, hi cases when the accuracy of the roll angle estimate using accelerometers is inadequate, the system can be supported by additional sensors in form of rate gyros. A one axis rate gyro measures the angular velocity around an axis. If the purpose is to measure φ,θ or ψ in the positive direction the gyro can be located in three different orientations. Other orientations of the gyro will also work but then the measurements are a linear combination of φ,θ anάψ , which will mcrease the complexity of the system. One difficulty concerning rate gyro is the additive offset, since the offset is not constant but changes with temperature. To attain high precision estimates, the offset must be identified and removed from the signal. This is easily achieved by modelling the measurement as 00 measured = ω t e + g \ > o an( l increasing the measurements in the Kalman filter by one. The number of states have also to be increased by a state describing S^ . When the Kalman filter is used, obvious information from many several accelerometers can be fused. If the sensor models are good, the more sensors used the better the estimate. Assume that an extra lateral accelerometer is attached to the motorcycle. The sensor fusion described below is only meant to illustrate the idea; When a Kalman filter is used this fusion is performed automatically. Locate two lateral accelerometers at different heights, Z \ and z 2 . The measurements become a By\ +ψ 2 )+z l θψ + gsmΦcosΘ l By, = v+uψ- wφ+xψ-z 2 φ+xφθ -yψ 2 +ψ 2 )+z 2 θψ + g sinΦ cos Θ Subtract the signals a By\ -a By2 ={-z 1 +z 2 )φ + (z 1 -z 2 )θψ and the result is: .. a By\ ~ a By2 i . φ = — —-rθψ -2 "\ If the accelerometers are located at different locations, y \ and y 2 , in the vertical direction the accelerometers will measure accelerations according to: hi this way the angular acceleration of the roll rate maybe estimated, illustrating how additional sensors provide extra information. By combining accelerometers in the other directions the same type of expressions may be derived for θ and^ . If two accelerometers are used another kind of expressions can be derived as illustrated below. If the sensors are located at two different positions, Xi and x 2 , in the longitudinal direction the two different accelerometers will measure accelerations according to the expressions: a Bx\ =ύ + wθ-vψ + zθ- yψ -x 1 ψ 2 +ψ 2 )+ yφθ + zφψ - g sin Θ a Bx2 =ύ + wθ -vψ + zθ - yψ -x 2 ψ 2 +ψ 2 )+ yφθ + zφψ - g sinΘ aaΑ-a&a = ( ~ i +^)(^ 2 +ψ 2 ) or: (θ 2 + Ψ 2 )= a ~aBx2 . X 2 —X\ In the same way expressions for different combinations of the sum of squared angular velocities are derived. Further, additional information is provided by a longitudinal accelerometer, and the longitudinal accelerometer is very interesting since it ideally depends only on the slope angle Θ and not on the roll angle Φ . ' The algorithm based on a lateral and a vertical accelerometer is quite robust for bills having a slope less than 20 degrees. The performance can therefore be increased even if only large changes in slope can be detected. The slope estimation algorithm is, of course, based on the expression in (2) x : a Bx =ύ + wθ -vψ + zθ -yψ -xψ 2 +ψ 2 )+ yφθ + zφψ - g sin Θ or simplified expressed as x :a Bx =ύ-g sin Θ The velocity wis estimated using the ABS-signals. From the ABS-system is the angular velocity of the wheel delivered. Preferably is the angular velocity measured on non-driven wheel (front wheel on motorcycles) since it is of better quality due to the fact that the slip is smaller on the non-driven wheel than on the driven wheel. The signal from the driven wheel is also noisier due to the engine. The velocity of the motorcycle is thus calculated as u = ω f R f = ω f [R f<nom + δ f>πom ) where ω f is the angular velocity of the front wheel, R f is the true, but unknown, front wheel radius, R ft „ om is the nominal (guessed) wheel radius and δ f nom = R f -R f nom If the estimation of the slope angle Θ is enabled only when the acceleration of the motorcycle ύ is approximately equal to zero, the slope angle Θ can be estimated as: Θ = - arcsm- Bx 8 If the wheel radius offset is known (estimated) the slope angle Θ can be estimated as: Θ However, the best approach is to use the Kalman filter and model the measurement as: a Bx =ύ-gsinΘ+δ x where δ x is the offset for the longitudinal accelerometer. This approach is also valid for cars, trucks and all other vehicles with at least one free rolling wheel and a longitudinal accelerometer. Furthermore, in the system according to the invention a sensor noise level estimation is provided. The diagonal in the Covariance matrix R in the state space model in the Kalman filter describes the variance of the noise on the measurements. The noise levels on the sensors are not certain to be constant but can be dependent on engine rpm (rotation per minute), gear, velocity, temperature, driver, type of motorcycle etc. order to make a robust system, one option is to estimate the variances and feed it forward into the filter. The embodiment is illustrated in figure 4, thus comprising an input of lateral and vertical accelerometer signals ay and az into an estimate- model stage 402, coupled to an estimate variance stage 404 that generates a variance estimation that is input into an adaptive filter 406, here in the shape of a Kalman filter. The function of the Estimate model block is to estimate a simple signal model from which the residuals can be analyzed. Additional Lateral Accelerator Model Since the motorbike is balancing on two wheels an additional/alternative model of the lateral accelerometer can be derived. The derivation of the normal forces are based on the per se known Euler equations, but here applied in the invention. The new variables I.. :i = X} , x; j = x,y,∑ are components in the inertia tensor and τ t :i-x,y,z are applied torques on the body from the surrounding. Thus m{a Qz y G - a Qy z G y i x φ + m(a 0x z G - a 0z x G )+ I y θ + (l x - I z )φψ + I yz (θφ -ψ)- I xy {θψ + φ)+I xz (φ 2 -ψ 2 )=τ y m{a Qy x G - a 0x y G i ^ (l y - I x )pθ ^ I xz ^ψ - ^- I yz iφψ + θ)+ I y ^ -φ 2 )=τ z The interesting equation for the purposes of the invention is the first equation because it contains information concerning balancing. The model can be simplified a little bit further if assuming that the wheels are not skidding in the lateral direction. As previous: a ϋx = u a 0y = U Ψ Assuming that the coordinate axes are aligned along the principal axes, simplifies the expression to - muψz G + I x ψ + {l z - I y )βψ = τ x The torque τ x is a combination of gravitational forces acting on the centre of gravity of the total driver-motorbike system and gyroscopic effects originating in the fast rotating wheels when turning. This effect is briefly explained in the next section describing steady state cornering. Steady State Cornering A specific model for the lateral accelerometer is directed to the conditions necessary to balance the motorcycle during steady state cornering. The torque on a rotating body in steady precession is M = ΪΩxp where notation according to the simple motorcycle model in Figure 5 is used. On a motorbike, or any other vehicle, this phenomenon arise in the fast rotating wheels. The torque is proportional to the yaw rate, angular velocity and the moment of inertia of the wheel and using the standard notation is the torque on the front wheel from the motorcycle f = If ψz xω f y = -I f ψω f x The torque on the motorcycle from the front wheel has the same magnitude but the opposite direction. fy = ~ff = 1 fψCOfX The consequence is that the fast rotating wheels force the driver to increase the magnitude of the roll angle in order to find an equilibrium. A consequence of this is that the roll angle cannot be estimated by simply integrating the lateral accelerometer signal which is one of the first ideas when attacking the problem. In order to find an expression for the equilibrium the distance from the hub to the centre of mass of driver-motorcycle system, z fτ for the front wheel and z rτ for the rear wheel, must be used. The equivalent balancing forcec from the front wheel acting on the CoM as shown in Figure 7 is calculated as: -I f ψω f τ f = τ f x = z fc zxF yιf y = -z fτ F yf x => F yf =- 'ft Δ f χ If the same procedure is repeated for the rear wheel the total force acting on the center of gravity is F y, τ F yτf +F y v v. According to Figure 7 is the force acting in lateral direction is a combination of the force from gravity and from the wheels. The total lateral force acting on the centre of mass is The torque τ x is calculated as There are now two expressions for τ x , one from the Euler equations and one from the wheel model. The two models are repeated for the sake of clarity τ r = -z, jU ψ\ mgz G cosΘsinΦ σ Z ft r f Z rτ r r τ x = -muψz G + I x φ + (l z - I y )βψ The torque itself is not an interesting parameter for roll angle estimation and is not measured either. Therefore the torque is eliminated by setting the two expressions equal - zuψl - + - - mgz cos Θ sin Φ G = -muψz + I x φ + [I z -I y p ψψ . z ft r f The interesting feature of this expression is more evident when rewriting it on a form making it more similar to the already derived accelerometer models. gcosΘsinΦ G Assuming that Φ G = Φ results in g cosΘsinΦ = Additional Lateral Accelerometer Model All expressions required for the additional accelerometer model are derived and described above. The purpose of this extra model is to provide extra information to the system making estimation of roll angle and sensor offsets using one or two accelerometers possible. The two expressions involved and the result of the substitution is presented below Original accelerometer model: a Bv - v + uψ - wφ + xψ - zφ + xφθ - yψ 2 + ψ 2 )+ zθψ + g sin Φ cos Θ + δ y Model from motorcycle modelling: gcosΘsinΦ σ = uψ /, The two expressions give the final accelerometer model l By ~ v -wφ + xψ - zφ + xφθ — y {φ 2 + ψ 2 The model is then simplified in the usual way assuming that the tires do not slip in the lateral direction V = V =: W = W = 0 sensors located according to x = y = 0 reduce the number of unknown variables using the relation θ = y^tanΦ In order to reduce the complexity of the expressions the constants are substituted according to a, = z + - mz G mz. G The second accelerometer model is then The actual values of the parameters do not need to be very accurate. The expressions for the constants can be seen as good initial values when tuning the algorithm. If simplified versions of the roll angle estimator is to be implemented can the parameter a x and perhaps a 2 be set to zero which reduces the number of states and computational load. Different Embodiments and Implementations When the general expressions for accelerometers and gyros are derived many different sensor configurations can be used to estimate the roll angle. Basically four alternatives are illustrated as examples in this description, thus ranging from one system where one accelerometer is used to the more advanced where two accelerometers and one rate gyro are used. Alternative combinations such as several accelerometers positioned in the same direction, systems using several rate gyros etc. are also easily implemented. In the most general using an extended Kalman filter as illustrated in Figure 2A and 2B. Almost all sensors are optional because of the generality of the Kalman filter. The system according to these embodiments requires the velocity of the motorbike which can be estimated using the angular velocities provided by an ABS often provided as a standard component in modern motorcycles. The angular velocities of both the wheels are required in an embodiment devised to detect skidding or spinning during braking and acceleration. Otherwise the velocity is easily estimated using the angular velocity of one wheel and scaling with the wheel radius. The velocity estimate can also be improved if an additional accelerometer in the longitudinal direction is available. The actual velocity is estimated in any per se known manner the selection of which not being crucial for the function of the inventive system, since the sensitivity to errors in the velocity estimate is small. The general system relies on M accelerometers and N rate gyros. All systems of this kind comprises at least one accelerometer and a velocity estimate. A rate gyro alone cannot be used to estimate the roll angle because of the unknown sensor offset. Estimating the accelerometer offset for a single lateral accelerometer is also difficult and requires a slightly different approach than the other systems. When both types of inertial sensors are used the estimation of the roll angle, rate gyro offset and accelerometer offset is straightforward. The rate gyro have in the experiments been located measuring the roll rate along the longitudinal axis. The gyro can be aligned in any direction and if several gyros are used and aligned in different directions could the performance be improved further. Fig 8 shows schematically four different embodiments 808,809,810,812 each having sensors 802 in specific configurations, a possible pre-filtering stage 804 and an adaptive filter 806, here in the shape of an extended Kalman filter, outputting a roll angle indication signal RAI. The functionality of each sensor and filter configuration is illustrated using diagrams of plotted measurements shown in Fig 9-12 of the roll angle from an experimental test driving on a test track similar to an ordinary road containing hills, crests and valleys. All plots are made from the same test-drive. The complexity of the kalman filter increases with the number of states and measurements. The rule of thumb is that the computational load increases with the number of states squared, h the description below of each system the states used in the current implementation on the motorcycle will be presented. These set of states are not chosen in order to minimize the computational load of the system but rather to make slightly different version of the Kalman filter easy to implement during development. One Accelerometer System The one accelerometer system 808 of Fig 8 is the least advanced of the embodiments. The required signals are a velocity estimate and an lateral accelerometer which is illustrated in the block diagram in Figure 8. When one accelerometer is used to estimate the roll angle the filter will be very sensitive to noise and disturbances. When several sensors are used there is a redundancy in the sensor information giving a more robust system. The states used in the current implementation on the motorbike are x λ : φ , roll angle x 2 : φ , angular velocity roll angle χ 3 : , angular acceleration roll angle x 4 : ψ , yaw rate x 5 : ψ , angular acceleration yaw angle x 6 : δ v , sensor offset lateral accelerometer The applied model using the presented set of states are the matrices The matrix G can be chosen in several ways and two variants are presented here. The difference is how the process noise is modelled. Depending on application and which are different matrices the best choise. Alternative I Alternative II Different choices of G give different characteristics to the estimate. There are three measurements utilized in this state estimator. The two first rows are from the two accelerometer models and the last row is an assumption that the roll angle is measured using a virtual sensor measuring the roll angle. The purpose of the last measurement is to eliminate divergence problems emerging when only the two accelerometer models are used because of the unknown sensor offset. f ux 4 — — βj Linearization is straightforward and is easily made using a suitable computer program like Mathematica or Maple. When the cumputational aspcects are important, during implementation for instance, are there many ways of improving the algorithm. If a slightly simpler model of the accelerometers can be tolerated can the number of states be reduced to three. x λ : φ , roll angle x 2 : ψ , yaw rate x 3 : δ y , sensor offset lateral accelerometer The matrices are then ux 2 + z y x 2 tan x λ + g sin x l + x 3 h = This implementation has approximately the same performance as the seven state system when matrix G chosen as in the second variant presented above. Using this simplified version is are the number of calculations drastically reduced. Computational advantages lies not only in the smaller matrices but also that the F matrix is the identity matrix and G a constant T times the identy matrix. There are three measurements in this state estimator. The first two are from the two lateral accelerometer models and the last is an assumption that the roll angle is measured using a virtual sensor measuring the roll angle. This last measurement is modelled to be zero but with a large uncertainty. The purpose of the virtual measurement is to eliminate divergence problems emerging when only the two accelerometer models are used. The virtual measurement introduces an assumption about the road because the model is poor if driving in circles. There are a number of varieties of the invention designed to computationally improving the algorithm. If a slightly simpler model of the accelerometer can be tolerated the number of states can be reduced to three. χχ i φ , roll angle x 2 : ψ , yaw rate x 3 : δ y , sensor offset lateral accelerometer This implementation has approximately the same performance as the six state system. By using this simplified version, the number of calculations are drastically reduced since the number of states are halved. The roll angle estimate using the one accelerometer system is plotted in figure 9 showing the performance. It is obvious that there is a clear correlation between the estimate and the reference angle. The largest error originates in the sensor offset estimate. The advantages of this embodiment is that it has few sensors, entails a small computational load and embodies an automatic sensor calibration. Possible drawbacks that are relieved in the other embodiments are a relative sensitivity to disturbances, a somewhat noisy estimate, relatively slow speed in computation, fairly large errors and a relatively slow tracking of sensor error. Two Accelerometer System Fig 10 shows in a similar way the performance of a two accelerator system. The diagram is self explaning and it is obvious that the roll angle estimate closely follows the reference. To illustrate the function and different types of implementations the following states are used ] : φ , roll angle χ 2 . Φ , roll velocity χ 3 : φ , roll acceleration x 4 : ψ , yaw rate χ 5 : Ψ , yaw acceleration x 6 : δ y , sensor offset lateral accelerometer x 7 : δ. , sensor offset vertical accelerometer The applied model using the presented set of states are the matrices 1 T T 2 /2 0 0 0 0 0 1 T 0 0 0 0 0 0 1 0 0 0 0 F = 0 0 0 1 T 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 The matrix G can be chosen in several ways and two variants are presented here. The difference is how the process noise is modelled. Depending on application different matrices seems to be the best choice. Alternative I Altern∑ ιtiv( sπ The accelerometer models is then ux 4 -z„x 3 +z y x 4 an ! +gsinx 1 +x 6 h = ( x 2 2 + x 4 2 tan" ] ) I+ g cos [ ■ - ] X 3 + a 2 x 4 ta x ! — ux 4 I MC + x 6 Linearization results in 0 ~ z y u + 2z y x 4 t ιx 1 0 1 0 sin x 0 - u tan x l - 2z z x 4 tan 2 x λ 0 0 1 0 - fl ι 2a 2 x 4 tan x x - uI MC 0 1 0 When the system is implemented the number of states can be reduced to four if the computational load shall be reduced. The states are then chosen as x x : φ , roll angle x 2 : ψ , yaw rate x 3 : δ y , sensor offset lateral accelerometer x 4 : δ z , sensor offset vertical accelerometer and the alternative implementation is straightforward using the information from the presented implementation. This implementation will have the same perforaiance as the seven state system when matrix G is chosen as in the second variant. One Accelerometer and one Rate Gyro Fig 11 shows again in a similar way the performance of a one accelerator and one rate gyro system. The diagram is self explaning and it is obvious that the roll angle estimate closely follows the reference even more closely. The used states are x j : φ , roll angle x 2 : φ , roll velocity x 3 : φ , roll acceleration x 4 : ψ , yaw rate x 5 : ψ , yaw acceleration x 6 : δ y , sensor offset lateral accelerometer x 7 : δ gj , ro , sensor offset longitudinal gyro The applied model using the presented set of states the matrices are The matrix G can be chosen in several ways and two variants are presented here. The difference is how the process noise is modelled. Depending on application are different matrices the best choice. Alternative I Alternative JJ The accelerometer models are then Linearization results in When the system is implemented the number of states can be reduced to four if the computational load is to be reduced. The states are then chosen as xf. φ , roll angle x 2 : ψ , yaw rate x 3 : δ y , sensor offset lateral accelerometer x 4 : δ^ , sensor offset longitudinal gyro and the alternative implementation is straightforward using the information from the presented implementation. This implementation will have the same performance as the seven state system when matrix G is chosen as in the second variant. Two Accelerometers and one Rate Gyro Fig 1 shows again in a similar way the performance of a two accelerator and one rate gyro system. The diagram is self explaning and it is obvious that the roll angle estimate closely follows the reference even more closely. The used states are x y : φ , roll angle x 2 : Φ , roll velocity x 3 : , roll acceleration x 4 : ψ , yaw rate χ 5 : ψ , yaw acceleration χ 6 : δ y , sensor offset lateral accelerometer χ n : δ z , sensor offset vertical accelerometer x 8 : δ syro , sensor offset longitudinal gyro The applied model using the presented set of states are the matrices 0 1 T 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 F = 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 The matrix G can be chosen in several ways and two variants are presented here. The difference is how the process noise is modelled. Depending on application different matrices are the best choice. Alternative I tei -native : II T 0 0 0 0 0 0 0 0 0 0 0 0 .0 0 0 T 0 0 0 G = 0 0 0 0 0 0 0 T 0 0 0 0 0 T 0 0 0 0 0 T The model for the measurements is then ux 4 — z y x 3 + z y x 4 tan x l + g sin x λ + x 6 - MX 4 tan j (x 2 + x tan 2 x l J+ g cos j + x 7 ~ fJiX " * r t&π j — UXΛ L Q " g n T o Linearization results in When the system is implemented the number of states can be reduced to four if the computational load is to be reduced. The states are then chosen as χ γ : φ , roll angle x 2 : ψ , yaw rate χ 3 : δ y , sensor offset lateral accelerometer χ 4 : δ z , sensor offset vertical accelerometer and the alternative implementation is straightforward using the information from the presented implementation. This implementation will have the same performance as the seven state system when matrix G is chosen as in the second variant. The system according to the present invention further includes a computer program product comprising means devised to direct data in a data processing system to perform the steps and the functions of the previously described methods and apparatuses. The invention has been described by way of a number of exemplifying embodiments and different models applicable within the inventive concept as defined in the claims.

Claims: Claims 1. A method for estimating the roll angle of a two- wheeled vehicle, comprising the steps of : receiving as an input a vehicle velocity signal; receiving as an input a vehicle lateral acceleration signal generated by a sensor detecting a vehicle acceleration comprising a component relating to the lateral movement of the vehicle and a component relating to the gravitational effect; estimating first parameter values of an adaptive filter based on a predetermined model on the vehicle dynamics dependent on the vehicle velocity signal and the vehicle lateral acceleration signal; calculating, dependent on said first model parameter values, a roll angle indication value (φ) being dependent on and indicative of the roll angle of the vehicle. 2. A method for estimating the roll angle of a two- wheeled vehicle, comprising the steps of : determining the a parameter dependent on velocity of the vehicle; deteπnining the a parameter dependent on lateral acceleration of the vehicle as a combination of the lateral movement of the vehicle and the effect of the gravitation; calculating a roll angle indication value dependent on the vehicle velocity and on the lateral acceleration of the veliicle. 3. A method for estimating the roll angle of a two-wheeled vehicle, comprising the steps of measuring the angle of the two- wheeled vehicle in relation to the gravitational field. 4. The method as recited in any of the preceding claims, further comprising the step of estimating filter parameters of an adaptive filter based on a predetermined model on the vehicle dynamics by means of a Kalman filter. 5. The method for estimating the roll angle of a two- wheeled vehicle as recited in any of the preceding claims, comprising the steps of: filtering a sensor signal indicating a vehicle dynamics parameter such that vehicle operation disturbances are attenuated; reducing the data rate of the sensor signal. 6. The method as recited in any of the preceding claims, further comprising a filtering stage devised to attenuate sensor signal components not dependent on the roll angle of the vehicle. 7. The method as recited in any of the preceding claims, further comprising the step of reducing the data rate in a sampled sensor signal. 8. The method as recited in any of the preceding claim, further comprising the steps of reducing the data rate in the sampled discrete sensor signal by low pass filtering said the discrete sensor signal and by selecting equidistant samples for further data processing. 9. The method as recited in any of the preceding claim, further comprising in the adaptive filter model a parameter dependent on the roll angel acceleration. 10. The method as recited in any of the preceding claim, further comprising in the adaptive filter model a parameter dependent on the angular velocity in the rotation of the vehicle. 11. The method as recited in any of the preceding claim, further comprising in the adaptive filter model a parameter dependent on the longitudinal velocity, the angular velocity in the rotation of the vehicle, the total mass of the vehicle and the moment of inertia of the vehicle wheels. 12. The method as recited in any of the preceding claim, further comprising in the adaptive filter model a parameter indicating the offset of the sensor signal. 13. The method as recited in any of the preceding claim, further comprising the step of determining a parameter dependent on the vertical acceleration of the vehicle. 14. The method as recited in any of the preceding claim, further comprising the step of determining a parameter dependent on the velocity of the rotation of the vehicle. 15. Method for determining the roll and pitch angle of a two-wheeled vehicle, comprising the steps of: - determining the vertical acceleration α z of the two- wheeled vehicle; - determining the lateral acceleration a y of the two- wheeled vehicle; - deteπnining the longitudinal acceleration a x of the two- wheeled vehicle; - determining the angular velocity around the forward axis (x ) of the two- wheeled vehicle, φ ; - determining the longitudinal speed of the two- wheeled vehicle; - determining the pitch angle Θ of the two-wheeled vehicle with respect to the horizontal plane dependent on said accelerations and said longitudinal speed preferably dependent on the longitudinal acceleration a and the longitudinal speed; - determining the roll angle Φ of the two- wheeled vehicle with respect to the gravitational field dependent on the sum of said pitch angle Θ and on said vertical and lateral accelerations (a z , a y ). 16. Method for determining the roll angle of a two- heeled vehicle, comprising the steps of: - determining the vertical acceleration a, of the two-wheeled veliicle; - preferably determining the lateral acceleration a y of the two-wheeled vehicle; - optionally determining the longitudinal acceleration a x of the two-wheeled vehicle; - optionally determining the longitudinal speed u of the two-wheeled vehicle; - optionally determining the angular velocity around the forward (x ) axis, φ ; - optionally determining the pitch angle Θ with respect to the horizontal plane dependent on the said accelerations and said longitudinal speed preferably dependent on the longitudinal acceleration a x and longitudinal speed. 17. A method for determining the roll angle of a two- wheeled vehicle, comprising the steps of: - determining the vertical acceleration a v of the two-wheeled vehicle; - preferably determining the roll angular velocity around the forward ( ) axis, φ ; - optionally determining the longitudinal acceleration a x of the two-wheeled vehicle; - optionally determining the longitudinal speed u of the two-wheeled vehicle; - optionally determining the pitch angle Θ with respect to the horizontal plane dependent on the said accelerations and said longitudinal speed preferably dependent on the longitudinal acceleration a x and longitudinal speed. 18. Method for determining the pitch angle of a two-wheeled vehicle, comprising the steps of: - determining the longitudinal acceleration a x of the two-wheeled vehicle; - determining the longitudinal speed u of the two- wheeled vehicle; - determining the pitch angle Θ of the two-wheeled vehicle with respect to the horizontal plane dependent on said longitudinal acceleration and said longitudinal speed u . 19. The method as recited in any of the preceding claims, wherein the roll angle is determined by means of the equation: 20. The method as recited in any of the preceding claims, wherein the roll angle is determined by means of the equation: 21. The method as recited in any of the preceding claims, wherein the pitch angle is determined by means of the equation u — a . Θ = arcsin — where ύ is the longitudinal acceleration of the vehicle. 22. The method as recited in any of the preceding claims, wherein the roll angle is determined by means of a Kalman filter or an extended Kalman filter. 23. The method as recited in any of the preceding claims, wherein the yaw rate is determined by means of the Kalman filter or the extended Kalman filter. 24. The method as recited in any of the preceding claims, wherein the sensor offsets are determined by means of the Kalman filter or the extended Kalman filter. 25. A system for determining the roll angle and pitch angle of a two- wheeled vehicle, said system comprising means for performing the steps and functions comprised in any of the preceding claims. 26. A computer program product comprising means devised to direct data in a data processing system to perform the steps and the functions of any of the preceding claims.

Inventors: DREVOE MARCUS, FORSSELL URBAN, GUSTAFSSON FREDRIK, DREVOE, MARCUS, FORSSELL, URBAN, GUSTAFSSON, FREDRIK
Applicants: DREVOE MARCUS, FORSSELL URBAN, GUSTAFSSON FREDRIK, NIRA DYNAMICS AB, DREVOE, MARCUS, FORSSELL, URBAN, GUSTAFSSON, FREDRIK
Application year: 2001
Main classification: G01B11
IPC codes: B60T8, B62J27