TIKZ 中的逆变器

TIKZ 中的逆变器

我想画一些类似的东西,但我不知道如何使用 latex 来画。有人能帮我吗?谢谢

[1]:https://i.stack.imgur.com/6i7Wt.png

答案1

在此处输入图片描述

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[siunitx,european,fetbodydiode]{circuitikz}
\usetikzlibrary{positioning}

\tikzset{
    declare function={% in case of CVS which switches the arguments of atan2
        atan3(\a,\b)=ifthenelse(atan2(0,1)==90, atan2(\a,\b), atan2(\b,\a));},
    kinky cross radius/.initial=+.125cm,
    @kinky cross/.initial=+, kinky crosses/.is choice,
    kinky crosses/left/.style={@kinky cross=-},kinky crosses/right/.style={@kinky cross=+},
    kinky cross/.style args={(#1)--(#2)}{
        to path={
            let \p{@kc@}=($(\tikztotarget)-(\tikztostart)$),
            \n{@kc@}={atan3(\p{@kc@})+180} in
            -- ($(intersection of \tikztostart--{\tikztotarget} and #1--#2)!%
            \pgfkeysvalueof{/tikz/kinky cross radius}!(\tikztostart)$)
            arc [ radius     =\pgfkeysvalueof{/tikz/kinky cross radius},
            start angle=\n{@kc@},
            delta angle=\pgfkeysvalueof{/tikz/@kinky cross}180 ]
            -- (\tikztotarget)}}}
\begin{document}
\begin{circuitikz}
    \draw   
    (0,0)       coordinate  (s1) to++ (0,-0.4)  node (mosfet1) [nigfete,xscale=-1, below,anchor=D] {}
    (mosfet1)                                   node (mosfet3) [nigfete,xscale=-1, right=36mm]{}
    (mosfet3.S) coordinate  (t34)to++ (0,-0.4)  node (mosfet4) [nigfete,xscale=-1, below,anchor=D] {}
    (mosfet1.S) coordinate  (t12)to++ (0,-0.4)  node (mosfet2) [nigfete,xscale=-1, below,anchor=D] {}
    (s1)-|(mosfet3.D)
    (mosfet2.S)-|(mosfet4.S)
    (s1)to[short,-*, ]++(5,0)coordinate[label=above:V\textsubscript{uf}](s11)
    (mosfet2.S)to[short,-*]++(5,0)coordinate(ss)
    (s11)to[C,l=C\textsubscript{out}](ss)to ++(0,-0.5)node[ground]{}
    (mosfet1.S)to++(-0.5,0)coordinate(sss)to++(0,0.75)to[short,-o]++(-0.5,0)
    (mosfet4.D)to[kinky cross=(mosfet1.S)--(mosfet2.D), kinky crosses=right]++(-3.2,0)to++(0,-0.75)to[short,-o]++(-0.5,0)
    ;
\end{circuitikz}

\end{document}

相关内容