我需要一个代码才能获得以下电路图。
答案1
下面是一个使用的示例circuitikz
:
\documentclass{article}
\usepackage{tikz}
\usepackage{circuitikz}
\begin{document}
\tikzset{full Schottky diode/.append style={bipoles/length=.4cm}}
\tikzset{american voltages}
\tikzset{american inductors}
\tikzset{european resistors}
\begin{circuitikz}
% TRANSISTORS
\draw
(0,2) node[nigfete] (t1) {}
(0,0) node[nigfete] (t2) {}
(2,2) node[nigfete] (t3) {}
(2,0) node[nigfete] (t4) {};
\draw
(t1.S) to[short] (t2.D)
(t3.S) to[short] (t4.D);
% DIODES and transistor labels
\foreach \num in {1,2,3,4} {
\node[anchor=south] at (t\num.G) {$T_\num$};
\draw (t\num.S)++(0,0.5) -- ++(0.3,0) to[sD*] ($(t\num.D)+(0.3,-0.5)$) -- ++(-0.3,0);
}
% BATTERY connection
\draw
(t4.S) to[short,-*] (t2.S) to[short] ($(t2.S)+(-2,0)$)
to[battery,l=$U$] ($(t1.D)+(-2,0)$) to[short,-*] (t1.D) to[short] (t3.D);
% RL
\draw
(t1.S) to[short,*-] ($(t1.S)+(3,0)$) to[short] ($(t1.D)+(3,0)$) coordinate (p1)
to[R,l_=$R$] ++(2,0) to[L,l_=$L$,i>^=$i_L$] ++(3,0) coordinate (p);
\draw
(t4.D) to[short,*-] ($(t4.D)+(1,0)$) to[short] ($(t4.S)+(1,0)$) coordinate (n1)
to[short] ++(5,0) coordinate (n);
% C
\draw
(p) to[C,l=$C$,i>^=$i_C$,v<=$U_C$] (n);
% LOAD
\draw
(p) to[short,*-]($(p)+(2,0)$) to[R,l=$LOAD$,i>^=$i_o$] ($(n)+(2,0)$) to[short,-*] (n);
% U_i
\draw
(p1) to[open,v^=$U_i$] (n1);
\end{circuitikz}
\end{document}
\documentclass{article}
\usepackage{tikz}
\usepackage{circuitikz}
\begin{document}
\tikzset{diode/.append style={bipoles/length=1cm}}
\tikzset{polar capacitor/.append style={bipoles/length=.7cm}}
\tikzset{inductor/.append style={bipoles/length=1cm}}
\tikzset{american voltages}
\tikzset{american inductors}
\tikzset{cute inductors}
\begin{circuitikz}
\ctikzset{label/align = straight}
% UPPER PART
\draw
(0,0) to[battery] (0,2) to[D]
(2,2) coordinate (l11) to [L,l=$L_1$] ++(2,0) coordinate (l12);
% LOWER PART
\draw
(0,0) to[short]
(2,0) coordinate (l21) to[L,l_=$L_2$] ++(2,0) coordinate (l22);
% the crossing point of the capacitors
\coordinate (c) at ($(l11)+(1,-1)$);
% CAPACITORS
\draw
(l22) to[short,*-] (c) to[pC,l=$C_1$,-*] (l11);
\draw
(l21) to[short,*-] (c) to[pC,l_=$C_2$,-*] (l12);
% 3-PHASE INVERTER
\foreach \n in {0,1,2} {
\draw
(l22) to[short] ++(\n+1,0) to[cspst] ++(0,.75) to[short] ++(0,.5) coordinate (p\n)
to[cspst] ++(0,.75) to (l12);
\draw ($(p\n)+(0,-\n*.25)$) to[short,*-o] ++(3.5-\n,0) coordinate (o\n);
}
% LABELS
\node[anchor=north] at (o2) {\parbox{1.5cm}{\scriptsize To AC load or motor}};
\node[anchor=north] at ($(c)+(0,2.5)$) {\scriptsize Z Source};
\node[anchor=north] at ($(p1)+(0,2.5)+(0,-.25)$) {\scriptsize 3-Phase Inverter};
\node[anchor=north west] at ($(0,0)+(0,2.5)+(0,1)$) {\parbox{2cm}{\scriptsize DC-Voltage Source}};
\end{circuitikz}
\end{document}