2463

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/224627963

Object-Oriented Modelling & Simulation of Power Plants with Modelica

Conference Paper · January 2006


DOI: 10.1109/CDC.2005.1583388 · Source: IEEE Xplore

CITATIONS READS
47 1,978

2 authors:

Francesco Casella Alberto Leva


Politecnico di Milano Politecnico di Milano
189 PUBLICATIONS 2,516 CITATIONS 282 PUBLICATIONS 3,076 CITATIONS

SEE PROFILE SEE PROFILE

All content following this page was uploaded by Francesco Casella on 26 May 2014.

The user has requested enhancement of the downloaded file.


Proceedings of the
44th IEEE Conference on Decision and Control, and
ThIB18.4
the European Control Conference 2005
Seville, Spain, December 12-15, 2005

Object-Oriented Modelling & Simulation of Power Plants with


Modelica
Francesco Casella* and Alberto Leva*

Abstract— This paper presents and discusses the application II. OBJECT-ORIENTED PHYSICAL SYSTEM
of the object-oriented modelling paradigm to thermo-hydraulic MODELLING WITH MODELICA
systems, with particular reference to fossil-fired and nuclear
power plants. As a result, a particular modelling approach The Modelica language was introduced in 1997 [1], as
is proposed and motivated. The paper also presents the the product of an international cooperative effort to define
ThermoPower Modelica library, developed at the Politecnico an object-oriented language for the modelling of generic
di Milano along the proposed approach, and made available
to the scientific and professional community within the terms
physical models, described by algebraic and differential
of the Modelica license. Some application cases involving equations. The features of the language which are relevant
ThermoPower are briefly reported. in the context of this paper are summarised here.
I. INTRODUCTION A. A-causal, declarative modelling
Dynamic simulation is a very important tool in the design
The model of each physical component (e.g. a pipe, a
of power plant control systems, particularly when innovative
pump, a valve, or a turbine) is described by a set of alge-
plants, or innovative control strategies are considered. Sim-
braic, differential, and event-triggered difference equations;
ulation can play a role from the initial design stages, when
these describe how the modelled object behaves, rather
the control strategies and the required instrumentation are
than how the equations are to be numerically solved. The
evaluated, to the validation of the controller tuning, up to
boundary conditions (pressures, temperatures, flow rates)
the plant commissioning phase, not to mention personnel
are not necessarily declared a-priori as input or outputs:
training. Dynamic modelling and transient analysis efforts
this is essential to achieve truly object-oriented modelling
can be very cost-effective, both during design, when it can
of physical systems, since the model of a physical is always
catch flaws which would result in later costly interventions,
the same, irrespective of what is connected to it. This marks
and during the commissioning phase, when the savings in
a fundamental difference with conventional block-diagram-
terms of reduced down-time can be huge.
oriented simulation languages, such as Simulink, in which
Recent advances in object-oriented modelling of dynam-
each model must have definite input and output signals.
ical systems, and in particular the development of the
Modelica language [1], bring new possibilities in this field, B. Code transparency
allowing the fast development of system simulators which
can be tailored to the different needs of the design process, The declarative approach allows to write the model
while maximising the re-use of existing information and code in a way that tightly matches the way equations are
knowledge. The flexibility of the object-oriented approach written on the paper, without bothering how the equations
is particularly well-suited to support model-based control will eventually be solved. This greatly eases the model
system design methodologies, such as Model Predictive development, documentation, modification and reuse, thus
Control. Currently there is a wide gap between full-scale providing a significant advantage over specialised power
modular plant models used for simulation, and reduced- plant simulation packages. These in fact usually provide
order hand-coded models used for controller design; as "closed" models, which can be very difficult or even im-
available computing power increases, and Modelica compil- possible to inspect, in order to understand what’s inside,
ers become more efficient, this gap will presumably become and even harder to modify, in order to adapt them to one’s
narrower in the near future, until modular (albeit simplified) specific needs.
first-principle models could possibly be used directly for
C. Encapsulation
controller design.
The paper is structured as follows: Section 2 reviews The models of system components are connected through
the key features of object-oriented modelling of dynamical rigorously defined interfaces or connectors (e.g. fluid con-
systems; in Section 3, the advantages of using object- nectors with pressure, flow rate, and enthalpy, or heat
oriented modelling in power plant simulation are discussed; connectors with temperatures and heat fluxes). Any two
Section 4 introduces the ThermoPower Modelica library; components with compatible connectors can be bound to-
example applications are reviewed in Section 5. gether, regardless of their internal details. This feature is
essential to re-use models, and to easily replace subsystems
*Dipartimento di Elettronica e Informazione, Politecnico di
Milano, 20133 Milano, Italy. [email protected], with more or less detailed counterparts, without affecting
[email protected] the rest of the system.
0-7803-9568-9/05/$20.00 ©2005 IEEE 7597
D. Inheritance B. Modularity
Model libraries can be given a hierarchical structure, in The object-oriented approach is highly modular. This
which more complex models are obtained from basic mod- means, first of all, that it is possible to build the model
els by adding specific variables, equations or even models. of a plant unit by connecting the models of its physical
It is then possible to factor out the common behaviour components in any way which makes physical sense; sec-
of a family of components (e.g. valves, or pumps) in a ondly, it allows to build a plant model by connecting the
parent model, and then to define child model which add unit model, with an arbitrary number of hierarchical levels.
their specific variables and equations. It is also possible, Besides that, the advanced features of the Modelica
e.g., to model objects with replaceable fluid models, by language allow to define replaceable components, which
separating the component model equations from the fluid can be substituted by more or less detailed counterparts,
model equations. as long as they have the same interface, i.e. the same
connectors and parameters. It becomes then much easier to
manage a whole family of simulators of the same plant, each
E. Multi-physics modelling
one characterised by a level of detail which is appropriate
The Modelica language allows modelling of generic to a specific simulation task. For example, it is possible
dynamical systems. It is then straightforward to combine to substitute a very accurate water property model with
physical models belonging to different engineering domains a much simpler one, when the system is going to be
with continuous- or discrete-time control systems models. simulated around a certain operating point; or, it is possible
to substitute the model of whole plants sub-units (e.g., the
F. Reusability feedwater systems) with more idealised counterparts (e.g.
an ideal flow source) in a systematic way.
A-causal modelling, encapsulation, and inheritance are
strong incentives toward reuse of modelling knowledge in- IV. THE THERMOPOWER MODELICA LIBRARY
side simulation projects. At the component level, it is often
The ThermoPower library has been developed to provide
possible to re-use models provided by standard libraries,
basic components for the modelling of power plants. The
while developing a few specific components with ad-hoc
scope of the library is thus narrower than that of other
(and possibly proprietary) modelling, wherever needed. At
Modelica libraries for generic thermo-fluid systems, such
the system level, it is possible to easily manage a family
as ThermoFluid [2] or the forthcoming Modelica.Fluid
of models with different accuracy and simulation speeds; in
standard library [3]. On one hand, this allows to make some
most cases, this can be obtained by slight variations of a
basic simplifying assumptions on the nature of the fluids and
"reference" system model. This greatly helps to maintain the
their phenomena: e.g., turbulent flow is always assumed to
consistency of models as they evolve throughout the project
compute pressure drops, which is a good choice in typical
life cycle, as modifications and improvements applied to the
power plant components handling water and gases, but it’s
reference model are automatically inherited by simplified
not in petrochemical plants, where oil is heavily involved.
ones.
On the other hand, it makes it possible to put more detail
and sophistication where it is really needed: for example,
III. OBJECT-ORIENTED MODELLING OF POWER pipe models use finer discretisation grids for enthalpies
PLANTS than for pressures and flow rates, since wave propagation
phenomena can usually be neglected when dealing with
A. Flexibility control-relevant power plant dynamics.
Models of power plant components can have a widely The library, described in more detail in [4], [5], is an open
varying complexity, depending on the desired degree of source project: the source code is freely available online [6].
detail. On the other hand, their boundary connections es-
sentially fall under three categories: fluid flange connections A. Library Structure
(like the inlet and outlet flanges of a pump), thermal transfer The library is structured into 5 packages. The package
between zero- or one-dimensional objects (such as heat Water provides models of components using water/steam
exchangers), and mechanical flanges (such as a turbine or a as working fluid, while the package Gas provides models
compressor shaft). It is therefore possible to define standard of components using ideal gas mixtures. The default wa-
connectors for these types of interfaces, or even to re-use ter/steam model, based on the IAPWS-IF97 formulation,
interfaces which are pre-defined in the Modelica standard and the default ideal gas mixture model, based on a NASA
library. property database, are provided by the Modelica.Media
The declarative approach leaves almost complete freedom library [3], which is a part of the standard Modelica
as to what equations should be used to describe a specific library. Those models can be replaced by any other fluid
component; on the other hand, any two components can be model, provided it is equipped with a Modelica.Media-
connected, as long as the standard connectors are used. compliant interface.
7598
V. APPLICATIONS

Once a Modelica plant model has been built, it can be


turned into a simulator by a Modelica tool, such as Dymola
[7], and used for many different purposes. First of all, it
is possible to run it open-loop against experimental data,
Fig. 1. Model of a counter-current heat exchanger to assess the validity of the model itself. The model of
a control system (either continuous-time or digital) can
then be connected to it, and closed-loop simulations can
The Thermal package provides basic building blocks to be run, to analyze different plant control strategies, and
describe heat transfer phenomena. The Electrical pack- eventually to tune the controller parameters. In case a large
age provides highly idealised models of electric generators number of simulations must be run, such as in sensitivity
and power grid, to describe the plant boundary conditions; studies, it is possible to replace some parts of the model
note that more accurate models from specialised electrical with simpler counterparts, to change the fluid models, or
machinery libraries could be used as well, in case higher- to change the number of nodes of distributed-parameter
frequency electro-mechanical dynamics becomes of interest. components. Besides simulating a model, it is also possible
to obtain the A, B,C, D matrices of its equations, linearised
B. Elementary components around one or more operating points; this can be very
useful to design model-based controllers based on linear (or
The Water and Gas library contain models of ele-
piecewise-linear) models. It is also possible to automatically
mentary components such as prescribed pressure reservoirs,
obtain real-time, fixed-time-step simulators from the open-
prescribed flow generators, valves, pumps, compressors, tur-
loop plant model, to be used for hardware-in-the-loop
bines, mixers, headers, drum boilers, three-way connections,
testing of the control system or for operator training.
and generic pressure drops. Those models are based on
Three applications of the library are now briefly pre-
basic mass and energy balances, and on standard pressure
sented, and will be illustrated in the interactive session,
vs. flow rate characteristic curves.
along with the library itself.
C. Components for heat exchanger modelling
A. Detailed boiler model validation
Heat exchangers can have widely different configurations
(co-current, cross-flow, counter-flow), and involve two or All the library models have been tested in very simple
more fluid flows, (water/steam and/or flue gases). Basic configurations, to check their correctness. Besides that, the
building blocks are provided to build those models. ThermoPower library was validated against experimental
Flow1D models a 1-dimensional fluid flow with heat data coming from the physical model of the evaporating
transfer from the boundary; the model is based on section of a heat-recovery boiler, with a power scaling
distributed-parameter mass, momentum and energy conser- factor of 1:600. Details on this validation are given in [5].
vation equations, discretised by a finite-volume method. The Suffice here to say that the simulation model represents the
Flow1Dfem model is obtained from the same basic bal- circulation loop in detail, while non-equilibrium phenomena
ance equations, using a finite element method instead. The are accounted for in the model of the drum. The model has
Flow1D2ph model is a finite volume model considering 50 state variables and 288 nontrivial equations, showing
averaged densities in the neighbourhood of phase changes, that the proposed approach allows to treat efficiently cases
to avoid non-physical simulation artifacts due to phase of realistic complexity. The diagram of the Modelica model
change discontinuities at the model nodes. All of these mod- obtained by connecting ThermoPower models is shown in
els can be extended through inheritance, by adding further Fig. 2.
equations to compute heat transfer coefficient according to A sample of the validation tests is reported here, namely
a number of well-established empirical correlations (like a negative throttling valve step at low load. Figures 3 and
Dittus-Boelter’s correlation for one-phase flow, or Chen’s 4 show the drum pressure and level transients: notice the
correlation for boiling heat transfer). good agreement between the model output and data.
Basic models for co-current and counter-current heat In particular, the non-equilibrium phenomena represented
transfer configurations are provided, as well as simple in the drum model allow to reproduce both low- and mid-
models of metal wall, accounting for thermal resistance and frequency dynamics in the pressure responses correctly.
thermal capacitance. These can be used together with the Also the effects of thermal exchanges between the fluid
1-D flow models to build heat exchanger models such as the in the drum and the drum metal wall were investigated,
one in Fig. 1. More complex heat transfer configuration can showing that the corresponding heat transfer coefficient has
be easily modelled, by writing ad-hoc heat transfer modules, a significant influence on the superheated steam tempera-
relating temperatures and heat flows between the different ture. This phenomenon is often neglected in the simulation
objects, and re-using the existing fluid flow models. models proposed in the literature.
7599
Fig. 4. Drum level transient for a throttling valve step leading to a 13%
pressure reduction at low load (simulated vs. experimental data).

Fig. 2. Modelica diagram of the boiler model.

Fig. 3. Drum pressure transient for a throttling valve step leading to a


13% pressure reduction at low load (simulated vs. experimental data). Fig. 5. NSSS model diagram

system-level simulators of this plant, to support the prelim-


B. Nuclear power plant simulation
inary study of the plant control strategies [8].
The IRIS plant is an innovative pressurised-water nu- Fig. 5 represents the diagram of the so-called Nuclear
clear reactor, with an innovative integral design: all the Steam Supply System (NSSS). Hot water is pumped through
components of the steam generator (nuclear core, control the primary side of the steam generator, passes through a
rods, primary circuit, pressuriser, circulation pumps, steam lower headers, flows through the core, where it gets heated,
generator) are included in the primary containment vessel. and then through the risers up to the pressuriser, and then
Very detailed dynamic models of the plant are available, back to the pumps. The secondary side is connected to the
using certified simulation codes such as RELAP. These TGFWS model, containing the turbine, electric generator,
codes are mainly targeted at the simulation of extreme and feedwater system models.
transients for safety analysis; on the other hand, they are The top-level model (shown in Fig. 6) contains the two
way too slow to be used for control system design, and main plant units, together with the control system and su-
very difficult to integrate with realistic models of the control pervisory system models; the latter two are connected to the
system. The ThermoPower library, coupled with additional plant via bus signal connectors. Note that this model is an
components modelling the neutronic kinetics and the fuel abstract (or partial in Modelica terms) model, describing the
rod thermal dynamics, has then been used to implement high-level structure of the simulator. A specific simulation
7600
Fig. 6. Top-level simulator structure

model is then obtained by instantiating the partial model and


replacing each abstract unit with a specific implementation,
taken from a simulator library (Fig. 7). The NSSS model
implementation can be further customised by specifying
the fluid model used for the primary and secondary loops,
as well as the number of nodes in the core and once-
through steam generator models, and the steam generator
model itself. Note that, if an incompressible fluid model is
chosen for the primary loop, the fast states related to the
pressure dynamics automatically disappear from the model,
thanks to symbolic manipulation by the Modelica compiler.
Dimensional and operarting data are put in data sheets
contained in the Data sub-package; those data sheets can
then be referenced when instantiating a specific simulation
model. Fig. 7. The IRIS Simulator Library
Using this architecture, it is possible to maintain a very
large set of potential simulation models in a consistent
state throughout the entire project lifetime, by avoiding any diagram) includes a very simple description of the gas
unnecessary duplication of data and models. turbine unit (which is much faster than the steam unit), a
Fig. 8 shows the results of the simulation of 10% step heat recovery boiler including high and intermediate pres-
load change requests. sure superheaters, reheaters, evaporators and economisers,
a model of the high and intermediate pressure drums, and a
C. Combined-cycle plant startup simulation model of the steam turbine generator, complete with bypass
In the new scenario originated by the deregulation and valves. The low-pressure part of the steam generator has
restructuring of the power market, the fast startup of power been modelled as a simplified boundary condition; although
plants, possibly assisted by advanced, model-based con- it is essential to achieve high energy conversion efficiency,
trollers, is becoming an increasingly attractive topic (see, its influence on the thermal stress of high-pressure, high-
e.g., [9], which has been recently implemented on full-scale, temperature components is in fact negligible. The reference
operating plants). A research project is currently being model has currently over 2000 variables and 130 states and
carried out at Politecnico to evaluate the potential reduction is able to simulate a warm start-up, i.e. from the reignition
in start-up times for typical large combined cycle units (250 of the gas turbine after a nightly stop, through turbine
MWe + 130 MWe) installed on the Italian network. The startup and synchronisation, up to full load operation.
start-up time of combined cycle plants is essentially limited Faster, more simplified versions will then be developed
by the thermal stresses of the most critical points of the and tested against this reference model, to assess if they
steam units, i.e. the superheated steam collectors and the are accurate enough to predict the stress peaks during the
sections of the turbine shafts corresponding to the first blade whole startup transient, while requiring less computational
row. effort. All models will be eventually released as a part of
A detailed first-principle model of the plant, including the ThermoPower library.
models of thermal stresses in those parts, has been de- The resulting plant models, combined with numerical
veloped and is being calibrated and tested at the time optimisation algorithms, will be used to compute the time-
of this writing. The model (see Fig. 9 for a high-level optimal transients, under the constraint that the peak level of
7601
limited number of components, which nevertheless allow
modelling a wide range of different physical components.
It should be stressed that the Modelica language allowed
translating sophisticated modelling concepts into working
code with remarkable ease. The library is available to the
public, and is open to contribution from other research
groups [6].
Some applications involving the ThermoPower library
have been reviewed, to show the potential of object-oriented
modelling in this field.
Further research work is underway to investigate the
proposed modelling principles, and their application to
control system design, in particular in the field of model-
based methodologies such as non-linear model predictive
control. As a consequence, work is in progress to extend
ThermoPower, to address new application cases, and to
Fig. 8. Controlled variable response
introduce reasonably accurate and reliable descriptions of
the control systems employed in real-world applications.
Future applications could also possibly involve less conven-
tional power generation units, such as micro-turbines, waste
incineration plants, gas turbines with external combustion,
and low-temperature organic Rankine cycles, which will
become more and more attractive as the oil and gas prices
continue increasing.
VII. ACKNOWLEDGMENTS
First of all, the authors would like to remember the late
professor Claudio Maffezzoni, whose inspiration and re-
search was fundamental in starting this work. Many thanks
go to Antonio Cammi, Marco E. Ricotti, and Francesco
Schiavo, who also worked on the IRIS plant application.
The combined-cycle plant startup project is supported by
CESI under a ‘Ricerca di Sistema’ contract.
R EFERENCES
[1] S. Mattsson, H. Elmqvist, and M. Otter, “Physical system modeling
with modelica,” Control Engineering Practice, vol. 6, pp. 265–271,
1998.
[2] H. Tummescheit, J. Eborn, and F. Wagner, “Development of a model-
ica base library for modeling of thermo-hydraulic systems,” in Proc.
Fig. 9. Diagram of the combined-cycle plant model Modelica Workshop 2000, Lund, Sweden, 2000, pp. 41–50.
[3] H. Elmqvist, H. Tummescheit, and M. Otter, “Object-oriented mod-
eling of thermo-fluid systems,” in Proc. 3rd Modelica Conference,
Linköping, Sweden, 2003, pp. 269–286.
stress which is currently attained during start-up maneuvers [4] F. Casella and A. Leva, “Modelling of distributed thermo-hydraulic
is not exceeded. This open-loop result, obtained assuming processes using modelica,” in Proc. MathMod Conference, Vienna,
Austria, 2003, pp. 514–521 (to appear in Mathematical and Computer
perfect knowledge of the model and of all its variables, will Modelling of Dynamical Systems).
represent a theoretical upper limit to the performance of [5] ——, “Modelica open library for power plant simulation: design
real-life, real-time controllers; significant results in terms and experimental validation,” in Proc. 3rd Modelica Conference,
Linköping, Sweden, 2003, pp. 41–50. [Online]. Available: http:
of achievable time reduction would then motivate further //www.modelica.org/Conference2003/papers/h08_Leva.pdf
research toward the design and implementation of such [6] The ThermoPower library system home page. [Online]. Available:
controllers. http://www.elet.polimi.it/upload/casella/thermopower/
[7] “Dymola, dynamic modelling laboratory v. 5.3b,” Dynasim AB, Swe-
VI. CONCLUSIONS den, 2003.
[8] A. Cammi, F. Casella, M. Ricotti, F. Schiavo, and G. Storrick, “Object-
The application of object-oriented methods and tools to oriented simulation for the control of the iris nuclear power plant,” in
power plant simulation have been presented in this paper, Proc. 16th IFAC World Congress, Prague, Czech Republic, 2005, pp.
We–A02–TP/25.
especially focusing on the ThermoPower Modelica library. [9] K. Krueger, R. Franke, and M. Rode, “Optimization of boiler start-up
The library has been conceived in order to emphasise model using a nonlinear boiler model and hard constraints,” Energy, vol. 29,
readability and extensibility; at present it still contains a pp. 2239–2251, 2004.

7602

View publication stats

You might also like