变压器电路的精确坐标

变压器电路的精确坐标

我正在尝试将其制作成一个电路,但是电容器看起来有点奇怪,因为无法在另一端获得正确的高度。

在此处输入图片描述

另外,我不知道是否有办法让 D2 的电流看起来离二极管稍微远一点,也可以让元件稍微居中一点,其中一些看起来更靠右或靠左。

这是代码:

\documentclass{article}
\usepackage{circuitikz}

\begin{document} 

\begin{circuitikz} 
\draw (0,0) node [transformer](T){}
node[ocirc] (A) at ([xshift=-0.5cm]T.A1) {}
node[ocirc] (B) at ([xshift=-0.5cm]T.A2) {} 
node[] (C) at ([xshift=0.1cm]T.B1) {}
node[] (D) at ([xshift=0.1cm]T.B2) {}
(T.A1) to[-o] (A)
(T.A2) to [-o] (B) 
; 
\draw (T.B1) --++ (0,0) to [C = $C_1$, i = $i_{c_1}$] (3.5,1) 
to [diode, l = $D_2$, i = $i_{d_2}$] (5,1) 
to [short] (7.5,1) 
; 
\draw (7.5,1) to [R = $R$, i = $i_r$] (7.5,-1.1) ; 
\draw (3.5,-1.1) to [diode, l = $D_1$,*-*, i = $i_{d_1}$] (3.5,1) node[label={[font=\footnotesize]above:\textbf{$u_1(t)$}}] {}; 
\draw (5.6,1) node[label={[font=\footnotesize]above:\textbf{$u_2(t)$}}] {} to [C = $C_2$,*-* , i = $i_{c_2}$] (5.6,-1.1); 
\draw (T.B2) --++ (0,0) to [short] (7.5,-1.1);  


\begin{scope}[shorten >= 10pt,shorten <= 10pt]
\draw[<-] (C) -- node[right] {$u_s(t)$} (D);
\end{scope} 


\end{circuitikz} 

\end{document}

答案1

我重新设计了你的电路,所有部分都使用相对坐标。我还将你的一些标签变成了节点,将节点变成了坐标。

\documentclass{standalone}
\usepackage{circuitikz}
\begin{document} 

\begin{circuitikz} 
\draw (0,0) node [transformer](T){}
(T.A1) to[short,-o] ++(-0.5cm,0) coordinate (A)
(T.A2) to [short,-o] ++(-0.5cm,0) coordinate (B) 
; 
\draw (T.B1) to [C = $C_1$, i = $i_{c_1}$] ++(2,0) coordinate(Top1)
to [diode, l = $D_2$, i = $i_{d_2}$] ++(2.5,0) coordinate (Top2)
to [short] ++(1.5,0) coordinate (Top3) 
; 
\coordinate (Bottom1) at (Top1 |- T.B2);
\coordinate (Bottom2) at (Top2 |- T.B2);
\coordinate (Bottom3) at (Top3 |- T.B2);

\draw (T.B2) to [short] (Bottom3);

\draw (Top1) node[font=\footnotesize, above right] {\textbf{$u_1(t)$}}
  to [diode, invert, l = $D_1$,*-*, i = $i_{d_1}$] (Bottom1)% coordinate (Bottom1)
; 
\draw (Top2) node[font=\footnotesize, above right] {\textbf{$u_2(t)$}}
  to [C = $C_2$,*-* , i = $i_{c_2}$] (Bottom2)% coordinate (Bottom2)
;
\draw (Top3) to [R = $R$, i = $i_r$] (Bottom3); 

\begin{scope}[shorten >= 10pt,shorten <= 10pt]
\draw[xshift=0.1cm,<-] (T.B1) -- node[right] {$u_s(t)$} (T.B2);
\end{scope} 

\end{circuitikz} 

\end{document}

演示

答案2

对您的方案进行一次“重新编辑”:

\documentclass[margin=3mm]{standalone}
\usepackage{circuitikz}

\begin{document}

\begin{circuitikz}[every label/.append style={font=\footnotesize, xshift=0.75em}]
\ctikzset{bipoles/capacitor/width/.initial=.1}
\draw   (0,0)   node (T) [transformer] {} 
        (T.A1)  to [short,-o] ++ (-0.5,0)
        (T.A2)  to [short,-o] ++ (-0.5,0)
        (T.B1)  to [short,-o] ++ (+0.5,0) coordinate (aux1)
        (T.B2)  to [short,-o] ++ (+0.5,0) coordinate (aux2)
%
        (aux1)  to [C=$C_1$, i=$i_{c_1}$] ++ (2,0) coordinate[label=$u_1(t)$] (aux3)
                to [D,l=$D_2$, i=$i_{d_2}$] ++ (2,0) coordinate[label=$u_2(t)$] (aux4)
                to [C=$C_2$, i=$i_{c_2}$, *-*]  (aux4 |- aux2)
        (aux4)  -- ++ (2,0) coordinate (aux5)
                to [R=$R$]  (aux5 |- aux2) 
                -- (aux2)
        (aux3 |- aux2)  to [D,a=$D_1$, i_=$i_{d_1}$,*-*] (aux3); 
\draw[->, shorten >=2mm, shorten <=2mm]
        (aux2) -- node[right] {$u_s(t)$} (aux1);
    \end{circuitikz}
\end{document}

在此处输入图片描述

相关内容