NFourSIDTrajectoryManager#

class do_dpc.dpc.mpc_nfour_sid.NFourSIDTrajectoryManager(training_data, n_block_rows)[source]#

Bases: object

Manages trajectory data for N4SID subspace identification.

n_block_rows#

Number of block rows for Hankel matrices.

Type:

int

m#

Number of inputs.

Type:

int

p#

Number of outputs.

Type:

int

y#

Output data.

Type:

np.ndarray

u#

Input data.

Type:

np.ndarray

u_hankel#

Hankel matrix of input data.

Type:

np.ndarray

y_hankel#

Hankel matrix of output data.

Type:

np.ndarray

Methods#

get_future_y_u#

do_dpc.dpc.mpc_nfour_sid.NFourSIDTrajectoryManager.get_future_y_u(self)#

Extracts the future part of the trajectory data after a certain number of block rows.

Returns:

A tuple containing the future outputs and future inputs.
  • future_outputs (np.ndarray): The future outputs after the specified block rows.

  • future_inputs (np.ndarray): The future inputs after the specified block rows.

Return type:

tuple

get_uy_future_past_hankel#

do_dpc.dpc.mpc_nfour_sid.NFourSIDTrajectoryManager.get_uy_future_past_hankel(self)#

Constructs the future-past Hankel matrix for subspace identification.

Returns:

Future-past Hankel matrix.

Return type:

np.ndarray

get_uy_hankel#

do_dpc.dpc.mpc_nfour_sid.NFourSIDTrajectoryManager.get_uy_hankel(self)#

Combines the input and output Hankel matrices.

Returns:

Combined Hankel matrix.

Return type:

np.ndarray

get_y_rows_u_rows#

do_dpc.dpc.mpc_nfour_sid.NFourSIDTrajectoryManager.get_y_rows_u_rows(self)#

Gets the number of rows for outputs and inputs in the Hankel matrix.

Returns:

Number of rows for outputs and inputs.

Return type:

tuple