wkearn/Kalman.jl

语言: Julia

git: https://github.com/wkearn/Kalman.jl

Julia中卡尔曼滤波器的通用接口
Generic interface for Kalman filters in Julia
README.md (中文)

卡尔曼

Build Status
Coverage Status

Julia中卡尔曼滤波器的通用接口。

注意,TimeModels.jl还具有用于时间序列分析的卡尔曼滤波器的实现。该实现(Kalman.jl)侧重于卡尔曼滤波器在线数据同化问题的应用,并打算为线性和非线性卡尔曼滤波器开发单个API。 Kalman.jl是一个尚未注册的软件包,仍处于活跃开发阶段,因此bug可能很常见并且变化很快。有关更稳定且经过测试的API,请查看TimeModels.jl。

安装

    Pkg.clone("git://github.com/wkearn/Kalman.jl")

在此软件包注册之前,只需从此存储库中输入Pkg.clone即可

用法

using Kalman

x0 = State([0.0],[1.0]')
f = LinearModel([1]',[1]',[1e-10]')
z = LinearObservationModel([1]',[0.01]')

kf0 = BasicKalmanFilter(x0,f,z)
kf = kf0

y = map(i->Observation([i]),-0.37727+sqrt(0.01)*randn(50))

请注意,在Julia v0.4及更高版本中,您可以使用Nullable {Vector {T}}替换Observation {T},它允许您表示缺少的测量值。

x = zeros(Float64,50)
p = ones(Float64,50)

for i = 1:49
    kf = predictupdate(kf,y[i])
    x[i+1] = kf.x.x[1]
    p[i+1] = kf.x.p[1]
end

)

路线图

已实现的过滤器列出实现它们的Kalman.jl类型。

卡尔曼滤波器

  • 具有定期更新的线性,时不变滤波器:BasicKalmanFilter
  • Nullable {Vector {T}}观察支持缺少测量

扩展卡尔曼滤波器

  • 具有定期更新的非线性,时不变滤波器:BasicExtendedKalmanFilter

无味卡尔曼滤波器

合奏卡尔曼滤波器

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

Kalman

Build Status
Coverage Status

A generic interface for Kalman filters in Julia.

Note that the TimeModels.jl also has an implementation of Kalman filters for time series analysis. This implementation (Kalman.jl) focuses on applications of Kalman filters to online data assimilation problems, and intends to develop a single API for both linear and nonlinear Kalman filters. Kalman.jl is an unregistered package still in active development, so bugs may be common and changes rapid. For a more stable and tested API, check out TimeModels.jl.

Installation

    Pkg.clone("git://github.com/wkearn/Kalman.jl")

Until this package is registered, simply Pkg.clone from this repository

Usage

using Kalman

x0 = State([0.0],[1.0]')
f = LinearModel([1]',[1]',[1e-10]')
z = LinearObservationModel([1]',[0.01]')

kf0 = BasicKalmanFilter(x0,f,z)
kf = kf0

y = map(i->Observation([i]),-0.37727+sqrt(0.01)*randn(50))

Note that in Julia v0.4 and greater, you can replace the Observation{T} with a Nullable{Vector{T}} which allows you to represent missing measurements.

x = zeros(Float64,50)
p = ones(Float64,50)

for i = 1:49
    kf = predictupdate(kf,y[i])
    x[i+1] = kf.x.x[1]
    p[i+1] = kf.x.p[1]
end

Estimation of a scalar constant)

Roadmap

Filters which have been implemented list the Kalman.jl type which implements them.

Kalman Filter

  • Linear, time-invariant filter with regular updating: BasicKalmanFilter
  • Missing measurements supported with Nullable{Vector{T}} observations

Extended Kalman Filter

  • Nonlinear, time-invariant filter with regular updating: BasicExtendedKalmanFilter

Unscented Kalman Filter

Ensemble Kalman Filter