{"id":15663370,"url":"https://github.com/avivace/kalman","last_synced_at":"2025-07-20T15:35:16.818Z","repository":{"id":39479413,"uuid":"149255347","full_name":"avivace/kalman","owner":"avivace","description":"Interactive and real time 2D simulation of the Kalman Filter in use to reduce statistical input noise.","archived":false,"fork":false,"pushed_at":"2023-01-04T21:54:49.000Z","size":15582,"stargazers_count":22,"open_issues_count":14,"forks_count":4,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-07-11T08:49:44.375Z","etag":null,"topics":["2d-simulation","algorithm","demo","estimates","implementation","kalman","kalman-estimator","kalman-filter","kalman-filtering","kalman-smoother","kalman-tracking","noise","simulation"],"latest_commit_sha":null,"homepage":"https://avivace.github.io/kalman","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avivace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-18T08:36:34.000Z","updated_at":"2025-06-17T03:59:55.000Z","dependencies_parsed_at":"2023-02-02T21:15:18.560Z","dependency_job_id":null,"html_url":"https://github.com/avivace/kalman","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/avivace/kalman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fkalman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fkalman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fkalman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fkalman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avivace","download_url":"https://codeload.github.com/avivace/kalman/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fkalman/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266151530,"owners_count":23884436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d-simulation","algorithm","demo","estimates","implementation","kalman","kalman-estimator","kalman-filter","kalman-filtering","kalman-smoother","kalman-tracking","noise","simulation"],"created_at":"2024-10-03T13:36:57.766Z","updated_at":"2025-07-20T15:35:16.800Z","avatar_url":"https://github.com/avivace.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kalman Filter\n\nFinal project for the *Probabilistic models for decision making* course, from my [MSc in Computer Science](https://github.com/avivace/compsci): *an interactive and real time 2D simulation of the Kalman Filter in use to reduce input noise*.\n\n### [Live demo](https://avivace.github.io/kalman)\n\n### [Slides](slides.pdf)\n\n![](screenshot1.png)\n\n\u003e The Kalman Filter is an algorithm that uses a series of measurements observed over time, containing statistical noise and other inaccuracies, and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone, by estimating a joint probability distribution over the variables for each timeframe.\n\u003e The algorithm works in a two-step process. In the prediction step, the Kalman filter produces estimates of the current state variables, along with their uncertainties. Once the outcome of the next measurement (necessarily corrupted with some amount of error, including random noise) is observed, these estimates are updated using a weighted average, with more weight being given to estimates with higher certainty. The algorithm is recursive. It can run in real time, using only the present input measurements and the previously calculated state and its uncertainty matrix; no additional past information is required. \n\nAlgorithm pseudocode:\n\n```bash\nm = [X, Y, deltaX, deltaY]  ← measurement vector\nc = [0, 0, 0, 0]            ← control vector (not used here)\n\nPrediction Step:\nx = (A * x) + (B * c)\nP = (A * P * AT) + Q        ← AT is the matrix transpose of A\n\nCorrection Step:\nS = (H * P * HT) + R        ← HT is the matrix transpose of H\nK = P * HT * S-1            ← S-1 is the matrix inverse of S\ny = m - (H * x)\nx = x + (K * y)\nP = (I - (K * H)) * P       ← I is the Identity matrix\n\n\nIf prediction is enabled, the prediction step is looped for n \n    more frames after the above code is executed:\n\npredX = x\npredX = (A * predX) + (B * c)\n\n\nThe estimated position of the cursor is in the x vector:\n\nx ← [xPos, yPos, xVel, yVel] \n```\n\n![](screenshot2.png)\n\n### Deploy\n\n```bash\ngit clone\nnpm install\nnpm run serve\n```\n\nPublish on `avivace.github.io/kalman`:\n\n```bash\nnpm run deploy\n```\n\n\u003e Development is done on the `develop` branch due to GitHub's restriction on branches for user pages (the build is deployed on the `master` branch and published to `avivace.github.io/kalman` from there).\n\n### Stack\n\n- [Vue.js](https://vuejs.org/) JS framework;\n- [MuseUI](https://muse-ui.org) CSS framework;\n- [Sylvester](http://sylvester.jcoglan.com/) Vector and matrix math;\n- [CanvasRenderingContext2D web API](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D) to draw the simulation.\n\n### References and papers\n\n- [An introduction to the Kalman Filter](http://www.cs.utexas.edu/~pstone/Courses/393Rfall13/readings/Welch+Bishop-TR-95.pdf)\n- [Implementation of Kalman Filter with Python Language](https://arxiv.org/pdf/1204.0375.pdf)\n- [Understanding the Basis of the Kalman Filter via a Simple and Intuitive Derivation](https://courses.engr.illinois.edu/ece420/sp2017/UnderstandingKalmanFilter.pdf)\n- [Kalman Filter Simulation](https://www.cs.utexas.edu/~teammco/misc/kalman_filter/)\n- **Kalman Filtering** - Drew Bagnell\n- **Applications of Kalman Filtering in Aerospace 1960 to the Present** - MOHINDER S. GREWAL and ANGUS P. ANDREWS\n- **Discriminative Training of Kalman Filters** - Pieter Abbeel, Adam Coates, Michael Montemerlo, Andrew Y. Ng and Sebastian Thrun\n- **Relative Study of Measurement Noise Covariance R and Process\nNoise Covariance Q of the Kalman Filter in Estimation.** - Yashpal Singh, Rajesh Mehra\n- **Stochastic Filtering** - Rui Castro\n- Apollo Guidance System software:[Virtual AGC — AGS — LVDC — Gemini](http://www.ibiblio.org/apollo/)\n\n### Acknowledgements\n\n[Manuele Rota](https://github.com/dubvulture) for cleaning up some of my trash code and improving the animation logic\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivace%2Fkalman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favivace%2Fkalman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivace%2Fkalman/lists"}