Está en la página 1de 58

PASI 2005

Pan American Advanced Studies Institute Program


on Process Systems Engineering

Dynamic Simulation

Chemical Engineering Argimiro R. Secchi


Department

GIMSCOP
Group of Integration,
Modeling, Simulation,
Control, and Optimization
of Processes Foz do Iguau
August 24th, 2005
Location
UFRGS

BRAZIL
Gramado (ADCHEM 2006)

Iguazu Falls 940 km Porto Alegre

2
Outline
UFRGS

Dynamic Simulation:

When I need?

How I use?

What are the difficulties?

What are the challenges?

3
When I need Dynamic Simulation
UFRGS

Batch and semi-batch processes

Dynamic real-time optimization (D-RTO)

Process control

Startups, shutdowns and transitions

Process intensification

Teaching and training


4
Batch and Semi-Batch Processes
UFRGS

reflux product

(Semi-)batch (bio)reactors Batch distillation

5
Batch and Semi-Batch Processes
UFRGS

Analysis (Davies et al., 2004)

Control (Arpornwichanop et al., 2005)

Recent
Examples Dynamic optimization (Gao and Engell, 2005)
of Dynamic
Simulation Optimal design (Zhang and Smith, 2004)

Parameter estimation (Longhi et al., 2004)

Start-up operations (Elgue et al., 2004)

6
Dynamic Real-Time Optimization
UFRGS

Production Planing

model update for feed specification,


D-RTO product and market

inferences D-RTO / RTO

y*(t) u*(t)
model update for
NMPC NMPC

data pre-processing y(t)


Process + u(t)
and dynamic data
reconciliation Regulatory Control
Y(t)
d(t)

Model server
(rigorous, empiric, hybrid, reduced)
7
Dynamic Real-Time Optimization
UFRGS

NMPC (Jockenhvel et al., 2003)

Plant-wide optimization (Tosukhowong et al., 2004)


Recent
Examples
of Dynamic Product transitions (BenAmor et al., 2004)
Simulation

Model update (Yip and Marlin, 2004)

Virtual Analyzers (Ferreira et al., 2003)


8
Process Control
UFRGS

Nonlinear Model-Based Control


Local Optimization

inferences targets

model update for


NMPC NMPC

data pre-processing y(t)


Process + u(t)
and dynamic data
reconciliation Regulatory Control
Y(t)
d(t)

Model server
(rigorous, empiric, hybrid, reduced)

9
Process Control
UFRGS

Control structure design (Skogestad, 2004)

Model reduction (Lakner et al., 2005)


Recent
Examples Controllability and operability (Hahn et al., 2003)
of Dynamic
Simulation Nonlinear model-based control
(Biagiola and Figueroa, 2004)

Controller tuning (Trierweiler and Farina, 2003)

Nonlinear dynamics (Marquardt and Mnnigmann, 2005)


10
Startups, Shutdowns and Transitions
UFRGS

Start-up of distillation column (Reepmeyer et al., 2004)

Safety studies (Molnr et al., 2004)


Recent
Examples Plant shutdown (Iliuta and Larachi, 2005)
of Dynamic
Simulation
Process transitions (Srinivasan et al. 2005)

Troubleshooting (Bhagwat et al., 2003)

11
Process Intensification
UFRGS

Complex systems (Charpentier and McKenna, 2004)

Oscillatory motion (Gomaa and Taweel, 2005)


Recent
Examples Reactive distillation (Grner and Kienle, 2004)
of Dynamic
Simulation
Reaction/separation process (Wu et al., 2002)

Autorefrigerated reactors (Toledo et al., 2005)

12
Teaching and Training
UFRGS

Classroom teaching Operators training

Simulator Server
Client
Teacher Simulator Task
Plant Manager
TCP/IP TCP/IP

Simulator Simulator Simulator Client Client Client


Trainee Trainee Trainee
Student Student Student

Example: Operator training (Lee et al., 2000)


13
How I use Dynamic Simulation
UFRGS

Several things to chose! Some of them are:

Simulators Discretizers Integrators Estimators Optimizers

Taylor-made Finite differences Implicit Least square Variational

Commercial Finite volume Explicit Max. likelihood Math. program.

Modular Finite elements Low-index Local minimum Sequential

Equation-oriented Orth. collocation High-index Global minimum Simultaneous

14
Dynamic Simulators
UFRGS

Modeling and Input Data

Model Model Code External


Input Data
Library Building Generation Components

Static Editable Reject External CAPE-


Text Graphic Compilation Interpretation Modes
Library Model illegal data interfaces OPEN

Internal Object Building Connections, - Interactive


Editor Oriented Blocks ports, types - Batch
- Automatic
- Data files
- Data sets
Syntax - Multiple formats
Highlight

15
Dynamic Simulators
UFRGS

Simulation
Tool

Simulation Numerical Optimization


Proce ssing
Strategy Packages

Stead y Produ ction


Par allel Sequential Direct Modular D yn am ic Stru ctural
St ate Pl an ing
Solution Solution

Dat a Paramet er
Recon ciliatio n Estim ation
Heterog en eit y, Commun ication
Interfaces Protoco ls
CAPE-OPEN Stati stical
Analysis

Linear Stead y An al yses Var iab les and D ynami c


Differentiation Alg ebr a St ate Syst em s
Equ ation s
Scalin g

Numeric Direct
Iter ative,
Sparse
precondit. PDE
Consist en cy, Bifur cation Events DAE PDE Initializ ation and
Symbolic stab ilit y, Diag rams Re-init ializ ation
Multip li cit y sen sib ilit y
Automatic
T im e
Linear izat ion Depen dent ndex < 2 ndex > 1

Stat e
Depen dent
16
A Very Simple Example in
UFRGS Different Environments
Series of isothermal CSTR with first
order reaction and PI controller

17
MATLAB
UFRGS

ODE file
MATLAB script file

18
SIMULINK
UFRGS

SIMULINK diagram S-function file

19
gPROMS
UFRGS

20
gPROMS
UFRGS

21
EMSO
UFRGS

22
Difficulties in Dynamic Simulation
UFRGS

Reliable models
Truly standard interfaces
High-Index DAE systems
Model consistency:
- Degree of Freedom (DoF)
- Dynamic Degree of Freedom (DDoF)
- Measurement units
- Structural non-singularity
- Consistent initial condition

23
Standard Interfaces
UFRGS

CAPE-OPEN

24
CAPE OPEN
UFRGS

Example of CAPE-OPEN: DyOS (Dynamic Optimization Software) -


Marquardts group (2000)

gPROMS

25
CAPE OPEN
UFRGS

Another example of CAPE-OPEN: EMSO (Environment for Modeling, Simulation and


Optimization) - Soares and Secchi (2004)

EMSO A EMSO B

methanol plant
ESO ESO

CORBA Object Bus

EMSO ESO 26
High-Index DAE System
UFRGS

Three general approaches:

1) Manually modify the model to obtain a lower index equivalent model

2) Integration by specifically designed high-index solvers (e.g., PSIDE, MEBDFI)

3) Apply automatic index reduction algorithms

27
DAE Index Reduction
UFRGS

Index reduction down to index-one DAE


Pantelides' approach
Fail if the system is structurally singular

Minimally Structurally Singular

Search for MSS subsets with respect to


ALL variable derivatives
Proposed algorithm
(Soares and Secchi, 2005)
Check MSS for singularity with respect to
the entire set of variables

28
DAE Index Reduction
UFRGS

Example: optimal control context:

f 1 ( x , u1 , u 2 ) = 0 y1 and y2 are desired outputs (specified optimal profiles)

f 2 ( x , x ' , y1 ) = 0 u1 and u2 are the control actions


f 3 ( x, y 2 ) = 0 x is the state variable

Graph for the DAE system After one analysis step One step with derivatives Singularity detected
29
Consistency Analysis
UFRGS

Degree of Freedom (DoF)

= 0 (for simulation) > 0 (for optimization)

Dynamic Degree of Freedom (DDoF)

= number of given initial conditions

Check Measurement units


Structural non-singularity
Consistent initial conditions
30
Consistency Analysis
UFRGS

31
Measurement Units
UFRGS

32
Structural Singularity
UFRGS

Example: FLASH

Usual case: given feed condition and heat


duty (q), solve the flash index-one
system simple solution.

Optimal control problem: given feed


condition and vessel temperature, find q
index-two system not solved by
available commercial simulators.

33
Using AspenDynamics / ACM
UFRGS

Reports system singularity:

34
Using gPROMS
UFRGS

Detects a high-index problem and gives the following error message:

35
Using EMSO
UFRGS

Uses the proposed index reduction algorithm and finds the optimal solution:

36
Using EMSO
UFRGS

It also solves the well-known index-three batch distillation problem.


(Logsdson and Biegler, 1993)

10
9
7
5
3
1

37
Inconsistent Initial Condition
UFRGS

Example: classical pendulum problem


Inconsistent initial condition:
(1)
(2)

NO
(3)

TO
(4)

K!
L

(5)
=
1

OK!

F (t , y , y) = 0 F (0, y(0), y(0)) = 0


Hidden constraints:
Differentiating (5) and using (1) and (2): x w + y z = 0 (6) x(0) w(0) + y(0) z (0) = 0
Differentiating (6) and using (1)(5): w2 + z 2 + T L2 = g y (7) w(0) 2 + z (0) 2 + T (0) L2 g y (0)

Differentiating (7) and using (2), (3), (4), (6): T ' = 3 g z / L2 (8) T '(0) = 3 g z(0) / L2
38
Inconsistent Initial Condition
UFRGS

Example: classical pendulum problem


(1) Index 3 Index 2
(2) (1) (1)
(3) (2) (2)
(4) (3) (3)

(5) (4) (4)


(5) (6)
(6)
(7) Index 1 Index 0
(8) (1) (1)
(2) (2)
10 variables (y, y)
ir!

(3) (3)
pa
ny

8 equations (4) (4)


ta
no

(7) (8)
t
Bu

2 DDoF Satisfies the inconsistent I.C. 39


Error Propagation
UFRGS

index-0 solver vs index-3 solver Drift-off effect

L = 0.9 m , g = 9.8 m/s2 I.C.: x(0) = 0.9 m and w(0) = 0


40
Dynamic Simulation Model
UFRGS

41
Challenges
UFRGS

Robust strategies for on-line


updating of dynamic models

Dynamic data reconciliation Parameter estimation

Related topics:
Hybrid and rigorous modeling
Order reduction of nonlinear models
Fault diagnosis
NMPC tuning strategies
42
Challenges
UFRGS

DAE solvers

High-index (>3) Automatic/guided selection


solvers of feasible set of variables
for initial condition

Index reduction with


trajectory projection
onto hidden manifold
43
Challenges
UFRGS

Multi-level dynamic Simultaneous data


simulator reconciliation and
parameter estimation tool

Specialist
Integrated tool for D-RTO
system

Dynamic optimizer with Self-tuned nonlinear model


adaptive grid predictive controller

44
Challenges
UFRGS

Systems Interoperability

Truly CAPE-OPEN Heterogeneity and


multi-platform

Single
communication Multi-processing
protocol
and
Shared-memory
advantages
45
Challenges
UFRGS

Complex systems

Process simulation Multi-scale modeling +


+ CFD simulation tools

Bifurcation + control Hybrid


system design modeling

46
UFRGS
Vision
Integrated
Environment Dual Space
n,, Optimizatio
Optimizatio n n,
RTO, DRTO
RTO, DRTO

D ak

in n
a k io
ec in
M

g
M ecis
isi g

De
on
n

D
sig

sig
De

n
Hierarchical R

iati on
e
Process
co
Modeling
n
Data

Data
ced

Adva
rol

Cont ed
c

ci
iliation

n
Cont
n

o
a

rol
nc
v

Re
Ad

Tra es Inf g,
in n c ere inin
Saf ing, f ere nce Tra fety
ety In s
Sa

47
References
UFRGS

Al-Arfaj, M. and W.L. Luyben. Comparison of Alternative Control Structures for an Ideal Two-Product Reactive Distillation
Column. Ind. Eng. Chem. Res., 39, 32983307 (2000).

Arpornwichanop, A., P. Kittisupakorn and I.M. Mujtaba. On-line Dynamic Optimization and Control Strategy for Improving
the Performance of Batch Reactors. Chemical Engineering and Processing, 44, 101114 (2005).

BenAmor, Z., F.J. Doyle III and R. McFarlane. Polymer Grade Transition Control using Advanced Real-Time Optimization
Software. Journal of Process Control, 14, 349364 (2004).

Bhagwat, A., R. Srinivasan and P.R. Krishnaswamy. Fault Detection During Process Transitions: a Model-Based Approach.
Chemical Engineering Science, 58, 309325 (2003).

Biagiola, S.I. and J.L. Figueroa. Application of State Estimation Based NMPC to an Unstable Nonlinear Process. Chemical
Engineering Science, 59, 46014612 (2004).

Biegler, L.T., A.M. Cervantes and A. Wchter. Advances in Simultaneous Strategies for Dynamic Process Optimization.
Chemical Engineering Science, 57, 575593 (2002).

Charpentier, J.C. and T.F. McKenna. Managing Complex Systems: Some Trends for the Future of Chemical and Process
Engineering. Chemical Engineering Science, 59, 16171640 (2004).

Costa Jr., E.F., R.C. Vieira, A.R. Secchi and E.C. Biscaia Jr. Dynamic Simulation of High-Index Models of Batch Distillation
Processes. Journal of Latin American Applied Research, 32 (2) 155160 (2003).

48
References
UFRGS

Davies, M.L., I. Schreiber and S.K. Scott. Dynamical Behaviour of the BelousovZhabotinsky Reaction in a Fed-Batch Reactor.
Chemical Engineering Science, 59, 139148 (2004).

Elgue, S., L. Prat, M. Cabassud, J.M. Le Lann and J. Czerac. Dynamic Models for Start-up Operations of Batch Distillation
Columns with Experimental Validation. Computers and Chemical Engineering, 28, 27352747 (2004).

Ferreira, L.S., J.O. Trierweiler, A.R. Secchi and S.M. Marcon. Development of a Virtual Analyzer Software for Bioprocesses.
AIChE Annual Meeting, San Francisco, CA, USA, p. #107ak (2003).

Gao, W. and S. Engell. Iterative Set-point Optimization of Batch Chromatography. Computers and Chemical Engineering, 29,
14011409 (2005).

Grnera, S. and A. Kienle. Equilibrium Theory and Nonlinear Waves for Reactive Distillation Columns and Chromatographic
Reactors. Chemical Engineering Science, 59, 901918 (2004).

Hahn, J., T.F. Edgar and W. Marquardt. Controllability and Observability Covariance Matrices for the Analysis and Order
Reduction of Stable Nonlinear Systems. Journal of Process Control, 13, 115127 (2003).

Henson, M.A. Dynamic Modeling and Control of Yeast Cell Populations in Continuous Biochemical Reactors. Computers and
Chemical Engineering, 27, 11851199 (2003).

Iliuta, I. and F. Larachi. Modeling Simultaneous Biological Clogging and Physical Plugging in Trickle-Bed Bioreactors for
Wastewater Treatment. Chemical Engineering Science, 60, 14771489 (2005).
49
References
UFRGS

Jockenhvel, T., L.T. Biegler and A.Wchter. Dynamic Optimization of the Tennessee Eastman Process using the
OptControlCentre. Computers and Chemical Engineering, 27, 15131531 (2003).

Kulikov, V., H. Briesen, R. Grosch, A. Yang, L. vonWedel and W. Marquardt. Modular Dynamic Simulation for Integrated
Particulate Processes by Means of Tool Integration. Chemical Engineering Science, 60, 20692083 (2005).

Lakner, R., K.M. Hangos and I.T. Cameron. On Minimal Models of Process Systems. Chemical Engineering Science, 60, 1127
1142 (2005).

Lee, S., I. Jeong and I. Moon. Development of Evaluation Algorithms for Operator Training System. Computers and Chemical
Engineering, 24, 1517-1522 (2000).

Logsdon, J.S. and Biegler, L.T. Accurate Determination of Optimal Reflux Polices for the Maximum Distillate
Problem in Batch Distillation. Ind. Eng. Chem. Res., 32 (4) 692-700 (1993).

Longhi, L.G.S., D.J. Luvizetto, L.S. Ferreira, R. Rech, M.A.Z. Ayub and A.R Secchi. A Kinetic Model for the Kluyveromyces
marxianus Growth using Cheese Whey as Substrate. Journal of Industrial Microbiology, 31 (1) 3540 (2004).

Marquardt, W. and M. Mnnigmann. Constructive Nonlinear Dynamics in Process Systems Engineering. Computers and
Chemical Engineering, 29, 12651275 (2005).

Martinson, W.S. and P.I. Barton. Distributed Models in Plantwide Dynamic Simulators. AIChE Journal, 47 (6) 13721386
(2001).
50
References
UFRGS

Molnr, A., M. Krajciov, J. Markos and L. Jelemensky. Use of Bifurcation Analysis for Identification of a Safe CSTR
Operability. Journal of Loss Prevention in the Process Industries, 17, 489498 (2004).

Reepmeyer, F., J.U. Repke and G. Wozny. Time Optimal Start-up Strategies for Reactive Distillation Columns. Chemical
Engineering Science, 59, 43394347 (2004).

Skogestad, S. Control Structure Design for Complete Chemical Plants. Computers and Chemical Engineering, 28, 219234
(2004).

Soares, R.P. and A.R. Secchi. EMSO: A New Environment for Modeling, Simulation and Optimization. ESCAPE 13,
Lappeenranta, Finlndia, 947 952 (2003).

Soares, R.P. and A.R. Secchi. Modifications, Simplifications, and Efficiency Tests for the CAPE-OPEN Numerical Open
Interfaces. Computers and Chemical Engineering, 28, 16111621 (2004).

Soares, R.P. and A.R. Secchi, Direct Initialisation and Solution of High-Index DAE Systems, ESCAPE 15, Barcelona, Spain,
157162 (2005).

Srinivasan, R., P. Viswanathan, H. Vedam and A. Nochur. A Framework for Managing Transitions in Chemical Plants.
Computers and Chemical Engineering, 29, 305322 (2005).

Toledo, E.C.V., R.F. Martini, M.R.W. Maciel and R. Maciel Filho. Process Intensification for High Operational Performance
Target: Autorefrigerated CSTR Polymerization Reactor. Computers and Chemical Engineering, 29, 14471455 (2005).
51
References
UFRGS

Tosukhowong, T., J.M. Lee, J.H. Lee and J. Lu. An Introduction to a Dynamic Plant-Wide Optimization Strategy for an
Integrated Plant. Computers and Chemical Engineering, 29, 199208 (2004).

Trierweiler, J.O. and L.A. Farina. RPN tuning strategy for model predictive control. Journal of Process Control, 13, 591598
(2003).

Wu, K.L., C.C. Yu, W.L. Luyben and S. Skogestad. Reactor/Separator Processes with Recycles-2. Design for Composition
Control. Computers and Chemical Engineering, 27, 401421 (2002).

Yip, W.S. and T.E. Marlin. The Effect of Model Fidelity on Real-Time Optimization Performance. Computers and Chemical
Engineering, 28, 267280 (2004).

Zhang, J. and R. Smith. Design and Optimisation of Batch and Semi-Batch Reactors. Chemical Engineering Science, 59, 459
478 (2004).

DAE Solvers:
DASSL or DASSLC: Petzold, l.R. (1989) or Secchi, A.R. and F.A. Pereira (1997),
http://www.enq.ufrgs.br/enqlib/numeric/numeric.html
MEBDFI: Abdulla, T.J. and J.R. Cash (1999), http://www.netlib.org/ode/mebdfi.f
PSIDE: Lioen, W.M., J.J.B. de Swart, and W.A. van der Veen (1997), http://www.cwi.nl/cwi/projects/PSIDE/
SUNDIALS: R. Serban et al. (2004), http://www.llnl.gov/CASC/sundials/description/description.html
52
ADCHEM 2006 and SICOP 2006
UFRGS

International Symposium on Workshop of Solving Industrial Control


Advanced Control of Chemical Processes and Optimization Problems
April 2-5, 2006 April 6-7, 2006
http://www.adchem.org http://www.enq.ufrgs.br/sicop2006/
53
UFRGS
Research Group
GIMSCOP - 2005
Argimiro Resende Secchi, D.Sc. Grson Balbueno Bicca, Eng. Marcus Darci Rutsatz, Eng.
Jorge Otvio Trierweiler, D.Sc. Graziela Cestari Silva Grando, Eng. Maurcio Carvalho Maciel, I.C.
Marla Azrio Lansarin, D.Sc. Gustavo Alberto Neumann, M.Sc. Nina Paula Gonalves Salau, M.Sc.
Nilo Srgio Medeiros Cardozo, D.Sc. Igor Rodacovski, Tec. Inf. Paula Betio Staudt, Eng.
Andr Bello de Oliveira, M.Sc. Irma Maria Bueno, Sec. Rafael de Pelegrini Soares, M.Sc.
Andr Rodrigues Muniz, M.Sc. Larissa Scherer Severo, Eng. Rafael Spohr, Eng.
Andrey Copat, Eng. Leandro Porto Lusa, M.Sc. Ricardo Guilherme Duraiski, M.Sc.
Adriano Giraldi Fisch, M.Sc. Letcia Caumo, Eng. Rodolfo Rodrigues, Eng.
Ariel Kempf, M.Sc. Luciane da Silveira Ferreira, M.Sc. Rodrigo Paliga da Rosa, I.C.
Christiano Daniel Wetzel Guerra, I.C. Luciano And Farina, M.Sc. Samuel Facchin, Eng.
Cristiano S Brito Cardoso, Eng. Lus Eduardo Brose Piotrowicz, Eng. Tanise Mori Flores, Eng.
Dbora Jung Luvizetto, Eng. Marcelo Beninca, Eng. Tiago da Silva Osrio, I.C.
Edson Cordeiro do Valle, M.Sc Marcelo Escobar, Eng. Tiago Fiorenzano Finkler, M.Sc.
Eduardo Fontoura Birnfeld, Eng. Marcelo Fank Fraga, Eng. Tito Lvio Domingues, M.Sc.
Eduardo Guimares de Magalhes, Eng. Marcelo Farenzena, M.Sc. Vanessa Conz, M.Sc.
Euclides Almeida Neto, M.Sc. Marcelo Bohrer Guaritta, Eng. Vincius Cunha Machado, M.Sc.
Fbio Brio de Oliveira, Eng. Mrcio Ferreira, Eng. Wagner Bertuol Casagrande, I.C.
54
PASI 2005
Pan American Advanced Studies Institute Program
on Process Systems Engineering
UFRGS

... thank you for your attention!

Process Simulation Lab


Chair: Prof. Dr. Argimiro Resende Secchi
Phone: +55-51-3316-3528
E-mail: arge@enq.ufrgs.br
http://www.enq.ufrgs.br/labs/lasim.html

Process Integration and Control Lab


Chair: Prof. Dr. Jorge Otvio Trierweiler
Phone: +55-51-3316-4072
E-mail: jorge@enq.ufrgs.br
http://www.enq.ufrgs.br/labs/lacip.html
55
UFRGS

Extra slides

56
Maximum cardinality matching
UFRGS

breadth-first search, E: equations set, V: variables set, L: lines set


There is a line Ei Vj if the equation Ei contains the variable Vj 57
Index analysis and reduction
UFRGS

58

También podría gustarte