## Directional Wind Meter using SDP3x

### Motivation

Imagine you are model pilot and for a perfect start of your model aircraft you need the actual weather conditions, especially the speed and direction of the wind. So you can reduce the risk to crash at the start and you can decide for the ideal orientation into the wind for a take off. There are anemometers like in figure 1 which give an indication about the windspeed and by turning it manually, the direction can roughly estimated. But this gives just a snippet of the actual conditions. A more robust and reliable system would be preferable.

Other devices on the market like vane style anemometer, see figure 2, or ultrasonic anemometers can be used to determine the speed and direction more precisely. But those systems have some disadvantages. They are quite expensive compared to the handheld anemometer and they are bulkier. An alternative, which is comparable in size and prize to handheld wind meters is needed.

*Figure 1: Handheld Anemometer (Anemometer (c)Tpdwkouaa, CC BY-NC-SA 4.0)*

*Figure 2: Vane Sytle anemometer (NOAA)*

### Approach

As already known from Pitot tube applications, a differential pressure sensor like the SDP3x can be used to measure wind speed. Compared to other measurement principles like membranes this has the advantage that the sensitivity is higher at lower speed and thus is very accurate at small wind speeds. The measurement principle is quite simple, see figure 3 for details. In a tube with two openings, one opening faces towards the wind and sees the total pressure, the other opening sees the static pressure of the ambient (yellow marking in the picture). If the wind now blows into the front opening, a differential pressure (DP) is generated proportional to the velocity (Pt - Ps). This has to be scaled by the density of air *rho*. This leads to the final formula v^2 = 2*(Pt - Ps)/*rho*. The relation of differential pressure versus velocity is shown in figure 5. A single pitot tube measures only the wind speed from one direction. To get an angle of attack, it is necessary to combine two sensors or more to an array.

The excellent sensitivity of the SDP3x results from its thermal measurement principle as opposed to the diaphragm of conventional differential pressure sensors. To convert the SDP3x differential pressure output to a wind speed value, a conversion factor needs to be added to the standard pitot tube formula. The SDP3x output needs to be set to “differential pressure temperature compensation” (please refer to SDP3x datasheet for more details). Then the following conversion factor (first two terms) preceeds the pitot tube wind speed formula:

v=p0pTT0‾‾‾‾√2dpsensor,DPρ(p0,T0)‾‾‾‾‾‾‾‾‾‾‾‾√

Whereas ρ(p0,T0) is the air density (1.1289kg/m3) at calibration pressure p0 (966 mbar) and calibration temperature T0 (298.15 K), while "p" is the current absolute air pressure (e.g. measured with a barometric absolute pressure sensor) and "T" is the current differential pressure sensor temperature.

*Figure 3: How a pitot tube works*

*Figure 4: Comparison of SDP technology versus membrane sensor*

*Figures 5: Differential pressure over velocity*

### Implementation

To get the wind speed and the specific direction at least two sensors are needed, placed orthogonal to each other. To get a better resolution, we decided to use three SDP3x sensors (S1, S2, S3) with a 60° rotation llike shown in figure 6.

For those sensors a PCB was made, on which the sensors were mounted. The mechanical part is made of 3D printed material. The files can be downloaded from [TODO]. A picture of the setup is shown in figure 7. The device was tested while mounted on a step motor in front of a self built wind channel with reference sensor. As shown in figure 8, the result looks similar to the theoretical graph in figure 5. An overview of different set-ups used for reference measuring the system can be found in figures 9a to 9c.

*Figure 6: Schematic of sensor array*

*Figure 7: Picture of the wind meter*

* Figure 8: Reference measurement SDP3x against mass flow meter*

*Figure 9a: 3 SDP3x sensors in 60° rotation in a wind meter set-up on a stepper motor (side view)*

*Figure 9b: 3 SDP3x sensors in 60° rotation in a wind meter set-up on a stepper motor (front view)*

*Figure 9c: 3 SDP3x sensors in 60° rotation in a larger wind meter set-up on a stepper motor*

The measuring results are shown in the following plots figure 10a with a wind speed of 2.8 m/s and figure 10b with a wind speed of 7.8 m/s. The lines show each of the three SDP sensors. The dotted lines are the fit of a sinusoidal function.

*Figure 10a: Measurement result for rotation at 2.8 m/s*

*Figure 10b: Measurement result for rotation at 7.8 m/s*

## Code to Calculate Wind Speed and Direction

### Calculate Wind Direction

import numpy as np def calculate_omega(dp1, dp2, dp3): # parameter for sinus curve, estimated on one measurement at 7.2 m/s b=0.64 s1 = dp1+dp2 s2 = dp2+dp3 g1 = s2/s1 g2 = 1/g1 # |g1|==|g2| for omega = 3b/2 if np.abs(g1)<(3*b/2): # lookup based on g1 magn = 2*np.sqrt(1-g1+g1**2) w = np.pi/4+np.arctan((2*g1-1)/np.sqrt(3))-(np.sign(s1)-1)*np.pi/2 else: # lookup based on g2 w = np.pi/2-np.arctan((2*g2-1)/np.sqrt(3))-(np.sign(s2)-1)*np.pi/2 return w

### Calculate Wind Speed

def calculate_amp(dp1,dp2, dp3): rho = 1.2 # scale factor sqrt(2) estimated by measurements # A in differential pressure A = np.sqrt(2)*(np.abs(dp1) + np.abs(dp2) + np.abs(dp3)) # A in m/s A = np.sqrt(2 * rho * A) return A