tunableGain
Tunable static gain block
Syntax
blk = tunableGain(name,Ny,Nu)
blk = tunableGain(name,G)
Description
Model object for creating tunable static gains. tunableGain
lets
you parametrize tunable static gains for parameter studies or for
automatic tuning with tuning commands such as systune
or looptune
.
tunableGain
is part of the Control
Design Block family of parametric models. Other Control Design
Blocks include tunablePID
, tunableSS
, and tunableTF
.
Construction
creates
a parametric static gain block named blk
= tunableGain(name
,Ny
,Nu
)name
. This
block has Ny
outputs and Nu
inputs.
The tunable parameters are the gains across each of the Ny
-by-Nu
I/O
channels.
uses
the double array blk
= tunableGain(name
,G
)G
to dimension the block and
initialize the tunable parameters.
Input Arguments
|
Block |
|
Non-negative integer specifying the number of outputs of the
parametric static gain block |
|
Non-negative integer specifying the number of inputs of the
parametric static gain block |
|
Double array of static gain values. The number of rows and columns
of |
Properties
|
Parametrization of the tunable gain.
The following fields of
| ||||||||||
|
Sample time. For continuous-time models, Changing this property does not discretize or resample the model. Default: | ||||||||||
|
Units for the time variable, the sample time
Changing this property has no effect on other properties, and
therefore changes the overall system behavior. Use Default: | ||||||||||
|
Input channel names, specified as one of the following:
Alternatively, use automatic vector expansion to assign input
names for multi-input models. For example, if sys.InputName = 'controls'; The input names automatically expand to You can use the shorthand notation Input channel names have several uses, including:
Default: | ||||||||||
|
Input channel units, specified as one of the following:
Use Default: | ||||||||||
|
Input channel groups. The sys.InputGroup.controls = [1 2]; sys.InputGroup.noise = [3 5]; creates input groups named sys(:,'controls') Default: Struct with no fields | ||||||||||
|
Output channel names, specified as one of the following:
Alternatively, use automatic vector expansion to assign output
names for multi-output models. For example, if sys.OutputName = 'measurements'; The output names automatically expand to You can use the shorthand notation Output channel names have several uses, including:
Default: | ||||||||||
|
Output channel units, specified as one of the following:
Use Default: | ||||||||||
|
Output channel groups. The sys.OutputGroup.temperature = [1]; sys.OutputGroup.measurement = [3 5]; creates output groups named sys('measurement',:) Default: Struct with no fields | ||||||||||
|
System name, specified as a character vector. For example, Default: | ||||||||||
|
Any text that you want to associate with the system, stored as a string or a cell array of
character vectors. The property stores whichever data type you
provide. For instance, if sys1.Notes = "sys1 has a string."; sys2.Notes = 'sys2 has a character vector.'; sys1.Notes sys2.Notes ans = "sys1 has a string." ans = 'sys2 has a character vector.' Default: | ||||||||||
|
Any type of data you want to associate with system, specified as any MATLAB® data type. Default: |
Examples
Create a 2-by-2 parametric gain block of the form
where g1 and g2 are tunable parameters, and the off-diagonal elements are fixed to zero.
blk = tunableGain('gainblock',2,2); % 2 outputs, 2 inputs blk.Gain.Free = [1 0; 0 1]; % fix off-diagonal entries to zero
All entries in blk.Gain.Value
initialize
to zero. Initialize the diagonal values to 1 as follows.
blk.Gain.Value = eye(2); % set diagonals to 1
Create a two-input, three-output parametric gain block and initialize all the parameter values to 1.
To do so, create a matrix to dimension the parametric gain block and initialize the parameter values.
G = ones(3,2); blk = tunableGain('gainblock',G);
Create a 2–by-2 parametric gain block and assign names to the inputs.
blk = tunableGain('gainblock',2,2) % 2 outputs, 2 inputs blk.InputName = {'Xerror','Yerror'} % assign input names
Tips
Use the
blk.Gain.Free
field ofblk
to specify additional structure or fix the values of specific entries in the block. To fix the gain value from inputi
to outputj
, setblk.Gain.Free(i,j) = 0
. To allowhinfstruct
to tune this gain value, setblk.Gain.Free(i,j) = 1
.To convert a
tunableGain
parametric model to a numeric (non-tunable) model object, use model commands such astf
,zpk
, orss
.
Version History
Introduced in R2016aSee Also
tunablePID
| tunablePID2
| tunableTF
| tunableSS
| systune
| looptune
| genss
| hinfstruct
(Robust Control Toolbox)