Running a 1-D B-Spline Network

Navigation:  Toolboxes > Control Toolbox > B-Spline Network Editor >

Running a 1-D B-Spline Network

Previous pageReturn to chapter overviewNext page

Now we have trained the B-spline network and saved the weights. We can run the network with every desired input. We only have to keep in mind that the network was defined for input signals between 0 and 10.

1.In the Editor from the File menu select Open.
2.In the model library choose Examples\Control\Neural Networks
3.Select the model 1DBSplineNetwork-Run.emx. Now the predefined model will be opened.

1DBSpline-Run1

As you can see, this is exactly the same model as used for training, but now a ramp input is used.

4.From the menu select Model and Start Simulator. Now a Simulator will be opened with the predefined experiment loaded.
5.From Simulator menu click Simulation and Run. Do not save the weights file at the end of the run! The results will look like:

1DBSpline-Run2

As you can see, the B-Spline Network still has its training settings and still prompts for a weight file at the end of the simulation. Now we are going to change the settings of the B-Spline Network.

6.Open the B-Spline Editor (select the model, Go Down). To create a normal run with the network, we have to set the learning rate to zero, and load the weights file before simulation. Change the settings of the network, until it looks like:

1DBSpline-Run3

7.Click OK to close the B-Spline Editor. From the Editor menu click Model and Check Complete Model. This will implement the changed settings.
8.Return to the Simulator and click Simulation and Run. Before the run, an Open dialog will asking you to enter the name of the Weights File. This is a file that contains all the weights of the trained B-Spline network. Use the file that you saved during training, or the predefined weights file 1DBSplineNetwork.wgt. The simulation results will look like:

1DBSpline-Run4

As you can see the function is approximated by the B-Spline network by 10 first order splines.