Skip to content

Commit a031844

Browse files
committed
Adds final reproducible results for kp kd sweeps
1 parent d70439f commit a031844

9 files changed

Lines changed: 7 additions & 8 deletions
991 Bytes
Binary file not shown.
1.03 KB
Binary file not shown.
1.06 KB
Binary file not shown.
1.07 KB
Binary file not shown.
-50 Bytes
Binary file not shown.
-50 Bytes
Binary file not shown.
-50 Bytes
Binary file not shown.
-50 Bytes
Binary file not shown.

sweep_kp_kd/main_kd_sweep.m

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
m=1; % lower bound on the sector
1313
L=10; % Upper bound on the sector
1414

15-
% Optimization properties
16-
cvx_tol=1e-3;
17-
bisect_tol=1e-3;
18-
cond_tol=100000000;
15+
% Optimization tolerences
16+
tolerences.cvx_tol=1e-3;
17+
tolerences.bisect_tol=1e-3;
18+
tolerences.cond_tol=1e8;
1919

2020

2121
kp=1;
2222
kd=[1:0.5:14,16:2:30];
2323

2424

25-
2625
% Multiplier class
2726
% Select a multiplier class from the following choices
2827
% 1. Circle criterion
@@ -57,15 +56,15 @@
5756
save_path=['.\data\mult_flag_anti_causal_',num2str(multiplier_flag(1,i))];
5857
end
5958
alpha_lims=[0,10]; % Initial range for the bisection algorithm
60-
[alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,cond_tol,cvx_tol,bisect_tol,multiplier_class);
59+
[alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,tolerences,multiplier_class);
6160
save(save_path);
6261
end
6362
%% Plot data
6463
plot_data
6564
%% Functions
6665
% This functions sweeps kp,kd and finds the best covergence rate estimate
6766
% by running a bisection algorithm for each fixed kp,kd
68-
function [alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,cond_tol,cvx_tol,bisect_tol,multiplier_class)
67+
function [alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,tolerences,multiplier_class)
6968
n_p=length(kp);
7069
n_d=length(kd);
7170
alpha_best=zeros(n_p,n_d);
@@ -77,7 +76,7 @@
7776
% Current implementation only supports dim=2 for quadrotors
7877
dim=2;% spatial dimension (of positions and velocities)
7978
G_veh=define_G_quad_wrapped(dim,kp_curr,kd_curr);
80-
[alpha_best(i,j),~]=bisection_exponent(G_veh,m,L,alpha_lims,cond_tol,cvx_tol,bisect_tol,multiplier_class);
79+
[alpha_best(i,j),~]=bisection_exponent(G_veh,m,L,alpha_lims,tolerences,multiplier_class);
8180
end
8281
end
8382
end

0 commit comments

Comments
 (0)