Avionics 738 Adaptive Filtering at Air University PAC Campus by Dr. Bilal A. Siddiqui in Spring 2018. This lecture deals with introduction to Kalman Filtering. Based n Optimal State Estimation by Dan Simon.
A KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTSIJCSES Journal
This paper presents a tutorial on Kalman filtering that is designed for instruction to undergraduate
students. The idea behind this work is that undergraduate students do not have much of the statistical and
theoretical background necessary to fully understand the existing research papers and textbooks on this
topic. Instead, this work offers an introductory experience for students which takes a more practical usage
perspective on the topic, rather than the statistical derivation. Students reading this paper should be able
to understand how to apply Kalman filtering tools to mathematical problems without requiring a deep
theoretical understanding of statistical theory.
A Kalman Filter is a more sophisticated smoothing algorithm that will actually change in real time as the performance of Various Sensors Change and become more or less reliable.What we want to do is filter out noise in our measurements and in our sensors and Kalman Filter is one way to do that reliably.It is based on Recursive Bayesian Filter
A KALMAN FILTERING TUTORIAL FOR UNDERGRADUATE STUDENTSIJCSES Journal
This paper presents a tutorial on Kalman filtering that is designed for instruction to undergraduate
students. The idea behind this work is that undergraduate students do not have much of the statistical and
theoretical background necessary to fully understand the existing research papers and textbooks on this
topic. Instead, this work offers an introductory experience for students which takes a more practical usage
perspective on the topic, rather than the statistical derivation. Students reading this paper should be able
to understand how to apply Kalman filtering tools to mathematical problems without requiring a deep
theoretical understanding of statistical theory.
A Kalman Filter is a more sophisticated smoothing algorithm that will actually change in real time as the performance of Various Sensors Change and become more or less reliable.What we want to do is filter out noise in our measurements and in our sensors and Kalman Filter is one way to do that reliably.It is based on Recursive Bayesian Filter
Kalman filter is a algorithm of predicting the future state of a system based on the previous ones.
In the presentation, I introduce to basic Kalman filtering step by step, with providing examples for better understanding.
Kalman Filter, also known as Linear Quadratic Estimation (LQE) is the algorithm that uses series of measurements that are observed over time and that contains statistical noise and other inaccuracies that are found in the given system. Copy the link given below and paste it in new browser window to get more information on Kalman Filter:- http://www.transtutors.com/homework-help/statistics/kalman-filter.aspx
This presentation is intended for giving an introduction to Genetic Algorithm. Using an example, it explains the different concepts used in Genetic Algorithm. If you are new to GA or want to refresh concepts , then it is a good resource for you.
Kalman filter is a algorithm of predicting the future state of a system based on the previous ones.
In the presentation, I introduce to basic Kalman filtering step by step, with providing examples for better understanding.
Kalman Filter, also known as Linear Quadratic Estimation (LQE) is the algorithm that uses series of measurements that are observed over time and that contains statistical noise and other inaccuracies that are found in the given system. Copy the link given below and paste it in new browser window to get more information on Kalman Filter:- http://www.transtutors.com/homework-help/statistics/kalman-filter.aspx
This presentation is intended for giving an introduction to Genetic Algorithm. Using an example, it explains the different concepts used in Genetic Algorithm. If you are new to GA or want to refresh concepts , then it is a good resource for you.
Avionics 738 Adaptive Filtering at Air University PAC Campus by Dr. Bilal A. Siddiqui in Spring 2018. This lecture covers background material for the course.
This Presentation describes, in short, Introduction to Time Series and the overall procedure required for Time Series Modelling including general terminologies and algorithms. However the detailed Mathematics is excluded in the slides, this ppt means to give a start to understanding the Time Series Modelling before going into detailed Statistics.
Transient and Steady State Response - Control Systems EngineeringSiyum Tsega Balcha
. Two crucial aspects of this behavior are transient and steady-state responses. These concepts encapsulate how a system behaves over time, from the moment an input is applied to when the system settles into a stable state. The transient response of a system characterizes its behavior during the initial phase after a change in input. It reflects how the system reacts as it transitions from one state to another. This phase is marked by dynamic changes in the system's output as it adjusts to the new conditions imposed by the input.
Characteristics of Transient Response are Time Constant, overshoot, settling time and damping.
Once the transient effects have subsided, the system enters the steady-state, where its behavior becomes constant over time. In this phase, the system operates under stable conditions, and its output remains within a narrow range around the desired value, despite fluctuations in input or external disturbances. Characteristics of Steady-State Response are Steady-State Error, stability, accuracy, robustness,.
"Stochastic Optimal Control and Reinforcement Learning", invited to speak at the Nonlinear Dynamic Systems class taught by Prof. Frank Chong-woo Park, Seoul National University, December 4, 2019.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about basic rules of sketching root locus.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about time response of systems derived by inspection of poles and zeros. Stability concepts and steady state errors are taught.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about time response of systems derived by inspection of poles and zeros. First and second order systems are considered, along with higher order and nonminimum phase systems
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about block diagram reduction for finding closed loop transfer functions.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about modeling electrical and mechanical systems (transnational and rotational) in frequency domain.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is about frequency domain solutions of differential equations and transfer functions.
ME-314 Introduction to Control Engineering is a course taught to Mechanical Engineering senior undergrads. The course is taught by Dr. Bilal Siddiqui at DHA Suffa University. This lecture is introduction to the field.
This is an extended version of a talk given originally at the 2nd International Conference on Entrepreneurial Engineering: Commercialization of Research and Projects at IOBM, Karachi. Later an extended talk was given on several campuses in the city.
Dr. Bilal Siddiqui of DHA Suffa University conducted a two day workshop on softwares used extensively in aerospace industry. The first session was organized by ASME's student chapter at DSU on Friday, the 2nd of December, 2016, which covered USAF Stability and Control DATCOM software used for aerodynamic prediction and aircraft design. Students and faculty from DSU as well as those from Pakistan Airforce Karachi Institute of Economics and Technology (PAF KIET) attended the session. The second session was held on Tuesday, 6th of December at PAF KIET's Korangi Creek campus and focused on interfacing DATCOM with Matlab and Simulink softwares for aircraft simulator design. Students were given hands on training on the softwares. It is worth noting that Dr. Bilal also delivered a lecture titled "It isn't exactly Rocket Science: The artsy science of rocket propulsion" at PAF KIET on the 6th October, as part of an effort to popularize rocket science among academia and changing the scientific culture in Pakistan.
A seminar by Dr. Bilal Siddiqui for lecturers and lab engineers at DHA Suffa University to market the graduate program to them. Why get another degree from the university you work at?
ME 312 Mechanical Machine Design is the flagship course of the mechanical engineering department at DHA Suffa University. This lecture is about mechanical fasteners and non-permanent joints. The course is offered every fall by Dr. Bilal A. Siddiqui.
ME 312 Mechanical Machine Design is the flagship course of the mechanical engineering department at DHA Suffa University. This is an introductory lecture. The course is offered every fall by Dr. Bilal A. Siddiqui.
ME438 Aerodynamics is offered by Dr. Bilal Siddiqui to senior mechanical engineeing undergraduates at DHA Suffa University. This lecture set is an introduction to aircraft design using Raymer's methods.
ME438 Aerodynamics is offered by Dr. Bilal Siddiqui to senior mechanical engineering undergraduates at DHA Suffa University. This lecture set is about prediction of lift on thin cambered airfoils.
ME438 Aerodynamics is offered by Dr. Bilal Siddiqui to senior mechanical engineeing undergraduates at DHA Suffa University. This lecture set deals with thin airfoil theory.
ME438 Aerodynamics is offered by Dr. Bilal Siddiqui to senior mechanical engineeing undergraduates at DHA Suffa University. This lecture set is an introduction to vortex lattice method (VLM) through the Kutta condition and circulation.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
We all have good and bad thoughts from time to time and situation to situation. We are bombarded daily with spiraling thoughts(both negative and positive) creating all-consuming feel , making us difficult to manage with associated suffering. Good thoughts are like our Mob Signal (Positive thought) amidst noise(negative thought) in the atmosphere. Negative thoughts like noise outweigh positive thoughts. These thoughts often create unwanted confusion, trouble, stress and frustration in our mind as well as chaos in our physical world. Negative thoughts are also known as “distorted thinking”.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
2. Kalman Filters
• Kalman filter is both an optimal and recursive (adaptive filter)
• It has a unique mathematical formulation (i.e. state space concepts)
• It is solved recursively. It is updated using previous state estimates and
new data (innovation), therefore no need for storage.
• It is mostly implemented in the discrete form, and easily implementable
on digital computers
• It gives a unifying framework for RLS filters.
• Developed by Rudolf Kalman in 1969 []
3. Time Domain Description of Dynamical
Sytems
• One way to describe a linear dynamical system’s evolution is in the
frequency (or transform) domain by means of transfer functions.
• Another equivalent way is to define it in time-domain.
• If the system is linear, it can be described in State-Space platform.
• A set of variables that can uniquely define the time evolution of a
dynamical system is called the state-vector 𝑋. Elements of that vector are
the system’s states 𝑥.
• In many cases, the states themselves are not measured directly. Some
combination of states may be measured. These are measurements 𝑦
mostly contaminated by measurement noise.
• The state space model of the process is a linear combination of inputs and
previous values of states. In other words, states have memories (or
integrations)
4. Linear Dynamical
System
• v1 is process “noise” which is a measure of how inaccurate our linear model given by
𝑥 𝑛 + 1 = 𝐹 𝑛 + 1, 𝑛 𝑥 𝑛 + 𝑣1(𝑛) is. If there are M states, 𝑂 𝐹 = 𝑀 × 𝑀 and 𝑂 𝑥 =
𝑀 × 1, 𝑂 𝑣 = 𝑀 × 1
• F is known as the state transition matrix relating states at n+1 and n. Process noise is
measured as zero mean white noise (its correlation matrix Q1 is diagonal). Let the system be
time-invariant. The 𝐹 𝑛 + 1, 𝑛 = 𝐹 for all n.
• Measured quantities are linear combinations of states 𝑦 𝑛 = 𝐶 𝑛 𝑥 𝑛 + 𝑣2 𝑛 . For N
measurements, 𝑂 𝑦 = 𝑁 × 1, 𝑂 𝐶 = N × 𝑀 and 𝑣2 is a Nx1 measurement noise vector,
which may represent sensor noise and linearization errors. Its correlation matrix Q2 is also
diagonal.
• It is assumed that process and measurement noises are uncorrelated. 𝐸 𝑣1 𝑛 𝑣2
𝐻
(𝑛) = 0
6. The Innovation Process
• Let 𝑦 𝑛−1 denote all measurements uptil n-1, i.e. 𝑦 𝑛−1 = 𝑦 𝑛 − 1 … 𝑦 1
• Let 𝑦(𝑛|𝑦 𝑛−1) be the one-step prediction or best estimate (min mean square error sense) of y(n) using all
measurement made till n-1.
• We define the prediction error 𝛼 𝑛 = 𝑦 𝑛 − 𝑦(𝑛|𝑦 𝑛−1) as process “innovation”, which represents the new
information (innovation) in the data observed at time n.
• Properties:
7. Innovation Propagation
• Suppose we have the more generic system 𝑥 𝑘 = 𝐹𝑥 𝑘 + 𝑣1(𝑛), then we can write a recursive relation
𝑥 𝑛 + 1 = 𝐹 𝑛
𝑥 0 +
𝑖=0
𝑛−1
𝐹 𝑛−1−𝑖
𝑣1 𝑖
• multiplying v2(n) and taking expectation
𝐸 𝑥 𝑛 + 1 𝑣2
𝐻
𝑛 = 𝐹𝐸 𝑥 0 𝑣2
𝐻
𝑛 + 𝐸
𝑖=0
𝑛−1
𝐹 𝑛−1−𝑖
𝑣1 𝑖 𝑣2
𝐻
𝑛
• Since noise v2 is uncorrelated with initial state x(0) and noise v1 this means 𝐸 𝑥 𝑘 𝑣2
𝐻
𝑛 for 0 ≤ 𝑘 ≤ 𝑛.
• Since 𝑦 𝑛 = 𝐶𝑥 𝑛 + 𝑣2 𝑛 , we can also prove that 𝐸 𝑦 𝑘 𝑣2
𝐻
𝑛 = 0 for 0 ≤ 𝑘 ≤ 𝑛 − 1 , i.e. v2 is orthogonal to past measurements.
• Therefore, 𝑦 𝑛 𝑦 𝑛−1 = C 𝑥(𝑛|𝑦 𝑛−1) as v2 cannot be predicted using past measurements.
• Therefore we can write innovations as 𝛼 𝑛 = 𝑦 𝑛 − C 𝑥(𝑛|𝑦 𝑛−1)
• Substitute measurement equation,
𝛼 𝑛 = 𝐶𝑥 𝑛 + 𝑣2 𝑛 − C 𝑥 𝑛 𝑦 𝑛−1 = 𝐶𝜖 𝑛, 𝑛 − 1 + 𝑣2(𝑛)
where 𝜖 𝑛, 𝑛 − 1 = 𝑥 𝑛 − 𝑥 𝑛 𝑦 𝑛−1 is the predicted state-error vector at n using the measurements till n-1
We can prove that 𝜖 𝑛, 𝑛 − 1 is orthogonal to v1 and v2 for for all times less than n.
8. A more generic model
• Suppose we have a more generalized process model of a discrete-
time linear system
𝑥 𝑘 = 𝐹𝑘−1 𝑥 𝑘−1 + 𝐺 𝑘−1 𝑢 𝑘−1 + 𝑤 𝑘−1
where uk is a known and deterministic input and wk is Gaussian zero-
mean white noise with covariance Qk.
• How does the mean of the state xk change with time?
𝑥 𝑘 = 𝐸 𝑥 𝑘 = 𝐹𝑘−1 𝑥 𝑘−1 + 𝐺 𝑘−1 𝑢 𝑘−1
• Now, how does the covariance of xk change with time?
9. Covariance Propagation
• Since
• Note that innovation or state error 𝜖 𝑘 = 𝑥 𝑘 − 𝑥 𝑘 is uncorrelated with noise
wk-1 (or process noise at k-1, as we said earlier)
• This means the state covariance matrix propagates as
This is called the discrete-time Lyapunov equation or Stein equation. Also note that since x0 and wi are
Gaussian 𝑥 𝑘 = 𝑁( 𝑥 𝑘, 𝑃𝑘)
11. Homework 2 (a)
• Simulate this model using Matlab
• But we could also have found the steady states and covariances
directly. Prove that the expression for steady states analytically are:
12. Derivation of the Kalman Filter
Our goal is to estimate the state xk based on our knowledge of the system
dynamics and the availability of the noisy measurements yk. The amount of
information that is available to us for our state estimate varies depending on
the particular problem that we are trying to solve.
13. Posteriors and Priots
• If we have all of the measurements up to and including time k available for use in
our estimate of xk, then we can form an a posteriori estimate, which we denote
as 𝑥 𝑘
+
• If we have all of the measurements before (but not including) time k available for
use in our estimate of xk , then we can form an a postiori estimate, which we
denote as 𝑥 𝑘
−
14. Process of Estimation
• After we process the measurement at time (k-1), we have an
estimate Of xk−1(denoted xk−1
+
) and the covariance of that estimate
(denoted Pk−1
+
).
• When time k arrives, before we process the measurement at time k,
we compute an estimate of 𝑥 𝑘(denoted 𝑥 𝑘
−
) and
the covariance of that estimate (denoted Pk
−
).
• Then we process the measurement at time k to refine our estimate of
𝑥 𝑘. The resulting estimate is denoted 𝑥 𝑘
−
, with covariance Pk
+
.
15. Step 1: Time-Update of state and covariance
estimate
• We begin the estimation process with at, our best estimate of the initial state x0.
Given 𝑥0
+
, how should we compute 𝑥1
−
? We want to set 𝑥1
−
= 𝐸 𝑥1 , but we know
𝑥0
+
= 𝐸 𝑥0 . Therefore, using 𝑥 𝑘 = 𝐸 𝑥 𝑘 = 𝐹𝑘−1 𝑥 𝑘−1 + 𝐺 𝑘−1 𝑢 𝑘−1
𝑥1
−
= 𝐹0 𝑥0
+
+ 𝐺0 𝑢0, or generalizing 𝑥 𝑘
−
= 𝐹𝑘−1 𝑥 𝑘−1
+
+ 𝐺 𝑘−1 𝑢 𝑘−1
• This is called the time update equation for 𝑥
• From time 𝑘 − 1 +
to time 𝑘−
, the state estimate propagates the same way that the
mean of the state propagates.
• This makes sense intuitively. We do not have any additional measurements available to
help us update our state estimate between time 𝑘 − 1 +
and time 𝑘−
, so we should
just update the state estimate based on our knowledge of the system dynamics.
• Using similar arguments, we can write for covariance
16. Step 2: Measurement-update of state
• Given 𝑥 𝑘
−
, how should we compute 𝑥 𝑘
+
?
• A general form of filter update is
i.e. some part of the innovation is added to the previous estimate. K is
some gain matrix, known as Kàlmàn filter gain.
• In our case, 𝑥 𝑘
+
= 𝑥 𝑘
−
+ 𝐾𝑘 𝑦 𝑘 − 𝐻 𝑘 𝑥 𝑘
−
• To find Kalman gain, the derivation is a bit more complex.
• We begin by noting that the state error vector propagates as
𝐸 𝜖 𝑘
+
= 𝐸 𝑥 𝑘 − 𝑥 𝑘
+
= 𝐸 𝑥 𝑘 − 𝑥 𝑘
−
− 𝐾𝑘 𝐻𝑥 𝑘 + 𝑣 𝑘 − 𝐻 𝑘 𝑥 𝑘
−
= 𝐸 𝜖 𝑘
−
− 𝐾𝑘(𝐻 𝑘 𝜖 𝑘
−
+𝑣 𝑘)
⇒ 𝐸 𝜖 𝑘
+
= 𝐼 − 𝐾𝑘 𝐻 𝑘 𝐸 𝜖 𝑘
−
− 𝐾𝑘 𝐸 𝑣 𝑘
17. Step 2: Measurement-update of covariance
• Estimation error covariance Pk propagates as
=
𝑃𝑘
+
= 𝐸 𝜖 𝑘
+
𝜖 𝑘
+ 𝑇
= E 𝐼 − 𝐾𝑘 𝐻 𝑘 𝐸 𝜖 𝑘
−
− 𝐾𝑘 𝐸 𝑣 𝑘 … 𝑇
= 𝐼 − 𝐾𝑘 𝐻 𝑘 E 𝜖 𝑘
−
𝜖 𝑘
−𝑇
𝐼 − 𝐾𝑘 𝐻 𝑘
𝑇
+ 𝐾𝑘 𝐸 𝑣 𝑘 𝑣 𝑘
𝑇
𝐾𝑘
𝑇
−
𝐾𝑘E 𝑣 𝑘 𝜖 𝑘
−𝑇
𝐼 − 𝐾𝑘 𝐻 𝑘
T + 𝐼 − 𝐾𝑘 𝐻 𝑘 E 𝜖 𝑘
−
𝑣 𝑘
𝑇
𝐾𝑘
𝑇
• Since estimation error at 𝑘−
is independent of measurement noise at k
𝑃𝑘
+
= 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
𝐼 − 𝐾𝑘 𝐻 𝑘
𝑇 + 𝐾𝑘 𝑅 𝑘 𝐾𝑘
𝑇
• After some elaborate steps, this can also be shown as (prove as part of HW 2)
𝑃𝑘
+
= 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
• This is the recursive formula for the covariance of estimation error. This is consistent with intuition
that as the measurement noise increases (i.e. 𝑅 𝑘 increases) the uncertainty in our estimate also
increases (i.e., 𝑃𝑘 increases).
• Note that Pk should be positive definite since it is a covariance matrix, and the form of 𝑃𝑘
+
guarantees that Pk will be positive definite, assuming that Pk-1 and Rk are positive definite.
18. Finding Kalman Gain
• Let’s find the optimal Kalman gain matrix by minimizing the posterior error
covariance at time k (equivalent to MSE since 𝑃𝑘
+
= 𝐸 𝜖 𝑘
+
𝜖 𝑘
+ 𝑇
).
𝜕𝑃𝑘
+
𝜕𝐾𝑘
= 0
𝜕
𝜕𝐾𝑘
𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
𝐼 − 𝐾𝑘 𝐻 𝑘
𝑇 + 𝐾𝑘 𝑅 𝑘 𝐾𝑘
𝑇
= 0
−2 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
𝐻 𝑘
𝑇
+ 2𝐾𝑘 𝑅 𝑘 = 0
This can be solved for KK as
𝐾𝑘 = 𝑃𝑘
−
𝐻 𝑘
𝑇
𝐻 𝑘 𝑃𝑘
−
𝐻 𝑘
𝑇
+ 𝑅 𝑘
−1
Using some more elaborate steps (prove as part of HW 2)
𝐾𝑘 = Pk
+
Hk
T
Rk
−1
19. Kalman filter summarized
• We summarize the discrete-time Kalman filter by combining the above
equations into a single algorithm.
20. Comments about implementation
• The 𝑃𝑘
+
= 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
𝐼 − 𝐾𝑘 𝐻 𝑘
𝑇
+ 𝐾𝑘 𝑅 𝑘 𝐾𝑘
𝑇
equation of covariance
update is more stable and robust than 𝑃𝑘
+
= 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑃𝑘
−
equation, even
though the latter is less computationally intensive. The first expression
ensures Pk is symmetric positive definite, the latter does not.
• Calculation of 𝑃𝑘
−
, 𝐾𝑘and 𝑃𝑘
+
does not depend on the measurements yk ,
but depends only on the system parameters Fk, Hk, Qk and Rk. Therefore,
Kalman gain Kk can be calculated offline before the system operates and
saved in memory (if statistics Q, F and R are known). In that case, linear
time-invariant Kalman filter is like the Weiner filter and not adaptive.
• In contrast, as we will see later, the filter gain and covariance for nonlinear
systems cannot (in general) be computed offline because they depend on
the measurements. In that case, the Kalman filter has important nonlinear
variants.
21. Important Properties
• If wk and vk are zero-mean, uncorrelated, and white, then the Kalman
filter is the best linear solution to the above problem, i.e., the Kalman
filter is the best filter that is a linear combination of the
measurements. There may be a nonlinear filter that gives a better
solution, but the Kalman filter is the best linear filter.
• Even if the noise is not Gaussian, the Kalman filter is still the optimal
linear filter. Noise only needs to be white and zero-mean.
• If wk and vk are coloured or correlated, then the KF can be modified.
• For nonlinear systems, various formulations of nonlinear Kalman
filters approximate the solution to the linear problem we solved.
22. One Step KF Equations
• We will see how the a priori and a posteriori Kalman filter equations
can be combined into a single equation. This may simplify computer
implementation of the equations. We have
𝑥 𝑘+1
−
= 𝐹𝑘 𝑥 𝑘
+
+ 𝐺 𝑘 𝑢 𝑘
• Substituting 𝑥 𝑘
+
= 𝑥 𝑘
−
+ 𝐾𝑘 𝑦 𝑘 − 𝐻 𝑘 𝑥 𝑘
−
𝑥 𝑘
−
= 𝐹𝑘 𝑥 𝑘
−
+ 𝐾𝑘 𝑦 𝑘 − 𝐻 𝑘 𝑥 𝑘
−
+ 𝐺 𝑘 𝑢 𝑘
𝑥 𝑘
−
= 𝐹𝑘 𝐼 − 𝐾𝑘 𝐻 𝑘 𝑥 𝑘
−
+ 𝐹𝑘 𝐾𝑘 𝑦 𝑘 + 𝐺 𝑘 𝑢 𝑘
• This shows that the a priori state estimate can be computed directly
from its value at the previous time step, without computing the a
posteriori state estimate in between. We can similarly show
23. Example
• Suppose we have a noise-free with position r , velocity v, and
constant acceleration a.
25. Simulation
%%
clc;clear all;close;
%Kalman filter for position measurement
%AV-738 Spr 18, Dr. Bilal A. Siddiqui
T=5;
R=30^2;
a=0.01;
F=[1 T T^2/2 %position
0 1 T %velocity
0 0 1]; %acceleration
G=0;
H=[0 0 1];% only position being measured
w=0;%process noise
x(:,1)=[0 0 a]';%initial value of state vector
x_post(:,1)=[0 0 0]';%initial estimate of state
vector
P_post(:,:,1)=1E5*eye(3);%initial estimate of error
covariance
for k=2:60
%calculate a priori covariance estimate
P_prior(:,:,k)=F*P_post(:,:,k-1)*F';
%calculate Kalman gain
K(:,:,k)=P_prior(:,:,k)*H'*(H*P_prior(:,:,k)*H'+R)^-1;
%calculate a priori estimate of state
x_prior(:,k)=F*x(:,k-1);
%system evolution
x(:,k)=F*x(:,k-1);%take measurement
y(k)=H*x(:,k)+sqrt(R)*randn;
%calculate innovation
innov(k)=y(k)-H*x_prior(:,k);
%calculate a posteriori estimate of state
x_post(:,k)=x_prior(:,k)+K(:,:,k)*innov(k);
%calculate a posteriori estimate of covariance
P_post(:,:,k)=(eye(3)- ...
K(:,:,k)*H)*P_prior(:,:,k)*+(eye(3)-K(:,:,k)*H)'+...
K(:,:,k)*R*K(:,:,k)';
end
27. Homework 2 (c)
• First of all, we were able to reduce estimation error below the
measurement noise floor. How was that possible?
• Also, if we start measuring the acceleration directly (use a 1-g noise,
i.e.R=1) instead of the position, we will get a good estimate still, but the
error covariance will keep increasing. Why?
• In practical terms, if we inject position measurements at a slower rate,
what will happen to the error covariance, if we were taking accelerometer
measurements at a higher rate?
• Simulate the error covariance if we measure accelerometer at every
sampling instant, but receive GPS position with noise variance of 10 after
every five sampling instants.
• Comment your answer and analyze the results.
28. A word of caution
• The theory presented in this lecture (based on “Optimal State Estimation” b Dan
Simon, J. Wiley & Sons 2006) makes the Kalman filter an attractive choice for
state estimation.
• But when a Kalman filter is implemented on a real system it may not work, even
though the theory is correct. Main causes are (a) finite precision arithmetic and
(b) modelling errors.
• The theory presented also assumes that the system model is precisely known. It
is assumed that the F , Q, H, and R matrices are exactly known, and it is assumed
that the noise sequences {wk} and {vk} are pure white, zero-mean, and completely
uncorrelated. If any of these assumptions are violated, as they always are in real
implementations, then the Kalman filter assumptions are violated and the theory
may not work.
•