From d1efcb3dc31a1332333198ec81b44dc4566e9207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1vel=20A=2E=20Campos-Pe=C3=B1a?= Date: Wed, 24 Sep 2025 22:09:58 -0500 Subject: [PATCH 1/3] Simplify test LTI model --- tests/config/models/test_lti_model.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/config/models/test_lti_model.yaml b/tests/config/models/test_lti_model.yaml index cfa88b2..b0a90b8 100644 --- a/tests/config/models/test_lti_model.yaml +++ b/tests/config/models/test_lti_model.yaml @@ -1,18 +1,14 @@ --- test_lti_model: A: - - [0.921, 0, 0.041, 0] - - [0, 0.918, 0, 0.033] - - [0, 0, 0.924, 0] - - [0, 0, 0, 0.937] + - [0.9, 0] + - [0, 0.85] B: - - [0.017, 0.001] - - [0.001, 0.023] - - [0, 0.061] - - [0.072, 0] + - [0.1, 0] + - [0, 0.1] C: - - [1, 0, 0, 0] - - [0, 1, 0, 0] + - [1, 0] + - [0, 1] D: - [0, 0] - [0, 0] From 03171b9a4210c06e0012211286aba38135194f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1vel=20A=2E=20Campos-Pe=C3=B1a?= Date: Wed, 24 Sep 2025 22:21:05 -0500 Subject: [PATCH 2/3] Update test LTI controller params for new test model --- .../config/controllers/test_lti_dd_mpc_params.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/config/controllers/test_lti_dd_mpc_params.yaml b/tests/config/controllers/test_lti_dd_mpc_params.yaml index b632908..2c685ac 100644 --- a/tests/config/controllers/test_lti_dd_mpc_params.yaml +++ b/tests/config/controllers/test_lti_dd_mpc_params.yaml @@ -1,10 +1,10 @@ --- test_lti_dd_mpc_params: - n: 4 - N: 400 - L: 30 - Q_weights: 3 - R_weights: 1.0e-4 + n: 1 + N: 12 + L: 2 + Q_weights: 1 + R_weights: 1 epsilon_bar: 0.002 lambda_sigma: 1000 lambda_alpha_epsilon_bar: 0.1 @@ -16,6 +16,6 @@ test_lti_dd_mpc_params: - [-1, 1] slack_var_constraint_type: 0 controller_type: 1 - u_s: [1, 1] - y_s: [0.65, 0.77] + u_s: [1, 1.5] + y_s: [1, 1] n_n_mpc_step: true From 716d64c1e8d63a1dc7d9d71955718d3097a3a990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1vel=20A=2E=20Campos-Pe=C3=B1a?= Date: Wed, 24 Sep 2025 22:21:38 -0500 Subject: [PATCH 3/3] Reduce sim steps in LTI integration test to speed up tests --- tests/test_lti_dd_mpc_integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_lti_dd_mpc_integration.py b/tests/test_lti_dd_mpc_integration.py index 5c424a2..48beb63 100644 --- a/tests/test_lti_dd_mpc_integration.py +++ b/tests/test_lti_dd_mpc_integration.py @@ -72,7 +72,7 @@ def test_lti_dd_mpc_integration( """ # Define test parameters np_random = np.random.default_rng(0) - n_steps = 50 + n_steps = 30 verbose = 0 # Define system model @@ -163,7 +163,7 @@ def test_lti_dd_mpc_integration( np.testing.assert_equal(dd_mpc_controller.y_s, new_y_s) # Simulate data-driven MPC control system for the new setpoint - n_steps_setpoint_change = 30 + n_steps_setpoint_change = 25 u_change, y_change = simulate_lti_data_driven_mpc_control_loop( system_model=system_model, data_driven_mpc_controller=dd_mpc_controller,