Skip to content

Commit 3479c4b

Browse files
committed
Initial commit
1 parent 1a5fe77 commit 3479c4b

17 files changed

+340
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
\begin{tikzpicture}
2+
%draw matrix of nodes
3+
\matrix[row sep=5mm,column sep=10mm]{
4+
& & & \node (desired) {$d(n)$}; & & &\\
5+
\node (input) {$u(n)$}; & \node [dotnode] (dotin) {}; & \node [blocknode] (filter) {$w_m(n)$}; & \node [combnode] (sumyd) {$\Sigma$}; & \node [dotnode] (doterr) {}; & \node (error) {$e(n)$};\\
6+
& & \node [blocknode] (weight control) {Weight Control}; & & &\\
7+
};
8+
%draw arrows
9+
\begin{scope}[->,>=latex]
10+
%column 1
11+
\draw (desired) -- (sumyd);
12+
%column 2
13+
\draw (input) -- (filter);
14+
\draw (filter) -- node[above,midway]{$y(n)$} (sumyd);
15+
\path (sumyd) [late options={label=195:$-$}];
16+
\draw (sumyd) -- (error);
17+
%column 3
18+
\draw (dotin) |- (weight control);
19+
\draw (doterr) |- (weight control);
20+
\draw ([xshift=-5mm] weight control.north) -- ([shift={(-5mm,-2.5mm)}] filter.south) -- ([xshift=-3.75mm] filter.south) ([xshift=3.75mm] filter.north) -- ([shift={(5mm,2.5mm)}] filter.north);
21+
\end{scope}
22+
\end{tikzpicture}

lecture_notes/figures/const_opt.tikz

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
\begin{tikzpicture}
2+
%axes
3+
\begin{scope}[->,>=latex]
4+
\draw (-1,0) -- (6,0) node[below] {$x_1$};
5+
\draw (0,-0.5) -- (0,4) node[left] {$x_2$};
6+
\end{scope}
7+
\coordinate (xu) at (2.5,2); %unconstrained optimum
8+
\coordinate (xc) at (2.837,1.0427); %constrained optimum
9+
\coordinate (g) at (2.837+0.3527,1.0427-1);
10+
\begin{scope}[shift={(xu)},rotate=-45]
11+
%unconstrained optimum
12+
\filldraw (xu) circle (1pt) node[above] {$\vect{x}_u$};
13+
%constrained optimum
14+
\filldraw (xc) circle (1pt) node[above] {$\vect{x}_c$};
15+
%contours of the cost function
16+
\draw (0,0) circle (2) node[shift={(-1.75,1.75)}] {$f(\vect{x})$};
17+
\draw (0,0) circle (1.0148);
18+
\end{scope}
19+
%constraint
20+
\draw[domain=0.5:6,samples=100] plot (\x,{ln(\x)}) node[below] {$h(\vect{x})$};
21+
%gradients
22+
\begin{scope}[->,>=stealth,every node/.style={fill=white,inner sep=1pt}]
23+
\draw (xc) -- (g) node[below,yshift=-1mm] {$\vect{\nabla}f(\vect{x}_c)$};
24+
\draw (xc) -- ($(xc)+0.6*(g)-0.6*(xc)$) node[right,xshift=1mm] {$\vect{\nabla}h(\vect{x}_c)$};
25+
\end{scope}
26+
% filter values
27+
\end{tikzpicture}
28+
29+
%matlab
30+
%find yi so that f=0
31+
%y=linspace(1,5,10000);x1=2.5;x2=2;f=y.^2-x1*y-x2+log(y);plot(y,f)
32+
%then find the length from constraint to xo
33+
%norm([x1,x2]-[yi,log(yi)])
34+
%the end coordinate of the gradient is
35+
% xc + [1/yi,-1]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
\begin{tikzpicture}[y=2cm]
2+
%axes
3+
\draw[->,>=latex] (-0.5,0) -- (8,0) node [below] {$i$};
4+
\draw[->,>=latex] (0,-0.2) -- (0,1.2) node [left] {$\beta(n,i)$};
5+
\draw (1pt,1) -- (-1pt,1) node[left] {1};
6+
%window
7+
\draw plot[id=ew,domain=0:7,samples=100] function{0.70**(7-x)} node[above] {$\lambda^{n-i}$};
8+
\draw[dashed] (7,1) -- (7,0) node[below] {$n$};
9+
\draw[fill=white] (0,0.08235) circle (1pt);
10+
\end{tikzpicture}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
\begin{tikzpicture}[y=2cm]
2+
%axes
3+
\draw[->,>=latex] (-0.5,0) -- (8,0) node [below] {$i$};
4+
\draw[->,>=latex] (0,-0.2) -- (0,1.2) node [left] {$\beta(n,i)$};
5+
%window
6+
\draw (0,1) -- (7,1);
7+
\draw[fill=white] (0,1) circle (1pt) node [left] {1};
8+
\draw[dashed] (7,1) -- (7,0) node[below] {$n$};
9+
\end{tikzpicture}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
\begin{tikzpicture}
2+
%axes
3+
\begin{scope}[->,>=latex]
4+
\draw (-0.5,0) -- (6,0) node[below] {$n$};
5+
\draw (0,-0.2) -- (0,2.2) node[left] {$J_1(\vect{w}(n))$};
6+
\end{scope}
7+
%cost function
8+
\draw[dashed] (0,0.25) node[left] {$J_1(\vect{w}_o)$}-- (6,0.25);
9+
\draw plot[id=J,domain=0:6,samples=100] function{0.25+3*2**(-2*x-1)};
10+
\end{tikzpicture}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
\begin{tikzpicture}
2+
%axes
3+
\begin{scope}[->,>=latex]
4+
\draw (-0.5,0) -- (6,0) node[below] {$n$};
5+
\draw (0,-0.2) -- (0,3.2) node[left] {$J_1(\vect{w}(n))$};
6+
\end{scope}
7+
%cost function
8+
\draw[dashed] (0,0.2) node[left] {$J_\textup{min}$}-- (6,0.2);
9+
\draw[dashed] (0,0.5) node[left] {$J_\textup{min}+J_\textup{ex}$}-- (6,0.5);
10+
\draw plot[id=J,domain=0:6,samples=100] function{0.5+5*2**(-2*x-1)};
11+
\draw [<->,>=stealth] (0.5,0) -- (0.5,7/4) node[right] {MSE};
12+
\draw [<->,>=stealth] (6,0.2) -- node[midway,right] {EMSE} (6,0.5);
13+
\end{tikzpicture}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
\begin{tikzpicture}
2+
\matrix (phi) [
3+
matrix of nodes,
4+
left delimiter=\lbrack,
5+
right delimiter=\rbrack,
6+
column sep=5mm,
7+
row sep=5mm
8+
]
9+
{ & [4cm] & 0\\
10+
0 & & \\
11+
};
12+
\node[left,xshift=-2mm] at (phi.west) {$\vect{A}^T = $};
13+
%create two coordinates
14+
\coordinate (phisw) at ([xshift=1cm]phi.south west);
15+
\coordinate (phise) at ([xshift=-1cm]phi.south east);
16+
%draw diamond
17+
\draw[fill=gray!20] (phi.north west) -- (phisw) -- (phi.south east) -- (phise |- phi.north west) -- cycle;
18+
\draw[dashed] (phisw) -- (phisw |- phi.north west);
19+
\draw[dashed] (phise) -- (phise |- phi.north west);
20+
%braces
21+
\begin{scope}[decoration={brace,mirror}]
22+
\draw[decorate] ([yshift=-1mm]phisw) -- node[midway,below] {$\vect{A}_1^T$} ([yshift=-1mm]phise);
23+
\draw[decorate] ([yshift=-7mm]phi.south west) -- node[midway,below] {$\vect{A}_2^T$} ([yshift=-7mm]phi.south east);
24+
\draw[decorate] ([yshift=-13mm]phi.south west) -- node[midway,below] {$\vect{A}_3^T$} ([yshift=-13mm]phise);
25+
\draw[decorate] ([yshift=-19mm]phisw) -- node[midway,below] {$\vect{A}_4^T$} ([yshift=-19mm]phi.south east);
26+
\end{scope}
27+
\end{tikzpicture}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
\begin{tikzpicture}
2+
%draw matrix of nodes
3+
\matrix[row sep=5mm,column sep=10mm]{
4+
& & \node (desired) {$d(n)$}; & &\\
5+
\node (input) {$u(n)$}; & \node [blocknode] (filter) {$w_m(n)$}; & \node [combnode] (sumyd) {$\Sigma$}; & \node (error) {$e(n)$};\\
6+
};
7+
%draw arrows
8+
\begin{scope}[->,>=latex]
9+
%column 1
10+
\draw (desired) -- (sumyd);
11+
%column 2
12+
\draw (input) -- (filter);
13+
\draw (filter) -- node[above,midway]{$y(n)$} (sumyd);
14+
\path (sumyd) [late options={label=195:$-$}];
15+
\draw (sumyd) -- (error);
16+
\end{scope}
17+
\end{tikzpicture}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
\begin{tikzpicture}[y=2cm]
2+
%axes
3+
\draw[->,>=latex] (-0.5,0) -- (8,0) node [below] {$\mu$};
4+
\draw[->,>=latex] (0,-0.2) -- (0,1.2) node [left] {$|1-\mu\lambda_m|$};
5+
\draw (-2pt,1) node [left] {$1$} -- (2pt,1);
6+
%eigenvalues
7+
\coordinate (lam1) at (1,0);
8+
\coordinate (lam2) at (2.5,0);
9+
\coordinate (lam3) at (4,0);
10+
\coordinate (muo) at (1.6,0.6);
11+
%draw modes
12+
\draw (0,1) -- (lam1) -- ($2*(lam1)+(0,1)$);
13+
\draw (0,1) -- (lam2) -- ($2*(lam2)+(0,1)$);
14+
\draw (0,1) -- (lam3) -- ($2*(lam3)+(0,1)$);
15+
%write text
16+
\begin{scope}[below]
17+
\node at (lam1) {$\frac{1}{\lambda_\textup{max}}$};
18+
\node at (lam2) {$\frac{1}{\lambda_2}$};
19+
\node at (lam3) {$\frac{1}{\lambda_\textup{min}}$};
20+
\draw[dashed] (muo) -- (muo |- 0,0) node {$\mu_o$};
21+
\filldraw (muo) circle (1pt);
22+
\end{scope}
23+
\end{tikzpicture}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
\begin{tikzpicture}[->,>=latex]
2+
%axes
3+
\draw (-1,0) -- (7,0);
4+
\draw (0,-0.5) -- (0,3.5);
5+
%desired signal
6+
\draw[thick,>=stealth] (0,0) -- (1.5,3) node[near end,left,yshift=1mm] {$\vect{d}$};
7+
%column range of A
8+
\draw[>=] (-1,-1/3) -- (7,7/3) node[very near end,below,yshift=-2mm] {$\mathcal{R}(\vect{A})$};
9+
%optimal projector
10+
\draw[thick,>=stealth] (0,0) -- (9/4,3/4) node[below,yshift=-2.5mm] {$\vect{P}_u\vect{d}=\vect{A w}_o$};
11+
%error signal
12+
\draw[thick,>=stealth,dashed] (9/4,3/4) -- (1.5,3) node[midway,right,yshift=2mm] {$\vect{e}_o=\vect{P}_u^{\perp}\vect{d}$};
13+
%90 degree symbol
14+
\draw[shift={(9/4,3/4)},rotate=18.43] (0,0) rectangle +(-0.2,0.2);
15+
\end{tikzpicture}

lecture_notes/figures/overview.tikz

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
\begin{tikzpicture}
2+
%draw matrix of nodes
3+
\matrix[row sep=5mm,column sep={40mm,between origins},nodes=blocknode]{
4+
& \node[left,xshift=15mm,fill=white,minimum width=7cm,text width=6.5cm] (bd) {\includegraphics[width=7cm]{figures/wss_block_diagram}};\\
5+
\node (wh) {Wiener-Hopf Equations}; & \node (ls) {Normal Equations}; \\[5mm]
6+
\node (sd) {Steepest Descent}; & \node (lms) {LMS}; \\
7+
& \node (nlms) {NLMS}; \\
8+
& \node (apa) {Affine Projections}; \\
9+
& \node (rls) {Recursive Least-Squares}; \\
10+
};
11+
%draw grid
12+
\draw [dashed] (bd.south) -- (bd.south |- rls.south);
13+
\draw [dashed] ([yshift=-5mm] wh.south west) -- ([yshift=-5mm] ls.south east);
14+
%draw arrows between blocks
15+
\begin{scope}[->,>=latex]
16+
%column 1
17+
\draw (bd) -- (wh);
18+
\draw (bd) -- (ls);
19+
%column 2
20+
\draw (wh) -- (sd);
21+
\draw (ls) -- ([xshift=10mm] ls.east) |- (rls);
22+
%column 3
23+
\draw (sd) -- (lms);
24+
\draw (sd) |- (nlms);
25+
\draw (lms) -- (nlms);
26+
%column 5
27+
\draw (apa) -- (nlms);
28+
\end{scope}
29+
%text
30+
\node[yshift=2mm,above] at (wh.north |- bd.north) {Known Statistics};
31+
\node[yshift=2mm,above] at (ls.north |- bd.north) {Unknown Statistics};
32+
\node[shift={(-2mm,2mm)},above,rotate=90] at (wh.north west) {WSS Signals};
33+
\node[shift={(-2mm,2mm)},above,rotate=90] at (sd.west |- nlms.south) {Non-WSS Signals};
34+
\draw[decorate,decoration={brace}] ([xshift=1mm]lms.north east) -- node[midway,above,rotate=-90,yshift=1mm] {Stochastic Gradient Methods} ([xshift=1mm]apa.south east);
35+
\draw[->,>=stealth] ([xshift=15mm] lms.north -| rls.east) -- node[midway,above,rotate=-90,yshift=1mm,text width=6cm,text centered] {Increasing Computational Complexity and Performance} ([xshift=15mm] rls.south east);
36+
\end{tikzpicture}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\begin{tikzpicture}
2+
\draw (0,0) ellipse (4 and 1.5);
3+
\draw (-0.75,0) ellipse (2.25 and 1.3);
4+
\node[draw,circle,text width=1.5cm,text centered] at (-1.75,0) {stationary processes};
5+
\node[circle,text width=1.5cm,text centered] at (0.25,0) {WSS processes};
6+
\node[circle,text width=2cm,text centered] at (2.75,0) {all stochastic processes};
7+
\end{tikzpicture}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\begin{tikzpicture}[y=2cm]
2+
%axes
3+
\draw[->,>=latex] (-0.5,0) -- (8,0) node [below] {$i$};
4+
\draw[->,>=latex] (0,-0.2) -- (0,1.2) node [left] {$\beta(n,i)$};
5+
\draw (1pt,1) -- (-1pt,1) node[left] {1};
6+
%window
7+
\draw (3,1) -- (7,1);
8+
\draw[dashed] (3,1) -- (3,0) node[below] {$n-L$};
9+
\draw[dashed] (7,1) -- (7,0) node[below] {$n$};
10+
\draw[fill=white] (3,1) circle (1pt);
11+
\end{tikzpicture}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
\begin{tikzpicture}
2+
%axes
3+
\begin{scope}[->,>=latex]
4+
\draw (-1,0) -- (6,0) node[below] {$w$};
5+
\draw (0,-0.5) -- (0,3.5);
6+
\end{scope}
7+
%cost function
8+
\draw[domain=-1:6,samples=100] plot (\x,{0.2*\x^2-1*\x+2}) node[right] {$J_1(w)$};
9+
%optimal filter
10+
\draw[dashed] (2.5,0) node[below] {$w_o$} -- (2.5,0.75);
11+
\filldraw (2.5,0.75) circle (1pt);
12+
%gradients
13+
\begin{scope}[->,>=stealth]
14+
%w(0)
15+
\draw (-0.5,51/20) -- (-1.7,51/20) node[below] {$g(w(0))$};
16+
\draw (-0.5,51/20) -- (4,51/20) node[above] {$-\frac{\mu}{2}g(w(0))$};
17+
%w(1)
18+
\draw (4,1.2) -- (4.6,1.2) node[below] {$g(w(1))$};
19+
\draw (4,1.2) -- (1.75,1.2) node[above] {$-\frac{\mu}{2}g(w(1))$};
20+
\end{scope}
21+
% filter values
22+
%w(0)
23+
\draw[dashed] (-0.5,0) node[below] {$w(0)$} -- (-0.5,51/20);
24+
\filldraw (-0.5,51/20) circle (1pt);
25+
%w(1)
26+
\draw[dashed] (4,0) node[below] {$w(1)$} -- (4,51/20);
27+
\filldraw (4,1.2) circle (1pt);
28+
%w(2)
29+
\draw[dashed] (1.75,0) node[below] {$w(2)$} -- (1.75,1.2);
30+
\filldraw (1.75,0.8625) circle (1pt);
31+
\end{tikzpicture}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
\begin{tikzpicture}
2+
%axes
3+
\begin{scope}[->,>=latex]
4+
\draw (-1,0) -- (6,0) node[below] {$w_0$};
5+
\draw (0,-0.5) -- (0,4) node[left] {$w_1$};
6+
\end{scope}
7+
\coordinate (wo) at (2.3,1.5); %R = [5,3;3,5]/8; r = [2;1.8];
8+
\begin{scope}[shift={(wo)},rotate=-45]
9+
%optimal filter
10+
\filldraw (wo) ellipse (1pt and 0.5pt) node[left] {$\vect{w}_o$};
11+
%contours of the cost function
12+
\draw (0,0) ellipse (2.9967 and 1.4983);
13+
\draw (0,0) ellipse (1.7980 and 0.8990);
14+
\end{scope}
15+
%gradients
16+
\begin{scope}[->,>=stealth,every node/.style={fill=white,inner sep=1pt}]
17+
%w(0)
18+
\draw (4,1.8) -- (6.350,3.450) node[above left] {$\vect{g}(\vect{w}(0))$};
19+
\draw (4,1.8) -- (2.120,0.480) node[below right] {$-\frac{\mu}{2}\vect{g}(\vect{w}(0))$};
20+
%w(1)
21+
\draw (2.120,0.480) -- (1.13,-0.93) node[left] {$\vect{g}(\vect{w}(1))$};
22+
\draw (2.120,0.480) -- (2.912,1.608) node[above,yshift=2mm] {$-\frac{\mu}{2}\vect{g}(\vect{w}(1))$};
23+
\end{scope}
24+
% filter values
25+
%w(0)
26+
\filldraw (4,1.8) circle (1pt) node[right] {$\vect{w}(0)$};
27+
%w(1)
28+
\filldraw (2.120,0.480) circle (1pt) node[left] {$\vect{w}(1)$};
29+
\end{tikzpicture}
30+
31+
%matlab
32+
%w
33+
%R=A;r=[2;1.8];wo=R\r;[X,L,dum]=svd(R);w = [4;1.8]; sqrt([1,0.25]*(X'*(w-wo)).^2)*[2,1],g = 2*R*w-2*r;g+w,u=2/trace(L);w-u*g/2
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
\begin{tikzpicture}
2+
%draw matrix of nodes
3+
\matrix[row sep=5mm,column sep=10mm]{
4+
& & & \node (noise) {$v(n)$}; & &\\
5+
\node (input) {$u(n)$};& \node [dotnode] (dotinp) {}; & \node [blocknode] (system) {$w_{o,m}$}; & \node [combnode] (sumzv) {$\Sigma$}; & &\\
6+
& & \node [blocknode] (filter) {$w_m(n)$}; & \node [combnode] (sumyd) {$\Sigma$}; & \node (error) {$e(n)$};\\
7+
};
8+
%draw arrows
9+
\begin{scope}[->,>=latex]
10+
%column 1
11+
\draw (noise) -- (sumzv);
12+
%column 2
13+
\draw (input) -- (dotinp) -- (system);
14+
\draw (system) -- node[above,midway]{$z(n)$} (sumzv);
15+
\draw (sumzv) -- node[right,near end]{$d(n)$} (sumyd);
16+
%column 3
17+
\draw (dotinp) |- (filter);
18+
\draw (filter) -- node[above,midway]{$y(n)$} (sumyd);
19+
\path (sumyd) [late options={label=195:$-$}];
20+
\draw (sumyd) -- (error);
21+
\end{scope}
22+
% draw dashed block around the adaptive filter
23+
\draw[dashed] ([shift={(-15mm,-2mm)}]filter.south west) rectangle ([shift={(40mm,2mm)}]filter.north east) node [above right,anchor=south east] {Adaptive Filter};
24+
\end{tikzpicture}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
\begin{tikzpicture}
2+
%draw matrix of nodes
3+
\matrix[row sep=5mm,column sep=10mm]{
4+
& & \node (desired) {$d(n)$}; & &\\
5+
\node (input) {$u(n)$}; & \node [blocknode] (filter) {$w_m$}; & \node [combnode] (sumyd) {$\Sigma$}; & \node (error) {$e(n)$};\\
6+
};
7+
%draw arrows
8+
\begin{scope}[->,>=latex]
9+
%column 1
10+
\draw (desired) -- (sumyd);
11+
%column 2
12+
\draw (input) -- (filter);
13+
\draw (filter) -- node[above,midway]{$y(n)$} (sumyd);
14+
\path (sumyd) [late options={label=195:$-$}];
15+
\draw (sumyd) -- (error);
16+
\end{scope}
17+
\end{tikzpicture}

0 commit comments

Comments
 (0)