# How to find the transfer function of a control system?

I have a linear control system defined by the following equations:

$$\begin{array}{l}\dot{x}_{1}(t)=-\frac{1}{2}\left(x_{1}(t)-x_{2}(t)\right) \\ \dot{x}_{2}(t)=\frac{1}{10}\left(2 x_{2}(t)-10 x_{1}(t)\right)+u(t) \\ y(t)=x_{2}(t)\end{array}$$

I would like to find the transfer function from a constant input $$u(t)=\bar{u}$$ to the output $$y$$.

I know that the transfer function is equal to $$G(S)=\frac{\mathcal{L}(y(s))}{\mathcal{L}(\bar{u})}=\mathcal{L}(y(s))\cdot \frac{s}{\bar{u}}$$

In order to find $$\mathcal{L}(y(s))$$ we solve the following system of equations:

$$\begin{array}{l}s\mathcal{L}(x_1(s))-\mathcal{L}(x_1(0))=-\frac{1}{2}\mathcal{L}(x_1(s))+\frac{1}{2}\mathcal{L}(x_2(s))\\s\mathcal{L}(x_2(s))-\mathcal{L}(x_2(0))=\frac{1}{10}(2\mathcal{L}(x_2(s))-10\mathcal{L}(x_1(s))+\frac{\bar{u}}{s}\end{array}$$

However, this can be tricky to solve, so we calculate the transfer function using the following formula: $$G(s)=C(s I-A)^{-1} B$$.

My question is: is the reasoning correct? Is the formula true for all types of control systems?

• Since you have the system in the state-space form, I think you should go with the formula. This formula is applied to any linear system given in the state space form in order to convert it into the $s$ domain. There is also a more general version of the formula in case you have a $D$ matrix as well. – Teo Protoulis May 13 '20 at 11:35

Yes, your reasoning is right and is applicable to all control systems with a valid state space representation. The formula to go from state-space to transfer function can be easily derived like so: $$\dot{x} = Ax +Bu$$ $$y = Cx + Du$$
Taking laplace transform on both equations one by one $$sX= AX + BU$$ i.e. $$(sI-A)X = BU$$ i.e. $$X = (sI-A)^{-1}BU\cdots(i)$$ $$Y = CX + DU...(ii)$$ put (i) in (ii) you get $$Y = C(sI-A)^{-1}BU + DU$$. We know transfer function is $$G(s) = \frac{Y(s)}{U(s)}$$ $$G(s) = C(sI-A)^{-1}B + D$$
Now your equations are: $$\begin{bmatrix}\dot{x_1} \\ \dot{x_2} \\ \end{bmatrix} = \begin{bmatrix} -0.5 & 0.5 \\ -1 & 0.2 \\ \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \end{bmatrix} + \begin{bmatrix}0\\1\end{bmatrix}u$$
$$y = \begin{bmatrix}0 &1\end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} + \begin{bmatrix}0 \end{bmatrix}u$$ using these equations in $$G(s)$$ we get $$G(s) = \frac{s + 0.5}{s^2 + 0.3s + 0.4}$$