Fit Experimental Data to a Predetermined Model
Show older comments


Hello,
in the first figure I have a theoretical model given by the equation -
e = (1.60217662*10^-19);
hc = ((6.62607004*10^-34)/(2*pi));
vf = (3*10^10)/300;
vch = -.3:.001:.3;
nstar = 8*10^11;
ng = ((e*vch)/(hc*vf*sqrt(pi))).^2;
cq = ((2*e^2)/(hc*vf*sqrt(pi)))*sqrt(abs(ng)+abs(nstar));

The plot is produced by
figure
plot(vch,cq)
The second plot is a data set collected from my lab instrumentation and is simply just two vectors from an excel file plotted against each other,
XL = importdata('-1V to 1V 100Hz_1.xls');
figure
plot(XL.data(:,1),XL.data(:,4));
axis([-.6 .2 (5.8*10^-3) (7.4*10^-3)])
The theoretical model basically follows the trend of the experimental results, I need to however write a routine which will make it fit more exactly. I looked into producing an nth order standard form polynomial model, but this will not do as I want to keep it in the same form as outlined in the figure above.
The value nstar is the only value that should change to increase/decrease the severity of the curve, is it possible to determine this value from the experimental data?
As well, I was thinking of adding an hshift value to shift the minimum value of the curve from 0 to where the experimental model sits (i.e. -0.2V).
ng = ((e*(vch+hshift))/(hc*vf*sqrt(pi))).^2;
I have included the excel file containing the experimental data, as well as the .m file which produces the two plots. I wish to ignore all of the data which resides outside of the -.6 - .2 values on the x axis as well. To state my goal concisely, I would like to somehow gain an nstar/hshift value from the experimental data to apply it to form a new theoretical model. The nstar plotted in the figure shown above is arbitrary and is just there to show a similarly shaped plot.
Thank you! I'm hoping someone can help.
Answers (1)
Jeff Miller
on 28 Feb 2018
0 votes
If I understand you correctly, you might proceed by trial and error, using different combinations of nstar/hshift until you get a theoretical plot that seems to be a satisfactory fit to your experimental observations. (It is puzzling that the vertical axes in the theoretical and observed figures differ by a factor of about 10^3, but I guess you don't care about that.) If you don't like to do the trial and error yourself, you might let fminsearch do it. To do that, you will have to define an error function to measure how far any given theoretical curve is from your observations, for a given nstar/hshift pair. fminsearch will then try different combinations of nstar and hshift for you, and report whatever combination fits best (i.e., minimizes your error function).
Categories
Find more on 2-D Function Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!