enter image description here

I am confused with the above problem. I have shown my attempt.

I doubt the equation x1 = x1 + u. Please help me with this problem.


Your error: The state variables should be the outputs of the integrators. You have totally misplaced them. To make it clear let's draw the diagram with fully drawn summing nodes, where more than one signal comes to the node:

enter image description here

The equations are now a little different. There's no need to derive the transfer function or higher order differential equations. It's also dangerous, because you can end to another state variable equation which give the same transfer function, but the state variables are something else than the outputs of the integrators of the given diagram.

This flow diagram is not new in EESE: How to find the state-variable equations from the signal flow graph of the system?

Unfortunately the given answers there are a little confusing because they do not start directly from the final state variables. One of the answers write the same text as me, but still writes different equations. Obviously there is some heavyweight tradition which is difficult to kill.

BTW if you have equation A=A+B and B isn't zero, you should get alarmed. Your writing shows that you already have one of your eyes opened.


Mason's rule is a nice tool that converts the system into a single transfer function. Once you get the transfer function, you can covert it to the state space representation if and only if the transfer function is proper. Mason's rule is done as follows:

1- Loop gain

\$ L_1= -\frac{1}{s}, L_2 = -\frac{1}{s}\$.

2-Forward-path gain

\$ P_1 = (1)(-1)(1)(-1)(1) = 1.\$

3-Nontouching loops

\$ L_1L_2\$

Mason's rule is

\$ G(s) = \frac{Y(s)}{U(s)} = \frac{\sum_k P_k\Delta_k}{\Delta}\$


\$ \Delta = 1- (L_1 + L_2) + (L_1L_2) = 1 + \frac{2}{s} + \frac{1}{s^2}\$ and \$ \Delta_1 = 1.\$

The single transfer function is then \$ G(s) = \frac{s^2}{s^2 + 2s^2+1}\$. It is clearly that the transfer function is proper that is the polynomial's degree of the numerator is less than or equal the denominator's polynomial's degree. Rewrite the system, we get

$$ (s^2+2s+1)Y(s) = s^2 U(s) $$

In the time domain, we get

$$ \ddot{y}(t) + 2\dot{y}(t) + y(t) = \ddot{u}(t) $$

The transfer function has this form $$ G(s) = \frac{Y(s)}{U(s)} = \frac{ b_0 s^2 + b_1 s + b_0 }{ s^2 + a_1 s + a_2 } $$

Controllable canonical form can be utilized to represents the system as follows:

$$ \begin{align} \dot{x} &= \begin{bmatrix} 0 & 1\\ -a_2 & -a_1 \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix} u \\ y&= \begin{bmatrix} b_2-a_2b_0 & b_1-a_1b_0 \end{bmatrix} + b_0u \end{align} $$

where \$b_0=1,b_1=0,b_2=0,a_1=2,a_2=1\$. The state space representation of the system is

$$ \begin{align} \dot{x} &= \begin{bmatrix} 0 & 1\\ -1 & -2 \end{bmatrix} + \begin{bmatrix} 0 \\ 1 \end{bmatrix} u \\ y&= \begin{bmatrix} -1 & -2 \end{bmatrix} + u \end{align} $$

Using Matlab, we can test the transfer function, therefore, the code is

enter image description here

syms s
num=[1 0 0];
den=[1 2 1];

Now let us test the state space representation that we have formed.

enter image description here

b0=1; b1=0;b2=0;

A=[0 1; -a2 -a1];
C=[b2-a2*b0 b1-a1*b0];

which is the same result we've got.

  • \$\begingroup\$ You made a mistake in G(s). It should be (s+1)^2 in denominator. \$\endgroup\$ – anhnha Mar 16 '18 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.