cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

4-Participant

## 3D data fit

Hi, I need a function that can characteris 3 sets of data. Ideally a function like this z=f(x,y).

So X and Y are inputs resulting in Z.

The 3 sets of data consist of forward current, voltage and temperature measurments of a diode.

17 REPLIES 17
21-Topaz II
(To:Yack_attack)

Hi,

something like this?!?!:

24-Ruby V
(To:Yack_attack)

So you have three equal sized data vectors X, Y and Z?

Are you looking for an interpolation or fitted surface/regression?

If you look for a regression function you would have to decide which type of function you would like to fit.

Concerning interpolation I have posted a file "2D-3D-Interpolation" already a few times here. You have the coice between simple linear interplation or various spline interpolations.

In both cases you get a function z(x,y) to work with.

You'll have to state which version of the program you are using - Prime or real Mathcad (15, for example).

4-Participant
(To:Werner_E)

the data vectors are equally sized. As descibed they are foward voltage and current measurments at different temperatures.

The idea would be to have an expression V(I,t)

i'm after a spline interoplation.

24-Ruby V
(To:Yack_attack)

@Yack_attack wrote:

the data vectors are equally sized. As descibed they are foward voltage and current measurments at different temperatures.

The idea would be to have an expression V(I,t)

i'm after a spline interoplation.

To do a generic 2D-interpolation, you would need a vector with temperature and current values, but an array with voltage values - one value for each combination of temperature and current.

And the two vectors don't need to be of equal size with my routines - otherwise you could use lspline, pspline or cspline out of the box.

As you write it, you have just three vectors and voltage and current are dependent on temperature only? So you could just create two separate functions V(t) and I(t).

Anyway - for whatever it may be worth, I attach the interpolation routines I was talking about.

EDIT: I added Valerys example data to demonstrate the usage of the routines:

24-Ruby III
(To:Werner_E)

@WernerExinger wrote:

So you could just create two separate functions V(t) and I(t).yway - for whatever it may be worth, I attach the interpolation routines I was talking about.

EDIT: I added Valerys example data to demonstrate the usage of the routines:

Thanks, Werner!

But my method is more unuversal!

I can use spline (rows) and linterp (columns) for the special data

One example

friction(Delta, Re)

24-Ruby V
(To:ValeryOchkov)

@ValeryOchkov wrote:

But my method is more unuversal!

Really? Personally I prefer generic, universal functions as mine as I don't want to change anything in them in the future when I use them. Thats the reason I don't like the data and units inside that function. But ist good the both of us are happy with our ways of doing our things 😉

I can use spline (rows) and linterp (columns) for the special data

One example

friction(Delta, Re)

Hmm, I could't think of the need for using two different interpolations in the two directions. Of course my routines could be changed that way but if I would see the need for it I guees I would create a function with two additionals arguments specifying the interpolation types.

BTW, the link you provided is not working:

24-Ruby III
(To:Werner_E)

@WernerExinger wrote:

BTW, the link you provided is not working:

Now OK! Patience!

I can send the sheet!

24-Ruby V
(To:ValeryOchkov)

@ValeryOchkov wrote:

Now OK!

Yes.

Patience!

Never! 😉

Just was curious as to why you would need mixed interpolation methods.

24-Ruby III
(To:Werner_E)

@WernerExinger wrote:

@ValeryOchkov wrote:

Now OK!

Yes.

Patience!

Never! 😉

Just was curious as to why you would need mixed interpolation method

Occilation!

24-Ruby V
(To:ValeryOchkov)

Just was curious as to why you would need mixed interpolation method

Occilation!

Sometimes you can avoid oscillations with spline interpolation if you use lspline instead of cspline.

But of course linear interpolation avoids oscillations completely but may have other indesired effects.

24-Ruby III
(To:Werner_E)

Replace two operators - and no accilation!

23-Emerald III
(To:Yack_attack)

What sort of fit are you after?

Considering that a (simple) diode model is Id=Is*(exp(q*Vd/(n*k*T))-1), {Where Id = diode current, Vd = diode voltage, T=asbolute temperature, q=electron charge, k=Boltzmann constant} you have 2 parameters to play with: Is and n.

You say you have three datasets... Please attach them, so we can see what can be done with them.

24-Ruby III
(To:Yack_attack)

I can send the Mathcad 15 or Prime sheets if it is useful to you!

4-Participant
(To:ValeryOchkov)

This is pretty close to what I am after.

cheers

24-Ruby III
(To:Yack_attack)

@Yack_attack wrote:

This is pretty close to what I am after.

cheers

24-Ruby III
(To:Yack_attack)
24-Ruby III
(To:Yack_attack)

@Yack_attack wrote:

Hi, I need a function

If you need a function (approximation) not interpolation read pleace

Price old car

Announcements