tdcpy.rdde module#

RDDE - Retarded Delay Differential Equation#

Notes

  1. As of now, only A and hA, rest of the implementation will follow

class tdcpy.rdde.RDDE(A, hA, B=None, hB=None, C=None, hC=None, D=None, hD=None, **kwargs)#

Bases: TDSBase

Retarded Delay Differential Equaton

\[\dot{x}(t) = \sum_{k=1}^{m_A} A_k x(t - h_{A,k}) + \sum_{k=1}^{m_B} B_k u(t - h_{B,k})\]
\[y(t) = \sum_{k=1}^{m_C} C_k x(t - h_{C,k}) + \sum_{k=1}^{m_D} D_k u(t - h_{D,k})\]

where \(x(t) \in \mathbb{R}^n\) is the state vector, \(u(t) \in \mathbb{R}^p\) the input vector, and \(y(t) \in \mathbb{R}^q\) the output vector.

Parameters

hAnpt.NDArray

1D array of shape (mA,) containing system delays h_{A,k}

Bnpt.NDArray, optional

3D array of shape (n, p, mB) containing input matrices B_k, by default None

hBnpt.NDArray, optional

1D array of shape (mB,) containing input delays h_{B,k}, by default None

Cnpt.NDArray, optional

3D array of shape (q, n, mC) containing output matrices C_k, by default None

hCnpt.NDArray, optional

1D array of shape (mC,) containing output delays h_{C,k}, by default None

Dnpt.NDArray, optional

3D array of shape (q, p, mD) containing feed-through matrices D_k, by default None

hDnpt.NDArray, optional

1D array of shape (mD,) containing feed-through delays h_{D,k}, by default None

**kwargs: additional arguments
tol_singularfloat, optional

tolerance for considering matrix singular in null space computations, by default 1e-12

Returns:

RDDE object

Return type:

RDDE

Parameters:

TODO documentation

property n: int#

dimension of state variable

property n_inputs: int#

number of inputs

property n_outputs: int#

number of outputs

property E: ndarray[tuple[Any, ...], dtype[_ScalarT]]#

E matrix from TDS representation, shape (n, n)

property A: list[ndarray[tuple[Any, ...], dtype[_ScalarT]]]#

list of dynamics matrices

property hA: list[float]#

delays

property mA: int#

number of delays

property B: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

input matrices

property hB: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

input delays

property mB: int#

number of input delays

property C: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

output matrices

property hC: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

output delays

property mC: int#

number of output delays

property D: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

feed-through matrices

property hD: ndarray[tuple[Any, ...], dtype[_ScalarT]] | None#

feed-through delays

property mD: int#

number of feed-through delays

property is_compressed: bool#

Cheks if RDDE is in compressed form (no duplicates in hA)

property is_sorted: bool#

Checks if DDAe is in sorted form (ascending hA)

property is_lti: bool#

Checks if DDAE is Linear Time-invariant

property is_delay_difference_equation: bool#

RDDE can NOT be delay difference equation

sort(inplace=False)#

Sorts delays (self.hA) into ascending order

Return type:

RDDE

compress(inplace=False, rtol=1e-05, atol=1e-08)#

Removes delay duplicates, sorts delays into ascending order

Parameters:
  • inplace (bool) – wheter to modify existing DDEA or create a new one, default False

  • rtol (float) – relative tolerance for determining matrix element is zero, default 1e-5

  • atol (float) – absolute tolerance for determining matrix element is zero, default 1e-8

Returns:

compressed representation None: if inplace=True (current object is updated)

Return type:

RDDE

get_delay_difference_equation()#

RDDE has no associated delay difference equation

Return type:

None