77
Undergraduate Project The numerical analysis of the miniature TurboJet engine Mathematical modeling and control of the turbojet engine using an optimization techniques Performed by: Alex Falkovich Alex Dubov Supervised by: Dr. Michael Lichtzinder Control Systems Laboratory, Technion - 2000 Book design: A. Dubov, ©2000

The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Embed Size (px)

Citation preview

Page 1: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Undergraduate Project

The numerical analysis of the miniatureTurboJet engine

Mathematical modeling and control ofthe turbojet engine using an

optimization techniques

Performed by:Alex FalkovichAlex Dubov

Supervised by:Dr. Michael Lichtzinder

Control Systems Laboratory, Technion - 2000 Book design: A. Dubov, ©2000

Page 2: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Abstract

The miniaturization is a foregoing trend in the all fields of modern engineering. Especially, it isimportant in the field of robotic design. One of the brightest examples of this is an RPV, “remotely pi-loted vehicle” . When the “vehicle” stands for an airplane, many challenges arise, because of the highlydemanding application. One of the toughest challenges is presented by the fuel-engine subsystem ofthe airplane. The amount of fuel is limited and the lack of auxiliary power sources makes the enginerestart impossible once it accidentally shuts down. The engine control system plays thus a crucial rolein ensuring the successful navigation. It must maintain the lowest possible fuel consumption, whileenabling the navigator (automatic or human-controlled) to enjoy the full aeronautic performance ofthe airplane. The control system must also ensure that the engine parameters remains within allowedlimits in all possible flight scenarios, avoiding engine surge, overheating and flame die out (overcool-ing of burning chamber). It’s needless to say, that engine dynamics are extremely complex, as theyare being governed by thermo and fluid dynamics and are affected by the various external parameters(atmospheric conditions, non-linear power load, etc.) and we hope that our project clarified a bit thedynamic phenomena taking place in the real turbojet engine.

Page 3: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Contents

I The overview of the task 2I.1 Introduction to the jet propul-

sion field . . . . . . . . . . . . . 2I.2 Get acquainted: the NPT171

turbojet . . . . . . . . . . . . . 5I.3 Model building blocks - the

equations . . . . . . . . . . . . 7I.4 The dynamic side of the prob-

lem and thrust development . . 10I.5 Fuel pump . . . . . . . . . . . . 12

II Solving the problem 14II.1 The instruments of the solution 14II.2 Prerequisites for steady-state

solution . . . . . . . . . . . . . 15II.3 Solver implementation . . . . . 17II.4 Modeling the engine behavior . 18

III Evaluation of the engine control system 21

III.1 An inverse model as a valuabletool . . . . . . . . . . . . . . . . 21

III.2 The inverse model of the engine 22

III.3 Linearization of the engine model 23

III.4 Closed loop control of the engine 25

III.5 Some results . . . . . . . . . . . 26

IV Reference information 30IV.1 Reference data tables . . . . . . 30

IV.2 Common support routines forsystem implementation . . . . . 33

IV.3 Steady-state model implemen-tation . . . . . . . . . . . . . . 39

IV.4 Pump design . . . . . . . . . . 46

IV.5 Dynamic model of the engine . 50

IV.6 Inverse model of the engine . . 59

IV.7 Linearization arrangement . . . 69

IV.8 Closed-loop engine control system 72

1

Page 4: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

CHAPTER I

The overview of the task

I.1 Introduction to the jet propulsion field

The turbojet engine was first developed 60 years ago, simultaneously in a number of countries. TheRolls-Roys company of United Kingdom is acknowledged as a first company to manufacture a turbojetengine. It was rapidly recognized to be an engine of choice for an aeronautic purposes, because itcombines the best features of the rocket and fan engines. Recently, an attempts were made to adaptthe turbojet engine for use in ground vehicles. It is used in some military machines (the Soviet T-80Uand US M1 Abrams MBT1s) and in some experimental civilian automobiles (developed by Toyota andHino Motors companies). However, in grounded use turbojet is unable yet to provide a concurrenceto the traditional internal combustion and Diesel engines.

The picture is completely different in the air. The specifics of airborne transportation impose therequirements that make a turbojet engine to be the propeller of choice for an aircraft. As a matter offact, all large airplanes and majority of helicopters are equipped with turbojets (or one of its forms).

The popularity of turbojet engines in air propulsion is attributed to the principles of flight. Heavyflying vehicles are managed to stay in the air because of the Jukovsky force: the difference in speedof two aligned air streams produces the pressure differential between them. This pressure differentialimposes force on the aircraft wing, thus preventing it from falling down (this is called a lift force). Thesame principle also lies in the foundation of the traditional aircraft propulsion method - the fan. Fanis a star shaped arrangement of the specially shaped wings. When the fan is rotated, the axial forceis developed (due to the same reasons, a lift is developed in the ordinary wing) and forwarded to theaircraft frame to allow aircraft motion. In helicopters, the static wings are not present at all, so themain rotor (a kind of big fan) develops both lift and propelling forces needed.

The are two problems arising from the use of fans. First of all, fan need to be rotated very fast, sosuitable engine is needed. Second problem arises with an increase in aircraft speed, when the dynamicsof airflow are changing and fan becomes ineffective (this happens in near subsonic and ultrasonicspeed ranges; in far ultrasonic ranges, beyond Mach 6 the problem is getting even worse, because ofhigh air drag)2. The first problem was partially solved in the beginning of twentieth century, when thelightweight, high-efficiency internal combustion engine was developed (this single achievement made

1Main Battle Tank - the designation of the primary fighting vehicle in armed forces2The Mach number is a measure of speed used in aeronautic engineering. It is the ratio between the speeds

of moving body and the speed of sound in the surrounding environment. This parameter is much more usefulthan the absolute speed values, because the gas dynamics depend on it

2

Page 5: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

airplanes possible in those times). The speed problem was not even addressed before World War II (allairplanes operated in the far subsonic speed range). However, when the airplanes load requirementsrose, the high-power internal combustion engines were found to be too bulky to be useful in aircraft.

To face the problem, a new type of engine was developed, a turbojet (figure I.1). In this engine thepropelling force can be developed directly by the air stream, without the need in wing (fan) arrange-ment. The basic type of the turbojet (such as the one, used for the current project) still have a rotor,but this can be avoided (the rotor-less engine is called ramjet). The principle of operation of turbojetengine is rather simple (refer to figure I.1). The free air is gathered by the converging inlet and directedinto the turbo-compressor. In the engine, the very dense and hot (this phenomenon is known as adi-abatic process: in the isolated system the change in one of gas parameters, here reduction of volumedue to compression, will cause the rise in the pressure and temperature of the gas, as stated by the firstlaw of thermodynamics; although the engine is not really an isolated system, it can be approximatedto it by means of certain correctives) air leaves the compressor and enters into the combustion cham-ber. The fuel is mixed with the hot air side-streams and injected into the combustion chamber. Theburning of fuel further rises the temperature and pressure of the gas (the air mixed with combustionproducts). The hot gas can be used to propel the engine, but first it must pass through the turbine,where some part of the gas energy is used to sustain the compressor and shaft attached appliances(such as alternator). Then the rest of gas leaves the turbine and produces a jet, shaped by the nozzle.The kinetic energy of jet is used for development of motive force (due to impulse conservation).

There also can be a certain derivations from this mode of operation. Sometimes, a device called“afterburner” is present in the nozzle cavity. It injects and burns an additional fuel amount in theoutgoing gas stream, producing additional heating and acceleration of the stream. While spending alot of fuel, afterburner can be very useful in fast air maneuvers, where aircraft speed is critical. Anothermodification of the turbojet is the mechanically coupled one. Such a turbojet does not produce a hotgas jet, but rather has a special turbine arrangement, so the majority of the gas energy is convertedto the mechanical energy of the rotor. This is needed in applications that demand high thrust and donot care about speed (or cannot utilize a gas jet). Sometimes such an engine has two separate shaftsand turbines, one turbine to sustain a compressor and another to drive a load. The compressor/inletarrangement is also different, because of low air stream speed. These engines are used in land vehicles,helicopters and fan-propelled, cargo airplanes (they are sometimes called turboprop planes).

Another interesting derivation of the turbojet is a turbofan engine. It construction resembles anordinary turbojet, but with one important difference: after the compressor the air stream splits. Themain stream participates in the fuel burning and drives a turbine, when the side streams are forwardeddirectly to the nozzle. Such engine develops lesser speeds than turbojet, but has larger efficiency, so itis extensively used in civil aviation (military aircraft is normally equipped with turbojets).

The close relative of the turbojet is a ramjet engine. When turbojet propelled airplanes can reachthe speeds beyond Mach 3 (especially with afterburner enabled), they cannot reach hypersonic1 speedsbecause of air drag forces. The ramjet was designed to utilize these forces to allow hypersonic move-ment. It is generally, a specially shaped, hollow tube with fuel injection nozzles. The compressionand heating of the incoming air stream is achieved by the drag forces, so the need in compressor iseliminated. The fuel burning occurs somewhere in the engine and special nozzle is used to form anoutgoing jet. The price of elimination of mechanical parts is rather high: the ramjet can operate onlyin ultrasonic speed ranges, and need the booster engine to get accelerated to the minimal workingspeed. Sometimes, the ramjet and the turbojet booster are combined into one engine arrangementwith variable channel topology.

1Speeds beyond Mach 4

3

Page 6: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

1

2

34

567

8

Our en-gine, NPT171has no afterburn-er, so the condi-tions in the zones5, 6 and 7 are iden-tical. We repre-sented the nozzleas a single zone

(designated 7).

The gas leaves turbine and expandsin the nozzle cavity (zone 5) producing theuseful work. The optional afterburner can beinstalled to produce additional temperaturegradient between zones 6 and 7 thus con-

tributing to the engine�s power output.

567

Our en-gine, NPT171has no afterburn-er, so the condi-tions in the zones5, 6 and 7 are iden-tical. We repre-sented the nozzleas a single zone

(designated 7).

T h ea i r s t r e am,

conditioned by theinlet is directed intothe compressor

(zone 2).

Inlet (zone1) capturesand shapesthe free airstream, en-gaged bythe engine.

The dense airfrom the compressor ismixed with the fuelvapours (zone 3) andburned, producing a jetstream in the zone 4.The jet stream is thendirected into the tur-bine, where the me-chanical energy is ex-tracted from the gas.

34

The dense airfrom the compressor ismixed with the fuelvapours (zone 3) andburned, producing a jetstream in the zone 4.The jet stream is thendirected into the tur-bine, where the me-chanical energy is ex-tracted from the gas.

The converg-ing nozzlecauses thedecrease ingas pressureand increasein gas speed.H o w e v e r ,the dynamicsof outgoinggas (zone 8)lied beyondthe scope ofthis work.

8The converg-ing nozzlecauses thedecrease ingas pressureand increasein gas speed.H o w e v e r ,the dynamicsof outgoinggas (zone 8)lied beyondthe scope ofthis work.

Figure I.1: The brief overview ofthe TurboJet internals.

4

Page 7: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

The ram-rocket arrangement is also worth mentioning. In this arrangement, the rocket enginereplaces the fuel injectors in the ramjet tube. The rocket gases are used to heat the ramjet stream,increasing the gas throughput of the engine. The ram-rocket to the rocket engine is the same turbofanis to turbojet. It replaces the rocket engines in the medium range rockets.

I.2 Get acquainted: the NPT171 turbojet

As mentioned before, our project dealt with a specific model of the small turbojet engine, namelyNPT171. Obviously, the mathematical model lying in the base of our work should have to be tuned tomatch the characteristics of its prototype. Thus, a set of measurable state parameters was chosen, todescribe both the plant and its model. These include pressure, temperature and mechanical parame-ters (gas flow and rotor mechanics) defined for different zones of the turbojet (as defined on figure I.1).However, the complexity of the gas dynamics laws, forced us to use a normalized parameters for themodel equations. The use of normalization greatly reduces the complexity of the excessively complexequation set.

The pressure gradientbuild-up in thecompressor is

governed by thefunction p32.

b(1,10):n2(0.5,1.2)Yp32

b(1,10):n2(0.5,1.2)Yhc

wp(0.5,5):n4(0.5,1.2)Yht

Theturbine effi-ciency (ht) is also a com-plex function of workingparameters. It can reach

the value of 86%.

wp(0.5,5):n4(0.5,1.2)Ym4

The massflow throughthe turbine isdefined as m4.

b(1,10):n2(0.5,1.2)Ym2

Themass flow

through the com-pressor and its efficiency

defined by functions m2 andhc. The maximal efficiency can

be as high, as 83%.

Figure I.2: Internal parametricfunctions governing the charac-teristics of the turbojet engine.

Some relations of the engine parameters are too complex to be written as closed-form equations,so they are defined as an empirically obtained data tables. These data tables are then translated toparameter space and interpolated to produce an approximation of the real functions (see figure I.2).The domains of these functions are limited (naturally), so the special caution shall be taken to disallowsolutions lying beyond the definition bounds (otherwise, the meaningless solutions could be found).

5

Page 8: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

The same is obviously true for some other parametersStandard atmosphere behaviour (function of height).

0 2000 4000 6000 8000 10000 12000 14000200

250

300

0 2000 4000 6000 8000 10000 12000 140000

5

10

15G104

kPa

[pre

ssur

e]

m [height]

°K [t

empe

ratu

re]

m [height]

Working agent thermal capacity

200 400 600 800 1000 1200 1400 1600 18001000

1050

1100

1150

1200

1250

1300

1350

Gas (turbine)Air (compressor)

°K

J /KgH°K

Nozzle mass flow/pressure function

1 2 3 4 5 6 7 80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

p7a

m 7

Engine surge condition

0.4 0.5 0.6 0.7 0.8 0.9 10

1

2

3

4

5

6

Surge region

m2

p 32

Figure I.3: Empirical data for engineanalysis

that can only be evaluated experimentally or in arbitraryfashion (figure I.3). The good example of the second kind ofparameter is the standard atmosphere: some values of pres-sure and temperature are defined for each given height (theatmosphere is a very complex and constantly varying system,so no one can expect the exact match between the currentatmospheric conditions and the standard atmosphere defi-nition; nevertheless, standard atmosphere is a reasonable as-sumption one can use). The semi-arbitrary data is a gas/airthermal capacity figures: they gives us a good approxima-tion, but they can not predict the exact value of thermal ca-pacity. On the other hand, the nozzle mass flow characteris-tic and the engine surge conditions shall be obtained exper-imentally.

The requirements imposed by the numeric model, forceus to translate all experimental data into the special para-metric space. This translation yields benefits that greatlyoverweight the inconvenience, caused by the abolishing ofphysical meaning from the equation system. The extra stepof translation of result vector from parametric to physicalspace is purely mechanical and does not increase the com-plexity of the model.

Before the explanation on normalized parameters willbe given, a notation issue shall be clarified. Each parame-ter is carrying multi-digit subscript, determining the envi-ronment a parameter is measured in. For example, parame-ter P04 stands for the pressure difference between zones “4”(turbine inlet bordering the combustion chamber) and “0”(surrounding atmosphere; this can also be designated by “a”subscript; this designator is also used to mark an air relatedparameters, as opposed to “g” that marks the gas relatedones). The three-digit subscript are also possible, to empha-size the complexity of certain parameters (e.g. θ454). The pa-rameter names are also chosen to follow certain guidelines,with a few exceptions. Namely, T and θ stand for temper-ature parameters, P and π for pressure ones, m and µ formass transfer, etc.

I shall also mention the constants carriyng the subscript“ref”, their derived constants and model input variables. The“ref” parameters are measured when the engine is runningin its optimal regime. The inputs to the model are mf - fuelconsumption speed (kilograms per second), Ha - workingheight (meters) and Ma - current speed (in Mach units).The model is still purely static (all derivatives are assumed to

be zero). All the empiric (data vector defined) functions are approximated by the one or two dimen-sional polynomial functions. The order of these functions is chosen to be compatible with the numberof points in the data vector. The bi-cubic splines are also used. Two-dimensional data is evaluated by

6

Page 9: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

linear interpolation (first-order polynomial). To make the matters clearer, the full definition of themodel parameters will now follow (some parameters are meaningful only upon specified domain).

The mass flow parameters are defined as:

µ2 =

ma√

T02

P02

mref

√T02,ref

P02,ref

µ4 =

ma√

T04

P04

mref

√T04,ref

P04,ref

µ7 =

ma√

T07

P07

mref

√T07,ref

P07,ref

(I.1a)

for compressor, turbine and nozzle accordingly. Their close relatives are the mechanicwork coefficients for compressor and turbine:

ν2 =

N√T02

Nref√T02,ref

∈ (0.5, 1.2) ν4 =

N√T04

Nref√T04,ref

∈ (0.5, 1.2) (I.1b)

The pressure data is also stripped of its units (we are interested in pressure changeratios, rather than in pressure values):

π2a =P02

Pa

π32 =P03

P02

π34 =P03

P04

(I.1c)

π45 =P04

P05

∈ (1,∞) π47 =P04

P07

π7a =P07

Pa

∈ (1, 7.8506) (I.1d)

Not less important are the parameters related to temperature:

θ24 =T02

T04

∆θ322 =T03 − T02

T02

(I.1e)

θ47 =T04

T07

∆θ454 =T04 − T05

T04

(I.1f)

The consideration of the notation style forces us to declare some additional parame-ters (well, actually a constants) that will contribute to the avoidance of clutter fromequation system, being redundant otherwise:

SF1 =T02,ref

T04,ref

SF2 =P04,ref

P02,ref

·√

T02,ref

T04,ref

SF3 =P05,ref

P04,ref

·√

T04,ref

T05,ref

(I.2)

Now, when we completed the overview of the mathematical foundations of the model, it’s a timeto proceed to model itself. Obviously, the matters of the next section will be based on definitions,given in the current one and on the reference information, present in the section IV.1.

I.3 Model building blocks - the equations

The conversion of parameters enabled us to deal with the engine from the point of view of muchsimpler equation system. When the plain write-down of the formulae governing the inter-engineprocesses will result in more than twenty-seven (depending on included features) non-linear, badly-behaved equations, we were able to describe the engine operation by means of five-variable1 equationsystem and certain amount of conversion functions.

1There are implied variables, but they do not affect the complexity of the estimation process; the completeimplementation of the model is found in section IV.3

7

Page 10: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Like most non-linear problems, our system lacks the analytical solution (there is no obvious wayto found it, even if it exists). As such, we must treat the solution as the optimization problem, makingan error minimum to be a desired goal. To define the problem error we need some unambiguousmeasure. In our case, the best way is to make the problem to conform the following definition:

ƒ(v) = 0 , v - vector variable (I.3)

The obvious optimization parameter for this form is the distance of the actual function value fromthe beginning of coordinates for any given value:

limvt→S

‖ƒ(vt) −0‖ = 0 , vt - trial solution, S - true solution (I.4)

Having a definition of the method, we only need to choose the variables to populate the solutionvector and to write down the proper equations for them. The variable vector is populated in thefollowing way:

v =

β special (dummy) parameter; used for data map linkage

ν4 from (I.1b)

θ24 from (I.1e)

∆θ322 from (I.1e)

∆θ454 from (I.1f)

(I.5)

The solver operates on the variable vector. However, we are not limited to the members of thisvector in our equations. For each trial value we can algebraically evaluate some extra parameters, sothey can be used in the main equation system. This is why the main equation system incorporatesmore variable literals, than there are real variables. All the extra variables are unambiguously resolvedby certain functions. Let us examine the equation system defined for steady-state model:

mf − ma · f = 0

Fuel consumption; mf - fuel influx (I.6a)

∆θ454 ƒCpg

(T04+T05

2

)(1 + f)ηm − ∆θ322 ƒCpa

(T02+T03

2

) θ24 = 0

Engine energy production at ∂N∂t

= 0 (I.6b)

∆θ322 −1

ηc

γa−1γa

32 − 1

)= 0

Compressor equation (I.6c)

µ4(1 + f) −µ2 · SF2

π32π43

√θ24

= 0

Air/gas balance (burning) (I.6d)

µ7 − µ4π47

√θ74 · SF3 = 0

Engine efflux (turbine/nozzle mass flow) (I.6e)

The vast amount of parameter names in the above equations is somewhat frightening, but the realorder of the system is five. The explanation for this comes immediately (remember: reference andempiric data can be found in section IV.1).

8

Page 11: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Certain part of our knowledge of engine behavior is defined numerically by meansof data tables (figure I.2). The two engine subsystems, represented by two dimen-sional tables are compressor and turbine. The nozzle is also simulated with an aid ofempiric function, when inlet behavior is approximated by closed form equation. Forcompressor case the derivation of these extra parameters is simple:

ν2 = ν4

√SF1

θ24

SF1: (I.2) (I.7a)

ν2, β ∈ (1, 10)→ µ2, π32, ηc by table lookup - compressor data (I.7b)

Gas thermal capacity is evaluated by means of empiric data functions for real temper-ature arguments (figure I.3 or corresponding data tables) by two functions: ƒCpa

(Tx)

for air and ƒCpg(Tx) for gas, where Tx is a temperature (in ◦K). The temperature co-

efficients needed for our equations can be found by denormalization in the followingway:

T02 = Ta

(1 +

R

2M2a

(ƒCpa(Ta) −R

)) (I.8a)

T03 = T02(1 + ∆θ322) (I.8b)

T04 =T02

θ24

(I.8c)

T05 = T07 = T04(1 − ∆θ454) (I.8d)

Ma provided to the model as an input (Mach number of the flight). Ta is evaluatedthrough the standard atmosphere reference (first chart of the figure I.3 or correspond-ing numeric data) to match the current flight conditions. R is merely a constant. Theclose relatives of the above formulae are the γ arguments:

γa =1

1 −R

ƒCpa

(T02+T03

2

)γg =

1

1 −R

ƒCpg

(T04+T05

2

)(I.9)

The γa parameter completes the derivations needed for equation (I.6c). Anothervery important parameter is denoted by f and stands for the air to fuel ratio of theengine:

f = ƒCpg

(T04+T05

2

) T04 − T03

QRηb − T04 ƒCpg

(T04+T05

2

) (I.10)

Now we has an equation (I.6b) in the fully expanded form. To proceed, however, westill need to find some turbine based parameters.

wp =

ƒCpg

(T04+T05

2

) ∆θ454

41.84Hand tuned to achieve model compliance (I.11a)

ν4, wp ∈ (0.5, 5)→ µ4, ηt by table lookup - turbine data (I.11b)

9

Page 12: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Equation (I.6d) is fully defined now. The pressure data shall now be found, in orderto evaluate the turbine/nozzle performance. First group of the pressure parameters(inlet and compressor) can be evaluated right now:

P02 = Pa

(1 +

ηdR

2M2a

(ƒCpa(Ta) −R

)) 1R

ƒCpa (Ta)

(I.12a)

P03 = π32P02 (I.12b)

P04 = π43P03 (I.12c)

The inlet pressure data allows us to find the air influx of the engine:

ma = mrefµ2P02√P02,ref

√T02,ref

T02

(I.13)

thus closing the form of the equation (I.6a) . To proceed, we still need to find thedefinitions for the nozzle parameters, to make the last equation, (I.6e), make sense.

θ74 = 1θ47

= 1 − ∆θ454 (I.14a)

P05 = P07 ⇒ π47 = π45 There is no afterburner. (I.14b)

π45 =

(1 −

∆θ454

ηt

) γg

1−γg

Turbine pressure gain. (I.14c)

π7a = P07

PaConforming to (I.1c). (I.14d)

π7a ∈ (1, 7.8506)⇒ µ7 Table lookup - nozzle data. (I.14e)

The speed of the rotor is also known now, directly answering our needs (after all, it isa model’s main goal:)

N = ν2Nref

√T02

T02,ref

(I.15)

Now we got the equation (I.6e) and the whole equation system completely described.All parameters, that were not explicitly referenced in text are empiric constants andare listed in the section IV.1 (see also equation (I.2)).

I.4 The dynamic side of the problem and thrust development

The last section derivations describe the model of the engine under strict steady-state conditions. Thisis obviously not enough for most tasks. The flight conditions are constantly changing, and so are theobjectives of the airplane. This calls for dynamic control of the engine performance, which can onlybe developed for the dynamic model of the engine.

Because of the vast amount of the various dynamic phenomena, provided by the jet engine, wewere forced to concentrate on the primary goal (disregarding the secondary ones). The primary goalof the model is, of course, the prediction of the engine’s energy production that is translated to theairplanes thrust. Thus, we took into account only one dynamic equation, based on the energy con-servation law. By assuming, that thermal energy produces the mechanical one with certain efficiency

10

Page 13: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

(just like in the any thermal engine), we were able to replace the equation (I.6b) of the steady-statemodel with the following one:

∂N

∂t=

ma

NJ(

2π60

)2 ((T04 − T05) ƒCpg

(T04+T05

2

)(1 + f)ηm − (T03 − T02) ƒCpa

(T02+T03

2

)) (I.16)

The above equations relates the change in the rotor speed (angular acceleration) to the gas flow andtemperature gradients within the engine, taking into account the moment of inertia of the rotor(known as J). We have no notion of the burning dynamics in our dynamic model. Although it isvery important to have the ability to estimate precisely the flow of thermo-dynamical processes, wehad not enough time in this work to incorporate them in the model. Because of this, we are generallyunable to trustfully predict the effects of fuel influx reduction (such as in the speed decrease maneu-ver). The burning may stop if the burning chamber is too cold to sustain it, but there is nothing in ourmodel that can indicate such condition. However, this and many other enhancements can be addedto the existing computational infrastructure of the model (see chapter IV).

The ability to know the predicted value of N (rotor speed) at any point of time, allows us to re-duce the rank of the main equation system. The ν4 parameter can be derived now by its definition(see (I.1b)), leaving us with one unknown parameter less. Obviously, we have no need in the equa-tion (I.15) too.

Now it is a time to look at the consequence of the engine work - the development of thrust. Itdepends on two primary values, the change in the speed of gas passing through the engine and themass of this gas (this is completely understandable in the framework of Newtonian mechanics, after

all[N , m/s · kg/s

]). To evaluate the thrust, we, therefore, need to find the speed of air influx

at inlet, the speed of exhaust gases at nozzle and the total mass flow through the engine (we knowit already). The speed of incoming air can also be easily evaluated (it depends largely on externalconditions within our sub-sonic speed range):

ua = Ma

√γaRTa (I.17)

The much higher speeds of gas at the nozzle force us to account for the pressure saturation phenomenain the nozzle. The parameter Pcr, critical nozzle pressure, affects therefore both thrust and gas speedat the nozzle. We can derive it in the following way:

π7cr = P07

Pcr=

(1 −

1

ηn

(γg − 1

γg + 1

)) γg

1−γg

(I.18)

Using this parameter the gas speed at the nozzle (exhaust) can be obtained:

ue =

√√√√2ηn ƒCpg

(T04+T05

2

) T07

(1 −

(Pa

P07

)γg−1γg

)π7a < π7cr

√√√√2ηn ƒCpg

(T04+T05

2

) T07

(1 −

(Pcr

P07

)γg−1γg

)π7a ≥ π7cr

(I.19)

letting us to evaluate the thrust of the engine in the straightforward way ( nearly straightforward,because of the nonlinear mechanical behavior of the exhaust gases). We will write the thrust as T

11

Page 14: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

(Blackboard “T” to distinguish it from temperature, designated by Roman “T”).

T =

{ma ((1 + f)ue − ua) π7a < π7cr

ma ((1 + f)ue − ua) + (Pcr − Pa)Ae π7a ≥ π7cr

, (Ae-constant) (I.20)

Sometimes, aeronautic engineers are interested in the so-called specific fuel consumption of theengine (SFC for short). It stands as a measure of the fuel spent for development of the certain thrust,and provides a great indication of the overall engine efficiency. We have no need in this parameter forour model (because we are working with existing engine, rather than designing a new one), but it stillcan be found.

SFC = fma

T(I.21)

The presented mathematical description still has to be animated. The search for solution is com-plicated not only because of complex mathematics, but also because of domains of definition, that aredefined for most of variables. Unfortunately, it is not seems possible, to find such a model that willbe able to account for every possible working mode of the engine, so the compromise shall be found.This was obtained by using punishment functions and hybrid solver (see chapter II).

I.5 Fuel pump

We saw, how the steady-state and dynamic models of the engine are set-up, to serve as the represen-tation of the real-world plant. However, in the real world, there are some other phenomena that shallbe accounted for. The effects imposed on the system performance by auxiliary devices can be toovaluable, to be simply discarded.

The engine is supported by two primary devices. One of them is alternator. It is driven by the mainshaft of the engine and is expected to affect certain engine parameters, such as moment of inertia ofthe main rotor. But apparently, the alternator influence is not very big and can be discarded. Thejustification for this is provided by the fact, that only 3% of the engine power output goes to theelectric energy production (engine is capable of producing 200kW of power and is equipped with5kW alternator, that rarely runs under full load). The propagation of the alternator imposed errortrough the equations generally produces value deviations that are much smaller than the assumederror margins for any given equation (see section I.4) . On the other hand, the corrections that couldbe needed to account for the alternator would cause extra complications in the solution, reduction inthe precision of the solution and increase in model computational requirements.

The case of fuel pump is not so simple. While developing the model, we assumed that fuel influxis precisely controlled and arbitrary amounts of fuel can be administered to the engine. This is nottrue in the real world, where the fuel flow is controlled by the variable rate fuel pump. In the regularvehicles, the fuel pump control is left in the hands of the human operator (the interface elementresponsible for this is often called “throttle”). In the automatic vehicle, the place of human operator isassumed by the controller (digital in our case). The centrifugal pump (the one, our engine is equippedwith) is not very simple device to deal with, but in our case the complexity of the digitally controlledpump motor adds to the task. Fortunately, we can discard the power drain of the pump (few hundredsof watts make no difference to us). The fluid dynamics of the pump turbine are also can be reduced tothe simple relation. The only dominant dynamic characteristic is provided by the pump motor, thatbehaves as a first-order system with respect to rotational speed (just like any other DC motor).

The pump parameters are hand-tuned. The numeric control input of the pump is denoted by thevariable Pff. There are also two intermediate parameters, Spp and Q that are used for clarification of

12

Page 15: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

pump mathematical model. The τ variable stands for the time constant of the pump. The steady-statemodel is actually somewhat complex, but one-to-one and nicely behaved non-linear function:

Spp =

0 0 < Pff ≤ 750

2480(

Pff−7502750

)0.485750 < Pff ≤ 3500

302.4 + 0.6222Pff 3500 < Pff ≤ 8000

(I.22a)

Q =−2.5 · 106 +

√6.25 · 1012 + 1.1487393 · 108 · Spp

4437(I.22b)

mf = 0.00101Q (I.22c)

The considerations of the pump dynamics imposes us to insert time dependent behavior into theequations. The first order approximation of the pump motor will result in the simple integral stagewith unity feedback:

Lout =τ

s + τ· LSpp Laplace domain representation (I.23a)

∂Spp

∂t= 1

τ

((t0)Spp − (t−)Spp

)Time domain representation (I.23b)

The above equations are not, strictly speaking, linear. The time constant of the pump is not con-stant, but depends on the current value of the pump control input. This is probably happens becauseof viscous load the pump motor experiencing (the pump rotor moving the fluid).

τ =0.2

1 +Pff

2609

(I.24)

The pump implementation, as a hybrid MATLAB/SIMULINK program resides in the section IV.4.Sometimes, it can be handy enough to consult an implementation, rather than try to figure things outof explanation.

13

Page 16: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

CHAPTER II

Solving the problem

II.1 The instruments of the solution

As already mentioned, the essential tool for the numerical analysis is a solver. Generally speaking, thesolver is a software system used for finding the solutions of equation systems (it’s not really matterwhat kind of equations they are: linear, differential or some other kind; the only requirement, thatthese equations must be computable for any trial values of variable in the domain of definition). Thesolver, therefore, is constructed from two algorithmic parts. One is used as a convergence test (howclose are we to the solution), and the other is responsible for intelligent guessing of next trial value.There are also analytical solvers that utilize a different approach. They are trying to find a closed-form analytical solution of a symbolic form representation of the problem. Such a solver is used for aprocess called “automatic theorem proofing”, and currently is more of academic interest, than of realutility.

This leaves us with the “trial-and-error” solver as an only alternative. All of them require the abilityto recognize the solution, when we come on one at some stage of the process. Given that the numericprocess produces exact values only occasionally (say, when the solution is rational number with certainbase, in our case binary), this really means, that we must recognize the areas of sufficient proximity tothe solution. The problem becomes, really, an optimization one, normally known as “goal attainmentprocess”. This means that we must choose such trial value vt, that given a true solution S and equationsystem (model) ƒv the following will be true:

‖ƒ(vt) − ƒ(S)‖ < tol. ,

where “tol.” is a certain tolerance value chosen from the considerations of the computational timeand precision of underlying numerical system. Fortunately, our problem is nice enough to provide uswith an acceptable criteria for the convergence.

The trial algorithm is the another important part of the solver. The trial solutions can be foundstatistically or functionally. The pure stochastic techniques (Monte-Carlo method) do not provideus with the deterministic expectancy of the convergence time, so they are useless for us (we musthave a reasonable indication that current trial path is leading to the solution). Normally, Monte-Carlomethod is used when nothing else seems to work, and this is not an our case. The statistical search treealgorithms (genetic or thermodynamic, “particle hopping” algorithms; there are also ultra-modern“quantum” algorithms that work in a similar way ) could possible do the great work for us, but thedifficulties are great (at some point of our work we tried the genetic solver). First of all, genetic solver

14

Page 17: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

requires an elaborate utility function to be defined for the model, to guide it through the “evolution”trees. Second, the initial representation of the problem (starting “population” of the problem) affectsgreatly the computational time, and there are no good ways to choose this initial representation. Thebottom line is that genetic solver and its relatives have enormous computational requirements (ofsupercomputer class order), and these were impossible for us to provide.

The gradient algorithms are the resort for computationally limited environments, such as ours.The family of quasi-Newton algorithms (provided by MathWorks MATLAB®) is the modern approachto the gradient solution method. The observer is found for the function under investigation. Thenthe steepest gradient is found for the observer (it is chosen to correctly represent the curvature in-formation of the original function). The gradient is followed down to the next trial point, wherethe observer is updated to match the original function again. This process is much faster, than thetraditional Newton-type methods, which require the searching of original function gradients (a verydifficult task for a complex functions). The observer of the quasi-Newton method is therefore used toreduce the general optimization problem down to the quadratic one (that is relatively easy to solve).The only problem that can arise is the inability of the search algorithm to find a good observer on thecertain stage of the solution (this may happen because of local discontinuity in the parameter space orbecause of degradation of the curvature information in the “plateau” regions). In this case the solverwill fail to converge and shall be aborted. Sometimes, however, the algorithm will be able to detect theloss of convergence and will abort automatically, producing the unwanted, local solution.

To overcome this difficulty, the gradient solver must be backed up by the some form of non-gradient, fault-free solver. The simplex solver (provided by MATLAB) is ideal for this role. It usesonly direct function evaluation to estimate the solution, so the discontinuities present no problems.The term “simplex” stands for n-dimensional polygon (n being the rank of parameter space; in two-dimensional space the simplex will be a triangle, in a three-dimensional one it will be a tetrahedra)that is constructed in the parameter space around the initial trial point. Given a polygon is sufficientlylarge, the solution will lie inside it with a large probability. The simplex algorithm then tries to con-struct a new vertices inside the polygon, to replace the original ones (while checking the convergenceof the polygon’s center of gravity to the solution point). The polygon, thus, is continuously shrink-ing with each iteration, until it becomes smaller than the solution tolerance envelope (the algorithmsucceeded) or the convergence stops (the algorithm failed; new initial value is needed). The simplexalgorithm does not use any gradient information, so we may expect it to find only the local solutions.However, the resulting simplex is an excellent designator of the possible solution region, to be searchedfor solution by gradient solver. The tandem of the gradient and simplex solvers can be said to be a hy-brid solver with much better properties than any of its parts. Our problem clearly belongs to the classof large scale optimization problems that generally require a special ways of solutions, so the hybridsolver is the much needed tool. Our custom design may be superseded by more advanced techniques,but the use of them depends on much wider theoretical background than we have at this moment.

II.2 Prerequisites for steady-state solution

We know that some arbitrary set of engine parameter values is valid (corresponds to some real phys-ical state of the real-world plant) if, and only if all the equations of the system (I.6) are satisfied.This is obtained by finding a certain value vector (called the solution vector), which, when sub-stituted into the equation system, will make the equalities valid. The process of finding the solu-tion vector may be called the solution of the model (this is mathematical meaning of the term; itis not very valid in the physics, because the values that did not satisfy the equalities are not sup-posed to exist). Just as explained above (section I.3), we work with rank five, nonlinear system, with

15

Page 18: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

(β, ν4, θ24, ∆θ322, ∆θ454) (see (I.5)) parameters being the variables. To comply with the defini-tion of the optimization problem, the equation system and all the parameter resolution functions aremerged together and coded into one solid function, that takes the variable vector as its argument andreturns the vector of its left-side values:

ƒm(β, ν4, θ24, ∆θ322, ∆θ454) = (v1, v2...v5) (II.1)

The obvious desire here is to keep all vn values as close to zero as possible. The values of exact zeroare desired (clean solution), but this is not practically achievable, because of semi-empiric nature ofsystem definition.

The formulation of the optimization problem is complete now. We have both the function to beoptimized and the goal to be reached. But before the solver can be applied, few problems must beresolved. One problem arises from the fact , that our problem belongs to the class of multi-objectivegoal attainment problems. This means two things:

• The order of value and the speed of convergence of any of the system equations is different fromthe other ones, so we can’t treat them in the same way in the optimization criterion.

• The better convergence of some equations can tamper or prevent the convergence of the anotherones. This calls for some sort of compromise in the solution (we shall allow larger error marginof some variables to achieve over-all better results).

There are few methods of handling this specific problem, the simplest of all being weighted summethod, which we’ve chosen. The MATLAB provides some more elaborate algorithms for multi-objective optimization, namely ε − Constraint method. Although being more powerful than theweighted sum, ε − Constraint method requires the separation between primary and secondary ob-jectives, and this could cause a severe analytical problems in our model. The further investigation ofthe problem revealed that there is no need in the direct weight adjustment. The penalty function (seebeyond) was coded in the way to provide implied convergence control for different variables, allowingus to use a simple Sse1 as an optimization criterion.

Sse =∑

i∈(1..5)

i ƒ2m (v) (II.2)

Another primary property of our problem is it being a constrained problem. Majority of parame-ters have finite region of existence. However, our problem is physical only at the point of solution, sowe are free to do anything with the solution trajectory at any of the intermediate points. This has bothgood and bad implication. The worst thing is that we cannot use standard MATLAB algorithms forconstrained problem solving, because these algorithms are trying to keep there trajectory inside thedomain of definition all the time. In our case, it is possible that trajectory connecting the initial valuepoint with the solution without leaving the domain, simply does not exist. So the only thing we can dois to extend the domain of existence of all parameters indefinitely, actually removing the constraints(this is a good thing). The values beyond the domain of definition are produced by penalty functionswe chosen. The steepness of descending slope of penalty function is adjusted to guide the gradientsolver (when applied) back to the original domain of the problem, given each penalty function hasdifferent descent speed. The descent speed is adjusted by means of linear gain coefficient, that servesas the equalization (weighting) coefficient at the same time (see above). The general form of the scalarpenalty function of some parameter is:

p ƒm = ƒm +Kd (p − Co) (II.3)

1Sum of squared errors

16

Page 19: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

where p being offending parameter, Co - value centering offset and Kd - penalty gain. The certainarrangements were also made to prevent generation of the imaginary or negative variable values thatare impossible. The penalty on appearance of such a value is severe - the absolute value of the entirevalue vector of the equation system is multiplied by the maximum penalty constant and returned tothe solver, causing the assured trajectory drop (solver will switch to the more robust method in attemptto find new solution trajectory. The possible detachments from the two-dimensional domains givenby the engine maps are treated in the same harsh way (failed map look-up will produce NaN in thevalue vector, thus triggering the strongest penalty).

II.3 Solver implementation

As already mentioned, the solver itself is heterogeneous, utilizing two distinct methods of estimation.Simplex solver is used in difficult places because of its robustness. The rest of the solution is performedby quasi-Newton solver with adaptive direction finding algorithm. Gauss-Newton direction findingmethod is used most of the time, being backed-up by Levenberg-Marquardt algorithm. The reasonfor it is that Gauss-Newton (or linear least-square) approach does not handles well badly convergingfunctions. It counts on the assumption that the error vector becomes sufficiently small when the op-timum point is approached and this is not necessarily true in our model. The problem is partially dueto the disturbances injected by penalty functions. The Levenberg-Marquardt method can sometimeshelp, because it chooses to follow the direction obtained as cross-product of least-square error direc-tion vector and steepest descent path (which is followed only by naive and greedy algorithms). Thesimplex solver is known in MATLAB as fmins ( fminsearch in newer versions), when the adaptivegradient solver is called fsolve. The semantics of function calls is somewhat different in these twosolvers. The intended use of the fsolve is non-linear equation solving and we are using it accordingly.The fmins, however, is an optimization function, so it is used to modify the initial value vector for usewith fsolve, in order to allow the nice convergence of the equation system solution.

To control the operation of hybrid solver, some sort of algorithm shall be devised for switchingbetween optimization methods. We used an error threshold function for evaluation of solver per-formance. In addition, solvers had limited number of iterations for each run to avoid needless com-putations. The highest level loop of the hybrid solver is bound only by the error value (no iterationlimit), because we expect it to converge in any allowed case. If it fails to do so, the human operatorintervention will be unavoidable, so there is no need in automatic provisions at this point (they canbe added, if the problem will demand so). To further clarify the picture, we will use the pseudo-codegiven as Algorithm 1.

The convergence is evaluated by implied threshold function, that uses two error values as indica-tors. They are written as Msse0 and Msse1 with values of 10−6 and 10−4 accordingly (e.g. low andhigh error margins). On the first iteration of algorithm arbitrary initial value is used and solutionis attempted by the gradient solver (Matlab function fsolve). If the guessed initial value was goodenough, the found solution will be below the low error margin, so the algorithm exits successfully.Otherwise, the simplex solver is activated (Matlab function fmins), using an output from the gradi-ent solver as a new initial value. Afterward, a gradient solver is run another time with reduced iterationcount, starting with just found solution to obtain another (better one). In other words, possible solu-tion area, found by simplex algorithm is then rescanned for good, smoothly descendant gradients thatcan lead to the global solution point. If, after all this effort, the solution is still above the error margin,the algorithm repeats itself, having the found solution fed back as the new initial value.

The initial value greatly affects the performance of the solver. If it is bad the solver may exercisemany thousands of iterations in the outer loop before the convergence. This happens because of

17

Page 20: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

hidden effect of penalty functions that are present to ensure the convergence toward the domain ofdefinition. Whenever the direction finding algorithm of the solver hits the penalty value, it jumps(because the chosen direction fails to be an optimal one), so more iterations are needed for solver torelax (this is very much alike a dynamic processes, but we are not interested in dynamics of solutionprocess in this work). However, when following a good dynamic trajectory of the engine, when thenext solution lies not far from a previous one, only few dozens of iterations are needed in the innerloop, so the whole solution takes a second or so, depending on distance between old and new workingpoints.

Algorithm 1 The hybrid solver for steady-state engine model

1: Msse0 := 10−6, Msse1 := 10−4 {Error threshold values - constants}Require: Msse0 < Msse1

Ensure: SSEfinal < Msse0 {Final error tolerance}2: vt ← [arbitrary] {Set arbitrary values to be a trial solution}3: SSE← maxMsse1, Err

(~ƒ(vt)

){Calculate initial error value}

4: while SSE > Msse1 do5: SolvIterLimit := 200 {Sub-solver iteration limit state variable}6: vt ←fsolve

(~ƒv, Vi = vt

)7: SSE← Err

(~ƒ(vt)

)8: if SSE > Msse0 then9: SolvIterLimit := 400

10: vt ←fmins(~ƒv, Vi = vt

){We shall try to re-form the initial value using the simplex

estimation}11: SolvIterLimit := 100

12: vt ←fsolve(

~ƒv, Vi = vt

){Using the new initial value, we can resume the solution

process}13: SSE← Err

(~ƒ(vt)

)14: end if15: end while16: SSEfinal ← SSE

17: [EngParams] ←out_par (vt) {Valid parametric point found for current engine conditions(implied)}

The live implementation of this solver is given later in this text (chapter IV). Solver algorithmresides in the file stat_eq.m, while problem definition and penalty functions are defined by theequations.m. The information on the rest of the system (engine state calculations, etc.) can beobtained from the source code in the vicinity of these files.

II.4 Modeling the engine behavior

The steady-state solution is extremely valuable, for it enables us to predict engine’s working point forevery possible occurrence, given a meaningful flight speed, flight height and supplied fuel volume areprovided. However, a real problem is to predict, trustfully, the dynamic behavior of the engine. Fora long time, this point was not extensively accessed by the aeronautic engineers because of inherentcomputational complexity of such a task. Nowadays, when the computing power is cheap enough,

18

Page 21: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

the engine dynamic behavior can be assessed numerically with relatively small effort. This allowsus to design more rapidly responding controllers, pushing the airplane flight performance towardthe maximum. The dangerous dynamic phenomena, such as surge, stall and stagnation that had to beavoided by human operator, acting between increased safety margins, can now be left to the automaticcontrol unit.

To make this possible, few prerequisites shall be met. The most important of them is the simulationspeed. Not all the parameters of the engine can be measured directly, so the dynamic model can actas a much needed predictor for these parameters. But to use this information in real-time control,we must ensure that the information is obtained from the model at least as fast as it is obtained fromthe engine or even faster, to compensate various delays. Unfortunately, our model is too slow for this(1:60 ratio of simulated to real time), but with proper software (and hardware) engineering it can bemade much faster. The effects of software design cannot be easily neglected.

We shall also make the choice of what shall

0 0.005 0.01 0.015 0.02 0.025 0.030

5

10Initial solution points for dynamic model

0 0.005 0.01 0.015 0.02 0.025 0.030.5

1

1.5

0 0.005 0.01 0.015 0.02 0.025 0.030

0.5

1

0 0.005 0.01 0.015 0.02 0.025 0.030

0.1

0.2

0 0.005 0.01 0.015 0.02 0.025 0.030

0.5

1

Dq45

4Dq

322

q 24n 4

b

fm.

fm.

fm.

fm.

fm.

Figure II.1: The working point is known in terms ofbasic parameters for given fuel influx

be simulated. Because of the complexity lim-itations, we used the minimal feature set (seesection I.4). Effectively, we assumed that onlythe fuel influx is changing dynamically (and soall values derived from it: thrust, speed of ro-tor and temperature), when Mach number andheight remain constant during the maneuver.There are also some other phenomena, that wehave neglected. Even with all these simplifica-tions, the problem remains sufficiently prob-lematic (mostly due to the fact that we can’tavoid the use of multi-level optimization). Suf-ficiently high speed of simulation is needed, tomake a model usable for control system tun-ing, so the sacrifice is justified. Real-time per-formance is desired, to make the system usablein hybrid simulations (the set-up, where thecontrol system is real and plant is simulated;because of high running costs of turbojet en-

gines, it is an extremely valuable technique). It can be achieved, probably, only by careful softwaredesign.

The dynamic model itself is implemented as Mathworks SIMULINK® model (full implementationreference can be found in section IV.5). The fuel pump is defined as a distinct subsystem, with behaviordefined by (I.23), having Pff parameter as an input and mf as an output. Because of its black-boxbehavior we can forget from it for a moment. The heart of our model, equation (I.16) comprisesthe design of the dynamic simulation. Left part of it is evaluated by solving the relevant subset of theequation system (I.6) (see section I.4). The finite step integration is then performed on the obtainedresult, by means of variable step trapezoidal summation (MATLAB provides a family of integrationroutines for this purpose). The only thing we need to do now is to fed the sum (an integral) back to theleft side solver to complete a simulation step. The finite difference time range is chosen automatically,according to tolerance limitations.

Anyway, the primary bottleneck of the simulation is the solver algorithm, that suffers both frominefficiency (in its current implementation) and from the poor convergence of the problem. The needto invoke the solver on each integration step makes this problem even more heavy weighted. To assista solver, the database of initial value vectors was created. The steady-state model allowed us to find

19

Page 22: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

the data values sufficient to populate the initial solution vector (see (I.5)) for any given fuel influx(figure II.1). These values are normally close enough to the real ones on any step of the dynamicsimulation. The solver, therefore, can converge quickly to the solution, thus reducing the time neededto perform one integration step. The desired solution, of course, is to find a fast observer for each ofthese parameters, to predict their static and dynamic properties. This can relief us from the need to runthe solver each integration stem, but the development of such observer can be a very difficult problem.To make an observer both fast and precise, some non-traditional technique is required. Adaptive fuzzyset or some sort of neuron network (Kohonnen map or something similar) could, possibly, fulfill thetask, but separate full-scale work will be needed to make this happen. The widespread belief that thegrowing sophistication of the hardware will tolerate the dumb way of doing things is not probablytrue, so great deal of effort is required to build an elegant and fast solution for the problem.

20

Page 23: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

CHAPTER III

Evaluation of the engine control system

III.1 An inverse model as a valuable tool

The inverse model of the plant is one of the powerful allies of the control systems engineer. In manycases, the mere confidence in the existence of it enables one to proceed with control system design. Butthe finest control is possible only when such a system is existent and known, for it is the basic blockof the vast family of observer-based controllers. Even when not used directly, the inverse system canreveal us a lot of useful information about the plant, so the effort of finding it is, certainly, justified.

Two questions shall be asked: whether the inverse system exists at all, and, if yes, how it can befound. In linear system theory the answers are clear, but for the general, non-linear case both of themare problematic. We decided to assume that inverse system exists for our model if it can be found inthe predefined time. This is the generally workable assumption, because of our computational andproject time restriction. Should we failed to find the inverse model in the allocated time, it will nothelp us to know that it exists nevertheless. Anyway, we were lucky enough to succeed.

Following the divide and conquer principle we separated our model into its two natural compo-nents: fuel pump and the engine itself. The fuel pump has a relatively simple representation, so wecan discuss it right now. The input to the inverse pump model is the expected mf and the output is acorresponding Pff. Because there is only one linear operator (namely an integral) in the pump modelit can be replaced in the rather straightforward fashion by its complementary operator (differential).This, however, is not enough to estimate the inverse dynamic behavior of the pump, because of thevariable time constant, the forward pump model possess. Another problem is an ambiguity of thetransient response values. This happens because the inverse model is only defined for band-limitedinputs (the forward model has a low pass filter like characteristics; see section I.5). To resolve theambiguities, the valid solution region should be found for any input value, and the best way to do it isto use a simplex1 solver.

The inverse pump model is composed from two parts. First of all, we must find the inverse map-ping from mf to Spp and then from ∂Spp/∂t to Pff. This operations correspond to the forwardmodel mappings of equations (I.22c)+(I.22b) and (I.22a). The derivative is the inversion of the in-tegral operator from equation (I.23). To obtain a match between forward and inverse model, theforward model is consulted on each simulation step. To be more precise, the following steps are takenby the inverse model to find a solution:

1It is explained in section II.1

21

Page 24: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

• The inverse model assumes an average Spp value. It is passed through equations (I.22c) and(I.22b) to obtain a guessed mf. The assumed value of Spp is then adjusted by the simplexsolver (few refinements of the solution may be needed sometimes) and the new value of mf isobtained. The process stops, when the guessed value of mf is close, to the given extent, to theinput supplied one.

• The differentiation follows. Now we have both guessed Spp and its derivative. The derivative ispassed through an amplitude limiter (saturation), to limit a slew rate of the guessed Spp (thisis needed to match a low pass capabilities of the forward model).

• The search for Pff is done in the fashion, similar to search for Spp, but with certain refinements.The Pff value is guessed and then passed through equation (I.22a) of the forward model. Thesimplex solver is used to search for the proper Spp value. However, there exists a penalty func-tion, needed to ensure that the obtained Pff will not leave the definition bounds - (750, 8000),because such Pff value will be useless. Not less important is the speed constant compensa-tion. If the derivative of Spp differs from zero, the trial value obtained from the forward modelshall be shifted by

[−τ(Pff)

∂Spp∂t

](τ(Pff) is defined by (I.24)). It seems that piecewise, first order

approximation is sufficient to approximate the inverse model of the pump.

The same principles were applied to the engine model, to obtain an inverse model of the engine.In our case, there is only one dynamic equation, so the inverse model of the engine is much alikethe inverse pump model. However, more precise dynamic model (one, incorporating more dynamicrelations) will be much harder to invert. This point shall be further investigated.

III.2 The inverse model of the engine

The inverse model proposed for the engine, follows the same guidelines, as already discussed pumpmodel, but with some important differences. As already mentioned, the fact there is only one dynamicequation makes a life much more easier. The input to the inverse model of the engine is a parameterN - rotational velocity of the rotor. It is also a main variable of the simplified dynamic model we areusing (section I.4). The ordinary differential equation (I.16) governing the time behavior of the modelcan be therefore reduced to the algebraic form, because N is an input value and N can be obtainedanalytically (given a closed form definition of N is available). Another way to obtain N is to use finitestep differentiation of N. We used a first approach, because our primary use of inverse model was inlinearization of forward dynamic model by GIDF1 method.

Additionally, there are many outputs from the inverse model (the primary being mf, but all of theengine state parameters shall be evaluated), so the elaborate solution apparatus must be used. Because,the inverse model does not contain any time differentials, it can be dealt in the same way, the forwardsteady-state model was (section I.3). Apparently, the same solver algorithm (see section II.3) could beused, with minor adjustments. The only problem was the adaptation of equations.

It was found that equations (I.6c), (I.6d) and (I.6e) are not affected by the change of model ob-jective. This change allows however, to compute a certain parameters directly by their definitions(section I.2), avoiding the need to introduce additional relationships. The new objective itself is givenby the following formula:

∂N∂t

NJ(

2π60

)2− ma

((T04 − T05) ƒ

Cpg

(T04+T05

2

)(1 + f)ηm − (T03 − T02) ƒCpa

(T02+T03

2

)) = 0 (III.1)

1 General Input Describing Function

22

Page 25: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Resolution of the secondary parameters is done in the ordinary way. The precedence of parameterresolution is changed, but in the trivial way. We have no need to treat this topic here, because allaffected parameters can be one-to-one mapped through nice algebraic functions. The only non-trivialchange is the calculation of mf that became an output. To be more precise, ma shall not be explicitlycalculated now, but instead it is a variable of the (III.1). The mf is then found by application of (I.6a)in its algebraic form (it has no unknown parameters right now).

The penalty functions for the solver were also modified to reflect the change in optimization goal.The general form of them remained intact because of the similarity between the forward and inversemodels of the engine. This is understandable, because our inverse model corresponds to a singleargument pair in the full state vector of the engine. Only one penalty function was added, to trap anmf parameter within its domain of definition.

Our inverse model suffers from the same performance problems, the forward model has. Thisis not surprising, because it has a deal of structural similarity with its forward counterpart (inversemodel is fully annotated in section IV.6). So, it is problematic enough to use it as a predictor for real-time control system. We used the inverse model exclusively for linearization purposes (section III.3),so no special performance constraints were needed. But later, it was found that control loop of theengine cannot be closed effectively, without the consideration of µ2 and π32 parameters. Both theseparameters are extremely difficult to obtain directly. The pressure parameter pi32 can be measured(at least theoretically), although no-one will install a manometer inside the burning chamber of theengine (the design complications will be too problematic). Mass flow (µ2) cannot be measured at allin flight conditions (only on the lab stand), so we are in trouble here. The only way a controller canbe made viable, is the use of inverse model to predict the missing parameters from the measured valueof N. The further work on performance enhancement may include the analytical reduction of theinversion problem, because we have no need in estimation of full state vector. The hardware imple-mentation of the inverse model can also be considered; a continuous signal electronic implementationis very interesting. Non-linear, semiconductor-condenser-solenoid circuit, tuned to provide an exactdynamic behavior of the inverse engine model overcomes both the precision and speed problems ofthe digital approach. There are, however, a large amount of another possibilities.

III.3 Linearization of the engine model

Needless to say, a linear control theory is a much more convenient framework for control systemsdesign. There is no framework, actually, for the general non-linear problems. So the only way for usto conduct a controller design is to relate, somehow, our control problem to the linear theory. Thiscan only be done by linearization of certain sort. Although, there always is some hope from the sideof stochastic methodology, the linear systems are still much nicer.

But what method shall we choose for linearization? The ordinary, first-order, Taylor series ap-proach is obviously inadequate for our model. Our model has no isolated equilibrium points, but hasplenty of continuous solution regions, local extrema and plateaus. The analytical expansion and dif-ferentiation of model equation is also nearly impossible task. An only resort is to find the describingfunction of the model by numerical means. Unfortunately, a well known SIDF1 seems to be poorlycompatible to our problem. Step input describing function can be considered, but it introduces abunch of numerical problems in the model, because of it unlimited bandwidth and bad derivatives.The use of band-limited step response is a good solution for this problem. Using a linear control

1Sinusoidal Input Describing Function

23

Page 26: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

theory notation, the band-limited step function looks like this:

St =

{a − (a − a0) exp

(t0−t

τ

) sin((t−t0)β/τξ+θ)sin θ

t > t0

a0 t ≤ t0

(III.2)

β =√

1 − ξ2 θ = arctan (β/ξ)

In the above equations, a and a0 are the final and initial step amplitudes, t0 is a jump time, ξ and τ

are the damping and time constants of the band-limited step function, and t stands for running time(as usual). This formula works well for both rising and falling jumps. But negative time ( relative tot0) can present a slight continuity problem. We are handling it explicitly, assuming that before t0 stepfunction has a constant value for indefinite time.

The band limited step input is the only form of input available in our engine control system.Control signals are optained by the RPV on the discrete basis, in form of the value series. RPV controlmodule, acting like a zero order hold for our purposes, produces a staircase function with a sufficientlylow sampling frequency. Fuel pump (it is an integral part of the system for linearization purposes),acting as an low pass filter (section I.5) will take care of excessive bandwidth of the staircase control sig-nal. So the engine, at any time, exposed only to the signal of equation (III.2) or to some combinationof such signals. A describing function, we’ve chosen, is therefore sufficient for our task.

The linearization itself was conducted by the optimization process. We assumed, that the N valueof the engine will be changing in a way similar to equation (III.2). The tuning constants for thisfunction were chosen in accordance with timing and error constraints, demanded from industrialcontrollers, available for our engine. Using an inverse model, the expected Pff behavior was obtainedfor number of control situations. The index of data files with a relevant data specified can be foundelsewhere in the reference part of this book (section IV.7). Each data file can now be dealt separately,for it contains all the data needed for local area linearization of the engine model.

With an aid of MATLAB function lsim we were able to define an optimization criterion for the lin-earization problem. A linear transfer function object was constructed by MATLAB program, with pre-defined order and pole/zero locations. Linear function was expected to yield the predefined N valueswhen run with Pff values obtained from the inverse model. The squared distance between the originaland trial N vectors is an optimization parameter for this problem. When they are close enough, thesolution is found. Because there is no chance to obtain exact match between low-order linear functionand the original non-linear model, simplex solver was used (MATLAB function fmins). Its abilityto designate solution regions was extremely valuable in this case. The visualization of this process ispresented on figure III.1.

We tried few possible configurations for the linear transfer function of the engine. It was foundthat in most cases engine behavior can be faithfully predicted by the first order transfer function (withvarying coefficients, obviously). It has an error margin of up to 10%, but the total error margin ofthe model is not much lower than this. First order function, however, is unable to provide us withinformation on instability regions of the model (it is stable by definition). Third order approximationis redundant for it trades the imaginary precision for valuable computational time. We can hardlybelieve that the linear model can provide us with nearly error-less prediction, while claimed errormargin of third order system is less than 1%. So, the second order system was a natural choice for us.We used a transfer function of the following form:

H(s) = k1 + s/z1

(1 + s/p1) (1 + s/p2)(III.3)

24

Page 27: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Nassumed

Inversemodel

Pffpredicted

Triallinearmodel

Err Simplex estimation

Assumedbehavior

Estimatedcontrol input

Proposed N

Estimationerror

Triallinearmodel

Figure III.1: The linearization of the engine model by optimization process

The performance of the linear model was excellent, but limited to the very narrow domain. All thecoefficients of the linear function are varying, depending of working conditions and model input.Because there is no good way (at least, we don’t know one) to predict them analytically, so stochasticmethods must be used. Kalman’s filter is an excellent device for dealing with such systems and its useshall be seriously considered in future work.

III.4 Closed loop control of the engine

The main goal of control theory is to provide a mean of enforcing our will upon a certain plant. Theprecision of control and stability of the overall system are of greatest importance. Our intention wasto design a controller that will allow us to conduct a speed changing maneuver (speed increase only,because of certain limitations of our model) as fast and precise as possible. This shall be done withoutendangering the engine and the airframe of RPV. The danger comes mainly from three sources:

• Large overshoots of the engine output (rotational speed and thrust) can cause an excessiveshocks in airframe and in the engine structure.

• Engine overheating has its obvious problems, mainly inflammation danger and material break-down.

• Engine surge is the most exotic and most problematic effect having catastrophic consequences.If engine is allowed to enter its surge region, the structural breakdown can be inevitable (becauseof vibrations and mechanical overload caused by the disrupted gas flow).

The overheating can be dealt without much problems. We simulated the thermal response of theengine by the inertial (first order) stage, attached to T05 output of the plant (the temperature of theturbine exhaust gases). In most cases, the engine entered the surge region before the overheating be-came dangerous, so no special treatment (like close loop measurements) was needed for temperaturecontrol. Therefore, only two control loops was needed: one for main objective (rotational speed con-trol) and another for surge prevention. We agreed on following inputs to the controller: No (currentengine velocity), ∆N (velocity error, Nr − No, Nr: required velocity) and surge proximity (givencurrent values of µ2 and π32 it can be found; consult bottom chart of the figure I.3).

25

Page 28: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Controller architecture presented a different problem. There are generic ways to deal with non-linear problems (take for example a neuron networks approach), but they are computationally unac-ceptable to us. Another problem with these methods that they are not trusted too much by indus-try people. The linear approach is encouraged whenever possible. We started by designing a linearcontroller for each case with known linear representation (we checked 27 cases). Apparently, the con-troller of the general form 1/s · k/(τs+1) was found sufficient for the task. It allowed a zero steady-stateerror and good overshoot suppression. To make a system fit for any input, some algorithm shouldbe devised to choose the appropriate controller. Because there was no smooth analytic function thatcould control the controller coefficients (there are no good criteria for this either), we have gone forthe switched controller bank. A set of different controllers supplied with multiplexor in a way, thatonly one controller at a time connected to the plant. The input is always connected to all controllersto maintain a continuity in time. Certain algorithm is used to switch between the controllers in runtime conditions.

Soon, we recognized that there is no need in large amount of point-tuned controllers. Rather weneed a few controllers with different time constants and a sophisticated switching algorithm. Becauseof our inability to justify analytically the configuration of the controller bank, some intuition wasneeded. After some trials, we agreed on five controllers with time constants spanning the time factorof 600 (from 0.004 to 3.04s). Their input was a velocity error parameter ∆N. The switching controlwas based primarily on surge distance, because it is a dominant response speed limiting factor (fastercontroller response increases a possibility of engine surge). Another factors under consideration wherecurrent engine output and velocity goal. Fortunately, a velocity goal is known at any time, because theonly action our system can perform is a stepwise speed change. This may be seems quite limited,but actually there is no need in something more. The airplane is controlled by aerodynamic meansmost of the time, so smooth engine speed regulation is something we can live without. To implementsuch an regulation will be extremely difficult, because of bad tracking capabilities the engine loop has(after all, engine has a purely non-linear behavior). The better picture of the controller architecture,including a switching algorithm can be obtained in section IV.8.

Engine controller was tuned by hand, but automatic tuning by optimization is theoretically possi-ble. We embedded a limited facility to our model, to facilitate the more automatic way of doing things(figure IV.6). No one will probably do it completely, because of large amount of tunable parametersa control system has. Even as hand-tuned one, the controller shows good capabilities (nearly optimalin some cases) and it is simple enough for both understanding and hardware implementation. It iscertainly preferred upon the existing systems that have much poorer performance. The system, cur-rently in use with the engine, is made of one-stage linear controller with time constant slow enough toprevent engine surge (with an aid of skilled operator, of course). Our system can free an operator frompaying a constant attention to the engine, allowing him to concentrate on more important things. Theworking of control multiplexor produces sharp jumps in the switch times. These jumps are acting as adither, pushing the engine out from the dangerous, near-surge working mode. This contributes to theoverall safety of the system. It also helps to prevent overheating of the engine in the rough operationalconditions. Despite the problems, our system certainly deserves a future development.

III.5 Some results

They say, that one picture worth hundred words, so may be it is a time to look at some results. Fivestage controller was used (just like the one in section IV.8). One stage has the form of K

s(τs+1). The

base controller was manually tuned, so we got the following configuration:

26

Page 29: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Index τ K

1 Kc τc

2 Kc τc + 0.5

3 Kc τc + 1.5

4 Kc τc + 3

5 Kc/3 τc/10

Kc = 0.3 τc = 0.04

The controller exhibited stable behavior in every experimental situation, and in some points its re-sponse can be considered nearly optimal. Simulation results are divided into three groups by commonMach number.

0

5000

10000

0

2

4

6

82.5

3

3.5

4

4.5

5

5.5

6

x 104

Height [m]

Engine troughput (target/obtained) at Mach 0

Time [sec]

RP

M

0

5000

10000

0

2

4

6

80.004

0.006

0.008

0.01

0.012

0.014

0.016

0.018

0.02

0.022

Height [m]

Fuel consumption data for engine at Mach 0

Time [sec]

Fu

el

co

nsu

mp

tio

n [

kg

/se

c]

0

5000

10000

0

2

4

6

80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Height [m]

Engine surge avoidance at Mach 0

Time [sec]

Su

rge

lin

e d

ista

nc

e

0

5000

10000

0

2

4

6

8200

300

400

500

600

700

800

900

1000

1100

Height [m]

Engine combustion temperature at Mach 0

Time [sec]

Co

mb

usti

on

te

mp

era

ture

Figure III.2: Mach 0 controller performance. We got most of the hard work at this speed.

27

Page 30: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

0

5000

10000

0

2

4

6

83

3.5

4

4.5

5

5.5

x 104

Height [m]

Engine troughput (target/obtained) at Mach 0.45

Time [sec]

RP

M

0

5000

10000

0

2

4

6

80.005

0.01

0.015

0.02

0.025

Height [m]

Fuel consumption data for engine at Mach 0.45

Time [sec]

Fu

el

co

nsu

mp

tio

n [

kg

/se

c]

0

5000

10000

0

2

4

6

80

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Height [m]

Engine surge avoidance at Mach 0.45

Time [sec]

Su

rge

lin

e d

ista

nc

e

0

5000

10000

0

2

4

6

8200

300

400

500

600

700

800

900

1000

1100

Height [m]

Engine combustion temperature at Mach 0.45

Time [sec]

Co

mb

usti

on

te

mp

era

ture

Figure III.3: Mach 0.45 controller performance

28

Page 31: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

0

5000

10000

0

2

4

6

83.5

4

4.5

5

5.5

x 104

Height [m]

Engine troughput (target/obtained) at Mach 0.9

Time [sec]

RP

M

0

5000

10000

0

2

4

6

80

0.005

0.01

0.015

0.02

0.025

Height [m]

Fuel consumption data for engine at Mach 0.9

Time [sec]

Fu

el

co

nsu

mp

tio

n [

kg

/se

c]

0

5000

10000

0

2

4

6

80.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Height [m]

Engine surge avoidance at Mach 0.9

Time [sec]

Su

rge

lin

e d

ista

nc

e

0

5000

10000

0

2

4

6

8300

400

500

600

700

800

900

1000

1100

Height [m]

Engine combustion temperature at Mach 0.9

Time [sec]

Co

mb

usti

on

te

mp

era

ture

Figure III.4: Mach 0.9 controller performance

29

Page 32: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

CHAPTER IV

Reference information

IV.1 Reference data tables

Here we have the experimental/reference data available for the NPT171 engine. These include physicalstandards (gas and atmosphere data), engine experimental data and other constants.

Atmospheric datasee graph - upper chart

H [m] Ta [◦K] Pa [Pa] H [m] Ta [◦K] Pa [Pa]0 288.2 101325 7000 242.7 41060

500 284.9 95460 7500 239.4 382511000 281.7 89874 8000 236.2 355991500 278.4 84555 8500 232.9 330992000 275.2 79495 9000 229.7 307422500 271.9 74682 9500 226.4 285233000 268.7 70108 10000 223.2 264363500 265.4 65764 10500 219.9 244744000 262.2 61640 11000 216.7 226324500 258.9 57728 11500 216.7 209165000 255.7 54019 12000 216.7 193305500 252.4 50506 13000 216.7 193306000 249.2 47181 14000 216.7 193306500 245.9 44034

Engine reference values

Pa,ref = 100.79 kPa mref = 1.247 g/s QR = 43200000

P02,ref = 100.79 kPa T02,ref = 288.1 ◦K Nref = 53000 r/min ηn, ηd = 1

P03,ref = 453.55 kPa J = 3.75 · 10−3 kg ·m2 ηm = 0.995

P04,ref = 439.61 kPa T04,ref = 1160.9 ◦K Ae = 0.0055 ηb = 0.98

P05,ref = 211.26 kPa T05,ref = 989.9 ◦K R = 287 π43 = 0.96

30

Page 33: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Gas thermal capacitysee graph I.3 - second from a top chart

T [◦K] Cpa [J/kg◦K] Cpg[J/kg◦K] T [◦K] Cpa [J/kg◦K] Cpg[J/kg◦K]300 1005 1020 1100 1160 1190400 1015 1030 1200 1180 1210500 1030 1050 1300 1195 1230600 1050 1070 1400 1210 1250700 1075 1095 1500 1230 1270800 1095 1120 1600 1250 1290900 1120 1145 1700 1270 1310

1000 1140 1170 1800 1290 1330

Nozzle mapsee graph I.3 - third from a top chart

π7a µ7 π7a µ7 π7a µ7 π7a µ7 π7a µ7

1.0000 0.0000 1.8000 0.9709 3.2506 0.9827 4.8506 0.9859 6.4506 0.97301.1000 0.5611 1.8506 0.9725 3.4506 0.9838 5.0506 0.9849 6.6506 0.97191.2000 0.7302 2.0506 0.9768 3.6506 0.9843 5.2506 0.9833 6.8506 0.97141.3000 0.8266 2.2506 0.9784 3.8506 0.9854 5.4506 0.9816 7.0506 0.97141.4000 0.8863 2.4506 0.9789 4.0506 0.9859 5.6506 0.9800 7.2506 0.97251.5000 0.9246 2.6506 0.9795 4.2506 0.9865 5.8506 0.9779 7.4506 0.97411.6000 0.9488 2.8506 0.9806 4.4506 0.9865 6.0506 0.9763 7.6506 0.97731.7000 0.9633 3.0506 0.9816 4.6506 0.9865 6.2506 0.9741 7.8506 0.9811

Turbine mapssee figure I.2

HHHHHHwp

ν4 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2

µ4

0.5 0.5390 0.5684 0.6076 0.6523 0.6934 0.7337 0.7722 0.80831.0 0.6968 0.6994 0.7144 0.7367 0.7628 0.7907 0.8189 0.84651.5 0.8198 0.8029 0.8017 0.8097 0.8235 0.8410 0.8602 0.88022.0 0.9126 0.8850 0.8730 0.8713 0.8759 0.8847 0.8964 0.90952.5 0.9748 0.9466 0.9290 0.9210 0.9195 0.9217 0.9269 0.93373.0 1.0004 0.9840 0.9684 0.9580 0.9527 0.9508 0.9504 0.95143.5 1.0013 0.9954 0.9882 0.9802 0.9743 0.9701 0.9654 0.96114.0 1.0013 0.9953 0.9914 0.9880 0.9837 0.9789 0.9718 0.96314.5 1.0013 0.9953 0.9914 0.9881 0.9846 0.9800 0.9721 0.96315.0 1.0013 0.9953 0.9914 0.9881 0.9846 0.9800 0.9721 0.9631

ηt

0.5 0.8480 0.7844 0.7314 0.6711 0.6249 0.5753 0.5330 0.45611.0 0.8930 0.8855 0.8499 0.8088 0.7662 0.7295 0.6933 0.65631.5 0.8771 0.8994 0.8970 0.8715 0.8379 0.8023 0.7668 0.73462.0 0.8523 0.8899 0.9051 0.9015 0.8790 0.8482 0.8161 0.78272.5 0.8300 0.8754 0.9007 0.9095 0.9027 0.8783 0.8490 0.81813.0 0.8023 0.8596 0.8925 0.9089 0.9110 0.8981 0.8708 0.83923.5 0.7897 0.8445 0.8758 0.9021 0.9131 0.9086 0.8793 0.84744.0 0.7420 0.8268 0.8745 0.8976 0.9082 0.9079 0.8879 0.86554.5 0.6519 0.7632 0.8533 0.8851 0.9063 0.9148 0.9010 0.87455.0 0.5512 0.6784 0.7738 0.8268 0.8692 0.8957 0.8904 0.8586

31

Page 34: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Compressor mapssee figure I.2

HHHH

HHβ

ν2 0.5 0.7 0.8 0.9 0.95 1 1.05 1.1 1.15 1.2

µ2

1 0.1665 0.3482 0.4692 0.6273 0.6989 0.7745 0.8431 0.9772 1.0555 1.06922 0.2280 0.4045 0.5226 0.6777 0.7481 0.8205 0.8860 1.0154 1.0555 1.06923 0.2919 0.4715 0.5882 0.7393 0.8125 0.8752 0.9503 1.0384 1.0555 1.06924 0.3483 0.5111 0.6279 0.7734 0.8489 0.9133 0.9913 1.0384 1.0555 1.06925 0.3667 0.5317 0.6504 0.7921 0.8680 0.9316 1.0104 1.0384 1.0555 1.06926 0.3826 0.5479 0.6649 0.8082 0.8818 0.9466 1.0133 1.0384 1.0555 1.06927 0.3905 0.5543 0.6731 0.8216 0.8975 0.9687 1.0133 1.0384 1.0555 1.06928 0.3931 0.5572 0.6733 0.8323 0.9133 0.9827 1.0133 1.0384 1.0555 1.06929 0.3931 0.5572 0.6733 0.8323 0.9174 0.9873 1.0133 1.0384 1.0555 1.069210 0.3931 0.5572 0.6733 0.8323 0.9174 0.9873 1.0133 1.0384 1.0555 1.0692

π32

1 1.5360 2.3196 2.9342 3.7683 4.1884 4.7568 5.3541 6.3816 6.7379 6.78422 1.5360 2.3076 2.9101 3.7466 4.1765 4.7311 5.3424 6.2011 6.3187 6.34723 1.5300 2.2704 2.8691 3.6707 4.1314 4.6750 5.2980 5.8615 5.9197 5.97314 1.4760 2.2308 2.8293 3.6079 4.0779 4.5979 5.2068 5.5314 5.6003 5.65255 1.4448 2.1984 2.7944 3.5609 4.0316 4.5418 5.0958 5.2856 5.3580 5.41626 1.4208 2.1552 2.7533 3.5150 3.9853 4.4833 4.9544 5.1134 5.1882 5.25197 1.3608 2.0808 2.6593 3.4487 3.9045 4.3735 4.6552 4.8130 4.8866 4.95798 1.2906 1.8948 2.4651 3.2931 3.7549 4.2028 4.3875 4.5434 4.6206 4.70739 1.2000 1.6800 2.1793 2.9879 3.4331 3.8604 4.0147 4.1622 4.2335 4.304710 1.0080 1.2000 1.4472 2.0953 2.5769 3.0353 3.2328 3.3856 3.4889 3.5886

ηc

1 0.7658 0.7782 0.7815 0.7832 0.7858 0.7976 0.7800 0.7370 0.6800 0.64002 0.7745 0.7824 0.7800 0.7795 0.7850 0.7973 0.7850 0.7400 0.6900 0.65203 0.7663 0.7693 0.7658 0.7689 0.7774 0.7892 0.7860 0.7420 0.6950 0.65304 0.7128 0.7475 0.7494 0.7582 0.7667 0.7791 0.7750 0.7350 0.6900 0.64505 0.6750 0.7280 0.7343 0.7499 0.7593 0.7713 0.7630 0.7184 0.6750 0.63506 0.6550 0.7064 0.7201 0.7402 0.7515 0.7644 0.7470 0.7003 0.6600 0.62507 0.6350 0.6700 0.6955 0.7287 0.7410 0.7520 0.7106 0.6680 0.6325 0.60008 0.5360 0.5768 0.6320 0.6861 0.7205 0.7280 0.6760 0.6374 0.6100 0.58259 0.3820 0.4560 0.5318 0.6180 0.6600 0.6700 0.6263 0.5921 0.5750 0.545010 0.0550 0.1450 0.2230 0.3849 0.4730 0.5277 0.5091 0.4861 0.4750 0.4550

32

Page 35: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.2 Common support routines for system implementation

Model initialization file: init.m

g l o b a l tab_method punishment p r i n t _ o u t ;2

tab_method =’ l i n e a r ’ ;4 punishment =1;

p r i n t _ o u t =0;6

g l o b a l R Ma;8 R=287;

Ma= 0 ; %2;10 Ha=1e + 4 ; %7e +3;

12 g l o b a l Ae dm_f J ;dm_f = 0 . 0 2 ;

14 Ae = 0 . 0 0 5 5 ;J = 0 . 0 1 3 1 ;

16

g l o b a l T_ 0 2_ re f P _ 0 2 _ r e f T_ 04_re f P _ 0 4 _ r e f P _ a _ r e f dm_ref N_ref p i_43 ;18 P _ a _ r e f = 1 0 0 7 9 0 ;

T_0 2 _ re f = 2 8 8 . 1 ;20 P _ 0 2 _ r e f =100790;

T_0 4 _ re f = 1 1 6 0 . 9 ;22 P _ 0 3 _ r e f =453550;

P _ 0 4 _ r e f =439610;24 P _ 0 5 _ r e f =211260;

T_0 5 _ re f = 9 8 9 . 9 ;26 dm_ref = 1 . 2 4 7 ;

N_ref =53000;28 pi_43 = 0 . 9 6 ;

30 g l o b a l SF1 SF2 SF3 ;SF1 =T _ 0 2_r e f / T_0 4_ re f ;

32 SF2 =( P _ 0 4 _ r e f / P _ 0 2 _ r e f )∗ s q r t ( T_02_ re f / T_04_ re f ) ;SF3 =( P _ 0 5 _ r e f / P _ 0 4 _ r e f )∗ s q r t ( T_04_ re f / T_05_ re f ) ;

34

g l o b a l Q_R eta_n eta_m e t a _ b ;36 Q_R=43200000;

e ta_n =1;38 eta_m = . 9 9 5 ;

e t a _ b = . 9 8 ;40

g l o b a l Tcpdat Cpadat Cpgdat ;42 Tcpdat = 3 0 0 : 1 0 0 : 1 8 0 0 ;

Cpgdat = 1 0 0 0 ∗ [ 1 . 0 2 1 . 0 3 1 . 0 5 1 . 0 7 1 . 0 9 5 1 . 1 2 1 . 1 4 5 1 . 1 7 1 . 1 9 1 . 2 1 1 . 2 3 . . .44 1 . 2 5 1 . 2 7 1 . 2 9 1 . 3 1 1 . 3 3 ] ;

Cpadat = 1 0 0 0 ∗ [ 1 . 0 0 5 1 . 0 1 5 1 . 0 3 1 . 0 5 1 . 0 7 5 1 . 0 9 5 1 . 1 2 1 . 1 4 1 . 1 6 1 . 1 8 . . .46 1 . 1 9 5 1 . 2 1 1 . 2 3 1 . 2 5 1 . 2 7 1 . 2 9 ] ;

33

Page 36: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

48 g l o b a l p i 7 a d a t mu7dat ;p i 7 a d a t = [ 1 : 0 . 1 : 1 . 8 1 . 8 5 0 6 : 0 . 2 : 7 . 8 5 0 6 ] ;

50 mu7dat = 0 . 0 0 1 ∗ [ 0 0 . 1 0 4 2 0 . 1 3 5 6 0 . 1 5 3 5 0 . 1 6 4 6 0 . 1 7 1 7 0 . 1 7 6 2 0 . 1 7 8 9 . . .0 . 1 8 0 3 0 . 1 8 0 6 0 . 1 8 1 4 0 . 1 8 1 7 0 . 1 8 1 8 0 . 1 8 1 9 0 . 1 8 2 1 . . .

52 0 . 1 8 2 3 0 . 1 8 2 5 0 . 1 8 2 7 0 . 1 8 2 8 0 . 1 8 3 0 0 . 1 8 3 1 0 . 1 8 3 2 . . .0 . 1 8 3 2 0 . 1 8 3 2 0 . 1 8 3 1 0 . 1 8 2 9 0 . 1 8 2 6 0 . 1 8 2 3 0 . 1 8 2 0 . . .

54 0 . 1 8 1 6 0 . 1 8 1 3 0 . 1 8 0 9 0 . 1 8 0 7 0 . 1 8 0 5 0 . 1 8 0 4 0 . 1 8 0 4 . . .0 . 1 8 0 6 0 . 1 8 0 9 0 . 1 8 1 5 0 . 1 8 2 2 ] / 1 . 8 5 7 1 e −04;

56

g l o b a l b e t a _ d a t a nu_2_data w_p_data nu_4_data tab_mu_2 t a b _ p i _ 3 2 . . .58 t a b _ e t a _ c tab_mu_4 t a b _ e t a _ t w p _ s c a l e n u 2 _ s c a l e ;

b e t a _ d a t a = [ 1 : 1 0 ] ’ ;60 nu_2_data = [ 0 . 5 0 . 7 0 . 8 0 . 9 0 . 9 5 1 1 . 0 5 1 . 1 1 . 1 5 1 . 2 ] ;

w_p_data = [ 0 . 5 : 0 . 5 : 5 ] ’ ;62 nu_4_data = [ 0 . 5 0 . 6 0 . 7 0 . 8 0 . 9 1 1 . 1 1 . 2 ] ;

tab_mu_4 = [ . . .64 . 5 3 9 0 . 5 6 8 4 . 6 0 7 6 . 6 5 2 3 . 6 9 3 4 . 7 3 3 7 . 7 7 2 2 . 8 0 8 3

. 6 9 6 8 . 6 9 9 4 . 7 1 4 4 . 7 3 6 7 . 7 6 2 8 . 7 9 0 7 . 8 1 8 9 . 8 4 6 566 . 8 1 9 8 . 8 0 2 9 . 8 0 1 7 . 8 0 9 7 . 8 2 3 5 . 8 4 1 0 . 8 6 0 2 . 8 8 0 2

. 9 1 2 6 . 8 8 5 0 . 8 7 3 0 . 8 7 1 3 . 8 7 5 9 . 8 8 4 7 . 8 9 6 4 . 9 0 9 568 . 9 7 4 8 . 9 4 6 6 . 9 2 9 0 . 9 2 1 0 . 9 1 9 5 . 9 2 1 7 . 9 2 6 9 . 9 3 3 7

1 . 0 0 0 4 . 9 8 4 0 . 9 6 8 4 . 9 5 8 0 . 9 5 2 7 . 9 5 0 8 . 9 5 0 4 . 9 5 1 470 1 . 0 0 1 3 . 9 9 5 4 . 9 8 8 2 . 9 8 0 2 . 9 7 4 3 . 9 7 0 1 . 9 6 5 4 . 9 6 1 1

1 . 0 0 1 3 . 9 9 5 3 . 9 9 1 4 . 9 8 8 0 . 9 8 3 7 . 9 7 8 9 . 9 7 1 8 . 9 6 3 172 1 . 0 0 1 3 . 9 9 5 3 . 9 9 1 4 . 9 8 8 1 . 9 8 4 6 . 9 8 0 0 . 9 7 2 1 . 9 6 3 1

1 . 0 0 1 3 . 9 9 5 3 . 9 9 1 4 . 9 8 8 1 . 9 8 4 6 . 9 8 0 0 . 9 7 2 1 . 9 6 3 1 ] ;74 t a b _ e t a _ t = [ . . .

. 8 4 8 0 . 7 8 4 4 . 7 3 1 4 . 6 7 1 1 . 6 2 4 9 . 5 7 5 3 . 5 3 3 0 . 4 5 6 176 . 8 9 3 0 . 8 8 5 5 . 8 4 9 9 . 8 0 8 8 . 7 6 6 2 . 7 2 9 5 . 6 9 3 3 . 6 5 6 3

. 8 7 7 1 . 8 9 9 4 . 8 9 7 0 . 8 7 1 5 . 8 3 7 9 . 8 0 2 3 . 7 6 6 8 . 7 3 4 678 . 8 5 2 3 . 8 8 9 9 . 9 0 5 1 . 9 0 1 5 . 8 7 9 0 . 8 4 8 2 . 8 1 6 1 . 7 8 2 7

. 8 3 0 0 . 8 7 5 4 . 9 0 0 7 . 9 0 9 5 . 9 0 2 7 . 8 7 8 3 . 8 4 9 0 . 8 1 8 180 . 8 0 2 3 . 8 5 9 6 . 8 9 2 5 . 9 0 8 9 . 9 1 1 0 . 8 9 8 1 . 8 7 0 8 . 8 3 9 2

. 7 8 9 7 . 8 4 4 5 . 8 7 5 8 . 9 0 2 1 . 9 1 3 1 . 9 0 8 6 . 8 7 9 3 . 8 4 7 482 . 7 4 2 0 . 8 2 6 8 . 8 7 4 5 . 8 9 7 6 . 9 0 8 2 . 9 0 7 9 . 8 8 7 9 . 8 6 5 5

. 6 5 1 9 . 7 6 3 2 . 8 5 3 3 . 8 8 5 1 . 9 0 6 3 . 9 1 4 8 . 9 0 1 0 . 8 7 4 584 . 5 5 1 2 . 6 7 8 4 . 7 7 3 8 . 8 2 6 8 . 8 6 9 2 . 8 9 5 7 . 8 9 0 4 . 8 5 8 6 ] ;

tab_mu_2 = [ . . .86 . 1 6 6 5 . 3 4 8 2 . 4 6 9 2 . 6 2 7 3 . 6 9 8 9 . 7 7 4 5 . 8 4 3 1 . 9 7 7 2 1 . 0 5 5 5 1 . 0 6 9 2

. 2 2 8 0 . 4 0 4 5 . 5 2 2 6 . 6 7 7 7 . 7 4 8 1 . 8 2 0 5 . 8 8 6 0 1 . 0 1 5 4 1 . 0 5 5 5 1 . 0 6 9 288 . 2 9 1 9 . 4 7 1 5 . 5 8 8 2 . 7 3 9 3 . 8 1 2 5 . 8 7 5 2 . 9 5 0 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 2

. 3 4 8 3 . 5 1 1 1 . 6 2 7 9 . 7 7 3 4 . 8 4 8 9 . 9 1 3 3 . 9 9 1 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 290 . 3 6 6 7 . 5 3 1 7 . 6 5 0 4 . 7 9 2 1 . 8 6 8 0 . 9 3 1 6 1 . 0 1 0 4 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 2

. 3 8 2 6 . 5 4 7 9 . 6 6 4 9 . 8 0 8 2 . 8 8 1 8 . 9 4 6 6 1 . 0 1 3 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 292 . 3 9 0 5 . 5 5 4 3 . 6 7 3 1 . 8 2 1 6 . 8 9 7 5 . 9 6 8 7 1 . 0 1 3 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 2

. 3 9 3 1 . 5 5 7 2 . 6 7 3 3 . 8 3 2 3 . 9 1 3 3 . 9 8 2 7 1 . 0 1 3 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 294 . 3 9 3 1 . 5 5 7 2 . 6 7 3 3 . 8 3 2 3 . 9 1 7 4 . 9 8 7 3 1 . 0 1 3 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 2

. 3 9 3 1 . 5 5 7 2 . 6 7 3 3 . 8 3 2 3 . 9 1 7 4 . 9 8 7 3 1 . 0 1 3 3 1 . 0 3 8 4 1 . 0 5 5 5 1 . 0 6 9 2 ] ;96 t a b _ p i _ 3 2 = [ . . .

1 . 5 3 6 0 2 . 3 1 9 6 2 . 9 3 4 2 3 . 7 6 8 3 4 . 1 8 8 4 4 . 7 5 6 8 5 . 3 5 4 1 6 . 3 8 1 6 6 . 7 3 7 9 6 . 7 8 4 298 1 . 5 3 6 0 2 . 3 0 7 6 2 . 9 1 0 1 3 . 7 4 6 6 4 . 1 7 6 5 4 . 7 3 1 1 5 . 3 4 2 4 6 . 2 0 1 1 6 . 3 1 8 7 6 . 3 4 7 2

34

Page 37: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

1 . 5 3 0 0 2 . 2 7 0 4 2 . 8 6 9 1 3 . 6 7 0 7 4 . 1 3 1 4 4 . 6 7 5 0 5 . 2 9 8 0 5 . 8 6 1 5 5 . 9 1 9 7 5 . 9 7 3 1100 1 . 4 7 6 0 2 . 2 3 0 8 2 . 8 2 9 3 3 . 6 0 7 9 4 . 0 7 7 9 4 . 5 9 7 9 5 . 2 0 6 8 5 . 5 3 1 4 5 . 6 0 0 3 5 . 6 5 2 5

1 . 4 4 4 8 2 . 1 9 8 4 2 . 7 9 4 4 3 . 5 6 0 9 4 . 0 3 1 6 4 . 5 4 1 8 5 . 0 9 5 8 5 . 2 8 5 6 5 . 3 5 8 0 5 . 4 1 6 2102 1 . 4 2 0 8 2 . 1 5 5 2 2 . 7 5 3 3 3 . 5 1 5 0 3 . 9 8 5 3 4 . 4 8 3 3 4 . 9 5 4 4 5 . 1 1 3 4 5 . 1 8 8 2 5 . 2 5 1 9

1 . 3 6 0 8 2 . 0 8 0 8 2 . 6 5 9 3 3 . 4 4 8 7 3 . 9 0 4 5 4 . 3 7 3 5 4 . 6 5 5 2 4 . 8 1 3 0 4 . 8 8 6 6 4 . 9 5 7 9104 1 . 2 9 0 6 1 . 8 9 4 8 2 . 4 6 5 1 3 . 2 9 3 1 3 . 7 5 4 9 4 . 2 0 2 8 4 . 3 8 7 5 4 . 5 4 3 4 4 . 6 2 0 6 4 . 7 0 7 3

1 . 2 0 0 0 1 . 6 8 0 0 2 . 1 7 9 3 2 . 9 8 7 9 3 . 4 3 3 1 3 . 8 6 0 4 4 . 0 1 4 7 4 . 1 6 2 2 4 . 2 3 3 5 4 . 3 0 4 7106 1 . 0 0 8 0 1 . 2 0 0 0 1 . 4 4 7 2 2 . 0 9 5 3 2 . 5 7 6 9 3 . 0 3 5 3 3 . 2 3 2 8 3 . 3 8 5 6 3 . 4 8 8 9 3 . 5 8 8 6 ] ;

t a b _ e t a _ c = [ . . .108 . 7 6 5 8 . 7 7 8 2 . 7 8 1 5 . 7 8 3 2 . 7 8 5 8 . 7 9 7 6 . 7 8 0 0 . 7 3 7 0 . 6 8 0 0 . 6 4 0 0

. 7 7 4 5 . 7 8 2 4 . 7 8 0 0 . 7 7 9 5 . 7 8 5 0 . 7 9 7 3 . 7 8 5 0 . 7 4 0 0 . 6 9 0 0 . 6 5 2 0110 . 7 6 6 3 . 7 6 9 3 . 7 6 5 8 . 7 6 8 9 . 7 7 7 4 . 7 8 9 2 . 7 8 6 0 . 7 4 2 0 . 6 9 5 0 . 6 5 3 0

. 7 1 2 8 . 7 4 7 5 . 7 4 9 4 . 7 5 8 2 . 7 6 6 7 . 7 7 9 1 . 7 7 5 0 . 7 3 5 0 . 6 9 0 0 . 6 4 5 0112 . 6 7 5 0 . 7 2 8 0 . 7 3 4 3 . 7 4 9 9 . 7 5 9 3 . 7 7 1 3 . 7 6 3 0 . 7 1 8 4 . 6 7 5 0 . 6 3 5 0

. 6 5 5 0 . 7 0 6 4 . 7 2 0 1 . 7 4 0 2 . 7 5 1 5 . 7 6 4 4 . 7 4 7 0 . 7 0 0 3 . 6 6 0 0 . 6 2 5 0114 . 6 3 5 0 . 6 7 0 0 . 6 9 5 5 . 7 2 8 7 . 7 4 1 0 . 7 5 2 0 . 7 1 0 6 . 6 6 8 0 . 6 3 2 5 . 6 0 0 0

. 5 3 6 0 . 5 7 6 8 . 6 3 2 0 . 6 8 6 1 . 7 2 0 5 . 7 2 8 0 . 6 7 6 0 . 6 3 7 4 . 6 1 0 0 . 5 8 2 5116 . 3 8 2 0 . 4 5 6 0 . 5 3 1 8 . 6 1 8 0 . 6 6 0 0 . 6 7 0 0 . 6 2 6 3 . 5 9 2 1 . 5 7 5 0 . 5 4 5 0

. 0 5 5 0 . 1 4 5 0 . 2 2 3 0 . 3 8 4 9 . 4 7 3 0 . 5 2 7 7 . 5 0 9 1 . 4 8 6 1 . 4 7 5 0 . 4 5 5 0 ] ;118 w p _ s c a l e = [ 0 . 5 : 0 . 1 : 5 ] ;

n u 2 _ s c a l e = [ 0 . 5 : 0 . 0 5 : 1 . 2 ] ;120

%S t a n d a r d A t m o s p h e r e :122 g l o b a l P_a T_a P_02 T_02 gamma_a ;

Hdat = [ 0 5 0 0 1 0 0 0 1 5 0 0 2 0 0 0 2 5 0 0 3 0 0 0 3 5 0 0 4 0 0 0 4 5 0 0 5 0 0 0 5 5 0 0 6 0 0 0 . . .124 6 5 0 0 7 0 0 0 7 5 0 0 8 0 0 0 8 5 0 0 9 0 0 0 9 5 0 0 1 0 0 0 0 1 0 5 0 0 1 1 0 0 0 1 1 5 0 0 . . .

1 2 0 0 0 1 3 0 0 0 1 4 0 0 0 ] ; %m126 Tadat = [ 2 8 8 . 2 2 8 4 . 9 2 8 1 . 7 2 7 8 . 4 2 7 5 . 2 2 7 1 . 9 2 6 8 . 7 2 6 5 . 4 2 6 2 . 2 2 5 8 . 9 . . .

2 5 5 . 7 2 5 2 . 4 2 4 9 . 2 2 4 5 . 9 2 4 2 . 7 2 3 9 . 4 2 3 6 . 2 2 3 2 . 9 2 2 9 . 7 2 2 6 . 4 . . .128 2 2 3 . 2 2 1 9 . 9 2 1 6 . 7 2 1 6 . 7 2 1 6 . 7 2 1 6 . 7 2 1 6 . 7 ] ; %K

Padat = [ 1 0 1 3 2 5 9 5 4 6 0 8 9 8 7 4 8 4 5 5 5 7 9 4 9 5 7 4 6 8 2 7 0 1 0 8 6 5 7 6 4 6 1 6 4 0 5 7 7 2 8 . . .130 5 4 0 1 9 5 0 5 0 6 4 7 1 8 1 4 4 0 3 4 4 1 0 6 0 3 8 2 5 1 3 5 5 9 9 3 3 0 9 9 3 0 7 4 2 2 8 5 2 3 . . .

2 6 4 3 6 2 4 4 7 4 2 2 6 3 2 2 0 9 1 6 1 9 3 3 0 1 9 3 3 0 1 9 3 3 0 ] ; %Pa ; 2 l a s t a r e bad132 T_a= s p l i n e ( Hdat , Tadat , Ha ) ;

P_a = s p l i n e ( Hdat , Padat , Ha ) ;134

e t a_d =1;%E n t r a n c e e f f i c i e n c y 1136 c o e f c p a = p o l y f i t ( Tcpdat , Cpadat , 4 ) ;

Cpa= p o l y v a l ( c o e f c p a , T_a ) ;138 gamma_a =1/(1−R/ Cpa ) ;

140 T_02=T_a ∗(1+( gamma_a −1)/2∗Maˆ 2 ) ;P_02 =P_a ∗(1+ e t a_d ∗( gamma_a −1)/2∗Maˆ 2 ) ˆ ( gamma_a / ( gamma_a −1)) ;

142

g l o b a l mu2surg p i 3 2 s u r g c o e f s u r g ;144 p i 3 2 s u r g = [ 1 . 4 2 0 1 . 8 3 5 2 . 2 5 0 2 . 8 4 0 3 . 6 6 0 4 . 1 1 0 4 . 6 2 0 5 . 1 6 0 5 . 3 7 0 . . .

5 . 4 6 0 5 . 5 4 0 ] ;146 mu2surg = [ . 3 0 8 0 . 4 0 0 5 . 4 9 3 0 . 6 1 5 0 . 7 5 . 8 2 6 0 . 9 0 6 0 1 . 0 0 0 1 1 . 0 3 8 4 . . .

1 . 0 5 5 5 1 . 0 6 9 2 ] ;148 c o e f s u r g = p o l y f i t ( mu2surg , p i 3 2 s u r g , 6 ) ;

35

Page 38: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

150 % I n i t i a l v a l u e sg l o b a l V _ i n i t ;

152 %p f f 0 =4 e +3V _ i n i t = [ 3 . 8 5 5 7 e +00 6 . 3 9 3 4 e −01 3 . 7 7 8 3 e −01 6 . 3 6 9 4 e −02 1 . 8 6 2 8 e −01];

154

%f p r i n t f ( ’ i n i t . m done \n ’ )

End of init.m

Compressor mass flow (µ2 (ν2, β)): mu_2_.m

f u n c t i o n mu2 = mu_2_ ( nu_2 , b e t a ) ,2 g l o b a l b e t a _ d a t a nu_2_data tab_mu_2 n u 2 _ s c a l e tab_method ;

4 f o r i =1: l e n g t h ( b e t a ) ,mu2_beta = i n t e r p 2 ( nu_2_data , b e t a _ d a t a , tab_mu_2 , n u 2 _ s c a l e , b e t a ( i ) , tab_method ) ;

6 coefmu2 = p o l y f i t ( n u 2 _ s c a l e , mu2_beta , 4 ) ;mu2( i , : ) = p o l y v a l ( coefmu2 , nu_2 ) ;

8 end

End of mu_2_.m

Turbine mass flow (µ4 (ν4, wp)): mu_4_.m

f u n c t i o n mu4 = mu_4_ ( nu_4 , w_p ) ,2 g l o b a l w_p_data nu_4_data tab_mu_4 w p _ s c a l e tab_method ;

4 f o r i =1: l e n g t h ( nu_4 ) ,mu4_wp= i n t e r p 2 ( nu_4_data , w_p_data , tab_mu_4 , nu_4 ( i ) , w p _ s c a l e , tab_method ) ;

6 coefwp = p o l y f i t ( w p _ s c a l e , mu4_wp ’ , 4 ) ;mu4( i , : ) = p o l y v a l ( coefwp , w_p ) ;

8 end

End of mu_4_.m

Nozzle mass flow (µ7 (π7a)): mu_7.m

f u n c t i o n mu7 = mu_7( p i_7a ) ,2 g l o b a l p i 7 a d a t mu7dat ;

% coefmu7 = p o l y f i t ( p i 7 a d a t , mu7dat , 4 ) ;4 % mu7= p o l y v a l ( coe fmu7 , p i_7a ) ;

mu7= s p l i n e ( p i 7 a d a t , mu7dat , p i_7a ) ;

End of mu_7.m

36

Page 39: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Compressor efficiency (ηc (ν2, β)): eta_c_.m

f u n c t i o n e t a c = e t a _ c _ ( nu_2 , b e t a ) ,2 g l o b a l b e t a _ d a t a nu_2_data t a b _ e t a _ c n u 2 _ s c a l e tab_method ;

4 f o r i =1: l e n g t h ( b e t a ) ,e t a c _ b e t a = i n t e r p 2 ( nu_2_data , b e t a _ d a t a , t a b _ e t a _ c , n u 2 _ s c a l e , b e t a ( i ) , . . .

6 tab_method ) ;c o e f e t a c = p o l y f i t ( n u 2 _ s c a l e , e t a c _ b e t a , 4 ) ;

8 e t a c ( i , : ) = p o l y v a l ( c o e f e t a c , nu_2 ) ;end

End of eta_c_.m

Turbine efficiency (ηt (ν4, wp)): eta_t_.m

f u n c t i o n e t a t = e t a _ t _ ( nu_4 , w_p ) ,2 g l o b a l w_p_data nu_4_data t a b _ e t a _ t w p _ s c a l e tab_method ;

4 f o r i =1: l e n g t h ( nu_4 ) ,e ta t_wp = i n t e r p 2 ( nu_4_data , w_p_data , t a b _ e t a _ t , nu_4 ( i ) , w p _ s c a l e , . . .

6 tab_method ) ;c o e f e t a _ t = p o l y f i t ( w p _ s c a l e , e ta t_wp ’ , 4 ) ;

8 e t a t ( i , : ) = p o l y v a l ( c o e f e t a _ t , w_p ) ;end

End of eta_t_.m

Compressor pressure gain (π32 (ν2, β)): pi_32_.m

f u n c t i o n pi32 = pi_32_ ( nu_2 , b e t a ) ,2 g l o b a l b e t a _ d a t a nu_2_data t a b _ p i _ 3 2 n u 2 _ s c a l e tab_method ;

4 f o r i =1: l e n g t h ( b e t a ) ,p i 3 2 _ b e t a = i n t e r p 2 ( nu_2_data , b e t a _ d a t a , t a b _ p i _ 3 2 , n u 2 _ s c a l e , b e t a ( i ) , . . .

6 tab_method ) ;c o e f p i 3 2 = p o l y f i t ( n u 2 _ s c a l e , p i 3 2 _ b e t a , 4 ) ;

8 pi32 ( i , : ) = p o l y v a l ( c o e f p i 3 2 , nu_2 ) ;end

End of pi_32_.m

37

Page 40: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Air thermal capacity (ƒCpa(T)): Fcpa.m

%Cp a p p r o x i m a t i o n f o r a i r and t y p i c a l c o m b u s t i o n g a s2 f u n c t i o n Cpa = Fcpa ( Tc ) ,

g l o b a l Tcpdat Cpadat ;4

c o e f c p a = p o l y f i t ( Tcpdat , Cpadat , 4 ) ;6 Cpa= p o l y v a l ( c o e f c p a , Tc ) ;

End of Fcpa.m

Gas thermal capacity (ƒCpg(T)): Fcpg.m

%Cp a p p r o x i m a t i o n f o r a i r and t y p i c a l c o m b u s t i o n g a s2 f u n c t i o n Cpg=Fcpg ( Tt ) ,

g l o b a l Tcpdat Cpgdat ;4

c o e f c p g = p o l y f i t ( Tcpdat , Cpgdat , 4 ) ;6 Cpg= p o l y v a l ( c o e f c p g , Tt ) ;

End of Fcpg.m

Compressor temperature (T03 (T02, ∆θ322)): T_03.m

f u n c t i o n t03 =T_03 ( T_02 , d t h e t a 3 2 2 ) ,2

t03 =T_02 ∗(1+ d t h e t a 3 2 2 ) ;

End of T_03.m

Turbine temperature (T04 (T02, θ24)): T_04.m

f u n c t i o n t04 =T_04 ( T_02 , t h e t a 2 4 ) ,2

t04 =T_02 / t h e t a 2 4 ;

End of T_04.m

Nozzle temperature (T05 (T02, θ24, ∆θ454)): T_05.m

f u n c t i o n t05 =T_05 ( T_02 , t h e t a 2 4 , d t h e t a 4 5 4 ) ,2

t05 =T_04 ( T_02 , t h e t a 2 4 )∗(1− d t h e t a 4 5 4 ) ;

End of T_05.m

38

Page 41: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.3 Steady-state model implementation

Function reference (function : file):init : init.m mu_2_ : mu_2_.m mu_4_ : mu_4_.m

mu_7 : mu_7.m eta_c_ : eta_c_.m eta_t_ : eta_t_.mpi_32_ : pi_32_.m Fcpa : Fcpa.m Fcpg : Fcpg.m

T_03 : T_03.m T_04 : T_04.m T_05 : T_05.m

Find solution for given mf: stat_eq.m

f u n c t i o n v a l = s t a t _ e q ( dm_f_ ) ,2 g l o b a l V _ i n i t dm_f s o l n wv p r i n t _ o u t solve_mode ;

format s h o r t e ;4

o p t i o n s 0 ( 1 ) = 0 ;6 o p t i o n s 0 (2)=1 e −4;

o p t i o n s 0 (3)=1 e −4;8 o p t i o n s 0 (14)=4 e +2;

o p t i o n s 0 ( 1 8 ) = 1 ;10 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

o p t i o n s 1 = f o p t i o n s ;12 o p t i o n s 1 ( 1 ) = 0 ;

o p t i o n s 1 (2)=1 e −4;14 o p t i o n s 1 (3)=1 e −4;

o p t i o n s 1 (14)=2 e +2;16 o p t i o n s 1 ( 1 8 ) = 1 ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%18 o p t i o n s 2 = f o p t i o n s ;

o p t i o n s 2 ( 1 ) = 0 ;20 o p t i o n s 2 (2)=1 e −4;

o p t i o n s 2 (3)=1 e −4;22 o p t i o n s 2 (14)=1 e +2;

o p t i o n s 2 ( 1 8 ) = 1 ;24 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

% l i m i t s f o r i n p u t p a r a m e t e r s .26 % b e t a

V _ i n i t (1)= max ( 1 , V _ i n i t ( 1 ) ) ;28 V _ i n i t (1)= min ( 1 0 , V _ i n i t ( 1 ) ) ;

% nu_s430 V _ i n i t (2)= max ( 0 . 5 , V _ i n i t ( 2 ) ) ;

V _ i n i t (2)= min ( 1 . 2 , V _ i n i t ( 2 ) ) ;32 % t h e t a _ 2 4

V _ i n i t (3)= max ( 0 , V _ i n i t ( 3 ) ) ;34 V _ i n i t (3)= min ( 1 , V _ i n i t ( 3 ) ) ;

% d _ t h e t a _ 3 2 236 V _ i n i t (4)= max ( 0 , V _ i n i t ( 4 ) ) ;

V _ i n i t (4)= min ( 1 , V _ i n i t ( 4 ) ) ;38 % d _ t h e t a _ 4 5 4

V _ i n i t (5)= max ( 0 , V _ i n i t ( 5 ) ) ;40 V _ i n i t (5)= min ( 1 , V _ i n i t ( 5 ) ) ;

39

Page 42: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%42 % I n t i a l g u e s s s e a r c h

%s s e _ c o n s t _ l i m i t 0 =1 e −15;44 %s s e _ c o n s t _ l i m i t 1 =1 e −17;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%46 s s e _ c o n s t _ l i m i t 0 =1e −6;

s s e _ c o n s t _ l i m i t 1 =1e −4;48 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

50 n =1;dm_f=dm_f_ ;

52 warning o f f ;t i c

54

solve_mode =1;56 wv=ones ( 1 , 5 ) ;

[ s y s _ s s e _ ]= e q u a t i o n s ( V _ i n i t ) ;58 s s e _ =max( s s e _ , s s e _ c o n s t _ l i m i t 1 ) +1 ;

60 w h i l e s s e _ >s s e _ c o n s t _ l i m i t 1 ,s o l = s s e _ ;

62 wv=[1 e +0 1 e +0 1 e +0 1 e +0 1 e +0 ] ;solve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o n

64 v a l = f s o l v e ( ’ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 1 ) ;V _ i n i t = v a l ;

66 wv=ones ( 1 , 5 ) ;[ s y s _ s s e _ ]= e q u a t i o n s ( v a l ) ;

68 i f s s e _ >s s e _ c o n s t _ l i m i t 0 ,solve_mode = 0 ; % i f a s s u m p t i o n f a i l s . . .

70 v a l =fmins ( ’ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 0 ) ;V _ i n i t = v a l ;

72 % r e f i n e s o l u t i o nsolve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o n

74 v a l = f s o l v e ( ’ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 2 ) ;V _ i n i t = v a l ;

76 wv=ones ( 1 , 5 ) ;[ s y s _ s s e _ ]= e q u a t i o n s ( v a l ) ;

78 endend

80 t o c

82 i f p r i n t _ o u t ==1,f p r i n t f ( 2 , ’ dm_f =%4.4 g , s s e =%4.4 g\n ’ , dm_f , s s e _ ) ;

84 endwarning on ;

End of stat_eq.m

40

Page 43: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Steady-state equations: equations.m

% S t e a d y s t a t e e q u a t i o n s f o r i n p u t p a r a m e t e r dm_f .2 f u n c t i o n [ V_ , G]= e q u a t i o n s ( V) ,

g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f P _ 0 2 _ r e f e ta_n T_a P_a R Ae . . .4 Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma pi_43 dm_f s o l n wv . . .

punishment p r i n t _ o u t solve_mode ;6 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%%8 % I n p u t v e c t o r %

%%%%%%%%%%%%%%%%10

b e t a =V( 1 ) ;12 nu_4=V( 2 ) ;

t h e t a _ 2 4 =V( 3 ) ;14 d _ t h e t a _ 4 5 4 =V( 4 ) ;

d _ t h e t a _ 3 2 2 =V( 5 ) ;16

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%18 %%%%%%%%%%%%%%%

% D e f i n i t i o n s %20 %%%%%%%%%%%%%%%

22 Cpa=Fcpa (( T_02+T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / 2 ) ;Cpg=Fcpg (( T_04 ( T_02 , t h e t a _ 2 4 )+ T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ) / 2 ) ;

24 gamma_a =1/(1−R/ Cpa ) ;gamma_g =1/(1−R/ Cpg ) ;

26 t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .

28 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;nu_2=nu_4∗ s q r t ( SF1 / t h e t a _ 2 4 ) ;

30 mu_2=mu_2_ ( nu_2 , b e t a ) ;p i_32 =pi_32_ ( nu_2 , b e t a ) ;

32 e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;

34 mu_4=mu_4_ ( nu_4 , w_p ) ;e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

36

p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;38 u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;40 P_03 =P_02 ∗ pi_32 ;

42 P_04 =P_03 ∗ pi_43 ;p i_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;

44 P_05 =P_04 / pi_45 ;P_07 =P_05 ;

46 pi_7a =P_07 / P_a ;P_cr =P_07 / p i _ 7 c r ;

48

dm_a=dm_ref ∗mu_2∗( P_02 / P _ 0 2 _ r e f ) / s q r t ( T_02 / T_02_ re f ) ;

41

Page 44: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

50 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%%%%%%%%%%%%%%%%%%%%%%

52 % E q u a t i o n s ’ s y s t e m %%%%%%%%%%%%%%%%%%%%%%

54

s y s (1)= d _ t h e t a _ 3 2 2 −(1/ e t a _ c )∗ ( pi_32 ˆ ( ( gamma_a −1)/ gamma_a )−1) ;56 s y s (2)= mu_7( p i_7a )−mu_4∗ pi_45 ∗ s q r t ( t h e t a _ 7 4 )∗ SF3 ;

s y s (3)= d _ t h e t a _ 4 5 4 ∗(1+ f )− d _ t h e t a _ 3 2 2 ∗ t h e t a _ 2 4 ∗Cpa / ( Cpg∗ eta_m ) ;58 s y s (4)= mu_4∗(1+ f )−mu_2∗SF2 / ( pi_43 ∗ pi_32 ∗ s q r t ( t h e t a _ 2 4 ) ) ;

s y s (5)= dm_f−dm_a∗ f ;60

s y s = s y s ∗ d i a g ( wv ) ;62

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%64 i f punishment ==1,

%%%%%%%%%%%%%%%%%%%%%%%66 % Punishment f u n c t i o n %

%%%%%%%%%%%%%%%%%%%%%%%68 i f l e n g t h ( f i n d ( V<0))>0,

s y s =ones ( s i z e ( s y s ) )∗ min ( V)∗1 e +99;70 end

i f not ( i s r e a l ( V ) ) ,72 s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( V) ) )∗1 e +99;

end74 i f not ( i s r e a l ( s y s ) ) ,

s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( s y s ) ) )∗1 e +99;76 end

i f or ( e t a _ c >0 .7976 , e t a _ c <0 . 0 5 5 0 ) ,78 s y s (5)= abs ( s y s (5))+ abs ( e t a _ t −0.4263)∗3 e +33;

end80 i f or ( e t a _ t >0 .9 148 , e t a _ t <0 . 4 5 6 1 ) ,

s y s (5)= abs ( s y s (5))+ abs ( e t a _ t −0.6855)∗5 e +33;82 end

i f or ( b e t a >10, b e t a <1),84 s y s =ones ( s i z e ( s y s ) )∗ abs ( b e t a −5.5)∗1 e +88;

end86 i f or ( Cpg >1290, Cpg <1005),

s y s (5)= abs ( s y s (5))+ abs ( Cpg −1147.5)∗1 e +33;88 end

i f or ( Cpa >1330, Cpa <1000),90 s y s (5)= abs ( s y s (5))+ abs ( Cpa −1165)∗1 e +33;

end92 i f or ( nu_4 >1 .2 , nu_4 <0 . 5 ) ,

s y s =ones ( s i z e ( s y s ) )∗ abs ( nu_4 −0.85)∗1 e +88;94 end

i f or ( p i_7a >7 .8506 , p i_7a <1),96 s y s (5)= abs ( s y s ( 5 ) )∗ abs ( p i_7a −4.4253)∗1 e +44;

end98 i f or ( nu_2 <0 .5 , nu_2 >1 . 2 ) ,

s y s (5)= abs ( s y s (5))+ abs (0.85− nu_2 )∗3 e +44;100 end

42

Page 45: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

i f or ( w_p <0 .5 , w_p>5),102 s y s (5)= abs ( s y s (5))+ abs (2.75− w_p )∗1 e +44;

end104 i f pi_45 <1,

s y s (5)= abs ( s y s (5))+ abs (1− pi_45 )∗1 e +44;106 end

end108 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%%110 % Output v a l u e %

%%%%%%%%%%%%%%%%112

i f p r i n t _ o u t ==1,114 i f ( s o l −s s e ( s y s ))>0 ,

s o l = s s e ( s y s ) ; f p r i n t f ( 2 , ’% i % 1 . 8 e \n ’ , n , s o l ) ;116 end

end118

n=n +1;120

% f o r f s o l v e122 i f solve_mode ==0,

V_=abs ( s s e ( s y s ) ) ;124 G= s y s ;

end126

% f o r f m i n s128 i f solve_mode ==1,

G=abs ( s s e ( s y s ) ) ;130 V_= s y s ;

end132

134 pause ( 0 ) ;

End of equations.m

Engine state calculations: out_par.m

f u n c t i o n op=out_par ( V)2 g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f P _ 0 2 _ r e f e ta_n T_a P_a R Ae . . .

Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma pi_43 ;4

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%6 %%%%%%%%%%%%%%%%

% I n p u t v e c t o r %8 %%%%%%%%%%%%%%%%

10 b e t a =V( 1 ) ;nu_4=V( 2 ) ;

12 t h e t a _ 2 4 =V( 3 ) ;

43

Page 46: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

d _ t h e t a _ 3 2 2 =V( 4 ) ;14 dm_f=V( 5 ) ;

16 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%%%%%%%%%%%%%%%%

18 % D e f i n i t i o n s %%%%%%%%%%%%%%%%

20

Cpa=Fcpa ( T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) ;22 Cpg=Fcpg ( T_04 ( T_02 , t h e t a _ 2 4 ) ) ;

gamma_a =1/(1−R/ Cpa ) ;24 gamma_g =1/(1−R/ Cpg ) ;

f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .26 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;

nu_2=nu_4∗ s q r t ( SF1 / t h e t a _ 2 4 ) ;28 mu_2=mu_2_ ( nu_2 , b e t a ) ;

p i_32 =pi_32_ ( nu_2 , b e t a ) ;30 e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;

d _ t h e t a _ 4 5 4 =d _ t h e t a _ 3 2 2 ∗ t h e t a _ 2 4 ∗Cpa / ( Cpg∗ eta_m ∗(1+ f ) ) ;32 w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;

mu_4=mu_4_ ( nu_4 , w_p ) ;34 e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

36 p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

38 P_03 =P_02 ∗ pi_32 ;P_04 =P_03 ∗ pi_43 ;

40 pi_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;P_05 =P_04 / pi_45 ;

42 P_07 =P_04 / pi_45 ;p i_7a =P_07 / P_a ;

44 P_cr =P_07 / p i _ 7 c r ;t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;

46 T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;

48 N=N_ref ∗ s q r t ( T_02 / T_02_ re f )∗ nu_2 ;dm_a=dm_ref ∗mu_2∗( P_02 / P _ 0 2 _ r e f ) / s q r t ( T_02 / T_02_ re f ) ;

50 i f pi_7a < p i _ 7 c r ,u_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_a / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;

52 T=dm_f ∗((1+ f )∗ u_e−u_a ) / f ;e l s e

54 u_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_cr / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;T=dm_f ∗((1+ f )∗ u_e−u_a ) / f +( P_cr−P_a )∗ Ae ;

56 endSFC=dm_f / T ;

58

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%60 %%%%%%%%%%%%%%%%

% Output v a l u e %62 %%%%%%%%%%%%%%%%

44

Page 47: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

64 op (1)= nu_2 ;op (2)= b e t a ;

66 op (3)= nu_4 ;op (4)= w_p ;

68 op (5)= pi_7a ;op (6)= pi_43 ;

70 op (7)= t h e t a _ 2 4 ;op (8)= d _ t h e t a _ 4 5 4 ;

72 op (9)= d _ t h e t a _ 3 2 2 ;op (10)= Cpa ;

74 op (11)= Cpg ;op (12)= gamma_a ;

76 op (13)= gamma_g ;op (14)= t h e t a _ 7 4 ;

78 op (15)= pi_45 ;op (16)= f ;

80 op (17)= p i _ 7 c r ;op (18)= u_a ;

82 op (19)= T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ;op (20)= T_04 ( T_02 , t h e t a _ 2 4 ) ;

84 op (21)= T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ;op (22)= T_07 ;

86 op (23)= P_03 ;op (24)= P_04 ;

88 op (25)= P_05 ;op (26)= P_07 ;

90 op (27)= P_cr ;op (28)= N;

92 op (29)= dm_a ;op (30)= u_e ;

94 op (31)= T ;op (32)= SFC ;

96

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%98

op= r e a l ( op ) ;

End of out_par.m

45

Page 48: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.4 Pump design

Dynamic forward model

1

mdotf

MATLABFunction

tau(tau_.m)

MATLABFunction

spp*(spp_.m)

MATLABFunction

mdotf_(mdotf.m)

(u[2]−u[3])/u[1]

d_spp/dt

Mux

Mux2

s

1

Integrator1

1

pff

Figure IV.1: SIMULINK implementation of the pump model

Forward pump model support files:

spp_.m

f u n c t i o n s p p _ a s t =spp_ ( p f f ) ,2

i f and ( p f f >750, p f f <=3500),4 s p p _ a s t =2480∗(( p f f − 7 5 0 ) / 2 7 5 0 ) ˆ 0 . 4 8 5 ;

e l s e i f and ( p f f >3500, p f f <=8000),6 s p p _ a s t = 3 0 2 . 4 + 0 . 6 2 2 2∗ p f f ;

e l s e ,8 s p p _ a s t = 0 ; % 0< p f f <750

end

End of spp_.m

tau_.m

f u n c t i o n tau =tau_ ( p f f ) ,2

tau = 0 . 2 / ( 1 + p f f / 2 6 0 9 ) ;

End of tau_.m

46

Page 49: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

mdotf.m

f u n c t i o n dm_f=mdotf ( spp ) ,2

a = 0 . 0 1 0 2∗0 . 0 8 7 ;4 b =1;

c =(−5.178 e −3)∗ spp ;6

Q=(−b+ s q r t ( b ˆ2−4∗ a∗ c ) ) / ( 2∗ a ) ;8

%%%%%%%%%%%%%%%%%%%%%%%%%%10 dm_f=Q∗ 0 . 0 0 1 0 1 ; %dm_f=Q∗ 4 . 5 4 6 / ( 3 6 0 0∗ 0 . 8 ) ; %

%%%%%%%%%%%%%%%%%%%%%%%%%%12 % Model l i m i t s

dm_f=max( dm_f , 0 . 0 0 5 ) ;14 dm_f=min ( dm_f , 0 . 0 2 8 ) ;

End of mdotf.m

Dynamic inverse model

1

pff

MATLABFunction

inv_pff_(inv_pff.m)

MATLABFunction

inv_mdotf_(inv_mdotf.m)

Mux

Mux3

du/dt

Derivative1

1

mdotf

Figure IV.2: SIMULINK implementation of the inverse pump model

Inverse pump model support files:

inv_mdotf.m

f u n c t i o n spp =inv_mdotf ( mdotf_ ) ,2 g l o b a l m d o t f _ v a l ;

4 o p t i o n s = f o p t i o n s ;o p t i o n s ( 1 ) = 0 ;

6 o p t i o n s (2)=1 e −4;o p t i o n s (3)=1 e −4;

8 o p t i o n s (14)=1 e +3;o p t i o n s ( 1 8 ) = 1 ;

10

V_0 =[2 e + 3] ;12 m d o t f _ v a l =mdotf_ ;

s s e _ =1e +99;14 w h i l e s s e _ >1e −3,

47

Page 50: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

V_=fmins ( ’ inv_mdot f_eq ’ , V_0 , o p t i o n s ) ;16 V_0=V_ ;

s s e _ =inv_mdot f_eq ( V_0 ) ;18 end

20 spp =V_ ;

End of inv_mdotf.m

inv_mdotf_eq.m(function mdotf was defined in file mdotf.m)

f u n c t i o n G=inv_mdotf_eq ( spp ) ,2 g l o b a l m d o t f _ v a l ;

4 g u e s s =mdotf ( spp ) ;G= s s e ( m d o t f _ v a l −g u e s s ) ;

6

pause ( 0 ) ;

End of inv_mdotf_eq.m

inv_pff.m

f u n c t i o n p f f = i n v _ p f f ( spp_dspp ) ,2 g l o b a l s p p _ v a l d s p p _ v a l ;

4 o p t i o n s = f o p t i o n s ;o p t i o n s ( 1 ) = 0 ;

6 o p t i o n s (2)=1 e −4;o p t i o n s (3)=1 e −4;

8 o p t i o n s (14)=1 e +3;o p t i o n s ( 1 8 ) = 1 ;

10

V_0 =[4 e + 3] ;12 s p p _ v a l =spp_dspp ( 1 ) ;

d s p p _ v a l =spp_dspp ( 2 ) ;14 d s p p _ v a l =min ( [ d s p p _ v a l 4 e + 4 ] ) ;

d s p p _ v a l =max ( [ d s p p _ v a l −4 e + 4 ] ) ;16

n =0;18 s s e _ =1e +99;

w h i l e and ( s s e _ >1e −20, n<8),20 V_=fmins ( ’ i n v _ p f f _ e q ’ , V_0 , o p t i o n s ) ;

V_0=V_ ;22 s s e _ = i n v _ p f f _ e q ( V_0 ) ;

n=n +1;24 end

p f f =V_ ;

End of inv_pff.m

48

Page 51: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

inv_pff_eq.m(function spp_ was defined in file spp_.m)(function tau_ was defined in file tau_.m)

f u n c t i o n G= i n v _ p f f _ e q ( p f f ) ,2 g l o b a l s p p _ v a l d s p p _ v a l ;

4 i f or ( p f f <750, p f f >8000)G=abs ( p f f −(750+8000)/2)∗1 e +33;

6 e l s e ,i f d s p p _ v a l ==0

8 g u e s s =spp_ ( p f f ) ;e l s e

10 g u e s s =spp_ ( p f f )− d s p p _ v a l ∗ tau_ ( p f f ) ;end

12 G= s s e ( s p p _ v a l −g u e s s ) ;end

14 pause ( 0 ) ;

End of inv_pff_eq.m

49

Page 52: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.5 Dynamic model of the engine

(dinitial.m)

time

time1

scope in

scope T_05

scope N

MATLABFunction

pff_(pff_.m)

in

in

T_05

T_05

mdotf

T_05

N

NPT171forward engine

model

N

Npff mdotf

Forward pump model

(see caption)

Initialization

Clock1

NPT171engine model

2

N

1

T_05

u[21]

t_05

u[29]*(u[11]*(1+u[16])*(u[20]−u[21])*eta_m−u[10]*(u[19]−T_02))/(u[28]*J*(2*pi/60)^2)

dN/dt

Mux

Mux1

MATLABFunction

MATLAB Fcn(dyn_eq.m)

s

1

Integrator1

1

mdotf

Figure IV.3: SIMULINK implementation of the forward dynamic model of the engine (pumpmodel is explained in section IV.4 - forward variant)

Function reference (function : file):init : init.m spp_ : spp_.m mdotf : mdotf.m

stat_eq : stat_eq.m mu_2_ : mu_2_.m mu_4_ : mu_4_.mmu_7 : mu_7.m eta_c_ : eta_c_.m eta_t_ : eta_t_.m

pi_32_ : pi_32_.m Fcpa : Fcpa.m Fcpg : Fcpg.mT_03 : T_03.m T_04 : T_04.m T_05 : T_05.m

Model initialization: dinitial.m

c l e a r a l l ;2 f p r i n t f ( ’ I n i t i a l i z a t i o n . . . \ n ’ ) ;

i n i t ;

50

Page 53: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

4 g l o b a l J spp0 N0 sample_t ime ;

6 sample_t ime =4e −2;punishment =1;

8 p f f 0 = p f f _ ( 0 ) ;spp0 =spp_ ( p f f 0 ) ;

10 mdotf0 =mdotf ( spp0 ) ;V _ i n i t = i n i t i a l _ g u e s s _ ( mdotf0 ) ;

12 v= s t a t _ e q ( mdotf0 ) ;t h e t a _ 2 4 =v ( 3 ) ;

14 nu_4=v ( 2 ) ;N0=nu_4∗N_ref ∗ s q r t ( T_02 / ( t h e t a _ 2 4 ∗ T_0 4_re f ) ) ;

16 J =3.75 e −3 ; %kg ∗mˆ2

18 % I n i t i a l v a l u e sg l o b a l V _ i n i t solve_mode s s e _ l a s t wv N;

20

V _ i n i t =[ v ( 1 ) v ( 3 : 5 ) ] ;22 solve_mode =0;

wv=ones ( 1 , 4 ) ;24 N=N0;

s s e _ l a s t = d _ e q u a t i o n s ( V _ i n i t ) ;26

28 f p r i n t f ( ’ I n i t i a l i z a t i o n i s completed .\ n ’ ) ;

End of dinitial.m

Input definition: pff_.m

f u n c t i o n p f f = p f f _ ( t ime ) ,2

g l o b a l sample_t ime ;4

i f t ime <0 .1 ,6 p f f =2e +3;

e l s e i f t ime <3,8 p f f =1.5 e +3;

e l s e i f t ime <6,10 p f f =1e +3;

e l s e ,12 p f f =8e +2;

end

End of pff_.m

51

Page 54: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Solution estimation for model: dyn_eq.m

f u n c t i o n prm=dyn_eq ( dm_f_N_ ) ,2 g l o b a l V _ i n i t dm_f N s o l n wv p r i n t _ o u t s s e _ l a s t solve_mode ;

format s h o r t e ;4

i n i t _ f =0;6 o p t i o n s 0 = f o p t i o n s ;

o p t i o n s 0 ( 1 ) = 0 ;8 o p t i o n s 0 (2)=1 e −4;

o p t i o n s 0 (3)=1 e −4;10 o p t i o n s 0 (14)=8 e +2;

o p t i o n s 0 ( 1 8 ) = 1 ;12 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

o p t i o n s 1 = f o p t i o n s ;14 o p t i o n s 1 ( 1 ) = 0 ;

o p t i o n s 1 (2)=1 e −3;16 o p t i o n s 1 (3)=1 e −3;

o p t i o n s 1 (14)=4 e +2;18 o p t i o n s 1 ( 1 8 ) = 1 ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%20 o p t i o n s 2 = f o p t i o n s ;

o p t i o n s 2 ( 1 ) = 0 ;22 o p t i o n s 2 (2)=1 e −3;

o p t i o n s 2 (3)=1 e −3;24 o p t i o n s 2 (14)=2 e +2;

o p t i o n s 2 ( 1 8 ) = 1 ;26 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

dm_f=dm_f_N_ ( 1 ) ;28 N=dm_f_N_ ( 2 ) ;

30 % l i m i t s f o r i n p u t p a r a m e t e r s .% b e t a

32 V _ i n i t (1)= max ( 1 , V _ i n i t ( 1 ) ) ;V _ i n i t (1)= min ( 1 0 , V _ i n i t ( 1 ) ) ;

34 % t h e t a _ 2 4V _ i n i t (2)= max ( 0 , V _ i n i t ( 2 ) ) ;

36 V _ i n i t (2)= min ( 1 , V _ i n i t ( 2 ) ) ;% d _ t h e t a _ 3 2 2

38 V _ i n i t (3)= max ( 0 , V _ i n i t ( 3 ) ) ;V _ i n i t (3)= min ( 1 , V _ i n i t ( 3 ) ) ;

40 % d _ t h e t a _ 4 5 4V _ i n i t (4)= max ( 0 , V _ i n i t ( 4 ) ) ;

42 V _ i n i t (4)= min ( 1 , V _ i n i t ( 4 ) ) ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

44 % I n t i a l g u e s s s e a r c hi f i n i t _ f ==1,

46 s s e _ f a c t o r _ l i m i t =0;s s e _ c o n s t _ l i m i t 0 =1e −15;

48 s s e _ c o n s t _ l i m i t 1 =1e −17;e l s e i f i n i t _ f ==0,

52

Page 55: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

50 s s e _ f a c t o r _ l i m i t = 1 . 1 ;s s e _ c o n s t _ l i m i t 0 =1e −6;

52 s s e _ c o n s t _ l i m i t 1 =1e −2;end

54 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%solve_mode =1;

56 wv=ones ( 1 , 4 ) ;[ s y s _ s s e _ ]= d _ e q u a t i o n s ( V _ i n i t ) ;

58 s s e _ =max ( [ s s e _ , s s e _ c o n s t _ l i m i t 1 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ] ) + 1 ;

60 % I n i t i a l g u e s s i n t e r p o l a t i o n ( v e r y e x p a n s i v e in t ime )%i f s s e _ >1e −3,

62 % V _ i n i t _ t m p = i n i t i a l _ g u e s s _ ( dm_f ) ;% V _ i n i t =V _ i n i t _ t m p ( [ 1 3 4 5 ] ) ;

64 %end

66 n =1;warning o f f ;

68 %t i ci t e r =0;

70 w h i l e and ( s s e _ >max( s s e _ c o n s t _ l i m i t 1 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ) , i t e r <3),s o l = s s e _ ;

72 wv=[1 e +0 1 e +0 1 e +0 1 e + 0] ;solve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o n

74 v a l = f s o l v e ( ’ d _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 1 ) ;V _ i n i t = v a l ;

76 wv=ones ( 1 , 4 ) ;[ s y s _ s s e _ ]= d _ e q u a t i o n s ( v a l ) ;

78 i f s s e _ >max( s s e _ c o n s t _ l i m i t 0 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ) ,solve_mode = 0 ; % i f a s s u m p t i o n f a i l s . . .

80 v a l =fmins ( ’ d _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 0 ) ;V _ i n i t = v a l ;

82 solve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o nv a l = f s o l v e ( ’ d _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 2 ) ;

84 V _ i n i t = v a l ;wv=ones ( 1 , 4 ) ;

86 [ s y s _ s s e _ ]= d _ e q u a t i o n s ( v a l ) ;end

88 i t e r = i t e r +1;end

90 s s e _ l a s t = s s e _ ;%t o c

92 i f p r i n t _ o u t ==1,f p r i n t f ( 2 , ’ N=%4.4 g , s s e =%4.4 g\n ’ , N, s s e _ ) ;

94 endprm=[ dout_par ( [ v a l dm_f N] ) dm_f ] ;

96 warning on ;pause ( 0 ) ;

End of dyn_eq.m

53

Page 56: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Dynamic equations: d_equations.m

% S t e a d y s t a t e e q u a t i o n s f o r i n p u t p a r a m e t e r dm_f .2 f u n c t i o n [ V_ , G]= d _ e q u a t i o n s ( V) ,

g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f P _ 0 2 _ r e f e ta_n T_a P_a Ae . . .4 Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma R pi_43 dm_f s o l n wv . . .

N punishment p r i n t _ o u t solve_mode ;6

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%8 %%%%%%%%%%%%%%%%

% I n p u t v e c t o r %10 %%%%%%%%%%%%%%%%

12 b e t a =V( 1 ) ;t h e t a _ 2 4 =V( 2 ) ;

14 d _ t h e t a _ 4 5 4 =V( 3 ) ;d _ t h e t a _ 3 2 2 =V( 4 ) ;

16

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%18 %%%%%%%%%%%%%%%

% D e f i n i t i o n s %20 %%%%%%%%%%%%%%%

22 Cpa=Fcpa (( T_02+T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / 2 ) ;Cpg=Fcpg (( T_04 ( T_02 , t h e t a _ 2 4 )+ T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ) / 2 ) ;

24 gamma_a =1/(1−R/ Cpa ) ;gamma_g =1/(1−R/ Cpg ) ;

26 t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .

28 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;nu_2 = N/ N_ref ∗ s q r t ( T_02_ re f / T_02 ) ;

30 nu_4=nu_2∗ s q r t ( t h e t a _ 2 4 / SF1 ) ;mu_2=mu_2_ ( nu_2 , b e t a ) ;

32 pi_32 =pi_32_ ( nu_2 , b e t a ) ;e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;

34 w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;mu_4=mu_4_ ( nu_4 , w_p ) ;

36 e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

38 p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

40 T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;P_03 =P_02 ∗ pi_32 ;

42

P_04 =P_03 ∗ pi_43 ;44 pi_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;

P_05 =P_04 / pi_45 ;46 P_07 =P_05 ;

p i_7a =P_07 / P_a ;48 P_cr =P_07 / p i _ 7 c r ;

54

Page 57: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

50 dm_a=dm_ref ∗mu_2∗( P_02 / P _ 0 2 _ r e f ) / s q r t ( T_02 / T_02_ re f ) ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

52 %%%%%%%%%%%%%%%%%%%%%% E q u a t i o n s ’ s y s t e m %

54 %%%%%%%%%%%%%%%%%%%%%

56 s y s (1)= d _ t h e t a _ 3 2 2 −(1/ e t a _ c )∗ ( pi_32 ˆ ( ( gamma_a −1)/ gamma_a )−1) ;s y s (2)= mu_7( p i_7a )−mu_4∗ pi_45 ∗ s q r t ( t h e t a _ 7 4 )∗ SF3 ;

58 s y s (3)= mu_4∗(1+ f )−mu_2∗SF2 / ( pi_43 ∗ pi_32 ∗ s q r t ( t h e t a _ 2 4 ) ) ;s y s (4)= dm_f−dm_a∗ f ;

60 s y s = s y s ∗ d i a g ( wv ) ;

62 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%i f punishment ==1,

64 %%%%%%%%%%%%%%%%%%%%%%%% Punishment f u n c t i o n %

66 %%%%%%%%%%%%%%%%%%%%%%%i f l e n g t h ( f i n d ( V<0))>0,

68 s y s =ones ( s i z e ( s y s ) )∗ min ( V)∗1 e +99;end

70 i f not ( i s r e a l ( V ) ) ,s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( V) ) )∗1 e +99;

72 endi f not ( i s r e a l ( s y s ) ) ,

74 s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( s y s ) ) )∗1 e +99;end

76 i f or ( e t a _ c >0 .7 976 , e t a _ c <0 . 0 5 5 0 ) ,s y s (4)= abs ( s y s (4))+ abs ( e t a _ t −0.4263)∗3 e +33;

78 endi f or ( e t a _ t >0 .9148 , e t a _ t <0 . 4 5 6 1 ) ,

80 s y s (4)= abs ( s y s (4))+ abs ( e t a _ t −0.6855)∗5 e +33;end

82 i f or ( b e t a >10, b e t a <1),s y s =ones ( s i z e ( s y s ) )∗ abs ( b e t a −5.5)∗1 e +88;

84 endi f or ( Cpg >1290, Cpg <1005),

86 s y s (4)= abs ( s y s (4))+ abs ( Cpg −1147.5)∗1 e +33;end

88 i f or ( Cpa >1330, Cpa <1000),s y s (4)= abs ( s y s (4))+ abs ( Cpa −1165)∗1 e +33;

90 endi f or ( nu_4 >1 .2 , nu_4 <0 . 5 ) ,

92 s y s =ones ( s i z e ( s y s ) )∗ abs ( nu_4 −0.85)∗1 e +88;end

94 i f or ( p i_7a >7 .8506 , p i_7a <1),s y s (4)= abs ( s y s ( 4 ) )∗ abs ( p i_7a −4.4253)∗1 e +44;

96 endi f or ( nu_2 <0 .5 , nu_2 >1 . 2 ) ,

98 s y s (4)= abs ( s y s (4))+ abs (0.85− nu_2 )∗3 e +44;end

100 i f or ( w_p <0 .5 , w_p>5),

55

Page 58: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

s y s (4)= abs ( s y s (4))+ abs (2.75− w_p )∗1 e +44;102 end

i f pi_45 <1,104 s y s (4)= abs ( s y s (4))+ abs (1− pi_45 )∗1 e +44;

end106 end

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%108 %%%%%%%%%%%%%%%%

% Output v a l u e %110 %%%%%%%%%%%%%%%%

i f p r i n t _ o u t ==1,112 i f ( s o l −s s e ( s y s ))>0 ,

s o l = s s e ( s y s ) ; f p r i n t f ( 2 , ’% i % 1 . 8 e \n ’ , n , s o l ) ;114 end

end116

n=n +1;118

% f o r f s o l v e120 i f solve_mode ==0,

V_=abs ( s s e ( s y s ) ) ;122 G= s y s ;

end124 % f o r f m i n s

i f solve_mode ==1,126 G=abs ( s s e ( s y s ) ) ;

V_= s y s ;128 end

pause ( 0 ) ;

End of d_equations.m

Initial value calculation: initial_guess_.m(initial_guess.mat: initial value database; see figure II.1)

f u n c t i o n V _ i n i t = i n i t i a l _ g u e s s _ ( dm_f ) ,2

load i n i t i a l _ g u e s s ;4 % b e t a

V _ i n i t (1)= s p l i n e ( i n i t i a l _ g u e s s ( : , 6 ) , i n i t i a l _ g u e s s ( : , 1 ) , dm_f ) ;6 % nu_4

V _ i n i t (2)= s p l i n e ( i n i t i a l _ g u e s s ( : , 6 ) , i n i t i a l _ g u e s s ( : , 2 ) , dm_f ) ;8 % t h e t a _ 2 4

V _ i n i t (3)= s p l i n e ( i n i t i a l _ g u e s s ( : , 6 ) , i n i t i a l _ g u e s s ( : , 3 ) , dm_f ) ;10 % d _ t h e t a _ 3 2 2

V _ i n i t (4)= s p l i n e ( i n i t i a l _ g u e s s ( : , 6 ) , i n i t i a l _ g u e s s ( : , 4 ) , dm_f ) ;12 % d _ t h e t a _ 4 5 4

V _ i n i t (5)= s p l i n e ( i n i t i a l _ g u e s s ( : , 6 ) , i n i t i a l _ g u e s s ( : , 5 ) , dm_f ) ;

End of initial_guess_.m

56

Page 59: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Engine state calculation: dout_par.m

f u n c t i o n op=dout_par ( V)2 g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f P _ 0 2 _ r e f e ta_n T_a P_a R Ae . . .

Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma R pi_43 ;4

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%6 %%%%%%%%%%%%%%%%

% I n p u t v e c t o r %8 %%%%%%%%%%%%%%%%

b e t a =V( 1 ) ;10 t h e t a _ 2 4 =V( 2 ) ;

d _ t h e t a _ 4 5 4 =V( 3 ) ;12 d _ t h e t a _ 3 2 2 =V( 4 ) ;

%−−−−−−−−−−−−−−−−−−−−−−%14 % One more i n p u t v a l u e %

%−−−−−−−−−−−−−−−−−−−−−−%16 dm_f=V( 5 ) ;

N=V( 6 ) ;18 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%20 % D e f i n i t i o n s %

%%%%%%%%%%%%%%%22 Cpa=Fcpa (( T_02+T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / 2 ) ;

Cpg=Fcpg (( T_04 ( T_02 , t h e t a _ 2 4 )+ T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ) / 2 ) ;24 gamma_a =1/(1−R/ Cpa ) ;

gamma_g =1/(1−R/ Cpg ) ;26 t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;

f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .28 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;

nu_2=N/ N_ref ∗ s q r t ( T_02_ re f / T_02 ) ;30 nu_4=nu_2∗ s q r t ( t h e t a _ 2 4 / SF1 ) ;

mu_2=mu_2_ ( nu_2 , b e t a ) ;32 pi_32 =pi_32_ ( nu_2 , b e t a ) ;

e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;34 w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;

mu_4=mu_4_ ( nu_4 , w_p ) ;36 e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

38 p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

40 T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;P_03 =P_02 ∗ pi_32 ;

42

P_04 =P_03 ∗ pi_43 ;44 pi_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;

P_05 =P_04 / pi_45 ;46 P_07 =P_05 ;

p i_7a =P_07 / P_a ;48 P_cr =P_07 / p i _ 7 c r ;

57

Page 60: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

50 N=N_ref ∗ s q r t ( T_02 / T_02_ re f )∗ nu_2 ;dm_a=dm_ref ∗mu_2∗( P_02 / P _ 0 2 _ r e f ) / s q r t ( T_02 / T_02_ re f ) ;

52 i f pi_7a < p i _ 7 c r ,u_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_a / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;

54 T=dm_f ∗((1+ f )∗ u_e−u_a ) / f ;e l s e

56 u_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_cr / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;T=dm_f ∗((1+ f )∗ u_e−u_a ) / f +( P_cr−P_a )∗ Ae ;

58 endSFC=dm_f / T ;

60

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%62 %%%%%%%%%%%%%%%%

% Output v a l u e %64 %%%%%%%%%%%%%%%%

op (1)= nu_2 ;66 op (2)= b e t a ;

op (3)= nu_4 ;68 op (4)= w_p ;

op (5)= pi_7a ;70 op (6)= pi_43 ;

op (7)= t h e t a _ 2 4 ;72 op (8)= d _ t h e t a _ 4 5 4 ;

op (9)= d _ t h e t a _ 3 2 2 ;74 op (10)= Cpa ;

op (11)= Cpg ;76 op (12)= gamma_a ;

op (13)= gamma_g ;78 op (14)= t h e t a _ 7 4 ;

op (15)= pi_45 ;80 op (16)= f ;

op (17)= p i _ 7 c r ;82 op (18)= u_a ;

op (19)= T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ;84 op (20)= T_04 ( T_02 , t h e t a _ 2 4 ) ;

op (21)= T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ;86 op (22)= T_07 ;

op (23)= P_03 ;88 op (24)= P_04 ;

op (25)= P_05 ;90 op (26)= P_07 ;

op (27)= P_cr ;92 op (28)= N;

op (29)= dm_a ;94 op (30)= u_e ;

op (31)= T ;96 op (32)= SFC ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%98 op= r e a l ( op ) ;

End of dout_par.m

58

Page 61: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.6 Inverse model of the engine

(idinitial.m)

time

time

scope pff

scope N_out

scope N

pff

pff

N_out

dN_out

mdotf

N

inv_npt171d_(inverse engine model)

MATLABFunction

dN_(dN_.m)

N_out

N_out

MATLABFunction

N_(N_.m)

N

N

mdotf pff

Inverse pumpmodel (see caption)

Initialization

Clock

Inverse engine model

2

N

1

mdotf

u(33)

mdotf_MATLABFunction

iout_par(iout_par.m)

MATLABFunction

inv_dyn_eq_(inv_dyn_eq.m)

u(28)

N_

Mux

Mux2

Mux

Mux12

dN_out

1

N_out

Figure IV.4: SIMULINK implementation of the inverse model of the engine (pump model isexplained in section IV.4 - inverse variant)

Function reference (function : file):init : init.m mu_2_ : mu_2_.m mu_4_ : mu_4_.m

mu_7 : mu_7.m eta_c_ : eta_c_.m eta_t_ : eta_t_.mpi_32_ : pi_32_.m Fcpa : Fcpa.m Fcpg : Fcpg.m

T_03 : T_03.m T_04 : T_04.m T_05 : T_05.m

59

Page 62: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Model initialization: idinitial.m

%c l e a r a l l ;2 f p r i n t f ( ’ I n i t i a l i z a t i o n . . . \ n ’ ) ;

t i c4 i n i t ;

g l o b a l J spp0 sample_t ime s s e _ l a s t ;6

sample_t ime =4e −2;8 J =3.75 e −3 ; %kg ∗mˆ2

s s e _ l a s t =1;10

% I n i t i a l v a l u e s12

g l o b a l V _ i n i t ;14

V _ i n i t =inv_dyn_eq ( [ N_ ( 0 ) dN_ ( 0 ) ] ) ;16

punishment =1;18 t o c

f p r i n t f ( ’ I n i t i a l i z a t i o n i s completed .\ n ’ ) ;

End of idinitial.m

Input generating routines: input_.m, N_.m and dN_.m

input_.m

f u n c t i o n N_dN = input_ ( t i m e _ f l a g ) ,2

t ime = t i m e _ f l a g ( 1 ) ;4 f l a g = t i m e _ f l a g ( 2 ) ;

6 %N=a−(b / b e t a )∗ exp ( x i ∗w_n∗( t0 −t ime ))∗ s i n ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) ;% where b e t a = s q r t (1− x i ˆ 2 ) and t h e t a =atan ( b e t a / x i ) .

8 % dN=( b / b e t a )∗ exp ( x i ∗w_n∗( t0 −t ime ) ) ∗ . . .% ( x i ∗w_n∗ s i n ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) − . . .

10 % b e t a ∗w_n∗ c o s ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) ) ;

12 t0 =0;% a =4.7 e +4;

14 a =5.5 e +4%a0 =5.5 e +4;

16 a0 =4e +4x i = 0 . 9 ;

18 tau = 0 . 6∗3 ;

20 w_n =1/( tau ∗ x i ) ;b e t a = s q r t (1− x i ˆ 2 ) ;

22 t h e t a =atan ( b e t a / x i ) ;

60

Page 63: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

24 b=( a−a0 )∗ b e t a / s i n ( t h e t a ) ;

26 i f f l a g ==0,i f t ime <=t0 ,

28 N=a−b∗ s i n ( t h e t a ) / b e t a ;e l s e

30 N=a−(b / b e t a )∗ exp ( x i ∗w_n∗( t0 −t ime ))∗ s i n ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) ;end

32 N_dN=N;e l s e i f f l a g ==1,

34 i f t ime <=t0 ,dN=0;

36 e l s edN=( b / b e t a )∗ exp ( x i ∗w_n∗( t0 −t ime ) ) ∗ . . .

38 ( x i ∗w_n∗ s i n ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) − . . .b e t a ∗w_n∗ cos ( b e t a ∗w_n∗( t ime −t0 )+ t h e t a ) ) ;

40 endN_dN=dN;

42 end

End of input_.m

N_.m

f u n c t i o n N = N_( time ) ,2

N=input_ ([ t ime 0 ] ) ;

End of N_.m

dN_.m

f u n c t i o n dN = dN_( time ) ,2

dN=input_ ([ t ime 1 ] ) ;

End of dN_.m

Solution estimation: inv_dyn_eq.m

f u n c t i o n v a l =inv_dyn_eq ( N_dN_ ) ,2 g l o b a l V _ i n i t N dN s o l n wv p r i n t _ o u t s s e _ l a s t solve_mode ;

format s h o r t e ;4

i n i t _ f =0;6 o p t i o n s 0 = f o p t i o n s ;

o p t i o n s 0 ( 1 ) = 0 ;8 o p t i o n s 0 (2)=1 e −4;

o p t i o n s 0 (3)=1 e −4;10 o p t i o n s 0 (14)=4 e +2;

61

Page 64: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

o p t i o n s 0 ( 1 8 ) = 1 ;12 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

o p t i o n s 1 = f o p t i o n s ;14 o p t i o n s 1 ( 1 ) = 0 ;

o p t i o n s 1 (2)=1 e −4;16 o p t i o n s 1 (3)=1 e −4;

o p t i o n s 1 (14)=2 e +2;18 o p t i o n s 1 ( 1 8 ) = 1 ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%20 o p t i o n s 2 = f o p t i o n s ;

o p t i o n s 2 ( 1 ) = 0 ;22 o p t i o n s 2 (2)=1 e −4;

o p t i o n s 2 (3)=1 e −4;24 o p t i o n s 2 (14)=1 e +2;

o p t i o n s 2 (18)=1 e −3;26 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

% l i m i t s f o r i n p u t p a r a m e t e r s .28 % b e t a

V _ i n i t (1)= max ( 1 , V _ i n i t ( 1 ) ) ;30 V _ i n i t (1)= min ( 1 0 , V _ i n i t ( 1 ) ) ;

% t h e t a _ 2 432 V _ i n i t (2)= max ( 0 , V _ i n i t ( 2 ) ) ;

V _ i n i t (2)= min ( 1 , V _ i n i t ( 2 ) ) ;34 % d _ t h e t a _ 4 5 4

V _ i n i t (3)= max ( 0 , V _ i n i t ( 3 ) ) ;36 V _ i n i t (3)= min ( 1 , V _ i n i t ( 3 ) ) ;

% d _ t h e t a _ 3 2 238 V _ i n i t (4)= max ( 0 , V _ i n i t ( 4 ) ) ;

V _ i n i t (4)= min ( 1 , V _ i n i t ( 4 ) ) ;40 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

% I n t i a l g u e s s s e a r c h42 i f i n i t _ f ==1,

s s e _ f a c t o r _ l i m i t =0;44 s s e _ c o n s t _ l i m i t 0 =1e −15;

s s e _ c o n s t _ l i m i t 1 =1e −17;46 e l s e i f i n i t _ f ==0,

s s e _ f a c t o r _ l i m i t = 1 . 1 ;48 s s e _ c o n s t _ l i m i t 0 =1e −6;

s s e _ c o n s t _ l i m i t 1 =1e −2;50 end

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%52

n =1;54 N=N_dN_ ( 1 ) ;

dN=N_dN_ ( 2 ) ;56

58 warning o f f ;%t i c

60

solve_mode =1;

62

Page 65: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

62 wv=ones ( 1 , 4 ) ;[ s y s _ s s e _ ]= i n v _ e q u a t i o n s ( V _ i n i t ) ;

64 s s e _ =max ( [ s s e _ , s s e _ c o n s t _ l i m i t 1 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ] ) + 1 ;

66 w h i l e s s e _ >max( s s e _ c o n s t _ l i m i t 1 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ) ,wv=[1 e +0 1 e +0 1 e +0 1 e + 0 ] ;

68 s o l = s s e _ ;solve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o n

70 v a l = f s o l v e ( ’ i n v _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 1 ) ;V _ i n i t = v a l ;

72 wv=ones ( 1 , 4 ) ;[ s y s _ s s e _ ]= i n v _ e q u a t i o n s ( v a l ) ;

74 i f s s e _ >max( s s e _ c o n s t _ l i m i t 0 , s s e _ l a s t ∗ s s e _ f a c t o r _ l i m i t ) ,solve_mode = 0 ; % i f a s s u m p t i o n f a i l s . . .

76 v a l =fmins ( ’ i n v _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 0 ) ;V _ i n i t = v a l ;

78 solve_mode = 1 ; % l o c a l i t y in p l a c e a s s u m p t i o nv a l = f s o l v e ( ’ i n v _ e q u a t i o n s ’ , V _ i n i t , o p t i o n s 2 ) ;

80 V _ i n i t = v a l ;wv=ones ( 1 , 4 ) ;

82 [ s y s _ s s e _ ]= i n v _ e q u a t i o n s ( v a l ) ;end

84 ends s e _ l a s t = s s e _ ;

86 %t o ci f p r i n t _ o u t ==1,

88 f p r i n t f ( 2 , ’ N=%4.4 g , dN=%4.4 g , s s e =%4.4 g\n ’ , N, dN, s s e _ ) ;end

90 warning on ;

End of inv_dyn_eq.m

Inverse model definition: inv_equations.m

% S t e a d y s t a t e e q u a t i o n s f o r i n p u t p a r a m e t e r s N and dN.2 f u n c t i o n [ V_ , G]= i n v _ e q u a t i o n s ( V) ,

g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f P _ 0 2 _ r e f e ta_n T_a P_a R Ae . . .4 Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma R pi_43 N dN s o l n wv . . .

T _0 4_re f J punishment p r i n t _ o u t solve_mode ;6 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%%8 % I n p u t v e c t o r %

%%%%%%%%%%%%%%%%10 b e t a =V( 1 ) ;

t h e t a _ 2 4 =V( 2 ) ;12 d _ t h e t a _ 4 5 4 =V( 3 ) ;

d _ t h e t a _ 3 2 2 =V( 4 ) ;14

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%16 %%%%%%%%%%%%%%%

% D e f i n i t i o n s %

63

Page 66: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

18 %%%%%%%%%%%%%%%nu_4 =(N/ N_ref )∗ s q r t ( T_04_ re f / T_04 ( T_02 , t h e t a _ 2 4 ) ) ;

20 Cpa=Fcpa (( T_02+T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / 2 ) ;Cpg=Fcpg (( T_04 ( T_02 , t h e t a _ 2 4 )+ T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ) / 2 ) ;

22 gamma_a =1/(1−R/ Cpa ) ;gamma_g =1/(1−R/ Cpg ) ;

24 t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .

26 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;nu_2=nu_4∗ s q r t ( SF1 / t h e t a _ 2 4 ) ;

28 mu_2=mu_2_ ( nu_2 , b e t a ) ;p i_32 =pi_32_ ( nu_2 , b e t a ) ;

30 e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;

32 mu_4=mu_4_ ( nu_4 , w_p ) ;e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

34

p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;36 u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;38 P_03 =P_02 ∗ pi_32 ;

40 P_04 =P_03 ∗ pi_43 ;p i_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;

42 P_05 =P_04 / pi_45 ;P_07 =P_05 ;

44 pi_7a =P_07 / P_a ;P_cr =P_07 / p i _ 7 c r ;

46

dm_a=dm_ref ∗mu_2∗( P_02 / P _ 0 2 _ r e f ) / s q r t ( T_02 / T_02_ re f ) ;48 dm_f=dm_a∗ f ;

50 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%%%%%%%%%%%%%%%%%%%%%%

52 % E q u a t i o n s ’ s y s t e m %%%%%%%%%%%%%%%%%%%%%%

54

s y s (1)= d _ t h e t a _ 3 2 2 −(1/ e t a _ c )∗ ( pi_32 ˆ ( ( gamma_a −1)/ gamma_a )−1) ;56 s y s (2)= mu_7( p i_7a )−mu_4∗ pi_45 ∗ s q r t ( t h e t a _ 7 4 )∗ SF3 ;

s y s (3)= mu_4∗(1+ f )−mu_2∗SF2 / ( pi_43 ∗ pi_32 ∗ s q r t ( t h e t a _ 2 4 ) ) ;58 s y s (4)= dN∗N∗ J ∗(2∗ pi /60) ˆ2− dm_a∗( Cpg∗(1+ f )∗ ( T_04 ( T_02 , t h e t a _ 2 4 ) − . . .

T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ))∗ eta_m − . . .60 Cpa ∗( T_03 ( T_02 , d _ t h e t a _ 3 2 2 )−T_02 ) ) ;

62 s y s = s y s ∗ d i a g ( wv ) ;

64 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%i f punishment ==1,

66 %%%%%%%%%%%%%%%%%%%%%%%% Puni shment f u n c t i o n %

68 %%%%%%%%%%%%%%%%%%%%%%%

64

Page 67: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

i f l e n g t h ( f i n d ( V<0))>0,70 s y s =ones ( s i z e ( s y s ) )∗ min ( V)∗1 e +99;

end72 i f not ( i s r e a l ( V ) ) ,

s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( V) ) )∗1 e +99;74 end

i f not ( i s r e a l ( s y s ) ) ,76 s y s =ones ( s i z e ( s y s ) )∗ max( abs ( imag ( s y s ) ) )∗1 e +99;

end78 i f or ( dm_f <0 .005 , dm_f >0 . 0 2 8 ) ,

s y s =ones ( s i z e ( s y s ) )∗ abs (0 .0165− dm_f )∗3 e +33;80 end

i f or ( e t a _ c >0 .7976 , e t a _ c <0 . 0 5 5 0 ) ,82 s y s (4)= abs ( s y s (4))+ abs ( e t a _ t −0.4263)∗3 e +33;

end84 i f or ( e t a _ t >0 .9 148 , e t a _ t <0 . 4 5 6 1 ) ,

s y s (4)= abs ( s y s (4))+ abs ( e t a _ t −0.6855)∗5 e +33;86 end

i f or ( b e t a >10, b e t a <1),88 s y s =ones ( s i z e ( s y s ) )∗ abs ( b e t a −5.5)∗1 e +88;

end90 i f or ( Cpg >1290, Cpg <1005),

s y s (4)= abs ( s y s (4))+ abs ( Cpg −1147.5)∗1 e +33;92 end

i f or ( Cpa >1330, Cpa <1000),94 s y s (4)= abs ( s y s (4))+ abs ( Cpa −1165)∗1 e +33;

end96 i f or ( nu_4 >1 .2 , nu_4 <0 . 5 ) ,

s y s =ones ( s i z e ( s y s ) )∗ abs ( nu_4 −0.85)∗1 e +88;98 end

i f or ( p i_7a >7 .8506 , p i_7a <1),100 s y s (4)= abs ( s y s ( 4 ) )∗ abs ( p i_7a −4.4253)∗1 e +44;

end102 i f or ( nu_2 <0 .5 , nu_2 >1 . 2 ) ,

s y s (4)= abs ( s y s (4))+ abs (0.85− nu_2 )∗3 e +44;104 end

i f or ( w_p <0 .5 , w_p>5),106 s y s (4)= abs ( s y s (4))+ abs (2.75− w_p )∗1 e +44;

end108 i f pi_45 <1,

s y s (4)= abs ( s y s (4))+ abs (1− pi_45 )∗1 e +44;110 end

end112 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%%114 % Output v a l u e %

%%%%%%%%%%%%%%%%116 i f p r i n t _ o u t ==1,

i f s o l >=s s e ( abs ( s y s ) ) ,118 s o l = s s e ( s y s ) ; f p r i n t f ( 2 , ’% i % 1 . 8 e \n ’ , n , s o l ) ;

end

65

Page 68: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

120 end

122 n=n +1;

124 % f o r f s o l v ei f solve_mode ==0,

126 V_=abs ( s s e ( s y s ) ) ;G= s y s ;

128 end

130 % f o r f m i n si f solve_mode ==1,

132 G=abs ( s s e ( s y s ) ) ;V_= s y s ;

134 end

136 pause ( 0 ) ;

End of inv_equations.m

Engine state calculation: iout_par.m

f u n c t i o n op= i o u t _ p a r ( V)2 g l o b a l dm_ref T_02 P_02 N_ref T_ 02_re f T_ 04_r e f P _ 0 2 _ r e f e ta_n T_a . . .

P_a R Ae Q_R e t a _ b SF1 SF2 SF3 eta_m e t a _ b Ma pi_43 J ;4

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%6 %%%%%%%%%%%%%%%%

% I n p u t v e c t o r %8 %%%%%%%%%%%%%%%%

b e t a =V( 1 ) ;10 t h e t a _ 2 4 =V( 2 ) ;

d _ t h e t a _ 4 5 4 =V( 3 ) ;12 d _ t h e t a _ 3 2 2 =V( 4 ) ;

%%%%%%%%%%%%%%%%%%%%%%%14 % Two more p a r a m e t e r s %

%%%%%%%%%%%%%%%%%%%%%%%16 N=V( 5 ) ;

dN=V( 6 ) ;18 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

%%%%%%%%%%%%%%%20 % D e f i n i t i o n s %

%%%%%%%%%%%%%%%22

nu_4 =(N/ N_ref )∗ s q r t ( T_04_ re f / T_04 ( T_02 , t h e t a _ 2 4 ) ) ;24 Cpa=Fcpa (( T_02+T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / 2 ) ;

Cpg=Fcpg (( T_04 ( T_02 , t h e t a _ 2 4 )+ T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ) / 2 ) ;26 gamma_a =1/(1−R/ Cpa ) ;

gamma_g =1/(1−R/ Cpg ) ;28 t h e t a _ 7 4 =1−d _ t h e t a _ 4 5 4 ;

f =Cpg∗( T_04 ( T_02 , t h e t a _ 2 4 )−T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ) / . . .

66

Page 69: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

30 ( Q_R∗ e t a _ b −Cpg∗T_04 ( T_02 , t h e t a _ 2 4 ) ) ;nu_2=nu_4∗ s q r t ( SF1 / t h e t a _ 2 4 ) ;

32 mu_2=mu_2_ ( nu_2 , b e t a ) ;p i_32 =pi_32_ ( nu_2 , b e t a ) ;

34 e t a _ c = e t a _ c _ ( nu_2 , b e t a ) ;w_p=d _ t h e t a _ 4 5 4 ∗Cpg / 4 1 . 8 4 ;

36 mu_4=mu_4_ ( nu_4 , w_p ) ;e t a _ t = e t a _ t _ ( nu_4 , w_p ) ;

38

p i _ 7 c r =(1−(1/ e ta_n )∗ ( gamma_g −1)/( gamma_g + 1 ) ) ˆ ( gamma_g /(1− gamma_g ) ) ;40 u_a =Ma∗ s q r t ( gamma_a∗R∗T_a ) ;

T_07=T_04 ( T_02 , t h e t a _ 2 4 )∗ t h e t a _ 7 4 ;42 P_03 =P_02 ∗ pi_32 ;

44 P_04 =P_03 ∗ pi_43 ;p i_45 =(1− d _ t h e t a _ 4 5 4 / e t a _ t ) ˆ ( gamma_g /(1− gamma_g ) ) ;

46 P_05 =P_04 / pi_45 ;P_07 =P_05 ;

48 pi_7a =P_07 / P_a ;P_cr =P_07 / p i _ 7 c r ;

50 dm_a=dN∗N∗ J ∗(2∗ pi / 6 0 ) ˆ 2 / ( Cpg∗(1+ f )∗ ( T_04 ( T_02 , t h e t a _ 2 4 ) − . . .T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ))∗ eta_m − . . .

52 Cpa ∗( T_03 ( T_02 , d _ t h e t a _ 3 2 2 )−T_02 ) ) ;dm_f=dm_a∗ f ;

54 N=N_ref ∗ s q r t ( T_02 / T_02_ re f )∗ nu_2 ;i f pi_7a < p i _ 7 c r ,

56 u_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_a / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;T=dm_f ∗((1+ f )∗ u_e−u_a ) / f ;

58 e l s eu_e = s q r t (2∗ e ta_n ∗Cpg∗T_07 ∗(1−( P_cr / P_07 ) ˆ ( ( gamma_g−1)/ gamma_g ) ) ) ;

60 T=dm_f ∗((1+ f )∗ u_e−u_a ) / f +( P_cr−P_a )∗ Ae ;end

62 i f dm_f ==0,SFC =0;

64 e l s eSFC=dm_f / T ;

66 end%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

68 %%%%%%%%%%%%%%%%% Output v a l u e %

70 %%%%%%%%%%%%%%%%op (1)= nu_2 ;

72 op (2)= b e t a ;op (3)= nu_4 ;

74 op (4)= w_p ;op (5)= pi_7a ;

76 op (6)= pi_43 ;op (7)= t h e t a _ 2 4 ;

78 op (8)= d _ t h e t a _ 4 5 4 ;op (9)= d _ t h e t a _ 3 2 2 ;

80 op (10)= Cpa ;

67

Page 70: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

op (11)= Cpg ;82 op (12)= gamma_a ;

op (13)= gamma_g ;84 op (14)= t h e t a _ 7 4 ;

op (15)= pi_45 ;86 op (16)= f ;

op (17)= p i _ 7 c r ;88 op (18)= u_a ;

op (19)= T_03 ( T_02 , d _ t h e t a _ 3 2 2 ) ;90 op (20)= T_04 ( T_02 , t h e t a _ 2 4 ) ;

op (21)= T_05 ( T_02 , t h e t a _ 2 4 , d _ t h e t a _ 4 5 4 ) ;92 op (22)= T_07 ;

op (23)= P_03 ;94 op (24)= P_04 ;

op (25)= P_05 ;96 op (26)= P_07 ;

op (27)= P_cr ;98 op (28)= N;

op (29)= dm_a ;100 op (30)= u_e ;

op (31)= T ;102 op (32)= SFC ;

op (33)= dm_f ;104 %−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%

op= r e a l ( op ) ;

End of iout_par.m

68

Page 71: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.7 Linearization arrangement

We build few variants of linearization system, to allow search for various transfer functions. There isno need to present all of them here, because differences between them are minor and technical. Thecode, given here aims to find a transfer function with no zeros and one pole (it is a simplest case; wechecked all cases, up to two zero three pole transfer functions). For its work, it assumes existence ofsome files. One of them is mh01.mat (first digit is a numerator and second is a denominator orderfor a given variant). It contains a list of transfer function coefficients for every trial conditions and itis updated by the linearization program. The program also need its environment definition files. Eachof them contains the results of simulation of inverse engine model (corresponding Pff and N vectorssupplied with time scale) under certain conditions. This data is used to find a matching linear system.To clarify the point, index of the relevant file names shall be given. It can help to appreciate the caseswe checked.

File Mach Height N0 Nss File Mach Height N0 Nss

m_h11 0 0 30000 36000 m_h61 0.45 10000 47000 50000m_h12 0 0 30000 43000 m_h62 0.45 10000 47000 52000m_h13 0 0 30000 50000 m_h63 0.45 10000 47000 55000m_h21 0 5000 40000 45000 m_h71 0.9 0 37000 41000m_h22 0 5000 40000 50000 m_h72 0.9 0 37000 46000m_h23 0 5000 40000 55000 m_h73 0.9 0 37000 50000m_h31 0 10000 47000 50000 m_h81 0.9 5000 40000 45000m_h32 0 10000 47000 52000 m_h82 0.9 5000 40000 50000m_h33 0 10000 47000 55000 m_h83 0.9 5000 40000 55000m_h41 0.45 0 32000 38000 m_h91 0.9 10000 47000 50000m_h42 0.45 0 32000 47000 m_h92 0.9 10000 47000 52000m_h43 0.45 0 32000 52000 m_h93 0.9 10000 47000 55000m_h51 0.45 5000 40000 45000m_h52 0.45 5000 40000 50000m_h53 0.45 5000 40000 55000

Linearize the model for given cases: find_in_show01.m

c l e a r a l l ;2 c l o s e a l l ;

4

%f i r s t _ d i g i t =4;6 %s e c o n d _ d i g i t =3;

8 fn =1;f o r f i r s t _ d i g i t = 1 : 9 ,

10 f o r s e c o n d _ d i g i t = 1 : 3 ,f i l e _ n a m e =[ ’ m_h/ m_h’ , num2str ( f i r s t _ d i g i t ) , num2str ( s e c o n d _ d i g i t ) ]

12 format s h o r t euplim =1e +11;

14 f i g u r e ( fn ) ; fn =fn +1;warning o f f ;

16 f i n d _ i n 0 1 ;

69

Page 72: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

warning on ;18

load mh01 ;20 mh( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , : ) = c o e f ;

s a v e mh01 mh;22 end

end

End of find_in_show01.m

Single case linearization: find_in01.m

g l o b a l t ime p f f N_out p f f _ e s t ;2

%a s s u m p t i o n4 e v a l ( [ ’ load ’ f i l e _ n a m e ] ) ;

o p t i o n s = f o p t i o n s ;6 o p t i o n s ( 1 ) = 0 ;

o p t i o n s (2)=1 e −4;8 o p t i o n s (3)=1 e −4;

o p t i o n s (14)=1 e +4;10 o p t i o n s ( 1 8 ) = 1 ;

12 c o e f p f f = p o l y f i t ( t ime , p f f , 1 8 ) ;p f f _ e s t = p o l y v a l ( c o e f p f f , t ime ) ;

14

V_0 = [ 5 1 ] ;16 s s e _ =1e +99;

w h i l e s s e _ >uplim ,18 V_=fmins ( ’ f i n d _ i n _ e q 0 1 ’ , V_0 , o p t i o n s ) ;

V_0=V_ ;20 s s e _ = f i n d _ i n _ e q 0 1 ( V_0 ) ;

end22

a=V_ ( 1 ) ;24 b=V_ ( 2 ) ;

26 s y s _ = t f ( a , [ 1 / b 1 ] ) ;N=l s i m ( s y s _ , p f f _ e s t −p f f _ e s t ( 1 ) , t ime )+ N_out ( 1 ) ;

28

s u b p l o t ( 2 , 1 , 1 ) ;30 p l o t ( t ime , N_out , ’ . ’ , t ime , N) ;

t i t l e ( [ ’ M_a=’ num2str ( Ma) ’ H_a =’ num2str ( Ha ) ] ) ;32 y l a b e l ( ’ N( rpm ) ’ ) ;

x l a b e l ( ’ t ime ( s e c ) ’ ) ;34 g r i d on ; zoom on ;

36 s u b p l o t ( 2 , 1 , 2 ) ;p l o t ( t ime , p f f , ’ . ’ , t ime , p f f _ e s t ) ;

38 t i t l e ( ’ p f f ’ ) ;y l a b e l ( ’ p f f ’ ) ;

70

Page 73: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

40 x l a b e l ( ’ t ime ( s e c ) ’ ) ;g r i d on ; zoom on ;

42

v_1 =[ b ] ;44 [ tmp i ]= s o r t ( abs ( [ v_1 ] ) ) ;

v_1 =v_1 ( f l i p l r ( i ) ) ;46

c o e f =[ a v_1 ] ;

End of find_in01.m

Definition of linearization process: find_in_eq01.m

f u n c t i o n G= f i n d _ i n _ e q 0 1 ( V) ,2 g l o b a l t ime p f f _ e s t N_out ;

4 %a s s u m p t i o n s y s _ =a / ( s / b +1)

6 a=V( 1 ) ;b=V( 2 ) ;

8 s y s _ = t f ( a , [ 1 / b 1 ] ) ;g u e s s =l s i m ( s y s _ , p f f _ e s t −p f f _ e s t ( 1 ) , t ime )+ N_out ( 1 ) ;

10 G= s s e ( N_out−g u e s s ) ;

End of find_in_eq01.m

71

Page 74: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

IV.8 Closed-loop engine control system

ini_.m

Forward pump model

Forward enginemodel

time

time

pi32

mu2surge_dist

surg_

scope_pff

scope_mdotf

scope surge

scope T_05

scope Nin

scope N

pff_in

pff_in

pff

pff_check

mdotf_val

mdotf_val

pff mdotf

mdotf

1

0.5s+1

Tp

T_05

T_check

T_05_val

T_05

Sum

N_in_val

N_in_val

MATLABFunction

N_in(N_in.m)

N

N_check

mdotf

T_05

N

mu2

pi32

NPT171

N_out

N

Initialization

N_err

N_val

surge_dist

pff

Controller

0

Clock1

Figure IV.5: Complete SIMULINK assembly of the engine control system (forward pump modelis described in section IV.4; dynamic engine model - in section IV.5)

Now, at last, we can see the whole picture. The functionality of the pump and of the engine modelsis already fully clarified. The engine model was changed a little to provide some extra outputs (µ2 andπ32). This change is made on SIMULINK level, because out_par function computes the whole set ofengine internal parameters anyway.

1surge_dist

−1

surge line

MATLABFunction

surg(surg.m)

dsurg

dsurg_

Sum

STOP

Stop Simulation

<

RelationalOperator

2mu2

1

pi32

STOP

Stop Simulation<

RelationalOperator1

<

RelationalOperator OR

LogicalOperator

2.9e+4

Constant1

6e+4

Constant

1

NSTOP

Stop Simulation

>

RelationalOperator

273+800

Constant

1T_05

750

pff_min

8000

pff_max

STOP

Stop Simulation<

RelationalOperator1

<

RelationalOperator OR

LogicalOperator

1

pff

Figure IV.6: Various model alerts

72

Page 75: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

After a series of trials we agreed on the final configuration of the controller. It still needs tuning,but it is working reliably and has a good performance. Simplicity and clarity were our objectives whenwe designed it. The internals of the controller can be seen on figure IV.7.

1

pff

surge_dist

N_valsw_pos

sw_reg_

Multiport Switch

0

Display

0.1

0.004s +s2

Controller5

0.3

3.04s +s2

Controller4

0.3

1.54s +s2

Controller3

0.3

0.54s +s2

Controller2

0.3

0.04s +s2

Controller1

3surge_dist

2

N_val

1

N_err

SW_REG_1 sw_pos

sw_reg_val

sw_reg_val

MATLABFunction

sw_reg(sw_reg.m)

du/dt

dd_val

du/dt

dd_sw_reg

du/dt

d_val

du/dt

d_sw_reg

Mux

Mux

Memory

2N_val

1surge_dist

Figure IV.7: Internal design of the controller

The system relies in its operation on preliminary data stored in files M_H_N0_Nss_pff0.mat andV_init_ds.mat. The former file defines the tasks, engine shall perform (speed increase of specifiedvalue at given Mach and height) and specifies the initial Pff for the experiment. The later file definesgood initial trial values for solver to use when facing the given task (these values were obtained fromthe preliminary experiments with the engine model).

Referred functions:

init : init.mspp_ : spp_.m

mdotf : mdotf.md_equations : d_equations.m

Model initialization: ini_.m

%b _ n p t 1 7 1 d _ s i m . m2 warning o f f ;

i n i t ;4 load M_H_N0_Nss_pff0 ;

load V _ i n i t _ d s ;6 g l o b a l J spp0 N0 sample_t ime sim_t ime solve_mode wv N;

8 J =3.75 e −3 ; %kg ∗mˆ2sample_t ime =−1;%4e −2;

10 s im_t ime =8;punishment =1;

12 solve_mode =0;f o r f i r s t _ d i g i t = 3 : 3 ,

14 f o r s e c o n d _ d i g i t = 3 : 3 ,g l o b a l N0_sim Nss_sim T_a P_a T_02 P_02 ;

16

73

Page 76: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Ma=M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 1 ) ;18 Ha=M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 2 ) ;

N0_sim=M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 3 ) ;20 Nss_sim =M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 4 ) ;

22 T_a= s p l i n e ( Hdat , Tadat , Ha ) ;P_a = s p l i n e ( Hdat , Padat , Ha ) ;

24 T_02=T_a ∗(1+( gamma_a −1)/2∗Maˆ 2 ) ;P_02 =P_a ∗(1+ et a_d ∗( gamma_a −1)/2∗Maˆ 2 ) ˆ ( gamma_a / ( gamma_a −1)) ;

26

N0=M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 3 ) ;28 p f f 0 =M_H_N0_Nss_pff0 ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , 5 ) ;

spp0 =spp_ ( p f f 0 ) ;30 mdotf0 =mdotf ( spp0 ) ;

N=N0;32

% I n i t i a l v a l u e s34 g l o b a l V _ i n i t s s e _ l a s t ;

36 V _ i n i t = V _ i n i t _ d s ( ( f i r s t _ d i g i t −1)∗6+ s e c o n d _ d i g i t , : ) ;wv=ones ( 1 , 4 ) ;

38 s s e _ l a s t = d _ e q u a t i o n s ( V _ i n i t ) ;T_05_0 =T_05 ( T_02 , V _ i n i t ( 2 ) , V _ i n i t ( 4 ) ) ;

40 %%%%%%%%%%%%%%%%%%%%%Kc = 0 . 3 ;

42 Tauc = 0 . 0 4 ;%%%%%%%%%%%%%%%%%%%%%

44 %sim ( ’ b_npt171d ’ ) ;end

46 endwarning on ;

48 %s a v e r e s T_05_va l N_out p f f _ i n N_in_va l t ime ;

End of ini_.m

Input definition: N_in.m

f u n c t i o n Nin = N_in_ ( t ime ) ,2 g l o b a l sample_t ime N0_sim Nss_sim ;

4 i f t ime <1,Nin=N0_sim ;

6 e l s eNin=Nss_sim ;

8 end

End of N_in.m

74

Page 77: The numerical analysis of the miniature Turbo-Jet enginewebee.technion.ac.il/control/info/Projects/Students/Doubov_Engine/... · requirements that make a turbojet engine to be the

Surge estimation: surg.m

f u n c t i o n pi32 = surg ( mu2 ) ,2 g l o b a l c o e f s u r g ;

4 pi32 = p o l y v a l ( c o e f s u r g , mu2 ) ;

End of surg.m

Controller core algorithm: sw_reg.m

f u n c t i o n sw_pos =sw_reg ( Vin ) ,2 g l o b a l Nss_sim ;

4 N_val =Vin ( 1 ) ;s _ d i s t =Vin ( 2 ) ;

6 d _ v a l =Vin ( 3 ) ;dd_va l =Vin ( 4 ) ;

8 d_sw_reg =Vin ( 5 ) ;dd_sw_reg =Vin ( 6 ) ;

10 s w _ l a s t =Vin ( 7 ) ;i f i s e m p t y ( s w _ l a s t ) ,

12 s w _ l a s t =1;end

14

contr_num =4;16 surge_down_thr = 0 . 0 5 ;

s u r g e _ u p _ t h r = 0 . 1 ;18

i f s _ d i s t <surge_down_thr & d _ v a l <0 & d_sw_reg ==0 & dd_sw_reg ==0,20 sw_pos =min ( s w _ l a s t +1, contr_num + 1) ;

r e t u r n ;22 e l s e i f and ( s _ d i s t >surge_down_thr , . . .

or ( s _ d i s t <s u r g e _ u p _ t h r , s w _ l a s t ==contr_num + 1 ) ) ,24 sw_pos = s w _ l a s t ;

r e t u r n ;26 e l s e i f and ( s _ d i s t >s u r g e _ u p _ t h r , N_val>=Nss_sim ∗ 1 . 0 ) ,

sw_pos =contr_num +1;28 r e t u r n ;

e l s e i f s _ d i s t >s u r g e _ u p _ t h r & d _ v a l >0 & dd_va l > = 0 & . . .30 d_sw_reg ==0 & dd_sw_reg ==0,

sw_pos =max( s w _ l a s t −1 , 1 ) ;32 r e t u r n ;

e l s e34 sw_pos = s w _ l a s t ;

r e t u r n ;36 end

r e t u r n ;

End of sw_reg.m

75