Boost Converter

A diagram of a simple boost converter.

import schemdraw
import schemdraw.elements as elm
d = schemdraw.Drawing(unit=3)
Vg = elm.SourceV().label("$V_g$").up()
d += Vg
L = elm.Inductor2().label("$L$").right()
d += L
d += elm.lines.CurrentLabelInline().at(L).right().label('$i_L$')
d += elm.Resistor().length(1.5).label("$R_L$").right()
S = elm.SwitchSpdt2(toplabel='2', botlabel='1').right()
d += S
d += elm.Line().length(1.5).right().at(S.b)
d.push()
C = elm.Capacitor().label("$C$").down()
d += C
d += elm.lines.CurrentLabelInline().at(C).down().label('$i_C$')
d.pop()
d += elm.Line().length(1.5).right()
d.push()
R = elm.Resistor().label("$R$").down()
d += R
d.pop()
d += elm.Line().length(1.5).right()
d += elm.Dot(open=True)
d += elm.Gap().down().toy(Vg.start).label(['+', '$V$', '–'])
d += elm.Dot(open=True)
d += elm.Line().left().tox(R.end)
d.push()
d += elm.Line().up().toy(R.end)
d.pop()
d += elm.Line().left().tox(C.end)
d.push()
d += elm.Line().up().toy(C.end)
d.pop()
d += elm.Line().left().tox(S.c)
d.push()
d += elm.Line().up().toy(S.c)
d.pop()
d += elm.Line().left().tox(Vg.start)

d.draw()
boost converter

Out:

<schemdraw.backends.mpl.Figure object at 0x7ff3c460efd0>

Total running time of the script: ( 0 minutes 1.294 seconds)

Gallery generated by Sphinx-Gallery