The Feasibility of Integrating Flexible Sensor and Virtual Self-Organizing DC Grid Model in an Embedded System for Blood Leakage Detection During Dialysis Treatment

 Blood leakage or serious blood loss is a frequent life-threatening complication that occurs during dialysis treatment. When these events occur, it takes only a few minutes for blood loss in an adult patient, resulting in mortality. As an early-warning design, this study proposes integrating a flexible sensor and a virtual self-organizing DC (Direct Current) grid model for blood leakage detection. A flexible sensor is made using a screen printing technique, and a self-organizing algorithm is used to automatically construct a virtual DC grid from an existing grid to an extending grid. That is, a virtual blood leakage detector can be modeled, which is intended for detection of blood leakage or serious blood loss. The feasibility is verified


Introduction
According to the 2016 statistics, in Taiwan, more than 80,000 patients with end-stage renal disease and chronic kidney failure have received dialysis therapy.In a routine dialysis treatment, certain complications occur frequently, including vascular access stenosis [1], venous needle dislodgment, body fluid/blood leakage, and serious blood loss [2][3].Among these events, blood leakage or serious blood loss is a life-threatening complication.With blood flow rates of 400-500 ml/min, it takes only a few minutes to lose more than 40% of the adult blood volume.In a lecture in 2012 [4], the American Nephrology Nurses' Association (ANNA) venous needle dislodgement (VND) survey reports revealed that more than 75% of the surveyed candidates indicated that they had observed a VND event in a hemodialysis room with more than 8% having observed five events or more in the last 5 years.The reports also revealed that more than half of the surveyed candidates concerned about VND or serious blood loss indicated that they were concerned about VND very often (>30%) or often (>20%).Six risk levels were identified in the ANNA Figure 1.The proposed configuration of an integrating flexible sensor and virtual DC grid VND survey results [3], and practice recommendations were also implemented to prevent VND [3,[5][6][7], including selecting an adequate access cannulation site, which serves a dual purpose, taping the needles securely, assuring access visibility, using a safety dialysis machine, and monitoring the devices.
In addition, various alarms have been built into a hemodialysis machine that can warn system malfunction through pressure (pump pull and push), blood leaks, pump flow, and temperature monitors.Measuring venous pressure helps in detecting VND, whereas pressure drops act to stop the roller pump.Pad sensors, optical sensors, and wetness sensors [8][9][10] can also be used as an early warning detector, such as the customized product Redsense® monitor (CE mark, Halmstad, Sweden, approved by the FDA) for high-risk patients and home HD.It is placed at the access cannulation sites around the venous and arterial needles to detect blood leakage or blood loss.It relies on an optical sensor (infrared light) and is not sensitive to clear but conductive fluids such as saline.A pad sensor [9] comprises upper / lower membrane layers and an electrical circuit connection.When blood comes in contact with the circuit connection, electrical connection changes produce electrical High: Vcd (V)

Embedded System
Control Signal Figure 2. The configuration of proposed flexible sensor signals that are sent to the analytical circuit (alarm unit) or analytical method [10].These base membrane layers need to be made of a medical-grade and biocompatible material.Electromagnetic compatibility (EMC), circuit electrical performance, and electrical tests should be validated (IEC 60601-1, medical design standards) for medical electrical equipments and compliances.Wetness sensors are sensitive to not only blood but also saline and other fluids in the patient's body environment [2].However, these alarm tools cannot stop the blood pump as there is no interface with the hemodialysis machine.
Hence, this study proposed integrating a flexible sensor [11][12][13] and a virtual DC grid model [14][15] for body fluid / blood leakage detection during dialysis treatment, as shown in Figure 1.The virtual DC grid model with a sensing unit and a wireless communication [16] can be implemented in an embedded system.The virtual DC grid model is a manner to design a virtual self-organizing analytical circuit / alarm unit.It can automatically build up an impedance matrix by adding the analytical circuit's connecting branches one at a time to construct a complete DC grid that is formed from an existing impedance matrix to extend a new large-scale impedance matrix.Its advantage is that it can be easily implemented on a digital tablet (PC) or an intelligent mobile devices.The so-called "rake equivalent circuit" is applied for short circuit analysis in a grid using the current injection method [17][18].A flexible sensor consists of an electrical connection circuit and is made using a screen printing technique with elastic and metallic materials.A detector integrating a flexible sensor and a virtual DC grid can then be implemented into an embedded  [16].The feasibility of the proposed model is verified in this study.

A. The Proposed Configuration of Flexible Sensor
Flexible sensors have been applied in several fields, including biomedical engineering, industrial automation controls, robotic sensing controls, communication security, human-robot interaction, and human-machine interfacing [11][12][13].Capacitive-based, piezoresistive-based, and piezoelectric-based sensors are commonly used to measure pressure, force, and temperature and for tactile examination.They are thin, soft, flexible, and stretchable and can integrate a mobile and a wearable device on the human body.For healthcare applications, noninvasive sensing systems and health-monitoring appliances are widely used for clinical needs and biomedical diagnostic procedures.An advantage of the flexible sensor is that it can be placed anywhere on the patient's body.
Therefore, a printed circuit board (PCB) was mounted in a flexible planar, with a size of 60 mm × 40 mm body-fluid -sensitive element with 9 nodes.It is a configuration of an 8-position switch that manipulates the open and closed states through blood leakage / serious blood loss.Interface conductors connect directly to embedded system connectors (digital inputs, DIs) without using any additional components, because of using the pull-up on MXP (port) connectors or pull-down on MSP (port) connectors.MSP connectors (DI-01 ~ DI-08) are used to measure 0 -3.3 V signal [16].Each connector has an internal 40k pull-down resister.For a constant voltage source, V cd = +3.3V, eight connecting conductors will appear as short circuit in any position.On the MSP connectors, each DI has a connection from V cd to pull-down resister, as shown in Figure 2. Hence, each DI has one terminal tied high to the voltage, V cd , and then the numerical values or binary patterns can be obtained.The eight-bit binary patterns can be defined as ( 1) where the 8-bit binary patterns are control signals, which are used to control the resister, R g , tied to the virtual ground, as shown in Figure 3.
Then, a WiFi WLAN is used for linking mobile devices (smart phones, personal digital assistant, or iPad) and portable computers (laptops), while operating on 2.4-GHz industrial, science, and medical frequency bands.It is employed to transit the control signals for portable devices with short-range communications in common household and mobile appliances.

B. Virtual DC Grid Model in an Embedded System
As shown in Figure 3

Node
No.

R C
where Column 1# and Column 2# are the branches with resisters, including additional resisters between two nodes (j# -k# to l# -s#), and an additional resister from one node to the reference node (i#); Column 3# indicates the resisters in the DC grid; and Column 4# describes the connecting state, the symbol "C = 1 (High)" indicates the connecting state; otherwise, it is symbol "C = 0 (Low)."The constant R s is the internal resister in the current source, I. Resisters, R ref1 and R fef2 (R ref1 = 2  R fef2 ), are used to determine the normal output voltage, V out , using the voltage divider rule, as follows: where (1 + R ref4 /R ref3 ) is the magnification of a virtual amplifier.The voltage level is 3.3 V for further wireless communication application via the WiFi WLAN (IEEE 802.11Standard).Constants R 1 to R 8 are the branch resisters.The ground connection matrix, M g , is defined as follows:

R C
where Column 1# and Column 2# describe the short circuit between one node to virtual ground (grounded branch: g = 8), due to blood leakage.Constant R g is the virtual ground resistor, as described below: When the blood leakage is detected by the flexible sensor, the control signal will be "C = 1" and the grounded branch will be connected.The connecting matrix and the ground connection matrix are combined, whose virtual DC grid has the following admittance matrix, as shown below [14,17]: 3 where node number, n = 10; branch number, b = 11; and grounded branch, g = 8; y ij is the admittance (y ii  0) between the node, i, and node, j.
In the virtual DC grid, only the current source is injected into node j#, and the nodal equations for the grid are: where I S is the injection current into node j#; Z is the impedance matrix; and both Z and Y are symmetric matrices; the nodal voltages at each node can be obtained using the current injection method [18][19], as follows: where nodal voltages, V 3 to V 10 , are used to identify the where state variable, S j = 1, indicates that one or more nodes have detected a blood leakage event.Therefore, signal "1" acts to drive an alarm unit.In addition, the power flow equations of the grounded branches can be represented as , i = 3, 4, 5, …, 10, R l  0 (14) where grounded branch, R l  0, while the connecting state "C = 1"; otherwise "C = 0" indicates that the grounded branch is not connected, and resister, R l = 0.When several grounded branches are connected, the power flow will increase.
There are two grasp changes that can be used to quantify the level of blood leakage and can be summarized as follows:  nodal voltage drops: nodal voltages, V 3 to V 10 , are drops, while one or more sensing points in a flexible sensor have detected blood leakage using equations ( 12) and ( 13),  power flow increases: one or more ground branches are connected, resulting in power flow increases.

Experimental Results
The proposed prototype detection model has been developed in an embedded system (National Instruments TM myRIO-1900, Austin, Texas, U.S.A).The virtual DC grid model was coded as a "self-organizing algorithm" in an embedded system, including matrix methods for large-scale network and a current injection method.The flexible sensor (60 mm × 40 mm) was made using a screen printing technique with elastic and metallic materials.As shown by the connecting topology in Figure 3, the DC grid has 10 Hence, considering the connecting states, C, of the connecting matrices, M C and M g , the original impedance matrix, Z, was constructed at the top of the next page, where the square matrix, Z, was a symmetric and nonsingular matrix that was equal to transpose, Z = Z T and |Z|  0. The connecting states were obtained from the flexible sensor.The proposed prototype model was designed using a LabVIEW graphical programming user interface (NI TM Corporation, Austin, Texas, U.S.), as shown in Figure 4, and was carried out in a development platform, such as a tablet PC or mobile intelligent vehicles.The flexible sensor was made using a screen printing technique with elastic and metallic materials.The analytical and alarm units were virtualized and implemented in an embedded system.A self-organizing algorithm using a large matrix method was employed to construct the virtual DC grid.Its variable structure can construct a virtual DC grid for handling various conditions.Table 1 shows the specification of the proposed integrating sensor.The feasibility of the proposed prototype has been verified and this simple technique can be easily implemented on a tablet PC or a mobile appliance via wireless connection, cloud computing, and cloud storage for clinical applications.

.Acknowledgement
This

Figure 3 .
Figure 3.The configuration of proposed virtual DC grid for blood leakage detection system and WiFi wireless local area network (WLAN, IEEE 802.11Standards) [16].The feasibility of the proposed model is verified in this study.
, consider a virtual DC grid consisting of 10 nodes (n = 10) and 11 branches (b = 11), whose DC grid has the following connecting matrix, M C , as follows:

Figure 4 .
Figure 4.The graphical programming user interface