# Is there a specific preferred order of operation on signals?

Basic Signal Operations Performed on dependent variables-- The periodicity of the signal is varied by modifying the horizontal axis values, while the amplitude or the strength remains constant. These are:-

Time scaling of signals

Reflection of signals

Time-shifting of signals.

Is there a specific preferred order in which we should operate?And for which type of signals a preferred order there?

• You asked the same exact thing a while ago on electronics.SE: electronics.stackexchange.com/questions/373482/… and got answers and comments there! – Marcus Müller Aug 7 '18 at 14:12
• And the answer still is "what order you do things depends on what you want to achieve": I think this is quite fundamental to engineering, in general. The things we do we do for a reason. – Marcus Müller Aug 7 '18 at 14:13
• @MarcusMüller i did but the answer was not clear – Paran Bharali Aug 7 '18 at 14:13
• Yeah well. I don't think "There is no preferred order of operations in signal analysis." can be put any clearer. So if that isn't clear to you, you won't ever get a clear answer. – Marcus Müller Aug 7 '18 at 14:14
• @MarcusMüller I believe he doesn't actually want to ask (despite his wordings!) whether there is a preferrred order or not, rather, as I guess, he wants to ask whether the order is important or not... Of course that's what I assumed as implied by his question... I hope ParanBharali will clarify which one he indeed wants to ask? – Fat32 Aug 7 '18 at 14:27

## 2 Answers

If you consider LTI filtering as the operations, then the order does not matter. The delay is an LTI filtering, as well as magnitude scaling, so their orders do not matter.

On the other hand, operations like time scaling or time reversal are not LTI and therefore their orders do matter.

For example, reversing a signal $$x(t)$$ and then shifting it by $$5$$ units to the right will result in a different signal than first shifting it by $$5$$ units to the right and then reversing that later, as the following shows:

$$y_1(t) = x(-t) ~~~,~~~y_2(t) = y_1(t-5) \implies y_2(t) = x(-t + 5)$$, but $$z_1(t) = x(t-5) ~~~,~~~z_2(t) = z_1(-t) \implies z_2(t) = x(-t - 5)$$, hence $$z_2(t) \neq y_2(t)$$

Time scaling, reflection, and time-shifting can each be expressed as a mapping of time $t,$ here unitless: $$t \mapsto f(t)$$

Time scaling by factor $c$ can be defined by:

$$f_\text{scale}(t;c) = ct,\quad c\in\mathbb{R}^+$$

Reflection can be defined by:

$$f_\text{reflect}(t) = -t$$

For reduced redundancy, the above two operations map $t=0$ to $t=0$ instead of time scaling or reflecting about a given time point. Time shifting by amount $s$ can be defined by:

$$f_\text{shift}(t;s) = t + s,\quad s\in\mathbb{R}$$

We can list and compare the results of doing the three operations in the six possible orders, first shift→reflect→scale followed by the other orders:

$$\begin{array}{rclcl} f_\text{scale}\Big(f_\text{reflect}\big(f_\text{shift}(t;s)\big);c\Big) &=& c\big(-(t+s)\big) &=& -ct-cs\\ f_\text{reflect}\Big(f_\text{scale}\big(f_\text{shift}(t;s);c\big)\Big) &=& -c(t + s) &=& -ct - cs\\ f_\text{shift}\Big(f_\text{scale}\big(f_\text{reflect}(t);c\big);s\Big) &=& c(-t) + s &=& -ct + s\\ f_\text{scale}\Big(f_\text{shift}\big(f_\text{reflect}(t);s\big);c\Big) &=& c(-t + s)&=& -ct+cs\\ f_\text{reflect}\Big(f_\text{shift}\big(f_\text{scale}(t;c);s\big)\Big) &=& -(ct + s) &=& -ct - s\\ f_\text{shift}\Big(f_\text{reflect}\big(f_\text{scale}(t;c)\big);s\Big) &=& -ct + s &=& -ct + s\\ \end{array}$$

Indeed, if the parameters of the operations stay the same, then the order matters as the end results (last columnn) may be different. Some of the end results are identical, and such pairs of operation chains only differ by having swapped successive scaling and reflection operations.

However, each end result can be transformed to any one of the others, for example to:

$$-ct + s,$$

by reparameterization of the shift, for example using the first order of operations from the earlier list:

$$f_\text{scale}\Big(f_\text{reflect}\big(f_\text{shift}(t;-s/c)\big);c\Big) = c\big(-(t-s/c)\big) = -ct+s$$

Summary: The order matters, but any order can be used to obtain a desired result.

Furthermore, any combination of any number of these operations can be chained, and the end result will be a polynomial of $t$ with a maximum degree of $1$, which means that an equivalent chain of at most three operations exists.