MaximeVH / EquivalentCircuits.jl

A julia package to either fit the parameters of a specified equivalent electrical circuit to electrochemical impedance data, or to suggest a plausible circuit configuration for a given set of measurements (either through a comparison of circuits from the literature, or through an evolutionary algorithm approach).
MIT License
24 stars 6 forks source link

Inconsistent boundary setting within the evolution process and out of the evolution process #35

Open RunzeZhang123 opened 5 months ago

RunzeZhang123 commented 5 months ago

Hey Maxime,

We noticed that the default boundary for C used within the evolutionary process might be different from the boundary used when returning the output circuit.

Within the evolutionary process, the boundary for C is
parameter_bounds = Dict('R'=>[0,1.0e9],'C'=>[0,10],'L'=>[0,5],'P'=>[[0,0],[1.0e9,1]],'W'=>[0,1.0e9],'+'=>[0,0],'-'=>[0,0]) When outputting the final results, the boundary for C is

EquivalentCircuit(best_circuit,parameteroptimisation(best_circuit,measurements,frequencies))
...
get_parameter_upper_bound 
...
Dict('R'=>1.0e9,'C'=>0.01,'L'=>5,'P'=>[1.0e9,1],'W'=>1.0e9,'+'=>0,'-'=>0) 
...

:)

MaximeVH commented 5 months ago

That's a good point. Also, in the present code, the circuit_evolution function calls parameteroptimisation in the end (as you mentioned in your other issue), but does not allow a custom parameter bounds input. I'll have to make some adjustments by making the default values the same and either not calling parameteroptimisation in the circuit_evolution function or adjusting it so that it also uses custom parameter bounds.