Data fitting- Fitted coefficient 'fixed at bound'

조회 수: 17 (최근 30일)
Siddhartha Garud
Siddhartha Garud 2020년 9월 25일
댓글: Raunak Gupta 2020년 10월 15일
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.
Thanks and regards,

답변 (1개)

Raunak Gupta
Raunak Gupta 2020년 10월 2일
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
Siddhartha Garud
Siddhartha Garud 2020년 10월 15일
Dear Raunak,
Thanks for the explanation and sorry for the late reply!
Can this mean that in the local neighbourhood, the coefficienct that is 'fixed at bound' has 100 % confidence interval?
I tried a simplier exponential function to fit the data and it does not have this problem. I think the problem might be arising from the 'LambertW' function I used to convert the implicit equation into an explicit one.
Raunak Gupta
Raunak Gupta 2020년 10월 15일
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).

댓글을 달려면 로그인하십시오.


Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by