Skip to main content
1-Visitor
July 31, 2017
Question

3D data fit

  • July 31, 2017
  • 5 replies
  • 7809 views

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. 

5 replies

21-Topaz II
July 31, 2017

Hi,

something like this?!?!:

fitfield.jpg

 

25-Diamond I
July 31, 2017

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).

 

1-Visitor
August 1, 2017

I'm using mathcad 15.

 

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.

 

25-Diamond I
August 1, 2017

@Yack_attack wrote:

I'm using mathcad 15.

 

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.

 


Guess I didn't read your question completetly.

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:

Pic.png

 

23-Emerald IV
July 31, 2017

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 IV
July 31, 2017

1-1a-Prime.png

1-1-M15.png

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

 

1-Visitor
August 1, 2017

This is pretty close to what I am after.

Could you please send  the mathcad file.

 

cheers

 

24-Ruby IV
August 1, 2017

@Yack_attack wrote:

This is pretty close to what I am after.

Could you please send  the mathcad file.

 

cheers

 


Glad to help you - see please the attaced Mathcad 15 sheet!

24-Ruby IV
August 1, 2017

@Yack_attack wrote:

Hi, I need a function


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

Price old car