75 lines
3.3 KiB
TeX
75 lines
3.3 KiB
TeX
|
\documentclass[tikz]{standalone}
|
||
|
%
|
||
|
\usetikzlibrary{arrows.meta}
|
||
|
\usetikzlibrary{automata} % FSM
|
||
|
\usetikzlibrary{backgrounds}
|
||
|
\usetikzlibrary{calc}
|
||
|
\usetikzlibrary{chains}
|
||
|
\usetikzlibrary{intersections}
|
||
|
% \usetikzlibrary{mindmap}
|
||
|
\usetikzlibrary{positioning}
|
||
|
\usetikzlibrary{shadows}
|
||
|
\usetikzlibrary{shapes,
|
||
|
shapes.arrows,
|
||
|
shapes.gates.logic.US,
|
||
|
shapes.gates.logic.IEC,
|
||
|
shapes.geometric,
|
||
|
shapes.symbols,
|
||
|
shapes.multipart,
|
||
|
shapes.misc}%
|
||
|
%
|
||
|
\begin{document}
|
||
|
%
|
||
|
\tikzstyle{block} = [draw, fill=white, rectangle, minimum height=2.3em, minimum width=3.3em] %, font=\footnotesize
|
||
|
\tikzstyle{adda} = [draw, fill=white, rectangle, minimum height=1.5em] % , font=\footnotesize
|
||
|
\tikzstyle{sum} = [draw, fill=white, circle]
|
||
|
\tikzstyle{pin} = [fill, circle, inner sep=1.2pt]
|
||
|
\tikzstyle{arrow} = [->, {-Triangle[angle=60:1.5mm]}]
|
||
|
%
|
||
|
\begin{tikzpicture}
|
||
|
\def\SCALE{1.2}
|
||
|
%%%%%%%%%%%%%%%%%% BLOCKS %%%%%%%%%%%%%%%%%%
|
||
|
\node [block] (filter) {$W(z)$};
|
||
|
\node [block, below= \SCALE * 1.3cm of filter] (lms) {LMS};
|
||
|
\node [pin, right=\SCALE * 0.4cm of filter] (pin3) {};
|
||
|
\node (dac) [adda, right=\SCALE * 0.3cm of pin3] {DAC};
|
||
|
\node [block, right=\SCALE * 0.3cm of dac] (secondary) {$S(z)$};
|
||
|
\node [block, below=\SCALE * 0.5cm of secondary] (sdach2) {$\widehat{S}(z)$};
|
||
|
\node [sum, right=\SCALE * 0.8cm of secondary] (mic) {+};
|
||
|
\node [sum, right=\SCALE * 0.8cm of sdach2] (fb) {+};
|
||
|
\node [block, left=\SCALE * 0.85cm of lms] (sdach1) {$\widehat{S}(z)$};
|
||
|
\node [above=\SCALE * 0.7cm of mic] (disturbance) {$d(n)$};
|
||
|
\node [pin, right=\SCALE * 0.6cm of fb] (pin1) {};
|
||
|
\node [pin, left=\SCALE * 0.3cm of sdach1] (pin2) {};
|
||
|
\node (help) at ($(mic)!0.5!(fb)$) {};
|
||
|
\node [adda] (adc) at (pin1|-help) {ADC};
|
||
|
|
||
|
%%%%%%%%%%%%%%%%%% DECORATION %%%%%%%%%%%%%%%%%%
|
||
|
% Digital
|
||
|
\def\BORDER{0.5}
|
||
|
\definecolor{mygrey}{rgb}{0.9, 0.9, 0.9}
|
||
|
\node (p1) at ($(pin3)!0.5!(secondary.west)$) {};
|
||
|
\node (p2) at ($(secondary.south)!0.5!(sdach2.north)$) {};
|
||
|
\begin{scope}[on background layer]
|
||
|
\fill [mygrey] ($(pin2|-fb) + (-\BORDER, \SCALE * -2 -\BORDER)$) -- ($(pin2|-filter.north) + (-\BORDER, \BORDER + 0.3)$) -- ($(dac|-filter.north) + (0, +\BORDER + 0.3)$) -- (dac|-adc) -- ($(adc.east) + (\BORDER, 0)$) |- ($(pin2|-fb) + (-\BORDER, \SCALE * -1.5 -\BORDER)$);
|
||
|
\end{scope}
|
||
|
% \node[below right] at ($(pin2|-filter.north) + (-\BORDER, \BORDER + 0.3)$) {Digital Domain};
|
||
|
|
||
|
%%%%%%%%%%%%%%%%%% WIRING %%%%%%%%%%%%%%%%%%
|
||
|
\begin{scope}[on background layer]
|
||
|
\draw [arrow] (lms) |- ($(filter.south west) + (0.25, -0.3)$) -- ($(filter.north east) + (-0.25, 0.3)$);
|
||
|
\end{scope}
|
||
|
\draw [arrow] (filter.east) node[above right] {$y(n)$} -- (dac) -- (secondary);
|
||
|
\draw [arrow] (sdach1.east) node[above right] {$x'(n)$} -- (lms);
|
||
|
|
||
|
\draw [arrow] (disturbance) -- (mic);
|
||
|
\draw [arrow] (secondary) -- (mic);
|
||
|
\draw [arrow] (sdach2.east) node[above right] {$y'(n)$} -- (fb.west) node[below left] {-};
|
||
|
\draw [arrow] (mic.east) node[above right] {$e(n)$} -| (adc) -- (adc) -- (pin1) -- (fb);
|
||
|
\draw [arrow] (pin1) |- (lms);
|
||
|
\draw [arrow] (fb) node[below right = \SCALE * 1cm and 0cm] {$x(n)$} |- +(-1, \SCALE * -1.5) -| (pin2) -- (sdach1);
|
||
|
\draw [arrow] (pin2) |- (filter);
|
||
|
\draw [arrow] (pin3) |- (sdach2);
|
||
|
\end{tikzpicture}
|
||
|
\end{document}
|