1212m= 1 ; % lower bound on the sector
1313L= 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
2121kp= 1 ;
2222kd= [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
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 );
6261end
6362%% Plot data
6463plot_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 );
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
8382end
0 commit comments