This model show an example of a RadialBasis NeuralNetwork created with the Neural Network library.
A Radial Basis Neural Network is composed by a layer of neurons which adopts the RadBas activation function and a layer of newrons which perform a purelin transformation.
This example is made using a MatLab Radial Basis demo: demorb1. Calling the demo file a new Radial Basis Network (net) is created and trained. The detail about the network created can be see exploring the network object created by matlab. Which is important for our example are these informations:
- The first layer of the network, the Radial Basis one, expect 1 input (size of net.IW{1});
- The first layer of the network, the Radial Basis one, is made by 6 newrons (size of net.IW{1});
- The weight table of the first layer is net.IW{1};
- The bias table of the first layer is net.b{1};
- The second layer of the network, the PureLin one, expect 6 inputs (size of net.LW{2});
- The second layer of the network, the PureLin one, is made by 1 newron (size of net.LW{2});
- The weight table of the second layer is net.LW{2};
- The bias table of the second layer is net.b{2};
In this example the parameters of the network are specified using two different way:
- using the extractData.m MatLab script, located in Utilities folder;
- using the DataFiles Dymola library.
The model is simulated on the same data used by demorb1 to test the network created; this can be done creating the file testData_RadialBasisNN using this commands:
- call in matlab demorb1
- time=(1:length(X'))'*0.01;
- in=[time,X'];
- out=[time,Y'];
- radL_weight=net.IW{1};
- radL_bias=net.b{1};
- linL_weight=net.LW{2,1};
- linL_bias=net.b{2};
- typing this command in matlab: save testData_RadialBasisNN -V4 in out radL_weight radL_bias linL_weight linL_bias
Release Notes:
Generated at 2024-04-19T18:16:02Z
by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos