Skip to content

sidLTVdiscIO

Python equivalent: sid.ltv_disc_io

Identify discrete-time LTV system from partial observations.

result = sidLTVdiscIO(Y, U, H, 'Lambda', lambda)
result = sidLTVdiscIO(Y, U, H, 'Lambda', lambda, 'R', R)
result = sidLTVdiscIO(Y, U, H, 'Lambda', lambda, 'TrustRegion', 1)

Identifies time-varying system matrices A(k), B(k) and estimates state trajectories from input-output data when only partial state observations are available:

\(x(k+1)\) = A(k) x(k) + B(k) u(k) k = 0, ..., N-1 y(k) = H x(k)

Uses the Output-COSMIC algorithm: alternating minimisation between a COSMIC step (dynamics estimation) and an RTS smoother (state estimation), initialised via LTI realization from the I/O transfer function (sidLTIfreqIO).

When H = I (full state observation), this reduces to the standard COSMIC algorithm (sidLTVdisc).

Inputs

Name Description
Y Output data, (N+1 x py), (N+1 x py x L), or cell array {L x 1}
where Y{l} is (N_l+1 x py). Cell arrays allow variable-length
trajectories.
U Input data, (N x q), (N x q x L), or cell array {L x 1}
where U{l} is (N_l x q). Must match Y format.
H Observation matrix, (py x n). When rank(H) = n (including
py >= n), states are recovered exactly via weighted least
squares and no EM iterations are needed.

Name-value options

Name Description
'Lambda' Regularisation strength. Scalar or (N-1 x 1).
Required.
'R' Measurement noise covariance, (py x py) SPD.
Default: eye(py).
'MaxIter' Maximum alternating iterations. Default: 50.
'Tolerance' Convergence tolerance on relative cost change.
Default: 1e-6.
'CovarianceMode' How to estimate noise covariance. Options:
'diagonal' - diagonal Sigma (default)
'full' - full n x n covariance
'isotropic' - scalar * I_n
'TrustRegion' Trust-region parameter mu_0 in [0, 1], or 'off'.
Default: 'off'.
'TrustRegionTol' Minimum mu before final pass. Default: 1e-6.

Outputs

Name Description
result Struct with fields:
.A (n x n x N) estimated dynamics matrices
.B (n x q x N) estimated input matrices
.X (N+1 x n x L) or cell {L x 1} estimated states
.H (py x n) observation matrix (copy)
.R (py x py) noise covariance used
.Cost (n_iter x 1) cost J at each iteration
.Iterations scalar, number of alternating iterations
.Lambda (N-1 x 1) regularisation used
.DataLength N
.StateDim n
.OutputDim py
.InputDim q
.NumTrajectories L
.Algorithm 'cosmic'
.Method 'sidLTVdiscIO'

Examples

% Basic usage
result = sidLTVdiscIO(Y, U, H, 'Lambda', 1e5);
% With known measurement noise
result = sidLTVdiscIO(Y, U, H, 'Lambda', 1e5, 'R', R_meas);
% With trust-region for difficult convergence
result = sidLTVdiscIO(Y, U, H, 'Lambda', 1e5, 'TrustRegion', 1);
% Multi-trajectory
result = sidLTVdiscIO(Y_3d, U_3d, H, 'Lambda', 1e5);

Algorithm

Output-COSMIC alternating minimisation: 1. LTI initialisation: estimate A0, B0 via Ho-Kalman realization of the I/O transfer function (sidLTIfreqIO) 2. State step: fix dynamics, RTS smoother for states 3. COSMIC step: fix states, solve for A(k), B(k) 4. Repeat 2-3 until convergence Complexity: O(T * (LNn^3 + N*(n+q)^3)) where T is iterations.

References

Carvalho, Soares, Lourenco, Ventura. "COSMIC: fast closed-form identification from large-scale data for LTV systems." arXiv:2112.04355, 2022.

Specification

SPEC.md section 8.12 -- Output-COSMIC docs/cosmic_output.md -- Full derivation

See also

sidLTIfreqIO, sidLTVdisc, sidLTVStateEst, sidLTVdiscFrozen

Changelog

  • 2026-04-06: Expose CovarianceMode option (was hardcoded 'diagonal').
  • 2026-04-01: First version by Pedro Lourenço.