Data Acquisition in Pulmonary Ventilation

Breathing is the fundamental physiological process during which gas exchange between the organism and the environment is done. Respiration has three main components: external respiration, transport respiration and cellular respiration. The external respiration is significant for this chapter and it is defined as exchange of gases between the lungs and the external environment. Transport breathing facilitates the transport of gas through the blood inside the organism, and cellular respiration ensures the exchange of substances, including gas, at cellular level.


Introduction
Breathing is the fundamental physiological process during which gas exchange between the organism and the environment is done.Respiration has three main components: external respiration, transport respiration and cellular respiration.The external respiration is significant for this chapter and it is defined as exchange of gases between the lungs and the external environment.Transport breathing facilitates the transport of gas through the blood inside the organism, and cellular respiration ensures the exchange of substances, including gas, at cellular level.
External respiration is carried out in two phases, called inspiratory breathing and expiratory breathing.During inspiratory breathing, a volume of air is inhaled through the airways (moth / nose, pharynx, larynx, trachea and bronchial tree) into the lungs.In the lungs air is mixed with carbon dioxide -rich gas coming from the blood.After that the mixed gas (air and carbon dioxide) is exhaled through the same airway to the atmosphere.Man can not live without oxygen, so, in case of reduced respiratory function, he could die.
There are natural cases, in which, due to illness (e.g.polio) or injury, the breathing process is affected.There are many people leading an apparent normal life, but they have respiratory disorders during sleep.The collapse of the respiratory system can appear also because of artificial causes (injections of anesthetic).During surgery, for pain relief and for muscle relaxation, artificial breathing is used.In those cases was observed that a lot of people have partly or completely affected the respiratory function, regardless that the phenomenon was predicted or not.
In case of respiratory function disturbance, to ensure the necessary quantity of oxygen in the lungs and at the cellular level, some equipment that supports breathing is used.These machines are called ventilators and their induced breathing is called ventilation.The ventilator must insert the gas mixture needed for a good oxygenation in safe conditions into the patient's lung.For this, it must be very precise.
Respiratory function depends on many parameters which makes the equipment for artificial respiration to be highly complex.Proper functioning of the ventilation equipment is required to ensure the success of the medical act.
To develop and test the ventilators it is important to know what the doctors need.There are three important ideas to know before understand ventilation: ventilation process (that means what the ventilator are doing during ventilation), ventilation parameters and ventilation modes.In this chapter some things about the ventilation parameters are presented.
Considering the speed with which the medical staff must intervene for saving the patients lives, ventilator should be easy to handle and ventilation parameters must be set and read quickly.Medical staff must easily monitor the ventilation process quality, and the ventilator must provide much information.These data should be viewed easily and in real time.Both set (wished) and realized parameters should be viewable at the same time.
There are used various sensors to determine directly or indirectly the values of the.Sensors must measure in some special places of the ventilation system and at certain time moments, different parameters.Signals from the sensors must be processed so that the values of the desired physical parameters appear on the display.Measured values are stored in order to observe their variation in time.This allows the efficiency of the medical care to be observed or, if it is necessary, to change and improve the medical process.
Because functioning of the ventilator must be safe, it must be tested from time to time.Testing consists of checking the parameters and the patient blocks.For testing are used specific sensors.Signals from these sensors are transmitted to a microprocessor and processed to obtain the real values of the measurements used in ventilation.To test the patient blocks special stands are constructed.Various valves and sealings must be tested.For this purpose gas is inserted or extracted into and from the system using solenoid valves.The sensors and the valves are connected to a computer or microprocessor through a device called Data Aqusition Board.
The program that processes data from the sensors and controls the actuators is a dedicated software for a DAQ board.The dedicated software (driver) is used to convert the DAQ board language into the computer's language.Inside the computer other softwares (application software) are used to process and display the DAQ board information.For this chapter the softwares are developed in LabView.For a good understanding of ventilation parameters determining process it is important to know the DAQ system, what DAQ means, what is needed for a DAQ system, how a DAQ works (some example that presents the DAQ system are given).
It is also important to know what is a sensor, an actuator and their working principle.The relationship betwen the electrical signal from the sensor and the physical parameter measured represent the sensor's calibration.To determine this relationship it is necessary to develop a calibration system.It is also important to know a lot about the sensors' and the actuators' power supplies, the actuators' electronic comands and others.This paper presents the main parameters used in ventilation and how these can be determined with a DAQ board.For this purpose a DAQ system general presentation is made and some specific examples for the ventilation area are given.A system, which is meant to be a part of a ventilator tester, that can determine the leakage for a patient block is presented.

The main physical parameters used in ventilation
The ventilator introduces inside the patient gas with a certain flow rate and pressure to provide the oxygen needed for living.Blood oxygen concentration is monitored as a SpO2 parameter and should be close to 100%.The doctor needs to adjust and monitor a set of parameters, named ventilation parameters, to ensure a proper ventilation.These are pressures, flow rates, volumes, gas concentrations.

Ventilatory pressures
Basically, inside the lung, during the process of external respiration the pressures varies as in Fig. 1. and during ventilation as in Fig. 2.
Pressures are very important in ventilation.Ventilatory pressures may not be too large, not to destroy the alveolar wall, but not too small either, to ensure that the lungs are filled with the necessary amount of gas.The pressure inside the airways is denoted by aw p .
The mean pressure, denoted by mean p , is the average pressure in the lung during ventilation cycle and is defined by the following relation: -the maximum pressure inside the lung; this pressure is set at maximum value by the physician; the ventilator must not introduce gas with a pressure above the preset maximum pressure inside the lung.
-the plateau pressure, the pressure for which the lung is kept inflated to allow enought gas exchange, smaller than max p .
The pressure determined by the physician and created by the ventilator to produce expiration shall be called expiratory pressure, denoted by exp p .In general, the pressure at the end of the expiration breathing is called for short PEEP (Positive End-Expiratory Pressure).

Respiratory times
The time in which inspiratory breathing is done, is called inspiratory time, denoted by insp t , and is composed of two other times:  1 t -lung filling time until max p ,  2 t -plateau time, necessary to maintain the inflated lung for gas exchange.
The time period necessary to empty the lung is called expiratory time, denoted by exp t .
The time period, denoted by T , in which the breath is fully done: Respiratory frequency, denoted by f , is defined by the following relation:

Volumes, flow rates
The gas flow introduced by the ventilator into the patient's lung is called inspiratory flow, i V  , and the gas flow exhaled from the patient's lung is called expiratory flow, e V  .The volumes are determined as the product betwen the gas flow, V  , and the gas flow time, t .
The inhaled volume is called the inspiratory Tidal Volume, denoted by The Minute Volume is the amount of air volume inhaled or exhaled per minute and is defined as:

Oxygen concentration
The gas mandatory for life is oxygen.For the human body's it is a necessary a certain amount of oxygen in the blood (SpO2).To increase this parameter to 100% SpO2, it is necessary to enrich the inspiratory gas with oxygen.When the lung is working normally and a large amount of oxygen in the mixture, O2, is not needed, the concentration must be decrease to 21% O2, only air.The oxygen concentration of inspiratory gas is denoted by 2 FiO .

Temperature and humidification of ventilation gas
Because the gas is introduced directly into the lungs and in some cases it does not pass through the nose, it is necessary for gas to be heated to the patient's temperature and humidified.The nose's role is taken, during ventilation, by the humidifier.

Determination and comand of various physical paramters with a DAQ (Data AcQuisition) board
Data acquisition is the collection process of measured data from various sources, in a precise manner, organized and synchronized in time and is the monitoring part of a real physical system.Generally, data acquisition, involves a meshing process, which means sampling and quantifying, for analog signals to be converted into accessible digital computer, numerical representation.For short, data acquisition mean the process of sampling signals that measure physical conditions in real world and converting the resulting samples into digital numeric values that can be manipulated by a computer.Data acquisition systems (abbreviated with the acronym DAS or DAQ) typically convert analog waveforms into digital values for processing.Data acquisition control system means generating data for process control as part of a real regulation system.In most cases control signals must be analog.Real-time operating systems are characterized by the ability to monitor and control in a predetermined time interval.
A functional diagram for an acquisition and control system is presented in Fig. 3.A process from a real system is characterized by a set of physical parameters, most often nonelectric.Sensors convert physical parameters into analog or digital electrical signals.Signals are handled, processed, analyzed and presented by the computing system.It also generates control signals through the control actuators in the real system.In the computer which has the driver and the application software data are saved, stored, then processed and analyzed.
After processing the data are presented in an intuitive and intelligible manner.Some data are used to generate signals for the actuators to control the system.The acquisition and control system have two main parts, one is the hardware and the other is the software.

The hardware zone
A data acquisition hardware sytem is has sensors and / or actuators, a DAQ device, connection cables and a computer with dedicated software.

Sensors and actuators
A sensor is a converter that measures a physical parameter and converts it into a signal which can be read by an observer or by an instrument.In DAQ sistem a sensor, also called a transducer, converts a physical phenomenon into a measurable electrical signal.
An actuator is a type of motor for moving or controlling a mechanism or system.An actuator is the mechanism by which an agent acts upon an environment.

DAQ device
DAQ hardware acts as the interface between a computer and the signals from the outside world.
A DAQ system means any device which measures input electrical quantities and can be connected to a PC.A DAQ contains at least one converter, an interface that transforms analog signals into digital signals.
These hardware devices may only convert the input signals into digital signals without processing them.All calculations must be done by the PC software.The same device can measure a lot of parameters, simply by modifying the transducers used and the software that retrieves and analyzes the data.Universal DAQ have greater flexibility allowing their use in many applications with the disadvantage of user time lost for designing and developing application software for each system.These devices can be internal or external for a PC.The most common are the DAQ-boards.They are universal DAQ devices like extension boards that connect through an internal PC bus.
The overall structure of a data acquisition boards is shown in  Actuators are usually complex devices that can not be directly controlled by control signals generated by the system.Interfaces that control these devices, according to orders received from the data generated, are called controllers.They actually translate simple commands from the computing system into complex signals that control the actuators.
Sometimes controllers are complex systems with microprocessors and control loops.
Few companies worldwide are dedicated to producing the DAQ, like: National Instrumets, ADLINK Technogy, LabJack Corporation, ACCES I/O and others.

The software zone
A computer with programmable software controls the operation of the DAQ device and is used for processing, visualizing and storing data.The software zone has two parts: the driver software and the application software.
The driver software is a very important software element for communication between the application software and the peripheral devices, like DAQ.It simplifies communication with the DAQ device by abstracting low-level hardware commands and register-level programming.A driver is a collection of functions (subprograms) that implements the necessary controls to interface the software with the hardware.
The driver receives high level commands from the software application and generates lowlevel commands to the DAQ.It receives, processes, analyzes and scales DAQ response.Typically, the DAQ driver software has an application programming interface that is used within a programming environment to build application software.
The application software implements, beside measuremet functions, control and data display, and firmware, program included by the manufacturer in a specialized system, providing processing and analysis data and calculate the final results.
The application software facilitates the interaction between the computer and the user for acquiring, analyzing, and presenting measurement data.It is either a prebuilt application with predefined functionality, or a programming environment for building applications with custom functionality.Custom applications are often used to automate multiple functions of a DAQ device, perform signal-processing algorithms, and display custom user interfaces.Some commercial application softwares are: LabView, HP-VEE, DIA-dem, DASY Lab, Python, QtiPlot and others, or microcontrollers software based on C++.
To create application software it is important to know the main DAQ's features: The resolution represents the precision of the digital representation of an analog input, resulting from the division of input domain by 2 n , where n is the number of bits for the analog / digital converter.

-
The sampling rate is the maximum frequency that the DAQ can achieve, sample and convert the output signal.

-
The transmission rate is given by the number of samples per second that DAQ can send to the computer.

-
The number of analog input and output channels represents the number of physical connections on which analog signals can be read and generated.

-
The buffer capacity represents the capacity of the used memory for temporary digital storage of the samples acquired until to their transmission to the PC.The buffer is very useful when the sampling rate exceeds the transmission rate or when multiple signals are acquired at different sampling rates.

-
The time synchronization channels is very useful for collecting data on multiple channels.

Sensors and actuators used in pulmonary ventilation
In ventilation sensors for measuring pressure, flow rate, oxygen and anesthesic concentration, temperature and humidity are used.

Diaphragm pressure sensors
The diaphragm pressure sensor uses a resistive element with variable resistance pressuredependent.The resistors are applied on a ceramic membrane with thin film technology.The pressure acting on the membrane produces a change in the resistance depending on its bending.The main characteristics of pressure sensors are the maximum pressure that can be determined, accuracy, power supply voltage, temperature range in which the sensor has a linear characteristic.
For testing the ventilation and the patient blocks the maximum pressure is 110 mbar and the pressure sensor used can determine maximum pressure up to 120 mbar.For testing the gas supply pressure in the hospital is needed a pressure sensor that can measure values above 6 bar, and for the nebuliser testing at least 2 bar.The sensor used is for middle pressure, maximum 10 bar.

Flow sensors
Flow sensors used in ventilation can have a diaphram or a hot wire.

Diaphragm flow sensor
The measurement principle is simple, tthe diaphragm geometry is known, the pressure is measured downstream and upstream of the diaphragm simultaneous and using the fluid mechanics the flow rate can be determined with the following formula (13).

Hot-wire flow sensor
Hot wire flow sensor operates according to the anaemometric principle of constant temperature hot wires flow meter.Gas flows along a very thin, electrically heated platinum wire in a measuring tube.The wire is heated to a temperature of 180°C.The gas flow that passes through sensor cools the platinum wire.To maintain a constant temperature additional electricity is required to pass through the resistor and the electrical current is proportional to the gas flow.The second platinum wire is used to compensate interferences of various gas mixtures.Various gases in the mixture have different thermal conductivity.The temperature lost in the second line is an indicator of the gas composition.
The main features of the flow rate sensor are the minimum and the maximum flow rate, pressure and temperature, gas type, input and output voltage.
When testing the ventilation flow rates of tens of liters/minute are used.For infants low flows and high accuracy are necessary.To determine leakage inside circuits and patient blocks a good sensor accuracy is necessary in the low flow rate area.

Oxygen concentration sensors
Oxygen is the gas that ensures life.Depending on the amount of oxygen in the blood there are cases in which the inhaled gas should be enriched in oxygen.The oxygen introduced into the lungs must be strictly controlled and monitored, for this task sensors that determine the oxygen concentration are used.These sensors can be electrolytic or paramagnetic.

Electrolytic oxygen sensor
For this sensor the operating principle is electrochemical.The oxygen diffuses through a teflon membrane 1 into the electrolyte 5 and is reduced at the gold cathode 2. In the same time the lead anode 4 is oxidized.The reaction's results are lead and water.The oxidation process consumes anode 4 affecting the sensor's life.The teflon membrane makes the oxygen diffusion to be faster.For this reason the sensor response time is small.Chemical reaction produces a current proportional to the partial pressure of the oxygen inside the gas mixture.The chemical reaction is thermo-dependent.To eliminate the temperature dependence a thermistors 3 is introduced in parallel with the oxygen sensor.For this sensor the operating principle is electrochemical.The oxygen diffuses through a teflon membrane 1 into the electrolyte 5 and is reduced at the gold cathode 2. In the same time the lead anode 4 is oxidized.The reaction's results are lead and water.The oxidation process consumes anode 4 affecting the sensor's life.The teflon membrane makes the oxygen diffusion to be faster.For this reason the sensor response time is small.Chemical reaction produces a current proportional to the partial pressure of the oxygen inside the gas mixture.The chemical reaction is thermo-dependent.To eliminate the temperature dependence a thermistors 3 is introduced in parallel with the oxygen sensor.

Paramagnetic O2 sensor
The oxygen is a paramagnetic gas, which means that it is attracted by a magnetic field.This magnetic susceptibility is much greater than that of most other gas molecules and therefore this physical property is ideal for the oxygen level determination in a wide range of gases.
The magnetic susceptibility of oxygen decreases inversely with its temperature.This principle has led to sensors like Dräger Pato and Michell XTP600.
The electromagnets generate an alternating field.The sampling gas flows through the cuvette and the gas path inside the sensor system.The heating element heats up the sampling gas to operating temperature and the thermoelement measures the temperature.
The outer alternating magnetic field influences the mobility of the oxygen contained in the sampling gas.The changing mobility alters the heat transfer in the sampling gas which results in the thermoelement measuring a changing temperature.The event of the heat transfer variation depends on the oxygen concentration in the sampling gas.An electronic module converts the temperature change in an oxygen concentration value which is then displayed on the connected patient monitor.The main features of the oxygen sensor are the accuracy, the response time, the temperature and the voltage output.
Electrochemical sensors do not need power supply, but for the other types of oxygen sensors the inlet voltage is also important.

Anesthetic and capnography sensors
In anesthesia is very important The anesthetic's dosage to ensure that there is no pain and that there is muscle relaxation.An excessive dosage can lead to awakening problems and a small one can cause patient pain.Thus anesthesic must be accurately dosed and measured.
For measuring an anestesic sensor is used.
The ILCA sensor measuring principle is the infrared absorption.Infrared radiation emitted by a source enters through a window and reaches the light beam where is divided into several parts.Each part goes through a fixed filter.The infrared optical filters (band-pass filters) are dimensioned in terms of their wavelength such that light is transmitted in three channels at the wavelength of the sampled gases.The remaining spectrum is blocked by these filters.When a gas is present the light is absorbed and the resultant change of intensity measured in the respective channel is a measure of the gas concentration.The fourth channel (reference channel) measures at a wavelength at which none of the sampled gases absorbs.
(a) (b) The CO2 and anaesthetic sensor's characteristics are accuracy, measured gas type, temperature range, the supplying voltage and output voltage.

Temperature sensors
Usually, the ventilation gas does not crosses through the nose to be heated.For this reason it is necessary to heat the gas which is done by a special divice named heater.Is it important to control and monitor the temperature and for this a temperature sensor is used.Temperature sensors used in ventilation are thermoresistive or thermocouple types.
The resistive sensor uses a resistive element, temperature dependent.Temperature variations produce proportional variations of resistance.The resistive element is composed of a platinum wire inserted into a capillary tube.
Pt100 -as is known this sensor, do not have a linear characteristic.The characteristics may be linearized with electronic assemblies.
The thermocouple sensor is made of two metal wires encapsulated into a metal tube joined at one end (welded junction elements).When a temperature variation appears, in the junction a voltage variation occurs and it can be read at the other ends of the two conductors, providig the temperature in the junction.For the temperature sensors the accuracy, the temperature range, the power supply and the internal resistances are important.

Actuators, solenoids
A valve is a device that regulates, directs or controls the flow of a fluid (gases, liquids) by opening, closing, or partially obstructing various passageways.A solenoid is an electrically controlled valve.In ventilation they are needed to control gas flow towards the patient or for the patient block test.Usually flow rate can be varied between 0.1 and 60 l/min.

Flow control valve
Flow control can be achieved by strangulation (throttle) or pulse.
Setting by strangulation is achieved by modifying the valve opening area.The main features of the flow control valves are the minimum and the maximum flow rate, the working pressure, the gas type, the maximum voltage supply, the response time, the internal resistance and the maximum current.
To test ventilators valves for pressure up to 6 bar with good flow control under 2 liters /minute are used.

Solenoid valve for pressure regulation
Is very important to control the pressure, for safety reasons, in the patient system.
Pressure control is achieved by means of pressure regulators with coils.
The pressure valve consists of a membrane which acts as a flow control regulator and is controlled by a plunger.A coil drives the plunger.The plunger moves the membrane and opens the valve.Proportional to the current through the coil is the displacement of the plunger and the valve's opening.(0 mA will correspond to -1 mbar, 500 mA to 120 mbar).For the pressure regulators the maximum pressure, the power supply and the electric drive are important .

The power supply and command of various subassemblies
In order to use sensors they must be connected to a voltage source (power supply).Generally, in ventilation, sensors are supplied with voltages of 5, 10, 12 Vcc.Reading data from the sensor is done by reading an electrical outlet parameter from it.Usually it is read the electrical voltage, the current or the resistance.A specific electronic circuits is designed for the sensor's electrical supply, to acquire the correct value of the electrical signal.

The power supply for the spirolog flow sensor
For some sensors different montages are required to allow sensor supply and ensure a good data reading from it.Such an example is Fig. 14 in which a montage for the spirolog flow sensor is presented.
The basic wiring diagram for the spirolog sensor is represented by a voltage amplifier for a Wheastone bridge.With the adjustable resistor Rvar (10kΩ) a current is established through the Wheastone bridge and the gas flow sensor is positioned inside the maximum sensitivity area.The Wheastone bridge imbalance generates a variable current at its terminals, which is then picked of by a differential amplifier, the operational amplifier AO2.At the outlet of the differential amplifier a voltage equal to the amplification coefficient multiplied with the difference resulted from the Wheastone bridge is generated.AO3 is a simple DC amplifier, with a amplification coefficient egual to A, the level's stability being ensured by the capacitor C1.At the AO3 amplifier's outlet a voltage variation between 10V and 19mV, corresponding to a change in flow from 0 to 60 liters/ minute, can be measured.
The flow sensor's filament sterilization is done with the K1 switch and with the resistor Rs = 120Ω.When closing the switch K1, the current inside the filament increases ensuring a temperature of 200˚C.

The actuators' command
Actuators used in human ventilation can be commanded in voltage or current.Some data acquisition boards do not support the current command.For them an electronic device that switches the voltage command into a current command must be present.

The flow valve's command
The data acquisition board USB 6009 could assure a maximum voltage max 5 U V  and the maximum required for a flow control valve is max 12 U V  .To command inside the full range of the flow valve the voltage command given by the data acquisition board is needed to be amplified.
The control of the flow control valve by the data acquisition board is done through a DC amplifier realized with an operational amplifier AO and a current amplifier realized with a transistor in Darlington configuration.The electronic scheme is shown in Fig. 15.The control voltage for the flow valve is set at the positive terminal of the AO amplifier.It is powered by a differential voltage +/-19V.The Power amplifier is realized with transistors BD 139 and MJE 13009, medium power bipolar transistors.The amplifier input current is approximately 20 mA it is amplified with a value given by the product between the two transistors' β factors.The change in voltage on the noninverting input of the operational amplifier with 1V will generate to the output amplifier, respectively to the emitter of MJE 13009 transistor, a voltage of 3.2 V.

The pressure valve's command
An electronic system for the pressure valve's control is designed based on the control voltage's variation, variation between 0 to 5 V.The control system diagram is shown in Fig. 16.
The pressure control valve is controlled in current while the USB 6009 data acquisition board can control only in voltage.
For the pressure control valve a constant current generator is realized with an operational amplifier AO and a MOSFET transistor is used.Current through the pressure valve ( pressure i ) is seted by the set R resistance.A constant current generator controlled by a voltage is necessary to eliminate the impedance variations occured when the pressure valve is powerd, and it's core, consisting of a coil, is heated.pressure i is given by the following formula: where: pressure i -the current through the pressure valve, The noninverting input of the operational amplifier is used to control the generator through the acquisition board.The AO operational amplifier is powered from a single power surce with a constant voltage of 5V.
g R (1kΩ) is the assembly's overall current response and it follows continuously the pressure valve's voltage changes.

Sensors and actuators calibration
The sensor calibration means finding an equivalent between the the sensor's measured electrical output and the physical parameter to be determined.To find the equivalent some calibration systems are created.
For calibration reasons it's necessary to be able to read on the computer's display the voltages provided by the calibrated sensor connected to it via the data acquisition board.A way to determine these voltages, for a pressure sensor, is shown in Fig. 17.This program was developed in LabVIEW 8.5, from National Instruments.
The software described in Fig. 17 is based on a "While" loop.This loop was chosen because it has the advantage that it can be easily stopped by the user when pressing the "stop" button connected in advance to the Conditional Terminal.The loop stops also in case of the acquisition board's erroneous functioning.In this case, the DAQ Assistant Express V.I. is connected via the output error ("error out") and the "OR" expression to the terminal conditioning of the "While" loop.The values from the sensor to be calibrated are introduced in the program through the data acquisition board and the DAQ Assistant Exprees V.I.
Because to the acquisition board can be connected several sensors, using the function Select Signals the channel where the sensor is connected (to the DAQ board) is established.The signal from the sensor is filtered by the Express V.I.Filter.The filtered signal is displayed numerically using the indicator called, in this case, "pressure".To determine the voltage from diferent sensors, like flow rate sensors, O2 concentration sensors, anaestesic gas concentration sensors, the software, in LabView, is similar with the one shown in Fig. 17.

Assembling for pressure sensor calibration
The pressure sensor to be calibrated is connected to the computer via the data acquisition board type NI USB 6009.On the computer's display, using the LabView 8.5 software, electrical signals provided by the the pressure sensor's output variation are viewed.To directly determine the pressure values it is necessary to find an equivalence between these voltages and the pressure values.To calibrate the pressure sensor a montage shown in Fig. 18 is built.The system consists of a syringe for creating the pressure, connection hoses, calibrated sensor connected to a computer via the data acquisition board, the gauge (DPI 705 Druck Limited) metrological verified, connected in parallel with the sensor to be calibrated using a "T"-shaped connection piece.The sensor to be calibrated is powered from the power supply through a connection cable.The signals collected from the sensor are processed by the computer where they arrive through the data acquisition board and the connection cables.
Using a syringe various pressures which are monitored by the pressure sensor to be calibrated and the pressure gauge are generated inside the system.The data from the sensor to be calibrated are viewed as voltages by the computer using the software shown in Fig. 17, developed in LabView.The values measured by the sensor and pressure gauge, directly or indirectly, are summarized in Table 1.-1,31 -1,17 -1,02 -0,88 -0,73 -0,58 -0,44 -0,29 -0,145 0,004 0,15 0,29 0,44 0,59 0,73  In the chart from Fig. 19 a linear pressure variation with the voltage can be observed.The equation governing the linear relationship is : where: p -the pressure inside the calibration system, U -the voltage at the data acquisition board, a and b -constants.
For the equation ( 15) a and b are determined based on the data from Table 1 and the following values are obtained: 68.4 a  and 71.82 b  .
More voltage measurements of the pressure sensor at different moments in time are done, creating pressures with values as random as possible.The data collected in this manner are summarized in Table 2 and in Fig. 20.
Be noticed that in Fig. 20 the curves U1-p, U2-p, U3-p, U4-p are parallel.Since the pressure sensor's calibration curves measured in different moments in time are parallel it means that in various moments in time the curve given by the relation ( 15) is translated with the factor k , defined by the following formula: where: 0 n U -the calibration voltage for 0 p mbar  , while operating the button "low pressure sensor calibration", 0 i U -the initial voltage calibration for 0 p mbar  (determined when the sensor was initially calibrated with the data acquisition board on which a and b from equation ( 15) have been determined, respectively 0 1. ).
For the pressure sensor's quick zero calibration to the atmospheric pressure, using relations ( 15) and ( 16), the following formula is considered: where: 0 n U , 0 i U , a and b -are the same as in formulas ( 15) and ( 16), n U -the voltage determined using the data acquisition board for pressure p .n U is determined with the pressure sensor.Its values are inserted into equation (17) (using a computer program developed in this paper) and the pressure values inside the system are determined.In this manner is obtained a digital manometer with zero calibration at atmospheric pressure.

An effective software for pressure determination
In Express V.I., "Select Signals" the channel through which the pressure sensor is coupled to the data acquisition board (in this case "0") is chosen for reading the collected data.After that the signal is filtered with the Express V.I.Filter.After filtering, the signal is introduced in the Express V.I.Formula 1. Formula 1 is the formula (17) representation in LabView.To calibrate the pressure sensor (a differential sensor) at zero value (atmosphere) a "Case Structure" is used.This diagram is controlled by the user via the OK button "connect the low pressure sensor to the atmosphere".When this button is activated 0 n U is determined from equation ( 17).If the button is not activated, in Express V.I.Formula 1 the old value for 0 n U is inserted.For this a Shift Register had been used.To view the pressure in relation with time curve the "pressure" Graph Indicator is used and for the numerical view the "pressure 2" numeric indicator.

Flow sensor calibration
Honeywell AWM5000 flow sensor calibration is similar to the pressure sensor calibration except that the calibrated and metrological checked flow meter (Rota Yokogawa RAGL53) is connected in series with the flow sensor to be calibrated.The equations ( 15) and ( 17) become the equations ( 18) and ( 20): where: U -the electrical voltage, V  -the gas flow, a and b -constants: ). k is defined with relation (19): where: , when the button "flow sensor calibration" is pressed,  The software developed to read data from the flow sensor is similar to the pressure sensor calibration software.The voltage values obtained after filtration represent n U from equation ( 20).The "Case Structure" connected to the OK button "connect the flow sensor to atmosphere" generates the 0 n U voltage for equation ( 19).It is defined in LabVIEW with Express V.I.Formula 1.If the button is not activated, the old value for 0 n U is inserted in Express V.I.Formula 1.For this a Shift Register had been used.The "Case Structure" connected after Express V.I.Formula 1 and containing Express V.I.Formula 2 or 3 represent equation ( 20) for those voltage / flow intervals.To view the curve flow in relation with time the Graph Indicator "flow 2" is used and for the numerical view the "flow" numeric indicator.

Oxygen sensor calibration
To calibrate the sensor for determining the oxygen concentration it's created a system where the sensor to be calibrated is connected in series with the already calibrated one.Determining the calibration relation is similar to determining the pressure sensor's calibration relation.Equations ( 21) and ( 21 The start calibration before each use is for 21% O2.Similar as for the pressure sensor is obtained the following relation: where: a and b -are the same as in formula ( 21), The software used to calibrate the oxygen concentration sensor is similar to the one used for calibrating the pressure sensor, noting that in Express V.I. "Formula" the data from formula ( 22) are introduced.

Flow valve calibration
An assembly diagram for the flow valve calibration is shown in Fig. 27.
The flow valve 12 is powered and controlled by the computer 1 through the data acquisition board 3 and the flow valve's 12 electronic control 5.It is powered by the power supply 7.
The electrical connections are made using cables 2, 4, 6, 8.As for pneumatic, flow control valve 12 is connected to the main gas source 9 through the pressure regulator 11.The pneumatic connections are made with the hoses 10.The voltage command given by the computer for the valve 12, determines the valve's opening and through it is delivered a particular gas flow.Various supply voltages for the valve 12 are generated by the computer 1 through the data acquisition board 3.In this manner are generated various flow rates which are monitored by the calibrated and metrological checked flow meter 13 (Rota Yokogawa RAGL53).The voltages generated by the computer 1 and the flow values determined by the flow meter 13 are summarized in Table 3.The data from Table 3 are shown also in Fig. 28.In Fig. 28, based on Table 3, the linearity variation on intervals of the gas flow depending on the voltage, can be observed.For a ventilator test system the voltage that controls the flow valve is interesting for obtain a certain gas flow.
The control voltage's variation depending on the flow equation is determined: where: V U  -the command voltage for the flow valve, V  -the flow rate, a and b -constants.
Using Table 3  A flow control system controlled by computer is create based on the relation ( 23) and with the components from the scheme shown in Fig. 27 (1-12).

Pressure valve calibration
The same way used to calibrate the flow valve is used to calibrate the pressure valve, resulting de relation: A pressure control system controlled by the computer is created using the relation (24).
To calibrate the flow and pressure valves the input data "flow" and "pressure" are connected directly with the DAQ Assistant Express V.I.The flow rate and the pressure are determined by the flow meter and pressure gauge and the equations ( 23) and ( 24) are obtain.For flow and pressure control these equations are introduced in Express V.I.Formula and Formula Node, thus achieving control for the valves.These Expres V.I are connected between the data input and the DAQ Assistant Express V.I.The pressure's and flow's versus the sensors supplied voltage variation diagrams were determined.The characteristic equations of these parameters are ( 15) and ( 18).
The data collected for the ventilators from the tester's sensors are retrieved with a certain sampling frequency (1000Hz in this case).This sampling frequency was chosen because the ventilators to be tested work with a respiratory frequency of one hundred breaths / minute, and a respiratory cycle consist of several different times ( 1 t , 2 t , exp t ).
To increase the time period in witch the ventilator parameters are analyzed (at least one respiratory cycle) the sensors measurements must be saved.To achieve this, data acquisition was introduced in a "while" loop.Because ventilator parameters can instantly change, the analysis is done on a complete respiratory cycle.It thus sets the samples number for a complete ventilation cycle to be included in a test.
With the pressure sensor and the LabView software the maximum pressure during the respiratory cycle is measured and it is considered as max p .The plateau pressure is calculated as the average pressure from it's beginning to its end (starts at the end of 1 t and lasts 2 t ).The PEEP pressure is calculated as the average pressure from the expiratory time when the flow rate is zero.The positive flow rate appearance is considered the inspiratory phase start point and the negative flow rate appearance is considered expiratory phase start point.The positive and the negative flow rate means flow towards the patient and from the patient to the sensor.A complete cycle is considered to be the time period between two successive inspiratory phases.The inspiratory time's 1 t end is considered when the zero flow rate appears (no flow).At this point the plateau phase begins.In real human breathing between inhale and exhale (and vice versa) there are break times that allow the muscles to relax and the nervous system to change commands.In ventilation the resting phase is known as the plateau phase, 2 t .The plateau phase ends with the appearance of the negative flow (reverse flow).At this point the expiratory time begins and ends at the appearance of the positive flow.The time period, the inspiratory time and the frequency are defined by formulas (3), ( 2) and (4).
Some uncommon cases when the end of the examined 2 t is previous of the end of 1 t , so that the 2 t is negative, can be encountered.To eliminate these anomalies (negative time) some queries that check the time sequence are inserted.Calculation of 1 t is chosen so it depends on the beginning time of the inspiration before 1 t .The 2 t value, where its end is before the end of 1 t , is calculated according to a beginning inspiratory time before the end of the 2 t and the 1 t value.
Based on relations (9-12), and considering the time interval between two measurements, that being the " rate ", the volumes are calculated with the following formulas:   The MV are defined and calculated with realtion (12).
The amount of negative volumes, VT , is determined.If the analyzed cycle is not a complete one, there is the risk that the VT 's calculated value would be less than the real one.To eliminate this case the maximum VT is extracted from the analyzed period (more then one cycle), so a complete VT is determined, even if it is considered at a later time than the ventilation cycle's beginning.The same procedure is assumed for i VT .
The software based on these explanation is presented in Fig. 31.

Determining the leakage flow in the patient unit
The gas leak flow from a system at a given pressure is represented by the flow needed to be permanently introduced into the system so that the pressure remains constant inside it.
For the patient unit leak testing, the ventilator (the anesthesia equipment) may be "off" or in "standby" mode and the gas control valves are closed.The "Y"-shaped piece of the ventilation circuit is connected to the coupling 1 (Fig. 32.).To determine the leaks from the patient unit gas is introduced until it reaches a certain preset pressure value.To maintain this pressure value the gas is introduced continuously.
As illustrated in Fig. 32., the gas from the hospital's supply is entering into the system through coupling 6, passes through the pressure regulator 5, where the pressure is stabilized at the value of 1 bar, crosses the pressure control valve 4 and reaches the flow control valve 7. The pressure control valve is limiting the pressure at a safe value, usually with 10 mbar above the leaking test pressure.It establishes a certain gas flow to pass through valve 7, flow set by the computer.The gas reaches into the flow sensor 3 which is monitoring the flow, afterwards to the pressure sensor 2 connected to the "Y"-shaped piece 8.After monitoring the gas pressure the gas goes into the patient unit (not shown in the figure) through the coupling 1.
Pressure and flow valves are controlled by the computer using formulas ( 24) and ( 23).
The following parameters are considered:

Conclusions
The present chapter has discussed the most significant aspects needed to determine the ventilation parameters with a DAQ board.
A good knowledge of the ventilation phenomenon transforms the problems of determining the ventilation parameters and testing the ventilators into simple issues of data acquisition.
This paper offers some practical solutions that can be used to determine the ventilation parameters.Doctors need a lot of information to choose the best approach to treat the respiratory problems.A large part of this information is represented by the ventilation parameters.Using solutions like the ones presented in this chapter, DAQ system can offer this amount of information.
Time is very important for saving the patient's life, so the ventilation parameters must be set and read quickly.They can change fast and that means that the monitoring must be instantaneous.In this chapter a real time determination of some parameters, using a system based on DAQ, was presented.Inside the ventilator one can find some DAQ systems, so the problem of setting the ventilator becomes a simple DAQ problem, which can be solved with a simple interface and a good automation.
With DAQ systems the ventilation parameters can be set and view in real time and the medical staff can act in the best manner using the fastest way.
The problem of storing some parameters for a long period of time is solved by digitizing and saving their values inside a special memory.If all parameters are stored for long periods of time the doctors can view the quality of the healing progress and can perform the necessary changes.
The ventilator's functioning must be safe, so it must be tested.Note that testing the ventilation and the ventilators' blocks can be realized simply using a few specific sensors, a

i
VT and the exhaled volume is called expiratory tidal Volume, denoted by e VT or VT .Ideally, the two volumes are equal. i

Figure 3 .
Figure 3.A real system

Fig. 4 .
The analog signals, collected by the sensors, coupled to the analog inputs of the DAQ, are sampled and converted into digital format by A / D converter.Internal bus connects all blocks of DAQ.Digital data are available on the internal bus.Bus interface and control block connects the internal DAQ bus with PC bus extension and transfer data between them.D/A converter transform the digital signals from the computer into analog signals for the analog outputs.I/O digital ports are programmable ports as inputs or outputs digital data.They provide acquisition and generate digital signals coupled to physical I/O digital ports.Interrupts controller synchronizes events with the software.Programmable Counter block assures functions: events counting, wave generation, time modulated signals and others.Interaction with the environment is achieved by digital input / output count.

Figure 4 .
Figure 4. DAQ Memory is a buffer for temporary storage of data in DAQ.

-
Supported input voltage range from DAQ should be correlated with the voltage provided by the sensors.The sensor output range should be fully included into the DAQ's input range.-The accuracy and precision defines quantitative how exactly are represented the analog input signals by the digital output signals.It is defining converter accuracy and analog components precision.-The conversion time represents the time a converter needs to achieve a conversion for a sample of the analog signal in the equivalent digital representation.-

Figure 11 .
Figure 11.Temperature sensors.(a) thermorezistive sensor.(b) thermocouple sensor.(a) (b) Pulse adjustment is achieved by varying the open/close pulse times for a valve with a fixed diameter.To ensure there are no big variations of the instantaneous flow (fixed for the valve) from the average flow (regular) the open/closed sequence is done with high frequency.

Figure 14 .
Figure 14.Electronic diagram for the spirolog flow sensor

Figure 15 .
Figure 15.The electronic scheme for the flow control valve's power supply

setR
-the resistance for the current regulation (1Ω), pressure U-the electical DC voltage for the pressure valve.

Figure 16 .
Figure 16.The electronic scheme for the pressure valve's power supply

Figure 17 .
Figure 17.The software used to read the voltage from a pressure sensor

Figure 20 .
Figure 20.The pressure courves in different moments in time

Figure 21 .
Figure 21.Low pressure sensor software

a
with the data acquisition board on which a and b from equation (18) have been determined, respectively 0 and b -are the same as in formula (18), n U -the voltage determined using the data acquisition board for flow V  .

Figure 27 .
Figure 27.An assembling diagram for the flow control valve calibration

Figure 28 .
Figure 28.The flow valve's calibration curve command voltage for the pressure valve, p -the pressure regulated with the pressure valve, a and b -constants.a and b are determined from equation (24):

Figure 29 .
Figure 29.Sofware for pressure and flow valves

Figure 31 .
Figure 31.The ventilation parameters software

Figure 32 .
Figure 32.The test system scheme for the patient block leakage.1. coupling to the patient system, 2. pressure sensor, 3. flow sensor, 4. pressure valve, 5. pressure regulator ( 1 p bar  ), 6. coupling to the 's value at which the leakage check is done, being specified in the technical documentation of the test equipment (e. g.: 30 mbar),  sig p -the safety pressure's value that is added to the test pressure value and resultsthe value for the pressure valve, usually 10mbar,

Figure 33 .
Figure 33.The Software for determining the leakage flow in the patient unit

Table 1 .
Data for low pressure sensor calibrationPlot the curve that presents the pressure in relation with the voltage, according to the data from Table1and Fig.19is obtained.

Table 2 .
Voltages of the pressure sensor for different pressure values measured in different moments in time

Table 3 .
Calibration data for the flow valve a and b are determined from the equation (23):