From bc6fc0d63c01fb3ea5b87c659857a140d031e147 Mon Sep 17 00:00:00 2001 From: Enrico Lumetti Date: Fri, 13 Aug 2021 13:59:18 +0200 Subject: [PATCH] Add lower bound constraint --- robust/mult_uncertainty.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/robust/mult_uncertainty.m b/robust/mult_uncertainty.m index 4494af3..b5e565b 100644 --- a/robust/mult_uncertainty.m +++ b/robust/mult_uncertainty.m @@ -37,7 +37,10 @@ opt = wcOptions('MussvOptions','m3'); % for better lower bound resp_im = info_num.Bounds(:, 2) ./ info_den.Bounds(:, 1); data_2 = frd(resp_im, w); -I_m_analytic_2 = tf(fitmagfrd(data_2, 2)); +% constrain the uncertainty to stay above the magnitude data +Constraint.LowerBound = data_2; +Constraint.UpperBound = []; +I_m_analytic_2 = tf(fitmagfrd(data_2, 2, [], [], Constraint)); sigma(I_m, w); hold; semilogx(w, 20*log10(info.Bounds(:, 2)), 'green');