4

I am not sure which tools were used to draw this image. I am assuming TikZ is to be used.

Any guidance on which TikZ packages, I could use to draw this?

enter image description here

5
  • 1
    Welcome to Tex.SE!
    – M S
    Sep 11, 2018 at 10:31
  • Kindly refer to the circuitikz environment. the detailed description can be viewed from texdoc.net/texmf-dist/doc/latex/circuitikz/circuitikzmanual.pdf
    – M S
    Sep 11, 2018 at 10:33
  • I went through Circuitikz but it doesnt have the transformer symbol (Tr1, Tr2 in this image). Where could i get those from?
    – karchan
    Sep 11, 2018 at 10:53
  • 2
    You can always define your own shape(s). This has been done in quite a few examples on this site. The strategy is to copy the definition of something that looks very similar and then adjust it. If you have problems doing that, consider posting a document in which everything except for this shape is in. I am pretty confident that you will get an answer very soon then.
    – user121799
    Sep 11, 2018 at 12:07
  • 1
    For a one-off, you could just draw it using regular Tikz (circuitikz IS a tikzpicture). Sep 11, 2018 at 13:32

1 Answer 1

1

Just for fun, an incomplete option since there are many elements to draw and that ends the fun; but the drawing has some interesting details to implement, such as the node with inputs of the current controls, a different style of voltage reference, some elements defined with superficial code (without declaring a new component in the style of circuitikz) to draw transducers and transformers,then a solution for line markings in some arrows.I think that with this the other components are realizable.Of course excuse the disorder in the code.

INCOMPLETE RESULT:

enter image description here

MWE:

\documentclass[border=20pt]{standalone}
\usepackage[scaled]{helvet}
\usepackage{circuitikz}
\usepackage{siunitx}
\usepackage{bm}%Bold math
\usepackage{amsmath}
\usetikzlibrary{positioning,arrows.meta,decorations.markings}

\begin{document}
    \begin{tikzpicture}[
        %Environment Config
        >={Triangle[length=3pt,angle=60:4]},
        font=\sffamily,
        %Style Variable
        Lines/.store in=\lines,Lines=2,
        Rotate lines/.store in=\rlines,Rotate lines=0,
        Mark pos/.store in=\mpos,Mark pos=0.6,
        LineMark/.style={%Style for the voltage reference
            draw,
            postaction={
                decorate,
                decoration={
                    markings,
                    mark=at position \mpos with {
                    \begin{scope}[rotate=\rlines]
                    \ifnum\lines=2 \draw[-,yshift=0.7pt] (-45:3pt) -- (135:3pt);\draw[-,yshift=-0.7pt] (-45:3pt) -- (135:3pt);\fi
                    \ifnum\lines=3 \draw[-,yshift=1.2pt] (-45:3pt) -- (135:3pt);\draw[-,yshift=-1.2pt] (-45:3pt) -- (135:3pt);\draw[-] (-45:3pt) -- (135:3pt);\fi
                    \end{scope}
                    }
                }
            }
        },
        Vref/.style={%Style for the voltage reference
            draw=none,
            postaction={decorate,decoration={markings,mark=at position 0.5 with {\node[inner sep=0](a){ #1};}}},
            postaction={decorate,decoration={markings,mark=at position 0.1 with {\node[inner sep=1pt](b){\scriptsize $\bm{+}$};}}},
            postaction={
                decorate,
                decoration={
                    markings,
                    mark=at position 0.9 with {
                        \node[inner sep=1pt](c){\scriptsize $\bm{-}$};
                        \draw[->] (a.90)--(b.-90);
                        \draw[->] (a.-90)--(c.90);
                    }
                }
            }
        },
        Myground/.style={
            ground,
            scale=1.5,
            yshift=5pt
        }
    ]
    %Size adjust
    \ctikzset{nodes width/.initial=0.05}
    \ctikzset{bipoles/length=0.6cm}
    \ctikzset{label/align = rotate}
    \ctikzset{bipoles/resistor/height=.6}
    \ctikzset{bipoles/americaninductor/coil height=0.7}
    \ctikzset{bipoles/americaninductor/height=1.5}
    %Draw circuit
    %Objet Current controller
    \def\CC[#1](#2)#3#4{%1:position 2:node_name 3:Inputs 4:Node_text
        \foreach \k [count=\n] in {#3}{}
            \draw node[
                #1,
                rectangle,
                draw,
                fill=blue!50!cyan!7!white,
                inner ysep=2pt,
                minimum width=\n*0.7cm,
                font=\sffamily\scriptsize,
                align=center
            ](#2){#4};
        \foreach \k [count=\i from 0]in {#3}{
            \draw[<-](#2.south west)++(0.35+\i*0.7,0) -- ++(0,-0.5) node[anchor=0,rotate=90,xshift=3pt]{$\k$};
        }
    }
    %Object Transducer
    \def\Transducer[#1](#2)#3#4{%1: Position 2:Node_name 3:text below left 4: Text above right
        \draw
            node[
                #1,
                draw,
                fill=blue!50!cyan!7!white,
                minimum height=0.6cm,
                minimum width=1.4cm
            ](#2){}
            (#2.center)
                ++(8pt,4pt) node{\it\sffamily #4}
            (#2.center)
                ++(-8pt,-3pt) node{\it\sffamily #3};
        \draw[
            shorten >=1pt,
            shorten <=1pt
        ]
            (#2.north west)
                -- (#2.south east);
    }
    %Object VSC
    \def\VSC[#1](#2)[#3]{%1: Position 2:Node_name 3:Xscale to get mirrored content values 1 or -1
        \begin{scope}[transform shape, xscale=#3]
        \draw
            node[
                #1,
                draw,
                fill=blue!50!cyan!7!white,
                minimum height=2cm,
                minimum width=1.1cm
            ](#2){};
        \draw[dashed]
            (#2.center)++(3pt,-0.5) circle (9pt)
            (#2.center)++(3pt,0.5)circle (9pt);
        \draw
            (#2.center)++(3pt,-0.5) node[nigbt,bodydiode,scale=0.8](IGBT1){}
            (#2.center)++(3pt,0.5) node[nigbt,bodydiode,scale=0.8](IGBT2){}
            (IGBT1.D) -- (IGBT2.E) (#2.center)++(3pt,0) to [short,*-]++(10pt,0);
        \end{scope}
        \draw (#2.north)++(0,5pt) node{#2};
    }
    %Object Transformer
    \def\Tr[#1][#2](#3)#4{%1:Position 2:Orientation 3:Node_name 4:Node text (not implemented yet)
        \begin{scope}[rotate=#2]
            \draw[thick]node[#1](#3){}
                (#3.center)++(8pt,0)coordinate (#3-star) circle (10pt)
                (#3.center)++(-8pt,0)coordinate(#3-delta) circle (10pt)
                (#3-delta)+(90-#2:7pt) -- +(210-#2:7pt) -- +(330-#2:7pt) -- cycle
                (#3-star) edge +(30-#2:7pt) edge +(150-#2:7pt) edge +(270-#2:7pt)
                (#3.center)++(18pt,0) coordinate (#3-S)
                (#3.center)++(-18pt,0) coordinate (#3-D);
        \end{scope}
    }
    %Start drawing the thing...

    \CC[](N1){
        i_{rdref},
        i_{rqref},
        i_{rd},
        i_{rq},
        v_{Link},
        \omega_{\tau}%
    }{Rotor-side\\Current Controller}

    \CC[right=1cm of N1](N2){
        i_{rdref},
        i_{rqref},
        i_{rd},
        i_{rq},
        i_{sd_\ell},
        i_{sq_\ell},
        v_{Link},
        \omega_{\tau}%
    }{Grid-side\\Current Controller}

    \Transducer[above right= 0.5 and -2 of N1](TD1){dq}{abc}    
    \Transducer[above left= 0.5 and -2.5 of N2](TD2){dq}{abc}

    \VSC[above=0.5 of TD1](VSC1)[-1]
    \VSC[above=0.5 of TD2](VSC2)[1]

    %Circuit 1
    \draw 
    (VSC1.125)
        to [short,-*] ++(2,0) coordinate (div0)
        to [short] (VSC2.125)
    (VSC1.-125)
        to [short] (VSC2.-125)
    (div0)
        to [C,l={\rotatebox{180}{$C_{Link}$}},-*] (div0 |- VSC2.-125);
    \draw[Vref=$v_{link}$]
    (div0)++(-1,0) coordinate (temp)
    (temp) -- (temp |- VSC2.-125);

    %Arrows rotor side
    \draw[Lines=2,LineMark,<-] (TD1) -- (TD1 |- N1.north) node [midway,right]{$m_{rdq}$};
    \draw[Lines=3,LineMark,<-] (VSC1) -- (TD1);
    \draw[<-] (TD1.west) -- ++(-0.5,0)node[anchor=east]{$\theta_c$};
    %Arrows grid side
    \draw[Lines=2,LineMark,<-] (TD2) -- (TD2 |- N1.north) node [midway,right]{$m_{tdq}$};
    \draw[Lines=3,LineMark,<-] (VSC2) -- (TD2);
    \draw[<-] (TD2.west) -- ++(-0.5,0)node[anchor=east]{$\theta_\ell$};
    %Circuit 2
    \draw[Lines=3,LineMark,Mark pos=0.7,Rotate lines=90] (VSC2.0) -- ++(0.75,0) coordinate (circ2-start) node[pos=0.7,above]{$v_{t-abc}$};
    \Tr[above right= 0.5 and 3.5 of VSC2][-90](TR2){$T_{\tau 2}$}
    \draw
    (circ2-start)
        to [R,l=$R_t$] ++(1,0)
        to [american inductor,l=$L_t$] ++ (1,0)
        edge [->] ++(0.4,0)
        -| (TR2-S) node[pos=0.2,above]{$i_{t-abc}$}
    (TR2-star) -- ++(0.5,-0.3) node[ground]{}
    (TR2-D)
        to [short,-*] ++ (0,1) coordinate (circuit3) node[anchor=-90]{$v_{s-abc}$};
    \draw[Lines=3,LineMark,Rotate lines=90] (TR2-D) -- (circuit3);

    \draw node[above right= 0.5 and 0.2 of VSC2](temp){\Large $P_t$}
    (temp.center)++(0,-0.5) node(temp2){\Large $Q_t$};
    \draw[ultra thick,->](temp) -- ++(1,0);
    \draw[ultra thick,->](temp2) -- ++(1,0);

    \draw node[above right= 1 and 2.5 of VSC2,rotate=90](temp){\Large $P_c$}
    (temp.center)++(0.5,0) node[rotate=90](temp2){\Large $Q_c$};
    \draw[ultra thick,->](temp) -- ++(0,1);
    \draw[ultra thick,->](temp2) -- ++(0,1);
    \end{tikzpicture}
\end{document}
1
  • 1
    oh my god - I truly admire your dedication... Sep 12, 2018 at 15:25

You must log in to answer this question.

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