Sol

Transcription

Sol
EECS 16A
Spring 2015
Designing Information Devices and Systems I
Discussion 9F
1. Auto-Correlation
Auto-correlation is the cross-correlation of a signal with itself. Find the auto-correlation of the following
sequences:
(a) −1 1 1 −1 1
(b) 1 −1 −1 1 −1
(c) 0.2 0.5 0.6 0.4 −0.2
Solution:
Since the auto-correlation of a signal is the cross-correlation of the signal with itself, all we need to do is
use the cross-correlation strategy to solve these problems. Given two vectors, we keep one of them still, and
slide the smaller one over, taking the dot product of the two at each step. We set up the two vectors by lining
the last element of the sliding vector with the first element of the still vector. For example:
a b c d
e f g
At the first time step we get: (e ∗ 0) + ( f ∗ 0) + (a ∗ g) = ag
Overall: ag ...
We repeat this process until the first element of the sliding vector is matched up with the last element of
the still vector.
a
b
c
d
e f g
Overall: ag (a f + bg) ...
a b c d
e f g
Overall: ag (a f + bg) (ae + b f + cg) ...
a b c d e f g
Overall: ag (a f + bg) (ae + b f + cg) (be + c f + dg)...
EECS 16A, Spring 2015, Discussion 9F
1
a b c d e f g
Overall: ag (a f + bg) (ae + b f + cg) (be + c f + dg) (ce + d f ) ...
a b c d
e f
g
Final answer: ag (a f + bg) (ae + b f + cg) (be + c f + dg) (ce + d f ) de
In order to solve the below sequences, we just cross-correlate each vector with itself. We do the exact same
process as the general example above, except we use numbers from the vectors instead of variables. By
doing so, we get:
(a) −1 2 −1 −2 5 −2 −1 2 −1
(b) −1 2 −1 −2 5 −2 −1 2 −1
(c) −0.04 −0.02 0.2 0.56 0.85 0.56 0.2 −0.02 −0.04
2. Cross-Correlation
The cross-correlation of two signals x[n] and y[n] is given by the signal c[n] = ∑∞
i=−∞ x[i]y[i + n]
(Demo with Python Script)
The following
images show the
first three steps
of the sliding window technique to find the cross correlation
between 1 0 1 1 0 1 and 1 1 0
Figure 1: Sliding Window Cross Correlation
Find the cross-correlation between the following signals. When a shorter signal is correlated with a longer
signal, the values at each time point are determined by sliding the shorter signal along the longer one.
(a) 1 1 0 1 and 0 1 0 0
(b) 1 0 1 1 0 1 1 1 0 and 1 0 1
(c) 0.5 0.3 2 0.5 and 0.8 0.1 5
EECS 16A, Spring 2015, Discussion 9F
2
Solution:
We can apply the same cross-correlation as described above. We get:
(a) 0 0 1 1 0 1 0
(b) 1 0 2 1 1 2 1 2 1 1 0
(c) 2.5 1.55 10.43 2.94 1.65 0.4
EECS 16A, Spring 2015, Discussion 9F
3

Similar documents