Professional Documents
Culture Documents
A Modular Code For Real Time Dynamic Simulation of Gas Turbines in Simulink
A Modular Code For Real Time Dynamic Simulation of Gas Turbines in Simulink
506 / Vol. 128, JULY 2006 Copyright © 2006 by ASME Transactions of the ASME
Fig. 1 Real-time simulation software interfaced to hardware control devices
authors in order to obtain a high-fidelity model for aero engines ture composition in every turbine stage.
关9兴, gas turbines for power generation 关6,7,10兴, and cogeneration The number of variables required to determine the composition
关11兴. can be reduced recognizing that the combustion in gas turbine
Compressors and turbines are modeled as volume-less ele- engines is always operated with a large excess of air and that the
ments; a capacity 共plenum兲 is introduced between these elements combustion process can be considered completed at the exit of the
in order to take into account the unsteady mass balance. The combustion chamber. Consequently, the mixtures can be consid-
burner is modeled as a pure energy accumulator. Other compo- ered in thermodynamic equilibrium and the unburned products are
nents, such as the cooled turbine module, the bleed air extraction
neglected. Therefore, for gas turbines without water or steam in-
module, the electric load module and so on, have been developed
to complete the engine model. jection, it is possible to assume that the expanding gas is com-
For all the components, the algebraic equations are arranged in posed of only two components that are mixtures of constant com-
such a way that the output values can be obtained from the input position themselves: stoichiometric combustion products and
variables without iterative calculations. In most cases, the input dilution air 关6,7兴. The composition of the stoichiometric combus-
variables are referred to the entering flow and, similarly, the out- tion products can be evaluated before running the simulation, if
put variables are referred to the exiting flow. However, in order to the fuel composition is known. Therefore, the actual composition
determine the matching between compressor and first stage tur- of the combustion gas can be identified once either the fraction of
bine nozzle or the enthalpy drop subdivision among the subsonic stoichiometric products or the fraction of dilution air is known.
turbine stages, it is necessary to take into account the pressure in In this work, the following variables have been chosen to iden-
the downstream blocks. For this reason, in some cases, a variable tify the thermodynamic properties of the working fluids: the stag-
referred to the inlet flow is evaluated as a function of the proper- nation temperature, T, the stagnation pressure, p, the mass flow
ties of the exiting flow. rate, g, and the fraction of stoichiometric products, x. The sto-
2.1 Thermodynamic Fluid Properties. Due to the high tur- ichiometric combustion product fraction x has been chosen in-
bine inlet temperature and fuel-to-air ratio that characterize mod- stead of the fuel-to-air ratio f used in Ref. 关7兴, since it seems to
ern gas turbines for power generation, the variation of the specific give a more understandable representation of the mixing process
heats with temperature and composition should be included in the in the cooled turbine.
mathematical model, not only for design and steady-state off- For gas turbine power plants with water or steam injection, the
design calculations, but also for the accurate simulations of the water fraction that is not a combustion product can be adopted as
transients. third component of the mixture.
In the model adopted in the present work, the working gas is The thermodynamic properties of the individual chemical spe-
assumed to behave as a mixture of semi-perfect gases having the cies are evaluated against the temperature using a polynomial law.
following properties: The gas constant, R, the specific heat, c p, and the enthalpy, h, of
The specific heats of the individual component gases are only
the mixture can be obtained considering the actual gas composi-
function of temperature;
The pressure of the mixture is the sum of the partial pressures tion.
of the individual gas components. 2.2 The Compressor. During the transient, the compressor
Under such hypothesis the thermodynamic properties of the module, considered as a volume-less component, is assumed to
working fluids are functions of temperature and mixture compo- behave as a quasi-steady component, so that a steady state com-
sition. As a consequence of such an approach, the mass fraction of pressor map is used. The map provides the mass air flow rate 共g兲
each chemical component is necessary. Unfortunately, in modern
gas turbines with blade air cooling, the composition of the ex- and the isentropic efficiency 共is,c兲 as a function of pressure ratio
panding gas is not constant due to the mixing of the hot gas with 共c = pout / pin兲, corrected rotational speed 共n / 冑兲, and inlet guide
the cooling air. Consequently, it is necessary to evaluate the mix- vane position 共IGV兲
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 507
g冑
␦
= f 1共c,n/冑,IGV兲, is,c = f 2共c,n/冑,IGV兲 共1兲
gcool冑Tin
pin
=K 冑 1−
⬘
pout
pin
共9兲
Such functions are numerically evaluated through interpolation on where K represents the discharge coefficient, pin and Tin are the
digitized maps. Section 3 will describe the adopted interpolation pressure and the temperature at the bleed point, respectively, and
procedure. The air temperature at the compressor exit is given by ⬘ is the static pressure at the exit of the cooling circuit. The K
pout
冋 册
coefficient is estimated on the basis of the cooling air mass flow
1 rate, needed for blade cooling at the gas turbine design point. For
Tout = Tin · 1 + 共c共k−1兲/k − 1兲 共2兲
is,c ⬘ is approximated by the
simplicity, in this work, the value of pout
value of the pressure at the stage exit.
where the specific heat ratio k is evaluated at the temperature Tm The main flow mass flow rate exiting from the splitter is evalu-
that is the arithmetic average between the inlet 共Tin兲 and the outlet ated by subtracting the cooling flow rate from the entering mass
共Tout兲 temperature. In order to avoid an iterative procedure for flow.
calculating Tout, the specific heat ratio k is evaluated using the
value of the temperature Tout determined at the previous time step. 2.5 Burner. The burner has been represented as a pure energy
This assumption does not introduce an appreciable error because accumulator, neglecting the mass balance that is instead attributed
to the upstream plenum block. The inside temperature and pres-
the temperature Tout has low influence on specific heat ratio;
sure have been assumed homogeneous and equal to the combustor
moreover, the error by the suggested procedure can be considered
respective outlet values.
negligible because of the very small time step used in real time
The equation that describes the burner dynamics is obtained
simulation. The compressor mechanical power is given by
from the unsteady energy conservation
Pc = g共hout − hin兲 共3兲 d共M ccucc兲
= ginhin + gb共hb + bLHV兲 − gouthout 共10兲
where the enthalpy values hout and hin are evaluated at the tem- dt
peratures Tout and Tin, respectively. where M cc and ucc are the mass inside the burner and the internal
2.3 Plenum. Since turbomachinery, compressor and turbine specific energy, respectively; LHV is the lower heating value of
units are considered as volume-less elements, the unsteady mass the fuel. Neglecting the variations of the mass and of the specific
balance is modeled through an adiabatic capacity 共plenum兲. A heat functions, Eq. 共10兲 can be rearranged thus obtaining
plenum is placed at the compressor outlet in order to take into
dTout ginhin + gb共hb + bLHV兲 − gouthout
account the unsteady mass balance within compressor ducts, com- cc = 共11兲
pressor discharge and combustion chamber. Other plena are dt goutc pout
placed between the turbine stages.
The flow speed is assumed to be negligible inside the plenum, where the time constant cc can be evaluated from
while temperature and pressure are supposed to vary with a poly- M cc
tropic law with exponent m. Applying the mass conservation law, cc = 共12兲
results in Kgout
A time delay CR has been introduced to take into account of the
Vp dpout flame delay that exists from the fuel injection to the heat release.
· = gin − gout 共4兲
mRTout dt Under the hypothesis of negligible variation of the mass present
in the combustor, the continuity equation gives
where V p is the volume of the plenum. The polytropic coefficient
m can be approximated by the specific heat ratio k. The energy gout = gin + gb 共13兲
accumulation inside the plenum is neglected, therefore This equation is rearranged in order to obtain the feedback signal
going from the turbine first stage to the compressor plenum
Tout = Tin 共5兲
Moreover, since neither pressure losses nor momentum effects gin = gout − gb 共14兲
are considered in the plenum, The pressure drop across the burner has been evaluated from
pin = pout 共6兲 pout = y ccpin 共15兲
This value is needed to provide the pressure datum to the com- where the loss coefficient, y cc, depending on the square mass flow
ponent placed upstream of the compressor plenum. The volume rate is evaluated by means of the value of the mass flow at the
V p influences the pressure pout variation due to the amount of the previous time step.
mass accumulated in the plenum. Using the gas state equation, Eq.
共4兲 can be rearranged in the form 2.6 Multistage Turbine With Blade Cooling. In modern gas
turbines, either “heavy-duty” or “aero-derivative,” the gas expan-
dpout gin sion is distributed on more stages, characterized by blade cooling
p = −1 共7兲 systems. Under the hypothesis that the turbine module behavior
poutdt gout
can be considered quasi-steady, the turbine characteristic curves
where the characteristic time p is given by can be used in order to estimate the mass flow parameter ⌫ as a
function of the expansion ratio t = pout / pin and the turbine cor-
Mp rected speed. Knowing the value of mass flow parameter ⌫, it is
p = 共8兲 possible to evaluate the mass flow rate across turbine as a function
mgout
of temperature and pressure at the turbine inlet
and M p represents the mass inside the plenum.
pin
gin = ⌫ 共16兲
2.4 Splitter. The compressed air extracted for turbine cooling 冑Tin
is evaluated in a module called splitter. According to experimental
data available about gas turbine cooling systems 关12兴, the air mass In order to subdivide the enthalpy drop among more stages, the
flow, is evaluated from mass flow parameter has been evaluated for each stage using the
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 509
dynamic; the second transfer function represents the fuel flow
dynamic in the fuel admission duct.
The temperature transducer has also a great importance to
achieve good results since the control device makes use of tem-
perature as an input. To obtain a good agreement with the physical
system, the temperature signal is related to the stack temperature
through the shielded thermocouple model described in Fig. 4共b兲,
following a scheme already adopted by many authors 关16–18兴.
3 Solving Method
The dynamic simulation model of the gas turbine consists of a
mixed set of ordinary differential and nonlinear algebraic equa-
Fig. 4 Transfer functions for transducers and actuators: „a… tions. In order to obtain a real time execution of the code, the
fuel system actuator, „b… exhaust temperature transducer integration of this set of equations, at each time step, must be
completed by the computer within a time shorter than the assumed
time step.
A fixed time step of 1 ms could be a reasonable value for gas
using, for this last temperature, the value obtained at the previous turbine applications in order to use the simulator in connection
time step. with control devices.
The power Pt produced by the expanding gas is given by As far as concerns the solution of the differential equations, the
small time step addresses towards an explicit solver instead of an
Pt = gin共hin − hout兲 共22兲 implicit scheme that requires an uncertain number of iterations
where the enthalpy values hin and hout are evaluated from the until the convergence has been reached. The choice of an explicit
temperatures Tin and Tout, respectively. solver requires that physical phenomena with characteristic time
smaller than the time step cannot be considered in order to avoid
2.7 Shaft Dynamic. The angular acceleration of the shaft numerical instabilities. For such a reason, for example, the inser-
joining compressor, turbine and, eventually, applied load is given tion of small plena should be carefully considered.
by the angular momentum equilibrium, depending on moment of Dealing with the solution of the algebraic equations, the con-
inertia J which includes the inertia effects of the shaft and of the straints about iterative methods make it impossible to use a solu-
other connected devices. Thus tion scheme like the Newton-Raphson one. As has been shown in
the previous section, the algebraic equations are arranged in order
d 1 to explicitly generate the output values. It will be shown that if the
= 共Pt − Pc − P f − PE兲 共23兲
dt J algebraic equations are properly ordered, it is possible to obtain
the solution by forward substitution. Supposing that the system
where Pt represents the internal mechanical power of the turbine, consists of N ordinary differential equations and M algebraic
Pc is the internal mechanical power required by the compressor, equations, the equations are arranged and sorted as follows
PE is the mechanical power required by the electrical load and,
finally, P f represents a sum of power losses due to mechanical dy i
= f i共y 1, . . . ,y N+M 兲 i = 1,N
friction, friction on the rotor disks, and power to drive auxiliary dt
equipments. 共26兲
For gas turbines with two or more shafts, Eq. 共23兲 is to be y i = gi共y 1, . . . ,y i−1兲 i = N + 1,N + M
applied to each shaft. Arranging Eq. 共23兲 in nondimensional form,
the characteristic time constant I is obtained At each time step, the differential equations are integrated by
means of an explicit scheme, thus obtaining the new values of the
dn 2
ndes first N variables. Then, through the scheme in Eq. 共26兲, the re-
I = 共Pt − Pc − P f − PE兲 共24兲 maining M variables are sequentially evaluated by forward sub-
dt Pu,desn
stitution. In other words, any variable y i is calculated as an ex-
where I is given by plicit function of the variables y 1 , . . . , y i−1 that are already known.
Most of the algebraic equations of the proposed mathematical
J · des
2
I = 共25兲 model result to be properly ordered without numerical manipula-
Pu,des tion, if they are ordered in accordance with the stream direction in
the components that compose the gas turbine model. The Matlab-
and des and Pu,des are the shaft angular speed and the turbine
Simulink environment offers the possibility of easily ordering the
output power at the design point, respectively. The power losses
equations by means of a graphical user interface 关7兴.
considered in the term P f are estimated by a loss-factor that is a
To illustrate how the solution proceeds, a simple single-shaft
function of the angular speed. This formulation has been preferred
gas turbine is considered. The model, shown in Fig. 5, consists of
to that involving the mechanical efficiencies, in order to gain nu-
the following components: compressor, plenum, burner, adiabatic
merical accuracy especially in idle condition or during the gas
turbine, and a simple proportional-integral 共PI兲 speed governor.
turbine startup when the output power is negative or zero.
The aim is to show how it is possible to deal with the matching
2.8 Dynamic Behavior of Actuators and Transducers. As between the compressor and the turbine without using an iterative
shown in Fig. 1, the real time simulation software includes the solver. The arrows in the Simulink scheme represent the transfer
models for mechanical actuators such as the fuel system, the ac- of the data values from one block to the other. Bold arrows rep-
tuator moving the inlet guide vanes of the compressor or of the resent the transfer of multiple data referred to the variables that
turbine, the actuator of the bleed valves an so on. identify the fluid properties: the stagnation temperature, T, the
The fuel system scheme proposed by Rowen 关16兴, and already stagnation pressure, p, the mass flow rate, g, and the fraction of
used by other authors 关17,18兴 has been adopted. The scheme is dilution air, x. Often, the transfer of the data has the same direc-
presented in Fig. 4共a兲 in terms of Laplace transfer functions. Two tion as the gas stream but, in some cases, since the downstream
first order transfer functions act on the input signal: the first trans- block interacts with the upstream one, one datum may be trans-
fer function takes into account the fuel valve positioning system ferred in the opposite direction to the stream one. Examples of
these feedbacks are the plenum discharge pressure p2, the mass plenum. The temperature T3 at the combustor outlet is obtained
flow rate entering the turbine g3, the mass flow rate entering the from the unsteady energy balance of the combustor. The rotational
combustion chamber g2. speed, n, is obtained from the shaft dynamics. The fuel rate, gb, is
The flow chart given in Fig. 6 shows how the sequential solu- determined from the speed governor equations. Once these vari-
tion proceeds. At each time step, the ordinary differential equa- ables are known, it is possible to evaluate all the other unknown
tions are integrated. For sake of simplicity, in this example, the quantities by substitution in the algebraic equations, as is shown
Euler scheme is considered. Specifically, the pressure p2 at the by the flow chart. It can be observed that the working point of the
compressor discharge, which is equal to the pressure p2⬘ at the compressor is determined by the values of the rotational speed, n,
plenum exit, is obtained from the unsteady mass balance of the and the pressure ratio c = p2 / p1. The mass flow rate entering the
turbine, g3, is determined, from the known mass flow parameter,
the temperature T3 and the pressure p3.
In turbines with more stages, for all the stages following the
first one, the inlet pressure is determined from Eq. 共16兲, instead of
the mass flow rate, since the pressure is necessary to evaluate the
pressure ratio in the upstream stage.
The flow chart in Fig. 6 shows that the solution has been
reached without the iterative procedure that is generally required
for the solution of the nonlinear equation system. It should be
observed that this result is made possible by means of the approxi-
mations that are applicable to real-time gas turbine dynamic mod-
els in consideration of the very short time-step. Specifically, as has
been shown in the mathematical model, the specific heats are
determined on the basis of temperature and composition evaluated
at the previous time step. To this purpose the “Memory Block,”
available in Simulink, has been used. The Simulink environment
is able to check if iterative calculations are needed to determine
the value of one or more variables: this procedure is useful also to
verify if the assembly of the components or a new component is
compatible with real-time operations.
The proposed formulation is also compatible with the
Real-Time-Workshop® toolbox, that is a toolbox available in
Matlab-Simulink environment able to automatically generate a
source code in C language from the Simulink scheme. This feature
can be useful for developing a code for hardware-in-the-loop ap-
plications.
Finally, it is useful to describe the method adopted for loading
the data of the compressor map in the computer code. This
method has been developed in order to make as short as possible
the computation time needed for interpolation and to make this
time independent from the number of points of the experimental
map. This technique, similar to the so-called “beta-lines” method
Fig. 6 Sequential solving technique for the gas turbine model 关1兴, is applied to a map in terms of nondimensional groups in
in Fig. 5 order to take into account the effects of ambient air conditions.
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 511
c,min共n兲 ⫽ pressure ratio at intersection between the chock-
ing line and the constant speed curve referred to
the speed n;
c,max共n兲 ⫽ pressure ratio at intersection between the surge
line and the constant speed curve referred to n.
In this way, the compressor working range can be represented by
a grid as shown in Fig. 7. The transformed domain 共 , 兲 results in
a uniform Cartesian grid in which is possible to interpolate, by
means of a bilinear technique, with a small computational effort.
Moreover, since the computational effort is not dependent of the
number of point of the map, it is possible to make use of very
refined map only charging the computer memory but not increas-
ing the computation time. This technique has been generalized for
the map of a compressor with variable inlet guide vanes.
4 Simulation Results
The aim of this section is to show that the code is able to
accurately simulate the dynamic behavior of a gas turbine under
Fig. 7 Computational grid for the compressor map very large load variations.
interpolation Two gas turbines for power generation have been chosen in
order to test the code: the first one is a large heavy duty gas
turbine and the second one is an aero-derivative double-shaft en-
This technique is based upon two distinct phases: the first phase gine. Preliminarily steady-state off-design behavior of the large
consists of off-line calculation on the digitized map and it is done heavy duty gas turbine has been simulated in order to show that
only once; the second phase is executed at every time step. The the nonlinear mathematical model characteristics of the code
preliminary analysis strives for obtaining efficiency in the data make it able to reproduce the behavior of the gas turbine under
extraction and consists of transforming the domain of the physical working conditions varying from idle to full-load.
variables, in which the map is defined, into a Cartesian uniform 4.1 Single Shaft Gas Turbine. In order to overcome the lack
domain. The transformation adopted in this work associates any of complete experimental data from transient tests in the open
point 共c , n兲 of the map with a point 共 , 兲 in the transformed literature, the code has been undertaken to a validation against
domain by means of the relations steady-state off-design data, by simulating a very slow transient.
n − nmin c − c,min共n兲 The experimental data given by Jansen et al. in 关19兴 concerning
= = 共27兲 the gas turbine V64.3 manufactured by Siemens have been cho-
nmax − nmin c,max共n兲 − c,min共n兲
sen. The gas turbine has a single shaft gas arrangement for electric
where: power generation 共Fig. 8兲; it consists of 17 stages axial flow com-
nmin ⫽ minimum rotational speed in the compressor pressor, of which four stages are provided of variable inlet guide
map; vanes 共IGV兲 in order to vary the air mass flow. Seven of the eight
nmax ⫽ maximum rotational speed; turbine rows are cooled, although, for sake of simplicity, only the
Fig. 8 Simulink scheme of the heavy duty single shaft gas turbine
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 513
Fig. 9 Simulation results for a slow load increase for the Siemens V64.3 gas turbine comparison of the real-time Simulink
model with experimental data by Jansen et al. †19‡, results by Kim et al. †20‡, and, finally, with the result obtained by using a
proven FORTRAN code †6‡
results obtained confirm that the small time step guarantee accu- to the simple single shaft gas turbine in Fig. 5, to the single shaft
rate solutions even adopting a first order scheme. Further tests gas turbine in Fig. 8, and to the aero-derivative engine in Fig. 11.
carried out using a previously developed simulation code making For these last two simulations the comparison between the results
use of a fully implicit solving procedure have given again results obtained by means of the Euler and the Heun schemes is given in
undistinguishable from the above described ones. order to evaluate the computational effort resulting by using a
4.3 Computer Time Performance. The Simulink scheme has higher order scheme.
been used to produce a source code in C-language by means of the The average computer time per time step has been evaluated
RealTimeWorkshop toolbox. This code has been compiled to ob- dividing the overall calculation time, measured from the start to
tain an executable program that has been tested to verify the real end of the simulation, by the number of time steps. It should be
time capability. emphasized that the computational work needed to complete the
The bar chart in Fig. 13 outlines the average single step calcu- single step is constant during the simulation and independent from
lation time measured on a personal computer based on Pentium the working conditions 共Fig. 13兲.
III® 800 MHz with a 128 Mbyte memory. The results are referred Taking into account that a time step of 1 ms was assumed and
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 515
Fig. 12 Simulation results for the double-shaft gas turbine; the subscript numbers are referred as follows: „2… compressor
exit; „3… burner exit; „4… gas generator exit; „5… power turbine exhaust gas
that the maximum calculation time resulted about 0.17 ms, it ap- set of nonlinear algebraic equations and ordinary differential
pears that the computer simulation runs 6 to 20 times faster than equations that compose the mathematical model of the gas turbine
the simulated system. This result allows us to adopt the described can be solved by means of a forward substitution procedure. The
technique in “hardware in the loop” applications, since enough mathematical model and the solving procedure are described in
time seems to remain available for data exchange through an the paper. The code is based on the object-oriented approach and
input-output interface, within the assumed time step. is realized under the Matlab-Simulink graphical environment: a
library of blocks that simulate the gas turbine components has
5 Conclusions been set up and a description of main blocks has been provided.
A novel technique for developing a high-fidelity real time code These blocks can be easily assembled by means of the graphical
for gas turbine simulation has been presented. It is shown that the interface.
The developed code is compatible with the software package
called Real-Time-Workshop toolbox. By means of this tool, a
source code in C language is automatically generated from the
Simulink model and can be compiled. This feature represents an
opportunity to modify an existing code or to realize a new one in
a relatively short time from models already tested in the Simulink
environment.
Two different gas turbines for power generation have been
simulated with a relatively high level of details. Some tests have
been carried out on the programs obtained by compiling the C
codes generated by means of the described procedure. Such tests
showed that the codes are able to provide the results in real time,
even using a simple personal computer.
The source code in C language can be also modified in order to
Fig. 13 Computer time per time step: SGT simple single-shaft
gas turbine; GT1: heavy duty gas turbine; GT2: double shaft realize “hardware-in-the-loop” applications for testing control
gas turbine; EUL: first order Euler scheme; HEUN: second or- equipments or for control embedded applications or diagnostic
der Heun scheme purposes.
Journal of Engineering for Gas Turbines and Power JULY 2006, Vol. 128 / 517