diff options
author | Nao Pross <np@0hm.ch> | 2024-05-17 11:41:28 +0200 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2024-05-17 11:41:28 +0200 |
commit | de891f907e6d7908e75e0da8dddd04c66dfcfd7b (patch) | |
tree | fb0253494a27d16f733cdf1d325d6741cf3ed0bb /uav_performance_musyn.m | |
parent | Delete old LQR code (diff) | |
download | uav-de891f907e6d7908e75e0da8dddd04c66dfcfd7b.tar.gz uav-de891f907e6d7908e75e0da8dddd04c66dfcfd7b.zip |
Clean up comments
Diffstat (limited to 'uav_performance_musyn.m')
-rw-r--r-- | uav_performance_musyn.m | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/uav_performance_musyn.m b/uav_performance_musyn.m index 6ece761..180be8a 100644 --- a/uav_performance_musyn.m +++ b/uav_performance_musyn.m @@ -13,44 +13,27 @@ % PERF Struct performance transfer functions -function [perf] = uav_performance(params, do_plots) +function [perf] = uav_performance_musyn(params, do_plots) % Laplace variable s = tf('s'); -alpha_max = params.actuators.ServoAbsMaxAngle; -alpha_max_omega = params.actuators.ServoNominalAngularVelocity; +% TODO: set proper constraints +G = 1e2 / (s + 1e2); -T_xy = params.performance.HorizontalSettleTime; -T_z = params.performance.VerticalSettleTime; +W_Palpha = G; +W_Pomega = G; -omega_nxy = 5 / T_xy; -omega_nz = 10 / T_z; +W_Pxy = G; +W_Pz = G; -% W_Palpha = 1 / (s^2 + 2 * alpha_max_omega * s + alpha_max_omega^2); -% W_Palpha = (1 - W_Palpha / dcgain(W_Palpha)) * .8; -% W_Pomega = (1 - 1 / (T_z / 5 * s + 1)) * .1; - -W_Palpha = make_weight(alpha_max_omega, 15, 1.1, 3); -W_Pomega = make_weight(omega_nz, 50, 10); - -% zeta = 1; % Almost critically damped -% W_Pxy = 1 / (s^2 + 2 * zeta * omega_nxy * s + omega_nxy^2); -% W_Pxy = 1 * W_Pxy / dcgain(W_Pxy); -% W_Pz = 1 / (s^2 + 2 * zeta * omega_nz * s + omega_nz^2); -% W_Pz = 1 * W_Pz / dcgain(W_Pz); - -W_Pxy = make_weight(omega_nxy, 2, 5); -W_Pz = make_weight(omega_nz, 1, 10); - -% Set a speed limit -W_Pxydot = .2 * tf(1, 1); -W_Pzdot = .2 * tf(1, 1); +W_Pxydot = tf(0); +W_Pzdot = tf(0); -W_Pphitheta = .01 * tf(1, [.1, 1]); -W_Ppsi = .01 * tf(1, 1); % don't care +W_Pphitheta = tf(0); +W_Ppsi = tf(0); -W_PTheta = tf(1, [.1, 1]) * eye(3); +W_PTheta = tf(0); % Construct performance vector by combining xy and z W_PP = blkdiag(W_Pxy * eye(2), W_Pz); |