# Transmission lines with circuitikz

It is more convenient to draw transmission lines with colored rectangles (strips) like in the circuit below

rather than using standard circuitikz symbol .

My knowledge of TeX is poor to do this, but can you provide solution in which one can control length of rectangle symbol for transmission line or grey rectangle behaves similar to resistor with its ports?

• I am asking for a new circuitikz element which I consider as nontrivial problem. It is not "make it for me" like question. Voting down would make sense if you can link existing solution. Show us then. Sep 10 '18 at 8:45
• While I'm not the downvoter I would suggest that you add an MWE to help us help you. Sep 10 '18 at 9:07
• Ask to develop a trivial code to a person who starts with a certain package, in the case of a related drawing but which is clearly not exemplified in the manual and on the contrary is an advanced implementation, does not make much sense, on the contrary who already has experience with the package can respond with some solution and code that can encourage the novice to use the package to know that with this can achieve results as he wants. Sep 10 '18 at 20:16

A trivial option ;), to draw the lines of transmission is using the library decorations.markings, in the case of my example declaring 3 marks, one that declares the start coordinate, one containing the label and the one with the final coordinate and draws a rectangle that is drawn as shown in the example, the following is code in circuitikz leaving spaces to then draw each line of transmission since for my solution I can not integrate it with the circuit syntax of the package.

RESULT:

MWE:

\documentclass[border=20pt]{standalone}
\usepackage{circuitikz}
\usepackage{siunitx}
\usetikzlibrary{decorations.markings}

\begin{document}
\begin{tikzpicture}[
%Environment Config
line width=0.75,
%Style Variable
text pos/.store in=\tpos,text pos=0.5,
text anchor/.store in=\tanchor,text anchor={north:12pt},
Tline/.style={%Style for the voltage reference
draw,
postaction={decorate,decoration={markings,mark=at position 10pt with {\coordinate (a) at (90:3.5pt);}}},
postaction={decorate,decoration={markings,mark=at position \tpos with {\node at (\tanchor){\small #1};}}},
postaction={decorate,decoration={markings,mark=at position \pgfdecoratedpathlength-10pt with {\coordinate (b) at (-90:3.5pt);\draw[fill=black!40](a) rectangle (b);}}}
},
Myground/.style={
ground,
scale=1.5,
yshift=5pt
}
]
\ctikzset{nodes width/.initial=0.1}
\ctikzset{bipoles/length=0.8cm}
%Draw circuit
\draw
(0,0) node[nigfetd,scale=1.7](N1){} % Discrete component node at 0,0 named N1
(N1)++(-6pt,0) %Draw a circle decoration
circle (23pt)
(N1.E)%From emiter relativa coordinate to node ground.
-- ++(0,-1) coordinate (gnd-0) node[Myground]{}
(N1.G)%From gate
to[short,-*]++(-0.5,0) coordinate (divG) % Division in gate
to[R,l=$R_1$,-*]++(0,2) coordinate (divGR) % Division in gate resistance.
to[C]++(1.2,0) node[rotate=90,Myground]{}
(divGR)%From divGr
to[short]++(0,0.5) node[ocirc,scale=1.5,label=90:$V_g$]{}
(divG)++(-2,0) coordinate (divG-1)%Declare a point shifted ++(-2,0) to draw the Transmission line.
(divG-1)%Continue drawing from divG-1
to[C,l=$C_2$,*-] (divG-1 |- gnd-0) node[Myground]{}
(divG-1)
to[C,l_=$C_1$] ++ (-1.5,0)
to[short] ++ (0,-2.5) coordinate(divG-2)
(N1.D)++(1,0) coordinate (temp)
(N1.D)
-| (temp |- divG)
to[short,-*]++(1,0) coordinate (divD)
(divD)++(0,2) coordinate (divD-1)
(divD-1)
to[C,*-]++(1.2,0) node[rotate=90,Myground]{}
(divD-1)
to[short]++(0,0.5) node[ocirc,scale=1.5,label=90:$V_{dd}$]{}
(divD)++(2,0) coordinate (divD-2)
(divD-2)++(2,0) coordinate (divD-3)
(divD-3)
to[C,l_={\raisebox{-10pt}{$C_3$\hspace{-5pt}}},*-] (divD-3 |- gnd-0) node[Myground]{}
(divD-3)
to[C,l_=$C_4$] ++ (1,0) coordinate(divD-4)
(divD-4)++(2,0) coordinate (divD-5)
(divD-5)
to[short]++(0.5,0) node[ocirc,scale=1.5,label=0:$P_{out}$]{}
(divD-5)++(0,-0.5) coordinate (divD-6)
(divD-6)
to[R,l=$50\si{\ohm}$] ++ (0,-2) node[Myground]{}
(divG-2 -| divD-4)
to[short] (divD-4 |- divD-6);

\fill (N1)++(0,-7.6pt) circle (2pt);

\draw[Tline=$Z_0$,text anchor=-90:12pt](divG) -- (divG-1);
\draw[Tline=${Z_{03}=50\si{\ohm}, \theta_3}$,text pos=0.25](divG-2) -- (divG-2 -| divD-4);
\draw[Tline,text anchor=-90:12pt](divD-4 |- divD-6) -- (divD-6);
\draw[Tline=$\lambda/4$,text anchor=-90:15pt](divD) -- (divD-1);
\draw[Tline=${Z_0, \theta_1}$,text anchor=-90:15pt](divD) -- (divD-2);
\draw[Tline=${Z_0, \theta_2}$,text anchor=-90:20pt](divD-2) -- ++(0,2);
\draw[Tline=${Z_0}$,text anchor=-90:15pt](divD-2) -- (divD-3);
\draw[Tline=$\lambda/4$](divD-4) -- (divD-5);
\end{tikzpicture}
\end{document}

• I also do not know why people upvote answers with little effort more. +1. ;-)
– user121799
Sep 10 '18 at 22:25