**3. Solution of the optimal tracking problem**

In order to solve the Optimal Tracking Problem we augment the state variables (Kwakernaak & Sivan, 1972) and further assume that *A=Ar*, *B=Br* and *C=Cr*. This assumption states that the nominal values of the plant's parameters are known. The case *A≠Ar*, *B≠Br* and *C≠Cr* is beyond the scope of this chapter.

We have the error system

$$
\dot{e}\_x = Ae\_x + Bw\_r - Bu; \; e\_x(t\_o) = \mathbf{x}\_{ro} - \mathbf{x}\_{o}.\tag{6}
$$

$$X = \begin{bmatrix} e\_x \\ \eta\_1 \\ \eta\_2 \\ \vdots \\ \eta\_m \end{bmatrix}; \quad \overline{A} = \begin{bmatrix} A & 0 & 0 & \cdots & 0 \\ \overline{C}\_{\epsilon 1} & 0 & 0 & \cdots & 0 \\ 0 & C\_{\epsilon 2} & 0 & & 0 \\ \vdots & \vdots & \ddots & & \vdots \\ 0 & 0 & \cdots & C\_{\epsilon m} & 0 \end{bmatrix}; \quad \overline{B} = \begin{bmatrix} -B \\ 0 \\ 0 \\ 0 \\ 0 \end{bmatrix}; \overline{C} = \begin{bmatrix} \mathbb{C} & 0 & 0 & & 0 \end{bmatrix} \tag{7}$$

then the problem is minimization of (5) subject to (1-4) is the problem of minimization of

$$J = \frac{1}{2} E\{\mathbf{X}(t\_f)^T \mathbf{G} \mathbf{X}(t\_f) + \oint\_{t\_s} [\mathbf{X}(t)^T \mathbf{Q} \mathbf{X}(t) + \boldsymbol{\mu}(t)^T \mathbf{R} \mathbf{u}(t)] dt\} \tag{8}$$

subject to

$$
\dot{X} = \overline{A}X + \overline{B}u - \overline{B}\overline{w}\_{r\prime} \qquad \overline{\mathfrak{X}}(t\_o) = \overline{\mathfrak{X}}\_{o\prime} \tag{9}
$$

where

$$Q = \overline{\mathbf{C}}^T Q\_1 \overline{\mathbf{C}} + \begin{bmatrix} \mathbf{0} \\ \underline{\mathbf{1}} \end{bmatrix} Q\_2 \begin{bmatrix} \underline{\mathbf{0}} & \underline{\mathbf{1}} \end{bmatrix}, \quad G = \overline{\mathbf{C}}^T G\_1 \overline{\mathbf{C}} + \begin{bmatrix} \mathbf{0} \\ \underline{\mathbf{1}} \end{bmatrix} G\_2 \begin{bmatrix} \underline{\mathbf{0}} & \underline{\mathbf{1}} \end{bmatrix}. \tag{10}$$

The solution is (Kwakernaak & Sivan, 1972) (Bryson & Ho, 1969)

$$\begin{aligned} \mu &= -\mathbb{R}^{-1}\overline{\mathcal{B}}P \, X \\ -\dot{P} &= P\overline{A} + \overline{A}^T P + Q - P\overline{B}\mathcal{R}^{-1}\overline{\mathcal{B}}P\_{\prime} \end{aligned} \tag{11}$$

If we appropriately partition *P*, then

$$\boldsymbol{\mu} = \boldsymbol{R}^{-1} \boldsymbol{B}^{T} \begin{bmatrix} P\_{11} & P\_{12} \end{bmatrix} \begin{bmatrix} \boldsymbol{e}\_{\times} \\ \boldsymbol{\eta} \end{bmatrix} = \begin{bmatrix} \boldsymbol{K}\_{1} & \boldsymbol{K}\_{2} \end{bmatrix} \begin{bmatrix} \boldsymbol{e}\_{\times} \\ \boldsymbol{\eta} \end{bmatrix} \tag{12}$$

Notice that the solution is independent of the reference trajectory generator input, *wr* .
