# Block algebra and normal algebra inconsistent

I've been playing around with some block maths, mostly trying to remember how it actually works, and I've come to a simple example that should be reduced, however when doing the normal maths, compared to the block maths, I get different answers. The solution, when doing regular maths give me: $$y=e S_1 S_2 G_r-d S_2$$ $$e = w - y$$ $$y+ y G_r S_1 S_2 =w G_r S_1 S_2-d S_2$$ $$y=\frac{ w G_rS_1 S_2 -d S_2}{1+G_r S_1 S_2}$$

doing Block algebra, moving $$S_2$$ before $$d$$ (which would make it now, $$S_2 d$$

Then going under the rule for Feedback, $$\frac{G_s}{G_s+1}$$

I would expect to get as a result:

$$y=\frac{ w G_rS_1 S_2 -d S_2}{1+S_1 S_2 G_r-d S_2}$$

However, it appears this is the wrong solution.

is there something I'm missing on my block algebra, or is this correct, except one assumes $$d S_2$$ in the denominator is always zero?

I think your math is correct, but it's a little easier to look at if you rearrange it as:

$$y = w\frac{S_1 S_2 G_r}{1 + S_1 S_2 G_r} - d\frac{ S_2}{1 + S_1 S_2 G_r}\\$$

The output is a combination of the closed-loop response and the disturbance input.

I think the problem with your block diagram work is that you're treating everything, including the disturbance input, as though it's a "plant," but it's not, because the input $$y$$ doesn't route through $$d$$.

This is a superposition (summing) problem; I think the "easy" way to solve this problem with block diagram work is to look at each input as though the other input doesn't exist.

Consider: This is easy; this is the method you were going for and reduces to:

$$y = w\frac{S_1 S_2 G_r}{1 + S_1 S_2 G_r} \\$$

Then, consider the disturbance input: This is a little harder to look at, so consider instead: You can combine the terms on the feedback branch: And then reduce the loop (Line 4 on that page) and get: It's important (as always) to keep up with the negative signs. Here they cancel in the denominator and you're left with:

$$y = - d\frac{ S_2}{1 + S_1 S_2 G_r}\\$$

The complete solution is the summation (superposition) of the response from the input $$w$$ and the disturbance $$d$$:

$$y = w\frac{S_1 S_2 G_r}{1 + S_1 S_2 G_r} - d\frac{ S_2}{1 + S_1 S_2 G_r}\\$$

Because of the Superposition principle, you can write $$y$$ as:

$$y = H_1 w + H_2 d,$$

where $$H_1$$ is the system transfer function when $$d=0$$, whereas $$H_2$$ is the corresponding transfer function for $$w=0$$.

It turns that

$$H_1 = \frac{G_rS_1S_2}{1+G_rS_1S_2},$$

while

$$H_2 = \frac{-S_2}{1+G_rS_1S_2}.$$

$$H_2$$ can be readily obtained using block simplification by observing that it holds: 