Convert continuous transfer function into discrete
import scipy.signal as sig
from math import sqrt
dt = 0.01
ki = 0.1**2
kp = sqrt(2)*0.1
num = [kp, ki]
den = [1, 0.]
sig.cont2discrete(sys=(num,den), dt=0.1)
(array([[ 0.14142136, -0.14042136]]), array([ 1., -1.]), 0.1)
a = 5
num = [a, 0]
den = [a, 1]
sig.cont2discrete(sys=(num,den), dt=0.1)
(array([[ 1., -1.]]), array([ 1. , -0.98019867]), 0.1)
from sympy import *
from sympy.abc import *
a = Symbol('a', positive=True)
foo = (s/(s+a)).rewrite()
print(foo)
inverse_laplace_transform(1/((s+a)), s, t)
s/(a + s)
exp(-a*t)*Heaviside(t)