summaryrefslogtreecommitdiffstats
path: root/midterm.m
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-29 21:17:40 +0100
committerNao Pross <np@0hm.ch>2024-03-29 21:17:40 +0100
commit98e1a3bc15560a206eb31f02dd2fcacf51ff19b8 (patch)
tree31504c8630414d0a4f28e34377a43f70b8357ae8 /midterm.m
downloaduav-98e1a3bc15560a206eb31f02dd2fcacf51ff19b8.tar.gz
uav-98e1a3bc15560a206eb31f02dd2fcacf51ff19b8.zip
Add MATLAB code
Diffstat (limited to '')
-rw-r--r--midterm.m41
1 files changed, 41 insertions, 0 deletions
diff --git a/midterm.m b/midterm.m
new file mode 100644
index 0000000..8f8e5e1
--- /dev/null
+++ b/midterm.m
@@ -0,0 +1,41 @@
+% Copyright (c) 2024, Naoki Sean Pross, ETH Zürich
+
+%% ------------------------------------------------------------------------
+% Clear environment and generate parameters
+
+clear; clc; close all;
+params = uav_params();
+
+%% ------------------------------------------------------------------------
+% Create nominal plant and controller
+
+% Generate nominal model
+model = uav_model(params);
+ctrl = uav_ctrl_nominal(params, model);
+
+% Model dimensions
+nx = model.linear.Nx;
+
+% Open loop path
+L = model.linear.StateSpace * ctrl.K;
+
+% Closed loop path under unitary negative gain
+G = feedback(L, eye(nx, nx));
+
+%% ------------------------------------------------------------------------
+% Simulate nominal controller
+
+%% ------------------------------------------------------------------------
+% Define performance goals
+
+%% ------------------------------------------------------------------------
+% Create uncertain model
+
+%% ------------------------------------------------------------------------
+% Define stability goals
+
+%% ------------------------------------------------------------------------
+% Perform H-infinity design
+
+%% ------------------------------------------------------------------------
+% Perform mu-Analysis \ No newline at end of file