Polynomial Curve Fit without floating point

176 Views Asked by At

big math dummy here hoping to get some advice. I'm working on a closed loop servo system that requires a curve fit on some feedback. The controller for this system is $16$-bit. With the help of excel and some online solvers I have a pretty good curve fit with a $5$th order polynomial ($y = ax + ax^2 + ax^3 + ax^4 + ax^5$). And I can apply this in the controller without issue using floating point arithmetic, but I'm curious if this curve fit can be implement in code without floating point, at least until the very end. The coefficients are very very small, in some cases $0.00xxxxE^{-18}$. Is it possible to perform the curve fit in some way with integer math rather than floating point until the very end? Thank you for any advice you can give : )