• No results found

System identification of Thermal Conductivity-sensing module for improvement of H2-concentration prediction

N/A
N/A
Protected

Academic year: 2021

Share "System identification of Thermal Conductivity-sensing module for improvement of H2-concentration prediction"

Copied!
103
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

System identification of Thermal

Conductivity-sensing module for improvement of

H2-concentration prediction

Examensarbete utfört i Reglerteknik vid Linköpings tekniska högskolan

av

Jonas Ekström

LITH-ISY-EX--08/4153--SE

Linköping 2008

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

System identification of Thermal

Conductivity-sensing module for improvement of

H2-concentration prediction

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan i Linköping

av

Jonas Ekström

LITH-ISY-EX--08/4153--SE

Handledare: Christian Lyzell

ISY, Linköpings universitet

Tomas Eklöv

AppliedSensor, Linköping Examinator: Fredrik Gustafsson

ISY, Linköpings universitet Linköping, 12 June, 2008

(4)
(5)

Avdelning, Institution

Division, Department

Division of Automatic Control Department of Electrical Engineering Linköpings universitet

SE-581 83 Linköping, Sweden

Datum Date 2008-06-12 Språk Language  Svenska/Swedish  Engelska/English   Rapporttyp Report category  Licentiatavhandling  Examensarbete  C-uppsats  D-uppsats  Övrig rapport  

URL för elektronisk version

http://www.control.isy.liu.se http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-12250 ISBNISRN LITH-ISY-EX--08/4153--SE

Serietitel och serienummer

Title of series, numbering

ISSN

Titel

Title

Systemidentifiering av en sensor mätandes Termisk Konduktivitet för prediktions-förbättring av H2-koncentrationen

System identification of Thermal Conductivity-sensing module for improvement of H2-concentration prediction Författare Author Jonas Ekström Sammanfattning Abstract

The last years a TC-sensing module called HSS-440 has been developed at AppliedSensor. The sensor is used in hydrogen powered cars to detect H2-leakages.

TC-sensing is a technique that uses small changes in thermal conductivity when H2

is present to determine concentrations. Today these small changes are estimated with a prediction model that uses several hundreds of parameters.

A sensor substrate from a new manufacturer is now introduced. This means an opportunity to look over the current solution. The task for this thesis is to investigate system properties and new solutions regarding a prediction model with minimal need for calibration.

System properties are investigated and relations for heat flow and influence of

H2are established. In the process an earlier not known nonlinearity are proved to

exist. From this, a new open loop nonlinear greybox model is estimated and the nonlinearity are concluded to improve the model. The model is then closed with an earlier implemented PI-regulator and concluded to be useful for H2-predictions.

The new model also utilizes 11 parameters instead of hundreds which is a big improvement.

Nyckelord

(6)
(7)

Abstract

The last years a TC-sensing module called HSS-440 has been developed at AppliedSensor. The sensor is used in hydrogen powered cars to detect H2-leakages.

TC-sensing is a technique that uses small changes in thermal conductivity when H2

is present to determine concentrations. Today these small changes are estimated with a prediction model that uses several hundreds of parameters.

A sensor substrate from a new manufacturer is now introduced. This means an opportunity to look over the current solution. The task for this thesis is to investigate system properties and new solutions regarding a prediction model with minimal need for calibration.

System properties are investigated and relations for heat flow and influence of

H2are established. In the process an earlier not known nonlinearity are proved to

exist. From this, a new open loop nonlinear greybox model is estimated and the nonlinearity are concluded to improve the model. The model is then closed with an earlier implemented PI-regulator and concluded to be useful for H2-predictions.

The new model also utilizes 11 parameters instead of hundreds which is a big improvement.

(8)
(9)

Sammanfattning

Sista åren har en sensor, med beteckningen HSS-440, mätandes Termisk konduk-tivitet utvecklats på AppliedSensor. Sensorn används för att upptäcka läckage av

H2-gas i vätgasdrivna bilar. Vid Termisk Konduktivitets mätning används små

förändringar av den termiska konduktiviteten, då H2 är närvarande i det

omgi-vande mediumet, som ett mått på koncentrationen. Idag änvänder prediktions-modellen flera hundra parametrar för att skatta denna koncentration.

Nu introduceras ett sensorsubstrat från en ny tillverkare, vilket innebär ett bra tillfälle att se över den gamla lösningen. Syftet med examensarbetet är därför att undersöka nya systemegenskaper i och med introduktionen av det nya sensor-substratet samt nya lösningar på en prediktionsmodel med ett minimalt behov av kalibrering.

Systemegenskaperna undersöks och samband för värmeflöden och H2’s påverkan

på systemet fastställs. Vid denna undersökning upptäcks en tidigare okänd olin-järitet. Utifrån detta bestämms en ny olinjär greybox modell där den nyfunna olinjäriteten bevisas förbättra modellen. Modellen sluts med en tidigare imple-menterade PI-regulator och bevisas vara användbar vid H2-prediktion. Den nya

modellen använder även bara 11 parametrar istället för flera hundra vilket är en stor förbättring.

(10)
(11)

Acknowledgments

I would like to thank AppliedSensor and the dataanalysis group and especially my supervisor Dr. Tomas Eklöv for the opportunity and the guidance that made this thesis possible. A big thanks as well to my supervisor and examiner at ISY, Linköpings universitet, for their support and feedback.

Last but not least many thanks to my girlfriend for your love and support which gave me strength to complete this thesis.

(12)
(13)

Notation

Symbols

k thermal conductivity [mKW ]

h convection heat transfer coefficient [mW2K]

 emissivity

σ Stafan-Boltzman’s constant [ W m2K4]

u(t) input variable at time t

v(t) disturbance variable at time t

w(t) variable for measurable disturbance at time t

y(t) output variable at time t

x(t) the state in the state-space representation

e(t) measurement noise ¯

y mean value of y(t) ˆ

y(t) output variable predicted by model at time t

(14)

Abbreviations and glossary

H2 Hydrogen The chemical element with atomic number 1,

de-noted H. Naturally in gases the molecules are paired and denoted H2.

AS Applied Sensor

The company where the thesis work were con-ducted at.

TC Thermal Conductivity

The capability of a material to transfer heat.

FE Field One type of transistor, in this application acting as a chemical sensor.

SU Start Up

The occurrence of a sensor powered up. Usu-ally the environmental conditions such as ambient temperature and H2-concentration are changed

between SU’s. PI Proportional

In-tegrating

One common regulator often used in industry.

PCB Printed Circuit Board

Here, the circuit board used in the sensor module.

CAN Controller Area Network

The standardized bus used for communication in automotive applications.

PWM Pulse Width Modulation

A signal specifying the time by which a certain effect should be applied.

CT Chip

Temperature Sensor

The sensor measuring temperature at the chip.

Tc Chip

Temperature

The temperature measured at the chip.

BT Board Temperature Sensor

The sensor measuring temperature at the Board.

Tb Board

Temperature

The temperature measured at the Board.

PRBS Pseudo Random Binary Sequence

On type of input signal appropriate for system identification.

(15)

xiii

List of Figures

1.1 The HSS-440 H2-sensor module . . . 1

2.1 PCB . . . 6

2.2 Sensors . . . 8

2.3 Sensor chip . . . 8

2.4 System with feedback loop . . . 9

2.5 Heat flows . . . 11

3.1 Heat flow model . . . 16

4.1 A system . . . 17

4.2 Outliers . . . 20

5.1 Climate chamber . . . 26

5.2 Temperature cycle . . . 27

5.3 Valid SU’s . . . 29

5.4 Setpoint measurement data . . . 30

5.5 Second degree setpoint fit . . . 31

5.6 First degree setpoint fit . . . 32

5.7 Setpoint results for second degree . . . 32

5.8 Setpoint results for first degree . . . 33

6.1 Heater influence: Power = 0, Signals = PWM, Tc and Tb. . . 36

6.2 Heater influence: Power = constant, Signals = PWM, Tc and Tb . 37 6.3 Heater influence: Power = varying, Signals = PWM, Tc and Tb. . . 38

6.4 H2 influence: Used temperature cycle . . . 39

6.5 H2 influence: Power uncontrolled . . . 40

6.6 H2 influence: Power controlled . . . 40

6.7 H2 influence on Tc: Power uncontrolled . . . 41

6.8 H2 influence on Tb: Power uncontrolled . . . 41

6.9 H2 influence on Tc: Power controlled . . . 42

6.10 H2 influence on Tb: Power controlled . . . 43

6.11 H2 influence on Tb-increase: Power uncontrolled . . . 44

6.12 H2 influence on Tb-increase: Power controlled . . . 44

6.13 H2 influence on Tb-increase compared to H2: Power uncontrolled . 45 6.14 Heater nonlinearity: Heater power used . . . 46

6.15 Heater nonlinearity: Tc increase . . . 47

6.16 Heater nonlinearity: Compensation curve . . . 48

7.1 Temperature cycles used for validation and estimation . . . 54

7.2 Estimation data, Signals = PWM, Tc and Tb. . . 55

7.3 Validation data, Signals = PWM, Tc and Tb. . . 55

7.4 Fit on estimation and validation data . . . 57

7.5 Compensated model validation . . . 58

(16)

7.7 Compensated model validation 2 . . . 59

7.8 Temperature cycle used for validation . . . 60

7.9 Validation of the fit for the closed system . . . 62

7.10 Validation of the closed system . . . 62

7.11 Validation of the fit for the closed system . . . 63

7.12 Validation of the calibrated closed system . . . 63

7.13 Validation two of the calibrated closed system . . . 64

8.1 H2estimation data cycles. Experiment nr.1 . . . 66

8.2 H2estimation data cycles. Experiment nr.2 . . . 67

8.3 H2estimation data cycles. Experiment nr.3 . . . 67

8.4 Experiment 1: SU without H2-parameters included. . . 68

8.5 Experiment 1: Residuals without H2-parameters included. . . 69

8.6 Experiment 1: SU with the two H2-parameters included. . . 69

8.7 Experiment 1: Residuals with the two H2-parameters included. . . 70

8.8 Experiment 1: H2 predictions . . . 73

8.9 Experiment 1: Filtered H2 predictions . . . 73

8.10 Experiment 1: Magnified, filtered H2 predictions . . . 74

8.11 Experiment 2: H2 predictions . . . 74

8.12 Experiment 2: Filtered H2 predictions . . . 75

8.13 Experiment 2: Magnified, filtered H2 predictions . . . 75

8.14 Experiment 3: H2 predictions . . . 76

8.15 Experiment 3: Filtered H2 predictions . . . 76

8.16 Experiment 3: Magnified, filtered H2 predictions . . . 77

List of Tables

2.1 Thermal conductivity . . . 7

5.1 Tc conversion parameters . . . 31

6.1 Heater efficiency quadratic compensation parameters . . . 46

6.2 Heater efficiency linear compensation parameters . . . 47

7.1 Initial model parameter values . . . 56

7.2 Estimated model parameters: Compensated model . . . 57

7.3 Estimated model parameters: Not compensated model . . . 57

7.4 Calibrated model parameters: Closed loop model . . . 61

8.1 Experiment setups used . . . 66

(17)

Contents

1 Introduction 1

1.1 The thesis work . . . 2

1.2 Problem statement . . . 2

1.3 Limitations . . . 2

1.4 References . . . 3

1.5 Outline of the thesis . . . 3

2 System description 5 2.1 TC-sensing and different types of heat transfer . . . 5

2.2 Involved components . . . 7

2.2.1 Heaters . . . 7

2.2.2 Sensors . . . 9

2.3 Heater control . . . 9

2.4 Measurable signals . . . 10

2.5 Known heat flows . . . 10

3 Heat flow modeling 13 3.1 Equations . . . 13 3.1.1 Conduction . . . 13 3.1.2 Convection . . . 14 3.1.3 Radiation . . . 14 3.2 Nonlinearities . . . 14 3.3 A system perspective . . . 15 3.3.1 Definition of temperatures . . . 15 3.3.2 Heat sources . . . 15

3.3.3 A heat flow description . . . 15

4 System identification 17 4.1 The system identification procedure . . . 18

4.2 Experiment design . . . 18 4.2.1 Input signal . . . 19 4.3 Preprocessing data . . . 19 4.4 Model properties . . . 20 4.4.1 Static/Dynamic . . . 20 4.4.2 Non-linear/Linear . . . 21 xv

(18)

4.5 Model structures . . . 21

4.5.1 Blackbox . . . 21

4.5.2 Nonlinear Greybox . . . 21

4.5.3 The State-Space form . . . 22

4.6 Parameter estimation . . . 22 4.6.1 Linear regression . . . 22 4.6.2 Least square . . . 23 4.6.3 Gauss-Newton algorithm . . . 23 4.6.4 Tools . . . 24 4.7 Validation . . . 24 5 Data collection 25 5.1 Experiment setup . . . 25

5.1.1 The calibration procedure . . . 25

5.1.2 Cycling of temperature . . . 27 5.1.3 Cycling of H2-concentration . . . 27 5.1.4 Difficulties . . . 28 5.2 Data preprocessing . . . 29 5.2.1 Valid SU’s . . . 29 5.2.2 Temperature Setpoint . . . 30 6 Model structure 35 6.1 System properties . . . 35

6.1.1 Heater power influence . . . 35

6.1.2 Heat flows in presence of H2 . . . 39

6.1.3 Nonlinear heater current . . . 45

6.1.4 The heat flow model . . . 48

6.2 System greybox model . . . 49

6.2.1 The model of the open system . . . 49

6.2.2 The model of the closed system . . . 50

7 Identification 53 7.1 The open system model . . . 53

7.1.1 Method . . . 53

7.1.2 Data . . . 56

7.1.3 Results . . . 58

7.2 The closed system model . . . 60

7.2.1 Method . . . 60 7.2.2 Data . . . 61 7.2.3 Results . . . 64 8 H2-prediction 65 8.1 H2-parameter estimation . . . 65 8.1.1 Method . . . 65 8.1.2 Data . . . 68 8.1.3 Results . . . 70

(19)

Contents xvii

8.2.1 Method . . . 71 8.2.2 Data . . . 72 8.2.3 Results . . . 72

9 Discussion, conclusions and future work 79

9.1 Discussion . . . 79 9.2 Conclusions . . . 80 9.3 Future work . . . 80

(20)
(21)

Chapter 1

Introduction

In this chapter an introduction to the thesis is given with an overview and some background in Section 1.1 and a description of the problem and the task in Sec-tion 1.2. LimitaSec-tions of the thesis is also defined, and references described in Sections 1.3 and 1.4. The chapter ends with Section 1.5, a layout description of the thesis.

During the last years a Hydrogen (H2)-concentration sensor called HSS-440, shown

in Figure 1.1, has been developed at AppliedSensor (AS).

Figure 1.1. The HSS-440 H2-sensor module developed at AppliedSensor. Source:

Ap-pliedSensor

The module uses Thermal Conductivity (TC)-sensing combined with a Field Ef-fect (FE)-sensor to detect H2-concentrations between 0 % and 4.4 %. The sensor

is used in H2-powered cars to detect H2-leakages and therefore a range of

(22)

quirements need to be fulfilled upon delivery; a wide temperature span, short response time, high accuracy and short Start Up (SU)-time. SU-time is in the requirement specification defined as the time before the sensor starts to deliver

H2-measurements. SU-time throughout the rest of the thesis will be defined as

the time before the sensor reaches steady-state, during circumstances known today, approximately 3.5 s.

The requirements described, especially pose a problem during SU, before the steady-state operating temperature of 170C is reached. To be able to fulfill all the demands also during SU, the current solution uses a Proportional Integrating (PI)-regulator to reach and stay at operating temperature. Before the temperature is reached a rather complex prediction model structure is used to estimate H2

-concentration in the surroundings. The model uses several hundreds of parameters which need to be estimated before delivery. The numerous of parameters are needed since the description of the system used in the H2-prediction model today

is based on a simplified physical model.

1.1

The thesis work

This report is a result of a thesis project conducted at the Department of Electrical Engineering at Linköpings University under Professor Fredrik Gustavsson at the division of Automatic Control. The theoretical and practical work has been done at AppliedSenor with supervision of Dr. Tomas Eklöv.

1.2

Problem statement

At AS, a sensor substrate from a new manufacturer is now introduced in the HSS-440 module. The new substrate is smaller and therefore easier to heat during SU and is as well equipped with more heaters. For AS this means an opportunity to look over the current solution including system description and prediction model. The idea for this new generation of HSS-440 module is to, during SU, with the

H2-concentration prediction still within specifications, find a less complex model

with minimal need for calibration.

The task for this thesis is to, at first, with the new properties in mind, in-vestigate system properties and new solutions regarding system description and prediction model. Here the calibration need for the model should be considered. Second, at a computer, implement the most promising solution and evaluate the performance of the new model.

1.3

Limitations

The investigated solutions of system model and prediction model only needs to re-flect properties and be accurate during SU. The prediction model does not need to be implemented in the microprocessor. The complexity and memory requirements of the solution should not exceed system capabilities.

(23)

1.4 References 3

1.4

References

TC-sensing is an old technique that has been used for more than 100 years in different applications, see Simon & Arndt (2002). Surprisingly though not much have been written describing the fairly simple technique more extensively, books like Göpel et al. (1991) describe and classify sensors, but only briefly describes the technique. The technique takes its origin within the physics where instead many books have been written about related areas such as heat and mass transfer, see for example Incropera & DeWitt (2002) and Hagen (2000).

Even if a few articles exist where the technique is used it is only briefly described and the attitude seem to be that it is of fundamental knowledge. Articles as, Simon & Arndt (2002), Tardy et al. (2004) and Kulkarni et al. (2005) instead focus at the particular setup used in the case or the particular area of application. Researchers within the area seem to focus on material properties.

In the field of system identification on the other hand many books have been written and no attempt is made in this thesis to cover the area, the interested reader is referred to Ljung (1999) and Söderström & Stoica (1989)

1.5

Outline of the thesis

This chapter includes the following sections:

Chapter 2 - Includes a description of the system from a hardware and operational

point of view

Chapter 3 - Describes heat flow theory with a system perspective. Chapter 4 - Describes system identification theory used in this thesis.

Chapter 5 - Describes the method used during data collection and experiment

setup.

Chapter 6 - Describes analysis of the system properties and chosen model

struc-ture.

Chapter 7 - Describes method, data and results from the identification of the

system.

Chapter 8 - Describes the prediction model used and results from H2-prediction

experiments.

Chapter 9 - Discusses results, methods and future work within the field of

ap-plication.

All estimations and calculations are made in Comsol, but since Matlab is the tool at AppliedSensor it has been used for some data preprocessing of measurement data and most figure generating.

(24)
(25)

Chapter 2

System description

This chapter briefly describes the system from a hardware and operational point of view. In Section 2.2 are the layout of the PCB, Printed Circuit Board, as well as the available sensors described. The heater control is described in Section 2.3, the measurable signals in Section 2.4 and the heat transfer in Section 2.5. While Section 2.1 of this chapter introduces the reader to some background theory and the principles used when determining H2-concentration based on changes in

ther-mal conductivity.

The tasks assigned to the components in the HSS-440 sensor module, could be divided into two main tasks.

One task is that it should be able to communicate and survive in the modules area of work. For example, the component power supply should remain constant and electronics should enable CAN, Controller Area Network, communication be-tween the sensor module and the car.

The other task is the main function of the module, the possibility to detect

H2-concentration in air.

In Figure 2.1 is the PCB and relevant main functions of some components explicitly shown. Since only the second task is relevant for this thesis work, the system descriptions in Section 2.2 – 2.5 only discuss the functions of the compo-nents used to fulfil that task. The description of the system and its behavior is also limited to the SU of the system.

2.1

TC-sensing and different types of heat

trans-fer

To fully understand TC-sensing one needs to have certain knowledge about the different types of heat transfer that can occur in or from solid and fluid mediums; conduction, convection and radiation. Here the state fluid includes the gas form as well.

Conduction could occur when heat, due to different mechanisms, is transferred

(26)

Figure 2.1. PCB and main functions of some relevant components.

Source: AppliedSensor

through a solid or fluid medium. Convection could occur when heat is transferred between solid and fluid mediums. The main difference is that for convection to occur, one of the involved mediums needs to be in motion. Generally all fluids are in some kind of motion.

Both convection and conduction need a medium to transfer through while radiation is thermal energy transferred by electromagnetic waves and could travel through vacuum as well.

In the case of convection or conduction, thermal conductivity then specifies how well the involved mediums transfer the energy. A medium with high thermal conductivity is a good heat transporter, while low thermal conductivity indicates that the medium is a good thermal insulator. The thermal conductivity is tem-perature dependent. In the case of conduction, the transferred energy depends on temperature differences and is proportional to the surface area and the thermal conductivity of the medium. In the case of convection the relations describing transferred energy are far more complex. To mention a few, surface roughness, flow condition and type of convection are properties that play major part for the amount of transferred energy, see Hagen (2000).

Several ways to detect gas concentration are used in practice today, for ex-ample different setups of chemical sensors and sensors based on different physical principles. TC-sensing is an example of a sensor based on physical principles. A heater, a temperature sensor and a specific setup are used. In that setup most of the properties affecting transferred energy with convection to the surrounding media could be considered constant or linear. A TC-sensor is considered stable over time compared to many chemical sensors, see Göpel et al. (1991).

Due to the big difference in thermal conductivity for H2 and air, see

Ta-ble 2.1, a TC-sensor fits the purpose of H2-concentration measuring well. The

H2-concentration could be achieved by comparing the higher consumed power by

the heaters when H2is present with a reference value for pure air. Since almost no

(27)

2.2 Involved components 7

Table 2.1. The thermal conductivity for some gases in atmospheric pressure and at

temperature (300 K). Source: Hagen (2000)

Gas Thermal description conductivity (denotation) [10mK−3W] Hydrogen (H2) 183 Air 26.3 Ammonia (N H3) 24.7 Helium (He) 151 Oxygen (O2) 26.8 Nitrogen (N2) 25.9 Methane (CH4) 34.2

Carbon dioxide (CO2) 16.55

Argon (Ar) 17.7

the method is also very selective. The only gas with thermal conductivity close to

H2 is helium, but helium is in the automotive applications of no influence. The

method is also very simple, since basically only two components are needed, a heat source and a temperature sensor. In AS case a controlled heat source is used to keep the temperature at 170C, which provides a good accuracy, see Hackenberg et al. (2007).

2.2

Involved components

In Section 2.1 it is explained that a heat source and a temperature sensor are required for TC-sensing. In the HSS-440 module several heaters, described in Section 2.2.1, and two temperature sensors, described in Section 2.2.2, are used.

In Figure 2.2 the sensor part of the PCB with the sensor chip is shown. In Fig-ure 2.3, an enlargement of the sensor chip with heaters and the chip temperatFig-ure sensor are shown. Figure 2.3 also shows the FE-sensor which uses another physi-cal principle to detect H2and combined with the TC-sensing further improves the

accuracy of the sensor module. The FE-sensor and its signal has no relevance to this thesis work and is for this reason covered with aluminum and therefore only deliveries a grounded signal.

2.2.1

Heaters

Figure 2.3 shows the eleven heaters mounted to the sensor chip, five in the top and three at each side. Each heater is fed simultaneously by a Pulse Width Modulation (PWM)-signal. The PWM-signal is decided by the control program in the microprocessor seen in Figure 2.1. The control program is described more detailed in Section 2.3. The PWM-signal, 0 %-100 % of maximum pulse width, is represented by 16 bits and updated with 500 Hz. The supply current is held constant by the amplifier component also seen in Figure 2.1.

(28)

Figure 2.2. The sensor part of the PCB. In top: The digital SPI-bus, in bottom: The

sensor chip. Source: AppliedSensor

(29)

2.3 Heater control 9

2.2.2

Sensors

The PCB includes two temperature sensors; the Chip Temperature (CT)-sensor and the Board Temperature (BT)-sensor which are described below.

Board temperature sensor

The BT-sensor is a component with a complete solution for temperature mea-surements. It communicates digitally on a SPI-bus with the microprocessor and therefore delivers data quick. When communicating, 2 bytes (16 bits) are sent, but within the operational range −40◦C to 115C only a few possible combinations are used. Two bits are also used for communication, all together resulting in a resolution of 0.03125◦C. The sensor is linear within its whole operating range and already calibrated upon delivery.

Chip temperature sensor

The CT-sensor is a very small part of the sensor chip and communicates anal-ogously with the microprocessor through a voltage signal. The current is held constant and the microprocessor samples the voltage signal, reflecting the tem-perature, with a 10 bit AD-converter. The sampling frequency is 500 Hz, resulting in a value between 0 and 1023 every 2 ms. A lower temperature gives a higher voltage, and a higher temperature gives a lower voltage.

2.3

Heater control

Figure 2.4. The PWM-signal in the sensor system is controlled with a simple feedback

loop and a PI-controller.

To control the PWM-signal, a basic feedback loop is used and measurements from the CT-sensor are fed back into the system, see Figure 2.4. The controller is a PI-controller, control law shown in Equation (2.1) where u = P W M . During SU the regulator have parameters Kp,500and Ki,500. The regulator is running in

500 Hz.

u = Kpe + Ki

X

(30)

The implementation is specially made in two ways to fit the application. To begin with the reference value is changed one step up/down as soon as the old reference value is reached. This implementation causes the quite inexact CT-sensor to work around a limit between two steps in the AD-converter instead of between two limits. The second thing is that the Tc as well as the Tc reference

value are adjusted and subtracted from 1023 to make the Tcvalue to increase when

temperature increases. 1023 because it is the maximum value for the CT-sensor. This results in a positive feedback when the regulation fault e, shown in Figure 2.4, is considered and could be shown by

e = (1023 − Tc) − (1023 − Tc,ref) = −Tc+ Tc,ref (2.2)

The PWM-signal could be saturated, but with the chosen control parameters nothing could be noted in measurement data during SU in the specified tempera-ture range −40◦C to 115C.

2.4

Measurable signals

The signals measurable by the microprocessor differ from the ones delivered via the CAN-bus. Values of Tb, Tc and the PWM-signal can only be delivered via the

CAN-bus at a 10 Hz rate. For that reason, measured values of Tc and PWM are

only sampled versions of the true signals used by the controller working in 500 Hz. Values from the BT-sensor are delivered in mC, where 1 m◦C = 273.15 mK, and values from the CT-sensor are delivered in mV. The conversion from the previous CT-sensor value to mV is achieved by multiplying with four. The resolution of the measured CT-signal is therefore 4 mV.

2.5

Known heat flows

Since heat flows, especially convection, in the sensor module are very complex but still of great importance, a thesis work, Bäckryd (2005), was made within area during 2005. In the thesis work, only the sensor chip was modelled. Heat flows were simulated and trustworthy results were achieved with the finite element method. 32% of the heat were concluded to leave the sensor chip by convection and radiation during steady state, 22% by conduction through the glass carrier and another 46% by conduction through the electrical wires. Although the proportion of radiation was not exactly determined, it was by reasoning concluded to be neglectable, see Bäckryd (2005). An example of the results from the thesis work held in the matter can for one temperature be concluded by Figure 2.5.

(31)

2.5 Known heat flows 11

(32)
(33)

Chapter 3

Heat flow modeling

In this chapter, equations for the different forms of heat transfer, described in Section 2.1, are presented in Section 3.1. In Section 3.2 a small discussion about nonlinearities is held. With the application described in chapter 2 in mind, the heat sources, points of temperature measuring and possible heat flows are then discussed in Section 3.3.

3.1

Equations

A system undergoing a nonisothermal process could be described in many ways. When calculations are made, the accuracy by which you try to define tempera-tures in the system, decides the level of complexity and thereby the preciseness of the calculations. A system where temperatures should be calculated in every point would be very complex, but it would be fairly easy to calculate temperature changes due to conduction at one point every 100 mm in a homogeneous 200 mm long metal rod. In the same way, it would be much easier to calculate the contri-bution from convection or radiation to the surrounding air from the metal rod, if the temperature of the air were defined in only one point. Equations describing heat transfer with, conduction, convection and radiation are further described in Section 3.1.1, 3.1.2 and 3.1.3.

3.1.1

Conduction

A medium with a temperature gradient contains molecules with different en-ergy. Due to interaction between them, energy or heat is transferred through the medium. For conduction in one dimension, the transferred heat per unit time is defined by Fourier’s law and described by

˙

qcond= k

T1− T2

∆x , (3.1)

were k is the thermal conductivity of the medium and ∆x is the distance between temperature T1 and T2, see Incropera & DeWitt (2002).

(34)

In Bäckryd (2005) are the thermal conductivity for some materials included in the sensor module discussed. The PCB is concluded to have thermal conductivity around 1, while the small implants of gold and copper have about 100 times higher.

3.1.2

Convection

The rate of which heat is transferred by convection depends on several circum-stances, as mentioned in Section 2.1, but similarities to conduction exist. In the same way convection is proportional to the temperature gradient, but the temper-atures are here the temperature at the surface of the solid medium and in the fluid. The relation for convection could be seen as a description of the phenomena at the boundary, e.g. the transferred heat is not dependent of the distance between the temperatures. For convection, the transferred heat per unit time is defined by

Newton’s law of cooling and described by

˙

qconv= h (T1− T2) , (3.2)

were h is the convection heat transfer coefficient determined by boundary and fluid properties. The equation is not valid for the extraordinary conditions boiling and condensation, special considerations are then necessary, see Incropera & DeWitt (2002).

In Bäckryd (2005) approximate values for the convection coefficient in air and

H2 are calculated for some parts, e.g. the sensor wires are described to have a

h between 1 and 50. Here one must keep in mind that h is an area dependent

constant.

3.1.3

Radiation

All solid and liquid mediums transfer heat due to electromagnetic waves or ra-diation. For solids, much depend on the surface, where a blackbody is the ideal radiator. At all times, mediums interact with their surrounding, due to absorp-tion, reflection and transmission of the electromagnetic waves. Analogous with convection, the transferred heat depends on the temperature at the surface of the body and in the surrounding media, but in power of four. That reflects the net transfer of energy a body experience. For radiation, the transferred heat per unit time is defined by Stefan-Boltzmans’s law and described by

˙

qrad= σ T14− T 4

2 , (3.3)

were  is the emissivity, describing how efficient the body radiates, a value between 0 and 1. σ = 5.6705·10−8[mW2K4] is the Stefan-Boltzman’s constant, the maximum

value of radiation.  is 1 for a blackbody, see Incropera & DeWitt (2002).

3.2

Nonlinearities

When literature regarding heat transfer such as Incropera & DeWitt (2002) and Hagen (2000) are read, it is soon realized that many materials and relations are

(35)

3.3 A system perspective 15

nonlinear. For example, the equation for radiation described in Section 3.1.3. Boundary conditions and other circumstances such as cooling air moving in a special way further complicate. Usually a system consists of several materials as well and heat flows simultaneously in several directions with shifting temperature gradients. In the multidimensional case many solutions are difficult or impossible to solve analytically and approximate numerical methods such as finite element method is used, see Hagen (2000). Therefore nonlinear behaviors and consider-ations regarding temperature working points when working with heat flows in a system are crucial.

3.3

A system perspective

There are many heat transfer examples described in the litterature. All more or less fitted to their purpose, usually to illustrate a relation or equation. Here based on theory previously told, an attempt is made to point out possible heat flows in our system, the sensor module. First the key feature pointed out in the introduction to Section 3.1, temperature definition, is treated in Section 3.3.1. Heat sources are treated in Section 3.3.2 and a heat flow description of the system is made in Section 3.3.3.

3.3.1

Definition of temperatures

A vital task is to define temperatures, but since measurements from the two tem-perature sensors mounted at the sensor module are used, obvious starting points are their locations. To discuss though is what the CT- and BT-sensor values rep-resent, just one point or a larger area. Naturally an easy approach is to let the CT-sensor represent the temperature of the whole sensor chip and the BT-sensor the heat at a distance from the sensor chip. The CT-sensor would then mainly reflect the “stored” heat in the chip and equations could be used to determine the heat flow between temperature Tc and Tb. One natural temperature is then

missing, both Tc and Tb are in contact with air and a third temperature, denoted

Ta, is needed for the surrounding air.

3.3.2

Heat sources

It seems likely that the complete sensor module is affected by several heat sources, including electronics, ambient temperature and in particular the heaters mounted to the sensor chip. The different heat sources are likely to affect the three tem-perature areas in different ways, but efficiencies and gradients could without mea-surements only be guessed.

3.3.3

A heat flow description

If we now expand the system studied in the thesis work Bäckryd (2005) and pre-sented in Section 2.5, to include the BT-sensor as well we would have the system shown in Figure 3.1.

(36)

Figure 3.1. Imagined heat flows in sensor part of the PCB.

With the background of appropriate theory, the presence of the heat flows from the heated sensor chip presented in Section 2.5 seem obvious. The quantities still remain too complex to calculate without numerical methods such as the finite

element method. The BT-sensor as well as the CT-sensor would then probably

in the beginning of a SU be affected by the ambient temperature Ta in the air.

Both might as well be affected by heating from electronics, even if Tc most likely

mainly will reflect heat transferred from the heaters. It could be assumed due to the small distance between the sensor chip and the BT-sensor and rather high temperature (170C) at the sensor chip that conducted heat from the sensor ship will reach the BT-sensor as well. Which heat flow that has the biggest impact on the temperature Tb is yet to establish.

(37)

Chapter 4

System identification

This chapter introduces the reader to system identification. Within the field, more detailed theory relevant for the thesis work is also presented.

A model can be derived for many reasons, one reason is control. In the case of control, signals that could be decided by an observer are named control signals. Usually to make a distinction from uncontrollable disturbance signals. A control signal is provided by a regulator to control the system to a certain point. An accurate model of the system one wish to control is then vital, see (Glad & Ljung 2000).

In this thesis the term system is used to denote an object that produces observ-able signals and that behave in a certain way due to interaction between variobserv-ables. The signals one wish to study among the observable ones are called outputs and are denoted y(t). A system is usually also influenced by external signals, inputs. Input signals could be signals decided by an observer, denoted u(t), or

distur-bances. A disturbance signal could either be a measurable one, denoted w(t), or

a non measurable one, denoted v(t). A systems relation to the signals are shown in Figure 4.1, see (Ljung 1999, Söderström & Stoica 1989).

Figure 4.1. A systems relation to the output signal y(t), input signal u(t) and the

measurable and non measurable disturbances w(t) and v(t). (Ljung 1999) 17

(38)

When a system is studied, a description of the variables interaction with each other and how the observable signals are produced is usually necessary. Such a description is called a model. To construct a model from experiments and data analysis of input and output signals are called system identification, see (Ljung 1999).

The procedure of system identification and relevant theory presented in this chapter is at first hand that necessary to understand methods and results used and presented in this thesis work. The interested reader is referred to (Ljung 1999, Söderström & Stoica 1989).

4.1

The system identification procedure

When a mathematical model of a system is to be constructed, there are usually two possible ways. A model could be constructed based on known physical relations or with system identification. In system identification the model is derived from experimental data which is the method discussed in this chapter and used in this thesis, see (Ljung & Glad 1994).

In Ljung (1999) a system identification procedure is suggested. The procedure is divided into three basic steps and described as a loop where one needs to iterate until a model that passes validation and fulfills the purpose is found. The three steps are:

• The data record: This step includes experiment design and considerations

for data preprocessing. Experiment design is further described in Section 4.2 and data preprocessing in Section 4.3.

• The model structure: The second step includes the choice of model structure

and considerations for which system properties that are present in the system and desirable in the model. Different model properties are further described in Section 4.4 and model structures in Section 4.5.

• Determining the best model structure: The last step includes identification

and validation to determine the best model structure. Identification or meth-ods for parameter estimation are further described in Section 4.6 and model validation in Section 4.7 .

4.2

Experiment design

Since the way of system identification is to construct a model from input and output signals, one can understand that it is critical that the measured data is valid. Valid, in this case, means that it should represent the system properties one whiches to model. In other words, a clear view of what relations the model should describe seems necessary.

In Ljung & Glad (1994) this problem and some aspects around it is discussed. They also mention that for this reason, several decisions regarding the experiment setup need attention; Which signals should be measured?, How fast data sampling should be used?, How much data need to be collected? and most importantly how

(39)

4.3 Preprocessing data 19

should the input signal be chosen?. Aspects regarding the last more important question will be further discussed in Section 4.2.1.

4.2.1

Input signal

When choosing input signal two aspects of the signal should be considered, the spectrum and the shape. An input signal during an experiment with a broad spectrum is likely to excite more of the system properties, while the shape of the signal decides e.g. the power distribution for different frequencies. Each choice should reflect the purpose of the model. Several conflicts are at hand, e.g. a small model parameter variance is in conflict with a model suitable for a wide range of input signal frequencies. Therefore knowledge about the system and the purpose of the model are necessary. One needs to decide if the most important is to be able to model one frequency or if a more general model is appropriate. Thereafter an input with the desired spectrum could be chosen.

There are several differently shaped signals containing different frequencies available. One is a Pseudo-Random Binary Sequence (PRBS)-signal which has two value levels of choice. It is periodic with a period length 2nn related to its

order n and has the appearance of white noise, even though its mean differs from zero. The rate at which the signal shifts between the two levels could also be chosen. It is usually implemented as a probability between 1 and 0, were 0 is a never shifting signal and 1 shifts at every sample, see (Ljung 1999).

4.3

Preprocessing data

Even if experiments are designed with respect to all aspects mentioned in Sec-tion 4.2. Several reasons probably still make preprocessing of data necessary, e.g. new disturbances, seasonal trends or just corrupt data.

Handling of disturbances and trends, if needed, could be done in several ways, e.g. filtering data or include noise in the model. One needs to start from knowledge about the system and variables affecting it and choose an appropriate approach, see (Ljung 1999).

Corrupt data or outliers due to measurement failure could be removed in several ways. Usually it depends on, whether one or several sets of data are used. If only one set containing outliers is available and the length of data in between them upon a removal would be too short, one can merge data with special techniques to get sufficient length again. On the other hand, if several sets are available, one must consider if the set containing outliers is needed or not. If it is, the same technique as for one set could be applied, otherwise the complete set could be removed, see (Ljung 1999). Outliers could be detected in data sets with i.e. visual inspection, see Figure 4.2.

(40)

0 50 100 150 20 30 40 50 60 70 80 90 100

Fit for a model

Data set nr.

Fit [%]

Figure 4.2. Typical outlier when fit are considered for several data sets.

4.4

Model properties

When a model is to be estimated one must know which system properties one whiches to model. A part from properties based on fundamental relations of the system, many system properties are described in theory. This section will include a description of such different system or model properties from a theoretical point of view.

4.4.1

Static/Dynamic

A difference is made between static and dynamic systems.

A static system only consist of variables connected with static relations. Sys-tems where inputs instantaneously affect outputs upon a change. Most system consists of some static relation, see (Ljung & Glad 1994).

A dynamic1system, is a system in which outputs not only reflect the

instanta-neous value of the input, but basically all earlier values. Typical dynamic systems are systems including derivates of signals, see (Ljung & Glad 1994).

(41)

4.5 Model structures 21

4.4.2

Non-linear/Linear

A linear system could be defined as a system where linear combinations of inputs leads to the same linear combinations of outputs. Many systems are represented by linear relations and it is a well developed field where several methods for i.e. parameter estimation are at hand, see (Ljung & Glad 1994).

Nonlinear systems include nonlinear relations between input and output sig-nals. Many systems are affected by nonlinear relations but are instead described by a linear model. The use of nonlinear models in those cases heavily increase the possibilities but also the complexity. Today the methods developed for nonlinear system identification are much less represented, see (Ljung & Glad 1994).

4.5

Model structures

Which model structure to use is an essential choice during system identification. There are several, all with different properties and one should choose its possible use to be appropriate for the purpose. Sometimes which model to choose is not obvious and several models need to be evaluated. A common approach is then to begin with the easiest one to implement. In this section two different classes of models are described in Section 4.5.1 and 4.5.2 and a common way to represent models in Section 4.5.3.

4.5.1

Blackbox

Mathematical models based on first principles are in a simple case i.e. derived from Newton equations. The models are though in many cases overly complex and impossible to obtain in reasonable time due to the complex nature of many systems. In some of these cases system identification and blackbox models are helpful, see (Söderström & Stoica 1989).

Blackbox models are commonly used within system identification. A blackbox model only describes the relations between input and output signals and is derived without use of physical insight. Examples of model structures are Box-Jenkins

(BJ), Output-Error (OE), Auto Regression Moving Average with eXternal input (ARMAX) and Auto Regression with eXternal input (ARX), see (Ljung & Glad

1994).

There are also the cases Auto Regression (AR) and Auto Regression Moving

Avarege (ARMA) where no external input exist and the source is instead white

noise, see (Gustafsson et al. 2001).

4.5.2

Nonlinear Greybox

In some cases, the rather flexible signal relations used in blackbox modeling are not enough. The use of insights from the system could then be shown to improve a model. The known relations are included in the system description and a semi-physical model called greybox-model is achieved. Greybox models provides the benefit that nonlinearities, i.e. products, easily can be included and that some

(42)

physical insight is kept in the model. A greybox model does however still have a number of unknown free parameters which needs to be estimated, see (Ljung 1999).

4.5.3

The State-Space form

When the state-space form is used, an auxiliary state-space vector are used to describe the relationships between signals. The relationships are then written as a first-order system of differential or difference equations. One advantage with the form is that physical insights more easily can be included in the model. In discrete time, a linear state-space model are often written as

x(t + 1) = A(θ)x(t) + B(θ)u(t) + w(t)

y(t) = C(θ)x(t) + D(θ)u(t) + e(t)

where t is present sample, x(t) the state-space vector, w(t) process noise, e(t) measurement noise and θ is the model parameter vector. In a general (nonlinear) case the state-space representation can then be written as

x(t + 1) = f (t, x(t), u(t), w(t); θ) y(t) = h(t, x(t), u(t), e(t); θ)

where f and h are functions describing the relations, see (Ljung & Glad 1994).

4.6

Parameter estimation

The model parameters are to be estimated due to insufficient knowledge about the exact numerical values. Since the measurements used in the equations are impaired with measurement noise, the parameter estimation becomes a statistical problem. Different methods are used for different model representations. In Sec-tion 4.6.1–4.6.3 methods used in this thesis are described. SecSec-tion 4.6.4 describes one available tool for model representation and parameter estimation which has been used in this thesis.

4.6.1

Linear regression

Some models can be written as a linear regression model. In a linear regression model the relations between signals and parameters are described in a certain way. A linear regression model could naturally be estimated with the least-square method described in Section 4.6.2. A model could be described by

y(t) + a1y(t − 1) + · · · + any(t − n) = e(t)

ˆ

(43)

4.6 Parameter estimation 23

could be rewritten to

ϕ(t) = (−y(t − 1) − y(t − 2) . . . − y(t − n))T

θ = (a1a2 . . . an)T

y(t) = ϕT(t)θ + e(t)

where y(t) and ϕ(t) are measured signals and θ is the parameter vector to be estimated. The equations are a linear regression model, see (Gustafsson et al. 2001).

4.6.2

Least square

The least square method is the preferred way to estimate linear regression models. The least square method minimizes a cost function which is the square of the estimation error and described by

VN(θ) = 1 N N X t=1 (y(t) − ϕ(t)θ)2= 1 N N X t=1 ε(t, θ)2

where ˆθN minimizing VN(θ) described by

ˆ

θN = arg min θ

VN(θ)

provide an optimal solution, see (Gustafsson et al. 2001).

4.6.3

Gauss-Newton algorithm

In difference with linear estimation methods, solutions provided by nonlinear es-timation methods can not be guaranteed to be global optimums. When solving, iterations are made and the solution may converge to only a local minimum pend-ing on search direction. Different methods obtain the search direction differently. The implementation of the Gauss-Newton algorithm method used in this thesis use

f(i)= J (x)JT(x)−1J (x) (y1:N− h(x)) (4.1)

here y = h(x1, x2) + e and the Hessiand

2V (x)

dx are approximated with J (x)J T(x).

Where J (x) are the Jacobian of the total residual E(x), given by

J (x) = ∂E

T(x)

∂x

(44)

The approximation works for large number of data and small residuals. To be able to initiate the algorithm with a small residual, the state initial values and the initial values of the parameters play a major part. The Gauss-Newton algorithm method then updates the parameter estimates according to

ˆ

x(i+1)= ˆx(i)+ α(i)f(i) (4.2)

where f(i)is the search direction shown in Equation (4.1) and α(i)the step length.

When initializing the iteration, h(x) and J (x) are calculated from the initial values and ˆx(i+1) are provided according to Equation (4.2). Equation (4.2) are

then iterated. If the cost function increases during iteration, the step length are halved. If successful, the algorithm terminates when the change in cost or size of the gradient are small enough, see (Gustafsson 2007a).

4.6.4

Tools

COMSOL Script are one available tool for calculations. COMSOL Script is a part

of COMSOL Multiphysics R2. To COMSOL Script now Signal & Systems Lab

have been developed, providing support for nonlinear model representation and parameter estimation. The interested reader is referred to the Signal & Systems

Lab’s manual: Gustafsson (September 2007b)

4.7

Validation

When a model is created one should validate the estimates predicted by the model. There are several ways and the chosen way should reflect the properties one which to test. A good measure that tests how well estimated data fits the outputs from the system are

fit = 100  1 − q PN t=1(y(t) − ˆy(t))2 q PN t=1(y(t) − ¯y)2  

where ˆy(t) are data estimates from the model, y(t) measured data and ¯y the mean

value of y(t), see (Ljung 1999).

An estimated model should always be validated on a new data set, otherwise one risks overfitting. In the case of overfitting the model is fitted to well to estimation data e.g. when noise in the estimation data are modeled. Some of the general description power are then lost, see (Ljung 1999).

(45)

Chapter 5

Data collection

This chapter discusses parts of the system identification procedure, including ex-periment design described in Section 5.1 and preprocessing of data described in Section 5.2.

The chapter treats the different options and difficulties when designing an ex-periment at the AS laboratory site and a few aspects are related to theory. The data preprocessing presented here is necessary for all measurements. Input signals and extraordinary preprocessing for separate cases are described under method in each section in Chapter 7, Identification.

5.1

Experiment setup

The requirement specification states what the sensor modules must fulfill to be approved. A few of the requirements describe external disturbances, such as the temperature, that the sensor should withstand with maintained accuracy of the H2- concentration predictions. Others describe by which accuracy the H2

-concentration should be measured. To be able to test the requirements before delivery, AS has a laboratory site with climate chambers where the important external variables could be controlled. Figure 5.1 shows one of those climate chambers.

With the possibility to vary those variables one should keep in mind the natural conclusion that also applies within system identification, what environment the model needs to be valid for Ljung (1999). The measurements should naturally then reflect that environment. It could be considered even more important when, as in this case, a nonlinear system is in question. If there is non modeled nonlinearities, measurement should preferably be made close to the chosen operating point.

5.1.1

The calibration procedure

All sensors are individuals and a calibration is needed for each one to perform op-timally. Each sensor is calibrated in a batch of 20 with a three step procedure. For

(46)

Figure 5.1. A climate chamber at the AS laboratory site, used for temperature and

H2-concentration measurements. Source: AppliedSensor

this thesis batch 9636 with 20 sensors numbered from 9950 − 9969 was assembled according to the new specifications described in Chapter 1, Introduction.

First, setpoint calibration for the CT-sensor is performed, where CT-sensor values are matched to the temperature of the surrounding, measured by the BT-sensor. Naturally the temperature is cycled in this step of the calibration, but to increase speed normally only a small temperature cycle is performed and data are instead extrapolated. In this thesis this step is performed as described in Section 5.2.2.

Second, a special sequence with cycling of temperature and H2-concentration

is performed to collect data for the data analysis. The sensors are here restarted several times to collect SU data for the prediction model. From the measurement data, all constants included in the prediction model are calculated.

Third, a final test is made to validate the performance of the newly calibrated sensors. Sequences used in this thesis are for this and the second step described under method in each section in Chapter 7, Identification.

The temperature and H2 levels normally used in the three steps are

differ-ent depending on type of calibration procedure. Used temperature cycle and H2

(47)

5.1 Experiment setup 27

5.1.2

Cycling of temperature

The climate chambers could control the ambient temperature at least within the range [−40◦C, 115◦C] specified in the requirement specification. The change could of course not be made instantaneously, but still faster than needed for the calibra-tion procedure. A temperature change is specified as, target temperature to reach and at what time it should be reached. The desired temperature cycle, e.g. the one shown in Figure 5.2, could then be achieved from a set of temperature changes. The climate chamber then automatically schedules the temperature change and controls the heating or cooling according to the specified cycle.

Figure 5.2. An example of temperature cycle for a calibration sequence. Source:

Ap-pliedSensor

5.1.3

Cycling of H

2

-concentration

Through connections at the wall in the chamber, also seen in Figure 5.1, H2 is

passed through from the gas regulators outside. Here a cycle is determined by several sequences each specifying an H2-concentration and number of samples to

collect before next sequence is initiated. At each sequence it is possible to choose between two modes, if the sensor module should run continuously or do restarts. In the case of restarts, number of seconds with power on and power off are specified as well. During normal calibration, 7 s on and 40 s off are used. Samples could of course only be collected when the module is on, since the sensor module itself samples and sends them.

(48)

5.1.4

Difficulties

With a setup, difficulties will be present since the environment is highly artificial. The same with the setup and experiment design used in this thesis and some difficulties have been noted in data.

Temperature considerations that have been noted are the fact that the heating and cooling are controlled and therefore the temperature increase declines close to the target temperature. The temperature controller also uses temperature sensors at a certain distance from the sensors and as a consequence the sensor modules attached to their heavy metal holders reaches target temperature a while after the climate chamber. None of this would be a problem if the temperature was constant during a SU, but during normal calibration the chamber works towards a target temperature. Today a small part of the difference in rise in temperature at a sensor during SU, is due to different amounts of heating or cooling at different times. The phenomena could be a problem if a to big temperature change is made too fast. Today during a normal calibration procedure, a SU is unaffected by the chambers temperature increase during the first 2 s of a SU and the effect during the rest of the SU is small and therefore neglected.

Since only the flow of the gas is measured during a calibration procedure the considerations regarding H2-concentration cycling cannot be verified. To begin

with, the gas passes through the sensor modules connected in series and the tem-perature of the gas that reaches the first and last sensor must therefore be different. It takes about 10 s−15 s for the gas to pass through a chamber and depending on the surrounding temperature the sensors are suspected to be heated or cooled differently by the gas.

Since many difficulties are present when measuring, concerns could or should arise when designing a measurement. If it is not possible to isolate or work around a difficulty, one should keep in mind that the assumptions made may have influence on results later in the system identification process.

(49)

5.2 Data preprocessing 29

5.2

Data preprocessing

In Section 4.3 several reasons for data preprocessing were given, a few of them which apply here, e.g. corrupt samples. Other reasons are limitations at the measurement site mentioned in Section 5.1, e.g. limited change rate in H2

-concentration. The two examples are further described in Section 5.2.1, whereas Section 5.2.2 discusses the setpoint step in the calibration procedure where the CT-sensor values are converted from mV toC.

5.2.1

Valid SU’s

During a normal calibration the H2-concentration is cycled between 0 %, 0.2 %,

0 %, 2.0 %, 0 %, 4.4 % while SU’s are being made. Since the exact H2-concentration

is unknown during transients, data from SU’s too close to switchpoints are re-moved. In this way one can know that only data from SU’s with stable conditions, valid SU’s, are used. In Figure 5.3 such a selection is shown.

3.005 3.01 3.015 3.02 3.025 3.03 x 105 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5

Chosen SU´s made in stable conditions

Samples H 2 −concentration [%] SU in air SU in 0,2% H 2 SU in 2,0% H 2 SU in 4,4% H 2 Neglected SU´s H 2

(50)

5.2.2

Temperature Setpoint

A setpoint calibration is for this system needed because the CT-sensor delivers sensor specific values in mV , only reflecting the temperature. The BT-sensor on the other hand deliveries values, which can be assumed to be accurate, in C originally. Therefore the easiest way to establish a connection between the CT-sensor value and C are to use the BT-sensor value. To get the clearest view of the behavior of the CT-sensor in the current temperature range, a full range, [−40◦C, 115◦C], setpoint measurement were made for this thesis. No H2 were

present. Typical results in this case from sensor 9962 are shown in Figure 5.4

0 1 2 3 4 5 6

−100 0 100 200

Sensor values measured by the BT−sensor

Time [h] Temperature [°C] 0 1 2 3 4 5 6 1.5 2 2.5x 10

6 Sensor values measured by the CT−sensor

Time [h]

Sensor value [mV]

Figure 5.4. Data collected from the BT- and CT-sensor during a full range,

[−40◦C, 115◦C], setpoint measurement.

To fit values from the two sensors together, the relations were written as a linear regression model, described in Section 4.6.1, and estimated with the least-square method, briefly described in Section 4.6.2. A first and second degree polynomial fit were tried. The estimated parameters with variance for the four sensors are shown in Table 5.2.2.

(51)

5.2 Data preprocessing 31

Table 5.1. Tc[mV]⇒[◦C] linear conversion parameters

Tc,celsius= Tc,mVα1+ α2 Sensor α1 α2 9950 -0.1859 430.0994±1.5208 9951 -0.2199 740.3308±1.3121 9961 -0.1947 400.7779±1.0073 9962 -0.1885 424.2742±1.1689

Historically a first degree fit has been accurate enough and AS choice earlier. In Figure 5.5 and Figure 5.6 typical results, in this case for sensor 9962, from the two approximations are shown. In Figure 5.7 and Figure 5.8 the final results of the CT-sensor compared to the BT-sensor are shown.

1700 1800 1900 2000 2100 2200 2300 2400 −40 −20 0 20 40 60 80 100 120

CT−sensor values against BT−sensor values

Sensor value [mV]

Temperature [°C]

BT−CT relation Second degree fit

Figure 5.5. A second degree setpoint fit for CT-sensor values against BT-sensor values.

The linear approximation is from this point chosen to be used for two reasons. Both the historical fact that a linear approximation worked well enough in the past and the fact that the results in Figure 5.7 and Figure 5.8 show a very small difference. The relatively small variance for the estimated conversion parameters for the four sensors shown in Table 5.2.2, further underlines the fact that the linear fit works well. Parameters for all sensors could easily be estimated if necessary.

(52)

1600 1800 2000 2200 2400 2600 −40 −20 0 20 40 60 80 100 120

CT−sensor values against BT−sensor values

Sensor value [mV]

Temperature [°C]

BT−CT relation First degree fit

Figure 5.6. A first degree setpoint fit for CT-sensor values against BT-sensor values.

0 1 2 3 4 5 6 −40 −20 0 20 40 60 80 100 120

Results from second degree fit of CT−sensor values

Time [h]

Temperature [°C]

BT−sensor values Fitted CT−sensor values

(53)

5.2 Data preprocessing 33 0 1 2 3 4 5 6 −40 −20 0 20 40 60 80 100 120

Results from first degree fit of CT−sensor values

Time [h]

Temperature [°C]

BT−sensor values Fitted CT−sensor values

Figure 5.8. The result when using a first degree fit for the CT-sensor.

With the linear approximation the corresponding value to 4 mV is 0.8◦C which is the new resolution of the CT-sensor.

(54)

References

Related documents

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Det har inte varit möjligt att skapa en tydlig överblick över hur FoI-verksamheten på Energimyndigheten bidrar till målet, det vill säga hur målen påverkar resursprioriteringar

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa

Good user interfaces of online shopping provide multiple choosing methods, such as in the form of search engine, navigation, keyboard accelerators, and direct manipulation

We quantify the aggregate welfare losses attributable to near-rational behavior as the per- centage rise in consumption that would make households indi¤erent between remaining in

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

It includes the basics of epileptic seizures, how EEG is used for diagnosing epilepsy, EEG devices for non-medical purposes, and also how an epileptic seizure is predicted when

This kind of variables also reduces the size of the dataset so that the measure points of the final dataset used to train and validate the model consists of one sample of