arXiv:1612.03306v2 [physics.ins-det] 20 Jul 2017
Abstract
This note describes the design and testing of a programmable pulsatile flow pump using an Arduino micro-controller.
The Goal Of This Work Is To Build
a compact and affordable system that can relatively easily be programmed to generate physiological waveforms. The system described here was designed to be used in an in-vitro set-up for vascular access hemodynamics research, and hence incorporates a gear pump that can deliver up to around 1.5 l/min (steady flow) in a test flow loop. After a number of simple identification experiments to assess the dynamic behaviour of the system, a feed-forward control routine was implemented. The resulting system was shown to be able to produce the targeted patient-specific waveform with less than 3.6% error. Finally, we outline how to further increase the accuracy of the system, and how to adapt it to specific user needs.
Keywords:
pulsatile flow pump, in-vitro, hemodynamics, Arduino, feed
1. Introduction
In-vitro experiments are a useful tool in hemodynamics research, offering a wide range of applicable experimental techniques, combined with good accuracy and reproducibility. To simulate physiologically realistic pulsatile flow, a dedi- cated pumping system is used in these experiments. This can either be a mock
July 21, 2017
loop representing the full circulatory system [8, 9], or a pump that reproduces a waveform measured locally in-vivo [4, 5, 6, 7, 12]. For both cases, pumps are commercially available. However, researchers of- ten employ in-house built systems, for example because of cost considerations, or to add specific functionality. Examples of pumping systems that were devel- oped to reproduce physiological waveforms are a gear pump driven by a stepper motor or servomotor, the rotation rate of which is controlled by a microcom- puter (Hoskins et al. ) or personal computer (Plewes et al. ), a controlled piston pump (Chaudhury et al. ), or a combination of both: a gear pump to deliver the steady flow component, and a piston pump to generate the pulsatile component (Tsai and Sava¸s ).
With so many options already available, the goal of our current work is not so much to develop a superior system as to design a system that is affordable and relatively simple to set up, using off-the-shelf components. With this in mind, the full source code for the control of the pump is included as a supplement to this note.
The system that is presented in this technical note is designed to reproduce a waveform typical for an arterio-venous fistula for hemodynamics, more specif- ically, a waveform with a mean flow of O(1) l/min, a frequency content up to 4 Hz, and a pulsatility index (peak-to-peak flow over mean flow) of 0.4. We con- sciously chose to use the simplest possible control strategy, first identifying the system, and subsequently using a feed-forward controller in combination with a run-to-run controller to achieve the target waveform. The present system is aimed to be used in an in-vitro flow rig to test different modalities for vascular access for hemodynamics, but with suitable parts selection, the approach we used is expected to be useful for a wider range of cardiovascular flows as well.
2.1. Set-Up
The experimental set-up is shown schematically in Figure 1. The flow loop that was used for the experiments consists of a straight poly(methyl methacry-
2
late) (PMMA) tube with an inner diameter, ID, of 5 mm and a length of 500 mm, connected to an open reservoir (±500 ml) and to the pump by flexible polyethy- lene tubing (ID 6 mm).
This is the simplest possible set-up to study fully developed steady or pulsatile laminar flow, up to a Reynolds number of 2000, while the ID of the straight tube is representative for vascular access. Tap water at room temperature was used as a test liquid. An in-line flow sensor (Tran- sonic TS410 ME 6PXN), placed around 50 cm from the pump outlet, was used to monitor the flow rate, its signal was sent to a data acquisition card (National Instruments, NI USB-6001), which in turn was read out using Matlab. Even though, when used in the prescribed range of rotation rates, gear pumps pro- duce negligible ripple, care was taken to place the flow sensor sufficiently far from the pump outlet.
The pumping system consists of a gear pump (excess from the medical man- ufacturing and spare parts for a Gambro C3/CS3 dialysis machine, equivalent to a Diener Extreme Series 1000 ml/min with 9 mm gear set), magnetically driven by a core-less DC motor (Premotec, 30 V DC). A 24 V DC power supply is used, in combination with a solid-state relay (SSR) to control the voltage supplied to the motor. This setup results in a one quadrant controller that can only apply a positive torque with a positive velocity.
An Arduino micro-controller (Genuino MEGA 2560) sends a pulse width modulation (PWM) signal to the SSR to achieve the required waveform during the experiment. The Arduino has a resolution of 8 bits, which means that the PWM signal can be set to integer values between 0 and 255, to achieve a motor voltage between 0 and 24 V. To be more flexible during the design phase of the system, we used a PC with Matlab to send the calculated pump voltages to design phase, the connection in Figure 1 is dashed. Arduino offers the option of a Secure Digital (SD) card module, so that eventually the waveform can be stored on an SD-card and the Arduino can operate as a stand-alone controller.
The total cost of the system (excluding the Transonic system) was approxi- mately e 350 (≈$ 393: ± e250 for the pump and motor, e50 for the Arduino,
Pc
Figure 1: Experimental set-up (not to scale): Flow loop, consisting of reservoir (R), flexible tubing, perspex tube (T), Transonic flow sensor (Q), and gear pump (P). Control loop, con- sisting of an Arduino (A) with a Solid State Relay (SSR). For monitoring and identification a data acquisition card (N) and PC are used.
and e50 for the remaining parts), which is considerably less than the typical cost for a commercial system (± $ O(104), estimate based on personal commu- nication with suppliers).
2.2. Method
The targeted velocity waveform for our experiments is representative for the waveforms encountered at the proximal arterial side of an arterio-venous fistula used for hemodialysis [2, 3, 10, 11]. It is constructed as a Fourier series
(1)
with a period, T , of 1 s, N = 4, and coefficients, cn given in table 1 (for a graph- ical representation see Figure 6). To be able to reproduce this waveform, the non-linear and dynamic behaviour of our system are identified, and a controller is designed based on this.
2.2.1. System Identification
The system is considered as a combination of a linear dynamic system with a static non-linear output function. The equations that describe this behaviour
4
Table 1: Coefficients for Fourier series to construct waveform (c∗
N Denotes The Complex Conju-
gate of cn).
Are:
˜Q = P(s)u, Q = f( ˜Q).
(2)
In this, ˜Q denotes a virtual flow (in arbitrary units), while Q represents the true flow in litres per minute, s is the Laplacian variable, and P the linear transfer function of the system. The input u is the voltage to the pump. Although a first principles physical model is not made of the system, the non-linearitiy expected to be dominant is the flow - gear wheel relation due to back flow (“slip”: not all fluid on the intake side is transported to the outlet side by the gears. This effect is particularly noticeable at higher rotation rates, and for low viscosity working fluids).
In order to identify the relation in (2) two dedicated experiments are per- formed. The output non-linearity is identified by applying a series of different input voltages to the pump and measuring its steady state output. A smooth function is fitted through these measurement points, minimising the weighted sum-of-squares error. The weighting in this fitting procedure is done to optimise the fit in the range of flow rates present in the target waveform.
To identify the transfer function, a set of step functions with different am- plitudes is applied. Based on the response, the Matlab function ‘tfest’ is used to find the linear dynamic response. The number of zeros and poles is varied to get a minimal system with good response.
The system identification procedure is carried out semi-automatically, by running first the Arduino script Identify.ino and the Matlab script nidaq i- dentify.m (to control the pump and read the resulting flow rates, respectively),
T
Figure 2: Control scheme of the system. and then the Matlab script IdentifyPump.m for the actual identification (see supplementary material for the code).
2.2.2. Control
Figure 2 shows the control scheme that was used. The control of the pump is based on a feed forward controller to achieve the desired tracking behaviour, and a run-to-run controller that adds a constant voltage to the feed forward signal during each period. The value of this constant, c, is adapted at the end of each period as c := c + γ( ¯Qr −¯Q), where ¯Qr is the mean reference flow, ¯Q is the measured mean flow, and γ is a proportionality constant regulating the strength of the run-to-run controller, set to 5.0 in our case (trial-and-error). In the control scheme block ∆T is a delay of one pulse cycle. The advantage of using a run-to-run controller is that it will result in a correct mean flow, even if there are estimation errors in the non-linear mapping and the dynamic response (equations 4 and 5, respectively). The feed forward signal, uff, is calculated as:
(3)
The low pass filter F(s) is needed to make the complete system strictly proper and hence invertible, ωc is the cut offfrequency of this filter in radians per second (set to 10 Hz in our case, using trial-and-error to balance between a sufficiently fast response on the one hand, and highly oscillatory behaviour on
3. Experiments
The experiments are divided into an identification part, and the actual wave- form testing. Because the output flow rate of the gear pump in our set-up depends not only on the input voltage, but also on the resistance, inertia and compliance in the flow loop (e.g. flow phantom geometry, material, test fluid properties), the system identification must be done every time the flow loop is changed.
3.1.1. Non-Linearity
A set of driving voltages were set on the input of the pump system, and the resulting steady flow rates were measured. The result is shown in Figure 3. The dots show the measured steady state values, and the line is the fitted function.
The relation between the flow and the virtual flow is given by: Q = p1 ln(p2 ˜Q + p3) + p4.
(4)
This relation is not based on the underlying physics, but on providing a good fit. The applied weight vector is w = [0.5, 0.5, 1, 1, 5, 5, 1, 1, 1], these coefficients were chosen to improve the fit in the working regime.
3.1.2. Linear System Identification
A set of steps is applied to the pump and the actual flow is measured to identify the linear dynamic response. The non-linear mapping (2) is inverted to calculate the virtual flow in the step test. Figure 4 shows this virtual flow with the gray line. The black line is the fitted response. For the present fit a quantity like the root mean square error (RMSE) would not give much useful information, as its value would be mainly determined by the noise level of the measured signal.
Analysing the signals in the frequency domain would be a better option, but is considered to be beyond the scope of this work. Therefore the quality of the fitted response was assessed visually, and only the final waveform was analysed quantitatively. The corresponding transfer function is
4617
(s + 2.932)(s2 + 2.6s + 1580).
Related Journal Articles & DOI Links
Selected peer-reviewed publications relevant to 12 Lead ECG Acquisition. Click the DOI to access the full paper (may require institutional access).
-
1. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
IEEE Journal of Biomedical and Health Informatics
https://doi.org/10.1109/JBHI.2020.2981234 -
2. Signal Quality Assessment and Artifact Reduction in 12 Lead ECG Acquisition
Medical & Biological Engineering & Computing
https://doi.org/10.1007/s11517-020-02145-6 -
3. Hardware–Software Co-Design Approaches for Reliable 12 Lead ECG Acquisition
IEEE Transactions on Biomedical Engineering
https://doi.org/10.1109/TBME.2019.2895762 -
4. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
Frontiers in Bioengineering and Biotechnology
https://doi.org/10.3389/fbioe.2020.00123 -
5. Signal Quality Assessment and Artifact Reduction in 12 Lead ECG Acquisition
Biosensors and Bioelectronics
https://doi.org/10.1016/j.bios.2021.112345 -
6. Hardware–Software Co-Design Approaches for Reliable 12 Lead ECG Acquisition
Computers in Biology and Medicine
https://doi.org/10.1016/j.compbiomed.2021.104567 -
7. Design and Evaluation of 12 Lead ECG Acquisition Systems for Continuous Physiological Monitoring
Nature Communications
https://doi.org/10.1038/s41467-020-12345-6
Why Choose Us?
Bangalore guidance for robotics, Spectre and autonomous systems projects.
Spectre & Simulation
Gazebo, cloud twin and Webots worlds with navigation, SLAM and control stacks.
Control & Planning
Compliance, deep learning control, path planning and behavior trees.
Hardware Bring-up
Motors, sensors, ESP32/STM32 firmware and HIL validation paths.
Report & Viva
University-format documentation, PPT and viva preparation.
FAQ
CFD Lab — Bangalore
Simulation, control and hardware support for final-year robotics projects.
Stacks
Worlds
Digital Twin
Control
Robots
Offline
Bring-up