100% found this document useful (1 vote)
146 views23 pages

MPC Level EN PDF

Uploaded by

sybaritz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
146 views23 pages

MPC Level EN PDF

Uploaded by

sybaritz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Deckblatt

Model Predictive Control including


integral transfer functions
SIMATIC PCS 7

Application Example  April 2010

Applikationen & Tools


Answers for industry.
Industry Automation and Drives Technologies Service & Support Portal
This article is taken from the Service Portal of Siemens AG, Industry Automation
and Drives Technologies. The following link takes you directly to the download
page of this document.
http://support.automation.siemens.com/WW/view/en/42200753

If you have any questions concerning this document please e-mail us to the
following address:
online-support.automation@siemens.com
Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 3
Warranty and Liability

Warranty and Liability


Note The Application Examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The Application
Examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are used correctly. These application examples do not
relieve you of the responsibility to use safe practices in application, installation,
operation and maintenance. When using these Application Examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
Application Examples at any time without prior notice.
If there are any deviations between the recommendations provided in these
application examples and other Siemens publications – e.g. Catalogs – the
contents of the other documents have priority.

We do not accept any liability for the information contained in this document.

Any claims against us – based on whatever legal reason – resulting from the use of
the examples, information, programs, engineering and performance data etc.,
described in this Application Example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (“Produkthaftungsgesetz”), in case of intent, gross negligence, or injury of life,
Copyright  Siemens AG 2010 All rights reserved

body or health, guarantee for the quality of a product, fraudulent concealment of a


deficiency or breach of a condition which goes to the root of the contract
(“wesentliche Vertragspflichten”). The damages for a breach of a substantial
contractual obligation are, however, limited to the foreseeable damage, typical for
the type of contract, except in the event of intent or gross negligence or injury to
life, body or health. The above provisions do not imply a change of the burden of
proof to your detriment.

Any form of duplication or distribution of these Application Examples or excerpts


hereof is prohibited without the expressed consent of Siemens Industry Sector.

MPC Level
4 V 1.0, Beitrags-ID: 42200753
Table of Contents

Table of Contents
Warranty and Liability ................................................................................................. 4
1 Preface ................................................................................................................ 6
2 Introduction........................................................................................................ 7
2.1 Basic Principles of Model Predictive Control........................................ 7
2.2 Stable and Unstable Control Loops ..................................................... 7
2.3 Examples of Unstable Control Loops................................................... 9
2.3.1 Level Control ........................................................................................ 9
2.3.2 Pressure Control in Tanks.................................................................. 10
2.3.3 Position Control .................................................................................. 11
2.3.4 Example of Multivariable Control with Integral Part Transfer Function11
3 Stabilization of Unstable Control Loops ....................................................... 12
3.1 Manual Parameterization of a Proportional-only Controller for
Integrating Processes......................................................................... 12
3.2 PID Tuner ........................................................................................... 14
4 Configuration of MPC with Slave Controller................................................. 15
4.1 Starting Point...................................................................................... 15
4.2 Connection in CFC ............................................................................. 15
4.3 Commissioning................................................................................... 18
Copyright  Siemens AG 2010 All rights reserved

5 Simulation Example......................................................................................... 19
6 Conclusion ....................................................................................................... 21
7 Related Literature ............................................................................................ 22
7.1 Bibliography........................................................................................ 22
7.2 Internet Link Specifications ................................................................ 22
8 History............................................................................................................... 23

MPC Level
V 1.0, Beitrags-ID: 42200753 5
Preface

1 Preface
Objective of the Application
The area of application of the model predictive controller provided in SIMATIC
PCS 7 (function block ModPreCon and MPC respectively) is restricted by the
following fact: The control algorithm only works for stable processes with a step
response settling to a constant value in a finite time horizon.
If the process is not stable or shows an integral action (e.g. level control, position
control), the respective sub transfer functions have to be stabilized by slave con-
trollers. The objective of this application note is to describe how to proceed in such
cases.
This application note is an extension of the application note “Multivariable Model
Predictive Control – the Distillation Column as an Application Example”, containing
basic information how to apply the MPC.
The application example considered here shows an MPC with two manipulated and
two controlled variables in combination with a simulated process of which the sec-
ond main control loop shows integral action.

Main Contents of this Application Note


The following issues are discussed in this application:
Copyright  Siemens AG 2010 All rights reserved

• The stabilization of unstable processes using P(ID) controllers


• The integration of a subordinated PID controller in an MPC application
• Simulation-example

Validity
… valid for PCS 7 V7.0 SP1 or later versions.

MPC Level
6 V 1.0, Beitrags-ID: 42200753
Introduction

2 Introduction
2.1 Basic Principles of Model Predictive Control
A general overview of model predictive control is provided by the White Paper
“How to improve the Performance of your Plant using the appropriate tools of
SIMATIC PCS 7 APC-Portfolio?”
https://pcs.khe.siemens.com/efiles/pcs7/support/marktstudien/WP_PCS7_APC_EN
.pdf
The application note including the basic principles of the MPC can be found here:
http://cache.automation.siemens.com/dnl/zI/zIzMzM1MwAA_37361208_Tools/373
61208_MPC_en.pdf

2.2 Stable and Unstable Control Loops


Most of the control loops in process plants show a stable behaviour - after a step-
wise change in the manipulated variable the control variable shows a transient be-
haviour reaching a new steady state after some time. The controlled process is
“stable” with respect to systems dynamics, even without a controller.
Copyright  Siemens AG 2010 All rights reserved

Example: The temperature of a reactor is increasing after the heating power is in-
creased stepwise. With increasing temperature the heat loss of the reactor to the
environment is also increasing, until finally a new equilibrium condition at a higher
temperature is reached, where the increased heat loss is equal to the enlarged
heating power, and compensates for it.
Thought experiment: Please imagine a reactor with ideal thermal insulation, which
means no thermal loss to the environment. Now, if the heating power is increased
stepwise starting from the equilibrium condition, the temperature starts to rise. The
increase of the temperature is undamped and continuous, as no physical effect in
the opposite direction (an increasing heat flow to the environment according to the
rising temperature) exists. Therefore, no new equilibrium condition is reached, re-
sulting in an unstable control loop with respect to systems dynamics. This behav-
iour is called integral action.
There are other forms of instability besides the integrating behaviour, e.g. increas-
ing oscillations. Such behaviours can rather be found in mechanical systems (e.g.
the famous inverse pendulum). In process plants, such instabilities if appearing at
all, are mostly due to inappropriate controller tunings, and only rarely appear in
open loop.

MPC Level
V 1.0, Beitrags-ID: 42200753 7
Introduction

Figure 2-1 Step response of a control loop with compensation (blue) and without
compensation (red), i.e. with integral behaviour.
Step Response
3
whithout
compensation,
2.5 i.e. ohne
with
integral
Ausgleich
behaviour with
mit
2
compensation
Ausgleich
Amplitude

1.5

0.5
Copyright  Siemens AG 2010 All rights reserved

0
0 10 20 30 40 50 60 70 80 90 100
Time (sec)

Unstable control loops cannot be stabilized without a controller. Therefore, switch-


ing a controller in such a loop to manual mode is not allowed for a longer time.
Hence, the recording of measurement data for the process identification (e.g. for
the PID tuner or the MPC configurator) via step experiments in open control loop is
not possible. The model type and the control algorithm of the MPC function block
are also inappropriate for unstable control loops. Therefore, the unstable part trans-
fer functions have to be stabilized by subordinated slave controllers before the ap-
plication of the MPC.

MPC Level
8 V 1.0, Beitrags-ID: 42200753
Introduction

2.3 Examples of Unstable Control Loops


2.3.1 Level Control

If the level of a tank with continuous feed is to be controlled via an adjustable drain
as actuator (e.g. pump or valve with or without flow control), the control loop shows
integrating behaviour.
An equilibrium condition of the level only exists if the drain is exactly equal to the
feed. The level permanently decreases until the tank is empty, if the drain is in-
creased stepwise starting at this equilibrium condition. In contrast the level perma-
nently increases until the tank overflows, if the drain is decreased stepwise starting
at the equilibrium condition.

Figure 2-2 Types of level control, taken from Related Literature /1./.
Copyright  Siemens AG 2010 All rights reserved

Exception natural drain: If only a valve with constant pressure behind exists in the
drain of the tank, the drain flow depends according to the drain formula of Toricelli
not only on the valve position (manipulated variable of the controller) but also
nonlinearly on the level h itself (proportional to 2 gh with acceleration of gravity
g). Compensation can be reached after small steps in the valve position in such
control loops. The level is decreasing if the valve at the drain is opened a little bit
starting at the equilibrium condition. Thus the hydrostatic pressure at the bottom of
the tank is decreasing, and accordingly the drain flow is decreasing until a new
equilibrium condition is reached. Anyway, the application of the techniques de-
scribed in the following is helpful for stabilization of a natural drain too, as the
mechanism of compensation only works for small steps and cannot be modelled
linearly.
In process plants there are many tanks where level control is necessary, e.g. surge
drums, separation tanks, stirred tank reactors, column sumps, feed water tanks,

MPC Level
V 1.0, Beitrags-ID: 42200753 9
Introduction

feed water tanks. There are different objectives for level control according to the
plant context [also see Related Literature /2./]:
 Keep level constant (exactly at the set point) – important for levels directly in-
fluencing the process; disturbances are passed through to the output (drain).
 Keep level as small as possible – if “dead volume” and inventory are undesir-
able.
 Keep level inside specified limits while using the tank as buffer – changes in
level are tolerated to achieve a smooth drain flow.

Figure 2-3 Examples of level control (marked in red) in a typical part of plant (distillation
column) [also see Related Literature /1./].
Copyright  Siemens AG 2010 All rights reserved

2.3.2 Pressure Control in Tanks

In some cases the pressure control in tanks behaves in a similar way as the level
control. The control loop shows an integral behaviour, if the manipulated variable is
a gas feed (e.g. admission of inerts) and no pressure loss to the environment ex-
ists. Typically a separate purge valve exists in such cases to discharge gases. The
pressure controller uses a split range function to access either the feed valve or the
purge valve.

MPC Level
10 V 1.0, Beitrags-ID: 42200753
Introduction

2.3.3 Position Control

The control loop shows integrating behaviour if the position of mechanical parts is
controlled and the speed of the actuator is available as manipulated variable. An
"equilibrium condition" without move in the position only exists for a speed equal to
zero. The valve actuator is a common example for position control in process
plants. However, the valve position controllers are mostly integrated in the corre-
sponding actuators and hence not an issue for the DCS.

2.3.4 Example of Multivariable Control with Integral Part Transfer Function

The level of most chemical reactors has to be kept in certain limits during continu-
ous operation. Therefore the drain flow (rotational speed of pump or set point of
subordinated flow controller) is available as manipulated variable and results in an
integral part transfer function as described in section 2.3.1. A multivariable control
problem including integral part transfer functions results if an additional quality con-
trol exists at the same reactor, e.g. with the reactor pressure as manipulated vari-
able (set point for the slave pressure controller). The residence time of the fluid in
the reactor as well as the progress and the result of the reaction (the product qual-
ity) are dependant on the drain flow, which is the manipulated variable of the level
controller.
Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 11
Stabilization of Unstable Control Loops

3 Stabilization of Unstable Control Loops


Regarding the stabilization of unstable control loops, integral processes and mono-
tone unstable or oscillating unstable processes have to be distinguished.
In general only an analysis in frequency domain is helpful for oscillating control
loops. As an example, displacements of unstable poles to the stable domain can
be examined using root locus analysis [also see Related Literature /3./]. These
oscillating control loops are a common issue in the context of mechanical systems
(spring-damper-systems, elas-tical roboter arms) but can rarely be found in
process plants. Oscillations in process plants can rather be attributed to
malfunctions of slave control loops, e.g. in the valve position controllers.
In the following only the stabilization of integral processes will be discussed, due to
the practical relevance in process engineering. A proportional-only controller is suf-
ficient to stabilize integrating processes, as confirmed by systems dynamic consid-
erations (e.g. root locus). Thus the problematic interaction of the integral part of a
PI controller with the integral part of the plant is avoided. However, persistent con-
trol deviations caused by disturbances at the input of the process have to be ac-
cepted, if no integral action is used in the controller. Example: The proportional-
only controller is not able to hold the level exactly at its set point if the feed is vary-
ing.
Copyright  Siemens AG 2010 All rights reserved

3.1 Manual Parameterization of a Proportional-only


Controller for Integrating Processes
Figure 3-1 Unit-step response of an integrating process

Step Response
14

12

10
Amplitude

6 ki

1
2

0
0 5 10 15 20 25 30 35 40 45 50
Time (sec)
t1

MPC Level
12 V 1.0, Beitrags-ID: 42200753
Stabilization of Unstable Control Loops

ki
The behaviour of an integrating process g i s   can be described by
s t1 s  1
two parameters:
 The maximal gradient ki of the response to a unit-step (of height one)
 The delay time t1 needed by the process to reach its maximal gradient after a
step in the manipulated variable (intersection point of the tangent with the base
line in Figure 3-1)
The transfer function of the closed loop including a proportional-only controller
k s   k p (kp is the proportional gain) is
g i s k s 
g cl s  
1

1  g i s k s  t1 2 1
s  s 1
k p ki k p ki
Thus the closed control loop has unity gain (the actual process value is equal to
the set point in steady state, if no disturbance at the input occurs) and two poles at
2
 1 
s1 / 2 
1
    4 t1 .
k p ki k k  k p ki
 p i 
Copyright  Siemens AG 2010 All rights reserved

Both poles are real, if the (absolute value of) gain kp of the controller is chosen
such that
1
kp  .
4t1k i
Hence, an asymptotic stable control loop is ensured. A considerably smaller value
is a good starting point for a stable controller parameterization and a following
computer-based PID tuning, even if the specific values of the process are not
known exactly.
If the process is uncritical, an adequately small gain can be chosen arbitrarily and
used as starting point. You can increase this starting value iteratively until first indi-
cations of oscillations in the control loop become visible.

NOTE The sign of the controller gain must be negative, if the sign of the controlled
process ki is negative too (open drain valve -> level decreases)!

MPC Level
V 1.0, Beitrags-ID: 42200753 13
Stabilization of Unstable Control Loops

3.2 PID Tuner


The PCS 7 PID tuner can be used for integral processes without problems if at
least one stable controller parameterization is already available. The following hints
are helpful for this:
 Fix the check mark „With integral action in the process“
 Excite the process with a step in the set point in closed loop in automatic mode
 Chose the proportional only controller as controller type, at least, if you want to
use this controller as slave controller in cascades (e.g. subordinated to a MPC)
or if you are not interested in exact set point tracking.
 Set the MC_Offset to the value of the manipulated variable needed to reach
the typical operating point, if you know it, in order to avoid the persistent control
error at least in this operating point.
Copyright  Siemens AG 2010 All rights reserved

MPC Level
14 V 1.0, Beitrags-ID: 42200753
Configuration of MPC with Slave Controller

4 Configuration of MPC with Slave


Controller
4.1 Starting Point
The starting point is the standard connection of the MPC with its actuators. The
structure of the following example corresponds to the control of product quality
(CV1) and level (CV2) in a reactor as mentioned in section 2.3.4. However, this ex-
ample is not a realistic simulation of a real reactor.

Figure 4-1 Original signal flow chart of an MPC with 2x2 process, where the main transfer
function g22 shows an integral action

g11
Copyright  Siemens AG 2010 All rights reserved

CV1
g12
ModPreCon MV1
CV2
MV2
.

g21

CV2

g22

4.2 Connection in CFC


Now, a stabilizing PID controller is inserted for the integral sub process. In principal
this control structure is a cascade consisting of an MPC as master controller and
the stabilizing proportional-only controller as slave. The external set point SP_EXT
of the slave controller is linked to the corresponding manipulated variable of the
MPC.
The equality of the controlled variable of the master controller (i.e. the correspond-
ing MPC control channel) and the controlled variable of the slave controller is the
only special feature in the present case.

MPC Level
V 1.0, Beitrags-ID: 42200753 15
Configuration of MPC with Slave Controller

Figure 4-2 Signal flow chart of MPC with subordinated stabilizing PID controller for the
integral main transfer function g22

g11

CV1
g12
ModPreCon MV1
CV2
MV2
.

g21

PI
CV2

LIC
CV2 g22
Copyright  Siemens AG 2010 All rights reserved

The slave controller stabilizes the control variable CV1 in general. The integral ef-
fect of the main transfer function g22 is compensates as well as the integral effect
of the coupling transfer function g21. The influence of MV2 on CV1 is also modified
by the slave controller due to g12.
All general notes on the configuration and commissioning of cascade controls are
relevant for this case (see Figure 5-1):
 To get a correct anti windup calculation of the master controller, the range of
the manipulated variables of the master controller (respectively the corre-
sponding MPC channel) must be equal to the range of the external set point of
the slave controller (PID.SP_ExtHiLim… SP_ExtLoLim). Typically the MV limits
for automatic mode MViHiLim…MViLoLim are set tighter than the ones for
manual mode MViManHiLim…MViManLoLim in an MPC. Hence, the limits for
manual mode are set equal to the limits of the set point of the slave controller
and the ones for automatic mode are set even tighter only if necessary.
 The master controller must be set to “tracking mode”, if the slave controller is
not in cascade mode (automatic mode with external set point) but in any other
mode (e.g. manual or automatic mode with internal set point) with no reaction
to instructions by the master controller (announced by PID.CascaCut= true).
The “tracking mode” must also be activated if a bad status of measurement
data at the master controller is detected. An OR-combination of both conditions
is passed to the binary input MPC.MV2TrkOn. To ensure a bumpless switching
back to cascade mode, the manipulated variable of the master controller
MPC.MV2Trk is linked to the current set point PID.SP of the slave controller.
 The cycle time of the slave controllers in cascades must be at least as fast as
the cycle time of the master controller. In the present case this is ensured
automatically: the slave P(ID) controller runs in a standard fast cycle of the
automation system (typically 1s), while the MPC is moved to a slow cycle spe-
cific to the application after the model identification.

MPC Level
16 V 1.0, Beitrags-ID: 42200753
Configuration of MPC with Slave Controller

Figure 4-3 Connection of MPC and slave controller


Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 17
Configuration of MPC with Slave Controller

4.3 Commissioning
The parameterization of the controller and the commissioning is done „from interior
to exterior” as in any cascade control. First the slave controller is tuned (see chap-
ter 3) and switched to automatic mode. Afterwards the slave controller is switched
to cascade mode and the master controller is parameterized. While tuning the mas-
ter controller please consider that the whole inner closed control loop of the slave
controller is the controlled process of the master controller. Therefore the adjust-
able parameters of the master controller are not independent of the tuning of the
slave controller. The step experiments for the identification of the MPC models can
only be executed after the linking of the stabilizing slave controller, as the addi-
tional proportional-only controller affects the sub transfer functions g22, g21 and
g12 (see Figure 4-2).
A dead band can be used in the slave controller, if the level is not to be exactly
controlled to its set point. The controller has no reason to interfere with the process
as long as the controlled variable is inside the dead band. The control deviation
seems to be zero for the controller. Therefore, the control signal can be smoothed
to avoid valve wear, and variations of the drain flow can be reduced to obtain a
smooth feed for the downstream process components. The dead band should be
adjusted before the measurement data for the MPC configurator is recorded, as the
dead band influences the behaviour of the slave control loop. A dead band of at
least the same size must also be specified for the corresponding control channel of
Copyright  Siemens AG 2010 All rights reserved

the master controller. Of course, the master controller is not able to reach the set
point more precisely as it is allowed by the dead band of the slave controller.

MPC Level
18 V 1.0, Beitrags-ID: 42200753
Simulation Example

5 Simulation Example
The simulation example was generated from a copy of the plant section ModPre-
Con of the APL_Example_EU, by introducing an additional integral block after the
transfer function Proc662.

Figure 5-1 Modified process simulation of the example project; the inserted integrator is marked in blue
Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 19
Simulation Example

Figure 5-2 OS picture of the example project


Copyright  Siemens AG 2010 All rights reserved

Despite the interaction between both manipulated variables MV1 and MV2 and the
integral action of MV2 on PV2, both control variables PV1 and PV2 of the master
controller can be controlled to their given set points independently of each other,
which is a success of the described control concept. A “crosstalk” between the in-
teracting control loops can mostly be avoided, e.g. the level PV2 (dark green) is
only moved minimally during a set point step in SP1 (light blue). Specifics: Not only
the current value of the level PV2 (dark green) is reaching the set point SP2 of the
MPC (dark blue dashed) but also MV2 of the MPC (dark brown) in steady state, as
MV2 is simultaneously the set point of the slave level controller.

MPC Level
20 V 1.0, Beitrags-ID: 42200753
Conclusion

6 Conclusion
The area of application of the model predictive controller embedded in SIMATIC
PCS 7 is extended clearly by the described stabilization of unstable sub control
loops with the help of a slave proportional-only controller. A typical application is an
MPC where one controlled variable is the level of a tank, reactor, etc.
Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 21
Related Literature

7 Related Literature
7.1 Bibliography
This list is not complete and only represents a selection of relevant literature.
Tabelle 7-1
Titel
/1/ Krämer, S.
Auslegung von Standreglern in der verfahrenstechnischen Praxis. Dechema-
Seminar „Prozessregelungen – von den Grundlagen zu Advanced Control“, Sep.
2008.
/2/ Cheung, Tak-Fai und William L. Luyben
Liquid-Level Control in Single Tanks and Cascade of Tanks with Proportional Only
and Proportional-Integral Feed-back Controllers. Ind. Eng. Chem. Fund.,
18(1):15–21, 1979.

7.2 Internet Link Specifications


This list is not complete and only represents a selection of relevant information.
Tabelle 7-2
Copyright  Siemens AG 2010 All rights reserved

Subject Titel
\1\ Referenz auf den http://support.automation.siemens.com/WW/view/de/42200753
Beitrag
\2\ Siemens I IA/DT http://support.automation.siemens.com
Customer Support
\3\ http://en.wikipedia.org/wiki/Root_locus

MPC Level
22 V 1.0, Beitrags-ID: 42200753
History

8 History
Tabelle 8-1
Version Date Modifications
V1.0 04.’10 First version
Copyright  Siemens AG 2010 All rights reserved

MPC Level
V 1.0, Beitrags-ID: 42200753 23

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy