1

I'm making my first steps with circuitikz. But I'm a bit disappointed, because despite having texlive-full, some elements from the library aren't recognized while compiling, like thyristor, transformer or every types of igbt.

Here is the code I did (with some inspiration from Texample.net) :

\documentclass{article}
\usepackage{amsmath}
%\usepackage[utf8]{inputenc}
%\usepackage[T1]{fontenc}
%\usepackage[french]{babel}
\usepackage{mathptmx}
%\usepackage{tikz}
%\usetikzlibrary{circuits.ee}
\usepackage[americaninductor,european]{circuitikz}
\usepackage{siunitx}
\usepackage{mathpazo}
\usepackage{color}
\usepackage[active,pdftex,tightpage]{preview}
\PreviewEnvironment[]{tikzpicture}
\PreviewEnvironment[]{pgfpicture}
\DeclareSymbolFont{symbolsb}{OMS}{cmsy}{m}{n}
\SetSymbolFont{symbolsb}{bold}{OMS}{cmsy}{b}{n}
\DeclareSymbolFontAlphabet{\mathcal}{symbolsb}

\usetikzlibrary{calc}
\ctikzset{bipoles/thickness=1}
\ctikzset{bipoles/length=0.8cm}
\ctikzset{bipoles/diode/height=.375}
\ctikzset{bipoles/diode/width=.3}
%\ctikzset{tripoles/thyristor/height=.8}
%\ctikzset{tripoles/thyristor/width=1}
\ctikzset{bipoles/vsourceam/height/.initial=.7}
\ctikzset{bipoles/vsourceam/width/.initial=.7}
\tikzstyle{every node}=[font=\small]
\tikzstyle{every path}=[line width=0.8pt,line cap=round,line join=round]

\begin{document}

\begin{circuitikz}
\draw
(0,0) to[battery,l=$V_{\text{pile}}$] ++(0,4)
++(0,0) to[L,l=$L_e$] ++(2,0) coordinate (LT)
++(0,0) to[C,l=$C_e$] ++(0,-4) -- (0,0)
%  H-bridge 1st leg
(LT) ++(2,-1) node [npn,scale=1,name=igbt1] {}
++(0,-2) node [npn,scale=1,name=igbt3] {}
(igbt3.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt3.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt1.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt1.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt1.C) |- (LT)
(igbt1.E) -- (igbt3.C)
(igbt3.E) |- (0,0)
% H-bridge 2nd leg
(LT) ++(4,-1) node [npn,scale=1,name=igbt2] {}
++(0,-2) node [npn,scale=1,name=igbt4] {}
(igbt4.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt4.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt2.E)++(0,0.1) -- ++(0.3,0) to[D] ($(igbt2.C)+(0.3,-0.1)$)
  -- ++(-0.3,0)
(igbt2.C) |- (LT)
(igbt2.E) -- (igbt4.C)
(igbt4.E) |- (0,0)
% Transfo
(igbt1.E) node[circ] {} -| ++(4,0) to[R,l=$R_{ch}$] ++(0,-1) |-      (igbt4.C) node[circ] {}
% PWM
(2,-0.5) rectangle (6,-1.5)
(3,-0.5) |- (igbt1.B)
(3.2,-0.5) |- (igbt3.B)
(5,-0.5) |- (igbt2.B)
(5.2,-0.5) |- (igbt4.B)
;
\node (note1) at (4,-1) {Phase-shifted PWM};
\node (note1) at (3.5,3.5) {$T_1$};
\node (note1) at (4.7,3) {$D_1$};
\node (note1) at (3.5,1.5) {$T_3$};
\node (note1) at (4.7,1) {$D_3$};
\node (note1) at (5.5,3.5) {$T_2$};
\node (note1) at (6.7,3) {$D_2$};
\node (note1) at (5.5,1.5) {$T_4$};
\node (note1) at (6.7,1) {$D_4$};
\end{circuitikz}

\end{document}

I would like to know if I'm doing anything wrong.

I think it's needless to say that it compiles with npn, but when I put nigbt instead of npn it fails to find the element tikz/nigbt.

Running on Ubuntu 12.04.

s__C
  • 3,186

0 Answers0