State Variable Labels in Alssm Classes

[1]:
import numpy as np
import matplotlib.pyplot as plt
import lmlib as lm

[2]:
alssm = lm.AlssmPoly(poly_degree=4)
alssm.state_variable_labels
[2]:
{'x': range(0, 5), 'x0': (0,), 'x1': (1,), 'x2': (2,), 'x3': (3,), 'x4': (4,)}
[3]:
alssm = lm.AlssmSin(omega=0.1)
alssm.state_variable_labels
[3]:
{'x': range(0, 2), 'x0': (0,), 'x1': (1,), 'cos': (0,), 'sin': (1,)}

Extend state variable labels

[5]:
alssm = lm.AlssmPoly(poly_degree=2)

alssm.state_variable_labels
[5]:
{'x': range(0, 3), 'x0': (0,), 'x1': (1,), 'x2': (2,)}
[7]:
alssm.set_state_variable_label('offset', (0,))
alssm.set_state_variable_label('slope', (1,))

alssm.state_variable_labels
[7]:
{'x': range(0, 3),
 'x0': (0,),
 'x1': (1,),
 'x2': (2,),
 'offset': (0,),
 'slope': (1,)}
[ ]: