The Physical Lung Model – the Sensor Network

The Physical Lung Model – the Sensor Network

12th IFAC Conference on Programmable Devices and Embedded Systems The International Federation of Automatic Control September 25-27, 2013. Velke Karlo...

582KB Sizes 1 Downloads 28 Views

12th IFAC Conference on Programmable Devices and Embedded Systems The International Federation of Automatic Control September 25-27, 2013. Velke Karlovice, Czech Republic

 The Physical Lung Model – the Sensor Network  Ivan Krejí, PhD. College of Polytechnics Jihlava, Department of Electrical Engineering and Computer Science, Tolstého 16, 586 01 Jihlava, Czech Republic, (tel:+420 605449978, e-mail: [email protected])

Abstract. Recently, physical modelling of human and animal organs has become very popular. The objective of this invention was to construct a physical lung model – an apparatus comprising an artificial lung and an automatic self-controlled system working on a principle of a negative feedback loop. This contribution is focused mainly on the function of the control system with a special attention paid to the sensor network. The control system is equipped with sensors measuring various physical variables (e.g. air flow, pressure difference) necessary for a proper system operation. Sampling frequency, sensorstype and their accuracy play an important part in the quality of measurement and directly affect the accuracy of the control response.The physical lung model and the sensor system have been successfully built and fully completed from the hardware and software’s point of view. In the future, this lung model is expected to be used in different testing applications, e.g. in studies comparing physiological and pathological breathing patterns or observing effects of different aerosols on the lung tissue. Keywords: lung model, sensor network, sensor, microcontroller.

The contribution is focused on the ability of the lung model to function as an automatic controlled system which is able to simulate different types of physiological and pathological breathing patterns. For this purpose, the system should be equipped with a set of breathing templates used as a reference of a breathing process, and with a set of sensors capable to continually measure important physical variables necessary for the automatic control itself and for monitoring of the model environment. The air volume in- or exhaled during one breath cycle is the most important variable for the automatic controlled system. As the measurement of the air volume is difficult, the air flow measurement has been used instead to determine the air volume. The relationship between both variables can be expressed as follows:

1. INTRODUCTION Lately, most biomedical tests on living organisms have been banned on ecological and ethical grounds. As a result a need of new technological approaches respecting these requirements has arisen. Building physical models of living organs has proved to be a valuable tool and become very popular. These models can simulate organs function allowing, for example, observation of the influence of different undesirable effects on their functionality. In some cases, these models can be even used in humans as a short time replacement of living organs. In our case, the objective was to construct a physical lung model. This model is expected to be used in future testing applications, e.g. in studies comparing physiological and pathological breathing patterns or observing effects of different aerosols on the lung tissue properties. Therefore, the model can operate in two settings using two basic types of a lung equivalent – an artificial one made of a rubber bag, or an actual lung organ taken from live-stock intended for slaughter. 978-3-902823-53-3/2013 © IFAC



     for inhalation, and

     for exhalation,

Where V means the air volume inhaled or exhaled, F(t) is the air flow time course, T is the breathing

40

10.3182/20130925-3-CZ-3023.00062

IFAC PDeS 2013 Velke Karlovice, Czech Republic

cycle period and Ti is the time of an inhalation. Both volumes Vi and Ve are equal although their course in time need not be the same as well as the duration of inhalation and exhalation might differ.

connected to a suction tube that enables air ventilation and basically acts as a bronchial tube. The suction tube is equipped with a flow meter. This consists of a pair of flow sensors organised in series in an opposite orientation ensuring the air flow can be measured in both directions. The “breathing” process is controlled through the movement of the leather bellows. Moving the bellows in one direction increases a negative pressure inside the chamber. To balance out the influence of a growing negative pressure, the lung pouch expands its volume and as a result, the air flows through the suction tube inwards – the air is “inhaled”. When the bellows moves in the opposite direction, positive air pressure is generated and the air is squeezed out from the lung pouch – the air is “exhaled”. The movement of the bellows is regulated by a feedback controller. Its actuating element features a stepper motor equipped with an adjusting ball screw transferring the circular motion of the motor into a linear movement of the bellows. Function of most living organs is controlled using a principle of a negative feedback loop when a certain parameter is continuously monitored and compared with a required value. The result of this comparison subsequently determines the intensity of a control action required in order to reduce the gap between the actual and required value. In this case, the feedback controller compares the actual air flow measured by the flow meter with its actual reference value. Potential increase in the difference between the measured and reference value causes the stepper motor to adjust its speed, thus changing the air flow in order to achieve a zero difference. Apart from the main control system, the second automatic control loop is involved in the lung model process control. Its task is to keep a constant negative air pressure difference between the internal space of the chamber and the atmospheric pressure in the lung pouch, and, thus, to prevent a lung tissue adhering. For this purpose, a differential pressure meter measuring this difference is included in the system. The pressure difference is kept stable and if necessary it is adjusted using a vacuum pump. The control system was designed in such a way that would allow two possible control computer systems to be applied and serve as a central part of the system controller. These systems can be either the embedded two processor, ARM based microcontroller, or the National Instruments Compact RIO kit. Both systems use a personal computer as the console.

The lung model principle, its control, measurement requirements and the process timing are discussed in detail in the following paragraphs.

2. LUNG MODEL PRINCIPLE The lung model schematic diagram is shown in Fig. 1.

Fig.1. The lung model principal diagram. The construction of the model is given by the physiology of a human lung. It is situated inside a rigid enclosed chest cavity and is ventilated via its airways by virtue of expansion of the lung through respiratory muscles. An apparatus, which would be able of a realistic breathing simulation, has to include all these elements. The lung model described here consists of two main parts – an organic glass chamber representing a chest cavity and a leather bellows connected with the chamber via a tube simulating a diaphragm and respiratory muscles. An expandable lung equivalent is placed inside the chamber. This can be either a living animal organ or a rubber pouch

As all controllers operate on a digital principle, a very important step in achieving a successful system

41

IFAC PDeS 2013 Velke Karlovice, Czech Republic

solution is a sampling frequency determination. The sampling frequency influences the open loop gain, and thus the controlled system stability. Besides, the sampling frequency must respect the frequency spectrum of the breath curve (the sampling theorem). The sampling frequency has been determined based on a typical physiological breath curve. Figure 2 shows the course of the air flow during the whole breath cycle [1].The positive flow means inhalation, the negative one exhalation. Comparing it with some curves of pathological breathing, some modulation of the basic curve can be found. This is caused by trembling of the breathing pathways. The frequency of this movement does not overcome frequency range of 10 Hz. In order to simulate this trembling and to neglect the net hum, the sampling frequency has been selected to be 50 Hz.

were calibrated by the manufacturer, thus it was necessary to access the sensors and provide the needed calibration and recommended corrections to ensure the sensors were accurate. A great attention should be paid to these metrological aspects because the accuracy of measurement directly affects the accuracy of the response action. 3.1. Sensor network The concept of a sensor network required a use of a standard digital communication line to connect individual sensors with the control system. Because some of the sensor output signals were analogue and some were digital with different interfaces, the first problem to be solved was the unification of the sensor output signals. Also some of the analogue signals were weak, in order of several tens of µV, another had the standard analogue signal levels between 0 – 5 V. The digital output signals used either the asynchronous serial interface (RS232) or the synchronous serial interface (SSI). For the unification, the RS485 asynchronous serial line has been selected as the standard communication line thanks to its robustness, reliability, high throughput, and possibility to connect a lot of sensor units on one line. The only limitation is the line throughput. Therefore, the communication rate of 115.2 kBaud has been selected. From the automatic control system’s point of view, the air flow measurement is the most critical time-wise; it has to be measured by both flow-meters every 20 ms (sampling frequency of 50 Hz). The remaining measurements are not time critical, and are not synchronous, so that they can be measured successively, sharing the time. It means that in every sampling interval, both air flow values and one or two another variables are measured and the results are sent to the main control system.

Fig.2. Typical breath curve - the function F =f(t), F = dV/dt.

3. SENSOR SYSTEM The lung model is equipped with a range of different sensors measuring a variety of physical variables necessary either for the proper system operation or for monitoring of working conditions in which the model is operating. These variables are, for instance, temperature in the chamber or in the environment, atmospheric pressure, relative air humidity, or the degree of UV irradiation during sterilizing process. The possibility to monitor the environmental conditions is expected to be used in the future in order to create an environment similar to the real one in terms of temperature, humidity, etc. The requirement of a possibility to connect sensors to any of the two mentioned control systems, and the requirement of future extensions led to the idea to arrange all sensors to a network [2]. Besides, not all of the sensors used

This approach required building of a microprocessor controlled units capable of digitizing sensor signals (if the sensor output signal was the analog one) and adapting and packing them for transport via the RS485 link. Besides that, these adapting units contain auxiliary circuits supplying the sensors if necessary, e.g. constant current sources for resistive temperature sensors. To minimize power consumption of the designed units, the low consumption Texas Instruments MSP430AFE233 microcontrollers have been used [3]. This type of the microcontroller has its own built-in 24 bit  AD converter (with low latency), and the UART and SSI units. Thus, this microcontroller has the ability to fulfil all required

42

IFAC PDeS 2013 Velke Karlovice, Czech Republic

tasks, the calibration, measurement, digital data filtering, packing, and communication. Also the speed and sufficient memory space make it possible to save calibration constants and coefficients, as well as to do all converting calculations in the real time. This means, all data are expressed in corresponding units (°C, mbar, ln/s, etc.).

piezoresistive principle within the range of +/- 300 mbar. The analogue output signal has been used. The sensor is calibrated at the time of manufacture. The difference pressure meter is calibrated at the supply voltage of 8.0 V; this condition has been provided. The temperature is measured using a resistive thermal sensor Pt 100. The sensor element is supplied from the constant current source 1 mA, which is the integral part of the adapting unit. The signal processing carried out by the unit microcontroller takes an advantage of oversampling and real-time digital filtering and offers the 0.02 °C temperature resolution. The thermometer software measures the sensor resistance, which is recalculated to temperature using polynomial approximation:

The network principle is shown in Fig. 3.

          [°C,Ω] This principle enables the unit calibration, taking advantage of the standard resistor the value of which is certificated. Three thermometer units measure temperature at places of interest: inside the “chest” cavity, at the actuating mechanism and also the ambient temperature is recorded.

Fig. 3. The principal block diagram of the sensor connection taking an advantage of the standard line RS485.S1… Sn are sensors with their adaptation units, SBC03 is the ARM based control system.

Relative air humidity measurement is provided by the Sensirion SHT 75 hygrometer. This active sensor involves its own 14 bit AD converter and is equipped with an embedded processor. It packs the conversion results and transmits them on external request, taking advantage of the SSI interface. The adapting unit controls the communication with the sensor and provides the real-time temperature compensation of the sensor data following the temperature information of the internal thermometer sensor. In this setting, the unit offers relative air humidity results from 0 – 100 %RH, with 0.1 %RH resolution. Two sensors measure relative humidity in the chamber and ambient relative humidity. No calibration is required.

3.2. Measured variables and the sensors The most important variable primarily determining the system accuracy and stability is the air flow. For its measurement, two Honeywell AWM 702 mass flow sensors have been selected. They are connected to the “bronchial” tube of the model and arranged in a manner that allows measurement in both opposite flow directions. Output of each flow sensor is analogue voltage 0 – 5 V. The flow meters measure a mass of air that flows through the sensor. The mass flow is expressed as air volume at normal conditions (ln/s, eventually ln/min). The range of measured mass flows is 0 – 200 ln/min. The sensors are calibrated by the manufacturer so no further calibration is required.

The Hygrosense DRMOD I2C PA1B1 pressure meter has been used to provide the absolute atmospheric pressure measurement. It operates on the same principle as the difference pressure meter. One pressure meter has been used for the ambient atmospheric pressure measurement. The sensor is calibrated by the manufacturer at the bridge supply voltage of 8.0 V.

The next sensor that keeps the regular state of the lung is the difference pressure meter. It measures the pressure difference between the internal chamber pressure and the ambient atmospheric pressure. The internal pressure is lower than atmospheric one in order to keep the desired shape of the lung and prevents the adhesion of lung channels. For our purpose, the difference pressure sensor Hygrosense DRMOD I2C PD0B5 has been used. Its output signal is either analogue voltage 0 – 5 V, or the digital one using the I2C interface. It operates on the

The last type of the sensor units involves the sgluxTOCON_standard_C UV radiation sensor. This sensor is capable of measuring the UV radiation within the wave length range of 210 – 380 nm. It

43

IFAC PDeS 2013 Velke Karlovice, Czech Republic

serves for the sterilization control of the lung model. Therefore, these sensors are placed on three different places of the model, in the “chest” chamber, at the bronchial tube and inside of the model machinery. The sensor is equipped with a pre-amplifier and offers the analogue output voltage 0 – 5 V. 3.3. Communication

Check sum

XX

XXXXXXXX

Termination

03

03

03

03

03

Remark

Temp. Hum. Differ. Baromet.Fl. Pressure

[°C]

[mbar]

[%]

[mbar] [mV]

Explanation: +/- data are provided with sign,

The information exchange between individual sensor adapting units and the main controller takes advantage of the standard half-duplex RS 485 line, which uses the asynchronous serial communication. These properties determine that the system of communication is hierarchic and units connected to this line should use unified communicating protocol. Thus, the master unit controlling the data stream is the main controller, while all sensor units are the slaves. In all cases, the master starts the communication giving the request to a slave unit using its unique address. When the slave recognizes its address, it sends data. The following overview gives more detailed view on the applied protocol:

X the ASCII character, Y the binary byte. The check sum is created summing the quantity character, address and data characters.

Head

Commands # #

The protocol is filled up by error messages. These messages are divided into two groups. The first one deals with errors that have common character for all units (wrong head, address, unknown command). The second group of errors is related to the individual units (check sum error, new address error). To avoid a communication mismatch, only one sensor unit is responsible for sending he first group of error messages. This unit is the flow meter which is responsible for measurements carried out during inhalation. Error messages overview is shown below:

Command body

D

A

Head

#

#

#

#

Address

Y

Y

Error number

E1

E2

E3

E4

Z

Check sum

XX

XX

XX

XXXX

0x03

0x03

0x030x03

New address

# E5

Check sum

XX

XX

Termination

0x03

Termination

0x03

0x03

Remark

head check sumaddr. cmdn.a.error

Remark

give data change address YZ

The check sum is calculated from characters of the error number.

Explanations:

4. CONCLUSIONS

Y,Z 1byte binary value, must be greater or equal to 0x80.

The lung model described above has been successfully built in our laboratories. The sensor system is fully completed from the hardware and software’s point of view. The sensor adapting units are placed in BOPLA Element 406 boxes (65 x 50 x30 mm). The boxes are fastened to the rails in the model rack. The model itself is completed with the exception of the control algorithm which is developed and tested at present.

XX check sum modulo 256, in form of two ASCII characters. The check sum is calculated from values of the command body, address, possibly the new address. Slave answers on the command ‘D’: Head

##

#

#

#

Quantity

TH

P

B

F

Address

YY

Y

Y

Y

Data

5. ACKNOWLEDGEMENTS The project of the lung model has been realised within the international cooperation of Fachhochschule Wien,

+/-XX.XXXX.X+/-XXXXXXXXXXX

44

IFAC PDeS 2013 Velke Karlovice, Czech Republic

Austria, and College of Polytechnics Jihlava (VŠPJ), Czech Republic. The cooperation is supported by project M00176 "Elektronicko-biomedicinska kooperace" at VŠPJ.

6. REFERENCES [1] Wurm, M.: EntwicklungeinesaktivenLungmodells, student theses FachhochschuleTechnikum Wien, p. 60 – 68, Vienna 2010. [2] Krejí, I., Zemánek, P., Dostál, T. : The lung model, sensors and control, Annual report of the project ELBIK (in Czech), p. 2 – 3., Jihlava 2011. [3] MSP430AFE233 Mixed Signal Controller, Texas Instruments data sheet, p. 1 – 16, TI 2011.



45