Qlunc is a python-based, open-source software, aligned with the Wind lidar Ontology by IEA TCP Wind Task52 , which can be used to estimate errors in wind velocity and wind direction estimations when probing the wind with lidars. The code has an objected-oriented structure; by using python objects and simulating real lidar components the code puts all together in modules to build up a lidar digital twin. The code is modular and offers the possibility of creating different lidar objects on parallel ( refer to Tutorial2.ipynb ). This enables seamless integration of lidar modules with distinct characteristics, allowing the simulation of various lidar devices.
Figure 1. General structure of Qlunc
The user creates the different lidar components by instantiating python classes, including its functional parameters and defining their specific uncertainty functions. Then, each module (also python objects) is "filled" with the corresponding components and their uncertainties are computed following uncertainty propagation method according to the GUM model. Once each component is "ensembled", building up the different modules, the modules are included into the lidar object.
The user creates also atmospheric scenarios to account for the different atmospheric conditions the lidar has to deal with. Power law exponent Ξ±, temperature and humidity are accepted, either single values or time-dependent variabilities of these inputs, taken from peripherals.
The flexibility of the code allows users, not only to assess global lidar uncertainty due to signal noise, but also to query uncertainties contributed by noise in specific modules or even single components.
π Estimated uncertainties in $V_{LOS}$ , $V_{h}$ and Ξ¦ due to errors in pointing accuracy and focus distance π
Considered as a major contributor to uncertainty in lidar estimations, the new Qlunc's add-on uses a combination of analytic and Monte Carlo approaches for estimating the intrinsic lidar uncertainty including:
- Hardware noise
- Speckle noise
- Bias in the sampling frequency
- Bias in the laser wavelength
- Quantisation and FFT-based signal processing
- Uncertainty in the lidar line-of-sight and horizontal wind speeds, as well as the uncertainty in the wind direction, all due to errors in pointing accuracy and focus distance
- Lidar unceratinty correlations assessment
- Photodetector signal-to-noise ratio and separate contributions due to shot noise, thermal noise, dark current noise and, if needed, trans-impedance amplifier noise.
- π Uncertainties in
$V_{LOS}$ ,$V_{h}$ and$V_{wind}$ with the wind direction - π Uncertainties in
$V_{LOS}$ with focus distance, elevation angle and azimuth angle for a fixed wind direction - π Uncertainty in Ξ¦ lidar estimation
- π Uncertainty in vertical and horizontal measuring planes
Figure 2. Horizontal wind speed and wind direction uncertainties - Lissajous Pattern
-
Having Anaconda installed is a prerequisite if we want to work in a different environment than
base
, and it is recommended. Then, based on the requirements added to theenvironment.yaml
file we build the new environment namedQlunc_Env
by default. -
In the Anaconda prompt, go to the directory where you have clone/download Qlunc and type:
conda env create -f environment.yml
conda activate <envname>
-
Your environment is ready to rumble. You have now a new environment with all the packages needed to run Qlunc.
-
In case you don't want to create a new environment, just install the requirements listed in the
environment.yml
file.
Download or clone the repository to a local directory.
By downloading or cloning the repository user will get several folders within which Qlunc is organized.
First,
- Create a folder named
Qlunc_Output
in '\Qlunc' main directory. Here the data will be saved. - Copy and paste the file
Qlunc_inputs_Dual.yml
, for a dual lidar solution, orQlunc_inputs_Triple.yml
, for a triple lidar solution, fromTestFiles_Qlunc
intoMain
and rename it toQlunc_inputs.yml
for a quick start/test. Otherwise, fill in the template in the same folder (TestFiles_Qlunc
) and rename it toQlunc_inputs.yml
. Copy and paste this file into theMain
folder.
The content of each folder in the repository is breafly explained here below. Further information can be found in the readme
in the corresponding folder.
Main
is the core of Qlunc. It contains the scripts to create the classes describing the components, modules, general inputs of the lidar device and atmospheric scenarios, and instantiates the classes to build up the virtual lidar(s).
Qlunc_Classes.py
contains the code which creates the lidar components and modules. Each lidar module/component is assigned to a python class.Qlunc_Instantiate.py
instantiate the lidar classes taking the values fromQlunc_inputs.yml
.
- Contains the functions that compute the uncertainties from different devices, calculting also the uncertainty propagation corresponding to the different modules and the lidar uncertainty as well. Users can define their own functions to calculate specific module uncertainties, and combined/expanded uncertainties as well.
- Contains scripts meant to do different tasks. Contains funtions which interface directly with Qlunc and are necessary to compute calculations. Also contains
Qlunc_Plotting.py
, a script to automate plots andQlunc_ImportModules.py
to import the necessary python packages. - The new functions implemented for this release estimating the uncertainty in
$V_{LOS}$ and$V_{h}$ are allocated here.
Qlunc_inputs.yml
: Human-friendly data file used as input to Qlunc. Copy and paste it intoMain
orTemplate_yaml_inputs_file.yml
to create your own use case
- Contains 3 Jupyter Notebook-based tutorials with their corresponding yaml files and working examples. These tutorials are meant to serve as a guide to get familiar with Qlunc's routines, and show current capabilities of the framework. Users can find more information about these tutorials in the corresponding
readme
in the folderTutorials
.
The environment.yml
file summarises the python packages needed to run Qlunc
- Fill in the
Qlunc_inputs.yml
with the desired values for uncertainty estimation - Run
Qlunc_Instantiate.py
to instantiate the lidar classes - Type "QluncData = Lidar.Uncertainty(Lidar,Atmospheric_Scenario,cts,Qlunc_yaml_inputs)". A dictionary with relevant parameters about lidar(s) uncertainties and configuration(s) is stored in
QluncData
- Alternatively, user can execute Qlunc through a graphical user interface
Qlunc_GUI.py
inMain
developed to ease the use of Qlunc
Contributions are very welcome! If you wish to:
- Colaborate: please contact the author
- Report issues or enhance the code: post an issue or make a pull request
- Seek for support: please contact the author
Qlunc is licensed under SD 3-Clause License
University of Stuttgart - Stuttgart Wind Energy
email: costa@ifb.uni-stuttgart.de