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.
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).
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.
@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:
@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
@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 dataOne example
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:
@WernerExinger wrote:
BTW, the link you provided is not working:
Now OK! Patience!
I can send the sheet!
@ValeryOchkov wrote:
Now OK!
Yes.
Patience!
Never! 😉
Just was curious as to why you would need mixed interpolation methods.
@WernerExinger wrote:
@ValeryOchkov wrote:
Now OK!
Yes.
Patience!Never! 😉
Just was curious as to why you would need mixed interpolation method
Occilation!
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.
Replace two operators - and no accilation!
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.
I can send the Mathcad 15 or Prime sheets if it is useful to you!
This is pretty close to what I am after.
Could you please send the mathcad file.
cheers
@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!
@Yack_attack wrote:
This is pretty close to what I am after.
See please the chapter from my book about it
@Yack_attack wrote:
Hi, I need a function
If you need a function (approximation) not interpolation read pleace