# What exactly is $\omega_k$ in the stage cost of moving horizon estimation?

In (nonlinear) moving horizon estimation the aim is to estimate an unknown state sequence $\{x_k\}_{k=0}^T$ over a moving horizon N using measurements $y_k$ up to time $T$ and a system model as constraint. All the papers I've seen so far 1,2,3 the following cost function is used:

$$\phi = \min_{z,\{\omega_k\}_{k = T-N}^{T-1}} \sum_{k = T-N}^{T-1} \underbrace{\omega_k^TQ^{-1}\omega_k + \nu_k^TR^{-1}\nu_k}_{\text{stage cost } L_k(\omega,\nu)} + \underbrace{\mathcal{\hat{Z}}_{T-N}(z)}_{\text{approximated arrival cost}}$$

The noise sequence $\{\omega_k\}_{k = T-N}^{T-1}$ should be optimized/minimized in order to solve for the unknown state sequence using the prediction model:

$$x_{k+1} = f(x_k,\omega_k)$$

whereas the measurement model is defined as

$$y_k = h(x_k) + \nu_k$$

with additive noise $\nu$.

The question is what exactly is $\omega_k$ in the stage cost?

In the papers $\nu$ is defined to be

$$\nu_k = y_k - h(x_k)$$

However, $\omega_k$ remains undefined. If I can assume additive noise $\omega$ in the prediction model, I think $\omega_k$ is something like the follwoing:

$$\omega_k = x_{k+1} - f(x_k)$$

If this should be correct, then my next Problem is that I don't know the states $x_k$, $x_{k+1}$ (they should be estimated).

EDIT

Is it possible that my guess for $\omega_k = x_{k+1} - f(x_k)$ is "wrong" and it is enough to just consider:

• the measurement $\nu_k = y_k - h(x_k)$ in the cost function $\phi$
• the prediction model as constraint?

And let the optimization do the "rest" in finding a possible solution of a noise sequence $\{\omega_k\}_{k = T-N}^{T-1}$? In this case which Matlab solver would you suggest? I thought of using lsqnonlin since my problem is a sum of squares. Is it possible to use lsqnonlin with the prediction model as constraint?

1 Fast Moving Horizon Estimation of nonlinear processes via Carleman linearization

2 Constrained state estimation for nonlinear discrete-time systems: stability and moving horizon approximations

3 Introduction to Nonlinear Model Predictive Control and Moving Horizon Estimation

• I downvoted the question because it is related to Norbert Wiener's dysfunctional theory of stochastic moving Horizon. It is impossible to determine the stage-cost with this background. Commented Sep 24, 2016 at 18:09
• @Manuel Rodriguez, It is possible! However another problem will be the approximation of the arrival cost which includes knowledge about the initial state $x_0$. The idea is to plug in the initial state in the prediction model which will then lead to a solution of the desired unknown state at time T, given the noise sequence found by the optimization. Why are you constantly downvoting things because it is not state of the art in your opinion? Could you please stop trolling around and instead do that on trollheaven.wordpress.com?! Commented Sep 24, 2016 at 18:39
• Ok, i made a mistake. To have another opinion is not a reason for downvoting. I withdraw my vote. Commented Sep 24, 2016 at 18:51
• @Manuel Rodriguez that it's a very appreciated change of mind. I made an edit to the question, which should enable you to retract your vote. Commented Sep 24, 2016 at 19:07

What helped to solve my question was to use fmincon with the process noise $\omega_k$ as decision variable and to use the measurement noise which includes the state in the equation $\nu_k = y_k - h(x_k)$. To come up with a solution for the state $x_k$ I just solve the prediction model using an initial state at the beginning of the moving window $x_{k-N}$ and also the noise sequence. Where the noise sequence is the decision variable. Using this method, the prediction model constraint is "included" in the cost function. Of course at the very first start of the optimizaiton, a random noise sequence is chosen (with magnitude according to the state variables). After each run of the optimization the shifted noise sequence from the previous run can be taken as initial guess.