archimedes.sysid.Timeseries¶

class archimedes.sysid.Timeseries(ts: ndarray, us: ndarray, ys: ndarray)¶

Container for synchronized input-output time series data.

This class provides a structured way to organize and validate time series data for system identification applications. It ensures that input signals, output measurements, and time vectors are consistently sized and properly formatted for use with Kalman filters and parameter estimation algorithms.

The class is implemented as a PyTree node, making it compatible with automatic differentiation and functional transformations throughout the Archimedes framework.

Parameters:
  • ts (array_like) – Time vector of shape (N,) containing monotonic time samples. Must be one-dimensional.

  • us (array_like) – Input signal matrix of shape (nu, N) where nu is the number of input channels and N is the number of time samples. Each row represents one input channel over time.

  • ys (array_like) – Output measurement matrix of shape (ny, N) where ny is the number of output channels and N is the number of time samples. Each row represents one output channel over time.

ts¶

Time vector of shape (N,).

Type:

ndarray

us¶

Input signals of shape (nu, N).

Type:

ndarray

ys¶

Output measurements of shape (ny, N).

Type:

ndarray

Notes

Data Organization:

The class follows the convention that time varies along the second dimension (columns), while different signals vary along the first dimension (rows).

Validation:

The class automatically validates that:

  • Time vector is one-dimensional

  • Input and output matrices are two-dimensional

  • All time dimensions are consistent (same N)

  • Data types are compatible with numerical operations

PyTree Compatibility:

As a PyTree node, Timeseries objects can be:

  • Flattened, reconstructed, and manipulated using PyTree utilities

  • Stored and manipulated as structured data

  • Used in optimization algorithms that expect PyTree parameters

Immutability:

Instances are frozen (immutable) after creation, preventing accidental modification of data during analysis. Use the replace method to create modified copies when needed.

Length and Indexing:

The class supports indexing and length retrieval, allowing easy access to specific time samples or slices of the data.

Raises:
  • ValueError – If time vector is not one-dimensional.

  • ValueError – If input or output matrices are not two-dimensional.

  • ValueError – If time dimensions are inconsistent between ts, us, and ys.

See also

pem

Uses Timeseries objects for parameter estimation

__init__(ts: ndarray, us: ndarray, ys: ndarray) None¶

Methods

__init__(ts, us, ys)

replace(**updates)

Returns a new object replacing the specified fields with new values.

Attributes

ts

us

ys