RE: Ultrasonic Anemometer

Hi Gang

I’m interested in building an ultrasonic anemometer using Arduino. I found a number of articles on the subject; probably the most approachable being the following.

Wind Speed & Direction (Ultrasonic Anemometer 2D)

I’m however struggling with some of the concepts.

Under the subject ‘Wind velocity and direction’ the author states…

In this way, the influence of the temperature dependent speed of sound on the measurement result can be eliminated by subtracting the reciprocals of the measured propagation times.

Are they simply saying we are interested in the difference between measured propagation time and benchmark (no wind) for both directions (see attached)?

I’ve many more questions but I’ll leave it there for the time being.

Cheers

Jase :slight_smile:

ultrasonic_anemometer.pdf (132 KB)

benchmark.pdf (30.9 KB)

As the statement indicates, the reciprocals of the transit times are subtracted.

vx = (d / 2) * (1 / twe - 1 / tew)
vy = (d / 2) * (1 / tsn - 1 / tns)
wind velocity = sqrt(vx2 + vy2)

This is perhaps confusingly written. vx is really just (1/2 the) difference in the measured East-West velocities (and similarly for vy):

vx = (Vwe - Vew)/2

Edit: corrected, see below.

Hi jremington

Thanks so much for getting back to me. I apologise for not responding immediately. Unfortunately my math is poor so I needed to research reciprocals. I’m unsure why the reciprocals of the transit times are used? I’ve attached a spreadsheet that I hoped would illustrate for me why. The red is how I would do it and the green being how the author does it. Perhaps you could explain?

In addition, I’m curious why determining the velocity in just one direction would not be sufficient? In a previous life as a cyclist I could determine whether I had a head or tail wind by riding down the road in one direction.

I’d be interested in your thoughts.

Cheers

Jase :slight_smile:

velocity.pdf (6.52 KB)

Sorry, my comment stating that vx = Vwe-Vew was missing a factor of two (corrected). The author's algebra is correct.

However, to judge from the comment at the bottom of that page, the author never got this to work satisfactorily.

Project is on hold at present - what looks good on paper does not all ways work in practice. Due to a lot of factors altering the final outcome.

Others have reported success with this approach, so do some more reading!

Hi jremington

Again I appreciate you getting back to me. I’m not convinced of the math I’m afraid. The only formulas that the author presents that I can make any sense of are the following.

velocity1 = 331.45 + (0.6 x temperature)

time = distance / (velocity1 + velocity2)

The first formula lets us determine what velocity our sound wave should be in still air based on temperature.

velocity1 = 331.45 + (0.6 x temperature)

velocity1 = 331.45 + (0.6 x 22)

velocity1 = 344.65m/s

The second formula lets us determine what the velocity is of the air passing our ultrasonic anemometer although it does need to be rearranged to find the value of velocity2.

velocity2 = (distance / time) - velocity1

What’s important to understand here is that the difference between velocity1 and velocity2 indicates whether we have a head or tail wind. This will be the wind speed along this axis.

velocity2 = (distance / time) - velocity1

velocity2 = (0.25 / 0.00070492) - 344.65

velocity2 = 10m/s

I can’t see how the following formula determines wind speed as it does not subtract velocity1 at any stage.

x = (d / 2) * (1 / twe - 1 / tew)

I’d be interested in peoples thoughts.

Cheers

Jase :slight_smile:

The author's algebra is correct, but the change in his/her notation might be confusing. Starting with equations (1) and (2) on that page

to = d / (c + v)  (1)
tb = d / (c - v)  (2)

where

c = speed of sound (including temperature effects)
v = speed of wind
d = distance traveled
to, tb = time to travel with the wind and time to travel against the wind

It is easy to show that

v = (d/2)*(1/to - 1/tb)

This result does not depend on the speed of sound or the temperature.

If you can't go through the steps to demonstrate the correctness of this result either accept it, or brush up on your algebra. Note that the author does explain how to do this: "The windspeed, v, along any axis can be found by inverting the above relationships, then subtracting (2) from (1)"

Hi jremington

I ended up calling a friend for some help. It was not obvious to me that the following equations

twe = d / (c + v) (1)

tew = d / (c - v) (2)

when subtracted from one another can form the following equation.

x = (d / 2) * (1 / twe - 1 / tew)

I couldn't see that the two were related because the variable c disappeared but hey that's algebra for you.

Regardless I don't believe the above approach is necessarily intuitive nor is it 'easy to show' as you suggest.

Cheers

Jase :slight_smile:

The math is futile unless you can measure the TOF with microsecond accuracy.

aarg:
The math is futile unless you can measure the TOF with microsecond accuracy.

I think you mean "better than microsecond accuracy".

nor is it 'easy to show' as you suggest.

It is grade school algebra. Here are the steps, following the author's instructions:

Invert equations (1) and (2):

1/to = (c + v)/d

1/tb = (c - v)/d

on the right side, bring d inside the brackets:

1/to = c/d + v/d

1/tb = c/d - v/d

subtract the lower equation from the upper:

1/to - 1/tb = 2v/d

multiply both sides by d/2:

(d/2)(1/to - 1/tb) = v

Hope this helps!

PaulS:
I think you mean "better than microsecond accuracy".

I'm feeling generous today.

I think you mean "better than microsecond accuracy".

I'm feeling generous today.

That is an interesting point.

The author's apparatus has 2.5 m separation between TX and RX.

Assuming wind parallel to the mounting arrangement and 330 m/s sound velocity, the difference in the time of flight for 1 m/s wind velocity is about 46 microseconds (for both directions).

So 1 microsecond accuracy should be more than adequate.

However, to judge from this person's heroic, multiyear effort to get a similar instrument working, the approach is questionable.

the difference in the time of flight for 1 m/s wind velocity is about 46 microseconds (for both directions).

So 1 microsecond accuracy should be more than adequate.

+/- 1 microsecond accuracy means +/- 2% variation in wind speed. If that is "more than adequate", go for it.

jremington:
So 1 microsecond accuracy should be more than adequate.

Is this an Arduino project? because although 1 microsecond is well within the digital ability of an Arduino, it is not possible to measure the phase angle of a 40kHz signal with that degree of accuracy, using basic CPU hardware.

+/- 1 microsecond accuracy means +/- 2% variation in wind speed. If that is "more than adequate", go for it.

I would be more than happy knowing that the wind speed is 1.00 +/- .02 meters per second.

Hi jremington

Thanks for stepping me through the formula. Just for the record here on planet earth (Country Victoria Australia) algebra is introduced in early to mid high school where unfortunately my education in this subject ended. I've been trying to improve my math through Khan academy. I actually envy you being able to do this so easily.

I'm comfortable with the following formula.

to = d / (c + v)

I'm comfortable changing the subject of the above formula to v.

v = d / to - c

I don't understand why we have.

The time of flight of the third signal (back - opposite direction) is given by:
tb = d / (c - v)

Where has this third signal come from. I thought we were only sending two? One in one direction and then one in the other on a single axis.

Why is the formula to and tb different? I thought there is only one way to calculate velocity?

The way I'm reading the article is that the reason we are taking two readings on the same axis to ensure accuracy. If that is in fact the case aren't we simply interested in the average of these two.

As always I appreciate the help.

Live long and prosper

Jase :slight_smile:

Even it's some times ago, you have been posting regaridng the subject, then try to have a look at this Link. It's full of helpful information, and also a fully readymade Pro anemometer.

https://soldernerd.com/arduino-ultrasonic-anemometer/