11-18-2015 10:53 AM
In LabVIEW 2011, I'm using the curve fit express VI. The linear fit does a poor job fitting to data, but polynomial order 1 works great (but I can't extract the coefficients). Why does one work well but the other doesn't?
Solved! Go to Solution.
11-18-2015 10:57 AM
Wierd -- Linear = Polynomial Order 1 (look at the equations being fit -- they're the same, just use different names for the two coefficients). Not sure why Linear has such a huge offset ...
BS
11-18-2015 10:59 AM - edited 11-18-2015 11:02 AM
@mparagano wrote:
In LabVIEW 2011, I'm using the curve fit express VI.
There's your problem, right there! 😄 How to the regular tools (=non-express) handle the same data?
Seriously, if you want help, attach your VI and include your problem data. We cannot debug pictures.
Is the fit really wrong or is it just a cosmetic issue on the express panel? Just looking at the graph, I cannot see how the offset can be 20k. It seesm <<1.
11-18-2015 11:40 AM - edited 11-18-2015 11:41 AM
So here's the relevant parts of the VI. It's a real issue, not just the express panel. Right now I'm just reading in a nearly constant voltage the curve fit jumps above and below the data as it's running (in linear mode), but in poly order 1 mode it's fine. I've noticed the residual is 0 for both cases...
EDIT: Also haven't tried the non-express version, mostly because I'm not familiar with LabVIEW's matrix tools to take apart the signal into X/Y components.
11-18-2015 11:46 AM
11-18-2015 12:10 PM
11-18-2015 01:01 PM
@mparagano wrote:
So here's the relevant parts of the VI.
A more relevant part is the data. Remove the DAQ parts and substitute typical data instead. We cannot troubleshoot your VI witout data.
(... and please don't maximize the front panel and diagram to the screen. That's very irritating!)
11-18-2015 01:08 PM
When I asjust the formatting, I see that the residuals are all integer values and periodically the rediual jump from single digits to 10^9.
11-18-2015 01:09 PM
Is there a way to extract the coefficients from a polynomial fit?
11-18-2015 01:10 PM
There could also be a problem if your x (time) values are gigantic, such as when you use absolute time in the signals, but the Y values are very small. The problem will get ill conditioned. (see also this discussion).
Sorry, I don't have DAQ installed, so I cannot look at your DAQ assistants, but are they configured for absolute time or relative time?