i tried to present a tikz block diagram but my code does not give me what i want. Any help please.

 \tikzstyle{block} = [draw, fill=white, rectangle, 
minimum height=3em, minimum width=6em]
\tikzstyle{sum} = [draw, fill=white, circle, node distance=1cm]
\tikzstyle{input} = [coordinate]
\tikzstyle{output} = [coordinate]
\tikzstyle{pinstyle} = [pin edge={to-,thin,black}]
 \begin{tikzpicture}[auto, node distance=2cm,>=latex']
 \node [block, node distance=3.5cm] (model) {S M};
 \node [block, right of=model, node distance=3.5cm] (controller) 
 \node [block, right of=controller, node distance=3.5cm] (predEstim) 
 \node [block, right of=predEstim, pin={[pinstyle]above:R Ob 1}, node 
distance=3.5cm] (Evolvemoeld) {E M};
 \node [output, right of=Evolvemoeld] (output) {};
\coordinate [right of=model,pin={[pinstyle]above:Ob 1}] (a) {};
\coordinate [right of=Evolvemoeld, pin={[pinstyle]above:Ob 2}] (b) {};
 %%%%%%%%%         draw                  %%%%
 \draw [->] (model) -- (a);
 \draw [->] (a) -- (controller);
 \coordinate [below of=predEstim] (measurements) {};
 \draw [draw,->] (controller) -- (predEstim);
 \draw [->] (predEstim) --(Evolvemoeld);
 \draw [->] (Evolvemoeld) --(b);
 \draw [->] (b) -- (output);
 \draw [-] (output) |- (measurements);
 \draw [->] (measurements) -| (predEstim);

This is the wanted block. thank you enter image description here


I'd load positioning for that and draw the fat arrows with the single arrow shape.

 \tikzset{block/.style={draw=orange,rounded corners, fill=white, rectangle, 
minimum height=3em, minimum width=6em},
sum/.style={draw, fill=white, circle, node distance=1cm},
pinstyle/.style={pin edge={to-,thin,black}},
rotated arrow/.style={single arrow,anchor=east,rotate=#1,inner sep=4pt,
 top color=orange!60,bottom color=orange,minimum height=1cm,minimum width=3mm,
 shape border rotate=#1,blur shadow}}
 \begin{tikzpicture}[auto, node distance=1cm,>={Latex[length=2mm,width=2mm]}]
 \node [block] (model) {S M};
 \node [block, right=2cm of model] (controller) 
 \node [block, right=of controller] (predEstim) 
 \node [block, right=of predEstim] (Evolvemoeld) {E M};
 \node [output, right=of Evolvemoeld] (output) {};
 \path (model) -- (controller) coordinate[pos=0.5] (a);
 \node[rotated arrow=-90]  (arrow1) at ([yshift=1mm]a){};
 \node[above=1pt of arrow1.west] {D};
 \coordinate[right=1cm of Evolvemoeld] (b);
 \coordinate[right=1cm of b] (c);
 \node[above=1cm of Evolvemoeld] (d) {E};
 \node[rotated arrow=-90]  (arrow2) at ([yshift=1mm]b){};
 \node[above=1pt of arrow2.west] {F};
 %%%%%%%%%         draw                  %%%%
 \begin{scope}[orange,shorten > =2pt]
 \draw [->] (model) to (a);
 \draw [->] ([xshift=1mm]a) to (controller);
 \coordinate [below=of predEstim] (measurements);
 \draw [->] (controller) to (predEstim);
 \draw [->] (predEstim) to(Evolvemoeld);
 \draw [->] (d) to (Evolvemoeld);
 \draw [->] (Evolvemoeld) to(b);
 \draw [->] ([xshift=1mm]b) to (c);
 \draw [->] (output) |-(measurements) -| (predEstim);

enter image description here

  • You have also used shorten > =2pt which is no longer documented in manual 3.0.1a, this deserves to be explained. – AndréC Oct 25 '18 at 6: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.