|
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 | + |
4 | 12 | close all |
5 | 13 | clear |
6 | 14 | clc |
7 | 15 | addpath('..\analysis_scripts') |
8 | 16 | addpath(genpath('..\vehicles\quadrotor')) |
9 | | -%% Setup optimization |
10 | 17 |
|
| 18 | +% Setup optimization |
11 | 19 | % Sector bounds |
12 | 20 | m=1; % lower bound on the sector |
13 | 21 | L=10; % Upper bound on the sector |
14 | 22 |
|
15 | 23 | % 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 |
20 | 27 |
|
| 28 | +% Pre-filter gains |
21 | 29 | kp=1; |
22 | 30 | kd=[1:0.5:14,16:2:30]; |
23 | 31 |
|
| 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. |
24 | 59 |
|
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 |
30 | 60 | multiplier_flag=[1,60,61,59]; |
31 | 61 | for i=1:4 |
32 | 62 | switch multiplier_flag(1,i) |
|
62 | 92 | %% Plot data |
63 | 93 | plot_data |
64 | 94 | %% Functions |
| 95 | +function [alpha_best]=sweep_kp_kd(m,L,kp,kd,alpha_lims,tolerences,multiplier_class) |
65 | 96 | % This functions sweeps kp,kd and finds the best covergence rate estimate |
66 | 97 | % 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) |
68 | 98 | n_p=length(kp); |
69 | 99 | n_d=length(kd); |
70 | 100 | alpha_best=zeros(n_p,n_d); |
|
0 commit comments