Example demonstrating real-time output uncertainty estimation for calibrated ADC values from the Flusso FLS110 sensor1.
The FLS110 is an analogue mass flow sensor.
The correct way to clone this repository to get the submodules is:
git clone --recursive [email protected]:signaloid/Signaloid-Demo-Sensors-FlussoFLS110ConversionRoutines.git
If you forgot to clone with --recursive
and end up with empty submodule directories, you can remedy this with:
git submodule update --init
Apart from using Signaloid's Cloud Compute Platform, you can compile and run this application
locally. Local execution is essentially a native Monte Carlo implementation,
that uses GNU Scientific Library (GSL)2 to generate samples for the different input distributions.
In this mode the application stores the generated output samples, in a file called data.out
.
The first line of data.out
contains the execution time of the Monte Carlo implementation
in microseconds (μs), and each
next line contains a floating-point value corresponding to an output sample value.
Please note, that for the Monte Carlo output mode, you need to select a single output
to calculate, using (-S
) command-line option.
In order to compile and run this application in the native Monte Carlo mode:
- Install dependencies (e.g., on Linux):
sudo apt-get install libgsl-dev libgslcblas0
- Compile natively (e.g., on Linux):
cd src/
gcc -I. -I/opt/local/include main.c utilities.c common.c uxhw.c -L/opt/local/lib -o native-exe -lgsl -lgslcblas -lm
- Run the application in the MonteCarlo mode, using (
-M
) command-line option:
./native-exe -M 10000 -S 0
The above program runs 10000 Monte Carlo iterations, calculating the output chosen by (-S 0
) command-line option.
3. See the output samples generated by the local Monte Carlo execution:
cat data.out
The inputs to the FLS110 sensor conversion algorithms are the heat power transfer of the gas in flow
in Watts (
The uncertainty in UniformDist(0.01, 0.05)
) Watts.
The uncertainty in UniformDist(293.0, 294.0)
) Kelvin.
The uncertainty in UniformDist(273.0, 273.5)
) Kelvin.
The uncertainty in UniformDist(420.0, 425.0)
) kPa.
The uncertainty in UniformDist(400.0, 405.0)
) kPa.
The output can be the calibrated Mass Flow output in sccm (-S
command-line parameter:
-S 0
: Calculates the calibrated Mass Flow output of the FLS110 sensor, given by
where
Following is an example output, using Signaloid's C0Pro-S+ core:
-S 1
: Calculates the calibrated Differential Pressure output of the FLS110 sensor, given by
Following is an example output, using Signaloid's C0Pro-S core:
-S 2
: Calculates all previous calibrated outputs. Selected by default.
Example: FlussoFLS110 sensor conversion routines - Signaloid version
[-o, --output <Path to output CSV file : str>] (Specify the output file.)
[-S, --select-output <output : int>] (Compute 0-indexed output. Calculate all possible outputs if equal to 2. Default value: 2.)
[-M, --multiple-executions <Number of executions : int (Default: 1)>] (Repeated execute kernel for benchmarking.)
[-T, --time] (Timing mode: Times and prints the timing of the kernel execution.)
[-b, --benchmarking] (Benchmarking mode: Generate outputs in format for benchmarking.)
[-j, --json] (Print output in JSON format.)
[-h, --help] (Display this help message.)