Step response of R L circuit


In [1]:
from lcapy import Circuit, s
cct = Circuit("""
V1 1 0 {u(t)}; down
R1 1 2 4; right=2
L1 2 3 0.5; down=2
W1 0 3; right
""")
cct.draw()



In [2]:
cct[2].V(s)


Out[2]:
$$\frac{1}{s + 8}$$

In [3]:
%matplotlib inline
ax = cct[2].v.plot()



In [4]:
ax = cct[2].v.plot()



In [5]:
ax = cct.R1.i.plot()


s-domain model


In [6]:
cct.s_model().draw()


Poles and zeros


In [7]:
cct[2].V(s).ZPK()


Out[7]:
$$\frac{1}{s + 8}$$

In [8]:
cct[2].V(s).poles()


Out[8]:
$$\left\{ -8 : 1\right\}$$

In [9]:
cct[2].V(s).zeros()


Out[9]:
$$\left\{ \right\}$$

In [10]:
ax = cct[2].V(s).plot()