Skip to content

Commit 349266d

Browse files
committed
Adds pretext pointer to the submitted paper and improve comments in the quadrotor robustness example
1 parent e3dbd6b commit 349266d

6 files changed

Lines changed: 131 additions & 29 deletions

File tree

quadrotor_robustness/main_quadrotor_example.m

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
% This script is used to plot the robustness of the source-seeking
2-
% algorithms to fields with increasing condition number
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to generate data and plot the results for the LTI
10+
% quadrotor example presented in Fig.4 in the above paper.
311
close all
412
clear
513
clc
@@ -13,22 +21,45 @@
1321
n_L=length(L);
1422

1523
% Optimization tolerences
16-
tolerences.cvx_tol=1e-3;
17-
tolerences.bisect_tol=1e-3;
18-
tolerences.cond_tol=1e8;
24+
tolerences.cvx_tol=1e-3; % Tolerence for definiteness in LMIs
25+
tolerences.bisect_tol=1e-3; % Tolerence in alpha for the bisect-algorithm
26+
tolerences.cond_tol=1e8; % Tolerence for bounding the cond no of positive def variables
1927

20-
% Quadrotor dynamics
28+
% Define quadrotor dynamics
2129
addpath(genpath('..\vehicles\quadrotor'))
2230
dim=2;% spatial dimension (of positions and velocities)
2331
% Current implementation only supports dim=2 for quadrotors
24-
kp=1;kd=5;
32+
kp=1;kd=5; % gains for the pre-filter
2533
G_veh=define_G_quad_wrapped(dim,kp,kd);
2634

27-
% Multiplier class
28-
% Select a multiplier class from the following choices
29-
% 1. Circle criterion
30-
% 2. Full block circle criterion
31-
% 3. Zames Falb multipliers
35+
% Run the analysis for different cases defined in the multiplier structure
36+
% with the following properties:
37+
38+
% id:
39+
% This determines the kind of multiplier used with the following choices
40+
% 1. Circle criterion
41+
% 6. Zames Falb multipliers with analysis LMIs for LTI systems
42+
% 7. Zames Falb multipliers with analysis LMIs for LPV systems
43+
44+
% rho:
45+
% This is valid only for Zames Falb multipliers and is the pole location
46+
% for the basis functions parameterizing the multiplier
47+
48+
% psi_order:
49+
% This is valid only for Zames Falb multipliers and is the order of the
50+
% multiplier that is being searched over
51+
52+
% odd_flag:
53+
% This is valid only for Zames Falb multipliers and is set to one if the
54+
% non-linearity under consideration is odd and is set to 0 otherwise
55+
56+
% causal_flag:
57+
% This is valid only for Zames Falb multipliers. It should be set to 1 if
58+
% restricting the search to causal multipliers, set to -1 is restricting
59+
% the search to anti-causal multipliers and set to 0 is searching over
60+
% general non-causal multipliers which includes causal and non-causal
61+
% parts.
62+
3263
multiplier_flag=[1,60,61,59];
3364
for i=1:4
3465
switch multiplier_flag(1,i)
@@ -75,9 +106,9 @@
75106
plot_data
76107

77108
%% Functions
109+
function [alpha_best]=sweep_L(G_veh,m,L,alpha_lims,tolerences,multiplier_class)
78110
% This functions sweeps L and finds the best covergence rate estimate by
79111
% running a bisection algorithm for each fixed L
80-
function [alpha_best]=sweep_L(G_veh,m,L,alpha_lims,tolerences,multiplier_class)
81112
n_L=size(L,2);
82113
alpha_best=zeros(1,n_L);
83114
for j=1:n_L

quadrotor_robustness/plot_data.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
%% Plot results for Example 7 20 from Scherer and Weilands LMI notes
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to plot the data generated by the
10+
% main_quadrotor_example.m to produce Fig. 4 from the above paper
211
clear
312
clc
413
%% Convergence rate estimates for different multiplier

simulate_quadrotor/plot_data.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to plot the data generated by the
10+
% simulate_dynamics.m to produce Fig. 6 from the above paper
111
%% Plot
212
clear
313
clc

simulate_quadrotor/simulate_dynamics.m

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
% This script numerically simulates the dynamics
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to generate data and plot the results for the LTI
10+
% quadrotor example presented in Fig.6 in the above paper.
11+
12+
% This script numerically simulates the dynamics of a quadrotor for optimal
13+
% gains selected using the circle criterion and zames falb multipliers
214
close all
315
clear
416
clc

sweep_kp_kd/main_kd_sweep.m

Lines changed: 44 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,62 @@
1-
% This script is used to reproduce data for Example 7_20 from Scherer and
2-
% Weiland's LMI notes. It is an exercise with an odd sector bounded
3-
% non-linearity
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to generate data and plot the results for the LTI
10+
% quadrotor example presented in Fig.5 in the above paper.
11+
412
close all
513
clear
614
clc
715
addpath('..\analysis_scripts')
816
addpath(genpath('..\vehicles\quadrotor'))
9-
%% Setup optimization
1017

18+
% Setup optimization
1119
% Sector bounds
1220
m=1; % lower bound on the sector
1321
L=10; % Upper bound on the sector
1422

1523
% Optimization tolerences
16-
tolerences.cvx_tol=1e-3;
17-
tolerences.bisect_tol=1e-3;
18-
tolerences.cond_tol=1e8;
19-
24+
tolerences.cvx_tol=1e-3; % Tolerence for definiteness in LMIs
25+
tolerences.bisect_tol=1e-3; % Tolerence in alpha for the bisect-algorithm
26+
tolerences.cond_tol=1e8; % Tolerence for bounding the cond no of positive def variables
2027

28+
% Pre-filter gains
2129
kp=1;
2230
kd=[1:0.5:14,16:2:30];
2331

32+
% Run the analysis for different cases defined in the multiplier structure
33+
% with the following properties:
34+
35+
% id:
36+
% This determines the kind of multiplier used with the following choices
37+
% 1. Circle criterion
38+
% 6. Zames Falb multipliers with analysis LMIs for LTI systems
39+
% 7. Zames Falb multipliers with analysis LMIs for LPV systems
40+
41+
% rho:
42+
% This is valid only for Zames Falb multipliers and is the pole location
43+
% for the basis functions parameterizing the multiplier
44+
45+
% psi_order:
46+
% This is valid only for Zames Falb multipliers and is the order of the
47+
% multiplier that is being searched over
48+
49+
% odd_flag:
50+
% This is valid only for Zames Falb multipliers and is set to one if the
51+
% non-linearity under consideration is odd and is set to 0 otherwise
52+
53+
% causal_flag:
54+
% This is valid only for Zames Falb multipliers. It should be set to 1 if
55+
% restricting the search to causal multipliers, set to -1 is restricting
56+
% the search to anti-causal multipliers and set to 0 is searching over
57+
% general non-causal multipliers which includes causal and non-causal
58+
% parts.
2459

25-
% Multiplier class
26-
% Select a multiplier class from the following choices
27-
% 1. Circle criterion
28-
% 2. Full block circle criterion
29-
% 3. Zames Falb multipliers
3060
multiplier_flag=[1,60,61,59];
3161
for i=1:4
3262
switch multiplier_flag(1,i)
@@ -62,9 +92,9 @@
6292
%% Plot data
6393
plot_data
6494
%% Functions
95+
function [alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,tolerences,multiplier_class)
6596
% This functions sweeps kp,kd and finds the best covergence rate estimate
6697
% by running a bisection algorithm for each fixed kp,kd
67-
function [alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,tolerences,multiplier_class)
6898
n_p=length(kp);
6999
n_d=length(kd);
70100
alpha_best=zeros(n_p,n_d);

sweep_kp_kd/plot_data.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
%---------------------------------------------------------------------------------------------------
2+
% For Paper
3+
% "Robust Performance Analysis of Source-Seeking Dynamics with Integral Quadratic Constraints"
4+
% by Adwait Datar and Herbert Werner
5+
% Copyright (c) Institute of Control Systems, Hamburg University of Technology. All rights reserved.
6+
% Licensed under the GPLv3. See LICENSE in the project root for license information.
7+
% Author(s): Adwait Datar
8+
%---------------------------------------------------------------------------------------------------
9+
% This script is used to plot the data generated by the
10+
% main_kd_sweep.m to produce Fig. 5 from the above paper
111
%% Plot results parameter sweep
212
clear
313
clc

0 commit comments

Comments
 (0)