帮助我解决 tikz 电路问题

帮助我解决 tikz 电路问题

我正在尝试实现图中的电路,我的尝试很普通。任何改进的帮助都将不胜感激。

在此处输入图片描述

\documentclass[border=10pt]{standalone}  
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{arrows,shapes,calc,positioning}
\begin{document}  
\begin{circuitikz}[american]
\draw (0,0) node [transformer](T){}
  (T.A1) node[above] {}
  (T.A2) node[below] {}
  (T.B1) node[above] {} 
  (T.B2) node[below] {}
  (T.base) node{20:1};
\draw (T.A1) --++(-2,0);
\draw (T.A2) --++(-2,0);
\draw (T.B1) -- ++ (2,0) to[D, v=${V_\gamma=0.7}$, i>_=](6,0);        
\draw (T.B2) --++(2,0) to[D, v=${V_\gamma=0.7}$ ,i>_=](6,-2.1);
\draw(T.A1) to[open,v<={$240V_{rms}$}](T.A2);
\draw(T.B2) to[open,v>=$$](T.B1);
% 3 new lines for neutral line on the secondary side.
\draw[thick] ($(T.B1)!0.515!(T.B2)-(0.7,0)$) --node[pos=0.5,above,inner sep=0pt](n)       {$12V_{rms}$}++ (3,0);
\draw  (n) -- ++ (0,-0.3)node[ground]{};
\draw ($(T.base)+(1mm,-2mm)$) -- ++(0,-1.8);
\draw ($(T.base)+(-1mm,-2mm)$) -- ++(0,-1.8);
\draw(6,0) to [C,v=200uF](6,-1.1);
\draw(10,0) to [C,v=0.1uF](10,-1.1);
\draw(12,0) to [R,v=$R_L$](12,-1.1);
\draw (7,0.5) rectangle(9,-0.5);
\draw(6,0) -- (7,0);
\draw(9,0) -- (12,0);
\draw[thick] (1,-1.08) -- (12,-1.08);
\end{circuitikz}

\end{document}

输出

输出

答案1

这是一项改进

  1. 中性线以节点名给出,c以便可以利用正交坐标正确放置电容器。
  2. 小圆圈是通过o-o选项放置的to[options]电路导体
  3. 想法二极管被真实二极管符号取代D*
  4. 如果需要,用实际数值替换 C_1、C、C_2、R_L。

在此处输入图片描述

代码

\documentclass[border=20pt]{standalone}  
\usepackage[american,siunitx]{circuitikz}
\usetikzlibrary{arrows,shapes,calc,positioning}

\begin{document}  
\begin{circuitikz}[american]
\draw (0,0) node [scale=1.5,transformer core
] (T){}
      (T.A1) node[above] {A1}
      (T.A2) node[below] {A2}
      (T.B1) node[above] {B1} 
      (T.B2) node[below] {B2}
      (T.base) node{K};
\draw (T.B1) -- ++(1,0) to[D*, v=${V_\gamma=0.7}$, i>_=](4.5,0)--(6,0);        
\draw (T.B2) -- ++(1,0) to[D*, v=${V_\gamma=0.7}$ ,i>_=] ++(2,0) -| (5,0);
\draw(T.A1) to[open,v<={$240V_{rms}$,o-o}](T.A2);
\draw($(T.B1)!0.3!(T.B2)$) node[]{$9V_{rms,AC}$}(T.B1);
\draw ($(T.B1)!0.8!(T.B2)$)node[]{$9V_{rms,AC}$}(T.B2);
\draw[thick] ($(T.B1)!0.51!(T.B2)-(1cm,0)$)coordinate[](c){} -- ++ (12.44,0);
\draw(5.5,0)node[](d1){} to [C,l_=$C_1$, o-o] (c -| d1);
\draw(10,0)node[](d2){}  to [C,l_=$C_2$, o-o](c -| d2);
\draw(13,0)node[](d3){}  to [R,l=$R_L$](c -| d3);
\draw(11,0)node[](d4){}  to [open,o-o, v^={$V_{out}$}] (c -| d4);
\draw (7,0.5)node[below left=0cm and 0.1cm](){In} rectangle(8,-0.5)node[above right=0.5cm and 0.1cm](){Out};
\draw(6,0)node[](d6){}   to [open,o-o, v^={$V_{in}$}] (c -| d6);
\draw (7.5,-0.5)node[](d5){} to[C,l=$C$]  (c -| d5);
\draw(6,0) -- (7,0);
\draw(8,0) --(11,0)      to[short,i^={$i_D$}] (13,0);
\end{circuitikz}
\end{document}

答案2

PSTricks 解决方案使用pst-circ包裹:

\documentclass{article}

\usepackage{siunitx}
\usepackage{pst-circ,pstricks-add}

\begin{document}

\begin{pspicture}(-0.9,-0.75)(12.33,4.9)
 \psset{arrows = -}
  \pnodes{P}(0,0)(3,0)(5,0)(3.5,1)(-0.5,2)(2.2,2)(6,2)(7,2)(8,2)(9.5,2)(10.5,2)(11.5,2)(3.5,3)(0,4)(3,4)(5,4)(6,4)(7,4)(8,4)(9.5,4)(10.5,4)(11.5,4)(11,4.5)
  \transformer[arrows = o-](P13)(P0)(P14)(P1){}
  \newdiode[labeloffset = -18pt](P1)(P2){$D_{2}$}
  \newdiode(P14)(P15){$D_{1}$}
  \rput(P4){\shortstack[c]{%
    \SI{240}{\V}\strut\\[-0.75ex]
    input\strut}}
  \rput(P3){\shortstack[c]{%
    $\SI{9}{\V}_{\textup{rms}}$\strut\\[-0.75ex]
    AC\strut}}
  \rput(P12){\shortstack[c]{%
    $\SI{9}{\V}_{\textup{rms}}$\strut\\[-0.75ex]
    AC\strut}}
  \resistor[dipolestyle = zigzag, labeloffset = -18pt](P11)(P21){$R_{L}$}
  \wire[arrows = -o](P2)(P15)
  \wire[arrows = o-](P10)(P11)
  \wire[arrows = o-](P20)(P21)
  \tension(10.7,4.5)(11.3,4.5){}
  \uput[90](P22){$XYZ$}
 \psset{arrows = o-o}
  \wire(P5)(P6)
  \wire(P6)(P8)
  \wire(P8)(P9)
  \wire(P9)(P10)
  \wire(P15)(P16)
  \wire(P16)(P18)
  \wire(P18)(P19)
  \wire(P19)(P20)
  \uput[225](P16){$+$}
  \capacitor(P6)(P16){}
  \uput[270](P6){$C_{1}$}
  \wire(P8)(P18)
  \capacitor(P9)(P19){}
  \uput[270](P9){$C_{2}$}
  \uput[45](P8){$C$}
  \rput(P18){\psframe[fillstyle = solid](-0.5,-0.5)(0.5,0.5)}
  \uput[180](7.5,4.5){In}
  \uput[0](8.5,4.5){Out}
  \pcline[linestyle = none](P10)(P20)
  \ncput*{$V_{0}$}
  \uput[90](P10){$-$}
  \uput[270](P20){$+$}
  \pcline[linestyle = none](P7)(P17)
  \ncput*{$V_{1}$}
  \uput[90](P7){$-$}
  \uput[270](P17){$+$}
\end{pspicture}

\end{document}

输出

相关内容