Kalman filter of a mass-spring-damper system
Versión 2.0.3 (4,94 KB) por
Jitong Ding
This code repository shows how to design and evaluate a Kalman filter based on a 2DoF mass-spring-damper system.
There are three files about Kalman filter on a 2DoF mass-spring-damper system. You can find description for this simple system here: http://www1.aucegypt.edu/faculty/mharafa/MENG%20475/2DOF%20Systems%20Fall%202010.pdf. Or just google mass-spring-damper system, I am sure that there are plenty of explanations.
Code 'comparison_c_d.m' teaches you how to discretise a continuous state-space model into a discrete state-space model and discuss the effect of sample time, since some of you may confuse (at least I did at first) whether the model should be continuous or discrete when using a Kalman filter.
Code 'kalman_filter_example_c.m' designs a Kalman filter on the system. All the state-space models in this code are continuous and the commands for designing Kalman filter are for continuous systems.
Code 'kalman_filter_example_d.m' designs a Kalman filter on the system. All the state-space models in this code are discrete and the commands for designing Kalman filter are for discrete systems.
The reason I wrote two Kalman filter codes for both continuous system and discrete system is that it is easy for a beginner (as I was) to get lost in deciding whether should I use the continuous model ,where should I discretise my model or which commands should I use. I hope this series of codes will clear your confusion.
Comments in the codes are detailed and you are welcome to ask questions.
Citar como
Jitong Ding (2024). Kalman filter of a mass-spring-damper system (https://www.mathworks.com/matlabcentral/fileexchange/98814-kalman-filter-of-a-mass-spring-damper-system), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2021a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
2.0.3 | change summary and description |
||
2.0.2 | add the tags |
||
2.0.1 | update the description |
||
2.0.0 | I added a code to show how to discretise a continuous state-space model. Also, I divided the Kalman filter code into two separate files: one file focuses on continuous system while the other deals with discrete system. |
||
1.0.1 | update the profile picture |
||
1.0.0 |