# Feedback linearization

Feedback linearization is a common strategy employed in nonlinear control to control nonlinear systems. Feedback linearization techniques may be applied to nonlinear control systems of the form
| ${\dot {x}}(t)=f(x(t))+\sum _{i=1}^{m}\,g_{i}(x(t))\,u_{i}(t)$ | (1) |
where $x(t)\in \mathbb {R} ^{n}$ is the state, $u_{1}(t),\ldots ,u_{m}(t)\in \mathbb {R}$ are the inputs. The approach involves transforming a nonlinear control system into an equivalent linear control system through a change of variables and a suitable control input. In particular, one seeks a change of coordinates $z=\Phi (x)$ and control input $u=a(x)+b(x)\,v,$ so that the dynamics of $x(t)$ in the coordinates $z(t)$ take the form of a linear, controllable control system,
| ${\dot {z}}(t)=A\,z(t)+\sum _{i=1}^{m}b_{i}\,v(t).$ | (2) |
An outer-loop control strategy for the resulting linear control system can then be applied to achieve the control objective.

## Feedback linearization of SISO systems

Here, consider the case of feedback linearization of a single-input single-output (SISO) system. Similar results can be extended to multiple-input multiple-output (MIMO) systems. In this case, $u\in \mathbb {R}$ and $y\in \mathbb {R}$. The objective is to find a coordinate transformation $z=T(x)$ that transforms the system (1) into the so-called normal form which will reveal a feedback law of the form
| $u=a(x)+b(x)v\,$ | (3) |
that will render a linear input–output map from the new input $v\in \mathbb {R}$ to the output $y$. To ensure that the transformed system is an equivalent representation of the original system, the transformation must be a diffeomorphism. That is, the transformation must not only be invertible (i.e., bijective), but both the transformation and its inverse must be smooth so that differentiability in the original coordinate system is preserved in the new coordinate system. In practice, the transformation can be only locally diffeomorphic and the linearization results only hold in this smaller region.
Several tools are required to solve this problem.

### Lie derivative

The goal of feedback linearization is to produce a transformed system whose states are the output $y$ and its first $(n-1)$ derivatives. To understand the structure of this target system, we use the Lie derivative. Consider the time derivative of (2), which can be computed using the chain rule,
    ${\begin{aligned}{\dot {y}}={\frac {{\mathord {\operatorname {d} }}h(x)}{{\mathord {\operatorname {d} }}t}}&={\frac {\partial h(x)}{\partial x}}{\dot {x}}\\&={\frac {\partial h(x)}{\partial x}}f(x)+{\frac {\partial h(x)}{\partial x}}g(x)u\end{aligned}}$
Now we can define the Lie derivative of $h(x)$ along $f(x)$ as,
    $L_{f}h(x)\triangleq {\frac {\partial h(x)}{\partial x}}f(x),$
and similarly, the Lie derivative of $h(x)$ along $g(x)$ as,
    $L_{g}h(x)\triangleq {\frac {\partial h(x)}{\partial x}}g(x).$
With this new notation, we may express ${\dot {y}}$ as,
    ${\dot {y}}=L_{f}h(x)+L_{g}h(x)u$
Note that the notation of Lie derivatives is convenient when we take multiple derivatives with respect to either the same vector field, or a different one. For example,
    $L_{f}^{2}h(x)=L_{f}L_{f}h(x)={\frac {\partial (L_{f}h(x))}{\partial x}}f(x),$
and
    $L_{g}L_{f}h(x)={\frac {\partial (L_{f}h(x))}{\partial x}}g(x).$

### Relative degree

In our feedback linearized system made up of a state vector of the output $y$ and its first $(n-1)$ derivatives, we must understand how the input $u$ enters the system. To do this, we introduce the notion of relative degree. Our system given by (1) and (2) is said to have relative degree $r\in \mathbb {W}$ at a point $x_{0}$ if,
    $L_{g}L_{f}^{k}h(x)=0\qquad \forall x$ in a neighbourhood of $x_{0}$ and all $k\leq r-2$
    $L_{g}L_{f}^{r-1}h(x_{0})\neq 0$
Considering this definition of relative degree in light of the expression of the time derivative of the output $y$, we can consider the relative degree of our system (1) and (2) to be the number of times we have to differentiate the output $y$ before the input $u$ appears explicitly. In an LTI system, the relative degree is the difference between the degree of the transfer function's denominator polynomial (i.e., number of poles) and the degree of its numerator polynomial (i.e., number of zeros).

### Linearization by feedback

For the discussion that follows, we will assume that the relative degree of the system is $n$. In this case, after differentiating the output $n$ times we have,
    ${\begin{aligned}y&=h(x)\\{\dot {y}}&=L_{f}h(x)\\{\ddot {y}}&=L_{f}^{2}h(x)\\&\vdots \\y^{(n-1)}&=L_{f}^{n-1}h(x)\\y^{(n)}&=L_{f}^{n}h(x)+L_{g}L_{f}^{n-1}h(x)u\end{aligned}}$
where the notation $y^{(n)}$ indicates the $n$th derivative of $y$. Because we assumed the relative degree of the system is $n$, the Lie derivatives of the form $L_{g}L_{f}^{i}h(x)$ for $i=1,\dots ,n-2$ are all zero. That is, the input $u$ has no direct contribution to any of the first $(n-1)$th derivatives.
The coordinate transformation $T(x)$ that puts the system into normal form comes from the first $(n-1)$ derivatives. In particular,
    $z=T(x)={\begin{bmatrix}z_{1}(x)\\z_{2}(x)\\\vdots \\z_{n}(x)\end{bmatrix}}={\begin{bmatrix}y\\{\dot {y}}\\\vdots \\y^{(n-1)}\end{bmatrix}}={\begin{bmatrix}h(x)\\L_{f}h(x)\\\vdots \\L_{f}^{n-1}h(x)\end{bmatrix}}$
transforms trajectories from the original $x$ coordinate system into the new $z$ coordinate system. So long as this transformation is a diffeomorphism, smooth trajectories in the original coordinate system will have unique counterparts in the $z$ coordinate system that are also smooth. Those $z$ trajectories will be described by the new system,
    ${\begin{cases}{\dot {z}}_{1}&=L_{f}h(x)=z_{2}(x)\\{\dot {z}}_{2}&=L_{f}^{2}h(x)=z_{3}(x)\\&\vdots \\{\dot {z}}_{n}&=L_{f}^{n}h(x)+L_{g}L_{f}^{n-1}h(x)u\end{cases}}.$
Hence, the feedback control law
    $u={\frac {1}{L_{g}L_{f}^{n-1}h(x)}}(-L_{f}^{n}h(x)+v)$
renders a linear input–output map from $v$ to $z_{1}=y$. The resulting linearized system
    ${\begin{cases}{\dot {z}}_{1}&=z_{2}\\{\dot {z}}_{2}&=z_{3}\\&\vdots \\{\dot {z}}_{n}&=v\end{cases}}$
is a cascade of $n$ integrators, and an outer-loop control $v$ may be chosen using standard linear system methodology. In particular, a state-feedback control law of
    $v=-Kz\qquad ,$
where the state vector $z$ is the output $y$ and its first $(n-1)$ derivatives, results in the LTI system
    ${\dot {z}}=Az$
with,
    $A={\begin{bmatrix}0&1&0&\ldots &0\\0&0&1&\ldots &0\\\vdots &\vdots &\vdots &\ddots &\vdots \\0&0&0&\ldots &1\\-k_{1}&-k_{2}&-k_{3}&\ldots &-k_{n}\end{bmatrix}}.$
So, with the appropriate choice of $K$, we can arbitrarily place the closed-loop poles of the linearized system.

### Unstable zero dynamics

Feedback linearization can be accomplished with systems that have relative degree less than $n$. However, the normal form of the system will include zero dynamics (i.e., states that are not observable from the output of the system) that may be unstable. In practice, unstable dynamics may have deleterious effects on the system (e.g., it may be dangerous for internal states of the system to grow unbounded). These unobservable states may be controllable or at least stable, and so measures can be taken to ensure these states do not cause problems in practice. Minimum phase systems provide some insight on zero dynamics.

## Feedback linearization of MIMO systems

Although NDI is not necessarily restricted to this type of system, lets consider a nonlinear MIMO system that is affine in input $\mathbf {\mathbf {u} }$, as is shown below.
| ${\begin{aligned}{\dot {\mathbf {x} }}&=\mathbf {f} (\mathbf {x} )+G(\mathbf {x} )\mathbf {u} \\\mathbf {y} &=\mathbf {h} (\mathbf {x} )\end{aligned}}$ | (4) |
It is assumed that the amount of inputs is the same as the amount of outputs. Lets say there are $m$ inputs and outputs. Then $G=[\mathbf {g} _{1}\,\mathbf {g} _{2}\,\cdots \,\mathbf {g} _{m}]$ is an $n\times m$ matrix, where $\mathbf {g} _{j}$ are the vectors making up its columns. Furthermore, $\mathbf {u} \in \mathbb {R} ^{m}$ and $\mathbf {y} \in \mathbb {R} ^{m}$. To use a similar derivation as for SISO, the system from Eq. 4 can be split up by isolating each $i$'th output $y_{i}$, as is shown in Eq. 5.
| ${\begin{aligned}{\dot {\mathbf {x} }}&=\mathbf {f} (\mathbf {x} )+\mathbf {g} _{1}(\mathbf {x} )u_{1}+\mathbf {g} _{2}(\mathbf {x} )u_{2}+\cdots +\mathbf {g} _{m}(\mathbf {x} )u_{m}\\y_{i}&=h_{i}(\mathbf {x} )\end{aligned}}$ | (5) |
Similarly to SISO, it can be shown that up until the $(r_{i}-1)$’th derivative of $y_{i}$, the term $L_{g_{j}}h_{i}(\mathbf {x} )=0$. Here $r_{i}$ refers to the relative degree of the $i$'th output. Analogously, this gives
| ${\begin{aligned}y_{i}=&h_{i}(\mathbf {x} )\\{\dot {y}}_{i}=&L_{f}h_{i}(\mathbf {x} )\\{\ddot {y}}_{i}=&L_{f}^{2}h_{i}(\mathbf {x} )\\&\vdots \\y_{i}^{(r_{i})}=&L_{f}^{r_{i}}h_{i}(\mathbf {x} )+\sum _{j=1}^{m}L_{g_{j}}L_{f}^{r_{i}-1}h_{i}(\mathbf {x} )u_{j}\\=&L_{f}^{r_{i}}h_{i}(\mathbf {x} )+{\begin{bmatrix}L_{g_{1}}L_{f}^{r_{i}-1}h_{i}&L_{g_{2}}L_{f}^{r_{i}-1}h_{i}&\cdots &L_{g_{m}}L_{f}^{r_{i}-1}h_{i}\end{bmatrix}}\mathbf {u} \end{aligned}}$ | (6) |
Working this out the same way as SISO, one finds that defining a virtual input $v_{i}$ such that
| ${\begin{aligned}v_{i}&=L_{f}^{r_{i}}h_{i}(\mathbf {x} )+\sum _{j=1}^{m}L_{g_{j}}L_{f}^{r_{i}-1}h_{i}(\mathbf {x} )u_{j}\\&=b_{i}(\mathbf {x} )+{\begin{bmatrix}a_{i1}&a_{i1}&\cdots &a_{im}\end{bmatrix}}\mathbf {u} \end{aligned}}$ | (7) |
linearizes this $i$'th system. However, if $m>1$, $\mathbf {u}$ can obviously not be solved given a value for $v_{i}$. However, setting up such an equation for all $m$ outputs, $y_{1},y_{2},\ldots ,y_{m}$, results in $m$ equations of the form shown in Eq. 7. Combining these equation results in a matrix equation, which generally allows solving for the input $\mathbf {u}$, as is shown below.
| ${\begin{aligned}\mathbf {v} &=\mathbf {b} +A\mathbf {u} \\A^{-1}(\mathbf {v} -\mathbf {b} )&=\mathbf {u} \end{aligned}}$ | (8) |