12
A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OF THERMAL PILOT COMFORT *Robert Hällqvist , **Jörg Schminder , *Magnus Eek , ***Robert Braun , **Roland Gårdhagen , ***Petter Krus *Systems Simulation and Concept Design, Saab Aeronautics, Linköping, Sweden **Applied Thermodynamics and Fluid Mechanics, Linköping University, Linköping, Sweden ***Fluid and Mechatronic Systems, Linköping University, Linköping, Sweden Keywords: OMSimulator, FMI, TLM, Pilot Thermal Comfort, Modelling and Simulation Abstract Modelling and Simulation is key in aircraft sys- tem development. This paper presents a novel, multi-purpose, desktop simulator that can be used for detailed studies of the overall perfor- mance of coupled sub-systems, preliminary con- trol design, and multidisciplinary optimization. Here, interoperability between industrially rel- evant tools for model development and simu- lation is established via the Functional Mock- up Interface (FMI) and System Structure and Parametrization (SSP) standards. Robust and distributed simulation is enabled via the Trans- mission Line element Method (TLM). The ad- vantages of the presented simulator are demon- strated via an industrially relevant use-case where simulations of pilot thermal comfort are coupled to Environmental Control System (ECS) steady- state and transient performance. 1 Introduction As aircraft sub-systems are becoming increas- ingly complex in modern aircraft, Modelling and Simulation (M&S) is essential for understanding both steady-state and transient behaviour of tightly coupled sub-systems. Rather than de- signing and analysing sub-systems separately, a holistic approach is needed. Development testing and Validation and Verification (V&V) activities associated with multiple integrated sub-systems can be shifted to earlier design phases if detailed simulations of large portions of a complete aircraft are feasible. However, in order to further increase the use of M&S, and expand the scope of analysis using models, simulation of coupled models developed in a wide variety of different tools need to be made available on the engineers’ and researchers’ desktop computers. Also, risks associated with tool-vendor lock-in and licensing costs need to be kept at a minimum if the benefits of M&S are to be further exploited. The ITEA3 financed research project Open Cyber Physical System Model-Driven Certified Development (OpenCPS) [1] aims to address the challenges identified by academia and industry in terms of efficient model integration and simulation. A first step is to deploy available standards and techniques for robust and parallel simulation in current industrial M&S meth- ods and processes. This paper aims to show how existing standards can be used to develop industrially relevant desktop simulators. One specific use of such a multi-purpose simulator is presented via an analysis of pilot comfort coupled to Environmental Control System (ECS) performance. Pilot thermal comfort is typically assessed without run-time connections to a detailed ECS model. Conversely, ECS analy- sis simulations are conducted excluding pilot thermal comfort. Consequently, design errors occurring as a result of sub-optimization are 1

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FORDETAILED STUDIES OF THERMAL PILOT COMFORT

*Robert Hällqvist , **Jörg Schminder , *Magnus Eek , ***Robert Braun ,**Roland Gårdhagen , ***Petter Krus

*Systems Simulation and Concept Design, Saab Aeronautics, Linköping, Sweden**Applied Thermodynamics and Fluid Mechanics, Linköping University, Linköping, Sweden

***Fluid and Mechatronic Systems, Linköping University, Linköping, Sweden

Keywords: OMSimulator, FMI, TLM, Pilot Thermal Comfort, Modelling and Simulation

Abstract

Modelling and Simulation is key in aircraft sys-tem development. This paper presents a novel,multi-purpose, desktop simulator that can beused for detailed studies of the overall perfor-mance of coupled sub-systems, preliminary con-trol design, and multidisciplinary optimization.Here, interoperability between industrially rel-evant tools for model development and simu-lation is established via the Functional Mock-up Interface (FMI) and System Structure andParametrization (SSP) standards. Robust anddistributed simulation is enabled via the Trans-mission Line element Method (TLM). The ad-vantages of the presented simulator are demon-strated via an industrially relevant use-case wheresimulations of pilot thermal comfort are coupledto Environmental Control System (ECS) steady-state and transient performance.

1 Introduction

As aircraft sub-systems are becoming increas-ingly complex in modern aircraft, Modelling andSimulation (M&S) is essential for understandingboth steady-state and transient behaviour oftightly coupled sub-systems. Rather than de-signing and analysing sub-systems separately, aholistic approach is needed. Development testingand Validation and Verification (V&V) activitiesassociated with multiple integrated sub-systems

can be shifted to earlier design phases if detailedsimulations of large portions of a completeaircraft are feasible. However, in order to furtherincrease the use of M&S, and expand the scopeof analysis using models, simulation of coupledmodels developed in a wide variety of differenttools need to be made available on the engineers’and researchers’ desktop computers. Also,risks associated with tool-vendor lock-in andlicensing costs need to be kept at a minimumif the benefits of M&S are to be further exploited.

The ITEA3 financed research project OpenCyber Physical System Model-Driven CertifiedDevelopment (OpenCPS) [1] aims to address thechallenges identified by academia and industryin terms of efficient model integration andsimulation. A first step is to deploy availablestandards and techniques for robust and parallelsimulation in current industrial M&S meth-ods and processes. This paper aims to showhow existing standards can be used to developindustrially relevant desktop simulators. Onespecific use of such a multi-purpose simulatoris presented via an analysis of pilot comfortcoupled to Environmental Control System (ECS)performance. Pilot thermal comfort is typicallyassessed without run-time connections to adetailed ECS model. Conversely, ECS analy-sis simulations are conducted excluding pilotthermal comfort. Consequently, design errorsoccurring as a result of sub-optimization are

1

Page 2: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

more likely if the system cross-coupling effectsare omitted during design. The bi-directionaldependence between pilot thermal comfort andECS performance is demonstrated by meansof a use-case where the pilot comfort measureFighter Index of Thermal Stress (FITS) [2] isused to control the cockpit temperature during asimulated mission.

In Section 2, the enabling technologies are in-troduced along with the rational of their usein M&S. The implementation environment isbriefly over-viewed in Section 3. The simula-tor implementations are described in Section 4.1.The simulator characteristics are introduced inSection 4.2. A pilot comfort study demonstrat-ing one use of the simulator implementation ispresented in Section 4.3. Finally, the conclusionsare given in Section 5.

2 Techniques for standardized and dis-tributed co-simulation

The Functional Mock-up Interface (FMI) stan-dard [3], the Systems Structure and Parametriza-tion (SSP) standard [4], and the TransmissionLine element Method (TLM) [5] are three keytechnologies enabling improvement on the state-of-the art in aircraft systems M&S. These tech-nologies are utilized in the OpenCPS project co-simulation framework the OMSimulator. A briefoverview of a sub-set of the standardized meth-ods for model export, and composite model de-scription, is presented in Section 2.1. The HighLevel Architecture (HLA) standard [6] may be afeasible alternative to FMI for establishing toolinteroperability and it is mentioned for context.However, the focus is placed on FMI and this de-limitation is motivated by the available tool sup-port along with the application domain. Sometechniques for provision of a numerically stableco-simulation is provided in Section 2.2.

2.1 Available standards

The FMI standard specifies a generic formatfor export of model executables, referred to

as Functional Mock-up Units (FMUs) [3].Exported FMUs can be imported and simulatedin any FMI supporting tool. Models can beexported as FMUs for Model Exchange (ME)or Co-Simulation (CS). With FMI for ME, theresponsibility of solving the model equationsis passed to the integrating tool whereas eachCS FMU contains its own independent solver.The integrating tool is merely responsible fororchestrating the communication between FMUsin the latter case. Various optional features en-abling advanced master algorithms are specifiedin the standard. These options, for example theprovision of directional derivatives for smooth-ing of sampled inputs, can be used to increasesimulation performance and robustness.

The SSP standard is an emerging standard for de-scription and exchange of composite simulationmodels. This standard is the outcome of a Mod-elica Association Project aimed to, along withFMI, provide a complete framework for stan-dardized simulation of multiple connected sub-systems models, from here on referred to as com-posite models. The FMI standard is crucial in thesense that it establishes a standardized format formodel exchange between domain specific tools;however, it does not address the issue of exchang-ing parameterized composite models consistingof multiple connected model executables. TheSSP standard aims to bridge this gap. In short,a standardized xml schema (denoted <compos-iteModel>.ssd) is used to carry information re-garding composite model connections, proper-ties, and graphics. The <compositeModel>.ssdis packaged along with its referenced resourcesin a<compositeModel>.ssp file. Examples of ssdreferenced resources are other ssp/ssd files andFMUs. An overview of the SSP standard is pro-vided by Köhler et al. in [4]. The SSP standardexists as a mature draft at the time of writing andas such the tool implementations are scarce.

2.2 Numerically stable co-simulation

The partitioning of co-simulation entities un-avoidably results in sampling of inputs and

2

Page 3: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OFTHERMAL PILOT COMFORT

outputs. When sampling a continuous systeminformation is lost. The impact of this loss ofinformation needs to be managed and minimized

TLM is a mature and well documented tech-nique for numerically stable partitioning of sim-ulation models [7] Naturally occurring time de-lays are utilized to derive an independence be-tween connected components or models, specify-ing a clear and transparent time window for dis-connecting and parallelizing coupled simulationmodels without introducing numerical errors asa result of sub-system de-coupling. Aliasing ef-fects, see for example [8], are reduced as interpo-lated input values are available at the discretion ofeach individual co-simulation FMU solver. TLMis thus a way to pass high resolution interpo-lated data while maintaining the sub-system in-dependence during the communication interval.A lossless, one dimensional, hydraulic transmis-sion line can be described by

p1(t) = Zc ·q1(t)+ c1(t)p2(t) = Zc ·q2(t)+ c2(t)

(1)

where

c1(t) = p2(t −∆tT LM)+Zc ·q2(t −∆tT LM)

c2(t) = p1(t −∆tT LM)+Zc ·q1(t −∆tT LM).(2)

The pressure at side 1 of the transmission lineis denote as p1, and the volume flow as q1. Inthe wave variable c1, the information at side 2at time t −∆tT LM is collected. The informationpropagation time through the transmission lineis denoted as ∆tT LM, and the characteristicimpedance as Zc, in Equation 2. Equation 1and Equation 2 describe hydraulic transmissionlines; however, other engineering domains canbe described similarly.

Traditional algorithms, see Section 4.2 of theFMI standard Specification [3], rely on over-sampling or different filtering and step size errorcontrol methods to maintain and improve on sim-ulation accuracy and stability [9]. Oversamplingdoes not necessarily introduce numerical errorsif the sampling frequency is at least twice the

system bandwidth according to the sampling the-orem; however, this method may have significantimpact on the simulation performance. Filteringintroduces numerical errors as high frequencydynamics are removed to allow for a lowersampling frequency without introducing aliasing.Both traditional co-simulation methods, andthe inherently parallel approach of TLM, havebenefits and drawbacks if stability is weightedagainst simulation performance. The traditionalalgorithms with an adaptive macro step sizeallow for long step sizes, without large numericalerrors, for low frequency operating conditions.Schierz et al. present methods for communi-cation step size control for co-simulation withFMI in [10]. In such operating conditions, TLMcomes at the cost of simulation performanceas the macro step size need to be limited bythe physical delay even though limiting highfrequencies are unexcited. Much like in thecase of traditional co-simulation, a larger macrostep size can be selected at the cost of alteredsimulation behaviour.

Co-simulation entities, utilizing the TLMtechnique, require access to interpolated inputvariables for all internal solver steps. The delaypresent across a transmission line means thatfuture inputs are available, with a resolution onlylimited by the step size of the outputting FMU’sinternal solver, via interpolation in the integratingtool. However, the absence of callback functionsin FMI 2.0 makes this information unavailable tothe FMU. This would best be achieved by meansof callback functions between slaves (FMUs)and the integrating tool; callback functions thatallow a slave to ask the integrating tool for inputsvalid at the local time they are needed, and forpopulating interpolation tables with data whenmade available by the slave. Such functionalityis not available in FMI 2.0. Different methodsfor mitigation are investigated by Braun et al. in[11]. One such method, addressing the absenceof the first type of listed callback functions, isreferred to as fine grained interpolation insidethe FMU. This particular method is utilized forthe physical connections present in the aircraft

3

Page 4: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

systems simulator, see Section 4.1.

3 OMSimulator

The FMI and SSP standards are both utilizedtogether with TLM in the simulation environ-ment OMSimulator. The OMSimulator is anopen source master simulation tool originallydeveloped by the Swedish bearing manufacturerSKF, in collaboration with Linköping University,for connecting models of bearings with modelsfrom external tools using the TLM technique [12].

Many different FMI supporting master simula-tion tools already exist or are under development;examples are Dymola [13], FIDE [14], and DAC-COSIM [15]. A complete list of the integratingtools supporting FMI is provided by the Model-ica Association [16]. In contrast to these tools,the OMSimulator supports asynchronous simu-lation implementing both TLM and FMI. Theopen source effort Hopsan [17] enables simula-tion of FMUs using the TLM technique, thoughonly using synchronous communication. Syn-chronous communication between FMUs mayintroduce parasitic inductance and capacitanceas the communication between integrated sub-systems is fixed for all physical connections inthe composite model. The OMSimulator asyn-chronous interoperability between FMI and TLMis established via interpolation inside the FMU,see Section 2.2, enabling multiple different com-munication intervals in one composite model. Atime stamped vector of wave variables is com-puted via Equation 1 and Equation 2 in the mas-ter. This vector is specified to have a resolutionsignificantly higher than the communication stepsize and it is passed from the master to the FMU.The local solver can access input values for anylocal time by means of interpolating the wavevariable and computing the input via Equation 1.The main drawbacks with such a solution are thatthe input vector resolution is fixed once the inter-face is set, models need to be wrapped with inputinterpolation functionality according to the TLMtechnique prior to FMU export, and passing inter-

polation tables to FMUs result in increased com-munication overhead.

Composite FMI Model A

Model BModel A

Physical TLM

Connection

Model C

Composite FMI Model B

Composite TLM Model A

SSD

SSD

Fig. 1 : Schematic description example of compositemodel in OMSimulator. Models A, B and C are modelsexported according to the FMI standard

Composite models to be simulated in the OM-Simulator can be implemented using Lua orPython scripting. At the time of this writing,graphical composite model editing support isavailable via the open-source software OMEdit[18] and Papyrus [19]. OMEdit is the graphicaluser interface shipped alongside the OMSimula-tor with the Modelica tool OpenModelica [20],and Papyrus is an open source tool primarilyused for UML modelling. Composite models inthe OMSimulator can be comprised of coupledFMUs for co-simulation or model exchange.Co-simulation using direct tool to tool couplingis also possible and pre-defined interfaces forthe tools Dymola, Hopsan, ADAMS, Beast,and OpenModelica are available. A schematicrepresentation of an OMSimulator compositemodel is presented in Figure 1. Compositemodels can be modeled as Composite FMImodels or as Composite TLM models. CompositeFMI models are executed sequentially utilizingthe dependency information available via theFMI standard to iteratively resolve algebraic

4

Page 5: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OFTHERMAL PILOT COMFORT

loops both during initialization and simulation.Currently, the OMSimulator supports exportof System Structure Description (SSD) filesfor export of FMI Simulator composite modelsaccording to the SSP standad, see Section 2.2.Work is on-going regarding export of CompositeTLM models according to the SSP standard.Composite TLM models consist of two or morecomposite FMI models connected using theTransmission Line element Method.

The composite model of Figure 1 is described us-ing the OMSimulator Lua API in Listings 1.

Listing 1: Examples of Lua API commands forcomposite model descriptions in OMSimulatoroms2_newFMIModel("FMI Model A")oms2_addFMU("FMI Model A",<Path>,"Model A")oms2_addFMU("FMI Model A",<Path>,"Model B")oms2_setCommunicationInterval("FMI Model A",<interval>)oms2_addConnection("FMI Model A","Model A.<output>","Model B.<input>")

oms2_newFMIModel("FMI Model B")oms2_addFMU("FMI Model B",<Path>,"Model C")oms2_setCommunicationInterval("FMI Model B",<interval>)oms2_setRealParameter("FMI Model B.Model C:<parameters>",<value>)

oms2_newTLMModel("TLM Model A")oms2_addFMISubModel("TLM Model A","FMI Model A")oms2_addFMISubModel("TLM Model A","FMI Model B")

oms2_addTLMInterface("TLM Model A","FMI Model A",<interface name>, <dimension>, <causality>,<interface type>, <FMU interface name>)oms2_addTLMInterface("TLM Model A","FMI Model B",<interface name>, <dimension>,<causality>,<interface type>,<FMU interface name>)

oms2_addTLMConnection("TLM Model A","FMI Model A:<interface name>","FMI Model B:<interface name>",<delay>,<impedance>)

oms2_setTLMSocketData("TLM Model A",<ip>,<socket>)oms2_setStartTime("TLM Model A", <start time>)oms2_setStopTime("TLM Model A", <stop time>)oms2_initialize("TLM Model A")oms2_simulate("TLM Model A")

In the first block of Listings 1, the FMUs ofModel A and Model B are added to the compositeFMI Model A. Their intermediate connectionsare then specified as well as the FMI modelcommunication interval. Composite FMI ModelB is populated with an FMU of Model C in the

second block. The FMI composite models areadded to a top level Composite TLM modelTLM Model A in the third block. The TLMinterfaces and connections are specified inthe fourth and fifth blocks respectively. Fi-nally, the simulation settings are specified inthe sixth block and the simulation is commenced.

The OMSimulator is specified to display theComposite FMI model structure of CompositeFMI Model A via the first Lua command pre-sented in Listings 2; information most useful fordebugging of composite models expressed via thevarious supported scripting environments. Theinformation generated by the second commandis used to iteratively identify and resolve alge-braic loops, if such exist, during initializationand simulation. The third Lua command exportsthe Composite FMI model structure as an SSDfile according the SSP standard. At the time ofwriting the API of Listings 2 is only applicablefor Composite FMI models in the OMSimula-tor, TLM Composite models do not contain al-gebraic loops and none of the underlying infor-mation is therefore explicitly necessary for ini-tialization and simulation.

Listing 2: Lua API commands for composite model ex-port and visualizationoms2_exportCompositeStructure("FMI Model A","FMI Model A.dot")

oms2_exportDependencyGraphs("FMI Model A","InitialUnknowns.dot", "Outputs.dot")

oms2_saveModel("Model.xml","Model")

4 Implementation and Results

Saab Aeronautics, Linköping University, andSKF, are collaboratively developing an aircraftsystems simulator within the frame of theOpenCPS project. This desktop simulator, andthe characteristics of its included sub-systems,are described in the following sub-sections. Thefocus lies on the simulator as a whole; morein-depth descriptions of the included modelsare presented by Hällqvist et al. in [21] andSchminder et al. in [22]. In addition, a missionis simulated in the OMSimulator implementation

5

Page 6: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

and the results are presented and analysed inSection 4.3.

4.1 Composite model implementation

The aircraft systems simulator is implemented inthe OMSimulator using Lua scripting. Two dif-ferent composite models of the same system arecreated: one as a single Composite FMI modeland one as a Composite TLM model consistingof several connected Composite FMI models, cf.Figure 1. The Composite FMI model structureis presented in Figure 2 using the first API com-mand of Listings 2. The connection circled in redrepresents feedback of the pilot comfort measureFITS to the implemented controlling software.The simulator behaviour is meant to principallymimic a fighter aircraft. However, the character-istics are not tuned to any specific aircraft.

4.2 Sub-systems

The presented models are modelled in theModelica [23] language and Simulink. The Mod-elica models are developed using the ModelicaStandard Library and the Saab developed libraryModelica Fluid Light (MFL) [24]. The latteris a proprietary library; however, open sourcelibraries tailored to modelling of aircraft coolingsystems are available and one example forscalable ECS modelling is presented by Jordanet al. [25].

4.2.1 ECS

Figure 5 summarizes the steady-state relativecooling performance,

Qrel =Q

Qreq, (3)

of the included ECS hardware model. In Equa-tion 3, Qreq is a parameter specifying the re-quested cooling power and

Q =Cp · m ·∆T (4)

atmo

s(fm

u)

eCS

_G

eneric

_E

xp

ort

(fmu)

engin

e(fm

u)

FIT

S

fits_o

ut

co

ckp

it(fm

u)

co

nsu

mer_

A(fm

u)

co

nsu

mer_

B(fm

u)

bC

(fmu)

eCS

_S

W_

Gen

eric_E

xp

ort

(fmu

)

Fig. 2 : Composite model structure of aircraft systemsimulator implemented as a Composite FMI model in theOMSimulator. The connection circled in red represents thefeedback of the FITS measure from the comfort model tothe ECS controlling software

describes the cooling power resulting from thetemperature increase ∆T across the on boardavionics. In Equation 4, m denotes the avionicscoolant mass flow and Cp the specific heat of theair.

The relative cooling performance governs theflow distribution to the different ECS consumers;flight critical equipment is prioritized abovenon flight critical equipment as well as theprovision of pilot comfort air. A simple ECScontrolling software was introduced in [21].The software is refined and ECS output flowprioritization is included. The implemented

6

Page 7: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OFTHERMAL PILOT COMFORT

50

50

100

100

150

150

200

200

250

250

300

300

350

350

400

400

450

450

500

500

550

600

650

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

Mach Number [-]

0

2

4

6

8

10

12

14

16

18

20

Altitu

de

[km

]

Bleed Temperature [oC]

Fig. 3 : Bleed temperature as function of altitude andMach number during cruise conditions.

prioritization provides a simple but realisticdependence between relative avionics coolingperformance and cockpit comfort air flow. If theoperating conditions result in a relative coolingperformance below 80%, then the nominalcomfort airflow is reduced to a minimal levelenough to pressurize the cockpit.

4.2.2 Engine

An engine model designed to provide ECS inputbleed temperature and pressure as function of al-titude, Mach number, and ambient conditions isdeveloped. The model outputs values at assumedsteady-cruise conditions, meaning that the ECSbleed inputs do not depend on the throttle levelrate of change. Cruise conditions are assumed tobe conditions where the total aircraft lift is equalto the gravitational force

m ·a = q ·Sre f ·CL (5)

where m is the aircraft mass, a is the gravitationalacceleration, and q = 1

2ρv2 is the dynamic pres-sure. The aircraft wing area is denoted Sre f ,andCL is the lift coefficient. The total aircraft dragcoefficient CD can be expressed as

CD =CD0 +C2

LAR · e ·π

(6)

where CL is determined by Equation (5). Theaspect ratio is denoted AR and e is an efficiency

200

200

400

400

400

600

600

600

800

800

800

1000

1000

1200

1200

1400

1400

1600

1600

1800

1800

2000

2000

2200

2200

2400

2400

2600

2600

2800

2800

3000

3200

3400

3600

3800

4000

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

Mach Number [-]

0

2

4

6

8

10

12

14

16

18

20

Altitu

de

[km

]

Bleed Pressure [kPa]

Fig. 4 : Bleed pressure as function of altitude and Machnumber during cruise conditions. The pressure increaseswith increased aircraft speed and air density

factor. The second term in Equation (6) is theinduced drag coefficient. CD0 incorporates formand friction drag into the relation.

The drag force Fd is established by multiplyingEquation (6) with the dynamic pressure q andthe reference area Sre f . The required enginethrust FT is equal to this drag force during cruiseconditions.

The modelled ECS utilizes air bled from theengine post a suitable compression stage. Asimple linear relationship Pbleed = k∗FT betweenbleed pressure and the required engine thrust isassumed as the primary purpose of this enginemodel is to supply the ECS with pressurized airthat depend on the aircraft operating conditions.The constant parameter k is tuned such thatrealistic values of bleed pressure are achieved.

The bleed temperature Tbleed is estimated bymeans of

Tbleed = Tin(Pin

Pbleed)

γ−1γ (7)

for adiabatic compression of an ideal gas. Tin andPin are the stagnation temperature and stagnationpressure, respectively. The stagnation conditionsare computed as altitude, Mach number, andenvironment dependent outputs of the includedatmospheric model. The resulting model char-

7

Page 8: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

Mach Number [-]

0

2

4

6

8

10

12

14

16

18

20

Altitu

de

[km

]

0

0

0

0

10

10

10

20

20

20

20

30

30

30

30

40

40

40

40

50

50

50

50

50

60

60

60

60

60

70

70

70

70

70 80

80

80

80

90

90

90

90

100

100

100

100

100

Relative Avionics Cooling Performance [%]

Fig. 5 : Relative main avionics cooling performance asfunction of altitude and Mach number. The cooling perfor-mance is provided by the ISO lines and it ranges from 0 to100 %

acteristics are summarized in Figure 3 and 4.Numerous sources of information on the com-plex characteristics of gas turbine engines areavailable; Sayed provides a thorough compila-tion in [26].

4.2.3 Cockpit comfort

A detailed cockpit thermoregulatory model waspresented by Schminder et al. in [27] and [22].This cockpit model is included in the simulatorwhere it accounts for the steady-state and tran-sient cockpit temperature dependant on cockpitinput airflow from the ECS. The cockpit inputairflow includes air dedicated for pilot comfortas well as cockpit avionics coolant air. Theincluded cockpit model accounts for conductive,convective, and radiative heat exchange withits interfacing environments, for example, theambient conditions and the cockpit avionics.In this section, the specific parts relevant fordemonstrating pilot comfort analyses duringsimulated missions are explained.

The cockpit model provides the necessaryinputs to an included thermal comfort modelestimating the level of comfort experiencedby the pilot. The level of thermal comfortcan be expressed through the Fighter Index of

Thermal Stress (FITS), presented by Nunnely etal. [2]. This measure is developed for aviationrelated applications supporting aircrew heatstress risks assessment. Other relevant measuresquantifying thermal comfort are the Wet BulbGlobe Temperature (WBGT), the PredictedMean Vote (PMV), the Predicted Percentageof Dissatisfied (PPD), the Draft Rate, theOxford Index, the Discomfort Index, and theModified Discomfort Index. These measures areover-viewed by Schminder et al. in [27].

A model incorporating some of the listed mea-sures is included in the composite model. Itsuse is demonstrated in the application exampleas the FITS measure is utilized by the control-ling software to regulate the temperature and flowof cockpit comfort air. The control is imple-mented via a PI regulator in the software whichoutputs requested comfort air temperature pro-vided a FITS temperature set-point of 20◦C. Thecomfort model FITS output value is computedaccording to

TFIT S = 0.8281Tpwd +0.3549Tdb +5.08 (8)

where Tpwd is the wet bulb temperature. The wetbulb temperature corresponds to the minimumpossible temperature that can be reached, duringgiven ambient conditions, as a result of evapora-tion. The dry bulb temperature Tdb is the ambienttemperature excluding radiation and evaporationeffects. Nunnley et al. specify upper TFIT S lim-its where, if exceeded, the pilot may suffer fromdegraded mental performance or physical impli-cations such as dehydration. The control set-point is selected to avoid such risks. The cock-pit comfort air in fighter aircraft is traditionallycontrolled by the pilot; a measure of pilot ther-mal strain such as FITS is therefore particularlysuited for use when a pilot is unavailable.

4.3 Flight mission simulation and analysis

In [11], the methods for establishing interoper-ability between FMI and TLM were evaluatedusing a number of small scale test-cases fromdifferent engineering domains. The mission

8

Page 9: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OFTHERMAL PILOT COMFORT

simulation presented here serves as an industrygrade verification test-case for the method ofusing fine grained interpolation, in the OM-Simulator, to ensure numerical stability duringtransient conditions. In addition, the purpose ofsimulating the flight profile presented in Figure6 is to demonstrate the bi-directional depen-dence between pilot comfort and ECS overallperformance. The feedback provided by a pilotin the loop is established via a cockpit comfortair temperature set point dependent on the pilotlevel of comfort. Such an analysis provides morerealistic assessment of performance than themore traditional worst-case type investigations.

The aircraft is elevated to 12 km of altitudewhere it remains at a speed of Mach 1.1 forapproximately 3 minutes. The steady-staterelative ECS cooling performance, see Figure 5,is close to 90% in such operating conditions.The incorporated control system does not down-prioritize the flow of comfort air specified bythe pilot, and the ECS is able to maintainedthe requested comfort air temperature. A 20second dive to 6 km is then used to increase theaircraft speed from Mach 1.1 to 1.55. This isa challenging pose in terms of cooling perfor-mance, a conclusion highlighted by the resultingcockpit comfort temperature shown in Figure 6b.Even though the relative cooling performanceis sufficient and nominal flow to the cockpitcan be maintained, the ECS is unable to supplythe specified cockpit comfort air temperatureof 0◦C as a result of the combination of highbleed air and ram intake temperatures. Theaircraft is kept at these challenging conditionsfor approximately 2 minutes. The aircraft Machnumber is then reduced to 0.95 where it is keptconstant for approximately 2.5 minutes, a muchless challenging situation where nominal flowand temperature levels are feasible, before a finaldescent sequence is commenced.

A selected set of variables affecting the experi-enced pilot comfort are presented along with theFITS measure in Figure 7. The temperatures areextracted from a mission time segment where the

0 5 10 15 20 25

Time [min]

0

2

4

6

8

10

12

Altitude [km

]

0.4

0.6

0.8

1

1.2

1.4

1.6

Mach n

um

ber

[-]

Altitude

Mach number

(a) Altitude and Mach number as function of of time

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

Mach Number [-]

0

2

4

6

8

10

12

14

16

18

20

Altitu

de

[km

]

0

0

0

0

0

0

5

5

5

5

5

5

5

10

10 10

10

10

10

15

15

15 15

15

15

20

2020

20

20

25

25

25

25

25

30

30

30

35

35

35

40

45

50

55

60

65

70

758085

9095

Cockpit Comfort Air Temperature [°C]

Mission Path

(b) Flight path on top of the cockpit comfort air temper-ature during steady state operation with a maximum coldcockpit comfort air temperature setting of 0◦C

Fig. 6 : Flight profile designed to demonstrate the con-nection between comfort measures and ECS performance.The cockpit comfort air temperature is elevated at flightconditions where the ECS is unable to maintain nominaloperation

results of the implemented feedback are clearlyvisualized. The ECS output cockpit comfort airtemperature is shown as dash-dotted, the cockpittemperature as solid, and the FITS temperatureTFIT S as dashed in Figure 7a. TFIT S, see Equation8, is maintained in the close vicinity of the 20◦Cset-point throughout the mission via the cockpitcomfor air temperature. During the first fourminutes of the simulated flight, the FITS measuredeviates from the set point by approximately5◦C. In this time span, the controlling softwareis attempting to increase the temperature bymeans of opening the corresponding control

9

Page 10: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

4 6 8 10 12 14 16

Time [min]

0

10

20

30

40

50

60

Tem

pera

ture

[°C

]

Cockpit Comfort Air TemperatureCockpit TemperatureFITS

FITSReference

(a) The Fighter Index of Thermal Stress (FITS), cockpitand cockpit comfort air temperature

4 6 8 10 12 14 16

Time [min]

-20

0

20

40

60

80

100

120

140

160

180

200

Tem

pera

ture

[°C

]

Compressor Inlet TemperatureCooling Pack Outlet Temperature

(b) ECS internal temperatures affecting FITS during thesimulated mission. The compressor inlet temperature setpoint is 95◦C. The cooling pack outlet temperature setpoint is 0◦C.

4 6 8 10 12 14 16

Time [min]

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Val

ve p

ositi

on [-

]

(c) Position of cockpit comfort temperature control valve.1 and 0 represents a fully opened and a fully closed valverespectively

Fig. 7 : Simulator temperatures for a selected time seg-ment of the simulated mission

valve, see Figure 7c; however, as a result of theoperating conditions, and the current systemdesign, the control valve is saturated. The twominute temperature transient starting 10 minutesinto the mission is a result of the rapid changein operating conditions. This change result ina bleed temperature increase of approximately200◦C, see Figure 3. Even though all air isguided through the primary heat exchanger, theincrease in bleed temperature results in an ele-vated compressor inlet temperature, see Figure7b. The pack temperature control valve managesto compensate for the majority of this increase;however, the cockpit comfort air temperaturecontrol valve is specified as slower, for controlstability reasons, resulting in the temperatureincrease shown in Figure 7a. The impact onpilot comfort is clearly visualized by the elevatedvalues of FITS.

Once the Altitude and Mach number are reducedto 6 km and 0.95 respectively, the bleed and com-pressor inlet temperatures are reduced to nomi-nal levels. The cockpit comfort air temperature isgradually reduced by means of closing the cock-pit comfort valve, after the slight initial under-shoot, to compensate for the elevated values ofFITS.

5 Discussion and Conclusions

Here, a multi-purpose desktop simulator is devel-oped and presented. The simulator is deployedin the open-source simulation environment theOMSimulator providing an industrially relevantuse-case for tool development, evaluation, andverification. Two different methods of connect-ing sub-system models, exported as FunctionalMock-up Units, are successfully implementedin the OMSimulator, see Section 4.1. FMUsare coupled both using the TLM method in aComposite TLM model, and using the moretraditional connections in a single CompositeFMI model, see Section 3. The TLM Compositemodel has up to this point been the focal pointand only preliminary benchmarking betweenthe different implementations has been done.

10

Page 11: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR DETAILED STUDIES OFTHERMAL PILOT COMFORT

Furthermore, the OMSimulator implementationsare expressed using the Lua API of the tooland various OMSimulator functionality, suchas the export of composite model structure forthe Composite FMI model according to the SSPstandard, has been verified.

A method to assess and control pilot comfortvia the FITS comfort measure has been pre-sented and used to demonstrate and verify thebi-directional dependence between ECS overallperformance and pilot comfort. The CompositeTLM model is simulated for this mission. Theresults serve as an initial industry grade verifica-tion of the solution of fine grained interpolationfor FMI and TLM interoperability as no apparentmacro level numerical stability issues can beidentified. The composite model behaviour is asexpected even though the implemented controlis crude and the dynamics of the simulatorare not tuned to any existing aircraft. Usinga comfort measure for cockpit temperaturecontrol is one example of use enabled withcoupled co-simulation, compared to the tradi-tional sequential investigations. Other potentialuses are optimization studies, maximizing pilotcomfort while minimizing energy consumption,steady-state and transient analysis accounting forsub-system cross coupling effects, etc.

Incorporating FMI and TLM into M&S ofaircraft sub-systems increases the flexibilityin creating simulators comprised of detailedphysics-based models. Even though each sub-system is modelled in the most suitable tool,overhead costs associated with model integrationare kept at a minimum. From an end-userperspective, improvements in increased andsimplified tool support for both model exportand integration would aid in composite modeldevelopment and simulation. For example,greater transparency in the methods for ini-tialization, and data exchange between FMUs,would be of great benefit to the engineers usingthe techniques in industrial applications. FMI isa mature standard supported by many integratingtools; as such, expansions to the standard take

time. Even so, more frequent releases, includingexpansions of basic functionality concerningfor example numerical stability, would benefitthe community at large. However, the abilityto combine the more traditional execution ofFMUs with the TLM approach provides greatflexibility in using the most suitable techniquefor simulation. A load balanced simulator withphysical properties resulting in non-negligibletime delays and characteristic impedance, maygain significantly in robustness and performanceif the TLM technique is implemented.

6 Acknowledgements

The presented research is conducted within theframe of the ITEA3 project OpenCPS and the au-thors would like to thank the associated fundingbodies as well as all contributing project mem-bers. Special thanks to Dr. Lennart Ochel at theProgramming Environment Laboratory (PELAB)of Linköping University for his continuous sup-port and great efforts in OMSimulator devel-opment corresponding to our many of end-userneeds.

References

[1] Open Cyber-Physical System Model-Driven Certi-fied Development. https://www.opencps.eu/. Accessed: 2018-06-21.

[2] Nunneley S and Stibley R. Fighter Index of ThermalStress: Development of Interim Guidance for Hot-Weather USAF Operations. Journal of the Amer-ican Society of Heating and Ventilating Engineers,vol. 50, pp. 639–642, 1979.

[3] FMI development group. Functional Mock-up Inter-face for Model Exchange and Co-Simulation. Report2.0, Modelica Association, 2014.

[4] Köler J, Heinkel H M, Mai P, Krasser J, DeppeM and Nagasawa M. Modelica-Association-Project"System Structure and Parameterization" - Early In-sights. Proceedings of the 1st Japanese ModelicaConference. Tokyo, Japan, 2016.

[5] Krus P. Robust Modelling Using Bi-Lateral DelayLines for Real Time and Faster Than Real Time Sys-tem Simulation. Computers and Information in En-gineering Conference, Parts A and B. San Diego,California, USA, 2009.

11

Page 12: A NOVEL FMI AND TLM-BASED DESKTOP SIMULATOR FOR … · 2018-10-27 · co-simulation is provided in Section2.2. 2.1 Available standards The FMI standard specifies a generic format

HÄLLQVIST R, SCHMINDER J, EEK M, GÅRDHAGEN R, KRUS P

[6] Dahmann J and Morse K L. High Level Architec-ture for simulation: an update. Proceedings of the2nd International Workshop on Distributed Interac-tive Simulation and Real-Time Applications. Mon-treal, Quebec, Canada, 1998.

[7] Braun R and Krus P. Multi-threaded distributed sys-tem simulations using the transmission line elementmethod. SIMULATION, vol. 92, no. 10, pp. 921–930, 2016.

[8] Ljung L. System Identification, Theory for the User,vol. 2. Prentice Hall PTR, 2009.

[9] Benedict M and Drenth E. Relaxing Stiff Sys-tem Integration by Smoothing Techniques for Non-Iterative Co-Simulation. IUTAM Symposium onSolver Coupling and Co-Simulation. Darmstadt,Germany, 2018.

[10] Schierz T, Arnold M and Clauß C. Co-simulationwith communication step size control in an FMIcompatible master algorithm. Proceedings of the 9thInternational Modelica Conference. Munich, Ger-many, 2012.

[11] Braun R, Hällqvist R and Fritzon D. TLM-based asynchronous co-simulation with the func-tional mockup interface. IUTAM Symposium onSolver Coupling and Co-Simulation. Darmstadt,Germany, 2018.

[12] Siemers A, Fritzson D and Nakhimovski I. Gen-eral meta-model based co-simulations applied to me-chanical systems. Simulation Modelling Practiceand Theory, vol. 17, no. 4, pp. 612–624, 2009.

[13] Dymola Systems Engineering. https://www.3ds.com/products-services/catia/products/dymola/. Accessed:2018-06-21.

[14] Cremona F, Lohstroh M, Tripakis S, Brooks C andLee E A. FIDE - An FMI Integrated DevelopmentEnvironment. Symposium on Applied Computing.Pisa, Italy, 2016.

[15] Galtier V, Vialle S, Dad C, Tavella J P, Lam-Yee-MuiJ P and Plessis G. FMI-based Distributed Multi-simulation with DACCOSIM. Proceedings of theSymposium on Theory of Modeling & Simulation:DEVS Integrative M&S Symposium. San Diego, CA,USA, 2015.

[16] Modelica and the Modelica Association. https://www.modelica.org/. Accessed: 2018-06-21.

[17] Axin M, Braun R, Dell’Amico A and Eriksson B.Next Generation Simulation Software using Trans-mission Line Elements. Fluid Power and MotionControl. Bath, England, UK, 2010.

[18] Mengist A, Asghar A, Pop A, Fritzon P, Braun W,Siemers A and Fritzon D. An Open-Source Com-posite Modeling Editor and Simulation Tool Based

on FMI and TLM Co-Simulation. Proceedings ofthe 11th International Modelica Conference. 2015.

[19] Bordeleau F. Model-Based Engineering: A NewEra Based on Papyrus and Open Source Tooling.OSS4MDE@MoDELS. 2014.

[20] Fritzson P, Aronsson P, Lundvall H, Nyström K, PopA, Saldamli L and Broman D. The OpenModelicaModeling, Simulation, and Software DevelopmentEnvironment. Simulation News Europe, vol. 44, pp.8–16, 2005.

[21] Hällqvist R, Braun R and Krus P. Early Insights onFMI-based Co-Simulation of Aircraft Vehicle Sys-tems. Proceedings of the 15th Scandinavian Interna-tional Conference on Fluid Power. Linköping, Swe-den, 2017.

[22] Schminder J, Gårdhagen R, Nilsson E, Storck K andKarlsson M. Development of a Cockpit-Pilot Modelfor Thermal Comfort Optimization During Long-Mission Flight. Proceedings of the AIAA Model-ing and Simulation Technologies Conference 2016.2016.

[23] Fritzson P. Principles of Object-Oriented Modelingand Simulation with Modelica 3.3. 2nd edition ed.IEEE Press, 2015.

[24] Eek M, Gavel H and Ölvander J. Definition and Im-plementation of a Method for Uncertainty Aggrega-tion in Component-Based System Simulation Mod-els. Journal of Verification, Validation, and Uncer-tainty Quantification, vol. 2, 2017.

[25] Jordan P and Schmitz G. A Modelica Library forScalable Modelling of Aircraft Environmental Con-trol Systems. Proceedings of the 10th InternationalModelica Conference. Lund, Sweden, 2014.

[26] El-Sayed A F. Aircraft propulsion and gas turbineengines. 2nd edition ed. Taylor and Francis Group,LLC, 2017.

[27] Schminder J and Gårdhagen R. A generic modelto predict cockpit thermal conditions and resultingcomfort. Submitted to Building and Environmental,2018.

Copyright Statement

The authors confirm that they, and/or their company or or-ganization, hold copyright on all of the original materialincluded in this paper. The authors also confirm that theyhave obtained permission, from the copyright holder of anythird party material included in this paper, to publish it aspart of their paper. The authors confirm that they give per-mission, or have obtained permission from the copyrightholder of this paper, for the publication and distribution ofthis paper as part of the ICAS proceedings or as individualoff-prints from the proceedings.

12