FlowBalloonModel Class Reference

Inherits BalloonModel.

Inheritance diagram for FlowBalloonModel:

Inheritance graph
[legend]
List of all members.

Detailed Description

Balloon model driven by blood flow.

Author:
Lawrence Murray <lawrence@indii.org>
Version:
Rev
285
Date:
Date
2007-07-20 17:25:40 +0100 (Fri, 20 Jul 2007)
This class implements the Balloon Model described by Buxton et al. (1998). This system models a venous compartment as a balloon, described by a volume and deoxyhemoglobin (dHb) content. These combine to produce the Blood Oxygenation Level Dependent (BOLD) signal.

The model is driven by blood flow into the venous compartment. This causes the compartment to expand like a balloon, increasing the pressure exerted by it and consequently the blood flow out of the compartment. Concurrently, oxygen extraction, and therefore the rate of dHb production, is more efficient at slower flow rates. These simple interactions simulate a biologically plausible BOLD signal.

Details

The state variables $q$, representing normalised dHb content, and $v$, representing normalised venous volume, are updated according to the system of differential equations given by Buxton et al. (1998):

\begin{eqnarray*} \frac{dq}{dt} &=& \frac{1}{\tau_0}\left[ f_{in}(t)\frac{E(t)}{E_0} - f_{out}(v)\frac{q}{v} \right] \\ \frac{dv}{dt} &=& \frac{1}{\tau_0}\left[ f_{in}(t) - f_{out}(v) \right] \end{eqnarray*}

Other symbols represent biophysical parameters and functions of the system, handled using indii::ml::ode::ParameterCollection and indii::ml::ode::FunctionCollection, with default values given in FlowBalloonModelDefaults.

Singularities are handled using limits. See FlowBalloonModelDefaults::DQDT.

Usage

The basic usage idiom is as follows. Firstly create an instance of FlowBalloonModel and set up the initial state:

 FlowBalloonModel bm;
 indii::ml::aux::vector y(bm.suggestInitialState());

The model may then be simulated by solving the differential system using indii::ml::ode::AdaptiveRungeKutta:

 indii::ml::ode::AdaptiveRungeKutta solver(&bm, y);
 double end = 60.0;
 double t = 0.0;

 while (t < end) {
   t = solver.step(end);
 }

In order for the model to do something interesting, however, you will want to at least override the default FlowBalloonModel::F_IN function with your own custom function that controls flow. The following function, for example, generates a flow of 2.0 for 1 s, followed by a constant flow of 1.0:

 double F_IN(double t, const double y[], void* o) {
   if (t < 1.0) {
     return 2.0;
   } else {
     return 1.0;
   }
 }

Note the signature of this function, described by indii::ml::ode::f_t. The model can be made to use this function by calling setFunction() before the first call to step():

 bm.setFunction(FlowBalloonModel::F_IN, F_IN);

Other biophysical parameters and functions may be customised using the setParameter() and setFunction() methods inherited from indii::ml::ode::ParameterCollection and indii::ml::ode::FunctionCollection.

Finally, you will want to actually retrieve the state of the model after each call to step() using getVariable() or getState(). For example, modifying the loop above:

 while (t < end) {
   t = solver.step(end);

   std::cout << t << ',';
   std::cout << solver.getVariable(FlowBalloonModel::Q) << ',';
   std::cout << solver.getVariable(FlowBalloonModel::V) << std::endl;
 }

or:

 while (t < end) {
   t = solver.step(end);
   y = solver.getState();

   std::cout << t << ',';
   std::cout << y(FlowBalloonModel::Q) << ',';
   std::cout << y(FlowBalloonModel::V) << std::endl;
 }

The values of biophysical functions, which are time dependent, may be retrieved using getFunction() if they are of interest also.

Definition at line 141 of file FlowBalloonModel.hpp.

Public Types

enum  StateVariable { Q, V }
 State variable indices. More...
enum  BiophysicalParameter { V_0, E_0, TAU_0, ALPHA }
 Parameter indices. More...
enum  BiophysicalFunction { F_IN, F_OUT, E }
 Function indices. More...

Public Member Functions

 FlowBalloonModel ()
 Create new model with the default biophysical parameters and functions defined in FlowBalloonModelDefaults.
virtual ~FlowBalloonModel ()
 Destructor.
virtual indii::ml::aux::vector suggestInitialState ()
 Provide a suggested initial state.
virtual void calculateDerivatives (double t, const double y[], double dydt[])
 
See also:
indii::ml::ode::DifferentialModel


Member Enumeration Documentation

enum StateVariable

State variable indices.

Enumerator:
Q  $q = \frac{Q(t)}{Q_0}$; normalised dHb content of venous compartment at the current time.
V  $v = \frac{V(t)}{V_0}$; normalised volume of the venous compartment at the current time.

Definition at line 146 of file FlowBalloonModel.hpp.

enum BiophysicalParameter

Parameter indices.

Enumerator:
V_0  $V_0$; volume of the venous compartment at rest.
E_0  $E_0$; oxygen extraction rate of the venous compartment at rest.
TAU_0  $\tau_0 = \frac{V_0}{F_0}$; mean transit time through the venous compartment at rest.
ALPHA  $\alpha$; Grubb's exponent.

Definition at line 163 of file FlowBalloonModel.hpp.

enum BiophysicalFunction

Function indices.

Enumerator:
F_IN  $f_{in}(t) = \frac{F_{in}(t)}{F_0}$; normalised flow into the venous compartment.
F_OUT  $f_{out}(t) = \frac{F_{out}(t)}{F_0}$; normalised flow out of the venous compartment.
E  $E(t)$; oxygen extraction rate of the venous compartment.

Definition at line 190 of file FlowBalloonModel.hpp.


Constructor & Destructor Documentation

FlowBalloonModel (  ) 

Create new model with the default biophysical parameters and functions defined in FlowBalloonModelDefaults.

Definition at line 15 of file FlowBalloonModel.cpp.

~FlowBalloonModel (  )  [virtual]

Destructor.

Definition at line 29 of file FlowBalloonModel.cpp.


Member Function Documentation

aux::vector suggestInitialState (  )  [virtual]

Provide a suggested initial state.

This can be passed to the constructor of the ordinary differential equation solver being used on the model, such as indii::ml::ode::AdaptiveRungeKutta.

Returns:
Suggested initial state for the system.

Implements BalloonModel.

Definition at line 66 of file FlowBalloonModel.cpp.

void calculateDerivatives ( double  t,
const double  y[],
double  dydt[] 
) [virtual]

See also:
indii::ml::ode::DifferentialModel

Definition at line 33 of file FlowBalloonModel.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Oct 9 22:02:11 2007 for fmrii fMRI Modelling Library by  doxygen 1.5.2