Está en la página 1de 258

Page 1 of 258

Advanced Control Products


Key Topics
Inspect Tune Fuzzy Simulate Neural Predict Predict Pro

Introduction to This Manual


The DeltaV Advanced Control manual contains information about DeltaV software advanced control capabilities. It includes detailed descriptions of the functions available with DeltaV Inspect, DeltaV Tune, DeltaV Fuzzy, DeltaV Simulate, and DeltaV Predict. DeltaV Inspect allows you to examine the health of your control system, measurements, and actuators. This manual provides information about DeltaV Inspect's features that support the analysis of I/O function blocks (that is, AI, AO, DI, DO, and PIN) and Control function blocks (that is, DC, FLC, MPC, PID, and Ratio) for the following conditions: control performance based on Variability Index abnormal measurement or actuator status control utilization based on Block Mode downstream limited condition on control DeltaV Tune allows PID and Fuzzy Logic Control (FLC) function blocks to be automatically tuned on demand using the relay self-

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 2 of 258

oscillation principle. It can be used to tune the control over a wide range of processes and addresses many of the requirements in a typical operating plant. This manual provides a description of how the process dynamics associated with a control loop are captured by DeltaV Tune. It also details how this information is used to tune your control loops. DeltaV Fuzzy is an alternative to PID control that provides faster response and improved performance over standard PID control on most loops. The Fuzzy Logic Control (FLC) function block is the basis for DeltaV Fuzzy. This manual describes the FLC function block principles and its standard operations. It also provides references to other sections pertaining to this block. DeltaV Simulate allows you to configure a DeltaV System on your laptop or office PC. You can configure all of the features that are supported by DeltaV software without having to use DeltaV hardware. Also, you can simulate the execution of the DeltaV Operate and control modules defined for your plant in your PC. Using the Control and I/O block simulation capability of DeltaV software and Fieldbus, you can either manually supply field measurement values and status or you can have them automatically provided by function blocks or applications that simulate the process. DeltaV Predict implements model predictive control of small and medium-sized multivariable processes in DeltaV environments. You can control interactive processes within measurable operating constraints while automatically accounting for process interaction and measurable disturbances. DeltaV Predict also allows you to easily address the numerous small and medium-sized multivariable processes (2x2, 3x3 or 8x8) that can benefit from MPC technology. DeltaV PredictPro implements model predictive control of large multivariable processes in DeltaV environments. It allows you to define as many as five control objectives for interactive processes within measurable operating constraints while automatically accounting for process interaction and measurable disturbances. With PredictPro you can easily address a wide variety of multivariable processes as large as 20x20 that can benefit from Model Predictive Control (MPC) technology. DeltaV Neural is a collection of tools you use to implement neural networks in DeltaV environments. With DeltaV Neural you can create virtual sensors to monitor and predict process parameters that are otherwise expensive, difficult, or impossible to measure directly. Neural networks are sometimes referred to as intelligent or software sensors.

DeltaV Inspect
Inside this topic The ability to inspect control and measurement loops quickly is of primary importance to industrial applications. Poorly tuned loops and malfunctioning field devices can jeopardize product quality and, quite often, production or yield. DeltaV Inspect provides advanced process monitoring that allows under-performing loops and malfunctioning field devices to be identified instantly. By providing this advanced capability, DeltaV Inspect takes full advantage of the fieldbus block architecture supported in the DeltaV system. A Bad, Uncertain, or

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 3 of 258

Limited measurement, downstream limitations in control, and incorrect mode of operation are automatically determined based on block mode and status of block parameters. In addition, the Input/Output function blocks (AI, AO, DI, DO, and PIN) and Control function blocks (DC, FLC, MPC, PID, and Ratio) include two parameters that are provided to support performance monitoring. These parameters are updated automatically without any extra block configuration. Since most calculations required for performance monitoring are done in function blocks, this approach greatly simplifies DeltaV Inspect and reduces network traffic between controller and workstation. DeltaV Inspect provides indices that quantify loop utilization, measurements with a Bad, Uncertain or Limited status, limitations in control action, and process variability. In addition, DeltaV Inspect shows the overall control performance and utilization. DeltaV Inspect contains the following features: Software design based on function blocks and fieldbus architecture Innovative loop performance and loop utilization monitoring techniques (patent pending on these techniques) A server that runs automatically with default settings Easy custom settings Summary results presented in a graphical way (bargraph) for hour, shift, and day Easy access to detailed results for modules and blocks and device alerts Guidance for improving performance An easy-to-use user interface Complete integration with the DeltaV environment From the user interface you can monitor the performance of the entire plant or any part of the plant of particular interest. To provide for use of Inspect data in other ways, DeltaV includes an Inspect function block and an Inspect dynamo. Use the function block to make the calculated performance data available for viewing, plotting, adding to history, and so on. Use the dynamo to provide easy access for operators to Inspect data. Note When a module that contains an MPC block is downloaded, all inputs and outputs are assigned to the DeltaV Historian. Do not change the default history collection settings of the MPC function block.

Reporting Loop Utilization and Performance


DeltaV Inspect consists of one server and multiple clients. The server is the central collection point of the information obtained from the DeltaV controllers. The server performs hour/shift/day calculations, compares the results of these calculations with limits you set to detect under-performing loops, and provides this information to clients for viewing upon request. Refer to the Setting Limits for more information. The clients (the Inspect application) can access information only through the server.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 4 of 258

Selected function block parameters in the DeltaV controller (such as measurement status, back calculation input status, and mode) are automatically reported to the DeltaV Inspect server. This server is located on the DeltaV ProfessionalPLUS station. The information resulting from the calculation in the server can be accessed through any DeltaV Inspect client.

Information Flow for DeltaV Inspect The status and actual mode parameters used by DeltaV Inspect to calculate loop utilization, Limited condition, and Bad measurement usually do not change in value. Parameters are communicated to the server only when they change in value. Therefore, the communication load for reporting these parameters is usually very small. When the DeltaV Inspect Server is initially placed online, the current state of all required parameters is reported to DeltaV Inspect by the DeltaV controller. From that point on, the status of the parameters is reported only if it changes in value.

Loop Performance Calculations


This section provides details about the calculations performed by DeltaV Inspect to evaluate loop performance and identify malfunctions.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 5 of 258

Refer to this topic if you are interested in how these calculations are performed. Otherwise, refer to the Using DeltaV Inspect topic. The DeltaV Inspect Server calculates Variability Index (VI) for I/O blocks (AI, AO, and PIN) and Control blocks (FLC, MPC, MPC Pro, PID, and Ratio). For Control blocks, the DeltaV Inspect Server calculates an overall control performance and control utilization. Through these calculations, you can better judge the performance of plant measurement and control. These calculated performance measurements are available at DeltaV workstations that support DeltaV Inspect clients. The DeltaV Inspect window identifies either I/O blocks, Control blocks, or measurements whose Variability Index and total standard deviation exceeds the configured limits. In Input/Output function blocks and Control function blocks, the total standard deviation and capability standard deviation are calculated. Based on these two parameter values reported to the server by the controller, Variability Index as well as overall control performance are calculated in the DeltaV Inspect Server at the workstation. To reduce computer resource requirements, the Variability Index and overall performance calculations are performed in the DeltaV workstation. Variability Index is computed from the following formulas:

S is the sensitivity factor that makes calculations stable. The default value is 0.1% of the variable scale. Stot is the actual measured standard deviation. Slq is the minimum standard deviation that can be achieved with feedback control, where Slq is defined as follows:

Scap is the estimated capability standard deviation (measurement of short-term variation) Finally, for Control blocks, overall control performance is as follows: Performance = (100-Average VI for Control blocks)% The overall control utilization is as follows:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 6 of 258

Utilization = Average Percent Time Control blocks were in Normal Mode% To support the VI and performance calculations, the I/O function blocks (AI, AO, and PIN) and Control function blocks (FLC, MPC, MPC Pro, PID, and Ratio) in DeltaV controllers and fieldbus devices calculate Scap and Stot. Stot and Scap are visible parameters (STDEV and STDEV_CAP respectively) of these function blocks. The block parameter STDEV_TIME determines the timeframe over which these calculations are performed.

Calculations in Function Blocks


The I/O function blocks (AI, AO, and PIN) and Control function blocks (FLC, MPC, MPC Pro, PID, and Ratio) in DeltaV controllers and fieldbus devices support the STDEV and STDEV_CAP parameters, Stot and Scap. These intermediate calculations are done each time one of these function blocks execute. After N executions of the function block (where N = 120) or two minutes (whichever is longest), the parameter values are updated. The total standard deviation, Stot, is calculated using "moving time window computation" based on N=120 executions of the function block and the time horizon (in seconds) defined by STDEV_TIME as follows:

where:

WFstd = 120/((STDEV_TIME/module execution period) + 120) Stot_old = Previously calculated value of Stot The PV is used in the I/O block to calculate the mean values as follows based on N=30 executions of the function block and the time horizon defined by STDEV_TIME.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 7 of 258

Where WFmean = 30/((STDEV_TIME/module execution period) + 30) = Previously calculated mean value In Control blocks, either the working setpoint or PV is used, depending on the block mode. The capability standard deviation, Scap, is calculated as follows:

where:

Scap_old = Previously calculated value of Scap Only the summing component associated with the mean absolute error (MAE) and moving range (MR) is computed at each execution of the function block. The parameter STDEV_TIME should be set to match the time response for the process (in seconds) and by default is set to zero.

Identification of Under-Performing Loops


The following block measurement and processing conditions are automatically identified by DeltaV Inspect based on block mode and parameter status: Mode Incorrect - The actual mode of the block does not match the Normal mode configured for the block. This can be caused by the operator changing the target mode because of poor response or equipment malfunction.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 8 of 258

Limited Control (Action) - BKCAL_IN status of the block is either high limited or low limited, indicating that a block downstream from the control block has reached a setpoint or output limit. Such limitations can prevent the loop from achieving or maintaining setpoint. Limiting is detected through BKCAL_IN only if the block is wired to another block such as AO. If a PID block with direct I/O is used, limiting is detected through BKCAL_OUT. The limited condition is suppressed if this block is not selected by the downstream block because the downstream block should be flagged for incorrect mode. Uncertain Input - The status of the block process variable (PV parameter) is Bad, Uncertain or Limited. A sensor failure, miscalibration of the measurement range, or measurement diagnostics have detected a condition that requires attention by maintenance. Standard Deviation - Standard deviation is a measurement of the variance of a block's PV (or working setpoint, depending on the block's mode). Standard deviation is presented as a percent of EU span. The percent of the time that these conditions exist over an hour, a shift, or a day is computed for every block by the DeltaV Inspect Server and compared to a configured global limit for each condition. When one of these limits is exceeded, the associated module is displayed in the DeltaV Inspect window.

Identification of Malfunctioning Assets


The Inspect application monitors assets (devices) for the following device diagnostics values: Advisory Device Count Maintenance Device Count Failed Device Count Comm Fail Device Count Total Device Count The diagnostic values are sent to the Inspect block as totals for the time period. For the Now time frame, the value is 0 or 1. For all other time frames, the values is the total count of the time the value was true. For large systems, this will typically be the number of minutes in the time frame. However, for small systems where there are fewer than 60 modules enabled, there may be more than one read per minute. This is similar to how data is polled for other Inspect items. These values are available to the Inspect application directly from assets that support PlantWeb rules (fieldbus devices, for example). No additional configuration is required. For other assets, use the Diagnostic function block to access asset diagnostic information and make it available to the Inspect application. Asset parameters that indicate device diagnostic information can be wired to the Diagnostic block directly or processed by other blocks first, if necessary.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 9 of 258

When you use Diagnostic blocks it is important to give each block a unique name. It is recommended that you name the Diagnostic blocks the same as the asset the block refers to. Because the Asset page does not include the module name in which a Diagnostic block resides, this naming convention eliminates duplicate names and gives operators more meaningful information.

Using DeltaV Inspect


Inside this topic DeltaV Inspect does not require any configuration or setup. You can start using it immediately by clicking Start | DeltaV | Advanced Control | DeltaV Inspect. Before DeltaV Inspect will recognize any changes or downloads of modules to a controller, you must download the controller setup data. Note The first time that you access DeltaV Inspect, the DeltaV Inspect window displays the number of modules active as 0 because, by default, no areas are enabled for data collection. For more information on enabling areas, refer to the Selecting Items to Monitor topic. The following figure shows how the DeltaV Inspect window Overview page appears after enabling processing on the entire system.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 10 of 258

DeltaV Inspect Interface If you need to delete module assignments from controllers in your configuration the recommended way is: 1. View Assigned Modules for the controller.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 11 of 258

2. Right click on the module and select Delete Assignment. 3. Right click on the module again and select Download | Delete From Controller. 4. Download Setup Data to the controller. If you attempt to remove module assignments from your configuration by deleting the assignment to a controller, then performing a total download, you must download the controller twice (total download followed by Download | Setup Data) to prevent DeltaV Inspect from displaying modules that have not been completely removed from the controller. This additional download is necessary because of the way the system manages module assignments and deletions during the download process. The DeltaV Inspect user interface consists of the hierarchy (tree diagram) and three pages: Overview, Control, and Asset.

Overview Page
The overview page, includes a summary of the active asset alerts and shows the blocks that have one or more abnormal conditions. Click View | Options and select the Display tab to select the pages (Overview, Control, and Asset) that you want to display. The Overview page contains the following sections: Control Section This section graphically shows the percent of downloaded modules containing blocks that have abnormal conditions. Note that the graph is scaled from 0 to 20%. You can see the percent value by double clicking on a bar in the graph. The value for that bar appears in a popup. The actual number of modules that have each of the abnormal conditions is at the right of the graph. The Performance and Utilization values indicate proximity to ideal control and indicate whether control blocks were used as designed, respectively. The third value in this area appears if you have PROCESS_IN configured in an Inspect block. Asset Alerts Section This section graphically shows the percent of assets monitored at each of the four alert levels: Asset Failed, Maintenance Soon, Advisory, and Communications Failed. Note that the graph is scaled from 0 to 20%. You can see the percent value by double clicking on a bar in the graph. The value for that bar appears in a popup. The actual number of assets at each of the alert levels is at the right of the graph. The numbers include all devices (Fieldbus or not) that are monitored for maintenance state. The information of interest is the worst currently active alert level for the monitored device. For example, a device may have multiple alert levels active at one time but only the highest level will be reflected in the overview. For Fieldbus devices, this alert information comes directly from the device's shadow block. For non-Fieldbus devices, add Diagnostic function blocks to modules to report device alerts.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 12 of 258

Control Page
Click View | Options | Display and select Control to display the Control page. The Control page contains five tabs that list either performance information for all modules or only for modules that have exceeded limits, depending on the setting you selected in the Filters area. The Summary tab shows an overview of the information. Only modules containing I/O function blocks (AI, AO, DI, DO, and PIN) and Control function blocks (DC, FLC, MPC, PID, and Ratio) appear in the Module Name list. The abnormal conditions that can be detected are abnormal Mode, Control, Input, and whether the limits for average Variability Index and Standard Deviation have been exceeded. Modules are listed in alphabetical order. (The Module Name list is in the upper part of the tab. The Block Name list is in the lower part and contains a list of the I/O and control blocks in the currently selected module.) If one or more blocks in a module has exceeded one of the limits, the associated problem is indicated by an icon in the Summary pane of the Module list. The default icon is but you can change the icon from the View menu. For each block, the percent of time that the mode, control, or input was abnormal is shown as well as the average value of the Variability Index and the Standard Deviation for each block, expressed in percent of EU span. The global percent time limits for mode, control, input, and Variability Index are shown along with the individual block limits for Standard Deviation. Use this information to identify the particular block that causes the module to be included in the Module Name list as well as the percent of time that the condition was abnormal. The remaining tabs show more detailed information for each of the abnormal condition types. For more information, refer to the online help for the Inspect application.

Asset Page
Click View | Options and select Asset to display the Asset page. The Asset page provides a list of assets (field devices) that have abnormal alert conditions. Filter selections are available to present all assets, assets in alert only, or fieldbus devices in alert only. The timeframe is always Now for information shown. The Asset page lists the asset name (or the associated Diagnostic block name for non-fieldbus assets) and the active alert conditions, if any, for each device. Right clicking on a block or device opens a menu from which you can open the appropriate detail analysis application, if one exists. For example, selecting the Diagnostic block associated with a CSI monitored device presents On-Line Watch as a menu choice. If a Fisher-Rosemount fieldbus device is selected, then the choice to open AMS Device Manager software appears.

Selecting Items to Monitor

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 13 of 258

DeltaV Inspect monitors all I/O and Control blocks that are downloaded to any DeltaV plant areas that have been enabled through the DeltaV Inspect interface. Note Inspect limits the number of modules it watches to 10,000. If you attempt to enable an area that would add enough blocks to exceed the limit, the area is not enabled. To enable and disable Inspect performance and utilization calculations for areas, process cells, and unit modules, use the hierarchical list at the left of the Inspect window.

Hierarchy Tree For those modules that are contained within an area assigned to DeltaV Inspect, the software automatically includes all of the I/O function blocks (AI, AO, DI, DO, and PIN) and Control function blocks (DC, FLC, MPC, PID, and Ratio) as long as those modules have been downloaded to a DeltaV controller. As modules are added or deleted, DeltaV Inspect detects these changes. In other words, no module-level configuration is necessary for tags to be included in DeltaV Inspect. To enable and disable Inspect performance and utilization calculations for individual modules and blocks, use the Module Name and Block Name lists. The following figure shows the Control page Summary tab of the Inspect window.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 14 of 258

Modules and Blocks Area Enable and disable performance calculations for individual blocks and modules by right clicking on a module or block name and selecting from the drop-down menu. Note that if you disable all the blocks in a module and have the Filters area Modules toggle set to Limit Exceeded Only, the module containing the blocks you disabled disappears from the Module Name list. To make it reappear, set the Modules toggle to All Modules.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 15 of 258

Filtering Items to Monitor


The settings you make in the Filters area help determine what modules and blocks are included in the performance and utilization calculations. You can filter by time period, Block Types, and whether all modules or only modules in which one of the limits has been exceeded are included in the Module list in the DeltaV Inspect window.

Filters Dialog There are two areas on the filters dialog: Control Filters and Asset Filters. Control Filters Area

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 16 of 258

The two pulldown lists are Time Frame and Time Window. The choices for Time Frame are Now, Current, and Previous. The choices for Time Window are Hour, Shift, and Day. If you select Now, the Time Window list is not available and Inspect uses the instantaneous parameter values of the block to determine if a module is in the Module list. By combining selections in the two lists you can filter the Inspect data for the following time periods: Current Hour Current Shift Current Day Previous Hour Previous Shift Previous Day In the Block Types area, select one or more types of blocks to include in the DeltaV Inspect window. In the Modules area, you can elect to have all modules shown in the Module list or only those modules that have at least one block that exceeds a limit (either for average variability or percent of time that the mode, control, or input was abnormal). Asset Filters Area In this area select whether you want to see all assets, only assets in alert, or only fieldbus devices in alert.

Setting Limits
Default limits are provided in the DeltaV Inspect configuration for Variability Index, Standard Deviation, incorrect mode, limited conditions, and bad or uncertain inputs. The default limit for Variability Index is 30 percent (30%). The default limit for Standard Deviation is by block and the default is three percent (3%) of the EU span. The default limits for incorrect mode, limited conditions, and bad or uncertain inputs are set at ten percent (10%). You can change these default values from the Block Name list. The limits shown in the Block Name list for Incorrect Mode, Limited Control, Bad or Uncertain Input, and Variability Index apply to all blocks. If you have tune privileges you can change these limits. To set a limit, double-click the limit you want to change and modify it in its cell. You can also right-click the limit you want to edit and select Modify from the drop-down menu. From a DeltaV Inspect client (the Inspect application), if you have tune privileges you can change the percent time limits and the variability index used to detect when blocks are not operating as expected for too long a time. The values for which you can set detection limits include: The percent time the mode is incorrect (not in the configured Normal mode),

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 17 of 258

The percent time control is Limited, The percent time the block PV is Bad, Uncertain, or Limited, the Variability Index. In addition, you can set the Standard Deviation Limit for each block. There are three ways to set this limit: Set an individual limit. The limit is set to the value you enter. Set the limits of all blocks in the system that are of a particular type (Control, Input, Output). The limits are set to the value you enter. Adjust the limits of all blocks in the system that are of a particular type (Control, Input, Output) to their current Standard Deviation value plus an offset that you specify. The limits are adjusted by the value you enter. Note All limits (abnormal conditions or Standard Deviation Limits) are set or changed from the Inspect clients, but are stored in the server. All clients use the same set of limits, regardless of which client set them. However, a changed limit is used by the clients, but not stored permanently, until a user with sufficient privilege updates the database. In this way, you can set or adjust limits temporarily, and if the changes are unsatisfactory, restore the original limits from the database. If one or more limits have been changed but not updated to the database, a message appears in the Status Bar at the bottom of all Inspect clients. To save changes permanently in your database, click File | Update Database. To restore the previous limit values that you modified in the server, click File | Restore from Database. Note that these menu items are not available unless you have changed limits. You can also enable and disable performance calculations for individual blocks and modules by right clicking on a module or block name and selecting from the drop-down menu. Note that if you disable all the blocks in a module and have the Filters area Modules toggle set to Limit Exceeded Only, the module containing the blocks you disabled disappears from the Module Name list. To make it reappear, set the Modules toggle to All Modules.

Defining Shift Times


Two, three, or four shifts can be defined. The shift time is used by the DeltaV Inspect Server in calculating and displaying shift and daily DeltaV Inspect summaries. To define shifts, click View | Options, select the number of shifts per day, and then select the time at which the first shift starts. DeltaV Inspect automatically calculates the starting time for the remaining shifts. For example, if you select 3 shifts and specify that the first shift starts at 8 a.m., DeltaV Inspect automatically sets the second shift to start at 4 p.m. and the third shift to start at midnight.

Printing

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 18 of 258

When you select either the Print icon or File | Print, a dialog appears from which you can print either an active module summary report or a detail report on the local workstation printer or the selected network printer. The active module summary report contains the Performance Index, Control Utilization, total number of active modules, and the number of modules with one or more blocks that is in an incorrect mode or has Limited Control, Uncertain input, or large variability. The detail report contains the Percent Time Abnormal, Average Standard Deviation, and Average Variability Index for each I/O or Control block for the selected Time Frame.

Defining an Inspect Operator Interface


The DeltaV system includes two items you can use to create ways for operators to interact with Inspect: the Inspect function block and the Inspect dynamo. For information on configuring and using the Inspect function block, refer to the Inspect Function Block topic. Use the Inspect dynamo in the DeltaV system to include Inspect performance and utilization calculation results in operator displays. When you insert the dynamo in a display, it prompts you for the tag of an Inspect block. The dynamo also shows the area over which the calculations are made and a button operators can use to enable and disable the calculations for the area. The following figure shows how the Inspect dynamo appears in a display.

Inspect Dynamo From the dynamo, an operator can enable or disable Inspect calculations for the area named in the dynamo. The two fields on the dynamo show the calculated performance and utilization for the modules in the area. The background color of these fields is invisible if the data status is good, orange for uncertain status, red for bad status, or magenta when data is not being communicated.

Variability Limits
Variability Index shows a control loop performance relative to the best possible performing loop (Minimum Variance Control Loop). In theory, a perfectly tuned loop has Variability Index close to zero. It should be noted, however, that minimum variance control is neither

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 19 of 258

achievable in real control loop nor desirable to achieve. At perfect minimum variance control, a control loop experiences excessive movement of the controller output and has a rather narrow stability margin. Variability Index close to one hundred percent (100%) indicates an extremely poorly tuned loop. To achieve a compromise between as low as possible variability and reasonable loop stability margin, Variability Index of around ten percent (10%) should be satisfactory for most loops. Fine adjustment of Variability Index limits should be determined based on the loop performance when it is correctly tuned. Similarly, Variability Index provided for input blocks can be used to judge relative stability of processing conditions. Variability Index that shows a dramatic increase indicates a change in process load disturbances. For Output blocks (for example, AO), large Variability Index indicates that the control loop adjusting the valve is tuned too tightly or that the loop is compensating for large process disturbances. Also, mechanical wear or stiction in a final control element can cause associated Variability Index to be have a high value.

Application Examples
The following information provides common examples to illustrate how some of DeltaV Inspect's key features can be used in an operating plant.

Loop Not in Normal Mode


A critical process input flow loop is designed to run normally in Cascade mode with its setpoint set by a composition loop (the loop's Normal mode element has been configured as Cascade). However, on the midnight shift, the operator changes this flow loop to Auto because of wide fluctuations in the setpoint. The next morning, the process engineer for the plant sees that DeltaV Inspect flagged the actual mode as being incorrect for more than one percent (1%) of the time. The process engineer can use this information to quickly determine that a problem existed in the primary loop tuning. By quickly identifying and resolving this problem, the process engineer can minimize any off-specification product that resulted from manual adjustment of this key flow.

Limited Output
An instrument technician for a power plant notices DeltaV Inspect showing the oil flow control loop as being limited in operation. The instrument technician finds that the setpoint for the oil header pressure control was below the design pressure, forcing the oil valve to go completely open under heavy load conditions. By adjusting the pressure back to its designed target, the oil valve can now meet its setpoint without going completely open.

Uncertain Input
DeltaV Inspect flags a key temperature measurement as Bad over one percent (1%) of the time over the last day. The instrument technician examines the transmitter calibration again and finds that the device was calibrated for too low of a temperature range. The instrument

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 20 of 258

technician resolves the problem by recalibrating the transmitter for the correct temperature range. Recalibrating the transmitter might improve the accuracy of the measurement. Any improvement in accuracy of the measurement also improves the process operation.

High Variability
During normal operation of the plant, a plant engineer sets all Variability Limits to the current value plus ten percent (10%). After a few weeks, he notices that DeltaV Inspect flagged a critical flow loop as having excessive variability. Upon further investigation, he finds that the valve positioner connection to the valve stem is loose and is causing the control loop to cycle severely. After fixing the valve positioner, Variability Index returns to its normal value. Note The normal value for the Variability Index limit for a specific block varies with the associated process dynamics, normal disturbances, and so on. Use DeltaV Inspect to detect when Variability Index increases dramatically from its normal value. Often, such an increase indicates a change in the process, measurement element, or control element that needs attention.

DeltaV Tune
Inside this topic DeltaV Tune implements a relay oscillation principle. This principle is based on the patented Astrm-Hgglund Algorithm for calculating the tuning parameters of a process control loop. Emerson Process Management has enhanced this algorithm with a patented technique for identifying process deadtime. During tuning, the output of the Proportional Integral Derivative (PID) or Fuzzy Logic Control (FLC) block that is selected for tuning is determined by a known function that acts as a relay with hysteresis. This relay provides two-state control and causes the process to oscillate with a small, controlled amplitude. Using the amplitude and the frequency of this oscillation, DeltaV Tune calculates the Ultimate Gain and Ultimate Period of the process. The controller settings are then computed based on the defined process parameters and selected process type. Optionally, tuning rules for modified Ziegler-Nichols, Lambda, or Internal Model Control can be selected in determining the best loop tuning. To check and allow further refinement of tuning, DeltaV Tune provides simulated loop response, robustness plotting, and robustness based tuning. DeltaV Tune: Uses a field-proven method implemented since 1986 in Fisher-Rosemount Systems' stand-alone DPR 900 controllers. Uses a patented tuning principle. Applies a well-proven theory of operation.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 21 of 258

Is applicable to a wide range of processes because no specific model is assumed. Can start tuning when a loop is in either a manual (Man, ROut) or automatic mode (Auto, Cas, RCas). Is suitable for both fast and slow processes. Has an easy-to-use operator interface. Is integrated with the DeltaV environment. May be used to tune PID blocks assigned to execute in fieldbus devices. Provides a wide range of controller designs for various user needs (modified Ziegler-Nichols, Lambda, Internal Model Control). For information on how to use DeltaV Tune to tune PID and FLC blocks, refer to the Using DeltaV Tune topic.

Loop Tuning
Once a control loop is designed and configured to govern a specific process, it must be tuned. Making the necessary adjustments to provide for stable and responsive operation of the process is referred to as loop tuning. If a loop is tuned for responses that are too slow, the process is stable but not responsive. If the loop is tuned for responses that are too fast, it can be very responsive, but it might overshoot and cycle around the setpoint (SP). The objective is to achieve a reasonably responsive and stable control loop. The most common methods of loop tuning are calculated tuning and trial and error tuning. The calculated method involves computing the tuning values using known constants and algorithms. The trial and error method involves manually adjusting the tuning values until the process is stable. The calculated method is superior to the trial and error method because it requires a small number of cycles to achieve the desired results. If a process is slow, using the calculated method can be extremely advantageous to using the trial and error method. The primary control blocks provided in DeltaV software are the PID and the FLC blocks. You can use DeltaV Tune with the PID block to calculate the proportional, integral, and derivative terms automatically for a particular process based on the process type and tuning rule you select. DeltaV Tune can automatically calculate the fuzzy scaling for error, change in error, and change in output to give the best response when you use the FLC block for control. DeltaV Tune is distributed between the DeltaV workstation and the DeltaV controller. You can only initiate tuning if you have sufficient privilege at the DeltaV workstation being used to view and interact with DeltaV Tune. Time-critical features associated with the process identification are implemented in the function block. This approach allows the process dynamics to be captured precisely without introducing errors by communication delays. The portion of DeltaV Tune in the workstation supports viewing controller parameters and tuning calculation based on the process dynamics captured by the PID or FLC function block. Conceptually, this distribution of functionality can be

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 22 of 258

shown in the following manner:

Distribution of DeltaV Tune In the process identification phase of tuning, the PID or FLC block actual mode switches to Local Override (LO). Once in LO mode, the operation of the loop's primary control algorithm is suspended, and the controller resident relay identification adjusts the control block output (OUT). The DeltaV workstation contains the tuning rules used to calculate the PID tuning (gain, reset, and rate) or FLC scaling factors. These newly calculated values are displayed at the DeltaV workstation, and you are given a choice to accept the new values, calculate different tuning values, or continue operating with the present tuning values.

The Tuning Algorithm

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 23 of 258

Tuning System for Determining Process Dynamics The above figure illustrates the tuning system for capturing process dynamics using the relay oscillation principle. During the identification procedure of loop tuning, the mode of the PID or FLC block changes to LO and the output is determined by a two-state (or relay) function. During this phase of tuning, the loop is under two-state control. As indicated previously, loops under two-state control exhibit slight oscillations. The amplitude of these oscillations defines the Ultimate Gain. The oscillation period defines the Ultimate Period. The Ultimate Gain (Ku) is defined by the following equation:

where d - relay amplitude a - amplitude of the oscillation of the process variable (PV) Having identified the Ultimate Gain and the Ultimate Period, you can determine the controller PID settings using the modified ZieglerNichols rules. You can also determine the process deadtime based on the initial phase of the oscillation test. Based on a knowledge of the deadtime, Ultimate Gain, and Ultimate Period, DeltaV Tune can calculate the process time constant and static gain needed for model-based

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 24 of 258

tuning (Internal Model Control tuning and Lambda tuning) available in DeltaV Tune as options.

Tuning Period The following figure illustrates a typical time plot of the relay output and the process variable (PV) during tuning. Note that the relay is triggered at the point when the PV passes through the SP. The relay amplitude (d) is typically 3 to 10 percent of the controller output range. For a DeltaV control block, this corresponds to the percent change in OUT. The PV change (a) is largest during initialization (that is, during the first oscillation period). Typically, the PV change ranges from 1 to 3 percent of the PV range.

Relay Output and Process Output During Tuning Oscillations must continue for at least one period after initialization. If more periods are used for tuning, the average amplitude of the oscillations is used to determine the Ultimate Gain. DeltaV Tune uses two tuning periods by default and defines the amplitude of the oscillations as the average amplitude.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 25 of 258

During the oscillation periods after initialization (the tuning periods), relay switching is disabled at the start of each half period to increase the tuner's resistance to noise. The duration that the relay switching is disabled depends on the deadtime of the tuned loop, which is defined during the initialization period.

Relay Hysteresis For very noisy processes, you can adjust the amount of relay hysteresis for additional noise protection. With hysteresis, the relay switches only if the PV passes through the SP by a specified amount. Under stable conditions, the relationship of input and output can be expressed by the transfer function. Generally, a process transfer function can be represented by a magnitude (or amplitude) and an angle (or phase shift). When the frequency varies from 0 to infinity, the transfer function changes. The resulting curve is called the Nyquist curve. The following figure shows a typical Nyquist curve for a control loop at the tuning.

Example of a Nyquist Curve For a relay with hysteresis, the describing function, N(a), defines the relationship between the relay input and the output.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 26 of 258

where N(a) is the describing function of the relay. is the relay hysteresis. d is the relay amplitude. a is the amplitude of the oscillation of the process variable (PV). i is the imaginary component. N(a) amplitude is considered an approximation for the Ultimate Gain. Note that with hysteresis, shown in the above formula. , N(a) is exactly the Ultimate Gain, as

However, with hysteresis, the frequency and gain determined by the oscillation are not exactly the Ultimate Period and the Ultimate Gain. As illustrated in the above figure, the hysteresis introduces an error in defining the critical point of the Nyquist curve. To prevent the introduction of additional errors, only set the relay hysteresis when DeltaV Tune will be operating in an extremely noisy environment.

Using DeltaV Tune


Inside this topic The DeltaV Tune window leads you through the steps used to tune a loop. This allows tuning to be completed quickly and with minimal input. The typical tuning procedure is performed in the following sequence: 1. Select the PID or FLC block to be tuned in Control Studio or DeltaV Explorer, right-click the block, and select Tune. You can also initiate tuning from the Start menu. 2. Identify the process dynamics. This is done automatically by the DeltaV Tune test initiated at your request. 3. Select the basis for tuning either by specifying the process type or the tuning rule to be used.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 27 of 258

Before tuning a loop, the PV should be reasonably stable and near the SP. If the loop is not stable, the calculated control variables will be inconsistent and possibly inaccurate. Note Before starting the tuning process, make sure that the loop is reasonably stabilized at the SP. Observe the noises and disturbances of the system. If the controller output is constantly changing due to noise or disturbances, you might consider beginning tuning the loop from the Manual mode. This approach will provide you with better results. If the loop you are tuning has an extremely high noise level, the tuning calculated by DeltaV Tune might be inconsistent. If the PV is stable but the controller output is constantly changing, your process loop might require noise protection. If the PV and the controller output are stable, you can start tuning the loop as outlined in this section. You can use DeltaV Tune if you have Tuning and Control keys assigned to your user account. If this is your first time using DeltaV Tune, you might want to use simulator modules for PID and FLC before using DeltaV Tune on a live process. For more details, refer to The Simulator Configuration topic. Selecting Function Block to Tune DeltaV Tune can be used with a PID or an FLC block. Tuning can be initiated from Control Studio, the DeltaV Explorer, the operator faceplate, or the Start menu. To initiate DeltaV Tune from Control Studio, click the Tune option as shown below:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 28 of 258

To initiate DeltaV Tune from the DeltaV Explorer, select a module assigned to a controller or the specific block of a module. If you select at the module level, you must type in the block name at the first DeltaV Tune screen.

In DeltaV Operate, a button is provided to select DeltaV Tune from the detail display of the DeltaV dynamos for the PID and FLC block.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 29 of 258

Alternatively, you can invoke DeltaV Tune from the Start menu as shown below:

After selecting DeltaV Tune, the DeltaV Tune window appears. If you request a particular block or module, it is shown as the Block Name in the Select loop to tune panel. Alternatively, you can select either Select Function Block or Open File and choose the block to be tuned. By selecting Open File, you can use a previously tuned block as the starting point for tuning this block again. If you select Open File, the last tuning settings and process dynamics for the associated block become the starting point for the tuning process. Once the block selection is complete, you can begin the process identification phase of DeltaV Tune.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 30 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 31 of 258

Using DeltaV Tune with Fieldbus Devices You can use DeltaV Tune with PID blocks executing in fieldbus devices as well as with PID and Fuzzy logic blocks assigned to execute in the controller. You have several options on how to implement control options with fieldbus devices: You can assign all elements of the control loop to fieldbus devices. You can assign the loop PID to the transmitter or the valve. You can assign portions of the control loop, such as the PID, to the DeltaV controller and assign the remaining functions, such as AI and AO, to fieldbus devices. There are several things that affect control performance when using fieldbus devices: Function block execution, maximum response time for compel data minimum schedule spacing, and slot time depend on the device technology and design (depend on the device manufacturer). Whether control is performed in the fieldbus device or control system. The scheduling of block execution and communications on the Foundation fieldbus segment. As the following figure illustrates, you can achieve the minimum execution time by having only one control loop on an H1 segment.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 32 of 258

Macrocycle is the time for scheduled and unscheduled communications. Scheduled communications includes function block execution time and transfer time (minimum schedule spacing). Unscheduled (asynchronous) communications are for Client-Server types (Function Block Views, SP changes, and Device Alarms for example). A minimum time for unscheduled is added to determine the macrocycle time. If you split control between fieldbus devices and the DeltaV controller the execution of the module in the controller is not synchronized with the function block execution in the fieldbus segments. This lack of synchronization introduces a variable delay in the control loop as great as the segment macrocycle. For example, a 1/2 second loop in which control is split can have as much as 1/2 second of additional variable delay. The added delay affects control loop tuning and can result in and increased variability in a fast control loop. The recommended way to split control between fieldbus devices and the controller is to execute control loops in fieldbus devices when the process dynamics are fast, for example, liquid pressure or flow. For example, for better performance, implement a loop with an execution time of 1/2 second or less in a fieldbus device and limit the number of control loops to no more than two per H1 segment. DeltaV Tune uses a hidden modifier to the PID block to capture process dynamics. In most manufacturer's fieldbus devices, this modifier is attached to a PID block in the controller that shadows the PID block in the device. You cannot see the PID block in the controller, or its hidden modifier. All new Emerson fieldbus devices will include the hidden modifier in the PID block in the device. This eliminates errors introduced by communications delay or jitter and supports tuning of even the fastest loops. There are no changes to how the DeltaV Tune interface looks

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 33 of 258

and operates. The ability to tune loops running in fieldbus devices leads to reduced variability for fast process dynamics.

Identifying Process Dynamics After you select a block for tuning, DeltaV Tune must identify the process dynamics associated with the control loop. Look at the Test Process panel on the left side of the DeltaV Tune window.

Process dynamics are determined automatically by DeltaV Tune. If the controlled parameter (PV) reflects an accumulation or imbalance between inlet and outlet flow, select the Integrating process. The percent change in the PID block output from its initial value is determined by the selected step size. A default step size of 3 percent is sufficient for most situations. For most processes, start tuning with a step size of 3 percent. If the gain of the loop is high or the process is integrating (not self-regulating), use 3 percent initially. Use a step size of 5 or 10 percent if tuning does not develop oscillations with a 3 percent step size. The tuning might not develop oscillations if the gain of the loop is extremely low or the loop has too much noise. However, a 10 percent step size is not recommended for integrated processes. In some cases, process measurement is noisy or characterized by significant load disturbances. If such conditions exist, better results might be achieved by using relay hysteresis or by extending the length of testing. If the process characteristics such as gain, time constants, noise, scaling, and so on seem out of the normal range, click the Default Process button to modify the tuner settings to better fit the process characteristics. Note that the Expected Process Response option is not supported for PID blocks running in fieldbus devices.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 34 of 258

After checking these entries and making the appropriate changes, click Test to initiate testing of the process and identify process dynamics. Caution Before starting the tuning process, make sure that the loop is reasonably stabilized at the SP. If the PV is not close to the SP, begin tuning the loop from Manual mode.

After selecting Test, the PID block output adjusts from its initial value by the step size. You can stop testing at any time by clicking the Abort button. When testing is not active, you can change the target mode and the SP of the block from the Controller panel. You can change output when mode is in Manual. Typical changes made during testing in the PID block output (Output), input (PV), and actual mode are shown in the following example.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 35 of 258

When tuning a loop, the SP and output should not be at either end of their respective ranges. The output must be no lower than 10 percent of the range and no higher than 90 percent of the range or the oscillations will be affected. The PV of a loop should be close to the SP when you begin tuning. DeltaV Tune checks the values for the SP and the PV before tuning the loop. If the deviation is too large, this indicates that the loop is not stable enough to begin the tuning process. The tuner waits until the SP-PV value is within the required limit. If, under normal operations, either the SP is not close to the PV, the loop is influenced by disturbances, or a loop is in a transient condition, the tuning results will not be as accurate and consistent as those from properly stabilized loops. If tuning proceeds properly, the state changes to an active state, and the control block actual mode changes to Local Override (LO). The time between each change in the block output depends on the process response time. For example, a change in the process input (block output) might not be immediately reflected because of process delay in the controlled parameter (block PV). Watch the Trend display area during the tuning process. If loop trend traces are not typical or tuning does not start, restore the initial loop conditions by clicking the Abort button. While testing is active, status is shown as Testing process in the Test Process panel. The progression of the testing is indicated by a bar graph showing percent completion, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 36 of 258

Once testing is successfully completed, the loop returns to the original mode and original output. The process dynamics that were identified are shown in process results for a self-regulating process, as shown in the following figure.

When Integrating process is selected, the process dynamics for an integrating process are displayed, as shown in the following figure.

The dynamic values displayed vary with the process controlled by this block. You can repeat the tuning procedure for the same loop by selecting Test again. If abnormal conditions are detected during testing that might impact the accuracy with which the process dynamics can be identified, a warning or an error message is issued. When the detected condition prevents testing to be completed successfully, an error message is generated and tuning is stopped. Once testing is successfully completed, proceed to the central area of the Tuning Calculation panel. Here, you can supervise tuning

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 37 of 258

calculations based on the identified process dynamics. If testing did not complete successfully, an appropriate warning message is issued.

Establishing Loop Tuning In the loop tuning phase for a PID block using the Normal selection, the following Tuning Calculation panel appears:

The Desired Response options are Normal, Slow, and Fast. If an FLC block is being tuned, the Tuning Calculation panel displays the recommended scaling factors for the FLC block, as shown below:

The recommended block settings are provided automatically, based on the identified process dynamics, the process type, and the loop

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 38 of 258

response selected in this panel. When using the Normal setting, tuning calculations are performed by non-linear estimators. Non-linear estimators correct major deficiencies of Ziegler-Nichols tuning: too short controller integral time for processes with small deadtime to time constant ratios excessive controller integral time for processes with a significant deadtime excessive controller gain for processes with small deadtimes You can modify the recommended tuning values by entering the values you want into the fields provided. To transfer these settings from the workstation to the PID or FLC block, select Update=> in the bottom of the panel. After selecting Update=>, the recommended settings are transferred to the block, and the new tuning values are displayed as the current settings. To restore the original settings, select Restore in the Controller panel. The default process type for a PID block using the Normal selection is Typical - PI. This default is used for the initial tuning recommendation unless you change the process type. However, if this selection does not match the process, you must change the process type to one of the following selections: Typical - PID Temperature Gas Pressure Flow Liquid pressure Tight Level Deadtime dominant After you change the selection, the recommended tuning is updated. If the process is identified without messages, the results are displayed in the Process test results area. If the identified process deadtime is greater than a quarter of the time constant, you can improve loop performance by clicking Options | Expert. If the identified process deadtime is greater than the time constant, select Deadtime dominant. If you have applied the Smith predictor in your control module (refer to the PID_DEADTIME Module Template topic), click Options | Expert and then select Lambda Smith Predictor in the Tuning Calculation panel. The following information applies to PID function block tuning: The loop response specifies the speed at which a control loop responds to process upsets and SP changes. The recommended proportional gain for a particular process changes depending on the loop response. The default setting of Normal gives moderate

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 39 of 258

response. By selecting Fast, the controller output change is greater and loop's response faster. Selecting Slow has the opposite effect. If, after determining the process characteristics, the process gain is less than .6 or greater than 2.5, model-based tuning is not recommended. If the Expert option is not selected, you are then using the modified Ziegler-Nichols tuning rules. This is the default selection and should be used as a first choice. However, if you find that the tuning results are not satisfactory, you can then click Options | Expert. If you select Use model-based tuning, you are then using one of the following: the Lambda PI tuning rules with a Lambda factor of 1.5 for Normal Selection, 2.0 for Slow Selection, and 1.25 for Fast Selection or the IMC PID tuning rules with a filter factor of 1.5 for Normal Selection, 2.0 for Slow Selection, and 1.25 for Fast Selection. If you want to change some of the tuning factors, click Options | Expert and then change the desired factors. For a more detailed discussion of this feature, refer to the Expert Feature topic. Once tuning is complete, you can change the setup and calculate new values, try tuning the loop again, or modify the calculated values. You can use the DeltaV Tune Trend display area to monitor the loop response with the new tuning.

Manually Entering Model Parameters If for some reason you cannot test the process or the process test results do not satisfy your expectations, you can enter or correct the Tune process model manually for both PID loops and FLC loops. For PID loops, click on any process model parameter in the Test Process section to open the Process Model Parameters Dialog.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 40 of 258

Parameters marked by an asterisk (*) must be non-zero for the selected process type of tuning method. The dialog displays five parameters for non-integrating processes and four parameters for integrating processes. Two or three parameters are marked for particular selections. After clicking the OK button, the entered process model is used for the PID parameter calculations. The procedure for manually entering model parameters for FLC loops is identical to PID loops. Be aware that you may not get the expected FLC superior performance if the process dead time to time constant ratio exceeds 0.25. In this case, DeltaV Predict is likely to provide better results.

Using Other Features


DeltaV Tune can be used on various processes that operate over a wide dynamic range. This section describes how the default settings associated with trend scaling, testing amplitude, and duration can be changed to compensate for the process range or operating conditions. Following the information in this section ensures that the best possible tuning is achieved for all operating conditions. The Expert selections available in tuning and the options available for saving or printing block tuning are discussed as well. Also included is detailed information about the offline simulation capability that is provided with this product to support DeltaV Tune training.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 41 of 258

Modifying the DeltaV Tune Trend Display Area In the top of the DeltaV Tune window, a trend of the block PV, output, SP, and actual mode is shown. You can adjust the time frame displayed for the parameters shown in the Trend display area using the following selections shown in the toolbar: Scroll Back - Shifts the trend information back in time by one screen. Small Back - Shifts the trend information back one unit in time. Small Forward - Shifts the trend information forward one unit in time. Scroll Forward - Shifts the trend information forward in time by one screen. Decrease time span - Decreases the time represented by the Trend display area by approximately 25 percent. Increase time span - Increases the time represented by the Trend display area by approximately 25 percent. The span of the PV, SP, and Output are initially displayed in full range. You can modify the trend range to show values over a smaller or larger range than the default value. In the Controller panel, right-click the box associated with the parameter (SP, OUT, or PV) whose trend range is to be modified.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 42 of 258

Then, click Set Y Scale and select either Manual or Auto Scale. Select either the Compress range or Expand range button provided in the toolbar: Compress range - Reduces the span of the selected trend range by approximately 10 percent. Expand range - Increases the span of the selected trend range by approximately 10 percent. Expert Feature The Expert feature allows you to retain all Normal selections and select your specific tuning rule to use with the loop response in calculating the best tuning of a PID block. When you click Options | Expert, the available tuning methods for the PID are displayed in the Control Panel area, as shown in the following figures. The figure on the left shows the tuning method selections for non-integrating process and the figure on the right shows the selections for integrating processes. Enable this option by selecting the Integrating process checkbox in the Test Process area.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 43 of 258

Note: If you are using the Expert feature you should have expert knowledge of the process you are tuning. You must use the Expert feature with care and always check that the time constant DeltaV Tune calculates represents the actual process time constant. Because the Normal tuning rules give good results in most cases, we recommend the use of the Normal selection for most applications. Some of the tuning rules provided in advanced tuning are very specialized. For PID and PI loops, use Lambda or IMC tuning rules first. These settings should be satisfactory in most cases. If you have a thorough understanding of loop tuning, you can use some of the alternate tuning rules. If the tuning results are not satisfactory, you can change the rule selection. For non-integrating processes, the Expert selection provides the following tuning rules: Ziegler-Nichols - PI - This tuning rule provides the basic rules for calculating controller settings from ultimate gain and ultimate period. Lambda - PI - This tuning rule allows the desired ratio of closed loop time constant to open loop time constant to be specified through the Lambda factor. Lambda - Smith predictor - This tuning rule should be used with the PID_DEADTIME Module Template. Internal Model Control - PID - This tuning rule provides proportional, integral, and derivative control and assumes a first order process with a time delay. During tuning, the model is identified and the tuning values are calculated. The procedure for identifying the model is a patented Fisher-Rosemount Systems technique. For integrating processes, the Expert selection provides: Lambda - Averaging Level - PI - This tuning rule is similar to the Lambda tuning rule, but it works for integrating level loops. The IMC tuning rule is especially useful when a process deadtime is longer than half of the process time constant. The process deadtime and the process time constant are shown in the Process Test panel. The Tuning Method options in the Expert Feature include the alternate tuning rules, Typical - PI and Typical - PID, which are also available

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 44 of 258

when using the Normal selection. When a process deadtime is equal to or greater than the process time constant, it is beneficial to apply Smith Predictor. For more information regarding application and tuning details, refer to the PID_DEADTIME Module Template topic. To change the Expert setting, you do not have to retune the loop. Once DeltaV Tune has obtained the process dynamics for a loop, DeltaV Tune can calculate new controller settings for different Expert selections.

Saving and Printing Block Tuning When tuning a block, you can save the current test data to a file by clicking File | Save File. The parameter values used in the tuning process are saved in the DeltaV Tune folder under DVData. By clicking File | Save File As, you can specify the folder. When you have finished tuning and are closing DeltaV Tune, you are also given an opportunity to save. When initiating DeltaV Tune, it is possible to start the tuning process using previously saved values. After tuning a block, you can obtain a hard copy of the tuning parameters and selections made in DeltaV Tune. You can initiate this request either by selecting the Print option under File or selecting the print icon in the toolbar. In response, a single page summary of the parameters used in tuning is printed on the user-specified printer.

The Simulator Configuration As part of DeltaV Tune, two modules containing simulated PID and FLC blocks are provided with your DeltaV system. These modules can be used as a training tool that allows you to become familiar with the tuning procedure before applying it to the actual process. The simulator modules contain function blocks that simulate a heater process. In order for these modules to be referenced by DeltaV Tune, you only need to download the simulator modules to a DeltaV controller. The following module templates found in the DeltaV library for the process simulator are provided in the Simulate folder: DeltaV Tune Simulator Modules Description Tag Comments PID test loop with process simulation

PID Loop and SIM_SR_PID Process Simulation

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 45 of 258

Fuzzy Logic Loop and Simulation

SIM_SR_FLC

Fuzzy test loop with process simulation

Note You only need to download the simulator modules to one DeltaV controller. You can view the simulation modules with an interface created by special simulation Dynamos. When you select the detail display from the faceplates for these Dynamos, a representation of the simulated process is shown. These simulator modules do not use real I/O; therefore, they will not interrupt any other module's operation currently running in the controller.

Simulated Response and Robustness Features


Inside this topic By clicking the SIMULATE button, you can get simulated loop responses for FLC and PID control blocks and robustness plotting and tuning for the PID control block. Simulated responses use the identified process parameters, not the simulation modules described in the previous topic.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 46 of 258

Upon clicking SIMULATE, you will get the following responses: If the control block is an FLC, the simulated response window will open with a simulated setpoint response. If the control block is a PID, the recommended tuning parameters will be checked for stability and the PID structure checked for validity and normalcy. If you select the integrating process check box and the PID structure is one of the I+D structures, then a message will be

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 47 of 258

displayed indicating an invalid configuration. You will not be able to proceed to the Simulated Response and Robustness window. If the robustness calculations determine that the recommended tuning parameters yield an unstable result, a message will be displayed indicating unstable tuning. You can proceed to the Simulated Response and Robustness window by clicking OK in the message box. If you do not select the integrating process check box and the structure is a P+D, then a message will be displayed indicating that this is an unusual configuration. You may proceed to the Simulated Response and Robustness window by clicking OK in the message box. If there are no unusual or invalid conditions, then the Simulated Response and Robustness window will be opened without any warning messages.

Simulated Response and Robustness Layout In the bottom half of the window, there is a simulated response trend plot with performance variables and simulation selection buttons on the right. In the upper right quandrant of the window, there are entry and recommended tuning parameter display boxes with a RECOMMEND button immediately below them. If the control block is a PID, DT Margin and (if you selected the integrating process check box) % Surge are displayed just below the RECOMMEND button. If the control block is an FLC, DT Margin and % Surge are not displayed.

Simulated Response You activate the first simulated response when you open the window using the SIMULATE button. Any new tuning parameter entries (or, for the PID, any new robustness map tuning selection) will cause a new simulated response to appear immediately. You may select whether you want a setpoint or disturbance step response simulated for the entry and/or current recommended tuning parameters. Make your selections as follows: To select setpoint (SP) or disturbance simulated response, click either the SP or DISTURBANCE button. To cause the current recommended tuning parameter response to be presented with the entry tuning parameter response, select the CURRENT check box. Any change in your selections will cause the simulated response plot to be updated. There are three (3) performance variables that are updated after every new simulated response. Overshoot Presented as percent of step change by which the process variable overshoots the new setpoint. IAE Integrated Absolute Error is presented for all SP responses. IAE will also be displayed for disturbance responses if you did not select the integrating process check box before you clicked the SIMULATE button.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 48 of 258

Arrest Arrest is displayed for disturbance responses if you selected the integrating process check box before clicking the SIMULATE button. Arrest is the time it takes for the control to stop the process variable movement away from setpoint. It is also the time at which the maximum error during the response time occurs.
Entry and Recommended Tuning Parameters

You may enter the entry tuning parameters in either of the following ways: Directly by clicking one of the parameter display boxes and entering new value(s) By clicking within the robustness plot You may update the recommended tuning parameters with the entry tuning parameters by pushing the RECOMMEND button. The recommended parameters may be updated to the control block in the controller with the UPDATE button on the main DeltaV Tune main window.

Robustness Plot The robustness plot presents a range of tuning parameters in the form of an area or a line. The horizontal axis is the Gain Margin (dimensionless ratio of gain at which the loop will become unstable to the gain of the controller). The vertical axis is the Phase Margin in degrees. The robustness plot is only displayed for the PID function block. This plot is displayed as an area whenever the PID structure is one of the P+I+D types. Otherwise, it is a line. In the unusual case where the PID structure is a P+D type and you did not select the integrating process check box, the robustness plot will be a horizontal line with an unlabelled phase margin axis. You may select new entry tuning parameters by clicking within the presented area (or near the line if that is what is presented). This action will update entry tuning parameters and trigger a new simulated response. Entry tuning parameters are annotated by a triangle. Recommended tuning parameters are annotated by a rectangle. Annotations are moved to the correct location on the map whenever the respective tuning parameters are adjusted. If a tuning parameter set is outside the area or off the line, the annotation will be displayed in yellow. If the robustness calculations determine that a tuning parameter set is unstable, the annotation will appear in red at the bottom left corner of the robustness plot.
DT Margin

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 49 of 258

DT Margin is the amount of process deadtime increase (in seconds) that causes a loop to become unstable. It applies to the entry tuning parameters, whether selected from the robustness plot or entered directly. Whenever entry tuning parameters are detected as unstable, DT Margin will be displayed as N/A. DT Margin is only displayed for PID control blocks.
Percent (%) Surge

This variable is only displayed when the integrating process check box has been selected. It represents the percentage of tank capacity used to absorb a 100 percent difference in process input (PID output) and load. % Surge is only displayed for PID control blocks.

Application Guidelines
Inside this topic DeltaV Tune is a flexible tool that is suitable for tuning most control loops. Because it is flexible and easy to use, DeltaV Tune requires little initial setup. However, to achieve the best results with DeltaV Tune, adhere to the guidelines specified in the Tuning Rules and Selecting a Controller Design topics.

Tuning Rules To obtain proper tuning results, observe the following basic rules: Equipment must be in good operating condition. Studies on thousands of loops showed that valve problems cause 30 to 35 percent of loop tuning problems. This means that one out of every three loops needs valve improvements to make proper loop control. If the calculated values seem out of the ordinary, this might indicate valve problems. If the gain of the calculated values is too high or the reset is too small, check your valves. Many valves experience the stem's sticking or hysteresis in movement that cause improper model identification and loop tuning. Before tuning a loop, the loop must be stable. DeltaV Tune allows you to start tuning when the difference between the SP and the PV is

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 50 of 258

large. However, to achieve optimal results, make sure that PV is close to SP before you start tuning. If the SP and PV values are not close, a warning is issued when Test is initiated. After you select Force, the identification continues. The Step size must be large enough for the tuner to oscillate. The output (OUT) change (or Step size) must cause an appropriate change in the PV. If the change in the PV is not large enough, the tuning process might not start at all because there are no self-oscillations. Full oscillation might not be observed under the following conditions: Load disturbances affect the PV. The system is too noisy. A valve is stuck. If no oscillations occur, stop DeltaV Tune by clicking the Abort button. Then, check for anything that might affect the oscillations. Your process must be able to make the step change required for tuning. Make sure that the step change does not cause a relief valve to open or any interlocks to be triggered, either of which could affect the tuning results. When tuning, neither the SP, the PV, nor the output (OUT) should be near its limits. When you tune a loop, the SP and PV should not be within 10 percent of the loop's engineering unit limits and the output (OUT) should not be within 10 percent of the configured limits. If these values are outside of the specified range, the oscillations could be affected and the calculations of loop dynamics would be inaccurate.

Selecting a Controller Design DeltaV Tune provides a wide choice of tuning rules and features that can be used to provide the best tuning for a loop. Here are some general guidelines: After you change tuning values, observe the loop for a period of time to see its reaction to noise, disturbances, or small SP step changes. If the loop performance is not satisfactory, first change the setting for Loop Response (Normal, Slow, or Fast). As a second adjustment,

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 51 of 258

modify the process type or click the Expert button to use an advanced tuning rule. If the loop performance is still not satisfactory, you can try an alternative process type or the Expert tuning selection (without retuning the loop). General guidelines for tuning rule selection: The PI design is the most common choice for flow, liquid level, and gas pressure control. PID control, along with feedforward and cascade strategies, is often used for temperature control, pH control, and composition control. (The composition control might require some limits on derivative action.) If you have tuned a loop by trial and error and it works well, you might consider using DeltaV Tune to verify your settings and tune your loop more precisely. If the values calculated by DeltaV Tune are drastically different than your trial and error values, consider the new values closely before changing block tuning parameters. The PID designs are limited for some applications. For example, if the ratio of the time delay of a loop to time constant exceeds 1, the PID performance cannot be guaranteed. The tuning results must be carefully verified. If the response is not acceptable, you might need to modify the tuning results. For such applications, using the Smith predictor for control might provide better results. (Refer to the PID_DEADTIME Module Template topic.) For more information on rule selection and associated controller designs, refer to the Expert Feature topic. Application Examples This section provides some general application examples to help you use DeltaV Tune to tune your process loops. The following sections provide examples of a single feedback loop, a cascade control loop, and a feedforward control loop.
Tuning a Single Feedback Loop

For an example of tuning a single feedback loop, refer to the temperature loop in the following figure. In this example, steam is fed into the heat exchanger, and water is passed through a header in the steam heater. The water absorbs heat from the steam.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 52 of 258

Steam Heater In the Tuning Calculation panel, the process type should be Temperature. You would probably start tuning this loop with a Normal loop response setting, unless the loop has some unusual characteristics. If you select the Expert button, then you should start tuning with a tuning rule for PID. After tuning the loop and placing it in operation, observe the response to SP changes and load disturbances caused by process upsets. If the loop demonstrates too much overshoot, first try changing the loop response to SLOW and update the tuning. If you still experience too much overshoot for the process, you can select a different advanced tuning rule with lower gain. You can experiment with different tuning rules until you get the results you want.
Tuning Cascade Control Loops

You can use DeltaV Tune to tune cascade control loops. However, because the loops for cascade control are interactive, you must tune them in a particular order. You need to tune the secondary (or slave) loop first and the primary (or master) loop last. For example, refer to the cascade loop for controlling level in the following figure. The primary loop controls the level. The secondary loop controls the inlet flow.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 53 of 258

Cascade Level Control To use DeltaV Tune to tune the cascade control loop in the above figure, perform these steps:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 54 of 258

1. 2. 3. 4. 5.

Put the secondary controller into Auto or Man mode to allow the loop to settle. Tune the secondary loop as if it were a single feedback loop using DeltaV Tune. Switch the secondary controller to Cascade mode. Adjust the SP of the primary controller to match the PV. Tune the primary loop using DeltaV Tune.

Use these same steps for tuning most cascade loops.


Tuning Feedforward Control Loops

You can tune the feedback portion of a feedforward control loop using DeltaV Tune, but you must hold the feedforward value constant during tuning. Begin with the Normal dynamics setting. The temperature control feedforward loop in the following figure is similar to the single-loop steam heater example, but the flow rate for the water flowing into the heat exchanger is fed forward to the temperature controller. To use DeltaV Tune to tune the feedforward control loop in the following figure, perform these steps: 1. Disable the feedforward portion of the loop and hold the input constant. Typically, you can disable the feedforward input by changing the FF_ENABLE parameter of the block from True to False. 2. Using DeltaV Tune, tune the control loop as if it were a single feedback loop. 3. Return the feedforward portion of the loop to normal operation by setting FF_ENABLE parameter of the block to True.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 55 of 258

Feedforward Control Diagram Use the same procedure to tune most feedforward control loops. The guidelines and examples contained in this section are suggestions for typical control loops. Select the approach that is best for your particular application.

DeltaV Fuzzy

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 56 of 258

Inside this topic DeltaV Fuzzy uses the Fuzzy Logic Control (FLC) function block to provide an advanced alternative to standard PID control. The FLC function block provides the control capability of the PID block with the added benefit of superior response for both setpoint changes and external load disturbances. By using fuzzy logic, the FLC function block minimizes overshoot and provides good load disturbance rejection. The scaling factors of the FLC function block can be automatically established using DeltaV Tune. Note Fuzzy Logic Control advantages are the most evident in controlling processes with small dead times. When the dead time to dominant time constant ratio exceeds 0.25, DeltaV Predict is recommended because it is likely to provide better results. The FLC function block operates by using predefined fuzzy rules, membership functions, and adjustable parameters known as scaling factors. The FLC function block translates the loop's absolute values into fuzzy values by calculating the scaled error (e) and scaled change in error (e) in addition to the degree of membership in each of the predefined membership functions. It then applies the fuzzy rules and, finally, retranslates the values into a control move.

Fuzzy Logic Control Function Block This function block supports mode control, signal scaling and limiting, feedforward control, override tracking, alarm limit detection, and signal status propagation. For details on the parameters supported and their uses, refer to the Fuzzy Logic Control Function Block topic.

Fuzzy Logic Principles

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 57 of 258

The nonlinearity built into the FLC function block reduces overshoot and settling time, achieving tighter control of the process loop. Specifically, the FLC function block treats small control errors differently from large control errors and penalizes large overshoots more severely. It also severely penalizes large changes in the error, helping to reduce oscillation.

Two Membership Functions


The Fuzzy Logic Control function block uses two membership functions: the input signals are error and change in error, and the output signal is the change in control action. The relations among these three variables represent a nonlinear controller. The nonlinearity results from a translation of process variables to a fuzzy set (fuzzification), rule inference, and retranslation of a fuzzy set to a continuous signal (defuzzification). The two membership functions for error, change in error and change in output are negative and positive. The membership scaling (Se and Se) and the error value and change in error, respectively, determine the degree of membership.

Error Membership Functions

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 58 of 258

Change in Error Membership Functions The change in output membership functions are called singletons. They represent fuzzy sets whose support is a single point with a membership function of one. The membership scaling (Su) determines the magnitude of output change for a given error and change in error.

Change in Output Singleton Membership Functions

Four Fuzzy Logic Rules


There are four fuzzy logic rules that the FLC function block uses for a reverse acting controller. Fuzzy Logic Rules Number Rule Rule 1 Rule 2 Rule 3 Rule 4 If error is N and change in error is N, make change in output POSITIVE. If error is N and change in error is P, make change in output ZERO. If error is P and change in error is N, make change in output ZERO. If error is P and change in error is P, make change in output NEGATIVE.

Refer to the Fuzzy Logic Evaluation topic for an explanation and example of how fuzzy membership functions and rules are used in fuzzy logic evaluation.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 59 of 258

Fuzzy Logic Control Nonlinear PI Relationship


The two membership functions associated with each input variable and three membership functions for the output variable make the FLC function block nonlinear in its response. For regions where the absolute error is greater than the error scaling factor or the absolute change in error is greater than the change in error scaling factor, the values for error and change in error are clipped at the error scaling factor and change in error scaling factor, respectively. The following figure shows an example FLC curve that illustrates how the change in controller gain is smooth and continuous using only two input membership functions and three output membership functions.

FLC Function Block's Nonlinear Relationship The dark line shows the FLC function block's nonlinear relationship when the error is equal to the change in error. The straight line through the origin shows the linear relationship of a conventional PI controller. As the error and change in error increase, the change in output of a conventional PI controller increases linearly. Note that the gain of the FLC function block is similar to the gain of the PI controller when the error and change in error are small. The gain of the FLC function block increases gradually as the error and change in error increase. The nonlinearity built into the FLC function block reduces overshoot and settling time, achieving tighter control of the process loop. To help anticipate a rapid change in the process with the FLC function block, derivative action is provided in the feedback path of the loop as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 60 of 258

Fuzzy Logic Control with Derivative Action The FLC function block treats small control errors differently from large control errors and penalizes large overshoots more severely. It also severely penalizes large changes in the error, helping to reduce the oscillation.

Process Variable Oscillation Example The above figure depicts how an FLC function block reacts to overshoot and oscillation. At points B, D, and F, where overshoot occurs, the FLC function block applies stronger control actions to bring the variable back to the setpoint. At points A, C, and E, where large changes in error occur and are dominant, the FLC function block applies stronger corrective actions to reduce oscillation. This type of nonlinearity allows the FLC function block to provide better control performance than standard PID control.

Establishing Scaling Factors


DeltaV Tune can be used to establish the scaling factors (Se, Se, and Su). For a small control error and setpoint change less than a nominal

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 61 of 258

block executing at a one (1) second scan rate (t) to control the same process. Refer to the following equations:

value (Ysp), the FLC function block scaling factors are related to the proportional gain (Kp) and reset (Ti), which would be used in a PI

where: Se = change of error scaling Se = error scaling Su = change of controller output scaling Se0 = error scaling for a one (1) second scan rate Beta is a function of process deadtime (DT) and ultimate period or time constant (TC) and has values in the following range:

The approximate formula for calculating beta is as follows:

rate appropriate to the function block scan (t).

The Fuzzy Logic Control function block accounts for the scan rate and recalculates the error scaling factor (Se), which depends on the scan

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 62 of 258

The Fuzzy Logic Control function block is designed to be set up by DeltaV Tune. However, if you set up scaling factors manually, the FLC block will set up derivative time automatically, and you will not have manual access to the derivative term. Note The nominal setpoint change value for Ysp is one percent. When the setpoint change is greater than the nominal setpoint change (Ysp), these scaling factors are internally increased by the Fuzzy Logic Control function block. This internal scaling is changed in the ratio of actual setpoint change to the nominal setpoint change. These larger scaling factors are used while the control error (PVSP) remains large due to the change in setpoint. When the control error has returned to a small value and remains small for a period of time, the scaling factors used by the fuzzy algorithm are once again the block scaling parameter values.

Fuzzy Logic Evaluation


Inside this topic The following topics describe standard fuzzy logic operations. The control provided by the Fuzzy Logic Control function block is based on the evaluation of the membership functions and rules described for the block algorithm.

Membership
Fuzzy logic provides a way to quantify states and the overlap between them (for example, High and Low), assigning degrees of membership (truth) to each one. Membership Functions Fuzzy logic uses mathematical functions to describe the degrees of membership in various states or conditions. One mathematical function describes each state. These states are called membership functions and are usually represented graphically as triangles that overlap. Each membership function is given a fuzzy keyword or label that describes the process state. For example, the following figure shows two membership functions with these levels: Low and High. Note that input and output variables can have different sets of associated membership functions and labels. Degree of Membership

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 63 of 258

Rather than require 100% membership in one state or the other, fuzzy logic allows for a tank's level to be somewhat high (70% membership) and somewhat low (30% membership) at the same time. In other words, a statement is typically true only to a certain extent or degree.

Example Tank Level's Degrees of Membership for High and Low Variables (0.7 and 0.3, Respectively) The degree of membership for a particular state is represented by a value that ranges from 0 to 1. For example, the degree of membership for High is 0.7 in the above graph, and its degree of membership for Low is 0.3.

Fuzzy Logic Reasoning Process


Fuzzy logic reasoning can be expressed using AND/OR operations, as defined in the following table. Fuzzy Logic AND/OR Operations AND (A, B) Minimum (A, B) OR (A, B) Maximum (A, B)

The above table is suitable for fuzzy logic statements with all possible degrees of membership. In the case where the fuzzy logic statements are 100% true or false, the fuzzy logic operations produce the same result as binary logic (that is, 1 or 0 value, respectively). In all other cases, fuzzy logic operations generate continuous output values between 0 and 1.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 64 of 258

Typical Fuzzy Logic Control Function Block


A typical FLC function block has three basic operations: 1. Translation from input signals to fuzzy logic values or fuzzification. 2. Rule inference based on input states. 3. Retranslation of the fuzzy logic values to continuous signals or defuzzification.

Typical FLC Function Block Components For example, fuzzy logic can be used to control the level in a tank through a control valve based on inlet flow and tank level measurement, as shown in the following figure.

Tank Level Being Controlled by Fuzzy Logic In this example, the membership function describing the tank's level and valve might be defined as follows.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 65 of 258

Tank Level Membership Function For this example, the rules for controlling the tank level might be defined as follows. Example Tank Level Control Rules Number Rule 1 Rule 2 Rule 3 Rule If level is Low and inlet flow is Normal, make outlet valve Closed. If level is High and inlet flow is Normal, make outlet valve Open. If level is High and inlet flow is Low, make outlet valve Normal.

For this example, the fuzzy logic would be evaluated in the following manner to determine the outlet valve position based on the current value of the tank level and inlet flow. Step 1 - Fuzzification/Translation Calculate the degree of membership in each of the predefined membership functions (refer to the following figure). Step 2 - Rule Inference Apply the degree of membership for both level and inlet flow to the fuzzy rules for tank outlet flow as shown below:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 66 of 258

FLC Function Block Operation Principle Step 3 - Defuzzification Calculate a weighted average of all of the activated output membership functions to determine the outlet valve position.

DeltaV Simulate Suite


Inside this topic The DeltaV Simulate Suite consists of the following products: DeltaV Simulate Standalone DeltaV Simulate Multi-Node DeltaV SimulatePro DeltaV Simulate Standalone and Multi-Node are the DeltaV license options that enable you to install all DeltaV software on standalone or networked PCs for off-line development and operator training. You can add DeltaV SimulatePro capability to either the Standalone or Multi-Node products. This document explains how to use DeltaV SimulatePro. Use the expert features of DeltaV SimulatePro to get the most out of system checkout and operator training. Process simulation packages that have an OPC interface work directly with DeltaV Simulate without requiring controller hardware.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 67 of 258

DeltaV Simulation Overview


With DeltaV Simulate, you can simulate the execution of operator interface and selected control modules defined for your plant. You can use this capability for control logic checkout. Also, using the Control and I/O block simulation capability of the DeltaV system and fieldbus, field measurement values and status can be manually supplied to the simulation or provided by blocks used to simulate the process. The full range of OPC features in the DeltaV system are available with DeltaV Simulate. You can use this capability for the development and testing of OPC interfaces to the DeltaV system. Also, before your plant is even constructed, you can use OPC-compliant process simulation packages with DeltaV Simulate for process and control design checkout one controller at a time. DeltaV Simulate allows you to perform the following tasks: Engineer DeltaV systems anywhere. You can do engineering work without the constraints of working at a dedicated configuration station. You can install DeltaV Simulate on your home or office computer or on a laptop. You can export work that was done on your computer and then import it to your DeltaV control system. Verify control logic and display implementation. Software modules configured for your plant control can be executed in your computer for control and display checkout. Using the simulate capability of both DeltaV I/O blocks and fieldbus I/O blocks, you can set a measurement value and status to check out control logic, operator displays, alarms, and trending. Using the Convert feature of SimulatePro, you can simulate the measurement, actuation and logic that will be provided through Foundation fieldbus devices in your control system. Also, using the Convert feature, external references to I/O can be redirected to allow the parameter values to be read and written. Test OPC interfaces to the DeltaV system. DeltaV Simulate fully supports DeltaV OPC. Executing modules in the computer allows an OPC interface to be checked out completely. You can use this feature to develop applications that can execute in the DeltaV Integration station. Support DeltaV training. You can create dynamic process simulations to support operator and engineering training one controller at a time. You can also use function blocks that represent a process model or process simulation packages to use DeltaV Simulate as a training tool. Reduce Training and Checkout Time. Using SimulatePro you can change the execution rate of the simulation and save and restore the system state at any time. Both of these features make it faster and easier to perform operator training and system checkout.

DeltaV Simulation Operation


After installing DeltaV Simulate, most DeltaV system features are available for operation. In a standalone installation, your computer acts as a ProfessionalPLUS station. Using your computer, you can configure controllers and workstations that will be on your DeltaV system. You

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 68 of 258

can also configure DeltaV devices offline, including any fieldbus devices that will be included in your control system. The configuration you develop can be exported later for installation on your DeltaV Control system. Note You must log in to DeltaV as a user with configure and download privileges before you start DeltaV SimulatePro for the application to be able to connect to the OPC server. Modules used to implement the monitoring, process control, and calculation functions of a DeltaV system are normally assigned to a DeltaV controller. In the DeltaV Simulation environment, you assign these modules to your computer for execution. After a download, the modules execute in the computer at their configured execution rate. You can view parameters of the blocks executing in a module in Control Studio's online mode as if the module were executing in a DeltaV controller. Most of the features of a complete DeltaV control system are made available on your computer as shown in the following figure.

PlantWeb Development Environment with Simulation on a Single Computer

Using DeltaV Simulate


Inside this topic If you need to delete module assignments from controllers in your configuration the recommended way is:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 69 of 258

1. 2. 3. 4.

View Assigned Modules for the controller. Right click on the module and select Delete Assignment. Right click on the module again and select Download | Delete From Controller. Download Setup Data to the controller.

If you attempt to remove a module assignment from your configuration by deleting the assignment, then performing a total download, you must download twice (total download followed by Download | Setup Data) to prevent DeltaV Simulate from displaying modules that have not been completely removed. This additional download is necessary because of the way the system manages module assignments and deletions during the download process. You install the DeltaV Simulate capability on your computer using the standard DeltaV installation procedure. Once you have installed DeltaV Simulate, the capability of the ProfessionalPLUS station is provided for configuration support. Batch and continuous control execution are also supported. Note Technical support is available for DeltaV Simulate when a particular hardware configuration is used. Refer to the DeltaV Simulate product data sheet for information regarding this hardware configuration. In the Standalone version of DeltaV Simulate, an Ethernet card is not required as part of your computer hardware. If you have an Ethernet card installed on your computer for connection to your plant or office LAN, the installation of DeltaV Simulate will not change the TCP/IP settings for this connection. This allows you to continue using DeltaV Simulate while your computer is connected to your plant or office LAN. Note The Standalone version of DeltaV Simulate does not support Ethernet connections to a DeltaV system. To transfer configuration work, you must export from your computer and then import to your DeltaV system. The Multi-Node version of DeltaV Simulate supports interconnecting PCs to allow simulated control execution to be distributed between several machines. You can also include Operator Stations and controllers to support training requirements.

Assigning and Downloading Modules


In DeltaV Explorer an Assigned Modules folder is included under your computer. Assign modules that you want to test dynamically to this folder.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 70 of 258

Example Module Folder in a Computer with Modules Assigned After you assign modules and download your computer, the modules assigned to the computer begin executing at the configured execution rate automatically. You can examine the execution of a module in the computer from Control Studio's online mode. If your system configuration contains blocks whose I/O are assigned to fieldbus, use the Convert feature of SimulatePro to allow simulation of the execution of these function blocks. Convert also allows the simulation of external references to I/O. The execution engine in the computer is limited by memory. The number of modules that your computer can execute at one time depends on the number of function blocks included in each module. You are notified when this limit is exceeded. Typically, DeltaV Simulate on a standalone PC can simulate the execution of the modules that would be assigned to one controller or less. A node with SimulatePro capability

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 71 of 258

assigned to it can simulate execution, in real-time, of the modules that would be assigned to up to four controllers. Workstation loading, which is a function of the real-time execution multiplier setting, more than doubles at 2X execution speed.

Using the SIMULATE Parameter


Using the SIMULATE parameter for both the DeltaV I/O blocks and the fieldbus I/O blocks, you can manually inject field measurement values and status to check out control logic, alarming, displays, and so on. By changing the status or value associated with a measurement, the action taken by control logic execution in the DeltaV Simulate environment can be examined. You can also use this capability to test whether block parameter values and status are displayed correctly in the screens you designed. By changing the measurement value through the SIMULATE parameter, you can force an alarm condition, which allows you to verify assigned alarm priority as well as the manner in which alarms become visible to the operator (for example, the event chronicle and alarm banner in DeltaV Operate).

Dynamic Process Simulation


You can create dynamic process simulations to support process design as well as operator and engineering training. Using the standard function blocks available in DeltaV Control Studio's Analog Control and Math palette, you can create a simple dynamic model of your process model. Also, process simulation packages can support operator training. To support process design with DeltaV control, you can use high-fidelity process simulation packages.

Process Simulations Through Function Blocks


You can use the standard calculation and dynamic blocks provided in DeltaV Control Studio's Analog Control and Math palette to construct a simple dynamic process model for testing control strategies and operator training. The following figure shows a simulation of a process using DeltaV function blocks wired to simulate inputs and outputs of I/O function blocks.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 72 of 258

Simulating a Plant's Operation and Control Strategy with Function Blocks

Using Applications for Process Simulation


Application packages that support an OPC interface are compatible with the DeltaV Simulate environment. For example, you can use highfidelity dynamic process simulation software with DeltaV Simulate for plant and control design as well as control checkout and operator training. Other process simulation software supports control system checkout and operator training. These process simulation applications utilize the simulate capability of both DeltaV I/O blocks and fieldbus I/O blocks.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 73 of 258

High-Fidelity Process Simulation Used with DeltaV Simulate

DeltaV SimulatePro
Inside this topic DeltaV SimulatePro adds capability to the DeltaV Simulate environment. Use DeltaV SimulatePro to coordinate the execution of modules executing in PlantWeb in a PC environment with process simulation packages. From the SimulatePro interface you can do several things: Enable and disable simulation Save and restore the state of the simulation at any time Set the execution rate of the simulation Initialize dynamic blocks Pause and resume simulation View the modules and blocks in the simulation and change values if desired View converted external reference values and change them if desired. SimulatePro includes a user interface from which these actions can be performed. These features can also be accessed by applications through OPC.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 74 of 258

DeltaV SimulatePro User Interface


After you download the modules to a workstation, launch the SimulatePro interface from the Start menu by selecting DeltaV | Advanced Control | SimulatePro. Note: If the SimulatePro interface is already running when you download, you must close and reopen it to update the information within SimulatePro. The following figure shows the application opened to the Setup tab.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 75 of 258

The DeltaV SimulatePro User Interface The tree view in the left pane of the application window contains a hierarchical view of the simulation nodes in the system. The tree view does not include controllers.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 76 of 258

In the tree view you can select the entire Control System or individual nodes. The selection in the tree view determines the node or nodes affected by actions you take in the right pane. The right pane contains three tabbed dialogs: Setup, Summary, and IO References.

DeltaV SimulatePro Menu Functions The following functions are found on the SimulatePro File menu: Print use this command to print current control simulation information. The print dialog allows the selection of a Summary Report or a Detail Report. The Summary Report includes: a header containing a title and the time the print request was issued, as well as the simulation node name, the execution rate, the defined setup mode, whether or not the L_TYPE will be forced to Direct Independent on AI blocks and, a summary of the status of all modules in the simulation. The Detail Report prints the block details for the selected module and includes: a header containing a title and the time the print request was issued, as well as the name of the selected module and, a summary of the status of all blocks in the selected module. Exit use this command to exit the SimulatePro application. The following functions are found on the DeltaV SimulatePro Applications menu: Control Studio launches the DeltaV Control Studio application. The application is launched with no context information. In order to launch Control Studio in a specific context, refer to the Module Summary Context Menu topic. Diagnostics launches the DeltaV Diagnostics application. The application is launched with no context information. In order to launch Diagnostics in a specific context, refer to the Module Summary Context Menu topic. The following functions are found on the DeltaV SimulatePro Options menu: Setup use this command to define basic process definitions required for SimulatePro to effectively manage control simulation commands. Two pieces of information are defined on the Options dialog: The setup mode, either MAN or AUTO. Whether or not the L_TYPE of the AI blocks is to be forced to Direct Independent when Enable Simulate is selected. These options must be defined following the installation of SimulatePro. The current value for each option is shown on the status bar. If a function is selected that requires the Enable Simulation and Setup Mode information and the options have not yet been defined, the application prompts the user to define the information.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 77 of 258

Auto Save opens a dialog from which you can define settings to automatically save the state of the simulation periodically. SimulatePro Setup Tab The SimulatePro Setup tab contains the following buttons and controls. In the Setup: Control Network area: Enable Simulate Sets the SIMULATE parameter to Enabled on all blocks with direct input reference in the currently selected node. Disable Simulate Sets the SIMULATE parameter to Disabled on all blocks with direct input reference in the currently selected node. Setup Mode Sets the target mode to the currently defined setup mode on all blocks with direct output reference in the currently selected node. Normal Mode Sets the target mode on all blocks with direct output reference in the currently selected node to each block's configured normal mode. Save Save the current state of the simulation. You are prompted for a description. The file is stamped with the date and time. Restore Restore the simulation state from a saved state. This button opens a dialog from which you select a time and date to restore. Initialize Dynamic Blocks Resets all dynamic blocks (DI, DO, PIN, PID, Fuzzy, MPC, MPC-PRO, Rate Limit, Ratio, Splitter, Integrator, and Filter) in the currently selected node to their initial steady state conditions. In the Real-Time Execution Multiplier area: The modules' configured execution period and the Real-Time Execution Multiplier determine the execution rate of modules running in the workstation. Time dependent function blocks use the actual configured execution period in their calculations. Thus, the behavior of the blocks is such that their calculations are done faster or slower than real time, depending on the Real-Time Execution Multiplier. Real-Time Execution Multiplier Slider Bar sets the execution rate for the simulation node. The execution multiplier may be set anywhere from 30 times slower than real-time to 30 times faster than real-time. An execution rate of 0 is defined as stopping execution. An execution rate of 1 is defined as real-time. Regardless of the execution rate, modules will not run faster than 100ms. Pause Execution saves the current execution rate of the simulation node and then sets the execution rate to stopped (0). The slider bar continues to show the saved rate but the execution rate status bar entry shows Paused. The Pause Execution button is disabled when the simulation is shown as Paused. Resume Execution sets the execution rate of the simulation node to the currently saved execution rate. The currently saved execution rate can be determined from the slider bar or by placing the cursor over the slider bar, which then displays the exact rate as a tooltip. The Resume Execution button is only enabled when the simulation is shown as Paused.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 78 of 258

SimulatePro Summary Tab The Summary tab contains two grids: The Summary Module grid and the Summary Details grid. The Summary Module grid shows simulation, status, and mode information for all of the modules in the currently connected simulation node. Sim column shows a frowning face for modules containing at least one block with input reference that does not have simulate enabled. Status column shows a frowning face for modules containing at least one block with input reference but that has a bad or uncertain simulate status. Mode column shows a frowning face for modules containing at least one block that is not in normal mode. Click a column heading to sort the items in the column. The Summary Details grid shows detailed information for blocks within a selected module. Choose a specific module by selecting that module in the Module Summary grid. Sim column shows Enabled or Disabled. If a block references I/O and the Simulate parameter is not set, then the word Disabled is displayed in red. If a block does not reference I/O this field has a light gray background. Value column shows the current value of the SIMULATE parameter for a block. If a block does not reference I/O this field has a light gray background. Status column shows the current Status of the SIMULATE parameter's value for a block. If the status of the value's status value is Bad or uncertain, the status appears in red. If a block does not reference I/O then this field has a light gray background. Mode column shows two values separated by a forward slash for each block. The first value is the target Mode and the second value is the actual Mode for the block. If the block does not have direct output reference then this field has a light gray background. Out column shows the current OUT value for each block. If the block does not have direct output reference then this field has a light gray background. Note Values in the Selected Module grid are changed by right clicking the desired cell and selecting Edit from the context menu, or by double-clicking on the desired value to change. Click a column heading to sort the items in the column.

SimulatePro IO References Tab The IO References tab contains two grids: The Module grid and the Parameter Details grid. This tab is useful only if your configuration

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 79 of 258

contains external references that have been converted using the Simulate Conversion function. The Module grid lists the modules that have external I/O references that have been converted. The number of parameters converted in each module is shown. The Parameter Details grid shows the following information for each converted reference in the module selected in the summary grid: The name of the parameter that has been converted The I/O reference path The parameter value The parameter status The module parameters that are created for the converted references may be changed from this interface or through OPC.

Simulate Conversion Function


You must run the Simulate Conversion function on the workstation before you run your simulation if your configuration contains: Function Blocks that have been assigned to a fieldbus device Parameters and function block expressions that directly reference I/O channels The Simulate Conversion function converts modules in the database so that fieldbus blocks and I/O references can be simulated for operator training and control system checkout. Function blocks that have been assigned to fieldbus devices are replaced with their equivalent DeltaV blocks. The block name, parameter values, and links to other blocks are preserved. If an equivalent block does not exist, as is the case for the FFMAI block, a composite block is substituted to support off-line simulation in Operator Interface and Control Studio. Parameters and function block expressions that perform I/O references are converted to external parameter references. When the Simulate Conversion command is run, a module named M_nodename is automatically created under the workstation's Assigned Modules container. M_nodename is populated with parameters that are referenced by the converted modules' parameter and function block expressions' I/O references. Modules can be downloaded to the workstation after conversion. Converted function blocks perform just like blocks assigned to fieldbus. For example, the logical and dynamic behavior of converted blocks is the same as assigned blocks. To simulate values that would normally be supplied through the I/O, the user or process simulation application can write to the newly created external parameter references that replaced the original I/O references. To access the Simulate Conversion command, select the workstation to which modules have been assigned in the DeltaV Explorer and select Simulate Conversion from the context menu.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 80 of 258

Simulate Conversion Command in DeltaV Explorer After the Simulate Conversion command is run, Control Studio can be used to view the changes made in the module. The assigned modules must be downloaded to view the converted module operation in Operator Interface, Control Studio, or SimulatePro. Note: The Simulate Conversion process modifies the modules in the simulation system database. No utility is provided to reverse this conversion. The simulation system should be created from a copy of the actual system configuration. The following sections provide more detail on the conversions. Converting Blocks Assigned to Fieldbus Devices Modules that contain function blocks such as AI, PID, AO that are assigned to a fieldbus device will not execute in DeltaV SimulatePro. The Simulate Conversion command converts these blocks to the equivalent DeltaV function block so they will execute in SimulatePro. The following example shows the impact of a conversion on blocks assigned to fieldbus devices.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 81 of 258

Blocks Assigned to Fieldbus Converted to Equivalent DeltaV Blocks If a module contains fieldbus blocks for which no equivalent DeltaV block exists, the fieldbus blocks are replaced with composite blocks that support execution in a simulation environment. For example, the fieldbus function blocks FF_MAI, FFMDI, and FFMDO have no equivalent DeltaV blocks. Therefore, the Simulate Conversion command substitutes the composite blocks MAI_SIM, MDI_SIM, and MDO_SIM for the fieldbus function blocks. Modules containing the substituted composite blocks cannot be accessed online using the SimulatePro interface. The composite blocks that support the conversion reside in the Simulation folder in the DeltaV Explorer Library's Composite Templates container.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 82 of 258

The simulation composite blocks are designed for use in a simulation environment only and are not meant for use in an online system.

Simulation Composite Blocks The converted blocks contain SIMULATE_INx parameters that can be used to set the simulated OUTx parameters. The following images shows a module containing fieldbus blocks before and after conversion. Notice the SIMULATE_INx parameters after conversion and also notice that the block names and connections between parameters are not changed by the conversion.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 83 of 258

Module Before Conversion

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 84 of 258

Module After Conversion After conversion, a process simulation tool can write to the SIMULATE_IN parameters and simulate the value and status that is normally provided by the I/O. Converting Parameters and Expressions that Reference I/O Channels

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 85 of 258

Parameters and function block expressions such as a Calc/Logic block expression that directly references I/O channels will have Bad status when the associated module is assigned to a workstation. Also, the value and status cannot be written. The Simulate Conversion command allows these parameters to be used for training and checkout. The conversion changes the I/O references to parameter references. A module called M_nodename that contains the reference parameters is automatically created on the workstation. Nodename is the name of the workstation on which the conversion command executed. Note: The name of the module that is created by conversion is limited in length to 16 characters. Make sure that the node names in your configuration that will be converted will result in unique module names after truncation (if the workstation name is longer than 14 characters). Also, the references must refer to valid existing I/O parameters in the database before you run the conversion For example, if a module assigned to the node NIGHTENGALE contains the parameter MYREF1, an I/O reference to CTLR2/IO1/CH05/OVERRANGE_PCT, after conversion this I/O reference parameter is changed to an external parameter reference. For this example, the path to the reference parameter is set to M_NIGHTENGALE/C02CH05OVERRAN1. The name of the parameter referenced in M_NIGHTENGALE is automatically created from the original I/O path definition (slashes are removed and the controller, card, channel, and parameter names are combined and shortened to 16 characters and given a unique name). After the I/O reference is converted, applications can read or write the converted external reference parameter to simulate the values and status normally provided by the I/O. The referenced parameters are automatically defined in the M_NIGHTENGALE module and can be accessed online using the SimulatePro interface. The following example shows a module that contains parameter I/O references and expressions in a Calc/Logic block that also reference I/O.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 86 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 87 of 258

Module Containing I/O References Before Conversion The following image shows the impact on the blocks after the Simulate Conversion command is run on the workstation that contains this module.

Module Containing I/O References After Conversion These converted I/O references can be accessed by examining the M_Nodename module or by selecting the IO Reference tab in the SimulatePro application as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 88 of 258

SimulatePro View of Converted I/O References Creating a Training System To create a training system from a configuration with fieldbus function blocks or parameters or function block expressions that reference I/O, you must run the Simulate Conversion command once on every node. If new modules are added to the node, the Simulate Conversion command can be re-run and any new parameters created to replace I/O references will automatically be added to the existing M_Nodename module. Note: The conversion modifies the configuration database on the workstation. SimulatePro does not include a utility to convert training system files back. The Simulate Conversion is a one way transfer in which the actual system configuration is always the master configuration. The training system configuration can always be easily and quickly created from the actual configuration using the Simulate Conversion utility.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 89 of 258

OPC Interface Development


You can use DeltaV Simulate to support the testing of an application program's OPC interface to the DeltaV system. Using this capability, you can verify the ability to read and write DeltaV parameters. Full DeltaV OPC functionality is available in DeltaV Simulate. Executing modules in the computer allows an OPC interface to be checked out completely. You can use this feature to develop applications that will execute in the DeltaV Application station. The design of this OPC interface is illustrated in the following figure.

Example OPC Interface Developed and Tested Using DeltaV Simulate

Application Examples
Inside this topic

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 90 of 258

Checkout of Control
An engineer is responsible for the control design of a new plant. His DeltaV control system will not be shipped for another month, but he has installed DeltaV Simulate on his computer. One loop that is critical to plant operations uses a feedforward signal from a feed stream that is not used for some products. Under the condition of no flow, the input signal can have a BAD status. It is important in his design of the control system to understand how the PID behaves under this condition. To learn more about how the PID operates under such a condition, the engineer assigns the associated control module to his computer, downloads, and then, using Control Studio's online view, examines the PID and feedforward signal provided by an AI block. Using the SIMULATE parameter of the input blocks to the PID, he establishes a normal operating condition. Then, by changing the SIMULATE parameter status of the feedforward input to BAD and back to GOOD, he observes that the operation of the PID is not disrupted by the status going BAD. Knowing that the DeltaV PID addresses this situation, the engineer is able to finalize the design of this critical control loop.

Dynamic Simulation of Control Response


Plant production is limited by feedstock processing. To determine if proposed process design changes will allow greater throughput, a highfidelity dynamic simulation of the process is constructed using a process simulation package. The engineer responsible for resolving the production limitation must determine whether the product specifications can be met using the original control strategy. To examine the control system's response to changes in feedstock, the engineer installs DeltaV Simulate onto his development computer with the process simulation. By assigning the current DeltaV control strategy used in the plant to his computer and configuring the process simulation package to access the control I/O blocks, the engineer is able to simulate the dynamic response of his plant with the current control strategy. By introducing the expected feedstock changes into the process simulation, he determines that the current control strategy does a good job. However, the tuning of some loops will need to be changed. Using DeltaV Tune in the DeltaV Simulate environment with the process simulation package providing the process simulation, he retunes the simulated control loops and establishes what the best tuning will be for the new process design.

The Simulate Algorithm


Inside this topic When a specific node is selected in the SimulatePro interface, then changes requested from this interface result in the node parameters SIM_REQUEST, SIM_INIT or SIM_FACTOR being written on the selected node. If the Control Network is selected in the interface, then the Simulate application will repeat the write request on all PC nodes. Thus, a single request may impact all nodes, as illustrated below.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 91 of 258

Schematic of OPC Commands in a Multi-Node System Each application node or Professional Plus node in a multi-node Simulate application supports three node parameters (accessed as Workstation name/CONT/Parameter name) to support requests made through the SimulatePro interface or by an application. SIM_INIT - Command (set to 1) to execute the request made by SIM_REQUEST. This parameter is automatically reset to 0 when execution of the request is complete SIM_REQUEST - Identifies the request. Note: application should set this parameter only if SIM_INIT is zero (the last request has been completed). The request codes are: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Enable SIMULATE_IN connection Disable SIMULATE_IN connection Force first-time initialization Set target mode to Manual Set target mode to Normal Set target mode to Auto Force appropriate blocks' L_TYPE parameter to Direct Independent Enable SIMULATE_IN and force L_TYPE to Direct Independent Save to a file the module and block parameters contained in all modules assigned to the node Restore from a specified file the module and block parameters of all modules assigned to the node

SIM_FACTOR - Factor to apply for simulation faster or slower than real time. A value of 0 stops execution. Positive values are interpreted as speed-up (2 is twice real time execution), negative values are interpreted as 1/SIM_FACTOR slowdown (-30 is 1/30 of real time execution).

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 92 of 258

Saving and Restoring the System State


This section explains how the SimulatePro application saves and restores the system state in a Multi-Node system. The DeltaV soft controller on each node supports saving parameter and block data in files on that node. If the save request is made through the SimulatePro application these files are collected on the ProfessionalPLUS workstation. When SimulatePro processes the request to save or restore the system state, it stops module execution on all selected nodes. After a save request, SimulatePro copies files saved on each node to the \Simulate directory on the ProfessionalPLUS station. Note The Save and Restore operations support all module types except unit modules and Phase Logic Modules (PLMs) that are configured for batch applications. Refer to Setting up a Simulation for Batch Logic that Includes Unit Modules and PLMs for information on how to create a restore point to use in simulating subsequent batches. The files are saved by SimulatePro into a directory structure on the ProfessionalPLUS workstation. The file structure is:
\DeltaV\DVData\Simulate |--\SIMmmddyyyyhhmmss | |--\NODE1\ | | |--SIMmmddyyyyhhmmss.check | | |--SIMmmddyyyyhhmmss.dat | |--\NODE2\ | |--SIMmmddyyyyhhmmss.check | |--SIMmmddyyyyhhmmss.dat |--SIMmmddyyyyhhmmss.des

Where the *.dat files are the data files, *.check files store the information of the configuration, and the *.des files state the names of the saved nodes and the description for this time point. The NODE1 and NODE2 indicate the actual names of nodes in the simulation system.

Saving the System State


After you click the Save button, the following happens: 1. SimulatePro prompts you to select the nodes to save. 2. SimulatePro checks the value of parameter SIM_INIT on each selected node. As soon as it finds them of all selected nodes are 0, it sends the following OPC commands to each node:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 93 of 258

SIM_REQUEST = 9 SIM_FILE = "SIMmmddyyyyhhmmss" SIM_INIT = 1 Then SimulatePro creates the file directory DeltaV/DVData/Simulate/SIMmmddyyyyhhmmss on the ProfessionalPLUS workstation. 3. Each selected node detects the change of value of parameter SIM_REQUEST, then execution of modules is stopped and two temporary local files are created: SIMmmddyyyyhhmmss.dat that contains the modules and blocks SIMmmddyyyyhhmmss.check that contains configuration information (workstation name, number of modules and name of modules) The value of SIM_INIT becomes 0 after the save finishes and module execution resumes. 4. SimulatePro checks each selected workstation until the value of SIM_INIT becomes 0. SimulatePro then copies the two temporary files from each workstation to the directory structure under \DeltaV\DVData\Simulate on the ProfessionalPLUS workstation. 5. SimulatePro creates the file SIMmmddyyyyhhmmss.des in the same directory structure and writes the description into the file. 6. SimulatePro removes the .dat and .check file from each selected workstation. Any OPC program you write to save the system state in a multi-node system should work in a similar manner.

Restoring the System State


Restoring the system state from saved files occurs in a similar manner. When you click the Restore button: 1. SimulatePro prompts you to choose the time point to restore from a list showing all available time points. The description for every time point is also provided. 2. After you choose the time point, SimulatePro prompts you to choose the nodes to restore. The list of nodes available for restoring is provided. 3. Click the OK button. 4. For every selected workstation, Simulate copies the files DeltaV/DVData/Simulate/NodeName/SIMmmddyyyyhhmmss.dat and DeltaV/DVData/Simulate/NodeName/SIMmmddyyyyhhmmss.check from the ProfessionalPLUS workstation to DeltaV/DVData/Simulate/ on the selected workstations. 5. Simulate workstation checks the value of SIM_INIT on each selected node. As soon as them on all selected node are 0, it stops the

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 94 of 258

execution of the nodes and sends the following parameter to the selected node: SIM_REQUEST = 10 SIM_FILE = "SIMmmddyyyyhhmmss" SIM_INIT = 1 6. The selected nodes detect the SIM_REQUEST value change then check the configuration on the node against the information in the file SIMmmddyyyyhhmmss.check If they match, it restores the modules and block from the local file with the name indicated by SIMmmddyyyyhhmmss.dat. The value of SIM_INIT becomes 0 after the restore finishes and module execution resumes (if this option was selected). 7. Each node being restored creates a Restore.Error file in the DeltaV/DVData/Simulate directory. This file contains the Node Name and any module names that could not be restored in a format similar to the following: Node Name ModuleName1 Deleted ModuleName2 Modified ModuleName3 New Modules that are not restored because they exist in the current download, but not in the saved state, are noted as New. Modules not in the download but included in the saved state are noted as Deleted. Modules not restored because of configuration changes are Modified. Any modules not listed were restored as expected. 8. Simulate workstation checks the value of SIM_INIT of every selected workstation. When the value is reset to 0 SimulatePro combines the Restore.Error file results into the ProfessionalPLUS SaveRestore.log file and removes the files DeltaV/DVData/Simulate/SIMmmddyyyyhhmmss.dat, SIMmmddyyyyhhmmss.check and Restore.Error from every selected workstation. 9. When restore is complete, SimulatePro displays a dialog similar to the following summarizing the success or failure of all selected nodes, along with details of the modules that could not be restored.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 95 of 258

Note: To continue the execution on the node, check the "Resume Execution After Restore" check box while restoring or click on the Resume Execution button after restoring. Any OPC program you write to restore the system state in a multi-node system should work in a similar manner.

Setting Up a Simulation for Batch Logic that Includes Unit Modules and PLMs
The Save and Restore operations support all module types except Unit modules and Phase Logic Modules. Unit modules and PLMs are used in batch applications in conjunction with the Batch Executive. Process simulations for individual control and equipment modules that are contained within a unit module are saved and restored. These modules are connected directly to the process simulation. Unit module phases and PLMs are connected to the Batch Executive and are not saved or restored in order to preserve the integrity of the Batch Executive connections. To set up a simulation scenario for Batch logic that includes unit modules and PLMs, bring the control and equipment modules to a steady state from which the batch can be started. Then, perform a Save to create a Restore point to use in simulating subsequent batches. Use the Batch Operator Interface to load and start the recipe for the desired batch. When it is time to restart the simulation, stop the batch. Then, restore the process and control modules with the Save file(s) and start a new batch. When the batch is started, all associated phases are restarted and parameter downloads are performed, allowing the simulation to run consistently each time. It is desirable in some cases to simulate only a portion of a batch procedure. The Batch Executive provides a feature called Active Step Change that allows a batch procedure to be restarted at a user defined step. Use the Batch Operator Interface to place the batch in a Held State

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 96 of 258

at the point where a Save is desired and perform a Save. This creates a start point for simulation that includes the process, control modules and a specified step or steps in the batch consistent with the Save file. To restart from this point, load a batch, or stop the current batch if it is running and perform an Active Step Change to the specified step(s) in the batch consistent with the Save. Restore the save file(s) and start the batch. This will reload and initialize the phases associated with the batch procedure at the point specified. By creating a new batch and performing the Active Step Change forward to the specified step(s) consistent with the Save file, a new EVT file is created to record the Batch Executive actions. This facilitates the comparison of each simulation run and provides a separate record of each run. The Active Step Change can be performed within the same batch multiple times, creating a single EVT file containing all the events of the simulation. The Simulation controller supports running the controls in accelerated time to reduce the training cycle time on slow processes. The Batch Executive does not have time based functions and will work with the accelerated controller allowing a batch to complete more quickly. Time Stamps in the EVT files will reflect accelerated time. If the system configuration uses PLMs or units/phases with external owners, and not the Batch Executive, it is up to the user to stop these items during the recovery and restart them from their initial conditions. PLMs and units/phases do not Save or Restore even if the Batch Executive is not used.

The SimulatePro OPC Interface


The actions that a user may initiate through the SimulatePro interface may also be taken by an application through OPC. This OPC interface is available for use with third-party software packages that support OPC. This section explains the interface and how SimulatePro uses it for various purposes. Each application node or Professional Plus node supports node parameters (accessed as Workstation name/CONT/Parameter name) to support applications that need to make the same requests as are made through the SimulatePro interface. The OPC interface to these SimulatePro features is based on applications reading and writing these node parameters: SIM_INIT Initiates the command (set to 1) to execute the request made by SIM_REQUEST. SimulatePro resets this parameter to 0 when execution of the request is complete SIM_REQUEST Identifies the request: 1 Enable SIMULATE_IN connection 2 Disable SIMULATE_IN connection

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 97 of 258

3 Force first-time initialization 4 Set target mode to Manual 5 Set target mode to Normal 6 Set target mode to Auto 7 Force appropriate block's L_TYPE to Direct Independent 8 Enable SIMULATE_IN and force L_TYPE to Direct Independent 9 Save to a file the module and block parameters contained in all modules assigned to the node 10 Restore from a specified file the module and block parameters of all modules assigned to the node SIM_FACTOR Defined multiplication factor for faster/slower than real time simulation. The valid range is -30 to +30. Positive numbers speed up simulation. For example, a SIM_FACTOR value of 2 causes execution twice as fast as real time. A negative number causes execution slower than real time. For example 10 causes execution at 1/10 real time execution. A value of 0 (zero) stops execution. SIM_FILE - Defines the file name used to save the module and function block parameters assigned to the node SIM_ERROR- integer that indicates the error that occurred during the save and restore. The value could be: 0 - No error 1 - Failed to create file 2 - Failed to find or open file 3 - Internal error in context save 4 - Internal Error in context restore 5 - Configuration checksum mismatch It is the application's responsibility to check that SIM_INIT is zero before writing to SIM_REQUEST. Changing SIM_REQUEST while

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 98 of 258

SIM_INIT is set to 1 can result in a request not being completed.

DeltaV Neural
Inside this topic DeltaV Neural is a collection of tools you use to implement neural networks in the DeltaV environment. With DeltaV Neural, you can create virtual sensors to monitor and predict process parameters that are otherwise expensive, difficult, or impossible to measure directly. Neural networks are sometimes referred to as intelligent or software sensors. Hard-to-measure variables are usually quality variables or variables directly related to the economic interest of the production. These variables are often measured by gathering product samples periodically and analyzing them offline in a laboratory. The obvious time delay incurred in analyzing the test samples, which can be as much as several hours, makes timely control adjustments difficult. The product may become out of specification, and this may be undiscovered until the next sample is analyzed. DeltaV Neural consists of the following tools: Neural Network (NN) function block, which implements software sensors. Lab_Entry (LE) function block, which accepts lab sample analysis for training and continuous update of a neural network. Neural application for training the neural network using historical process data. NN and Lab Entry dynamos to create displays that operators use to enter lab data and view the virtual sensor's current and future output value. NN and Lab Entry Faceplates NN and Lab Entry Detail Displays This chapter discusses the algorithm that creates and trains the neural network that the NN function block uses and describes the functionality provided by the Neural Network function block and the Lab Entry function block. The manner in which the Neural application identifies the upstream measurements that impact the measurement obtained by lab analysis or online sampled analyzers is also discussed. In addition, there is an overview of the predefined functionality provided in DeltaV Operate to interact with the NN function block. For details on the configuration of the Neural Network function block and the Lab Entry function block, refer to the Neural Network (NN) Function Block topic and the Lab Entry (LE) Function Block topic. The Neural Network function block can be used to provide a continuous estimate of a measurement that is available only through analysis of grab samples. It can also, in conjunction with a sampled analyzer, predict the measurement and detect when the estimated and sampled values differ significantly. The NN function block is contained in the Advanced Control palette. You configure and download this function block in the same way as other DeltaV control blocks. The Lab Entry function

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 99 of 258

block is also part of the Advanced Control palette. You can use it to enter the lab analysis of the measurement that is estimated by the neural network function block. With DeltaV Neural, you can collect data on your process and lab analysis by downloading the module containing the NN function block and the LE function block. The Neural application uses data collected by the DeltaV Historian during normal operation to determine the sensitivity of the lab analysis to upstream inputs. The application then uses historic data of inputs that have a significant impact to train the neural network to predict the sampled value. You can evaluate the accuracy of the model using the tools included with the Neural application. DeltaV Neural generates a network matrix for the NN function block from the verified model. DeltaV Operate includes dynamos you can use to create a neural network operator interface. After you generate the trained neural network using the DeltaV Neural application, you can download the module containing the NN function block with the updated neural network matrix into a DeltaV controller. Through the dynamos provided for a neural network operator interface, you can place the neural network into operation and allow it to be updated using new lab samples. If the diagnostics associated with the NN function block indicate that the process has significantly changed, you can easily retrain the neural network and download it to the NN function block.

DeltaV Neural Algorithm


This section presents the technical background and implementation of the neural network (NN) as implemented in DeltaV Neural. The DeltaV Neural application uses a multi-layered feedforward neural network architecture that is trained with the error back propagation algorithm. Compared to traditional neural network products, DeltaV Neural contains many advanced features, such as: sensitivity analysis of upstream measurements automatic estimation of the delay in the response to a change in process input automatic network update based on analyzer or lab entry of new sample values and estimation of future value of the measurement based on current upstream conditions diagnostics to detect deviation in estimate from new sample values. The accuracy of the measurement estimate is substantially improved as a result of these enhancements. Understanding the details of the neural network algorithm is not necessary to successfully use the DeltaV Neural product. Unless you have an interest in how the neural network algorithm and training are implemented in DeltaV Neural, skip to the Using DeltaV Neural topic. The NN function block uses a feedforward neural network structure. Training of the neural network is performed using backward propagation. The neural network is validated by comparing the project output and the lab or analyzer data. Adaption of the neural network is based on comparison of predicted measurement value to the real sampled value. The neural network algorithm is embedded in the DeltaV

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 100 of 258

controller as a function block and is supported by DeltaV Neural.

Artificial Neural Networks


Neural networks (or artificial neural networks), as implemented in DeltaV Neural, are structured to mimic the operation of the neurons in the human brain. The pulse inputs to the artificial neurons are weighted (that is, some impulses are stronger than others). The weighted inputs are summed and the neuron fires (that is, it sends an output) if the sum of the weighted inputs is equal to or greater than the threshold for the neuron. Artificial neural networks are composed of artificial neurons that process weighted input values with a transfer function to determine the output value of the neuron. This subsection provides the general theory of artificial neural networks. An artificial neuron (or node) handles three basic functions. It must: evaluate the inputs, applying the weighting factor to each one calculate a total for the combined inputs and compare that to some threshold level determine what the output should be The following figure shows a single artificial neuron.

Artificial Neuron Each artificial neuron can have multiple inputs, all of which are received simultaneously. Each input to a neuron has a weight value (Wij), which determines the relative impact of that input. (The initial weight for a neuron will change according to its rules for modification and as the network learns from various inputs.) Several important activities take place within the artificial neuron. Each input signal is multiplied by a weight, and the results are summed with a constant bias input, which resembles the threshold in a natural neuron. This sum is then passed to a transfer function. If the sum of the inputs is greater than zero, the neuron generates an excitatory (positive) signal. If the sum of the inputs is less than zero, an inhibitory

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 101 of 258

(negative) signal is generated. Both response types are significant. The transfer function is generally nonlinear. Linear (straight line) functions are sometimes used in combination with nonlinear transfer functions. Often, the transfer function of choice is a sigmoid (an S-shaped curve), as shown in the following figure. The curve approaches a minimum and maximum value at the asymptotes. Mathematically, this function is convenient because its derivatives are easy to calculate.

Sigmoid Transfer Function The output (Yj) of an artificial neuron is the input to one or more other neurons. An individual artificial neuron by itself is not useful. Only when combined with other neurons in a neural network does it become useful. For example, the human brain includes a hundred billion (1011) or so neurons. Typically, each neuron can interact directly with 10,000 others, yielding a total of 1015 connections. Brain power comes from the sheer numbers and multiple connections of so many neurons operating in concert. Artificial neural networks cannot approach this complexity, being subject to limitations on the number of inputs, connections, and outputs, but are powerful tools regardless. There are many ways to combine artificial neurons to construct a network. One of the most common is to create a multi-layer feedforward network (MFN), such as the one shown in the following figure, which is most useful in process industries.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 102 of 258

Example Neural Network In this case, the neurons form three layers: an input layer a hidden layer an output layer It is a feedforward network because, when fully connected, the output of each neuron in a layer acts as an input to all of the neurons in the next layer, with none sending outputs to neurons in their own layer or any previous layers. Given enough hidden neurons, a three-layer feedforward network can represent any continuous nonlinear function to desired accuracy. The input layer receives information from the outside world. Typically, the input layer consists of one neuron for each measured input variable of the process being modeled. Usually, the neurons in this layer perform no function other than buffering of the input signals. They do not have nonlinear transfer functions but let input information pass through directly to the next layer. Therefore, they are called linear neurons. The hidden layer processes information from the input layer and sends the results to the output layer. The hidden layer is internal to the network and has no direct contact with the outside world. Hidden neurons usually have sigmoidal transfer functions necessary to capture nonlinear information. The output layer sends out calculated values as the neural network's output information. Typically, the output layer consists of linear neurons that each collect inputs from all of the neurons in the hidden layer.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 103 of 258

Bias neurons are necessary in a feedforward network. They are connected to each neuron, except in the input layer. The bias neurons behave similarly to other neurons in the same layer, except that they do not receive inputs from other neurons. They are constant-source inputs, which provide a value of one (1.0). As is shown in the previous figure, there are many more connecting lines than there are neurons. The neural network multiplies the signals carried by each neuron by weights, which are adjusted during the training and fixed after being trained.

Building a Neural Network


Normally, building a neural network model requires the following tasks: 1. Data collection This operation is essential since process data is the only base for building a neural network. The quality of the data determines the quality of the model. 2. Data preprocessing This operation is necessary because real process data often contains missing values, outliers (data values outside the control limits you set), and possibly undesired data from different sources. This data has to be conditioned or preprocessed before it is used for network training. 3. Variable and time delay selection This operation determines which of the available process variables are important ones that significantly affect the variables to be predicted. Inclusion of irrelevant variables can degrade the prediction accuracy. 4. Network training This operation determines the number of hidden neurons and adjusts the weights based on a well-conditioned set of training data. The network's ability to change the weights allows the network to modify its neurons' behavior in response to their inputs or to learn. 5. Network verification This operation uses a separate set of data to test how well the network works. Before a neural network can be used for process control, it must be trained. Training, as the word suggests, consists of presenting historical process information to the network and then comparing the network output to a target value and adjusting the network weights to match the network output to the target. Training a neural network with a specific number of hidden nodes involves the following steps: 1. 2. 3. 4. Gather and preprocess historical data and then divide the data into two sets: one set for training and the other set for testing. Present the training set of data to the network. From the inputs, forward propagate the training data through all layers of the network and, finally, to the outputs. Compute the error between the network output and the actual (target) output values. If they are equal, do nothing. Otherwise, adjust the weights of the neural network according to a training method backward through the network. This step is known as back propagation. One path of forward and backward propagation through all data is one training epoch.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 104 of 258

5. Present the testing set of data to the network after the weights are adjusted in one epoch. 6. From the inputs, propagate the testing signals through all layers of the network and, finally, to the outputs. 7. Compute the error between the network output and the actual (target) output values. If the least test errors are achieved, training is complete. Otherwise, return to step 2. Training and testing a neural network involves: Feedforward Propagation Error Back Propagation The following subsections examine the components of the Neural Net training algorithm and some of the mathematics involved. See the following figure for an example of a simple three-layer neural network.

Three-Layer Neural Network

Feedforward Propagation

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 105 of 258

Feedforward propagation processes information in a forward direction only. This technique essentially calculates the network output based on given input data values. During this operation, weights on the network's interconnections are not changed or updated. The following equation relates values from the input layer to each hidden neuron input:
M

HiddenInj = W10 j + ( W1 i j * Inputi )


i=1

where: M = Number of input neurons i j = Individual elements of a vector or a matrix W10 j = Input bias weight W1i j = Input layer weight from the i th input neuron to the j th hidden neuron The results of the summation in each hidden neuron then go through a sigmoidal transfer function, s(x), which is: HiddenOut j = s ( HiddenIn j ) where: s(x) = ( 1 - exp (-x) ) / ( 1 + exp (-x) ) exp = Exponential function The calculated values from the output layer neurons are related to the hidden layer outputs through the following equation:
N

Outputk = W20 k + ( W2 j k * HiddenOutj )


j=1

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 106 of 258

where: N = Number of hidden neurons W20 k = Hidden bias weight W2j k = Output layer weights

Error Back Propagation Once the network goes through feedforward propagation using an initial set of weights, the software calculates output values and compares them to the output data used as the desired target for the output values. The difference between the calculated values and the target values is known as the error. Training adjusts the network weights in proportion to this error in order to reduce the difference between the calculated and target values. To correct the network output, the back propagation learning algorithm distributes the output error to each individual weight. First, the program adjusts the output layer weights based on the output error and then the input layer weights. This weight adjustment process is known as error back propagation. A single implementation of the error back propagation uses the gradient descent method, which always moves toward reducing the training error with a properly assigned learning rate or step size. However, this approach suffers from a number of problems, such as slow convergence and a fixed learning rate. Instead of the gradient descent method, DeltaV Neural uses a modified algorithm called the conjugate gradient method. This method significantly improves the learning speed and robustness of the network with only a modest increase in the computing memory usage. The conjugate gradient method combines current information about the gradient with that of gradients from the previous iteration to change the weights. The resulting conjugate gradient training is actually adapting the learning rate to the best possible value, which results in much faster training. Another advantage of this algorithm is that you do not need to worry about specifying the learning rate.

Using DeltaV Neural


Inside this topic Use DeltaV Neural to create and automatically train a neural network to provide a continuous estimate of a measurement that is currently

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 107 of 258

determined using lab test or a sample analyzer. After downloading a module that contains an NN function block, historic data is automatically collected on the upstream inputs that you identify as potentially influencing the sample measurement. The Neural application allows you to easily preprocess the data that will be used in training the neural network. The inputs that are most significant and their associated delay are automatically identified and then used in the training of the neural network. Based on the trained neural network model, the Neural application automatically defines the neural model for the Neural Network (NN) function block. This section examines the features of DeltaV Neural.

Creating a Neural Network Module


Using DeltaV Neural to provide a continuous estimate of a process parameter begins with the creation of a DeltaV module that includes the Neural Network (NN) function block. Use the NN function block in conjunction with a Lab Entry (LE) function block where the parameter that is to be estimated by the NN block is currently only available through offline lab analysis. This offline lab analysis may be entered into your DeltaV system using the dynamo provided with the LE function block. Where the parameter of interest is periodically measured using an online sampled analyzer, use an Analog Input block to obtain the sampled value needed by the NN function block. In either case, the DeltaV Neural application uses the sampled measurement when training the neural network. Also, after the network is trained, the NN function block uses the sampled value to correct the continuous estimate of the current and future value of the parameter that is calculated based on upstream measurements. After you decide on a process variable to model with a neural network, create a module in Control Studio. In the module, add an NN function block from the Advanced Control palette. If you are modeling a process that uses lab analysis data, add an LE function block. Through the configuration of the NN function block, you may specify the upstream measurements that you believe influence the estimated sampled parameter. You may specify as many as 20 inputs. You can assign a custom name to each input for display in the Neural application and the NN block dynamo. This name is used as the identifier for the input and must, therefore, be unique. If the process variable to be estimated is currently measured using offline lab analysis, then include an LE function block wired to the NN function block. Otherwise, the analog input for the sample analyzer used for this measurement should be wired to the NN function block. The following figure shows an example neural network module that includes a Neural Network function block and an Analog Input function block associated with the sampled measurement that will be continually estimated by the NN function block.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 108 of 258

Example Neural Network Module For information on how to configure an NN function block or to find examples of how this block can address different application requirements, refer to the Neural Network (NN) Function Block topic.

Commissioning a Neural Network Function Block


To commission a Neural Network function block complete the following tasks:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 109 of 258

1. 2. 3. 4. 5. 6.

Download the NN function block to a DeltaV controller. Verify that the transmitters that provide the inputs are working correctly. Make sure the DeltaV Historian is enabled and that the area containing the module has been assigned to the DeltaV Historian. Download the system. Verify all the inputs and outputs of the NN function block. Open the Neural application to commission the NN control. You can open the Neural application from Control Studio or DeltaV Explorer by right-clicking the NN function block and selecting Neural either from the drop-down menu or from the DeltaV Advanced Control menu.

The Neural application appears as shown.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 110 of 258

DeltaV Neural Application The referenced inputs (REF) parameters and the sampled (SAMPLE) parameter are trended automatically. Up to six of the neural network inputs can be trended at one time. To add or remove a parameter from the trend view, double-click the parameter in the Operation Trend pane. When you right-click a selected parameter, options are provided that allow you to modify the trend view (that is, change the trend range). You can use the toolbar controls or the slider bar to adjust the time window that is shown on the trend. Note: If the trend parameter list and trend view shows any inputs with an incorrect value of 0.0, it may be a result of configuring invalid reference inputs in the NN block. Refer to the Neural Network (NN) Function Block topic for more information on correcting this and then try again. Next, you need to enter a value for the Sample Multiplier to configure the Time to Steady State (TSS) - the estimated time (in seconds) for the process to completely respond to changes in inputs. This field also corresponds to the horizon over which DeltaV Neural estimates input delays. The Time to Steady State (TSS) is calculated as: TSS = 50 * Data Sampling Rate * Sample Multiplier. The Data Sampling Rate (DSR) is the Historian Sampling rate entered in the NN function block Properties dialog. If you are using data from a file, the sampling rate in the file is read as the Data Sampling Rate for the TSS calculation. The Sample Multiplier is the factor at which data from the given data set (created by sampling at the Data Sampling Rate) is sampled for creating the neural net model. For example, Sample Multiplier of one (1) means all the samples at the DSR are used, while Sample Multiplier of two (2) implies that only every second sample from the data set is going to be used for training - half of the former case. In effect, the product of DSR and Sample Multiplier establishes the effective sampling rate of the data to be used for training. To modify the TSS, edit the Sample Multiplier according to the formula above. For example, if Historian Sampling Rate is one second and the process TSS is estimated to be 100 seconds, set the Sample Multiplier to two (2). If you are using data from a file in which the sampling rate is two seconds, the minimum possible TSS is 100 seconds (Sample Multiplier = 1). Other possible TSS values are 200 seconds, 300 seconds, and so on for Sample Multipliers of 2, 3, and so on. When using the NN block in conjunction with an LE block for lab analysis samples, note that the TSS value establishes the maximum sample delay that affects the NN block's automatic correction mechanism. To form the data set to train the neural network, all input and output data should show reasonable variation (flat data lines have no effect) about the normal region of operation of the process. There should be sufficient data reflecting normal process operating conditions. If the time between samples is large, the data must be collected over a greater time. Generally speaking, the larger the data set, the better the resulting trained neural net. Also, NNs with a higher number of inputs require more data than smaller NNs. Once sufficient data is collected, select the

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 111 of 258

historical data to generate the neural network. The green area on the trend view indicates the data used to generate the neural network. You can adjust the range by dragging the start and end bars or by right-clicking the trend to set the right or left edge of the green area. If necessary, you can exclude bad data within the selected data by right-clicking within the green and stretching the red band over the bad data. After you select the data, click Autogenerate to create a neural network for the process. Note The module that contains the NN function block should not be open in Control Studio when you request Autogenerate because the NN function block is updated in the DeltaV database during autogenerate. Note It is recommended that system time adjustments are not made over the data collection period. If it is necessary to make system time adjustments, it is best to exclude the data over the time range. While the Neural application is generating the neural network, a line of status information appears in the Autogeneration area of the interface to show the progress. When the minimum error is achieved, a pop-up message appears saying that the training is completed. The trained network is loaded into the NN function block in the database. The neural network model that is created is shown automatically in the left panel of the DeltaV Neural screen. A model overview of the calculated sensitivity is automatically displayed.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 112 of 258

Sensitivities View The sensitivities indicate how changes in the inputs affect the sampled measurement that is modeled by the neural network. Inputs that were determined to have insignificant influence on the sampled value are not used in the neural network and are indicated in the sensitivity display by a large red X shown in place of the sensitivity plot. Double-click a sensitivity to see a more detailed view appear, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 113 of 258

Sensitivity Detail The vertical scale shows the sensitivity of the output to this input. (Note that the sum of the sensitivities for all inputs is 1.0.) The time scale shows the delay (the time it takes for a change in the input to be reflected in the output). The average sensitivity is shown as well. Once you have viewed the input sensitivities and are satisfied that the important inputs were selected, download the associated module to utilize the trained network. If you would like input in the training of the neural network or more details on how well the neural network fits a set of process data, use the expert features of DeltaV Neural, as detailed in the Expert Option topic.

Expert Option

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 114 of 258

You may provide greater input during the generation of the neural network by selecting the Expert option from the DeltaV Neural application. If you have selected this option, additional features are available in the application. The following figure shows the application window with the Expert option selected.

Application Window -- Expert Option Selected With the expert option selected, you can choose the data screening range by selecting a Data Screening value. This sets the limits on the data used for training based on the selected sigma (number of standard deviations) value. The default is 3.5 sigma, which means that the data training limit is Mean +/- 3.5 sigma, and values outside those limits are treated as outliers. These same limits are used during online operation of the neural net.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 115 of 258

Also, with the Expert option selected, you can perform a Sensitivity Analysis (by clicking the Sensitivity Analysis button) to determine the sensitivity of the output to the inputs without training the neural network. After analysis is complete, the sensitivity overview appears.

Sensitivity Overview -- Expert Option Selected The sensitivity overview with the Expert option selected contains additional buttons you use to train and verify the network. Double click a sensitivity to open a detailed view of that input sensitivity, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 116 of 258

Sensitivity Analysis -- Expert Option Selected With the Expert option selected, the sensitivity detail contains more information and controls. The detail view shows the cross correlation between the input and the sampled output. The Neural application uses the peak value found for the cross correlation to determine the time delay associated with the input and its impact on the sampled value. If you are familiar with the process delay and time constants associated with the inputs, you may want to verify that your knowledge of the delay matches what was calculated. To try a different delay, enter the value in the Delay area and then click Update. In response, the sensitivity is recomputed for the delay you entered. If the sensitivity associated with an input is low, then you may want to remove it from use in the neural network. In many cases, such inputs have already been eliminated and are shown with a red X in place of the sensitivity. To eliminate an input from the generation of the neural network, click the Use Input check box to remove the check mark and then click the Update button. If an input is shown as not selected but

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 117 of 258

you would like to examine the calculated sensitivity, select the Use Input check box and then click Update. In response, the sensitivity and cross correlation are displayed. After you are satisfied with the inputs selected for use in the neural network, click the Train network button at the bottom of the sensitivity overview screen. You can also train a model by selecting it in the hierarchy view, right-clicking, and selecting Train Network from the pop-up menu. The Training Parameters dialog appears as shown in the following figure.

Training Parameters Dialog The dialog contains additional options you can use to modify the neural network training. If you have expert neural network knowledge, you can change the default values to address special requirements. For example, you can change the starting number of hidden nodes used in generating the neural network to determine the impact on the model accuracy. Click OK on the dialog after you are satisfied with the values. Training begins, and another dialog appears that provides information about the training, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 118 of 258

Training Progress Dialog This dialog shows the neural network training progress and results. The graph shows the training error and test error values in Engineering Units as a function of the number of epochs. As hidden nodes are added, spikes appear as a result of random initialization of the network. The right pane of the dialog shows the network with the lowest error (test error) for each hidden node number. Among these, the best network is automatically selected by the Neural application as the trained neural network model. This is highlighted in gray at the end of training and is the network that is assigned to the NN block. Note that the random initialization of the network may result in different neural network configurations (as defined by the varying number of hidden nodes) being selected in the right pane for different training runs on the same data set. After you train the neural network, you can verify how well the model fits the sampled data by clicking either selection in the Verify Against area at the bottom of the sensitivity overview. To verify against the data used to create the model, click Original Data. To verify against a different selection, open the Data view (select the block or Models in the hierarchy view), select a data range, return to the sensitivity overview (click the model in the hierarchy view), and then click Selected Data.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 119 of 258

In response, a dialog appears that shows a plot of the actual values and predicted values calculated by the neural network, as shown in the following figure. Note Only the first 65000 samples will be displayed.

Model Verification -- Actual and Predicted vs. Sample Use the squared error value shown at the bottom of the dialog in conjunction with the plotted data to determine how accurate the neural network model is for the selected data. To see a plot of the actual vs. predicted values for the model, click the Actual vs. Predicted radio button. A plot of the calculated vs. sampled data appears as shown below.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 120 of 258

Model Verification -- Actual vs. Predicted Value If the model is inaccurate, it may be the result of one or both of the following: The model includes an input that has little or no impact on the sample parameter. This may be the case if the calculated sensitivity for the input is very low. The model does not include an input that has a significant effect on the sample. This can happen if the input does not change over the data sample used to generate the model and is, therefore, excluded from the model. If autogeneration has eliminated an input which you know to have a significant influence on the parameter of interest, you can add that input to those used to train the neural network by selecting Use Input from the input detail sensitivity display. To use the new neural network definition after training, you must download the associated module. All neural network function block parameters have assigned defaults. During online operation of the function block in Control Studio, you can adjust only those parameters of the block that do not impact the neural network model file. Also, you can change some parameters that are used during controller generation in offline mode. Any changes in these parameters require that the neural network be retrained in order for the changes to be used in the neural

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 121 of 258

network model.

Defining a Neural Network Operator Interface


You can create an operator interface for the NN function block using predefined dynamos. You can access these dynamos under the NN set in the DeltaV Dynamo Reference Library.

Using External Historic Data


Inside this topic 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 historic 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 DeltaV Historian into a file.

Sensitivity Analysis and Training from File DeltaV Neural normally uses data from the DeltaV Historian to perform network input sensitivity analysis and training. However, DeltaV Neural can use historic 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. Refer to the Data File Format topic for more information. 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 File | Sensitivity Analysis from File or File | Autogenerate (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 DeltaV Historian.

Data File Format

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 122 of 258

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

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 123 of 258

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).
DeltaV_NN_Data 3 1 389 5 FI101 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 . . . 387 388 389 PI102 FI103 49.74733734 49.94604492 49.73253632 49.79014206 49.22924423 50.15618515 50.06230545 49.96342850 49.27413177 50.51338577 50.11240768 50.08751297 BAD 50.84034729 49.81303406 . . . 50.02370071 50.53816605 50.28169250 51.41758347 49.38345337 49.77395248 49.88610840 48.94361115 49.98815918 49.96276093 49.37252426 50.75104904 50.38288498 50.38404083 51.27215958 50.98120117 49.70337296 48.52415848 . . . 49.43601227 50.74356842 49.73216248 50.12039566 47.68234253 52.39353561 52.50535202 49.54271698 50.34877396 50.90197754 BAD 49.83951950 52.36296082 50.63307190 48.14796066 50.59751511 48.73555756 52.84468842 . . . 48.33786011 48.55810928 51.49454498 15.00000000 15.00000000 15.00000000 15.00000000 19.00000000 19.00000000 19.00000000 19.00000000 19.00000000 22.00000000 22.00000000 22.00000000 22.00000000 22.00000000 22.00000000

298.91198730 301.14556885 301.80010986 299.38861084 299.79846191 299.30975342 299.12210083 BAD 299.73184204 299.44027710 298.68725586 298.38619995 298.92086792 299.72399902 300.00738525 . . . 300.87734985 301.19873047 301.05834961

17.00000000 17.00000000 17.00000000

Example Neural Network Data File

Extracting Data from the DeltaV Historian In some cases, you may need to combine lab data from another system with DeltaV historic data into one file to train a neural network. You can export DeltaV historic data to an Excel spreadsheet using the PI data link utility. This utility is on the second DeltaV installation CD. By inserting the lab data from the other system into the spreadsheet containing DeltaV data and saving it as a tab-delimited file, you can easily create a file that conforms to the neural network format.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 124 of 258

DeltaV Predict
Inside this topic DeltaV Predict implements multivariable, model predictive control in DeltaV environments. It allows you to control interactive processes within measurable operating constraints while automatically accounting for process interaction and measurable disturbances. It also allows you to easily address the numerous small and medium-sized multivariable processes (2x2, 3x3 or 8x8) that can benefit from MPC technology. Predict allows users with moderate process control knowledge to apply MPC control strategies. It also makes applying such strategies easier and faster than it would be using a PID controller and traditional techniques to address process disturbances, operating constraints, and loop interaction through the application of feedforward, override control or decoupling networks. DeltaV Predict consists of the following set of tools: Model Predictive Control (MPC) function block - allows you to implement multivariable control strategies MPC Simulation function block - allows you to create multivariable training systems Predict application - allows you to commission the MPC function block and create process models to use with the MPC Process Simulator function block MPC Operate application and advanced control dynamos - enable operator to view and interact with control implemented with the MPC function block The software components associated with the DeltaV Predict require that you purchase licenses for the DeltaV controller and the ProfessionalPLUS workstation. This chapter discusses the identification algorithm used for process model identification as well as MPC control and process simulation. The control and simulation functionality provided by the MPC and MPC Process Simulator function blocks is described as well. This chapter also outlines how you can use the Predict application to test a process and identify the associated step response model to generate the control. In addition, it describes the simulation provided by the MPC Process Simulator function block. It also explains how to use a DeltaV Operate dynamo set to interface with the MPC function block. For details on the configuration of and the application examples for the MPC and Process Simulator function blocks, refer to the MPC Function Block topic and the MPC Process Simulator Function Block topic. The Model Predictive Control (MPC) function block can replace the standard PID function block and other blocks that can be used with the PID block to implement feedforward, decoupling networks, and override for multivariable control. The MPC function block is contained in the Advanced Control palette. You can configure and download this function block in a similar way to other DeltaV control blocks. The MPC Process Simulator function block is also part of the Advanced Control palette. You can use it to create an offline operator training system for an application that utilizes model predictive control.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 125 of 258

With DeltaV Predict, you can run an automated test on your process after downloading the module containing the MPC function block. Data automatically gathered by the DeltaV Historian during testing is used by the Predict application to create a step response model of your process. You can evaluate the accuracy of the model using the verify support provided as part of the model generation. DeltaV Predict uses the verified model to automatically generate the controller matrix used by the MPC function block. Special advanced control dynamos allow you to easily define an MPC operator interface. Once you have generated the control using DeltaV Predict, you can download the module containing the MPC function block with the updated control matrix into a DeltaV controller. Through the DeltaV Predict operator interface, you can place the control into operation so that you can monitor it. A special diagnostic screen allows you to detect any problems in MPC operation. If this diagnostic tool shows that the process has changed, you can easily regenerate the MPC controller and download it to the MPC function block.

DeltaV Predict Algorithm


This section presents the technical background and implementation of Model Predictive Control (MPC) as implemented in DeltaV Predict. The applied predictive control algorithm has its roots in Dynamic Matrix Control (DMC) with significant modifications, such as prediction horizon-dependent penalty on error, control horizon-dependent penalties on moves, asymmetric funnel control, range control and reference trajectory. Controller robustness is substantially improved as a result of these enhancements. Understanding the details of the MPC algorithm is not necessary to successfully use DeltaV Predict. Skip to the Using DeltaV Predict topic unless you have an interest in how the MPC algorithm and the associated process identification are implemented in DeltaV Predict. Process identification is performed using two types of models: Finite Impulse Response (FIR) and Auto-Regressive (ARX). Model validation is accomplished by matching simulated and real process data. Constraints on the process outputs are handled by managing working setpoints of the controlled variables. Process optimization is achieved by maximizing or minimizing a selected process input until one manipulated variable approaches its limit. Such optimization is an inherent part of the MPC algorithm. The MPC algorithm is embedded in the DeltaV controller as a function block and is supported by DeltaV Predict.

Process Modeling and Identification


The process model is the basis of MPC technology. DeltaV Predict uses step response modeling for the MPC controller. This approach has been proven effective in numerous DMC applications. Step response modeling makes prediction of process outputs explicitly available for display in the application. The predicted error vector is computed as an input to the MPC controller. Displaying prediction to an operator is an important way to visually evaluate the process control. DeltaV Predict's operator interface displays the future process outputs. The MPC function block develops future process outputs as a process state and uses modified state space form for process modeling. For a single input, single output (SISO) process, the future prediction of the process output can be calculated as follows:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 126 of 258

x k + 1 = Ax k + uk + Fwk y0 = Cx k + 1 where: x k = [y0, y1,... y i,..., y p-1]T is vector of future output prediction 0,1..., i,..., p-1 steps ahead at the time k A is shift operator, which is defined as Axk = [y1, y2,...y i,..., y p-1, y p-1]T B = [b0, b1,...bi,..., bp-1]T is vector of p step response coefficients u k = u k - u k - 1 is change on the process input/controller output at the time instant k w k process output measurement - process model output, mismatch resulted from the noise, unmeasured disturbances, and model inaccuracy F filter, p dimension vector with unity default values C is the operator that takes the first component of the x k + 1 vector For an n outputs and m inputs process, vector Xk has dimension n*p, and vector B is converted into a matrix with dimension n*p rows and m columns. You can identify the step response model using two modeling techniques: FIR and ARX. Use the short horizon process model to identify the differential FIR model. For example, the following equation applies to the SISO process: p

yk =

i=1

hi u k-1

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 127 of 258

Where y k = y k - y k - 1 is the change on the process output at the time instant k. p is prediction horizon, with a typical default value for MPC model 120. Identifying step response with full prediction horizon and as many as 120 coefficients causes overfitting and results in significant parameter uncertainty. By using a short horizon with 30 or 40 points for the FIR model, you can avoid model overfitting. An FIR model with a short horizon provides an initial part of the step response and is adequate for defining dead times using a heuristic approach. The dead times are then used in a ARX model, which has significantly fewer coefficients than an FIR model. For example, the following equation applies to the SISO process: V V

yk =

i=1

i y k-1 +

i=1

bi u k-d-i

A and V are autoregressive and moving average orders of ARX with a default value of 4. For a MIMO process, superposition is applied from each input (additive action) on every output both in FIR and ARX models. Use an ARX model and apply unit step on one of the inputs to get step responses for that input. To get a complete model, repeat the procedure of applying unit steps for every input. As a result of using this combined identification technique, an optimal process model is developed.

MPC Controller
The MPC controller minimizes the squared error of a controlled variable over prediction horizon and the squared error of controller output over control horizon: min {||y[X(k) - R(k)]||2 + ||uU (k)||2} U(k)

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 128 of 258

where: X(k) = controlled output p-step ahead prediction vector R(k) = p-step ahead setpoint vector U(k) = m-step ahead incremental controller output moves vector y = diag(y1 ,..., yp) = penalty matrix on the output error u = diag(u1 ,..., um) = penalty matrix on the control moves The solution is in the form: U(k) = (SuTyTySu + uTu)-1SuTyTyEp(k) where: Su = process dynamic matrix built from step responses, p x m for SISO model and p*no x m*ni matrix for MIMO model with ni inputs and no outputs Ep(k) = error vector over prediction horizon The performance of the control algorithm can be modified using the following adjustable parameters: p, m, u, and y. From an implementation standpoint, p and m are not convenient to use as tuning parameters. In DMC implementations, u and y are applied as scalars (that is, control error is multiplied by the scalar y over the whole prediction horizon), and any controller moves over control horizon are multiplied by the scalar u. The robustness of the controller can be significantly improved by shaping y and u coefficients dependent on control error and control move predictions. Various functions can be used for shaping the coefficients of y - linear, exponential, and so on. The current implementation applies linear function with the option to set some initial coefficients to zero. The number of initial coefficients in y equal to zero is called the patience factor. The application of incremental penalty on error function is preferred when the initial part of a step response is uncertain but process steady gain is reasonably well defined. u is a basic controller-tuning parameter defined at the controller generation phase. Increasing u makes control more damped, and, in reverse, decreasing u makes the control action more aggressive and control response faster. Another degree of tuning can be achieved by applying decreasing penalties on future moves. This makes the first controller move less aggressive since next moves are relaxed and can be

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 129 of 258

used with less penalties for error correction. It is readily apparent that the second and next moves, in this case, can violate move constraints. This is not a practical concern since controller moves are recalculated during every scan and only the first move is implemented. As a result, the first move is smaller and controller robustness is increased. In addition to shaping the controller structure at the generation phase, a number of features have been implemented to manage controller behavior and robustness online. Refer to the following figure.

Reference Trajectory with Funnel and Range Control One important tuning parameter is the setpoint filter, which is also known as the reference trajectory. The Predict trajectory acts in a different way than the trajectory currently used in other MPC products. Instead of penalizing any departure from the trajectory, only those deviations that are below trajectory or above setpoint value are penalized (Area A and Area C if control range = 0). In addition, the control error is considered zero if the control variable is within range (Area C with range > 0). These features constitute a funnel control, which can be shaped online by changing the setpoint filter time constant and range, which further enhances controller robustness and flexibiltiy. During controller generation, all of the controller settings are calculated depending on process model, and there is no need for user involvement. However, if you identify yourself as an Expert using the Option selection in DeltaV Predict, you can change default controller settings to enhance specific features.

Output Constraints Handling

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 130 of 258

A typical MPC configuration includes both controlled and constrained variables. The MPC controller does not take action on constrained variables unless a predicted constraint variable violates the constraint limit. In that case, the MPC controller changes the working setpoint of the selected controlled variable on the value: SPCV = -r * GCV-AV *AV where: AV = the magnitude of the predicted steady state constraint violation GCV-AV = the gain relationship between constraint variable (AV) and CV r = the relaxation factor, < 1 SPCV = the change in working setpoint of the controlled variable The association between constrained variables and controlled variables is established during configuration. Therefore, the gain relationship is defined automatically from the process model. If the constraint limit violation ends, the working setpoint returns in a stepwise manner to the desired setpoint value.

Optimization
The objectives of optimization often include maximizing product value and minimizing raw material cost. In most cases where a linear model is applied for control, linear programming (LP) can be applied for optimization equally well. The Simplex algorithm or its modifications serves for the LP optimal solution. If a feasible solution exists, it is always located at one of the limit intersections. We use this result to perform simple optimization. This is done using a priori knowledge where we know there are optimization targets, such as the minimization or maximization of one of the production parameters within constraints on process inputs. A typical MPC configuration can include three controlled parameters (CV), up to four constraint parameters (AVs), and up to four disturbances (DVs). To control three CVs, three manipulated variables (MVs) plus at least one additional MV are used for optimization. The extra MV controls a process input that sets up the optimized parameter for production rate or raw material cost. Finally, an extra CV is introduced, which is a shadow of the optimized MV. This is done by connecting the optimizing MV to an extra CV. In DeltaV Predict, we call this the optimizing CV. The MPC controller generated for this configuration becomes an optimizing controller. By setting the setpoint of the optimizing CV to a maximum (or minimum) achievable value of the optimizing MV, the MPC function block drives the optimizing MV toward optimal value at the setpoint of the optimizing CV until any of the manipulated variables (or, specifically, any predicted value of MV)

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 131 of 258

violates an input limit. Then, the optimizing MV changes until all manipulated variables are within their input or output limits.

Using DeltaV Predict


Inside this topic DeltaV Predict allows you to create and automatically commission multivariable control strategies. After downloading a module that contains an MPC function block, the Predict application allows you to automatically test the process. The historical data collected on the process response during testing may be viewed using the Predict application. Also, the data collected for a module containing a block is used by this application to create a step response model of the process. Based on the identified process model, the Predict application automatically defines the control for the MPC function block. Also, you can launch the MPC Operator Interface from the Predict application. This section examines the features of DeltaV Predict.

Creating an MPC Module


Applying DeltaV Predict to the control of a process unit begins with the creation of a control strategy that utilizes the MPC function block. You can use the MPC function block to address multivariable control that traditionally was addressed using PID with feedforward, override, and decoupling control techniques. Also, because of MPC's ability to handle processes with difficult dynamics (for example, long deadtime), in some cases, you can use MPC to replace a single PID controller. In addition, you can use the capability of the MPC function block to maximize the throughput of a unit that is limiting production. In DeltaV Control Studio, you can configure the inputs and outputs of the MPC function block to meet your particular control application. Three types of inputs to the function block can be defined: Control (CNTRL) - Process output measurement that is to be maintained at a specific setpoint value through the control action of the MPC function block. Disturbance (DSTRB) - Process input measurement that impacts one of the control parameters of the MPC function block. Constraint (CNSTR) - Process output measurement that is to be maintained within constraint limits through the control action of the MPC function block. The Manipulated (MNPLT) parameters of the MPC function block can be wired to process inputs. These inputs are set using either the Analog Output (AO) function block or another control block (for example, a PID function block). The setpoint of these blocks is adjusted to maintain the MPC control parameters at target and the constraint parameters within their associated limits. You can assign a custom name to these inputs and outputs for display in the Predict application and the MPC operator view dynamo. An example of an MPC function block and typical input/output connections are shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 132 of 258

For information on how to configure an MPC function block or to find examples of how this block may be used to address different application requirements, refer to the MPC Function Block topic.

Commissioning MPC
After downloading an MPC function block to a DeltaV controller, verify that the transmitters and valves that provide the inputs and utilize the outputs of the MPC function block are working correctly. Also, make sure the DeltaV Historian is enabled and the area containing the module has been assigned to the DeltaV Historian. Once you have verified all I/Os to the MPC function block, you can use the Predict application to commission the MPC control. You can select the Predict application by right-clicking the MPC function block when the module is online. In response, the Predict application is launched and the following interface appears.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 133 of 258

The control (CNTRL) parameters are trended automatically. Up to six of the MPC inputs and outputs can be trended at one time. To add or delete a parameter from the trend, double-click the parameter in the Operate Trend pane. When you right-click a selected parameter, options are provided that allow you to modify the trend view (that is, change the trend range). You can use the toolbar controls or the slider bar to adjust the time window that is shown on the trend. The process dynamics may be determined by the Predict application using an automated testing feature. Before such testing can be done, the blocks wired to the manipulated outputs of the MPC block must be in the correct mode. By selecting the MPC button in the Control pane, you can force all the downstream blocks to the right mode. After doing this, note that the actual mode of the MPC function block changes from IMAN to MAN. The size of the change made in the manipulated parameters during testing is determined by the step size entry (in percent of scale) where 0

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 134 of 258

indicates no change should be made. Enter the longest time (in seconds) that it takes for the process to respond to changes in inputs as the Time to Steady State. With the downstream blocks in their remote mode and the Time to Steady State specified, select Test to initiate automatic testing of the process. In response, the manipulated parameters will automatically change in a pseudo-random manner over a time approximately equal to six times the time to steady state. If any process output exhibits integrating response, use the following guidelines to estimate the Time to Steady State (Tss): 1. For integrating responses with insignificant lag and/or processes where the non-integrating response is significantly slower than integrating, limit the Tss to the approximate time it takes for the integrating process variable to reach one half of its operational limit value(s), when a normal change is applied to the process input. 2. For processes with significant lag, the recommended Tss is 120 * approximate lag, provided the limiting condition of guideline 1 is not violated. 3. If the identified response is still not satisfactory or the slow dynamics of non-integrating responses necessitate violating guideline 1, estimate the response based on the physical (for example, volume of a tank) and operational process parameters (for example, flow rates, low/high tank level limits, and so on). Then enter the response parameters (Gain per second, dead time, and first order lag, if any) in the corresponding fields of the Step Response Design dialog. Whenever feasible, change disturbance variables manually during testing with a variable period (approximately Tss) squarewave. While testing is active, the actual mode of the MPC function block changes to LO. During testing, a manipulated parameter can be changed using the Operate Trend panel. The portion of testing that is complete is indicated by a progression bar. The estimated time remaining to complete the test is shown below the progression bar.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 135 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 136 of 258

Upon completion of the test, a green area automatically covers portions of the trend associated with the time that testing was active. You can adjust the time covered by the green area either by dragging the start and end divider bars or positioning the bars by right-clicking the chart. The area of test data that reflects normal process operating conditions is indicated by dragging the green area over the data on the trend window. You can exclude data within the green bar that does not represent normal operation by right-clicking within that area and stretching the resulting red bar over the bad data. After you select the test data, indicate if the control or constraint parameters are integrating and then choose Autogenerate to create a step response model for the process and the associated control. Note The module that contains the MPC block should not be open in Control Studio when you request Autogenerate since the MPC function block is updated during autogenerate. To utilize the generated control, you must first download the associated module. The process model that is created is shown automatically in the DeltaV Predict application screen. Double-clicking gives you a more detailed view from which you can modify your step response, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 137 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 138 of 258

Note It is recommended that system time adjustments are not made over the data collection period. If it is necessary to make system time adjustments, it is best to exclude the data over the time range. Any disturbances included in the control should be closely examined. The associated step response might be inaccurate if an input did not change significantly in the data used for autogenerate. If this occurs, a warning message will be displayed when the model is generated. In addition, this will be indicated in some cases by the step response that is shown as a straight line (that is, no response). One means of determining if the step response is accurate is to compare the ARX model to the FIR response. This can be done by identifying yourself as an expert by selecting Options | Expert and choosing the FIR check box. Both responses will be displayed, as shown in the following figure.

Note Only the first 40 points of the FIR response will be displayed. In some cases, the ARX and FIR responses might not agree. In such a case, you might need to use other data that includes times when the input changed. Then, you will need to regenerate the model and the controller. Alternatively, if you are familiar with the process dynamics,

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 139 of 258

you can identify yourself as an expert by selecting Options | Expert and then modify the step response to reflect your knowledge of the process. There are three methods you can use to modify the step response. The first method entails selecting the step response to be modified, rightclicking the response area, and then adding points. Using your mouse, click the new points that define the desired step response, as shown in the following figure. Click Plot to display the new step response. Select Save to save the new step response.

If you are familiar with the process delay and time constants associated with inputs, you can use the second method of modifying the step response. For this method, enter the response directly by selecting Design Response (as shown in the following figure) and select Apply when you are finished to save the new step response.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 140 of 258

Also, by selecting Edit Coefficients, you can change individual points in the step response. Select Save when you are finished to save the new step response. Make sure that you clean up any residual step responses with gains that are ten times smaller than the highest gains with irregular shapes. Once you have modified the step response, you can examine the accuracy of the model by selecting Verify from the model overview. In response, you can examine the calculated output based on the model (as opposed to the actual process output) either for the time frame defined by the green area of the trend plot or for the original data used in generating the model. In response, you can examine the actual process output in direct comparison (as opposed to the output based on the calculated model) either for the time frame defined by the green area of the trend plot or for the original data used in generating the model. You can also examine the XY plot of the actual process output against the calculated output and the corresponding best fit line. In addition, you can use statistics that are provided to indicate how closely

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 141 of 258

the model matches the plant data. The Model Verification window is shown in the following figure. Note Only the first 65000 samples will be displayed.

Once you are satisfied that the model accurately reflects the process dynamics, select Generate Control to update the MPC configuration for the new model. When the control is generated from a selected model, control parameters used to generate the control are displayed.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 142 of 258

In most cases, it is recommended that you leave the control generation parameters at their default values and select Start (in the Controller Generation window) to generate the control. If you have expert MPC knowledge, you can change the default values to address special requirements. For example, you can increase the Penalty on Move to make the control more robust. Decreasing the Penalty on Move makes

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 143 of 258

the controller more responsive. Doing so may also be advantageous for unmeasured disturbance compensation. Setting the Penalty on Move to less than the default value would require you to take extra precaution when commissioning. Decreasing the PM might be necessary if the controller is primarily intended for disturbance compensation. To get the proper speed of response, you may need to set the PM to ten times less than the default values. This may cause oscillatory control for some CVs. If an oscillatory CV does not require tight control, decreasing the Penalty on Error for that CV should alleviate the problem. If not, you must increase the PM until stability is achieved. Qualitatively, increasing the PE decreases the sum of error-squared for the associated CV; increasing the PM decreases the sum of the square of MV moves. Generally, increasing the PE decreases the stability margin, and increasing the PM increases the stability margin. The specific effect achieved is very much dependent on the step responses of the process; so, caution must be exercised. If the objective is tight regulation or load response for a particular CV, and the PE on another CV, which is affected by MVs that affect the target CV, is decreased, then the stability margin for both CVs will increase. The additional margin makes it possible to decrease the PM on one or more MVs that affect the target CV, thereby improving its control response. The relationship of the PE to CVs can be viewed as a relative weighing of error significance. Since error is evaluated on the basis of percent of span, the same PE value can have different meanings, depending on the span of the CV. For example, the PE applied to a pressure with a span 600 psi differs in units of psi than the same PE applied to a pressure with a span of 300 psi. For the new control definition to be used after completing control generation, you must download the associated module. All MPC parameters have assigned defaults. You can verify and refine the MPC configuration and control generation during simulation. During online operation of the MPC function block in Control Studio, you can adjust only those parameters of the block that do not impact the controller. Also, you can only change parameters that are used during Control Studio controller generation in offline mode. Any changes in these parameters require that you regenerate the controller in order for the changes to be used in the MPC control.

Defining an MPC Operator Interface


You can create an operator interface for the MPC function block using the frsAdvCFncblk dynamo set in DeltaV Operate in configure mode.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 144 of 258

Place the dynamo provided for each control, constraint, and manipulated parameter adjacent to the associated I/O or control block on the process graphic. These dynamos provide additional information on the MPC target or limit values, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 145 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 146 of 258

Place the MPC_Oper dynamo on the primary graphic display of the process that is controlled by MPC. When you access this dynamo (or the one on the faceplate), a predefined view of MPC control is provided that you can use to make setpoint and mode changes associated with the MPC function block. An example of this display is shown in the following figure.

Refer to the MPC Operate Faceplate topic for a more detailed description of MPC Operate. Refer to the Dynamo Reference topic for more information on the MPC dynamos provided to construct the operator interface for an MPC function block.

MPC Simulate
MPC Simulate allows you to run the MPC function block locally without having to download the controller. A simulation of the process is

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 147 of 258

provided based on the process model that was identified using DeltaV Predict. You can simulate control as well as the process response to changes made by the Predict control. Using MPC Simulate's special interface, you can interact with the control just as you would during an actual process. You can add noise and unmeasured load disturbances to the process inputs. MPC Simulate also allows you to evaluate the control performance of the MPC function block for different plant operating conditions. In addition, you can perform an expedient test on the control without disturbing actual plant operations. In this way, MPC Simulate can also serve as an operator training tool. The prerequisites for running MPC Simulate are as follows: The module that contains an MPC function block to be simulated exists in the persistent database (that is, the model and the MPC controller have been generated). DeltaV Predict is open on the module of interest. You have generated a process model using the Predict application and the block of interest. To access MPC Simulate, you must use the toolbar Options selection and then identify yourself as an expert. Then, either select the process model that you want to use for the process simulation from the models that have been generated and click the Simulate button located at the bottom of the screen or select the process model in the hierarchy tree, right-click, and select Simulate. Refer to the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 148 of 258

The following window appears.

MPC Simulate functions similarly to MPC Operate. However, MPC Simulate also allows you to perform the following functions to support simulation: Execution of the process and control simulation in speeds that are either faster or slower than real time. This allows you to evaluate the performance of a process that is slow in response. Introduction of disturbances that will be added to the process output or disturbance input used in the simulation. You can evaluate the impact of noise and unmeasured load disturbances on the process control and change the value of measured load disturbances inputs.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 149 of 258

Refer to the MPC Operate Faceplate topic for a more detailed description of MPC Operate. All values and ranges are based on your MPC function block's configuration. MPC Simulate shows the names of both the configured model and the simulation model. The trend area continually updates (that is, it defaults to Continuous mode upon launching). The future area comprises one third of the graph, and it is yellow to distinguish it from that of MPC Operate, which is green. Initially, the time scale on the chart is based on the time when you launched MPC Simulate. As you change the real-time execution multiplier, the time change reflects that multiplier. You can change the setpoint and manipulate variable. Also, the effects on predicted control and constraint variables are shown in the trend and the faceplates. You can either select and change the real-time execution multiplier to be used in the Continuous mode or you can select the Step mode (that is, Advance button). Refer to the following figure.

When using the real-time execution multiplier, select the Pause button to freeze the display of the multiplier change temporarily. Select the Resume button to continue updates. When using the Step mode (that is, the Advance button), the trend is a snapshot, and the MPC function block execution is only performed on request. You can also change from Step mode back to Continuous mode by selecting the Resume

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 150 of 258

button. To force a disturbance on a process output or disturbance input, select the parameter to which the disturbance is to be added. The faceplate for this parameter is displayed in the left pane of the MPC Simulate interface. Use the selections provided in the bottom half of this faceplate to specify the disturbance to be introduced, as shown in the following figure.

Once you have finished using MPC Simulate, you can save the file you created for future reference. Doing so saves not only the trend selection and the Y-scale. It also saves all user-adjusted values for signal amplitude, the bias, and the period for the next simulation run on the same module. For this module, you can select a new model to be used in simulation. When you do so, if you previously saved this setup information, it can be used with the new model. In addition, the previously used setup data becomes the default.

MPC Process Simulate


After you have generated the MPC control, you can provide operator training on MPC by creating a module that contains the MPC function block and an MPC Process Simulator block, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 151 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 152 of 258

You can assign a process model to the MPC Process Simulator block by right-clicking the block in DeltaV Control Studio and then selecting Predict. This launches the Predict application, from which you can assign a model to the MPC Process Simulator function block. To assign a model, select File | Assign Simulation Model. In response, the models that were previously created are displayed. The model that you select must have the same number and types of inputs and outputs as the MPC Process Simulator function block. After assigning a model, you must download the module for the assigned model to be used.

Using External Historic Data


Inside this topic In some DeltaV installations, data may be collected and recorded either manually or in a system that is not connected to the DeltaV system. In other installations, 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 historic data to create process models and control definitions to be used by the MPC function block in a DeltaV system. The Predict application can use data from a file to develop a process that may then be used to generate the MPC control. The Predict application can also verify a model against data from a file. This section describes how DeltaV Predict uses data files, the required data file format, and the utilities included in the DeltaV system to export data from the DeltaV Historian into a file.

Developing a Process Model from a File


DeltaV Predict application normally uses data from the DeltaV Historian to create the process model used in control generation. However, DeltaV Predict can use historic data saved in data files as well. The data file must contain historical values for all inputs and outputs used in the MPC block and the data must be formatted correctly for DeltaV Predict to use. Refer to the Data File Format topic for more information. To use historical data from a file, you must first create a module that contains an MPC function block. The MPC block must reference the DeltaV inputs and outputs that will be used in the control. Download this module to a controller or application station and then start DeltaV Predict. Connect DeltaV Predict to the MPC block. From the DeltaV Predict main menu, select either File | Autogenerate from File (to create a model and generate MPC control definition in one step) or File | Create Model From File. The Create Model 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 Predict performs the selected command using the data file and presents the results as if you had used data from the DeltaV Historian. Verifying a Process Model against Data from File

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 153 of 258

In order to validate the identified process model, DeltaV Predict application normally uses data on the trend from the DeltaV Historian or the original data used to create the model. However, DeltaV Predict can use historic data saved in data files as well. The data file must contain historical values for all inputs and outputs used in the MPC block and the data must be formatted correctly for DeltaV Predict to use. Refer to the Data File Format topic for more information. To use historical data from a file, you must have created a model for the configured MPC function block. Verification options are grayed out unless you are in Expert mode. In DeltaV Predict select the model you wish to validate. You may either right click and select the Verify Model | Verify Model Against File Data or click the corresponding button on the model display. 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 Predict verifies the model predictions against the data file and presents the results as if you had used data from the DeltaV Historian.

Data File Format


You can create 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. For model creation, the data is normally of the form obtained with open loop bump testing. 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. The data files must be saved as .dat files and formatted in a particular way for DeltaV Predict to use them. The data files must contain the following information formatted as described: Line 1 Must contain the phrase DeltaV_MPC_Data <eol> Note The above header specifies to DeltaV Predict that this is a historical data file. Line 2 Lists the Number of Controlled Variables<tab>The Number of Constraint Variables<tab>The Number of Manipulated Variables<tab>The Number of Disturbance Variables<eol> The number of each type of variable should correspond to those that you configured in the associated MPC function block, except when any Controlled Variable is configured as an Optimizing variable. Refer to the Example Predict Data Files in this topic for examples. 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. Line 4 An empty line <eol>

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 154 of 258

Line 5 Lists the identifiers of the Input and output references separated by tabs <eol> The identifier names should match those that you configured in the associated MPC function block. They should be placed in the order of the configured variables, for example, for MPC block with three controlled variables, identifiers are in the order CNTRL1, CNTRL2,CNTRL3. Hence, the order will match that of the data, as indicated in Line 7. Line 6 An empty line <eol> Line 7 through the end of data The data in the following order: index of the sample<tab>first controlled variable value<tab> last controlled variable value<tab>first constraint variable value<tab> last constraint variable value<tab>first manipulated variable value<tab> last manipulated variable value<tab>first disturbance variable value<tab> last disturbance variable value <eol> The order of the data should match the order of the configured variables, for example, for MPC block with four controlled variables, data is in the order CNTRL1, CNTRL2,,CNTRL4. If the data contains values that do not reflect normal operating conditions, replace those values with non-numeric strings to indicate that these values should not be used in the model identification. During identification, the corresponding sample values are replaced by interpolating between the good data values. Last Line An empty line <eol> The following is an example Predict data file for a block consisting of two Controlled Variables (FI101 and PI102), one Constraint Variable (FI103), two manipulated variables (CV100 and CV102) and one measured Disturbance Variable (FI155). The example shows only the first 15 and the last three sample input and output values out of the 389 total. The data was obtained with a sampling period of 5 seconds. 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).
DeltaV_MPC_Data 2 1 2 389 5 FI101 1 2 3 4 5 6 7 8 PI102 298.9 301.1 301.8 299.3 299.7 299.3 299.1 BAD FI103 49.7 49.9 49.7 49.7 49.2 50.1 50.0 49.9 1

CV100 51.4 49.3 49.7 49.8 48.9 49.9 49.9 49.3

CV102 50.1 47.6 52.3 52.5 49.5 50.3 50.9 BAD

FI155 40.0 40.0 40.0 40.0 45.0 45.0 45.0 45.0 15.0 15.0 15.0 15.0 19.0 19.0 19.0 19.0

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 155 of 258

9 10 11 12 13 14 15 . . . 387 388 389

299.7 299.4 298.6 298.3 298.9 299.7 300.0 . . . 300.8 301.1 301.0

49.2 50.5 50.1 50.0 BAD 50.8 49.8 . . . 50.0 50.5 50.2

50.7 50.3 50.3 51.2 50.9 49.7 48.5 . . . 49.4 50.7 49.7

49.8 52.3 50.6 48.1 50.5 48.7 52.8 . . . 48.3 48.5 51.4

45.0 45.0 45.0 45.0 45.0 45.0 45.0 . . . 35.0 40.0 40.0

19.0 22.0 22.0 22.0 22.0 22.0 22.0 . . . 17.0 17.0 17.0

Example Predict Data File Optimizing Variable - If one of the controlled variables is applied for optimization, no connection is required for the control input associated with the manipulated output used to set throughput. (Refer to the MPC Function Block - Block Execution and the Application Examples MPC Function Block topics for more information. In creating the data file for this case, the number of Controlled Variables does not include the one applied for optimization. For example, for the file shown above, if PI102 is marked for optimization, the data file will not include the column for PI102 and the number of controlled variables is one (1). The format is (only first three samples are shown):
DeltaV_MPC_Data 1 1 2 389 5 FI101 1 2 3 FI103 298.9 301.1 301.8 CV100 51.4 49.3 49.7 1 (1 CV though 2 configured)

CV102 50.1 47.6 52.3

FI155 40.0 40.0 40.0

(Optimizing CV identifier excluded) 15.0 15.0 15.0 (5 data columns, not 6)

Example Predict Data File for Optimizing Variable

Extracting Data from the DeltaV Historian


In some cases, you may need to extract data from the DeltaV historic data into one file that may be used in another DeltaV system to develop a process model. You can export DeltaV historic data to an Excel spreadsheet using the PI data link utility. This utility is on the second DeltaV installation CD. By saving this file as a tab-delimited file, you can easily create a file that conforms to the Predict format

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 156 of 258

Tailoring MPC Control Performance


Inside this topic The MPC controller minimizes future control errors and control moves. The control calculations assume that your process response is reasonably linear over its normal operating range. If the process model has been accurately identified during testing, then the default controller settings used in controller generation should provide stable operation and acceptable performance. If you would like a faster or slower control response, then choose the Expert Option. This allows you to independently create the model and generate the controller. After the model is created, you may make adjustments to it before it is used in controller generation. Also, you may examine and modify the default parameters that are used in controller generation to meet your specific application requirements. When developing a typical MPC application, keep in mind that the default settings for MPC controller generation will provide a good response for most applications. Also, make sure that you apply setpoint trajectory (using the setpoint filter) if you observe an oscillatory response. To do so, use the rules discussed in the Testing the Response Using Simulation topic. The following sections provide detailed information about procedures that will assist you in achieving the level of control performance you need for your application: Reviewing the Process Model Setting the Parameters Used in Controller Generation Testing the Response Using Simulation Adjusting MPC Once Control Is in Service

Reviewing the Process Model


After you have used DeltaV Predict to identify a model of your process, review the model to ensure that it reflects your knowledge of the process. It is recommended that you include the following steps in your review: 1. Inspect validation errors for all process outputs. Select Verify Model and observe the error between the calculated output and the actual output for a selected data set that represents normal operation. If there is a large error, you might need to examine the associated step response in more detail. Refer to the figure entitled Model Verification with Incorrect Process Gain. This figure shows model verification where the model gain is approximately two times smaller than true process gain. Notice that this error in model gain results in much smaller changes in predicted process output (shown in green) and a high average squared error (2.93 percent per scan).

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 157 of 258

Also, refer to the figure entitled Verification with Correct Model. This figure shows the same validation plot as the previous figure but with an acceptable error (0.56 percent per scan) and a model that accurately reflects the process (that is, the model gain is approximately 1 percent in error). 2. Inspect every step response. Verify that the gain sign is correct and that the gain value is in the range you would expect based on your knowledge of the process. Select the FIR check box and compare the ARX and FIR models over the initial part of the response curve. Typically, if the ARX and FIR models match, the process model is accurate. If both of the ARX and FIR curves are smooth but they show a ten percent or more difference in process gain, it is recommended that you take advantage of the design feature and correct the process gain to place the curve in the middle of the FIR and ARX responses. Refer to the figure entitled FIR and ARX for Poor Model. In this figure, FIR and ARX differ from each other a great deal. Such model inaccuracy might have occurred because the deadtime was close to 60 scans (the maximum FIR horizon), and FIR produced a poor result. Another possible reason could be that the deadtime identified by FIR was too large, causing an inverse gain for ARX. Having the same data but a larger time to steady state often improves such a model (for example, the figure entitled ARX and FIR for Good Model). After the time to steady state was doubled in the latter figure, the FIR and ARX matched acceptably. As previously stated, the deadtime was too large in the former figure (50 seconds, which is close to the maximum FIR horizon of 60 scans). The scan period is doubled in the latter figure (ARX and FIR for Good Model). Also, its deadtime accounts for only 25 scans and was properly identified. 3. Make minor corrections in process dynamics. Noisy data may introduce error in the process model identified by DeltaV Predict. Frequently, noise is reflected in a step response that is not smooth in shape. In such situations, it is recommended that you use DeltaV Predict's graphical or numerical step response design tools to smooth out the step response. 4. Correct step responses that deviate from expected ranges. Noisy data, insufficient excitation, or insufficient test time may produce a process model that is not satisfactory for control. However, if plant conditions do not allow for a better test, consider correcting the model based on your knowledge of the process, information gathered by observing trends of the measurement, and the process simulations. Typically, you can either select Design Response and then enter step response parameters or use the graphical design option. Make sure that you clean up any residual step responses with gains that are 10 times smaller than the highest gains with irregular shapes. 5. Inspect validation after making model changes. If you have modified the model identified by DeltaV Predict, select Verify Model and observe how well the calculated and actual outputs match in a selected set of data.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 158 of 258

Model Verification with Incorrect Process Gain

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 159 of 258

Verification with Correct Model

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 160 of 258

FIR and ARX for Poor Model

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 161 of 258

ARX and FIR for Good Model

Setting the Parameters Used in Controller Generation


The MPC controller is generated from the process model and controller design parameters. You can use the Penalty on Move (PM) and Penalty on Error (PE) parameters to adjust the robustness of control and the speed of response, respectively. You can adjust these parameters from the dialog that appears after you select Generate Controller. The following topics provide detailed information about the PM and PE parameters:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 162 of 258

Control Robustness Control Sensitivity Control Robustness Sensitivity of control to changes in process dynamics is determined by the controller robustness. The parameter used in controller generation that most impacts robustness is the Penalty on Move (PM) parameter. the PM controls how much the MPC controller is penalized for change in the manipulated output (MV). The Penalty on Move parameter is defined independently for every MV. Large PM values results in a slow controller with a wide stability margin. With such settings, the control is relatively insensitive to change in either the process or the model errors. Small PM values result in a fast controller with a narrow stability margin. When the model used in generating the control accurately reflect the process gain and dynamics, then changing the PM value does not affect the controller performance significantly. However, a difference in the controller performance might occur if the model does not match the real process. To ensure a stable and responsive MPC operation when the model is within +/- 20 percent accuracy, the following setting for the PM value is recommended. PMi = 3(1+DTi/20+ Gi*DTi/40) where: DTi is the deadtime/module execution period (in MPC scans) for Mvi -> Cvi relation Gi gain (no units) for Mvi ->Cvi relation When you select Generate Control, the values of the PM parameters shown in the parameter dialog were calculated as described above. In most cases, the calculated settings for the PM give good control, even if the model error is greater than +/-20 percent. It is recommended that you use the default settings. Only change these settings if the online operation of MPC does not meet your control objectives.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 163 of 258

Setpoint Step Response Using Default Settings The above figure shows an example of a setpoint step response with a good model match. The PE equals 1, and the PM equals 4 (default). Control Sensitivity To meet your application requirements, you may give higher priority to one Controlled Variable (CV). The Penalty on Error (PE) factor allows more importance to be placed on a specific CV. The default value for the PE is 1 for all CVs; this value should provide good control for most applications. You can change the PE from this default value to prioritize control action. However, you should not use it to change overall control performance. When you want more sensitive control for a specific CV, set the associated PE to a value greater than 1. If you want to relax control, set the associated PE to a value less than 1. Typically, it is recommended that you only change the PE after adjusting the MPC controller using the Penalty on Move (PM) and testing in simulation. If the control strategy clearly indicates that one of the controlled variables should be of lower priority, you can set the associated PE to a value of 0.8 initially. After testing in simulation, you can

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 164 of 258

adjust the PE value over a range of 0.5-1.5. Only move outside this range after verifying controller operation on the real process. The primary criterion for adjusting the PE is acceptable variability on a specific controlled parameter.

Setpoint Step Response with Model Mismatch The above figure illustrates a setpoint step response with the same PE and PM as in the previous figure. However, process gain is set at 2.5 times the model gain.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 165 of 258

Utilization of the PE to Compensate for Model Mismatch The above figure shows the same process-model mismatch as in the previous figure, except that the PM equals 20 (five times the default setting). It is recommended that you not change default values of the other parameters in the Generate Control window.

Testing the Response Using Simulation


After controller generation, you may use the Simulate feature of DeltaV Predict to test the control performance. Using this simulation environment, you can observe the control response for setpoint changes, measured and unmeasured disturbance, constraints handling, and optimization. You can adjust the maximum MV move and setpoint trajectory online and test them in this simulation environment. If you

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 166 of 258

make any changes to the PM or the PE, you must generate the controller before you test these changes. Maximum MV Move From the detail display for each MV, you can specify the maximum limit for changes in the MV. It is recommended that you specify this limit so that control moves are not limited during normal operations. You can do so by setting the limit to the output span of the MV. Responsive control with little or no overshoot should be observed when the defaults parameter values for controller generation have been used. It is recommended that you change the simulated process gain by +/-50 percent and observe the response to verify that a satisfactory response is still achieved. For some processes, you might need to set the maximum MV move based on process equipment limits. After you make these adjustments, you should not observe a significant difference in MPC performance. However, if you notice that the control response has changed, you might consider relaxing the MV move limits or increasing the PM settings. Setpoint Trajectory You can modify the setpoint trajectories that are used in the control online. Adjust the associated setpoint filter from the detail display of the Predict operate interface. Modify the setpoint trajectory through this filter to increase overall controller robustness after controller generation and download. If a specific controlled parameter exhibits an oscillatory response, then you can increase the setpoint filter to provide more stable control.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 167 of 258

Utilization of Setpoint Filter to Compensate for Model Mismatch The above figure shows the same process/model mismatch and controller generation settings as in the figure entitled Setpoint Step Response for Model Mismatch. The controller performance is adjusted online by a setpoint filter that equals 120 (prediction horizon or PH) for the first step response and 240 (2 times PH) for the second step response. It is recommended that you apply the following rules when adjusting the setpoint filter time constant: Set the setpoint filter time constant to a value that is one half of the configured time to steady state (in seconds). If the control response is still too fast after making this change, increase the filter in the same increment or up to twice the time to steady state. Once you are close to the response that you want, make small adjustments until you achieve that response. If MPC operation is not improved by changing the setpoint filter, it is recommended that you increase the PM by fifty percent, generate

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 168 of 258

the controller, and then repeat the simulation.

Adjusting the PM and the PE


You can use the DeltaV Predict simulation environment to evaluate the impact of changes in the PM and PE. To do so, you must modifiy these parameters and then generate the control. Then, you can test the new control using the simulation environment provided by DeltaV Predict. Use the following guidelines to adjust these parameters: Increase the PM value (in fifty percent increments) for any manipulated variables that are moving more than the acceptable limits. Decrease the PM for manipulated variables that are not responsive. It is recommended that they do not go below the default minimum PM values (the PM min = 3). Increase or decrease the PE, depending on process control requirements.

Adjusting MPC Once Control Is in Service


After testing the MPC block in the DeltaV Predict simulation environment, you can download the module containing the MPC block to the controller and use it to control the process. The performance should match what you observed when testing the control in this simulation environment. However, if the process model identified by DeltaV Predict does not accurately reflect the process gain and dynamics, the performance may not be the same as seen in simulation. In such cases, you can adjust controller performance using the following rules: Adjust the setpoint trajectory using the controlled parameter setpoint filter. Follow the guidelines in the Testing the Response Using Simulation topic. If the previous step is not successful, adjust the PM (and the PE, if necessary) parameters, test in simulation, and then download the module to use the adjusted PM and PE values. When adjusting a controller, it is important to use your understanding of process behavior as well as achievable control objectives.

DeltaV PredictPro
Inside this topic DeltaV PredictPro implements model predictive control of large multivariable processes in DeltaV environments. It allows you to define as many as five control and economic objective functions for interactive processes within measurable operating constraints while automatically accounting for process interaction and measurable disturbances. With PredictPro you can easily address a wide variety of multivariable processes as large as 40x80 that can benefit from Model Predictive Control (MPC) technology.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 169 of 258

PredictPro allows users with moderate process control knowledge to quickly and easily apply MPC control strategies. Its ease of use and speed in implementing MPC control strategies surpasses traditional MPC techniques and PID control strategies. DeltaV PredictPro consists of the following set of tools: Model Predictive Control Professional Function Block (MPCPro) - used to implement large multivariable control strategies PredictPro application - used to generate the model and controller for the MPCPro function block and to test the model and control in a simulation environment MPCPro Operate application and advanced control dynamos - used by operators to view and interact with control implemented with the MPCPro function block The software components associated with the DeltaV PredictPro application require that you purchase licenses for the specific number of Manipulated parameters used by the MPCPro block if more than one Manipulated parameter is used. The following sections describe the MPCPro algorithm and provide information on using the PredictPro application. Algorithm The sections about the algorithm include information on the: Identification algorithm used for process model identification as well as MPCPro control Control functionality provided by the MPCPro block Using PredictPro The sections on using PredictPro include information on how to use: The PredictPro application to test a process and identify the associated step response model to generate the control The PredictPro simulation environment to fully test MPCPro control before placing it online A DeltaV Operate dynamo set to interface with the MPC function block For MPCPro application examples and configuration information on the MPCPro block, refer to the Model Predictive Control Professional Function Block topic. The Model Predictive Control Professional (MPCPro) function block is designed to address the large interactive control processes that exceed the size of the MPC block. Similarly, the optimization capability embedded in PredictPro can be used to address a variety of applications that require more than the constraint and input pusher capability of the MPC block. The MPCPro function block can be found on the Advanced

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 170 of 258

Control palette in the Control Studio application. Like other DeltaV modules, modules containing the MPCPro function block are downloaded to a DeltaV Controller or to an application station. With DeltaV PredictPro, you can run an automated test on your process after downloading the module containing the MPCPro function block. The PredictPro application uses data automatically gathered by the DeltaV Historian during testing to create a step response model of your process. You can evaluate the accuracy of the model using the verify support provided by the PredictPro application as part of the model generation. DeltaV PredictPro uses the verified model to automatically generate the controller matrix used by the MPCPro function block. Special advanced control dynamos allow you to easily define an MPCPro operator interface. Once you have generated the control using DeltaV PredictPro, you can download the module containing the MPCPro function block with the updated control matrix into a DeltaV controller. Through the DeltaV PredictPro operator interface, you can place the control into operation to monitor it. A special PredictPro diagnostic screen allows you to detect any problems in MPCPro operation. If this diagnostic tool shows that the process has changed, you can easily regenerate the MPCPro controller and download it to the associated module.

DeltaV PredictPro Algorithm


This section presents the technical background and implementation of Model Predictive Control Professional (MPCPro) as implemented in DeltaV PredictPro. The applied predictive control algorithm has its roots in Dynamic Matrix Control (DMC) with significant modifications, such as the selection of Control or Constraint parameters for use in the control matrix, utilization of the embedded LP optimization to achieve user defined control objectives, prediction horizon-dependent penalty on error, control horizon-dependent penalties on moves, asymmetric funnel control, range control, and reference trajectory. Controller robustness is substantially improved as a result of these enhancements. Understanding the details of the MPCPro algorithm is not necessary to successfully use DeltaV PredictPro. Go directly to the Using DeltaV PredictPro topic unless you have an interest in how the MPCPro algorithm and the associated process identification are implemented in DeltaV PredictPro. Process identification is performed using two types of models: Finite Impulse Response (FIR) and Auto-Regressive (ARX). Model validation is accomplished by matching simulated and real process data. Constraints on the process outputs are handled by an embedded LP optimizer that can adjust working setpoints of the controlled variables to achieve a user defined control objective. Process optimization is implemented using an embedded linear program (LP) optimizer. It can be used to achieve operating objectives by maximizing or minimizing selected process variables while maintaining the process within constraint limits. As many as five control objective functions that an operator can select for the control can be defined. Such optimization is an inherent part of the MPCPro algorithm. The MPCPro algorithm is embedded in the DeltaV controller and the DeltaV application station as a function block and is supported by the DeltaV PredictPro application.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 171 of 258

Process Modeling and Confidence Intervals


The process model is the basis of MPCPro technology. DeltaV PredictPro uses step response modeling for the generation of the MPCPro controller. This approach has been proven effective in numerous DMC applications. Step response modeling makes prediction of process outputs explicitly available for display in the application. The predicted error vector is computed first and used as an input to the MPCPro controller. Displaying the prediction to an operator is an important way to visually evaluate the process control. DeltaV PredictPro's operator interface displays the future process outputs. Step response modeling is the most common form of model representation for MPC. It makes the prediction of process outputs available explicitly. Future output prediction is used to compute the predicted error vector as an input to the MPC controller. This section reviews the basics of step response modeling and the more advanced topic of the confidence levels of the identified model parameters. For a Single Input Single Output (SISO) process, the differential Finite Impulse Response (FIR) model describing the output response is:

where p is the prediction horizon are the identified model impulse response coefficients, the model output, and the model input. Research has shown that typically, 30 to 120 coefficients are required for an impulse response to describe the dynamics of a simple first order plus dead time process and higher order complex processes. However, identifying the step response with the full prediction horizon and as many as 120 coefficients (especially in the MIMO case) causes overfitting and results in significant parameter uncertainty, a common problem for FIR identifiers. An alternative modeling technique, AutoRegressive with external inputs (ARX), however, has significantly fewer coefficients than FIR model.

where A, V are the autoregressive and moving average orders of ARX, d denotes the dead time, and are the model coefficients. An order of four has been observed to satisfy the most practical applications. It has been shown that by using a short FIR horizon, the dead time can be identified and then used to better determine the ARX model. For a Multiple Input Multiple Output (MIMO) process, superposition is applied from each input (additive action) on every output. After ARX is defined, a unit step is applied on one of the inputs and the identified ARX model is used to get step responses for that input. An understanding of confidence intervals can be derived by showing that process model identification can be presented as a mapping of the

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 172 of 258

measurement data set

into a model parameter estimate set

contained into parameters set

In the above FIR and ARX model representations technique is convergence of components, therefore set

is ( ) and (

) respectively, a very important property of any identification have random occurs . When . There are infinite possible realizations . Therefore parameters estimate

when number of samples N tends to infinity. Measurement and processing errors of data set is not a unique realization of the true model parameter set developed from hypothetical data sets are known.

of the true parameter set

with some probability. From a practical perspective, it is more interesting to know the probability distribution of the difference the distribution is known, the quantitative uncertainties of the estimate The task is to estimate without knowing

. It has been proven that for large N, every parameter from the estimate ) to the normal distribution, with the density function:

asymptotically converges (with confidence level

As seen from the equation is the variance of the parameter estimate equation for estimating the covariance matrix is:

is the k,k element of the covariance matrix

. The

is the data set arranged in the same manner as used for identification (FIR or ARX in these examples); errors between process outputs and model outputs.

is transpose of

is set of

Applying this equation however, requires calculation of the process model first in order to develop the error set. Alternatively, the covariance matrix can be defined directly from singular value decomposition (SVD) of the data matrix :

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 173 of 258

Matrices U, S, V are products of the SVD. Then,

The

are elements of the V matrix;

are elements of the diagonal matrix S; M is the dimension of the matrix S;

Standard deviation of the model parameters is defined as:

This presents the model quality information in a more usable form than the error probability distribution. Standard deviations of the model parameters establish the range of parameter value with a predefined probability. For example, a 95% confidence region means that the true parameter value lies in the region with a 95% probability. With the assumption of normal distribution of errors, range of 2 around the identified parameter value defines the 95% Confidence Interval (CI), 3 gives the 99% CI, and so on. Step responses can be generated from parameter standard deviations , and from model parameters. The confidence regions are obtained over the prediction horizon, thus giving the range of response parameters such as gain and dead time. To get 95% confidence interval boundaries, double the standard deviation, compute the step response, and superimpose it on the original step response in both positive and negative directions. For 99% confidence intervals, triple the standard deviation, and proceed in a similar manner. An example of confidence intervals for a step response is shown in the following figure. The 95% and 99% confidence regions about the identified step response are depicted. Naturally, the region becomes larger for higher probability and vice-versa. For MPC models, a ninety five percent confidence interval is satisfactory. A useful interpretation of this information is in establishing ranges of the step response parameters. For example, for the response in the following figure, the gain has a range between 1.4 and 2.05 with 95% confidence; and between 1.25 and 2.2 with 99% confidence. This information is applied towards estimating the parameters for robust controller generation. Having confidence intervals available for every step response in the process model, it is possible not only to detect errors on the model output but also to identify specific step responses that can most contribute to prediction errors.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 174 of 258

Confidence Intervals Represented in an Identified Step Response

Integrated Optimization and Model Predictive Control


For processes with several Manipulated or Controlled variables, optimization techniques are an essential component of Model Predictive Control technology. One proven approach uses linear programming (LP) with steady state models. Linear programming is a mathematical technique for solving a set of linear equations and inequalities that maximizes or minimizes an additional function. This additional function is called the objective function. Usually objective functions express economic value like cost or profit. Specifically, MPCPro optimization considers incremental Manipulated Variable (MV) values at the present time or the sum of increments of

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 175 of 258

the MV over control horizon, and incremental values of Controlled and Constrained Values (CV) at the end of prediction horizon, instead of positional current values as in typical LP applications. LP technique uses steady state model and therefore steady state condition is required for its application. With the prediction horizon normally used in MPC design, future steady state is guaranteed for self-regulating processes. Predicted process steady state equation for an m by n input-output process, with prediction horizon p, control horizon c, in the incremental form is:

where:

denotes predicted changes in outputs at the end of prediction horizon

is the process steady state m x n gains matrix

denotes changes in manipulating variables at the end of control horizon Vector represents the sum of the changes over control horizon made by every controller output .

The changes should satisfy limits on both MVs and CVs.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 176 of 258

The objective function for maximizing product value and minimizing raw material cost can be defined jointly in the following way:

where UCV cost vector for a unit change in CV process value and UMV cost vector for a unit change in MV process value. Applying the objective function expressed in terms of MV only is:

LP solution is always located at one of the vertexes of the region of feasible solutions. This is shown in the following figure for a two dimensional problem.

Optimization Problem of a two Dimensional System The region of feasible solutions for two Control/Constraint variables and two Manipulated variables is an area contained within MV1 and

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 177 of 258

MV2 limits represented by the vertical and horizontal lines and CV1 and CV2 limits represented by the straight lines as shown below.

The optimal solution is located at one of the vertexes marked by arrows. To find this solution, the LP algorithm calculates the objective function for an initial vertex and improves the solution every step until it determines the vertex with maximum (or minimum) value of the objective function as the optimal solution. Optimal MV values are applied to the MPCPro control as the target MV values to be achieved within control horizon. If MPC controller is squared, that is the number of MVs is equal to the number of CVs, then MV targets can be effectively achieved by changing the CV value.

- is the optimal target change of MV. - is the CV change to achieve optimal MV. CV change is implemented by managing CV set points. The MPCPro algorithm working with the optimizer has two main objectives: 1. Minimize CV control error with minimal MV moves within operational constraints. 2. Achieve optimal steady state MV values set up by the optimizer and target CV values calculated directly from MV values. In operation, the optimizer sets up and updates the steady state targets for the MPC unconstrained controller at every scan, thus MPC controller executes the unconstrained algorithm. Since the targets are set in a manner that accounts for constraints, as long as a feasible solution exists, the controller works within constraint limits. Optimization therefore, is an integral part of the MPC controller. The integrated MPC controller and optimizer performs the following sequence of operations each scan: 1. 2. 3. 4. 5. Update CV and DV measurements Update CV predictions Determine optimal MV steady state targets and calculate CV targets Provide MV outputs accounting for CV and MV targets Update MV

The figure below shows communication between and integrated operation of the optimizer and MPC algorithm. There is a typical situation

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 178 of 258

when the optimizer cannot find the optimal solution because constraint limits are too tight, there are too many set points, or the disturbances are too severe. In such cases the system constraints are relaxed by changing set points to range control and/or abandoning some constraints. This can be done by minimizing the squared error over a number of constraints or by abandoning constraints with the lowest priority sequentially. Poor conditioning is another typical problem an optimizer has to deal with. As with the MPC algorithm, poor conditioning manifests itself as excessive changes in calculated MV targets, even for minor correction of constraints. In this approach, poor conditioning is removed dynamically by changing configuration of active constraints (abandoning some constraints) or by removing the association between Constraint or Controlled variables and Manipulated variables that have excessive moves.

MPC and Optimizer Communication

Robust Controller Generation


This section briefly demonstrates how Confidence Intervals (CI) are used towards robust controller generation. An MPC controller is generated from the process model and controller design parameters. It minimizes the squared error of Controlled Variables over the prediction horizon and the squared values of the changes in Manipulated variables over the control horizon. Sensitivity of control to changes in process dynamics is determined by the controller robustness. From an implementation standpoint, it is observed that the penalty on moves (PM) factor, that defines how much the MPC controller is penalized for changes in the MV output is the most convenient tuning parameter that impacts controller robustness. High PM values result in a slow controller with a wide stability margin.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 179 of 258

With these settings, the control is relatively insensitive to change in either the process or the model errors. Low PM values result in a fast controller with a narrow stability margin. When the model used in generating the control accurately reflects the process gain and dynamics, changing the PM value does not significantly affect the controller performance. Experimental observations show that the dead time margin and gain margins are strongly affected by the process dead time. It follows that dead time should be accounted for as a major factor in calculating PM. As can be expected, gain also influences the PM selection. Numerical experiments involving these two parameters have provided a PM factor that has shown stable and responsive MPC operation for model error of up to about 50%:

where is the dead time in MPC scans for an MVi CVj pair, is gain (no units) for the MVi CVj pair, the criterion for pairing (particularly in the case of MIMO and SIMO systems) is that the chosen MVi has maximum influence on CVj, p denotes the prediction horizon as before, and MV and CV denote Manipulated Variable and Controlled Variable respectively. Knowledge of the step response confidence intervals facilitates estimating the range of the gain and dead time parameters for a specific MVi CVj pair. In the following equation, these estimates are used in calculating PM values to design controller for the worst case, in turn ensuring robust controller operation.

Consider a simple example of controller design for a SISO process whose true process parameters are dead time of 31 scans and steady state gain of 1.55. For the identified response, process gain is 1.0 and dead time is 20 scans. This resulted in a PM of 7.5 without using confidence intervals. The 95% confidence region resulted in a gain interval of 0.5 and dead time interval of 10 scans. Applying these ranges to the modified equation obtains a PM of 15.0. The corresponding set point responses of the generated controller are shown in the following figure (without using CI) and in the figure after that (using CI).

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 180 of 258

Setpoint Response with PM of 7.5 Obtained without Using CI

Setpoint Response for Same Process as Above but with PM of 15 obtained using CI The MPC and Optimizer algorithm have been implemented as a control function block (FB). In this way, the block has become a part of the system functionality with ease of configuration and reliable operation in any controller or workstation node. Many features of the MPCPro function block design are similar to the MPC function block for small and medium size processes. The MPCPro function block has the following features:

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 181 of 258

The process model matrix can be up to 40x80 with a 120 second time to steady state The control matrix can be up to the same size It can be configured, commissioned, operated, and diagnosed in integrated control system environments The function block includes performance monitoring for controlled variables A default objective function is defined for the optimizer based on priorities and user preference to minimize or maximize variables Optional economic objective functions can be easily defined by entering unit cost or profit The function block attributes used for configuration and operations can be displayed and edited in Control Studio and from predefined operator interfaces. Simple attributes like MODE or SP can be displayed and modified off-line and on-line in a traditional manner. Function block technology features cascade inputs (CAS_IN) and remote cascade inputs (RCAS_IN) as well as corresponding back calculation outputs (BKCAL_OUT and RCAS_OUT) on both control and output function blocks. Using these connectors, it is possible to attach a supervisory optimized MPC control strategy on top of the existing control strategy. Targets for the optimized MPC controller can be modified from a higher strategy as well.

Using DeltaV PredictPro


Inside this topic The DeltaV PredictPro application is used to create and automatically commission multivariable control strategies. After downloading a module that contains an MPCPro function block, the PredictPro application can automatically test the process. The PredictPro application can be used to view the historical data collected on the process response during testing. Also, PredictPro uses the historical data collected for the module to create a step response model of the process. Based on the identified process model and the user defined control objectives and cost, the PredictPro application automatically defines the controller for the MPCPro function block. Using the DeltaV PredictPro's Simulation environment, you can fully test the control before placing it online. Once you download the module containing MPCPro, you can launch the MPCPro Operator Interface from a user graphic or from the PredictPro application.

Creating an MPCPro Module


Before using DeltaV PredictPro in the control of a process unit, you must create a control strategy that uses the MPCPro function block. The MPCPro function block can be used with large, multivariable applications when the application's size exceeds the capability of the MPC block. In addition, the MPCPro block can be used for applications that require process optimization in addition to constraint and process input limits handling. Generally, you can use the MPCPro function block to meet your operation objective whether that is maximizing the throughput of a unit, minimizing operation cost, or maximizing or minimizing one or more process outputs within the process operating constraints.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 182 of 258

The DeltaV Control Studio application is used to configure the inputs and outputs of the MPCPro function block to satisfy your particular control application. Three types of inputs to the function block can be defined: 1. Control (CNTRL) - Process output measurement that is to be maintained at a specific setpoint value or within the specified range through the control action of the MPCPro function block. 2. Disturbance (DSTRB) - Process input measurement that impacts one or more of the Control or Constraint variables. 3. Constraint (CNSTR) - Process output measurement that is to be maintained within constraint limits through the control action of the MPCPro function block. The Manipulated (MNPLT) parameters of the MPCPro function block are used to adjust process inputs such as inlet flow setpoint or feed valve. These process inputs are set using either the Analog Output (AO) function block or another control block such as the PID function block. The setpoint of these blocks is adjusted to achieve the specified control objective. The default standard control objective provided with MPCPro allows maintenance of the MPCPro Control parameters at target and the Constraint parameters within their associated limits. An example of an MPCPro function block is shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 183 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 184 of 258

For information on how to configure an MPCPro function block or to find examples of how this block can be used to address different application requirements, refer to the Model Predictive Control Professional Function Block topic.

Commissioning MPCPro
After downloading a module containing an MPCPro function block to a DeltaV controller or application station, verify that the transmitters and valves that provide the inputs and use the outputs of the MPCPro function block are working correctly. Also, make sure the DeltaV Historian is enabled, the area containing the module has been assigned to the DeltaV Historian, and the DeltaV Historian has been downloaded. Once you have verified all of the MPCPro function block's I/O, you can use the PredictPro application to commission the MPCPro control. To open the PredictPro application, right-click the MPCPro function block in the DeltaV Explorer and select Advanced Control | PredictPro. You can also open the PredictPro application from Control Studio by selecting the block and choosing Advanced Control | Predict from the context menu. Be sure that the module containing the function block is offline. The following interface appears when the application opens. The labels on this image call out the different areas on the interface.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 185 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 186 of 258

Note The scale on the smallest faceplates shows the High and Low limits, not 0% to 100% of scale shown on the large faceplates. Setting Up Trends Three trend sets (A, B, C) consisting of eight trend windows each are provided on the Trend Setup page to plot the MPCPro function block parameters. Up to six of the MPCPro inputs and output parameters can be trended at one time in a selected trend. To add or delete a parameter from the trend, select the checkbox provided with the parameter in the faceplate area. As shown below, the Trend Setup icon in the left pane can be selected to define trends and get a complete view of the trend setup page.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 187 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 188 of 258

From this view, parameters can be easily added to a trend by selecting a parameter and clicking the transfer arrow. Use the Tab Name field to define a custom name for each trend view. Once trends have been defined, you can return to the PredictPro overview by selecting the top level in the left pane. Use the Toolbar buttons to modify the trend display and the slider bar to adjust the time window that is shown on the trend. The PredictPro application uses an automated testing feature to determine the process dynamics. Before testing, the downstream blocks that are manipulated by the MPCPro block must be in the correct mode. Select MPC in the Control portion of the Operation area to force all the downstream blocks to the right mode. After changing the mode, notice that the actual mode of the MPCPro function block changes from IMAN to MAN if the target mode is MAN. Setting Up the Test Select the Test Setup icon to define the parameters included in a test, the Manipulated parameters that will be tested at one time, and the size of the change made in the Manipulated parameters. The following figure shows the Test Setup view with the Manipulated tab selected.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 189 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 190 of 258

As shown in the following image, additional setup options are automatically shown in the right portion of the setup window when Expert Option is selected.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 191 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 192 of 258

The length of the test is determined by the Time to Steady State (TSS). The Time to Steady State is the estimated time, in seconds, for the process to respond to input changes. Typical estimates are: (3 x First Order Time Constant + Dead Time) or (4 x Dead Time), whichever is greater for the slowest responding input/output pair of the MPCPro block. The default, and minimum value, is 120 seconds. If any process output exhibits integrating response, use the following guidelines to estimate the Time to Steady State: 1. For integrating responses with insignificant lag and/or processes where the non-integrating response is significantly slower than integrating, limit the TSS to the approximate time it takes for the integrating process variable to reach one half of its operational limit value(s) when a normal change is applied to the process input. 2. The initial estimate of the recommended TSS can be 120 * approximate lag, provided the limiting condition described in step 1 is not violated. 3. If the identified response is still not satisfactory or the slow dynamics of non-integrating responses necessitate violating step 1, estimate the response based on the physical and operational process parameters. The volume of a tank is an example of a physical process parameter and flow rates, low/high tank level limits, and so on are examples of operational process parameters. Then enter the calculated response parameters (Gain per second, dead time, and first order lag, if any) in the corresponding fields of the Step Response Design dialog. Notes For MPC configurations that use Cascade, select a TSS for the master MPC block that is at least 4 times larger than the TSS for the slave block. Otherwise, process identification and control will be impaired. If using PredictPro with a simulated process, consider adding random noise with an amplitude of about 0.25% to the process outputs. Introducing small noise levels improves robustness in developing the ARX process model particularly for cascade configurations. Use the Select All for Test button to select all the Manipulated parameters. Select an individual parameter and select Modify to define the setup of the Manipulated parameter.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 193 of 258

Dialog for Defining Manipulated Parameters Manipulated parameters can be included or excluded from model and controller generation. Manipulated parameters that are selected for Test are automatically adjusted in a pseudo-random binary manner when testing is initiated. The change in the Manipulated parameter is determined by the step size in percent of scale. You can change the step size to a value that will cause a process change that is not disruptive to normal process operation. Normally, testing aborts if the manipulate parameter becomes limited when testing is active. Choosing Ignore Errors, causes testing to continue even if limits are hit. When the process gain is large (big change in process output for a small change in input), you may need to pick a very small step size such as less than 1%. For these types of processes, you can choose a range suppression multiplier (10X or 100X) to enable better process identification. Select the Control and Constraint parameter tabs to define the parameters included in the model identification. By default, all parameters are included. Select the Integrating option to include the parameter as an integrating response.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 194 of 258

If the normal process output change is very small compared to its engineering unit range, such as 5 degF with a range of 1000, select range suppression multiplier (10X, 100X) to get good identification results. The Test Limit deviation value, measured in percent, and type (None, Deviation, Above, Below) should be set to automatically abort testing if the associated Control or Constraint disturbance deviates (above, below, or either) from its starting value by more than the Test Limit. The following table describes the Test Limit types: Test Limit Types Above Below Deviation Description Above the current value plus the deviation amount Below the current value minus the deviation amount Above the current value plus the deviation amount or below the current value minus the deviation amount.

Note If you include an integrating parameter, for proper optimizer operation, define it as a Control parameter with zero (0) SP range and assign it a higher priority than self-regulating parameters.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 195 of 258

Dialog for Defining Control and Constraint Parameters For Disturbance parameters, indicate if the parameter is to be included in the model identification. Normally, testing aborts if the Disturbance parameter becomes limited when testing is active. Choosing Ignore Errors causes testing to continue even if limits are hit. If the normal process output change is very small compared to its engineering unit range, such as 5 degF with a range of 1000, select range suppression multiplier (10X, 100X) to get good identification results. The Test Limit deviation value and type (Deviation, Above, Below) should be set to automatically abort testing if the associated Disturbance input deviates (above, below, or either) from its starting value by more than the Test Limit.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 196 of 258

Dialog for Defining Disturbance Parameters Running the Test Once test setup is complete and the downstream blocks associated with the Manipulated parameters included in the test are in their remote mode, select the top level in the left pane, and then select Test to initiate automatic testing of the process. In response, the Manipulated parameters will automatically change in a pseudo-random manner over the test time. While testing is active, the actual mode of the MPCPro function block changes to LO. During testing, a Manipulated parameter can be modified by right-clicking it and selecting Set Value. The portion of testing that is complete is indicated by a progression bar. The estimated time remaining to complete the test is shown above the progression bar.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 197 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 198 of 258

A Test in Progress When the test completes, a green area automatically covers portions of the trend associated with the time that testing was active. You can adjust the time covered by the green area either by dragging the start and end divider bars or positioning the bars by right-clicking the chart. Indicate the area of test data that reflects normal process operating conditions by dragging the green area over the data on the trend window. You can exclude data within the green bar that does not represent normal operation by right-clicking within the green area, selecting Add Excluded Area, and stretching the resulting red bar over the bad data. After you select the test data, choose Autogenerate to create a step response model for the process and the associated controller. Note The module that contains the MPCPro block should not be open in Control Studio when you request Autogenerate since the MPCPro function block is updated in the database during autogenerate. You must first download the associated module to use the generated control. Note It is recommended that system time adjustments are not made over the data collection period. If it is necessary to make system time adjustments, it is best to exclude the data over the time range. An expert user (select Options | Expert) can choose the Create Model option to create the model only from the currently selected I/O parameters. If all the block variables are not included in identification, the result of identification is a partial model since some step responses are unidentified. Block variables are not included if Identify is not selected for Control/Constraint parameters or Include is not selected for Manipulated/Disturbance parameters. Control cannot be generated from a partial model or if one or more step responses are undefined or questionable. The following icons show the model status. Good model Model has one or more questionable step responses Model has at least one undefined step response Model has undefined and questionable step responses When model generation is complete, you can record the conditions that existed for the test in the description area of the interface provided for the model. The default model name can be modified; however, the name cannot include the following characters: \ / : * ? " < > |. Note It is recommended that the model is created (click the Create Model button), then verified before generating the controller.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 199 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 200 of 258

Verifying the Model Opening a model folder and selecting Control and Constraint shows a verification of the model in terms of the calculated process outputs versus the actual process outputs, as shown in the following figure. From this view you can examine the actual process output in direct comparison with the calculated output based on the model either for the time frame defined by the green area of the trend plot or for the original data used in generating the model. You can also examine the XY plot of the actual process output against the calculated output and the corresponding best fit line. In addition, you can use statistics that are provided to indicate how closely the model matches the plant data. Note Only the first 65000 samples will be displayed.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 201 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 202 of 258

Interface for Model Verification The squared error is shown for all Control and Constraint parameters. In addition, for a selected parameter, the calculated and actual value can be plotted for the original time or for the timeframe selected by the green bar in the overview. Accessing Step Responses Select a parameter from the Control and Constraint folder to access the parameter's step response to changes in the Manipulated and Disturbance inputs to a process.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 203 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 204 of 258

View of a Selected Parameter's Step Response to Process Input Changes The background color of the individual step response provides further information about the validity of the step response and if it can be used in controller generation. Background Color Meaning The step response has been identified and can be used in controller generation. The step response has been identified and selected as the most significant for the associated Manipulated process input. Refer to Parameters in Control Generation for more information. The step response is questionable and must be edited before controller generation. Refer to Modifying Step Responses for more information. The step response is unidentified because this parameter was not included in the test setup, the step response has been deleted or cut, or the associated input or output parameter was added to the MPCPro block after the model was identified. The step response must be completed before controller generation is possible. Refer to Modifying Step Responses for more information. The techniques used to identify the step response assume that valid process gains must fall in a range of 0.1-20. If the gains calculated by both the ARX and FIR technique fall below 0.1, the step response will be displayed as invalid (light blue background) with zero gain (a straight line). Also, if the ARX and FIR do not agree, the application presents the step response as invalid as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 205 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 206 of 258

If only one of the identification techniques calculated a gain of less than 0.1, a step response with zero gain will be displayed with a light blue background. The light blue background indicates that the step response is questionable. In these cases, you can set the range suppression multiplier at x10 or x100 for process output. If you expect model gain to be greater than 20, set range suppression at x10 or x100 for the process input. In some cases, the FIR response can be used as a guide in manually editing the step response. As shown in the following figure, often times the FIR response can provide valuable information on the process gain and response and can be used to create the model using Design Response or Plot.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 207 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 208 of 258

For example, the actual process shown as questionable with zero gain, may be caused by a transmitter with a much wider than normal operating range. In this case, it is recommended that range suppression is selected in Test Setup. Range suppression should also be selected if the Manipulated parameter changes are less than 1%. The MPCPro identifier uses the suppressed range as the measurement engineering unit range and then automatically corrects the model gain for the actual range. The process gain based on the suppressed range should be within the assumed range for the process gain (0.1-20). Similarly, if one of the identification techniques provides a process gain that exceeds 20, the response will be shown with zero gain and indicated as questionable. By drilling down into the folder you can access an individual step response to closely examine the step response for any measured Disturbance inputs included in the MPC configuration. The associated step response might be inaccurate if the Disturbance input did not change significantly in the data. If the associated step responses are inaccurate, a warning message is displayed when the model is generated. In some cases, the inaccuracy will be indicated by a step response shown in light blue or as a light blue straight line that indicates no response. Examine the confidence interval calculated for the step response to determine if the step response is accurate. This can be done by selecting the Expert options and then choosing the Display Confidence option in the lower left corner of the screen. In response, the range of 95% confidence is plotted, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 209 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 210 of 258

Plot of 95% Confidence Range As another check on the accuracy of the model, you can compare the ARX model to the FIR response. This can be done by selecting the Expert option and choosing the FIR check box. Both responses are displayed as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 211 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 212 of 258

Comparison of ARX model to the FIR Response Note Only the first 60 points of the FIR response are displayed.

Modifying Step Responses Sometimes, the ARX and FIR responses might not agree. In this case, you may need to use other data that includes times when the input changed. Then you will need to regenerate the model and the controller. Alternatively, if you are familiar with the process dynamics, select the Expert option and modify the step response to reflect your knowledge of the process. Make sure to save the step response by clicking the Save button after modifying it. This causes the new step response to be enabled and subsequently used. There are three methods for modifying the step response. The first method is to design the response by adding points to the selected response: 1. 2. 3. 4. Select the step response to be modified. In the step response area, click the right mouse button or the Add Points button to add the points that define the desired step response. Click the Plot button to display the step response. Select Save if you want the plotted response to replace the original response.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 213 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 214 of 258

Adding Points to Modify a Step Response Use the second method of modifying the step response if you are familiar with the process delay and time constants associated with inputs. For this method, enter the response directly by: 1. 2. 3. 4. Selecting the Design Response button in the lower left corner of the interface. Entering the response in the Step Response Design dialog. Selecting Apply when you are finished to display the new step response. Selecting Save to save the designed step response.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 215 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 216 of 258

Designing a Step Response The third way to view and edit a step response is to select the Edit Coefficients button and change the individual points in the step response. Select Save when you are finished to save the new step response. Another way to modify a step response involves copying and pasting individual step responses or all step responses for a Manipulated or Disturbance input between models as shown below.

Copying and Pasting Step Responses When copying step responses between models, the Time to Steady State used in the model creation must be the same. Using the Copy and Paste commands, it is possible to combine step responses from different models to create one complete model of the process response. For example, operating conditions may not allow automated testing with all Manipulated parameters selected for the test. Only one or two Manipulated parameters may have been selected for test at any given time. As a result, you may need to generate multiple models, each of which includes valid step responses for the process inputs used in the test. Using the Copy and Paste or Cut and Paste commands, it is possible to copy the good step responses from one model to another model. In this way, a good step response can be copied to

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 217 of 258

replace one not identified or not included in the test. As a result, a complete model can be created and then used to generate the control. Note When a step response is cut, its background changes immediately to gray but the response is still shown. After a step response is pasted, the cut step response is shown as blank with a gray background. If a step response model is known to be invalid, you can use the Delete command (context menu selection) to remove the step response from the model. After performing a Delete or Cut operation, the step response's background changes to gray as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 218 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 219 of 258

Any Questionable or Unidentified responses must be manually edited or a good step response pasted to obtain a complete model. All step response models must be good (dark blue background) before a controller can be generated using the model. Make sure that you clean up any residual step responses with gains that are ten times smaller than the highest gains. Once you are satisfied that the model accurately reflects the process dynamics, select Generate to update the MPCPro configuration for the new model and to generate the controller using the step response modifications. When the controller is generated from a selected model, the Control parameters used for generation are displayed as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 220 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 221 of 258

It is recommended in most cases that you leave the controller generation parameters at their default values and select Generate in the Controller Generation dialog to generate the control. If you have expert MPC knowledge, you can change the default values to address special requirements. For example, you can increase the Penalty on Move to make the control less aggressive. You must download the associated module to use the new control definition after generating control. You can verify and refine the MPCPro configuration and control generation with the off-line PredictPro simulation application. However, the controller generation parameters cannot be changed online because any changes in these parameters require that the controller be re-generated and the module re-downloaded.

Controller Loading
The loading on an MD controller depends heavily on the block execution period (the configured Time to Steady State divided by 120). Depending upon how sparse the model is, a block configured for 20x20 needs about 200-500 ms of computation time. The MD controller loading for 200-500 ms of computation time is automatically leveled over multiple module executions. This can be seen in MD controller diagnostic parameters such as LPCONTIME and FRETIM. If you notice severe slippage in modules other than the module that contains the MPCPRO block, consider giving these modules a higher priority or assigning them to another node. If a configuration is larger than 20X20, it is recommended that the MPCPRO block be configured singly in its own module with a scan rate of five seconds or slower. This places the computation in the low priority task and prevents slippage of medium and high priority tasks. Larger processes usually have longer time constants and dead times than smaller processes. A time to steady state of 7200 (60s block execution) or slower is realistic for processes with 20 or more inputs and 20 or more outputs. PredictPro allows the configuration of 20x20 processes with Time to Steady States as fast as 120s (1 s block execution). When the time it takes to run the MPCPro block approaches the block execution rate, MD controller overloading occurs and you are prevented from generating and downloading an MPCPro controller. This situation is unlikely with larger process since they are usually slower. To avoid MD controller overloading, increase the Time to Steady State and/or reduce the number of inputs and/or outputs. The red area in the chart and table below indicates the range in which PredictPro prevents MPCPro controller generation and downloading. The yellow area indicates the range in which PredictPro displays an MPCPro controller loading warning but allows MPCPro controller generation and downloading to proceed. The green area shows the recommended configuration. As an example, refer to the table: an MPCPro controller for a process with 20 inputs and 30 outputs (600) must have a Time to Steady State of at least 257.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 222 of 258

Not recommended range # inputs * # outputs 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 3200 (PredictPro displays a warning message) < 480 257 to 960 514 to 1440 771 to 1920 1029 to 2400 1286 to 2880 1543 to 3360 1800 to 6840 2057 to 4320 2314 to 4800 2571 to 5280 2829 to 5760 3086 to 6240 3343 to 6720 3600 to 7200

Not allowed range (PredictPro prevents controller generation) [any Tss allowed] < 257 < 514 < 771 < 1029 < 1286 < 1543 < 1800 < 2057 < 2314 < 2571 < 2829 < 3086 < 3343 < 3600

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 223 of 258

In general, we recommend having at least 30-50% freetime in an MD controller before adding a large MPCPro block to leave ample CPU for communication tasks that might be required for all the display updates. Note The table and chart present the maximum numbers for one single block per MD controller. Users should not allow more than one MPCPro block in the same MD controller to be in the yellow area. This is not enforced programmatically. The memory used by an MPCPro block is automatically adjusted based on the configured number of inputs and outputs. It ranges from about 0.3 to 5MB. If the available memory in the controller is insufficient, a block remains in OutOfService mode and flags a configuration error after download.

Setting Sampling and Execution Rate Parameters


Model identification and validation depend on the availability of data at precise sampling points. Therefore, the test data (or data from an external file) must have accurate parameter settings which determine the data sampling. The following three parameters, accessible through the Control Studio and PredictPro applications, are used to determine the data sampling: 1. Data Sampling Rate (DSR) - the block history sample rate configured in the MPCPro Properties dialog box (accessible from the Control Studio and DeltaV Explorer applications). If you are using file data, this is the file data rate. 2. Module Execution Rate (MExec) - the Module scan rate configured in the Control Studio application. 3. Time to Steady State (TSS) - the process Time to Steady State configured in the PredictPro application. Since PredictPro uses a horizon of 120 (120 sample points along the process TSS so that the block executes at the rate TSS/120 in seconds), the fundamental requirements, in mathematical form, for accurate data sampling are: Equation 1: TSS = 120 x DSR x n Equation 2: TSS = 120 x MExec x m where m and n are integers. Ideally, DSR = MExec x p (p is an integer) also should be satisfied.

Recommendations

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 224 of 258

Module Execution Rate (MExec) The default value is 1 second; however, for large MPC configurations, or those with a TSS of 1 hour (3600 sec) or more, consider configuring MExec at 5 seconds. For blocks with a configuration where (Number of Outs x Number of Ins > 400), MExec of 10 seconds or slower is more appropriate. For blocks with a configuration where (Number of Outs x Number of Ins > 200), MExec of 5 seconds or slower is more appropriate. Data Sampling Rate (DSR) The default value is 1 second; however like MExec, for larger MPC configurations or those with a TSS of 1 hour (3600 sec) or more, consider configuring DSR at 5 seconds or slower. When configuring DSR, it is advisable that the value of n in Equation 1 range between 3 and 10. This permits the creation of models at different TSS that are close to your expected TSS. At the same time, it does not overload the historian. Time to Steady State (TSS) The Time to Steady State is the estimated time, in seconds, for the process to respond to input changes. Typical estimates are: (3 x First Order Time Constant + Dead Time) or (4 x Dead Time), whichever is greater for the slowest responding input/output pair of the MPCPro block. The default, and minimum value, is 120 seconds. When accurate TSS values are not known, it is advisable to use the higher of the two estimates. For integrating processes, refer to these guidelines.

Applicability in PredictPro
The DeltaV PredictPro application checks for relationships between the time parameters for test, model creation, and verification operations. It uses the entered process TSS as the basis for making any recommendations and/or changes. Test Since the test generates the data to be used in all subsequent operations, both Equations 1 and 2 must be satisfied. If not, PredictPro suggests an adjusted TSS that does not require a change to DSR or MExec. If the adjusted TSS is significantly different than the configured TSS, PredictPro recommends some values. Note that a threshold of an approximate 25% change in value applies in either displaying the adjusted values or automatically using the adjusted values. Model Creation Since data is already available at this stage, PredictPro checks that only Equation 1 is satisfied. In the case of a mismatch, PredictPro suggests a new TSS value. Naturally, if the suggested values are not accurate, the TSS and/or the sampling rate may be changed. If you are changing the sampling rate, generate a new data set at the new sampling rate before creating the model. Verification Against Selected Data PredictPro checks that only Equation 1 is satisfied. If not, the application proceeds no further since the models execution rate must be an integer multiple of the sampling rate of the data set for verification.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 225 of 258

Changing the Parameter Values


To change the historian sampling rate (DSR): 1. 2. 3. 4. 5. In Control Studio, double-click the MPCPro block to open the block's Properties dialog. Click the History sample rate drop-down list and change the parameter value. Save and re-download the module. Re-download the Continuous Historian node to which this module is assigned. Re-connect the PredictPro application to this block by shutting down and restarting PredictPro or by selecing File | Select Block.

To change the module execution rate (MExec): 1. 2. 3. 4. 5. 6. Open the module with the MPCPro block in Control Studio. Click Edit | Properties to open the Module Properties dialog and select the Execution tab. Click the Scan rate drop-down list and change the parameter value. Save and re-download the module. Re-download the Continuous Historian node to which this module is assigned. Re-connect the PredictPro application to this block by shutting down and restarting PredictPro or by selecting File | Select Block.

To change the TSS: 1. Open the PredictPro application and select Test Setup in the left pane. 2. Enter the appropriate value for Time to Steady State.

Defining Control and Optimization Objectives


Optimization objectives are defined for: Constraint handling Achieving the desired control functionality Achieving economic objectives Constraint handling is defined by assigning priorities to the process outputs such as the Control and Constraint variables of the MPCPro configuration. The Optimizer operates such that if a Constraint or Control parameter is projected to exceed its constraint limits or control range, the working setpoints of the other control parameters are adjusted to bring the process output within limits.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 226 of 258

If processing conditions do not allow all Control and Constraint parameters to be maintained within control ranges and constraint limits, the lower priority Control or Constraint parameters are allowed to go outside the control range or constraint limits. Refer to Model Predictive Control Professional Function Block for details on setting the priority. The MPCPro function block allows five priorities for the process outputs: 1. 2. 3. 4. 5. High Higher than Normal Normal Lower than Normal Low

The default priorities set during MPCPro configuration may not apply to a specific application. Users should always review the priorities for Control and Constraint variables. There are two way to review priorities: during configuration and from the MPC Pro Operate application. 1. During configuration. Select the function block, click the right mouse button, select Properties, click the Advanced button, and read the value in the Priority column. 2. From the MPC Pro Operate application. In the PredictPro application, click Applications | MPC Operate Pro to launch the application and then click Optimizer | Show Dialog.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 227 of 258

The Optimizer Window in the MPC Operate Pro Application Control objectives define multivariable control configuration functionality at normal operating conditions, that is when all process outputs are within control ranges and constraint limits. The control functionality is defined for Control, Constraint and Manipulated variables. In the PredictPro application, click Options | Optimization Configuration to open the Configure Multiple Objective Functions dialog.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 228 of 258

Dialog for Defining Control and Economic Objectives Control parameters included in an objective function have determined behavior around setpoints. As a rule, Control parameters defined in the objective function are driven towards their setpoint values. A Controlled parameter can deviate below and/or above the setpoint, depending upon its definition of maximize, minimize, or target. A Control parameter defined as: Maximize moves below the setpoint within the control range if necessary to achieve constraint handling or economic objectives. When other objectives are achieved, it then moves upward to the setpoint (maximizing the Control parameter). Minimize moves above the setpoint within the control range if necessary to achieve constraint handling or economic objectives. When other objectives are achieved, it then moves downward to the setpoint (minimizing the Control parameter).

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 229 of 258

Target moves above or below the setpoint within the control range if necessary to achieve constraint handling or economic objectives. When other objectives are achieved, it then moves toward the setpoint. Control parameters not included in the objective function are defined automatically as None and will be kept above or below the setpoint with no attraction toward the setpoint.

Control Parameter - Range and Direction Driven by the Optimizer Constraint parameters included in the objective function are driven towards their high or low limit based on the maximize or minimize definition. When the Constraint parameter is not included in the objective function, the optimizer is free to make changes that cause the constraint to move within its upper and lower limits as shown in the following figure.

Constraint Parameter - Range and Direction Driven by the Optimizer Manipulated parameters included in the objective function are driven towards their high or low output limits based on their maximized or

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 230 of 258

minimized settings or their associated CV's maximized or minimized settings. If a Manipulated parameter is not included in the objective function, the optimizer attempts to maintain the current value if no other conditions require the Manipulated parameter to be moved. Selecting PSV (Preferred Settling Value) causes the optimizer to maintain the Manipulated parameter at the configured preferred settling value if no other conditions require a changed MV position. When the MV objective is defined as: None and all other objectives are satisfied, the MV is kept at the current (last) position. Preferred Settling Value (PSV), it will be satisfied only when all other objectives are satisfied. If two or more MVs are configured for equalize, the optimizer attempts to maintain the associated MVs at the same value after achieving the other objectives as shown in the following figure.

Manipulated Parameter - Range and Direction Driven by the Optimizer Note The default objective function, Standard, does not need to be defined and is automatically created for the MPCPro block configuration. The standard control objective is to maintain Control parameters at setpoints. If the configuration contains only Constraint variables, the last MV values are maintained thus preserving the stability of the configuration. By default, Control variables have normal priorities assigned and Constraint variables have higher than normal priorities assigned. The Standard control objective can be modified but not renamed. However, the other objective functions can be modified and renamed. An objective function is modified by selecting a parameter that is included in the objective and then choosing Modify to define the optimization type (Maximize, Minimize, Target, PSV or Equalize). You can also define the limits for constraints included in the objective function. The objective functions for which the Operator Selectable box is checked are automatically included in the objective list that is displayed in the MPC Operate Pro interface.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 231 of 258

Economic objectives add economic meaning to the defined control objectives by setting value per% to some or all Control, Constraint and/or Manipulated parameters included in the objective function. Any value entered in the value per % column outweighs all other related control only objectives with no economic meaning (value per % = 0). The acceptable range for "value per %" is [0.0-1000.0]. If you need to apply "value(s) per %" that are out of the accepted range, you must rescale all "values per %"by multiplying them by an arbitrary scaling coefficient. "Value per %" can be rescaled in a meaningful way; for example, "$ per % per one hour operation" to "$1000.00 per % per one hour operation" by multiplying the original values by 10-3 or to "$ per % per one day" by multiplying the original values by 24. The Economic objective is satisfied prior to Control objectives unless limits are exceeded and then Constraint objectives take the highest priority. Except for economic objectives for MVs defined in the value per% column in the Optimizer dialog in the MPC Operate Pro application, the Objective Function per% column for each MV displays the effective value per percent. This column includes the value defined for the MV itself in the value per% column and values projected from the other Control and Constraint variables associated with this MV. These projected values may outweigh the original MV objective and the optimizer would drive that MV in a direction opposite to that which was intended. Users should be aware of this possibility and always verify the Objective Function per% column to get an initial evaluation of the optimizer's functionality.

Relationship of the Objectives Defined for Control, Constraint, and Manipulated Variables and Effective Objective Projected on MV

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 232 of 258

To meet special requirements where the control objective can change based on feedstock cost, or product value, you can define different MPCPro objective functions for the same configuration and select desired functions during operation.

Parameters in Controller Generation


The Constraint and Control parameters included in the controller generation are automatically selected to give the best possible dynamic response. The total number of Control and Constraint parameters included in the controller generation must be equal to or less than the number of independent parameters (the total number of Manipulated parameters). The selection of the Control and Constraint parameters to include in the control generation is automatically made to provide the minimum condition number associated with the control generation. In addition, the delay and gain of the process output step responses for a change in the Manipulated process input is also considered. Select the Controller Setup icon in the left pane to examine the parameters that have been selected for the control generation.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 233 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 234 of 258

View of the Parameters Selected for Control Generation In this interface, the dynamics of the process outputs for a selected Manipulated parameter are displayed. Also, the condition number for the current selection of Constraint and Control parameters is shown. By removing a selection for a Manipulated parameter, it is possible to select another Control or Constraint parameter to be used in the control generation. When the new process output is added, the resulting condition number is automatically displayed.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 235 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 236 of 258

Best control is normally achieved if the process outputs are selected to give the minimum condition number. It is possible to have more independent or Manipulated parameters than Control and Constraint parameters. The possible range of condition numbers is: Less than 1000 - normal control generation is possible Greater than 1000 but less than 10,000 - control generation with warning is possible Greater than 10,000 - control generation is not possible Note Review your model and control configuration and try to minimize the condition number.

MPC SimulatePro
After downloading the module containing the MPCPro block, you can use the MPC SimulatePro application to test the control off-line without impacting the process operation. An off-line simulation of the process is provided based on the process model that was identified using DeltaV PredictPro. In this simulation environment, you can simulate control as well as the process response to changes made by the PredictPro control. Using MPC SimulatePro's special interface, you can interact with the control just as you would during an actual process. You can add noise and unmeasured load disturbances to the process inputs. MPC SimulatePro also allows you to evaluate the control performance of the MPCPro function block for different plant operating conditions. In addition, you can perform an expedient test on the control without disturbing actual plant operations. In this way, MPC SimulatePro can also serve as an operator training tool. The prerequisites for running MPC SimulatePro are: 1. The module that contains an MPCPro function block to be simulated exists in the persistent database (that is, the model and the MPC controller have been generated) and the module containing the MPCPro block has been downloaded to the controller, application, or ProfessionalPlus workstation. It is recommended that the MPCPro block be included in a module with no other blocks so that the module can be downloaded at any time. 2. DeltaV PredictPro is open for the module. 3. You have identified or manually entered a process model and generated the controller using the PredictPro application and the block of interest. To access MPC SimulatePro, you must first select Options | Expert to identify yourself as an expert user. Then, either select the process model that you want to use for the process simulation from the models that have been generated and click the Simulate button located at the bottom left corner of the screen or select the process model in the hierarchy, right-click, and select Simulate to test the control off-line. Refer to the following figures. Note The process simulation provided for testing MPCPro is based on the model you select in the hierarchy before clicking on the Simulate button. The MPCPro control used in this simulation environment is always based on the model that was used to generate the MPCPro control

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 237 of 258

(that is, the model displayed in the hierarchy with a controller icon). To test MPCPro control for changes that impact the process response (model mismatch) select a model other than the one used for controller generation. The selected model will be used for the process simulation.

Once Simulate is selected, the interfaces used to access the simulation is automatically created as shown in the following image.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 238 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 239 of 258

MPC SimulatePro Interface MPC SimulatePro functions similarly to MPC Operate Pro. However, MPC SimulatePro also allows you to perform the following functions to support simulation: Execute the process and control simulation faster than real time. This allows you to evaluate the performance of a process that is slow in response. Introduce disturbances that will be added to the process output or disturbance input used in the simulation. You can evaluate the impact of noise and unmeasured load disturbances on the process control and change the value of measured load disturbances inputs. Disable inputs to test control performance when the status of a Control, Constraint, or Disturbance input is Bad. Switch the mode of the downstream blocks to Local so that the control performance can be examined for this situation. If you are using DeltaV Operate refer to the MPC Operate Faceplate topic for a more detailed description of MPC Operate. All values and ranges are based on your MPCPro function block's configuration. MPC SimulatePro shows the names of both the configured model and the simulation model. The trend area continually updates (that is, it defaults to Continuous mode upon launching). The future area comprises one third of the graph, and is yellow to distinguish it from MPC Operate Pro, which is green. Initially, the time scale on the chart is based on the time when MPC SimulatePro was launched. As you change the real-time execution multiplier, the time change reflects that multiplier. You can change the setpoint and Manipulated variable. Also, the effects on predicted Control and Constraint variables are shown in the trend and the faceplates. You can select and change the real-time execution multiplier to be used in the Continuous mode or you can select the Step mode by clicking the Advance button. Refer to the following figure for information on these controls.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 240 of 258

When using the real-time execution multiplier, select the Pause button to temporarily freeze the display of the multiplier change. Select the Resume button to continue updates. When using Step mode, the trend is a snapshot and the MPCPro function block execution is only performed on request. Click the Advance button to access Step mode. You can change from Step mode to Continuous mode by selecting the Resume button. To force a disturbance on a process output or Disturbance input, select the parameter to which the disturbance is to be added. The faceplate for this parameter is displayed in the left pane of the MPC SimulatePro interface. Use the selections provided in the bottom half of this faceplate to specify the disturbance to be introduced, as shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 241 of 258

When you are finished using MPC SimulatePro, you can save the file you created for future reference. Saving the file saves not only the trend selection and the Y-scale, it also saves all user-adjusted values for signal amplitude, bias, and the period for the next simulation run on the same module. For this module, you can select a new model to be used in simulation. When you do so, if you previously saved this setup information, it can be used with the new model. In addition, the previously used setup data becomes the default.

Defining an MPCPro Operator Interface


You can create an operator interface for the MPCPro function block using the MPCPro Input (MV/DV) and the MPCPro Output (CV/AV) dynamos from the frsAdvCFncblk dynamo set in DeltaV Operate in configure mode.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 242 of 258

Place the dynamo adjacent to the associated I/O or control block on the process graphic. When you place a dynamo on a graphic, the Dynamo Properties dialog box opens.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 243 of 258

For the MPCPro Input and Output dynamos to work properly, both the Module/Function Block name and the Parameter Description are required fields. The Parameter Description is the description that was configured for the input or output variable in Control Studio. The following example shows how this entry appears for module UNIT1_MPC and a Manipulated parameter with a user description FC101. Refer to Model Predictive Control Professional Function Block for configuration information.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 244 of 258

The dynamos provide access to the module's faceplate and the faceplate provides access to the module's Detail display. Both the faceplate and the Detail display provide additional information on the MPCPro target or limit values as shown in the following figures.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 245 of 258

Control Parameter Faceplate and Detail Display

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 246 of 258

Manipulated Parameter Faceplate and Detail Display

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 247 of 258

Constraint Parameter Faceplate and Detail Display

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 248 of 258

Disturbance Parameter Faceplate and Detail Display Place the MPCPro_Oper dynamo on the primary graphic display of the process that is controlled by MPCPro. When you access this dynamo or the one on the faceplate, a predefined view of MPCPro control is provided that you can use to make setpoint and mode changes associated with the MPCPro function block. An example of this display is shown in the following figure.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 249 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 250 of 258

Through the view selection, you can choose options to customize the information presented in the MPC Operate Pro interface. For large MPCPro applications that involve many process inputs and outputs, the Smallest Faceplate size option allows more process inputs and outputs to be viewed directly, as shown in the following image.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 251 of 258

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 252 of 258

From the MPC Operate Pro toolbar, you can select a dialog that shows the cost and profit associated with the selected objective as shown in following image.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 253 of 258

Refer to the MPC Operate Faceplate topic for a more detailed description of MPC Operate. Refer to the Dynamo Reference topic for more information on the MPC dynamos provided to construct the operator interface for an MPC function block.

Using External Historic Data


Inside this topic In some DeltaV installations, historical data can be collected and recorded either manually or from a system that is not connected to the DeltaV system. In other installations, 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 historic data, rather than data from the DeltaV Historian, to create process models and control definitions to be used by the MPCPro function block in a DeltaV system. The PredictPro application can use data from a file to develop a model that can be used to generate the MPCPro control. The PredictPro application can also verify a model against data from a file. This section describes how DeltaV PredictPro uses data files, the required data file format, and the utilities included in the DeltaV system to export data from the DeltaV Historian into a file. Developing a Process Model from File The DeltaV PredictPro application normally uses data from the DeltaV Historian to create the process model used to generate control. However, DeltaV PredictPro can also use historic data saved in data files to generate control. The data file must contain historical values for all inputs and outputs used in the MPCPro block and the data must be formatted correctly to be used by DeltaV PredictPro. Refer to the Data File Format topic for more information. To use historical data from a file, you must first create a module that contains an MPCPro function block. The MPCPro block must reference the DeltaV inputs and outputs that will be used in the control. Download the module to a controller or application station, start DeltaV PredictPro, and connect DeltaV PredictPro to the MPCPro block. From DeltaV PredictPro, select File | Select Data Source | Load Data from File, and autogenerate or create the model. When you select either of these options, a dialog appears in which you specify the data file to use. After you select the data file and click OK, DeltaV PredictPro performs the selected command using the data file and presents the results as if you had used data from the DeltaV Historian. Verifying a Process Model against data from a File In order to validate the identified process model, the DeltaV PredictPro application normally uses trend data from the DeltaV Historian or the original data used to create the model. However, DeltaV PredictPro can also use historic data saved in data files. The data file must contain historical values for all inputs and outputs used in the MPCPro block and the data must be formatted correctly to be used by DeltaV

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 254 of 258

PredictPro. Refer to the Data File Format topic for more information. To verify a process against historical data from a file, you must have created a model for the configured MPCPro function blocks, and you must be in Expert mode. In DeltaV PredictPro, select the model you want to validate and then either right click and select Verify Model | Verify Model Against File Data or click the Verify button on the model display. 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 PredictPro verifies the model predictions against the data file and presents the results as if you had used data from the DeltaV Historian.

Data File Format


For best results when creating and verifying models from data files, the values contained in the data file should reflect normal conditions over the operating range of the process. For model creation, the data is normally of the form obtained with open loop bump testing. 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. The data files must be saved as .dat files and formatted in a particular way for DeltaV PredictPro to use them. The data files must contain the following information formatted as described: Line 1 Must contain the phrase DeltaV_MPC_Pro_Data <eol> Note The above header specifies to DeltaV Predict that this is a historical data file. Line 2 Lists the Number of Controlled and Constraint Variables<tab>The Number of Disturbance and Manipulated Variables<eol> The number of variables should correspond to those that you configured in the associated MPCPro function block. Refer to the Example PredictPro Data File in this topic for an example. 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. Line 4 The date in MM/DD/YYYY format <tab> Time in HH:MM:SS format for the last sample<eol> Line 5 An empty line <eol>

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 255 of 258

Line 6 Lists the identifiers of the Control and Constraint followed by Manipulated and Disturbance references separated by tabs <eol> The user configured identifier names such as FC201 should match those that you configured in the associated MPCPro function block. They should be placed in the order of the variables as identified in the MPCPro function block configuration (for example, Proc_Out1, Proc_Out2, Proc_In1, and so on). Therefore, the order will match that of the data, as indicated in Line 8. Line 7 An empty line <eol> Line 8 through the end of data The data in the following order: index of the sample<tab>first process output variable value<tab> last Process ouput variable value<tab>first process input variable value<tab> last process input variable value <eol> The order of the data should match the order of the configured variables. If the data contains values that do not reflect normal operating conditions, replace those values with non-numeric strings to indicate that these values should not be used in the model identification. During identification, the corresponding sample values are replaced by interpolating between the good data values. Last Line An empty line <eol> The following is an example PredictPro data file for a block consisting of four Controlled variables and five Constraint variables (totaling nine process outputs), and four Manipulated variables and two Disturbance variables (totaling six process inputs). The example shows only a portion of the starting and ending input and output values out of the 1618 total. The data was obtained with a sampling period of 1.0 seconds. Note that to flag some of the output and input data values as bad, (the values should be replaced by BAD, or any non-numeric string).

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 256 of 258

Example PredictPro Data File

Extracting Data from the DeltaV Historian


In some cases, you may need to extract data from the DeltaV Historian into one file that can be used in another DeltaV system to develop a process model. Use the Continuous Historian Excel Add-In to export DeltaV historic data into an Excel spreadsheet.

Using External Models


It is possible to use models that were created in other applications in DeltaV PredictPro. This procedure explains how to use externally created models in PredictPro.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 257 of 258

1. 2. 3. 4.

Create the MPCPro configuration in DeltaV Control Studio. Download it and assign it to a node. Open the PredictPro application and connect to the MPCPro block. Select Options | Expert. Click File | New Model to create the header file. (By default the header file is created in DVData|PredictPro\ModelName\ ModelHeader.predictPro.) 5. Follow these steps to create a model template for each step response: Expand the Manipulated & Disturbance folder under the model in the tree view in PredictPro. The following image shows the Manipulated & Disturbance folder expanded and one of the outputs (Out 1) selected.

Select any output. For each selected output: Click the Design Resp button on the PredictPro interface and click OK to accept all the defaults in the Step Response Design dialog.

Click Save on the PredictPro interface to save the step response.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

Page 258 of 258

Repeat the procedure for every output within the expanded Input folder to develop a template for a complete model. Now, use Microsoft Excel and format and edit the external file according to the PredictPro Inputs vs. Output.dat file template. Be sure that the formatted external file is in the form of step responses with 120 coefficients and that the scan period in the imported model is the same as that in the PredictPro application. Replace the step responses in the PredictPro generated Input vs. Output.dat file with the step responses from the external file. Repeat the procedure for every Input vs Output template file to get a complete model. When generating the controller, verify and adjust the penalty on move manually.

Tailoring MPCPro Control Performance


The MPCPro controller minimizes future control errors and control moves. The control calculations assume that your process response is reasonably linear over its normal operating range. If the process model has been accurately identified during testing, the default controller settings used in controller generation should provide stable operation and acceptable performance. If you would like a faster or slower control response, choose the Expert option to create the model and generate the controller. After the model is created, you can make adjustments to it before it is used in controller generation and you can examine and modify the default parameters that are used in controller generation to meet your specific application requirements. When developing a typical MPCPro application, keep in mind that the default settings for MPCPro controller generation will provide a good response for most applications. For guidelines on adjusting the penalty on move and penalty on error, refer to the Tailoring MPC Control Performance topic.

file://C:\Documents and Settings\Administrator\Local Settings\Temp\~hh19FB.htm

6/9/2009

También podría gustarte