Valve Control System On A Venturi To Control FiO2 A Portable Ventilator With Fuzzy Logic Method Based On Microcontroller
Valve Control System On A Venturi To Control FiO2 A Portable Ventilator With Fuzzy Logic Method Based On Microcontroller
Corresponding Author:
Arief Marwanto
Master of Electrical Engineering Study Program
Sultan Agung Islamic University (UNISSULA) Semarang Indonesia
Email: [email protected]
1. INTRODUCTION
A mechanical ventilator is a positive or negative pressure breathing apparatus that produces controlled
air flow in the patient's airway so that it is able to maintain ventilation and oxygen delivery for a long time.
The mechanical breathing apparatus acts as a substitute for the function of the chest pump that is experiencing
fatigue or failure [1]–[3]. There are many techniques and models of tools that can be used in oxygen therapy
(O2) which each have advantages and disadvantages. The selection of techniques and tools to be used is largely
determined by the condition of the patient who will be given oxygen (O2) therapy [4].
The techniques and tools that will be used in the administration of oxygen (O 2) therapy should meet
the following criteria [2], [5]–[11],
− Able to regulate the concentration or fraction of oxygen (FiO 2) of inspiring air.
− Does not cause the accumulation of carbon dioxide (CO 2).
− Resistance to minimal breathing.
− Economical and efficient in the use of oxygen (O 2).
Due to the importance of oxygen therapy for several treatment therapies, the lack of availability and
high availability of ventilators that can regulate oxygen levels in the air [12]. This study is designed an accurate
and stability control of the oxygen concentration value or Fraction of Inspired Oxygen (FiO 2) that can be
applied to a portable mechanical ventilator at a relatively low price. The ventilator can be used in public medical
services other than in the ICU room of a large hospital.
2. METHOD
The architectural design in this study was designed in several parts, namely; oxygen level, oxygen
mixing system, Maxtec Max-250 sensor as oxygen content detector, microcontroller data processing, fuzzy
logic control system control, and display. The object taken in this study was the oxygen level in the breathing
circuit of a ventilator. The analog signal from the oxygen sensor enters the analog to digital converter (ADC)
microcontroller to convert the signal from the analog signal into a digital signal and the data will enter the
Fuzzy logic oxygen level control software. The result of the control system will regulate the variable magnitude
of the opening which will regulate the amount of air entering the mixing venturi [13], to obtain the oxygen
concentration in accordance with the settings, then the processing results will be displayed in an LCD.
The prototype of the system in this study was designed using Arduino Mega as the main
microcontroller. Figure 1 has shown the diagram of the equipment block as a whole [14]. Figure 2 has shown
the process of air mixing due to pressure differences. The process of mixing oxygen can be carried out using
the principle of continuity and Bernoulli’s equation [14], [15]. Figure 3 have shown Bernaulli's principle [13].
Information,
P1: Pressure 1 A1: Cross-sectional area 1 P3: Free air pressure
V1: Volume 1 P2: Pressure 2
A2: Cross-sectional area 2 V2: Volume 2
the number of times that come in and the time that comes out is the same [16], [17].
𝑉𝑜𝑙𝑢𝑚𝑒
𝑄 = (1)
𝑡𝑖𝑚𝑒
The volume of fluid passing through the cross section of the pipe in a certain interval of time (ΔT)
can be expressed as the product of the cross-sectional area of the pipe (A) multiplied by the distance the fluid
travels (Δx) [16], [17]. Where (ΔT/Δt) there is a substitution of the velocity of the fluid V. Therefore, we can
calculate the volumetric flow rate of the fluid simply by measuring the velocity of the fluid. Speed
measurements can be achieved by applying the concepts discussed above to pipes with varying cross sections
as shown in Figure 2. By making a venturi that has a hole that can be adjusted in area, we can adjust the amount
of space air that will enter and mix so that the oxygen concentration could be controlled. Figure 4 has shown a
space air hole area regulating system design. A fuzzy-controlled direct current motor will rotate the scuffed
disk [18]–[20]. The amount of air entering depends on the rotation of the disk.
𝐴 𝑥 Δ𝑥
𝑄 = = AV (2)
Δt
1
∆𝑃 = 𝑃1 − 𝑃2 = 𝜌(𝑉22 − 𝑉12 ) (3)
2
Valve control system on a venturi to control FiO2 a portable ventilator with fuzzy logic … (Hadi Pranoto)
1596 ISSN: 2252-8938
function. Figure 6 as shown the output variable of aperture time is the length of the rotating chamber air gap
disk with membership function.
(a) (b)
Figure 5. Fuzzy membership function. (a) Error variable and (b) Delta error variable
Note:
EN: Negative error; EZ: Error zero; EP: Positive error; EN: Negatif error; Zero error; EP: Positif error
1 ; 𝑥 ≤ −25
−𝑥
𝐸𝑁 (𝑋) = { 25 ; −25 < 𝑥 < 0 (5)
0 ;𝑥 ≥ 0
0 ; 𝑥 ≤ −25 𝑜𝑟 𝑥 ≥ 25
𝑥+25
; −25 < 𝑥 < 0
25
𝐸𝑍 (𝑋) = (6)
25−𝑥
; 0 < 𝑥 < 25
10025
{ 1 ;𝑥 = 0
0 ; 𝑥 ≤ 0 𝑜𝑟 𝑥 ≥ 50
25−𝑥
; 0 < 𝑥 < 25
25
𝐸𝑃 = (7)
25−𝑥
; 25 < 𝑥 < 50
25
{ 1 ; 𝑥 = 25
1 ; 𝑥=0
10−𝑥
𝐷𝐾 (𝑋) = ; 0 < 𝑥 < 10 (8)
10
{ 0 ; 𝑥 ≥ 10
0 ; 𝑥 ≤ 0 𝑜𝑟 𝑥 ≥ 20
𝑥
; 0 < 𝑥 < 10
10
𝐷𝑆 (𝑋) = (9)
10−𝑥
; 10 < 𝑥 < 20
10
{ 1 ; 𝑥 = 10
0 ; 𝑥 ≤ 10
10−𝑥
𝐷𝐵 (𝑋) = ; 10 < 𝑥 < 20 (10)
10
{ 1 ; 𝑥 ≥ 20
The fuzzy processing stage is based on a set of logical rules in the form of an IF-THEN statement,
where the IF part is called the "antecedent" and the THEN part is called the "consequence" [23]. This research
fuzzy control system has 9 rules. Table 1 has shown the fuzzy base role mode created for the control system.
2.3. Defuzzification
The next stage is defuzzification which converts the fuzzy output to crisp according to the
predetermined affiliate function [24]. If the oxygen level has not reached the specified one, the controlling
system will rotate the splattered disk in such a way that it can be achieved. The input of the defuzzification
process is a fuzzy set obtained from the composition of fuzzy rules, while the resulting output is a firm real
number. So that if given a fuzzy set in a certain range, a certain firm value can be taken as a value to rotate the
motor clockwise or counterclockwise with the duration of the DC motor flame. The longer the motor rotates,
the larger the opening of the free air valve. The defuzzification used is the centroid method (Composite
moment), a crisp solution obtained by taking the center point of the fuzzy area [25].
Examples of Defuzzification processes,
Error = 20 and delta error 17,
20
𝐸𝑃 (20) = = 0.8
25
17−10
𝐷𝐾 (17) = = 0.7
10
20−17
𝐷𝐵 (17) = = 0.2
20−10
Valve control system on a venturi to control FiO2 a portable ventilator with fuzzy logic … (Hadi Pranoto)
1598 ISSN: 2252-8938
𝛼 − 𝑃𝑟𝑒𝑑𝑖𝑐𝑎𝑡𝑒1 = 0.7
𝛼 − 𝑃𝑟𝑒𝑑𝑖𝑐𝑎𝑡𝑒2 = 0.2
the next stage is used the maximum method, which is to take the maximum values from the minimum values
in the previous stage. Figure 7 has shown compositional result area.
Then it can be calculated t1 = 3.5. In the same way t2 and t3 can be calculated, that is, t2 = 6.5 and t3 9.
Membership curve 𝜇1 (𝑧),
0 ;𝑥≤ 0
𝑧
𝜇(𝑍) = { 3.5 ; 0 < 𝑥 < 3.5
0.7 ; 𝑥 ≥ 3.5
In the same way we can calculate M2, M3, M4, A2, A3 and A4,
M2 = 10.5; M3 = 42.39; M4 = 14.4; A2 = 2.1; A3 = 7.68; A4 = 1.2.
Centroid Defuzzification:
4.08+10.5+42.39+14.4
𝑍∗ = = 5.6
1.75+2.1+7.68+1.2
Valve control system on a venturi to control FiO2 a portable ventilator with fuzzy logic … (Hadi Pranoto)
1600 ISSN: 2252-8938
Figure 9 has shown the deviation that occurs in the on-off control system. The number of
errors/deviations that occur is randomly valued between 0.8% and 13.6%. Figure 10 has shown that the
deviation that occurs is relatively smaller, namely in the fuzzy control system. The number of errors/deviations
that occur is randomly valued between 0.8% and 13.6%. The number of errors/deviations that occur is
randomly valued between 0.4% and 4.2%.
Figure 9. Test results on-off method Figure 10. Test result fuzzy method
4. CONCLUSION
The arrangement of the size of the venturi hole so that free air can enter can be used to regulate the
oxygen concentration on a ventilator. The Fuzzy method control system is very well applied in a ventilator to
control the stability of FiO2 oxygen levels that have been predetermined at a certain amount by the user. The
error for FiO2 control is 2.1% with a minimum set point of 40%. The manufacture of portable mechanical
ventilators that can be regulated by FIO2 can be done domestically relatively easily and cheaply, so that they
can be used en masse in emergency hospitals when there is a pandemic of diseases that attack the health of the
human respiratory system.
ACKNOWLEDGEMENTS
Thanks to CV. Bartec is a leading medical equipment industry in Indonesia as a research place and
who has helped finance and facilities so that this research is completed.
REFERENCES
[1] S. Fludger and A. Klein, “Portable ventilators,” Continuing Education in Anaesthesia, Critical Care and Pain, vol. 8, no. 6,
pp. 199–203, 2008, doi: 10.1093/bjaceaccp/mkn039.
[2] Freescale Semiconductor, “Ventilator/respirator hardware and software design specification,” Ventilator/Respirator Hardware and
Software Design Specification , Rev. 0, 11/2011, p. 77, 2011, [Online]. Available: https://docplayer.net/10921139-Ventilator-
respirator-hardware-and-software-design-specification.html.
[3] E. L’Her, A. Roy, and N. Marjanovic, “Bench-test comparison of 26 emergency and transport ventilators,” Critical Care, vol. 18,
no. 5, 2014, doi: 10.1186/s13054-014-0506-0.
[4] G. Hardavella, I. Karampinis, A. Frille, K. Sreter, and I. Rousalova, “Oxygen devices and delivery systems,” Breathe, vol. 15,
no. 3, pp. e108--e116, 2019, doi: 10.1183/20734735.0204-2019.
[5] M. Ferrer et al., “Ventilator-associated pneumonia and PaO2/FIO2 diagnostic accuracy: Changing the paradigm?,” Journal of
Clinical Medicine, vol. 8, no. 8, 2019, doi: 10.3390/jcm8081217.
[6] J. A. Johannigman, R. D. Branson, D. J. Johnson, K. Davis, and J. M. Hurst, “Out‐of‐hospital ventilation: bag‐valve device vs
transport ventilator,” Academic Emergency Medicine, vol. 2, no. 8, pp. 719–724, 1995, doi: 10.1111/j.1553-2712.1995.tb03624.x.
[7] A. Vasan et al., “MADVent: A low‐cost ventilator for patients with COVID‐19,” Medical Devices & Sensors, vol. 3, no. 4, 2020,
doi: 10.1002/mds3.10106.
[8] M. J. Ghafoor, M. Naseem, F. Ilyas, M. S. Sarfaraz, M. I. Ali, and A. Ejaz, “Prototyping of a cost effective and portable ventilator,”
ICIEECT 2017 - International Conference on Innovations in Electrical Engineering and Computational Technologies 2017,
Proceedings, 2017, doi: 10.1109/ICIEECT.2017.7916539.
[9] P. Subha Hency Jose, P. Rajalakshmy, P. Manimegalai, and K. Rajasekaran, “A novel methodology for the design of a portable
ventilator,” International Journal of Innovative Technology and Exploring Engineering, vol. 9, no. 1, pp. 4785–4789, 2019,
doi: 10.35940/ijitee.A5056.119119.
[10] Z. L. Chen, Z. Y. Hu, and H. De Dai, “Control system design for a continuous positive airway pressure ventilator,” BioMedical
Engineering Online, vol. 11, 2012, doi: 10.1186/1475-925X-11-5.
[11] A. Mohsen Al Husseini, H. Ju Lee, J. Negrete, S. Powelson, A. Tepper Servi, and A. H. Slocum, “Design and prototyping of a low-
cost portable mechanical ventilator,” Journal of Medical Devices, Transactions of the ASME, vol. 4, no. 2, p. 1, 2010,
doi: 10.1115/1.3442790.
[12] S. Kluge and J. Grensemann, “Methodik,” Deutsches Arzteblatt International, vol. 115, no. 27–28, pp. 455–462, 2018,
doi: 10.3238/arztebl.2018.0455.
[13] A. Yadav, A. Kumar, and S. Sarkar, “Determination of standard oxygen transfer rate in venturi aeration system,” IOP Conference
Series: Materials Science and Engineering, vol. 1017, no. 1, 2021, doi: 10.1088/1757-899X/1017/1/012005.
[14] A. D’Ausilio, “Arduino: A low-cost multipurpose lab equipment,” Behavior Research Methods, vol. 44, no. 2, pp. 305–313, 2012,
doi: 10.3758/s13428-011-0163-z.
[15] C. Schäfle and C. Kautz, “Student reasoning in hydrodynamics: Bernoulli’s principle versus the continuity equation,” Physical
Review Physics Education Research, vol. 17, no. 1, 2021, doi: 10.1103/PhysRevPhysEducRes.17.010147.
[16] E. Schena, C. Massaroni, P. Saccomandi, and S. Cecchini, “Flow measurement in mechanical ventilation: A review,” Medical
Engineering & Physics, vol. 37, no. 3, pp. 257–264, Mar. 2015, doi: 10.1016/j.medengphy.2015.01.010.
[17] J. Alan et al., “A Low-cost Air Flow Sensor/transducer for Medical Applications: Design and Experimental Characterization,”
preprints.org, 2021, doi: 10.20944/preprints202101.0404.v1.
[18] P. M. and K. Dutt, “Review on speed control of DC motor using PI and PI fuzzy logic controller,” International Journal of Creative
Research Thoughts (IJCRT), 2021.
[19] A. Singh, Dipraj, D. Singh, and A. Yadav, “FLC based speed control of Induction Motor,” Journal of Physics: Conference Series,
vol. 2007, no. 1, 2021, doi: 10.1088/1742-6596/2007/1/012020.
[20] H. Maghfiroh, M. Ahmad, A. Ramelan, and F. Adriyanto, “Fuzzy-PID in BLDC motor speed control using MATLAB/Simulink,”
Journal of Robotics and Control (JRC), vol. 3, no. 1, pp. 8–13, 2022, doi: 10.18196/jrc.v3i1.10964.
[21] D. J. Putra, N. Nofriadi, and E. Erlinda, “Implementation of fuzzy logic using Mamdani method to determine the quantity of bag
production (case study in Roman Indah Padang bag factory),” JURNAL TEKNOLOGI DAN OPEN SOURCE, vol. 5, no. 1,
pp. 1–7, Jun. 2022, doi: 10.36378/jtos.v5i1.2220.
[22] M. Irfan, C. N. Alam, and D. Tresna, “Implementation of fuzzy Mamdani logic method for student drop out status analytics,”
Journal of Physics: Conference Series, vol. 1363, no. 1, 2019, doi: 10.1088/1742-6596/1363/1/012056.
[23] A. Fernández and F. Herrera, “Linguistic fuzzy rules in data mining: Follow-up Mamdani fuzzy modeling principle,” pp. 103–122,
2012, doi: 10.1007/978-3-642-24666-1_8.
[24] S. K. Yadav, “DC motor position control using fuzzy proportional-derivative controllers with different defuzzification methods,”
IOSR Journal of Electrical and Electronics Engineering, vol. 10, no. 1, pp. 37–47, 2015, doi: 10.9790/1676-10133747.
[25] I. H. Usoro, U. T. Itaketo, and M. A. Umoren, “Control of a dc motor using fuzzy logic control algorithm,” Nigerian Journal of
Technology, vol. 36, no. 2, p. 594, 2017, doi: 10.4314/njt.v36i2.35.
BIOGRAPHIES OF AUTHORS
Valve control system on a venturi to control FiO2 a portable ventilator with fuzzy logic … (Hadi Pranoto)
1602 ISSN: 2252-8938