From 5b84855ceca34d280337ab009f7e7ef676b59c1d Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Fri, 31 May 2024 14:25:54 +0200 Subject: Update weights --- uav.m | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'uav.m') diff --git a/uav.m b/uav.m index 2ee58da..7676148 100644 --- a/uav.m +++ b/uav.m @@ -157,11 +157,11 @@ if do_musyn nmeas = model.uncertain.Ny; nctrl = model.uncertain.Nu; hinfopt = hinfsynOptions('Display', 'off', 'Method', 'RIC', ... - 'AutoScale', 'on', 'RelTol', 1e-2); + 'AutoScale', 'on', 'RelTol', 1e-3); % Frequency raster resolution to fit D scales - omega_max = 2.5; - omega_min = -3.5; + omega_max = 2; + omega_min = -3; nsamples = (omega_max - omega_min) * 100; omega = logspace(omega_min, omega_max, nsamples); @@ -172,10 +172,10 @@ if do_musyn D_right = tf(eye(model.uncertain.Nv + model.uncertain.Nw + model.uncertain.Nu)); % Maximum degree of D-scales and error - d_scales_max_degree = 4; + d_scales_max_degree = 5; d_scales_max_err = 15; - d_scales_max_err_p = .1; % in percentage - d_scales_improvement_p = .5; % in percentage, avoid diminishing returns + d_scales_max_err_p = .05; % in percentage + d_scales_improvement_p = .25; % in percentage, avoid diminishing returns % Limit order of scaled plant scaled_plant_reduce_ord = 100; @@ -199,7 +199,7 @@ if do_musyn gamma_min = .8; % Maximum number of D-K iterations - niters = 4; + niters = 6; fprintf(' - Will do (max) %d iterations.\n', niters); %% Run D-K iteration @@ -208,8 +208,8 @@ if do_musyn % according to parameters given above d_scales_degrees = { 0, 0, 0, 0, 0, inf, inf; % alpha - 1, 1, 3, 3, 0, inf, inf; % omega - 0, 1, 0, 0, 0, inf, inf; % state + inf, inf, inf, inf, inf, inf, inf; % omega + 0, 0, 0, 0, 0, inf, inf; % state 0, 0, 0, 0, 0, inf, inf; % perf }; @@ -251,6 +251,7 @@ if do_musyn [P_scaled, ~] = prescale(P_scaled, omega_range); n = size(P_scaled.A, 1); + % disabled, seems to work without if false && n > scaled_plant_reduce_ord R = reducespec(P_scaled, 'balanced'); % or ncf R.Options.FreqIntervals = [omega_range{1}, omega_range{2}]; -- cgit v1.2.1