From 9c1c729b88f89d5d0672aa48e1afb87b99fe2350 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 23 May 2024 00:22:59 +0200 Subject: Update DK-iteration and clean up --- uav_uncertainty.m | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'uav_uncertainty.m') diff --git a/uav_uncertainty.m b/uav_uncertainty.m index aff30ca..b664cee 100644 --- a/uav_uncertainty.m +++ b/uav_uncertainty.m @@ -37,9 +37,11 @@ eps_alpha = max(eps_l + eps_S + 2 * eps_omega, eps_S + eps_d + eps_omega); % W_momega = eps_omega * 10 / (s + 10); % W_mState = .01 * 10 / (s + 10); -W_malpha = eps_alpha * tf(1); +b = 1e3; + +W_malpha = make_weight(b, 1 / eps_alpha, 1e-2); W_momega = tf(0); -W_mState = .01 * tf(1); +W_mState = 1 - 1 / (s / 50 + 1); uncert = struct(... 'FlapAngle', W_malpha * eye(4), ... @@ -60,5 +62,25 @@ if do_plots 'interpreter', 'latex') end +end + +% Make a n-order performance weight function +% +% Arguments: +% OMEGA Cutting frequency (-3dB) +% A Magnitude at DC, i.e. |Wp(0)| +% M Magnitude at infinity, i.e. |Wp(inf)| +% ORD Order +function [Wp] = make_weight(omega, A, M, ord) + +if nargin > 3 + n = ord; +else + n = 1; +end + +s = tf('s'); +Wp = (s / (M^(1/n)) + omega)^n / (s + omega * A^(1/n))^n; + end % vim: ts=2 sw=2 et: -- cgit v1.2.1