direct_data_driven_mpc.utilities.controller.controller_creation#
Functions for creating data-driven MPC controllers.
This module provides functions to create data-driven MPC controllers for both LTI and nonlinear systems using controller configurations and initial input-output measurement data.
Functions
|
Create an LTIDataDrivenMPCController instance using a specified Data-Driven MPC controller configuration and initial input-output trajectory data measured from a system. |
Create a NonlinearDataDrivenMPCController instance using a specified Data-Driven MPC controller configuration and initial input-output trajectory data measured from a system. |
- create_lti_data_driven_mpc_controller(controller_config: LTIDataDrivenMPCParams, u_d: ndarray, y_d: ndarray, use_terminal_constraints: bool = True) LTIDataDrivenMPCController [source]#
Create an LTIDataDrivenMPCController instance using a specified Data-Driven MPC controller configuration and initial input-output trajectory data measured from a system.
- Parameters:
controller_config (
LTIDataDrivenMPCParams
) – A dictionary containing configuration parameters for a Data-Driven MPC controller designed for Linear Time-Invariant (LTI) systems.u_d (
numpy.ndarray
) – An array of shape (N, m) representing a persistently exciting input sequence used to generate output data from the system. N is the trajectory length and m is the number of control inputs.y_d (
numpy.ndarray
) – An array of shape (N, p) representing the system’s output response to u_d. N is the trajectory length and p is the number of system outputs.use_terminal_constraints (
bool
) – If True, include terminal equality constraints in the Data-Driven MPC formulation. If False, the controller will not enforce these constraints. Defaults to True.
- Returns:
LTIDataDrivenMPCController – An LTIDataDrivenMPCController instance, which represents a Data-Driven MPC controller designed for Linear Time-Invariant (LTI) systems, based on the specified configuration.
- create_nonlinear_data_driven_mpc_controller(controller_config: NonlinearDataDrivenMPCParams, u: ndarray, y: ndarray) NonlinearDataDrivenMPCController [source]#
Create a NonlinearDataDrivenMPCController instance using a specified Data-Driven MPC controller configuration and initial input-output trajectory data measured from a system.
- Parameters:
controller_config (
NonlinearDataDrivenMPCParams
) – A dictionary containing configuration parameters for a Data-Driven MPC controller designed for nonlinear systems.u (
numpy.ndarray
) – An array of shape (N, m) representing a persistently exciting input sequence used to generate output data from the system. N is the trajectory length and m is the number of control inputs.y (
numpy.ndarray
) – An array of shape (N, p) representing the system’s output response to u. N is the trajectory length and p is the number of system outputs.
- Returns:
NonlinearDataDrivenMPCController – A NonlinearDataDrivenMPCController instance, which represents a Data-Driven MPC controller designed for nonlinear systems, based on the specified configuration.