5

I am trying to draw scheme of control system. The feedback arrow has a break at the begin. Feedback line must be solid. I can't understand, why it happens.. Please, help.

The red arrow shows the break position.

\documentclass[border=0.2cm]{standalone}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newcommand{\bs}{\boldsymbol}

\usepackage[dvipsnames]{xcolor} % More defined colors
\usepackage{tikz}       % Tikz
\usepackage{tikzscale}  % Used to scale Tikz graphics
\usepackage{adjustbox}  % Used to proper positioning of tikz pictures

% Required package
\usetikzlibrary{arrows}                   % Arrow tip library
\usetikzlibrary{arrows.meta}              % Add some arrows
\usetikzlibrary{calc}                     % The library allows advanced Coordinate Calculations
\usetikzlibrary{intersections}            % calculate intersections of paths
\usetikzlibrary{matrix}                   %
\usetikzlibrary{patterns}                 %
\usetikzlibrary{shapes}                   % Defines circle and rectangle
\usetikzlibrary{shapes.geometric}         % Use for the shape diamond and isosceles triangle
\usetikzlibrary{positioning}              % Additional options for placing nodes
\usetikzlibrary{spy}                      % Creating a magnified area
\usetikzlibrary{babel}                    % A tiny library that make the interaction with the babel package easier
\usetikzlibrary{plotmarks}                % This library defines a number of plot marks
\usetikzlibrary{fit}                      % Used to make rectangle as nodes by specifying two points
\usetikzlibrary{backgrounds}              % Used to put things under others

\tikzset{>=Stealth} % Setup Arrows style
\tikzset{every path/.style={line width=1pt}} % Setup default Linewidth

% Blocks
\tikzset{%
  block/.style n args={2}{%
    draw,
    fill=Gray!10,
    minimum width  = #1,
    minimum height = #2,
  },
  block/.default={1.2cm}{1.0cm}
}

% Branch
\tikzstyle{branch}=[fill,shape=circle,minimum size=4pt,inner sep=0pt]


\begin{document}
\begin{tikzpicture}
  \node[] (addM) at (0, 0){};
  \node[block, right=0.75 of addM] (wDot){$J^{-1}(M-\omega\times(J\omega))$};
  \draw[->] (addM.east) -- (wDot.west) node[midway,above]{$M$};
  \node[block, right=0.75 of wDot] (intW){\Large $\int$};
  \draw[->] (wDot.east) -- (intW.west) node[midway,above] {$\dot{\omega}^B$};
  % insert mode wMid at middle of array with omega
  \draw[->] (intW.east) -- node[midway](wMid){} +(1,0) node[midway,above]{$\omega^B$}; 
  \draw[->] (wMid) node[branch]{} -- +(0,-1) -| (wDot.south);
  
  % point to error
  \draw[<-,red] (wMid) -- +(1,-1) ;

\end{tikzpicture}
\end{document}

the problem

3
  • 4
    Nodes have a min size even when empty. Use name.center
    – daleif
    Commented Jun 20 at 13:38
  • 1
    Please note that \tikzstyle is deprecated. Have a look for \tikzset in the tikz user guide. Commented Jun 20 at 13:46
  • 1
    Welcome! Off-topic: don't load inputenc unless your LaTeX is on the ancient side of old.
    – cfr
    Commented Jun 20 at 13:48

2 Answers 2

5

I would probably use a coordinate here rather than a node with no content. Empty nodes still have non-zero inner sep by default. Coordinates are points.

Your preamble is not very minimal, but I've not bothered to reduce it here except to avoid \tikzstyle and inputenc, which are obsolete.

\documentclass[border=0.2cm]{standalone}

\usepackage[T2A]{fontenc}
% \usepackage[utf8]{inputenc}% obsolete
\usepackage{amsmath}
\newcommand{\bs}{\boldsymbol}

\usepackage[dvipsnames]{xcolor} % More defined colors
\usepackage{tikz}       % Tikz
\usepackage{tikzscale}  % Used to scale Tikz graphics
\usepackage{adjustbox}  % Used to proper positioning of tikz pictures

% Required package
\usetikzlibrary{arrows}                   % Arrow tip library
\usetikzlibrary{arrows.meta}              % Add some arrows
\usetikzlibrary{calc}                     % The library allows advanced Coordinate Calculations
\usetikzlibrary{intersections}            % calculate intersections of paths
\usetikzlibrary{matrix}                   %
\usetikzlibrary{patterns}                 %
\usetikzlibrary{shapes}                   % Defines circle and rectangle
\usetikzlibrary{shapes.geometric}         % Use for the shape diamond and isosceles triangle
\usetikzlibrary{positioning}              % Additional options for placing nodes
\usetikzlibrary{spy}                      % Creating a magnified area
\usetikzlibrary{babel}                    % A tiny library that make the interaction with the babel package easier
\usetikzlibrary{plotmarks}                % This library defines a number of plot marks
\usetikzlibrary{fit}                      % Used to make rectangle as nodes by specifying two points
\usetikzlibrary{backgrounds}              % Used to put things under others

\tikzset{>=Stealth} % Setup Arrows style
\tikzset{every path/.style={line width=1pt}} % Setup default Linewidth

% Blocks
\tikzset{%
  block/.style n args={2}{%
    draw,
    fill=Gray!10,
    minimum width  = #1,
    minimum height = #2,
  },
  block/.default={1.2cm}{1.0cm},
  branch/.style={fill,shape=circle,minimum size=4pt,inner sep=0pt},
}

% Branch


\begin{document}
  \begin{tikzpicture}
    \node[] (addM) at (0, 0){};
    \node[block, right=0.75 of addM] (wDot){$J^{-1}(M-\omega\times(J\omega))$};
    \draw[->] (addM.east) -- (wDot.west) node[midway,above]{$M$};
    \node[block, right=0.75 of wDot] (intW){\Large $\int$};
    \draw[->] (wDot.east) -- (intW.west) node[midway,above] {$\dot{\omega}^B$};
    % insert mode wMid at middle of array with omega
    \draw[->] (intW.east) -- coordinate[midway](wMid) +(1,0) node[midway,above]{$\omega^B$}; 
    \draw[->] (wMid) node[branch]{} -- +(0,-1) -| (wDot.south);
    
    % point to error
    \draw[<-,red] (wMid) -- +(1,-1) ;
    
  \end{tikzpicture}
\end{document}

With coordinate rather than empty node

1
  • 1
    Thank you, @cfr! Thanks for clarifying the problem and reviewing the code. Have a nice day! Commented Jun 20 at 14:01
1

Your problem is already solved, so below is only an alternative way how to draw your image:

\documentclass[border=0.2cm]{standalone}

\usepackage[T2A]{fontenc}
% \usepackage[utf8]{inputenc}% obsolete
\usepackage{amsmath}
\newcommand{\bs}{\boldsymbol}

\usepackage[dvipsnames]{xcolor} % More defined colors
\usepackage{tikz}               % Tikz
\usetikzlibrary{arrows.meta,
                chains,
                ext.paths.ortho,% defined in the tikz-ext package
                positioning,
                quotes,
%
                babel}  

\tikzset{%
    arr/.style = {-Stealth, thick},
  block/.style n args={2}{draw,fill=Gray!10,
                          minimum width  = #1,
                          minimum height = #2,
                         },
  block/.default={1.2cm}{1.0cm},
    dot/.style = {circle, draw, fill, inner sep=1.2pt, node contents={}},
every edge/.style = {arr, draw},
every edge quotes/.append style = {auto, font=\footnotesize}
        }
        
\begin{document}
    \begin{tikzpicture}[
node distance = 4mm and 8mm,
  start chain = going right
                        ]
    \begin{scope}[nodes={on chain}] 
\coordinate (in);
\node (wDot) [block] {$J^{-1}(M-\omega\times(J\omega))$};
\node (intW) [block] {\huge $\int$};
\node (d)    [dot];
\coordinate (out);
    \end{scope}
\path   (in)    edge ["$M$"]              (wDot) 
        (wDot)  edge ["$\dot{\omega}^B$"] (intW)
        (intW)  edge ["$\omega^B$"]       (out);
\draw[arr]    (d) r-du (wDot);
  \end{tikzpicture}
\end{document}

enter image description here

1
  • What a clean and clear code, thank you very much! Commented Jun 21 at 5:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .