The implemented block is a three layer Perception neural network. The block includes three input nodes and seven nodes in second layer and one node in output layer. The block in PLC S7300 has two automatic and manual modes. In the manual mode the parameter of the network are declared manually in the program (W01…W21, B01…B21). They are set by the user when the network is used. However if they are not defined some uniform random number are selected. In the automatic mode parameters of the network are calculated automatically by the back error propagation training method.
It is the most conventional method for training of these networks. The network is completely trained after almost 10 minutes of the time which the PLC is placed in RUN mode (for 500 data for training). The training data should be sorted in some parts of the PLC memory and it makes a matrix with four vectors including three column vectors as the output date of the network. The input and output data are used for training the network parameters. Every training sequence is calculated in one machine cycle of the PLC system.
Below is diagram of Neural network block output compare to PID output:
To test the designed network in a Siemens PLC, the behavior of a PID controller for a first order simple model is studied in Matlab Software. The model is used to extract data to form four vectors, the samples are gathered from almost 8 minutes analyzing of the PID controller on the model with 1000 sampling points.