/
0A-03-ACA-Fundamentals-Correlation.tex
178 lines (161 loc) · 7.76 KB
/
0A-03-ACA-Fundamentals-Correlation.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
% move all configuration stuff into includes file so we can focus on the content
\input{include}
\subtitle{module A.3: fundamentals~---~correlation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
% generate title page
\input{include/titlepage}
\section[overview]{lecture overview}
\begin{frame}{introduction}{overview}
\begin{block}{corresponding textbook section}
%\href{http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=6331119&}{Chapter 2~---~Fundamentals}: pp.~24--28
appendix~A.3
\end{block}
\begin{itemize}
\item \textbf{lecture content}
\begin{itemize}
\item cross correlation function (CCF)
\item auto-correlation function (ACF)
\end{itemize}
\bigskip
\item<2-> \textbf{learning objectives}
\begin{itemize}
\item describe use cases of correlation
\item implement cross- and auto-correlation
\end{itemize}
\end{itemize}
\inserticon{directions}
\end{frame}
\section[CCF]{cross correlation function}
\begin{frame}{correlation function}{definition}
\textbf{correlation function}: compute similarity between two \textit{stationary} signals $x$,$y$
\begin{equation*}
r_\mathrm{xy}(\tau)=\mathcal{E}\lbrace x(t)y(t+\tau)\rbrace
\end{equation*}
\begin{itemize}
\item \textbf{continuous}:
\begin{equation*}
r_\mathrm{xy}(\tau) = \int\limits_{-\infty}^{\infty}{x(t)\cdot y(t+\tau)dt}
\end{equation*}
\item \textbf{discrete}:
\begin{equation*}
r_\mathrm{xy}(\eta) = \sum\limits_{i=-\infty}^{\infty}{x(i)\cdot y(i+\eta)}
\end{equation*}
\end{itemize}
\end{frame}
\begin{frame}{correlation function}{animation}
\vspace{-5mm}
\begin{footnotesize}
\begin{equation*}
%r_\mathrm{xy}(\tau) &=& \int\limits_{-\infty}^{\infty}{x(t)\cdot y(t+\tau)dt}\\
r_\mathrm{xy}(\eta) = \sum\limits_{i=-\infty}^{\infty}{x(i)\cdot y(i+\eta)}
\end{equation*}
\end{footnotesize}
\includeanimation
{Correlation}
{000}
{250}
{10}
%\begin{center}
%\animategraphics[loop]{10}{animateCorrelation/Correlation-}{000}{250}
%\end{center}
%\addreference{matlab source: \href{https://github.com/alexanderlerch/ACA-Slides/blob/master/matlab/animateCorrelation.m}{matlab/animateCorrelation.m}}
\inserticon{video}
\end{frame}
\section[blocked correlation]{blocked cross correlation function}
\begin{frame}{correlation function}{examples}
\begin{itemize}
\item rectangular window vs.
\item sine vs.
\item noise
\end{itemize}
\vspace{-5mm}
\figwithmatlab{Correlation}
\end{frame}
\begin{frame}{correlation function}{blocked correlation: animation}
\includeanimation
{BlockedCorrelation}
{001}
{1023}
{24}
%\begin{center}
%\animategraphics[loop]{24}{animateBlockedCorrelation/BlockedCorrelation-}{001}{1023}
%\end{center}
%\addreference{matlab source: \href{https://github.com/alexanderlerch/ACA-Slides/blob/master/matlab/animateBlockedCorrelation.m}{matlab/animateBlockedCorrelation.m}}
\inserticon{video}
\end{frame}
\section[normalization]{normalization of blocked correlation}
\begin{frame}{correlation function}{normalization}
\vspace{-3mm}
\begin{equation*}\label{eq:corrnorm}
\lambda_c = \frac{1}{\sqrt{\left(\sum\limits_{i=i_{\mathrm{s}}(n)}^{i_{\mathrm{e}}(n)}{x^2(i)}\right)\cdot \left(\sum\limits_{i=i_{\mathrm{s}}(n)}^{i_{\mathrm{e}}(n)}{y^2(i)}\right)}}
\end{equation*}
\bigskip
methods of dealing with the triangular weighting/shape for blocked correlation:
\begin{enumerate}
\item<2-> different block lengths ($\mathcal{K},3\mathcal{K})$
\item<2-> circular application
\item<2-> modified normalization
\begin{equation*}
\lambda_c(\eta) = \frac{\mathcal{K}}{(\mathcal{K}-|\eta|)\cdot\sqrt{\left(\sum\limits_{i=i_{\mathrm{s}}(n)}^{i_{\mathrm{e}}(n)}{x^2(i)}\right)\cdot \left(\sum\limits_{i=i_{\mathrm{s}}(n)}^{i_{\mathrm{e}}(n)}{y^2(i)}\right)}} .
\end{equation*}
\end{enumerate}
\end{frame}
\section[ACF]{autocorrelation function}
\begin{frame}{autocorrelation function}{definition \& properties}
\toremember{}
\begin{block}{autocorrelation function properties}
\begin{itemize}
\item ACF is correlation function with the signal itself $r_{xx}(\eta)$
\item {ACF} at lag $0$:\\
$r_{xx}(0,n) = 1$ if normalized, energy otherwise
\item maximum:\\
$|r_{xx}(\eta,n)| \leq r_{xx}(0,n)$
\item symmetry:\\
$r_{xx}(\eta,n) = r_{xx}(-\eta,n)$
\item periodicity:\\
The {ACF} of a periodic signal is periodic (period length of input signal)
\end{itemize}
\end{block}
\end{frame}
\section[apps]{applications}
\begin{frame}{(auto-)correlation function}{applications and use cases}
\question{what are the use cases of correlation}
\begin{itemize}
\item \textit{cross-correlation}:
\begin{itemize}
\item compute similarity between different signals (correlation meter)
\item detect shift between two similar but shifted signals (radar)
\end{itemize}
\bigskip
\item \textit{autocorrelation}:
\begin{itemize}
\item detect self-similarity of (shifted) signal (lpc coefficients, noisiness)
\item detect periodicity of signal
\end{itemize}
\end{itemize}
\end{frame}
\section{summary}
\begin{frame}{summary}{lecture content}
\begin{itemize}
\item \textbf{correlation function}
\begin{itemize}
\item measure of similarity between two signals
\item use case example: find time lag between signals
\end{itemize}
\bigskip
\item \textbf{normalized correlation}
\begin{itemize}
\item results in value between $-1\ldots 1$
\item correlation coefficient: normalized correlation at lag $\eta=0$
\end{itemize}
\bigskip
\item \textbf{autocorrelation}
\begin{itemize}
\item measure of self-similarity
\item use case example: find periodicity
\end{itemize}
\end{itemize}
\inserticon{summary}
\end{frame}
\end{document}