Figure 1 depicts the parameter inference model workflow. The model starts by initializing the unknown cardiovascular model parameters
θ such as the left ventricle (LV) elastance, pulmonary arterial resistance, and systemic venous impedance; it should be noted that only the model parameters that have a significant effect on the mean PAP will be optimized, as discussed in
Section 2.3. Once initialized, the important model parameters are used to simulate a single cardiac cycle using a fully differentiable 0D cardiovascular system model
H(
θ). Next, the model predictions
corresponding to the available non-invasive measurements
are extracted. The extracted model predictions along with the synthetic non-invasive measurements are then fed to a loss function
that calculates the sum-squared difference. If the loss function is above the prescribed convergence criterion
ε, the model then calculates the loss function gradients using forward-mode automatic differentiation and then adjusts the parameters using this information, and the process is then repeated. In the subsections below, more information relating to the 0D model, datasets, optimization parameters, and optimizers is provided.
2.1. Mechanistic Model of the Cardiovascular System
Central to the pulmonary inference computer model (shown in
Figure 1) is the 0D ODE model of the human cardiovascular system. In the present work, a multicompartment model including the four heart chambers—corresponding to the heart valves, pulmonary loop, and systemic loop—is developed. A layout of the cardiovascular network model is shown in
Figure 2. The model is based on the work of Korakianitis and Shi [
20].
To simulate the pressure and volume changes of the heart chambers, the mathematical model of Suga et al. [
21] was applied, as shown in Equation (1), where
is the LV pressure at time
,
is the unstressed LV pressure (set to a value of 1 for all heart chambers [
22]),
is the LV time-varying elastance function,
is the instantaneous LV volume, and
is the unstressed LV volume.
To simulate the changes in ventricle blood volume, the mass conservation equation for an incompressible fluid can be applied to the ventricle control volume, yielding a set of ODEs for each heart chamber. The change in ventricle blood volume for the LV is shown in Equation (2), where
and
are the mitral and aortic valve volume flow rates at timestep
, respectively.
The time-dependent elastance function for the LV is calculated using Equation (3), where
[
] is the LV systolic elastance and
is the diastolic ventricular elastance. A similar equation is used to predict the changes in right ventricle (RV) elastance.
The ventricular activation function used to simulate the heart muscle contraction and relaxation was taken from the work of Bozkurt [
23], and is shown in Equation (4):
In Equation (4), the end time of systole is set to
and the end time of ventricular relaxation is set to
[
23], where
is the heartbeat period, which in the present work was fixed to a value of
. The RV is also simulated using Equations (1)–(4), but with corresponding RV parameters (
Table 1).
To simulate the left and right atrium (LA and RA, respectively) pressure and blood volume changes, Equations (1) and (2) are used similarly to the ventricle calculations, but with corresponding atrium parameters, as seen in
Table 1. The time-dependent elastance of the left atrium is calculated as seen in Equation (5), where
and
are the minimal and maximal LA elastances, respectively. and
is the atrial contractility activation function:
The atrial contractility activation function, in turn, is calculated using Equation (6), where
is the time of atrial relaxation:
where
is the time at the onset of atrial contraction.
Table 1 presents the cardiovascular parameters used in the heart chamber models.
Typically, heart valves are modelled as simple diodes in 0D cardiovascular system models. For diode models, the valve-opening and -closure processes are assumed to be instantaneous; therefore, the inertia of the valve cusps (leaflets) is ignored. Ignoring the valve leaflet motion for diseased heart valves can lead to the prediction of higher right ventricle and pulmonary arterial pressures, as shown by [
22]. Therefore, to accurately capture the pressure drop and, thus, the fluid flow through the valve, the leaflet motion should be included in the system model. The valve model implemented in the present work stems from the paper by Korakianatis and Shi [
22], which includes the simulation of the valve leaflet motion by solving an angular momentum equation for each heart valve. The heart valve parameters used in the present work were tuned by the previously mentioned authors to replicate actual pressure and flow waveforms in an adult human.
To estimate the blood-flow rate through each of the four heart valves, pressure gradients across the heart valve and the valve opening area are used, as shown in Equation (7), where
. In Equation (7),
is the valvular flow coefficient, which is set to 400
for the atrioventricular valves and 350
for the semilunar valves.
In the previous equation, the pressure gradient across the valve
is calculated using Equation (8), where
is the valve’s upstream static pressure and
is the valve’s downstream pressure. For example, the aortic valve inlet pressure would be the LV pressure
and the exit pressure would be the aortic sinus pressure
, as shown in
Figure 2.
In Equation (7),
is the area opening ratio of the heart valve and is defined as the fraction of flow area at a given timestep divided by the area of the valve when fully open. For the present work, the valve’s opening fraction is calculated as a function of the valve’s opening angle
, as shown in Equation (9), where
is the maximum opening angle of the valve cusps:
To estimate the time-dependent valve-opening angle for each heart valve, the angular momentum equation is solved. To ensure that the selected ODE integrator can solve the dynamics of the valve cusp, the second-order angular momentum equation for the valve dynamics is expressed as two ODEs, as shown in Equation (10):
The valvular force coefficient
was set to a constant value of 5500 for all valves, as recommended by [
20]. In Equation (10),
is the valve cusp’s angular velocity.
The systemic and pulmonary vasculatures are modelled using the electrohydraulic analogue equations for fluid flow in a 0D network. Each loop is modelled using 5 components that consist of inductive, capacitive, and resistive components, as shown in
Figure 2. For the sake of brevity, only the systemic loop equations are provided; for more detail on the model equations, please see [
24]. The flow rate through the aortic sinus and associated sinus inlet pressure are calculated using the following ODEs:
where
is the blood flow inertia through the sinus,
is the volume flow rate of blood through the sinus,
is the inlet sinus static pressure,
is the arterial inlet pressure,
is the sinus flow resistance, and
is the sinus compliance. The arterial pressure and volume flow rate are simulated using Equations (13) and (14):
The inlet venous pressure is calculated using Equation (15), and the venous flow rate using Equation (16):
The vasculature parameters such as resistance and capacitance for the systemic and pulmonary loops can be found in
Table 2.
To solve the abovementioned ODEs of the cardiovascular system, the explicit Runge–Kutta solver with the Bogacki–Shampine 3/2 method was applied. The solver’s relative and absolute tolerances were set to 1 × 10
−4 and 1 × 10
−6, respectively, and the maximum allowable iterations per timestep were set to 1 × 10
6. To numerically integrate the ODEs, certain physical constraints must be enforced on the dynamic valve model. To incorporate the discontinuities that result from the valve motion limits (fully open or closed), the following conditions were included in the simulation procedure for each valve.
2.2. Data and Measurements
In the present work, synthetic data were generated using the 0D cardiovascular model and used as pseudo-clinical measurements. The benefit of this approach is that the true underlying parameters being optimized are known, and the obvious disadvantage is that one assumes that the model can capture the dynamics of an actual cardiovascular system. Nonetheless, other published authors have also followed this approach [
8].
In the present work, two datasets were used as synthetic measurements. The first dataset (D1) contained the transvalvular flow rates
and the systemic arterial pressure
for a single cardiac cycle. The second dataset (D2), in addition to the transvalvular flow rates and systemic arterial pressure, contains the heart chamber volume changes,
. The motivation for using two datasets was to investigate the effects of additional non-invasive data on the model parameters’ inference accuracy, as discussed in
Section 3.2.
For each dataset generation run, the ODE integrator solves for multitudes of timesteps dictated by the numerical integrator accuracy control, but to replicate the actual use of the model, only
samples are stored and used during the parameter optimization phase. Additionally, an arbitrary amount of noise is added to the pseudo-measurement results. The standard deviation used for the normally distributed noise generation of the chamber volumes, flow rates, and arterial pressure was set as follows:
Figure 3 shows the data generated for the four non-hypertensive cases analyzed in the present work, namely, the healthy case, aortic stenosis (AS) case, mitral regurgitation (MR) case, and combined AR and MR case. It should be noted that only the ventricular volume changes, valvular flow rates, and systemic arterial pressure are used as pseudo-measurements during pulmonary pressure inference, and the ventricular pressures and pulmonary pressures are merely shown for the sake of completeness.
To clinically measure the data shown in
Figure 3, different equipment can be utilized. For the present work, the following clinical measurements are proposed for further retrospective clinical studies: The brachial arterial pressure can be measured continuously using a CNAP monitor and volume clamp method, as discussed in [
25]. The transvalvular flow rates should be measured using Doppler echocardiography, and the heart chamber volumes should be measured using either 3D magnetic resonance imaging (MRI) or Doppler echocardiography.
To simulate the 0D cardiovascular model and solve for the model-dependent variables such as systemic arterial pressure (Equation (14)) and aortic sinus flow rate (Equation (11)) requires the initial conditions to be known. The initial conditions vector is shown in Equation (18):
In a clinical application of the proposed parameter inference model, these initial conditions should be extracted from the available non-invasive measurements. The initial transvalvular flow rates and heart chamber volumes can be directly taken as the initial entries in D1 and D2 for the respective data streams. Similarly, the initial cycle’s systemic arterial pressure can be extracted from D1 and D2, and in the present work it is assumed that the initial aortic sinus pressure is equal to the initial systemic arterial pressure. The initial systemic and pulmonary arterial flow rates are approximated using Equations (19) and (20), respectively, where
and
are the left and right ventricular stroke volumes, respectively, which can be non-invasively estimated using Doppler echography.
The remaining initial conditions—namely,
,
,
, and
—are difficult to accurately measure non-invasively; therefore, these parameters are optimized in conjunction with selected important model parameters (
Table 1 and
Table 2) that significantly affect mean pulmonary arterial pressure, as discussed in
Section 2.3. Since there is no substantial pressure drop between the pulmonary sinus and the pulmonary artery, the initial pulmonary arterial pressure and pulmonary sinus pressures were assumed to be equal, i.e.,
.
2.4. Parameter Optimization
To estimate
, which minimizes the difference between the 0D model’s predictions and the synthetic (pseudo)-measurements in the present work, the sum-squared error (SSE) loss function was minimized using selected optimizers. The SSE for the
jth measurement (e.g., LV volume, systemic arterial pressure, or mitral valve flow rate) was calculated using Equation (23):
where
is the
jth simulation output at timestep
, and
is the
jth synthetically measured value (e.g., arterial pressure or LV volume) at timestep
. Furthermore,
is the parameter vector containing all of the selected important parameters,
is the vector of model predictions for measurement
, and
is the vector of synthetic measurements for measurement
. The loss function minimized by the computer model is then simply the summation of the different measurement losses
, as shoen in Equation (24), where
is the number of measurement streams (5 and 9 for D1 and D2, respectively, as mentioned in
Section 2.2).
To speed up optimization convergence, the parameter and measurement datasets were normalized using min–max scaling. For the parameter vector, the upper and lower boundaries listed in
Table 1 and
Table 2 were used. The scaling transformation of the optimization parameters can be seen in Equation (25), where
is the scaled parameter vector,
is a vector of the lower boundary parameter values, and
is a vector of the upper boundary parameter values.
The measurements and model predictions were scaled using the maximum and minimum measured values, e.g., for parameter
,
and
. For example, Equation (26) shows the scaling of the systemic arterial pressure input waveform
for timestep
:
In the present work, three optimization strategies were employed. The first used the adaptive moment estimation (Adam) first-order optimizer. The Adam algorithm is shown in Equation (27):
The scaling
and momentum
matrices are initialized to 0 at the start of the Adam training algorithm,
is the iteration counter,
is the smoothing term,
is the momentum decay hyperparameter (and is set to 0.9), and
is the scaling hyperparameter and is set to 0.999 [
19]. In Equation (26),
represents the gradients of the cost function with respect to the optimization parameters. For the optimization runs, the learning rate parameter
is fixed to a value of 0.005.
The second strategy uses the conjugate gradient descent [
26] optimizer to minimize the loss function. The conjugate gradient optimizer update algorithm for the parameters is shown in Equation (28):
For the first iteration,
. In the present work, the learning rate parameter
was estimated per iteration using the line search proposed by Hager and Zhang [
27]. The scalar variable
was also calculated using the method proposed by Hager and Zhang.
The third strategy applies a combination of Adam and L-BFGS [
28] optimizers to minimize the loss function. For this strategy, the first 50 iterations of the optimization phase were completed using Adam, after which the model switched over to the L-BFGS. The interested reader can see [
26] for more information about the L-BFGS optimization algorithm.