
SURREY SENSORS LTD. SOURCE DISTRIBUTION V2.0

SDK for 7-hole probe data conversion tools, for use with Labview 2023 or later

** Instructions

The file and folder names and hierarchy must not be changed, except for the user editable examples.

Use "Get N samples (user editable example)" as a template for data acquisition.

All other VIs are locked and cannot be edited by the end-user, but can be used in the end-user's projects.

After changing the data rate, it is best practice to request the data rate back from the device to ensure the change was applied.

User editable examples for setting and getting the data rate are also supplied.


** End user licence agreement

The installation and use of this software is subject to the Surrey Sensors Ltd. EULA, available at 

https://www.surreysensors.com/wp-content/uploads/2021/08/SD-EULA-100821.pdf


** Additional information

The file and folder names and hierarchy must not be changed, except for the user editable example.
Use "n-Hole probe data reduction, top level (user editable example)" as a template for incorporating the data reduction tool into custom projects.
Standalone executables are also included to allow data processing entirely from ASCII text file inputs and outputs.
All other VIs are locked and cannot be edited by the end-user, but can be used in the end-user's projects.

The procedure for converting n pressure values into velocity components is made straightforward with this package.
The first step is to resample the raw calibration data onto a uniform grid (with interpolation for added benefit).
This resampled calibration data is then used to convert pressures into velocities in a point-by-point manner using the Shaw-Ward (2015) algorithm with added sub-grid scale optimisation feature.
All data inputs and outputs are ASCII tab-delimited text.
An "Example" folder is included to help familiarise with the software.


1.
Begin by opening "Calibration data resample to uniform grid".
Select the calibration raw data input file, and the destination directory for the processed output files.
Next be sure to set the correct "n Holes" value for the probe in question and then the desired calibration grid parameters.
Ensure that only interpolation takes place and not extrapolation. Typically a grid step of 1 to 2 degrees produces excellent results. There is no need to go finer.
Running the VI will process the data and if all inputs are correct will complete without error.

2.
Next open "n-Hole probe data reduction, top level, standalone".
Select the directory containing the processed angle calibration files obtain from step 1.
Select the probe raw data file path.
Select the "DynCal" dynamic compensation calibration file as downloaded from the probe (if available)
Enable or disable the Dynamic Compensation feature as desired (if available)
Be sure to set the correct "n Holes" value once again. All other options can be left at their defaults for optimal and stable performance.
Select the destination directory for the final result files.
Running the VI will process the measured pressure data and output the velocity components and other data to the chosen output directory.

3.
The "Quiver plot" VI may be used to quickly visualise the processed data (provided it is on a uniform grid).


----#*!#*!#*! IMPORTANT INFORMATION REGARDING CALIBRATION INPUT FILE FORMAT #*!#*!#*!----:

The calibration raw data input file MUST be formatted as follows, with columns tab delimited (here shown as commas) and rows ending with newline character (as is typical).


Yaw (deg), Pitch (deg), P0, P1, ..... Pn-2, Pn-1, U_cal, rho_cal


The yaw and pitch angles MUST be in degrees not radians.
There must be two rows of non-numeric text headers at the start of the file.
There can be columns after rho_cal containing user-specific metadata, these will be ignored.
U_cal is the streamwise velocity component independently measured during the calibration.
rho_cal is the air density at the probe tip measured during calibration.
All units should be SI.


----#*!#*!#*! IMPORTANT INFORMATION REGARDING DATA INPUT FILES FORMAT #*!#*!#*!----:

The measurement data file is that which is saved directly from the probe interface software (datalog).
If custom data is to be used, it must be formatted identically to the probe interface software datalog's output file format. Columns after the "Relative humidity (%)" are optional.

Refer to the "Examples" folder for a complete set of input and output files generated with this package.
A good start would be to duplicate this folder and then attempt to reproduce the outputs successfully.
To keep files organised and minimise confusion, it is recommended to separate the raw calibration, processed calibration, data input and data output files into separate clearly named folders.



---- Further information regarding input settings ----:

In "Calibration data resample to uniform grid":
The "S-G filter" option is a localised 3rd order smoothing operation applied over the interpolated grid that can help remove unwanted texture that can come from a rough raw calibration surface.
It is also possible to downsample a calibration grid with this utility if, for example, speed of data processing is more important than accuracy.
It is also possible to stably extrapolate beyond the calibration range, the extrapolation will be well behaved but not necessarily physically correct and it is not recommended to do this.

In  "n-Hole probe data reduction, top level" and "n-Hole probe data reduction, top level, standalone":
The tolerance parameter is a value that is expressed as a multiple of the grid spacing. So for example...
if the grid spacing is 1 deg, then specifying 1E-3 for tolerance will mean that iteration stops after the 3rd decimal place has converged (in yaw and pitch). This provides a direct means of specifying desired numerical precision.
Max iters is the maximum number of iterations for the sub-grid scale optimisation. The "Converged" array will indicate if iteration was complete before this limit.
The "Method & sub-grid opt." menu allows selection of the type of error surface to optimise over and the order of the optimisation surface patch.
The original Shaw-Ward method used the least square residual and the 0th order sub-grid optimisation (i.e. nearest neighbour).

There are instances in particular with low-resolution calibration grids where the least absolute residual error surface will provide results closer to an equivalent high resolution grid.
Likewise, selecting the 4th order method can also improve accuracy, in particular for low-resolution calibration grids. The 2nd order method is less computationally intense and also more localised in yaw-pitch space.
The parameter sigma(p_noise) is the channel-averaged standard deviation of the pressure signals in quiescent conditions. It is a measure of the sensor noise floor that is used to denoise the spectral correction during dynamic compensation. If this is not known it defaults to zero and has no effect.
