diff options
Diffstat (limited to '')
-rw-r--r-- | uav_uncertainty.m | 26 |
1 files changed, 24 insertions, 2 deletions
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), ... @@ -61,4 +63,24 @@ if do_plots 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: |