Data fitting- Fitted coefficient 'fixed at bound'
조회 수: 19(최근 30일)
표시 이전 댓글
Hello and greetings,
I am trying to fit a custom function (commonly called a one-diode model) to datasets from solar cells. In the confidence intervals produced for each fitted coefficients, one of them (called J0) is always 'fixed at bound'. Can anybody elaborate on what this means? I searched within the community and in the documentation but did not find an adequate answer. The lower and upper limits defined for the coefficients are not the problem. I suspect that the cause is either with the magnitude of the coefficient (usually e-10 or e-11 Ampere) or the fact that it is related to an exponential term. I tried lowering the TolX and Tolfun values to 10-20 (even though this is probably below the limit matlab can actually use). Maybe the answer lies in using TolX and Tolfun in a better way or using another fit command (such as fitnlm) instead of fit(?).
I have attached my code which also includes example data. The equation I am trying to fit is the one in the snapshot below. It has an exponential term modelling a diode.

The actual equation I use is less elegant because I converted this 'implicit' equation into an 'explicit' one using the 'LambertW' function.
If somebody could shed some light on how to correctly handle the 'fixed at bound' situation, I would be very grateful.
A related problem was found here: https://nl.mathworks.com/matlabcentral/answers/278247-curve-fit-fixed-at-bounds-problem
Thanks and regards,
Sid
댓글 수: 0
답변(1개)
Raunak Gupta
2020년 10월 2일
Hi,
The possible Name Value pair you may change is “DiffMinChange” which signifies the minimum change that will happen between any two possible values of coefficient. Also, this will be global for all coefficient so if you decrease it to 10^-12 (let’s assume) the algorithm may become slow to converge. Since one coefficient is very small (due to the exponential) the difference between two potential values also need to small otherwise it will be fixed to one bound.
Also, I will recommend checking the goodness of fit to make sure how the current model is performing. If the metrics are high, then you can assume that the model is good.
댓글 수: 4
Raunak Gupta
2020년 10월 15일
Hi,
The function you are using for converting the equation can take the solution space to a different dimesnion making one of the bounds as local minimum. This can be a issue but we cannot always confirm about whether a certain transformation makes a problem unsolvalable or not. As you mentioned if the you can remove the 'LambertW' function from the equation maybe the result will be much better and you can have better metrics for the same fit.
As for the first question if the coefficient is at local minimum then it will have a 100% confidence level around its neighbourhood (Given the size of neighbourhood we cannot define in such case).
참고 항목
범주
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!