Least-Squares Approach to Determine Coefficients of Calibration Function (Hot Wire Anemometry Data)

3 vues (au cours des 30 derniers jours)
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?

Réponses (1)

Star Strider
Star Strider le 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 commentaires
C W
C W le 18 Mar 2020
I'm struggling to understand how you would set that for loop up. I understand the basic structure of a for loop but am unclear on how you would indicate to go row by row through the [50,000 x 7], making it [1 x 7] and for each time reference the existing [1 x 7] - would you be able to give an example of how to do this?
Star Strider
Star Strider le 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Linear and Nonlinear Regression dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by