setNetwork
Assign dlnetwork
object as the state or output function of a
neural state-space model
Since R2024b
Description
You can use dlnetwork
objects to approximate the state or
non-trivial part of the output function of a neural state-space model. A
dlnetwork
object supports more network structures when compared to the
multi-layer perceptron network created using createMLPNetwork
.
Use setNetwork
to map the input layers of the network to the
corresponding state, input, and time of the neural state-space model.
As an alternative to setNetwork
, you can directly assign a
dlnetwork
object to the StateNetwork
and
OutputNetwork
properties of an idNeuralStateSpace
object. To do so, the dlnetwork
object must have a configuration as specified
in dlnet
. In this
case, the software maps the input layers of the dlnetwork
object to the
corresponding state, input, and time of the idNeuralStateSpace
object by
comparing the layer sizes with the number of states and inputs. If the layer sizes are not
distinguishable, that is, if the number of states and inputs are equal, then the software maps
the layers in the order of state, input, and time.
For more information on neural state-space models and their structure, see What are Neural State-Space Models?.
nss = setNetwork(
approximates either the state or (non-trivial part of) the output function of the neural
state-space object nss
,type
,dlnet
)nss
, depending on type
, by
assigning the custom dlnetwork
object dlnet
to the
idNeuralStateSpace
object nss
. It maps the input
layers of dlnet
to the corresponding state, input, and time of the
neural state-space model by comparing the size of the layers with the number of states and
inputs.
For example, to assign the network dlnet
to the state function,
use
nss = setNetwork(nss,"state",dlnet)
nss.StateNetwork = dlnet
.To assign the network to the non-trivial part of the output function, use
nss = setNetwork(nss,"output",dlnet)
nss.OutputNetwork = dlnet
.nss = setNetwork(
specifies name-value arguments after the input arguments in the previous syntax.nss
,type
,dlnet
,Name=Value
)
When the input layer sizes are not distinguishable, use the name-value arguments to manually assign the input layers of the network to the corresponding state, input, and time of the neural state-space model.
For example, to assign the network dlnet
to the state function and
map input layers with names "State"
and "Input"
to the
state and input of the neural state-space model, respectively, use
nss = setNetwork(nss,"state",dlnet,xName="State",uName="Input")
Examples
Input Arguments
Version History
Introduced in R2024b
See Also
Objects
idNeuralStateSpace
|nssTrainingADAM
|nssTrainingSGDM
|nssTrainingRMSProp
|nssTrainingLBFGS
|idss
|idnlgrey
Functions
createMLPNetwork
|nssTrainingOptions
|nlssest
|generateMATLABFunction
|idNeuralStateSpace/evaluate
|idNeuralStateSpace/linearize
|sim