1

Here is the code.

\documentclass[12pt,letterpaper]{article}    
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}
\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{center} \begin{circuitikz} [american voltages] \draw (0,6) rectangle (2,7) node[pos=.5] (m) {$K_M$} (m.4) to[short,-, i>=$$] ++(0,-1.5) (m.2) to[short,-, i<=$$] ++(0,2); \draw(0,4) rectangle (2,5) node[pos=.5] {$\mbox{\huge$\times$}$}; \draw(0,2) rectangle (2,3) node[pos=.5] (m) {$K$} (m.1) to[short,-, i<=$$] ++(-3,0); \draw(0,0) rectangle (2,1) node[pos=.5] {$N()$} (0,0.5) -- (-1,0.5) -- (-1,4.5) -- (0,4.5); \draw(5,2.5) node[mixer] (m) {} (m.1) to[short,-, i<=$$] ++(-2.5,0) (m.2) to[short,-, i<=$$] ++(0,-1.5) --(2,0.5) (m.3) to[short,-] ++(1,0) (m.4) to[short,-, i<=$$] ++(0,1.5) --(2,4.5);

\end{circuitikz} \end{center}

\end{document}

This pic shows what I get from the code above.

enter image description here

This is what I want to achieve here.

enter image description here

kile
  • 655
  • 1
    Don't use rectangle path operation but node[draw, minimum width=1.5cm, minimum height=1cm](m){$K_M$}, i.e. a rectangular (by default) node. And then you can use (m) to … and the line will neatly touch the border. That said, I believe Circiutikz has a better interface do deal with these cases. – Qrrbrbirlbel Nov 28 '22 at 23:11
  • https://tex.stackexchange.com/questions/542469/how-to-properly-align-second-arrow-from-same-block – js bibra Nov 29 '22 at 02:38
  • https://tex.stackexchange.com/questions/544993/block-diagram-phase-noise-algorithm/545009#545009 – js bibra Nov 29 '22 at 02:47
  • https://tex.stackexchange.com/questions/544526/how-to-design-a-block-diagram/544533#544533 – js bibra Nov 29 '22 at 02:48
  • https://tex.stackexchange.com/questions/494953/tikz-block-diagram-with-summation-block-having-crossed-lines/494969#494969 – js bibra Nov 29 '22 at 02:49
  • https://tex.stackexchange.com/questions/575592/how-to-create-a-controls-system-diagram – js bibra Nov 29 '22 at 02:50
  • circuitikz shapes do not grow with the content, so yes, you can use the blocks by defining a rectangular one like here, but the natural form of doing it is with plain tikz: https://tex.stackexchange.com/questions/175969/block-diagrams-using-tikz – Rmano Nov 29 '22 at 08:37

1 Answers1

1

To show you an example, this is what you can do with circuitikz. Block elements are mostly square (you can extend the generic ones, but then probably the option @js bibra pointed to you in the comments are better). I implemented only part of the diagram.

\documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usetikzlibrary{fit}
\begin{document}
\begin{tikzpicture}[]
    % \node (modtext) {Modifying $I_M$};
    \draw (0,0) coordinate(in up)
        to[twoport, name=blX, t={\Huge$\times$}, >] ++(2,0)
        -- node[midway, above] {$K_M I_M$} ++(1,0) coordinate(kmim);
    \draw (0,-2) coordinate(in)
        to[twoport, t=$K$, >, name=blK] ++(2,0)
        -- node[midway, above] {$K I$} ++(1,0)
        node[mixer, anchor=west](M){};
    % input join
    \draw (in up) -- (in) node[circ]{} -- ++(-1,0) node[inputarrow, midway]{};
    % mixer arrow
    \path (M.west) node[inputarrow]{}
        (M.north) node[inputarrow,rotate=-90]{};
    % upper link
    \draw (kmim) -| (M.north);
    % output
    \draw (M.east) -- node[inputarrow]{} ++(2,0) node[right]{$O$};
    % block above
    \draw ([yshift=3cm]blX.north)
        -- node[inputarrow, rotate=-90](IA){} ++(0,-1)
        to[twoport, name=blKm, t=$K_M$] (blX.north)
        node[inputarrow, rotate=-90]{};
    % text above
    \path(IA) node[anchor=base east]{Modifying}
        node[anchor=base west]{$I_M$};
    % dashed box
    \node[draw, dashed, fit=(blKm) (blK) (M) (in)]{};
\end{tikzpicture}
\end{document}

enter image description here

Rmano
  • 40,848
  • 3
  • 64
  • 125