Find equation for 3d data
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a set of 3d data and have plotted the curves but I need to find the equations for the curves. Here's a breakdown of the problem:
I am measuring the effect of an attenuator and phase shifter (in series) on the S21 parameter of a 2-port module. The attenuator and phase shifter are controlled by applying a voltage bias. Essentially, I need to find the equation of the form W = f1(X, Y) and Z = f2(X, Y) where W and Z are the attenuator and phase shifter voltages, and X and Y are the S21 magnitude and phase, respectively.
In short, I need to be able to enter the S21 magnitude and phase, and the program will return the voltages needed for the attenuator and phase shifter.
I have attached a few example plots . What would be the best way to do this? I was considering trying to fit the curves with a polynomial using polyfitn, or using the curve fitting tool and an interpolation, but I don't know if that would help me with the actual goal of inputting values like a function.
Any help would be greatly appreciated! Thank you!
0 Kommentare
Antworten (1)
John D'Errico
am 8 Aug. 2017
Sorry, but in what universe do you think a polynomial would be an option to fit surfaces like that? :)
Seriously, your surfaces exhibit jump discontinuities. Singularities where the derivative appears to go to infinity. I saw multi-valued functions in those plots, so for a given (x,y), there are multiple z values.
So while I hate to be the bearer of bad news, don't try using polyfitn on this - you won't be happy. In fact, don't try using any polynomial modeling tool - you won't be happy. Don't try using tools like my gridfit - you won't be happy. Don't try using neural nets - you won't be happy. Don't try using interpolation tools, like interp2 - you won't be happy. Don't try using the curve (and surface)fitting toolbox - you won't be happy. I'm sure I left a few modeling tools out. In general, you won't be happy.
The point is, you have relationships that have singularities of multiple types. Some arguably worse than others, in terms of curve fitting. For example, given the proper model, you can fit a surface with a derivative singularity. Polynomials & various interpolation methods are all terrible there, because they are families of functions that don't admit derivative singularities. But given the proper model, you could handle something like that in a pinch.
Surfaces that are multi-valued however can get nasty. If for a given point (x,y), you get multiple values for z(x,y), then which of those several values should any tool predict?
Good luck.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!