# Time Scaling/Shifting of Signals - Order of Operations

Discussion in 'Physics' started by Chiver, Aug 31, 2012.

1. ### Chiver Thread Starter New Member

Mar 1, 2012
2
0
I am having troubles with time shifting and scaling of signals, concerning the order of operations.

In this example the scale is done first, then inversion and finally shifting. But I have seen it done differently.

For example if I had this:

and I wanted to do something like x(-2t+5)

What should I do first? or Could it be done different ways?

EDIT: This is what I did:

Last edited: Aug 31, 2012

Dec 28, 2014
1
0

3. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
In this case shankar123578's suggestion works, but it isn't a universal answer.

You need to do the manipulations in the reverse order as indicated by the expression.

The proof is in the pudding. Let's take an example x(t) and see what we get:

x(t) = 3t + 12

z(t) = x(-2t+5) = 3(-2t+5) + 12 = -6t + 27

That's our gold standard.

There are eight possible ways to order the three operations of scale (S), shift (s), and reversal (R). So let's try some of them out.

First, let's do what shankar123578 suggested, which is (sSR):

(s) - shift by +5: w(t) = x(t+5) = 3(t+5) + 12 = 3t + 27
(S) - scale by 2: y(t) = w(2t) = 3(2t) + 27 = 6t + 27
(R) - time reversal: z(t) = y(-t) = 6(-t) + 27 = -6t + 27

Which works. But is that the only way to do it? And, if so, why?

Let's try doing them in the order indicated, which is (SRs):

S - scale by 2: w(t) = x(2t) = 3(2t) + 12 = 6t + 12
R - time reversal: y(t) = w(-t) = 6(-t) + 12 = -6t + 12
s - shift by +5: z(t) = y(t+5) = -6(t+5) + 12 = -6t - 18

Well, that didn't work. But why not?

Let's look at our gold standard a bit more closely.

z(t) = x(-2t+5) = 3(-2t+5) + 12 = -6t + 27

Lets replace the minus sign with R (which is either +1 or -1), the 2 with S, and the 5 with s:

z(t) = x(RSt+s) = 3(RSt+s) + 12 = 3RSt + 3s + 12

What we see is that the shift is not scaled or reversed, indicating that it should be done first. So let's try doing them in the opposite order indicated, which is (sRS):

s - shift by +5: w(t) = x(t+5) = 3(t+5) + 12 = 3t + 27
R - time reversal: y(t) = w(-t) = 3(-t) + 27 = -3t + 27
S - scale by 2: z(t) = y(2t) = -3(2t) + 27 = -6t + 27

So that worked, too.

So can we always do either of the two that worked, namely always do (sSR) or do them in the opposite order indicated by the expression? Let's try an equivalent expression.

-2t+5 = -(2t-5) = -((2t)-5) Here the order is scaling, shifting, and then reversal, so the opposite order would be (RsS). Let's see what happens:

R - time reversal: y(t) = w(-t) = 3(-t) + 12 = -3t + 12
s - shift by -5: y(t) = w(t-5) = -3(t-5) + 12 = -3t + 27S - scale by 2: z(t) = y(2t) = -3(2t) + 27 = -6t + 27

So that worked. How about if we use the (sSR) order?

(s) - shift by -5: w(t) = x(t-5) = 3(t-5) + 12 = 3t - 3
(S) - scale by 2: y(t) = w(2t) = 3(2t) - 3 = 6t - 3
(R) - time reversal: z(t) = y(-t) = 6(-t) - 3 = -6t - 3

It didn't work here. So why did it work before?

Notice that in the expression we had before,

z(t) = x(RSt+s) = 3(RSt+s) + 12 = 3RSt + 3s + 12

that RS appear in one place multiplied together. So it doesn't matter what order they are done in.

But if we do the same with our reordered expression:

z(t) = x(-((2t)-5)) = x(R((St)+s)) where R=-1, S=2, and s=-5, we get:

z(t) = 3(R((St)+s)) + 12 = 3RSt + 3Rs + 12

And now the R appears someplace other than just multiplied by S. So order does matter. But do we do R or s first? Well, we know that (RsS) worked, but how about (sRS)? It seems like it should work. Let's find out:

(s) - shift by -5: w(t) = x(t-5) = 3(t-5) + 12 = 3t - 3
(R) - time reversal: z(t) = w(-t) = 3(-t) - 3 = -3t - 3
(S) - scale by 2: y(t) = w(2t) = -3(2t) - 3 = -6t - 3

Why not? If we think about it, the shift is affected by the scaling and/or the reversal only if they are done before the shifting. Hence we need to do the shifting after those operations that affect the shift and before the operations that don't. The key to why we do things in the opposite order is that later operations effect the result of earlier ones and do not affect the result of later ones.

So let's try one more and see if this still holds.

-2t+5 = 2((-t)+2.5) would be reversal then shifting then scaling, so the opposite order would be (SsR).

(S) - scale by 2: w(t) = x(2t) = 3(2t) + 12 = 6t + 12
(s) - shift by -5: y(t) = w(t+2.5) = 6(t+2.5) + 12 = 6t + 27
(R) - time reversal: z(t) = y(-t) = 6(-t) + 27 = -6t + 27

Yep, it worked.

So do the manipulations in the opposite order that the expression indicates.

BTW: The time reversal you did in Post #1 is wrong. The reversal mirrors about the y-axis. You mirrored about y=0.5.