From 3f0461070f93fc752bb4f83ba3287d8ddc99220e Mon Sep 17 00:00:00 2001 From: Enrico Lumetti Date: Fri, 13 Aug 2021 14:32:26 +0200 Subject: [PATCH] Use ucover to retrieve multiplicative uncertainty --- robust/mult_uncertainty.m | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/robust/mult_uncertainty.m b/robust/mult_uncertainty.m index b5e565b..f0b9faa 100644 --- a/robust/mult_uncertainty.m +++ b/robust/mult_uncertainty.m @@ -30,17 +30,18 @@ I_m_analytic = tf(fitmagfrd(data, 2)); % For MIMO systems, the division in the expression for I_m doesn't make % sense % This is another way to compute it: -opt = wcOptions('MussvOptions','m3'); % for better lower bound -[wcg, wcu, info_num] = wcgain(G-G_nom, w); -[wcg, wcu, info_den] = wcgain(G_nom, w, opt); -resp_im = info_num.Bounds(:, 2) ./ info_den.Bounds(:, 1); +% generate some instances of the uss +systems = usample(G, 20); +data = frd(systems, w); -data_2 = frd(resp_im, w); -% 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)); +% cover the frequency response data using an order 2 multiplicative +% uncertainty +% ucover returns [G, Info] where G is the uncertain system given by +% G(s) = [I+W1(s) Delta(s)] G_nom(s) +% W1(s) can be recovered from Info.W1 +[G2, Info] = ucover(data, G_nom, 2); +I_m_analytic_2 = tf(Info.W1); sigma(I_m, w); hold; semilogx(w, 20*log10(info.Bounds(:, 2)), 'green');