vault backup: 2025-06-12 23:41:18
Affected files: .obsidian/plugins/text-extractor/cache/19bf7bae4584f22d8d824ea9198ecda3.json .obsidian/plugins/text-extractor/cache/27f380e86244d5c5dcc79cac6cf90fde.json .obsidian/plugins/text-extractor/cache/95e163ec3e8e9050cfaaa2193f8941bd.json .obsidian/plugins/text-extractor/cache/b57b2074137d041e1b90d3b0c0e54e0e.json .obsidian/plugins/text-extractor/cache/fc6628ddefe8ab0bf9813594d700a2c0.json .obsidian/workspace.json 99 Work/0 OneSec/OneSecNotes/30 Engineering Skills/Robotics/Kalman Filter.md Attachments/Pasted image 20250612225625.png Attachments/Pasted image 20250612230042.png Attachments/Pasted image 20250612230104 1.png Attachments/Pasted image 20250612230104.png Attachments/Pasted image 20250612230414.png
This commit is contained in:
@@ -65,6 +65,18 @@ $$ x_k \sim \mathcal{N}(\hat{x}_k, P_k)$$
|
||||
- Q: is the process noise: it's just there you cannot really get rid of it
|
||||
$$ \hat{x}^-_k = A \hat{x}_{k-1}$$
|
||||
$$ P_k^- = AP_{k-1} A^T + Q$$
|
||||
|
||||
$$Q=\begin{pmatrix}
|
||||
|
||||
\sigma_{1}^{2} & 0 & \cdots & 0\\
|
||||
|
||||
0 & \sigma_{2}^{2} & \ddots & \vdots\\
|
||||
|
||||
\vdots & \ddots & \ddots & 0\\
|
||||
|
||||
0 & \cdots & 0 & \sigma_{n}^{2}
|
||||
|
||||
\end{pmatrix}$$, where $\sigma_i^2$ is the variance of the process noise
|
||||
### Estimation Step
|
||||
#### II. Compute Kalman Gain
|
||||
This is the dynamic update of the Kalman gain.
|
||||
@@ -86,7 +98,27 @@ Note:
|
||||
- $H$: is the measurement noise: you can control it with better sensors
|
||||
|
||||
|
||||
### Simple Example
|
||||
## Dynamic Attitude Determination
|
||||
Sensors:
|
||||
- Gyroscope and accelerometer
|
||||
|
||||
Lets integrate the gyro data to visualize what we could do to get the attitude.
|
||||
![[Pasted image 20250612230104 1.png]]
|
||||
As we can see below, there is a lot of drift meaning the numerical integration is no good.
|
||||
![[Pasted image 20250612230414.png]]
|
||||
|
||||
System Model
|
||||
|
||||
## Key Takeaways
|
||||
|
||||
Use the Kalman filter to estimate velocity from position samples. Its much more precise than a simple derivative.
|
||||
![[Pasted image 20250612225625.png]]
|
||||
|
||||
|
||||
Why do IMUs have gyro and accelerometers? Because they work really well together. The gyro is fast and gives quite good data on a short time horizon, but has terrible drift. On contrary, the accelerometer is quite noisy, but gives a true value about attitude, because it can measure gravity. Thus with accelerometer measurmenets every now and then, you can fix the gyro drift and estimate it to fix it.
|
||||
Accelerometer data can give you pitch and roll. --> this is used in the kalman filter to update the estimates --> sensor fusion
|
||||
Magnetometer data can give you yaw.
|
||||
|
||||
|
||||
---
|
||||
## Sources
|
||||
|
||||
Reference in New Issue
Block a user