tracking error state space, linear control example

I am trying to understand a detail from an example, from the control textbook Slotine and Li (1991) "Applied Nonlinear Control", Prentice-Hall, Example 6.4, pag. 220 (hopefully there is not any typing error in the book). A linear system is given:

\eqalign{ \left[ {\matrix{ {{{\dot x}_1}} \cr {{{\dot x}_2}} \cr } } \right] =& \left[ {\matrix{ {{x_2} + u} \cr u \cr } } \right] \cr\\ y =& {x_1} \cr}

where the output $y$ is desired to track $y_d$. Differentiating the output, an explicit relation between $y$ -output- and $u$ -control input- is obtained:

$$\dot y = {x_2} + u$$

Until here it is clear. Now, the authors choose a control law:

$$u = - {x_2} + {{\dot y}_d} - (y - {y_d})$$

and say that this yield the tracking error equation:

$$\dot e + e = 0$$

with the $e$ being the tracking error, defined as $e=y-y_{d}$ and the internal dynamics: $${{\dot x}_2} + x_2=\dot {y_d} - e$$ ... and the problem continues.

My question is: how does one define the control law $u = - {x_2} + {{\dot y}_d} - (y - {y_d})$ ?? And how does this relate to the two following equations ($\dot e + e = 0$ and ${{\dot x}_2} + x_2 = \dot{y_d} - e$)?

Any simple clarifying answer is much appreciated.

Thanks

• Are you sure with the internal dynamics? In my version of the book it is $\dot x_2+x_2=\dot y_d-e$. And this is just the result when inserting $u$ in the second equation, as I would expect. Commented Feb 25, 2018 at 19:25
• Hi Carlos, thank you, You are right. I have edited the question, as per your indication. I am still trying to understand how one gets the equation $\dot {e}+ e =0$... Commented Feb 26, 2018 at 7:52
• Probably my question is, how is the choice of tje control law $u$ made? This seems to be arbitrary Commented Feb 26, 2018 at 8:17

Actually, @MrYouMath gave already a detailed and correct expalanation. Here some more words on the tracking error dynamics:

The dynamic of the tracking error $e = y-y_d$ is what you specify, i.e., the desired dynamics of the plant output $y$ along the desired trajectory $y_d$. This specified error dynamics should be asymptotically stable, since it might desired that $e \to 0$, as $t\to \infty$ or $y\to y_d$, as $t\to \infty$.

Here it is chosen as the error differential equation: \begin{align} 0 &= \dot e + e \\ & = \dot y-\dot y_d + y-y_d \end{align} which is asymptotically stable since it is Hurwitz (the corresponding characterisitic polynomial has an eigenvalue equals $-1$). Consequently, initial errors $e(t_0)$ tend to zero as time increases.

Now to obtain $0 = \dot e + e$ you simply choose $u$ in the equation \begin{align} \dot y = x_2 + u. \end{align} In the example, $x_2$ is compensated exactly, so you need just to add the remaining terms $(\dot y_d,y,y_d)$ to obtain the desired error dynamics, i.e.,

\begin{align} u = -x_2 + \dot y_d -(y- y_d) \end{align}

It follows

\begin{align} \dot y = x_2 - x_2 + \dot y_d -( y- y_d) \Rightarrow e +\dot e = 0 \end{align}

In the design, the dynamics in $x_2$ is not considered, it remains the internal dynamics

\begin{align} \dot x_2 &= u = -x_2 + \dot y_d -(y- y_d)\\ & \Rightarrow \dot x_2 +x_2 = \dot y_d - e \end{align}

final remark: Note that this dynamics must be stable for $e\equiv0$. This yields the zero dynamics $\dot x_2 = -x_2$ which is indeed asympt. stable.

• Thank you Carlos, your answer really helps and is easier for me to comprehend, so I accept it. I think is that what I missed before is that, one chooses to specify the error dynamics, which in the example is $\dot{e}+e=0$, this is just a choice, that is the main point, all else follows. I also thank MrYouMath for the effort and the correct answer. Commented Feb 26, 2018 at 11:00
• You're welcome. Note that @MrYouMath choosed additionally a parameter $a_0$. With this you can place a desired eigenvalue ($\lambda=-a_0$) and therefore the convergence behavior of the error dynamics. Commented Feb 26, 2018 at 14:15
• Thanks again, just a small question. Why would one want $\dot{e}+e=0$, rather than only $e=0$ ? Commented Feb 27, 2018 at 1:17
• The zero dynamics is considered by definition with zero outputs and zero errors of the output. Commented Jun 24, 2021 at 6:54
• You can set y and all its derivatives to zero. Commented Jun 24, 2021 at 6:55

Let's assume you want $y$ to follow a desired $y_\text{d}$ and if you want dynamics of the error to be of first order then you define

$$e = y-y_\text{d}.$$

Assume you want the following first order error dynamics (note that the relative degree of the system is also one)

$$\dot{e}+a_0e =0,$$

which is asymptotically stable for $a_0>0$. Now, simply plug in the definition of $e$ to obtain

$$\dot{y}-\dot{y}_\text{d}+a_0(y-y_\text{d})=0.$$

As we know $y = x_1$, we know that $\dot{y}=x_2+u$, hence

$$x_2+u-\dot{y}_\text{d}+a_0(x_1-y_\text{d})=0.$$

Now solve for $u$ to obtain

$$u= -x_2+\dot{y}_d-a_0(x_1-y_d).$$

Note that $x_1=y$ and this method requires that $y_\text{d}$ is at least continuously differentiable.