You are on page 1of 68

VTT TECHNICAL RESEARCH CENTRE OF FINLAND LTD

Dynamic simulators
& Model based process control

Jari Lappalainen
VTT
Systems modelling and simulation
Overview

 Introduction
 Diversity of DS
 Dynamic process simulation
 MPC
 Commercial dynamic simulation tools
 Application examples

02/12/2015 2
Dynamic simulation: mimicking time-varying
behaviour of a system by computational models
Multibody systems

Dynamic process
simulation
Source: Wikipedia

Discrete
simulation Source: Wikipedia

System Dynamics

Source: rnaautomation Drug migration through human body

CFD

Courtesy of
Valmet

3
Source: Labome.org
Modelling and simulation at and across several
time and magnitude scales
Global
A process industry simulation point-of-view
phenomena
global

Industry sector e.g. climate


Simulation tools and methods are economics change
Magnitude scale of phenomena

Corporate e.g. pulp & paper


readily available "inside" each industry
economics
regional

subsection e.g. strategic


Factory planning
operations
e.g. a paper
mill
local

Process unit
operation
e.g. a digester
Basic physical
microscopic

and Current and future interests:


chemical phenomena • Simulation "across the interfaces"
e.g. Thermodynamics,
Molecular dynamics • Integration of other mathematical
methods with simulation
ms seconds minutes hours days weeks months years decades
02/12/2015 4
Time scale of phenomena
Dynamic process
simulation

5
Different needs − different methods and models

Rigourous thermal
hydraulics, Accurate
reactions, heat physical
transfer, diffusion,
description
material properties

details
A piece of Large
equipment system
Scope of modelling
Nozzle, reactor, Level Process plant,
pump, header, power plant,
mixer, experimental system dynamics,
set-up, .. …

Process gain, Simple


mass balance, models
.. 6
Steady vs. Dynamic Simulation
high frequency
phenomena
saturation?
Key
variable Steady
state #2
Steady
state #1
accuracy of system
automatic control description
Dynamic manual operation

Time

start-up
shut-down
load changes,
grade changes
7
Example: Kappa profile in continuous pulp digester

The Kappa number is a measurement


of standard potassium permanganate
solution that the pulp will consume. The
Kappa number estimates the amount of
chemicals required during bleaching of
wood pulp to obtain a pulp with a given
degree of whiteness (source: wikipedia)
02/12/2015 8
Typical questions for dynamic simulation

 How should we control this process ?


 Is this process safe in ”all” situations ?
 Why this happened ?
 How to start-up this properly ?
 How to learn to start-up this properly ?
 How to practise system operation without risk for environment and equipment ?
 Can the control system handle the change (in x min) ?
 How to minimize off-spec product in a grade change ?
 How to dimension a relief valve in this line?
 Can we reach the system specifications promised to customer ?
 How to minimize stress for the process equipment in emergency shut-down ?
 What does happen in between those measurements?
 Does the configured automation system (DCS) work properly ?

02/12/2015 9
Where dynamic behaviour comes from?
Paper mill example
Period Time
10 min 1 min 10 s 1s 100 ms 10 ms 1 ms
Vibration
Slow control Fast control Mechanical
loops loops condition

Surges Pulsation
Ref: Cutshall, K.,
Nature of paper
Stock preparation Short circulation variation, TAPPI Wet
Pulp handling End Operations Short
Dilution circulation Course, TAPPI Press,
Memphis 1997, pp.
371-402.
Headbox and former
process

0.001 0.01 0.1 1 10 100 1000


Frequency, Hz

Process and automation connections together form a complex system


10
Model Fidelity Requirements
Paper mill example

Fidelity of
physical description Single
Equipment
3D CFD Design and
Optimization
2D CFD

All realistic
Dynamic simulation

controls Piping
Detailed Engineering,
incl. noise hydrodynamics
Control Design,
Consistency Consistency DCS Checkout,
controls dynamics Operator Training,
Troubleshooting
Level Simple tank
controls dynamics

No Conceptual Design
controls Steady-state
Comprehensiveness
of simulation
11
Selecting detail of modelling

 Depends on the purpose of the model


 The question is ”What is the question?”
 The model builder must know what the customer wants
 Mastering of ”the art of simplification” is essential
 Simple models are easier to maintain and use
 Too simple models may hide important dynamics
 Too simple models may provide trivial answers

 Note, the level of details greatly affect the time needed for M&S

02/12/2015 12
Model Predictive Control

13
MPC

 Advanced process control method


 Have been used in industrial applications since 1980’s
 The key features
 Uses process model(s) to predict system behaviour
 Calculates optimal solution on each execution cycle, implements it, and repeats the
calculation at next step using fresh measurement data
 Suits well for MIMO: can handle interactions, and significantly different time
constants and dead times between inputs and outputs
 Can handle CV contraints and disturbance (FF) signals
 Examples: petrochemical processes, paper machine quality controls (BW, ash,
moisture)
 MPC suppliers
 DCS suppliers offer also MPC products
 Specialiced MPC suppliers, e.g. NesteJacobs’ NAPCON

02/12/2015 14
MPC

Source: wikipedia

02/12/2015 15
Dynamic simulation
tools

16
Requirements for commercial
Dynamic Simulator

 Graphical easy-to-use user interface


 Process, automation, (electrical) model libraries, “easy” parameters
 Material properties databank
 Large operation and validity range of models
 startup, shutdowns, grade/load changes, disturbances, ..
 Efficient calculation to run faster than real time
 Interfaces to automation products and user models (e.g. OPC)
 Modelling fundamentals and model components must be verified and validated
 In order to draw reliable (with known uncertainty) conclusions from the simulation
results

02/12/2015 17
What is needed to build up a successful DS
model
 The purpose of the model (the questions !)
 Capable M&S tool(s)
 Modelling input, e.g. P&I-diagrams, lay-outs, equipment data-sheets,
automation diagrams, system descriptions, ..
 And basic understanding of how the process works and is operated
 Collaboration with process owner, and preferably support team for
modelling
 To get quick answers and feedback for intermediate results
 Validation
 Measurement data (from the automation system) with the relevant
manipulated, measured and controlled variables, sampling frequency, and
transients
 Experts for qualitative validation

 …and finally, do not forget to conduct the simulation studies too !

02/12/2015 18
Verification and validation

 verification = confirmation that the model implementation in the


code is correct
 validation = confirmation that code is sufficiently accurate in
predicting physical reality from the perspective of its intended
use

P.J. Roache: “verification deals with


mathematics, validation deals with physics”

02/12/2015 19
Examples of commercial dynamic simulation tools

 Apros (VTT & Fortum)


 Aspen Plus Dynamics (Aspentech)
 Dymola (Claytex)
 gPROMS (Process Systems Enterprise)
 Hysys (Aspentech)
 IDEAS (Andritz)
 JADE (GSE)
 Matlab/Simulink (Mathworks)
 Modelica (Modelica Association)
 NAPCON Simulator (NesteJacobs)
 RELAP5 (Innovative Systems Software)
 SimulationX (ITI)
 UniSim (Honeywell)
 …
02/12/2015 20
Apros - Advanced Process Simulator

 Apros (www.apros.fi) is a software for 1D


modelling and dynamic simulation of
industrial processes, including automation
and electrical systems
 Developed since 1986 by Fortum and VTT
 Offers combined fidelity and
comprehensiveness

02/12/2015 21
Main domains in Apros modelling & simulation

Process
systems Automation
systems
Electrical
systems
Thermal Calculation
hydraulics order
Execution Equivalent
bands circuit
approach

Matrix Process Analog &


unit Automation binary Matrix
solvers models solvers function
solvers
AC/DC
blocks

02/12/2015 22
Modelling paradigms

prosess model

tacit model numerical model scale model

logical model quantitative model qualitative model

steady state dynamic regression model

transfer function/ mechanistic time series


linear state equation model model

02/12/2015 23
Mechanistic models
Mechanistic models combine

process first principles in physics empirical correlations


structure and chemistry and material properties

During each simulated time


step a set of nonlinear
piecewise continuous
equations are solved

Partial Ordinary Nonlinear Linear


differential differential algebraic algebraic
equations equations equations equations

02/12/2015 24
Discretisation with respect to time

Use of historical data


 The solution of the (most
common) Flow models 2
and 6
Single step Multi step
 Implicit
methods methods
 Backward Euler
The state variables and their derivatives
are updated at each time step

Explicit
explicit Semi-implicit
semi-implicit Implicit
implicit
methods methods
methods methods
methods

2 25
Dynamic conservation equations (3-eq model)
 Dynamic conservation equations for mass, momentum, energy and mass fractions
are solved simultaneously for the entire model network

 Homogeneous properties used if two phases present

A Av
v Mass balance  0
t z

A Av Av 2 Ap


Momentum balance   S
t z z
dz
Ah Avh
Energy balance  S
t z

+ component balance
02/12/2015 26
Source terms

 Source terms (right hand side of


the equations)
 Can be used to feed effects from
systems that cannot be
described with basic equations
 Momentum equation
 Effect of pump, valves, turbines,
friction and form losses
 Energy equation
 Heat flows to fluid from walls,
energy from pumps, effect of
turbine sections

02/12/2015 27 27
Dynamic conservation equations (6-eq model)

 Mass, momentum, energy equations  ( k  k )  ( k  k vk )


  k
for both phases t z
 = mass transfer

 ( k  k vk )  ( k  k vk2 )  p 

Fwk = wall friction    k  k vik   k  k g  Fwk  Fik
t z z

Fik = interface friction

qik = heat transfer between phases

qwk = wall heat transfer  ( k  k hk )  ( k  k vk hk ) p
  k  k hik  qik  qwk
 Subscripts  t  z  t
 w = wall
 k = phase (liquid or gas)
 i = interface between phases

02/12/2015 28
Main principles (6-eq model)

 Six conservation equations are discretized and non-linear terms linearized


 Linear equation groups for solved quantities
 The obtained linear equations solved simultaneously matrix solution (implicit)
using efficient sparse matrix techniques
 Iteration, when needed
 Solved quantities:
 Pressures p, liquid vl and gas velocities vg , void fractions , liquid hl and gas
enthalpies hg
 Steam tables based on IAPWS-IF97, properties calculated as function of p and h
 Constitutive equations
 Wall and interface friction
 Wall and interface heat transfer
 Cover bubbly, annular, droplet and stratified flow regimes

Thermal hydraulics
02/12/2015 29 29
Space discretization

 Staggered grid used


 Mass and momentum control volumes are not the same, staggered
 Can be applied for cross flows
 Control volumes for mass, energy and momentum balances
 Centre points of
mass, energy momentum

02/12/2015 30 30
Edward’s pipe

 An example of validation case (separate test) based on an


experimental set-up and extensive data acquisition
 Horizontal pipe: length = 4.096 m, D = 7.3 cm
 Initially full of hot water: p = 68.95 bar, T = 242 ºC
 One end is suddenly opened (85 % of total area). Pipe empties in
about 0.5 s
 50 nodes in the Apros model. This example with Flow model 6.

02/12/2015 31 31
Edward’s pipe

• Pressure of the open end

Thermal hydraulics
02/12/2015 32 32
Edward’s pipe

• Pressure of the closed end

Thermal hydraulics
02/12/2015 33 33
Edward’s pipe
 Void fraction in the middle of the pipe

Thermal hydraulics
02/12/2015 34 34
Pipe flow: Overlapping Grid Approach
flow flow
p pressure pressure pressure
h entalphy entalphy entalphy
ci massfractions massfractions massfractions

dm/dt dm/dt
h dm/dt h dm/dt
ci dm/dt ci dm/dt

Homogeneous Flow Model (3-eq): Same temperature of different phases within the
control volume and same velocity of the phases in the homogeneous flow between
control volumes.
Separate Phase Nonequilibrium Model (6-eq): Different temperature of each phase in
same control volume and different velocities of the separate phase flows between
control volumes.
02/12/2015 35
Heat Diffusion and Transfer

T T T

Correlations for heat transfer between fluid and surfaces depend on


temperatures, pressures, near to surface flow velocities, and phase
fractions in prevailing boiling regions.
One-dimensional heat diffusion in structures depends on relevant
heat capacities and heat conductivities.

02/12/2015 36
Matrix Solvers for Large Systems Compared

CPU
time
per Inverse
node of A
Full matrix
Ax=b
Sparse solution
of Ax=b
Number
10 of nodes
The solution time per node is presented as a function of the number of nodes.

The sparse matrix solver seems to be faster than that of a full matrix solver for
dimensions N exceeding 10. The inverse of a matrix takes N times more time
than a single solution of x. The inverse of a sparse matrix is usually a full
matrix and also the multiplication x = A-1b could take much time.

37
Building up a process model

 Model components are selected, connected and


parameters given
 Boundary conditions are defined
 ...more details in tomorrow demo…

02/12/2015 38
Automation is an essential part of a dynamic
simulation model
APROS MODEL
PROCESS MODEL

AUTOMATION
MODEL
MEASUREMENTS ACTUATORS

CONTROL
&
LOGIC

02/12/2015 39 39
Options to simulate the automation system

 Modelling both process and


automation in Apros
 Connecting Apros process
model with external automation
system
 Different hybrid solutions are
possible
DCS, PLC, etc. Apros
PID

02/12/2015 40 40
Simulation model and automation

The part in the


simulator Process Automation

Measurements &
Actuators
Process Automation

For example
Advanced
Process Automation
Process Control
unit
02/12/2015 41
Calculation principles

 By default
 Automation time step = thermal hydraulics time step
 Calculation order solved automatically
Current time step Current time step decreases =>
(= max time step) also Automation is calculated more frequently
e.g. 200 ms

0 200 400 600 800 1000 1200 1400 1600 time / ms


 User option
 to define the calculation order and the cycle time
02/12/2015 42 42
Apros Automation Components – Analog

• Adder, Divider, Multiplier

• Actuator, Controller, Set_point

• Analog_delay, Analog_memory, Analog_switch, Dead_band,


Derivator, Filter, Filter2, Gradient, Hysteresis, Integrator,
Lead_lag, Limiter, Max_selector, Mean_value, Min_selector,
Ext_aut, Timer

• Sine_wave, Square_root, Triangular_wave, Noise_generator,


Ba_converter

• Measurement, Temperature_ / Level_ / Pressure_ / Flow_ /


Difference_measurement

02/12/2015 43 43
Apros Automation Components – Binary

 AND, NOT, OR, Flip_flop

 Binary_delay, Binary_selection, Binary_switch, Choise, Event,


LV_checker, Pulse, Push_button_1, Sequence_control,
Set_binary, Step, Ext_aut

 Pulse_generator

 Ab_converter

02/12/2015 44
44
Controller

02/12/2015 45 45
Controller

 Two PID algorithms available


 A text book PID from “PID Controllers: Theory, Design and Tuning” by
K.J. Åström and T. Hägglund, 2nd edition, pp. 94-97 (see below)
 Metso DNA PID-controller
 P, I, D actions can be separately switched on/off

02/12/2015 46
46
Dynamic simulation can be used for basic
automation engineering too
 Efficient
environment to
design control and
logic systems
 …and evaluate the
functionality by
simulation
 Interfaces with
other process and
automation design
tools

02/12/2015 47
Application examples

48
Various uses of Apros simulation

R&D Engineering Operation

Performance
Evaluation of Safety analysis analysis
new process
concepts Automation testing
Operator
training
Integrated Process &
Control design Control room Trouble-
design evaluation shooting
Development of
new control strategies
Automation Optimisation
engineering

02/12/2015 49
Various uses and users of Apros simulation
 Process and automation engineering, testing, analysis
 Fortum, Metso, Alstom, Andritz, Amec Foster Wheeler, Doosan, Eskom, Tecnatom,
TVO, EON, TÜV, nuclear safety authorities, …
 Training simulators
 Nuclear power plants, conventional power plants, pulp&paper mills, …
 Academic research and education
 Nuclear, combustion, solar, fuel cells, smart grids, pulp&paper, control engineering, …
 VTT, Aalto University, Oulu University of Technology, Lappeenranta University of
Technology, TU Wien, TU Budapest, TU Darmstadt, KTH, TU München, …

02/12/2015 50
Examples of large Apros models:

• Model: Loviisa NTSIMU incl 1D


 Model: Forsmark 3 BWR plant for OECD
Halden Reactor Project (2001) Reactor, primary & secondary side (1D
reactor version); excluding
containment model (2011); Apros 5.10

diagrams 1060
th2 nodes 3540
th6 nodes 1065
valves 2617+347+316+600+144 = 4024
(sv+cv+bv+chv+cv+sf = total)
pumps 301
actuators 2103
analog signals 27272
binary signals 111613
controllers 245 + 18 = 263
es nodes 295
es switches 188
DB size 58 MB (in .gz format)

Introduction
02/12/2015 51 51
Case 1: Process & control concept evaluation
• Example: a CCS capable power plant
concept including
• Interface to ASU
• Supercritical CFB boiler
• Turbine island
• CPU
• Controls
• Also as co-simulation with Aspen Plus
Dynamics

Simulation example:
Mode switch from air
firing to oxy firing and
back
Ref: Lappalainen et al.
International Journal of
Greenhouse Gas Control,
28(2014)11-24

02/12/2015 52
Case 2: Loviisa NPP Automation Renewal

02/12/2015 53
Case 3: Distributed energy production and consumption
Energy systems in the Smart City – Area level Plans & Simulation

Detailed area level energy planning, integrating


• Building types, new & retrofit, near 0-energy
• Generation units:
Heat, Power, Combined (CHP), Heat Pumps,
Solarthermal, Photovoltaics
Building or Process Integrated
• Energy Storages:
• Various Thermal, Gas, Electric
• Grids:
Electrical, Gas, Steam
• Heating and Cooling networks
• Control and automation
• Customer behaviour models using smart meter data

54 54
Case 4: Grade Change Development at Board Mill

Mill data
• Stora Enso Imatra mills
• ply board machine
• packaging & graphical boards
• 200 000 tons/year
• width 5.6 m
• speed 200-450 m/min
• basis weight 170-350 g/m2
• grade change freq > 1 per day

55
Case 4: Target of Simulation Studies

 GC performance is important part of BM’s overall efficiency


 AGC tuning is difficult for multi-ply, multi-grade BM
 customized dynamic simulator is an excellent tool for studying
complex interactions of process and automation

-> Use dynamic simulator as tool to help in decreasing GC times and


stabilizing paper moisture controls

02/12/2015 56
Case 4: Automatic Grade Change

Automatic Grade Change program (AGC)

headbox slice
openings 1, 2 & 3

jet-wire ratios 1, 2 & 3


stock flows
1, 2 & 3 speed

steam pressures

57
Case 4: AGC Involves Ramping and Mutual
Timing of Control Variables

GRADE #1 GRADE #2
BASIS WEIGHT
MOISTURE
QUALITY ASH CONTENT
VARIABLES THICKNESS
COLOR
...

MACHINE SPEED
THICK STOCK FLOW(S)
STEAM PRESSURE(S)
MANIPULATED SLICE OPENING(S)
VARIABLES JET-WIRE RATIO(S)
RAW MATERIAL RECIPE
LINEAR LOADS IN WET PRESSING
COATING SETTINGS
REFINER LOADS
10 20 Time / min ...
58
Case 4: Target is to Minimize Off-spec Production

Specification of
GRADE A2

Specification of
GRADE A1

Off-spec
59
Case 4: Tuning Parameters for Each AGC Variable

Start Stop
delay delay
(up, down) Maximum (up, down)
Ramping
Rate
(up, down)

GC Start

60
Case 4: What-if Studies Varying Parameter Values

Procedure:
1. Test performance in simulator
using various parameter values
2. Take parameters into use

61
Case 4: Scope of the Simulator

 approach systems & short


circulation for 3 plies
 piping hydrodynamics
 former & wire section
 drying section
 75 cylinders
 steam & condensate system
 controls
 PID-controls (tot. 24 loops)
 detailed AGC

62
Case 4: Simulator Performance Tested Against
Measurements
SPEED [m/min]

MANIPULATED VARIABLES
360

350
QUALITY VARIABLES
340

330

320

PRESSURE OF DRYING GROUP 5 [kPa] 310 MOISTURE CONTENT [%]


960 300
12

940 290 11

920 280 10
-300 0 300 600 900 1200
900 9
THICK STOCK FLOWS [l/s]
880
140 8
860 130
7
840 120
6
110
820
100 5
800 90
-300 0 300 600 900 1200 4
80

70 3
JET-WIRE-RATIO 2
60
-300 0 300 600 900 1200
1.15
OVEN DRY BASIS WEIGHT [g/m²]
50
1.13 300
40
-300 0 300 600 900 1200 290
1.11
SLICE OPENINGS [mm]
1.09 50 280

270
1.07
45 260
1.05
250
1.03 40
240
1.01
35 230
0.99
220
0.97 30
210
0.95
200
-300 0 300 600 900 1200 25
-300 0 300 600 900 1200
-300 0 300 600 900 1200

63
Case 4: Results

 Tuning of AGC was successful: GC times were decreased


 no change in web break frequency
 Detailed modeling of the process and automation
deep understanding of the interactions in GC
weaknesses in operational practices found
 Simulator
 offers platform to test ideas and new parameter values
 gave confidence to implement changes
 Was re-used for other successful studies later

02/12/2015 64
Benefits of dynamic process simulation

 Helps in decision making: provides quantitative operating information


 Gives deeper understanding of the process
 Helps to improve communications on plant design and operation between people
 Helps to evaluate novel process and control concepts in an integrated way, and to
bring them to market faster, and as more mature products
 Allows testing of automation configuration against virtual process
 Provides a superior training tool for operators, particularly when connected to DCS
 Shorten new process plant start-up times, and helps to quickly reach high product
quality
 Allows what-if analysis without interfering with the real process
 Can be used to justify process and control modifications
 Aids in process analysis and troubleshooting
 Enables to study complex problems in a systematic way

02/12/2015 65
Future trends

 Dynamic simulator features increase growing


 New application areas
 Co-simulation of different simulation products
 2 (or more) dynamic process simulators
 dynamic process simulator + CFD
 Uncertainty studies
 Parallel computation
 Optimization level on top of the DS
 Data management and integration with other engineering tools
(e.g. P&ID)

02/12/2015 66
Summary

 Simulation increases system understanding


 Dynamic simulation, mimicking system’s time-varying behaviour
by computational simulation, is a diverse technique used widely
for different purposes
 MPC is based on process models and optimization
 Widely used when PID is not enough
 Plenty of different M&S tools exists for different application
domains, and even several methods within a single tool
 Question is: What is the question?
 Industrial applications: control design and testing, process
and/or control concept evaluation, operator training, safety
analysis, ..
02/12/2015 67
Thank you for your
attention
Thanks also for persons whose slides I reused:
Kaj Juslin (Enbuscon)
Jouni Savolainen, Tommi Karhela (VTT)
Antti Pelkola (NesteJacobs)
Sami Tuuri (Fortum)

You might also like