I am having an experimental data and I want to do cole cole fitting using the equation
εr(ω) = ε' r(ω) - jε'' r(ω) = εro + Δεr/1 + (jωτ)^1-α +σs/jωε0
I am trying to do this with curve fitting toolbox, but not able to do it.
Then I want to find coefficientf from the equation.
I have attached csv file and code i was using this:
fid = fopen('Ist.csv');
out = textscan(fid,'%f %f %f', 'Headerlines', 1, 'delimiter',',');
fclose(fid);
%date = datevec(out{1});
col1 = out{1}
col2 = out{2}
Matlab form of equation:
output = e + d./((1-(j.*omega.*t).^(1-a)))+s./(j.*omega.*es);

16 件のコメント

John D'Errico
John D'Errico 2021 年 9 月 2 日
編集済み: John D'Errico 2021 年 9 月 2 日
It looks like as I was writing this comment, you did attach two csv files, but the rest of my comment still applies.
Can we assume that e and d are unknowns? omega? a? s? How about j? Is es one unknown, or a product of two unknowns? After all, s and e both appear to be possibly uknowns. So what is es?
Is t the independent variable, represented by what? out(1)? Or something else?
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
編集済み: Jasmine Boparai 2021 年 9 月 2 日
output = ero + d./((1-(j.*omega.*t).^(1-a)))+s./(j.*omega.*es);
output = f(omega)
ero,d,t,s,es,a are list of coefficients
output and omega are variables
omega is in data which is the first column of Ist.csv file
all coefficients are unknown.
j is imaginary.
es =8.854*10^-12 (this can be used as constant) (es is actually epsilonnot)
ero %epsilonro
d %deltaepsilonr
t %taups(ps)
s %sigmas
a %alpha
es = 8.85*10e-12
j is imaginary
Star Strider
Star Strider 2021 年 9 月 2 日
What variables are the data, what variables are known, and what variables (parameters) are to be estimated?
Is ‘j’ a variable or the imaginary operator?
.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
編集済み: Jasmine Boparai 2021 年 9 月 2 日
So, we need to estimate ero,d,t,s,a.
'j' is an imaginary operator.
omega and es are known.
The code that I have written, it is used to extract data (first two coumnns) from ist.csv file and then I plotted them. I need to fit the equation given above to the curve I got from plotting. Also I need to find all the coefficients.
Star Strider
Star Strider 2021 年 9 月 2 日
What variables are the data to be fitted? Independent variable? Dependent variable?
Apparently ‘es’ now has a value assigned to it. What value is assigned to ω?
.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
編集済み: Jasmine Boparai 2021 年 9 月 2 日
In ist.csv file, first column is omega and second column is output.
Firstly I am plotting a curve using data from ist.csv file. Then I am using the given equation in curve fitting app to fit equation to my data which i plotted and also want to calculate the coefficients which are unknown (ero,d,t,s,a).
And if you see my last answers, i have described all the parameters which are variable.
I think I am not completely understanding your question.
Star Strider
Star Strider 2021 年 9 月 2 日
Fitting real data to a complex model is not possible.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
is it possible to do like this:
output = real(e + d./((1-(j.*omega.*t).^(1-a)))+s./(j.*omega.*es))
Or do you suggest any other way?
Star Strider
Star Strider 2021 年 9 月 2 日
I tried with abs, not real, and could not get it to fit.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
Thanks for your patience. I will try to do it through script.
Alex Sha
Alex Sha 2021 年 9 月 3 日
if taking equation as:
output = real(e + d./((1-(j.*omega.*t).^(1-a)))+s./(j.*omega.*es))
result:
Root of Mean Square Error (RMSE): 0.301453065843602
Sum of Squared Residual: 90.9648248574138
Correlation Coef. (R): 0.999593118288108
R-Square: 0.999186402128943
Parameter Best Estimate
-------------------- -------------
ero 8.667518205328
d 42.2642835242029
t -8.6912938387384E-11
a -0.493793750300934
s -1270059.74250092
parameter s can be any value, others keep stable values;
while if taking equation as:
output = abs(e + d./((1-(j.*omega.*t).^(1-a)))+s./(j.*omega.*es))
result (stable and unique):
Root of Mean Square Error (RMSE): 0.164575686925224
Sum of Squared Residual: 27.1122418836362
Correlation Coef. (R): 0.999878747426502
R-Square: 0.99975750955519
Parameter Best Estimate
-------------------- -------------
ero 7.32134313693091
d 43.9926893787809
t 9.44768896632764E-11
a -0.364142224570391
s 0.659065621688692
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 3 日
Can you please share the code as well?
I will be very grateful.
Star Strider
Star Strider 2021 年 9 月 3 日
That uses different software, not MATLAB, to estimate the parameters. The code would therefore not be at all helpful unless you also have that software.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 3 日
Can you tell me the name of the software?
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 3 日
As you said fitting real data to complex model is not possible, but if we have complex data, then would it be possible?
Star Strider
Star Strider 2021 年 9 月 3 日
I have no idea.
I have no idea what your data are, the rationale behind the model you are fitting, or anything else.
All I know is that I cannot get either GlobalSearch or ga to fit it.

サインインしてコメントする。

 採用された回答

Star Strider
Star Strider 2021 年 9 月 2 日

0 投票

In electrical engineering terminology, , where f is the frequency in Hz. I defined ω that way here.
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/727854/Ist.csv', 'VariableNamingRule','preserve')
T1 = 1001×2 table
frequency(Hz) Tr 2 Data(e') _____________ ______________ 5e+08 52.4 5.26e+08 52.8 5.52e+08 52 5.78e+08 51.7 6.04e+08 52.3 6.3e+08 52.2 6.56e+08 51.4 6.82e+08 51.6 7.08e+08 52 7.34e+08 51.5 7.6e+08 51.2 7.86e+08 51.6 8.12e+08 51.6 8.38e+08 51 8.64e+08 51.2 8.9e+08 51.4
omega = 2*pi*T1{:,1};
y = T1{:,2};
es = 8.85e-12;
output = @(ero,d,t,s,a,omega) ero + d./((1-(1j.*omega.*t).^(1-a)))+s./(1j.*omega.*es);
[B,fval] = fminsearch(@(b) norm(y - imag(output(b(1),b(2),b(3),b(4),b(5),omega))), rand(5,1)*1000)
B = 5×1
615.4022 702.8629 10.1123 -4.5173 688.4702
fval = 697.6694
result = output(B(1),B(2),B(3),B(4),B(5),omega)
result =
1.0e+03 * 1.3183 + 0.1625i 1.3183 + 0.1544i 1.3183 + 0.1472i 1.3183 + 0.1405i 1.3183 + 0.1345i 1.3183 + 0.1289i 1.3183 + 0.1238i 1.3183 + 0.1191i 1.3183 + 0.1147i 1.3183 + 0.1107i 1.3183 + 0.1069i 1.3183 + 0.1034i 1.3183 + 0.1000i 1.3183 + 0.0969i 1.3183 + 0.0940i 1.3183 + 0.0913i 1.3183 + 0.0887i 1.3183 + 0.0862i 1.3183 + 0.0839i 1.3183 + 0.0817i 1.3183 + 0.0796i 1.3183 + 0.0777i 1.3183 + 0.0758i 1.3183 + 0.0740i 1.3183 + 0.0723i 1.3183 + 0.0706i 1.3183 + 0.0691i 1.3183 + 0.0676i 1.3183 + 0.0662i 1.3183 + 0.0648i 1.3183 + 0.0635i 1.3183 + 0.0622i 1.3183 + 0.0610i 1.3183 + 0.0598i 1.3183 + 0.0587i 1.3183 + 0.0576i 1.3183 + 0.0566i 1.3183 + 0.0556i 1.3183 + 0.0546i 1.3183 + 0.0537i 1.3183 + 0.0528i 1.3183 + 0.0519i 1.3183 + 0.0510i 1.3183 + 0.0502i 1.3183 + 0.0494i 1.3183 + 0.0486i 1.3183 + 0.0479i 1.3183 + 0.0472i 1.3183 + 0.0465i 1.3183 + 0.0458i 1.3183 + 0.0451i 1.3183 + 0.0445i 1.3183 + 0.0439i 1.3183 + 0.0433i 1.3183 + 0.0427i 1.3183 + 0.0421i 1.3183 + 0.0415i 1.3183 + 0.0410i 1.3183 + 0.0405i 1.3183 + 0.0399i 1.3183 + 0.0394i 1.3183 + 0.0389i 1.3183 + 0.0385i 1.3183 + 0.0380i 1.3183 + 0.0375i 1.3183 + 0.0371i 1.3183 + 0.0367i 1.3183 + 0.0362i 1.3183 + 0.0358i 1.3183 + 0.0354i 1.3183 + 0.0350i 1.3183 + 0.0346i 1.3183 + 0.0342i 1.3183 + 0.0339i 1.3183 + 0.0335i 1.3183 + 0.0332i 1.3183 + 0.0328i 1.3183 + 0.0325i 1.3183 + 0.0321i 1.3183 + 0.0318i 1.3183 + 0.0315i 1.3183 + 0.0312i 1.3183 + 0.0309i 1.3183 + 0.0306i 1.3183 + 0.0303i 1.3183 + 0.0300i 1.3183 + 0.0297i 1.3183 + 0.0294i 1.3183 + 0.0291i 1.3183 + 0.0289i 1.3183 + 0.0286i 1.3183 + 0.0283i 1.3183 + 0.0281i 1.3183 + 0.0278i 1.3183 + 0.0276i 1.3183 + 0.0274i 1.3183 + 0.0271i 1.3183 + 0.0269i 1.3183 + 0.0267i 1.3183 + 0.0264i 1.3183 + 0.0262i 1.3183 + 0.0260i 1.3183 + 0.0258i 1.3183 + 0.0256i 1.3183 + 0.0254i 1.3183 + 0.0252i 1.3183 + 0.0249i 1.3183 + 0.0248i 1.3183 + 0.0246i 1.3183 + 0.0244i 1.3183 + 0.0242i 1.3183 + 0.0240i 1.3183 + 0.0238i 1.3183 + 0.0236i 1.3183 + 0.0235i 1.3183 + 0.0233i 1.3183 + 0.0231i 1.3183 + 0.0229i 1.3183 + 0.0228i 1.3183 + 0.0226i 1.3183 + 0.0224i 1.3183 + 0.0223i 1.3183 + 0.0221i 1.3183 + 0.0220i 1.3183 + 0.0218i 1.3183 + 0.0217i 1.3183 + 0.0215i 1.3183 + 0.0214i 1.3183 + 0.0212i 1.3183 + 0.0211i 1.3183 + 0.0209i 1.3183 + 0.0208i 1.3183 + 0.0207i 1.3183 + 0.0205i 1.3183 + 0.0204i 1.3183 + 0.0203i 1.3183 + 0.0201i 1.3183 + 0.0200i 1.3183 + 0.0199i 1.3183 + 0.0197i 1.3183 + 0.0196i 1.3183 + 0.0195i 1.3183 + 0.0194i 1.3183 + 0.0193i 1.3183 + 0.0191i 1.3183 + 0.0190i 1.3183 + 0.0189i 1.3183 + 0.0188i 1.3183 + 0.0187i 1.3183 + 0.0186i 1.3183 + 0.0185i 1.3183 + 0.0184i 1.3183 + 0.0182i 1.3183 + 0.0181i 1.3183 + 0.0180i 1.3183 + 0.0179i 1.3183 + 0.0178i 1.3183 + 0.0177i 1.3183 + 0.0176i 1.3183 + 0.0175i 1.3183 + 0.0174i 1.3183 + 0.0173i 1.3183 + 0.0172i 1.3183 + 0.0171i 1.3183 + 0.0171i 1.3183 + 0.0170i 1.3183 + 0.0169i 1.3183 + 0.0168i 1.3183 + 0.0167i 1.3183 + 0.0166i 1.3183 + 0.0165i 1.3183 + 0.0164i 1.3183 + 0.0163i 1.3183 + 0.0163i 1.3183 + 0.0162i 1.3183 + 0.0161i 1.3183 + 0.0160i 1.3183 + 0.0159i 1.3183 + 0.0158i 1.3183 + 0.0158i 1.3183 + 0.0157i 1.3183 + 0.0156i 1.3183 + 0.0155i 1.3183 + 0.0155i 1.3183 + 0.0154i 1.3183 + 0.0153i 1.3183 + 0.0152i 1.3183 + 0.0152i 1.3183 + 0.0151i 1.3183 + 0.0150i 1.3183 + 0.0149i 1.3183 + 0.0149i 1.3183 + 0.0148i 1.3183 + 0.0147i 1.3183 + 0.0147i 1.3183 + 0.0146i 1.3183 + 0.0145i 1.3183 + 0.0144i 1.3183 + 0.0144i 1.3183 + 0.0143i 1.3183 + 0.0143i 1.3183 + 0.0142i 1.3183 + 0.0141i 1.3183 + 0.0141i 1.3183 + 0.0140i 1.3183 + 0.0139i 1.3183 + 0.0139i 1.3183 + 0.0138i 1.3183 + 0.0138i 1.3183 + 0.0137i 1.3183 + 0.0136i 1.3183 + 0.0136i 1.3183 + 0.0135i 1.3183 + 0.0135i 1.3183 + 0.0134i 1.3183 + 0.0133i 1.3183 + 0.0133i 1.3183 + 0.0132i 1.3183 + 0.0132i 1.3183 + 0.0131i 1.3183 + 0.0131i 1.3183 + 0.0130i 1.3183 + 0.0130i 1.3183 + 0.0129i 1.3183 + 0.0128i 1.3183 + 0.0128i 1.3183 + 0.0127i 1.3183 + 0.0127i 1.3183 + 0.0126i 1.3183 + 0.0126i 1.3183 + 0.0125i 1.3183 + 0.0125i 1.3183 + 0.0124i 1.3183 + 0.0124i 1.3183 + 0.0123i 1.3183 + 0.0123i 1.3183 + 0.0122i 1.3183 + 0.0122i 1.3183 + 0.0121i 1.3183 + 0.0121i 1.3183 + 0.0121i 1.3183 + 0.0120i 1.3183 + 0.0120i 1.3183 + 0.0119i 1.3183 + 0.0119i 1.3183 + 0.0118i 1.3183 + 0.0118i 1.3183 + 0.0117i 1.3183 + 0.0117i 1.3183 + 0.0116i 1.3183 + 0.0116i 1.3183 + 0.0116i 1.3183 + 0.0115i 1.3183 + 0.0115i 1.3183 + 0.0114i 1.3183 + 0.0114i 1.3183 + 0.0114i 1.3183 + 0.0113i 1.3183 + 0.0113i 1.3183 + 0.0112i 1.3183 + 0.0112i 1.3183 + 0.0111i 1.3183 + 0.0111i 1.3183 + 0.0111i 1.3183 + 0.0110i 1.3183 + 0.0110i 1.3183 + 0.0110i 1.3183 + 0.0109i 1.3183 + 0.0109i 1.3183 + 0.0108i 1.3183 + 0.0108i 1.3183 + 0.0108i 1.3183 + 0.0107i 1.3183 + 0.0107i 1.3183 + 0.0107i 1.3183 + 0.0106i 1.3183 + 0.0106i 1.3183 + 0.0105i 1.3183 + 0.0105i 1.3183 + 0.0105i 1.3183 + 0.0104i 1.3183 + 0.0104i 1.3183 + 0.0104i 1.3183 + 0.0103i 1.3183 + 0.0103i 1.3183 + 0.0103i 1.3183 + 0.0102i 1.3183 + 0.0102i 1.3183 + 0.0102i 1.3183 + 0.0101i 1.3183 + 0.0101i 1.3183 + 0.0101i 1.3183 + 0.0100i 1.3183 + 0.0100i 1.3183 + 0.0100i 1.3183 + 0.0099i 1.3183 + 0.0099i 1.3183 + 0.0099i 1.3183 + 0.0098i 1.3183 + 0.0098i 1.3183 + 0.0098i 1.3183 + 0.0098i 1.3183 + 0.0097i 1.3183 + 0.0097i 1.3183 + 0.0097i 1.3183 + 0.0096i 1.3183 + 0.0096i 1.3183 + 0.0096i 1.3183 + 0.0095i 1.3183 + 0.0095i 1.3183 + 0.0095i 1.3183 + 0.0095i 1.3183 + 0.0094i 1.3183 + 0.0094i 1.3183 + 0.0094i 1.3183 + 0.0093i 1.3183 + 0.0093i 1.3183 + 0.0093i 1.3183 + 0.0093i 1.3183 + 0.0092i 1.3183 + 0.0092i 1.3183 + 0.0092i 1.3183 + 0.0092i 1.3183 + 0.0091i 1.3183 + 0.0091i 1.3183 + 0.0091i 1.3183 + 0.0091i 1.3183 + 0.0090i 1.3183 + 0.0090i 1.3183 + 0.0090i 1.3183 + 0.0089i 1.3183 + 0.0089i 1.3183 + 0.0089i 1.3183 + 0.0089i 1.3183 + 0.0088i 1.3183 + 0.0088i 1.3183 + 0.0088i 1.3183 + 0.0088i 1.3183 + 0.0087i 1.3183 + 0.0087i 1.3183 + 0.0087i 1.3183 + 0.0087i 1.3183 + 0.0086i 1.3183 + 0.0086i 1.3183 + 0.0086i 1.3183 + 0.0086i 1.3183 + 0.0086i 1.3183 + 0.0085i 1.3183 + 0.0085i 1.3183 + 0.0085i 1.3183 + 0.0085i 1.3183 + 0.0084i 1.3183 + 0.0084i 1.3183 + 0.0084i 1.3183 + 0.0084i 1.3183 + 0.0083i 1.3183 + 0.0083i 1.3183 + 0.0083i 1.3183 + 0.0083i 1.3183 + 0.0083i 1.3183 + 0.0082i 1.3183 + 0.0082i 1.3183 + 0.0082i 1.3183 + 0.0082i 1.3183 + 0.0082i 1.3183 + 0.0081i 1.3183 + 0.0081i 1.3183 + 0.0081i 1.3183 + 0.0081i 1.3183 + 0.0080i 1.3183 + 0.0080i 1.3183 + 0.0080i 1.3183 + 0.0080i 1.3183 + 0.0080i 1.3183 + 0.0079i 1.3183 + 0.0079i 1.3183 + 0.0079i 1.3183 + 0.0079i 1.3183 + 0.0079i 1.3183 + 0.0078i 1.3183 + 0.0078i 1.3183 + 0.0078i 1.3183 + 0.0078i 1.3183 + 0.0078i 1.3183 + 0.0077i 1.3183 + 0.0077i 1.3183 + 0.0077i 1.3183 + 0.0077i 1.3183 + 0.0077i 1.3183 + 0.0077i 1.3183 + 0.0076i 1.3183 + 0.0076i 1.3183 + 0.0076i 1.3183 + 0.0076i 1.3183 + 0.0076i 1.3183 + 0.0075i 1.3183 + 0.0075i 1.3183 + 0.0075i 1.3183 + 0.0075i 1.3183 + 0.0075i 1.3183 + 0.0075i 1.3183 + 0.0074i 1.3183 + 0.0074i 1.3183 + 0.0074i 1.3183 + 0.0074i 1.3183 + 0.0074i 1.3183 + 0.0073i 1.3183 + 0.0073i 1.3183 + 0.0073i 1.3183 + 0.0073i 1.3183 + 0.0073i 1.3183 + 0.0073i 1.3183 + 0.0072i 1.3183 + 0.0072i 1.3183 + 0.0072i 1.3183 + 0.0072i 1.3183 + 0.0072i 1.3183 + 0.0072i 1.3183 + 0.0071i 1.3183 + 0.0071i 1.3183 + 0.0071i 1.3183 + 0.0071i 1.3183 + 0.0071i 1.3183 + 0.0071i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0070i 1.3183 + 0.0069i 1.3183 + 0.0069i 1.3183 + 0.0069i 1.3183 + 0.0069i 1.3183 + 0.0069i 1.3183 + 0.0069i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0068i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0067i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0066i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0065i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0064i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0063i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0062i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0061i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0060i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0059i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0058i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0057i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0056i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0055i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0054i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0053i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0052i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0051i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0050i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0049i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0048i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0047i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0046i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0045i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0044i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0043i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0042i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0041i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0040i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0039i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0038i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0037i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0036i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0035i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0034i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0033i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0032i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i 1.3183 + 0.0031i
figure
plot(omega, y, '.')
hold on
plot(omega, imag(result), '-r')
hold off
grid
xlabel('\omega')
ylabel('Something')
legend('Data','Fit', 'Location','best')
The imaginary result appears to be the most appropriate fit, since the real result is a straight line, and the abs result is not much better. Regardless, the function and initial parameter estimates need to be examined closely to be certain that they actually describe the data. Other solvers (such as lsqcurvefit) might be more appropriate here. I use fminsearch because everyone has it.
.

8 件のコメント

Jasmine Boparai
Jasmine Boparai 2021 年 9 月 2 日
i am very very grateful to you, you worked so hard for me.
Yes you are right, in the papers that I study, they used linear square fit and levenberg-marquardt algorithm.
Moreover the equation, I have given to you, they calculated coeffcients for it. For eg. I have attached the picture.
I appreciate your effort in doing this, this will be helpful to me.
Star Strider
Star Strider 2021 年 9 月 2 日
If you already have the estimated parameters, then just use them.
.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 3 日
Star Strider
Star Strider 2021 年 9 月 3 日
I cannot help any more than I already have.
I even tried GlobalSearch on this and could not get a good fit, regardless of fitting the real, imag or abs values of the function to the data.
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/727854/Ist.csv', 'VariableNamingRule','preserve');
omega = 2*pi*T1{:,1};
y = T1{:,2};
es = 8.85e-12;
output = @(ero,d,t,s,a,omega) ero + d./((1-(1j.*omega.*t).^(1-a)))+s./(1j.*omega.*es);
fitfcn = @(b) norm(y - abs(output(b(1),b(2),b(3),b(4),b(5),omega)));
B0 = randn(5,1)*10000;
problem = createOptimProblem('fmincon', 'x0',B0, 'objective',fitfcn);
gs = GlobalSearch('PlotFcns',@gsplotbestf);
[B,fval] = run(gs,problem)
B(:)
result = output(B(1),B(2),B(3),B(4),B(5),omega);
figure
plot(omega, y, '.')
hold on
plot(omega, real(result), '-r')
plot(omega, imag(result), '--r')
plot(omega, abs(result), '-g')
hold off
grid
xlabel('\omega')
ylabel('Something')
legend('Data','Fit', 'Location','best')
The model does not describe the data, so any further efforts to fit this are likely not worthwhile.
Stopping here.
Good luck!
.
Star Strider
Star Strider 2021 年 9 月 3 日
Attempting the fit using the genetic algorithm —
T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/727854/Ist.csv', 'VariableNamingRule','preserve');
omega = 2*pi*T1{:,1};
y = T1{:,2};
es = 8.85e-12;
outputfcn = @(ero,d,t,s,a,omega) ero + d./((1-(1j.*omega.*t).^(1-a)))+s./(1j.*omega.*es);
ftns = @(b) norm(y - real(outputfcn(b(1),b(2),b(3),b(4),b(5),omega)));
PopSz = 50;
Parms = 5;
opts = optimoptions('ga', 'PopulationSize',PopSz, 'InitialPopulationMatrix',randi(1E+4,PopSz,Parms)*1E-3, 'MaxGenerations',2E3); %, 'PlotFcn',@gaplotbestf, 'PlotInterval',1);
[theta,fval,exitflag,output] = ga(ftns, Parms, [],[],[],[],zeros(Parms,1),Inf(Parms,1),[],[],opts)
Optimization terminated: average change in the fitness value less than options.FunctionTolerance.
theta = 1×5
0.0001 18.6955 0.0001 11.3390 1.0617
fval = 303.9269
exitflag = 1
output = struct with fields:
problemtype: 'boundconstraints' rngstate: [1×1 struct] generations: 1119 funccount: 52646 message: 'Optimization terminated: average change in the fitness value less than options.FunctionTolerance.' maxconstraint: 0 hybridflag: []
format long
B = theta(:)
B = 5×1
0.000082602500916 18.695516696453094 0.000073242187500 11.338973423600198 1.061712076544762
format short
result = outputfcn(B(1),B(2),B(3),B(4),B(5),omega);
figure
plot(omega, y, '.')
hold on
plot(omega, real(result), '-r')
% plot(omega, imag(result), '--r')
% plot(omega, abs(result), '-g')
hold off
grid
xlabel('\omega')
ylabel('Something')
legend('Data','Fit Real', 'Location','best')
.
Jasmine Boparai
Jasmine Boparai 2021 年 9 月 3 日
Thank you for all your help. I really appreciate. Thank you once again.
Star Strider
Star Strider 2021 年 9 月 3 日
My pleasure!
Alex Sha
Alex Sha 2021 年 9 月 4 日
編集済み: Alex Sha 2021 年 9 月 4 日
Hi, Jasmine, the results provided above are obtained by one other package other than Matlab, the code looks simple like:
Constant es = 8.85e-12;
ComplexStr = j;
Variable omega,y[realPart];
Function y = real(e + d/((1-(j*omega*t)^(1-a)))+s/(j*omega*es));
DataFile "Sheet1[A2:B1002]";

サインインしてコメントする。

その他の回答 (1 件)

Maha
Maha 2022 年 11 月 12 日

0 投票

can i get the script code working on matlab to solve the same prob debye eq

カテゴリ

ヘルプ センター および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

タグ

質問済み:

2021 年 9 月 2 日

回答済み:

2022 年 11 月 12 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by