Feedback Linearization Theorem
We talked about the feedback linearization theorem last time. As a recap:
Feedback Linearization Theorem: A nonlinear system $\Sigma: \dot{x} = f(x) + g(x)u$ is feedback linearizable if and only if:
- $[g(x), ad_fg(x), \ldots, ad_f^{n-1}g(x)]$ has rank $n$ $\forall x$.
- \( \Delta = \text{span}\{g(x), ad_fg(x), \ldots, ad_f^{n-2}g(x)\} \) is involutive.
The first condition guarantees controllability, while the second condition guarantees that we can always find an output $y = h(x)$ that has relative degree equal to the system degree, according to the Frobenius theorem. Actually, this is also just observability.
We now look at some examples.
Consider the system
$$ \dot{x} = \begin{pmatrix} a \sin x_2 \\ -x_1^2 \end{pmatrix} + \begin{pmatrix}0 \\ 1 \end{pmatrix}u $$We would like to ask two questions:
- Is the system feedback linearizable?
- If so, how shall we find the output $y = h(x)$?
To answer the first question, we first check whether the first condition of the feedback linearization theorem is met.
$$ g(x) = \begin{pmatrix}0 \\ 1 \end{pmatrix} $$$$ad_fg = [f, g] = \begin{pmatrix} -a \cos x_2 \\ 0 \end{pmatrix}$$Therefore,
$$ [g(x), ad_fg(x)] = \begin{pmatrix}0 & -a \cos x_2 \\ 1 & 0 \end{pmatrix} $$This matrix has rank 2 for all $x$, except where $\cos x_2 = 0$. The distribution \( \Delta = \text{span}\{g(x) \} \) has only one element, so it’s trivially involutive. Therefore we conclude the system is feedback linearizable (away from $\cos x_2 = 0$).
Now, how shall we find the output $y$? We would like to find an output $y = h(x)$ such that it has relative degree of $2$, i.e.:
$$\begin{cases} \begin{align*} \frac{\partial h}{\partial x} g(x) &= 0 \\ \frac{\partial L_f h}{\partial x} g(x) &\neq 0 \end{align*} \end{cases} $$The first PDE will give us
$$ \frac{\partial h}{\partial x_2} = 0 $$meaning $h(x)$ must be independent of $x_2$. We substitute this fact into the second PDE:
$$ \frac{\partial L_f h}{\partial x} g(x) = \frac{\partial L_fh}{\partial x_2} = \frac{\partial h}{\partial x_1}a \cos x_2 \neq 0$$Therefore, we can pick a few candidates for $h(x)$, for example: $x_1$, $x_1^5$, and so forth. If we pick $h(x) = x_1$, then we can linearize the system as
$$ \ddot{y} = v$$where the state and control transform is given by
$$ \begin{cases} \begin{align*} y &= x_1 \\ \dot{y} &= a\sin x_2 \\ u &= (x_1^2 + v) \frac{1}{a\cos x_2} \end{align*} \end{cases} $$Readers are encouraged to verify the linearization by substituting the transforms back into the original system.
As a result, we are able to design a linear controller from $v$ to $y$ using LQR or pole placement, and then use the state and control transforms to map it back to the original nonlinear system.
MIMO Feedback Linearization
We now move forward to a more complex and general system: the multi-input multi-output nonlinear system. For the sake of simplicity, we limit ourselves to the square case (meaning we have the same number of inputs and outputs).
If we have a square MIMO system that looks like:
$$ \begin{align*} \displaystyle \Sigma: \dot{x} &= f(x) + \sum_{i=1}^n g_i(x) u_i \quad x \in \mathbb{R}^n \\ &= f(x) + g(x)u \\ y &= \begin{pmatrix} h_1(x) \\ \vdots \\ h_n(x) \end{pmatrix} \end{align*} $$where
$$ \begin{align*} g(x) &= \begin{pmatrix} g_1(x) & \cdots & g_n(x) \end{pmatrix} \\ u &= \begin{pmatrix} u_1 \\ \vdots \\ u_n\end{pmatrix} \end{align*} $$The question now is: how shall we define the relative degree of the MIMO system?
Vector Relative Degree
We introduce the concept of vector relative degree in this case. (Definition) Vector Relative Degree: Nonlinear system $\Sigma$ has relative degree $(r_1, r_2, \ldots, r_n)$ at $x_0$ if:
- For all $1 \le j \le n, 1 \le i \le n, 0 \le k \le r_i - 2$, $$ L_{g_j}L_f^kh_i = 0, \quad \forall x \text{ in a neighborhood of } x_0 $$
- The $n \times n$ matrix, also known as the Decoupling Matrix, $$ A(x) = \begin{pmatrix} L_{g_1}L_f^{r_1-1}h_1 & \cdots & L_{g_n}L_f^{r_1-1}h_1 \\ \vdots & \ddots & \vdots \\ L_{g_1}L_f^{r_n-1}h_n & \cdots & L_{g_n}L_f^{r_n-1}h_n \end{pmatrix} $$ is non-singular at $x_0$.
Then, for the $i$-th output, we can always express its $r_i$-th derivative as
$$ \begin{align*} y_i^{(r_i)} &= L_f^{r_i} h_i(x)+ L_{g_1}L_f^{r_i-1}h_i(x)u_1 + \cdots + L_{g_n}L_f^{r_i-1}h_i(x)u_n \\ &= L_f^{r_i} h_i(x) + \displaystyle \sum_j L_{g_j}L_f^{r_i-1}h_i(x)u_j \end{align*} $$If at least one $L_{g_j}L_f^{r_i-1}h_i(x)$ is non-zero, then the system is feedback linearizable. Therefore, we can also do IO linearization:
$$ \begin{align*} \begin{pmatrix} y_1^{(r_1)} \\ \vdots \\ y_n^{(r_n)} \end{pmatrix}&=\begin{pmatrix} L_f^{r_1}h_1(x) \\ \vdots \\ L_f^{r_n}h_n(x) \end{pmatrix} + \begin{pmatrix} L_{g_1}L_f^{r_1-1} h_1(x) & \cdots & L_{g_n}L_f^{r_1-1}h_1(x) \\ \vdots & \ddots & \vdots \\ L_{g_1}L_f^{r_n-1} h_n(x) & \cdots & L_{g_n}L_f^{r_n-1}h_n(x) \end{pmatrix} \begin{pmatrix} u_1 \\ \vdots \\ u_n \end{pmatrix} \\ &= L_fh(x) + A(x) u \end{align*} $$where we implicitly extended the definition of Lie derivative to its vector form. And the control can be transformed as:
$$ u(x) = A^{-1}(x)(-L_fh(x)+ v) \rightarrow \begin{pmatrix} y_1^{(r_1)} \\ \vdots \\ y_n^{(r_n)} \end{pmatrix} = v $$MIMO Feedback Linearization Theorem
Now we state the feedback linearization theorem in MIMO form: Theorem (MIMO Feedback Linearization): A MIMO nonlinear system $\Sigma$ is:
- feedback linearizable, if its vector relative degree $r = (r_1, r_2, \ldots, r_n)$ satisfies $$ r_1 + \ldots + r_n = \displaystyle \sum_{i=1}^n r_i \ge n$$
- only IO linearizable, if the sum $$ r_1 + \ldots + r_n = \displaystyle \sum_{i=1}^n r_i < n$$ in which case we have to rely on the internal zero dynamics also being stable in order for the full system to be stable.
Examples
Consider the motion of a wheeled vehicle moving in a horizontal plane. The kinematics of the vehicle are given by the differential equations:
$$ \begin{align*} \dot{x} &= V \cos \theta \\ \dot{y} &= V \sin \theta \\ \dot{\theta} &= \omega \end{align*} $$Here $(x, y)$ is the location in the horizontal 2D plane, $V$ is the vehicle speed, $\theta$ denotes the vehicle heading angle, and $\omega$ denotes the vehicle turning rate.
Ill-defined Vector Relative Degree
If we consider the vehicle speed $V$ and the vehicle turning rate $\omega$ as two control inputs, and the vehicle locations in the plane as two outputs, the vector relative degree is not well-defined. The system now looks like:
$$ \begin{align*} \frac{d}{dt}\begin{pmatrix} x \\ y \\ \theta \end{pmatrix} &= \begin{pmatrix}u_1 \cos \theta \\ u_1 \sin \theta \\ u_2 \end{pmatrix} \\ \begin{pmatrix} y_1 \\ y_2 \end{pmatrix} &= \begin{pmatrix} x \\ y \end{pmatrix} \end{align*} $$If we take the first time derivative of the outputs
$$ \begin{align*} \frac{d}{dt}\begin{pmatrix} y_1 \\ y_2 \end{pmatrix} &= \frac{d}{dt}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} u_1 \cos \theta \\ u_1 \sin \theta \end{pmatrix} \end{align*} $$Only the first control input shows up, which is a red flag. If we consider the decoupling matrix
$$ A(x) = \begin{pmatrix} \cos \theta & 0 \\ \sin \theta & 0 \end{pmatrix} $$we find that it is singular. Therefore the relative degree in this case is not well defined.
Well-defined Vector Relative Degree
If we now consider the vehicle acceleration and the vehicle turning rate as the two control inputs, and we still use the vehicle position as the two outputs, this time the vector relative degree is actually well-defined, as long as $V > 0$, for this fourth-order nonlinear system. We have the original system expressed as:
$$ \begin{align*} \frac{d}{dt} \begin{pmatrix} x \\ y \\ \theta \\ V \end{pmatrix} &= \begin{pmatrix} V \cos \theta \\ V \sin \theta \\ u_2 \\ u_1 \end{pmatrix} \\ \begin{pmatrix} y_1 \\ y_2 \end{pmatrix} &= \begin{pmatrix} x \\ y \end{pmatrix} \end{align*} $$If we take the first time derivative of the output vector:
$$ \frac{d}{dt}\begin{pmatrix} y_1 \\ y_2 \end{pmatrix} = \begin{pmatrix} V \cos \theta \\ V \sin \theta \end{pmatrix} $$Neither input shows up explicitly, therefore we take another round of differentiation:
$$ \frac{d^2}{dt^2}\begin{pmatrix} y_1 \\ y_2 \end{pmatrix} = \begin{pmatrix} u_1 \cos \theta - u_2 V \sin \theta \\ u_1 \sin \theta + u_2 V \cos \theta \end{pmatrix} $$Now both inputs show up, which is a good sign. We verify this by considering the decoupling matrix:
$$ A(x) = \begin{pmatrix} \cos \theta & -V \sin \theta \\ \sin \theta & V \cos \theta \end{pmatrix} $$And the determinant is given by
$$ \det(A(x)) = V $$We now realize that the decoupling matrix is non-singular, as long as the speed is non-zero. Therefore the vector relative degree is well-defined.
Control Law
Given that $r_1 = r_2 = 2$ in this case, and we satisfy $r_1 + r_2 = 4 = n$, we can find a state transformation and a control transformation so that the original system can be feedback linearized. We consider the state transformation as
$$ \begin{pmatrix} \xi_1 = y_1 = x\\ \xi_2 = y_2 = y\\ \xi_3 = \dot{y_1} \\ \xi_4 = \dot{y_2} \end{pmatrix} $$And we can derive the control transformation as
$$ \begin{pmatrix} v_1 = u_1 \cos \theta - u_2 V \sin \theta \\ v_2 = u_1 \sin \theta + u_2 V \cos \theta \end{pmatrix} $$and the resulting system now looks like
$$ \begin{align*} \begin{cases} \dot{\xi_1} &= \xi_3 \\ \dot{\xi_2} &= \xi_4 \\ \dot{\xi_3} &= v_1 \\ \dot{\xi_4} &= v_2 \end{cases} \end{align*} $$This is happily a double-integrator system, so it can be stabilized by pole placement or LQR.