update
Update the estimate for the true RSSI using a 1D Kalman filter. Prediction stage: x̂ₜ₍ₜ₋₁₎ = Fₜ * x̂₍ₜ₋₁₎₍ₜ₋₁₎ + Bₜ * uₜ Pₜ₍ₜ₋₁₎ = Fₜ * P₍ₜ₋₁₎₍ₜ₋₁₎ * Fₜᵀ + Qₜ
We use Fₜ = I (the identity matrix), i.e. our model for the current RSSI value is just the previous RSSI value. We do not have any inputs to our model ⇒ uₜ = 0 We model Δrssi ~ 𝒩(0, (∂rssi/∂d * Δd)²) ⇒ Qₜ = (∂rssi/∂d * Δd)² x̂ₜ₍ₜ₋₁₎ = x̂₍ₜ₋₁₎₍ₜ₋₁₎ Pₜ₍ₜ₋₁₎ = P₍ₜ₋₁₎₍ₜ₋₁₎ + Qₜ
Measurement stage: x̂ₜ₍ₜ₎ = x̂ₜ₍ₜ₋₁₎ + Kₜ * (zₜ - (Hₜ * x̂ₜ₍ₜ₋₁₎)) where zₜ is our measured RSSI value Pₜ₍ₜ₎ = Pₜ₍ₜ₋₁₎ - Kₜ * Hₜ * Pₜ₍ₜ₋₁₎
Kₜ = Pₜ₍ₜ₋₁₎ * Hₜᵀ * (Hₜ * Pₜ₍ₜ₋₁₎ * Hₜᵀ + Rₜ)⁻¹Content copied to clipboard
We use Hₜ = I (the identity matrix) since our model and measurements exist in the same domain (i.e. both are RSSI values)
x̂ₜ₍ₜ₎ = x̂ₜ₍ₜ₋₁₎ + Kₜ * (zₜ - x̂ₜ₍ₜ₋₁₎)
Pₜ₍ₜ₎ = Pₜ₍ₜ₋₁₎ - Kₜ * Pₜ₍ₜ₋₁₎
= (1 - Kₜ) * Pₜ₍ₜ₋₁₎
Kₜ = Pₜ₍ₜ₋₁₎ * (Pₜ₍ₜ₋₁₎ + Rₜ)⁻¹ = Pₜ₍ₜ₋₁₎ / (Pₜ₍ₜ₋₁₎ + Rₜ)Content copied to clipboard