Finding the steady state error in the Laplace domain I have the following block diagram:

Now I like to find the steady state error for theta_ref being a step input and for several values of n, Td, K1 and K2.
For the moment we can assume all gains are simple scalars, so no vectors and matrices involved.
I like to find an expression for e(s) so that I can apply Laplace's final value theorem.
I came up with:
$e(s) = \theta_{ref}(s) - \theta(s)$
$\theta(s) = (e(s)K_2-n\cdot M)N^{-1}....$
But I don't know how to handle the inner loop.
I have Matlab / Simulink on my computer, so if I can obtain steady state error information using this software it is find with me.
 A: For every integrator block (you have two), you have one state ($\omega$ and $\theta$). Then you can find the relations between all the states, and construct the matrices for the state space representations. From A, B, C, D, you can find the transfer function for your system. If it is type 0, you will have a steady state error for step inputs, otherwise the error will be zero.
For omega, just starting at the right of the integrator (which correspond to $\omega$), following the inner loop and finishing at the left of the integrator (which corresponds to $\dot\omega$).
$\dot{\omega} = (\omega_r - \omega)K_1 + T_dJ^{-1}$.
Do the same for $\dot\theta$ and construct the matrices A and B of the whole system. Just checking out your system, $D = 0$ (there is not a feed-forward component) and $y = Cx = [1 \quad0][\theta \quad \omega]^T$ (the output is just $\theta$).
A: If you're looking for tracking error, you can use Mason's formula to find the transfer function between $\Theta_{ref}$ and $\Theta$. First find the forward path gains. There is only one forward path:
$$F_1 = K_{2}*\frac{1}{N}*K_1\frac{1}{s}*N*\frac{1}{s}=\frac{K_1K_2}{s^2}$$
Now find the loop gains. there are two loops, the inner loop ($L_1$) and the outer loop($L_2$):
$$L_1=-1*K_1*\frac{1}{s}=-\frac{K_1}{s}$$
$$L_2=-1*K_2*\frac{1}{N}*K_1*\frac{1}{s}*N*\frac{1}{s}=-\frac{K_1K_2}{s^2}$$
Finding the determinant and plugging into Mason's formula, you will obtain:
$$\frac{\Theta}{\Theta_{ref}}=\frac{K_1K_2}{s^2+K_1s+K_1K_2}$$
$$T_e(s)=1-\frac{\Theta}{\Theta_{ref}}$$
You can do steady state analysis on this transfer function to find the tracking error, and you could use the same process to find the transfer function for the noise and disturbances and find the steady state error for those inputs as well.
