The concept of a time shift or
delay is crucial to DSP.
yn=xn-2
y
n
x
n
2
, which means "delay xx by 2
time units" (Figure 1).
There are now 2 issues:
- What to put in the first two positions in the graph of
yy
(Figure 1)?
- What to do with values that slide off the end of
yy
(Figure 1)?
A solution: stuff the values that slide off the
end into the
beginning
(
Figure 2).
This is equivalent to putting
xx on a
wheel/circle with N
N ticks and spinning it 2 ticks.
x=11110000T
x
1
1
1
1
0
0
0
0
(Figure 3).
To delay
xx by 2
units, spin the wheel 2 ticks counter-clockwise and read off
yy.
y=00111100T
y
0
0
1
1
1
1
0
0
(
Figure 4).
So, we call
yy a
circular shift of
xx.
This is also equivalent to viewing
xx as
one period of an infinite-length periodic
vector
xp
x
p
.
x=123
x
1
2
3
xp=…123123123123…
x
p
…
1
2
3
1
2
3
1
2
3
1
2
3
…
We can then shift
xp
x
p
2 units and read off y
y
…231231231231…
…
2
3
1
2
3
1
2
3
1
2
3
1
…
y=231
y
2
3
1
i.e.: we can view a
ℂN
N
signal as one period of a periodic signal.
Finally we can write
y
y in terms of x
x using modulo arithmetic.
yn=xn-2modN
y
n
x
n
2
N
(1)
for
0≤n≤N-1
0
n
N
1
.
rmodN=r+pN
r
N
r
p
N
where pp is an
integer chosen such that
0≤r+pN≤N-1
0
r
p
N
N
1
. e.g.:
10mod8=10+-1×8=2
10
8
10
-1
8
2
-15mod6=-15+3×6=3
-15
6
-15
3
6
3
yn=xn-mmodN
y
n
x
n
m
N
(2)
for
0≤n≤N-1
0
n
N
1
.
Shift x
x by -3 units, i.e.
m=-3
m
-3
(Figure 5).
y=
C
m
x
y
C
m
x
(3)
with
yn=xn-mmodN
y
n
x
n
m
N
for
0≤n≤N-1
0
n
N
1
.
m=2
m
2
.
y=
C
2
x
y
C
2
x
(4)
00111100=0…………0100…………00110………………010……………0010…………00010………000010……0000010011110000
0
0
1
1
1
1
0
0
0
…
…
…
…
0
1
0
0
…
…
…
…
0
0
1
1
0
…
…
…
…
…
…
0
1
0
…
…
…
…
…
0
0
1
0
…
…
…
…
0
0
0
1
0
…
…
…
0
0
0
0
1
0
…
…
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
-
C
m
C
m
is a "permutation" matrix.
- Columns of
C
m
C
m
are shifted
δ
δ basis.
Indeed...
C
m
=δ
[
m
]
mod
N
δ
[
m
+
1
]
mod
N
…δ
[
m
+
N
-
1
]
mod
N
C
m
δ
[
m
]
mod
N
δ
[
m
+
1
]
mod
N
…
δ
[
m
+
N
-
1
]
mod
N
(5)
C
3
C
3
for
N=5
N
5
. Apply to
x=12345T
x
1
2
3
4
5
(Figure 6).
C
m
x
C
m
x
circularly shifts the column vector
xx down
mm units.
C
1
123=001100010123=312
C
1
1
2
3
0
0
1
1
0
0
0
1
0
1
2
3
3
1
2
(6)
xT
C
m
T
x
C
m
circularly shifts the row vector
xT
x
right
mm units.
123
C
1
T=123010001100=312
1
2
3
C
1
1
2
3
0
1
0
0
0
1
1
0
0
3
1
2
(7)