Least-Squares Approach to Determine Coefficients of Calibration Function (Hot Wire Anemometry Data)
3 views (last 30 days)
Show older comments
I have a list of 50,000 Voltages (taken over time) for 7 Velocities. From this, I calculated the overall mean of the Voltage.
I am supposed to use: 1) a least-squares approach 2) the Voltage mean - to find a calibration function to convert the Voltages into Velocities.
I have been provided with the following (which is based off of King's law) - U = a0 + a1*E + … + ai*E^i + … aM*E^M (in which U = velocity, E = voltage (which I calculated), and I'm assuming the a values are the calibration coefficients)
And have been asked to perform this calibration across values of M and discuss its accuracy as a function of M.
My question is: how can I determine these calibration coefficients / a values in MATLAB?
0 Comments
Answers (1)
Star Strider
on 18 Mar 2020
It appears to be a polynomial regression in powers of ‘E’. See if the polyfit function will do what you want. (If so, pay close attention ot the order of the coefficients that the function returns.)
4 Comments
Star Strider
on 18 Mar 2020
I was thinking:
for k = 1:size(E,1)
B(k,:) = polyfit(U, E(k,:), ... );
end
I leave the rest to you.
See Also
Categories
Find more on Linear and Nonlinear Regression in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!