Solutions of Exercise 6.4

Solutions of Exercise 6.4#

Consider the state-space system

(32)#\[\begin{split} \begin{dcases} \dot{x} = \begin{bmatrix} -1 & -1 \\ 1 & -1 \end{bmatrix} x + \begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ y = \begin{bmatrix} 1 & 0 \end{bmatrix} x \end{dcases} \end{split}\]
  1. Compute the poles of (32)

  2. Compute the corresponding transfer function \(G(s)\), its poles and zeros.

Design a state-feedback controller \(u = -Lx + \ell_0 r\) such that the closed-loop poles are \(-2\) and \(-3\).

  1. Find the state-feedback gain \(L\).

  2. Can \(\ell_0\) be chosen such that the steady-state error is \(0\) when \(r\) is constant? Motivate the answer.


Solution#

Question 1#

The poles of (32) are defined as the eigenvalues of the \(A\) matrix, that is, the roots of

\[\begin{split} \varphi(\lambda) = \det (\lambda I - A) = \det \begin{bmatrix} \lambda + 1 & 1 \\ -1 & \lambda + 1 \end{bmatrix} = (\lambda+1)^2 + 1 = \lambda^2 + 2 \lambda + 2 \end{split}\]

The eigenvalues are \(\lambda = \frac{-2 \pm \sqrt{-4}}{2} = -1 \pm i 1\)

Question 2#

The transfer function can be computed as

\[\begin{split} \begin{aligned} G(s) &= C (s I - A)^{-1} B + D = \frac{1}{s^2 + 2s + 2} \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} s + 1 & -1 \\ 1 & s+1 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \\ &= \frac{1}{s^2 + 2s + 2} \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} s \\ s +2\end{bmatrix} = \frac{s}{s^2 + 2s + 2} \end{aligned} \end{split}\]

\(G(s)\) has two poles, \(s = -1 \pm i1\), and one zero, \(s = 0\).

Question 3#

Let’s first check that the system is controllable. To do so, we inspect the controllability matrix

\[\begin{split} \mathcal{S} = \begin{bmatrix} B & AB \end{bmatrix} = \begin{bmatrix} 1 & -2 \\ 1 & 0 \end{bmatrix} \end{split}\]

This matrix is full-rank. Indeed, \(\det(\mathcal{S}) = 2 \neq 0\). The system is therefore controllable. To design the state-feedback controller, we plug \(u = -Lx + \ell_0 r\) in (32). Doing so, we get

(33)#\[ \dot{x} = (A - BL) x + B \ell_0 r \]

The closed-loop poles are the roots of the characteristic polynomial

\[\begin{split} \begin{aligned} \varphi(\lambda) &= \det (\lambda I - (A - BL)) = \det \begin{bmatrix} \lambda + 1 + \ell_1 & 1 + \ell_2 \\ -1 + \ell_1 & \lambda + 1 + \ell_2 \end{bmatrix} \\ &= \lambda^2 + (\ell_1 + \ell_2 + 2) \lambda + (\ell_1 + 1) (\ell_2 + 1) - (\ell_1 - 1)(\ell_2 + 1) \\ &= \lambda^2 + (\ell_1 + \ell_2 + 2) \lambda + 2 + 2 \ell_2 \end{aligned} \end{split}\]

The desidered characteristic polynomial is that having \(-2\) and \(-3\) as roots, i.e.,

\[ \varphi^{\star} (\lambda) = (\lambda + 2)(\lambda + 3) = \lambda^2 + 5 \lambda + 6 \]

Matching the coefficients of these two, we get \(\ell_1\) and \(\ell_2\):

\[\begin{split} \begin{dcases} \ell_1 + \ell_2 + 2 = 5 \\ 2 + 2 \ell_2 = 6 \end{dcases} \quad \rightarrow \quad \begin{dcases} \ell_1 = 5 - 2 - \ell_2 = 1 \\ \ell_2 = 2 \end{dcases} \end{split}\]

Hence, \(\boxed{L = \begin{bmatrix} 1 & 2 \end{bmatrix}}\)

Question 4#

To find \(\ell_0\), we compute the closed-loop transfer function \(G_c(s)\). Moving (33) to the Laplace domain, we get

\[ s X(s) = (A - BL) X(s) + B \ell_0 R(s) \quad \rightarrow \quad (sI - (A - BL)) X(s) = B \ell_0 R(s) \]

This means

\[ X(s) = (sI - (A - BL))^{-1} B \ell_0 R(s) \]

Replacing \(X(s)\) in the output transformation we get

\[ Y(s) = C X(s) = C \big(sI - (A - BL)\big)^{-1} B \ell_0 R(s) \]

The closed loop transfer function is therefore

\[\begin{split} \begin{aligned} G_c(s) \equiv \frac{Y(s)}{R(s)} &= C \big(sI - (A - BL)\big)^{-1} B \ell_0 \\ &= \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} s+2 & 3 \\ 0 & s + 3 \end{bmatrix}^{-1} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \ell_0 \\ &= \frac{1}{(s+2)(s+3)} \begin{bmatrix} 1 & 0 \end{bmatrix} \begin{bmatrix} s+3 & -3 \\ 0 & s + 2 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \ell_0 \\ &= \frac{1}{(s+2)(s+3)} \begin{bmatrix} s+3 & -3 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \ell_0 \\ &= \frac{s}{(s+2)(s+3)} \ell_0 \end{aligned} \end{split}\]

Here we can notice a problem: \(G_c(s)\) contains a derivative action.[1] This means that \(\lim_{t \to \infty} y(t) = 0\) for constant reference signals. Because of this, an \(\ell_0\) making the steady-state error null cannot be found.

Notice that if we try to enforce \(G_c(0) = 1\), we get

\[ \frac{0}{6} \ell_0 = 1 \quad \Rightarrow \quad \nexists \ell_0 \]