Simulink Control Design™ - MathWorks

(Tuis.) #1

For illustration sake, we use a MATLAB Function block to implement the proportional
gain schedule, and a Matrix Interpolation block to implement the integral gain schedule.
The Matrix Interpolation block lives in the "Simulink Extras" library and is a lookup table
where each table entry is a matrix.


To tune the P and I gain schedules, mark the corresponding blocks as tunable in the
slTuner interface.


TunedBlocks = {'MIMO/P' , 'MIMO/I'};
ST0.addBlock(TunedBlocks)


Parameterize each tuned gain schedule as a polynomial surface in alpha and beta. Again
we use a quadratic surface for the proportional gain and a multilinear surface for the
integral gain.


% Grid of (alpha,beta) design points
alpha_vec = -10:5:25; % Alpha Range
beta_vec = -10:5:10; % Beta Range
[alpha,beta] = ndgrid(alpha_vec,beta_vec);
SG = struct('alpha',alpha,'beta',beta);


% Proportional gain matrix
alphabetaBasis = polyBasis('canonical',2,2);
P0 = diag([0.05 0.05 -0.05]); % initial (constant) value
PS = tunableSurface('P', P0, SG, alphabetaBasis);
ST0.setBlockParam('P',PS);


% Integral gain matrix
alphaBasis = @(alpha) alpha;
betaBasis = @(beta) abs(beta);
alphabetaBasis = ndBasis(alphaBasis,betaBasis);
I0 = diag([0.05 0.05 -0.05]);
IS = tunableSurface('I', I0, SG, alphabetaBasis);
ST0.setBlockParam('I',IS);


Finally, use systune to tune the 6 gain surfaces against the three tuning goals.


ST = systune(ST0,[R1 R2 R3]);


Final: Soft = 1.13, Hard = -Inf, Iterations = 125


Attitude Control in the HL-20 Autopilot - MIMO Design
Free download pdf