diff options
author | Nao Pross <np@0hm.ch> | 2024-05-23 00:22:59 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-23 01:15:06 +0200 |
commit | 9c1c729b88f89d5d0672aa48e1afb87b99fe2350 (patch) | |
tree | 304f9930942948f7465f806040b8e1a68ff48389 /uav_uncertainty.m | |
parent | Improve code for DK-iteration (diff) | |
download | uav-9c1c729b88f89d5d0672aa48e1afb87b99fe2350.tar.gz uav-9c1c729b88f89d5d0672aa48e1afb87b99fe2350.zip |
Update DK-iteration and clean up
Diffstat (limited to 'uav_uncertainty.m')
-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: |