EIDORS: Electrical Impedance Tomography and Diffuse Optical Tomography Reconstruction Software

EIDORS (mirror)
− Image Reconst
− Data Structures
− Applications
− FEM Modelling
− Old tutorials
Contrib Data
Browse Docs
Browse SVN

Mailing list


Hosted by
SourceForge.net Logo


EIDORS fwd_models

Solving the forward problem for EIT in 3D with higher order finite elements

The implementation of the high order finite elements for CEM are described in detail at
  • M G Crabb. EIT Reconstruction Algorithms for Respiratory Intensive Care. PhD Thesis, University of Manchester, 2014.
Create a common model with EIDORS and solve using default solver. Swap the default forward solvers to the high order solvers, and the element type ('tet4' is linear and 'tet10' is quadratic).
%Make an inverse model and extract forward model
imdl = mk_common_model('n3r2',[16,2]);
fmdl = imdl.fwd_model;

%Default EIDORS solver
%Make image of unit conductivity
img0 = mk_image(fmdl,1);
img0.fwd_solve.get_all_meas = 1; %Internal voltage
v0e=v0.meas; v0all=v0.volt; 

%High-order EIDORS solver
%Change default eidors solvers
fmdl.solve = @fwd_solve_higher_order;
fmdl.system_mat = @system_mat_higher_order;

%Add element type and make image of unit conductivity
fmdl.approx_type    = 'tet4'; % linear
img1 = mk_image(fmdl,1);
img1.fwd_solve.get_all_meas = 1; %Internal voltage
v1 = fwd_solve(img1); 
v1e=v1.meas; v1all=v1.volt;

%Plot electrode voltages and difference
figure; plot([v0e,v1e,[v0e-v1e]*100]);
legend('0','1','(1-0) x 100',4); xlim([1,100]);

print_convert forward_solvers_3d_high_order01a.png

Figure: The plot reassuringly shows the two approximations (eidors default and the high order linear solver) both agree at machine precision on the electrodes.
%Get internal linear voltage distribution for first stimulation
v1all = v1.volt; 
img1n = rmfield(img1,'elem_data');
img1n.node_data = v1all(1:size(fmdl.nodes,1),1); %add first stim data

%Plot the distribution
figure; subplot(121); show_slices(img1n,[inf,inf,2.5]);

%Get internal voltage distribution for difference eidors/high order

%Plot the difference of two linear approximations
subplot(122); show_slices(img11n,[inf,inf,2.5]);

print_convert forward_solvers_3d_high_order02a.png

Figure: The left plot shows the voltage distribution for the first stimulation using the linear high order solver. The right plot shows the difference between the default eidors solver and the linear high order solver, which agree to machine precision.
We now solve the forward problem using a quadratic ('tet10') approximation and look at the electrode voltages and internal voltage distribution.
%Repeat with quadratic and cubic finite elements
%Quadratic FEM
fmdl.approx_type    = 'tet10'; %Quadratic
img2 = mk_image(fmdl,1);
img2.fwd_solve.get_all_meas = 1; %Internal voltage
v2 = fwd_solve(img2); 
v2e=v2.meas; v2all=v2.volt;

%Electrode voltages and difference for linear, quadratic and cubic
figure; plot([v1e,v2e,[v2e-v0e]*1]);
legend('1','2','(2-0) x 10',4)

print_convert forward_solvers_3d_high_order03a.png

Figure: The electrode voltages for linear and quadratic approximation. The linear approximation agrees with the high order approximations away from the drive electrodes, but gets worse as we move toward the drive electrodes.
%Difference between quadratic and linear approximation internal voltage

%Plot the difference 
figure; show_slices(img12n,[inf,inf,2.5]);

print_convert forward_solvers_3d_high_order04a.png

Figure: The plot illustrates the difference between linear and quadratic approximation on the internal voltage distribution.

Last Modified: $Date: 2017-02-28 13:12:08 -0500 (Tue, 28 Feb 2017) $ by $Author: aadler $