Functions

calculateNaturalFrequenciesAndDampingRatios

natural_frequencies, damping_ratios = calculateNaturalFrequenciesAndDampingRatios(systems)
Purpose:

Compute the natural frequencies and associated damping ratios from the system matrix A of a list of systems.

Parameters:
  • systems (list): list of systems.

Returns:
  • natural_frequencies (list): list of natural frequencies.

  • damping_ratios (list): list of damping ratios.

Imports:
  • import numpy as np

  • import scipy.linalg as LA

Description:

See Also:




correctSystemForEigenvaluesCheck

corrected_system = correctSystemForEigenvaluesCheck(system, number_steps, p)

createAugmentedSignalPolynomialBasisFunctions

augmented_signal = createAugmentedSignalPolynomialBasisFunctions(original_signal, order, post_treatment, max_order)

createAugmentedSignalWithGivenFunctions

augmented_signal = createAugmentedSignalWithGivenFunctions(original_signal, given_functions)

departureDynamicsFromInitialConditionResponse

free_decay_experiments, free_decay_experiments_deviated = departureDynamicsFromInitialConditionResponse(nominal_system, tspan, deviations_dx0)

eigenSystemRealizationAlgorithm

A, B, C, D, H0, H1, R, Sigma, St, Rn, Sigman, Snt, Op, Rq, MAC, MSV = eigenSystemRealizationAlgorithm(markov_parameters, state_dimension, **kwargs)

eigenSystemRealizationAlgorithmFromInitialConditionResponse

A, B, C, D, X0, H0, H1, R, Sigma, St, Rn, Sigman, Snt, Op, Rq, MAC, MSV = eigenSystemRealizationAlgorithmFromInitialConditionResponse(output_signals, state_dimension, **kwargs)

eigenSystemRealizationAlgorithmWithDataCorrelation

A, B, C, D, H0, H1, R, Sigma, St, Rn, Sigman, Snt, Op, Rq, MAC, MSV = eigenSystemRealizationAlgorithmWithDataCorrelation(markov_parameters, state_dimension, **kwargs)

eigenSystemRealizationAlgorithmWithDataCorrelationFromInitialConditionResponse

A, B, C, D, X0, H0, H1, R, Sigma, St, Rn, Sigman, Snt, Op, Rq, MAC, MSV = eigenSystemRealizationAlgorithmWithDataCorrelationFromInitialConditionResponse(output_signals, state_dimension, **kwargs)

generatePolynomialBasisFunctions

basis_functions = generatePolynomialBasisFunctions(index)
Purpose:

The purpose of this program is to create a list of polynomial basis functions given an index array. The index array provides the information about the power of each monomial for each basis function.

Parameters:
Returns:
  • basis_functions (list): list of basis functions.

  • inverse (bool, optional): if True, it creates the inverse polynomial basis functions.

Description:

Given the index array, the program iterates through its rows and columns to build the corresponding basis functions. For example, consider an index array such that the input vector is of dimension 2 (number of columns of index) and the resulting basis functions are all the permutation of monomials up to degree 3:

\[\begin{split}\begin{array}{|c|c|} \hline 0 & 0 \\ \hline 1 & 0 \\ \hline 2 & 0 \\ \hline 3 & 0 \\ \hline 0 & 1 \\ \hline 1 & 1 \\ \hline 2 & 1 \\ \hline 0 & 2 \\ \hline 1 & 2 \\ \hline 0 & 3 \\ \hline \end{array}\end{split}\]

The program will create a list of 10 basis functions (the number of rows of index) such that if \(\boldsymbol{x} = \begin{bmatrix} x_1 & x_2 \end{bmatrix}^T\), then

\[\boldsymbol{\Phi} = \left[1, x_1, x_1^2, x_1^3, x_2, x_1x_2, x_1^2x_2, x_2^2, x_1x_2^2, x_2^3\right].\]

Note that basis function \(\phi(\boldsymbol{x}) = 1\) is included as the first basis function with degree \(0\) in \(x_1\) and \(0\) in \(x_2\). For more information on how to automatically build the index array, see generatePolynomialIndex.

See Also:




generatePolynomialIndex

index = generatePolynomialIndex(dimension, order, **kwargs)
Purpose:

This function generates all permutations of monomials up to a certain order. It concatenates all the permutations in an array, where the number of rows is the number of resulting permutations and the number of columns is the number of monomials (or the dimension of the input vector).

Parameters:
  • dimension (int): number of monomials.

  • order (int): maximum order for a given monomial.

  • max_order (int, optional): maximum order for a given basis function.

Returns:
  • index (np.array): the index array.

Imports:
  • import numpy as np

Description:

Iterating through the dimension and the order, the program builds an array that contains all the permutations of 1-D monomials. For example, if dimension \(=2\) and order \(=3\), the program creates the array \(I_1\), resulting in 16 permutations. If max_order \(=3\) is specified (let’s say we want the possible order of monomials to be up to \(3\), but the resulting basis functions to be of degree at most \(3\)), the program deletes the rows with a resulting degree greater than \(3\). This would result in the array \(I_2\).

\[\begin{split}I_1 = \begin{array}{|c|c|} \hline 0 & 0 \\ \hline 1 & 0 \\ \hline 2 & 0 \\ \hline 3 & 0 \\ \hline 0 & 1 \\ \hline 1 & 1 \\ \hline 2 & 1 \\ \hline 3 & 1 \\ \hline 0 & 2 \\ \hline 1 & 2 \\ \hline 2 & 2 \\ \hline 3 & 2 \\ \hline 0 & 3 \\ \hline 1 & 3 \\ \hline 2 & 3 \\ \hline 3 & 3 \\ \hline \end{array}, \quad \quad I_2 = \begin{array}{|c|c|} \hline 0 & 0 \\ \hline 1 & 0 \\ \hline 2 & 0 \\ \hline 3 & 0 \\ \hline 0 & 1 \\ \hline 1 & 1 \\ \hline 2 & 1 \\ \hline 0 & 2 \\ \hline 1 & 2 \\ \hline 0 & 3 \\ \hline \end{array}.\end{split}\]

This resulting index array can be use as an argument of generatePolynomialBasisFunctions to create the resulting polynomial basis functions.

See Also:




getCovarianceMarkovParameters

covariance_markov_parameters = getCovarianceMarkovParameters(output_signal, p)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getDeltaMatrix

Delta = getDeltaMatrix(A, B, C, D, tk, dt, number_steps)

getInitialConditionResponseMarkovParameters

markov_parameters = getInitialConditionResponseMarkovParameters(A, C, number_steps)
Purpose:

This program computes a list comprised of the first \(p\) time-invariant initial condition Markov parameters.

Parameters:
  • A (fun): the system matrix.

  • C (fun): the output influence matrix.

  • number_steps (int): the number \(p\) of time-invariant initial condition Markov parameters to compute.

Returns:
  • markov_parameters (list): a list of the first \(p\) time-invariant initial condition Markov parameters.

Imports:
  • import numpy as np

Description:

The list of the first \(p\) time-invariant initial condition Markov parameters is

\[\left[C, CA, CA^2, CA^3, \cdots, CA^{p-1}\right].\]
See Also:




getMACandMSV

MAC, MSV = getMACandMSV(A_id, B_id, C_id, Rq, q)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getMarkovParameters

markov_parameters = getMarkovParameters(A, B, C, D, number_steps)
Purpose:

This program computes a list comprised of the first \(p\) time-invariant Markov parameters.

Parameters:
  • A (fun): the system matrix.

  • B (fun): the input influence matrix.

  • C (fun): the output influence matrix.

  • D (fun): the direct transmission matrix.

  • number_steps (int): the number \(p\) of time-invariant Markov parameters to compute.

Returns:
  • markov_parameters (list): a list of the first \(p\) time-invariant Markov parameters.

Imports:
  • import numpy as np

Description:

The list of the first \(p\) time-invariant initial condition Markov parameters is

\[\left[D, CB, CAB, CA^2B, \cdots, CA^{p-2}B\right].\]
See Also:




getMarkovParametersFromFrequencyResponseFunctions

DFT_u, DFT_y, Suu, Suy, Syu, Syy, Suu_averaged, Suy_averaged, Syu_averaged, Syy_averaged, transfer_function1, transfer_function2, markov_parameters1, markov_parameters2 = getMarkovParametersFromFrequencyResponseFunctions(experiments)

getMarkovParametersFromObserverControllerMarkovParameters

markov_parameters = getMarkovParametersFromObserverControllerMarkovParameters(observer_controller_markov_parameters, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getMarkovParametersFromObserverMarkovParameters

markov_parameters = getMarkovParametersFromObserverMarkovParameters(observer_markov_parameters, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getObservabilityMatrix

O = getObservabilityMatrix(A, C, number_steps, **kwargs)
Purpose:

This function calculates the observability matrix at time tk.

Parameters:
  • A (fun): the system matrix.

  • C (fun): the output influence matrix.

  • number_steps (int): the block size \(p\) of the observability matrix.

  • tk (float, optional): the starting time step. If not specified, its value is \(0\).

  • dt (float, optional): the length of the time step for which the zero-order hold approximation for the system matrices is valid. If not specified, its value is \(0\).

Returns:
  • O (ndarray): the corresponding observability matrix.

Imports:
  • import numpy as np

Description:

The algorithm builds the observability matrix \(O_k^{(p)}\) from time step tk such that

\[\begin{split}O_k^{(p)} = \begin{bmatrix} C_k \\ C_{k+1}A_k \\ C_{k+2}A_{k+1}A_k \\ \vdots \\ C_{k+p-1}A_{k+p-2}\cdots A_k \end{bmatrix}.\end{split}\]
See Also:




getObserverGainMarkovParametersFromObserverMarkovParameters

observer_gain_markov_parameters = getObserverGainMarkovParametersFromObserverMarkovParameters(observer_markov_parameters, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getObserverGainMatrix

G, O, Yo = getObserverGainMatrix(A, C, observer_gain_markov_parameters, tk, dt, order)

getObserverMarkovParameters

observer_markov_parameters = getObserverMarkovParameters(A, B, C, D, G, number_steps)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getOptimizedHankelMatrixSize

p, q = getOptimizedHankelMatrixSize(assumed_order, output_dimension, input_dimension)
Purpose:

This algorithm provides the minimum number of row blocks, \(p\), and column blocks, \(q\), of the Hankel matrix to be full rank. This is in the context of model reduction, where the matrix is filled with Markov parameters of a linear system.

Parameters:
  • assumed_order (int): the assumed rank, \(n\), of the Hankel matrix.

  • output_dimension (int): the output dimension, \(m\), of the linear system.

  • input_dimension (int): the input dimension, \(r\), of the linear system.

Returns:
  • p (int): the minimum number of row blocks, \(p\), of the Hankel matrix.

  • q (int): the minimum number of column blocks, \(q\), of the Hankel matrix.

Imports:
  • import numpy as np

Description:

The sizes \(p\) and \(q\) are calculated such that \(pm \geq n\) and \(qr \geq n\):

\[p = \left\lceil \dfrac{n}{m} \right\rceil, \quad \quad \quad q = \left\lceil\dfrac{n}{r}\right\rceil.\]
See Also:




findPreviousPowerOf2

m = findPreviousPowerOf2(n)
Purpose:

Compute the previous power of 2 of an integer \(n\).

Parameters:
  • n (int): the integer.

Returns:
  • m (int): previous power of 2 of n.

Description:

For any integer \(n\), \(\exists ! \ d \in \mathbb{N}\) such that

\[2^{d-1} \leq n < 2^d.\]

The program returns \(2^{d-1}\).

See Also:




findNextPowerOf2

m = findNextPowerOf2(n)
Purpose:

Compute the next power of 2 of an integer \(n\).

Parameters:
  • n (int): the integer.

Returns:
  • m (int): next power of 2 of n.

Description:

For any integer \(n\), \(\exists ! \ d \in \mathbb{N}\) such that

\[2^{d-1} \leq n < 2^d.\]

The program returns \(2^{d}\).

See Also:




getTimeVaryingMarkovParameters

time_varying_markov_parameters = getTimeVaryingMarkovParameters(A, B, C, D, tk, dt, **kwargs)
Purpose:

This program computes time-varying Markov parameters at time tk for a certain number of steps number_steps, if specified.

Parameters:
  • A (fun): the system matrix.

  • B (fun): the input influence matrix.

  • C (fun): the output influence matrix.

  • D (fun): the direct transmission matrix.

  • tk (float): the time step at which the time-varying Markov parameters are computed.

  • dt (float): the length of the time step for which the zero-order hold approximation for the system matrices is valid.

  • number_steps (int, optional): the number \(p\) of time-varying Markov parameters to compute. If not specified, it will calculate the maximum amount of time-varying Markov parameters possible.

Returns:
  • time_varying_markov_parameters (list): a list of the calculated time-varying Markov parameters.

Imports:
  • import numpy as np

Description:

The list of the time-varying Markov parameters at time tk is

\[\left[D_k, C_kB_{k-1}, C_kA_{k-1}B_{k-2}, C_kA_{k-1}A_{k-2}B_{k-3}, \cdots, C_kA_{k-1}\cdots A_1B_0\right].\]

If the number \(p\) of time-varying Markov parameters to compute, number_steps, is specified, the list is truncated to reflect only the first \(p\) time-varying Markov parameters.

See Also:




getTimeVaryingMarkovParameters_matrix

time_varying_markov_parameters_matrix = getTimeVaryingMarkovParameters_matrix(A, B, C, D, k, **kwargs)
Purpose:

This program computes time-varying Markov parameters at time tk for a certain number of steps number_steps, if specified. The output of this program is identical to getTimeVaryingMarkovParameters with the only difference that the input matrices are given as ndarray instead of fun.

Parameters:
  • A (ndarray): the system matrix.

  • B (ndarray): the input influence matrix.

  • C (ndarray): the output influence matrix.

  • D (ndarray): the direct transmission matrix.

  • k (float): the time step at which the time-varying Markov parameters are computed.

  • number_steps (int, optional): the number \(p\) of time-varying Markov parameters to compute. If not specified, it will calculate the maximum amount of time-varying Markov parameters possible.

Returns:
  • time_varying_markov_parameters (list): a list of the calculated time-varying Markov parameters.

Imports:
  • import numpy as np

Description:

The list of the time-varying Markov parameters at time k is

\[\left[D_k, C_kB_{k-1}, C_kA_{k-1}B_{k-2}, C_kA_{k-1}A_{k-2}B_{k-3}, \cdots, C_kA_{k-1}\cdots A_1B_0\right].\]

If the number \(p\) of time-varying Markov parameters to compute, number_steps, is specified, the list is truncated to reflect only the first \(p\) time-varying Markov parameters.

See Also:




getTimeVaryingObserverGainMatrix

G = getTimeVaryingObserverGainMatrix(A, C, hkio, order, dt)

getTVMarkovParametersFromTVObserverMarkovParameters

hki, h2, r = getTVMarkovParametersFromTVObserverMarkovParameters(D, hki_observer1, hki_observer2, observer_order)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




getTVObserverGainMarkovParametersFromTVObserverMarkovParameters

hkio = getTVObserverGainMarkovParametersFromTVObserverMarkovParameters(hki_observer2, observer_order)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




higherOrderStateTransitionTensorsPropagation

A_vec = higherOrderStateTransitionTensorsPropagation(sensitivities, F, u, x0, tspan)
Purpose:

This program computes the time evolution of the state-transition matrix and higher-order state-transition tensors of a dynamical system, given its sensitivities and a nominal trajectory.

Parameters:
  • sensitivities (list): sensitivities of the considered dynamical system.

Returns:
  • A_vec (ndarray):

  • state_transition_tensors (list):

Imports:
  • import numpy as np

  • from scipy.integrate import odeint

Description:

See Also:




identificationInitialCondition

x0 = identificationInitialCondition(input_signal, output_signal, A, B, C, D, tk, number_steps)

integrate

output = integrate(dynamics, x0, tspan, integration_step, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




observerControllerKalmanIdentificationAlgorithmWithObserver

observer_controller_markov_parameters, y, U = observerControllerKalmanIdentificationAlgorithmWithObserver(input_signal, feedback_signal, output_signal, **kwargs)
Purpose:

Compute the coefficients \(\tilde{h}_i\), called observer/controller Markov parameters, of the weighting sequence description with observer \(\boldsymbol{v}_k^f = \bar{C}\bar{A}^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^k\tilde{h}_i\boldsymbol{v}_{k-i}\).

Parameters:
  • input_signal (DiscreteSignal): the input signals.

  • feedback_signal (DiscreteSignal): the feedback signals.

  • output_signal (DiscreteSignal): the output signals.

  • observer_order (int, optional): number \(d\) of observer/controller Markov parameters to consider as non-zero in the weighting sequence description. If not specified, observer_order = output_signal.number_steps.

  • stable_order (int, optional): the order \(d'\) such that \(\bar{C}\bar{A}^{d'}\boldsymbol{x}_0 \simeq 0\). If not specified, stable_order = 0.

Returns:
  • observer_controller_markov_parameters (list): list of observer/controller Markov parameters

Imports:
  • import numpy as np

Description:

The weighting sequence description (I/O relationship of a linear system) with observer and full state feedback controller is

\[\boldsymbol{v}_k^f = \bar{C}\bar{A}^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^k\tilde{h}_i\boldsymbol{v}_{k-i}.\]

For zero initial condition, \(\boldsymbol{x}_0 = 0\), the observer/controller Markov parameters :math:` ilde{h}_i` appear linearly and it is possible to write in a matrix form

\[\boldsymbol{v}^f = \boldsymbol{Y}\boldsymbol{U} \Leftrightarrow \boldsymbol{Y} = \boldsymbol{v}\boldsymbol{U}^\dagger,\]

given \(\boldsymbol{U}\) full rank, with

\begin{align} \boldsymbol{v}^f & = \begin{bmatrix} \boldsymbol{y}_0 & \boldsymbol{y}_1 & \boldsymbol{y}_2 & \cdots & \boldsymbol{y}_{l-1} \\ \boldsymbol{u}_0^f & \boldsymbol{u}_1^f & \boldsymbol{u}_2^f & \cdots & \boldsymbol{u}_{l-1}^f \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} \bar{D} & \bar{C}\bar{B} & \bar{C}\bar{A}\bar{B} & \cdots & \bar{C}\bar{A}^{l-2}\bar{B} \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_0 & \boldsymbol{u}_1 & \boldsymbol{u}_2 & \cdots & \boldsymbol{u}_{l-1}\\ & \boldsymbol{v}_0 & \boldsymbol{v}_1 & \cdots & \boldsymbol{v}_{l-2}\\ & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{l-3}\\ & & & \ddots & \vdots\\ & & & & \boldsymbol{v}_0 \end{bmatrix}. \end{align}

If observer_order (\(d\)) and/or stable_order (\(d'\)) are specified, matrices \(\boldsymbol{y}\), \(\boldsymbol{Y}\) and \(\boldsymbol{U}\) become

\begin{align} \boldsymbol{y} & = \begin{bmatrix} \boldsymbol{y}_{d'} & \boldsymbol{y}_{d'+1} & \boldsymbol{y}_{d'+2} & \cdots & \boldsymbol{y}_{l-1} \\ \boldsymbol{u}_{d'}^f & \boldsymbol{u}_{d' + 1}^f & \boldsymbol{u}_{d' + 2}^f & \cdots & \boldsymbol{u}_{l-1}^f \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} \bar{D} & C\bar{B} & \bar{C}\bar{A}\bar{B} & \cdots & \bar{C}\bar{A}^{d-1}\bar{B} \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_{d'} & \boldsymbol{u}_{d'+1} & \boldsymbol{u}_{d'+2} & \cdots & \boldsymbol{u}_{d-1} & \cdots & \boldsymbol{u}_{l-1} \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ \boldsymbol{u}_{0} & \boldsymbol{v}_{1} & \boldsymbol{v}_{2} & \cdots & \boldsymbol{v}_{d-d'-1} & \cdots & \boldsymbol{v}_{l-d'-1}\\ & \boldsymbol{v}_0 & \boldsymbol{v}_1 & \cdots & \boldsymbol{v}_{d-d'-2} & \cdots & \boldsymbol{v}_{l-d'-2}\\ & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{d-d'-3} & \cdots & \boldsymbol{v}_{l-d'-3}\\ & & & \ddots & \vdots & \vdots & \vdots \\ & & & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{l-d} \end{bmatrix}. \end{align}

Notice that if \(d = l\) and \(d' = 0\), this formulation is identical to the one above.

See Also:




observerKalmanIdentificationAlgorithm

markov_parameters = observerKalmanIdentificationAlgorithm(input_signal, output_signal, **kwargs)
Purpose:

Compute the coefficients \(h_i\), called system Markov parameters, of the weighting sequence description \(\boldsymbol{y}_k = CA^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^kh_i\boldsymbol{u}_{k-i}\).

Parameters:
  • input_signals (DiscreteSignal): the input signals.

  • output_signals (DiscreteSignal): the output signals.

  • number_of_parameters (int, optional): number \(d\) of system Markov parameters to consider as non-zero in the weighting sequence description. If not specified, number_of_parameters = output_signal.number_steps.

  • stable_order (int, optional): the order \(d'\) such that \(CA^{d'}\boldsymbol{x}_0 \simeq 0\). If not specified, stable_order = 0.

Returns:
  • markov_parameters (list): list of system Markov parameters

Imports:
  • import numpy as np

Description:

The weighting sequence description (I/O relationship of a linear system) is

\[\boldsymbol{y}_k = CA^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^kh_i\boldsymbol{u}_{k-i}.\]

For zero initial condition, \(\boldsymbol{x}_0 = 0\), the system Markov parameters \(h_i\) appear linearly and it is possible to write in a matrix form

\[\boldsymbol{y} = \boldsymbol{Y}\boldsymbol{U} \Leftrightarrow \boldsymbol{Y} = \boldsymbol{y}\boldsymbol{U}^\dagger,\]

given \(\boldsymbol{U}\) full rank, with

\begin{align} \boldsymbol{y} & = \begin{bmatrix} \boldsymbol{y}_0 & \boldsymbol{y}_1 & \boldsymbol{y}_2 & \cdots & \boldsymbol{y}_{l-1} \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} D & CB & CAB & \cdots & CA^{l-2}B \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_0 & \boldsymbol{u}_1 & \boldsymbol{u}_2 & \cdots & \boldsymbol{u}_{l-1}\\ & \boldsymbol{u}_0 & \boldsymbol{u}_1 & \cdots & \boldsymbol{u}_{l-2}\\ & & \boldsymbol{u}_0 & \cdots & \boldsymbol{u}_{l-3}\\ & & & \ddots & \vdots\\ & & & & \boldsymbol{u}_0 \end{bmatrix}. \end{align}

If number_of_parameters (\(d\)) and/or stable_order (\(d'\)) are specified, matrices \(\boldsymbol{y}\), \(\boldsymbol{Y}\) and \(\boldsymbol{U}\) become

\begin{align} \boldsymbol{y} & = \begin{bmatrix} \boldsymbol{y}_{d'} & \boldsymbol{y}_{d'+1} & \boldsymbol{y}_{d'+2} & \cdots & \boldsymbol{y}_{l-1} \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} D & CB & CAB & \cdots & CA^{d-2}B \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_{d'} & \boldsymbol{u}_{d'+1} & \boldsymbol{u}_{d'+2} & \cdots & \boldsymbol{u}_{d-1} & \cdots & \boldsymbol{u}_{l-1} \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ \boldsymbol{u}_{0} & \boldsymbol{u}_{1} & \boldsymbol{u}_{2} & \cdots & \boldsymbol{u}_{d-d'-1} & \cdots & \boldsymbol{u}_{l-d'-1}\\ & \boldsymbol{u}_0 & \boldsymbol{u}_1 & \cdots & \boldsymbol{u}_{d-d'-2} & \cdots & \boldsymbol{u}_{l-d'-2}\\ & & \boldsymbol{u}_0 & \cdots & \boldsymbol{u}_{d-d'-3} & \cdots & \boldsymbol{u}_{l-d'-3}\\ & & & \ddots & \vdots & \vdots & \vdots \\ & & & & \boldsymbol{u}_0 & \cdots & \boldsymbol{u}_{l-d} \end{bmatrix}. \end{align}

Notice that if \(d = l\) and \(d' = 0\), this formulation is identical to the one above.

See Also:




observerKalmanIdentificationAlgorithmWithObserver

observer_markov_parameters = observerKalmanIdentificationAlgorithmWithObserver(input_signal, output_signal, **kwargs)
Purpose:

Compute the coefficients \(\bar{h}_i\), called observer Markov parameters, of the weighting sequence description with observer \(\boldsymbol{y}_k = C\bar{A}^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^k\bar{h}_i\boldsymbol{v}_{k-i}\).

Parameters:
  • input_signals (DiscreteSignal): the input signals.

  • output_signals (DiscreteSignal): the output signals.

  • observer_order (int, optional): number \(d\) of observer Markov parameters to consider as non-zero in the weighting sequence description. If not specified, observer_order = output_signal.number_steps.

  • stable_order (int, optional): the order \(d'\) such that \(C\bar{A}^{d'}\boldsymbol{x}_0 \simeq 0\). If not specified, stable_order = 0.

Returns:
  • observer_markov_parameters (list): list of observer Markov parameters

Imports:
  • import numpy as np

Description:

The weighting sequence description (I/O relationship of a linear system) with observer is

\[\boldsymbol{y}_k = C\bar{A}^k\boldsymbol{x}_0 + \displaystyle\sum_{i=0}^k\bar{h}_i\boldsymbol{v}_{k-i}.\]

For zero initial condition, \(\boldsymbol{x}_0 = 0\), the observer Markov parameters \(\bar{h}_i\) appear linearly and it is possible to write in a matrix form

\[\boldsymbol{y} = \boldsymbol{Y}\boldsymbol{U} \Leftrightarrow \boldsymbol{Y} = \boldsymbol{y}\boldsymbol{U}^\dagger,\]

given \(\boldsymbol{U}\) full rank, with

\begin{align} \boldsymbol{y} & = \begin{bmatrix} \boldsymbol{y}_0 & \boldsymbol{y}_1 & \boldsymbol{y}_2 & \cdots & \boldsymbol{y}_{l-1} \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} D & C\bar{B} & C\bar{A}\bar{B} & \cdots & C\bar{A}^{l-2}\bar{B} \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_0 & \boldsymbol{u}_1 & \boldsymbol{u}_2 & \cdots & \boldsymbol{u}_{l-1}\\ & \boldsymbol{v}_0 & \boldsymbol{v}_1 & \cdots & \boldsymbol{v}_{l-2}\\ & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{l-3}\\ & & & \ddots & \vdots\\ & & & & \boldsymbol{v}_0 \end{bmatrix}. \end{align}

If observer_order (\(d\)) and/or stable_order (\(d'\)) are specified, matrices \(\boldsymbol{y}\), \(\boldsymbol{Y}\) and \(\boldsymbol{U}\) become

\begin{align} \boldsymbol{y} & = \begin{bmatrix} \boldsymbol{y}_{d'} & \boldsymbol{y}_{d'+1} & \boldsymbol{y}_{d'+2} & \cdots & \boldsymbol{y}_{l-1} \end{bmatrix}, \\ \boldsymbol{Y} & = \begin{bmatrix} D & C\bar{B} & C\bar{A}\bar{B} & \cdots & C\bar{A}^{d-1}\bar{B} \end{bmatrix}, \\ \boldsymbol{U} & = \begin{bmatrix} \boldsymbol{u}_{d'} & \boldsymbol{u}_{d'+1} & \boldsymbol{u}_{d'+2} & \cdots & \boldsymbol{u}_{d-1} & \cdots & \boldsymbol{u}_{l-1} \\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ \boldsymbol{u}_{0} & \boldsymbol{v}_{1} & \boldsymbol{v}_{2} & \cdots & \boldsymbol{v}_{d-d'-1} & \cdots & \boldsymbol{v}_{l-d'-1}\\ & \boldsymbol{v}_0 & \boldsymbol{v}_1 & \cdots & \boldsymbol{v}_{d-d'-2} & \cdots & \boldsymbol{v}_{l-d'-2}\\ & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{d-d'-3} & \cdots & \boldsymbol{v}_{l-d'-3}\\ & & & \ddots & \vdots & \vdots & \vdots \\ & & & & \boldsymbol{v}_0 & \cdots & \boldsymbol{v}_{l-d} \end{bmatrix}. \end{align}

Notice that if \(d = l\) and \(d' = 0\), this formulation is identical to the one above.

See Also:




prediction

selected_for_propagation, output_signal_predicted = prediction(nominal_reference, system_reference, nominal, system, input_signal, starting_step, **kwargs)

propagation

y, x = propagation(signal, system, **kwargs)

qMarkovCover

A_id, B_id, C_id, D_id = qMarkovCover(markov_parameters, covariance_parameters, Q, state_dimension, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




timeVaryingEigenSystemRealizationAlgorithm

A, B, C, D, Ok, Ok1, sigma, A_id, B_id, C_id, D_id = timeVaryingEigenSystemRealizationAlgorithm(free_decay_experiments, hki, D, state_dimension, p, q, **kwargs)

Purpose:

Parameters:
Returns:
Imports:

Description:

See Also:




timeVaryingEigenSystemRealizationAlgorithmFromInitialConditionResponse

A, B, C, D, Ok, Ok1, Sigma, X0, A_id, B_id, C_id, D_id, MAC, MSV = timeVaryingEigenSystemRealizationAlgorithmFromInitialConditionResponse(free_decay_experiments, state_dimension, p, **kwargs)

timeVaryingEigenSystemRealizationAlgorithmWithDataCorrelation

A, B, C, D, x0, xq, Ok, Ok1, sigma, Hpnt, Rkt, Hkxzt, Hkxz, Rk = timeVaryingEigenSystemRealizationAlgorithmWithDataCorrelation(free_decay_experiments, hki, D, full_experiment, state_dimension, **kwargs)

timeVaryingEigenSystemRealizationAlgorithmWithDataCorrelationFromInitialConditionResponse

A, B, C, D, x0, Ok, Ok1, sigma, Hpnt, Hkxzt, Rkt = timeVaryingEigenSystemRealizationAlgorithmWithDataCorrelationFromInitialConditionResponse(free_decay_experiments, full_experiment, state_dimension, **kwargs)

timeVaryingObserverKalmanIdentificationAlgorithmWithObserver

D, hki, hkio = timeVaryingObserverKalmanIdentificationAlgorithmWithObserver(forced_experiments, **kwargs)

weightingSequenceDescription

output_signal = weightingSequenceDescription(input_signal, markov_parameters, **kwargs)