# Why does reversing the order of these two transfer functions give me different outputs?

Consider these two systems: \begin{align} &u\ {\longrightarrow}\boxed{s}{\longrightarrow}{\boxed{\frac 1s}}{\longrightarrow}\ y\\ &u\ {\longrightarrow}\boxed{\frac 1s}{\longrightarrow}{\boxed{s}}{\longrightarrow}\ y \end{align}

If I input a step ($u=1/s$), I get an output of $y=0$ from the first system, but $y=1$ from the second. (You can see this from considering the signal in between the two blocks - it's zero in the first case and a ramp in the second case).

Why does reversing the order of the blocks change the output?

• Do you consider a step as an input (starting at $t=t_0$), or really a constant for $-\infty<t<\infty$? – Matt L. Mar 27 '17 at 12:36
• Sorry, I just mean for $t>0$, so $u(s)=1/s$. I'll update the question. – Max Mar 27 '17 at 12:57

If the input is a unit step, then the output of the first block in system 1 is not zero, but it is a Dirac delta impulse $\delta(t)$. Intuitively, the derivative is infinite at $t=0$ because of the step going from zero to one. Integrating the Dirac delta impulse will give you a step at the output of the first system.

The output of the first block in system 2 is a ramp, which will be transformed into a step by the differentiator. So both systems have the same output.

Note that in general you can only interchange the order of LTI systems without changing the output if all systems are stable. For unstable systems, as in your example, the order can make a difference, because the corresponding integrals might not converge, and consequently you can't change the order of integration.

• Why does stability matter? Multiplication is commutative. Who cares if the output of the first block blows up? The 2nd block may differentiate it. In terms of physical implementation, this would be a disaster, of course, but mathematically, what is the problem? – Rodrigo de Azevedo Mar 28 '17 at 12:47
• @RodrigodeAzevedo: Stability matters because it allows us to use Fubini's theorem and interchange the order of integration to show the validity of the convolution theorem. The very fact that you can multiply the Laplace transforms depends on the same condition as changing the order of two or more LTI systems. Have a look at this. – Matt L. Mar 28 '17 at 14:19
• Yes, but if we are working with causal signals and systems, then the inner integral in the convolution theorem is not over $\mathbb R$, but rather over $[0,z]$. Why not just compute the Laplace transform of each LTI system's impulse response and then intersect the regions of convergence? – Rodrigo de Azevedo Mar 28 '17 at 15:53
• @RodrigodeAzevedo: Yes, if we assume causality of all systems and signals, then we don't need to worry about changing the order of the systems. For general signals and systems, the stability issue remains. – Matt L. Mar 28 '17 at 20:14

Assuming causality and zero initial condition, the output of the cascade of an integrator and a differentiator is the same regardless of order. If we have integrator first, differentiator second, then

$$y (t) = \frac{\mathrm d}{\mathrm d t} \int_0^t u (\tau) \, \mathrm d \tau = u (t)$$

If we have differentiator first, integrator second, then

$$y (t) = \int_{0^-}^t \dot u (\tau) \, \mathrm d \tau = u (t) - \underbrace{u (0^-)}_{= 0} = u (t)$$

where the Fundamental Theorem of Calculus was used in both cases. Note that the cascade of an integrator and a differentiator produces an identity system: the output of the cascade is equal to the input of the cascade, i.e., $y (t) = u (t)$. Thus, we say that the differentiator and the integrator are the inverse systems of each other.

Assuming causality and nonzero initial condition, then things are more interesting:

• If we have integrator first, differentiator second, then the initial condition of the integrator is annihilated by the differentiator and we have an identity system.

• If we have differentiator first, integrator second, then the initial condition of the integrator is not annihilated by the differentiator and the output of the cascade will be the input plus a constant.

The crux of the matter is that it is the output of the cascade that matters, not the output of the first block in the cascade.