GPS-aided INS Solution for OpenPilot Dale E. Schinstock Kansas State University

SYSTEM MODEL:     f ( x , u , w) - nonlinear state equations   h (x ) - nonlinear measurement equations F - system matrix from linearization G - input matrix from linearization H - measurement matrix from linearization  x - state vector  P  Px Py Pz T - position vector in the NED (North-



East-Down) Earth fixed frame  V  V x V y V z T - velocity vector in the NED earth





fixed frame  q  q0 q1 q2 q3T - attitude vector as a unit quaternion  b  bx by bz T - rate gyro bias vector





g - Earth’s gravitational acceleration    u  m am  - input vector  a  a x a y a z T - true acceleration vector in the body







fixed frame



  x  y z

T









the body fixed frame



Φ - state transition matrix Γ - discrete time input matrix T - period of prediction step

Q  diag ( 2 , 2 , 2 , a2 , a2 , a2 , b2 , b2 , b2 ) x y z x y z x y z

2 R  diag ( P2x , P2y , P2z , V2x , V2y , V2z , B2 x , B2 y ,  B2 z ,  Alt ) -

measurement noise covariance matrix

SYSTEM MODEL The dynamic system model developed here is a kinematic model for a six DOF rigid body with position and velocity represented in an inertial coordinate frame (Earth fixed) and angular velocity and acceleration in a body fixed frame. Because it is a kinematic model, it is applicable to any vehicle, independent of the specific dynamics of that vehicle. In addition to the dynamic state variables, the state vector also includes bias states for sensors, which are modeled dynamically as simple random walks. The development of the system model will make use of two matrices that are stated here without derivation. The first of these matrices is the rotation matrix as a function of the unit quaternion.

- true rotational rates vector in the

body fixed frame  wa - acceleration sensor noise vector  w - angular rate sensor noise vector  wb - noise vector for bias random walks     T - process noise vector w  w T wa T wbT T v - measurement noise vector  am  amx amy amz T - measured acceleration vector in 

   k - discrete time version of a vector 

plant/disturbance noise covariance matrix Pk - state estimate error covariance matrix K - Kalman gain matrix

NOMENCLATURE



EXTENDED KALMAN FILTER IMPLEMENTATION:

m  mx my mz



T

- measured rotational rate

vector in the body fixed frame R eb - rotation matrix rotating vectors in the body fixed frame to the earth fixed frame Ω - matrix responsible for converting angular rates in the body fixed frame to quaternion rates Ab - barometric altitude measurement Be - magnetic vector in Earth frame Bb - magnetic vector measurement in body frame  z - measurement vector  y - prediction of measurements from the state vector

 R1,1   R be (q )   R2,1  R3,1 

R1,2 R2,2 R3,2

R1,3   R2,3  R3,3 

(1)

where R1,1  q0 2  q12  q 2 2  q3 2

R1,2  2(q1q 2  q 0 q3 ) R1,3  2(q1q3  q 0 q 2 ) R2,1  2(q1q 2  q 0 q 3 ) R 2, 2  q 0 2  q1 2  q 2 2  q 3 2

R2,3  2(q 2 q3  q 0 q1 ) R3,1  2(q1q3  q 0 q 2 ) R3,2  2(q 2 q3  q 0 q1 ) R3,3  q 0 2  q1 2  q 2 2  q 3 2

It is worthwhile to note that the inverse of the rotation matrix is its transpose, Rbe1  R eb  RbeT . The second of these matrices is used in the “strapdown” equation,    q  Ω ( q ) / 2 , to relate the body axis angular velocity to the unit quaternion rates.

  q1 q 0 Ω( q )    q3   q 2

 q2  q3 q0 q1

 q3  q 2   q1   q0 

(2)

While (5) captures the kinematics of a rigid body, it is not in the proper form for state equations. State equations should be written as a function of the states, inputs, and process/disturbance noise.      x  f ( x , u , w)

This can be accomplished by solving (4) for the true angular velocity and acceleration.

STATE VARIABLES The state variables estimated by the INS/GPS system are the position, velocity, attitude (unit quaternion), and rate gyro biases.

 P    V  x   q  b   

(3)







   a  am  wa  R be 0 0 g T

Then plugging these into (5) gives the state equations as    T a function of the states, the inputs u  mT amT , and     T the process noise w  wmT waT wbT .





INPUTS The true inputs to the dynamic system, i.e. the kinematic system, are the true angular velocity and acceleration vectors. However, we are modeling the INS as dynamic system, which uses measurements of these vectors that include noise, biases, and gravity.        w  b     u   m       T  am  a  wa  R be 0 0 g  



  m  w  b

(4)





   V  P          T      V  R eb (q )  am  wa   0 0 g  f ( x , u , w)         1     Ω(q )   m  w  b  q    2  b    w    b 





(6)

OUTPUTS Here, the accelerometer measurement includes earth’s gravitational acceleration rotated into the body fixed frame with R be . Also, without loss of generality, the sensor noise is shown here as subtractive rather than additive. This is done purely for convenience in the state equations developed below, where it will become additive.

STATE EQUATIONS The state equations are the derivatives of the state variables. In general, these equations are nonlinear functions of the state variables and inputs.

  P     V x      q  b  

  V       R eb a     1    Ω  2    wb 

(5)

The first three vector equations in (5) are kinematic equations for a six DOF rigid body. The last vector equation, for the bias states, is a random walk used to model in a simple manner the dynamics of states that vary slowly in a random way .

The outputs of the dynamic system model are variables that are measured by sensors to be used in the correction steps. They must be formed as a function of the state variables.   P   P       V   V    y  h ( x)       (7)     Bb  R be (q ) Be   Ab    P  z    

Here, the magnetic field in the body frame is expressed as function of the constant magnetic field in the Earth frame and a rotation matrix that is a function of the quaternion. The barometric altimeter output is simply the negative of the down component from the position vector. There is a measurement vector from the sensors corresponding to the output vector with the addition of sensor noise.    z  yv   The difference between these two vectors, z  y , is used in the feedback of the correction steps to correct the states predicted in the prediction steps through numerical integration.

 H   0 0

LINEARIZATION To implement the EKF it is necessary to linearize the state equations at each calculation of the prediction step and to linearize the output equations at each calculation of the so correction step so that the KF equations can be used. This linearization results in equations for the following Jacobian matrices,  f F  x  f G  w  h H  x Calculating the partial derivatives in the elements of F gives 0 3 x3 I 3 x 3  F  010 x6 

03x7  FVq 0 3 x3   Fqq Fqb  0 3 x 7 

(8)

where  FVq 0  FVq   FVq3 F  Vq 2

FVq1  FVq 2

FVq 2 FVq1

 FVq3

 FVq 0

FVq3   FVq 0  FVq1 

FVq1  2(q1amx  q2 amy  q3amz ) FVq3  2(q3amx  q0 amy  q1amz )

Fqq

by  my  z  bz

bz  mz

0

 y  by

bx  mx

bz  mz  by  my   x  bx   0 

and

1  Fqb   Ω(q ) 2 Calculating the partial derivatives in the elements of G gives

03 x9      03 x 3 R eb (q ) G  0 7 x3    Ω( q ) / 2 0 4 x 3  03 x 6 I 3 x3 

(10)

where  H Bq 0 H Bq1 H Bq 2  H Bq   H Bq 3  H Bq 2 H Bq1  H Bq 2  H Bq 3 H Bq 0  H Bq 0  2(q0 Bex  q3 Bey  q2 Bez )

H Bq3    H Bq 0  H Bq1 

H Bq1  2(q1Bex  q2 Bey  q3 Bez ) H Bq 2  2(q2 Bex  q1Bey  q0 Bez ) H Bq3  2(q3 Bex  q0 Bey  q1Bez )

EXTENDED KALMAN FILTER IMPLEMENTATION A general description of the EKF and KF are beyond the scope of this discussion. However, a couple of details about the specific implementation here might be important in relating the algorithms to more general EKF equations found in many sources. The KF algorithm is ultimately a discrete time algorithm. At its root it is based on a very simple discrete model of the system. (31)

 The discrete time disturbance/process noise vector, wk , is assumed to be white and to have a noise covariance  matrix, Q . The measurement noise, vk , is assumed to be white and have a noise covariance matrix, R . The fact that these are discrete time noise processes does not present a problem because the sensors are ultimately sampled in discrete time. In fact this is a benefit because it is possible to directly estimate the noise variance from data samples. The implemented computer algorithm does make the simplifying assumption that these matrices are diagonal, i.e. the noise on each of the sensors is independent.

FVq 2  2(q2 amx  q1amy  q0 amz )

bx  mx 0

06 x 7  H Bq 03 x3  01x 7 

   xk  Φxk 1  Γwk 1    zk  Hxk  vk

FVq 0  2(q0 amx  q3amy  q2 amz )

0    b 1 x x   2  y  by   z  bz

I6 x6 03 x 6  1 01x3

Our model is a continuous time model. Therefore, we must therefore use some discrete time approximations for implementation. We use the following first order approximations.

Φ  I  FT (9)

Calculating the partial derivatives in the elements of H gives

Γ  GT The INS numerically integrates the inputs, i.e. the acceleration and angular rate measurements, to obtain estimates of position, velocity and orientation. The prediction step of the EKF uses the output of the INS, and also predicts the growth of covariance of the state estimate error. This covariance is a running approximation of the our confidence in the estimated

state. The size of this covariance, and hopefully the true error in the state estimate, is reduced in the correction steps where we incorporate other sensors in a feedback loop.

PREDICTION STEP      t xk  xk 1  t k f (xk 1, uk 1) dt k 1

(p1)

normalize quaternion calculate F and G

(p2) (p3)

Pk  (I  FT) Pk 1 (I  FT) T  T 2GQG T

(p4)

K  Pk HT (HPk HT  R)1     xk  xk  K ( zk  yk ) Pk  Pk  KHPk normalize quaternion

REFERENCES [1] Grewal, M.S., A.P. Andrews, Kalman Filtering, Theory and Practice Using MATLAB, John Wiley and Sons, Inc., 2001 [2] Farrell, J.A., M. Barth, The Global Positioning System & Inertial Navigation, McGraw Hill, 1999

INS/GPS ALGORITHM

CORRECTION/UPDATE STEP calculate H  calculate yk serial update

each of the measurements is assumed to be uncorrelated, i.e. the covariance matrix, R , is diagonal.

(c1) (c2) (c3)

(c4)

Step (p1) is completed in RungeKutta(X,U,dT). It impIements a numerical integration with a fourth order Runga Kutta algorithm through function calls to StateEq(X,U,Xdot), which implements (6). Step (p3) is completed in LinearizeFG(X,U,F,G). It implements (8) and (9) Step (p4) is completed in CovariancePrediction(F,G,Q,dT,P). It estimates the growth in the covariance of the state estimate error due to the process noise. Step (c1) is completed in LinearizeH(X,Be,H). It implements (10) . Step (c2) is completed in MeasurementEq(X,Be,Y). It implements (7) . Step (c3) is completed in SerialUpdate(H,R,Z,Y,P,X,SensorsUsed). While it implements the equivalent of the equations shown in this step, it does so with a very different algorithm. The equations are implemented in a serial update algorithm treating each scalar measurement separately [1, ch 4.2][2, ch 4.5]. This avoids finding the matrix inverse by replacing it with scalar divisions. It is computationally efficient and numerically stable. Furthermore, it allows any chosen subset of sensors to be used in a single correction step. The use of this serial update algorithm is possible because the noise for

T - GitHub

Page 1. GPS-aided INS Solution for. OpenPilot. Dale E. Schinstock. Kansas State University. NOMENCLATURE. SYSTEM MODEL: ),,( wuxf....

76KB Sizes 51 Downloads 260 Views

Recommend Documents

H ?-,
Page 1. -ax. A. * * r - t. ". X. 1. -. 1 |l i. » &. A II et X. O j x: .0. 4: < —. | 1. O. CO. |. 2 *. •H ? I n rit. X s;. _t_ x. " rf. •^

Example 2.1 Let F0(t) - GitHub
(a) A newborn life survives beyond age 30. (b) A life aged 30 dies before age 50, and. (c) A life aged 40 survives beyond age 65. Solution: (a) The required ...

7*4 «%> ""T *v - GitHub
7*4 «%> ""T *v . ..I &uf>

John T. Foster: Curriculum Vitae - GitHub
May 9, 2017 - Published. 24. H. Ouchi, A. Katiyar, J.T. Foster, and M. M. Sharma. ..... Blog. Contains various useful code snippets, examples, and resources ...

Computing Extremely Accurate Quantiles using t-Digests - GitHub
6. TED DUNNING AND OTMAR ERTL bins and the t-digest with its non-equal bin .... centroids plus a number of calls to sin−1 roughly equal to the size of the result and thus ..... The left panel shows the size of a serialized Q-digest versus the.

TECHNISCHE UNIVERSITÄT MÜNCHEN Thesis title - GitHub
Page 5. Abbreviations and Acronyms. HOPE. Hold On, Pain Ends iv. Page 6. Abstract v. Page 7 ... 1. List of Figures. 3. List of Tables. 4. Bibliography. 5 vi. Page 8 ...

T t #T]
Jan 10, 2012 - sonal and business communications. Cellular telephones ... system including the 450 MHZ, 900 MHZ, 1800 MHZ and. 1900 MHZ frequency ..... the netWork using a unique personal identi?cation number or. PIN associated ...

T t #T]
Jan 10, 2012 - sonal and business communications. Cellular telephones ... access the Internet Via a cellular netWork and/or a Wireless local area netWork ...

( ) ( )t ( ) ( )t
What is the main draw back of delta modulation and explain how it is eliminated · in Adaptive delta modulation with the help of block diagram and waveforms. 8. a) Explain the major goals of packet switching. b) Give the characteristics of computer co

4 -t-t- 4 . . .
Pollution & Control: Classification of pollution, Air Pollution: primary and secondary pollutants, Automobile and lndustrial pollution, Ambient air quality standards. Water pollution: ... Wendell P. E|a.2008 PHI Leaming Pvt. Ltd. ... INDIA edition.

4 -t-t- 4
BJT Amplifiers and MOS Amplifiers · BJT Amplifiers - Frequency Response: Logarithms, Decibels, General · BJT Amplifier, Analysis at · bypass Capacitors, The.

t
remaining life of the item given its age and internal condition. We concentrate in a single- ... We then present a case study from a mining application. We conclude the article, identifying areas for further development and providing some final remar

O :Utl'lJ1m.J Iv
... U"U~tl~U'lULfl1J~ 79/1 t.13J~ 3 pj1tJ~"'1~tI~1 ti1L11flw.ifl1 (~t.11'1il. ~111U nr~'I.t1'l1!ruti51140 t.,,1AT411 095 - 414 - 6276 E-mail [email protected] ...

O :Utl'lJ1m.J Iv
finLnnL'VIn1i'fIt j;1Ltt'iln L!J1'}1fUflLflU. 1111114fit aJlI.ufili'1:::~U., ... jU~13-1 u.fl~~U'U~'fW1t;l tlVl{J tI ntlt){J LLi~::L"lI ~1 Ln tJ11111.(1[n IJ..fl~itJ'l'l".ilU'YI).j.

Page 1 Tº TLITE TITTºº FTſº-TTF Z-FTTTLLTTTT-T-I-T-T- -TTL-TI-T-T-I-T ...
covered with white clouds. Hand-fochiband mo, njou nati,. So frogront are the flowers of the mondarin! Nöki no dydnermo, Kaoru nati,. So sweet are irises.

GitHub
domain = meq.domain(10,20,0,10); cells = meq.cells(domain,num_freq=200, num_time=100); ...... This is now contaminator-free. – Observe the ghosts. Optional ...

GitHub
data can only be “corrected” for a single point on the sky. ... sufficient to predict it at the phase center (shifting ... errors (well this is actually good news, isn't it?)

10 cos 3 cos x t w t = + w t ,
iii) What is meant by hamming distance? b) Consider a (7, 4) block code whose generator matrix is: i). Find H, the parity check matrix. ii). Compute the syndrome ...

T-Buy
Nov 14, 2017 - Prachuabkirikhan 77110. Tel. 0-3252-3270. THA PHRA. 99 The Mall Thapra Mall Building,. 9th Floor, Ratchadapisek Road, Bukkalo, Thonburi,.

t- 2015
Sep 23, 2015 - Chief, CID/SGOD. Education Program Supervisors. Public Schools District Supervisors. Public Secondary Schoo Heads. FROM: MANUELA S.

C7-t:-ST-13: -.2.-t-2t11'..
Sep 22, 2015 - Please be informed that there will be a meeting of the Araling Panlipunan. Cluster Coordinating Teachers ... Conference Room. Agenda of the meeting are as ... Phone: 046-432-9355, 046-432-9384 I Tele-Fax: 046-432-3629.

t? sf, a 8"i 3.t
s3,, A1e015085 i'ti;Al{ ltIK*t-tI s*1. A1c0150s5 r,rur{ AIKAR HA$*rdr i. ; i .sO : 55* Arcols$s6 BUH" Rrsxr. ;. ; i +a. 36" Alcotsoar NUHAT4AD RrFArsr AgtcARI i.

T wwgmm
ure accurately the angular acceleration of objects at low rates, to do which ... per second on upwardly, but not at a rate lower than ten. c.p.s. Other ..... Apr. 1, 1953.