我怎样才能确保电流箭头离电压源稍远一点?

我怎样才能确保电流箭头离电压源稍远一点?

这里的电流箭头几乎与测试电压重叠。

\documentclass[12pt,letterpaper]{article}
\usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry}

\usepackage{tikz}  % for drawing pictures
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{arrows.meta}

\usepackage[siunitx]{circuitikz} % circuit package and  include electrical units in our labels

\begin{document}

\begin{figure}[H]
\centering
\begin{circuitikz}[american, ]
\ctikzset{tripoles/mos style/arrows}

\def\killdepth#1{{\raisebox{0pt}[\height][0pt]{#1}}}

\draw 
(-3,9)  -- (3,9) node[label=right: $V_{dd} \SI{}{}$] {}

(2,9) to [resistor, a^ = $R_3$] (2,5)

(2,1) node[nmos] (M1) {$M_1$}
(M1.source) node[] {} to (2,0) node[ground](GND){} (2,-3)



(2,5) -- (-3,5) to [resistor, a^ = $R_2$] (-3,1)
 to [resistor, a^ = $R_1$] (-3,-1.5)
 -- (-3,-1.5) node[ground](GND){} (-3,-2)



(2,4)node[nmos] (M2) {$M_2$}
(0,4) node[anchor=east] {$V_{bias}$}[short, o-] to (M2.gate) node[] {}
(M2.source) node[] {} -- (M1.drain) node[] {}
(M2.drain) node[right] {} -- (2,5) to  [short, *-o, name=S] ++ (2,0) node[right]{$V_{out}$};



\draw (5,0) node[ground](GND){}  to (5,0) to [I, i_>=$I_{in}$]  (5,2)[short, -*] to (2,2)[short, *-*];
%\draw  [short, -](5,1) to  [short, *-*, name=S] ++(3,0)node[right]{$V_{out}$};

%\draw  [short, *-] (-2,0) to [resistor, a = $R_2$] (-2,-3);   

\draw (M1.gate) to (0,1)  -- (0,0) to [V=$V_t$,  i<^=$I_{t}$] (0,-1)
to (0,-2) node[ground](GND){};    
 
\end{circuitikz}
\caption{break the loop and add test voltage } \label{fig:test_voltage}
\end{figure}

\end{document}

在此处输入图片描述

电流箭头在电压源中几乎不可见,而在电流源中可见。如何使电流在电压源中可见(使其像电流源一样)?

答案1

因此,首先,我建议你尝试将这里的代码简化为最小形式来展示手头的问题——我知道粘贴你的整个代码对你来说更容易,但它很多对于试图回答的人来说更难。我在这里将您的代码简化为一个最小示例(顺便说一句,您的代码无法编译,因为缺少要H计算的选项包)。

问题是,你给发电机留出的空间太小,所以箭头重叠了。基本长度默认为circuitikz1.4 厘米,所以如果你想在导线中留出空间来增加电流,那么 1 (cm) 的距离太小了。

\documentclass[12pt,letterpaper]{article}
\usepackage[siunitx]{circuitikz}
\ctikzset{tripoles/mos style/arrows}
\begin{document}

\begin{circuitikz}

    \draw (2,1) node[nmos] (M1) {$M_1$}
    (M1.source) node[] {} to (2,0) node[ground](GND){} (2,-3);

    \draw (M1.gate) to (0,1)  -- (0,0) to [V=$V_t$,  i<^=$I_{t}$] (0,-3)
    node[ground](GND){};

\end{circuitikz}

\end{document}

在此处输入图片描述

相关内容