Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

6th order polynomial expression

Status
Not open for further replies.
Newbie level 3
Joined
Sep 27, 2023
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
38
I have a set of data, defined by Y=A+BX+CX^2+DX^3+EX^4+FX^5+GX^6.
. I do a calibration of 24 point sample and then do a polynomial curve fit. X would be a voltage, A,B,C,D,E are constants, and Y is a resulting measurement (in engineering units). Lets say, 24 point sample points are [0.08,0.16,0.24,0.32,0.40,0.48,0.56,0.66,0.76,0.86,0.96,1.6,2.6,3.6,4.8,6.0,7.2,8.4,9.6,10.8,12.0,13.2,14.4,16.6] and do a polynomial curve fit. Now, lets say the X voltage is 0.065 do use that polynomial Y to get the result. Will that give a wrong result and error because at first instant of 24 point sample is 0.08 and polynomial Y is different. Its missed that data sample. I would appreciate if any one can help on this. Thank you.
 

YES, You can extrapolate the curve with as many points as you expect it to be accurate in both directions of the data and the error is summarized by R^2 in spreadsheets for the data given. The least squared error will be low within the data bounds and increase outside the limits. It could eventually diverge too.

Unfortunately your data has two linear slopes so your 5th order polynomial will oscillate so your accuracy suffers and infact diverges. Using a log Y scale will be obvious.

1695852506742.png

When Johns Hopkins published all the infected and mortality data for CV19, In Feb 2020, I projected the curve fitting using 11th order polynomial and accurately predicted the results for 4 mos based on a couple mos worth of data. I repeated this every month and found excellent agreement with seasonal stressors like school breaks, starts and major holidays once those dates were passed.
--- Updated ---

your data will not fit well with any polynomial as it appears to be two shifted quasi-linear curves.

However if you truncate the data to 7 points then even a 3rd order poly has low error.

1695854829818.png
 

Attachments

  • 1695852448836.png
    1695852448836.png
    1.5 KB · Views: 105
Last edited:
By nature of regression function, the fitted value can and usually will be different from any measured value Y. It's also plausible to assume that the error increases for extrapolated values outside the fitted X interval. But that's not necessarily the case, it completely depends on the nature of data.

More generally speaking, using a 6th order polynomial is an arbitrary decision, it should be always checked if the fit is appropriate. For many measurement linearization problems, piecewise linear interpolation gives better results than polynomial.
 

Thank you very much for replies. This is a seperate question but its related to 6th polynominal expression. After it is defined for curve fit for sample data. Can it be use it for correction factor to correct the data to match with a equipment as in calibration
 

Yes if the underlying non linearities that generate the fit do not change. Like
long term drift of components, eg. aging, which could / would invalidate the
equation coefficients. If the aging was well behaved that could be used in
the formation of the equation.



Regards, Dana.
 

Thank you for the reply. But the product reports the same unit for example voltage and I am trying to calibrate to the same voltage to put a correction factor to the voltage. putting up a curve fit, will that fix the issue. Y will be voltage and X will be voltage for that curve fit expresion. It does not make sense to find a curve fit to apply for correction factor to the data.
 

Do you mind to clarify where the correction factor shall be applied in measurement processing? It's no really clear. E.g. y = poly(x), y' = c*y
 

It does not make sense to find a curve fit to apply for correction factor to the data.
As Tony well illustrated above, the dataset has a discontinuity in the slope of the curve, something that opposes the behavior of natural phenomena, which indicates a measurement failure. The higher the order of the polynomial or the 'better' the fitting input data curve, the more your model will follow this error; In my opinion you should redo the measurements.
 

. For many measurement linearization problems, piecewise linear interpolation gives better results than polynomial.
This is true for diodes extrapolating forward when linear Rs dominates, but not in reverse where the current does not promote the linear response.

In this case there are two staggered exponential sets, so no single exponential curve fit or linear curve fit will work.

Yet as I explained before, truncating the data from 1 to 7 will work and give the least squared error and most sigfigs.

1696091876054.png
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top