Solutions of Exercise 7.1

Solutions of Exercise 7.1#

../_images/ex1-block1.svg

Fig. 61 Block diagram of the system#

Consider the system described in Fig. 61.

  1. Write the system in state-space form, where the state variables \(x_1\) and \(x_2\) according to Fig. 61.

  2. Design the state feedback control law \(u = - \ell_1 x_1 - \ell_2 x_2 + \ell_0 r\), where \(r\) is the reference signal, such that the closed-loop eigenvalues are in \(-4\) and \(-4\)

  3. Suppose now that the only measurable signal is the output \(y\). Design a state observer such that the state estimation error has eigenvalues \(-6\) and \(-6\). How is the control law modified?

  4. Write the resulting controller in the general linear feedback form.


Solution#

Question 1#

From Fig. 61 we can see that

\[ X_2(s) = \frac{1}{s} U(s) \quad s X_2(s) = U(s) \]

Recalling that \(s\) is equivalent to the derivative operator in the Laplace domain, this is equivalent to

\[ \dot{x}_2 = u \]

When it comes to \(X_1(s)\),

\[ X_1(s) = \frac{1}{s+1} (U(s) + X_2(s) - X_1(s)) \]

If we move \(-\frac{1}{s+1} X_1(s)\) to the left-hand side, we get

\[ \left( 1+ \frac{1}{s+1} \right) X_1(s) = \frac{1}{s+1} ( U(s) + X_2(s) ) \]

Summing the fractions in the parentheses we get

\[ \frac{s+2}{s+1} X_{1}(s) = \frac{1}{s+1} ( U(s) + X_2(s) ) \]

We then multiply both sides by \(s+1\), this becomes

\[ s X_1(s) + 2 X_1(s) = U(s) + X_2(s) \]

Moving \(2 X_1(s)\) on the right-hand side, and recalling that \(s X_1(s) \rightarrow \dot{x}_1\), we finally get

\[ \dot{x}_1 = - 2 x_1 + x_2 + u \]

The state-space form of the system is therefore

(37)#\[\begin{split} \begin{dcases} \dot{x} = \begin{bmatrix} -2 & 1 \\ 0 & 0 \end{bmatrix} + \begin{bmatrix} 1 \\ 1 \end{bmatrix} u \\ y = \begin{bmatrix} 1 & 0 \end{bmatrix} \end{dcases} \end{split}\]

Question 2#

To design a state-feedback controller, we first need to assess whether (37) is controllable. To do that, let’s compute the controllability matrix:

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

This matrix is full-rank. Indeed, \(\det(\mathcal{S}) = 1 \neq 0\).

To design the state-feedback controller, we solve the pole placement problem. The closed-loop characteristic polynomial is

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

Mathing \(\varphi(\lambda)\) to the desired characteristic polynomial \(\varphi^\star(\lambda) = (\lambda + 4)^2 = \lambda^2 + 8 \lambda + 16\), we get

\[\begin{split} \begin{dcases} \ell_1 + \ell_2 + 2 = 4 \\ \ell_1 + 2 \ell_2 = 16 \end{dcases} \qquad \rightarrow \qquad L = \begin{bmatrix} -4 & 10 \end{bmatrix} \end{split}\]

To compute the gain \(\ell_0\), we apply

\[\begin{split} \ell_0 = - \frac{1}{C (A - BL)^{-1} B} = - \frac{1}{\begin{bmatrix}1 & 0\end{bmatrix} \begin{bmatrix} 2 & -9 \\ 4 & -10\end{bmatrix}^{-1} \begin{bmatrix} 1 \\ 1\end{bmatrix}} = - \frac{16}{\begin{bmatrix}1 & 0\end{bmatrix} \begin{bmatrix} -10 & 9 \\ -4 & 2\end{bmatrix} \begin{bmatrix} 1 \\ 1\end{bmatrix}} = 16 \end{split}\]

The state feedback control law is therefore \(u = 4 x_1 - 10 x_2 + 16 r\).

Question 3#

Let’s design a state observer

\[ \dot{\hat{x}} = A \hat{x} + B u + K (y - C \hat{x}) \]

Before designing the state observer, let’s check that the system is observable by computing the observability matrix

\[\begin{split} \mathcal{O} = \begin{bmatrix} C \\ CA \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ -2 & 1\end{bmatrix} \end{split}\]

This matrix is full-rank. In fact, \(\det (\mathcal{O}) = 1 \neq 0\). We can therefore design the state-observer solving the pole placement problem. The characteristic polynomial of the state estimation error is

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

Matching \(\varphi(\lambda)\) to the desired characteristic polynomial \(\varphi^\star(\lambda) = (\lambda + 6)^2 = \lambda^2 + 12 \lambda + 36\), we get

\[\begin{split} \begin{dcases} 2 + \kappa_1 = 12 \\ \kappa_2 = 36 \end{dcases} \qquad \rightarrow \qquad K = \begin{bmatrix} 10 \\ 36 \end{bmatrix} \end{split}\]

The state-feedback control law is modified replacing \(x_1\) and \(x_2\) with \(\hat{x}_1\) and \(\hat{x}_2\), respectively:

\[ u = 4 \hat{x}_1 - 10 \hat{x}_2 + 16 r \]

Question 4#

../_images/ex1-block1.svg

Fig. 62 Block diagram of the generalized linear feedback#

The blocks \(F_r(s)\) and \(F_y(s)\) are computed as

\[\begin{split} \begin{aligned} F_r(s) &= \left[ 1 - L (sI - A + KC + BL)^{-1} B\right] \ell0 \\ F_y(s) &= L (sI - A + KC + BL)^{-1} K \end{aligned} \end{split}\]

Let’s compute them step-by-step

  • \(sI - A + KC + BL = \begin{bmatrix} s + 8 & 9 \\ 32 & s + 10 \end{bmatrix}\)

  • \((sI - A + KC + BL)^{-1} = \frac{1}{s^2 + 18s - 208} \begin{bmatrix} s + 10 & -9 \\ -32 & s+8 \end{bmatrix}\)

Therefore, the block \(F_y(s)\) reads

\[\begin{split} \begin{aligned} F_y(s) &= \frac{1}{s^2 + 18s - 208} \begin{bmatrix} -4 & 10 \end{bmatrix} \cdot \begin{bmatrix} s + 10 & -9 \\ -32 & s+8 \end{bmatrix} \cdot \begin{bmatrix} 10 \\ 36 \end{bmatrix} \\ &= \frac{1}{s^2 + 18s - 208} \begin{bmatrix} -4s - 360 & 10s + 116 \end{bmatrix} \cdot \begin{bmatrix} 10 \\ 36 \end{bmatrix} \\ &= \frac{320s + 576}{s^2 + 18s - 208} \end{aligned} \end{split}\]

The block \(F_r(s)\) reads

\[\begin{split} \begin{aligned} F_r(s) &= \left( 1 - \frac{1}{s^2 + 18s - 208} \begin{bmatrix} -4 & 10 \end{bmatrix} \cdot \begin{bmatrix} s + 10 & -9 \\ -32 & s+8 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 1 \end{bmatrix}\right) 16 \\ &= 16 \cdot \left( 1 - \frac{1}{s^2 + 18s - 208} \begin{bmatrix} -4s - 360 & 10s + 116 \end{bmatrix} \begin{bmatrix} 1 \\ 1 \end{bmatrix} \right) \\ &= 16 \cdot \left( 1 - \frac{6s - 244}{s^2 + 18s - 208} \right) \\ &= 16 \frac{s^2 + 12s + 36}{s^2 + 18s - 208} \end{aligned} \end{split}\]