sensors kalman filters

Upload: abdullahnisar92

Post on 04-Jun-2018

228 views

Category:

Documents


1 download

TRANSCRIPT

  • 8/14/2019 Sensors Kalman Filters

    1/25

    KALMANFILTERINGOFSENSORDATA

    - Nilofer Mehta

  • 8/14/2019 Sensors Kalman Filters

    2/25

    INTRODUCTION

    Why do we need sensors in UbiComp?

    Because we need to understand context Humans interacting with humans have a complex

    contextual understanding

    On the other hand when computers interact with

    humans, the complex context needs to be understood

    by the computer for taking accurate actions

    Sensors are used for this purpose

  • 8/14/2019 Sensors Kalman Filters

    3/25

    INTRODUCTION

    Measured sensor data usually consists of noise

    which reduces accuracy In order to get accurate estimates of the true

    value, the sensor data needs to be filtered

  • 8/14/2019 Sensors Kalman Filters

    4/25

    FILTERING

    A good filtering algorithm can eliminate noise

    from the data and retain useful informationVarious types of filters are used in UbiComp

    Example:

    Kalman Filter

    Hidden Markov Model

  • 8/14/2019 Sensors Kalman Filters

    5/25

    KALMANFILTER

    It is an optimal recursive data processing

    algorithm Optimaldepends on the criteria chosen to

    evaluate the performance

    Recursivesince it does not require storage of all

    previous data. It also does not require the

    previous data to be reprocessed

  • 8/14/2019 Sensors Kalman Filters

    6/25

    KALMANFILTERBASICS

    The underlying concept of Kalman filter is a

    discrete time linear dynamic system This system depends on the following two

    equations:

  • 8/14/2019 Sensors Kalman Filters

    7/25

    Xkis the state of the system at time k. It is based on the

    state of the system at time k-1.

    Xkis simply defined by its position, velocity and

    acceleration.

    A is in the form of a matrix. It is an operation used to

    calculate the current state of the system from the

    previous state with assumption of constant acceleration.

  • 8/14/2019 Sensors Kalman Filters

    8/25

    Zkis the measured value of the system and it relates to

    the calculated value Xk.

    In a perfect world, Zk= Xkand B is an identity matrix.

    But in real life applications there is always a noise

    factor called the Gaussian noise (vkand wk).

  • 8/14/2019 Sensors Kalman Filters

    9/25

    Kalman filter has two phases:

    PREDICTPredicts the state estimate of the current time using

    the state estimate of the previous time. The current

    measured values are not considered.

    UPDATE

    Update phase combines the current time state

    estimate with the current measured values and

    updates the current state estimate.

  • 8/14/2019 Sensors Kalman Filters

    10/25

    SIMPLEEXAMPLE

    Suppose we want to measure the temperature in

    this room. We think it is about 22 degrees 2. We also have a thermometer that gives a result

    within the range of 5 degrees of the true

    temperature. The thermometer reading shows

    that it is 25 degrees. What is the best estimate of

    the true temperature?

    Kalman filters use a weighted average to pick apoint between our guess and the thermometers

    reading i.e. between 22 and 25 degrees.

  • 8/14/2019 Sensors Kalman Filters

    11/25

    CALCULATION

    GIVEN:

    Temperature variance tempvar = 22= 4 Thermometer variance thermvar = 52 = 25

    Guess G = 22

    Measured M = 25

    FIND: Optimal Estimate E?

  • 8/14/2019 Sensors Kalman Filters

    12/25

    CALCULATION

    To calculate the optimal estimate we first

    calculate the weight w:w = tempvar/ (tempvar + thermvar)

    = 4/ (4+25)

    = 0.14

    This means we trust our guess more than wetrust the thermometer reading.

    w 1 means thermometer measurement is moretrustworthy.

    w 0 means our guess is more trustworthy.

  • 8/14/2019 Sensors Kalman Filters

    13/25

    CALCULATION

    Now calculate the estimate:

    E = G + W(MG)= 22 + 0.14(25-22)

    = 22.42

    The estimate is pretty close to our guess because

    we put more trust on our guess as opposed to the

    thermometer reading.

    How confident are we about our estimate? For

    this we need to calculate the estimate variance

    evar?

  • 8/14/2019 Sensors Kalman Filters

    14/25

    CALCULATION

    evar = (tempvar x thermvar)/(tempvar + thermvar)

    = (4 x 25) / (4+25)= 3.44

    The deviation in this case is 1.86

    Hence, our current guess is 22.42 1.86.

    i.e. G = 22.42, tempvar = 1.862

    In a Kalman filter, we predict and update and repeatthe process as required. In this case we may take anew measurement M = 21 degrees and update ourestimate.

  • 8/14/2019 Sensors Kalman Filters

    15/25

  • 8/14/2019 Sensors Kalman Filters

    16/25

    ANSWERS

    w = 3.44/ (3.44 + 25) = 0.12

    E = 22.42 + 0.12(2122.42) = 22.25 evar = (3.44 x 25)/(3.44 + 25) = 3.02

    Hence, after the second measurement we update

    the estimate to be 22.25 1.74 degrees.

    Predict Update

  • 8/14/2019 Sensors Kalman Filters

    17/25

  • 8/14/2019 Sensors Kalman Filters

    18/25

    EXAMPLE- FLYPER

    FLYPERFlying Performing Robot

    Research conducted by Dr Benjamin N. Passowat De Montfort University.

    It uses an Inertial Measurement Unit to

    maneuver the helicopter

    IMU consists of gyroscopes and accelerometers to

    report on the helicopters orientation, velocity

    and gravity.

    The data from the IMU is filtered and fused

    using Kalman filter

  • 8/14/2019 Sensors Kalman Filters

    19/25

    EXAMPLE- FLYPER

  • 8/14/2019 Sensors Kalman Filters

    20/25

    CONCLUSION

    Kalman Filter combines measured data as well

    as previous knowledge about the system andmeasuring devices to produce an optimal

    estimate of the desired variables.

    Compared to other filters Kalman filter

    minimizes the error significantly

  • 8/14/2019 Sensors Kalman Filters

    21/25

    QUESTIONS?

  • 8/14/2019 Sensors Kalman Filters

    22/25

    QUIZ

  • 8/14/2019 Sensors Kalman Filters

    23/25

    QUIZRESULTS

    1. Context

    2. Filtered3. Eliminate, Retain

    4. It requires no prior data storage except previous

    state estimate and current observed

    measurement

    5. Predict

    6. Update

  • 8/14/2019 Sensors Kalman Filters

    24/25

    Annotated Bibliography

    Antoniou, Constantinos, Moshe Ben-Akiva and Haris N. Koutsopoulos. "Kalman Filter Applications for

    Traffic Management." n.d. July 2012. .

    This is a very interesting research paper. It deals with real time estimation and prediction of

    traffic conditions. The real time traffic management model is non-linear. Since the basic

    assumptions of Kalman filter are derived for a linear model, this paper shows how the Kalman

    filter can be modified for a non-linear system. The paper discusses Extended Kalman Filter (EKF),

    Limiting EKF and Unscented Kalman filter all of which have various advantages for non-linear

    systems.

    Bletsas, Aggelos. "Evaluation of Kalman Filtering for Network Time Keeping." IEEE Transactions on

    Ultrasonics, Ferroelectrics, and Frequency Control52.9 (2005): 1452-1460.

    This research paper proposes a novel Kalman Filtering algorithm for time tracking between a

    client computer and a server computer by sending messages as packets over the network. It

    evaluates this algorithm by comparing it with two other algorithms namely Linear Programming

    and Averaged Time Differences. It concludes that Linear Programming is better than both other

    filtering techniques. Kalman filter only works well when the number of packets is increased. This

    paper helped me understand the inapplicability of Kalman filter for certain situations.

    Funk, Nathan.A Study of the Kalman Filter applied to Visual Tracking. Edmonton, 7 December 2003.

    This project report analyzes Kalman Filter as a probabilistic prediction method for visual

    tracking. The author conducts a detailed literature survey to identify problems associated with

    Kalman Filter. The relationship between Hidden Markov Model and Kalman Filter is also

    described. This helps in establishing Kalman Filter as a probabilistic model. Overall, this was a

    well written project report.

    Martnez, Brbara Valenciano. Speech Enhancement using Kalman Filtering. November 2008.

    This project report evaluates Kalman filtering technique applied to enhance speech on a

    telephonic conversation. The experiments are first performed using white noise as well as

    colored noise. The report describes the basics of Kalman filtering and how it applies to speechfiltering for both kinds of noise. It also discusses the advantages and disadvantages of the

    Kalman filter. This was useful for my understanding. In particular, the distinguished advantage of

    Kalman filter is that it optimally predicts the state of a dynamic system. One of the

    disadvantages of Kalman filter is that it is necessary to have previous knowledge about the

    system and measuring devices. The report finally concludes that using Kalman filter helps in

    minimizing noise overall.

  • 8/14/2019 Sensors Kalman Filters

    25/25

    Maybeck, Peter S. "Stochastic Models, Estimation, and Control, Volume 1." New York: Academic Press,

    1979. 1-23.

    The first chapter in this book helped in understanding the basic principles of Kalman filtering. It

    was essential to understand how Kalman filtering works before researching its applications. This

    book explains Kalman filtering using an example about estimating ones location using areference point.

    Passow, Benjamin N. Flyper - An Autonomous Helicopter for Intelligent Acoustic Sensing Research. n.d.

    July 2012. .

    This research describes the development of an autonomous flying robot called as FLYPER. The

    research shows the improvement in stability of the robot after application of the Kalman filter.

    The research includes a video that demonstrates the difference between the outputs from an

    unfiltered reading versus Kalman filtered reading for an Inertial Measurement Unit. This was

    useful for my seminar demonstration.

    Plessis, Roger Du. Poor Man's Explanation of Kalman Filtering: or How I Stopped Worrying & Learned to

    Love Matrix Inversion. California: North American Rockwell Electronics Group, 1967.

    This paper has been written with the intent of providing the most simple and intuitive

    explanation of the Kalman Filter. In the writers opinion, all attempts at explaining Kalman filter

    have gotten complicated to a certain extent. This paper helped clarify many uncertainties. The

    paper takes an example of estimating the resistance of a resistor. The example used in my

    seminar is derived from the example given in this paper with some modifications. This paper

    also gives a second, more complicated example later in the text.

    Schumitsch, Brad, et al. The Identity Management Kalman Filter. Stanford, n.d. July 2012.

    This paper presents a new Kalman Filter, called the Identity Management Kalman Filter (IMKF),

    for the purpose of tracking of multiple objects. It compares the IMKF to the multi-hypothesis

    Kalman filter that has been used for tracking multiple objects. Apart from the standard statistics

    used in the basic Kalman Filter, the IMKF maintains only an additional statistic. The paper

    concludes that this is much more efficient than the multi-hypothesis Kalman Filter. This was a

    noteworthy paper and the findings were valuable for understanding the vast scope of

    application of the Kalman filter.