0

This is the block diagram I want to draw: What I want This is the block diagram I was able to produce: What I got Here is my MWE:

\documentclass[tikz,14pt,border=10pt]{standalone}
%%%<
\usepackage{verbatim}
%%%>
\usepackage{textcomp}
\usetikzlibrary{shapes,arrows}
\begin{document}
% Definition of blocks:
% Defining string as labels of certain blocks.
    \tikzset{%
        block/.style    = {draw, thick, rectangle, minimum height = 3em,
            minimum width = 3em},
        cross/.style={path picture={ 
                \draw[black]
                (path picture bounding box.south east) -- (path picture bounding box.north west) (path picture bounding box.south west) -- (path picture bounding box.north east);
        }},
        sum/.style      = {draw, circle, cross, node distance = 2cm, minimum size = 1.5em}, % Adder
        input/.style    = {coordinate}, % Input
        output/.style   = {coordinate}, % Output
        dconnection/.style = {coordinate}
    }
    % Defining string as labels of certain blocks.

    \begin{tikzpicture}[auto, thick, node distance=2cm, >=triangle 45]
    \draw
    node at (0,4) [input, name=input1] {} 
    node [sum, right of=input1] (suma1) {}
    node at (4,4) [block] (k1) {$k_1$}
    node at (5,4) [dconnection, name = d11]{}
    node at (7,4) [block](G1) {$\frac{1}{s}$}
    node at (9,4) [sum] (suma2) {}
    node at (10,4) [dconnection, name = d12] {}
    node at (11,4) [output](output1){}
    node at (10,5) [dconnection, name = d13] {}
    ;
    % Joining blocks. 
    % Commands \draw with options like [->] must be written individually
    \draw[->](input1) -- node[near start] {$r_1$}(suma1)
    node[near end,above]{$+$}(suma1);
    \draw[->](suma1) -- node {} (k1);
    \draw[->](k1) -- node{}(d11) -- node{}(G1);
    \draw[->](G1) -- node[near end, below]{$+$}(suma2);
    \draw[->](suma2)--node[near end, above]{$y_1$}(output1);
    \draw[->](d12) -- node[]{}(d13) -| node[near end, left]{$-$}(suma1);
    % Second System
    \draw
    node at (0,1) [input, name=input2] {} 
    node [sum, right of=input2] (suma3) {}
    node at (4,1) [block] (k2) {$k_2$}
    node at (5.5,1) [dconnection, name = d21]{}
    node at (7,1) [block](G2) {$\frac{1}{s+2}$}
    node at (9,1) [sum] (suma4) {}
    node at (10,1) [dconnection, name = d22] {}
    node at (11,1) [output](output2){}
    node at (10,0) [dconnection, name = d23] {} 
    ;   
    % Joining blocks. 
    % Commands \draw with options like [->] must be written individually
    \draw[->](input2) -- node[near start] {$r_2$}(suma3)
    node[near end,below]{$+$}(suma3);
    \draw[->](suma3) -- node {} (k2);
    \draw[->](k2) -- node{}(d21) -- node{}(G2);
    \draw[->](G2) -- node[near end, above]{$+$}(suma4);
    \draw[->](suma4)--node[near end, above]{$y_2$}(output2);
    \draw[->](d22) -- node[]{}(d23) -| node[near end, left]{$-$}(suma3);
    % connecting the two systems
    \draw   node at (5.5,3) [dconnection, name =d31]{};
    \draw[->](d21) -- node[]{}(d31) -| node[near end, above=2mm, left]{$+$}(suma2);
    \draw   node at (5,2) [dconnection, name =d32]{};
    \draw[->](d11) -- node[]{}(d32) -| node[near end, below=2mm, left]{$+$}(suma4);
    \end{tikzpicture}
\end{document}
Bernard
  • 271,350
Al_Fh
  • 452

0 Answers0