• No results found

Similarities and differences between control and estimation

1.8. Similarities and differences between control and estimation

Optimal control and optimal estimation are closely related mathematical problems. For linear time-invariant systems without inequality constraints, there exists a sepa- ration principle which states that state estimator and controller can be designed sep- arately. If they are both stable then the closed-loop system is also stable. If they are both optimal (i.e. Kalman filter and LQR) then the closed-loop system is also optimal. This combination of steady-state Kalman filter and steady-state LQR is called Linear Quadratic Gaussian (LQG) compensation.

In the Kalman filter, covariance matrices are propagated by a matrix Riccati recur- sion. For control, the Linear Quadratic Regulator (LQR) leads to a similar Riccati recursion and both recursions can easily be related using a conversion table for the matrices involved. Remarkably, the Riccati recursion for LQR runs backwards while the Kalman filter Riccati recursion runs forward, and therefore, this duality is only interesting for linear time-invariant models, since in the time-varying case the LQR is impractical as it involves an infinite backward matrix recursion. This so-called duality relation between Kalman filter and LQR was noted in the seminal papers of Kalman [112, 113].

Interesting similarities can also be discovered between MHE (1.21) and MPC (1.24) from their respective formulations. The MHE problem approximates the batch estima- tion problem by adding a weighting on the initial state (arrival cost or cost-to-arrive) while the MPC problem approximates the infinite optimal control problem by adding a weighting on the final state (terminal cost or cost-to-go). Conditions to ensure sta- bility are represented by a dual set of inequalities for the arrival cost and the terminal cost, see [146]. Furthermore, in the MHE problem wkare the control variables sim-

ilar to uk in the MPC problem. These observations suggest a duality between both

problems. However, as pointed out by Todorov [178], it is not directly clear from the conversion tables of the Riccati recursion or from the similarity of the formulations in which sense estimation and control are dual problems. In order to make it clear, we will show that the unconstrained batch estimation problem can be rewritten into a form which can be interpreted as a control problem. Thereto, consider the following simple discrete linear time-varying (LTV) model (compare to the more general discrete LTV model (1.7))

xk+1 = Akxk+ wk,

yk = Ckxk+ vk.

If, furthermore, the disturbance variables are eliminated, the estimation problem can be written as min x kx0− ˆx0k 2 P0−1+∑ T−1 k=0kxk+1− Akxkk2Q−1 k +∑Tk=0kyk−Ckxkk2R−1 k . (1.25)

This problem is equivalent to the following one min x,uT−1 k=0 kukk2R¯k+∑ T k=0  kxkk2Q¯k+ 2x T kq¯k  , (1.26) with ¯ Rk= Q−1k ¯ Q0= P0−1+ C0TR−10 C0 q¯0= − ˆx0−C0kTR−10 y0 ¯ Qk= CTkR−1k Ck q¯k= −CkTR−1k yk 0< k ≤ N,

and where the process disturbances have been replaced by controls, i.e. uk= wk. By

this reformulation, we can see that the unconstrained batch estimation problem can be interpreted as reference-tracking optimal control problem with a reference trajectory specified by the observations and with a free intial state.

This free initial state vector x0 is the most important difference with MPC. These extra degrees of freedom allow us to fit an observed output sequence according to a specified objective. Therefore the estimation problem is often referred to as an inverse problem. It must be noted that the addition of an initial condition typically increases the numerical conditioning as the extra degrees of freedom may result in an infinite number of solutions to the estimation problem.

Duality relations between MHE and MPC, are further complicated due to the presence of constraints and possibly nonlinear dynamics. It was shown by Goodwin, De Don´a and coworkers [78, 79, 133] that the dual of the linear constrained MHE problem is a reverse-time nonlinear unconstrained control problem involving projected variables, a special instance of an MPC problem, and that there is no duality gap. Although this result is highly interesting from a theoretical view, there is no direct practical value to it since the dual problem is not easier to solve than the primal problem.

Note that the notion of duality in system theory is more vague than Lagrangian du- ality in optimization. Duality in system theory, as we showed in this section, means for example that a specific estimation problem can be rewritten and interpreted as a specific control problem. Both problems of course yield the same solution(s). La- grangian duality, on the other hand, implies that the primal optimization problem has a corresponding dual problem where the Lagrange multipliers are the variables and the primal variables are the Lagrange multipliers. If there is no duality gap, the solu- tions to both problems are exactly the same. In some cases this duality relation can be exploited e.g. if the dual problem is easier to solve than the primal problem. See Chapter 2 for more details.

Figure 1.4 illustrates the various relations between MHE, the Kalman filter, LQR and MPC.