Sie sind auf Seite 1von 54

L10 - PlantPAx MPC: Optimization in the Logix

Controller for Easy Deployment

For Classroom Use Only!


Important User Information
This documentation, whether, illustrative, printed, online or electronic (hereinafter Documentation) is intended for use only as
a learning aid when using Rockwell Automation approved demonstration hardware, software and firmware. The Documentation
should only be used as a learning tool by qualified professionals.

The variety of uses for the hardware, software and firmware (hereinafter Products) described in this Documentation, mandates
that those responsible for the application and use of those Products must satisfy themselves that all necessary steps have been
taken to ensure that each application and actual use meets all performance and safety requirements, including any applicable
laws, regulations, codes and standards in addition to any applicable technical documents.

In no event will Rockwell Automation, Inc., or any of its affiliate or subsidiary companies (hereinafter Rockwell Automation) be
responsible or liable for any indirect or consequential damages resulting from the use or application of the Products described in
this Documentation. Rockwell Automation does not assume responsibility or liability for damages of any kind based on the
alleged use of, or reliance on, this Documentation.

No patent liability is assumed by Rockwell Automation with respect to use of information, circuits, equipment, or software
described in the Documentation.

Except as specifically agreed in writing as part of a maintenance or support contract, equipment users are responsible for:
properly using, calibrating, operating, monitoring and maintaining all Products consistent with all Rockwell Automation
or third-party provided instructions, warnings, recommendations and documentation;
ensuring that only properly trained personnel use, operate and maintain the Products at all times;
staying informed of all Product updates and alerts and implementing all updates and fixes; and
all other factors affecting the Products that are outside of the direct control of Rockwell Automation.

Reproduction of the contents of the Documentation, in whole or in part, without written permission of Rockwell Automation is
prohibited.

Throughout this manual we use the following notes to make you aware of safety considerations:

Identifies information about practices or circumstances


that can cause an explosion in a hazardous environment,
which may lead to personal injury or death, property damage, or economic loss.

Identifies information that is critical for successful application and understanding of the product.

Identifies information about practices or circumstances that can lead to personal injury or death, property
damage, or economic loss. Attentions help you:
identify a hazard
avoid a hazard
recognize the consequence

Labels may be located on or inside the drive to alert people that dangerous voltage may be present.

Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures.
PlantPAx MPC: Optimization in the Logix Controller for Easy Deployment

Contents
Before you begin ............................................................................................................................................................................... 4
About this lab .................................................................................................................................................................................... 4
Intro Part 1: What is Model Predictive Control .................................................................................................................................. 4

PlantPAx MPC Exercises (Logix embedded MPC)....................................................................................... 6


Intro Part 2: Model Predictive Control on a Coating Oven ................................................................................................................ 6
The Process: Oven Advanced Control.............................................................................................................................................. 6
Operating Conditions ........................................................................................................................................................................ 7
Control Task...................................................................................................................................................................................... 8
Tools & prerequisites ........................................................................................................................................................................ 9
Lab Shortcuts .................................................................................................................................................................................. 10
Phase 1 Building Controller Model............................................................................................................................................... 11
Phase 2 MPC Design................................................................................................................................................................... 26
Phase 3 Validating MPC Design .................................................................................................................................................. 34
Phase 4 Exporting MPC to Logix ................................................................................................................................................. 39
Phase 5 Executing MPC in Logix................................................................................................................................................. 43
Phase 6 Monitoring MPC ............................................................................................................................................................. 48
Phase 7 Tuning MPC from Faceplate .......................................................................................................................................... 51

3 of 54
Before you begin
This course introduces users into development and installation of MPC applications in a Logix environment. The user is assumed
familiar with general control vocabulary and general integration concepts of applications within a DCS/control system
environment along with general process behaviors in processing equipment.

About this lab


There is a separate workstation-based MPC product called Pavilion8 MPC and the new Logix embedded product is PlantPAx
MPC. MPC describes a model predictive control technology that is described in more detail below. Any MPC package
incorporates a configuration environment where models are developed, a run-time execution program that executes periodically
at a selected cycle-time (execution frequency) to calculate best control actions based on continuously varying input data and a
run-time visualization environment where advanced features and user interactions with a running controller are provided.
This lab takes approximately 90 minutes to complete.
Steps for designing MPC controller and using MPC on Logix Designer projects or MPC on workstation-based project (DCS
independent) will be presented. The demo will provide a brief introduction to MPC control along with examples demonstrating the
value that MPC can offer for process control applications. The demo will show how to:
1. Design a MPC for a particular process
2. Generate a MPC Add-On Instruction and import it to a Logix Designer project or generate a workstation run-time
executable to run on your workstation
3. Download the project to a Logix controller and test it on Process simulator or start your project on your workstation and
view it in the Workstation-based browser MPC Console
4. Monitor MPC behavior on-line
This demo takes approximately 90 minutes to complete.

Intro Part 1: What is Model Predictive Control


Model Predictive Control (MPC) is an advanced control methodology that uses explicit dynamic models identified, generally from
plant tests to delivery improved control performance particularly with processes with interacting controllers that are better
coordinated, processes with long or complex time lags, processes with measurable disturbances that can be measured before
they divert objectives from targets and processes where an operator wants to routinely push to limits (constraints) to maximize
performance.
1. Interacting controllers MPC is multivariate so different PID loops or process actuators can be coordinated such as
throughput and energy, heating and cooling, different feed materials, etc. The most common challenge is maintaining
product quality and consistency while production rates are increased or decreased.
2. Long or complex time lags MPC has explicit dynamic models on each interaction so it can directly specify very slow
processes or responses with long delays that are difficult for PID algorithms. MPC can coordinate fast and slow
responses such as hot air in a kiln with slow solid flows and can deal with challenging dynamic responses such as
inverse or responses that vary with throughput.
3. Measurable disturbances MPC can incorporate measurements of upstream changes that operators are aware and
sometimes watch out for that will cause process upsets such as changing feedstock quality, weather changes or even
daily cooling water and other utility cycling.
4. Maximizing performance up to constraints MPC can also incorporate operating targets along with process limits.
These constraints can be directly enforced and this allows a more comfortable, safe approach to the process limits that

4 of 54
enable production, energy efficiency and yields to be maximized.
Rockwells Model Predictive control is now available in two platform options. In this lab we will focus on the new embedded MPC
product that has gotten a lot of interest from customers with a Rockwell control system.
PlantPAx MPC runs on PlantPAx or ControlLogix platform and requires a 1756-MPC module that executes MPC
functionality in the ControlLogix chassis. The MPC module is integrated with PlantPAx user applications using generated
Add-on instructions. A workstation-based monitoring option is available for advanced monitoring, but is not required so that
all MPC calculations are workstation independent. This makes integration with your measurement and control system direct
and easier, puts MPC at a closer proximity to measurement and control actuators and delivers MPC on a more stable and
reliable platform PlantPAx.
Pavilion8 MPC runs on a dedicated workstation connected to any control system via FTLiveData or OPC so it is designed
for applications supporting any DCS including PlantPAx. Because of the higher CPU and memory capabilities available on
a workstation very large-scale MPC problems can be solved with Pavilion8 MPC, nonlinear problems are solved directly and
this controller can incorporate simple real-time optimization directly in the MPC configuration.
For their hardware platform both Rockwell MPC options are some of the most powerful available technologies for advanced
control you can find. They share similar dynamic model and tuning parameters and will in the future use more and more common
advanced tools. Today there are two individual MPC configuration environments, two run-time executables and two advanced
dashboard platforms. In this lab we will work through development of the MPC solution on either platform so you can pick the
toolset of your choice. While we try to describe the ideal application of each option above the simplistic difference is PlantPAx
MPC is even easier to use today, particularly on a Logix-based DCS and Pavilion8 MPC is a more technically capable
technology and designed for any or even multiple different DCS technologies today.
The lab today provides a deep working exercise with PlantPAx MPC based on an oven control example.

5 of 54
PlantPAx MPC Exercises (Logix embedded MPC)

Intro Part 2: Model Predictive Control on a Coating Oven


PlantPAx MPC extends process control capabilities of the ControlLogix Control System to enable powerful Advanced Control
capabilities with a controller. It supports MPC applications up to 10 Manipulated Variables (MVs), 10 Controlled Variables (CVs)
and 10 additional Disturbance Variables (DVs).
The PlantPAx MPC instruction allows a user to change design parameters, including process model parameters, on-the-fly.
The PlantPAx MPC Instruction Set consists of:
A Built-in MPC Instruction that executes in dedicated MPC Module, which can support up to five independent instances of
MPC instructions, and
An MPC Client AOI and the MPC Tag that become parts of a user program running on a Logix Controller.

The Process: Oven Advanced Control


Organic coating stands for surface finish manufactured using a mixture of film-forming binder resins, such as those based on
alkyd, nitrocellulose, acrylic, polyester, or other chemistry and flammable or combustible solvents, such as hydrocarbons, esters,
ketones, and alcohols. Such a process is economic, ecological and offers consistent quality and flexibility in surface finish, color
and gloss. The hearth of the process is a curing oven preceded by coating head applying liquid paint to both sides of the treated
metal strip. The strip is then passed through an oven, where the solvents are extracted and the coating cured.
The following figures show the principal scheme of a coating line and a single zone of the oven considered as a Lab object.

There are two variables under control, oven temperature (CV0) and oven pressure (CV1). Oven temperature has to track the
setpoint which changes dynamically from time to time depending on the recipe while oven pressure should be kept below
atmospheric pressure to prevent poisonous gasses to penetrate to the service area via entry and exit doors that cannot be
hermetically closed. High quality product is manufactured if the oven temperature differs less than 1degC from the setpoint.
The oven gets heat from two sources, local gas burner and central hot air supply. Heat delivered by hot air is recuperated and
thus it is a preferred heat source over gas due to energy cost. There are two actuators manipulated by a control program, gas

6 of 54
control valve opening setpoint (MV0) and flap valve opening setpoint (MV1). Opening of the flap valve is limited and the limit
varies due to external conditions.

There are four disturbance variables affecting temperature and pressure to some extent. The lab considers hot air supply
temperature (DV0) and pressure (DV1), ambient temperature (DV2) and suction flow (DV3). All of them are measured.
There are mutual interactions between MVs, DVs and CVs. To summarize, the problem is a typical MIMO constrained control
problem for which it is difficult to design an algorithm utilizing conventional means, like PIDs.

Operating Conditions
Operating conditions for the process are shown in the following figure.

7 of 54
Control Task
The control problem includes maintaining oven temperature and pressure while manipulating with multiple heat supplies
simultaneously with the aim of achieving high quality recipe tracking, using low cost heat whenever possible and rejecting the
effect of various disturbances on-the-fly.
The Lab is organized according to the scheme shown below as follows:
Upload the trend log file OvenDataSet.CSV into the MPCBuilder and run identification to get parameters of linear process
model that will be used by the MPC for predictions.
Enter MPC design parameters reflecting the control requirements and validate your design in simulation using MPCBuilder
Export MPC to the available Logix Designer project Oven.ACD
Open and download the Oven simulator under MPC to Logix and run it. The program will execute a cycled session with
changing recipe (target oven temperature) in Logix. MV1 constraint and disturbances vary automatically being in-built into the
session scenario
Monitor what MPC calculates as a prediction for MVs and CVs using MPCBuilder connected to the MPC instruction via MPC
Tag in Logix on-line
View and use HMI with Faceplates for process monitoring and tuning.
There is an easy way of quantifying the quality of your design through monitoring of two Key Performance Indicators (KPIs)
associated with oven temperature, Over Limit Time (OLT) and Over Limit Area (OLA) per session cycle. Both are to be as small
as possible as they have quality and thus economic consequences.

8 of 54
There are Lab workflow shortcuts available in case you are running out of time. You can skip some phases taking the advantage
of starting from files with partially completed project as shown in the following scheme. Go to Lab Shortcuts section on page 10
to get the details.

Note that Oven project (Oven.ACD) contains the complete lab and thus can be used as-built when lab time expires for Phase 5,
6 and 7 only.
This lab takes approximately <90> minutes to complete.

Tools & prerequisites


Software programs required
Studio 5000
RSLinx Classic
RSView SE Client
PlantPAx MPCBuilder
Hardware devices required
1756-A4B ControlLogix 4 Slot Chassis
1756-PA72C ControlLogix AC Power Supply
1756-L75B ControlLogix Controller
1756-ENBT ControlLogix Ethernet Module
1756-MPC ControlLogix MPC Module
Files required
Oven.ACD Logix Designer project with the process simulator, MPC and session scenarios
OvenDataSet.CSV file with pre-recorded process step responses
Oven_ModelReady.mpc MPCBuilder project with Controller Model built from Oven data set (for lab shortcut)
Oven_SimulationReady.mpc MPCBuilder project with Controller Model and Process Simulator (for lab shortcut)
Oven_ExportReady.mpc MPCBuilder project with complete MPC design (for lab shortcut)
Prerequisites
Basic skills in Ladder logic and FBD programming in Studio 5000 is assumed for the Lab

9 of 54
The Lab configuration and the startup screen of the Lab image is shown in figures below.

Lab Shortcuts
There are couple of shortcuts you can take to save time or focus on features you would like to study in more details. The list of
shortcuts follows.

Start from Phase 2 Designing MPC


Copy Oven_ModelReady.mpc file from Lab Repository (C:\Lab Files\PlantPAx MPC\Repository) to Work folder.
Open the project in MPC Builder.
Continue from page 26.

Start from Phase 3 Validating MPC Design in Simulation


Copy Oven_SimulationReady.mpc file from Lab Repository to Work folder.
Open the project in MPC Builder.
Continue from page 34.

Start from Phase 4 Exporting MPC to Logix


Copy Oven_ExportReady.mpc file from Lab Repository to Work folder.
Open the project in MPC Builder.
Continue from page 39.

10 of 54
Phase 1 Building Controller Model

01. Double click on MPC Builder shortcut icon on your desktop to start MPC Builder

02. Go to File > New Project

03. Enter number of variables related to the process, i.e. 2 for MVs, 2 for CVs and 4 for DVs

04. Click OK
The MPC Controller matrix with empty Controller Model and default setting of MPC parameters appears as follows.

11 of 54
05. Open the text file OvenVariables.txt, which contains our tag names that will be used in identification. We want to
update our variable names to match the tag names in our dataset. This makes our process models and future
control integration more straight-forward and understandable. Also open the MV information in our controller at
the arrow above in the right pane by MV.

12 of 54
06. Select the name next to mv0 in the text file, copy and paste that name into the Name attribute for MV0 in your
new controller (and hit enter).

07. Paste the exact name from your txt file into each controller variable. Do this for all variables in your controller
(remember to select Enter to update the variable display name).
The overall controller should now look like the below display (although various attributed on the right are collapsed partially).
Now your MPC application is specified with the true controller variables.

13 of 54
08. From MPC Builder Menu choose Identification > MPC to ID

to get the startup screen for conducting identification tasks

09. From MPCBuilder Menu choose Identification > Add DataSet

14 of 54
10. Browse the Lab Work folder (C:\Lab Files\PlantPAx MPC) and choose OvenDataSet.CSV for the File Name

11. Type OvenDataSet in the Create new data set field of the New Project window

15 of 54
12. Click Next

13. Classify variables available from the data set file to CV/MV/DV categories. The role of variable will be preserved
and thus they should appear in the same category as indicated here, i.e. CVs are Oven Temp and Oven Press,
DVs are Hot Air Temp, Hot Air Pres, Ambient Temp and Suction Flow and MVs are the Gas and Air Flap Valves.

16 of 54
14. Click Next. The Chart Window with raw data view available for OvenDataSet.CSV file appears.

15. Click Next.


A window enabling renaming variables and adjusting the sampling interval appears. Do not rename the variables as they match
variable integration in your controller file. This is much simplified by updating variable names within the previous steps. The
DataSet also uses regular sampling rate with sampling period of 500ms. Leave the sampling period unchanged.

17 of 54
16. Click Finish.
You are ready to start controller model identification.

17. Unpin (drag and drop) Raw Data View from the main window to see the data set in more details.29. In Raw
Data View change plot type from Stack to Normalize if you prefer to normalize all variables to 0-100% and plot
them in the same window area. You will be selecting time ranges to identify plant response and sometimes plant
steps are easier to see in Stack (not overlapped) plots and sometimes they are more evident in Normalized
plots. You may change this within identification steps to your preference during different activities.

18 of 54
18. Go to the <Identification> Tab and click on the top left cell.
This tells the MPC Builder that you are going to identify parameters of a transfer function describing relation between
Oven_Temp (yellow CV0, process output) and Gas_Valve (blue MV0, process input).
The related variables are highlighted in the raw data view plot (actual color resolution can be difficult depending on your graphic
driver).

19. Use your mouse to mark the time window that will be processed by the identification routine.

Simply point your mouse where you would like the window to start, keep the left mouse button pressed, drag
the mouse to the right or left and release the left mouse button where the window should end. The MV and
DV moves have been designed such that the marking of windows is clear. Start just before the MV/DV step
is applied and finish before the next different MV/DV starts to move as shown in the figure.

19 of 54
20. Click the right mouse button in the selected cell to view options related to the identification task

21. Choose <Run Identification> from the context menu

The identification is run with MPCBuilder default settings for simplicity. You have number of options to
choose here, e.g. model order and range of transfer function parameters the id routine will have to work with.
The default setting assumes the non-integrating first order transfer function with dead time which fits our
case sufficiently well. Range of parameter values is left undefined before the identification starts.

20 of 54
Good practice is to determine up front what models are integrating (non-stable) or non-integrating and then
initially identify your model with a first order transfer function. Then if the model fit indicates a higher order
transfer function will improve the identified data fit, try the likely second order transfer function.

An analysis window enabling you to plot the raw data against the response of the identified model in window selected for
identification appears. This displays a good fit although there may be a very minor second order underdamped response. For
now we will move forward with a first order transfer function as this initial miss match is very small for an excellent overall fit.

22. Close the analysis window.


The cell in the ID model matrix is now filled with step response of the identified transfer function including the process gain.

21 of 54
Repeat the same procedure, i.e. steps 30-34, for other cells with the exception of cells identified by pairs Oven_Press-
Gas_Valve, Oven_Press-Hot_Air_Temp and Oven_Press-Ambient_Temp as the effect of changing gas control valve, supplied
hot air temperature or ambient temperature on oven pressure is not seen in process responses.

You should arrive at the Controller Model shown in the figure below. Check the individual gains. A perfect
match is not expected as your result will probably use slightly different time windows chosen for identification.
Ask the instructor for help in case you would like to consultation on your results. Also remember that you can
redo an identification until you are satisfied with the results. An error or warning message generally indicates
you have selected a bad region for identification in this lab, although in a real process can indicate you need
an improved plant test.

Do not Do not Do not


identify identify identify

Optional steps: If you want to modify that first model to try for a better fit reselect the model between Gas_Valve and
Oven_Temp shown above with a gain of 1.7. The identified dynamic parameters are displayed and you can change the transfer
function (your model) type from FirstOrder to Second Order by selecting that model type and choosing the desired apparently
better transfer function.
Select second order overdamped (an underdamped response displays a response that overshoots the final stable value),
confirm the relevant testing area is selected (or reselect) and identify the model again.

22 of 54
Notice the improved initial fit.

23. Close Raw Data View.

23 of 54
24. Go to Identification > ID to MPC to transfer the results of identification task to MPC for the use as Controller
Model

Mapping of variables matches exactly in our case thus do not change anything in the MPC ID mapping window that appears.

25. Click OK to close the MPC ID mapping window.


The MPC Controller window is then populated with the process model that will be used as a Controller Model by the controller for
calculating predictions and optimal control moves.

24 of 54
26. Go to File > Save Project As > Oven.mpc

Your project is ready for setting design parameters of MPC.

25 of 54
Phase 2 MPC Design
Your task is to design and implement MPC for Logix Project with the following requirements
Track oven temperature setpoint driven by recipe, 1C tolerance
Keep oven at pressures below atmospheric to avoid pollution (and to protect operator safety)
Prefer recuperated heat over burning gas whenever possible and economical
Minimize effects from disturbance variables
The default setting of most of the parameters can be used as a starting point of your design. Only limited number of parameters
require application specific settings. Application specific settings will be discussed next.
Lets summarize control design considerations for setting application specific parameters.
Sampling period and Horizon
MPC sampling period selection should take into account process dynamics and settling time of oven temperature in particular.
The rule of thumb is having at least 10 samples per rise time and the prediction horizon should be as long as the settling time of
the process step response. 50 second horizon (=HorizonOversampleDT = 1000.5) appears OK. The sampling period is the
frequency of your control moves and the Horizon is the number of samples the prediction horizon of your controller observes.
MV and CV related parameters
MPC penalizes fast changes in MV using the MoveSupp parameter and difference between desired and calculated value of MV
(or CV) using the Coef parameter. Move suppression is a penalty for larger move sizes by penalizing the square of your MPC
moves and Coef is a weighting parameter to prioritize important variables over less important objectives. Scaling is used to
balance various variables by relative ranges of their engineering units this scaling makes tuning simpler so that Coef and
MoveSupp is importance and the engineer can ignore unit differences.

Relative importance of setpoint tracking of CVs is also set by the Coef parameter.

There are also limits associated with MV and MV that should be considered (generally safety limits or safety limits based on
maximum allowable move size within one MPC step). These are not tuning parameters, but safety limits.

26 of 54
27. Start MPC Builder and open Oven.mpc project saved in the previous step or just continue your work when your
project is left open.

If you take the shortcut, copy the Oven_ModelReady.mpc file from Repository folder to work folder, open it in
MPC Builder and continue the lab in next step.

28. Open Control parameters and follow changes shown in red below.

27 of 54
29. Open MV0, Gas_Valve parameters and follow changes shown in red below.

30. Open MV1, Air_Flap_Valve parameters and follow changes shown in red below.

True

10
10 10
10
100 100

The reasoning for MV0 parameter settings specific to the control task and process characteristics is as follows.
SPValueReq=True as you would like to keep gas valve closed (MV0 SP value set to 0) whenever possible to save gas.
RocPosLimit=10 %/s and RocNegLimit=10 %/s to cope with the rate position change of gas control valve in the Simulator 10%/s.
Scale=100 % which is the gas control valve operating range. MV1 parameter settings follow the same rules except for
SPValueReq which is kept False as there is no reason for preferring any specific desired position of hot air flap valve. It will be
determined by the control targets.

31. Open CV0 (Oven_Temp) parameters and follow changes shown in red below.
Have in mind that the task is to track CV0 setpoint delivered as a trajectory ahead of time so the MPC can prepare for coming
changes in SP. This is why you set SPValueReq=False and SPTrajectoryReq=True. CV0 should be kept as close to the setpoint
as possible so set Coef=1000 to specify high importance of such a request. The expected operating range of oven temperature
is 100C and thus Scale=100.

28 of 54
32. Go to CV > Oven_Temp > SPTrajectory and modify setting of parameters indicated in red in the following figure
to define the type and size of setpoint trajectory that will be created later. This will program a future trajectory of
targets for oven temperature.

33. Open CV1 (Oven_Press) parameters and follow changes shown in red below.
You do set CV1 setpoint as the task is to keep CV1 within limits. This is why you set SPValueReq=False and ZoneReq=True.
Set ZoneHiLimitProg= -1 Pa and ZoneLoLimitProg= -20 Pa to prevent escaping flue gases via oven entry and exit doors and not
allow too low pressure which might cause oven body to deform or suck dust through entry and exit doors. The same limits should
be set for ZoneHiLimitOper and ZoneLoLimitOper. Coef is set 100x smaller than the same parameter for oven temperature as
pressure is not the key quality parameter here. Scale= 10 Pa is a standard operating range of oven pressure.

False
True False
True

PieceWiseLinear
12
-1
-20
-1
-20
10
10

1000
100

34. Go to CVSPTrajectory below other Controller sections, define its size (12) and click OK. A table allowing you to
specify profile of a trajectory appears.

35. Enter Setpoint Trajectory according to the following figure.


There are six points of the piecewise profile that will be cycled as part of the session scenario. The first six entries of
CVSPTrajectory define time index and other six the temperature target values as time progresses.

29 of 54
36. Go to standard toolbar and click on New Simulation Model button to create process model for simulation
purposes and MPC design validation.
An exact copy of the controller model is shown in the same format as the source at the bottom of the main window.
Oven.mpc

30 of 54
37. Go to Process parameter window and set initial conditions of CVs, MVs and DVs specifying operating conditions
shown in red as follows. Gas_Valve = 0, Air_Flap_Valve = 61, Hot_Air_Temp = 600, Hot_Air_Press = 200,
Ambient_Temp = 27, Suction_Flow = 0.2, Oven_Temp = 310, Oven_Press = -2.

61

600 27 310

-2

200 0.2

31 of 54
38. Copy SimulationStartTime from Process model to TimeStamp of SPTrajectory for CV0 to synchronize clock of a
process simulator with time axis of the MPC that is important when predefined trajectory is in use. This is true in
our case as we supply CV0 setpoint profile as a trajectory.

Use Ctrl+C for copying and Ctrl+V for pasting (or right mouse-click copy & paste).

39. Enable Simulation mode of the MPCBuilder.

32 of 54
40. Get familiar with the trend window and the command buttons for executing simulation shown below. Pop-up
identifiers show functions.
Oven.mpc

41. Go to File > Save for saving the current status of your Project.

33 of 54
Phase 3 Validating MPC Design

If you take the shortcut, copy the Oven_SimulationReady.mpc file from Repository folder to work folder and
open it in MPC Builder.

The Software and Lab allows you to play with setting of MV0 Coef parameter to understand its role and effect it has in closed
loop response to CV0 setpoint changes.

42. Go to MPCController parameters and check setting of Gas_Valve, (MV0) Coef. Set Coef=1 (it is probably
already 1). This is the weighting parameter for setpoint (SP) importance.

34 of 54
43. Go to Simulation toolbar and replace 10 by 100 to prepare for simulating 100 steps.

100

44. Click the MultiStep simulation button to execute the simulation which is going to run faster than real time.

45. Analyze the simulation.

The gas control valve opens up to 12% while hot air does not contribute significantly in responding to oven temperature setpoint
increase.

46. Go to the Gas_Valve, MV0 plot, click right mouse button to open edit variable window.

35 of 54
47. Change Auto Zoom to False and enter Yaxis Max = 40, Yaxis Min = -1, to preserve plot scaling for the next
experiment.
Before change After change

48. Close the TrendVariableEditor.

49. Go to the Air_Flap_Valve, MV1 plot, click right mouse button to open edit variable window.

50. Change Auto Zoom to False, enter Yaxis Max = 85, Yaxis Min = 45, to preserve plot scaling for the next
experiment.

Before change After change

Re-scaling the Gas_Valve and Air_Flap_Valve plots will provide more detailed view of trend charts.

36 of 54
51. Close the TrendVariableEditor.

52. Go to MPCController parameters and update the setting of Gas_Valve, (MV0) Coef. Set Coef=10. This is the
weighting parameter for setpoint (SP) importance and we have increased it by a factor of 10. Reset simulation
and run Multistep simulation again.

1 2

10
Gas_Valve is pushed towards 0 a bit more but you are still burning gas when oven temperature setpoint increases.

37 of 54
53. Change Gas_Valve.Coef = 1000, reset simulation and run Multistep simulation again.

1 2

1000

This is response shows the desired behavior when no disturbance needs to be eliminated. You will have to change the Coef
setting once more later to compromise between setpoint tracking and disturbance rejection. The change will be done from MPC
Faceplate.

54. Save the MPCBuilder project as Oven.mpc. The following window appears in response.

Click YES to confirm Gas_Valve, Coef changes.

38 of 54
Phase 4 Exporting MPC to Logix

If you take the shortcut, copy the Oven_ExportReady.mpc file from Repository folder to work folder and open
it in MPC Builder.

There are couple of switches requiring changing their status so the MPC will execute in Logix. It is usually simpler to set the
status of those switches before exporting to Logix Designer projects Oven.ACD which interfaces MPC to process simulator and
repeats predefined scenario.

55. Switch MPCBuilder to Design mode by opening the Mode list and selecting Design following the figure below.

2
56. Go to Control parameters and change settings as follows: TimeStampExtReq =False.
Required changes are typed in red below. Time stamp is going to be driven by Wall Clock of the controller internally.

39 of 54
57. Go to File > Export

58. Follow MPC Export window settings shown below and click Export ones the ACD file is located and encircled
values and strings are entered.

0 1 2

40 of 54
59. Open Oven.ACD in Logix Designer when the Export is finished and check that the exported routine appears in
Unscheduled Programs.

60. Go to Controller Organizer > Tasks > Unscheduled Programs /Phases and look for MPCProgram with
MPCRoutine which is the MPC_Client AOI enabling MPC in your Logix Designer project.

The code of the MPC_Client AOI can be moved into the MPC_Call routine ladder but as it has been there already there is no
need to take any action. You have just updated the MPCTag carrying your setting of MPC parameters while exporting your MPC
project from MPC Builder to Logix Designer project.

61. For checking selected parameters settings go to Controller Organizer > Controller Lab > Controller Tags and
look for MPCTag. You can check out the UDT, which is much like the MPC properties from MPCBuilder and it
will have values from your identification.

41 of 54
62. Check Project path with Who Active. You can confirm that your MPC Module chassis is in the slot you selected
during the export of your controller and make sure that your Module is recognized by Who routines.

63. Download Oven Project to the controller (slot 1 assumed, should match).

Leave the controller in Program Mode and inspect the program code before running the controller.
Change controller mode to Remote Run.

42 of 54
Phase 5 Executing MPC in Logix
Oven project executes in-built scenario. Scenario is a periodic task providing oven temperature (CV0) setpoint, supplied hot air
temperature (DV0) and pressure (DV1) at the source, ambient air temperature (DV2) and flue gas suction flow (DV3). All the
variables vary over time. Limit for hot air flap valve opening (MV1_Constraint) is also generated by Scenario.

MPC instruction is interfaced to the rest of the application project via MPCTag and the actual handshaking is assured by
MPC_Client Add-On Instruction which appears in rung 8 of the MPC_Call routine of the OvenController task.

43 of 54
64. Go to Controller Organizer > Tasks > OvenController > MainControl > MPC_Call ladder to see the wiring of the
MPC to the rest of the project.

Rungs 2-6 wire MPC inputs.

Rung 10 wire MPC outputs.

44 of 54
65. Go Online with the controller and change controller mode to Run Mode.

66. Go to Control Organizer >Trends > CV0_Temperature trend window and Run it

67. Go to Control Organizer >Trends > MVsDVsCVs trend window and Run it

68. Monitor and study trend plots


See the way how MPC tracks oven temperature setpoint profile and keeps it within 1C band whenever possible minimizing off-
spec conditions.
Pay special attention to the situation when the max opening of flap valve reduces so the hot air flow must be reduced accordingly
and oven temperature cannot be maintained by hot air any more. Gas burner takes over and substitutes missing heat supply.

45 of 54
This situation is marked in CV0_Temperature trend plot and MVsDVsCVs plot below.

46 of 54
Notice that heating by gas is not sufficient when recuperated heat delivered by hot air is limited. You have to tune the MPC
further to keep oven temperature closer to the setpoint when hot air flap valve (MV1) is constrained. The tuning will be done by
reducing MV0.Coef (Gas_Valve) from current value to 100. You will use Gas_Valve Faceplate to make the change. The
procedure is described in Phase 7.
There are two Key Performance Indicators (KPI), Over Limit Time (OLT) and Over Limit Area (OLA) that have to be kept as small
as possible.

69. Go to Control Organizer > Controller Tags and search for OTA and OLA tags.

47 of 54
Phase 6 Monitoring MPC
The Lab setup for the monitoring phase is shown in the following figure. Both Logix Designer and MPC Builder will go on-line
with Logix.

70. Open your Oven.mpc project in MPC Builder if not already open.

71. Go to Communications > Who Active and select MPC Tag as TagName to connect to. Click Set Path.

48 of 54
72. Go to Communications > Go Online

73. Go to View > Trend to add Trend tab to the main window.

74. Monitor and interpret the trend plot of MVs and CVs including the prediction that cannot be monitored in Logix
Designer. There are constraints plotted along with process variables to show feasible range of values.

49 of 54
75. Monitor DVs by choosing the next trend page as follows.

76. Finally check and compare both options for trending, MPC Builder on the left and Logix Designer on the right.

PlantPAx MPC Builder Logix Designer Trends

50 of 54
Phase 7 Tuning MPC from Faceplate

77. Open FT View SE Client window from your desktop clicking the icon , which opens HMI designed for
the Oven control problem shown below.

There are MPC Faceplates enabling a user to monitor the MPC, access and change MPC design parameters on-the-fly, track
MPC status and trace the faults. Access to features depends on security levels. An operator will use Home, Diagnostics and
Trend tabs for everyday tasks, higher security allows you to use Maintenance and Engineering tabs for changing MPC
parameters. The use of Faceplates is fairly intuitive. There is no need to open the MPCTag in Logix Designer or run MPC Builder
in most occasions.

78. Open Gas_Valve (MV0) Faceplate double clicking icon in the Curing Oven Ov erview

screen which will open Gas_Valve_Home panel for you. Choose Maintenance panel by clicking on and
open the third Maintenance panel tab .
The third tab allows you to view and change parameters associated with Objective Function for MV0-Gas_Valve variable.

MV Faceplate: Home panel Maintenance panel #1 Maintenance panel #3

51 of 54
79. Change Coef from 1000 to 100 and click Enter.

MV.Coef parameter is a core parameter of the MPC. To apply changes in core parameter setting you have to send the request to
make it happen.

80. Enable change of core parameter by clicking button. By doing so you enable button as shown below.

81. Apply changes by clicking .

82. Go back to the MVsCVsDVs trend window in Logix Designer and give special attention to MV0-Gas valve and
CV0-Oven temperature trends when MV1-Hot air valve constraint limits the use of recuperated heat. Gas valve
opens more while keeping Oven Temperature closer to the setpoint as you are not forcing Gas_Valve to be at
MV0 Target which is 0 by design.

52 of 54
Congratulations. You have completed the Lab.

53 of 54
Publication AF2015_L10_A-EN-P November 2015 54 of 54 Copyright 2015 Rockwell Automation, Inc. All rights reserved.

Das könnte Ihnen auch gefallen