Gaussian Mixture Probability Hypothesis Density Filter
A Gaussian Mixture Probability Hypothesis Density (GM-PHD) Filter handles multi-object tracking in a low signal-to-noise environment by recursively propagating an unnormalized Gaussian Mixture Model, which when integrated over a volume corresponds with the expected number of objects in that volume.
GaussianFilters.GaussianMixture — Type.GaussianMixture(N::Int64, w::Vector{Number}, μ::Vector{AbstractVector},
Σ::Vector{AbstractMatrix})
GaussianMixture(w::Vector{Number}, μ::Vector{AbstractVector},
Σ::Vector{AbstractMatrix})
Arguments:
N: Number of models
w: Weights
μ: Means of the model
Σ: Covariances of the modelBuilding a GM-PHD Filter
Building a GM-PHD Filter requires defining a birth intensity model of type GaussianMixture for where objects can be globally born, a spawn intensity model of type Spawn for how new objects can spawn off old objects, a Vector of possible linear dynamics models of type Dynamics, a linear measurement model of type Measurement, a survival probability, a detection probability, and a clutter modeling function.
GaussianFilters.Spawn — Type.Spawn(β::GaussianMixture, dyn::Vector{Dynamics})
Arguments:
β: Gaussian Mixture model determining the
spawning intesity of the target
dyn: DynamicsGaussianFilters.Dynamics — Type.Dynamics(A::AbstractMatrix, Q::AbstractMatrix, d::AbstractVector)
Dynamics(A::AbstractMatrix, Q::AbstractMatrix)Construct linear dynamics model with; transition matrix A, process noise matrix Q and offset vector d
GaussianFilters.Measurement — Type.Measurement(C::AbstractMatrix, R::AbstractMatrix)Construct measurement model with observation matrix C and sensor noise matrix R
Once all of these are defined, a GM-PHD filter can be constructed with PHDFilter.
GaussianFilters.PHDFilter — Type.PHDFilter(γ::GaussianMixture, spawn::Spawn, dyn::Vector{Dynamics},
meas::Measurement, Ps::Float64, Pd::Float64, κ::Function)
PHDFilter(γ::GaussianMixture, spawn::Spawn, dyn::Dynamics,
meas::Measurement, Ps::Float64, Pd::Float64, κ::Function)
Sets up a PHD Filter
Arguments:
γ: Birth intensity
spawn: Spawning intensity
dyn: Vector of possible Dynamics models
meas: Measurements
Ps: Survival probability
Pd: Detection probabilityRunning a GM-PHD Filter
Currently, the GM-PHD Filter must be run step-by-step. Similar to the Kalman-Class filters, this can be done with a single call to update, which wraps functions to predict the next state, perform a measurement update with measure, and prune the resulting mixture model of low-probability and sufficiently close mixtures.
GaussianFilters.update — Function.update(filter::AbstractFilter, b0::GaussianBelief, u::AbstractVector,
y::AbstractVector)Uses AbstractFilter filter to update gaussian belief b0, given control vector u and measurement vector y.
update(phd::PHDFilter, b0::GaussianMixture, Z::Vector{AbstractVector},
T::Real, U::Real, J_max::Integer)Perform an update step using a GMPHD Filter.
Arguments:
phd::PHDFilterPHD filter to step through. [PHD Filter]b0::GaussianMixturePrior state distribution. [Gaussian Mixture]Z::MatrixMatrix of measurements. [Measurements]T::RealTruncation threshold. Drop distributions with weight less than TU::RealMerging threshold. Merge if (μ1-μ2)^T * Σ^-1 * (μ1-μ2) < UJ_max::IntegerMaximum number of features
Returns:
bn::GaussianMixtureDescribe first return value. [Gaussian Mixture]
References:
- Vo, B. N., & Ma, W. K. (2006). The Gaussian mixture probability hypothesis
density filter. IEEE Transactions on signal processing, 54(11), 4091-4104.
GaussianFilters.predict — Function.predict(m::LinearDynamicsModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number})
predict(m::LinearDynamicsModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number}, rng::AbstractRNG)Uses the linear dynamics model to propagate the state x one step forward in time with control input u. If rng is given, it adds process noise.
predict(m::NonLinearDynamicsModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number})
predict(m::NonLinearDynamicsModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number}, rng::AbstractRNG)Uses the non linear dynamics model to propagate the state x one step forward in time with control input u. If rng is given, it adds process noise.
predict(filter::KalmanFilter, b0::GaussianBelief, u::AbstractVector)Uses Kalman filter to run prediction step on gaussian belief b0, given control vector u.
predict(filter::ExtendedKalmanFilter, b0::GaussianBelief, u::AbstractVector)Uses Extended Kalman filter to run prediction step on gaussian belief b0, given control vector u.
predict(filter::UnscentedKalmanFilter, b0::GaussianBelief, u::AbstractVector)Uses Unscented Kalman filter to run prediction step on gaussian belief b0, given control vector u.
predict(phd::PHDFilter, b0::GaussianMixture)Make a prediction on next state based on PHD dynamics
Arguments:
phd::PHDFilterPHD filter to step through. [PHD Filter]b0::GaussianMixturePrior state distribution. [Gaussian Mixture]
Returns:
bp::GaussianMixturePredicted next state distribution. [Gaussian Mixture]
References:
- Vo, B. N., & Ma, W. K. (2006). The Gaussian mixture probability hypothesis
density filter. IEEE Transactions on signal processing, 54(11), 4091-4104.
GaussianFilters.measure — Function.measure(m::LinearObservationModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number})
measure(m::LinearObservationModel, x::AbstractVector{T}, u::AbstractVector{T}, rng::AbstractRNG) where T<:NumberReturns an observation of state x according to the linear observation model m, with control inputs u. If rng is passed, adds additive Gaussian noise to the observation.
measure(m::LinearObservationModel, x::AbstractVector{<:Number}, u::AbstractVector{<:Number})
measure(m::LinearObservationModel, x::AbstractVector{T}, u::AbstractVector{T}, rng::AbstractRNG) where T<:NumberReturns an observation of state x according to the non linear observation model m, with control inputs u. If rng is passed, adds additive Gaussian noise to the observation.
measure(filter::KalmanFilter, bp::GaussianBelief, y::AbstractVector;
u::AbstractVector = [false])Uses Kalman filter to run measurement update on predicted gaussian belief bp, given measurement vector y. If u is specified and filter.o.D has been declared, then matrix D will be factored into the y predictions
measure(filter::ExtendedKalmanFilter, bp::GaussianBelief, y::AbstractVector;
u::AbstractVector = [false])Uses Extended Kalman filter to run measurement update on predicted gaussian belief bp, given measurement vector y. If u is specified and filter.o.D has been declared, then matrix D will be factored into the y predictions.
measure(filter::UnscentedKalmanFilter, bp::GaussianBelief, y::AbstractVector;
u::AbstractVector = [false])Uses Unscented Kalman filter to run measurement update on predicted gaussian belief bp, given measurement vector y. If u is specified and filter.o.D has been declared, then matrix D will be factored into the y predictions.
measure(phd::PHDFilter, bp::GaussianMixture, Z::Vector{AbstractVector})Perform a measurement update on a predicted PHD next state.
Arguments:
phd::PHDFilterPHD filter to step through. [PHD Filter]bp::GaussianMixturePrior state distribution. [Gaussian Mixture]Z::Vector{AbstractVector}Array of measurements. [Measurements]
Returns:
bm::GaussianMixtureDescribe first return value. [Gaussian Mixture]
References:
- Vo, B. N., & Ma, W. K. (2006). The Gaussian mixture probability hypothesis
density filter. IEEE Transactions on signal processing, 54(11), 4091-4104.
GaussianFilters.prune — Function.prune(b::GaussianMixture, T::Real, U::Real, J_max::Integer)Prune the posterior Gaussian-Mixture next PHD state
Arguments:
b::GaussianMixturePosterior state distribution. [Gaussian Mixture]T::RealTruncation threshold. Drop distributions with weight less than TU::RealMerging threshold. Merge if (μ1-μ2)^T * Σ^-1 * (μ1-μ2) < UJ_max::IntegerMaximum number of features
Target locations can be extracted from a GaussianMixture state using multiple_target_state_extraction.
GaussianFilters.multiple_target_state_extraction — Function.multiple_target_state_extraction(b::GaussianMixture, th::Real)Extracts targets whose weights (x.w) are above threshold.
Arguments: b::GaussianMixture: Set of Gaussian Mixtures th::Real: Threshold on weights. Above this threshold, state estimate is extracted
Returns: X: Multi-Target State Estimate
Examples
Full implementation examples can be found in the notebooks folder of the repo: