robkalman a package on Robust Kalman Filtering

Similar documents
robkalman a package on Robust Kalman Filtering

Classical setup: Linear state space models (SSMs) robkalman a package on Robust Kalman Filtering. Classical setup: Linear state space models (SSMs)

Robust Recursive Kalman Filtering

Neatest and Promptest Manner. E d i t u r ami rul)lihher. FOIt THE CIIILDIIES'. Trifles.

LOWELL. MICHIGAN. WEDNESDAY, FEBRUARY NUMllEE 33, Chicago. >::»«ad 0:30am, " 16.n«l w 00 ptn Jaekten,.'''4snd4:4(>a tii, ijilwopa

MANY BILLS OF CONCERN TO PUBLIC

PanHomc'r I'rui;* :".>r '.a'' W"»' I'fltolt. 'j'l :. r... Jnfii<on. Kslaiaaac. <.T i.. %.. 1 >

' Liberty and Umou Ono and Inseparablo "

d A L. T O S O U LOWELL, MICHIGAN. THURSDAY, DECEMBER 5, 1929 Cadillac, Nov. 20. Indignation

LOWELL WEEKLY JOURNAL

Robust Kalman tracking and smoothing with propagating and non-propagating outliers

X t = a t + r t, (7.1)

P A L A C E P IE R, S T. L E O N A R D S. R a n n o w, q u a r r y. W WALTER CR O TC H, Esq., Local Chairman. E. CO O PER EVANS, Esq.,.

Q SON,' (ESTABLISHED 1879L

Demo 5. 1 Degree Reduction and Raising Matrices for Degree 5

ESTIMATING SPECTRAL DENSITY FUNCTIONS ROBUSTLY

How to generate new distributions in packages "distr", "distrex"

OWELL WEEKLY JOURNAL

LOWELL WEEKI.Y JOURINAL

Linear Dynamical Systems

LOWELL WEEKLY JOURNAL. ^Jberxy and (Jmott Oao M d Ccmsparftble. %m >ai ruv GEEAT INDUSTRIES

Statistics 910, #15 1. Kalman Filter

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Financial Econometrics / 49

The sspir Package. April 15, 2006

State Estimation and Motion Tracking for Spatially Diverse VLC Networks

.1 "patedl-righl" timti tame.nto our oai.c iii C. W.Fiak&Co. She ftowtt outnal,

A Robust Approach of Regression-Based Statistical Matching for Continuous Data

Systematic strategies for real time filtering of turbulent signals in complex systems

Data-driven signal processing

A. H. Hall, 33, 35 &37, Lendoi

LOWELL WEEKLY JOURNAL

A Matrix Theoretic Derivation of the Kalman Filter

A Practical Guide to State Space Modeling

W i n t e r r e m e m b e r t h e W O O L L E N S. W rite to the M anageress RIDGE LAUNDRY, ST. H E LE N S. A uction Sale.

r/lt.i Ml s." ifcr ' W ATI II. The fnncrnl.icniccs of Mr*. John We mil uppn our tcpiiblicnn rcprc Died.

H A M M IG K S L IM IT E D, ' i. - I f

.-I;-;;, '.-irc'afr?*. P ublic Notices. TiffiATRE, H. aiety

Time Series I Time Domain Methods

SNAP Centre Workshop. Exponents and Radicals

LOWHLL #WEEKLY JOURNAL.

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

PALACE PIER, ST. LEONARDS. M A N A G E R - B O W A R D V A N B I E N E.

Bayesian Methods in Positioning Applications

Introduction to Probabilistic Graphical Models: Exercises

Robust regression in R. Eva Cantoni

Kernel Bayes Rule: Nonparametric Bayesian inference with kernels

Lecture Note 12: Kalman Filter

Time Series Outlier Detection

Time Series Examples Sheet

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Fin. Econometrics / 53

Solutions to Homework Set #6 (Prepared by Lele Wang)

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Elements of Multivariate Time Series Analysis

Dimension Reduction. David M. Blei. April 23, 2012

T k b p M r will so ordered by Ike one who quits squuv. fe2m per year, or year, jo ad vaoce. Pleaie and THE ALTO SOLO

Prof. Dr.-Ing. Armin Dekorsy Department of Communications Engineering. Stochastic Processes and Linear Algebra Recap Slides

Closed-Form Solution Of Absolute Orientation Using Unit Quaternions

An Efficient State Space Approach to Estimate Univariate and Multivariate Multilevel Regression Models

EKF, UKF. Pieter Abbeel UC Berkeley EECS. Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

EKF, UKF. Pieter Abbeel UC Berkeley EECS. Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

ENGR352 Problem Set 02

5 Kalman filters. 5.1 Scalar Kalman filter. Unit delay Signal model. System model

2 T. Schneider and A. Neumaier m-dimensional random vectors with zero mean and covariance matrix C. The m- dimensional parameter vector w of intercept

ECONOMETRIC METHODS II: TIME SERIES LECTURE NOTES ON THE KALMAN FILTER. The Kalman Filter. We will be concerned with state space systems of the form

Autonomous Navigation for Flying Robots

Lecture 7: Optimal Smoothing

Factor Analysis and Kalman Filtering (11/2/04)

Particle Filtering Approaches for Dynamic Stochastic Optimization

1 Kalman Filter Introduction

Stochastic Models, Estimation and Control Peter S. Maybeck Volumes 1, 2 & 3 Tables of Contents

Univariate Nonstationary Time Series 1

Sensor Tasking and Control

Messung des differentiellen Wirkungsquerschnitts der Z-Boson Produktion im Elektron-Zerfallskanal mit dem CMS-Detektor bei s=8 TeV.

A Step Towards the Cognitive Radar: Target Detection under Nonstationary Clutter

EE247 Analog-Digital Interface Integrated Circuits

4 Derivations of the Discrete-Time Kalman Filter

1. Stochastic Processes and Stationarity

ARIMA Modelling and Forecasting

Soil Phosphorus Discussion

Advanced analysis and modelling tools for spatial environmental data. Case study: indoor radon data in Switzerland

Ensemble Data Assimilation and Uncertainty Quantification

Simultaneous state and input estimation of non-linear process with unknown inputs using particle swarm optimization particle filter (PSO-PF) algorithm

Time Series Examples Sheet

Package WaveletArima

Scalable robust hypothesis tests using graphical models

State Space and Hidden Markov Models

LQR, Kalman Filter, and LQG. Postgraduate Course, M.Sc. Electrical Engineering Department College of Engineering University of Salahaddin

Robert Collins CSE586 CSE 586, Spring 2015 Computer Vision II

Exponential Convergence Bounds in Least Squares Estimation: Identification of Viscoelastic Properties in Atomic Force Microscopy

Computational and Monte-Carlo Aspects of Systems for Monitoring Reliability Data. Emmanuel Yashchin IBM Research, Yorktown Heights, NY

A new class of morphological pyramids for multiresolution image analysis

Statistical Techniques in Robotics (16-831, F12) Lecture#20 (Monday November 12) Gaussian Processes

Bayesian hierarchical space time model applied to highresolution hindcast data of significant wave height

a s*:?:; -A: le London Dyers ^CleanefSt * S^d. per Y ard. -P W ..n 1 0, , c t o b e e d n e sd *B A J IllW6fAi>,EB. E D U ^ T IG r?

Lecture 16: State Space Model and Kalman Filter Bus 41910, Time Series Analysis, Mr. R. Tsay

Principal Component Analysis vs. Independent Component Analysis for Damage Detection

Nonparmeteric Bayes & Gaussian Processes. Baback Moghaddam Machine Learning Group

Finite Mixture Model Diagnostics Using Resampling Methods

Package pmhtutorial. October 18, 2018

E S T A B L IS H E D. n AT Tnn G.D.O. r.w.-bal'eu. e d n e s d a y. II GRANVILLE HOUSE. GATJDICK ROAD. MEADS. EASTBOUENk

Transcription:

robkalman a package on Robust Kalman Filtering Peter Ruckdeschel 1 Bernhard Spangl 2 1 Fakultät für Mathematik und Physik Peter.Ruckdeschel@uni-bayreuth.de www.uni-bayreuth.de/departments/math/org/mathe7/ruckdeschel 2 Universität für Bodenkultur, Wien Bernhard.Spangl@boku.ac.at www.rali.boku.ac.at/statedv.html RsR Workshop at BIRS, 2007/10/30

Classical setup: Linear state space models (SSMs) State equation: Observation equation: X t = F t X t 1 + v t Ideal model assumption: Y t = Z t X t + ε t X 0 N p (a 0, Σ 0 ), v t N p (0, Q t ), ε t N q (0, V t ), all independent (preliminary?) simplification: Hyper parameters F t, Z t, V t, Q t constant in t

Classical setup: Linear state space models (SSMs) State equation: Observation equation: X t = F t X t 1 + v t Ideal model assumption: Y t = Z t X t + ε t X 0 N p (a 0, Σ 0 ), v t N p (0, Q t ), ε t N q (0, V t ), all independent (preliminary?) simplification: Hyper parameters F t, Z t, V t, Q t constant in t

Kalman filter goal: reconststruct X t by means of Y s, s t practical reason: restriction to linear procedures / Gaussian assumptions classical Kalman Filter 0. Initialization (t = 0): 1. Prediction (t 1): X 0 0 = a 0, Σ 0 0 = Σ 0 X t t 1 = FX t 1 t 1, Cov(X t t 1 ) = Σ t t 1 = F Σ t 1 t 1 F + Q 2. Correction (t 1): X t t = X t t 1 + K t (Y t ZX t t 1 ) K t = Σ t t 1 Z (ZΣ t t 1 Z + V ), (Kalman gain) Cov(X t t ) = Σ t t = Σ t t 1 K t ZΣ t t 1

Kalman filter goal: reconststruct X t by means of Y s, s t practical reason: restriction to linear procedures / Gaussian assumptions classical Kalman Filter 0. Initialization (t = 0): 1. Prediction (t 1): X 0 0 = a 0, Σ 0 0 = Σ 0 X t t 1 = FX t 1 t 1, Cov(X t t 1 ) = Σ t t 1 = F Σ t 1 t 1 F + Q 2. Correction (t 1): X t t = X t t 1 + K t (Y t ZX t t 1 ) K t = Σ t t 1 Z (ZΣ t t 1 Z + V ), (Kalman gain) Cov(X t t ) = Σ t t = Σ t t 1 K t ZΣ t t 1

Robustification Types of outliers AO/SOs (exogeneous): either error ε t is affected (AO) or observations Y t are modified (SO) Robustification considered is to retain recursivity (three-step approach / performance!) modify correction step bound influence of Y t retain init./pred.step but with modified filter past X t 1 t 1

Robustification Types of outliers AO/SOs (exogeneous): either error ε t is affected (AO) or observations Y t are modified (SO) Robustification considered is to retain recursivity (three-step approach / performance!) modify correction step bound influence of Y t retain init./pred.step but with modified filter past X t 1 t 1

Contents of package robkalman Kalman filter: filter, Kalman gain, covariances ACM-filter: filter, GM-estimator rls-filter: filter, calibration of clipping height extensible to further recursive filters: general interface recursivefilter with arguments: data state space model (hyper parameters) functions for the init./pred./corr.step control parameters

Contents of package robkalman Kalman filter: filter, Kalman gain, covariances ACM-filter: filter, GM-estimator rls-filter: filter, calibration of clipping height extensible to further recursive filters: general interface recursivefilter with arguments: data state space model (hyper parameters) functions for the init./pred./corr.step control parameters

Contents of package robkalman Kalman filter: filter, Kalman gain, covariances ACM-filter: filter, GM-estimator rls-filter: filter, calibration of clipping height extensible to further recursive filters: general interface recursivefilter with arguments: data state space model (hyper parameters) functions for the init./pred./corr.step control parameters

Implementation concept Programming language completely in S perhaps some code in C later Use existing infrastructure time series classes: ts, its, irts, zoo, zoo.reg, tframe for: graphics, diagnostics, management of date/time Split user interface and Kalman code internal functions: no S4-objects, no time stamps user interface: S4-objects, time stamps

Implementation concept Programming language completely in S perhaps some code in C later Use existing infrastructure time series classes: ts, its, irts, zoo, zoo.reg, tframe for: graphics, diagnostics, management of date/time Split user interface and Kalman code internal functions: no S4-objects, no time stamps user interface: S4-objects, time stamps

Implementation concept Programming language completely in S perhaps some code in C later Use existing infrastructure time series classes: ts, its, irts, zoo, zoo.reg, tframe for: graphics, diagnostics, management of date/time Split user interface and Kalman code internal functions: no S4-objects, no time stamps user interface: S4-objects, time stamps

Implementation so far: interfaces preliminary, S4-free interfaces Kalman filter (in our context) KalmanFilter rls (P.R.): rlsfilter ACM (B.S.) ACMfilt, ACMfilter all realized as wrappers to recursivefilter required packages all available from CRAN: methods, graphics, startupmsg, dse1, dse2, MASS, limma, robustbase availability: package robkalman version 0.1 (incl. demos) under http://www.uni-bayreuth.de/departments/ /math/org/mathe7/robkalman/

Implementation so far: interfaces preliminary, S4-free interfaces Kalman filter (in our context) KalmanFilter rls (P.R.): rlsfilter ACM (B.S.) ACMfilt, ACMfilter all realized as wrappers to recursivefilter required packages all available from CRAN: methods, graphics, startupmsg, dse1, dse2, MASS, limma, robustbase availability: package robkalman version 0.1 (incl. demos) under http://www.uni-bayreuth.de/departments/ /math/org/mathe7/robkalman/

Implementation so far: interfaces preliminary, S4-free interfaces Kalman filter (in our context) KalmanFilter rls (P.R.): rlsfilter ACM (B.S.) ACMfilt, ACMfilter all realized as wrappers to recursivefilter required packages all available from CRAN: methods, graphics, startupmsg, dse1, dse2, MASS, limma, robustbase availability: package robkalman version 0.1 (incl. demos) under http://www.uni-bayreuth.de/departments/ /math/org/mathe7/robkalman/

Implementation so far: interfaces preliminary, S4-free interfaces Kalman filter (in our context) KalmanFilter rls (P.R.): rlsfilter ACM (B.S.) ACMfilt, ACMfilter all realized as wrappers to recursivefilter required packages all available from CRAN: methods, graphics, startupmsg, dse1, dse2, MASS, limma, robustbase availability: package robkalman version 0.1 (incl. demos) under http://www.uni-bayreuth.de/departments/ /math/org/mathe7/robkalman/

Next steps to do in Banff :-) Time-stamps any preferences in the RsR-audience? casting/conversion functions for various time series classes S4 classes for SSM s for output-class for control-class (reuse robustbase-code) intefacing functions between S4-layer and S4-free layer

Next steps to do in Banff :-) Time-stamps any preferences in the RsR-audience? casting/conversion functions for various time series classes S4 classes for SSM s for output-class for control-class (reuse robustbase-code) intefacing functions between S4-layer and S4-free layer

Next steps to do in Banff :-) Time-stamps any preferences in the RsR-audience? casting/conversion functions for various time series classes S4 classes for SSM s for output-class for control-class (reuse robustbase-code) intefacing functions between S4-layer and S4-free layer

Demonstration: ACMfilt ## g e n e r a t i o n o f data from AO model : s e t. s e e d (361) Eps as. t s ( rnorm ( 1 0 0 ) ) ar2 arima. sim ( l i s t ( a r = c ( 1, 0.9)), 100, i n n o v = Eps ) Binom rbinom (100, 1, 0. 1 ) Noise rnorm (100, sd = 10) y ar2 + as. t s ( Binom Noise ) ## d e t e r m i n a t i o n o f GM e s t i m a t e s y. argm argm( y, 3) ## ACM f i l t e r y. ACMfilt ACMfilt ( y, y. argm) p l o t ( y ) l i n e s ( y. ACMfilt $ f i l t, c o l =2) l i n e s ( ar2, c o l= g r e e n )

y 30 20 10 0 10 20 30 green: ideal time series, black: AO contam. time series, red: result ACM 0 20 40 60 80 100 Time

Demonstration: rlsfilter ## s p e c i f i c a t i o n o f SSM: ( p=2, q=1) a0 c ( 1, 0 ) ; S0 matrix ( 0, 2, 2) F matrix ( c (. 7, 0. 5, 0. 2, 0 ), 2, 2) Q matrix ( c ( 2, 0. 5, 0. 5, 1 ), 2, 2) Z matrix ( c ( 1, 0.5), 1, 2) Vi 1 ; ## time h o r i z o n : TT 50 ## s p e c i f y AO c o n t a m i n a t i o n f o r s i m u l a t i o n mc 20; Vc 0. 1 ; r a c t 0. 1 ## f o r c a l i b r a t i o n r1 0. 1 ; e f f 1 0. 9 #S i m u l a t i o n : : X s i m u l a t e S t a t e ( a0, S0, F, Q, TT) Yid s i m u l a t e O b s (X, Z, Vi, mc, Vc, r =0) Yre s i m u l a t e O b s (X, Z, Vi, mc, Vc, r a c t )

Demonstration: rlsfilter II ### c a l i b r a t i o n b #l i m i t i n g S { t t 1} SS l i m i t S ( S0, F, Z, Q, Vi ) ### # tune rls by e f f i c i e n c y i n the i d e a l model (B1 r L S c a l i b r a t e B ( e f f=e f f 1, S=SS, Z=Z, V=Vi ) ) # tune rls by c o n t a m i n a t i o n r a d i u s (B2 r L S c a l i b r a t e B ( r=r1, S=SS, Z=Z, V=Vi ) ) ### e v a l u a t i o n o f rls r e r g 1. i d r L S F i l t e r ( Yid, a0, SS, F, Q, Z, Vi, B1$b ) r e r g 1. r e r L S F i l t e r ( Yre, a0, SS, F, Q, Z, Vi, B1$b ) r e r g 2. i d r L S F i l t e r ( Yid, a0, SS, F, Q, Z, Vi, B2$b ) r e r g 2. r e r L S F i l t e r ( Yre, a0, SS, F, Q, Z, Vi, B2$b ) ## f o r d e t a i l s to o b t a i n the f o l l o w i n g p l o t s e e ## demo ( r L S f i l t e r, package= robkalman ) ## CAVEAT: p l o t ( ) f u n c t i o n a l i t y i s p r e l i m i n a r y and ## s u b j e c t to change

ideal situation SO-contaminated situation 1. coordinate of state 4 2 0 2 4 xx x x xxxx x x x x x x x xxx x 1. coordinate of state 25 15 5 xxxxx x xxxxx x xxx x x xx x x x xx xxxx 0 10 20 30 40 50 0 10 20 30 40 50 time black: real state, red: class. Kalman filter time blue: rls filter (B1)(mostly covered by:), green: rls filter (B2) 2. coordinate of state 2 0 1 2 xx x x xxxx x x x x x x x xxx x 2. coordinate of state 10 5 0 xxxxx x xxxxx x xxx x x xx x x x xx xxxx 0 10 20 30 40 50 0 10 20 30 40 50 time x: clipping instances of the robust filter time