Using External Historical Data with Neural

In some DeltaV installations, lab data may be collected and recorded either manually or in a lab system that is not connected to the DeltaV system. Also, historical data may have been saved in the historian of another control system that is being replaced by the DeltaV system. In these cases, it may save time to use this historical data to create a virtual sensor that is being implemented in the DeltaV system. The Neural application can use data from a file to determine input sensitivity and train the neural network. This section describes how DeltaV Neural uses data files, the required data file format, and the utilities included in the DeltaV system to export data from the Continuous Historian into a file.

Sensitivity Analysis and Training from File

DeltaV Neural normally uses data from the Continuous Historian to perform network input sensitivity analysis and training. However, DeltaV Neural can use historical data saved in data files as well. The data file must contain historical values for all inputs and outputs used in the neural network and the data must be formatted correctly for DeltaV Neural to use.

To use historical data from a file, you must first create a module that contains a Neural Network function block. The NN block must reference the DeltaV inputs the neural network uses. Download this module to a controller or Application Station and then start DeltaV Neural. Connect DeltaV Neural to the NN block. From the DeltaV Neural main menu, select either FileSensitivity Analysis from File or FileAutogenerate (to determine sensitivity and train in one step). The Sensitivity Analysis from File option is grayed out unless you are in Expert mode.

When you select either of these options, a dialog appears in which you specify the data file to use. After you select the file and click OK, DeltaV Neural performs the sensitivity analysis or autogeneration using the data file and presents the results as if you had used data from the Continuous Historian.

Data File Format

You can create models and verify models using data files. For best results, the values contained in the data file should reflect normal conditions over the operating range of the process. Any input or output sample values that represent abnormal conditions should be replaced by a non-numeric string in the data file. Use a tool, such as Microsoft Excel, to format and edit the file as required.

The data files must be saved as .dat files and formatted in a particular way for DeltaV Neural to use them. The data files must contain the following information formatted as described:

Line 1 - Must contain the phrase DeltaV_NN_Data <eol> Note The above header specifies to DeltaV Neural that this is a historical data file.

Line 2 - Lists the Number of Input references<tab>The number of Outputs <eol>

Line 3 - Lists the Number of samples in the file <tab> The sampling period in seconds <eol>

The sampling period must be the sampling period of the data in the file. It may be different than the Historian Sampling Rate configured in Control Studio for the block.

Line 4 - An empty line <eol>

Line 5 - Lists the identifiers of the Input references separated by tabs <eol>

The identifier names should match those that you configured in the associated Neural Network function block.

Line 6 - An empty line <eol>

Line 7 through the end of data - The data in the following order: index of the sample<tab>output value<tab>first input reference value<tab>second input reference value<tab>… last input reference value<tab>delay value (in seconds)<eol>

If the data contains values that do not reflect normal operating conditions, replace those values with non-numeric strings. The delay value is the time elapsed between sampling and lab analysis or sampled analyzer output becoming available. The Neural application shifts the output value by the delay value so that the inputs and the output are time coincident.

Last Line - An empty line <eol>

The following is an example neural network data file for a network considering three inputs and one output. The example shows only the first 15 and the last three sample input and output values out of the 389 total. Note that some of the output and input data values have been flagged as bad (the values have been replaced by BAD, but could have been replaced by any non-numeric string).

Figure: Example Neural Network Data File
DeltaV_NN_Data
3        1
389      5
FI101    PI102    FI103
1        298.91198730    49.74733734    51.41758347    50.12039566    15.00000000
2        301.14556885    49.94604492    49.38345337    47.68234253    15.00000000
3        301.80010986    49.73253632    49.77395248    52.39353561    15.00000000
4        299.38861084    49.79014206    49.88610840    52.50535202    15.00000000
5        299.79846191    49.22924423    48.94361115    49.54271698    19.00000000
6        299.30975342    50.15618515    49.98815918    50.34877396    19.00000000
7        299.12210083    50.06230545    49.96276093    50.90197754    19.00000000
8        BAD             49.96342850    49.37252426    BAD            19.00000000
9        299.73184204    49.27413177    50.75104904    49.83951950    19.00000000
10       299.44027710    50.51338577    50.38288498    52.36296082    22.00000000
11       298.68725586    50.11240768    50.38404083    50.63307190    22.00000000
12       298.38619995    50.08751297    51.27215958    48.14796066    22.00000000
13       298.92086792    BAD            50.98120117    50.59751511    22.00000000
14       299.72399902    50.84034729    49.70337296    48.73555756    22.00000000
15       300.00738525    49.81303406    48.52415848    52.84468842    22.00000000
.        .               .              .              .
.        .               .              .              .
.        .               .              .              .
387      300.87734985    50.02370071    49.43601227    48.33786011    17.00000000
388      301.19873047    50.53816605    50.74356842    48.55810928    17.00000000
389      301.05834961    50.28169250    49.73216248    51.49454498    17.00000000