Function Logic
Mathematical expansions provide a way to approximate the behavior of a system based on two independent variables. A bivariate polynomial is frequently used in sensor calibration to model output as a function of both the primary measurand and an interfering variable such as temperature. The complexity of the expression increases with the degree of the terms.
Using a second or third order model provides a balance between calculation speed and fit accuracy.
Model Application
Regression analysis determines the numerical weights required to map raw inputs to corrected engineering units. When a bivariate polynomial is implemented in firmware, it allows the processor to compensate for non-linear temperature effects in real time. The algorithm calculates the sum of the products of the coefficients and the variable powers.
High-speed computation is required when these updates occur at high sample rates.
Grid Density
Calibration accuracy depends on the number of data points collected across the operating envelope. Constructing a bivariate polynomial requires a grid of measurements that covers the full range of both independent variables. Sparse data can lead to interpolation errors in the regions between the test points.
Increasing the density of the characterization matrix improves the reliability of the resulting model.
Resource Demand
Embedded systems must manage the memory and processing cycles dedicated to mathematical corrections. While a bivariate polynomial offers high precision, it requires more storage for coefficients than a simple linear look-up table. The choice of floating-point or fixed-point arithmetic impacts the final resolution of the corrected signal.
Developers often optimize the code to minimize the number of multiplication operations per cycle.