fitting functions which contain 'i': more details

Matthias Brennwald matthias at brennwald.org
Mon Feb 9 01:09:08 CST 2009


On Feb 6, 2009, at 7:03 PM, help-octave-request at octave.org wrote:

> Message: 4
> Date: Fri, 6 Feb 2009 17:20:27 +0100
> From: "Harbinson, Jeremy" <Jeremy.Harbinson at wur.nl>
> Subject: Re: fitting functions which contain 'i': more details
> To: <help-octave at octave.org>
> Message-ID:
> 	<14EFCC12CC0CA642940526E074A2251D012DC301 at scomp0039.wurnet.nl>
> Content-Type: text/plain;	charset="iso-8859-1"
>
>
> Hi,
> The function I need to fit is one that describes the frequency  
> dependence of the electrical impedance (Z) of biological tissue in  
> terms of four parameters:
> capacitance,
> two limiting resistances, and
> alpha, which basically compensates for the fact that biological  
> materials do not behave as ideal Resistor-Capacitor systems.
>
> It is difficult to clearly write the function here as it has lots of  
> subscripts etc, but here is the function in Latex:
>
> Z\left(freq\right)=R_{\infty}+\frac{R_{0}-R_{\infty}}{1+i\omega C 
> \left(R_{0}-R_{\infty}\right)^{\alpha}}
>
> C is capacitance, and R0 and Rinfinity are the limiting resistances.
>
> If C is non-zero the function returns an complex number that  
> contains the real and imaginary  parts of the impedance. If the real  
> and imaginary parts of the impedance are plotted against each other  
> (real on x, imaginary on y) the result is a so-called Cole-Cole  
> plot. I think it is also sometimes called a Nyquist diagram.
>
> The data I collect is the complex impedance (Z) as a function of  
> frequency (omega). I would like to estimate the parameters R0,  
> Rinfinity, C and alpha from this data by the fitting the above  
> function to it. So I need some fitting tool that is happy working  
> with complex numbers. I have a recollection that this is/was  
> possible with a function in the basic Matlab package, but I do not  
> know which.
>
> An alternative approach to fitting the function above is to fit the  
> Cole-Cole plot (the real and imaginary components plotted against  
> each other) with a circle, as the locus of the points on a Cole-Cole  
> plot is a chord or semicircle whose centre is shifted away from the  
> origin of the graph. Problems with this approach are that the least- 
> squares fitting routine does not (so far as I know) fit parametric  
> equations (maybe fsolve does?) and real data often deviates from the  
> chord/semicircle of the ideal Cole-Cole plot (typical biology - we  
> are not ideal). These distorted responses are relatively easy to  
> deal with by tweaking the basic function shown above, but not so  
> easy to work with via the graphical approach of the Cole-Cole plot.
> Hope this clarifies things a bit,
> all the best,
> Jeremy

Dear Jeremy

I'd try the following approach: write a function that gives the  
deviation between your data and your function for a given set of C, R0  
and Rinfinity. By 'deviation' I mean, for instance, the sum of the  
squares of the differences between the data and the corresponding  
function values, taking into account both the real and imaginary  
parts. Then, use an optimizer function (e.g. fmins or fminsearch from  
the optimization package in Octave-Forge, see http://octave.sourceforge.net/doc/optimization.html) 
  to find the best-fit values of C, R0 and Rinfinity.

Does this make sense?

Matthias



More information about the Help-octave mailing list