- MATLAB Function block — When you have a functional expression relating the gains
to the scheduling variables, use a MATLAB Function block. If the expression is a
smooth function, using a MATLAB function can result in smoother gain variations than
a lookup table. Also, if you use a code-generation product such as Simulink Coderto
implement the controller in hardware, a MATLAB function can result in a more
memory-efficient implementation than a lookup table.
You can use systune to tune gain schedules implement as either lookup tables or
MATLAB functions. See “Tune Gain Schedules in Simulink” on page 11-15.
Scheduled Gain in Controller
As an example, The model rct_CSTR includes a PI controller and a lead compensator in
which the controller gains are implemented as lookup tables using 1-D Lookup Table
blocks. Open that model and examine the controllers.
open_system(fullfile(matlabroot,'examples','controls_id','rct_CSTR.slx'))
Model Gain-Scheduled Control Systems in Simulink