**5.3 Field experiment**

Using the methods introduced in Section 4 and the sensor module selected in Section 5.1, several experiments have been conducted at different paces in different places and different times. Most of these experiments are two-dimensional (2D) tests.

The Application of Magnetic Sensors in Self-Contained Local Positioning 81

where the *n* vector, **x***k*, is called the state of the system at time *k*, **u***k*-1 is a *p* vector of deterministic inputs and **w***k*-1 is the system noise at time *k*-1. **F***k*-1 is an *n*×n state transition matrix from time *k*-1 to time *k*, known as the system matrix, and **B***k*-1 is an *n*×*p* system input matrix. **F***k*-1 and **B***k*-1 are constant or time varying matrices. The system (or process) noise **w***<sup>k</sup>*

The vector **x***<sup>k</sup>* contains all the information regarding the present state of the system, but cannot be measured directly. Instead, only the system's *m* vector, **z***k*, is available. This measurement vector is a linear combination of the state, **x***k,* that is corrupted by the measurement noise **v***k*.

where **H***k* is an *m*×n measurement matrix. The measurement (or observation) noise, **v***k*, has

The Kalman filter for the system described here seeks to provide the best estimates of the states, **x***k*, using the measurements, **z***k*, model of the system provided by the matrices **F***k*, **B***<sup>k</sup>* and **H***k*, and knowledge of the system and measurement statistics given in the matrices

From (23) and (24), we can recognize that Kalman filter is a recursive filter: only the state of last time step and the current measurement are used. The estimation is conceptualized as two distinct phases, "Predict" and "Update", described by two distinct set of equations. In the first phase, the prediction is based on previous best estimate. The result is called *a priori* state estimate. In the second phase, the updating is done based on the *a priori* state estimate with new measurement. The result is *a posteriori* state estimate. The two set of distinct

Predicted (*a priori*) state estimate is the best estimate of the state at time *k*-1, denoted as **x***k*-1/*k*-1. Since the process noise, **w***k*-1, is normally distributed with zero-mean, the best prediction of

while the predicted (*a priori*) estimate covariance at time *k* predicted at time *k-*1, is given by

On the arrival of new measurement **z***k*, at time *k*, it is compared with the *a priori* state estimate of the measurement. The measurement is then used to update the prediction to

generate a best estimate, i.e., the *a posteriori* state estimate at time *k-*1:

is normally distributed with zero mean and a power spectral density of **Q***k*-1.

This can be expressed in terms of the system state by the following equation:

zero-mean and is normally distributed, with power spectral density **R***k*.

**Q***k* and **R***k*.

is given by

equations are as below: **The prediction process** 

**The measurement update** 

**x Fx Bu w** *k kk k k k* 11 1 1 1 (23)

**z Hx v** *k kk k* (24)

*kk k k k* / 1 1 1/ 1 **x Fx** (25)

<sup>T</sup> **P FP F Q** *kk k k k k k* / 1 1 1/ 1 1 1 (26)

/ /1 / 1 [ ] **x x K Hx z** *kk kk k k kk k* (27)

Fig. 8. Tracking the walk on a J-shaped path at a park

In the setup of experiments related to Fig 8, the walk is along an outdoor J-shaped path near a playground. The plotted trace recorded is similar to the actual path walked.
