• No results found

Black-Box Model Development of the JAS 39 Gripen Fuel Tank Pressurization System : Intended for a Model-Based Diagnosis System

N/A
N/A
Protected

Academic year: 2021

Share "Black-Box Model Development of the JAS 39 Gripen Fuel Tank Pressurization System : Intended for a Model-Based Diagnosis System"

Copied!
115
0
0

Loading.... (view fulltext now)

Full text

(1)

of the JAS 39 Gripen Fuel Tank Pressurization System

- Intended for a Model-Based Diagnosis System

Master’s thesis performed at: Division of Automatic Control Department of Electrical Engineering

Linköpings universitet

Vibeke Kensing

Reg nr: LiTH-ISY-EX-3294-2002

Supervisors: Lic.Eng. Jacob Roll, Division of Automatic Control, LiTH Lic.Eng. Martin Jareland, Saab AB

Examiner: Prof. Torkel Glad, Division of Automatic Control, LiTH Linköping 19 December

(2)
(3)

Institutionen för Systemteknik 581 83 LINKÖPING 2002-12-19 Språk Language Rapporttyp Report category ISBN Svenska/Swedish X Engelska/English Licentiatavhandling

X Examensarbete ISRN LITH-ISY-EX-3294-2002

C-uppsats

D-uppsats Serietitel och serienummer

Title of series, numbering

ISSN

Övrig rapport ____

URL för elektronisk version

http://www.ep.liu.se/exjobb/isy/2002/3294/

Titel

Title

Blackboxmodellering av tanktrycksättning hos bränslesystemet i JAS 39 Gripen -Avsedd för ett modellbaserat diagnossystem

Black-Box Model Development of the JAS 39 Gripen Fuel Tank Pressurization System - Intended for a Model-Based Diagnosis System

Författare

Author

Vibeke Kensing

Sammanfattning

Abstract

The objective with this thesis is to build a Black-Box model of the tank pressurization system in JAS 39 Gripen. This model is intended to be used in an existing diagnosis system for the security con-trol in the tank pressurization system. The tank pressurization system is a MIMO system. This makes the identification process more complicated when the best model is to be chosen. In this master's thesis the identification procedure for a MIMO system can be followed. Testing of the diagnosis system with the created Black-Box model shows that the model seems to be good enough. The diagnosis system takes the right decisions in the performed simulations. This shows that system identification might be a good alternative to physical modelling for a real-time model. The disadvantage with the Black-Box model is that it is less accurate in steady-state than the phys-ical model used before is. The advantage is that it is faster than the physphys-ical model. The diagnosis system and the model developed in this thesis are not directly applicable on the real system today. The model has to be redesigned on the real system, this is also the case for the diagnosis system. The diagnosis system also has to be redesigned, so general flight cases, not only the security control can be supervised. However, experiences and choices like input and output signals, and choice of sample interval can be reused from this thesis when a new model might be developed.

Nyckelord

Keyword

(4)
(5)

The objective with this thesis is to build a Black-Box model of the tank pres-surization system in JAS 39 Gripen. This model is intended to be used in an existing diagnosis system for the security control in the tank pressurization system.

The real tank pressurization system could not be used for this master’s thesis for several reasons. One reason is that the sensors available today are not suffi-cient for building a black-box model, neither could the diagnosis system be developed with these sensors. Therefore, the real system is replaced by a sim-ulation model, built in Easy5. This model is quite accurate but too slow for a real-time diagnosis system.

The tank pressurization system is a MIMO (multiple input multiple output) system. This makes the identification process more complicated when the best model is to be chosen. In this master’s thesis the identification procedure for a MIMO system can be followed.

Testing of the diagnosis system with the created Black-Box model shows that the model seems to be good enough. The diagnosis system takes the right decisions in the performed simulations. This shows that system identification might be a good alternative to physical modelling for a real-time model. The disadvantage with the Black-Box model is that it is less accurate in steady-state than the physical model (based on the Easy5 model) used before is. The advantage is that it is faster than the physical model.

The diagnosis system and the model developed in this thesis are not directly applicable on the real system today. The model has to be redesigned on the real system, this is also the case for the diagnosis system. The diagnosis sys-tem also has to be redesigned, so general flight cases, not only the security control can be supervised. However, experiences and choices like input and output signals, and choice of sample interval can be reused from this thesis when a new model might be developed.

(6)
(7)

This master’s thesis was performed at the Department of Simulation and Ther-mal Analysis (GDGT), Saab Aerospace, Saab AB, autumn 2002.

I would like to thank my supervisors, Jacob Roll (LiTH), and Martin Jareland (Saab AB), thank you both for guidance and discussions. Also, thanks to all my colleagues in the group GDGT for all the laughs in the coffee breaks.

I would also like to thank, Pär Alderhammar. Thank you for all support and es-pecially for taking care of all our laundry this autumn.

(8)
(9)

Contents

1 Introduction 1 1.1 Background . . . 1 1.2 Objectives. . . 2 1.3 Limitations . . . 2 1.4 Outline . . . 3

2 The Fuel System 5 2.1 Description . . . 5

2.2 The Tank Pressurization System . . . 7

2.2.1 System Description . . . 7

2.2.2 The Components . . . 8

2.3 Easy5 . . . 12

3 System Identification 15 3.1 Linear Black-Box Models . . . 16

3.1.1 Input-Output Black-Box Models . . . 16

3.1.2 State-Space Models . . . 18

3.1.3 Determination of the Models . . . 20

3.1.4 Advantages and Disadvantages with Different Structures. . . 21

3.1.5 Multivariable systems . . . 21

3.2 The Identification Process . . . 22

3.2.1 Choice of Input Signal . . . 22

3.2.2 Choice of Sampling Interval . . . 23

3.2.3 Preprocessing Data . . . 23

3.3 Model Validation . . . 25

3.3.1 Model Quality . . . 25

3.3.2 Residual Analysis . . . 26

4 Considerations 27 4.1 The Easy5 Model . . . 27

4.2 Experiment Choices . . . 28

4.2.1 The Input and Output Signals . . . 28

4.2.2 Choice of Input Signals . . . 29

4.2.3 Choice of Sample Interval . . . 33

4.2.4 Choice of Prefilter . . . 35

4.3 Choice of Model Structure . . . 36

4.4 Two Model Alternatives . . . 37

5 Model Alternative I 39 5.1 Definition . . . 39

(10)

5.2 Preprocessing Data. . . 40

5.2.1 Trends and Offsets . . . 40

5.2.2 Outliers and Missing Data . . . 40

5.2.3 Scaling . . . 41

5.3 Models . . . 42

5.3.1 Fit. . . 44

5.3.2 Zeros and Poles . . . 49

5.3.3 Residuals . . . 51 5.3.4 Bode Plots . . . 53 5.4 Results . . . 53 6 Model Alternative II 55 6.1 Definition . . . 55 6.2 Preprocessing Data. . . 56 6.3 Models . . . 56 6.3.1 Fit. . . 57

6.3.2 Poles and Zeros . . . 60

6.3.3 Residuals . . . 62

6.3.4 Bode Plots. . . 63

6.4 Results . . . 63

7 The Diagnosis System 65 7.1 Model-based Diagnosis . . . 65

7.1.1 Test Quantities . . . 67

7.1.2 Hypothesis Tests . . . 67

7.2 Test of the Tank Pressurization Diagnosis System. . . 68

7.3 Results . . . 70

8 Discussion and Conclusions 75 8.1 Discussion . . . 75 8.2 Conclusions . . . 77 8.3 Future Work . . . 78 Notation 79 References 81 Appendix A 83 Appendix B 93 Appendix C 103

(11)

1

Introduction

This master’s thesis has been carried out in cooperation with Saab AB. Saab AB is one of the world's leading high-technology companies, with its main operations focusing on defence, aviation, and space. The company is active both in civil and military industry and consists of the business areas Saab Sys-tems and Electronics, Saab Aerospace, Saab Technical Support and Services, Saab Bofors Dynamics, Saab Ericsson Space, and Saab Aviations Services. This master’s thesis is performed at Saab Aerospace at the Department of Simulation and Thermal Analysis of General Systems.

1.1

Background

The main product of Saab Aerospace is the Gripen combat fighter, which is the first operational fourth generation aircraft. A fourth generation aircraft is characterized by an extended use of integrated computerized systems. The availability of information from all parts of the aircraft in combination with the computational capability of Gripen enables the implementation of supervi-sion methods.

(12)

One supervision method is model-based diagnosis, which is a technique that focuses on hardware faults and considers their effects on the supervised pro-cess. Model-based diagnosis uses a software model of the system being super-vised and a diagnosis system. This thesis focuses on creating a model using system identification techniques.

Three master’s theses have been performed in the area of supervision within General Systems at Saab Aerospace. Two of them have created diagnosis sys-tems for the environmental control system (ECS) and the tank pressurization system, respectively (see ref. [5] and [8]). The purpose was to investigate which faults within these systems that could be detected and isolated with the sensors available today, and to clarify where new sensors could be useful to detect and isolate other faults. To do this, a good model of the system working in real time is necessary. The use of real-time models makes it possible to immediately alert the pilot in case of serious faults occurring during flight. Also, for an UAV (Unmanned Aerial Vehicle) a diagnosis system is useful, but here the operator is alerted.

1.2

Objectives

The purpose of this master’s thesis is to build a Black-Box model of the tank pressurization system in JAS 39 Gripen, using system identification tech-niques. Hopefully, this model can be used in real-time for a model-based diag-nosis system.

1.3

Limitations

To carry out this master’s thesis, data collection has to be performed on the tank pressurization system. A real flight is not an option for a master’s thesis, so the model is built on a computer model-based on physical insight. Building a model of a model might seem a little strange, but one reason is the one men-tioned above and further reasons will be treated below.

A limitation in the model used is, naturally, that it is not the real system. Some components in the model are simplified. The Controlled Vent Unit (CVU) could be modelled better to perform more like the real one. The modelled reg-ulator in the system used is possible too fast and fuel is not taken from all of the tanks. Neither has the model possibility to add drop tanks in a simple way. Another limitation is that the sensors available in an ordinary JAS 39 Gripen today cannot provide the information needed to create the desired real-time

(13)

model. Therefore, many sensors are assumed to be available. A study whether more sensors will be added to the system or not is being performed, but so far hardware redundancy and robust design is preferred.

The sample interval, with which data can be collected is also limited. The sample interval available for a diagnosis system today is not fast enough for this project so the limit is a little bit exceeded. This is discussed in detail in the report.

1.4

Outline

The work in this thesis will be presented as follows:

In Chapter 2 the Gripen fuel system is described. Here the tasks of the tank pressurization system are presented, and the components are described.

In Chapter 3 the theory of system identification is introduced.

In Chapter 4 considerations and common choices for the identification pro-cess, e.g., the sample interval used in the data collection, is discussed. Here two model alternatives are presented.

In Chapter 5 model alternative I is discussed and evaluated. In Chapter 6 model alternative II is discussed and evaluated.

In Chapter 7 the diagnosis system is tested for the model created in model alternative I.

In Chapter 8 the conclusions are discussed. Future work that can be performed is also presented.

(14)
(15)

2

The Fuel System

In this chapter the Gripen fuel system is presented (see ref. [2]). The tank pressurization system, which is a part of the whole fuel system, and also the system to be modelled, is described in Section 2.2. The components in the tank pressurization system are also described here. In Section 2.3 the pro-gram, which is used for calculations on the system, is presented.

2.1

Description

The fuel system has three main tasks:

1. Provide the engine with fuel under all flight conditions with good redundancy.

2. Keep the center of gravity at an optimal position by moving fuel between the tanks.

3. Provide cooling to a number of systems, e.g., radar, electronics, AGB (auxiliary gear box) oil, hydraulic etc.

(16)

To be able to fly as far as possible, all unused space is used as fuel tanks (see Figure 2.1).

Figure 2.1: The JAS 39 Gripen fuel system.

The Gripen fuel system consists of seven tanks (see Figure 2.1 and Figure 2.2). The tanks are named Tank 1 to Tank 5 (T1-T5), Vent Tank (VT) and Negative-G Tank (NGT). Three drop tanks can also be included in the system.

Figure 2.2: Schematic view of the fuel system.

T1 VT T2 T3 T5 T4 DT

(17)

2.2

The Tank Pressurization System

There are several reasons for tank pressurization. One of its main tasks is to improve the fuel feed to the engine. Another is that without it, there is a risk of cavitation damage and evaporation of fuel at low pressure at high altitudes. Hence, all tanks are pressurized at high altitudes. Another reason for tank pressurization is to improve transfer of fuel into T1 from peripheral tanks. Here all tanks except T1 are pressurized. The last reason is to prevent negative pressure at diving and at inverted flight.

2.2.1 System Description

The tank pressurization system consists of a Controlled Vent Unit (CVU), a pressure regulator, an air cleaner, and an air ejector. To understand the func-tion of the pressurizafunc-tion system a short explanafunc-tion follows.

The air that supplies the system is provided by the Environmental Control System (ECS). This air is cleaned by the air cleaner. Before the air enters the fuel tanks it passes the pressure regulator, the air ejector, and the CVU (see Figure 2.3). The pressure regulator controls the tank pressure to desired level. The air then flows through the air ejector, which adds extra airflow into the tanks. The air ejector is connected to the VT. This tank is connected to the atmosphere by a vent pipe to keep the pressure at ambient pressure at all times. The last step for the air is through the CVU into the tanks that are to be pressurized.

The diagnosis system built for the tank pressurization system is built on the Safety Check (SC). The SC is a safety check of the tank pressurization sys-tem, that is made before JAS 39 Gripen gets its permission to fly. Models will be built on both the SC case and a general flight case in this thesis.

During the SC, the tank pressurization system is tested by switching on the pressure regulator checking if the pressurization works. The CVU is in a posi-tion where all tanks are pressurized and the pressure from the ECS system is just added at the time where the SC starts.

(18)

Figure 2.3: Pressurization System Principle.

2.2.2 The Components

In the previous section the components of the tank pressurization system were mentioned. To understand the purpose of every component a description fol-lows (see ref. [2]).

The Controlled Vent Unit

The CVU has the following functions:

• Ensure that the tanks are ventilated during refueling. • Keep all tanks except T1 pressurized during flight. • Keep T1 pressurized when ordered.

• Protect the tanks against large differences in pressure between their inside and outside.

• Alert if the pressure is too high or too low.

CVU T1 T3 WT DT Vent tank Flame arrestor Air ejector Pressure regulator Air cleaner Air supply Ambient air

Air pressure reference

(19)

Figure 2.4: The Controlled Vent Unit in its three positions.

The CVU is, as mentioned above, in control of which tanks that will be pres-surized. It does this by dividing the airflow into the different tanks. The CVU has three different positions, Medium, Partial, and All, see Figure 2.4. When the CVU is in position Medium all tanks are ventilated into the VT. This is used during refueling. In position Partial all tanks except tank 1 are pressur-ized. The reason why tank 1 is not pressurized is that the fuel pump takes fuel from tank 1, i.e., when all other tanks are pressurized it helps to transfer fuel into tank 1. All is the position when all tanks are pressurized, which is used at high altitude and at low fuel level.

The Pressure Regulator

The pressure regulator has the following functions:

• Regulate the tank pressure to 25±5 kPa over ambient air pressure. This is done when the tanks are to be pressurized.

• Cut the airflow to the tanks when they are not to be pressurized.

The input signal to the pressure regulator is air from the ECS, and the output signal is air with desired pressure that flows on to the air ejector. Apart from Air Air Air Air To all tanks without T1 From ejector

Position All Position Partial Position Medium Disc To T1 Spring Force Feeding pressure Refueling pressure

(20)

this there are two more connections, one for the tank pressure reference, the pressure in the CVU, and one for the ambient air pressure.

Figure 2.5: The pressure regulator.

The pressure regulator works like a valve and regulates an area,A (see Figure

2.5). The pressure from the CVU (the same pressure as in the tanks), flows into a piston in the pressure regulator. From the other side the piston is affected by a spring and the ambient pressure. The spring force corresponds to 25±5 kPa of pressure. When the pressure in the tanks is at its desired level, the air flow from the regulator is throttled.

The Air Cleaner

The only task of the air cleaner is to clean the air that enters the tank pressur-ization system from the ECS. The input to the air cleaner is the air from the ECS and the output is air into the tank pressurization system (see Figure 2.6). Inside this filter there is a vortex generator, which puts the air in a vortex. Par-ticles in the air are thrown towards the particle chamber (formally named tran-quillization chamber) and the cleaned air then flows to the pressure regulator.

(21)

Figure 2.6: The air cleaner.

The Air Ejector

The task of the air ejector is to push air into the CVU during tank pressuriza-tion. The primary flow is received from the pressure regulator and the second-ary flow is received from the VT (see Figure 2.7).

When the pressure in the regulator is greater than in the tanks, air flows from the regulator through the mouthpiece in the ejector and towards the CVU. Where the air leaves the mouthpiece a negative pressure is produced, and this gives the effect that also air from the VT flows into the CVU.

Figure 2.7: The air ejector.

Primary flow

Secondary flow

Secondary flow

(22)

2.3

Easy5

Simulation and estimation of the fuel system is done in a program called Easy5. This program is comparable to Simulink, Matlab, but it is easier to get an overview of the model. The tank pressurization model would be enor-mously complex in Simulink. Easy5 also offers more functions and ready-made components that are usual in flight systems. This follows from the cre-ator of the program, the company Boeing.

There are several reasons behind the use of Easy5 instead of Simulink. The most important one is that in Easy5 a model is built with one connection for every physical connection, e.g., a pipe. In a pipe there could be more than one signal transferred, for example the physical signals pressure and flow. This way of working is called power port modelling and it is not possible in Sim-ulink (until now). In Figure 2.8 the tank pressurization model in Easy5 is shown.

A lot of effort has been laid on learning Easy5 and also on changing the Easy5 model so the model fits this project. The Easy5 model has been refined, struc-tured and made more pedagogic. It has also been changed so that data collec-tion (see Seccollec-tion 3.2) can be made on this model. For the data colleccollec-tion a low pass filter (see Section 4.2.4) has been added to prevent aliasing. There has also been some testing of the model (see Section 4.1).

There are some components and functions simplified in the Easy5 model. One component is the CVU, which is substantially simplified compared to the real CVU. When the CVU goes from position All to Partial or the opposite way it always passes position Medium. In Easy5 the switch between All to Partial happens directly without passing position Medium, it also happens to fast. The regulator is implemented as a PI-regulator and is probably too fast in the Easy5 model, which has given some problems that are discussed later on. Another limitation is that T1 always has a full tank. Therefore, a simulation that takes more fuel than the rest of the tanks can provide is not possible. Nor are any drop tanks included in the Easy5 model.

(23)

Figure 2.8: The tank pressurization system in Easy5. CVU ejector 3 2 1 JP Venting Tank TC Flying Tank CVU Node NT Venting Pipe PF Pipe w friction

Nodal Tank (7 ports)

MT

Node

Flame Arrester

PF11

Pipe w friction Flying

Tank T2-T5 & DT TD Inlet ejector NT12 Node Pressure Regulator PO Pipe/Orifice Inlet Regulator NT13 Node Longer Pipe Pipe + Filter PP ReadFile Flight Data Pamb(Alt) Fortran 1 1 1 1 -1 1 CVU to T2-T5 & DT PO11 Pipe/Orifice

pres. reg. area

Common Data Input Relief Valve Fortran PA FD PA FD S2 SJ14 -1 hour -> s PA FD CVU-T1 PO4 Pipe/Orifice PA FD Altitude Fortran Flying Tank T1 & NGT TD2 CVU_setting S2 TB S2 SJ Simulated and

accumulated CPU times

Fortran

Area as function of time

FC CVU-T1 PO2 Pipe/Orifice CVU-VT PO3 Pipe/Orifice S2 S1 Pecs P NT P NT node Node NT2 ACVU_VT ACVU_T1 S2 SJ11 MF TD Fortran Pressure 1 1 S2 GN12

(24)
(25)

3

System Identification

In this chapter, basic theory in system identification is introduced. First differ-ent model structures are presdiffer-ented in Section 3.1. In Section 3.2 the iddiffer-entifica- identifica-tion process is described and in Secidentifica-tion 3.3 the theory of model validaidentifica-tion is presented. To read more theory than what is presented in this chapter see ref. [3] and [6].

System identification is one way to build a mathematical model of a real sys-tem. It uses measured data to estimate a model. Data that is collected to build the model are measurements from, e.g., input and output signals. There are two general ways to use data to identify a whole system or unknown parts like a constant in a system:

1. Build a model, which describes how outputs depend on inputs with-out any physical insight. There are two ways to do this:

a. One way is to build a linear model by their impulse response or by frequency analysis.

b. Another way is to build a linear Black-Box model, where the parameters are determined to fit the data, see Section 3.1.

(26)

2. Use data to determine unknown system parameters in a physical model. A model produced this way is called Grey-Box model.

In this thesis, a Black-Box model of the tank pressurization system is built, thus only theory on this subject will be discussed further on.

In Figure 3.1 below the identification process is described. The theory for the different boxes are described in the next sections. The words that are in italic are the programs used in this thesis to solve the task of the box.

Figure 3.1: The identification process.

3.1

Linear Black-Box Models

A Black-Box model can be used, e.g., when the system to be modelled, has an unknown construction or too complicated physical relations. There are several standard Black-Box models. Four input-output model structures are discussed in this thesis. The state-space model structure is also discussed below and that is the one which is used for identification of the tank pressurization system.

3.1.1 Input-Output Black-Box Models

A general linear model can be written as:

(3.1) where w(t) is a disturbance which is written as:

Experiment Design Easy5 Choose Model Calculate Model Matlab SITB (GUI) Validate Model Data Choose Criterion of Fit OK Not OK Start y t( ) = G q( , θ)u t( )+w t( )

(27)

(3.2) wheree(t) is white noise.

Write and as:

(3.3) where , , , and are polynomials. The complete model can now be written:

(3.4) Depending on how G(q,θ) and H(q,θ) are chosen different models can be built. The most common model classes are ARX, ARMAX, OE (Output Error), and BJ (Box Jenkins).

The orders of the polynomialsB, C, D and F are described by the parameters nb, nc, nd andnf. There is another parameter, nk, the time delay, which is to be determined for every model. By determining all parameters a BJ model is attained. If the noise signal is not modelled at all, i.e., H(q)≡1, thus nb,nfand

nk are chosen, an OE model is obtained. There is also a possibility to let the denominators inG and H be equal. This polynomial is then called A. Then if na, nb, nc and nk are chosen an ARMAX model is obtained. If C is set to 1

( ) an ARX-model is obtained. In Figure 3.2 the different model struc-tures are presented in block diagrams.

w t( ) = H q( ,θ)e t( ) G q( ,θ) H q( ,θ) G q( ,θ) B q( ) F q( ) ---= and H q( ,θ) C q( ) D q( ) ---= B q( ) C q( ) D q( ) F q( ) y t( ) B q( ) F q( ) ---u t( ) C q( ) D q( ) ---e t( ) + = nc = 0

(28)

Figure 3.2: The introduced input-output model structures.

3.1.2 State-Space Models

Another standard model class is the state-space model (see ref. [6]). A general discrete state-space model can be written as:

(3.5)

where w(t) is process noise and v(t) is measurement noise. The dimension of

the state, x, is n and the dimension of the input signal, u, is m. This implies

that A and B are matrices with the dimensions n ×n and n ×m, respectively.

The dimension of y is p, which implies that C and D have the dimensions p× n and p× m.

When the prediction of y(t) is determined a Kalman filter is used. The

predic-tion of y(t) is, regardless of model structure, written as:

Σ Σ 1 A ----B BF ---Σ 1 A ----B B---F Σ C e e e e C D ----u u u u y y y y ARX OE ARMAX BJ x t( +Ts) A( )θ x t( ) B( )θ u t( ) w t( ) y t( ) + + Cx t( ) +Du t( )+ v t( ) = =

(29)

(3.6) The predictedy(t) is given by:

(3.7)

Here and the Kalman gainK(θ) is given by:

(3.8) where:

(3.9)

The matrix P(θ) is the positive semidefinite solution of the stationary Riccati

equation:

(3.10)

The predictedy can now be written as:

(3.11)

The prediction error, , is defined as:

(3.12) Now (3.7) can be rewritten as:

(3.13)

This representation is called innovations form of the state-space description and is used in System Identification Toolbox, Matlab, to estimate a Black-Box model in space form. This last equation is easy to rewrite so this

state-yˆ t( θ) xˆ t( +Ts,θ) A( )θ xˆ t( ) B( )θ u t( ) K( )θ (y( )t C( )θ xˆ t( ,θ) ) yˆ t( θ) – + + C( )θ xˆ t( , θ) = = D = 0 K( )θ = [A( )θ P( )θ CT( )θ +R12( )θ ][C( )θ P( )θ CT( )θ +R2( )θ ]–1 R1( )θ Ew t( )wT( )t R2( )θ Ev t( )vT( )t R12( )θ Ew t( )vT( )t = = = P( )θ A( )θ P( )θ AT( )θ R1( )θ [A( )θ P( )θ CT( )θ +R12( )θ ] C( )θ P( )θ CT( )θ +R2( )θ [ ]–1 × [A( )θ P( )θ CT( )θ +R12( )θ ]T – + = yˆ t( θ) C( )θ [qIA( )θ +K( )θ C( )θ ]–1B( )θ u t( ) C( )θ [qIA( )θ + K( )θ C( )θ ]–1K( )θ y t( ) + = e t( ) e t( ) = y t( )–C( )θ xˆ t( ,θ) xˆ t( +Ts, θ) A( )θ xˆ t( , θ) B( )θ u t( ) K( )θ e t( ) y t( ) + + C( )θ xˆ t( , θ)+e t( ) = =

(30)

space approach can be compared with the polynomial approach in Section 3.1.1.

Directly Parametrized Innovations Form

The Kalman gainK is computed as in (3.8). If nothing is known about , , and , a direct parametrization of K should be used instead of

determining K as in equation (3.8). This is called directly parametrized

inno-vations form. To understand the fact that there are less parameters in the directly parameterized innovation form a dimension comparison has to be done. The R matrices describing the noise properties contain

(3.14) matrix elements. The Kalman gain K only contains np elements (p=dim y, n=dim x) so if K is parametrized directly the dimension of θ is kept smaller than if K is determined as in equation (3.8).

3.1.3 Determination of the Models

In this thesis the method that is used to determine θis a prediction-error iden-tification method. A short explanation of the approach follows. Form the pre-diction error as:

(3.15) Assume that there are N collected data samples. Then form the loss function

as:

(3.16)

Now it is logical to choose θ as the value which minimizes the loss function: (3.17) In System Identification Toolbox GUI in Matlab models can be estimated with the methods PEM and N4SID. The PEM method is used in this master’s the-sis. It is a maximum likelihood prediction based method. The initial values are

R1( )θ R12( )θ R2( )θ 1 2 ---n n( +1) np 1 2 ---p p( +1) + + ε( )t = y t( )–yˆ t( , θ) VN( )θ 1 N ---- ε2(t,θ) t = 1 N

= θˆ N arg min θ VN( )θ =

(31)

estimated with auto, which uses the method N4SID to estimate them. The method N4SID is a subspace method (see ref. [7] page 2-18, and 2-25).

3.1.4 Advantages and Disadvantages with Different Structures

Which model structure should be chosen? To answer this question, advantages and disadvantages with the different model structures are discussed.

One disadvantage with the ARX model is that the noise model gets the same poles as the process model. Often this is not likely to be the case in reality. The ARMAX model models the system noise a little more than the ARX model because of the polynomial C. But the poles to the noise model are still

the same as the poles to the process model.

The advantage with the OE model is that the system dynamic is modelled sep-arately, but the disadvantage is that the system noise is not modelled at all. The BJ model models both the process model and the noise model with all possible polynomials. The disadvantage here is that it is difficult to find the right combinations in the orders of the polynomials.

The state-space model has the advantage that both the dynamic and the noise in the system is modeled and still there is just one parameter to decide, the number of states,n.

The discussion of which model structure that should be used in the system identification continues in Section 4.3, but before that decision is taken theory about multivariable systems is needed.

3.1.5 Multivariable systems

In the theory in Section 3.1.1 about different model classes only SISO (single input single output) systems were discussed. There will be some changes in the theory when the system is a MISO (multiple input single output) or MIMO (multiple input multiple output) system. These systems are commonly denoted, multivariable systems. For both MISO and MIMO systems extra work is needed. There are two main parts with extra work involved (see ref. [6] page 44):

1. Notational changes in terms of keeping track of the transposes and also that certain scalars become matrices.

2. Multioutput models have a much richer internal structure than single-output systems. This leads to that their parametrization is nontrivial.

(32)

The first point is a minor problem; it just results in more complicated mathe-matics. It gets more difficult to find the global minimum. Unfortunately the second point is a bigger problem. A reason for the difficulties is that couplings between several inputs and outputs lead to more complex models. The rich structure results in that more parameters are needed to obtain a good fit.

Let us take a look at the differences in notations between a multivariable sys-tem and a scalar syssys-tem. Consider a syssys-tem where the output signal has p

components and the input signal has m components. A general multivariable

system can, as defined in equation (3.1), be written as:

(3.18) where G(q) now has dimension p × m and H(q) has dimension p × p. The

sequence e(t) is a sequence of independent random p-dimensional vectors.

The transfer function denoted Gij(q), is the scalar transfer function from input

number j to output number i.

In the state-space representation the matrices B and C get greater dimension.

Otherwise there are no changes in the state-space representation, which is an advantage.

3.2

The Identification Process

It is necessary that collected data, which will be used in the identification, contains important, essential information about the system that is to be identi-fied. Therefore, it is of great importance how the input signal and the sample interval are chosen. There are some decisions to make:

1. Which signals are to be measured? 2. How should the input signals be chosen? 3. What sample interval should be used? 4. How much data needs to be collected?

3.2.1 Choice of Input Signal

To obtain a good mathematical model, the frequency content of the input sig-nal has to be large for the interesting frequencies of the real system.

In case the system allows to choose an input signal that varies between two levels, a telegraph signal could be a good signal. The signal switches between

(33)

two levels with a certain probability at each time point. If the system is nonlin-ear the signal should vary around the operating point. In this case the input signal has to vary between at least three levels; otherwise the nonlinearity does not appear and will not be discovered. Another useful input signal that gives useful information about the system is to just add white noise to a case that puts the system in its most critical limits.

A rule of thumb for choosing an input signal in the time domain is to choose one that varies so much that the smallest time constants appear in the data. It is also important to have such constant intervals that the slow frequencies appear (see ref. [3] page 266).

3.2.2 Choice of Sampling Interval

Sampling generally leads to information losses. For that reason the choice of sampling interval is very important. Generally, it is better to sample too fast than too slow. The disadvantages to sample too fast is that new sample points does not give much new information about the system and that numerical problems may arise in the identification process. But if the sampling interval is too large, it gets harder to describe the system dynamics.

A rule of thumb is to choose a sample frequency, which is approximately 10 times the bandwidth of the system (see ref. [3] page 270). This is approxi-mately equivalent to 4-8 samples on the slope of the step response.

Aliasing

When a system is sampled it is important to have an antialiasing filter to pre-vent aliasing. Frequencies that are greater than the Nyquist frequency will according to the sampling theorem (see ref. [4] page 255) if they are not fil-tered, be interpreted as lower frequencies after sampling.

The antialiasing presampling filter should be a low pass filter with its cut-off frequency just below the Nyquist frequency.

3.2.3 Preprocessing Data

The data, which is collected, has to be examined before use in identification algorithms. Some questions that should be considered are:

1. Do slow variations, offsets and drifts, have to be removed?

(34)

3. Are all samples reliable, or are there any outliers? 4. Does data has to be decimated?

Data sections for the estimation and the validation are to be chosen. Here it is important to choose sections which are suited for the identification process.

Offsets and Drifts

There are three different ways of dealing with these problems. The first way is to remove trends and offsets (means) by subtraction. The second way is to let the noise model take care of the disturbances. The last way is to estimate a parameter that is the offset.

If there is an off-line application with offsets the recommended approach is the first one. The offsets that is removed before the estimation, has to be com-pensated when the model is used. If a steady-state experiment is not possible the recommended approach is the second one. It is especially important to remove offsets when output error models are to be used (see ref. [6] page 460-461).

Outliers and Missing Data

An outlier is a data point where it is obvious that the measuring sensor has failed. These outliers have a negative effect on the estimation of the parame-ters if they are accepted.

Another problem can be missing data. This can be solved by using linearly interpolated values for missing data. The missing data can also be seen as parameters, which can be estimated.

Scaling

If the input and output signals have big deviations from each other scaling is to prefer.

Scaling of the signals solves problems like large loss function values that is easy to get when different signals are of different sizes. It also gives every input and output the same importance.

To understand the fact that scaling solves the problem with the big loss func-tion the definifunc-tion of this term follows. The loss funcfunc-tion is for multi-output systems the determinant of the estimated covariance matrix of the innovations (e(t)). The prediction error can deviate with big values from each other,

(35)

because of the big deviations in the signals, which will give big loss function values.

3.3

Model Validation

Validation means examination of the quality and structure of a model. Another way of viewing validation is as a way of trying to answer the question whether the model is good enough to fill its purpose. Validation is also used to try dif-ferent structures and then decide which one of the given models that gives best results.

3.3.1 Model Quality

There are three main points to help deciding if a model is satisfactory or not. The model quality is related to the usage of the model. The model has to be good enough for, e.g., simulation or what the usage is. The model quality is also related to the capacity of the model to reproduce the behavior of the real system. This can be examined with functions such as fit, and loss function. Another way of examine the quality is to evaluate if the model has the same characteristics when they are built of different sets of data. If that is true then the model probably is a good model of the system.

Fit

Fit is a performance measure that compares the measured output with simu-lated or predicted output of the model. The definition of fit (see ref. [7]) is:

(3.19) where is the average of the measured output. The fit gets better when more inputs are included and often gets worse when more outputs are included. The reason for this is, the more outputs the system has, the tougher job the model has to take care of. If there are difficulties obtaining a good model for a multi-output system, it might be wise to model one multi-output at a time. This is okay if the model is to be used for simulation, but, if the model is to be used for pre-diction and control, it is better to build the model with all outputs at one time. This is because knowledge of previous outputs from all channels gives a better basis for prediction, than just knowing the past outputs in one channel.

fit 100 1 y yy ---–     = y

(36)

3.3.2 Residual Analysis

To evaluate the residual also gives a lot of information during validation of a model. The residual is here the same thing as the prediction error:

(3.20) Now the cross correlation between ε(t) and the input signal u(t) can be formed

as:

(3.21)

The covariance between ε(t) and should ideally be independent for allτ> 0. This means that it is supposed to be zero for allτ> 0. If not, there are traces of the past inputs in the residuals. This means that there is a part of y(t)

that originates from the past input and that has not been properly picked up by the model. In other words, the model could be better.

Another function that gives information about the residuals is the auto correla-tion funccorrela-tion. It is defined as:

(3.22)

The auto correlation of the residuals describes how the prediction error in dif-ferent times depend on each other. This function should be zero for all τ ≠ 0. Forτ = 0 the function describes the noise variance.

ε( )t = ε(t,θˆN) = y t( ) –yˆ t( ,θˆN) RεNu( )τ 1 N ---- ε( )t u t( –τ) t = 1 N

= u t( –τ) RεN( )τ 1 N ---- ε( )εt (t –τ) t = 1 N

=

(37)

4

Considerations

In this chapter, some design choices for the identification of the tank pressur-ization system are discussed. In Section 4.1 the modelling of a model is dis-cussed and motivated. Section 4.2 presents experiment choices such as which signals should be considered as input and output signals, input signals to the estimation, and sample interval. In Section 4.3, the model structure which will be used is chosen and in Section 4.4, two model alternatives are presented.

4.1

The Easy5 Model

In Chapter 2 a description of the tank pressurization system is made. It is almost impossible to collect data for this master’s thesis on the real tank pres-surization system. One reason is, that the sensors needed to the data collection is not available in an ordinary JAS 39 Gripen today. Therefore, the data collec-tion had to be done on a model of the real system.

To build a model of a model could seem a little strange. Below a discussion follows about the model, which will replace the tank pressurization system, to motivate this modelling of a model.

(38)

The Easy5 model mentioned in Section 2.3 is very accurate but also very slow. Therefore it gives realistic results but it also takes some time to get them. To ensure that the model is good enough some testing had to be done. This was done with help from some plots of real cases. With knowledge about the input signals that created these plots a comparison could be done. The result was pleasant and the conclusion was that the model was accurate enough to replace the real system. Unfortunately, this comparison could not be shown because of security reason.

Another reason to use the Easy5 model instead of the real system is the pur-pose of this master’s thesis; to create a Black-Box model of the tank pressur-ization system intended for the diagnosis system. This diagnosis system is evaluated on the Easy5 model, and not on the real system. Another purpose is to give an illustrative example of the usage of system identification, and also some guidelines how to use it.

4.2

Experiment Choices

In Section 3.2 some issues were listed that we are now able to answer.

4.2.1 The Input and Output Signals

To answer the question about which signals are to be measured, a discussion could be like the following. The diagnosis system needs certain signals to see that the tank pressurization system works as it should. This will be the output signals. The input signals are, naturally, the signals that affect the output sig-nals.

The input signals are:

Pressure from the ECS system (PECS). • Ambient pressure (PA).

CVU setting (CVU).

Fuel content in tank 1 (VT1)

Fuel content in the rest of the tanks (VRest). • Command signal to the regulator (R).

Notice here that VRest does only include tanks 2-5, and not any drop tanks. The output signals are:

(39)

Pressure in tank 1 (PT1)

• Pressure in the rest of the tanks (PRest) • Regulated area (A)

Later on two alternatives of input and output signals are presented. The signals listed above belong to alternative I. First there were more input and output sig-nals used than the ones presented. During the project it was realized that some signals were not of any use in the diagnosis system. Furthermore, one signal that affects the tank pressurization system in reality did not affect the Easy5 model. Finally the inputs were reduced to five signals, and the outputs were reduced to three and two signals, for respectively model alternative.

4.2.2 Choice of Input Signals

The choice of input signals to the tank pressurization system has been a prob-lem. The will to make the input signal look like a real case has not been so easy as it may seem. It has been difficult to find a real case that puts the system in its most critical limits. The reason for the big effort put down here is described by the following discussion.

If the input signal is just white noise over the whole frequency band a good model would be created. But in this system the signals can not be chosen like this because the airplane is not allowed to crash. To see if a good model is obtained with a real flying case is therefore interesting. Hopefully, this model also is good in steady-state because most energy in the input signal is at low frequencies. The steady-state level is very important in the diagnosis system. Another advantage with choosing a real flying case as input signal is that the linear model will agree better with the non-linearity in the states where the system mostly is in.

A few plots describing a real case were used as a pattern when creating the input signal to the “real” system Easy5. Here the pilot first made a substantial rise and then a substantial dive. Note that the input signal used in this thesis is modified from the real case.

The input signals were created in Matlab. There were two reasons for this. The first reason was that the input signal had to be read from the plots, which did not give as many data points as necessary. In Matlab it was easy to interpolate the values between the read values. The second reason was that is was simple to add noise to the signal.

From the beginning models were created on an input signal that never had the regulator turned off and never had the CVU in position Medium. The input

(40)

signal in Figure 4.1 - Figure 4.5 is the final input signal used. Here we have a time sequence where air-to-air refueling is performed. This is of great impor-tance in a project at Saab Aerospace, so therefore it was interesting to add air-to-air refueling in this master’s thesis. During refueling the pressure regulator is off and the CVU is put in position Medium.

The signals in Figure 4.1 - Figure 4.5 are the inputs to the Easy5 model. The input signals that we use to create the model are the signals listed in Section 4.2.1. Note that these signals are not the same. The reason for this is that the sensors we have in the real system, which will be used as input and output signals to the Black-Box model, are not the same signals Easy5 needs to run. Instead of total PECS, Easy5 wants relative PECS, instead ofPA, Easy5 wants altitude, and instead of volume fuel in TRest, Easy5 wants fuel consump-tion. The signals are determined as:

(4.1) (4.2) In equation (4.2) h is the altitude. The transformation of the fuel consumption

to volume fuel in the tanks are not presented for security reasons.

In Figure 4.1 the first plot describes the created relative PECSpressure without noise, and the second graph is the input signal with noise added. Figure 4.2 and Figure 4.4 show the same thing for respective signal. Figure 4.3 and Fig-ure 4.5 have no noise added. They are discrete signals and cannot have any other value than this.

Figure 4.1: Input signal - Relative PECS pressure with and without noise. Scaled values.

Total PECS = Relative PECS +PA PA = 101325 1( –0.00002256h)5.256 0 100 200 300 400 500 600 700 800 900 1000 1100 0 5 10 Time [s] Pressure [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 0 5 10 Time [s] Pressure [−]

(41)

The y-axis in the relative pressure is scaled with a factor to prevent that secret information could be seen in the plots and get out of the company Saab. The altitude, and the fuel consumption are scaled for the same reason.

Figure 4.2: Input signal - Altitude with and without noise. Scaled values.

Figure 4.3: Input signal - CVU position.

The CVU is in position 1, 2 or 3, which is position Partial, All, and Medium respectively (see Figure 4.3). This means that all tanks are pressurized from 180 seconds until 380 seconds. The air to air refueling is done during 70 sec-onds after 520 secsec-onds of data collection. All tanks are pressurized another 200 seconds after 740 seconds.

0 100 200 300 400 500 600 700 800 900 1000 1100 0 10 20 30 40 Time [s] Altitude [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 0 10 20 30 40 Time [s] Altitude [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 1 2 3 Time [s] CVU position [−]

(42)

Figure 4.4: Input signal - Fuel consumption with and without noise. Scaled values.

After 520 seconds the fuel consumption gets negative. This depends on the refueling (see Figure 4.4).

Figure 4.5: Input signal - Regulator On/Off.

The regulator is on when R is 0 and off when R is 1 (see Figure 4.5). The only case where the regulator is off during flight is during air-to-air refueling. In Figure 4.6 the frequency spectrum of the three signals with noise are plot-ted. There it can be seen that most of the energy in the signals is in frequency

0 100 200 300 400 500 600 700 800 900 1000 110 −2 −1 0 1 Time [s] Fuel consumption [−] 0 100 200 300 400 500 600 700 800 900 1000 110 −2 −1 0 1 Time [s] Fuel consumption [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 −0.5 0 0.5 1 1.5 Time [s] Regulator On/Off [−] 1.5

(43)

zero. The real system has most of its energy here so the input signals hope-fully give a good model where it will be used.

Figure 4.6: Frequency spectrum of the signals PECS, Altitude, and Fc.

4.2.3 Choice of Sample Interval

To choose sample interval some testing was made. There are also some limita-tions of how fast the real system can sample data. It would be beneficial to not use a shorter sample interval than 0.1 s due to the limited capacity of the GECU (the unit in JAS 39 Gripen that decides which sample interval that can be used). With the knowledge that the tank pressurization system has a band-width at approximately 1 Hz, (6 rad/s), the lowest sample interval as possible had to be used.

In Section 3.2.2 a description was made on how to decide the sample interval. One rule of thumb was to analyze the step responses of the system and choose a sample interval so that 4-8 samples are situated on the slope to the step response. Figure 4.7 - Figure 4.10 show a step response analysis for every input and output signal.

0 2 4 6 8 10 12 100 105 1010 1015 PECS 0 2 4 6 8 10 12 100 105 1010 1015 PA 0 2 4 6 8 10 12 10−5 100 105 Fc Frequency [Hz]

(44)

Figure 4.7: Step response when step is made after 20 seconds in PECS.

Figure 4.8: Step response when step is made after 20 seconds in PA.

Figure 4.9: Step response when step is made after 20 seconds in CVU.

20 21 22 23 1.078 1.08 1.082 1.084 1.086 1.088x 10 5 PT1 20 21 22 23 1.298 1.3 1.302 1.304 1.306 1.308 1.31x 10 5 PRest 20 21 22 23 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 A 20 21 22 1.04 1.05 1.06 1.07 1.08 1.09x 10 5 PT1 20 21 22 23 1.25 1.26 1.27 1.28 1.29 1.3 1.31x 10 5 PRest 20 21 22 0.18 0.2 0.22 0.24 0.26 0.28 0.3 0.32 0.34 A 20 21 22 23 1.1 1.15 1.2 1.25 1.3 x 105 PT1 20 21 22 23 1.296 1.298 1.3 1.302 1.304 1.306 1.308 1.31 1.312 x 105 PRest 20 21 22 0.27 0.28 0.29 0.3 0.31 0.32 0.33 0.34 A

(45)

Figure 4.10: Step response when step is made after 20 seconds in R.

The sample interval 0.1 s was not enough to fulfill the requested 4-8 sample on the slope to the step response. Therefore a compromise had to be done. The choice was made so that the rule of thumb was fulfilled but it was also made so that the smallest possible deviation from the lowest sample interval was received. Sample interval,Ts=0.08 s meets these requirements.

The step response for output signal, A, when a step is made in PECS, is the one that sets the limit of sample interval (see Figure 4.7 graph three). There we have four samples on the slope to the step response. If there was a possibility to decrease the sample interval a little more it would give more samples on the slope to the step response but then we get too far from the sample interval that is possible today.

4.2.4 Choice of Prefilter

The prefilter was chosen as a butterworth filter of degree 4. A butterworth fil-ter has the advantage that it is easy to control where the filfil-ter has its cut-off frequency. Equation (4.3) is the filter function. The constantsa1 - a4 are taken from ref. [10], Table 4 page 20. In Table 4.1 the values for the butterworth fil-ter in equation (4.3) is listed.

(4.3) 20 22 24 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.1x 10 5 PT1 20 22 24 1.05 1.1 1.15 1.2 1.25 1.3 1.35x 10 5 PRest 20 22 24 0 0.2 0.4 0.6 0.8 1 A H s( ) 1 1 a1ωs 0 --- a2 ωs 0 ---   2 a3 ωs 0 ---   3 a4 ωs 0 ---   4 + + + + ---=

(46)

Table 4.1: The values of the coefficients in equation (4.3)

Figure 4.11 shows the Bode diagram for the filter. The cut-off frequency ω0 is chosen to 25 rad/s. Due to the fact that the nyquist frequency is 39.27 rad/s and no aliasing is wanted so a cut-off frequency at 25 rad/s is a good choice.

Figure 4.11: Amplitude and phase curves for the chosen butterworth filter.

See Appendix C to read more theory about butterworth filters.

4.3

Choice of Model Structure

If the system to be modelled is a SISO or MISO system, it is easy to create an input-output model like ARX, ARMAX, OE and BJ in the System Identifica-tion Toolbox, Matlab. The tank pressurizaIdentifica-tion model is, as already menIdentifica-tioned,

Coefficient Value a1 2.6131 a2 3.4142 a3 2.6131 a4 1 Bode Diagram Frequency (rad/sec) Phase (deg) Magnitude (dB) −60 −40 −20 0 20 100 101 102 −360 −270 −180 −90 0

(47)

a MIMO system. This implies some problems during estimation of the model in Matlab. For SISO and MISO systems several systems with different combi-nation of the ordersna, nb,ncetc. can be estimated automatically and, the best combinations are presented. This help is not given for MIMO systems due to the fact that MIMO systems are too complex.

System Identification Toolbox only covers ARX models and state-space mod-els for MIMO systems. (Multioutput ARMAX and OE modmod-els are covered via state-space representations: ARMAX is given when theK-matrix is estimated,

while OE is given whenK is fixed to zero, see ref. [7].)

From the beginning in this project both ARX and state-space models were built but it was soon realized that the state-space model was easier to work with. A reason for this is that the complexity of the state-space model struc-ture is easier to deal with. This can easily be understood with a simple exam-ple.

Example:

Let us consider the same general MIMO system as before with p outputs and m inputs.

The ARX model structure has the parameters na, nb, and nk. The parameters has the following dimensions:

(4.4)

This means that there are parameters to decide before the estimation of the model. The number of combinations of different orders quickly gets too big to handle. The complexity of variations for multi-output ARX structures is, as shown, big.

In the state-space structure there is only one parameter to choose before the estimation and that is the number of states, n. Therefore this model is chosen

to work with in the model estimation.

4.4

Two Model Alternatives

There are two ways to model the tank pressurization system discussed. Either the pressure regulator can be included in the whole system, which is to be

dim na p×p dim nb p×m dim nk p×m = = = p×p+p×m+ p×m

(48)

identified, or it can be excluded from the system as a stand-alone part. When it is included in the system the pressure regulator is seen as a mechanical regula-tor that is not controlled and when it is excluded it is a regular PI-regularegula-tor. These two approaches are modelled in different ways. The first approach is called model alternative I and the second approach model alternative II.

(49)

5

Model Alternative I

In this chapter model alternative I is defined, performed, and validated. In Section 5.1 the alternative is defined. Section 5.2 discusses preprocessing of the data. In Section 5.3 estimated models are presented and discussed accord-ing to different terms and criteria and in Section 5.4 the result is presented.

5.1

Definition

This is the case where the pressure regulator in the system is seen as a mechanical regulator. A mechanical regulator is defined by its mechanical design and can therefore not easily be changed. Therefore the regulator is seen as a subsystem in the whole system (see Figure 5.1). The input signals to the system G are PECS, PA, CVU, VT1, VRest, and R, which are defined in Section 4.2.1. Also the outputs PT1, PRest, and A were defined. In this model alternative, it does not matter if the pressure regulator is known or not, since the whole system including the pressure regulator is to be identified as a Black-Box model.

(50)

Figure 5.1: The system in model alternative I.

The advantage with this model alternative is that the only sensors used are the ones that the diagnosis system already demands. One disadvantage is that components that are known, should generally not be modelled, and here the pressure regulator is modelled. Another disadvantage is that there are three output signals which is one more than model alternative II (see Chapter 6). The conclusion that should be drawn is that this model alternative is more complex than the other one. The more output signals there are, the more diffi-cult the model estimation gets. One reason for studying two model alternatives is to see if there is a difference in the quality between the models.

5.2

Preprocessing Data

The input signals collected to estimate model alternative I have already been discussed in Chapter 4. The signals shown there are the altitude and fuel con-sumption instead of PA, VT1, and VRest. The reason for that is that these signals are the input signals to Easy5. In Figure 5.2 - Figure 5.3 in Section 5.2.3 the collected data, which are filtered and scaled, are shown.

5.2.1 Trends and Offsets

The offset is removed by subtraction of the mean of every signal. There are no trends in the signals, i.e., trends do not have to be removed.

5.2.2 Outliers and Missing Data

Problems with outliers and missing data are not of interest in this master’s the-sis. This is because the real system is replaced by a computer model so all data

G - System PECS PA CVU VT1 VRest R PT1 PRest A Regulator Air Cleaner Ejector CVU Pipes

(51)

will be received, since there are no sensors that can break down or create some outliers. There are some deviant values in the collected data but these values are created because of the noise added to the signals.

5.2.3 Scaling

The signals in the tank pressurization system have big deviations from each other. The ECS pressure, PECS, is the largest one with values reaching 900 kPa, and the regulator signal, R, is the smallest one with value 0 or 1. This is a problem in the estimation of the models because the value of the loss function may get enormously large, with values up to .

Scaling of the signals solves the problem with the huge loss function values. Every signal is scaled so that they have values in the interval . The out-put signal, A, is an exception since it has small negative values because of the filtering when it really should be zero. In Figure 5.2 - Figure 5.3 the filtered and scaled input signals are shown.

Figure 5.2: The input signals used for the model estimation alternative I

1030 0 1, ] [ 0 200 400 600 800 1000 0 0.5 1 PECS [−] 0 200 400 600 800 1000 0 0.5 1 PA [−] 0 200 400 600 800 1000 0 0.5 1 CVU [−] 0 200 400 600 800 1000 0 0.5 1 VT1 [−] 0 200 400 600 800 1000 0 0.5 1 VRest [−] 0 200 400 600 800 1000 0 0.5 1 R [−] Time [s]

(52)

Figure 5.3: The output signals used for model estimation alternative I.

5.3

Models

Models have been created in System Identification Toolbox in Matlab. The models discussed here are all estimated state-space models on innovation form. The reason for this is described in Section 4.3. They have been esti-mated with the PEM Method, which is mentioned in Section 3.1.3.

The data chosen as estimation data are the first 7750 samples (619.92 seconds) in the signals plotted above. The validation data for the flight are the rest of the data. The model has also been validated on the SC case (see Figure 5.4 and Figure 5.5). The reason for this is to see if the general model is good enough also for this case. This is proven to be true so therefore the models built for the SC case are not presented in this thesis. The reason for the good results is that after adding air-to-air refueling to the input signals, e.g., regulator on/off, the estimation data gets the same characteristic that the SC case. This results in models that are good enough to be used for testing the diagnosis system. The only problem might be that the models are not accurate enough in steady-state. This is discussed in detail later on.

0 100 200 300 400 500 600 700 800 900 1000 1100 0 0.5 1 PT1 [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 0 0.5 1 PRest [−] 0 100 200 300 400 500 600 700 800 900 1000 1100 0 0.5 1 A [−] Time [s]

(53)

Figure 5.4: The input signals for the SC case.

Figure 5.5: The output signals for the SC case.

Models can be estimated both with focus on prediction and stability. During estimation of the models with the first input signal without air-to-air refueling

0 50 100 150 0.5 0.6 0.7 0.8 0.9 PECS [−] 0 50 100 150 0.94 0.96 0.98 1 PA [−] 0 50 100 150 0.63 0.64 0.65 0.66 CVU [−] 0 50 100 150 0.9 0.92 VT1 [−] 0 50 100 150 0.9 0.92 VRest [−] 0 50 100 150 −0.5 0 0.5 1 1.5 R [−] Time [s] 0 20 40 60 80 100 120 140 0.9 1 1.1 1.2 1.3 PT1 [−] 0 20 40 60 80 100 120 140 0.7 0.8 0.9 1 1.1 PRest [−] 0 20 40 60 80 100 120 −0.5 0 0.5 1 1.5 A [−] Time [s]

(54)

there were some problems with the stability. Then estimation with focus on stability was tested. It helped in some cases but not in all. With focus on sta-bility all unstable models should be stable. The reason for that some models still are unstable is that the unstable poles are within the tolerance area in the toolbox. With the new input signal, with air-to-air refueling, both estimation methods were tested. One model became unstable and with focus on stability it became stable so it helped in this case (see Section 5.3.1).

Another comparison made is between building one MIMO model for all out-puts, and building separate MISO models for each output. The reason for this comparison is to see how much better fit one can get for respective output when there is one model for every output. The result is that the fits of the out-puts increase by one or two percent, when the MISO systems are compared to the MIMO system. However, the improvements are not large enough to moti-vate estimating models for every output instead of one model for all outputs. Also, these separate models for respective output are not good when they are used in prediction and, three MISO systems have approximately three times more parameters than one MIMO system.

The number of state variables examined ranges from two to eleven. Some higher order models were also examined for model alternative I without any improvements. A comparison has been made between all these models. They are compared using terms and criteria like fit (see definition in Section 3.3.1), loss function (see definition in Section 3.2.3), residuals (see definitions in Section 3.3.2), standard deviation of the parameters, and poles and zeros. In the following sections terms and criteria are presented for the estimated models.

5.3.1 Fit

When examining the fit the validation data used are the two data sets, the flight case and the SC case. The choice of the time span over which the fit is calcu-lated is of great importance if a good or bad fit is evaluated. Therefore it is of great importance how this time span is chosen to give a fair measure of the model quality. When testing the diagnosis system in this project the best static model should be used. A conclusion will be that the only way of choosing the best model in steady-state is to plot the results and pick the one closest to the measured value. A more detailed explanation follows further on.

Another thing to consider is how long prediction step should be used during the validation. A good model should have a good fit when the prediction

References

Related documents

The single PCC was investigated so the paper is the local, University grid investigations oriented, however concerns two general important problems: one is the absolute accuracy

We first estimated the parameters from the empirical data and then we obtained the characteristic functions under a risk- neutral probability measure for the Heston model for which µ

If you release the stone, the Earth pulls it downward (does work on it); gravitational potential energy is transformed into kinetic en- ergy.. When the stone strikes the ground,

A control system has been set up, using ATLAS DCS standard components, such as ELMBs, CANbus, CANopen OPC server and a PVSS II application.. The system has been calibrated in order

Based on the theoretical framework presented above, the overarching proposition of this thesis is that the domestic political uproar identified in Sweden during the diplomatic crisis

Since public corporate scandals often come from the result of management not knowing about the misbehavior or unsuccessful internal whistleblowing, companies might be

Aspects of the TMT process that have been studied are communication, debate, decision making, problem solving, conflicts, social integration, behavioural integration,

Cis whisky lactone was present in all American oak barrels (ranging from 0,6 to 1,1 µg/ml), and in low concentrations in the Swedish light and medium toasted 25 L barrels, in