Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the multiplier with the anemometer correct #6

Closed
khenderick opened this issue May 8, 2022 · 13 comments
Closed

Is the multiplier with the anemometer correct #6

khenderick opened this issue May 8, 2022 · 13 comments

Comments

@khenderick
Copy link

According to the datasheet one pulse per second corresponds with 2.4 km/h, which is 0.6666 m/s. For a update interval of 60s, I would think the multiplier would have to be 0.01111. The multiplier in weatherstation.yaml is set to 0.00555, which is about half that value, and I'm not sure I fully understand this difference.

@hugokernel
Copy link
Owner

Hi,

Sorry for the late reply.

I agree with you, there has been a lot of wind here and the measurements are not consistent with the official stations.
The measurements are underestimated.
I have just redone some calculations and also found 0.01111.
The initial formula comes from a piece of generic code 'Davis 1640 Wind Gauge calculations' and seems inappropriate in this case.

My method for the calculation:

For 60 seconds, at 2.4Km/h, we have 60 pulses/minutes.

Coeff = 60 / 2.4 = 25
Speed(km/h) = PulseCount / Coeff
Speed(m/s) = PulseCount / (Coeff * 3.6)

Multiplier = 1 / (Coeff * 3.6)
Multiplier ~= 0.011111

And according to the measurements made this weekend, it is more in connection.

Have you made the change and do you confirm this result in practice?

@khenderick
Copy link
Author

Yeah, I used 0.01111 in my setup. I have no other device as reference, but it feels more in check with reality/predictions.

@hugokernel
Copy link
Owner

hugokernel commented Jun 21, 2022

Now, after reading this thread, I'm not sure about 0.11111 and the calculation from my last post https://community.home-assistant.io/t/measuring-wind-speed/395693/3

I need to investigate more.

@hugokernel
Copy link
Owner

One another very useful post : mkuoppa/esphomeweatherstation#2 (comment)

@khenderick What is the diameter of your anemometer ?

@nliaudat
Copy link

Perhaps it could help :

[Wind speed in m/s] = 2PI * [anemometer mid cup to axle lenght in m]  * [revolution per seconds]  * [unknown correction factor]
anemometer mid cup to axle lenght = 72.5 mm => 72.5/1000 = 0.0725 m for R
rotary encoder pulse per revolution : 36
revolution per seconds = pulses /36 /60
S = 2PI * 0.0725 * pulses /36 /60 = 0.00021089395
Speed m/s => Km/h : *3.6 => 0.00075921822
[unknown correction factor or friction] : mine is ~5 => 0.00075921822 *5 = 0.0037960911 

You must paste that value in "pulse_meter" section of esphome.yaml
    filters:
      - multiply: 0.0037960911

From https://github.com/nliaudat/weatherstation

@khenderick
Copy link
Author

My diameter is ~18cm (hard to measure). This means a circumference of ~0.5m. Thus in theory, if the wind moves 0.5m/s, the anemometer rotates once per second. Ignoring any losses, this would mean 1.8km/h. The datasheet talks about 2.4km/h for one rotation per second, which is 0.69m/s. The "correction factor" would then be ~1.4.

It's not easy to verify without a known-correct device. Currently, my devices is more or less in the ballpark with what these "live wind map" sides say (3.82m/s measured vs 4m/s on the map).

@hugokernel
Copy link
Owner

hugokernel commented Jul 4, 2022

I made measurements with a calibrated anemometer and I confirm that the speed measured with the coefficient 0.0055 is not good and is 2 times lower, the good value is close to 0.0111.

However, I tried to calculate the multiplier with the formulas given in the links and I can't find 0.0111, whatever I do, I always find 0.0055, I will keep the reasoning applied in this comment as a formula, it is the only one in phase with the measurements.

Problem with the current formula:

circumference_in_meter = $radius * 2 * π
circumference_in_meter = 0.09 * 2 * 3.14
circumference_in_meter = 0.565486678

rotations_per_sec = pulses / $number_of_pulses_by_revolution / 60
rotations_per_sec = pulses / 2 / 60

meter_per_second = 1.18 * circumference_in_meter * $rotations_per_sec
meter_per_second = 1.18 * circumference_in_meter * 1 / $number_of_pulses_by_revolution / 60
meter_per_second = 1.18 * 0.565486678 * 1 / 2 / 60
meter_per_second = 0,005560619

This result is 2 times lower than the measured wind with calibrated anemometer.

If someone can explain to me what the problem is with this formula, I'd love to hear it.

@mkuoppa
Copy link

mkuoppa commented Jul 4, 2022

The wind speed calculation is just a rough estimate that calculates the rotations speed of the anemometer in m/s. Then applies a small factor to compensate for drag etc (calibration factor). To get a more accurate measurement I recommend calibrating against another anemometer or other wind speed measurement. But hey my goal was not to create a precise measurement but rather something that can be used in home automation (ex. Retract my awning when the wind speed is over some threshold). The position of my anemometer is not optimal either (from a metrology perspective).

@nliaudat
Copy link

nliaudat commented Jul 4, 2022

I made measurements with a calibrated anemometer and I confirm that the speed measured with the coefficient 0.0055 is not good and is 2 times lower, the good value is close to 0.0111.

However, I tried to calculate the multiplier with the formulas given in the links and I can't find 0.0111, whatever I do, I always find 0.0055, I will keep the reasoning applied in this comment as a formula, it is the only one in phase with the measurements.

Problem with the current formula:

circumference_in_meter = $radius * 2 * π
circumference_in_meter = 0.09 * 2 * 3.14
circumference_in_meter = 0.565486678

rotations_per_sec = pulses / $number_of_pulses_by_revolution / 60
rotations_per_sec = pulses / 2 / 60

meter_per_second = 1.18 * circumference_in_meter * $rotations_per_sec
meter_per_second = 1.18 * circumference_in_meter * 1 / $number_of_pulses_by_revolution / 60
meter_per_second = 1.18 * 0.565486678 * 1 / 2 / 60
meter_per_second = 0,005560619

This result is 2 times lower than the measured wind with calibrated anemometer.

If someone can explain to me what the problem is with this formula, I'd love to hear it.

It's seems that your friction factor is approx 2.
https://mdpi-res.com/d_attachment/sensors/sensors-14-21418/article_deploy/sensors-14-21418.pdf?version=1415790307

@hugokernel
Copy link
Owner

@mkuoppa @nliaudat Did you see a problem with my approach from this comment #6 (comment) ?

@nliaudat
Copy link

nliaudat commented Jul 4, 2022

@mkuoppa @nliaudat Did you see a problem with my approach from this comment #6 (comment) ?

You missed the friction factor or unknown correction factor :
[Wind speed in m/s] = 2PI * [anemometer mid cup to axle lenght in m] * [revolution per seconds] * [unknown correction factor]

look at : https://www.mdpi.com/2411-9660/2/3/21

@hugokernel
Copy link
Owner

No need for the friction factor because the calculation is based on the manufacturer's calibration which indicates that at 2.4km/h, the switch closes 1 time per second.

Ref https://github.com/hugokernel/esphome-weather-station/blob/master/docs/Weather_Sensor_Assembly_Updated.pdf

@hugokernel
Copy link
Owner

I made more precise measurements and after changing the measurement platform to pulse_meter (which allows faster and more accurate measurements), I came to the conclusion that the initial multiplier (0.0055) is the right one and therefore that 0.01111 is wrong for the sensor described in this project.

Moreover, I found the origin of the problem in my calculation, the documentation says: "A wind speed of 1.492 MPH (2.4 km/h) causes the switch to close on per second." and therefore, since we have 2 pulses per revolution and not one, my calculation was wrong and must be the one below:

For 60 seconds, at 2.4Km/h, we have 120 (not 60) pulses/minutes.

Coeff = 120 / 2.4 = 50
Speed(km/h) = PulseCount / Coeff
Speed(m/s) = PulseCount / (Coeff * 3.6)

Multiply = 1 / (Coeff * 3.6)
Multiply ~= 0.00555555

We end up with the same value calculated with the other method.

2 different calculation methods and a measurement made with an anemometer confirms the value of 0.005555 of the multiplier.

I don't know why you need a multiplier of 0.011111 but here are some tips to make sure everything is ok:

  • Make sure you have enough pulses per rotation
  • If your installation is a little isolated, in a wind corridor, this may explain why with an erroneous coefficient you find the same values as an official station
  • The best thing to do is to find another anemometer and compare (there are very practical hand-held models for very little money)

I have some wind sensor related changes to commit to shortly but now I'll close this ticket.

hugokernel added a commit that referenced this issue Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants