In the last post I described the effort to record zero wind values at a range of wind speeds and to integrate that information with data we had gathered previously. We had a an experimental but useable data set from our temperature controlled wind tunnel tests. The data made nice curves like this:

This only shows two temperature points but we have a dataset of about 10 datapoints 2 degrees apart, so about 20 degrees C. The curves all have very similar shape, so we took the liberty of just shifting the same curve up and down on the y axis, according to temperature. From a handy website the Caimbridge (UK) Engineering Department posted on hot wire anemometers, we found this reference on calibrating hot wire sensors.

*In practice, the voltage registered at the anemometer output is not that across the sensor but the e.m.f. E that is applied to the top of the Wheatstone bridge, the two arms of the bridge acting as potential dividers so that the relationship becomes in effect
*

*E*^{2} – *A*^{2} = *B U*^{0.5}

*The constant A may be replaced by the zero-flow voltage E _{0} when high accuracy is not required. In practice, the value of the exponent changes with sensor and velocity as do the values of A and B and its therefore necessary to calibrate each sensor individually and to check this calibration frequently. An exponent of 0.45 is nearer to that found in practice.*

After some tests and false starts we came up with the workable.

Vraw = Vzw + b * Windspeed ^ c

Where Vraw is the wind sensor’s VR output, Vzw is the zero-wind value determined from the coldbox data. b & c are constants to be determined by our hard-working Excel solver.

Because our first calibration was just going to scale the same curve up and down the y axis, the only thing that needed to change for each wind-speed calculation was to determine the Vraw value and the Vzw value (from the Thermistor).

I had never used the Excel solver before, but having a reason to use it was very exciting for me. As a new user, I’m not going to attempt to give you a tutorial or any details on the solver, but let me give you general description of how the problem is solved.

First one needs an Excel formula that translates the equation above into a “calculated” columns of values. The b & c constants are plugged into Excel cells of their own. Then the “fit” values are subtracted from the actual data values, and the difference is squared. This is a really traditional way to examine how well a curve (equation) “fits” the data, and it also has the virtue of getting rid of negative numbers.

We set this up on the excel spreadsheet and summed the whole column of these errors. We then set up some cells which contained the constants b & c. The solver’s job then was to tweak the constant values to minimize the errors in the “fit”. If you’ve never done this before my description is probably not going to get you there, but having done it once, it’s pretty straightforward and seems magical. The amount of brutal arithmetic that the solver is saving is slightly mind-bending to me.

OK – so how does well does it all work? We have a lot more validation to do but according to our first results with calibrated sensors, they work brilliantly and maintain their temperature insensitivity very well. The math is still very rough though. Instead of just moving the curves up and down, separate curves really should be stored for every two degree temperature point and be used by the calculations, for that particular temperature.

In an electronic sense several targets have been identified and several new prototypes are under way. The ambient temperature thermistor days are numbered especially, to be replaced with a temperature sensor whose output is independent of the supply voltage.

The new .1% resistors also work brilliantly and two random sensors pulled off the line and input into our laptop test jig matched fairly closely as you can see from the data below.

This data is from a stroll down our hallway so the speed is realistic, but I’m more excited about how well the sensors track each other. The offset lines are from alternating sensors.

This is outdoor data on a mild (coldish) day. You can see that my independent temperature sensor is reporting 6.56C and the thermistors are at -4.24 so there is some discrepancy there that needs looking into. The wind speeds seem to be tracking each other quite closely, so I’m happy about that.

I added a calibration line in the sketch that can be used to globally adjust the zero wind voltages to help calibrate out the error of various wind sensors. It seems to work well on a basic level but also needs further verification.

1 2 3 4 |
// to calibrate your sensor, put a glass over it, the sensor should not be touching desktop surface however. // adjust the zeroWindAdjustment until your sensor really reads about zero at zero wind. const float zeroWindAdjustment = .2; // negative numbers yield smaller wind speeds and vice versa. |

Here are the links to the wind sensor in the shop and calibration sketch again: