Skip to content

Commit 01a9dca

Browse files
Fix bug with MIMO spectral factorization constraints.
1 parent 399a64d commit 01a9dca

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

examples/7_uncertainty_characterization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def example_uncertainty_characterization():
4040

4141
# Fit overbounding stable and minimum-phase uncertainty weight system
4242
weight_left = dkpy.fit_uncertainty_weight(
43-
response_weight_left, omega, [8, 8], "diagonal"
43+
response_weight_left, omega, [4, 5], "diagonal"
4444
)
4545
weight_right = dkpy.fit_uncertainty_weight(
46-
response_weight_right, omega, [8, 8], "diagonal"
46+
response_weight_right, omega, [3, 5], "diagonal"
4747
)
4848

4949
# Plot: Magnitude response of nominal and off-nominal systems

src/dkpy/uncertainty_characterization.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,6 @@ def _fit_uncertainty_weight_diagonal(
989989
return uncertainty_weight
990990

991991

992-
# TODO: Fit spectral factorization constraint generation
993992
def _fit_uncertainty_weight_full(
994993
complex_uncertainty_weight: np.ndarray,
995994
omega: np.ndarray,
@@ -999,7 +998,7 @@ def _fit_uncertainty_weight_full(
999998
tol_bisection: float = 1e-3,
1000999
max_iter_bisection: int = 500,
10011000
max_iter_bisection_init: int = 15,
1002-
omega_power_constraint: Optional[np.ndarray] = None,
1001+
nbr_power_constraint: int = 500,
10031002
):
10041003
# Compute uncertainty weight power spectrum
10051004
power_uncertainty_weight = np.matmul(
@@ -1019,7 +1018,7 @@ def _fit_uncertainty_weight_full(
10191018
tol_bisection=tol_bisection,
10201019
max_iter_bisection=max_iter_bisection,
10211020
max_iter_bisection_init=max_iter_bisection_init,
1022-
omega_power_constraint=omega_power_constraint,
1021+
nbr_power_constraint=nbr_power_constraint,
10231022
)
10241023

10251024
return uncertainty_weight

0 commit comments

Comments
 (0)