Closed StefanPofahl closed 1 year ago
In your code example, you used the mean of the absolute differences between the impedance measurements and the impedance values simulated from the circuit. There are many ways (objective functions) reported in the literature to evaluate and optimise the quality of the fit. I have compiled a table of them and conducted an evaluation of which one generally works best.
It turns out that an objective function based on modulus weighting (F6 in the table) typically works well when tested over a range of circuits. An appropriate weighting should be included in the objective function, as otherwise, the terms with the largest magnitude would dominate, causing information to be lost at frequencies where the impedance magnitudes are small. F6 is also the objective function used during parameter optimisation in the package.
The circuitfitness()
function uses an objective function and an optimisation algorithm to optimise the circuit parameters. The value of the objective function with the optimised parameters measures how well a given circuit fits the impedance measurements.
Hi Maxime,
good overview! Could you help me with the notation used above? What are \Theta, index i and index m? Does Eq. 7 already include the weighing option?
Stefan
Hi Stefan
Sure, in the displayed objective functions $\Theta$ is the parameterset, $Z{t,n}(\Theta)$ represents the parameter-dependent model estimation of the impedance, while $Z{m,n}$ represents the measured value of the $n$ th measurement (the index $m$ stands for measured). Single primes are the real parts of the complex impedance, whereas double primes are the complex parts. F7 does another kind of weighing and F12 is an example where no weighing is used. Finally, $\delta$ represents the euclidean distance between two impedance spectra. There seems to be a typo in F13, this should have been $$F13(\Theta) = \sum_{n=1}^{N} \delta(f_n)(\Theta)|fn - f{n-1}|,$$ where $f_{0}=0$, so there is no index $i$.
Thanks :-)
I spent some time to figure out, how to compute a quality criteria by means of your functions, and I have the impression I do not understand the meaning of the function:
circuitfitness()
. Below my sample code, which includes my own approach to calculate a quality criteria. Does my code make sense? What would be the correct way, if one would like to use your functions?