1 September 2002
By Vasiliki Tzovla and Ashish Mehta
Automating the approach to development and online operation of soft sensors.
Neural network–based soft sensors have had limited application for two reasons.
First, traditional neural net development is a fairly complicated task requiring extensive third-party expert intervention.
Second, neural nets do not handle changes in process operation over time very well, and they often need retraining.
By embedding the neural net function block in the process control system and automating the model development, benefits of neural net techniques can be easily applied to a variety of processes without the overheads incurred in traditional implementations.
An intuitive and user-friendly graphical user interface minimizes the engineering and implementation effort while maintaining the underlying neural net technology. Several enhancements to the online operation of the model increase its lifetime and maintainability even in the presence of unmeasured disturbances and process drift.
This is the next generation of easy-to-use neural net applications in process control systems.
Infer a real-time value
An intelligent sensor, aka soft sensor, is based on the use of software techniques to determine the value of a process variable. This is in contrast to a physical sensor that directly measures the value of the process variable.
These sensors open a new world of possibilities that avoid nagging issues such as maintenance, cost, and the online use of physical sensors. A soft sensor is a highly trained, neural network–based model that takes real process variables as inputs and predicts values of the process output variable online.
Classical approaches to the problem of designing and training a neural network for the actual process conditions involved a sequence of complex steps that was often demanding for the typical plant engineer or operator. More often than not, a highly trained professional was required to create models. These models also had the drawback of not being able to constantly adapt to drifts in process inputs and other process conditions.
Neural networks approximate nonlinear functions and then adjust parameters or weights in an iterative procedure of learning the underlying function. This is training.
Training a soft sensor model consists of presenting information to the model, comparing the output to a target value, adjusting network weighting, and repeating the training until an acceptable output is achieved.
What makes soft sensors useful is the ability of the underlying model to infer in real time a measurement otherwise available only after significant delays associated with analyzers or lab tests.
Leverage foundation technology
This strategy uses function blocks. In the Foundation fieldbus control paradigm, each function block is part of an overall control system and operates in with other function blocks to implement control and monitoring loops within the process control system.
Function blocks typically perform one of several functions: an input function (transmitter, sensor, etc.), a control and analysis function (proportional-integral-derivative algorithm, fuzzy logic, etc.), or an output function (adjusting a valve, etc.).
Control routines may take any form, including software, firmware, or hardware. Similarly, the control and analysis strategy could design and implement using conventions other than function blocks, such as ladder logic or sequential function charts, or use any desired programming language or paradigm.
Neural network development is integrated as part of the control strategy, obviating the need for off-line mathematical data processing packages or development of interfacing layers between the process control system and the neural net application.
The neural net block implements as a drag-and-drop function block capable of execution in a controller of a scalable process control system. As a soft sensor, the neural net function block has one output: the process variable of interest.
The process variables that influence the output soft wire as block inputs from anywhere within the existing control system. To create the neural net model, a known set of input and output data serves for training purposes. Input values come via the soft wired referenced variables.
Connecting the to-be-predicted process variable to the neural net function block provides the output sample values. Later, this connection serves for online adaptation of the predicted value.
Once configured, the control module downloads to the controlling device. In this manner, the neural net becomes an integrated part of the existing control system with no additional requirements for any third-party interfacing and integration layers.
Furthermore, the configured process inputs, the output, and the measurement delay parameter automatically assign to the control systems' historian for archiving. A user-configurable sampling rate provides flexibility for handling processes with different response times and optimizes memory requirements for the data historian.
Plant guy generates model
The methodology and environment for the plant engineer to generate a neural net model can be easy and intuitive, requiring little or no understanding of its mathematical complexities.
To create an accurate neural net soft sensor, the data used to generate the model must represent the normal operation of the plant.
There are key issues in data handling, such as inspecting data, removing bad data, handling missing data, defining data ranges and removing outlying data values (those that fall outside established control limits), and ensuring sufficient variation in data over the desired region of operation.
Data already stored in the historian is available to any application connecting to it. Some quality historical data may be available in other external sources, so retrieving data from files is also possible.
The application directly connects to the integrated control system, retrieves the data from the historian or other identified source, and displays the process variables in a user-friendly graphical trend format, with features to scale, zoom, scroll, and pan the trends to accurately define the data to be selected.
The model the neural net creates comes entirely from the training data. That, in turn, implies that the data should be limited to valid operating ranges. The application automatically applies statistical methods such as use-of-mean and standard deviation to define the range of usable data.
Once the user selects the data, the application processes it, automatically taking into account the information provided on outlying data, ranges, and bad and missing data.
Conventionally, users had to manually shift the data based on time stamping or else use an average value for the time shift when individual sample information was unavailable. Instead, by using a delay parameter, each output sample value transparently shifts, according to its applicable delay, to form the data set. The well-conditioned data after this vital preprocessing step operates in all subsequent operations.
Determine time delays
One of the key problems in neural net–based process prediction is the lack of accurate a priori information on the variables that influence the output. The trained neural network would be more accurate if only variables that affect the output were included.
It is common knowledge that process outputs depend on input variables over time. Thus, delayed inputs rather than instantaneous values are most important. The fundamental problem most intelligent sensor applications encounter is determining time delays for inputs.
Usually, this involves trial and error techniques with multiple passes of an algorithm that iteratively reduces the range of user-specified possible delays, thereby relying heavily on hard-to-acquire solid process knowledge.
However, this newer approach, to the contrary, requires the user to provide only the approximate process response time. Most plant engineers and operators are very comfortable with this tactic.
The neural net application then employs a two-stage technique to automatically determine the appropriate input delays and the relative importance of the configured inputs. The application computes the sensitivity of the output to the input at the determined delay. This delay computation considers inputs individually. Sensitivity analysis effectively compares the influence of the inputs on the output.
In some sense, it ranks the inputs in order of importance. It is not uncommon to find some variables that have significantly more or less influence than originally anticipated. Furthermore, usually only a few of the originally configured variables are key to predicting the output.
The average sensitivity is a good indicator for comparison and serves to eliminate inputs that are not significant.
A simple yet complete overview, both graphical and tabular, of the participation of all the inputs configured in the neural net block visually displays the individual and average sensitivities. This detailed information is navigable in a Windows-like format.
The sensitivities recompute using the updated information. In this manner, the neural net application determines the most suitable I/O configuration while allowing users to embed their process knowledge.
Sound underlying technology
Based on the delay and sensitivity analysis of the previous step, data realigns to form the training set. At this stage, the process variable values are in engineering units (EUs). Some variables such as temperature, for example, may have a range of 1,000°; others, such as composition, have a range of a few units.
In a multivariable model, incremental changes from the two variables should equalize so that learning doesn't bias to the EU range. Uniform scaling via normalization of input and output values equalizes the importance of inputs.
Conventional neural net training requires understanding of the theory and behavior of these nonlinear engines, from determining how many hidden nodes to use to establishing the convergence criteria that will stop training.
Because this is knowledge belonging only by neural net experts, not the typical plant engineer who has to use the network, the training procedure is superficially simple while maintaining sound underlying core technology.
A suitable neural net architecture is determined by training with an incremental number of hidden nodes. Network weights are randomly initialized to small values, and for cross-validation purposes, data is automatically split into training and test sets. Training and test error recompute after each pass of data through the network.
Once training is over, the weight parameters of the neural net denormalize so that scaling the process variables isn't necessary when the model is online. At this stage, an intelligent sensor capable of predicting the process variable of interest is available.
Another desired functionality is the capability to compare and switch models generated over different data sets and/or with different parameters. Therefore, the process models for a particular neural net block automatically save upon creation. They remain in the database of the control system until the operator explicitly deletes them.
Soft wire references to block
Once a model develops, validation ensues. Real data feeds into the model to compare actual and predicted output. Even though a test set works during training, verification should always take place if additional data is available.
The validation/verification data set must be different from the training and test data sets. It should, however, represent the data region the neural net will operate on. Graphical comparison as well as the root mean square (rms) error information is available. If the rms error per scan is not satisfactory, the model should not go online.
Once a satisfactory neural net model exists, simply downloading to the controller integrates it into the existing control strategy. The model becomes part of the neural net block and operates with mode and status information similar to other blocks.
In the online mode, real process variables act as inputs to the neural net model that generates a predicted output. This value may help an operator or assist in the control scheme for error correction purposes.
Because the inputs soft wire as references to the neural net block, a clean and simple interface is maintained. The excluded inputs are not part of the model and online prediction, but there's no need to remove them, as they may be useful for retraining.
Maintaining inputs as references allows flexibility while minimizing confusion on the excluded or included inputs in a particular model. The same neural net block, therefore, may have models with different inputs being used, depending on changing process conditions, as long as they are originally configured as input references.
Online lifetime capable
The process output stream, predicted using the neural network and measured upstream conditions, automatically compensates for error introduced by unmeasured disturbances and measurement drift.
This correction factor uses a continuous measurement or sampled measurement of the stream provided by an analyzer or lab analysis of a grab sample.
There are two approaches to calculate the correction factor that must apply to the neural net prediction. Both derive from the calculation of the predicted error using the time coincident difference between the uncorrected predicted value and the corresponding measurement value.
Depending on the source of error, a bias or gain change in the predicted value is applied. To avoid making corrections based on noise or short-term variations in the process, the calculated correction factor is limited and heavily filtered.
This correction eliminates the need to retrain the neural net in the case of drifts and unmeasured disturbances and greatly enhances the lifetime of a running model.
Typically long time delays
Typical neural net applications involve long time delays. The plant operator needs to wait for the delay time to observe whether change in the input achieves the desired effect on the output.
In many cases, this may result in out-of-spec product and significant losses in terms of time, money, and effort before realizing the need for corrective action. The neural net block provides a future parameter that provides the ability to predict outputs.
Prediction capability allows the user to perform what-if analysis and make real-time corrections for input changes.
Unlike first principles based on parametric models, neural nets are approximaters that attempt to form the best mapping among the I/O data seen during training. In essence, this implies that due to their nonlinear nature, they will not do a good job of prediction over regions not seen during training.
In a real process plant environment, this can lead to very poor results, as process variables tend to change over time. For example, the training data may have been limited, so certain regions of plant operation—e.g., seasonal changes—were not included.
By taking advantage of the coupling between the neural net function block and modeling application engine, outlying points integrate as part of the online mode. The system informs the user if there is input range violation while clamping them to the outer limits and calculating the predicted output.
Heuristics based on the number of such violations and the relative importance of inputs with values beyond the control limits determine whether the prediction is uncertain or bad.
During normal operation, all values are within the training range, and the predicted output has a go status. IT
Behind the byline
Vasiliki Tzovla and Ashish Mehta worked for Emerson Process Management when they wrote this article. Ms. Tzovla now works in her home country, Greece. Mehta continues at Emerson. See their original at ISA Expo Show paper.
Related FilesCreating intelligence (Adobe PDF File)
Related LinksRoot mean square validation
Neural net block