Solutions of Exercise 6.3

Solutions of Exercise 6.3#

Consider the system in Fig. 59.

  1. Find the state-space form of the system, where the states are \(x_1\) and \(x_2\) given in the figure.

  2. Compute a state-feedback controller for the state-space system defined in question 1, so that

    • The closed-loop eigenvalues are placed in \(-4\)

    • The static gain is exactly \(1\)

../_images/ex3-block1.svg

Fig. 59 Block diagram of the system#


Solution#

Question 1#

Remembering that \(s X(s)\) is equivalent to the derivative in the time domain, we can write

\( X_1(s) = \frac{1}{s+1} U(s) \quad \rightarrow \quad (s+1) X_1(s) = U(s) \quad \rightarrow \quad \dot{x}_1(t) + x_1(t) = u(t) \)

The first state evolves according to \(\dot{x}_1 = - x_1 + u\).

When it comes to the second state,

\( X_2(s) = \frac{1}{s+3} (U(s) + X_1(s)) \quad \rightarrow \quad (s+3) X_2(s) = U(s) + X_1(s) \quad \rightarrow \quad \dot{x}_2 = x_1 - 3 x_2 + u \)

Noting that \(y = x_1 + x_2\), we can finally write the state-space system as

\[\begin{split} \begin{dcases} \begin{bmatrix} \dot{x}_1 \\ \dot{x}_2 \end{bmatrix} = \begin{bmatrix} -1 & 0 \\ 1 & -3 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} + \begin{bmatrix} 1 \\ 1 \end{bmatrix} u \\ y = \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} \end{dcases} \end{split}\]

Question 2#

To design a state-feedback controller \(u = - L x + \ell_0 r\), we first need to check the controllability of the system

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

This matrix is full rank (\(\det(\mathcal{S}) = -1 \neq 0\)), which means that the system is controllable. We can therefore design the state feedback controller, and we start by the gain \(L\).

Under the control law \(u = - Lx + \ell_0 r\), the closed-loop system is

\( \dot{x} = A x + B (-Lx + \ell_0 r) = (A - BL) x + B \ell_0 r \)

The poles of the closed-loop are the eigenvalues of \(A-BL\) which, of course, depend upon the controller’s parameters, \(L = \begin{bmatrix} \ell_1 & \ell_2 \end{bmatrix}\). To design the controller, we first write the characteristic polynomial of the closed-loop:

(29)#\[\begin{split} \begin{aligned} \varphi(\lambda) &= \det(\lambda I - (A - BL)) = \det\left( \begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix} - \begin{bmatrix} -1 & 0 \\ 1 & -3 \end{bmatrix} + \begin{bmatrix} 1 \\ 1 \end{bmatrix} \begin{bmatrix} \ell_1 & \ell_2 \end{bmatrix}\right) \\ &= \det \begin{bmatrix} \lambda + 1 + \ell_1 & \ell_2 \\ \ell_1 - 1 & \lambda + 3 + \ell_2 \end{bmatrix} \\ &= (\lambda + 1 + \ell_1) \cdot (\lambda + 3 + \ell_2 ) - \ell_2 (\ell_1 - 1) \\ &= \lambda^2 + (4 + \ell_1 + \ell_2) \lambda + 3 + 3 \ell_1 + 2 \ell_2 \end{aligned} \end{split}\]

To find \(\ell_1\) and \(\ell_2\), we set the coefficients of this polynomial equal to the coefficients of the desired characteristic polynomial, i.e., the polynomial whose roots match the desired poles (\(-4\) and \(-4\)):

(30)#\[ \varphi^{\star}(\lambda) = (\lambda+4)^2 = \lambda^2 + 8 \lambda +16 \]

By setting the coefficients of (29) and (30) equal, we get

\[\begin{split} \begin{dcases} 4 + \ell_1 + \ell_2 = 8 \\ 3 + 3 \ell_1 + 2 \ell_2 = 16 \end{dcases} \end{split}\]

From the first equation we get \(\ell_1 = 4 - \ell_2\). Substituting this int othe second equation we obtain

\( 3 + 3(4 - \ell_2) + 2 \ell_2 = 16 \quad \rightarrow \quad -\ell_2 = 16 - 15 \quad \rightarrow \quad \ell_2 = -1 \)

We can now replace this \(\ell_2\) in the expression of \(\ell_1\), thus obtaining \(\ell_1 = 4 - (-1) = 5\). The state-feedback gain is therefore

\[ L = \begin{bmatrix} 5 & -1 \end{bmatrix} \]

The last parameter to find is \(\ell_0\). We design \(\ell_0\) so that the closed loop transfer function has a static gain equal to one.

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

We now find \(\ell_0\) by enforcing \(G_c(0) = 1\).

\[ -C (A - BL)^{-1} B \ell_0 = 1 \quad \rightarrow \quad \ell_0 = -\frac{1}{C (A-BL)^{-1} B} \]

Let’s compute \(\ell_0\) step-by-step.

\( A - BL = \begin{bmatrix} -1 & 0 \\ 1 & -3 \end{bmatrix} - \begin{bmatrix} 1 \\ 1 \end{bmatrix} \begin{bmatrix} 5 & -1 \end{bmatrix} = \begin{bmatrix} -6 & 1 \\ -4 & -2 \end{bmatrix} \)

\( (A - BL)^{-1} = \begin{bmatrix} -6 & 1 \\ -4 & -2 \end{bmatrix}^{-1} = \frac{1}{16} \begin{bmatrix} -2 & -1 \\ 4 & -6 \end{bmatrix} \)

\( \ell_0 = -\frac{1}{\frac{1}{16} \begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} -2 & -1 \\ 4 & -6 \end{bmatrix} \begin{bmatrix} 1 & 1 \end{bmatrix}} = -\frac{16}{\begin{bmatrix} 1 & 1 \end{bmatrix} \begin{bmatrix} -3 & -2 \end{bmatrix}} = \frac{16}{5} \)