I'm using this sensor AIR FLOW METER, but I see on page 11 that the 0-10 V output is not linear, how can I linearize that output?
Let me provide more detailed information regarding piece wise linear interpolation than I was able to supply in comments beforehand.
Copy from comments:
The calibration table consists of pairs of numbers of sensor reading paired with actual air flow for that reading. During run time you take a sensor reading and find which pair of table entries the reading is in between. Then linear interpolate between those two points to get a corresponding air flow value. You are basically solving the straight line equation with (x1,y1) and (x2,y2) being the bounding entries in the table with x being the sensor reading and solving for y the corresponding air flow value.
Here is a graphic representation:
The blue line represents the nonlinear behavior of between an x value and a y value from some real world sensor. Calibrated data points represented by the circles are measured at particular values of X to capture the corresponding real accurate value for Y. If the CAL points lie in the right places along the non-linear curve then straight line segments between them can provide a close approximation of the actual curve. The job of the engineer is to learn enough about her sensor to be able to understand where to make CAL measurements. The more CAL points the closer to the curve you get and the less the error in the interpolated values. Two other jobs for the engineer are to to determine the acceptable level of error and to determine if a fixed table can be used across all products using a particular sensor or if each and every product needs to be calibrated and a separate table of CAL points loaded into each product.
Following from the OP in comments I show how you can extract data points from the typical curve in the sensor data sheet. Do please keep in mind that the accuracy of the data sheet graph, its repeatability from unit to unit, and its variance at temperatures away from 20C is up for debate. So in absence the following example gives some sample points that could be used. In an actual linear interpolation process where some data acquisition system is reading the voltage out of the sensor the V values in the coordinates become the X values as described above. The Y interpolated values would become the values along the bottom of the graph.
The interpolation table could look something like this:
If you measured a value of voltage say 4.5V then that would fall into the range between the second and third row of the table. Then the following values would be plugged into the above equation to derive the corresponding Y airflow rate.
Do note that the above example is not intended to imply the optimum selection of the "sample points". It is up to the user to select the number of points to approximate the curve to the acceptable error band.
The easiest way (given that there is no equation given) is to extract the data from the published data sheet using software such as Webplotdigitizer then fit a curve to the data. That will get you a matrix of data.
If you have MATLAB there is a curve fit tool that let you try different equations. But for such a crude curve you could also use linear interpolation with many segments or splines. Or just do a lot of points in Webplotdigitizer and interpolate between them. You can even try using the solver in Excel if you must (it's an optional install) to minimize the absolute or least squares error. Scilab and Octave (both free) are MATLAB options but I'm not sure if they have tools that make it as easy as MATLAB.
Note that most likely the linearized value is less and less accurate as you approach a couple m/s, until it's totally meaningless. You may wish to indicate that in some way, depending on what you are doing with the linearized data. There's no point in displaying something to 3 significant digits when it might be off by 2:1.