Create the basis functions that describe the bilinear expansion.
shapefcn = @(x,y) [x,y,x*y]; % or use polyBasis('canonical',1,2)
In the array returned by shapefcn, the basis functions are:
Create the tunable gain surface.
K = tunableSurface('K',1,domain,shapefcn);
You can use the tunable surface as the parameterization for a lookup table block or a
MATLAB Function block in a Simulink model. Or, use model interconnection commands to
incorporate it as a tunable element in a control system modeled in MATLAB. After you
tune the coefficients, you can examine the resulting gain surface using the viewSurf
command. For this example, instead of tuning, manually set the coefficients to non-zero
values and view the resulting gain.
Ktuned = setData(K,[100,28,40,10]);
viewSurf(Ktuned)
Parameterize Gain Schedules