Kalman Filter for Beginners, Part 2 - Estimation and Prediction Process & MATLAB Example

Kalman Filter prediction and estimation steps, explained step-by-step with a MATLAB implementation. In Part 2 of this three-part beginner series, we derive the two halves of the Kalman filter cycle: 🔮 The prediction step uses a system model (the state transition matrix A) to project the current state estimate forward in time, along with its uncertainty (error covariance). 📡 The estimation step (also called the "update" or "correction" step) combines the prediction with a new noisy measurement (via the measurement matrix H), weighing each by how trustworthy it is (Q for process noise, R for measurement noise). We draw an analogy to low-pass filters (covered in Part 1) to build intuition for why the Kalman filter trusts the prediction more when measurements are noisy, and trusts the measurement more when the system model is uncertain. Then we walk through a simple MATLAB example and a more complicated one that previews the attitude estimation problem we'll tackle in Part 3. ▶️ Chapters 0:00 Recap of Part 1 3:51 The estimation (update) step 8:00 Analogy with the low-pass filter from Part 1 10:03 Error covariance: quantifying the inaccuracy of the estimate 14:29 The prediction step 17:34 How prediction and estimation fit together (the Kalman cycle) 21:44 Building the system model (A, H matrices) 26:34 Covariance of the system noise (Q and R matrices) 31:30 MATLAB demo: simple example 43:32 MATLAB demo: more complicated example 📘 What you'll learn What the prediction step does and why it needs a system model What the estimation/update step does and how it uses the new measurement How the Kalman filter weighs prediction against measurement (the Kalman gain) What error covariance means and why it's the heart of the algorithm How to set up the A, H, Q, R matrices for your own filtering problem How this connects to the simple recursive filters from Part 1 🎓 Kalman Filter for Beginners — full series Part 1: Recursive Filters & MATLAB Examples —    • Kalman Filter for Beginners Explained: Rec...   Part 2: Estimation & Prediction (this video) Part 3: Attitude Estimation with Gyro + Accelerometer —    • Kalman Filter for Beginners Part 3: Attitu...   💻 MATLAB code and lecture notes (free download) https://drive.google.com/drive/folder... 📖 Reference Phil Kim & Lynn Huh — Kalman Filter for Beginners: with MATLAB Examples (2010) https://www.amazon.com/dp/1463648359 🎓 Course Space Vehicle Dynamics — AOE 3144, Virginia Tech Full playlist:    • Spacecraft Attitude Dynamics & Control | S...   ⸻ 👨‍🏫 Instructor Dr. Shane Ross Professor of Aerospace Engineering, Virginia Tech (Caltech PhD, former NASA/JPL and Boeing) Research: https://ross.aoe.vt.edu Follow: https://x.com/RossDynamicsLab Subscribe: https://www.youtube.com/user/RossDyna... ⸻ 🔗 Related courses Nonlinear Dynamics & Chaos —    • Nonlinear Dynamics & Chaos — Full Course F...   Lagrangian & Rigid Body Dynamics —    • Lagrangian Mechanics & Rigid Body Dynamics   Hamiltonian Dynamics —    • Hamiltonian Mechanics & Advanced Dynamics   3-Body Problem Orbital Dynamics —    • Three-Body Problem: Trajectory Design & Lo...   Center Manifolds, Normal Forms & Bifurcations —    • Local Bifurcation Theory: Center Manifolds...   Recorded: Spring 2023 #KalmanFilter #StateEstimation #PredictUpdate #StateSpaceModel #ErrorCovariance #KalmanGain #MATLAB #SignalProcessing #ControlSystems #SensorFusion #VirginiaTech #AOE3144