def get_electromechanical(b=1, R=1, L=1, K=np.pi/5, M=1):
# TODO: determine good reference and/or initial_condition
# TODO: determine good default values for b, R, L, M
N = 3
sys = LTISystem(
np.c_[ # A
[0, 0, 0],
[1, -b/M, -K/L],
[0, K/M, -R/L]
],
np.r_[0, 0, 1/L], # B
# np.r_[1, 0, 0], # C
)
sys.initial_condition = np.ones(N)
def ref_func(*args):
if len(args) == 1:
x = np.zeros(N)
else:
x = args[1]
return np.r_[0, 0, 0]-x
ref = SystemFromCallable(ref_func, N, N)
return sys, ref
评论列表
文章目录