Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Curve fitting problem - DC Magnetization Curves

Cornel
19-Tanzanite

Curve fitting problem - DC Magnetization Curves

Hello,

Using this fit formula from below, how to determine a, b, c, d, e, and x coefficients in such a way to fit the below plot Flux Density vs Magnetizing Force:

Cornel_2-1724156296194.png

Cornel_1-1724156201189.png

Cornel_0-1724156484547.png

Cornel_0-1724156172912.png


I think (but I do not know how to do) to read all the data points of each line (60uH, 40uH, 26uH) and then to make the curve fitting by using genfit Mathcad function, minerr or something like that.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:Cornel)

Do you really want a separate fit for each of the three curves?

Or is one of the 6 parameters a,b,c,d,e,x dependent of the inductivity value (60 µH, 40 µH, 26 µH) and if yes, in which way. You could then do the very same as I have shown in your other current curve fit question.

But comparing the results for all three inductivities shows that all six parameters are completely different and so may all be dependent in some way of the inductivity value.

Furthermore you get quite different results for the same data set with different guess values.

Werner_E_0-1724198793637.png

 

All seem to provide a fairly good fit (B4 fails for lower H values, though).

Werner_E_1-1724198822577.png

 

 

View solution in original post

11 REPLIES 11
Cornel
19-Tanzanite
(To:Cornel)

 

For example below are the data points for the 3 lines: 60uH, 40uH, and 26uH lines from above graph.

Cornel_0-1724166443143.png

 

Cornel_1-1724166481918.png

 

MCP10 file attached.


Only x axis is log scale.

Now we need to find the values of a, b, c, d, e, and x coefficients in such a way to be able to generate these lines also with the above formula by fitting these curve with that given formula, by using genfit/mineer or something similar mathcad functions.

This option is for one of the branches.

Screenshot_1.jpg

Cornel
19-Tanzanite
(To:NickKemaev)

Hi, it is not ok because you changed and used other fit formula. The fit formula that needs to be used was already given in the first post. 

Screenshot_2.jpg

Переписывание не займет много времени.

Werner_E
25-Diamond I
(To:Cornel)

Do you really want a separate fit for each of the three curves?

Or is one of the 6 parameters a,b,c,d,e,x dependent of the inductivity value (60 µH, 40 µH, 26 µH) and if yes, in which way. You could then do the very same as I have shown in your other current curve fit question.

But comparing the results for all three inductivities shows that all six parameters are completely different and so may all be dependent in some way of the inductivity value.

Furthermore you get quite different results for the same data set with different guess values.

Werner_E_0-1724198793637.png

 

All seem to provide a fairly good fit (B4 fails for lower H values, though).

Werner_E_1-1724198822577.png

 

 

Cornel
19-Tanzanite
(To:Werner_E)

I am not aware of any relationship between any of a,b,c,d,e,x parameters and inductivity values. So, we need to go with no dependency between any of parameters. But I understand that if no dependency is assumed between one of a, b, c, d, e or x parameters and inductivity values then we need to make 3 genfit/Minerr fit curve separately for each inductivity values  (60 µH, 40 µH, 26 µH), right?

This below variant is with Minerr, fit curve for 26uH inductivity value.

Cornel_0-1724224828721.png

Cornel_0-1724225120748.png

 

 

 

fit curve for 60uH inductivity value.

 

Cornel_2-1724224921029.png

 

Cornel_1-1724225146381.png


And also for the last fit curve of 40uH, as above.

 

Is better Minerr than genfit?

Werner_E
25-Diamond I
(To:Cornel)


But I understand that if no dependency is assumed between one of a, b, c, d, e or x parameters and inductivity values then we need to make 3 genfit/Minerr fit curve separately for each inductivity values  (60 µH, 40 µH, 26 µH), right?

Right. If the equation does not contain a variable for these values, you can't expect one single equation (dependent on that variable) to cover all possible inductivity values like we could do in your other question with the frequency f.

 

 

Is better Minerr than genfit?


Don't think so. Usually the result are the same. Minerr may have advantages if you intend to apply additional constraints like a>5 or the like. You can't do so with genfit.

But as I had shown above, there seem to be a lot of possible functions of the type you provide with much different parameter values which all yield more or less suitable fits. The results depend heavily on he guess values provided. This is because the function type you had chosen depends on a lot (six) independent parameters.

Why must it be this specific function type?

 

In a non-log plot the correlation looks almost linear!?

Werner_E_0-1724233356981.png

 

Werner_E
25-Diamond I
(To:Werner_E)

Here is the linear fit - looks pretty good to me.

Werner_E_1-1724234175961.png

Unfortunately we only have data for three different inductivity values, so its hard to guess in which way slope and intersection may depend on the inductivity.

Slope may be linear ?

Werner_E_3-1724234532372.png

 

 

 

Cornel
19-Tanzanite
(To:Werner_E)


@Werner_E wrote:

Unfortunately we only have data for three different inductivity values, so its hard to guess in which way slope and intersection may depend on the inductivity.

Slope may be linear ?


As I mentioned also above, inductor manufacturer gives the data plot only for these three different inductivity values, for this example. Maybe with other example I saw data for other values of inductor as well, but for me at this moment its fine the fit curve obtained with minerr/genfit.

Cornel
19-Tanzanite
(To:Werner_E)


@Werner_E wrote:
Why must it be this specific function type?

This is the fit formula given by the manufacturer of the inductor.

 


@Werner_E wrote:

In a non-log plot the correlation looks almost linear!?


Manufacturer gives the plots only with log plot, not with non-log plot. Thus I cannot say anything about non-log plot correlation.

Werner_E
25-Diamond I
(To:Cornel)


@Cornel wrote:

@Werner_E wrote:
Why must it be this specific function type?

This is the fit formula given by the manufacturer of the inductor.

 


@Werner_E wrote:

In a non-log plot the correlation looks almost linear!?


Manufacturer gives the plots only with log plot, not with non-log plot. Thus I cannot say anything about non-log plot correlation.


You sure can say a lot about the non-log plot. You have the data, can easily create that kind of plot and can look at it and see that it seems to be close to linear functions.

According the function type given by the manufacturer: It actually includes the linear function f26(H)=k26*H+d26 !!

Simply set x=1, c=d=e=0, b=k26 and a=d26 and you get that linear function.

We can "refine" the values by using a solve block with minerr (genfit fails here for reasons unknown to me, so the solve block seems to be more stable). The function B26) which we get that way has as slightly better fit (correlation slightly close to 1), but you have to decide if that's worth the effort. After all having a simple linear function can be of benefit, too.

Werner_E_0-1724259320361.png

 

Using the linear approach we could try to develop a general function valid for any inductivity L

Werner_E_2-1724260853035.png

 

 

Announcements

Top Tags