• No results found

Pressure Control using Sensorless Voice Coil

N/A
N/A
Protected

Academic year: 2021

Share "Pressure Control using Sensorless Voice Coil"

Copied!
93
0
0

Loading.... (view fulltext now)

Full text

(1)

Institutionen för systemteknik

Department of Electrical Engineering

Examensarbete

Pressure Control using Sensorless Voice Coil

Examensarbete utfört i Reglerteknik vid Tekniska högskolan vid Linköpings universitet

av Erik Bergman LiTH-ISY-EX--13/4703--SE

Linköping 2013

Department of Electrical Engineering Linköpings tekniska högskola

Linköpings universitet Linköpings universitet

(2)
(3)

Pressure Control using Sensorless Voice Coil

Examensarbete utfört i Reglerteknik

vid Tekniska högskolan vid Linköpings universitet

av

Erik Bergman LiTH-ISY-EX--13/4703--SE

Handledare: Michael Roth

isy, Linköpings universitet Pontus Olson

Maquet Critical Care

Examinator: Johan Löfberg

isy, Linköpings universitet

(4)
(5)

Avdelning, Institution Division, Department

Avdelningen för reglerteknik Department of Electrical Engineering SE-581 83 Linköping Datum Date 2013-06-25 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.ep.liu.se

ISBN — ISRN

LiTH-ISY-EX--13/4703--SE Serietitel och serienummer Title of series, numbering

ISSN —

Titel Title

Tryckreglering med sensorlös talspole Pressure Control using Sensorless Voice Coil

Författare Author

Erik Bergman

Sammanfattning Abstract

In this master thesis, a new method for estimating the position of the moving parts of a voice coil is presented. Instead of using a position sensor the method exploits the connection between the position and the inductance of the voice coil. This is done by superposition-ing a small sine voltage signal and the voice coil voltage control signal. By measursuperposition-ing the voltage and current and using the fourier transform, the impedance and phase difference is calculated which are used to compute the inductance.

A medical ventilator (also known as a respirator) concept is developed with a control system which takes the expiratory pressure from a higher to a lower level. The position estimation algorithm is then used in an attempt to improve the pressure control. The result is a slightly more stable control system.

The master thesis is conducted at Maquet Critical Care (MCC) in Solna, Sweden. MCC is a medical technology company working with high performance medical ventilators. The long term goal of this work is to develop a ventilator which is more comfortable for the patient.

Nyckelord

Keywords Pressure control, Sensorless, Voice coil, Automatic control, PEEP, Ventilator, Position estima-tion

(6)
(7)

Sammanfattning

I det här examensarbetet presenteras en ny metod för att estimera positionen av de rörliga delarna i en talspole. Genom att utnyttja sambandet mellan induktans och position går det att få fram positionen utan att använda en positionssensor. Detta görs genom att superpositionera en liten sinussignal med talspolens styr-signal. Genom att mäta strömmen och spänningen över talpsolen samt genom att använda fouriertransformen går det att beräkna impedansen och fasskillnaden vilket används för att beräkna induktansen.

En ny ventilator (även kallad respirator) tas fram, med ett styrsystem som tar expirationstrycket från en högre till en lägre nivå. Algoritmen för positionsesti-mering används i ett försök att förbättra tryckregleringen. Resultatet är ett styr-system med aningen mindre oscillativt beteende.

Examensarbetet är utfört på Maquet Critical Care (MCC) i Solna, Sverige. MCC är ett medicintekniskt företag som arbetar med bland annat ventilatorer. Det lång-siktiga målet med detta arbete är att utveckla en ventilator som är bekvämare för patienten.

(8)
(9)

Abstract

In this master thesis, a new method for estimating the position of the moving parts of a voice coil is presented. Instead of using a position sensor the method exploits the connection between the position and the inductance of the voice coil. This is done by superpositioning a small sine voltage signal and the voice coil volt-age control signal. By measuring the voltvolt-age and current and using the fourier transform, the impedance and phase difference is calculated which are used to compute the inductance.

A medical ventilator (also known as a respirator) concept is developed with a control system which takes the expiratory pressure from a higher to a lower level. The position estimation algorithm is then used in an attempt to improve the pres-sure control. The result is a slightly more stable control system.

The master thesis is conducted at Maquet Critical Care (MCC) in Solna, Sweden. MCC is a medical technology company working with high performance medical ventilators. The long term goal of this work is to develop a ventilator which is more comfortable for the patient.

(10)
(11)

Acknowledgments

First of all i want to thank my parents for all their support, not only during this master thesis, but for the past - sometimes stressful - couple of years. Thank you. It has been great doing the master thesis at Maquet Critical Care, Solna. Almost every day has taught me something new and when problems have occurred there has always been someone there to guide me in the right direction. I want to thank my supervisor Pontus Olson for all his great tips and for helping me focus on the "right" things. Also a big thank you to Bengt Johansson, Stig Andersson, Leif Back at MCC-DGS and Jukka Kaijalainen in the Research and Development workshop and everybody else at MCC, all of you have been very helpful.

I also want to thank my examiner Johan Löfberg and my supervisor Michael Roth, both at ISY, LiTH.

Last, but not least, a huge thank you to Lina for helping me cope with the housing-situation in Stockholm. It has been fun living in the library!

Solna, June 2013 Erik Bergman

(12)
(13)

Contents

Notation xi

1 Introduction 1

1.1 Maquet Critical Care . . . 1

1.2 Ventilator . . . 2

1.3 Purpose . . . 4

1.4 Methodology . . . 5

1.5 Delimitations . . . 6

1.6 Thesis outline . . . 6

2 Description of the voice coil and its electrical properties 7 3 The expiratory system 13 4 Voice coil inductance analysis 17 4.1 Test 1: Inductance -vs- frequency . . . 18

4.1.1 Results . . . 18

4.2 Test 2: Inductance -vs- position . . . 19

4.2.1 Results . . . 20

4.3 Test 3: Inductance -vs- current . . . 24

4.3.1 Results . . . 24

4.4 Choice of voice coil . . . 25

5 Ventilator control design 27 5.1 Hardware . . . 27

5.1.1 Component list . . . 27

5.1.2 Sensors . . . 28

5.1.3 DAC and ADC . . . 28

5.2 Software . . . 29

5.2.1 Position estimation algorithm . . . 29

5.2.2 Inspiration . . . 33

5.2.3 Reference signal . . . 33

5.2.4 Controller . . . 33 ix

(14)

x CONTENTS

5.3 Position estimation tests . . . 37

5.4 Observer . . . 41

5.4.1 Velocity estimation . . . 41

5.5 Pressure tests . . . 44

5.5.1 Results . . . 44

5.5.2 Pressure control with knowledge of the position . . . 49

5.6 Discussion . . . 51

5.6.1 Position estimation . . . 51

5.6.2 Pressure control . . . 51

6 Conclusions and future work 53 6.1 Conclusions . . . 53

6.2 Future studies . . . 54

Bibliography 57 Appendix 59 A.1 Simulink charts . . . 61

A.1.1 Ventilator concept . . . 61

A.1.2 Position estimation algorithm . . . 63

A.2 Electric circuits . . . 65

A.2.1 Bode 100 . . . 65

A.2.2 Operational amplifier circuit . . . 66

A.2.3 Ventilator (target machine) . . . 68

A.2.4 Differential amplifier . . . 69

A.3 Electric components . . . 71

A.3.1 Voice coil 3334-180 . . . 71

A.3.2 OPA541AP . . . 73

(15)

Notation

Definitions

Notation Description

Pexp Expiratory pressure

Qexp Expiratory flow

z Membrane gap, see Figure 2.1

Fm Voice coil force, see Figure 2.1

Fd Voice coil damping force

B Magnetic flux density

E Electric field

U Voice coil voltage

I Voice coil current

L Voice coil inductance

R Voice coil resistance

Z Voice coil impedance

α Phase difference between voltage and current

x Estimated voice coil position

v Estimated voice coil velocity

ˆ

x Observed (improved) position

(16)

xii Notation Abbreviations

Notation Description

PEEP Positive End Expiratory Pressure

PAP Pressure above PEEP

cmH2O Centimetres of water, pressure unit used in medical

science (1 cmH2O = 98.0665 Pa = 0.980665 millibar)

PID Proportional, Integral, Differential (controller)

lpm Unit of flow, Liters per minute

AC Alternating Current

DC Direct Current

BP Band pass filter

LP Low pass filter

DAC Digital to analog converter

ADC Analog to digital converter

FFT Fast fourier transform

LVDT Linear variable differential transformer

(17)

1

Introduction

In this introductory chapter, the background and purpose will be described. Be-fore that, Maquet Critical Care will be presented and the basic principle of a ven-tilator will be explained. In the end of the introduction chapter there will also be a section where the thesis outline will be presented and where the method of achieving the objectives is explained.

1.1

Maquet Critical Care

Maquet is a multinational company working in the field of medical engineering. The headquarters are located in Rastatt, Germany. In 2010 Maquet had a revenue of 1.172 billion Euros and approximately 5000 employees. Since 2000, Maquet has been part of the Getinge Group which is a global medical technology com-pany with its roots in Getinge, Sweden. [14]

Maquet has three speciality divisions:

Surgical workplaces Focusing on operating tables, operating lights and

com-plete operating rooms.

Cardiovascular Working with medical devices, equipment and cardiac- and

vas-cular surgery.

Critical care Which focus on high-performance ventilators and anesthesia

sys-tems.

Maquet Critical Care is located in Solna, Sweden and is a market leader in high performance medical ventilators. In Solna there are about 400 employees of which about 100 are engineers working with research and development. This

(18)

2 1 Introduction

is where this master thesis has been conducted. Figure 1.1 shows theservo-i

ven-tilator, one of Maquet Critical Cares most well known products and the ventilator which this report is mostly connected to.

Figure 1.1:The Servo-i ventilator. [1]

1.2

Ventilator

Before the ventilator principle is described, the procedure of breathing must be explained. Every breath is divided into three parts; the inspiratory phase, the constant phase and the expiratory phase. Together they form the respiratory cycle [2]. This can be seen in Figure 1.2. In the inspiratory phase the inhalation occurs and the pressure in the lungs is building up. This pressure is then kept constant for a short time before it is released as an exhalation under the expiratory phase.

Figure 1.2:The entire respiratory cycle. [2]

A ventilator (also called a respirator) is a device that helps a patient to breath by performing a mechanical ventilation of the patient by changing the pressure in the lungs. The most common way of connecting the patient to the machine is

(19)

1.2 Ventilator 3

through the mouth, using a tracheal tube. It is important to have separated in-spiration and expiration tubes to avoid pushing the exhaled carbon dioxide back into the lungs of patient. Figure 1.3 describes this connection and the general principle of a ventilator. For the ventilator to function it must be connected to a high pressure air source. The inspiration valve then controls how much of the flow from the high pressure side that is allowed to pass through the valve and pressurize the lungs. Under the inspiratory phase the expiration valve is closed so that all of the air ends up in the lungs of the patient. Under the expiration phase the inspiratory valve lets a small constant air flow through in order for the expiration valve to have full control of the lung pressure.

Patient In flow Out flow Y-piece Inspiration valve Expiration valve PEEP servo u

Figure 1.3:How the ventilator is connected to a patient.

Figure 1.4 shows how the pressure changes during two respiratory cycles. The pressure rises under the inspiration and reaches the peak pressure (1). A drop in pressure (3) then occures due to the resistance to the gas flow in the airways of the patient. After this drop the pressure is stabilized (2) on the PAP-level (Pressure Above PEEP). The expiratory phase then takes the pressure down to the PEEP-level (Positive End Expiratory Pressure). Number 4 shows the pressure difference between PAP and PEEP. The PEEP is pre-chosen by the ventilator op-erator, usually a doctor. To make the expiration phase as pleasant as possible for the patient it is very important that the pressure drops to the PEEP-level very fast and with as much resemblance to regular breathing as possible.

(20)

4 1 Introduction

Figure 1.4: Pressure -vs- time. Number two marks the beginning of the

expiratory phase where the pressure goes from PAP to PEEP. [2]

In order for the ventilator to perform this pressure control the expiration valve is connected to a so called PEEP servo. The PEEP servo is a construction that ad-justs the flow through the expiration valve depending on the pressure in the lung. This is achieved by a control algorithm that uses signals from a nearby pressure sensor and a calculated reference pressure signal which depends on patient char-acteristics. The output from the PEEP servo is a voltage signal that is sent into a so called voice coil. A voice coil (Figure 1.5) produces a force proportional to the current it is supplied with. The force acts in the center of a circular membrane which tightens or loosens the gap between the voice coil and a circular opening, this makes the pressure rise or drop. The voice coil is discribed further in Chapter 2.

In this thesis the termvoice coil position will be used to describe the position of the

voice coil pin. The voice coil itself is fixed and only the pin, mantle and winding is moving.

1.3

Purpose

The goal of this master thesis is to clarify if it is possible to estimate the position of the voice coil pin without changing the hardware. Depending on the result of that, investigate how the knowledege of the position can be used to improve the control system.

This is done by finding the answers to the three following qustions:

• Is it possible to estimate the position of the voice coil pin by adding a high frequency sine signal to the input voltage and then measuring the induc-tance?

• Can the knowledge of the position be used to improve the pressure control algorithm?

• Since the voice coil has to lift its own mass there is a chance that a smaller voice coil could improve the overall performance of the controller. What are the advantages and disadvantages of using a smaller voice coil?

(21)

1.4 Methodology 5

Figure 1.5:Two of the voice coils that have been studied in this thesis. The

big one has been disassembled and is showing the moving parts: the voice coil pin (1), the copper winding (2) and the copper mantle (3). The voice coil and its components are more clearly described in Figure 2.1.

1.4

Methodology

First a literature study was conducted to understand how the voice coil is working and to obtain a basic understanding of medical ventilators.

To be able to answer the first question listed in the purpose section three voice coil tests have been carried out to get a understanding of how the inductance, position, current and frequency are linked together.

To answer the remaining two questions a ventilator concept is developed and the smaller voice coil is available in that design. A pressure algorithm that works with and without the knowledege of the position is implemented on this ventila-tor and a few pressure tests are conducted.

(22)

6 1 Introduction

1.5

Delimitations

In this work, a ventilator concept has been developed and since the focus has been on the expiratory phase only the expiratory valve has been using pressure control. The inspiratory valve has been uncontrolled and has instead used a timer to reach

the desired pressure. The ventilator concept is based on theservo-i ventilator and

is designed to resemble it as much as possible, this is mainly because the results that this thesis may lead to shall be easily transferable to that ventilator type. The expiratory control system has been trimmed and adapted for two different patient categories, an adult with fairly common lung characteristics and a child with a very stiff lung and a quite high PAP pressure. Only three different voice coils have been studied in the thesis because of the time constraint.

1.6

Thesis outline

This thesis consists of the following six chapters: • Chapter 1: Introduction

Presents Maquet Critical Care and how a ventilator works. It also presents the purpose, delimitation and methodology of the thesis.

• Chapter 2: Description of the voice coil and its electrical properties Presents the theory of how a voice coil is constructed and how it transforms a current into a force.

• Chapter 3: The expiratory system

Describes the system which the PEEP-valve is controlling. • Chapter 4: Voice coil inductance analysis

In this chapter all voice coil test, and the results of these, are presented. It is also discussing which voice coil that is best suited for sensorless position estimation.

• Chapter 5: Ventilator control design

Presents the ventilator concept that has been constructed in this work and the pressure tests it has been used to perfrom. The results of both the posi-tion estimaposi-tion and the pressure control is presented and discussed here. • Chapter 6: Conclusions and future work

In Chapter 6 all conclusions regarding the results and some examples of future studies will be presented.

• Appenix

The simulink charts, electric circuits and electric components used in this work are presented here.

(23)

2

Description of the voice coil and its

electrical properties

The most important component for the expiratory pressure control in a medical ventilator is the voice coil. It is the part that opens and closes the expiratory valve and controls the airflow out of the patient’s lungs. In this chapter that component will be described.

The voice coil is named from its initial application area - the loudspeaker. It is there used to produce a force which acts on a membrane which starts to vibrate and thereby creates the sound. This is still the most common application area of the voice coil. Since it can be positioned with a very high precision and with very high speed it is also used as a actuator in many applications where a precise control is neccesary, hard disk drives and camera lens focusing are examples of that [9].

Figure 2.1 shows a cross section of the voice coil and the membrane it interacts

with. The force makes the voice coil pin move and the positionx affects the gap z

which is linked to the flow and pressure. This will be explained further in chapter 3.

The following example is a good way of illustrating how the voice coil works.

When a particle with the electric chargeq travels with velocity v in a electric field

Eand magnetic field B the force that acts on the particle can be written as

F= q(E + v × B). (2.1)

This is called the Lorentz force [7]. In the case described in Figure 2.2 there is no

external electric field, E = 0. If one of the of the electric conductors with lengthl

is considered, instead of just a single particle, the magnetic force can be rewritten. By using the definition of electric current, i = q/t, and by rewriting the velocity

(24)

8 2 Description of the voice coil and its electrical properties

asl/t the Lorentz force can be rewritten according to

Fm= q(v × B) = q/t |{z} = i (l × B) = i(l × B) (2.2) X Pexp Fm Z Fexp Permanent magnet Voice coil pin

Winding

Mantle

Membrane plate Gap (width Z)

Air gap

Air flow direction

Iron

Figure 2.1: Exploded view of the voice coil in its surrounding. The

perma-nent magnet and the iron is fixed under the membrane plate. The results of this is that the mantle, winding and voice coil pin starts to move due to the magnetic force.

This shows how the voice coil transforms a current into a force, a positive current results in a positive force and vice versa. Since the magnetic field always has the same direction, out from the center of the voice coil, the only difference between the example above and the real case (Figure 2.2) is that the length l = 2πrN

(25)

9

where r is the radious of the mantle and N is number of turns. The force makes the moving parts of the voice coil move and depending on the material in the mantle an opposing force is generated.

i B N S S N Fm X, Ẋ Magnet Gap height Coil height

Figure 2.2:The voice coil zoomed in on the mantle and winding. The

mag-netic field is symbolized by the blue arrows and the direction of the current is towards the reader.

According to Lenz’ law [7] an induced current is generated to compensate for the effects of the movement. In this example the movement, ˙x, is upwards and according to equation 2.1 the only way the force can be eliminated is for a induced electric field to appear. For the force to be zero the induced electric field must be

0 = F = q(Eind+ ˙x × B) ⇒ Eind= −( ˙x × B) (2.3)

The induced electric field results in an induced current that results in a damping force

Fd= iind(l × B) (2.4)

This can be written as a scalar according to

Fd = Kd˙x (2.5)

The damping force is working in the opposite direction of the velocity. Where Kd

depends on the number of turns and the cross sectional area of the membrane

for instance. Kd is also inversely proportional to the mantle resistivity. Since

copper has a resistivity ρCu = 1.67 · 10

8

[Ωm] and plastic has a resistivity ρP E=

3 · 1015[Ωm] it is quite clear that the damping force is neglectable for a voice coil

with a plastic mantle. [7]

When the coil height is greater than the gap height the voice coil is said to be overhung and when the coil height is less than the gap height the voice coil is said to be underhung [1]. The voice coils studied in this thesis are all underhung,

(26)

10 2 Description of the voice coil and its electrical properties this is a good thing since the mantle is then affected by the magnetic field with an amount proportional to the position. Figure 2.3 shows the electric circuit used to describe the voice coil electrically [1]. By using Kirchoffs voltage law the following connection between the voltage, current and inductance [8] can be derived

UL= Ldi(t)

dt (2.6a)

which can be written as a Lapace transform: UL(s) = sL · I(s)

I(s) = U (s) − Uind(s) Ls + RL = 1 s( U (s) − Uind(s) I(s)R) (2.6b)

Figure 2.3:A model of electrical circuit of the voice coil. [1]

Since U  Uind especially for low velocities, Uindcan be neglected for now, this

will be discussed later in Chapter 5.3. Equation 2.6b can then be written as

Z = U (s)

I(s) = Ls + R (2.7a)

arg(Z) = argU (s)

I(s) = α = argU (s) − argI(s) (2.7b)

where Z is the impedance. This result is shown in Figure 2.4.

By using the Fourier transform instead of the Laplace transform the inductance can then be written as

L = |Z|sin(α)

⇒ |L| =

|Z|sin(α)

2πf (2.8)

This equation describes how the inductance, at a selected frequency, only de-pends on the voltage, the current and the phase difference between them. This is used in the position estimation algorithm, Chapter 5.2.1.

(27)

11

Figure 2.4:The connection between the impedance, the inductance and the

(28)
(29)

3

The expiratory system

Figure 3.1 shows the entire system that needs to be controlled. Since the function that describes the relation between the gap width (z) and the expiratory flow

(Qexp) is non-linear the entire system is non-linear.

Valve dynamics Non-linear function

Patient lung and

tube-system

u z Qexp Pexp

Figure 3.1:The system consists of three different parts.

The system consists of the following three different parts

• The valve dynamics is a function that, given the voltage (u), provides the gap width (z) between the membrane and the circular opening. This func-tion also takes into account how the voice coil produces a force given a voltage.

(30)

14 3 The expiratory system

• A non-linear function of the expiratory flow (Qexp) given the gap width (z)

and the pressure Pexp.

• The patient lung and the tube system that is connecting the patient to the ventilator.

All forces that are acting on the membrane, shown in Figure 2.1, are [1]

• The magnetic force Fm, described in equation 2.2

• The pressure force Fp= Pexp· A, where A is the area of the membrane plate.

• The damping force Fd, described in equation 2.4

• The gravitational force Fg = m · g

• The spring force Fk= Ks· x, due to the compression of the membrane plate.

Ksis the spring constant.

By using Newton’s second law of motion and the Lapace transform a transfer function from u to z can be written as [7]

FmFgFpFkFd = m ¨x ⇔ Bl · i − mg − PexpA = Ksx + Kd˙x + m ¨x (3.1a)

Laplace transform ⇒ X(s) = Bl · I(s) − mg/s − PexpA

ms2+ K ds + Ks Z(s) = z0−x = z0− Bl · I(s) − mg/s − PexpA ms2+ K ds + Ks (3.1b)

where z0 is a constant. How the voltage and current are connected is described

in equation 2.6.

The patient is connected to the ventilator with a tracheal tube that is placed through the patients mouth and down to the tracheal airway which is connected to the lungs. The tubes that connects the ventilator to the tracheal tube are a lot thicker than the tracheal tube itself. The result of this is that the flow resistance in the tube system is very much dependent on the diameter of the tracheal tube. Different patients use different tracheal tubes and the system is therefore affected by this.

Another important patient characteristic is the lung compliance. The lung com-pliance is a property that describes how the lung volume changes when the pres-sure is changed. It is defined as C = ∆V /∆P [1]. Figure 3.2 shows the compliance curve. The compliance can be described as the opposite to stiffness since the compliance is high when a small change in pressure results in a large change in volume. One of the reasons for the ventilator to start at the PEEP pressure is that the compliance is very high in that area which is optimal for the oxygen absorption.

(31)

15

Figure 3.2:Lung compliance curve. The zone of optimal ventilation begins

(32)
(33)

4

Voice coil inductance analysis

The three different voice coils used in this thesis all show different properties regarding how the inductance varies depending on position, operating frequency and current. The following tests aim on finding a voice coil that is best suited for sensorless position estimation.

The three voice coils studied in this thesis are • Voice coil A:

This is the voice coil used today in the Servo-i ventilator. It has a total weight of 1,1 kg and a coil mass (the moving part) of 43 g. The mantle is made out of copper and the mantle radius is 22 mm. It has a working range of 0 mm to 5,5 mm.

• Voice coil B:

This voice coil has the same dimensions as the previous one. The only dif-ference is that the mantle is made out of plastic instead of copper which makes the damping force neglectable.

• Voice coil C:

There are many differences between this voice coil and the other two. The total weight is only 140 g and the coil mass is 9 g. The mantle radius is 15 mm and just like type B it is made out of plastic. The size makes it not as powerful as type A & B but in this application it is strong enough to hold a

pressure up to 100 cmH2O. It has a working range of 0 mm to 6 mm. This

voice coil is described further in appendix A.3.1.

All tests has been performed by connecting the voice coil to aBode100 [10]

mea-surement device according to the wiring diagram in appendix A.2.1. By doing

this the impedance and phase is obtained and can be exported from theBode100

(34)

18 4 Voice coil inductance analysis

software to MATLAB where the inductance can be computed and the results

plot-ted. Since theBode100 is primarily used for studying system characteristics for

different frequencies with so called frequency sweeps, the smallest possible fre-quency span is 10 Hz. This is something that will affect Test 2.

4.1

Test 1: Inductance -vs- frequency

This test has been made to acquire the knowledge about which frequency is most well suited for position estimation using the inductance. The position of the voice coil is fixed and a frequency sweep from 100 Hz to 10kHz is made. It is desirable to have a high frequency since it will then be easier to filtering out the effects of induced current due to movement. In the results below the voice coil is fixed in the position x = 0mm. The value of the inductance is not the most important thing, instead it is the inductance difference between the different levels that is interesting and this will be further studied in the next test. Although tests have shown that there is a link between a low inductance and a low inductance difference between top and bottom.

4.1.1

Results

Figure 4.1 shows the results for voice coil A & B. The main difference between the two is that the inductance of voice coil A quickly goes down to about 0,15 mH and that voice coil B has a resonance top [8] around 1000 Hz and then stays at about 0,85 mH. After the resonance top the inductance difference between top and bottom is smaller than before. Voice coil B has a both small value of the inductance as well as a small inductance difference between x = 0mm and

x = 5mm.

Figure 4.1: Inductance -vs- frequency. The result for voice coil A (with

cop-per mantle) is to the left and voice coil B (with plastic mantle) is to the right. The small voice coil (type C) has a much higher value of the inductance than voice coil A & B. The inductance curve is also dropping slower than the other two. The

(35)

4.2 Test 2: Inductance -vs- position 19 inductance difference between top and bottom is bigger and since there is no resonance top the inductance difference slowly decreases with the frequency.

Figure 4.2:Inductance -vs- frequency. The smaller voice coil.

4.2

Test 2: Inductance -vs- position

Having selected the operating frequency (see Chapter 4.4) the tree different voice coils will be tested to see which one that is the easiest and most well suited for implementing the position estimation on. This is done by placing the voice coil in aMecmecin multitest 1-i [11] which is a force and position measurement robot

which can measure the position with micrometer precision. The robot is pro-grammed to travel 1 mm with the constant velocity of 20 mm/ min and then stop, and then move 1 mm again and so on. The voice coil will move from 0 mm to 5 mm, with 2 seconds pause on each level, and then back again. While the Mecmecin multitest 1-i moves up and down the Bode100 will measure the

impedance and phase so that the inductance can be computed in MATLAB after-wards. In order to test how the inductance depends on position and not frequency theBode 100 does a very slow 10 Hz frequency sweep, which is the shortest

pos-sible frequency sweep with theBode 100 software. The fact that the frequency

changes is something neglectable since the difference in inductance between 495 Hz and 505 Hz is very small.

(36)

20 4 Voice coil inductance analysis

4.2.1

Results

In this test the main difference between the different voice coils will be shown. Figure 4.3 shows how the inductance and position of voice coil B is related for the frequency 500 Hz. As the figure shows there is very little difference between

x = 0mm and x = 1mm, this is shown at about 499.7 Hz and 500 Hz. In fact x = 0mm appears to be above x = 1mm. The inductance is then exponetially

increasing with the position. The inductance difference between top and bottom is 0, 18 mH. The position-inductance relation can be mathematically described with a sigmoid function according to [3]

L(x) = L1 1 + ea(x−x0) + L0⇔x(L) = − 1 aln( L1 L − L0 −1) + x0 (4.1)

Where L1, L0, x0 and a are constants. The shape of the sigmoid function can be

seen in Figure 4.5.

Another problem can be seen for x = 4mm at 500,7 Hz and 501,2 Hz. There is a difference in inductance depending on if the voice coil is moving upwards or downwards. This hysteresis effect (0,07 mH) is hard to model and difficult to compensate for.

Voice coil A shows similiar results as voice coil B but with an even smaller induc-tance difference between the top and bottom (0, 008 mH). It is also very sensitive when selecting operating frequency. For example, a frequency of 800 Hz results in a situation where x = 0 appears to be over both x = 1 and x = 2.

(37)

4.2 Test 2: Inductance -vs- position 21 500 500.5 501 501.5 502 0.78 0.8 0.82 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98

Inductance depending on frequency

frequency [Hz] Inductance [mH] 5 mm 4 mm 2 mm 0 mm 1 mm 3 mm Hysteresis effect

(38)

22 4 Voice coil inductance analysis

In Figure 4.4 the same test been performed but for voice coil C. As the figure shows this is a more regular plot. The inductance difference between every level is identical and the upward and the downward section appears to be mirrored around the center, x = 5mm at 501,8 Hz. The difference in inductance between

x = 0 and x = 5 is 1, 3 mH. Since the inductance changes the same amount for

every step in position, the inductance-position relation can be described as

L(x) = K x + m ⇔ x(L) = 1 KL −

m

K (4.2)

where K and m are constants. In Chapter 5.2.1 the position estimation algorithm

uses the parameters K1 = 7400 andmK = 3, 94. These parameters also compensates

for the filtering damping effect.

500 500.5 501 501.5 502 502.5 503 503.5 504 2.6 2.8 3 3.2 3.4 3.6 3.8 4

Inductance depending on frequency

frequency [Hz] Inductance [mH] 5 mm 4 mm 3 mm 2 mm 1 mm 0 mm

Figure 4.4:Test 2. Voice coil C.

In an attempt to show the mathematical relationships more clearly, Figure 4.5 show the same result as Figure 4.3 and 4.4 above but with the position on the x-axis. In these figures both the position-inductance relation and the corresponding mathematical relation are shown. These figures are only showing the inductance measurements when the moving parts of the voice coil is traveling upwards so

(39)

4.2 Test 2: Inductance -vs- position 23 no hysteresis effect can be can be seen here.

Figure 4.5:Position -vs- inductance. Voice coil B & C. The red curve shows

the mathematical function needed to express the position-inductance rela-tion. The blue circles shows the measured inductance.

(40)

24 4 Voice coil inductance analysis

4.3

Test 3: Inductance -vs- current

This test is done to see if the inductance depends on the current. If that is the case it might be problematic to perform a sensorless position estimation while the ventilator is running since there will be different currents when the PEEP-valve is operating normally. In this test setup the voice coil is fixed in the position

x = 1mm, then the current is varied in six steps of similiar size, from 0 A and up

to 0,48 A which is the maximum current the OP-circuit is capable of delivering. When the ventilator is working in its normal region the voltage varies between 0 V and 1 V which corresponds to 0 A and 0,2 A.

4.3.1

Results

Figure 4.6 shows the result of Test 3. This plot shows how the different currents affects the inductance of voice coil B fixed in the position x = 1mm. The results are very similar for the other two voice coils and are therefore not shown here. To make the figure more intuitive it also shows the inductance for 0 A and x = 0mm and x = 2mm.

When using the same voltage levels as when the valve is working in its standard working region (0 - 1 V) the effects on the inductance is very small, roughly 1,2 %. Although, this is one of the reasons why the estimated position never can get perfectly accurate without modeling this behaviour.

896 897 898 899 900 901 902 1.05 1.1 1.15 1.2 1.25

Inductance depending on current/voltage. x=1mm, 0−2.5V offset

frequency [Hz] Induktance [mH] 0V/0A 0,5V/0,1A 1V/0,2A 1,5V/0,29A 2V/0,38A 2,5V/0,48A 0V−0mm 0V−2mm

(41)

4.4 Choice of voice coil 25

4.4

Choice of voice coil

The operating frequency is set to 500 Hz. The main reason for this is not because of test 1 (inductance -vs- frequency) but for a more practical reason described in Chapter 5.2.1. It is quite clear that voice coil C (the VC3343-180, see appendix A.3.1) is best suited for sensorless position estimation. The reasons are the fol-lowing:

• Bigger difference in inductance between bottom (x = 0mm) and top (x = 5mm), 1, 3 mH compared to 0, 18 mH for voice coil B and 0, 008 mH for voice coil A. This makes the process of computing the inductance from the voltage and current less noise sensitive.

• A linear connection between inductance and position

• No hysterersis effects when moving upwards or downwards. This makes the position estimation algorithm easier to develop.

It is possible to use a higher frequency in the future when voice coil C is used. A test shows that even for a operating frequency of 2000 Hz the inductance differ-ence between top and bottom is 0, 79 mH.

(42)
(43)

5

Ventilator control design

In order to test the pressure control properties of the smaller voice coil used in the PEEP-valve a new expiratory ventilator concept has been developed. The ventilator can switch between two different pressure controllers, one ordinary PID-controller and one PID-controller that takes the position into account. This is for a test to be carried out with the aim to answer whether the pressure control is improved with the knowledge of the position. In this chapter that ventilator will be described, both in terms of hardware and software. In the software section the position estimation algorithm will be presented. In the end of this chapter the results of the position estimation tests and the pressure control tests will be presented and discussed.

5.1

Hardware

Most of the hardware used in this ventilator is taken from theservo-i laboration

setup. This is because it is best to use the same hardware so that this ventilator is

as similiar to theservo-i as possible. The main reason why that is good is because

the differences shown in these tests most likely will occur because of the different voice coil being used. Another reason why most of the components are the same is of course that those parts were available inhouse.

5.1.1

Component list

The hardware consists of:

• Inspiration part (gas module) with a pressure sensor, a flow sensor, a inspi-ration valve including the electronics needed to control the valve.

• Expiration casette with pressure sensor, flow sensor and the expiratory valve. 27

(44)

28 5 Ventilator control design

• 5, 1Ω "current sensing resistor" for measuring the voltage over a resistor and thus the current that flows through, using a differential amplifier. This is described in appendix A.2.4

• Operational amplifier to control the voice coil voltage from the target ma-chine. The OP-amplifier has a gain of 5. The wiring circuit is described in Appendix A.2.2.

• 3 current sources capable of delivering: ±10V , ±12V and +12V. • High pressure source capable of delivering air with 4 Bar pressure. • Tubes, Y-piece and test lung.

The wiring diagram of how the hardware is linked together and connected to the software is found in appendix A.2.3.

5.1.2

Sensors

Both the inspiration part and the expiration casette is equipped with pressure sensors and flow sensors. The pressure sensors are electric-mechanical and con-nected to the inspiratory section and expiratory casette through tubes. The ul-trasonic flow sensors are mounted in the expiratory casette and inspiratory pipe. Since this thesis is about estimating the voice coil pin position the results must be verified and to do that a LVDT (Linear variable differential transformer) position sensor is installed between the voice coil and the expiration membrane.

5.1.3

DAC and ADC

As the next section will describe further, the ventilator code is implemented on a real-time target machine from Speedgoat. In order for the software to com-municate with the hardware the digital signals from the target machine must be converted to analog signals which operates the PEEP-valve and the inspiration valve. The analog signals from the sensors an voltage measurements must be con-verted to digital signals for the computer to work with them. This is done by using an IO301 Input/output card and a external 64-pin terminal board.

(45)

5.2 Software 29

5.2

Software

The ventilator code is written in Matlab / Simulink and is implemented on a tar-get machine using xPC-tartar-get. The tartar-get machine is a Speedgoat Real-time tartar-get machine [12]. In Appendix A.1.1 the entire simulink flow chart is presented. The main components are the following:

• Position estimation block • Inspiration block

• Reference signal generator • Controller

• Input and output

The sample frequency on the target machine is set to 16 kHz, the reason for this frequency, which might seem a bit high, is because it will allow the excitation voltage to have a higher frequceny. Why that is something desirable will be com-mented on in section 5.6.

5.2.1

Position estimation algorithm

In chapter 2 the correlation between the impedance, the inductance and the phase difference α is shown. So by computing the impedance and phase the inductance can be estimated. As Equation 3.1 in Chapter 3 and the tests in 4.2.1 show, the position and inductance are connected.

The flow chart of the position estimation algorihm is described in figure 5.2 and the simulink chart can be found in Appendix A.1.2. The algorithm is executed once for every sample.

Since an inductor acts as a short circuit for DC current [8] the input signal is a combination of the ordinary DC control voltage and a high frequency sine volt-age. This principle is shown in figure 5.1. The excitation sine signal has ampli-tude 0,02 V which is small enough not to cause any movement or disturb the control signal. The frequency is set to 500 Hz and there are two reasons for this. To start with, as high a frequency as possible is something desirable since the probability of having an overlapping operating frequency band and excitation frequency band is smaller. Quick movements can result in disturbances for the excitation signal when the frequency is low. Another reason is that the sample frequency must be 32 times higher than the excitation frequency and the target-PC may have problems with a sample frequency of over 16 kHz, this is discussed below. As described in chapter 5.1 a differential amplifier is used to acquire the current that flows through the voice coil. The voltage drop must first be divided with 5,1 (the resistance of the "current sensing resistor") to make it the actual cur-rent, I. The voltage U is obtained simply by measuring it over the voice coil. The voltage and current are plugged in to the target machine through the IO103. The first thing that happens to the U and I is that they are filtered with two identical butterworth 2nd order BP-filters with lower cutoff frequency 480 Hz and higher

(46)

30 5 Ventilator control design 0.37 0.375 0.38 0.385 0.39 0.2 0.22 0.24 0.26 0.28 0.3 Time [s] Voltage [V] U steer Usteer+trig

Figure 5.1: The steer voltage and the input voltage including the excitation

signal.

cutoff frequency 520 Hz. It is cruical that the filters are identical since the filter-ing might result in a phase shift. If that happens the phase shift will not affect the phase difference since U and I are shifted equally. After that both signals are stored in two vectors with a length of 32 positions. The vectors act like circular bufferts, i.e. when a new sample is inserted the oldest sample is deleted and all elements are shifted one step. The reasons for the vector to be of length 32 is that it will contain exactly one period of a 500 Hz sine signal when the sample frequency is set to 16 kHz. 32 is also a potency of 2 which is important for the FFT in the next step to work [6]. To ensure that U and I are as clean sine signals as possible the mean value over the 32 samples is removed from both of the sig-nals. The signals are then fourier transformed using MATLABs FFT-command,

resulting in Us and Is in the frequency domain. Us(2) and Is(2) corresponds to

the fundamental frequency of 500 Hz.

According to equation 2.7 the phase difference and impendace can be written as

|Z| = |Us(2)| |Is(2)| (5.1a) α = arg(Z) = argUs(2) I s(2) = argUs(2) − argIs(2) = = arctan(I m(Us(2)) Re(Us(2)) ) − arctan(I m(Is(2)) Re(Is(2)) ) (5.1b)

(47)

5.2 Software 31

interval −π 6 α 6 π. The inductance can, according to equation 2.8, be written as

|L| = |Z|sin(α)

2πf (5.2)

As the tests in chapter 4.2 stated, the position-inductance relationship is linear (for voice coil C, which is chosen). The following equation is used to compute the position from the inductance

x = |L| · 7400 − 3, 94 (5.3)

In this equation the induced current hasnot been compensated for, by subtracting

the constant 1,105 from equation 5.3 the final result will be better. This term is a result of the displacement that is explained in the position estimation test in Section 5.3. The method is a bit noise sensitive so as a final step before the position estimation algorithm is completed the position signal is LP-filtered and averaged with the ten most recent position samples. The LP-filter is a 2nd order Butterworth filter with a cutoff frequency of 20 Hz. The reason for using both a LP-filter and averaging is simply because this reduces the noise in the position signal, by tweaking the LP-filter the averaging might be removed without any consequences.

(48)

32 5 Ventilator control design

Send: Input control voltage

+ 500 Hz excitation sine

voltage

Receive: Voltage drop over 5,1 Ω

resistor. Divide with 5.1.

Receive: Voltage drop over voice coil

Butterworth bandpass filter of order 2 with cutoff frequencies

[480, 520] Hz

Butterworth bandpass filter of order 2 with cutoff frequencies

[480, 520] Hz

I U

Store in circular buffert with

length 32. Store in circular buffert with length 32.

Us = FFT(Uvec - mean(Uvec)) Uvec

Is = FFT(Ivec - mean(Ivec)) Ivec

|Z|=|Us(2)| / |Is(2)|

α = arctan(Im(Us(2)) / Re(Us(2))) - arctan(Im(Is(2)) / Re(Is(2)))

L = |Z|∙sin(α) / (2∙π∙f)

Position = L ∙ 7,4 ∙ 1000 – 5,045

Butterworth LP filter of order 2 with cutoff frequency 20 Hz

Averaging with the 10 most recent samples

Position acquired

(49)

5.2 Software 33

5.2.2

Inspiration

The inspiration block handles two important tasks. It sends voltage signals to the inspiration valve and tells the other blocks which phase the respiratory cycle is in

by setting thebool_exp_control flag. bool_exp_control = 1, means that it is time for

the expiration and that the controller is activated. bool_exp_control = 0, means

that the ventilator is in the inspiratory phase and that the controller is disabled and is to close the peep valve. The inspiratory valve is opened in the beginning of every inspiration phase and closed in the pause-phase when the pressure has risen to the correct PAP-level. In the expiratory phase the inspiration valve opens a little again, this is for the controller to be able to both lowering and raising the pressure. In the adult case the inspiration flow is 2,5 lpm (liters per minute) and

in the child case it is 0,5 lpm. bool_exp_control can also be 2, this means that the

pressure is dangerously high and that the lung may be harmed. The inspiration is then stopped and the expiratory valve opened.

5.2.3

Reference signal

When the respiratory cycle is in the constant phase the reference signal block is observing the pressure and waits for the expiration phase to start. When it does the reference signal is generated from the current PAP-level and down to the PEEP-level. As stated in Chapter 3 the reference pressure goes from PAP-level to PEEP-level with different speed depending on the lung compliance, low com-pliance results in a slow pressure drop and high comcom-pliance results in a quick pressure drop. An algorithm which uses a timer generates the expiratory refer-ence pressure signal.

5.2.4

Controller

The control system implemented on this ventilator concept has the ability to switch between two different controllers, one ordinary PID-controller and one PID-controller which uses gain scheduling to benefit from the knowledge of the position. Figure 5.3 and 5.4 describes how the the PEEP-servo and the controller are linked together. The PEEP-servo also includes a so called pre-filter where the reference signals are generated.

The time discrete PID controller is implemented in code according to [4]

Ik = Ik−1+ KIek, (5.4a)

uk = uclosed(KPek+ Ik+ KD(ekek−1)) (5.4b)

(50)

34 5 Ventilator control design

Variable Description

KP, KI, KD Parameters for the controller

Ik Integrator part

ek The difference between measured pressure and

refer-ence pressure at time sample k

uclosed The input voltage which closes the PEEP-valve, set to 1

V

uk The input voltage at time sample k. Limited to the

in-terval −2V < uk < 2V

Table 5.1:Definitions of the contents in the PID-controller.

The integrator part Ik is reset and is not updated when the ventilator is in the

inspiratory phase. This makes every expiration behave as a new instance with no

memory of the previous one. The controller parameters are set to KP = 2, 8 · 10

2 , KI = 1, 2 · 104 and KD = 1.2 · 103

. It is difficult to perform a system identifi-cation test on this system since the only step response that can be made is one

where the pressure drops from a chosen level down to 0 cmH2O, otherwise a

con-troller is needed. Due to these difficulties the PID-parameters were selected by testing and trimming until no better result was possible to obtain.

The gain scheduling algorithm is described in the next section.

Pre-filter Controller u System Pexp

Pset

-r e Qexp

Pstart Vt Vte

Figure 5.3:The PEEP-servo and how it interacts with the system.

Gain scheduling

In order to benefit from the knowledge of the position a gain scheduling algo-rithm is implemented. Figure 5.5 shows the general idea of how the proportional and integral parts in the PID control depends on the position. In this case there

(51)

5.2 Software 35 PID P u Pset e

+

-Qref Qexp

Figure 5.4:The controller.

is no point in letting the derivative part depend on the position as well, this will be discussed in chapter 5.6. Gain scheduling is a quick way of making a PID-controller a bit smarter and is best suited for non linear systems with varying dynamic properties like this system [13].

By using the slow transitions between the three different K-levels this gain schedul-ing algoritm reduces the effects of noise in the position signal. The transitions are calculated according to Kjk(x) = KkKj (xk+ δk) − (xjδj) (x − (xjδj)) + Kj (5.5a) k = j + 1, j ∈ {1, 2} (5.5b) This general algorithm can be used for inserting more K-levels if neccesary.

For the proportional part the Kp-values are set to K1= 2, 2 · 10−2, K2 = 3, 0 · 10−2

and K3 = 3, 8 · 10

2

. The corresponding positions are x1 = 4, 3mm, x2 = 3, 9mm

and x3 = 3.5mm with δ-values δ1= 0, 1mm and δ2= δ3= 0, 15mm.

The integrator part uses the same x and δ as Kp above but with the following

(52)

36 5 Ventilator control design

(53)

5.3 Position estimation tests 37

5.3

Position estimation tests

In this section the position estimation algorithm will be tested to see how well it performs.

It is clear that the voice coil C is best suited for a position estimation application, in chapter 4.4 the reasons are listed. Therefore the ventilator concept will use that voice coil and the following results applies for that voice coil.

When implementing the position estimation algorithm on the ventilator concept a problem occurs. Due to the induced current when the voice coil is moving the position appears to drop more than it actually does. In Figure 5.6 this is clearly visible between 13,8 s to 14 s and between 14,7 to 15,1 s. An interesting observation is that the direction of the movement does not affect the effect of the induced current very much.

13.5 14 14.5 15 15.5 16 16.5 −1 0 1 2 3 4 5 6 Time [s] Position [mm] LVDT position Estimated position

Figure 5.6:The estimated position. The effect of the induced current due to

(54)

38 5 Ventilator control design

Since the position is thought to be used in the expiratory phase, ie when the voice coil moves from a higher position to a lower position, this is a serious problem. There are at least two ways to deal with this problem, either by using an observer which also monitors the velocity and then is able to improve the position estimate. This method will be descibed more in chapter 5.4. Another way to handle this is simply by always compensating for the induced current effects. This is done by modifying the position-inductance-equation (equation 5.3) by subtracting a constant term 1,105. The result of doing that is presented in Figure 5.7.

13.5 14 14.5 15 15.5 16 16.5 0 1 2 3 4 5 6 7 Time [s] Position [mm] LVDT position Estimated position

Figure 5.7: The estimated position when compensating for the induced

cur-rent due to movement.

This makes the estimated position end up about 1.3 mm above the measured position when there is no movement. But since the pressure controller only is activated in the expiratory phase when there is a movement this problem will not affect the result very much when the position is used in the pressure control.

(55)

5.3 Position estimation tests 39

In Figure 5.8 the position of the voice coil is displayed under the expiratory phase. The expiration starts at 14,7 s when the quick drop occurs. As the figure shows there is only noise in the estimated position signal, no constant offset.

14 14.5 15 15.5 16 16.5 17 3.4 3.6 3.8 4 4.2 4.4 4.6 Time [s] Position [mm]

Position: Measured and estimated

LVDT Position Estimated position

Figure 5.8:The estimated position under the expiratory phase

Figure 5.9 shows the difference between the measured position and the estimated position under the same interval as Figure 5.8. As above the expiration starts at at 14,7 s. When the quick movement occur the position error is 0.2 mm for a short amount of time. After that and for the rest of the expiration phase the maximum error is approximately ±0.1 mm.

(56)

40 5 Ventilator control design 14 14.5 15 15.5 16 16.5 17 −0.25 −0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15 Time [s] Position error [mm]

Error: measured position − estimated position

Error

Figure 5.9: The position error under the expiratory phase, same case and

(57)

5.4 Observer 41

5.4

Observer

Since the result of the position estimation algorithm is good enough in this case the following signal fusion should be considered as something one could use in another application where the results in the previous chapter would not be suffi-cient.

By designing an observer, the knowledge of the position and velocity could be used to get a better position estimation algorithm. How the velocity is computed is described in the next section.

If the position estimation algorithm above gives the position p(k) and v(k) is the velocity computed from the induced current, the observer can be written as [5]

ˆ˙x(k) = C1v(k) + (1 − C1) (p(k) − p(k − 1)) Ts (5.6a) ˆ x(k) = ˆx(k − 1) + C2(p(k) − ˆx(k − 1)) + C3ˆ˙x(k)Ts (5.6b) C1∈[0 1], C2+ C3∈[0 1] (5.6c)

Here the parameter C1is used to decide how trustworthy the velocity signal is

and how much the differentiated position should affect the velocity. C2and C3are

used to tune how much the estimated position, ˆx(k), will depend on the position

error and the estimated velocity ˆ˙x(k).

5.4.1

Velocity estimation

In this thesis an attempt to compute the velocity of the voice coil has been made. As Chapter 2 states, the velocity of the voice coil is proportional to the induced current. Since the current is already measured and the input voltage is known the induced current should be quite easy to estimate. The principle is to calculate the current, without taking the movement into account, and measure the same current. The difference is the induced current that corresponds to the velocity. The input voltage has a DC part and a excitation AC part (added by the position estimation algorithm), but only the DC part is used here since the induced cur-rent is a DC signal. So the input voltage is LP-filtered with an exact copy of the Butterworth LP-filter used in the last step of the position estimation algorithm. The measured current is also filtered with that LP-filter because it too contains the 500 Hz excitation signal and noise from the measurement. The voltage signal is then divided with the constant term 3.265, which is a empirically designed con-stant that is a result of the filtering and voice coil resistance. The induced current is then multiplied by a factor 100 and averaged with the 50 most recent samples for noise elimination.

In Appendix A.1.2 the simulink chart of the velocity estimation is shown and in figure 5.10 the estimated velocity is presented. This result is from when the ventilator concept just has been started and voice coil is at room temperature.

(58)

42 5 Ventilator control design 10 11 12 13 14 15 16 −1 0 1 2 3 4 5 6 Time [s] Position [mm] LVDT position 10 11 12 13 14 15 16 −15 −10 −5 0 5 10 Time [s] Velocity [mm/s] Velocity

Figure 5.10:The measured position and estimated velocity.

As the figure show this is a decent result and the estimated velocity is 0 mm/s when the voice coil is at stand still. This plot is only showing the results for a couple of seconds. When the ventilator has been running for a longer time the voice coil gets warmer and the resistance is affected. This results in that the algorithm above starts to show a constant offset.

Voice coil resistance temperature dependency

Resistance due to temperature is a problem one has to face when implementing this kind of solution. When running the ventilator for only a short time it is pos-sible to neglect this effect. A test to verify the resistance temperature dependency has been made and Figure 5.11 shows this result. As seen in that figure, the effect of the temperature results in that the measured current starts to drift away from the estimated current. It turns out that the resistance is about 5 % higher when

(59)

5.4 Observer 43

the ventilator has been running for 100 s.

2 4 6 8 10 12 14 16 18 20 0.1165 0.117 0.1175 0.118 0.1185 0.119 0.1195 0.12 0.1205 0.121 Time [s] Current [A] Estimated current Measured current

(60)

44 5 Ventilator control design

5.5

Pressure tests

In these tests two quite different scenarios will be studied so that the designed control system is more versatile and not only trimmed to work on only one pa-tient category. The two test cases are:

• Test case 1:

An adult test lung with the volume 1 L, made out of rubber and plastic, with typical characteristics of a real adult lung is studied here. The quite high compliance leads to a reference signal which drops relatively fast. In

this case the pressure drops from P AP = 22cmH2O to P EEP = 5cmH2O in

0.22 seconds. Even the pressure levels are quite typical in this case. The expiratory flow is 2.5 lpm.

• Test case 2:

Case 2 is a more extreme case where the ventilated lung is made out of steel which makes the compliance very low since there is no possibility for any change of the lung volume. This test lung has a volume of 0.25 L and the

presure drops from P AP = 20cmH2O to P EEP = 2cmH2O in 0.37 seconds.

The PAP level of 20cmH2O is rather extreme since this is a test case which

is supposed to be as close to a real children ventilator scenario as possible. The expiratory flow is 0.5 lpm.

First the regular PID controller will be tested in both test cases. Then the gain scheduling PID controller will be tested for test case 1. Test case 2 is not con-ducted because the voice coil is not moving enough for the knowledge of the position to be useful. This is discussed in Section 5.6.

5.5.1

Results

Figure 5.12 shows how the pressure and flow varies under two respiratory cycles when ventilating a test lung with adult characteristics, i.e., test 1. The expiration phase starts when the red pressure reference is stepping up to the PAP-pressure. The pressure reference is then moving down to the PEEP-level. The expiratory phase ends when the flow drops to zero and the pressure starts to rise because of the opening of the inspiratory valve. In Figure 5.13 it is easier to see how well the pressure follows the reference signal since it is zoomed in on the first one and a half second of the expiratory phase.

Figure 5.14 and 5.15 shows how the pressure and flow varies when the ventilator concept is performing ventilation in test case 2, in other words the child test case. A noticable observation in these figures is that the pressure is rising for a short amount of time in the begining of the expiratory phase. This is caused by the opening of the inspiratory valve. And since the test lung is extremely stiff the the momentary pressure increase propagates through the tubes and test lung and reaches the pressure sensor before the control system reacts. Since this effect only last for about 0,02 seconds it can be neglected.

(61)

5.5 Pressure tests 45 6 8 10 12 14 16 0 5 10 15 20 25 30 Time [s] Pressure [cmH 2 O] Expiratory pressure Pressure reference 6 8 10 12 14 16 −5 0 5 10 15 20 25 Time [s] Flow [lpm] Expiratory flow

(62)

46 5 Ventilator control design 14.54 15 15.5 16 6 8 10 12 14 16 18 20 22 Time [s] Pressure [cmH 2 O] Expiratory pressure Pressure reference 14.5 15 15.5 16 −5 0 5 10 15 20 25 Time [s] Flow [lpm] Expiratory flow

Figure 5.13:Same picture as Figure 5.12 but only focusing on the start of the

(63)

5.5 Pressure tests 47 6 8 10 12 14 16 0 5 10 15 20 25 Time [s] Pressure [cmH 2 O] Expiratory pressure Pressure reference 6 8 10 12 14 16 −1 0 1 2 3 4 5 6 7 Time [s] Flow [lpm] Expiratory flow

(64)

48 5 Ventilator control design 14.50 15 15.5 16 5 10 15 20 25 Time [s] Pressure [cmH 2 O] Expiratory pressure Pressure reference 14.5 15 15.5 16 −1 0 1 2 3 4 5 6 7 Time [s] Flow [lpm] Expiratory flow

Figure 5.15:Same picture as Figure 5.14 but only focusing on the start of the

(65)

5.5 Pressure tests 49

5.5.2

Pressure control with knowledge of the position

As previously mentioned it is not possible to benefit from the knowledge of the position in the child case. Therefore this section will only be about test case 1. Figure 5.16 shows the same ventilator case as Figure 5.12 but with the controller that takes the position into account using the gain scheduling algorithm described in chapter 5.2.4. The main difference is shown in the flow where the gain schedul-ing controller manages to dampen the oscillations visible between 9 s and 12 s. Figure 5.17 shows a closer look on the expiration phase.

6 8 10 12 14 16 0 5 10 15 20 25 30 Time [s] Pressure [cmH 2 O] Expiratory pressure 6 8 10 12 14 16 −5 0 5 10 15 20 25 Time [s] Flow [lpm] Expiratory flow

Figure 5.16: Test case 1 controlled with the PID-controller equipped with

(66)

50 5 Ventilator control design 14.54 15 15.5 16 6 8 10 12 14 16 18 20 22 Time [s] Pressure [cmH 2 O] Expiratory pressure 14.5 15 15.5 16 −5 0 5 10 15 20 25 Time [s] Flow [lpm] Expiratory flow

Figure 5.17: Same plot as Figure 5.16. but only focusing on the start of the

References

Related documents

(2010), although ethnographic research is rated as a highly effective method that provides great insights into customer needs, behavior, problems and

The EU exports of waste abroad have negative environmental and public health consequences in the countries of destination, while resources for the circular economy.. domestically

Få hjälp att till exempel boka biljetter, starta Instagramkon- to eller annat på din telefon, platta eller bärbara dator eller välkommen att bara fika och

Následně jsem na prototypech provedl sérii měření pro určení reálných parametrů, kterými byly zejména maximální a minimální výstupní tlak z

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

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