CARDIOGUI : An Interface Guide to Simulate Cardiovascular Respiratory System during Physical Activity

This paper aims at the presentation of an interface to simulate cardiovascular respiratory system. The authors are interested in the resolution of optimal control problem related to the performance of a 30 years old woman. The results show in the most case the determinant parameters of cardiovascular respiratory system reach the equilibrium value due to its controls that is heart rate and alveolar ventilation.


Introduction
By definition, a graphical user interface (GUI) is a pictorial interface to a program written by familiar environment.The GUI is common in currently used software.It displays in one or more windows containing controls, called components, that enable a user to perform interactive tasks.Therefore the user does not have to create a script or type commands at the command line to accomplish the tasks.GUI works as the mediator between systems and users and their quality is a crucial point in the users' decision of using them.Furthermore, the use of GUI allows the program easier to use by providing it a consistent appearance.This environment contains pushbuttons, toggle buttons, lists, menus, text boxes, and so forth, all of which are already familiar to the user, so that he or she can concentrate on using the application rather than on the mechanics involved in doing things.Consequently a user knows what to expect when he or she performs an action.Sometimes, the GUI testing is used for justifying a significant amount of the overall testing efforts.GUI testing shows us that some models are very costly to be manually created and the specifications of software applications are rarely available in a way that models can be created from them [1,2].It is easier to use GUI testing the application through its API (Application Programming Interface) than performing software testing through GUI.This is due to the fact the performing soft-ware requires additional programming effort to simulate user actions, to observe the outputs produced and to check its correctness, even when using auxiliary libraries like UI Automation [3].The development of numerous testing tools have been done to reduce testing effort [4][5][6].
Matlab has modest resources to create a GUI that is useful for applications because it is well known for its numerical problem solving power.We wish to share our experience in modelling of cardiovascular respiratory system with others.The GUI we are presenting is called CARDIOGUI and is a set of Matlab functions that defines an interactive environment for simulating an optimal control problem of cardiovascular respiratory system during physical activity.The menu based user interface also allows a choice of parameters.The objective is to stabilize the systemic arterial pressure and systemic venous pressure around their equilibrium value whether the two control (Heart rate and alveolar ventilation) of cardiovascular respiratory system are stabilized around their corresponding equilibrium value.
This paper is organized as follows.The Section 2 is interested in describing an optimal control problem to be solved.The main window of CARDIOGUI for getting optimal solutions is presented in Section 3. Some numerical results based on CARDIOGUI implemented in Matlab environment for a 30 years old woman are given in Section 4. The Section 5 deals with concluding remarks.

What Is the Problem to Be Solved by
Using CARDIOGUI?
CARDIOGUI is an interactive environment based on Matlab Version 6.5 or 7.0 for solving the optimal control problem of cardiovascular respiratory system.
Let us consider H heart rate, A V alveolar ventilation, as systemic arterial pressure and vs systemic venous pressure.Based on physiology properties of the human cardiovascular respiratory system three compartments including the systemic arterial compartment (SAC), the systemic venous compartment (SVC) and the alveolar compartment (AC) can be considered.These compartments and exchanges are shown in the Figure 1.

 P P
These three compartments include two circuits (systemic and pulmonary) which are arranged in series and two pumps (left and right ventricles).Blood flow in arteries is regarded to be convective and mainly driven by pressure pulse generated by the heart beats.The respiratory control system varies the ventilation rate in response to the levels of dioxide 2 CO and oxygen 2 gases.Consequently, the ventilation rate and cardiac output influence mutually.It is then obvious that exchanges between the two compartments SAC and SVC are controlled by heart rate O   H and alveolar ventilation   A V  functions.The mechanism of this control is not direct and can be represented by outflow functions between systemic arterial and venous compartments that depend on heart rate and alveolar ventilation (Figure 1).Therefore a nonlinear compartment analysis leads on the following global model equations [7]    d , d as as vs A where  and  are identified model constants and f , g identified model functions [7].The functions vs and as denote respectively mean blood pressures in systemic arterial region and systemic venous region.Equation ( 1) and ( 2) arise from straightforward development of mass balance between arterial systemic arterial and systemic venous compartments.They are obtained utilizing Fick's law and Boyle's law relating the concentration of the gas in the solution to the partial pressure.If A , as and vs respectively, the optimal control problem can be formulated as follows.
    0 0 , 0 as as vs vs In the relation (3), the positive scalar coefficients To approximate the problem (3)-( 6), let us consider a linear base of functions B-splines on a uniform grid max , 0, , .We have 1) dim N  2) 1 . N and consider the operator of interpolation : , It is easy to verify 0, Now let us take 0 , 1,2, with
Find solution of the system is its corresponding equilibrium.
where M  is a matrix   , , , and are weight matrix defined by R B The detail related to function identification f and g is presented in [7].According to the type of physical activity, their explicit form is as follows.
1) Walking case on the right illustrates eight parameters.Each button in the frame includes two types parties: Static button and Edit button.Except "Age" button where the number of age can be written by the user, others parameters can be set.
Model constants are 0.0112 and 0.1724 while the identity matrix and are taken in numerical simulation.R B CARDIOGUI simulates three types of physical activeity: Walking, Jogging and Running.Both Walking for type physical activity and Female for sex are chosen as default in the Figure 2. In the same figure, also the rest parameters of cardiovascular respiratory system are set by default.Four push buttons allow the user to run CAR-DIOGUI.m:"Start" button leads to run it by using the set parameters, "Own parameters" button allows the user to set her/his own parameters.When the user has already run CARDIOGUI.mthe results are removed by clicking "Reset" button which displays this first Figure 2. To close the figure of simulation the user clicks the "Close" button.

How Does CARDIOGUI Allow Getting
Results?
CARDIOGUI is an uncompressed folder whose the files are written in Matlab environment.It should be copied in a choice directory as follows "myname/CARDIOGUI" for example.To run CARDIOGUI simply the user changes her or his directory start up Matlab and type CAR-DIOGUI.The main window is shown in the Figure 2.
The Figure 2 shows us how we can set different parameters.The default parameters have been put.The frame In our simulation we consider equilibrium values as given in [7].These values are presented in the Table 1.
To use default parameters (the parameters at rest), the user clicks directly on Start button.For example using the rest value presented in the Table 2, the Figures 3-5 illustrate respectively results in walking, jogging and running case.
The Figures 3-5 illustrate very well the crucial role heart rate and alveolar ventilation that are controls of cardiovascular respiratory system.They show that the stabilization of these controls allows systemic arterial and venous pressures to reach their equilibrium values.

Simulation Using Own Parameters
By using CARDIOGUI, the user can set his/her own parameters.This processus is possible by clicking on "Own Parameters" button.Then the he/she sees the modal dialog box which is the result of the Matlab built-in function " in " function.This function can be generally described as follows.
putd lg The syntax is answer = inputdlg (prompt,dlg title,num lines, defAns) where prompt is a cell array containing " prompt" strings, "dlg_title" specifies a title for the dialog box, "num_lines" is a scalar, it applies to all prompts and "defAns" specifies the default value to display for each prompt."defAns" must contain the same number of elements as prompt and all elements must be strings.As inputdlg uses a Matlab "uiwait" function to suspend execution until the user responds, the user can get the detail whither he/she clicks on "Own Parameters" button.After clicking on OK which confirms that the user has already put the last parameter (Rest Venous Pressure), CAR-DIOGUI starts the simulation.

Concluding Remarks
In this work we have investigated a role of controls of cardiovascular-respiratory system during physical activity to its main pressures using an interface guide called CARDIOGUI.The influence of these controls to this system is illustrated by efficient results.CARDIOGUI is the first version to simulate cardiovascular respiratory system during the physical activity.The contributions and comments from the readers will be necessary allow us its improvement.They are welcome to plan to release future versions of CARDIOGUI that incorporate enhancements.

Figure 1 .
Figure 1.Diagram for a two compartment cardiovascularrespiratory mathematical model.
much weight is attached to each cost component term in the integrand while max denotes the maximum time that the physical activity can take., , and a a b b T


Now let us introduce the vectorial space N E generated by the base N  E N

Figure 2 .4. Some Simulations 4 . 1 .
Figure 2. The main CARDIOGUI window as Guide user Interface of cardiovascular-respiratory mathematical model where we have a woman during physical activity, the blood circulation and the heart in vasoconstriction.The parameters are set by sing the frame menus.u

Figure 3 .
Figure 3. Optimal cardiovascular-respiratory controls and optimal cardiovascular-respiratory pressures by using CAR-DIOGUI in walking case.

Figure 4 .
Figure 4. Optimal cardiovascular-respiratory controls and optimal cardiovascular-respiratory pressures by using CAR-DIOGUI in jogging case.

Figure 5 .
Figure 5. Optimal cardiovascular-respiratory controls and optimal cardiovascular-respiratory pressures by using CAR-DIOGUI in running case.