ltv_disc_frozen¶
MATLAB equivalent:
sidLTVdiscFrozen
ltv_disc_frozen ¶
Frozen transfer function from LTV state-space model.
ltv_disc_frozen ¶
ltv_disc_frozen(ltv_result: LTVResult, *, frequencies: ndarray | None = None, time_steps: ndarray | None = None, sample_time: float = 1.0) -> FrozenResult
Compute the frozen (instantaneous) transfer function from an LTV model.
For each time step k and frequency w, evaluates the frozen transfer function
.. math::
G(w, k) = (e^{jw} I - A(k))^{-1} B(k)
If the ltv_result includes Bayesian uncertainty (from
:func:sid.ltv_disc with uncertainty=True), the standard
deviation of G is propagated via first-order (Jacobian)
linearization using the rank-1 factorization described in
SPEC.md S8.11.1.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ltv_result
|
LTVResult
|
Result struct from :func: |
required |
frequencies
|
ndarray of shape (nf,) or None
|
Frequency vector in rad/sample. Default is 128 linearly spaced points in (0, pi]. |
None
|
time_steps
|
ndarray of shape (nk,) or None
|
0-based indices of time steps to evaluate. Default is all
time steps |
None
|
sample_time
|
float
|
Sample time in seconds, used only for the |
1.0
|
Returns:
| Type | Description |
|---|---|
FrozenResult
|
Frozen dataclass with fields:
|
Raises:
| Type | Description |
|---|---|
SidError
|
If any element of |
Examples:
Basic usage with default frequencies and all time steps:
>>> import sid
>>> ltv = sid.ltv_disc(X, U, lambda_=1e5, uncertainty=True)
>>> frz = sid.ltv_disc_frozen(ltv)
Custom frequencies and selected time steps:
>>> import numpy as np
>>> w = np.logspace(-2, np.log10(np.pi), 200)
>>> frz = sid.ltv_disc_frozen(ltv, frequencies=w, time_steps=np.array([0, 49, 99]))
Notes
Algorithm:
- Build a frequency grid (default 128 points in (0, pi]).
- For each selected time step k and frequency w, compute the
resolvent R = (z I - A(k))^{-1} via
numpy.linalg.solveand the frozen response G(k) = R B(k). - If the
LTVResultcarries uncertainty, propagate it using the rank-1 Jacobian factorization:
.. math::
\operatorname{Var}(G_{ab}) =
(v^H P(k) v) \cdot (r_a \Sigma r_a^H)
where v = [G_k(:,b); e_b], r_a = R(a,:), P(k) is the row-wise posterior covariance, and Sigma is the noise covariance.
Specification: SPEC.md S8.9
References
.. [1] Carvalho, Soares, Lourenco, Ventura. "COSMIC: fast closed-form identification from large-scale data for LTV systems." arXiv:2112.04355, 2022.
See Also
sid.ltv_disc : LTV state-space identification. sid.freq_map : Time-varying frequency response via short-time windows.
Changelog
2026-04-08 : First version (Python port) by Pedro Lourenco.