Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Polynomial basis functions for tunable gain surface

You use basis function expansions to parameterize gain
surfaces for tuning gain-scheduled controllers. `polyBasis`

generates
standard polynomial expansions in any number of scheduling variables.
Use the resulting functions to create tunable gain surfaces with `tunableSurface`

.

`shapefcn = polyBasis('canonical',degree)`

`shapefcn = polyBasis('chebyshev',degree)`

`shapefcn = polyBasis(___,nvars)`

`shapefcn = polyBasis(___,varnames)`

generates
a function that evaluates Chebyshev polynomials up to `shapefcn`

= polyBasis('chebyshev',`degree`

)`degree`

:

$$shapefcn\left(x\right)=\left[{T}_{1}\left(x\right),\dots ,{T}_{order}\left(x\right)\right].$$

The Chebyshev polynomials are defined recursively by:

$${T}_{0}\left(x\right)=1;\text{\hspace{1em}}{T}_{1}\left(x\right)=x;\text{\hspace{1em}}{T}_{i+1}\left(x\right)=2x{T}_{i}\left(x\right)-{T}_{i-1}\left(x\right).$$

generates
an `shapefcn`

= polyBasis(___,`nvars`

)`nvars`

-dimensional polynomial expansion by
taking the outer product of `nvars`

1-D polynomial
expansions. The resulting function `shapefcn`

takes `nvars`

input
arguments and returns a vector with `(degree+1)^(nvars-1)`

entries.
For example, for `nvars`

= 3 and canonical polynomials,

$$shapefcn\left(x,y,z\right)=\left[{x}^{i}{y}^{j}{z}^{k}\text{\hspace{0.17em}}:\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le i,j,k\le order,\text{\hspace{0.17em}}\text{\hspace{0.17em}}i+j+k>0\right].\text{\hspace{1em}}$$

Thus, to specify a bilinear function in two scheduling variables, use:

`shapefcn = polyBasis('canonical',1,2);`

`tunableSurface`

defines
a variable gain of the form:$$K\left(x,y\right)={K}_{0}+{K}_{1}x+{K}_{2}y+{K}_{3}xy.$$

Here, *x* and *y* are the
normalized scheduling variables, whose values lie in the range [–1,1].
(See `tunableSurface`

for more
information.)

To specify basis functions in multiple scheduling variables
where the expansions are different for each variable, use `ndBasis`

.