Stacked ALSSM Structure [ex101.1]ΒΆ

Generating two discrete-time linear state space models and stack them to a single model, generating a two-channel stacked output. Note that dump_tree() returns the internal structure of the stacked LSSM and helps debugging.

Note: replacing AlssmStacked() by AlssmStackedSO() would generates a summed (instead of a stacked) output.

Out:

--DUMP--
 β””-Alssm : stacked, A: (6, 6), C: (2, 6), label: lssm-stacked
  β””-Alssm : polynomial, A: (4, 4), C: (1, 4), label: alssm-polynomial
  β””-Alssm : native, A: (2, 2), C: (1, 2), label: alssm-line

--PRINT--
 A =
[[1. 1. 1. 1. 0. 0.]
 [0. 1. 2. 3. 0. 0.]
 [0. 0. 1. 3. 0. 0.]
 [0. 0. 0. 1. 0. 0.]
 [0. 0. 0. 0. 1. 1.]
 [0. 0. 0. 0. 0. 1.]]
C =
[[1. 0. 0. 0. 0. 0.]
 [0. 0. 0. 0. 1. 0.]]

import lmlib as lm

A = [[1, 1], [0, 1]]
C = [[1, 0]]
alssm_line = lm.Alssm(A, C, label="alssm-line")

alssm_poly = lm.AlssmPoly(poly_degree=3, label="alssm-polynomial")

# stacking lssm and update
alssm_stacked = lm.AlssmStacked((alssm_poly, alssm_line), label="lssm-stacked")

# print structure and content
print("--DUMP--\n", alssm_stacked.dump_tree())
print("--PRINT--\n", alssm_stacked)

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

Gallery generated by Sphinx-Gallery