0

Hello Tex friends I am trying to draw the linear scheme for the signal processing tool. I am testing the Signal processing library. However, I can not get the figure like that.

This library:

http://www.texample.net/tikz/examples/noise-shaper/

If you have any ideas, please let me know.

enter image description here

  • You seem to have tried making the diagram, so why not show us the code you have already, that way we might only need to fill in the blanks, instead of making the whole thing from scratch. (There is no "signal processing library" in that link, by the way.) – Torbjørn T. Sep 8 '18 at 15:47
3

Starting from the example in the link it is not too difficult to draw these things. Believe me, it is much more fun to try out yourself.

\documentclass[tikz,border=3.14mm]{standalone}
\usetikzlibrary{shapes,arrows.meta,calc,positioning}
\begin{document}
\tikzset{%
  block/.style    = {rectangle, minimum height = 3em,    minimum width = 3em,draw,fill=white},
  sum/.style      = {circle,draw,fill=white},
  forward/.style  = {isosceles triangle,draw,fill=white},
}
\begin{tikzpicture}[->,auto, thick, node distance=2cm, >={Triangle},font=\sffamily]
% upper branch
\draw (0,0) coordinate(L1) node[above right] {$x_1(t)$} 
-- ++ (2,0) node[right,forward](a1){$a_1$} ;
\draw (a1) -- ++ (2.5,0)
node[midway,above] {$a_1\,x_1(t)$}
 -- ++ (1,-1) node[below right,sum] (s1){$+$};
% lower branch (using calc to make it symmetric)
\draw let \p1=($(L1)-(s1)$) in ([yshift=-2*\y1]L1) coordinate(L2)
node[above right] {$x_2(t)$}
-- ++ (2,0) node[right,forward] (a2){$a_2$};
\draw (a2) -- ++ (2.5,0) 
node[midway,above] {$a_2\,x_2(t)$}
-- (s1);
% joint branch
\draw (s1) -- ++(4,0) node[right,block]{$\mathcal{H}$}
node[midway,above] {$a_1\,x_1(t)+a_2\,x_2(t)$} -- ++(3,0)
node[above] {$\mathcal{H}\{a_1\,x_1(t)+a_2\,x_2(t)\}$};
\end{tikzpicture}

\begin{tikzpicture}[->,auto, thick, node distance=2cm, >={Triangle},font=\sffamily]
% upper branch
\draw (0,0) coordinate(L1) node[above right] {$x_1(t)$} -- 
++ (2,0) node[block,right] (H1) {$\mathcal{H}$}; 
\draw (H1) -- ++ (3,0) node[midway,above]{$\mathcal{H}\{x_1(t)\}$} 
node[right,forward](a1){$a_1$} ;
\draw (a1) -- ++ (3,0)
node[midway,above] {$a_1\,\mathcal{H}\{x_1(t)\}$}
 -- ++ (1,-1) node[below right,sum] (s1){$+$};
% lower branch (using calc to make it symmetric)
\draw let \p1=($(L1)-(s1)$) in ([yshift=-2*\y1]L1) coordinate(L2)
node[above right] {$x_2(t)$} -- 
++ (2,0) node[block,right] (H2) {$\mathcal{H}$}; 
\draw (H2) -- ++ (3,0) node[midway,above]{$\mathcal{H}\{x_2(t)\}$} 
node[right,forward](a2){$a_2$} ;
\draw (a2) -- ++ (3,0)
node[midway,above] {$a_2\,\mathcal{H}\{x_1(t)\}$} -- (s1);
% joint branch
\draw (s1) -- ++(3,0)
node[above] {$a_1\,\mathcal{H}\{x_1(t)\}+a_2\,\mathcal{H}\{x_2(t)\}$};
\end{tikzpicture}
\end{document}

enter image description here

  • hi, is it possible to split the line into multiple lines? I just want to write multi-lines text. Thanks a lot – user3727281 Sep 10 '18 at 9:39
  • 1
    @user3727281 Yes. you need to add some text width or align option. Try e.g. node[right,block,align=center]{$\mathcal{H}$\\ $XYZ$}. – user121799 Sep 10 '18 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.