Calibration App Guide - Multiple-Sensor Interface |
CC BY-SA 4.0 - Creative Commons Attribution-ShareAlike 4.0 International
NOTE: The Software/Firmware and Hardware of the Multiple Sensor Interface have their own licenses (GNU, CERN).
.
Table of Contents
- 1 - Calibration Application for Multiple-Sensor Interface:1 device , unlimited applications.
- 2 - Input for the Calibration Application of Multiple-Sensor Interface
- 3 - Step 1 - Fit model function to the experimental data
- 4 - Step 2 - Generate a calibration table from the fitted model function
- 5 - Step 3 - Generate a calibration file for the Multiple-Sensor Interface
- 6 - Format of calibration file for the
Multiple-Sensor Interface
- 6.1 - Format of device calibration file for the Multiple-Sensor Interface
- 6.2 - Format of virtual calibration file for the Multiple-Sensor Interface
The symbol returns the reader to the top of the Table of Contents.
1 - Calibration Application for Multiple-Sensor Interface:1 device , unlimited applications.
The calibration application for the Multiple-Sensor Interface has the purpose of facilitating the generation of the calibration files used on the Multiple-Sensor Interface.
It allows the user to generate the Multiple-Sensor calibrations files by a semi-automatic process that uses as input a selected mathematical model for the device calibration, define by function and parameters to be fitted, plus an experimental dataset with enough samples/points to calculate the required parameters of the model.
2 - Input for the Calibration Application of Multiple-Sensor Interface
The required input for the calibration application is:
1- An experimental dataset with the samples/points that pair experimental RAW values (of frequency[HZ] or voltage[V]) obtained from Multiple Sensor Interface and the correspondent measurements obtained from an alternative measurement device/instrument/method (for example: a measurement device/instrument specifically designed and calibrated/certified for measuring the phenomenon under study).
2- A function model that describes the relation between the RAW value (of frequency[HZ] or voltage[V]) obtained from Multiple Sensor Interface and the measurement value of phenomenon under study. This function that relates RAW-value and measurement may have been deducted from theoretical analysis of the pair Sensor plus Interface(Multiple-Sensor); or alternatively could have been obtained by a selecting a mathematical function that seems to resemble the experimental data obtained on a detailed study of the pair Sensor plus Interface (by 'detailed study' is meant a an experiment where is collected a large number of sample/points relating RAW-value to measurements thus allowing to draw and 'experimental' plot of the function measurement(RAW_value) )..
The model function should be passed to calibration application as a GNU-Plot script file where is the model function and the instructions required for GNUplot to calculate the model parameter values that fit the model function to the provided experimental data.
The calibration application has a feature(dialog window) that generates automatically a GNUplot script suitable for performing the experimental data fitting. The model function placed on the generated script can be selected by the user from a list of suggests model functions.
After generating the GNUplot script the user may edit the file by clicking the 'Edit Selected Script File' button, and so making any changes he sees fit on the model function or the fitting method.
3 - Step 1 - Fit model function to the experimental data
After the user as selected a calibration dataset file and calibration script file(with the model function) it may click on the 'Fit Data' button, that will run the GNUplot program for calculating the parameters that best fit the selected model function to the provided experimental data.
The calculated parameter values are displayed on a test box on the Calibration Application, and also will be shown a GNUplot window displaying the used experimental data samples/points and a plot of the obtained fitted model function.
The calculated parameter values and the used model function will be automatically copied to the correspondent field/box of the Step 2 Tab on Calibration Application, so they are ready to be used for the next step.
4 - Step 2 - Generate a calibration table from the fitted model function
After the calculation of the parameter values that better fit the model function to experimental data, the user will on the tab of step 2 select the the options for the calibration table to be generated.
The options/boxes required for generating a new calibration table are:
'Start Raw Value' - The lowest(smallest) RAW-value that will be present on the newly generated calibration table.
'End Raw Value' - The largest(biggest) RAW-value that will be present on the newly generated calibration table.
'# of points' - The number of lines/points of the newly
generated calibration table. Maximum allowed by Mulriple-Sensor device:
CALIB_TABLE_MAX_ROWS_TO_PROCESS_ON_SINGLE_MODE=32,
CALIB_TABLE_MAX_ROWS_TO_PROCESS_ON_MULTI_MODE=12 .
Hint/suggestion: use for this option 2 less than the maximum value, so
like this you have 2 extra points that you can insert manually at the
start and end of the calibration table to extend the measurement range
to [-inf;+inf] by applying/adding a straight-line plot for the
extremities of the calibration table.
'Calibration Model Function' - The math expression of the model function. (IT'S AUTOMATICALLY FILLED WITH OUTPUT OF STEP 1).
'Measurement Units' - The units of measurement (of the dependent variable, this is the output) of the model function, also the units of the used experimental samples/points.
'Parameter Values' - The list of values of the parameters of the model function. (IT'S AUTOMATICALLY FILLED WITH OUTPUT OF STEP 1).
'Select channels to receive generated table' - A list of check boxes named 'CH.0' to 'CH.5' and 'ADC CH.0' to 'ADC CH.3' that can me marked/checked to indicate which channels are to use the newly generated calibration table.
5 - Step 3 - Generate a calibration file for the Multiple-Sensor Interface
The step 3 of the Calibration Application is about filling the contents of text boxes and selecting options from list, stating all the information/content to be saved on the new configuration file.
The step 3 is presented os two parts:
- Part 1 is about the information/content related to the sensor
channels
based on measurement of frequency (CH.0 to CH.5) or voltage(ADC CH0 to
ADC CH3).
- Part 2 is about the information/content related to the counters of
sensor
channels
based on the counting of events (for example: counting number of cycles
observed on the signal of one LCR channel (CH.0 to CH.5) of the
Multiple-Sensor Interface).
5.1 - Step 3.1 - part 1 of Generate a calibration file for theMultiple-Sensor Interface
The options/boxes available to be filled with information/content to be saved on the new configuration file are:
'UNITS' - The units of measurement of the correspondent sensor channel (units of the measurement obtained after applying the calibration table on a RAW_value).
'TABLE' - The calibration table for the correspondent sensor
channel, is a set/list of points where each point is a pair of
frequency(or voltage) and measurement. Table format: RAWvalue0,measurement0;RAWvalue1,measurement1;
... ;RAWvaluen,measurementn;
Where 'RAWvalue' is frequency[Hz] in case of channels 0 to 5 (LCR
channels), and is voltage in case of channels 6 to 9 (ADC channel).
'CH MODE' - The channel mode (multi or single) the Multiple-Sensor Interface must be working for the calibration table be valid. In case of multiple channel mode the maximum calib table lines is 'CALIB_TABLE_MAX_ROWS_TO_PROCESS_ON_MULTI_MODE=12'; In case of single channel mode the maximum calib table lines is CALIB_TABLE_MAX_ROWS_TO_PROCESS_ON_SINGLE_MODE=32.
'Jumper Select Range' - The hardware/physical configuration of
the jumpers JPx.A and JPx.B on the sensor channel of the calibration
table. The options are:
'+ (AB)' - means both jumpers A and B
are closed/placed,
'+ ()' -
means
both jumpers
A and B
are open/removed,
'A'
-
means jumper A is
closed/placed and jumper B is open/removed.
'B'
-
means jumper B is
closed/placed and jumper A is open/removed.
'Is Active' - In case this check-box is checked/marked it indicates that the calibration table is enabled/active on the Multiple-Sensor Interface device for calculating measurements , in case the check-box is unchecked/blank the it means that the calibration table is unused/ignored (although is stored in the device memory).
5.2 - Step 3.2 - part 2 of Generate a calibration file for the Multiple-Sensor Interface
'UNITS' - The units of measurement of the correspondent sensor channel (units of the measurement obtained after applying the calibration table on a RAW_value).
'C3', 'C2', 'C1', C0' - The calibration constants of the
counter measurement calibration function of the correspondent sensor
channel (counter measurement obtained after applying the
calibration function on a counter_value).
CounterMeasurement(counter value) = C3*(counter_value3)
+ C2*(counter_value2) + C1*counter_value
+ C0 .
5.3 - Step 3.3 - Saving the calibration file for the Multiple-Sensor Interface
The Multiple-Sensor Interface has 2 possible calibration files types, a device calibration file and a virtual calibration file, these have a very similar content and format.
The device calibration file is intended for having the calibration tables and associated configuration to saved/read to/from a device (Multiple-Sensor Interface), while the the virtual calibration file is intended for having the calibration tables and associated configuration to saved/read from the PC software (Multiple-Sensor) that is able to calculate measurements based on the RAW_values that is receiving from the device (by USB or RS485/serial).
6 - Format of calibration file for the Multiple-Sensor Interface
6.1 - Format of device calibration file for the Multiple-Sensor Interface
The device calibration file is composed of line starting with "DEVICE_CALIB_CHANNEL_N.?:" or "COUNTER_CALIB_CHANNEL_N.?:".
Line format:
DEVICE_CALIB_CHANNEL_N.«number»: UNITS:«units-of-measurement»; CH_MODE:«0;1»; JUMPER_SELECT_OSC_TUNING_RANGE:«+;-;A;B»; N_VALID_LINES:«number»; IS_ACTIVE:«0;1»; TABLE:«RAW_value0»,«measurement0»;«RAW_value1»,«measurement1»; ... ;«RAW_valuen»,«measurementn»;
COUNTER_CALIB_CHANNEL_N.«number»: UNITS:«units-of-measurement»; C3:«number»; C2:«number»; C1:«number»; C0:«number»;
FIEDLS/TAGS:
'UNITS' - Valid content is a sequence of ASCII characters.
'CH_MODE' - Valid content is: '0' for multiple channel; '1' for single channel.
'JUMPER_SELECT_OSC_TUNING_RANGE' - Valid content is: '+' (both jumpers A and B closed/placed); '+' (both jumpers A and B open/removed); 'A' (jumper A is closed/placed and jumper B is open/removed); 'B' (jumper B is closed/placed and jumper A is open/removed).
'N_VALID_LINES' - Valid content is a integer number between 2 and 32.
'IS_ACTIVE' - Valid content is: '0' for inactive/not-used; '1' for active/used.
'TABLE' - Valid content is: various pairs of numbers in the format '«RAW_value»,«measurement»;' . Where «RAW_value» and «measurement» are real numbers (floating point).
----------
'UNITS' - Valid content is a sequence of ASCII characters.
'C3', 'C2','C1', 'C0' - Valid content is a real number (floating point).
6.2 - Format of virtual calibration file for the Multiple-Sensor Interface
The virtual calibration file is composed of line starting with "VIRTUAL_CALIB_CHANNEL_N.?:" or "COUNTER_CALIB_CHANNEL_N.?:".
Line format:
VIRTUAL_CALIB_CHANNEL_N.«number»: UNITS:«units-of-measurement»; CH_MODE:«0;1»; JUMPER_SELECT_OSC_TUNING_RANGE:«+;-;A;B»; TABLE:«RAW_value0»,«measurement0»;«RAW_value1»,«measurement1»; ... ;«RAW_valuen»,«measurementn»;
COUNTER_CALIB_CHANNEL_N.«number»: UNITS:«units-of-measurement»; C3:«number»; C2:«number»; C1:«number»; C0:«number»;
FIEDLS/TAGS:
'UNITS' - Valid content is a sequence of ASCII characters.
'CH_MODE' - Valid content is: '0' for multiple channel; '1' for single channel.
'JUMPER_SELECT_OSC_TUNING_RANGE' - Valid content is: '+' (both jumpers A and B closed/placed); '+' (both jumpers A and B open/removed); 'A' (jumper A is closed/placed and jumper B is open/removed); 'B' (jumper B is closed/placed and jumper A is open/removed).
'TABLE' - Valid content is: various pairs of numbers in the format '«RAW_value»,«measurement»;' . Where «RAW_value» and «measurement» are real numbers (floating point).
----------
'UNITS' - Valid content is a sequence of ASCII characters.
'C3', 'C2','C1', 'C0' - Valid content is a real number (floating point).
TODO: ...
..