trivialReduction

Method of mss.

Collapse duplicate and unused monomial columns.

Source: src/model/@mss/trivialReduction.m

Syntax

sys = trivialReduction(sys)

Description

trivialReduction simplifies the CPN representation of an mss model without changing the function it represents. It removes the redundancy that appears when models are built up mechanically — c2d, d2c and ss2mss call it on their result — in two steps, both acting on the monomial columns:

Internally the three parameter components are combined into one signed matrix Φ=Φ+1Φ1+Φc\Phi = \Phi_{+1} - \Phi_{-1} + \Phi_c for the comparison, and split back afterwards: entries exactly +1+1 go to parameterMatrixOne, exactly 1-1 to parameterMatrixMinusOne, and everything else non-zero to parameterMatrixContinuous. The tensor rank is then refreshed via updateRank and columnIndexStateEq / columnIndexOutputEq are recomputed from the new parameter matrix. If anything was removed, a line reporting the number of duplicate and unused columns is printed.

Equation rows are preserved

Equation rows are never removed. In an explicit mss the row count is the model dimension — one row per state equation, one per output — so dropping rows would break the model rather than simplify it. All of the following are legitimate and keep their row:

Model Why row removal would break it
ẋi=0\dot x_i = 0 (constant state) An all-zero row is still that state’s equation.
Two states with identical dynamics Collapsing them leaves fewer state equations than states.
y1 = y2 = x1 Collapsing them leaves nOutput larger than outputEquationIndex.
An output equal to a state equation y = f(x) is a normal explicit model.

Rows are only reordered, into [state equations; output equations], with stateEquationIndex and outputEquationIndex rebuilt sequentially to match — so nState and nOutput stay valid across a call, and the result is checked with checkIndexDimensions before it is returned. Do not hold copies of the index vectors across a call, since the numbering changes.

The method assumes a CPNTensor; it reads the structure and parameter matrices directly and has no tensor-train path.

The mdss version of this method does collapse duplicate equation rows. That is correct there, where the two blocks are equalities and inequalities and a redundant constraint carries no dimension, but it is not transferable to an explicit model.

Input arguments

Argument Description
sys The mss model to reduce.

Output arguments

Output Description
sys The reduced model, functionally equivalent to the input.

Example

sysc = rmss(3,1,1,4);
sysd = c2d(sysc, 0.01);       % appends one monomial column per state
sysd = trivialReduction(sysd);
% e.g. "Reduced by 2 duplicate column(s) and 0 unused column(s)."

See also

mss · c2d · d2c · trivialReduction


MyToolbox Documentation | Generated automatically by CI/CD pipeline