Physical modelling and computer simulation of the cardiorespiratory system based on the use of a combined electrical analogy

ABSTRACT Modelling the human cardiorespiratory system using computer simulation tools can serve to help physicians to comprehend the causes and development of cardiorespiratory diseases. The objective of this paper is to develop an integrated model of the cardiovascular and respiratory systems, along with their intrinsic control mechanisms, by combining analogous hydraulic-electric and diffusion-electric circuits, respectively. This modelling task is performed in object-oriented language in SIMSCAPE using the physical interconnected components to define the underlying dynamic equations. Simulation steady state results under rest and under variable physical exercise conditions, as well as under limiting conditions show a high qualitative agreement with clinical observations reported in literature. This object-oriented modelling approach, based on the combined use of electrical analogies, proves to be avaluable tool as a test bench for different strategies aimed to qualitative prediction of the effects of cardiorespiratory interactions during exercise, thus avoiding the formulation of complex mathematical models.


Introduction
Cardiovascular and respiratory systems are the most important systems for maintaining life in the human body. There are multiple pathologies that affect these systems, such as hypertension, heart failure, myocardial infarction, arrhythmias, chronic obstructive pulmonary disease, asthma and atelectasis, among many others [1].
According to WHO statistics [2], cardiovascular diseases are the leading cause of death worldwide, and every year more people die from this type of disease than from any other cause in the world. In the case of respiratory diseases, it can be said that they are often not diagnosed even though hundreds of millions of people suffer the consequences of a respiratory illness every day [3].
Additionally, it is important to highlight the intimate relationship between cardiovascular and respiratory systems whereby the suffered pathologies in one of these systems are, in many cases, consequence or cause of factors that occur in the other [4] provoking limitations on the global performance.
Considerable advances in the comprehension of complex interrelations in physiological systems have been achieved by using mathematical modelling and computer simulation [5,6]. In this way, physiological and pathophysiological experiments can be conducted so the effects of therapeutic treatments can be predicted without experimenting on the patients themselves.
Several mathematical models of the cardiovascular and respiratory systems have been developed separately to study both the cardiovascular [7][8][9][10] and respiratory dynamics [11][12][13], and other relevant works can be found in literature. Nevertheless, the tight coordination between blood flow and ventilation makes it necessary to consider the combined cardiorespiratory dynamics together, and several works have been reported [14] under physiologically normal conditions [15,16], heart failure [17,18] and sleep disorders [19,20], all of which were based on a set of mathematical dynamic equations.
Very few models have tried to address the strong interaction between the cardiovascular and respiratory systems, considering their interrelated control mechanisms. Some of the models focused on the description of respiratory mechanics [19,21,22], while others concentrated more on the gas and transport processes [15,23,24], but all of them were based on developing a mathematical model solved by numerical simulation tools, such as MATLAB.
The object-oriented approach can offer many advantages in physiological system modelling and control since it enables physical modelling of dynamic systems by using connected physical components following a specific connection diagram [25]. In this way, systems, subsystems or component levels of a whole physiological system can be described in increasing detail using a hierarchical structure.
Object-oriented modelling languages, such as SIMSCAPE or MODELICA [26], have been shown to be able to represent -as lumped models -many physiologically complex systems like the cardiorespiratory system, by deriving an analogous electrical model given the correspondence between the haemodynamic variables, such as blood pressure and flow and their corresponding electrical elements. In particular, several models have been developed using electrical-hydraulic analogies for the cardiac system [8,[27][28][29] and electrical-pneumatic analogies for the respiratory system [12]. Recently, lumped models based on electrical analogy have been developed in which the interaction of the cardiovascular and respiratory system was reflected [21,22], with structural limitations as no control mechanisms were considered.
In this paper, an integrative physical model of the cardiovascular and respiratory systems, along with their intrinsic control mechanisms, is developed by employing combined analogous hydraulic-electric and diffusion-electric circuits, respectively. The objective is to obtain a simplified electrical analogous model developed using physical block modelling techniques in SIMSCAPE object-oriented simulation language. Steadystate simulation results under variable workload conditions and limiting conditions, such as heart failure and asthma, have been obtained showing high accordance with clinical observations in literature.

Methods
The cardiovascular system, in cooperation with the respiratory system, are the main transport systems responsible both supplying oxygen to and removing carbon dioxide from tissues. Therefore, a tight coordination between these systems is necessary to assure proper functioning of the gas exchange process.

Model of the respiratory system
The respiratory model is based on a lumped model comprising two homogeneous compartments, the lungs and body tissue, linked to the cardiovascular circuit through the exchange of blood gases, O 2 and CO 2 ( Figure 1) and no consideration of respiratory mechanics has been made.
A steady-state response analysis is going to be considered by assuming the alveolar space (lungs) ventilated by a continuous unidirectional stream of gas, without considering the cyclic nature of the respiratory function. System dynamics are going to be described by two mass balance equations, both for CO 2 and O 2 exchange [16,29].
As for the CO 2 dynamics, the mass balance equation for the alveolar compartment is given by where V A CO 2 denotes the effective CO 2 storage volume in the alveolar space, Q V A is the alveolar ventilation rate, P I CO 2 and P a CO 2 are the respective partial pressures of CO 2 in inspired air and in arterial blood equilibrated with that of the alveolar space, while C v CO 2 and C a CO 2 represent the concentrations of total CO 2 in venous and arterial blood, respectively, all measured under body temperature and pressure saturated (BPTS) conditions (see Appendix A) and F p is the pulmonary blood flow as CO 2 gas is transported through the cardiovascular circuit. Similarly, the mass balance equation for O 2 dynamics in the alveolar space is given by where V A O 2 denotes the effective O 2 storage volume in alveolar space, P I O 2 and P a O 2 are the respective partial pressures of O 2 in inspired air and in arterial blood equilibrated with that of the alveolar space, C v O 2 and C a O 2 represent the respective concentrations of total O 2 in venous and arterial blood measured under BPTS conditions. Regarding the tissue compartment, the CO 2 and O 2 mass balance equations, using a similar approach, can be stated considering the consumption and production rate of O 2 and CO 2 associated to the metabolic process respectively, such that where V T CO 2 and V T O 2 respectively denote the effective CO 2 and O 2 storage volume in the tissue space, MR O 2 andMR CO 2 represent the consumption and production rate of O 2 and CO 2 , respectively, also assuming equilibrated gas tensions between body tissues and venous blood. The tissue compartment is perfused by systemic blood flow, F p . The brain tissue deserves special consideration since the respiratory control operates on the basis of the CO 2 cerebral blood concentration, therefore a separate mass balance equation should be considered as where V B CO 2 is the CO 2 storage volume in brain tissue, MR BCO 2 is the CO 2 metabolic production in the brain and C B CO 2 is the concentration of total CO 2 in the brain tissue equilibrated with the CO 2 concentration in the venous cerebral blood, with the flowrate denoted by F B in linear dependence relation on the P a CO 2 [30] given by with F B 0 indicating the cerebral blood flow under normal conditions. The set of equations for the respiratory system is completed with the dissociation relations between the partial pressures of O 2 and CO 2 gases and their respective concentrations, both in the arterial and venous sides The total ventilation rate, Q V T , constituted by the sum of alveolar and of dead space ventilation is considered as and is intrinsically controlled by the arterial partial pressures of O 2 and CO 2 [11], so that in steady state which is composed of two additive control actions, with the first term corresponding to the combined O 2 and CO 2 dependent peripheral controller with G p gain and the secondterm standing for the CO 2 dependent central controller with G c gain.

Model of the cardiovascular system
The cardiovascular model is based on a lumped model consisting of the systemic and pulmonary vascular circuits, in series, with the left and right ventricles [16]. A six-compartment lumped model, constituting a closed loop circuit with fixed blood volume V T , is going to be considered, namely, the systemic artery, pulmonary artery, systemic vein and pulmonary vein (Figure 1), with arterial compartments including arteries and arterioles connected through the capillary network to venous compartments that include venules and veins, in addition to the left and right ventricles. A negligible amount of volume in pumps is also assumed.
A steady-state response analysis is going to be made, thus only mean values for pressure and blood flows will be considered assuming unidirectional non-pulsatile blood flow through the entire circulatory system.
On the one hand, the mass balance equations for the four vascular compartments are given by where P as ; P vs ; P ap , P vp and c as , c vs , c ap and c vp represent arterial systemic, venous systemic, arterial pulmonary and venous pulmonary pressures and compliances, respectively, Q l and Q r stand for left and right cardiac output, while F s and F p denote systemic and pulmonary blood flows, respectively. As the total blood volume remains fixed in this closed loop circuit, adding equations (14) to (17), we have which constitutes the volume balance equation as On the other hand, blood flow between the compartments is given by where R s and R p are the corresponding systemic and pulmonary resistances.
Regarding the cardiac compartments, the left and right cardiac outputs, in steadystate, are given by with H representing the heart rate, while V sl and V sr define the stroke blood volume of the left and right ventricles, respectively. The stroke volume, V s , depends on the arterial load pressure, P a , the ventricular contractility, S, and end-diastolic volume, V d , as stated in the intrinsic regulation Starling's law for each ventricle in which f S; P a ð Þ, as defined in [31], is given by ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffiffi 0:5 P a À S ð Þ 2 þ 0:01 q Assuming that ventricular filling process is modelled as a first-order dynamic process, with time constant R v c with R v being the viscoelastic resistance and c the ventricular compliance, at the end of the diastolic period, t d , during the emptying process , with k s defining the systolic duration parameter. Therefore, the dependence of the stroke volume, V s , will be given by Therefore, by substituting equation (27) into (22) and (23), this would yield the expressions for the cardiac flowrates of the left and right ventricles, respectively, as Rvr cr (29) with S l and S r representing the left and right ventricular contractility, respectively, c l and c r representing the respective ventricular compliances and R vl and R vr denoting the left and right ventricular resistance, respectively, during the filling process. The contractility in both the left and right ventricles (S l and S r , respectively) are increased if the heart rate, H, increases as determined by the Bowdicht effect, where the dynamics are given by where δ; β and γ coefficients should be obtained by parameter identification as is described previously by Kappel and Peer [7]. The respiratory and cardiovascular dynamics are linked to each other through the systemic and pulmonary blood flows, F s t ð Þ and F p t ð Þ, and through the intrinsic local metabolic autoregulation, such that which represents a powerful intrinsic control mechanism for varying vascular resistance. The integrated cardiorespiratory model is shown in Figure 1.
It is important to highlight that no autonomic control mechanisms, such as sympathetic and parasympathetic functions, are going to be considered for the respiratory model or the cardiovascular model to conserve the simplicity of the mathematical model developed. Thus, the heart rate and ventilation rate will be kept as constants.
In the case of exercise conditions, with variable workloads, the metabolic rate MR O 2 is adapted to account for the initial anaerobic energy supply and that for the aerobic energy supply, which is proportional to the workload, so that where MR r O 2 stands for the anaerobic energy supplied at rest and W t ð Þ is the variable workload, while ρ is a parameter dependent on the physical conditions. The MR CO 2 t ð Þ metabolic rate is tightly related to MR O 2 t ð Þ through the relation with R Q being the respiratory quotient. The intrinsic local metabolic autoregulation is also dependent on the variable workload, since increased metabolic activity implies an increase of oxygen supply and removal of carbon dioxide. Therefore, a local vasodilatation effect is produced by varying the pulmonary resistance during exercise such that the pulmonary resistance, R p t ð Þ, decreases to a given exercise value, while increasing the workload provokes an additional effect so that where R e p is the pulmonary resistance exercise value and K rp is a constant gain. Instead, a vasoconstrictor effect is produced on the systemic resistance during aerobic exercise by increasing the value of A p t ð Þin equation (32) together with an additive workload effect, thus giving where K rs is a constant gain.
Moreover, the increase in heart rate, H t ð Þ, during exercise is proportional to the increase in the oxygen demand as described in [31] so that with a and b being obtained by parameter identification.

Modelling approach by analogy in SIMSCAPE
In order to derive a computer model in SIMSCAPE of the cardiopulmonary system we have employed the tetrahedron of state's methodology [32] so that an electrical analogy is settled. For this purpose, the use of generalized variables, flow (f) and effort (e), associated to each physical element is considered, with their product being the power variable (P), the integral of flow being the displacement variable (q), the integral of effort being the momentum variable (p), and the integral of power being the energy variable (E). The entire set of generalized variables, represented as vertexes of a tetrahedron, are displayed in Figure 2. Similarly, the linkages between the generalized variables give rise to the concepts of resistance (R), capacitance (C) and inertia (L), characterizing the components of the system models. The application to the electrical and hydraulic systems is straightforward by adequately selecting adequately the corresponding generalized variables. Analogous systems are characterized by exhibiting mathematical identical behaviour to that of another, being physically different in nature. This definition can also be applied to either analogous elements, variables or parameters. The analogy-based modelling enables the behaviour of a hard-to-study system (mechanical, hydraulic, etc.) in terms of an easy-to-study analogous system (electrical) to be analysed. The tetrahedron of state enables settling the electrohydraulic analogy by vertex to vertex correspondence on one hand and edge-to-edge on the other hand ( Figure 2). SIMSCAPE is a simulation environment for modelling dynamic systems using a physical approach, based on connecting components -each with their constitutive dynamic equation -following a specific connection diagram [25]. In SIMSCAPE, blocks interact with one another by exchanging energy through their connectors (physical ports). Only connectors belonging to the same class can be connected, such that energy flows in both directions between connected blocks.
This physical network approach is based on the aforementioned effort and flow variables, which are measured with sensors connected in parallel and in series, respectively. Conservation laws determine whether the summation of effort variables in a closed loop is null, while summation of flow variables flowing into a common point is also null (Figure 3).
The SIMSCAPE software exhibits the object-oriented features, which enable hierarchical modelling from low-level sub-models to top-level model by aggregation of physical blocks belonging to the libraries (Electrical, Hydraulic, Mechanical, Thermal, etc.), included in the SIMSCAPE browser. Alternatively, the elements corresponding to the 'Physical Signals' library have also been used for the representation of equations that are difficult to be implemented by analogy.

SIMSCAPE model of the cardiovascular system
In this section, the hydraulic-electrical analogy applied to the object-oriented modelling of the cardiovascular system is described in detail.   On one hand, arterial and venous systemic compartments of equations (14) and (15) are represented by RC analogous circuits in series with the right ventricle considered as a current source, while corresponding pulmonary compartments of equations (16) and (17) in series with the left ventricle, are modelled in a similar fashion. As a result of the exchange of flows in each compartment characterized with a capacitance, a pressure signal corresponding to the voltage signal in each electrical analogous circuit is generated. Figure 4 shows the four cardiovascular compartments all integrated into SIMSCAPE while the analogous electrical circuit used to represent equation (14) is shown in Figure 5, which is similar to the ones corresponding to equations (15)- (17).
For the left and right ventricles, the 'Physical Signal' library is used to represent the ventricular flows, Q l t ð Þ and Q r t ð Þ, as current sources since there are no specific blocks include into the electrical system library of SIMSCAPE to define them from equations (28) and (29). Likewise, it is necessary to generate the ventricular contractility values, S l t ð Þ and S r t ð Þ; starting from equations (30) and (31), through the analogous equivalent based on controlled sources of current as shown in Figure 6.
On the other hand, implementation of the intrinsic local control system has been carried out based on equations (32) to (37), where its dependence with workload is expressed, which directly affects the pulmonary and systemic resistances, metabolic production of oxygen and carbon dioxide and heart rate. To the develop this block in SIMSCAPE, blocks belonging to the SIMSCAPE 'Physical Signal' library have been connected by adding the necessary modules to ensure its complete functionality (Figure 7).

SIMSCAPE model of the respiratory system
Firstly, the diffusion-electrical analogy used for the development of object-oriented modelling of the respiratory system is described in this section.
As explained in the preceding section of respiratory system modelling, a simplified model based on pulmonary and tissue compartments, which also relies on the dissociation relationships, is going to be implemented. For this pneumatic system, similar analogies to the one defined in Figure 2 have been used in each of these two compartments, which are going to be detailed separately below.  The pulmonary compartment has been modelled in SIMSCAPE comprising equations (1) and (2), which in turn is constituted by two blocks corresponding to CO 2 and O 2 mass balances.
By rearranging equations (1) and (2) into it can be easily interpreted than partial pressure gas changes are generated by airflow interchanges in a specific capacitance,V A (effective storage of gas in the lung), where these airflows are produced by both blood gas diffusion in the lungs and by ventilation. As a result, a partial pressure signal corresponding to the voltage signal in each electrical analogous circuit is generated, while up to four current controlled sources are utilized to define the airflows for the CO 2 mass balance. In Figure 8 is detailed the complete analogous circuit used to represent equation (38) in SIMSCAPE, which is similar the one corresponding to O 2 to represent equation (39), together with the pulmonary compartment including both the CO 2 and O 2 mass balance.
A similar approach has been followed to derive the tissue compartment model in SIMSCAPE, this time including equations (3) and (4), which in turn is also comprised of two blocks corresponding to CO 2 and O 2 mass balances. To obtain a diffusionelectrical analogue, by rearranging equations (3) and (4) as it is clear that changes in dissolved gas concentrations are generated by gas interchanges in a specific capacitance,V T (effective storage of gas in tissues), and these flows are produced by both blood gas diffusion in the tissues and metabolic processes. In Figure 9, the complete analogous circuit used to represent equation (40) in SIMSCAPE is detailed, similar the one corresponding to O 2 to represent equation (39), together with the tissue compartment including both the CO 2 and O 2 mass balance. Likewise, it is necessary to implement the dissociation relations between the partial pressure of O 2 and CO 2 gases and their respective concentrations both in the arterial and venous sides, defined by equations (7)- (11). Figure 10 displays the SIMSCAPE block designed to model the dissociation curves, as part of the general SIMSCAPE block integrating the pulmonary and tissue compartment together.
Finally, implementation of the intrinsic local respiratory control system has been carried out based on equations (12) and (13), where the dependence of the total ventilation rate on the peripheral and the central controllers is defined, part of which contributes to the effective alveolar ventilation. In Figure 11, the SIMSCAPE block for the respiratory controller is depicted.

SIMSCAPE model of the whole system
This section shows the final integrated model of the global cardiorespiratory system that includes both the respiratory and cardiovascular systems and their respective control mechanisms, which are affected by the workload corresponding to variable physical exercise conditions (Figure 12).

Results
To test the performance of the cardiorespiratory controlled system, several experiences have been proposed, both under resting and working physiological conditions and under limiting cardiac and respiratory conditions. We have assumed a unidirectional nonpulsatile blood flow through the heart. Hence, blood flow and blood pressure have to be interpreted as mean values over the length of a pulse. In the same way, cyclic nature of the ventilation function has not been either considered.
The initial values for each compartment of the cardiorespiratory model at the beginning of the simulation, and the parameters referring to normal respiratory and circulatory conditions, are presented in Table 1, together with the parameters corresponding to control mechanisms. Both sets of parameters were previously estimated by Timischl [16]  and Batzel et al [33] from clinical data after a validation process and understood as average values under resting conditions. The simulation results show the steady-state for the specific selected physiologic variables.

Results under physiological conditions
Steady-state values of the cardiorespiratory SIMSCAPE model at rest been starting from initial conditions have been obtained and they are shown in Table 2, so as to check the accuracy of steady values of the mean-value of main physiologic variables of the model as compared to those reported in table 9.2 by Timischl [16].
Both the qualitative and the quantitative behaviour obtained with the SIMSCAPE cardiorespiratory model, under resting conditions, are in line with the physiological  values previously reported by Timischl [16] under null physical exercise conditions (W ¼ 0 watts). In order to demonstrate the behaviour of the cardiopulmonary model in response to moderate physical exercise, several values of W have been selected in a range from 0 to 75 watts. To validate the results obtained, in Figure 13 are displayed the predicted arterial and venous pressure steady-state curves for systemic and pulmonary compartments together with the systemic resistance steady-state values for variable workload conditions starting from initial conditions, all of them compared with the steady-state values reported in [16].
It can be seen how an increasing in systemic arterial pressure P as accompanied by a decreasing in systemic venous pressure P vs as workload increases, thus causing a further increasing in the cardiac output. Besides, during the exercise, metabolic vasodilation predominates over the vasoconstrictor influence of the nervous vegetative system, so that a net decrease of total systemic resistance R s occurs due to a decreasing of venous oxygen concentration as stated in equation (36).  An opposite effect is produced in pulmonary arterial pressure P ap and venous pressure P vs respectively which in turn decreases the pulmonary blood flow. However, pulmonary resistance decreases with increasing workload as stated in equation (35), which makes possible an increase in pulmonary blood flow and hence in the cardiac output. Steady-state values of the cardiorespiratory SIMSCAPE model under variable workload condition show great agreement with the physiological values previously reported also by Timischl [16].
Additionally, in Figure 14 and Figure 15 they are shown the mean-value dynamics of the main cardiopulmonary variables as systemic arterial and venous pressures, cardiac output, heart rate and systemic resistance together with carbon dioxide and oxygen  Table 9.2 in [16] under physical exercise conditions.      tensions and alveolar ventilation curves in response to moderate physical exercise of W ¼ 75 watts starting from initial conditions. On one hand, mean systemic arterial pressure is increased in correspondence with a mean systemic venous pressure decreasing, thus augmenting the cardiac output to facilitate blood perfusion during exercise, due also to a decreasing relevant systemic resistance, all in line with what was stated in Figure 13a. On the other hand, during exercise venous carbon dioxide concentration and venous oxygen concentration are maintained along with an increasing alveolar ventilation [34].

Results under limiting conditions
In this section, the behaviour of a patient under limiting conditions was simulated by altering some of the parameters of the cardiorespiratory system is illustrated, to show the predictive ability of the SIMSCAPE physical model in the face of different and frequent clinical situations, such as mild heart failure and asthma during exercise conditions.
In case of chronic heart failure experience, it is assumed that there is a progressive worsening in heart function over time. Considering a left heart failure scenario, contractility is reduced due to myocardial damage causing a reduction in contractility, so that both stroke volume and cardiac output decrease progressively. In Figure 16 it is shown the mean-value cardiac output evolution when an 80% reduction in left and right contractility is applied under workload conditions. As a main consequence, the mean-value arterial systemic pressure falls due to the damaged pumping efficiency of the heart and as venous return is reduced then the venous systemic pressure rises [35] as it can be seen in Figure 17 under the same exercise physical exercise conditions.
Regarding the simulation for asthma conditions, the alveolar ventilation is going to be limited due to the increased airflow resistance through the aerial tree to a value lower than the corresponding maximum value of a system under exercise conditions, in this case an 85% of maximum value as represented in Figure 15.c. In Figure 18 they are shown the limited alveolar ventilation together partial pressures of mean-value arterial CO 2 and O 2 in case of an asthmatic episode under moderate exercise conditions, showing a moderate increasing of P a CO 2 and a consequent decreasing of P a O 2 as it happens under these conditions [36].
As a result, an increase and decrease in mean-value of arterial partial pressures of CO 2 (hypercapnia) and O 2 (hypoxia) can be observed respectively, which cause suffocation of the patient under asthmatic conditions during physical exercise, this due to alveolar ventilation limitation as compared to normal values under no limitation as was depicted in Figure 15(c).

Discussion
An integrative simplified physical model of the cardiovascular and respiratory systems has been presented, along with their intrinsic control mechanisms, using a combined analogous hydraulic-electric and diffusion-electric circuits, respectively. The cardiorespiratory model was based on previous mathematical models [7,16], following the same approach previously used by Fernandez de Canete et al [28] incorporating the respiratory    module and including the intrinsic local control mechanisms, such as metabolic autoregulation, cerebral blood flow, the Frank-Starling mechanism, the Bowditch effect and the role of oxygen and carbon dioxide in respiratory control.
The model developed is adapted to a dynamic exercise situation. The increase in metabolic rate during exercise increases oxygen consumption and carbon dioxide production, which in turn influences both the heart rate and the systemic and pulmonary resistances. In fact, metabolic autoregulation of the blood vessels is considered by assuming the systemic vessel resistance depends on the oxygen concentration in venous blood, while dilatation of the pulmonary blood vessels during exercise also takes place.
As for model limitations, some factors have not been considered in the cardiorespiratory model presented in this paper. First, the six-compartment configuration used to describe the cardiovascular dynamics is rather simple, and more compartments could have been considered to build a more realistic model. We have also assumed a unidirectional non-pulsatile blood flow through the heart and this assumption is justified by the long period used to show the evolution of each variable (15 min) compared to the heart period (70 cycles/min), even though it supposes a strong simplification from the transient behaviour point of view. As for the pressure/volume relation, the volume of the vessel depends on the transmural pressure which is equal to the mean blood pressure, both linearly related through the compliance. Under no sympathetic influence upon the unstressed vessel volume we have assumed that this volume is zero, so the blood volume contained in the vessel is always equal to the vessel volume.
As for the respiratory dynamics, a unidirectional stream of gas has been considered, without considering the cyclic nature of respiratory function. Third, concerning the control mechanisms considered in the paper, they have not been accounted for the short-term mechanism exerted by the baroreceptors or the longterm renal mechanism and the orthostasis influence has not been either considered throughout the paper.
In the same way, the model does not include all the possible limiting pathologies, even though it can be extended for specific disease conditions, such as left or right heart failure induced by reducing the ventricular contractility or asthma conditions. Hence, we have restricted the scope of the model to physiological experiences comprising variable exercise workload under normal conditions, asthma and mild heart failure conditions, situations where the autonomic control does not exert an important action compared to the local compensatory control. In fact, an important mechanism during exercise is the sympatholysis which determines the mutual interaction of barorreflex and metabolic systems in the control of peripheral circulation. The metabolic control counteracts sympathetic vasoconstriction in exercising regions, as some local factors and substances reduce the sensitivity of vascular smooth muscle to sympathetic tone [37].
The physical modelling approach used here captures the stationary essence of real behaviour, while not requiring a large set of difficult to understand mathematical equations to be obtained by the application of conservation laws as reported in [15,38]. Thus, the structure of this model is more comprehensible in SIMSCAPE object-oriented language throughout the use of interconnected analogue cardiovascular and respiratory circuits, as compared to other block-oriented-based models as SIMULINK [23,39]. While SIMULINK or MATLAB reflect a calculation procedure to describe the structure of the system in order to solve the derivatives of the state variable mathematical equations of the model, SIMSCAPE enables this structure to be organized as components with well-defined connections, so that the system dynamics are embedded in the connection diagram [40]. Besides, alternate electrical analogous models have been derived and combined focused either on the cardiovascular system [23,27] or on the cardiorespiratory system but considering not the gas diffusion point of view but instead the mechanical ventilation one [10,21].
It is important to highlight that the physical model developed by electrical analogy presents many possibilities to simulate cardiorespiratory interactions and simulation stationary results obtained demonstrate the accuracy of the physical model used. In fact, simulation results have been validated with data previously published in literature as reported in Timischl [16] both at rest (Table 2) and also under variable physical exercise conditions (Figure 13), as was referred to formerly. In validation of the model, an approximate correspondence between simulated and clinical results was achieved without attempting an automatic best fitting procedure, this correspondence being representative of a general tendency rather than of a single individual behaviour.

Summary
An object-oriented physical model of the cardiorespiratory system has been developed. Simulation experiments have been conducted under both physiological and limiting conditions, whose results can be quantitative and qualitative compared with clinical data reported in the literature. The results presented show that the model developed in this paper, despite its simplicity, gives a rather satisfactory description of the cardiorespiratory response to the workload activity test and show good approximation to the corresponding validation data, at the same time that physiologic variables are in a physiologically realistic range.
Physical modelling based on building analogies between electrical and hydraulic circuits, used to describe the cardiovascular system linked to combined analogies between electrical and diffusive circuits to define the respiratory system, represents a powerful and easy-to-use methodology to explain the behaviour of a physiologic system under study, thus avoiding the formulation of complex mathematical models.
It should be pointed out that the depiction of the model in this acausal simulation environment as SIMSCAPE resembles the physical reality of the modelled world more closely than the classical interconnected block schemes in SIMULINK or the declarative code in MATLAB. Therefore, SIMSCAPE describes the system behaviour in a much more intuitive way than SIMULINK or MATLAB do. Moreover, the physical model developed here can be used as a simulation tool for educational and training purposes, thus enabling a commercial software as SIMSCAPE to solve a system of physiological dynamic equations.
As future work, the inspiratory and expiratory dynamics of the respiratory cycle should be implemented, as well as subjecting the patient to pharmacological tests through consequent variations in the physiological parameters of the cardiorespiratory model. In the same way, short-term autonomic control mechanisms as baroreceptor and chemoreceptor should be incorporated to extend the range of possible pathophysiologic applications of the simplified model here developed.

Acknowledgments
There are no sponsoring institution or funding body to be acknowledged for the production of this paper.

Disclosure statement
No potential conflict of interest was reported by the authors. Compliance of the venous part of the pulmonary circuit (l·mmHg −1 ) C aCO 2 Concentration of bound and dissolved CO 2 in arterial blood (l STPD ·l −1 ) C aCO 2 Concentration of bound and dissolved O 2 in arterial blood (l STPD ·l −1 ) C BCO 2 Concentration of bound and dissolved CO 2 in brain tissue (l STPD ·l −1 ) C vCO 2 Concentration of bound and dissolved CO 2 in venous blood (l STPD ·l −1 ) C vO 2 Concentration of bound and dissolved O 2 in venous blood (l STPD ·l −1 ) F B Cerebral blood flow (l·min −1 ) F B0 Cerebral blood flow for P aCO 2 ¼ 40 (l·min −1 ) F p Blood flow for the lung compartment (l·min −1 ) F s Blood flow for the tissue compartment (l·min −1 ) H Heart rate (min −1 ) G c Central controller gain factor (l·min −1 ·mmHg −1 ) G p Peripheral controller gain factor (l·min −1 ·mmHg −1 ) γ l Coefficient of _ S l in Bowditch effect (min −1 ) γ r Coefficient of _ S r in Bowditch effect (min −1 ) I c Constant for central drive ventilation (mmHg) I p Constant for peripheral drive ventilation (mmHg) K 1 Constant for the O 2 dissociation curve (l STPD ·l −1 ) K 2 Constant for the O 2 dissociation curve (mmHg −1 ) K CO2

O2
Metabolic O 2 consumption rate (l STPD ·min −1 ) P BCO2 Partial pressure of CO 2 in brain tissue (mmHg) P ICO2 Partial pressure of CO 2 in inspired air (mmHg) P IO2 Partial pressure of O 2 in inspired air (mmHg) P aCO 2 Partial pressure of CO 2 in arterial blood (mmHg) P aO 2 Partial pressure of O 2 in arterial blood (mmHg) P vCO 2 Partial pressure of CO 2 in mixed venous blood (mmHg) P vO 2 Partial pressure of O 2 in mixed venous blood (mmHg) P as Mean blood pressure in the arterial systemic circuit (mmHg) P ap Mean blood pressure in the arterial pulmonary circuit (mmHg) P vs Mean  Effective lung storage volume for CO 2 (l BPTS ) V BCO 2 Effective brain tissue storage volume for CO 2 (l) V AO 2 Effective lung storage volume for O 2 (l BPTS ) V TCO 2 Effective tissue storage volume for CO 2 (l) V TO 2 Effective tissue storage volume for O 2 (l) V dl End-diastolic volume of the left ventricle (l) V dr End-diastolic volume of the right ventricle (l) V sl Stroke blood volume of left ventricle (l) V sr Stroke blood volume of right ventricle (l) V T Total blood volume (l)

Appendix A. Measuring conditions
Gas volumes may be measured under different conditions of temperature, pressure, and degrees of saturation with water vapour. Volumes V ACO 2 , V AO 2 and Q VA are usually measured under (BTPS) body temperature and pressure, saturated conditions (T body ¼ 37 ¼ 310 � K, P body ¼ P ambient ; P H2O ¼ 47mmHgÞ whereas the concentrations C aCO 2 , C vCO 2 , C aO 2 and C vO 2 are usually measured under (STPD) standard temperature and pressure, dry conditions (T std ¼ 0 ¼ 273 � K, P std ¼ 760mmHg; P H 2 O ¼ 0mmHgÞ. Conversion between the various conditions can be made using the ideal gas law. For this reason, it is introduced the relation V BPTS V SPTD ¼ 863 P ambient À 47 (A1:1) to convert the concentrations from STPD to BTPS conditions.