# Ackermann's formula

In control theory, Ackermann's formula provides a method for designing controllers to achieve desired system behavior by directly calculating the feedback gains needed to place the closed-loop system's poles (eigenvalues) at specific locations (pole allocation problem).
These poles directly influence how the system responds to inputs and disturbances. Ackermann's formula provides a direct way to calculate the necessary adjustments—specifically, the feedback gains—needed to move the system's poles to the target locations. This method, developed by Jürgen Ackermann, is particularly useful for systems that don't change over time (time-invariant systems), allowing engineers to precisely control the system's dynamics, such as its stability and responsiveness.

## State feedback control

Consider a linear continuous-time invariant system with a state-space representation
${\begin{aligned}\mathbf {\dot {x}} (t)&=\mathbf {Ax} (t)+\mathbf {Bu} (t)\\\mathbf {y} (t)&=\mathbf {Cx} (t)\end{aligned}}$
where x is the state vector, u is the input vector, and A, B, C are matrices of compatible dimensions that represent the dynamics of the system. An input-output description of this system is given by the transfer function
${\begin{aligned}G(s)&=\mathbf {C} (s\mathbf {I} -\mathbf {A} )^{-1}\mathbf {B} \\[4pt]&=\mathbf {C} \ {\frac {\operatorname {adj} (s\mathbf {I} -\mathbf {A} )}{\det(s\mathbf {I} -\mathbf {A} )}}\ \mathbf {B} .\end{aligned}}$
where det is the determinant and adj is the adjugate. Since the denominator of the right equation is given by the characteristic polynomial of A, the poles of G are eigenvalues of A (note that the converse is not necessarily true, since there may be cancellations between terms of the numerator and the denominator). If the system is unstable, or has a slow response or any other characteristic that does not specify the design criteria, it could be advantageous to make changes to it. The matrices A, B, C, however, may represent physical parameters of a system that cannot be altered. Thus, one approach to this problem might be to create a feedback loop with a gain k that will feed the state variable x into the input u.
If the system is controllable, there is always an input u(t) such that any state x$_0$ can be transferred to any other state x(t). With that in mind, a feedback loop can be added to the system with the control input u(t) = r(t) − kx(t), such that the new dynamics of the system will be
${\begin{aligned}\mathbf {\dot {x}} (t)&=\mathbf {Ax} (t)+\mathbf {B} [\mathbf {r} (t)-\mathbf {kx} (t)]\\[2pt]&=[\mathbf {A} -\mathbf {Bk} ]\mathbf {x} (t)+\mathbf {Br} (t),\\[4pt]\mathbf {y} (t)&=\mathbf {Cx} (t).\end{aligned}}$
In this new realization, the poles will be dependent on the characteristic polynomial Δ$_{new}$ of A − Bk, that is
$\Delta _{\text{new}}(s)=\det {\bigls\mathbf {I} -(\mathbf {A} -\mathbf {Bk} ){\bigr )}.$

## Ackermann's formula

Computing the characteristic polynomial and choosing a suitable feedback matrix can be a challenging task, especially in larger systems. One way to make computations easier is through Ackermann's formula. For simplicity's sake, consider a single input vector with no reference parameter r, such as
${\begin{aligned}\mathbf {u} (t)&=-\mathbf {k} ^{\rm {T}}\mathbf {x} (t)\\[2pt]\mathbf {\dot {x}} (t)&=\mathbf {Ax} (t)-\mathbf {Bk} ^{\rm {T}}\mathbf {x} (t),\end{aligned}}$
where k$^T$ is a feedback vector of compatible dimensions. Ackermann's formula states that the design process can be simplified by only computing the following equation:
$\mathbf {k} ^{\rm {T}}={\begin{bmatrix}0&\cdots &0&1\end{bmatrix}}\,{\mathcal {C}}^{-1}\Delta _{\text{new}}(\mathbf {A} ),$
in which Δ$_{new}$(A) is the desired characteristic polynomial evaluated at matrix A, and ${\mathcal {C}}$ is the controllability matrix of the system.

### Proof

This proof is based on Encyclopedia of Life Support Systems entry on Pole Placement Control. Assume that the system is controllable. The characteristic polynomial of $\mathbf {A} _{\rm {CL}}:=(\mathbf {A} -\mathbf {Bk} ^{\rm {T}})$ is given by
$\Delta (\mathbf {A} _{\rm {CL}})=(\mathbf {A} _{\rm {CL}})^{n}+\sum _{k=0}^{n-1}\alpha _{k}\mathbf {A} _{\rm {CL}}^{k}$
Calculating the powers of A$_{CL}$ results in
${\begin{aligned}(\mathbf {A} _{\rm {CL}})^{0}=&\ (\mathbf {A} -\mathbf {Bk} ^{\rm {T}})^{0}=\mathbf {I} \\[4pt](\mathbf {A} _{\rm {CL}})^{1}=&\ (\mathbf {A} -\mathbf {Bk} ^{\rm {T}})^{1}=\mathbf {A} -\mathbf {Bk} ^{\rm {T}}\\[4pt](\mathbf {A} _{\rm {CL}})^{2}=&\ (\mathbf {A} -\mathbf {Bk} ^{\rm {T}})^{2}\\[2pt]&=\mathbf {A} ^{2}-\mathbf {ABk} ^{\rm {T}}-\mathbf {Bk} ^{\rm {T}}\mathbf {A} +(\mathbf {Bk} ^{\rm {T}})^{2}\\[2pt]&=\mathbf {A} ^{2}-\mathbf {ABk} ^{\rm {T}}-(\mathbf {Bk} ^{\rm {T}})[\mathbf {A} -\mathbf {Bk} ^{\rm {T}}]\\[2pt]&=\mathbf {A} ^{2}-\mathbf {ABk} ^{\rm {T}}-\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}\\[4pt]\vdots \ &\\[4pt](\mathbf {A} _{\rm {CL}})^{n}=&\ (\mathbf {A} -\mathbf {Bk} ^{\rm {T}})^{n}\\[2pt]&=\mathbf {A} ^{n}-\mathbf {A} ^{n-1}\mathbf {Bk} ^{\rm {T}}-\mathbf {A} ^{n-2}\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}-\ldots -\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}^{n-1}\end{aligned}}$
Replacing the previous equations into Δ(A$_{CL}$) yields
${\begin{aligned}\Delta (\mathbf {A} _{\rm {CL}})&=\overbrace {(\mathbf {A} ^{n}-\mathbf {A} ^{n-1}\mathbf {Bk} ^{\rm {T}}-\mathbf {A} ^{n-2}\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}-\ldots -\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}^{n-1})} ^{(\mathbf {A} _{\rm {CL}})^{n}}+\overbrace {\ldots +\alpha _{2}(\mathbf {A} ^{2}-\mathbf {ABk} ^{\rm {T}}-\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}})+\alpha _{1}(\mathbf {A} -\mathbf {Bk} ^{\rm {T}})+\alpha _{0}\mathbf {I} } ^{\sum _{k=0}^{n-1}\alpha _{k}\mathbf {A} _{\rm {CL}}^{k}}\\[4pt]&=(\mathbf {A} ^{n}+\alpha _{n-1}\mathbf {A} ^{n-1}+\ldots +\alpha _{2}\mathbf {A} ^{2}+\alpha _{1}\mathbf {A} +\alpha _{0}\mathbf {I} )-(\mathbf {A} ^{n-1}\mathbf {Bk} ^{\rm {T}}+\mathbf {A} ^{n-2}\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}+\ldots +\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}^{n-1})+\ldots -\alpha _{2}(\mathbf {ABk} ^{\rm {T}}+\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}})-\alpha _{1}(\mathbf {Bk} ^{\rm {T}})\\[4pt]&=\Delta (\mathbf {A} )-(\mathbf {A} ^{n-1}\mathbf {Bk} ^{\rm {T}}+\mathbf {A} ^{n-2}\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}+\ldots +\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}}^{n-1})-\ldots -\alpha _{2}(\mathbf {ABk} ^{\rm {T}}+\mathbf {Bk} ^{\rm {T}}\mathbf {A} _{\rm {CL}})-\alpha _{1}(\mathbf {Bk} ^{\rm {T}})\end{aligned}}$
Rewriting the above equation as a matrix product and omitting terms that k$^T$ does not appear isolated yields
$\Delta (\mathbf {A} _{\rm {CL}})=\Delta (\mathbf {A} )-{\begin{bmatrix}\mathbf {B} &\mathbf {AB} &\cdots &\mathbf {A} ^{n-1}\mathbf {B} \end{bmatrix}}{\begin{bmatrix}\star \\\vdots \\\mathbf {k} ^{\rm {T}}\end{bmatrix}}$
From the Cayley–Hamilton theorem, Δ(A$_{CL}$) = 0, thus
${\begin{bmatrix}\mathbf {B} &\mathbf {AB} &\cdots &\mathbf {A} ^{n-1}\mathbf {B} \end{bmatrix}}{\begin{bmatrix}\star \\\vdots \\\mathbf {k} ^{\rm {T}}\end{bmatrix}}=\Delta (\mathbf {A} )$
Note that ${\mathcal {C}}={\begin{bmatrix}\mathbf {B} &\mathbf {AB} &\cdots &\mathbf {A} ^{n-1}\mathbf {B} \end{bmatrix}}$ is the controllability matrix of the system. Since the system is controllable, ${\mathcal {C}}$ is invertible. Thus,
${\begin{bmatrix}\star \\\vdots \\\mathbf {k} ^{\rm {T}}\end{bmatrix}}={\mathcal {C}}^{-1}\Delta (\mathbf {A} )$
To find k$^T$, both sides can be multiplied by the vector ${\begin{bmatrix}0&\cdots &0&1\end{bmatrix}}$ giving
${\begin{bmatrix}0&\cdots &0&1\end{bmatrix}}{\begin{bmatrix}\star \\\vdots \\\mathbf {k} ^{\rm {T}}\end{bmatrix}}={\begin{bmatrix}0&\cdots &0&1\end{bmatrix}}\,{\mathcal {C}}^{-1}\Delta (\mathbf {A} )$
Thus,
$\mathbf {k} ^{\rm {T}}={\begin{bmatrix}0&\cdots &0&1\end{bmatrix}}\,{\mathcal {C}}^{-1}\Delta (\mathbf {A} )$

## Example

Consider
$\mathbf {\dot {x}} ={\begin{bmatrix}1&1\\1&2\end{bmatrix}}\mathbf {x} +{\begin{bmatrix}1\\0\end{bmatrix}}\mathbf {u}$
We know from the characteristic polynomial of A that the system is unstable since
${\begin{aligned}\det(s\mathbf {I} -\mathbf {A} )&=(s-1)(s-2)-1\\&=s^{2}-3s+2,\end{aligned}}$
the matrix A will only have positive eigenvalues. Thus, to stabilize the system we shall put a feedback gain
$\mathbf {k} ={\begin{bmatrix}k_{1}&k_{2}\end{bmatrix}}.$
From Ackermann's formula, we can find a matrix k that will change the system so that its characteristic equation will be equal to a desired polynomial. Suppose we want $\Delta _{\text{desired}}(s)=s^{2}+11s+30.$
Thus, $\Delta _{\text{desired}}(\mathbf {A} )=\mathbf {A} ^{2}+11\mathbf {A} +30\mathbf {I}$ and computing the controllability matrix yields
${\begin{aligned}{\mathcal {C}}&={\begin{bmatrix}\mathbf {B} &\mathbf {AB} \end{bmatrix}}={\begin{bmatrix}1&1\\0&1\end{bmatrix}}\\[4pt]\implies {\mathcal {C}}^{-1}&={\begin{bmatrix}1&-1\\0&1\end{bmatrix}}\end{aligned}}$
Also, we have that $\mathbf {A} ^{2}=\left[{\begin{smallmatrix}2&3\\3&5\end{smallmatrix}}\right].$
Finally, from Ackermann's formula
${\begin{aligned}\mathbf {k} ^{\rm {T}}&={\begin{bmatrix}0&1\end{bmatrix}}{\begin{bmatrix}1&-1\\0&1\end{bmatrix}}\left({\begin{bmatrix}2&3\\3&5\end{bmatrix}}+11{\begin{bmatrix}1&1\\1&2\end{bmatrix}}+30\mathbf {I} \right)\\[2pt]&={\begin{bmatrix}0&1\end{bmatrix}}{\begin{bmatrix}1&-1\\0&1\end{bmatrix}}{\begin{bmatrix}43&14\\14&57\end{bmatrix}}\\[2pt]&={\begin{bmatrix}0&1\end{bmatrix}}{\begin{bmatrix}29&-43\\14&57\end{bmatrix}}\\[6pt]&={\begin{bmatrix}14&57\end{bmatrix}}\end{aligned}}$

## State observer design

Ackermann's formula can also be used for the design of state observers. Consider the linear discrete-time observed system
${\begin{aligned}\mathbf {\hat {x}} (n+1)&=\mathbf {A{\hat {x}}} (n)+\mathbf {Bu} (n)+\mathbf {L} [\mathbf {y} (n)-\mathbf {\hat {y}} (n)]\\\mathbf {\hat {y}} (n)&=\mathbf {C{\hat {x}}} (n)\end{aligned}}$
with observer gain L. Then Ackermann's formula for the design of state observers is noted as
$\mathbf {L} ^{\rm {T}}={\begin{bmatrix}0&0&\cdots &1\end{bmatrix}}({\mathcal {O}}^{\rm {T}})^{-1}\Delta _{\text{new}}(\mathbf {A} ^{\rm {T}})$
with observability matrix ${\mathcal {O}}$. Here it is important to note, that the observability matrix and the system matrix are transposed: ${\mathcal {O}}^{\rm {T}}$ and A$^T$.
Ackermann's formula can also be applied on continuous-time observed systems.