Page MenuHomec4science

2_intro.tex
No OneTemporary

File Metadata

Created
Thu, Mar 13, 08:53

2_intro.tex

\documentclass[aspectratio=169]{beamer}
\usepackage{../styles/com303}
%\setbeameroption{show only notes}\def\logoEPFL{}
\setbeameroption{show notes}
\begin{document}
\begin{frame} \frametitle{What is a ``signal''?}
\begin{center}
a description of the evolution of a physical phenomenon
\end{center}
\begin{itemize}
\item temperature (weather)
\item pressure (sound)
\item magnetic deviation (recorded sound)
\item gray level on paper (photograph)
\item ...
\end{itemize}
\end{frame}
\begin{frame} \frametitle{Signal Processing}
\begin{center}
\textbf{Analysis}: \textit{understanding} the information carried by the signal
\vspace{2em}
\textbf{Synthesis}: \textit{creating} a signal to contain the given information
\end{center}
\end{frame}
\begin{frame} \frametitle{Signal ``models''}
The continuous-time model: $x : \mathbb{R} \rightarrow \mathbb{R}$
\vspace{1em}
\begin{itemize}
\item functions of a real-valued variable (time)
\item classic model in physics, electronics, control theory
\item useful for far-reaching theoretical results
\end{itemize}
\end{frame}
\begin{frame} \frametitle{Signal ``models''}
The discrete-time model: $x : \mathbb{N} \rightarrow \mathbb{R}$
\vspace{1em}
\begin{itemize}
\item sequences of sampled values
\item ubiquitous model in microprocessor-based signal processing, data science, economics
\item useful for practical applications
\end{itemize}
\end{frame}
\intertitle{Continuous-time signals}
\begin{frame} \frametitle{Simple examples from physics}
\begin{itemize}
\item position of point traveling at constant speed: $x(t) = vt$
\item for a time-varying speed $v(t)$:
\[
x(t) = \int_0^t v(\tau)d\tau
\]
\item oscillatory motion at frequency $f$ Hz: $x(t) = \cos(2\pi f t)$
\end{itemize}
\vspace{1em}
\centering
\psset{xunit=0.8cm,yunit=0.8cm}
\begin{tabular}{ccc}
\begin{pspicture}(-.5,-.5)(5.5,3.5)
\psline{->}(0,-.2)(0,3)
\psline{->}(-.2,0)(3.4,0)
\psplot[linecolor=blue,plotpoints=50]{0}{3}{x 0.4 mul}
\rput[r](0,2.5){$x~$}
\rput[t](2.5,-0.2){$t$}
\end{pspicture}
&
\begin{pspicture}(-.5,-.5)(5.5,3.5)
\psline{->}(0,-.2)(0,3)
\psline{->}(-.2,0)(3.4,0)
\psplot[linecolor=blue,plotpoints=50]{0}{3}{x 0.4 mul dup mul}
\rput[r](0,2.5){$x~$}
\rput[t](2.5,-0.2){$t$}
\end{pspicture}
&
\begin{pspicture}(-.5,-.5)(5.5,3.5)
\psline{->}(0,-.2)(0,3)
\psline{->}(-.2,0)(3.4,0)
\psplot[linecolor=blue,plotpoints=50]{0}{3}{x 200 mul cos 1.2 add}
\rput[r](0,2.5){$x~$}
\rput[t](2.5,-0.2){$t$}
\end{pspicture}
\end{tabular}
\end{frame}
\begin{frame} \frametitle{Modeling physical phenomena}
\begin{center}
\begin{figure}
\center
\includegraphics[width=100mm]{coffee.eps}
\end{figure}
\end{center}
\end{frame}
\begin{frame} \frametitle{How fast does your coffee get cold?}
\centering
Newton's law of cooling:
\[
\frac{dT}{dt} = -c(T - T_{\mbox{env}})
\]
\vspace{1em}
\[
T(t) = T_{\mbox{env}} + (T_0-T_{\mbox{env}})e^{-ct}
\]
\vspace{1em}
\psset{xunit=2cm,yunit=0.8cm}
\begin{pspicture}(-.5,-.5)(3.5,3.5)
\psline{->}(0,-.2)(0,3)
\psline{->}(-.2,0)(3.4,0)
\psplot[linecolor=blue,plotpoints=50]{0}{3}{2.7 x -2 mul exp 2 mul 0.3 add}
\rput[r](0,2.3){$T_0~$}
\rput[r](0,0.3){$T_{\mbox{env}}~$}
\rput[t](2.5,-0.2){$t$}
\end{pspicture}
\end{frame}
\begin{frame} \frametitle{The way a capacitor discharges}
\begin{center}
\includegraphics[height=4cm]{rc2.eps}
\vspace{1em}
$v(t) = V_0\,e^{-\frac{t}{RC}}$
\end{center}
\end{frame}
\intertitle{Discrete-time signals}
%% Temperature chart %%
\def\tempFun{x 31 div 180 mul dup 1.1 mul cos 1 add 2 div exch 4 mul sin 0.1 mul add 10 mul x 4 div add}
\begin{frame}\frametitle{Charting the daily temperature}
\centering
\begin{dspPlot}[yticks=5,xticks=none,sidegap=1,width=10cm,xlabel={days},ylabel={$ ^{\circ}$C}]{1,31}{0,16}
\moocStyle
\psclip{\psframe[linewidth=0](0,0)(32,16)}
\psgrid[gridlabels=0,xunit=5,yunit=5](0,0)(0,0)(32, 16)
\psplot[showpoints=true, dotstyle=triangle*,plotstyle=dots, dotsize=\dspDotSize,%
plotpoints=31]{1}{31}{\tempFun}
\endpsclip
\end{dspPlot}
\end{frame}
\begin{frame} \frametitle{The Dow-Jones industrial average}
\begin{center}
\begin{dspPlot}[xticks=25,yticks=custom,xlabel={year}]{1897,2012}{0,140}
\moocStyle
% Dow Jones values are scaled by 100
\dspFuncData{1897 0.494100 1898 0.605200 1899 0.657300 1900 0.707100 1901 0.645600 1902 0.642900 1903 0.491100 1904 0.700500 1905 0.965600 1906 0.943500 1907 0.587500 1908 0.861500 1909 0.990500 1910 0.814100 1911 0.815800 1912 0.878700 1913 0.787800 1914 0.545800 1915 0.991500 1916 0.950000 1917 0.743800 1918 0.822000 1919 1.072300 1920 0.719500 1921 0.808000 1922 0.981700 1923 0.955200 1924 1.205100 1925 1.566600 1926 1.572000 1927 2.007000 1928 3.000000 1929 2.484800 1930 1.645800 1931 0.779000 1932 0.602600 1933 0.986700 1934 1.040400 1935 1.441300 1936 1.799000 1937 1.208500 1938 1.543600 1939 1.499900 1940 1.311300 1941 1.109600 1942 1.194000 1943 1.358900 1944 1.519300 1945 1.929100 1946 1.772000 1947 1.811600 1948 1.773000 1949 2.005200 1950 2.354200 1951 2.692300 1952 2.919000 1953 2.809000 1954 4.043900 1955 4.884000 1956 4.994700 1957 4.356900 1958 5.836500 1959 6.793600 1960 6.158900 1961 7.311400 1962 6.521000 1963 7.629500 1964 8.741300 1965 9.692600 1966 7.856900 1967 9.051100 1968 9.437500 1969 8.003600 1970 8.389200 1971 8.902000 1972 10.200200 1973 8.508600 1974 6.162400 1975 8.524100 1976 10.046500 1977 8.311700 1978 8.050100 1979 8.387400 1980 9.639900 1981 8.750000 1982 10.465400 1983 12.586400 1984 12.115700 1985 15.466700 1986 18.959500 1987 19.388300 1988 21.685700 1989 27.532000 1990 26.336600 1991 31.688300 1992 33.011100 1993 37.540900 1994 38.344400 1995 51.171200 1996 64.482600 1997 79.082400 1998 91.814300 1999 114.971200 2000 107.868500 2001 100.215000 2002 83.416300 2003 104.539200 2004 107.830100 2005 107.175000 2006 124.631500 2007 132.64 2008 87.76 2009 104.28 2010 115.77 2011 122.17 2012 125.54}
\dspCustomTicks[axis=y]{0 0 50 5000 100 10000}
\end{dspPlot}
\end{center}
\end{frame}
\begin{frame} \frametitle{Modeling discrete-time processes}
\begin{center}
\begin{figure}
\center
\includegraphics[width=100mm]{coffee.eps}
\end{figure}
\end{center}
\end{frame}
\begin{frame} \frametitle{How does interest accrue?}
\centering
Annual percentage rate (APR)
\begin{align*}
x[0] &= C \\
x[n] &= (1 + \alpha)x[n-1]
\end{align*}
\vspace{1em}
\[
x[n] = (1+\alpha)^n\,C \qquad n \ge 0
\]
\vspace{1em}
\psset{xunit=2cm,yunit=0.8cm}
\begin{pspicture}(-.5,-.5)(3.5,3.5)
\psline{->}(0,-.2)(0,3)
\psline{->}(-.2,0)(3.4,0)
\psplot[linecolor=blue,plotstyle=dots,plotpoints=20]{0}{3}{1.1 x 5 mul exp 0.5 mul}
\rput[r](0,2.3){\$~}
\rput[t](2.5,-0.2){year}
\end{pspicture}
\end{frame}
\intertitle{From Discrete to Continuous, and Vice-Versa}
\begin{frame}
\frametitle{Scientific method: from experiment to idealized abstraction}
E.g.: Galileo's work on projectile motion
\begin{center}
\vspace{3em}
\psset{xunit=1.5cm,yunit=0.8cm}
\begin{pspicture}(-.5,-.5)(4.5,3.5)
\psline{->}(0,-.1)(0,3.4)
\psline{->}(-.1,0)(4.4,0)
\psplot[linecolor=blue,plotstyle=dots,plotpoints=10]{0}{4}{x 2 sub dup mul -1 mul 4 add 0.7 mul}
\only<2>{\psplot[linecolor=blue,plotpoints=50]{0}{4}{x 2 sub dup mul -1 mul 4 add 0.7 mul}}
\end{pspicture}
\vspace{0.5cm}
\uncover<2->{
$\vec{x}(t) = \vec{v}_0 t + (1/2)\vec{g}\,t^2$\\
}
\end{center}
\end{frame}
\begin{frame} \frametitle{Can we skip the ``idealization'' step?}
\begin{center}
\includegraphics[width=8.4cm,height=2.8cm]{bbc.eps}
\vspace{2em}
\[
x(t) = ?
\]
\end{center}
\end{frame}
\begin{frame} \frametitle{Can we skip the ``idealization'' step?}
\begin{center}
\includegraphics[width=8.4cm,height=2.8cm]{bbc.eps}
\vspace{2em}
\begin{minipage}{0.6\textwidth}
$x[n] = $ \ttfamily 74 31 -66 9 -123 33 159 -26
102 148 86 -136 -179 70 72 -84 -113
-42 -88 88 8 -180 -7 -133 8 164
-4 108 35 -82 74 -49 52 32 -31 ...
\end{minipage}
\end{center}
\end{frame}
\begin{frame} \frametitle{Sampling}
\begin{center}
\begin{dspBlocks}{2}{0.4}
$x(t)$~ & \BDsamplerFramed & ~$x[n]$ \\
& $T_s$
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,2}
\ncline{->}{1,2}{1,3}
\end{dspBlocks}
\end{center}
\end{frame}
\def\smooth{ 10 div 360 mul dup sin exch dup 2 mul sin exch dup mul 360 div sin add add }
\begin{frame} \frametitle{Can we ``idealize'' arbitrary experimental data?}
\begin{center}
\begin{minipage}{0.6\textwidth}
$x[n] = $ \ttfamily
74 31 -66 9 -123 33 159 -26
102 148 86 -136 -179 70 72 -84 -113
-42 -88 88 8 -180 -7 -133 8 164
-4 108 35 -82 74 -49 52 32 -31 ...
\end{minipage}
\vspace{3em}
\begin{dspPlot}[yticks=none,xticks=none,sidegap=0,height=3cm,ylabel={$x(t)$}]{0,10}{-3,3}
\moocStyle
\dspFunc[linecolor=blue!50]{x \smooth}
\end{dspPlot}
\end{center}
\end{frame}
\begin{frame} \frametitle{Interpolation}
\begin{center}
\begin{dspBlocks}{2}{0.4}
$x(t)$~ &
\BDsinc
& $x[n]$ \\
& $T_s$
\psset{linewidth=1.5pt}
\ncline{->}{1,1}{1,2}
\ncline{->}{1,2}{1,3}
\end{dspBlocks}
\end{center}
\end{frame}
\begin{frame} \frametitle{Translating between models: the founding fathers}
\begin{center}
\includegraphics[height=0.6\paperheight]{nyquistshannon.eps}
\end{center}
\end{frame}
\begin{frame} \frametitle{The Sampling Theorem (1920)}
\centering
For sufficiently ``slown'' functions $x(t)$:
\[
x(t) = \sum_{n = -\infty}^{\infty} x[n] \sinc\left(\frac{t - nT_s}{T_s}\right)
\]
\end{frame}
\begin{frame} \frametitle{The sinc function}
\begin{center}
\begin{figure}
\begin{dspPlot}[yticks=none,xticks=none,sidegap=0]{0,10}{-3,3}
\moocStyle
\dspFunc[linecolor=darkgreen!60]{x \dspSinc{5}{1} 2 mul }
\end{dspPlot}
\end{figure}
\end{center}
\end{frame}
\def\smooth{ 10 div 360 mul dup sin exch dup 2 mul sin exch dup mul 360 div sin add add }
\def\interpolant#1{ \dspSinc{#1}{1} #1 \smooth mul }
\begin{frame} \frametitle{From continuous to discrete time and back}
\begin{center}
\begin{figure}
\begin{dspPlot}[yticks=none,xticks=none,sidegap=0]{0,10}{-3,3}
\moocStyle
\only<1-2>{\dspFunc[linecolor=blue!50]{x \smooth}}
\only<2->{\dspSignal{x \smooth}}
\only<4->{\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{2} }}
\only<5->{\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{3} }}
\only<6->{\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{4} }}
\only<7->{\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{5} }}
\only<8->{
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{0} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{1} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{6} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{7} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{8} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{9} }
\dspFunc[linecolor=darkgreen!60,linewidth=0.3pt]{x \interpolant{10} }}
\only<9->{\dspFunc[linecolor=blue!50]{x \smooth}}
\end{dspPlot}
\end{figure}
\only<1>{$x(t)$}
\only<3>{$x[n]$}
\vphantom{$x[n]x(t)$}
\end{center}
\end{frame}
\begin{frame} \frametitle{What does ``slow'' mean?}
\begin{center}
if the sampling period is $T_s$ seconds, the function should not ``move'' faster than $1/(2T_s)$
\end{center}
\vspace{2em}
\begin{itemize}
\item physical dimension of $1/(2T_s)$ is Hertz
\item signal should not contain frequencies above $F_s/2$, with $F_s = 1/T_s$
\item what does that mean?
\end{frame}
\begin{frame} \frametitle{Fourier Analysis}
\begin{center}
\includegraphics[height=0.6\paperheight]{fourier.eps}
\end{center}
\end{frame}
\end{document}

Event Timeline