Simulink Control Design™ - MathWorks

(Tuis.) #1

subplot(3,2,1), viewSurf(setBlockValue(P_PHI,T))
subplot(3,2,3), viewSurf(setBlockValue(P_ALPHA,T))
subplot(3,2,5), viewSurf(setBlockValue(P_BETA,T))
subplot(3,2,2), viewSurf(setBlockValue(I_PHI,T))
subplot(3,2,4), viewSurf(setBlockValue(I_ALPHA,T))
subplot(3,2,6), viewSurf(setBlockValue(I_BETA,T))


You could now use evalSurf to sample the gain surfaces and update the lookup tables in
the Simulink model. You could also use the codegen method to generate code for the
gain surface equations. For example


% Generate code for "P phi" block
MCODE = codegen(setBlockValue(P_PHI,T));


MATLAB Workflow for Tuning the HL-20 Autopilot
Free download pdf