Basic ALSSM Structure [ex101.0]

This example demonstrates how to set up a autonomous linear state space model ALSSM.

Seee also: Module statespace ALSSM Classes

Out:

-- DUMP (1) --
 └-Alssm : native, A: (2, 2), C: (1, 2), label: my-native-alssm

-- PRINT (1) --
 A =
[[1 1]
 [0 1]]
C =
[[1 0]]

-- DUMP (2) --
 └-Alssm : polynomial, A: (4, 4), C: (1, 4), label: my-polynomial-alssm

-- PRINT (2) --
 A =
[[1 1 1 1]
 [0 1 2 3]
 [0 0 1 3]
 [0 0 0 1]]
C =
[[1 0 0 0]]

import lmlib as lm

# Example 1: a native ALSSM with explicit A and C definition
A = [[1, 1], [0, 1]]
C = [[1, 0]]
alssm_line = lm.Alssm(A, C, label="my-native-alssm")
print("-- DUMP (1) --\n", alssm_line.dump_tree())
print("-- PRINT (1) --\n", alssm_line)
print(" ")

# Example 2: using built-in ALSSM generator for polynomial ALSSMs
alssm_poly = lm.AlssmPoly(poly_degree=3, label="my-polynomial-alssm")
print("-- DUMP (2) --\n", alssm_poly.dump_tree())
print("-- PRINT (2) --\n", alssm_poly)

Total running time of the script: ( 0 minutes 0.030 seconds)

Gallery generated by Sphinx-Gallery