In [1]:
import control as ctrl
import numpy as np
import sympy
import math
In [2]:
s = sympy.Symbol('s')
# L, C, R = sympy.symbols('L, C, R')
L = 10
C = 100
R = 1000
In [14]:
# den = s**2*L + 1/C+R*s
den = [L, R, 1/C]
# num = s*R/L
num = [R/L, 0]
In [15]:
# system = num/den
# system
system = ctrl.TransferFunction(num, den)
In [16]:
state_space = ctrl.tf2ss(system)
state_space
Out[16]:
$$ \left(\begin{array}{rllrll|rll} -100\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}&-0.&\hspace{-1em}001&\hspace{-1em}\phantom{\cdot}&1\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}\\ 1\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}&0\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}&0\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}\\ \hline 10\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}&0\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}&0\phantom{.}&\hspace{-1em}&\hspace{-1em}\phantom{\cdot}\\ \end{array}\right) $$