Library

MinimaxEstimation.BayesianMMAEMethod
mmae = BayesianMMAE(filterbank)

Construct a standard Multiple Model Adaptive Estimator object.

Create an estimator for the case where the dynamics belong to the finite set of linear systems equations

\[\begin{aligned} x_{t+1} & = F_ix_t + B_iu_t + w_t + \text{offset}_i\\ y_t & = H_ix_t + v_t, \end{aligned}\]

filterbank is an array of KalmanFilter objects associated with the dynamics and disturbance characteristics of each $i$.

source
MinimaxEstimation.KalmanFilterMethod
kf = KalmanFilter(x, F, H, B, P, Q, R, offset)

Create a KalmanFilter object.

for the dynamical system

\[\begin{aligned} x_{t+1} & = Fx_t + Bu_t + w_t + \text{offset}\\ y_t & = Hx_t + v_t, \end{aligned}\]

where $x_t\in \mathbb{R}^n$ are the states, $u\in \mathbb{R}^p$ are known inputs $y_t\in \mathbb{R}^m$ are measured outputs and $w_t\in \mathbb{R}^n,\ v_t \in \mathbb{R}^m$ are unknown, uncorrelated disturbances, with positive definite covariance matrices $Q \in \mathbb{R}^{n\times n}$ and $R \in \mathbb{R}^{m\times m}$ respectively. The offset is an $n$-dimensional constant.

source
MinimaxEstimation.MinimaxMMAEMethod
mini = MinimaxMMAE(filterbank, optimizer)

Construct a Minimax Multiple Model Adaptive Estimator object.

Create an estimator for the case where the dynamics belong to the finite set of linear systems equations

\[\begin{aligned} x_{t+1} & = F_ix_t + B_iu_t + w_t + \text{offset}_i\\ y_t & = H_ix_t + v_t, \end{aligned}\]

and the associated objective

\[\min_{\hat y_N}\max_{x_0, \mathbf{w}^N, \mathbf{v}^N, i}\Bigg\{ |\hat y_N - H_ix_N|^2 - \gamma^2\left(|x_0 - \hat x_0|^2_{P_0^{-1}} + \sum_{t=0}^{N-1} |w_t|^2_{Q^{-1}} + |v_t|^2_{R^{-1}}\right)\Bigg\}.\]

Filterbank is an array of KalmanFilter object associated with each $i$.

source
MinimaxEstimation.predictMethod
predict(filter)

Predict the states at the next time instance.

Methods

xhat = predict(filter::KalmanFilter)

Get the kalman filter prediction of the state at the next time-step, $\hat x_{t+1}$.

yhat, val = predict(minimaxfilter, γ)

Predict the output of the next time-step as the minimizing argument of the quadratically constrainde convex program

\[J_N^\star(y)= \min_{\hat y} \max_i |\hat y - H_i\breve x_{N,i}|^2_{(I-\gamma^{-2}H_iP_{N,i}H_i^\top)^{-1}} - \gamma^2 c_{N,i}.\]

yhat = predict(bayesianfilter)

Predict the output at the next time-step as the expected value $E[\hat y_{t+1}] = \sum_{i=1}^K \breve y_i p(i|y_t)$, where $\breve y_i$ are the corresponding KalmanFilter estimates.

source
MinimaxEstimation.update!Method
update!(filter, y, u)

Update the internal states of the filter in accordance with the output y and input u.

Methods

update!(filter::KalmanFilter, y, u)

Update the internal states of the KalmanFilter in according to measured output $y$ and controlled input $u$.

The internal states are updated as follows

\[\begin{aligned} P_{t+1} & = Q + FP_{t}F^\top \quad - FP_{t}H^\top(R + HP_{t}H^\top)^{-1}H P_{t}F^\top \\ \breve{x}_{t+1} & = F \breve{x}_{t} + K_{t}(y_t - H\breve{x}_{t})\\ K_{t} & = FP_{t}H^\top(R + H P_{t} H^\top)^{-1} \\ c_{t+1} & = |H_i\breve x_{t} -y_t|^2_{(R + HP_{t}H^\top)^{-1}} + c_{t} \\ p(i|y_t) & = \frac{1}{(2\pi)^{n/2}\sqrt{|R + HP_tH^\top|}}e^{-1/2 (H\hat x_t - y_t)^\top (R + HP_tH^\top)^{-1}(Hx_t-y_t)}p(i|y_{t-1}). \end{aligned}\]

The cummulative costs $c_t$ are states used by Minimax Adaptive Estimators, and $p(i|y_t)$ are states used by the standard adaptive estimator.

update!(filter::MinimaxFilter, y, u)

Update each filter in the internal filterbank of the minimaxfilter object.

update!(filter::BayesianFilter, y, u)

Update each filter in the internal filterbank of the standard multiple model adaptive filter and normalize the probability of a given state being active conditioned on past measurements, $p(i, y_t)$.

source